MNID class

Multi Network Identifier (MNID) Dart implementation.

This library provides a way to encode and decode Ethereum addresses with a network identifier, useful for handling addresses from different networks (e.g., mainnet, testnets) in a unified way.

Constructors

MNID()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

checksum(dynamic payload) List<int>
Calculates the checksum of the given payload using the first 4 bytes of its SHA3-256 hash.
decode(String encoded) Map
Decodes an MNID string into its corresponding network identifier and Ethereum address.
encode({required String network, required String address}) String
Encodes the given Ethereum address and network identifier into an MNID.
isMNID(String encoded) bool
Determines whether the given string is a valid MNID.