Instantiate your wallet service
Create new wallet with a generated mnemonic
import { ConnectionService, Environments, Logger, WalletService } from "@peersyst/ckb-wallet-sdk";
const rpcUrl = "http://localhost:8117/rpc";
const indexerUrl = "http://localhost:8117/indexer";
const mainnetConnectionService = new ConnectionService(rpcUrl, indexerUrl, Environments.Mainnet);
const myMnemonic = WalletService.createNewMnemonic();
Logger.info(myMnemonic);
const myWallet = new WalletService(mainnetConnectionService, myMnemonic);
Logger.info(myWallet.getNextAddress());Import a wallet from an existing mnemonic
Importing and creating multiple wallets
Last updated