Skip to main content

mint

Function mint 

Source
pub fn mint(ctx: &ServiceContext, rights: u8) -> Result<(u64, Cap), Error>
Expand description

Mint a fresh resource capability that THIS service owns (CLAUDE.md 7.10).

Returns the opaque ResourceId the kernel will badge invocations with, and a capability carrying rights that you can hand to a client. The kernel tracks the id and the owning endpoint and nothing else - what the resource MEANS is yours alone, which is what keeps filesystem logic out of the kernel (CLAUDE.md 4.4).

Gated: minting requires the RESOURCE_MINT authority, granted only to services that legitimately issue resources. Delegated minting is explicit authority, never ambient (CLAUDE.md 3.1).