0.9.0 • Published 3 days ago

@canvas-js/chain-ethereum v0.9.0

Weekly downloads
-
License
-
Repository
-
Last release
3 days ago

@canvas-js/chain-ethereum

The Ethers (v6) Ethereum signer takes an ethers signer, or generates a random ethers.Wallet, and uses it to sign a SIWE message authenticating a new session.

It also handles verification of messages matching this standard, and can be used in conjuction with @canvas-js/chain-ethereum-viem.

Table of Contents

Installation

npm i @canvas-js/chain-ethereum

API

import { AbstractSigner } from "ethers";
import type { Signature, SessionSigner, Action, Message, Session } from "@canvas-js/interfaces";
import type { SIWESessionData } from "./types.js";
export interface SIWESignerInit {
    chainId?: number;
    signer?: AbstractSigner;
    sessionDuration?: number;
}
export declare class SIWESigner implements SessionSigner<SIWESessionData> {
    constructor(init?: SIWESignerInit);
    readonly match: (address: string) => boolean;
    verifySession(topic: string, session: Session<SIWESessionData>): void;
    getSession(topic: string, options?: {
        timestamp?: number;
        fromCache?: boolean;
    }): Promise<Session<SIWESessionData>>;
    sign(message: Message<Action | Session>): Signature;
    clear(topic: string): Promise<void>;
}
0.8.27-patch.2

3 days ago

0.8.27-patch.3

3 days ago

0.8.27-patch.4

3 days ago

0.8.27-patch.5

3 days ago

0.8.27-patch.1

3 days ago

0.9.0

7 days ago

0.9.0-next.1

23 days ago

0.8.26-alpha.4

3 months ago

0.8.26-alpha.3

3 months ago

0.8.26-alpha.2

3 months ago

0.8.26

3 months ago

0.8.26-alpha.1

3 months ago

0.8.25

3 months ago

0.8.24

3 months ago

0.8.23

3 months ago

0.8.22

3 months ago

0.8.21

4 months ago

0.8.20

4 months ago

0.8.19

4 months ago

0.8.18

4 months ago

0.8.17

4 months ago

0.8.16

4 months ago

0.8.15

4 months ago

0.8.14-alpha.1

5 months ago

0.8.14

5 months ago

0.8.13

5 months ago

0.8.12

5 months ago

0.8.11

5 months ago

0.8.10

5 months ago

0.8.9

5 months ago

0.8.8

5 months ago

0.8.5

5 months ago

0.8.4

5 months ago

0.8.7

5 months ago

0.8.6

5 months ago

0.8.2-alpha.1

5 months ago

0.8.2-patch.1

5 months ago

0.8.3

5 months ago

0.8.2

5 months ago

0.7.2-alpha.1

5 months ago

0.7.2-alpha.2

5 months ago

0.7.2-alpha.3

5 months ago

0.7.2-alpha.4

5 months ago

0.7.2-alpha.5

5 months ago

0.7.2-alpha.6

5 months ago

0.7.2-alpha.7

5 months ago

0.7.2

5 months ago

0.7.1

5 months ago

0.7.3

5 months ago

0.7.0

5 months ago

0.8.1

5 months ago

0.8.0

5 months ago

0.6.0-alpha2

8 months ago

0.6.0-alpha1

8 months ago

0.6.0-alpha4

7 months ago

0.6.0-alpha3

7 months ago

0.6.0-alpha6

7 months ago

0.6.0-alpha5

7 months ago

0.5.0

6 months ago

0.6.0-alpha7

7 months ago

0.6.1

6 months ago

0.6.0

6 months ago

0.5.1

6 months ago

0.4.9

1 year ago

0.5.0-alpha

12 months ago

0.5.0-alpha4

11 months ago

0.5.0-alpha3

12 months ago

0.5.0-alpha2

12 months ago

0.4.10

12 months ago

0.4.11

12 months ago

0.4.8

1 year ago

0.4.5

1 year ago

0.4.4

1 year ago

0.4.7

1 year ago

0.4.6

1 year ago

0.4.1

1 year ago

0.4.0

1 year ago

0.4.3

1 year ago

0.4.2

1 year ago

0.3.0

1 year ago

0.2.1

1 year ago

0.2.0

1 year ago

0.3.2

1 year ago

0.3.1

1 year ago

0.2.2

1 year ago

0.3.3

1 year ago

0.1.2

1 year ago

0.1.3

1 year ago

0.1.0

1 year ago

0.0.53

1 year ago

0.1.1

1 year ago

0.0.52

1 year ago

0.0.51

1 year ago

0.0.50

1 year ago

0.0.50-pre4

1 year ago

0.0.50-pre3

1 year ago

0.0.50-pre2

1 year ago

0.0.50-pre

1 year ago