ADAByronAddress.legacy constructor

ADAByronAddress.legacy({
  1. required List<int> publicKey,
  2. required List<int> chaincode,
  3. required List<int> hdPathKey,
  4. required String hdPath,
  5. ADANetwork network = ADANetwork.mainnet,
})

Factory constructor to create a legacy ADAByronAddress instance.

Implementation

factory ADAByronAddress.legacy(
    {required List<int> publicKey,
    required List<int> chaincode,
    required List<int> hdPathKey,
    required String hdPath,
    ADANetwork network = ADANetwork.mainnet}) {
  final encode = AdaByronLegacyAddrEncoder().encodeKeyWithInfo(publicKey, {
    "net_tag": network,
    "chain_code": chaincode,
    "hd_path": hdPath,
    "hd_path_key": hdPathKey
  });
  return ADAByronAddress._(encode.encode(), encode, network);
}