Wallet
Wallet mode provides convenience utilities for generating, activating, importing, exporting, and moving funds between TON wallets managed by MyTonCtrl.
Operational notes
- MyTonCtrl stores wallets under
/var/ton-work/wallets. Back up.pkfiles securely before deleting or migrating wallets. - Generated wallet names follow the
wallet_###pattern. Usewlto find the correct name before funding or exporting. - Bookmark support depends on entries configured via other modules (for example, utility commands that register shortcuts).
- Transfers rely on the validator console and may require the wallet to be active with sufficient rent balance (>0.1 TON).
Wallet lifecycle
nw
Purpose: Create a new local wallet definition and show its deployment address.
Syntax
nw [<workchain-id> <wallet-name> [<version> <subwallet>]]Behavior
- With no arguments, autogenerates a name (
wallet_XXX), uses workchain0, selects versionv1, and derives subwallet698983191 + workchain. - When arguments are provided, you must supply the workchain and name; optional
version(v1,v2,v3) andsubwalletoverride defaults. - Writes
.addr/.pkfiles under the wallets directory and prints a table with the new wallet address (state-init form).
Examples
nw
nw 0 treasury v3 1001aw
Purpose: Deploy one wallet or all wallets that have unsigned deployment BoCs.
Syntax
aw [<wallet-name>|all]Behavior
- Without arguments, treats the request as
alland scans every wallet for pending deployment BoCs, sending them if the target address still has a positive balance. - With a wallet name, activates that specific wallet using the stored deployment message.
Examples
aw
aw wallet_005wl
Purpose: List every wallet known to MyTonCtrl along with its on-chain status.
Syntax
wlBehavior
- Prints Name, Status, Balance, Version, Workchain, and Address (current or init address if inactive).
- Useful for auditing balances before elections or sweeping idle funds.
dw
Purpose: Delete a wallet’s local files after operator confirmation.
Syntax
dw <wallet-name>Behavior
- Prompts
Are you sure you want to delete this wallet (yes/no):and only proceeds onyes. - Removes the
.addr,.pk, and cached query files for<wallet-name>but does not touch on-chain accounts.
Example
dw treasuryImporting, exporting, and metadata
iw
Purpose: Import an existing wallet by address and secret key.
Syntax
iw <wallet-addr> <wallet-secret-key-base64>Behavior
- Writes the provided address bytes and base64-encoded private key into a new local wallet (name auto-generated).
- Prints the assigned wallet name for subsequent commands.
Example
iw EQDk...cQ KJ4Q...ew
Purpose: Export a wallet’s address and secret key.
Syntax
ew <wallet-name>Behavior
- Reads the
.pkfile, base64-encodes it, and prints the address/key pair along with the wallet name. - Useful for backups or migration to hardware wallets.
Example
ew treasuryswv
Purpose: Update the recorded wallet version (v1/v2/v3) for an imported wallet.
Syntax
swv <wallet-addr> <wallet-version>Behavior
- Updates metadata so MyTonCtrl selects the correct Fift script when sending transactions.
- Supply the wallet address exactly as stored (base64 or workchain:hex) and the version string.
Example
swv EQC0...FQ v3Fund transfers
mg
Purpose: Send Toncoin from a local wallet to a destination address or bookmark.
Syntax
mg <wallet-name> <account-addr|bookmark> <amount> [additional-flags...]Behavior
<amount>accepts numeric TON values or the shortcutsall(sends balance minus fees) andalld(sends entire balance, including fees).- Automatically checks the source balance, destination bounceability, and wallet version. Add
-nto force non-bounceable mode or other validator-console flags as needed. - Submits the signed transfer via the validator console; prints
MoveCoins - OKon success.
Examples
mg treasury EQDv...Qw 1500
mg treasury bookmark_main all -nmgtp
Purpose: Relay a payment through two temporary proxy wallets before reaching the destination.
Syntax
mgtp <wallet-name> <account-addr|bookmark> <amount>Behavior
- Creates two temporary wallets, hops the transfer through them (
wallet -> proxy1 -> proxy2 -> destination), and cleans up afterward. - Ensures the final leg includes
-n(non-bounceable) to safely reach inactive recipients. - Handy when the destination cannot accept a direct bounceable transfer.
Example
mgtp treasury EQC6...rA alldLast updated on