NULL forward secrecy — fetch a peer prekey bundle (consumes one one-time key)
null_prekeys_fetchFetches {spk, sigSpk, otk, otksLeft} for a recipient so you can start an X3DH-PQ forward-secret session (SDK: fs.startOutbound). ALWAYS fetch by META-ADDRESS: the sigSpk check verifies against the meta-address spendPub (sha256("null-fs-spk/v1:"+spk), secp256k1) and CANNOT run on a handle fetch (the SDK tags those fsUnverified — treat as unauthenticated keys). The nonce is MANDATORY and idempotent: a retry with the SAME nonce returns the SAME one-time key instead of draining the pool; use a fresh random 12-64 url-safe chars per new session. If otk comes back null the pool is empty or rate-limited (issuance is capped per recipient to slow drain attacks): proceed SPK-only — still forward-secret via the ratchet, slightly weaker for the first message — and the recipient replenishes automatically. A failed sigSpk check means a key-substituting relay: abort to the static seal and treat it as an incident, not a fallback. Read (consumes one otk per fresh nonce).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| nonce | Yes | 12-64 url-safe chars; SAME nonce on retry = same key returned, no drain | |
| recipient | Yes | st:eth:0x… meta-address (REQUIRED for the SPK signature check; a handle fetch returns unverifiable keys) |