getAddress method
Computes and returns a Cardano Byron Legacy address based on two key indices, 'firstIndex' and 'secondIndex'.
Parameters:
- 'firstIndex': The first key index for address derivation.
- 'secondIndex': The second key index for address derivation.
Implementation
String getAddress(Bip32KeyIndex firstIndex, Bip32KeyIndex secondIndex) {
final pubKey =
getPublicKey(firstIndex: firstIndex, secondIndex: secondIndex);
final hdPath = _getDerivationPath(firstIndex, secondIndex);
return AdaByronLegacyAddrEncoder().encodeKey(pubKey.key.compressed, {
"chain_code": pubKey.chainCode.toBytes(),
"hd_path": hdPath,
"hd_path_key": hdPathKey,
});
}