Skip to content
docs

WalletManagerTon

Defined in: wallet-ton/src/manager.ts:26

One seed → TON accounts at m/44’/607’/i’ (SLIP-10 ed25519) on Wallet V5R1 — the derivation Trust Wallet and Ledger use for a BIP-39 phrase. Paths may be relative to m/44’/607’ (“0’”) or full.

Built with an ed25519 Signer instead of a seed, the manager wraps it:

  • a derivable SeedSigner sitting at m/44'/607' yields getAccount(i) → i' children;
  • a SeedSigner at a leaf, or any external signer, is getAccount(0) (path = the signer’s path, or ‘external’); other indexes/paths throw.

Tonkeeper-style 24-word TON mnemonics (not BIP-39) are imported with WalletManagerTon.fromTonMnemonic; they yield one account at ton-mnemonic.

new WalletManagerTon(seedOrSigner, config?): WalletManagerTon

Defined in: wallet-ton/src/manager.ts:27

string | Uint8Array<ArrayBufferLike> | Signer

TonConfig = {}

WalletManagerTon

WalletManager<WalletAccountTon, TonConfig>.constructor

protected readonly _accounts: Map<string, WalletAccountTon>

Defined in: core/dist/index.d.ts:271

WalletManager._accounts


protected readonly _config: TonConfig

Defined in: core/dist/index.d.ts:270

WalletManager._config


protected readonly _signer: Signer | undefined

Defined in: core/dist/index.d.ts:269

WalletManager._signer

protected cachedAccount(key, create): Promise<WalletAccountTon>

Defined in: core/dist/index.d.ts:295

The account cached under key, built by create at most once: concurrent calls share one build. Throws once the manager is disposed; an account whose build finishes after dispose() is disposed itself and the call throws, so no live signing account outlives the manager.

string

() => WalletAccountTon | Promise<WalletAccountTon>

Promise<WalletAccountTon>

WalletManager.cachedAccount


dispose(): void

Defined in: core/dist/index.d.ts:302

Dispose every derived account and zeroize the seed; subclasses zeroize their own extras first, then call super.

void

WalletManager.dispose


protected externalSigner(): Signer | undefined

Defined in: core/dist/index.d.ts:281

The Signer this manager was built with, if any (no mnemonic then). Chain managers decide how to turn it into accounts.

Signer | undefined

WalletManager.externalSigner


getAccount(index?): Promise<WalletAccountTon>

Defined in: wallet-ton/src/manager.ts:49

Account index on the chain’s standard path. Cached per index.

number = 0

Promise<WalletAccountTon>

WalletManager.getAccount


getAccountByPath(path): Promise<WalletAccountTon>

Defined in: wallet-ton/src/manager.ts:59

Account at an explicit path. Cached per path.

string

Promise<WalletAccountTon>

WalletManager.getAccountByPath


getFeeRates(): Promise<FeeRates>

Defined in: wallet-ton/src/manager.ts:101

Gas price from config param 21 via tonapi (normal = fast there; slow = ×0.8 here).

Promise<FeeRates>

WalletManager.getFeeRates


getReadOnlyAccount(publicKey): WalletAccountReadOnlyTon

Defined in: wallet-ton/src/manager.ts:96

Watch-only account for a public key (hex or bytes) — TON addresses derive from the key, not the other way round.

string | Uint8Array<ArrayBufferLike>

WalletAccountReadOnlyTon


protected requireSigner(curve): Signer

Defined in: core/dist/index.d.ts:283

The external signer, asserted to sign on curve; throws when the manager holds a mnemonic instead.

SignerCurve

Signer

WalletManager.requireSigner


protected seedBytes(): Uint8Array

Defined in: core/dist/index.d.ts:275

The 64-byte seed this manager derives from; throws for a Signer-built or disposed manager.

Uint8Array

WalletManager.seedBytes


protected signerAccount(key, signer, relativePath, build): Promise<WalletAccountTon>

Defined in: core/dist/index.d.ts:300

cachedAccount over an injected signer: the signer itself (relativePath undefined) or its child along relativePath. A child that never becomes an account is disposed.

string

Signer

string | undefined

(leaf, publicKey) => WalletAccountTon

Promise<WalletAccountTon>

WalletManager.signerAccount


static fromTonMnemonic(words, config?): Promise<WalletManagerTon>

Defined in: wallet-ton/src/manager.ts:37

Import a TON-native mnemonic (24 words, Tonkeeper / Tonhub / MyTonWallet default): PBKDF2 per @ton/crypto, one ed25519 key, one V5R1 account at path ton-mnemonic with the address those wallets show.

string | string[]

TonConfig = {}

Promise<WalletManagerTon>


static getRandomSeedPhrase(words?): string

Defined in: core/dist/index.d.ts:279

Same as the core getRandomSeedPhrase.

24 | 12

string

WalletManager.getRandomSeedPhrase


static isValidSeedPhrase(seed): boolean

Defined in: core/dist/index.d.ts:277

Same as the core isValidSeedPhrase.

string

boolean

WalletManager.isValidSeedPhrase