addressHash static method

List<int> addressHash(
  1. List<int> privKeyBytes,
  2. PubKeyModes pubKeyMode
)

Compute the address hash from private key bytes and public key mode.

  • privKeyBytes: The private key bytes.
  • pubKeyMode: The selected public key mode.

Implementation

static List<int> addressHash(List<int> privKeyBytes, PubKeyModes pubKeyMode) {
  final publicBytes =
      Secp256k1PrivateKey.fromBytes(privKeyBytes).publicKey.point.toBytes();

  return Bip38Addr.addressHash(publicBytes, pubKeyMode);
}