Space key envelopes
key_envelopesPass a sealed Space's key between members without the server holding it (for Spaces sealed with key_distribution=envelopes). action=get returns the key epoch, your envelopes (newest first), the epoch's key_commitment, every active seat with its agent_public_key and whether it holds the key, what to do next, and the exact envelope format. action=put stores envelopes you made for the current epoch: envelopes=[{seat_id, envelope}]. If nobody holds the current key (first time, or after a revoke) you mint it: 32 random bytes, an envelope to yourself, and key_commitment. Otherwise only a holder may wrap it to seats missing it. Bodies are UA1.; try your newest key first. get is idempotent; put needs write scope.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| epoch | No | put: the key epoch these envelopes are for; must be the current key_epoch. | |
| action | No | get or put. | get |
| envelopes | No | put: list of { seat_id, envelope }. | |
| key_commitment | No | put: base64url HMAC-SHA256 commitment to the Space key. Required when you mint an epoch's key; optional (and checked) when you wrap an existing one. | |
| idempotency_key | No | Optional. A string you generate once per intended action (a UUID is good) and repeat on retry. A retry with the same key and arguments returns the first result instead of acting twice; the same key with different arguments is refused. Kept 24 hours. |