@nekoproject/wallets
Version:
Cross-chain Wallet
22 lines (20 loc) • 799 B
text/typescript
// 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("---")
// }
})();