ed25519_hd_key 1.1.0 copy "ed25519_hd_key: ^1.1.0" to clipboard
ed25519_hd_key: ^1.1.0 copied to clipboard

outdated

BIP-0032 like derivation for ed25519 curve

example/ed25519_hd_key.dart

import 'dart:typed_data';

import "package:ed25519_hd_key/ed25519_hd_key.dart";
import 'package:convert/convert.dart';

void main() {
  String hexSeed =
      'fffcf9f6f3f0edeae7e4e1dedbd8d5d2cfccc9c6c3c0bdbab7b4b1aeaba8a5a29f9c999693908d8a8784817e7b7875726f6c696663605d5a5754514e4b484542';
  Uint8List seedBytes = hex.decode(hexSeed);
  KeyData master = ED25519_HD_KEY.getMasterKeyFromSeed(seedBytes);
  print(hex.encode(master.key));
  print(hex.encode(master.chainCode));

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

Publisher

verified publisheralepop.dev

Weekly Downloads

BIP-0032 like derivation for ed25519 curve

Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

cryptography

More

Packages that depend on ed25519_hd_key