TokenAccountInfo class
Token Account Info
- Inheritance
-
- Object
- BorshObject
- TokenAccountInfo
Constructors
- TokenAccountInfo.new({required String mint, required String owner, required BigInt amount, required String? delegate, required AccountState state, required BigInt? isNative, required BigInt delegatedAmount, required String? closeAuthority})
-
Token Account Information.
const
- TokenAccountInfo.fromAccountInfo(AccountInfo info)
-
Creates an instance of
this
class from an accountinfo
.factory - TokenAccountInfo.fromBorshBase64(String encoded)
-
Creates an instance of
this
class from a base-64 encoded string.factory -
TokenAccountInfo.fromJson(Map<
String, dynamic> json) -
Creates an instance of
this
class from the constructor parameters defined in thejson
object.factory
Properties
- amount → BigInt
-
The amount of tokens this account holds.
final
- borshSchema → BorshSchema
-
Maps
this
class' properties to codecs.no setteroverride - closeAuthority → String?
-
The authority address (base-58) to close the account.
final
- delegate → String?
-
If
delegate
is not-null thendelegatedAmount
represents the amount authorized by the delegate (base-58 address).final - delegatedAmount → BigInt
-
The amount delegated.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- isNative → BigInt?
-
If not-null, this is a native token, and the value logs the rent-exempt reserve. An Account
is required to be rent-exempt, so the value is used by the Processor to ensure that wrapped
SOL accounts do not drop below this threshold.
final
- mint → String
-
The mint address (base-58) associated with this account.
final
- owner → String
-
The owner address (base-58) of this account.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- state → AccountState
-
The account's state.
final
Methods
-
borshSize(
) → int -
Returns the serialized byte length of
this
instance.inherited -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toBorsh(
) → Iterable< int> -
Serializes
this
instance into a buffer.inherited -
toJson(
) → Map< String, dynamic> -
Serialises
this
class into a JSON object.override -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- codec → BorshStructCodec
-
The encoders/decoders of
this
class' properties.final
Static Methods
-
fromBorsh(
Iterable< int> buffer) → TokenAccountInfo -
Creates an instance of
this
class from a buffer.override -
tryFromAccountInfo(
AccountInfo? info) → TokenAccountInfo? -
Creates an instance of
this
class from an accountinfo
. -
tryFromBorsh(
Iterable< int> ? buffer) → TokenAccountInfo? -
Creates an instance of
this
class from a buffer.override -
tryFromBorshBase64(
String? encoded) → TokenAccountInfo? -
Creates an instance of
this
class from a base-64 encoded string.override -
tryFromJson(
Map< String, dynamic> ? json) → TokenAccountInfo? -
Creates an instance of
this
class from the constructor parameters defined in thejson
object.override