Skip to main content

create_token

Function create_token 

Source
pub fn create_token(
    delegator_keypair: &IdentityKeypair,
    delegation_keypair: &IdentityKeypair,
    ai_member: &str,
    human: &str,
    project_id: &str,
    ttl: Option<Duration>,
) -> DelegationToken
Expand description

Create a delegation token with dual signatures.

The caller supplies the human’s identity keypair (delegator, authorises issuance via the first signature) and the stable per-(human, AI) delegation keypair (produces the binding signature). The matching delegation_public_key must already be recorded in project.yaml.