Skip to main contentClass: 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: Ethereum = WalletType.Ethereum
Defined in: packages/wallet-stamper/src/ethereum.ts:24
The type of the wallet.
Inherited from
BaseEthereumWallet.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.
Inherited from
BaseEthereumWallet.getPublicKey
signMessage()
signMessage(message): Promise<`0x${string}`>
Defined in: packages/wallet-stamper/src/ethereum.ts:66
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.
This method uses the ‘personal_sign’ method of the Ethereum provider
to sign the message with the user’s account.
Overrides
BaseEthereumWallet.signMessage