Funds at riskThis guide sends real TON. Test on testnet first. Double-check recipient addresses — blockchain transactions cannot be reversed.
For technical details, see Preprocessed Wallet V2 specification.
Objective
By the end of this guide, you will:- Create a Preprocessed Wallet V2 instance from scratch
- Deploy the wallet on-chain
- Send single and batch transfers
Prerequisites
- Node.js 18+ or TypeScript environment
@ton/ton,@ton/core,@ton/cryptopackages installed- Preprocessed Wallet V2 wrapper and compiled contract code
Step 1: Set up dependencies
Install required packages:Why copy wrappers?The official
@ton/ton SDK does not include Preprocessed Wallet V2 wrappers yet. Copy PreprocessedWalletV2.ts from the repository until SDK support is added.Step 2: Generate or load a mnemonic
A mnemonic is your wallet’s master secret. It derives the private key used to sign all transactions.Generate a new mnemonic
Load an existing mnemonic
Protect your mnemonicAnyone with access to your mnemonic can control your wallet and all funds. Store it securely (password manager, hardware wallet, encrypted storage). Never commit it to version control.
Step 3: Derive the keypair
Convert the mnemonic to an Ed25519 keypair:Step 4: Create the wallet instance
Create a Preprocessed Wallet V2 contract instance:Step 5: Get the wallet address
Calculate the wallet’s address:CODE and publicKey. The same parameters always produce the same address.
Why non-bounceable?When funding a
nonexist account, use the non-bounceable format to prevent funds from bouncing back if the account doesn’t exist yet. See Address formats for details.nonexist
The calculated address exists only as a deterministic value. No account exists on the blockchain yet — no balance, no code, no data.
Step 6: Fund the wallet
Funds at riskYou will send TON to this address. Test on testnet first. Verify the wallet address carefully — blockchain transactions cannot be reversed.
nonexist to uninit status and provide the balance needed for deployment. See Account statuses for details on how account states work.
Send TON using a faucet (testnet) or from another wallet (mainnet). After funding, the account transitions to uninit status — it has a balance and can accept external messages, but no code or data yet.
Step 7: Send messages
Automatic deploymentThe wallet will auto-deploy on the first external message. No separate deployment step is needed.
Send single transfers
Send batch transfers
Maximum actionsreprocessed Wallet V2 supports up to 255 actions per transaction. This is the maximum number of out actions supported by TON blockchain.