Expand description
ai.hyprstream.ledger.allocation — an issuer-signed grant record (the held
entitlement / inventory line).
{
"lexicon": 1,
"id": "ai.hyprstream.ledger.allocation",
"defs": { "main": { "type": "record", "key": "tid", "record": {
"type": "object",
"required": ["grant", "unit", "amount", "epoch", "issuer", "holder", "class"],
"properties": {
"grant": { "type": "string", "format": "cid" },
"unit": { "type": "object",
"required": ["code", "issuer"], "properties": {
"code": { "type": "string" },
"issuer": { "type": "string", "format": "did" } } },
"amount": { "type": "integer", "minimum": 0 },
"epoch": { "type": "integer", "minimum": 0 },
"issuer": { "type": "string", "format": "did" },
"holder": { "type": "string" },
"class": { "type": "string", "enum": ["prepaid", "underwritten"] }
}
}}}grant— the CID of the UCAN grant this allocation realizes (format: "cid"string; the UCAN lives outside this repo’s MST).unit— the credit unit, which names its issuer (Unit): credits are issuer liabilities (D8-1), never bearer tokens. There is no bare unit.amount— the granted amount, in the unit’s smallest quantum (u64).epoch— the issuance epoch (u64).issuer— the issuing DID. Must equalunit.issuer(an allocation is only ever the unit-issuer’s own liability).holder— the subject: a pseudonymousdid:key/did:at9por a pairwise per-cell identifier (#928 rule 3). Never forced to a root/did:webidentity.class— the grantGrantClass:prepaid(bearer-like, lease-mode-only, issuable to a baredid:key, needs no identity) vsunderwritten(issuer-relationship, the only detect-mode-eligible class). The class↔mode coupling is a protocol rule (#928 rule 4).
Structs§
- Allocation
Record - An
ai.hyprstream.ledger.allocationrecord. - Unit
- A credit unit that names its issuer.
Enums§
- Grant
Class - The grant class — couples anonymity to spend mode (#928 rule 4).
Constants§
- COLLECTION_
NSID - The NSID of this record type.