Transaction class

Transaction

Inheritance
Mixed-in types
Annotations
  • @JsonSerializable(explicitToJson: true)

Constructors

Transaction.new({List<Uint8List>? signatures, required Message message})
Transaction.
Transaction.deserialize(Iterable<int> bytes)
Decodes a serialized transaction into a Transaction object.
factory
Transaction.fromBase58(String encoded)
Decodes a base-58 encoded transaction into a Transaction object.
factory
Transaction.fromBase64(String encoded)
Decodes a base-64 encoded transaction into a Transaction object.
factory
Transaction.fromJson(Map<String, dynamic> json)
Creates an instance of this class from the constructor parameters defined in the json object.
factory
Transaction.legacy({List<Uint8List>? signatures, required Pubkey payer, required List<TransactionInstruction> instructions, required Blockhash recentBlockhash})
Creates a legacy transaction.
factory
Transaction.v0({List<Uint8List>? signatures, required Pubkey payer, required List<TransactionInstruction> instructions, required Blockhash recentBlockhash, List<AddressLookupTableAccount>? addressLookupTableAccounts})
Creates a v0 transaction.
factory

Properties

blockhash Blockhash
The transaction/message blockhash.
no setter
hashCode int
The hash code for this object.
no setterinherited
message Message
One or more signatures for the transaction. Typically created by invoking the sign method.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
signature Uint8List?
The first Transaction signature (fee payer).
no setter
signatures List<Uint8List>
One or more signatures for the transaction. Typically created by invoking the sign method.
final
version int?
The transaction/message version (null == legacy).
no setter

Methods

addSignature(Pubkey pubkey, Uint8List signature) → void
Add an externally created signature to a transaction. The pubkey must correspond to the fee payer or a signer account in the transaction instructions (Message.accountKeys).
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
serialize([TransactionSerializableConfig? config]) Buffer
Serialises a transaction into a buffer.
override
serializeMessage() Buffer
Serialises a transaction message into a buffer.
override
sign(List<Signer> signers) → void
Signs this Transaction with the specified signers. Multiple signatures may be applied to a Transaction. The first signature is considered "primary" and is used to identify and confirm transactions.
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