Advertisement
Guest User

Untitled

a guest
Jun 24th, 2022
165
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.46 KB | None | 0 0
  1.  
  2. import tonMnemonic from "tonweb-mnemonic";
  3. import TonWeb from "tonweb";
  4. (async () => {
  5. const {NftCollection, NftItem, NftMarketplace, NftSale} = TonWeb.token.nft;
  6. const tonweb = new TonWeb(new TonWeb.HttpProvider('https://toncenter.com/api/v2/jsonRPC'));
  7. let mnem;
  8. let words = tonMnemonic.wordlists.EN
  9. let wor = [];
  10. tonMnemonic.wordlists.EN.forEach(e => wor.push(e));
  11. async function g () {
  12. for (const e of wor) {
  13. mnem = 'movie assist frown property often conduct mad trouble wise pink found myth dice venue r penalty glance leader lend athlete duck tornado change arrange'.split(' ');
  14. mnem[14] = e
  15. let str = ''
  16. const good = await tonMnemonic.validateMnemonic(mnem)
  17. if(good) {
  18. let keyPair = await tonMnemonic.mnemonicToKeyPair(mnem);
  19. mnem.forEach((e) => {
  20. str += e + ' '
  21. })
  22. let WalletClass = tonweb.wallet.all['v3R2'];
  23. let wallet = new WalletClass(tonweb.provider, {
  24. publicKey: keyPair.publicKey,
  25. wc: 0
  26. });
  27. let walletAddress = await wallet.getAddress();
  28. let walletAddressString = walletAddress.toString(true, true, true);
  29. console.log('https://scaleton.io/'+walletAddressString+'/assets')
  30. console.log(str)
  31. }
  32. }
  33. }
  34. g()
  35. })();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement