Skip to content
This repository was archived by the owner on Apr 14, 2026. It is now read-only.
This repository was archived by the owner on Apr 14, 2026. It is now read-only.

Proof.credentialType field does not match bridge response key ("verification_level" vs "credential_type") #3

Description

@connor-compto

The Proof class defined in types.kt currently expects the JSON field "credential_type" when deserializing credentialType.

However, the actual response returned by the bridge uses the field name "verification_level" instead. This mismatch causes deserialization to fail and throw a "generic error," which prevents the user from completing the verification flow.

Steps to Reproduce:

  1. Integrate the SDK in a valid app with a valid staging app id.
  2. Initiate and complete the proof generation process via simulator.
  3. Observe that a "generic error" is returned instead of a successful proof result.

Expected Behavior:

The SDK should correctly map "verification_level" to the credentialType property in the Proof class to allow successful deserialization and verification.

Suggested Fix:

Update the @SerializedName annotation for credentialType to use "verification_level", or rename the property if that better reflects the bridge's current behavior.

@SerialName("verification_level") val credentialType: CredentialType

or

@SerialName("verification_level") val verificationLevel: VerificationLevel

Additional Context

for reference, the idkit-js handles this correctly:

  • [ISuccessResult](https://github.com/worldcoin/idkit-js/blob/main/packages/core/src/types/result.ts#L4-L9) uses "verification_level"
  • the bridge logic includes a mapping to convert a returned "credential_type" to a "verification_level" if needed.

Related

It’s possible the idkit-swift SDK has a similar issue, as it also appears to expect a credentialType field in its Proof equivalent. I haven’t confirmed this yet, but the structure looks similar enough that it may warrant a quick check for consistency.

Let me know if you'd like help submitting a pull request for this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions