MyTonCtrl supports various types of wallet-like contracts, including wallet-v1, wallet-v3, lockup-wallet, and others. Often, it provides a straightforward way to interact with these contracts.
If you have access to a private key, you can easily import a wallet. Enter the following command into the console:
iw <wallet-addr> <wallet-secret-key>
Here, <wallet-secret-key> is your private key in base64 format.
If you have a mnemonic phrase (a sequence of 24 words like tattoo during ...), follow these steps:
- Install Node.js.
- Clone and install mnemonic2key:
git clone https://github.com/ton-blockchain/mnemonic2key.git cd mnemonic2key npm install - Run the following command, replacing
word1,word2... with your mnemonic phrase andaddresswith the address of your wallet contract:node index.js word1 word2 ... word24 [address] - The script will generate
wallet.pkandwallet.addr. Rename them toimported_wallet.pkandimported_wallet.addr. - Copy both files to the
~/.local/share/mytoncore/wallets/directory. - Open the mytonctrl console and list the wallets using the
wlcommand. - Verify that the wallet has been imported and displays the correct balance.
- You can now send funds using the
mgcommand. Entermgto view the help documentation.
Remember to replace placeholders (words inside < >) with your actual values when running commands.