CosmosBaseAddress.fromBytes constructor

CosmosBaseAddress.fromBytes(
  1. List<int> addrBytes, {
  2. String hrp = CosmosAddrConst.accHRP,
})

Factory constructor to create a CosmosBaseAddress from byte data.

Implementation

factory CosmosBaseAddress.fromBytes(
  List<int> addrBytes, {
  String hrp = CosmosAddrConst.accHRP,
}) {
  /// Create a CosmosBaseAddress instance by converting byte data to an address string.
  return CosmosBaseAddress._(
    AtomAddressUtils.encodeAddressBytes(addressBytes: addrBytes, hrp: hrp),
    hrp,
  );
}