lease property

  1. @JsonKey(name: 'lx')
  2. @NullableByteArraySerializer()
Uint8List? lease
getter/setter pair

A lease enforces mutual exclusion of transactions. If this field is nonzero, then once the transaction is confirmed, it acquires the lease identified by the (Sender, Lease) pair of the transaction until the LastValid round passes.

While this transaction possesses the lease, no other transaction specifying this lease can be confirmed.

A lease is often used in the context of Algorand Smart Contracts to prevent replay attacks.

Read more about Algorand Smart Contracts and see the Delegate Key Registration TEAL template for an example implementation of leases.

Leases can also be used to safeguard against unintended duplicate spends.

Implementation

@JsonKey(name: 'lx')
@NullableByteArraySerializer()
Uint8List? lease;