inji@1.0.0 
This adaptor exports the following from common:
- as()
- combine()
- cursor()
- dataPath()
- dataValue()
- dateFns
- each()
- field()
- fields()
- fn()
- fnIf()
- group()
- lastReferenceValue()
- map()
- merge()
- scrubEmojis()
- sourceValue()
- util
- combine()
Functions
request
request(method, path, body, [options]) ⇒ Operation
Make a general HTTP request to Inji Verify. Prefer verify for VC verification.
| Param | Type | Default | Description |
|---|---|---|---|
| method | string | HTTP method to use | |
| path | string | Path relative to configuration.baseUrl | |
| body | object | Object attached to the request body | |
| [options] | RequestOptions | {} | Optional request options |
This operation writes the following keys to state:
| State Key | Description |
|---|---|
| data | the parsed response body |
| response | the response from the HTTP server, including headers, statusCode, etc |
| references | an array of all previous data objects used in the Job |
Example
request('POST', 'v2/vc-verification', {
verifiableCredential: JSON.stringify($.data),
skipStatusChecks: false,
statusCheckFilters: ['revocation'],
includeClaims: false,
});
verify
verify(credential, [options]) ⇒ Operation
Verify a Verifiable Credential with Inji Verify (V2).
Posts to {baseUrl}/v2/vc-verification. Configure baseUrl with the
service context path, e.g. https://verify.example.org/v1/verify.
| Param | Type | Default | Description |
|---|---|---|---|
| credential | object | string | JSON-LD object, SD-JWT string, or CWT hex string | |
| [options] | VerifyOptions | {} | Verification options |
This operation writes the following keys to state:
| State Key | Description |
|---|---|
| data | the parsed response body |
| response | the response from the HTTP server, including headers, statusCode, etc |
| references | an array of all previous data objects used in the Job |
Example: Verify a credential from state
verify($.data, {
skipStatusChecks: false,
statusCheckFilters: ['revocation'],
includeClaims: false,
});
Interfaces
HttpState
State object after an Inji Verify HTTP call
Properties
| Name | Description |
|---|---|
| data | the parsed response body |
| response | the response from the HTTP server, including headers, statusCode, etc |
| references | an array of all previous data objects used in the Job |
RequestOptions
Options provided to a general HTTP request
Properties
| Name | Type | Description |
|---|---|---|
| body | object | string | body data to append to the request |
| errors | object | Map of errorCodes -> error messages |
| query | object | An object of query parameters to be encoded into the URL |
| headers | object | An object of headers to append to the request |
| parseAs | string | Parse the response body as json, text or stream |
| timeout | number | Request timeout in ms. Default: 300 seconds |
VerifyOptions
Options for verify
Properties
| Name | Type | Default | Description |
|---|---|---|---|
| [skipStatusChecks] | boolean | false | Skip credential status (e.g. revocation) checks |
| [statusCheckFilters] | Array.<string> | [] | Status check purposes to run (e.g. ['revocation']) |
| [includeClaims] | boolean | false | Include extracted claims when schema/signature is valid |