0.13.14 • Published 7 months ago

@canvas-js/chain-ethereum-viem v0.13.14

Weekly downloads
-
License
-
Repository
-
Last release
7 months ago

@canvas-js/chain-ethereum-viem

The Viem Ethereum signer takes a Viem WalletClient, or generates a random WalletClient, 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.

Table of Contents

Installation

npm i @canvas-js/chain-ethereum-viem

API

import { WalletClient } from "viem"
import type { Signature, SessionSigner, Action, Message, Session } from "@canvas-js/interfaces"
import type { SIWESessionData } from "./types.js"
export interface SIWESignerViemInit {
  chainId?: number
  signer?: WalletClient
  sessionDuration?: number
}
export declare class SIWESignerViem implements SessionSigner<SIWESessionData> {
  constructor(init?: SIWESignerViemInit)
  readonly match: (address: string) => boolean
  verifySession(topic: string, session: Session<SIWESessionData>): Promise<void>
  getSession(
    topic: string,
    options?: {
      timestamp?: number
      fromCache?: boolean
    },
  ): Promise<Session<SIWESessionData>>
  sign(message: Message<Action | Session>): Signature
  clear(topic: string): Promise<void>
}
0.12.3-next.4

1 year ago

0.12.3-next.3

1 year ago

0.12.3-next.2

1 year ago

0.13.0-next.17

12 months ago

0.13.6

11 months ago

0.13.7

11 months ago

0.13.9

11 months ago

0.13.0

12 months ago

0.13.1

12 months ago

0.13.2

12 months ago

0.13.3

12 months ago

0.13.5

11 months ago

0.13.8-next.0

11 months ago

0.13.8-next.1

11 months ago

0.13.4-next.0

11 months ago

0.12.3-next.1

1 year ago

0.12.3-next.0

1 year ago

0.14.0-next.0

10 months ago

0.13.12

10 months ago

0.13.11

10 months ago

0.13.10

10 months ago

0.14.0-next.1

9 months ago

0.14.0-next.2

7 months ago

0.13.14

9 months ago

0.13.13

9 months ago

0.12.2

1 year ago

0.12.3

1 year ago

0.12.4

1 year ago

0.12.5

1 year ago

0.12.6

12 months ago

0.13.0-next.16

1 year ago

0.13.0-next.15

1 year ago

0.13.0-next.14

1 year ago

0.13.0-next.13

1 year ago

0.12.1

1 year ago

0.13.0-next.12

1 year ago

0.13.0-next.11

1 year ago

0.13.0-next.10

1 year ago

0.13.0-next.9

1 year ago

0.13.0-next.8

1 year ago

0.11.0

1 year ago

0.12.0

1 year ago

0.13.0-next.1

1 year ago

0.13.0-next.3

1 year ago

0.13.0-next.2

1 year ago

0.13.0-next.5

1 year ago

0.13.0-next.4

1 year ago

0.13.0-next.7

1 year ago

0.13.0-next.6

1 year ago

0.10.10

1 year ago

0.10.0-alpha.1

1 year ago

0.8.29

1 year ago

0.10.9

1 year ago

0.10.1

1 year ago

0.10.0-beta.2

1 year ago

0.10.2

1 year ago

0.10.0-beta.3

1 year ago

0.10.3

1 year ago

0.10.4

1 year ago

0.10.0-beta.1

1 year ago

0.10.5

1 year ago

0.10.6

1 year ago

0.10.7

1 year ago

0.10.0-beta.4

1 year ago

0.10.8

1 year ago

0.10.0

1 year ago

0.8.28

1 year ago

0.8.27-patch.21

1 year ago

0.8.27-patch.14

2 years ago

0.8.27-patch.13

2 years ago

0.8.27-patch.16

2 years ago

0.8.27-patch.15

2 years ago

0.8.27-patch.10

2 years ago

0.8.27-patch.6

2 years ago

0.8.27-patch.7

2 years ago

0.8.27-patch.12

2 years ago

0.8.27-patch.8

2 years ago

0.8.27-patch.11

2 years ago

0.8.27-patch.9

2 years ago

0.8.27-patch.20

2 years ago

0.9.1

2 years ago

0.8.27-patch.18

2 years ago

0.8.27-patch.17

2 years ago

0.8.27-patch.19

2 years ago

0.8.27-patch.2

2 years ago

0.8.27-patch.3

2 years ago

0.8.27-patch.4

2 years ago

0.8.27-patch.5

2 years ago

0.8.27-patch.1

2 years ago

0.9.0

2 years ago

0.9.0-next.1

2 years ago

0.8.26-alpha.4

2 years ago

0.8.26-alpha.3

2 years ago

0.8.26-alpha.2

2 years ago

0.8.26

2 years ago

0.8.26-alpha.1

2 years ago

0.8.25

2 years ago

0.8.24

2 years ago

0.8.23

2 years ago

0.8.22

2 years ago

0.8.21

2 years ago

0.8.20

2 years ago

0.8.19

2 years ago

0.8.18

2 years ago

0.8.17

2 years ago

0.8.16

2 years ago

0.8.15

2 years ago