SolanaTransaction class
A class representing a Solana transaction
Constructors
- SolanaTransaction({required String to, required String lamports, String? memo, String? feePayer, String? recentBlockhash, int? computeUnitLimit, String? computeUnitPrice})
- Creates a new Solana transaction
- SolanaTransaction.transfer({required String to, required String lamports})
-
Creates a simple SOL transfer transaction
factory
- SolanaTransaction.transferSol({required String to, required double sol})
-
Creates a SOL transfer transaction from SOL amount
factory
Properties
- computeUnitLimit → int?
-
Compute unit limit (optional)
final
- computeUnitPrice → String?
-
Compute unit price in micro-lamports (optional)
final
- feePayer → String?
-
The fee payer address (optional, defaults to sender)
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- lamports → String
-
The amount in lamports (1 SOL = 1,000,000,000 lamports)
final
- memo → String?
-
Optional memo for the transaction
final
- recentBlockhash → String?
-
Recent blockhash (optional, will be fetched if not provided)
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- to → String
-
The recipient address
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> - Converts the transaction to a JSON map for bridge communication
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited