Message class
Message
- Inheritance
-
- Object
- Serializable
- Message
- Annotations
-
- @JsonSerializable(explicitToJson: true)
Constructors
-
Message.new({required int? version, required MessageHeader header, required List<
Pubkey> accountKeys, required String recentBlockhash, required Iterable<MessageInstruction> instructions, required List<MessageAddressTableLookup> ? addressTableLookups}) -
Creates a the list of
instructions
to be processed atomically by a transaction.const -
Message.compile({required int? version, required Pubkey payer, required List<
TransactionInstruction> instructions, required Blockhash recentBlockhash, List<AddressLookupTableAccount> ? addressLookupTableAccounts}) -
Creates a transaction message.
factory
- Message.fromBase58(String encoded)
-
Decodes a
base-58
encoded string into a Message instance.factory - Message.fromBase64(String encoded)
-
Decodes a
base-64
encoded string into a Message instance.factory - Message.fromBuffer(Buffer buffer)
-
Decode a buffer into a Message instance.
factory
- Message.fromBufferReader(BufferReader reader)
-
Decodes a buffer reader into a Message instance.
factory
-
Message.fromJson(Map<
String, dynamic> json) -
Creates an instance of
this
class from the constructor parameters defined in thejson
object.factory -
Message.fromList(List<
int> byteArray) -
Decodes a byte-array into a Message instance.
factory
-
Message.legacy({required Pubkey payer, required List<
TransactionInstruction> instructions, required Blockhash recentBlockhash}) -
Creates a
legacy
message.factory -
Message.v0({required Pubkey payer, required List<
TransactionInstruction> instructions, required Blockhash recentBlockhash, List<AddressLookupTableAccount> ? addressLookupTableAccounts}) -
Creates a
v0
message.factory
Properties
-
accountKeys
→ List<
Pubkey> -
List of base-58 encoded public keys used by the transaction, including the instructions and
signatures. The first MessageHeader.numRequiredSignatures public keys must sign the
transaction.
final
-
addressTableLookups
→ List<
MessageAddressTableLookup> -
A list of address table lookups used by a transaction to dynamically load addresses from
on-chain address lookup tables.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- header → MessageHeader
-
The account types and signatures required by the transaction.
final
-
instructions
→ Iterable<
MessageInstruction> -
A list of program instructions that will be executed in sequence and committed in one atomic
transaction if all succeed.
final
- numAccountKeysFromLookups → int
-
The number of account keys contained within addressTableLookups.
no setter
- recentBlockhash → String
-
A base-58 encoded hash of a recent block in the ledger used to prevent transaction
duplication and to give transactions lifetimes.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- version → int?
-
The transaction/message version (
null
== legacy).final
Methods
-
isAccountSigner(
int index) → bool -
Check if the account at
index
is a signer account. -
isAccountWritable(
int index) → bool -
Check if the account at
index
is a writable account. -
nonProgramIds(
) → Iterable< Pubkey> - The non-programs accounts.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
programIds(
) → Iterable< Pubkey> - The programs accounts.
-
serialize(
) → Buffer - Encodes this message into a buffer.
-
toJson(
) → Map< String, dynamic> -
Serialises
this
class into a JSON object.override -
toString(
[BufferEncoding encoding = BufferEncoding.base64]) → String -
Serializes this message into an encoded string.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited