Private
connectionPrivate
optionsOptional
clientOptional
gasOptional
gasless?: ({ openzeppelin: { relayerUrl: string; relayerForwarderAddress?: string | undefined; useEOAForwarder?: boolean | undefined; domainName?: string | undefined; domainVersion?: string | undefined; }; experimentalChainlessSupport?: boolean | undefined; }) | ({ biconomy: { apiId: string; apiKey: string; deadlineSeconds?: number | undefined; }; })Optional
gatewayOptional
readonlyOptional
secretOptional
supportedFetch the native or ERC20 token balance of this wallet
// native currency balance
const balance = await sdk.wallet.balance();
// ERC20 token balance
const erc20balance = await sdk.wallet.balance(tokenContractAddress);
Private
createExecute a raw transaction to the blockchain from the connected wallet and wait for it to be mined
raw transaction data to send to the blockchain
Recover the signing address from a signed message
the original message that was signed
the signature to recover the address from
the address that signed the message
const message = "Sign this message...";
const signature = await sdk.wallet.sign(message);
// Now we can recover the signing address
const address = sdk.wallet.recoverAddress(message, signature);
Request funds from a running local node to the currently connected wallet
the amount in native currency (in ETH) to request
Private
requireSign any message with the connected wallet private key
the message to sign
the signed message
// This is the message to be signed
const message = "Sign this message...";
// Now we can sign the message with the connected wallet
const signature = await sdk.wallet.sign(message);
Sign a typed data structure (EIP712) with the connected wallet private key
the domain as EIP712 standard
the structure and data types as defined by the EIP712 standard
the data to sign
the payload and its associated signature
// This is the message to be signed
// Now we can sign the message with the connected wallet
const { payload, signature } = await sdk.wallet.signTypedData(
{
name: "MyEIP721Domain",
version: "1",
chainId: 1,
verifyingContract: "0x...",
},
{ MyStruct: [ { name: "to", type: "address" }, { name: "quantity", type: "uint256" } ] },
{ to: "0x...", quantity: 1 },
);
Transfer native or ERC20 tokens from this wallet to another wallet
the account to send funds to
the amount in tokens
Optional - ERC20 contract address of the token to transfer
// transfer 0.8 ETH
await sdk.wallet.transfer("0x...", 0.8);
// transfer 0.8 tokens of `tokenContractAddress`
await sdk.wallet.transfer("0x...", 0.8, tokenContractAddress);
Generated using TypeDoc
Connect and Interact with a user wallet
Example