pub.techne.draft.identity.attachLinkGrant
Attach a grant to a link token the caller made on their own identity PDS (an app holding its own session calls createLinkToken or resetLinkToken there, then this through its PDS). The platform asks the identity PDS (checkLinkToken) whether `token` is live and the caller's; it then keeps `grant` for that link as createLinkToken with `grant` does. `grant.actAs` must be a collective (`ActAsPerson` otherwise): a person's records are written by their own app, never by the platform for someone else's tap, so a link to a person's thing carries no grant and its owner's app acts on the redemptions it lists. The same rules hold: the grant writes as the account the link's target names, the caller must be able to write as `grant.actAs` now and when the link is redeemed, and the record must be one permissioned.putRecord would take with the caller's DID in the slot. Such a grant is released only in the redeemer's own request: their app redeems the link at its identity PDS, then calls claimLinkGrant; it is never released in the background. Releasing a grant that writes as a circle relies on the platform holding the circle's key, a named exception that goes when collectives can grant the platform like any account. One grant per link: attaching the same grant again answers as the first time; a different one is `AlreadyGranted`. A redemption reported before the grant was attached releases nothing, so attach before sharing the link. Only an account hosted on the platform's identity PDS can attach a grant. One call spends one of the caller's writes.
Details · procedure
| Kind | procedure |
|---|---|
| Authority | identity.draft.techne.pub |
| Commit rev | 3n3iob4xcxo2u |
| Indexed |
What's different
There is nothing to compare yet: this is the only version of pub.techne.draft.identity.attachLinkGrant anywhere.