0.8.27-patch.18 • Published 9 days ago

@canvas-js/chain-substrate v0.8.27-patch.18

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

@canvas-js/chain-substrate

The Substrate session signer takes an injected polkadot-js extension, or generates a random Substrate keypair, and uses it to authenticate a new session.

It also handles verification of messages matching this authentication method.

Table of Contents

Installation

npm i @canvas-js/chain-atp

API

import type { Signature, SessionSigner, Action, Message, Session } from "@canvas-js/interfaces";
import { InjectedExtension } from "@polkadot/extension-inject/types";
import { KeypairType } from "@polkadot/util-crypto/types";
import type { SubstrateSessionData } from "./types.js";
type SubstrateSignerInit = {
    sessionDuration?: number;
    extension?: InjectedExtension;
    substrateKeyType?: KeypairType;
};
export declare class SubstrateSigner implements SessionSigner {
    constructor(init?: SubstrateSignerInit);
    readonly match: (address: string) => boolean;
    verifySession(topic: string, session: Session): Promise<void>;
    getSession(topic: string, options?: {
        chain?: string;
        timestamp?: number;
        fromCache?: boolean;
    }): Promise<Session<SubstrateSessionData>>;
    sign(message: Message<Action | Session>): Signature;
    clear(topic: string): Promise<void>;
}
0.8.27-patch.14

10 days ago

0.8.27-patch.13

11 days ago

0.8.27-patch.16

10 days ago

0.8.27-patch.15

10 days ago

0.8.27-patch.10

11 days ago

0.8.27-patch.6

11 days ago

0.8.27-patch.7

11 days ago

0.8.27-patch.12

11 days ago

0.8.27-patch.8

11 days ago

0.8.27-patch.11

11 days ago

0.8.27-patch.9

11 days ago

0.8.27-patch.20

9 days ago

0.9.1

11 days ago

0.8.27-patch.18

9 days ago

0.8.27-patch.17

9 days ago

0.8.27-patch.19

9 days ago

0.8.27-patch.2

14 days ago

0.8.27-patch.3

14 days ago

0.8.27-patch.4

14 days ago

0.8.27-patch.5

14 days ago

0.8.27-patch.1

15 days ago

0.9.0

19 days ago

0.9.0-next.1

1 month ago

0.8.26-alpha.4

4 months ago

0.8.26-alpha.3

4 months ago

0.8.26-alpha.2

4 months ago

0.8.26

4 months ago

0.8.26-alpha.1

4 months ago

0.8.25

4 months ago

0.8.24

4 months ago

0.8.23

4 months ago

0.8.22

4 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

5 months ago

0.8.16

5 months ago

0.8.15

5 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

6 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.6.0-alpha7

7 months ago

0.6.1

6 months ago

0.6.0

6 months ago

0.4.9

1 year ago

0.5.0-alpha

1 year ago

0.5.0-alpha4

12 months ago

0.5.0-alpha3

1 year ago

0.5.0-alpha2

1 year ago

0.4.10

1 year ago

0.4.11

1 year 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