Transaction constructor
const
Transaction({
- @AddressJsonConverter() Address? address,
- Balance? balance,
- int? chainLength,
- @Default([]) List<
CrossValidationStamp> crossValidationStamps, - Data? data,
- @Default([]) List<
TransactionInput> inputs, - String? originSignature,
- @AddressJsonConverter() Address? previousAddress,
- String? previousPublicKey,
- String? previousSignature,
- String? type,
- ValidationStamp? validationStamp,
- @Default(cVersion) int version,
Implementation
const factory Transaction({
/// - Address: hash of the new generated public key for the given transaction
@AddressJsonConverter() Address? address,
/// - [Balance] represents a ledger balance
Balance? balance,
/// - Length of the chain
int? chainLength,
/// - Cross validation stamps: endorsements of the validation stamp from the coordinator
@Default([]) final List<CrossValidationStamp> crossValidationStamps,
/// - [Data]: transaction data zone (identity, keychain, smart contract, etc.)
Data? data,
/// - [TransactionInput] represents the inputs from the transaction
@Default([]) final List<TransactionInput> inputs,
/// - Origin signature: signature from the device which originated the transaction (used in the Proof of work)
String? originSignature,
/// - Previous address
@AddressJsonConverter() Address? previousAddress,
/// - Previous public key: previous generated public key matching the previous signature
String? previousPublicKey,
/// - Previous signature: signature from the previous public key
String? previousSignature,
/// - Type: transaction type
String? type,
/// - [ValidationStamp]: coordinator work result
ValidationStamp? validationStamp,
/// - Version: version of the transaction (used for backward compatiblity)
@Default(cVersion) int version,
}) = _Transaction;