Skip to main content

mint_code_for_did

Function mint_code_for_did 

Source
pub async fn mint_code_for_did(
    pool: &SqlitePool,
    creator_did: &str,
    ttl_secs: i64,
    intended_did: &str,
) -> Result<String>
Expand description

Like mint_code but records the follower intended_did the code is minted FOR, so a later POST /bot/claims for the same DID can return the SAME code (see find_active_code_for_did) rather than minting a duplicate. This is the app-side idempotency backstop that survives a bot-host state loss.