Generate zk circuit proof

Generate a zero-knowledge proof for a circuit (POST /v1/circuits/:circuitId/prove). Recommended shape: credential + context; the server builds the witness. Every witness value must be a number: send numeric fields (claim_value, valid_from, valid_until, min_value, max_value) as JSON numbers, and id fields (schema_id, issuer_pubkey_hash, credential_id, context.secret, context.context_id) as strings holding a decimal or 0x hex number. Hash any text (an order id, an email) to a field element first; plain text is rejected with 400 invalid_fields and invalid_witness_fields. issuer_id may be any string. Range circuits such as ticket_age_entry take context.min_value and context.max_value, so a ticket age check works over REST: decision yes when claim_value is in range. The simple fields shape (condition_greater1..3) only applies to the yesno circuit.

post/v1/circuits/{circuitId}/prove

Request

  • Base URL: https://api.affix-io.com
  • URL: https://api.affix-io.com/v1/circuits/{circuitId}/prove
  • Auth: one of:
    • API key in header X-API-Key
    • HTTP bearer

Path parameters

circuitIdstring required

Request body

object required

Response

Success (JSON).

Changes

No recorded changes to this operation across all 1 revision of this API.