Saltar al contenido principal
Esta página no tiene versión en español, así que te la mostramos en inglés.

inji Adaptor developer README.md

Source: https://github.com/OpenFn/adaptors/tree/main/packages/inji

language-inji

An OpenFn adaptor for Inji Verify: server-side verification of Verifiable Credentials (JSON-LD, SD-JWT, CWT).

Use it as step 3 of a typical verification workflow:

  1. Receive an issued credential over HTTP (another step / adaptor).
  2. Validate the request body in job code.
  3. Call Inji Verify with verify (this adaptor).
  4. Process the result (e.g. log allChecksSuccessful).

Documentation​

View the docs site for full technical documentation.

Configuration​

View the configuration-schema for required and optional configuration properties.

baseUrl must include the Inji Verify context path, for example:

{
"baseUrl": "https://verify.example.org/v1/verify"
}

The configuration schema uses JSON Schema draft-07. Run pnpm validate:schemas from the adaptors repo root after editing it.

Example job​

// Steps 1–2: credential already received and validated into state.data
verify($.data, {
skipStatusChecks: false,
statusCheckFilters: ['revocation'],
includeClaims: false,
});

// Step 4: process / log the verification result
fn(state => {
console.log(state.data.allChecksSuccessful);
return state;
});

verify posts to {baseUrl}/v2/vc-verification and writes the detailed V2 result to state.data (allChecksSuccessful, schemaAndSignatureCheck, expiryCheck, statusCheck, claims).

Development​

Clone the adaptors monorepo. Follow the "Getting Started" guide inside to get set up.

cd packages/language-inji
pnpm install
pnpm test
pnpm build

To build only the docs run pnpm build docs.