-
Notifications
You must be signed in to change notification settings - Fork 19
docs: document selfie check 4.0 #166
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -742,6 +742,32 @@ | |
| ] | ||
| } | ||
| }, | ||
| "selfie_check_v4": { | ||
| "summary": "Selfie Check", | ||
| "value": { | ||
| "protocol_version": "4.0", | ||
| "nonce": "0xabc123", | ||
| "action": "selfie-check-2026-09-02", | ||
| "integrity_bundle": { | ||
| "version": 2, | ||
| "signature_format": "apple_app_attest", | ||
| "timestamp": 1788302923, | ||
| "signature": "a1b2c3d4", | ||
| "jwt": "eyJ..." | ||
| }, | ||
| "responses": [ | ||
| { | ||
| "identifier": "selfie", | ||
| "issuer_schema_id": 11, | ||
| "nullifier": "0x2bf8406809dcefb1486dadc96c0a897db9bab002053054cf64272db512c6fbd8", | ||
| "expires_at_min": 1788302888, | ||
| "proof": ["0x111", "0x222", "0x333", "0x444", "0x555"], | ||
| "signal_hash": "0x0", | ||
| "sybil_score": 10 | ||
| } | ||
| ] | ||
| } | ||
| }, | ||
| "session_v4": { | ||
| "summary": "Session proof (protocol 4.0)", | ||
| "value": { | ||
|
|
@@ -861,7 +887,7 @@ | |
| "device", | ||
| "selfie" | ||
| ], | ||
| "description": "The legacy verification level. Use `selfie` for Selfie Check (Beta). The historical `face` value remains accepted for backward compatibility and behaves the same as `selfie`." | ||
| "description": "The legacy verification level. Use `selfie` for Selfie Check. The historical `face` value remains accepted for backward compatibility and behaves the same as `selfie`." | ||
| }, | ||
| "action": { | ||
| "type": "string", | ||
|
|
@@ -1250,6 +1276,33 @@ | |
| "additionalProperties": true, | ||
| "description": "Pass-through GraphQL response. Usually includes `data` and optionally `errors`." | ||
| }, | ||
| "IntegrityBundle": { | ||
| "type": "object", | ||
| "required": ["version", "signature_format", "timestamp", "signature", "jwt"], | ||
| "description": "World ID App integrity attestation. Selfie Check responses with `issuer_schema_id: 11` require version 2, which covers the disclosed `sybil_score`.", | ||
| "properties": { | ||
| "version": { | ||
| "type": "integer", | ||
| "enum": [1, 2] | ||
| }, | ||
| "signature_format": { | ||
| "type": "string", | ||
| "enum": ["apple_app_attest", "android_keystore"] | ||
| }, | ||
| "timestamp": { | ||
| "type": "integer", | ||
| "minimum": 0 | ||
| }, | ||
| "signature": { | ||
| "type": "string", | ||
| "description": "Hex-encoded device signature." | ||
| }, | ||
| "jwt": { | ||
| "type": "string", | ||
| "description": "Attestation Gateway JWT used to verify the signing key." | ||
| } | ||
| } | ||
| }, | ||
| "VerifyV4Request": { | ||
| "description": "Choose one request type.", | ||
| "oneOf": [ | ||
|
|
@@ -1303,6 +1356,9 @@ | |
| "enum": ["production", "staging"], | ||
| "default": "production" | ||
| }, | ||
| "integrity_bundle": { | ||
| "$ref": "#/components/schemas/IntegrityBundle" | ||
| }, | ||
| "responses": { | ||
| "type": "array", | ||
| "minItems": 1, | ||
|
|
@@ -1312,7 +1368,7 @@ | |
| }, | ||
| "user_presence_completed": { | ||
| "type": "boolean", | ||
| "description": "Whether World App completed the requested user-presence check. IDKit always sends it; treat a missing value as false." | ||
| "description": "Whether World App completed the requested user-presence check. IDKit includes this field only when `require_user_presence` was true in the request." | ||
| } | ||
| } | ||
| }, | ||
|
|
@@ -1337,9 +1393,17 @@ | |
| }, | ||
| "environment": { | ||
| "type": "string", | ||
| "enum": ["production", "staging"], | ||
| "enum": ["production", "staging", "sandbox"], | ||
| "default": "production" | ||
| }, | ||
| "integrity_bundle": { | ||
| "description": "Required with version 2 when any response item is a Selfie Check credential (`issuer_schema_id: 11`).", | ||
| "allOf": [ | ||
| { | ||
| "$ref": "#/components/schemas/IntegrityBundle" | ||
| } | ||
| ] | ||
| }, | ||
| "responses": { | ||
| "type": "array", | ||
| "minItems": 1, | ||
|
|
@@ -1349,7 +1413,7 @@ | |
| }, | ||
| "user_presence_completed": { | ||
| "type": "boolean", | ||
| "description": "Whether World App completed the requested user-presence check. IDKit always sends it; treat a missing value as false." | ||
| "description": "Whether World App completed the requested user-presence check. IDKit includes this field only when `require_user_presence` was true in the request." | ||
| } | ||
| } | ||
| }, | ||
|
|
@@ -1373,9 +1437,17 @@ | |
| }, | ||
| "environment": { | ||
| "type": "string", | ||
| "enum": ["production", "staging"], | ||
| "enum": ["production", "staging", "sandbox"], | ||
| "default": "production" | ||
| }, | ||
| "integrity_bundle": { | ||
| "description": "Required with version 2 when any response item is a Selfie Check credential (`issuer_schema_id: 11`).", | ||
| "allOf": [ | ||
| { | ||
| "$ref": "#/components/schemas/IntegrityBundle" | ||
| } | ||
| ] | ||
| }, | ||
| "responses": { | ||
| "type": "array", | ||
| "minItems": 1, | ||
|
|
@@ -1385,7 +1457,7 @@ | |
| }, | ||
| "user_presence_completed": { | ||
| "type": "boolean", | ||
| "description": "Whether World App completed the requested user-presence check. IDKit always sends it; treat a missing value as false." | ||
| "description": "Whether World App completed the requested user-presence check. IDKit includes this field only when `require_user_presence` was true in the request." | ||
| } | ||
| } | ||
| }, | ||
|
|
@@ -1395,7 +1467,7 @@ | |
| "properties": { | ||
| "identifier": { | ||
| "type": "string", | ||
| "description": "Credential identifier returned by IDKit (for example, `orb` or `selfie`). Use `selfie` for Selfie Check (Beta); the historical `face` value remains accepted as a backward-compatible alias." | ||
| "description": "Credential identifier returned by IDKit (for example, `orb` or `selfie`). Use `selfie` for Selfie Check; the historical `face` value remains accepted as a backward-compatible alias." | ||
| }, | ||
| "signal_hash": { | ||
| "type": "string", | ||
|
|
@@ -1451,6 +1523,11 @@ | |
| "type": "string" | ||
| }, | ||
| "description": "Exactly 5 hex elements (4 compressed proof elements + Merkle root)." | ||
| }, | ||
| "sybil_score": { | ||
| "type": "integer", | ||
| "minimum": 0, | ||
| "description": "Versioned Selfie Check risk signal represented as an integer. Required only when `issuer_schema_id` is 11." | ||
|
Comment on lines
+1527
to
+1530
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Although the new description says Useful? React with 👍 / 👎. |
||
| } | ||
| } | ||
| }, | ||
|
|
@@ -1493,6 +1570,11 @@ | |
| "items": { | ||
| "type": "string" | ||
| } | ||
| }, | ||
| "sybil_score": { | ||
| "type": "integer", | ||
| "minimum": 0, | ||
| "description": "Versioned Selfie Check risk signal represented as an integer. Required only when `issuer_schema_id` is 11." | ||
| } | ||
| } | ||
| }, | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For a request containing an
issuer_schema_id: 11response, this schema still permitsintegrity_bundleto be omitted because it is absent from the request'srequiredarray, and when supplied it permits version 1 through the sharedIntegrityBundleenum. Consequently, generated clients and schema validation accept payloads that the description says the verification endpoint rejects; model Selfie Check as a distinct request variant that requires the bundle and constrains its version to 2.Useful? React with 👍 / 👎.