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({
  ///  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;