Address class
Constructors
- Address({required Uint8List publicKey})
- Address.fromAlgorandAddress(String address)
- Create a new Address from a given Algorand address. This decodes the uppercased Algorand address to its raw bytes and validating the address.
Properties
- encodedAddress → String
-
The encoded Algorand address.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
-
props
→ List<
Object?> -
The list of properties that will be used to determine whether
two instances are equal.
no setter
- publicKey → Uint8List
-
The public key, in bytes
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- stringify → bool?
-
If set to
true
, thetoString
method will be overridden to output this instance'sprops
.no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
sign(
{required Account account, required Uint8List data}) → Future< Signature> - Creates Signature compatible with ed25519verify TEAL opcode from data and contract address (program hash).
-
toBytes(
) → Uint8List - Returns a copy of the public key address.
-
toString(
) → String -
A string representation of this object.
inherited
-
toVerifyKey(
) → PublicKey - Returns address' public key in a form suitable for verification.
-
verify(
Uint8List message, Signature signature) → Future< bool> - Verifies that the signature for the message is valid for the public key. The message should have been prepended with "MX" when signing.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
decodeAddress(
String address) → Uint8List - Decode an encoded, uppercased Algorand address to a public key.
-
encodeAddress(
Uint8List publicKey) → String - Encode a public key to a human-readable representation, with a 4-byte checksum appended at the end, using SHA512/256.
-
forApplication(
int applicationId) → Address - Get the escrow address of an application. Returns the address corresponding to that application's escrow account.
-
isAlgorandAddress(
String address) → bool - Check if the given address is a valid Algorand address.
-
tryParse(
String? address) → Address?
Constants
- APP_ID_PREFIX → const String
- Prefix for hashing application ID
- BYTES_SIGN_PREFIX → const String
- Prefix for signing bytes
- CHECKSUM_BYTE_LENGTH → const int
- The length of the Algorand checksum.
- PROGDATA_SIGN_PREFIX → const String
- Prefix for signing TEAL program data
- PUBLIC_KEY_LENGTH → const int
- The length of the public key