Skip to main content

mint_answer_token

Function mint_answer_token 

Source
pub fn mint_answer_token(
    turn_id: &str,
    call_id: &str,
    index: u32,
    conversation_id: &str,
    minted_at_ms: u64,
    signer: &ApprovalSigner,
) -> String
Expand description

Mint a short-lived, signed answer token scoped to one pending question.

Scoped to (turn_id, call_id, index, conversation_id) — the correlation-token contract every downstream edge slice (#1661-#1664) consumes unchanged. Mirrors crate::approval::mint_resolve_token’s shape and unforgeability argument: opaque to, and unforgeable by, anything downstream of the mint point. minted_at_ms is the caller’s wall clock at mint time; pass a real timestamp in production, an injected one in tests.

Returns the token as a lowercase-hex opaque string, safe to carry on any wire surface (a button value, a proto field) alongside call_id/index.