To be able to use your account on TON, you need to have an initialized wallet. Wallet initialization means deploying a TON wallet contract for your account.While this is a great feature of the TON blockchain, you might find it cumbersome dealing with wallet deployments during your development stage.So here’s a couple of scripts in JavaScript using tonweb that can help you:
GenerateAndInitialize.js — a script that generates a key pair for an account and then keeps running until you top it up with TON; once the account has enough TON, the script deploys a wallet contract.
CheckAndDepoy.js — a script that checks whether an account is initialized; if it’s not initialized, the script deploys a wallet contract.
Start for free and get your app to production levels immediately. No credit card required.You can sign up with your GitHub, X, Google, or Microsoft account.
Make sure you put your Chainstack TON node endpoint with a /jsonRPC at the end instead of CHAINSTACK_NODE_WITH_jsonRPC; and put your private key inPRIVATE_KEY.
Director of Developer Experience @ Chainstack Talk to me all things Web320 years in technology | 8+ years in Web3 full time years experienceTrusted advisor helping developers navigate the complexities of blockchain infrastructure