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({
/// 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,
/// Transaction data zone (identity, keychain, smart contract, etc.)
Data? data,
/// Represents the inputs from the transaction
@Default([]) final List<TransactionInput> inputs,
/// Signature from the device which originated the transaction (used in the Proof of work)
String? originSignature,
/// Previous address
@AddressJsonConverter() Address? previousAddress,
/// Previous generated public key matching the previous signature
String? previousPublicKey,
/// Signature from the previous public key
String? previousSignature,
/// Transaction type
String? type,
/// Coordinator work result
ValidationStamp? validationStamp,
/// Version of the transaction (used for backward compatiblity)
@Default(cVersion) int version,
}) = _Transaction;