pet.trezy.retirePet

Retire one of the caller's own pets: put it away, off the stage and out of the collection's foreground. IRREVERSIBLE — there is no un-retire, here or anywhere, by design. A client MUST confirm before calling this and MUST name the pet in the confirmation. The pet is not deleted and not refunded: its ledger row stays, its price still counts as spent, and the record in the caller's repo is left where it is. REFUSES the caller's last ACTIVE pet with last-active-pet: only active pets earn and nothing activates a pet after the fact, so retiring the last one leaves a player with no income and no route back to any — the balance can never reach a price again and the starter grant is once per DID. It blocks nothing achievable another way: buying lands a pet active while a slot is free, so a player with money can buy first and retire after.

Repository @trezy.pet did:plc:ollch4g7tes2reb5eceiwuol namespace authority
Details · procedure
Kindprocedure
Authoritytrezy.pet
Indexed

Procedure

procedure · POST

Input

application/json

uri

requiredstring · at-uri

The pet to retire. Must be a pet the caller owns; the procedure never accepts a DID and acts only on the authenticated caller's own rows.

Output

application/json

error

string

Present instead of uri/name when the pet was not retired for an expected reason. A stable machine code the client branches on — add codes, never rename them.

  • knownValues: missing-uri | unknown-pet | already-retired | last-active-pet | last-pet

message

string

A sentence to show the player, accompanying `error`. Free to reword; do not branch on it.

name

string

The retired pet's name, so the confirmation the player sees afterwards can use it. Absent if the ledger row carries no usable name.

uri

string · at-uri

The pet that was retired. Present only on success, which is why nothing here is required: a refusal carries error and message instead, and requiring even one of these would fail response validation and turn an expected refusal back into a 500.

Similar lexicons

semantic match

Lexicons whose schemas describe something close to this one. Check them before publishing a new one that overlaps.

  • pet.trezy.swapPets

    procedure

    Change which of the caller's pets are on the stage. Pass `activate` to bring a pet on, `deactivate` to take one off, or both to swap in one call. Acts only on the authenticated caller's own rows and never accepts a DID. TOUCHES NO MONEY AT ALL: it writes a stint to trezy_pet_stage_log recording exactly when each pet went on or came off, and the accrual reads those stints so every pet is paid for the stretches it was genuinely on stage and no others. Coins already waiting stay waiting — nothing i