MochimoTransaction class

A transaction entry the node can validate.

The bytes are TXHDR (116) plus one MDST (44) per recipient plus WOTSVAL (2208). The trailer is left off, which is the form tx_bot submits: TXLEN_MIN for one recipient. The signed message is the SHA-256 of the header and the recipients, stopping where the signature begins.

Constructors

MochimoTransaction(Uint8List bytes)
MochimoTransaction.sign({required WOTSWallet source, required WOTSWallet change, required List<TxDestination> destinations, required BigInt changeAmount, required BigInt fee, BigInt? blockToLive})
Signs a spend from source.
factory
MochimoTransaction.signWithKey({required Uint8List signingSeed, required Uint8List sourceWots, required Uint8List accountTag, required Uint8List changeAddress, required List<TxDestination> destinations, required BigInt changeAmount, required BigInt fee, BigInt? blockToLive})
factory

Properties

bytes → Uint8List
final
changeAddressBytes → Uint8List
no setter
destinationCount → int
no setter
hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
signature → Uint8List
no setter
signatureOffset → int
no setter
sourceAddress → Uint8List
no setter

Methods

messageHash() → Uint8List
SHA-256 of the header and destinations. This is TX_HASH_MESSAGE.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Methods

changeAddress(Uint8List accountTag, Uint8List publicKey) → Uint8List
40-byte change address: accountTag followed by the hash of publicKey.
readUint64(Uint8List bytes, int offset) → BigInt
uint64(BigInt value) → Uint8List
Little-endian unsigned 64-bit integer, matching put64.

Constants

destinationLength → const int
headerLength → const int
minimumLength → const int
wotsValueLength → const int