Class: EthereumWallet
Defined in: packages/wallet-stamper/src/ethereum.ts:56 EthereumWallet class extends the BaseEthereumWallet to provide specific implementations for Ethereum-based wallets. This class is responsible for signing messages using the Ethereum provider available in the browser (e.g., MetaMask). It interacts with the Ethereum provider to request account access and sign messages.Extends
Constructors
Constructor
new EthereumWallet(): EthereumWallet
Returns
EthereumWallet
Inherited from
BaseEthereumWallet.constructor
Properties
type
type:Defined in: packages/wallet-stamper/src/ethereum.ts:24 The type of the wallet.Ethereum=WalletType.Ethereum
Inherited from
BaseEthereumWallet.type
Methods
getPublicKey()
getPublicKey():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.Promise<string>
Returns
Promise<string>
A promise that resolves to a string representing the compressed public key.
Inherited from
BaseEthereumWallet.getPublicKey
signMessage()
signMessage(Defined in: packages/wallet-stamper/src/ethereum.ts:66 Signs a message and returns the hex signature as a string.message):Promise<`0x${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.
This method uses the ‘personal_sign’ method of the Ethereum provider
to sign the message with the user’s account.
Overrides
BaseEthereumWallet.signMessage