@vidos-id/openid4vc-wallet-cli 0.10.2 → 0.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -1
- package/dist/cli.mjs +1 -1
- package/dist/index.d.mts +1 -0
- package/dist/index.mjs +1 -1
- package/dist/{src-CneBTuze.mjs → src-AAzxJcBV.mjs} +4 -2
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -136,6 +136,12 @@ Create a DCQL-based OpenID4VP presentation from wallet credentials.
|
|
|
136
136
|
openid4vc-wallet present \
|
|
137
137
|
--wallet-dir ./my-wallet \
|
|
138
138
|
--request 'openid4vp://authorize?...'
|
|
139
|
+
|
|
140
|
+
openid4vc-wallet present \
|
|
141
|
+
--wallet-dir ./my-wallet \
|
|
142
|
+
--request 'openid4vp://authorize?...' \
|
|
143
|
+
--dry-run \
|
|
144
|
+
--output json
|
|
139
145
|
```
|
|
140
146
|
|
|
141
147
|
## Global options
|
|
@@ -150,7 +156,8 @@ openid4vc-wallet present \
|
|
|
150
156
|
|
|
151
157
|
- `receive` is the primary credential-ingest path
|
|
152
158
|
- `import` is a local raw-credential fallback
|
|
153
|
-
- `present`
|
|
159
|
+
- `present` prepares `direct_post` and `direct_post.jwt` submissions automatically, then submits them unless `--dry-run` is set
|
|
160
|
+
- with `present --dry-run --output json`, the result includes `preparedSubmission` so callers can inspect the target URL, headers, and form body without sending anything
|
|
154
161
|
- when multiple credentials match a query, `present` prompts interactively in a TTY or returns an error with a `--credential-id` suggestion in non-interactive environments
|
|
155
162
|
- only by-value DCQL requests are supported
|
|
156
163
|
- `show` automatically fetches, verifies, and decodes IETF status list JWTs for stored credentials that include a `status.status_list` reference
|
package/dist/cli.mjs
CHANGED
package/dist/index.d.mts
CHANGED
|
@@ -90,6 +90,7 @@ declare function listCredentialsAction(rawOptions: unknown): Promise<{
|
|
|
90
90
|
//#endregion
|
|
91
91
|
//#region src/actions/present.d.ts
|
|
92
92
|
declare function presentCredentialAction(rawOptions: unknown): Promise<{
|
|
93
|
+
preparedSubmission: _$_vidos_id_openid4vc_wallet0.PreparedOpenId4VpAuthorizationResponseSubmission | undefined;
|
|
93
94
|
submitted: boolean;
|
|
94
95
|
submission: _$_vidos_id_openid4vc_wallet0.OpenId4VpResponseSubmissionResult | undefined;
|
|
95
96
|
query: _$_vidos_id_openid4vc_wallet0.ParsedDcqlQuery;
|
package/dist/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as showCredentialAction, c as initWalletAction, d as deleteAllCredentialsAction, f as deleteCredentialAction, i as interactiveWalletAction, l as importCredentialAction, n as runCli, o as receiveCredentialAction, p as deleteWalletAction, r as createProgram, s as presentCredentialAction, t as parseInteractiveCliOptions, u as listCredentialsAction } from "./src-
|
|
1
|
+
import { a as showCredentialAction, c as initWalletAction, d as deleteAllCredentialsAction, f as deleteCredentialAction, i as interactiveWalletAction, l as importCredentialAction, n as runCli, o as receiveCredentialAction, p as deleteWalletAction, r as createProgram, s as presentCredentialAction, t as parseInteractiveCliOptions, u as listCredentialsAction } from "./src-AAzxJcBV.mjs";
|
|
2
2
|
export { createProgram, deleteAllCredentialsAction, deleteCredentialAction, deleteWalletAction, importCredentialAction, initWalletAction, interactiveWalletAction, listCredentialsAction, parseInteractiveCliOptions, presentCredentialAction, receiveCredentialAction, runCli, showCredentialAction };
|
|
@@ -4,7 +4,7 @@ import { stdout } from "node:process";
|
|
|
4
4
|
import inquirer from "inquirer";
|
|
5
5
|
import { z } from "zod";
|
|
6
6
|
import { join } from "node:path";
|
|
7
|
-
import { HolderKeyRecordSchema, StoredCredentialRecordSchema, Wallet, createOpenId4VpAuthorizationResponse, parseOpenid4VpAuthorizationUrl, receiveCredentialFromOffer, resolveOpenId4VpRequest,
|
|
7
|
+
import { HolderKeyRecordSchema, StoredCredentialRecordSchema, Wallet, createOpenId4VpAuthorizationResponse, parseOpenid4VpAuthorizationUrl, prepareOpenId4VpAuthorizationResponseSubmission, receiveCredentialFromOffer, resolveOpenId4VpRequest, submitPreparedOpenId4VpAuthorizationResponse } from "@vidos-id/openid4vc-wallet";
|
|
8
8
|
import { Command } from "commander";
|
|
9
9
|
//#region src/format.ts
|
|
10
10
|
function formatInitResult(input) {
|
|
@@ -440,9 +440,11 @@ async function presentCredentialAction(rawOptions) {
|
|
|
440
440
|
const selectedCredentials = options.credentialId ? void 0 : await maybeSelectCredentials(wallet, request, rawOptions.prompt);
|
|
441
441
|
const presentation = await wallet.createPresentation(request, { selectedCredentials });
|
|
442
442
|
const authorizationResponse = createOpenId4VpAuthorizationResponse(request, presentation);
|
|
443
|
-
const
|
|
443
|
+
const preparedSubmission = request.response_mode === "direct_post" || request.response_mode === "direct_post.jwt" ? await prepareOpenId4VpAuthorizationResponseSubmission(request, authorizationResponse) : void 0;
|
|
444
|
+
const submission = !options.dryRun && preparedSubmission ? await submitPreparedOpenId4VpAuthorizationResponse(preparedSubmission, { transport: rawOptions.transport }) : void 0;
|
|
444
445
|
return {
|
|
445
446
|
...presentation,
|
|
447
|
+
preparedSubmission,
|
|
446
448
|
submitted: submission !== void 0,
|
|
447
449
|
submission
|
|
448
450
|
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vidos-id/openid4vc-wallet-cli",
|
|
3
3
|
"description": "CLI for dc+sd-jwt wallet storage and OpenID4VP presentation.",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.11.0",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "git+https://github.com/vidos-id/openid4vc-tools.git",
|
|
@@ -41,8 +41,8 @@
|
|
|
41
41
|
"README.md"
|
|
42
42
|
],
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"@vidos-id/openid4vc-cli-common": "0.
|
|
45
|
-
"@vidos-id/openid4vc-wallet": "0.
|
|
44
|
+
"@vidos-id/openid4vc-cli-common": "0.11.0",
|
|
45
|
+
"@vidos-id/openid4vc-wallet": "0.11.0",
|
|
46
46
|
"commander": "^14.0.3",
|
|
47
47
|
"inquirer": "^12.9.6",
|
|
48
48
|
"zod": "^4.3.6"
|