@canvas-js/chain-ethereum
Advanced tools
Comparing version 0.0.53 to 0.1.0
@@ -10,2 +10,3 @@ import { ethers, Signer } from "ethers"; | ||
constructor(chainId?: ChainId, provider?: ethers.providers.JsonRpcProvider | undefined); | ||
hasProvider(): boolean; | ||
verifyAction(action: Action): Promise<void>; | ||
@@ -16,4 +17,2 @@ verifySession(session: Session): Promise<void>; | ||
getDelegatedSignerAddress: (wallet: ethers.Wallet) => Promise<string>; | ||
isSigner(signer: unknown): signer is ethers.Signer & TypedDataSigner; | ||
isDelegatedSigner(delegatedSigner: unknown): delegatedSigner is ethers.Wallet; | ||
signAction: (signer: ethers.Signer & TypedDataSigner, payload: ActionPayload) => Promise<Action>; | ||
@@ -20,0 +19,0 @@ signDelegatedAction: (wallet: ethers.Wallet, payload: ActionPayload) => Promise<Action>; |
@@ -32,2 +32,5 @@ import { ethers } from "ethers"; | ||
} | ||
hasProvider() { | ||
return this.provider !== undefined; | ||
} | ||
async verifyAction(action) { | ||
@@ -57,8 +60,2 @@ const expectedAddress = action.session ?? action.payload.from; | ||
} | ||
isSigner(signer) { | ||
return signer instanceof ethers.Wallet || signer instanceof ethers.providers.JsonRpcSigner; | ||
} | ||
isDelegatedSigner(delegatedSigner) { | ||
return delegatedSigner instanceof ethers.Wallet; | ||
} | ||
async generateDelegatedSigner() { | ||
@@ -65,0 +62,0 @@ return ethers.Wallet.createRandom(); |
{ | ||
"name": "@canvas-js/chain-ethereum", | ||
"version": "0.0.53", | ||
"version": "0.1.0", | ||
"type": "module", | ||
@@ -12,3 +12,3 @@ "author": "Canvas Technology Corporation (https://canvas.xyz)", | ||
"dependencies": { | ||
"@canvas-js/interfaces": "0.0.53", | ||
"@canvas-js/interfaces": "0.1.0", | ||
"@ethersproject/wallet": "^5.7.0", | ||
@@ -15,0 +15,0 @@ "ethers": "^5.7.1 <6", |
16528
19
357
+ Added@canvas-js/interfaces@0.1.0(transitive)
- Removed@canvas-js/interfaces@0.0.53(transitive)
Updated@canvas-js/interfaces@0.1.0