slip_0010_ed25519 3.2.0 copy "slip_0010_ed25519: ^3.2.0" to clipboard
slip_0010_ed25519: ^3.2.0 copied to clipboard

BIP-0032 like derivation for ed25519 curve following SLIP-0010

example/slip_0010_ed25519.dart

import 'package:convert/convert.dart';
import 'package:slip_0010_ed25519/slip_0010_ed25519.dart';

void main() async {
  String hexSeed =
      'fffcf9f6f3f0edeae7e4e1dedbd8d5d2cfccc9c6c3c0bdbab7b4b1aeaba8a5a29f9c999693908d8a8784817e7b7875726f6c696663605d5a5754514e4b484542';
  List<int> seedBytes = hex.decode(hexSeed);
  KeyData master = await ED25519_HD_KEY.getMasterKeyFromSeed(seedBytes);
  print(hex.encode(master.key));
  print(hex.encode(master.chainCode));

  KeyData data = await ED25519_HD_KEY.derivePath("m/0'/2147483647'", seedBytes);
  print(hex.encode(data.key));
  print(hex.encode(data.chainCode));
  var pb = await ED25519_HD_KEY.getPublicKey(data.key);
  print(hex.encode(pb));
}
0
likes
130
points
255
downloads

Publisher

verified publishereucalyptuslabs.com

Weekly Downloads

BIP-0032 like derivation for ed25519 curve following SLIP-0010

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

crypto, pinenacl

More

Packages that depend on slip_0010_ed25519