Skip to main content

Update Rent

Update the renter‑controlled custom rent‑information field for an active entity usership lease. Used to store renter‑side application metadata: service endpoints, display configuration, access hints etc. Only the current active renter is permitted to execute this instruction.

open-token entity update-rent --help

Synopsis

open-token entity update-rent <Name> <Rent Info>

Arguments

ArgumentTypeRequiredDescription
<Name>StringYesTarget entity resource name (e.g. open://google.com, open://app.google.com). Must reference an existing on‑chain entity account with valid non‑expired active usership lease, supports multi‑level dot‑separated hierarchy. Corresponding human‑readable URI: open://google.com, open://app.google.com.
<Rent Info>JSON‑StringYesRaw JSON string payload for lease‑scoped rent information. Subject to program‑defined maximum byte‑length limit. Program stores verbatim string; does not parse or validate JSON semantics.

Behaviour

  • Transaction signer must match stored entity renter public key; returns RenterMismatch on authorization failure.
  • Validates target entity exists and ownership is not expired (NameExpired).
  • Validates parent Ecosystem namespace exists on‑chain (ParentNotCreated).
  • Validates an active non‑expired usership lease exists (RentExpired).
  • Overwrites lease‑scoped rent_info field with the supplied raw JSON string.
  • Core lease properties are immutable: lease expiry timestamp, renter public key, original daily rent price cannot be modified by this command.
  • Does not modify entity owner, meta, body, sale‑ask / rent‑ask owner‑side offer configurations.
  • Entity owner may read the rent_info field but cannot write it; write access is exclusive to the active renter.
  • JSON schema and syntax validation are responsibilities of off‑chain client applications.
  • Logical resolution note: Even after updating rent‑info, the entity cannot be resolved via open:// scheme if its parent Ecosystem is expired.

Constraints & Validation Rules

  1. RenterMismatch: Transaction signer is not the current renter of the entity.
  2. RentExpired: No active valid usership lease exists; update prohibited.
  3. NameExpired: Underlying entity ownership registration expired.
  4. ParentNotCreated: Parent Ecosystem namespace does not exist on‑chain.
  5. MaxEntityLevelIsFour: Entity name hierarchy depth exceeds program‑defined maximum level.
  6. NameTooLong / NameEmpty: Invalid entity name input.
  7. RentInfoTooLong: Supplied JSON string exceeds program maximum byte‑length limit.

Note: On‑chain program does not reject malformed JSON. Caller must supply properly serialized JSON string.

Usage Example

Update rent‑information for entity open://google.com, shell escaping double‑quotes:

open-token entity update-rent open://google.com "{\"accessEndpoint\":\"https://google.demo\",\"mode\":\"public\",\"note\":\"renter custom service config\"}"