Skip to main content

Update Rent

Update the renter‑controlled custom rent‑information field for an active ecosystem 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 ecosystem update-rent --help

Synopsis

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

Arguments

ArgumentTypeRequiredDescription
<Name>StringYesTarget Ecosystem namespace name. No dot characters. Must reference an on‑chain ecosystem with valid non‑expired active usership lease.
<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 ecosystem renter public key; returns RenterMismatch on authorization failure.
  • Validates target ecosystem exists and ownership is not expired (NameExpired).
  • 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 ecosystem owner, meta, body, sale‑ask / rent‑ask owner‑side offer configurations.
  • Ecosystem 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.

Constraints & Validation Rules

  1. RenterMismatch: Transaction signer is not the current renter of the ecosystem.
  2. RentExpired: No active valid usership lease exists; update prohibited.
  3. NameExpired: Underlying ecosystem ownership registration expired.
  4. NameTooLong / NameEmpty: Invalid ecosystem name input.
  5. 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 ecosystem open (shell requires escaping double‑quotes):

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