@openvtc/trust-tasks 0.2.52 → 0.2.54

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.
@@ -4,6 +4,8 @@
4
4
  */
5
5
  /**
6
6
  * Reusable JSON Schema fragments for the WebAuthn (Level 2) options and credential responses exchanged during passkey enrollment and login. Field names follow the WebAuthn / WHATWG dictionaries verbatim so existing client-side libraries (`@simplewebauthn/browser`, `navigator.credentials.*`) can pass-through their inputs and outputs.
7
+ *
8
+ * NOT the only WebAuthn surface in the registry, and deliberately so: `vta/passkey-vms/*` runs its own enrolment ceremony against these same browser APIs without referencing these definitions. The divergence is intentional. This document's contract is pass-through fidelity to the WebAuthn dictionaries — nested `rp` / `user` / `response`, `clientDataJSON` cased as the spec cases it — so a client hands `navigator.credentials.*` output over unmodified. The VTA family's contract is different: it flattens the ceremony and carries members that only mean something when the outcome is a DID verificationMethod (`did`, `publicKeyMultibase`, `coseAlgorithm`), because the VTA re-derives the authoritative key server-side from the attestation. Unifying them would break a wire contract with shipped implementations to make two genuinely different exchanges share a spelling. Extend whichever surface matches the ceremony you are specifying; do not merge them.
7
9
  */
8
10
  export interface AuthSharedWebAuthnDefinitions {
9
11
  [k: string]: unknown | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"webauthn.d.ts","sourceRoot":"","sources":["../../../../src/auth/_shared/0.1/webauthn.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;GAEG;AACH,MAAM,WAAW,6BAA6B;IAC5C,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC;CAClC"}
1
+ {"version":3,"file":"webauthn.d.ts","sourceRoot":"","sources":["../../../../src/auth/_shared/0.1/webauthn.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;GAIG;AACH,MAAM,WAAW,6BAA6B;IAC5C,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC;CAClC"}
@@ -4,6 +4,10 @@
4
4
  */
5
5
  /**
6
6
  * The credential-minting core shared by every family that issues or revokes a Verifiable Credential (vta/credentials/*, vtc/endorsements/*, and future issuers). A family embeds these definitions rather than restating them, so the issuance receipt and the revocation receipt have one canonical shape across the registry. Families remain separate Trust Tasks because their trust semantics differ (approval plane, third-party verifiability, governance gating); only the mechanism is shared.
7
+ *
8
+ * Two levels of reuse are offered. A family whose response IS a receipt embeds `IssuedCredential` / `RevocationReceipt` whole, as vtc/endorsements does. A family whose response carries additional members alongside the receipt fields cannot do that — these definitions are `additionalProperties: false`, so composing one via `allOf` would reject the extra members — and instead references `CredentialId`, the identifier both receipts are keyed by, as vta/credentials does.
9
+ *
10
+ * `CredentialId` is hoisted and the other members are not, deliberately: it is the one field carrying a constraint worth stating once (non-empty), and the code generators mint a named type per `$def`, so hoisting a plain timestamp or the opaque credential object would wrap `expiresAt` and `credential` in newtypes for every consumer while deduplicating nothing but a description.
7
11
  */
8
12
  export interface CredentialsSharedIssuanceAndRevocationDefinitions {
9
13
  [k: string]: unknown | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"credentials.d.ts","sourceRoot":"","sources":["../../../../src/credentials/_shared/0.1/credentials.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;GAEG;AACH,MAAM,WAAW,iDAAiD;IAChE,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC;CAClC"}
1
+ {"version":3,"file":"credentials.d.ts","sourceRoot":"","sources":["../../../../src/credentials/_shared/0.1/credentials.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;GAMG;AACH,MAAM,WAAW,iDAAiD;IAChE,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC;CAClC"}
@@ -12,6 +12,10 @@ export interface KeysCreatePayload {
12
12
  * Hierarchical-deterministic path to derive at. Where the custodian derives from a seed, supplying the path makes the key reproducible from that seed; omitting it leaves the choice to the custodian.
13
13
  */
14
14
  derivationPath?: string;
15
+ /**
16
+ * BIP-39 phrase to derive from instead of the custodian's own seed. Supplying it makes this an import of externally-generated seed material wearing create's clothes: the phrase reconstitutes the key anywhere, so it is secret-bearing in exactly the way the rest of this payload is not. A custodian MUST refuse it on any transport that is not end-to-end confidential, for the reason `keys/import` refuses its cleartext carrier, and MUST NOT log or echo it.
17
+ */
18
+ mnemonic?: string;
15
19
  /**
16
20
  * Optional human-readable label for the resulting record.
17
21
  */
@@ -1 +1 @@
1
- {"version":3,"file":"payload.d.ts","sourceRoot":"","sources":["../../../../src/keys/create/0.1/payload.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;GAEG;AACH,MAAM,MAAM,OAAO,GAAG,SAAS,GAAG,QAAQ,GAAG,MAAM,CAAC;AAEpD,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,OAAO,CAAC;IACjB;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,GAAG,CAAC,EAAE,GAAG,CAAC;CACX;AACD;;GAEG;AACH,MAAM,WAAW,GAAG;IAClB,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC;CAClC;AAED,2BAA2B;AAC3B,eAAO,MAAM,QAAQ,EAAG,6CAAsD,CAAC;AAE/E,qEAAqE;AACrE,eAAO,MAAM,iBAAiB,EAAG,sDAA+D,CAAC"}
1
+ {"version":3,"file":"payload.d.ts","sourceRoot":"","sources":["../../../../src/keys/create/0.1/payload.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;GAEG;AACH,MAAM,MAAM,OAAO,GAAG,SAAS,GAAG,QAAQ,GAAG,MAAM,CAAC;AAEpD,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,OAAO,CAAC;IACjB;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,GAAG,CAAC,EAAE,GAAG,CAAC;CACX;AACD;;GAEG;AACH,MAAM,WAAW,GAAG;IAClB,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC;CAClC;AAED,2BAA2B;AAC3B,eAAO,MAAM,QAAQ,EAAG,6CAAsD,CAAC;AAE/E,qEAAqE;AACrE,eAAO,MAAM,iBAAiB,EAAG,sDAA+D,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"payload.js","sourceRoot":"","sources":["../../../../src/keys/create/0.1/payload.ts"],"names":[],"mappings":"AAAA;;;GAGG;AA8BH,2BAA2B;AAC3B,MAAM,CAAC,MAAM,QAAQ,GAAG,6CAAsD,CAAC;AAE/E,qEAAqE;AACrE,MAAM,CAAC,MAAM,iBAAiB,GAAG,sDAA+D,CAAC"}
1
+ {"version":3,"file":"payload.js","sourceRoot":"","sources":["../../../../src/keys/create/0.1/payload.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAkCH,2BAA2B;AAC3B,MAAM,CAAC,MAAM,QAAQ,GAAG,6CAAsD,CAAC;AAE/E,qEAAqE;AACrE,MAAM,CAAC,MAAM,iBAAiB,GAAG,sDAA+D,CAAC"}
@@ -4,6 +4,8 @@
4
4
  */
5
5
  /**
6
6
  * A WebAuthn passkey published as a Multikey verificationMethod (purpose `authentication`) on a VTA-managed DID. Any verifier that resolves the DID can validate a WebAuthn assertion against the embedded public key — no callback to the VTA and no shared secret. Returned by vta/passkey-vms/enroll-submit (the single VM just created) and vta/passkey-vms/list (every VM on the DID). The shape mirrors the wallet-side `@pnm/core` PasskeyVerificationMethod and the VTA-side `vta_sdk::protocols::did_management::passkey_vms::PasskeyVerificationMethod`.
7
+ *
8
+ * Related but deliberately separate from `auth/_shared/0.1/webauthn`: both families drive the same browser APIs, but that document mirrors the WebAuthn dictionaries verbatim for client pass-through, while this family flattens the ceremony and carries DID-specific members (`publicKeyMultibase`, `coseAlgorithm`) because its output is a verificationMethod published in a DID document rather than a credential row in an auth service. A `PasskeyVerificationMethod` is not an `auth/_shared` `RegisteredCredential` under another name — it is a W3C Multikey any resolver can verify against without calling back to the issuer. The overlap is in subject matter, not in shape; see the note in `auth/_shared/0.1/webauthn` before proposing a merge.
7
9
  */
8
10
  export interface PasskeyVerificationMethodSharedDefinitionForTheVtaPasskeyVmsSpecFamily {
9
11
  [k: string]: unknown | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"passkey-vm.d.ts","sourceRoot":"","sources":["../../../../src/vta/_shared/0.1/passkey-vm.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;GAEG;AACH,MAAM,WAAW,sEAAsE;IACrF,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC;CAClC"}
1
+ {"version":3,"file":"passkey-vm.d.ts","sourceRoot":"","sources":["../../../../src/vta/_shared/0.1/passkey-vm.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;GAIG;AACH,MAAM,WAAW,sEAAsE;IACrF,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC;CAClC"}
@@ -2,11 +2,12 @@
2
2
  * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
3
  * Source: specs/vta/credentials/revoke/0.1/payload.schema.json
4
4
  */
5
+ /**
6
+ * The id of the credential to revoke (as returned by vta/credentials/issue).
7
+ */
8
+ export type CredentialId = string;
5
9
  export interface VTACredentialsRevokePayload {
6
- /**
7
- * The id of the credential to revoke (as returned by vta/credentials/issue).
8
- */
9
- credentialId: string;
10
+ credentialId: CredentialId;
10
11
  /**
11
12
  * Optional human-readable rationale, recorded for audit.
12
13
  */
@@ -1 +1 @@
1
- {"version":3,"file":"payload.d.ts","sourceRoot":"","sources":["../../../../../src/vta/credentials/revoke/0.1/payload.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,WAAW,2BAA2B;IAC1C;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,GAAG,CAAC,EAAE,GAAG,CAAC;CACX;AACD;;GAEG;AACH,MAAM,WAAW,GAAG;IAClB,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC;CAClC;AAED,2BAA2B;AAC3B,eAAO,MAAM,QAAQ,EAAG,wDAAiE,CAAC;AAE1F,qEAAqE;AACrE,eAAO,MAAM,iBAAiB,EAAG,iEAA0E,CAAC"}
1
+ {"version":3,"file":"payload.d.ts","sourceRoot":"","sources":["../../../../../src/vta/credentials/revoke/0.1/payload.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC;AAElC,MAAM,WAAW,2BAA2B;IAC1C,YAAY,EAAE,YAAY,CAAC;IAC3B;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,GAAG,CAAC,EAAE,GAAG,CAAC;CACX;AACD;;GAEG;AACH,MAAM,WAAW,GAAG;IAClB,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC;CAClC;AAED,2BAA2B;AAC3B,eAAO,MAAM,QAAQ,EAAG,wDAAiE,CAAC;AAE1F,qEAAqE;AACrE,eAAO,MAAM,iBAAiB,EAAG,iEAA0E,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"payload.js","sourceRoot":"","sources":["../../../../../src/vta/credentials/revoke/0.1/payload.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAoBH,2BAA2B;AAC3B,MAAM,CAAC,MAAM,QAAQ,GAAG,wDAAiE,CAAC;AAE1F,qEAAqE;AACrE,MAAM,CAAC,MAAM,iBAAiB,GAAG,iEAA0E,CAAC"}
1
+ {"version":3,"file":"payload.js","sourceRoot":"","sources":["../../../../../src/vta/credentials/revoke/0.1/payload.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAsBH,2BAA2B;AAC3B,MAAM,CAAC,MAAM,QAAQ,GAAG,wDAAiE,CAAC;AAE1F,qEAAqE;AACrE,MAAM,CAAC,MAAM,iBAAiB,GAAG,iEAA0E,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openvtc/trust-tasks",
3
- "version": "0.2.52",
3
+ "version": "0.2.54",
4
4
  "description": "Generated TypeScript bindings for the Trust Tasks framework registry.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -5,6 +5,8 @@
5
5
 
6
6
  /**
7
7
  * Reusable JSON Schema fragments for the WebAuthn (Level 2) options and credential responses exchanged during passkey enrollment and login. Field names follow the WebAuthn / WHATWG dictionaries verbatim so existing client-side libraries (`@simplewebauthn/browser`, `navigator.credentials.*`) can pass-through their inputs and outputs.
8
+ *
9
+ * NOT the only WebAuthn surface in the registry, and deliberately so: `vta/passkey-vms/*` runs its own enrolment ceremony against these same browser APIs without referencing these definitions. The divergence is intentional. This document's contract is pass-through fidelity to the WebAuthn dictionaries — nested `rp` / `user` / `response`, `clientDataJSON` cased as the spec cases it — so a client hands `navigator.credentials.*` output over unmodified. The VTA family's contract is different: it flattens the ceremony and carries members that only mean something when the outcome is a DID verificationMethod (`did`, `publicKeyMultibase`, `coseAlgorithm`), because the VTA re-derives the authoritative key server-side from the attestation. Unifying them would break a wire contract with shipped implementations to make two genuinely different exchanges share a spelling. Extend whichever surface matches the ceremony you are specifying; do not merge them.
8
10
  */
9
11
  export interface AuthSharedWebAuthnDefinitions {
10
12
  [k: string]: unknown | undefined;
@@ -5,6 +5,10 @@
5
5
 
6
6
  /**
7
7
  * The credential-minting core shared by every family that issues or revokes a Verifiable Credential (vta/credentials/*, vtc/endorsements/*, and future issuers). A family embeds these definitions rather than restating them, so the issuance receipt and the revocation receipt have one canonical shape across the registry. Families remain separate Trust Tasks because their trust semantics differ (approval plane, third-party verifiability, governance gating); only the mechanism is shared.
8
+ *
9
+ * Two levels of reuse are offered. A family whose response IS a receipt embeds `IssuedCredential` / `RevocationReceipt` whole, as vtc/endorsements does. A family whose response carries additional members alongside the receipt fields cannot do that — these definitions are `additionalProperties: false`, so composing one via `allOf` would reject the extra members — and instead references `CredentialId`, the identifier both receipts are keyed by, as vta/credentials does.
10
+ *
11
+ * `CredentialId` is hoisted and the other members are not, deliberately: it is the one field carrying a constraint worth stating once (non-empty), and the code generators mint a named type per `$def`, so hoisting a plain timestamp or the opaque credential object would wrap `expiresAt` and `credential` in newtypes for every consumer while deduplicating nothing but a description.
8
12
  */
9
13
  export interface CredentialsSharedIssuanceAndRevocationDefinitions {
10
14
  [k: string]: unknown | undefined;
@@ -14,6 +14,10 @@ export interface KeysCreatePayload {
14
14
  * Hierarchical-deterministic path to derive at. Where the custodian derives from a seed, supplying the path makes the key reproducible from that seed; omitting it leaves the choice to the custodian.
15
15
  */
16
16
  derivationPath?: string;
17
+ /**
18
+ * BIP-39 phrase to derive from instead of the custodian's own seed. Supplying it makes this an import of externally-generated seed material wearing create's clothes: the phrase reconstitutes the key anywhere, so it is secret-bearing in exactly the way the rest of this payload is not. A custodian MUST refuse it on any transport that is not end-to-end confidential, for the reason `keys/import` refuses its cleartext carrier, and MUST NOT log or echo it.
19
+ */
20
+ mnemonic?: string;
17
21
  /**
18
22
  * Optional human-readable label for the resulting record.
19
23
  */
@@ -5,6 +5,8 @@
5
5
 
6
6
  /**
7
7
  * A WebAuthn passkey published as a Multikey verificationMethod (purpose `authentication`) on a VTA-managed DID. Any verifier that resolves the DID can validate a WebAuthn assertion against the embedded public key — no callback to the VTA and no shared secret. Returned by vta/passkey-vms/enroll-submit (the single VM just created) and vta/passkey-vms/list (every VM on the DID). The shape mirrors the wallet-side `@pnm/core` PasskeyVerificationMethod and the VTA-side `vta_sdk::protocols::did_management::passkey_vms::PasskeyVerificationMethod`.
8
+ *
9
+ * Related but deliberately separate from `auth/_shared/0.1/webauthn`: both families drive the same browser APIs, but that document mirrors the WebAuthn dictionaries verbatim for client pass-through, while this family flattens the ceremony and carries DID-specific members (`publicKeyMultibase`, `coseAlgorithm`) because its output is a verificationMethod published in a DID document rather than a credential row in an auth service. A `PasskeyVerificationMethod` is not an `auth/_shared` `RegisteredCredential` under another name — it is a W3C Multikey any resolver can verify against without calling back to the issuer. The overlap is in subject matter, not in shape; see the note in `auth/_shared/0.1/webauthn` before proposing a merge.
8
10
  */
9
11
  export interface PasskeyVerificationMethodSharedDefinitionForTheVtaPasskeyVmsSpecFamily {
10
12
  [k: string]: unknown | undefined;
@@ -3,11 +3,13 @@
3
3
  * Source: specs/vta/credentials/revoke/0.1/payload.schema.json
4
4
  */
5
5
 
6
+ /**
7
+ * The id of the credential to revoke (as returned by vta/credentials/issue).
8
+ */
9
+ export type CredentialId = string;
10
+
6
11
  export interface VTACredentialsRevokePayload {
7
- /**
8
- * The id of the credential to revoke (as returned by vta/credentials/issue).
9
- */
10
- credentialId: string;
12
+ credentialId: CredentialId;
11
13
  /**
12
14
  * Optional human-readable rationale, recorded for audit.
13
15
  */