Transaction constructor

const Transaction({
  1. @AddressJsonConverter() Address? address,
  2. Balance? balance,
  3. int? chainLength,
  4. @Default([]) List<CrossValidationStamp> crossValidationStamps,
  5. Data? data,
  6. @Default([]) List<TransactionInput> inputs,
  7. String? originSignature,
  8. @AddressJsonConverter() Address? previousAddress,
  9. String? previousPublicKey,
  10. String? previousSignature,
  11. String? type,
  12. ValidationStamp? validationStamp,
  13. @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;