stellar_hd_wallet 1.0.0 copy "stellar_hd_wallet: ^1.0.0" to clipboard
stellar_hd_wallet: ^1.0.0 copied to clipboard

a stellar hd wallet, base on bip39 and stelalr sdk,you can use it to generate random mnemonic and get account from mnemonic

example/example.dart

import 'package:stellar_hd_wallet/stellar_hd_wallet.dart';

void main() {
  // get random mnemonic ( english )
  final mnemonic = StellarHDWallet.generateMnemonic();
  print(mnemonic);
  final wallet = StellarHDWallet.fromMnemonic(mnemonic);
  final keypair = wallet.getKeyPair();
  // get accountId
  final accountId = keypair.accountId;
  final secretSeed = keypair.secretSeed;
  print(accountId);
  print(secretSeed);
  final keypairIndex1 = wallet.getKeyPair(index: 1);
  print(keypairIndex1.accountId);
  print(keypairIndex1.secretSeed);
}
1
likes
40
pub points
0%
popularity

Publisher

unverified uploader

a stellar hd wallet, base on bip39 and stelalr sdk,you can use it to generate random mnemonic and get account from mnemonic

Repository (GitHub)
View/report issues

License

Apache-2.0 (LICENSE)

Dependencies

bip39, pointycastle, stellar

More

Packages that depend on stellar_hd_wallet