Demo wallet, deployed
Demo wallet, GitHub repository
Initialization
The basic kit initialization consists of creating a corresponding object by passing it a minimal set of necessary arguments. One needs to pick a TON network to operate on, provide the necessary device and wallet manifest configurations.TON wallet initialization
The configuration before is enough to outline necessary wallet information and initialize the WalletKit, but it isn’t enough for deeper interactions with the blockchain. For that, you need at least one TON wallet contract to be set up. You may load or create a new TON wallet using one of these options:Create a TON wallet from a mnemonic
Create a TON wallet from a private key
Create a TON wallet with a custom signer
From mnemonic
To initialize a TON wallet from an existing BIP-39 or TON-specific mnemonic seed phrase, use thecreateWalletInitConfigMnemonic() function of WalletKit.
From private key
To initialize a TON wallet from an existing private key, use thecreateWalletInitConfigPrivateKey() function of WalletKit.
If there is a mnemonic, one can convert it to an Ed25519 key pair with public and private key by using the MnemonicToKeyPair().
From signer
To provide a custom signing mechanism as an alternative to using a mnemonic phrase or a private key, use thecreateWalletInitConfigSigner() function of WalletKit.
In that case, you would need to pass a public key and your custom signing function of type WalletSigner. It should take the Uint8Array of data bytes and then asynchronously produce an Uint8Array signature.
This approach is useful if you want to maintain full control over the signing process, such as when using a hardware wallet or signing data on the backend.
Configuration parameters
Required
The TON network to use.
Core information and constraints of the given wallet.There, The
Feature type is defined as:maxMessages number depends on the TON wallet used, because every wallet has its own limit on the volume of messages.For example,- Ledger wallet would only handle 1 message per transaction
- Wallet
v4r2handles up to 4 messages - Wallet
v5r1handles up to 255 messages
How your wallet interacts with the TON Connect. This field is closely related to the corresponding JSON manifest file.
Optional
Which API or RPC provider to use to interact with TON Blockchain.
Connectivity options: either an HTTP or JavaScript bridge setup. The former’s
bridgeUrl points to the publicly exposed bridge URL, while the latter’s jsBridgeKey points to the property name within the window object on the same web page.How to store intermediate events.
Strictness and wallet checks.
How TON Connect events are processed.
Collect and gather analytical data.