Skip to main content

create_token

Function create_token 

Source
pub fn create_token(
    keys: TokenSigningKeys<'_>,
    params: TokenIssueParams<'_>,
) -> DelegationToken
Expand description

Create a delegation token with dual signatures.

The caller supplies the signing material (delegator + delegation keypair, plus the delegation seed for Crypt-scope tokens) and the claim parameters. When params.crypt_scope is true, the delegation seed is embedded in the token so the AI can re-derive the keypair and unwrap zone keys; the scope claim becomes ["auth", "crypt"]. When false, the seed is discarded and the token is auth-only.