SolanaTransaction class
Transaction
Constructors
-
SolanaTransaction({List<
Uint8List> ? signatures, required Message message}) - Transaction.
-
SolanaTransaction.deserialize(Iterable<
int> bytes) -
Decodes a serialized transaction into a Transaction object.
factory
- SolanaTransaction.fromBase58(String encoded)
-
Decodes a
base-58encodedtransaction into a Transaction object.factory - SolanaTransaction.fromBase64(String encoded)
-
Decodes a
base-64encodedtransaction into a Transaction object.factory -
SolanaTransaction.legacy({List<
Uint8List> ? signatures, required Pubkey payer, required List<TransactionInstruction> instructions, required String recentBlockhash}) -
Creates a
legacytransaction.factory -
SolanaTransaction.v0({List<
Uint8List> ? signatures, required Pubkey payer, required List<TransactionInstruction> instructions, required String recentBlockhash, List<AddressLookupTableAccount> ? addressLookupTableAccounts}) -
Creates a
v0transaction.factory
Properties
- blockhash → String
-
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
signatureto a transaction. Thepubkeymust 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(
) → Buffer -
serializeMessage(
) → Buffer -
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.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited