Skip to main contentClass: abstract BaseEthereumWallet
Defined in: packages/wallet-stamper/src/ethereum.ts:23
Abstract class representing a base Ethereum wallet.
This class is used for stamping requests with an Ethereum wallet.
To use this class, extend it and implement the signMessage method
to provide a custom signing function. The signMessage method should
return a promise that resolves to a hexadecimal string representing
the signature of the provided message.
Extended by
Implements
Constructors
Constructor
new BaseEthereumWallet(): BaseEthereumWallet
Returns
BaseEthereumWallet
Properties
type
type: Ethereum = WalletType.Ethereum
Defined in: packages/wallet-stamper/src/ethereum.ts:24
The type of the wallet.
Implementation of
EthereumWalletInterface.type
Methods
getPublicKey()
getPublicKey(): Promise<string>
Defined in: packages/wallet-stamper/src/ethereum.ts:40
Returns the public key, which is the SECP256K1 hex encoded public key from your Ethereum wallet.
Returns
Promise<string>
A promise that resolves to a string representing the compressed public key.
Implementation of
EthereumWalletInterface.getPublicKey
signMessage()
abstract signMessage(message): Promise<`0x${string}`>
Defined in: packages/wallet-stamper/src/ethereum.ts:33
Signs a message and returns the hex signature as a string.
Parameters
message
string
The message to be signed, either as a string or a Hex.
Returns
Promise<`0x${string}`>
A promise that resolves to a Hex string representing the signature.
Implementation of
EthereumWalletInterface.signMessage