Guest User

Untitled

a guest
Feb 4th, 2022
47
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import TonWeb from "tonweb";
  2.  
  3. let privateKey = await wordsToPrivateKey(arr)
  4. const wallet = await TonWeb.wallet.create({publicKey: privateKey.publicKey});
  5. let info = await wallet.provider.getAddressInfo(walletInfo.address)
  6. console.log(info.state)
  7. if (info.state == "uninitialized") {
  8. console.log('deploy wallet')
  9. const deploySended = await wallet.deploy(privateKey.secretKey).send();
  10. console.log(deploySended)
  11. }
Advertisement
Add Comment
Please, Sign In to add comment