CosmosTransaction class

Constructors

CosmosTransaction({required String to, required String amount, String? denom, String? memo, String? gasLimit, String? gasPrice, int? sequence, int? accountNumber, String? chainId, String? format})
Creates a new Cosmos transaction
CosmosTransaction.transfer({required String to, required String amount, String denom = 'uatom', required String chainId})
Creates a simple transfer transaction
factory

Properties

accountNumber int?
Account number (defaults to 0)
final
amount String
The amount to send (in smallest denomination, e.g., "1000000" for 1 ATOM)
final
chainId String?
Chain ID (e.g., "cosmoshub-4", "osmosis-1")
final
denom String?
The denomination of the token (e.g., "uatom", "uosmo")
final
format String?
Transaction format: "proto" (default) or "amino"
final
gasLimit String?
Gas limit for the transaction (defaults to "200000")
final
gasPrice String?
Gas price/fee amount (defaults to "5000")
final
hashCode int
The hash code for this object.
no setterinherited
memo String?
Optional memo for the transaction
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sequence int?
Transaction sequence number (defaults to 0)
final
to String
The recipient address (bech32 format, e.g., "cosmos1...")
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