Warning: This package still is in very early development. Breaking changes without notice will happen at this point!
A SSI-SDK plugin with types/interfaces and utility functions for calling rest endpoints of OID4VCI
- vciClientCreateOfferUri
import { OID4VCIRestClient } from '@sphereon/ssi-sdk.oid4vci-issuer-rest-client'
const agent = createAgent<IOID4VCIRestClient>({
plugins: [
new OID4VCIRestClient({
baseUrl: 'my-issuer-base-url',
}),
],
})
const request: IVCIClientCreateOfferUriRequestArgs = {
baseUrl: 'https://ssi-backend.sphereon.com',
grants: {
'urn:ietf:params:oauth:grant-type:pre-authorized_code': {
'pre-authorized_code': '1234',
user_pin_required: false,
},
},
credentials: ['dbc2023'],
}
const result: IVCIClientCreateOfferUriResponse = await agent.vciClientCreateOfferUri(request)
yarn add @sphereon/ssi-sdk.oid4vci-issuer-rest-client
yarn build
The test command runs:
prettier
jest
coverage
You can also run only a single section of these tests, using for example yarn test:unit
.
yarn test
There are other utility scripts that help with development.
-
yarn fix
- runseslint --fix
as well asprettier
to fix code style.