Skip to content
docs

IWalletAccount

Defined in: account.ts:135

A read-only account plus the ability to sign and broadcast.

readonly chain: string

Defined in: account.ts:94

CAIP-2 chain id, e.g. “eip155:1”, “solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp”, “ton:-239”, “tron:0x2b6653dc”, “bip122:000000000019d6689c085ae165831e93”.

IWalletAccountReadOnly.chain


readonly needsNetwork: boolean

Defined in: account.ts:140

True when signTransaction itself needs the network (TON seqno, Solana blockhash, BTC UTXOs, Tron ref block). EVM signs offline.

dispose(): void

Defined in: account.ts:154

Zeroize this account’s key material.

void


getAddress(): Promise<string>

Defined in: account.ts:96

The account’s address in the chain’s canonical form.

Promise<string>

IWalletAccountReadOnly.getAddress


getBalance(): Promise<bigint>

Defined in: account.ts:98

Native balance in base units.

Promise<bigint>

IWalletAccountReadOnly.getBalance


getTokenBalance(token): Promise<bigint>

Defined in: account.ts:100

Balance of a token (contract, mint, jetton master) in its base units.

string

Promise<bigint>

IWalletAccountReadOnly.getTokenBalance


optional getTokenInfo(token): Promise<TokenInfo>

Defined in: account.ts:106

Decimals, symbol, name, supply and holder-relevant TokenFlags of a token, read from the chain. Throws NotATokenError when the address is not a token there. Chain packages that cannot read token metadata leave it out.

string

Promise<TokenInfo>

IWalletAccountReadOnly.getTokenInfo


getTransactionReceipt(hash): Promise<Receipt | undefined>

Defined in: account.ts:112

The receipt of a transaction, or undefined while it is not yet included.

string

Promise<Receipt | undefined>

IWalletAccountReadOnly.getTransactionReceipt


quoteSendTransaction(tx): Promise<{ fee: bigint; }>

Defined in: account.ts:108

Network fee the transaction would pay, in native base units. Nothing is signed.

unknown

Promise<{ fee: bigint; }>

IWalletAccountReadOnly.quoteSendTransaction


quoteTransfer(options): Promise<{ fee: bigint; }>

Defined in: account.ts:110

Network fee a TransferOptions transfer would pay, in native base units.

TransferOptions

Promise<{ fee: bigint; }>

IWalletAccountReadOnly.quoteTransfer


sendTransaction(tx, options?): Promise<TransferResult>

Defined in: account.ts:146

Sign and broadcast.

unknown

WriteOptions

Promise<TransferResult>


sign(message): Promise<string>

Defined in: account.ts:142

Sign a message the chain’s conventional way (EIP-191, BIP-137, ed25519 raw…). Returns the chain’s conventional encoding (hex, base64…).

string | Uint8Array<ArrayBufferLike>

Promise<string>


signTransaction(tx, options?): Promise<string>

Defined in: account.ts:144

Sign a fully specified transaction WITHOUT broadcasting. Returns the serialised signed tx.

unknown

WriteOptions

Promise<string>


toReadOnlyAccount(): IWalletAccountReadOnly

Defined in: account.ts:152

The same address without signing ability: safe to hand to code that should only read or quote.

IWalletAccountReadOnly


transfer(options, writeOptions?): Promise<TransferResult>

Defined in: account.ts:148

Native or token transfer; the account builds the transaction.

TransferOptions

WriteOptions

Promise<TransferResult>


verify(message, signature): Promise<boolean>

Defined in: account.ts:114

Check a message signature against this account’s key, the chain’s conventional way.

string | Uint8Array<ArrayBufferLike>

string

Promise<boolean>

IWalletAccountReadOnly.verify