Account class abstract

An account

Available extensions
Annotations
  • @freezed

Constructors

Account({required int lamports, required String owner, required AccountData? data, required bool executable, @JsonKey.new(fromJson: bigIntFromJson) required BigInt rentEpoch})
const
factory
Account.fromJson(Map<String, dynamic> json)
factory

Properties

copyWith → $AccountCopyWith<Account>
Create a copy of Account with the given fields replaced by the non-null parameter values.
no setterinherited
data → AccountData?
Data associated with the account, either as encoded binary data or JSON format {program: state}, depending on encoding parameter
no setterinherited
executable → bool
Boolean indicating if the account contains a program (and is strictly read-only)
no setterinherited
hashCode → int
The hash code for this object.
no setterinherited
lamports → int
Number of lamports assigned to this account, as a u64
no setterinherited
owner → String
base-58 encoded Pubkey of the program this account has been assigned to
no setterinherited
rentEpoch → BigInt
The epoch at which this account will next owe rent, as u64
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

map<TResult extends Object?>(TResult $default(_Account value)) → TResult

Available on Account, provided by the AccountPatterns extension

A switch-like method, using callbacks.
mapOrNull<TResult extends Object?>(TResult? $default(_Account value)?) → TResult?

Available on Account, provided by the AccountPatterns extension

A variant of map that fallback to returning null.
maybeMap<TResult extends Object?>(TResult $default(_Account value)?, {required TResult orElse()}) → TResult

Available on Account, provided by the AccountPatterns extension

A variant of map that fallback to returning orElse.
maybeWhen<TResult extends Object?>(TResult $default(int lamports, String owner, AccountData? data, bool executable, BigInt rentEpoch)?, {required TResult orElse()}) → TResult

Available on Account, provided by the AccountPatterns extension

A variant of when that fallback to an orElse callback.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, dynamic>
Serializes this Account to a JSON map.
inherited
toString() → String
A string representation of this object.
inherited
when<TResult extends Object?>(TResult $default(int lamports, String owner, AccountData? data, bool executable, BigInt rentEpoch)) → TResult

Available on Account, provided by the AccountPatterns extension

A switch-like method, using callbacks.
whenOrNull<TResult extends Object?>(TResult? $default(int lamports, String owner, AccountData? data, bool executable, BigInt rentEpoch)?) → TResult?

Available on Account, provided by the AccountPatterns extension

A variant of when that fallback to returning null

Operators

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