CashTokenUtils class
Constants and utility methods for working with Cash Tokens.
Constructors
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 Properties
- maxTokenAmount → BigInt
-
Maximum allowed token amount, represented as a BigInt.
no setter
Static Methods
-
buildBitfield(
{bool hasNFT = false, bool hasAmount = false, bool hasCommitmentLength = false, CashTokenCapability? capability}) → int - Build a bitfield based on the presence of various attributes.
-
hasAmount(
int bitfield) → bool - Checks if the given bitfield indicates the presence of an amount. Returns true if the amount is present, otherwise false.
-
hasCommitmentLength(
int bitfield) → bool - Checks if the given bitfield indicates the presence of commitment length. Returns true if the commitment length is present, otherwise false.
-
hasNFT(
int bitfield) → bool - Checks if the given bitfield indicates the presence of an NFT (Non-Fungible Token). Returns true if an NFT is present, otherwise false.
-
isValidBitfield(
int bitfield) → bool - Validates the integrity of a bitfield representing Cash Token attributes.
Constants
- cashTokenPrefix → const int
- Prefix used to identify Cash Tokens.
- idBytesLength → const int
- Length of the category bytes for a Cash Token.