Credential Management

Wallet Server stores Verifiable Credentials (VCs) per user. You can import, list, fetch, and delete credentials.

Endpoints

  • POST /credentials

    • Imports a credential JSON. Validates schema, proof, and (by default) that the subject matches the holder DID.

    • Body:

      • credential: VC JSON

      • allowForeignSubject (boolean, default false): if true, skip subject‑equals‑holder check

  • GET /credentials

    • Returns { count, credentials } with optional filters:

      • network: mainnet | testnet (derived from VC id DID)

      • type: VC type

      • status: W3C StatusPurpose

      • issuedAt: ISO date

      • version: 1 | 2

  • GET /credentials/:id

    • Returns a specific credential by id.

  • DELETE /credentials

    • Deletes all credentials for the authenticated user.

  • DELETE /credentials/:id

    • Deletes a specific credential by id.

Examples

Import a credential:

List testnet credentials of a given type:

Fetch by id:

Delete all:

Delete by id:

Validation Rules (high level)

  • Credential must have a recipient (holder)

  • Unless allowForeignSubject=true, credentialSubject.id must equal holder DID

  • Credential must have a credentialSchema

  • Proof verification and schema validation must pass

Last updated