Skip to content

Commit

Permalink
add interface for signer
Browse files Browse the repository at this point in the history
  • Loading branch information
nplasterer committed Sep 24, 2024
1 parent ef6c705 commit ea7bc5b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/lib/Signer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ import type { WalletClient } from 'viem'

export interface Signer {
getAddress: () => Promise<string>
getChainId: () => bigint
isSmartContractWallet: () => boolean
signMessage: (message: string) => Promise<string>
}

Expand Down Expand Up @@ -37,5 +39,8 @@ export function convertWalletClientToSigner(
message: typeof message === 'string' ? message : { raw: message },
account,
}),
// Not supported by viem wallet client yet
getChainId: () => 1n,
isSmartContractWallet: () => false,
}
}

0 comments on commit ea7bc5b

Please sign in to comment.