decodeAddr method

  1. @override
List<int> decodeAddr(
  1. String addr
)
override

Overrides the base class method to decode a Solana SOL address.

Implementation

@override
List<int> decodeAddr(String addr) {
  /// Decode the Solana SOL address from Base58.
  final addrDecBytes = Base58Decoder.decode(addr);

  /// Validate the byte length of the decoded address.
  AddrDecUtils.validateBytesLength(
    addrDecBytes,
    Ed25519KeysConst.pubKeyByteLen,
  );

  /// Return the decoded address as a `List<int>`.
  return addrDecBytes;
}