// import {SPLWallet} from '@nekoproject/wallets'
import { ETHWallet, SPLWallet } from '../lib/index.commonjs';
import bs58 from 'bs58';
import { derivePath } from 'ed25519-hd-key';
import { serialize } from '@ethersproject/transactions';
import 'dotenv/config';

(async () => {
  const mnemonic = process.env.SEED;
  const wallet = await SPLWallet.fromMnemonic(mnemonic)
  console.log(SPLWallet.validate(wallet.getPrivateKey()))
  // const seed = await SPLWallet.mnemonicToSeed(mnemonic);
  // console.log(seed);
  // for (let i = 0; i <= 10; i++) {
  //   const wallet = await SPLWallet.generateWalletWithIndex(seed, i);
  //   console.log(`Wallet ${i + 1} ${wallet.address}`);
  //   const privateKey = wallet.getPrivateKey()
  //   console.log(privateKey)
  //   console.log("---")
  // }
})();
