Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import tonMnemonic from "tonweb-mnemonic";
- import TonWeb from "tonweb";
- (async () => {
- const {NftCollection, NftItem, NftMarketplace, NftSale} = TonWeb.token.nft;
- const tonweb = new TonWeb(new TonWeb.HttpProvider('https://toncenter.com/api/v2/jsonRPC'));
- let mnem;
- let words = tonMnemonic.wordlists.EN
- let wor = [];
- tonMnemonic.wordlists.EN.forEach(e => wor.push(e));
- async function g () {
- for (const e of wor) {
- 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(' ');
- mnem[14] = e
- let str = ''
- const good = await tonMnemonic.validateMnemonic(mnem)
- if(good) {
- let keyPair = await tonMnemonic.mnemonicToKeyPair(mnem);
- mnem.forEach((e) => {
- str += e + ' '
- })
- let WalletClass = tonweb.wallet.all['v3R2'];
- let wallet = new WalletClass(tonweb.provider, {
- publicKey: keyPair.publicKey,
- wc: 0
- });
- let walletAddress = await wallet.getAddress();
- let walletAddressString = walletAddress.toString(true, true, true);
- console.log('https://scaleton.io/'+walletAddressString+'/assets')
- console.log(str)
- }
- }
- }
- g()
- })();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement