MaxResources
untyped bigintValue
(1000 <untyped> bigint)
MaxResourcesPerAdmin
untyped bigintValue
(20 <untyped> bigint)
MaxPermissionsPerResource
untyped bigintValue
(50 <untyped> bigint)
MaxHoldersPerPermission
untyped bigintValue
(200 <untyped> bigint)
MaxNameLen
untyped bigintValue
(64 <untyped> bigint)
ReservationPeriod
int64// 90 days
Value
7776000
MaxRenderResources
untyped bigintValue
(20 <untyped> bigint)
MaxRenderPermissions
untyped bigintValue
(8 <untyped> bigint)
MaxRenderHolders
untyped bigintValue
(10 <untyped> bigint)
Reservation
typeReservation holds a deleted resource name for its former admin AND its original creator, and expires.
Value
permission_registry.Reservation
resources
map[string].uverse.addressresources maps a resource name to the admin address that controls it.
- OID
- 0243ed…b7fa:31
resources details
resourceNames
[]stringresourceNames tracks the insertion-ordered list of resource names so ListResources can iterate without scanning the map.
- OID
- 0243ed…b7fa:44
resourceNames details
permissions
map[string]map[string]map[.uverse.address]boolpermissions maps resource -> permission -> address -> granted. Three-level nesting gives O(1) lookup for Has().
- OID
- 0243ed…b7fa:33
permissions details
permList
map[string][]stringpermList tracks the ordered list of distinct permission names per resource, so GetPermissions can iterate without scanning the full map.
- OID
- 0243ed…b7fa:34
permList details
retired
map[string]*permission_registry.Reservationretired maps a deleted resource name to its time-bounded reservation. Consumers authorize against resource names, so a freed name must not be claimable by an attacker while integrators may still reference it — but the hold expires so tombstones cannot lock the namespace forever.
- OID
- 0243ed…b7fa:35
retired details
resourceCreators
map[string].uverse.addressresourceCreators records each resource's ORIGINAL creator, immutable through admin transfers, so a hostile admin-transferee cannot permanently strand a name against the project that made it.
- OID
- 0243ed…b7fa:36
resourceCreators details
adminResources
map[.uverse.address]intadminResources counts the live resources each address administers, so MaxResourcesPerAdmin can be enforced in O(1). Entries are removed when the count reaches zero so the map tracks live admins only (R1).
- OID
- 0243ed…b7fa:37
adminResources details
pendingAdmins
map[string].uverse.addresspendingAdmins holds nominated-but-not-yet-accepted admins, keyed by resource name. Admin handoff is two-step (Y4): nominating is reversible, only the nominee's own acceptance is final.
- OID
- 0243ed…b7fa:38
pendingAdmins details
init.18
func()- OID
- 0243ed…b7fa:11
init.18 details
mustBeAdmin
func(who .uverse.address, resource string)mustBeAdmin panics if who is not the admin of the resource. Y1 (audit 2026-09-21): identity is now passed in from the crossing entrypoint's own \`cur.Previous().Address()\` rather than recomputed by a non-crossing helper via unsafe.PreviousRealm(). The stack-walking form returned the correct address on every path this realm actually exposes, but nothing in the type system tied it to the immediate caller — a future non-crossing exported helper calling it would have silently resolved its importer's caller instead of its importer (security.md Class 2). Threading \`cur\` makes the binding structural.
- OID
- 0243ed…b7fa:13
mustBeAdmin details
rejectStraySend
func()rejectStraySend aborts a transaction that attaches coins. This realm has no banker, no payable path and no withdrawal function, so coins attached to any entrypoint would be permanently stranded at the realm address (Y5, security.md § operational).
- OID
- 0243ed…b7fa:14
rejectStraySend details
releaseAdminSlot
func(a .uverse.address)releaseAdminSlot decrements an admin's live-resource count, deleting the entry when it reaches zero so adminResources never accumulates zero-valued keys.
- OID
- 0243ed…b7fa:15
releaseAdminSlot details
isValidName
func(name string) boolisValidName restricts resource and permission names to lowercase alphanumeric with underscores. Beyond hygiene this is a security property: names appear in composite trust decisions and rendered output, so no delimiter or markdown character may enter one.
- OID
- 0243ed…b7fa:16
isValidName details
nameRuleText
func(kind string) string- OID
- 0243ed…b7fa:17
nameRuleText details
CreateResource
func(resourceName string)CreateResource registers a new named resource. The caller becomes its admin and is the only address that can grant or revoke permissions on it. A deleted resource name stays reserved for its former admin and its original creator until the reservation expires. Each address may administer at most MaxResourcesPerAdmin resources at once, and the registry holds at most MaxResources in total.
- OID
- 0243ed…b7fa:18
CreateResource details
DeleteResource
func(resourceName string)DeleteResource removes a resource and every permission under it. Only the resource admin can call this. The name stays reserved for the caller and for the original creator: nobody else can re-create it and inherit its consumers until the reservation expires.
- OID
- 0243ed…b7fa:19
DeleteResource details
Grant
func(resourceName string, permission string, addr .uverse.address)Grant gives an address a named permission on a resource. Only the resource admin can call this. Panics if the permission is already granted to avoid silent no-ops.
- OID
- 0243ed…b7fa:20
Grant details
Revoke
func(resourceName string, permission string, addr .uverse.address)Revoke removes a permission from an address. Only the resource admin can call this. Panics if the permission was not granted. A permission left with no holders is pruned from the resource's permission list.
- OID
- 0243ed…b7fa:21
Revoke details
TransferAdmin
func(resourceName string, newAdmin .uverse.address)TransferAdmin nominates a new admin for a resource. Only the current admin can call this, and the handoff does NOT take effect until the nominee calls AcceptAdmin. Y4 (audit 2026-09-21): the upstream one-step transfer made a well-formed-but-unowned destination permanently fatal. address.IsValid only checks bech32 form, so a mistyped address passed the check and left the resource with an admin nobody controls — it could never again be granted on, revoked from, transferred or deleted, and its slot was lost from both the global cap and the former admin's quota forever. Nomination is reversible; only the nominee's consent is final.
- OID
- 0243ed…b7fa:22
TransferAdmin details
CancelAdminTransfer
func(resourceName string)CancelAdminTransfer withdraws a pending nomination. Only the current admin can call this.
- OID
- 0243ed…b7fa:23
CancelAdminTransfer details
AcceptAdmin
func(resourceName string)AcceptAdmin completes a pending handoff; only the nominee may call it. The nominee's quota is checked HERE — at consent time — so a nomination can never push an account past MaxResourcesPerAdmin without that account agreeing to carry the resource.
- OID
- 0243ed…b7fa:24
AcceptAdmin details
Has
func(resourceName string, permission string, addr .uverse.address) boolHas returns true if addr holds the named permission on the resource. Returns false (never panics) for unknown resources or permissions. INTEGRATOR CONTRACT (Y7): Has takes the subject address explicitly and performs NO caller authentication — it answers "does this address hold this permission", not "may my caller do this". A consuming realm must derive addr from its own crossing entrypoint's cur.Previous().Address() and pass it in. Deriving it inside a non-crossing helper via unsafe.PreviousRealm() resolves the consumer's own caller's caller and is a Class-2 designation-forgery bug in the consumer.
- OID
- 0243ed…b7fa:25
Has details
GetPermissions
func(resourceName string, addr .uverse.address) stringGetPermissions returns all permission names granted to addr on a resource, as a comma-separated string. Returns "none" if the address has no permissions.
- OID
- 0243ed…b7fa:26
GetPermissions details
ListResources
func() stringListResources returns all registered resource names as a comma-separated string in registration order. Returns "none" if no resources exist.
- OID
- 0243ed…b7fa:27
ListResources details
GetAdmin
func(resourceName string) stringGetAdmin returns the admin address of a resource.
- OID
- 0243ed…b7fa:28
GetAdmin details
GetPendingAdmin
func(resourceName string) stringGetPendingAdmin returns the nominated admin awaiting acceptance for a resource, or "none".
- OID
- 0243ed…b7fa:29
GetPendingAdmin details
Render
func(path string) stringRender returns a markdown overview. Never panics. Output is bounded by MaxRenderResources / MaxRenderPermissions / MaxRenderHolders (Y3); truncated sections name the query to use for complete data.
- OID
- 0243ed…b7fa:30