ADAByronAddress.fromIcarus constructor

ADAByronAddress.fromIcarus({
  1. required CardanoIcarusBip32 bip32,
  2. ADANetwork network = ADANetwork.mainnet,
})

Factory constructor to create an ADAByronAddress instance from an Icarus structure.

Implementation

factory ADAByronAddress.fromIcarus(
    {required CardanoIcarusBip32 bip32,
    ADANetwork network = ADANetwork.mainnet}) {
  final encode = AdaByronIcarusAddrEncoder().encodeKeyWithInfo(
      bip32.publicKey.compressed, {
    "net_tag": network,
    "chain_code": bip32.publicKey.chainCode.toBytes()
  });
  return ADAByronAddress._(encode.encode(), encode, network);
}