ggbash
ggbash copied to clipboard
Feat/ton support
Description
This PR introduces TON Wallet support with options for V4R2 and W5 wallet models. The following core features are implemented:
- createWallet – create a new TON wallet
- generateWalletFromMnemonic – restore or generate wallet from mnemonic phrase
- getAddressFromPrivateKey – derive wallet address from a private key
- getBalance – fetch balance (supports both native TON and Jettons)
- transfer – send transactions (supports both native TON and Jettons)
- getTransaction – retrieve transaction details by address/hash
- getTokenInfo – fetch Jetton metadata (name, symbol, decimals, etc.)
Wallet Activation (Important ⚠️)
By default, a newly created TON wallet is in an uninitialized state. To activate it:
- Deposit any amount of TON into the wallet.
- On first getBalance call after deposit, the wallet will be deployed (state initialized). This means getBalance will not work until the wallet is initialized with a small deposit.
Type of change
- [X] New feature (non-breaking change which adds functionality)
Checklist:
- [X] I have selected the correct base branch.
- [X] I have performed a self-review of my own code.
- [X] I have commented my code, particularly in hard-to-understand areas.
- [X] I have made corresponding changes to the documentation.
- [X] My changes generate no new warnings.
- [X] Any dependent changes have been merged and published in downstream modules.
- [X] I ran
npm run testand my test cases cover all the lines and branches of the added code. - [X] I ran
npm run buildwith success. - [X] I have tested my code on the live network.
- [X] I have checked the Deploy Preview and it looks correct.
Good evening, sir @iamnotstatic I am creating a TON Wallet assignment for the V4R2 and W5 wallet models.
Good evening, sir @iamnotstatic. I am creating a TON Wallet assignment for the V4R2 and W5 wallet models.
Hi @reactmore, Thanks for raising this PR, I will review and share updates accordingly