@vess-id/ai-identity 0.16.0-alpha.11 → 0.16.0-alpha.13
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/dist/index.d.mts +29 -1
- package/dist/index.js +34 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +34 -0
- package/dist/index.mjs.map +1 -1
- package/dist/types/permission-vc.d.ts +18 -0
- package/dist/types/permission-vc.d.ts.map +1 -1
- package/dist/types/vc.d.ts +11 -1
- package/dist/types/vc.d.ts.map +1 -1
- package/dist/utils/sdjwt-disclosure.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -195,7 +195,17 @@ declare enum CredentialType {
|
|
|
195
195
|
DEVELOPER = "DeveloperCredential",
|
|
196
196
|
TEMPORARY = "TemporaryCredential",
|
|
197
197
|
ADMIN = "AdminCredential",
|
|
198
|
-
RECEIPT = "ReceiptCredential"
|
|
198
|
+
RECEIPT = "ReceiptCredential",
|
|
199
|
+
/**
|
|
200
|
+
* Account attributes asserted by an organisation about the account holder
|
|
201
|
+
* (OEM ⑯). Issued server-to-server, never from a user's own grants.
|
|
202
|
+
*/
|
|
203
|
+
ACCOUNT = "AccountCredential",
|
|
204
|
+
/**
|
|
205
|
+
* Agent instance card (OEM ⑯, Model C). Carries a pointer to the service
|
|
206
|
+
* card and the hash that pins it — not the capability description itself.
|
|
207
|
+
*/
|
|
208
|
+
AGENT_CARD = "AgentCardCredential"
|
|
199
209
|
}
|
|
200
210
|
/**
|
|
201
211
|
* Credential Status enumeration
|
|
@@ -1297,6 +1307,24 @@ interface PermissionVcClaims_V3 extends Omit<PermissionVcClaims_V2, 'v'> {
|
|
|
1297
1307
|
* rather than against a label the issuer wrote about itself.
|
|
1298
1308
|
*/
|
|
1299
1309
|
issuance_mode?: 'user_approved' | 'auto_issued' | 'unrecorded';
|
|
1310
|
+
/**
|
|
1311
|
+
* Why this credential was requested, in the requester's own words (#955).
|
|
1312
|
+
*
|
|
1313
|
+
* Free text, deliberately. Narrowing it to a vocabulary would turn a
|
|
1314
|
+
* description into a decision input, and Phase 1 neither records nor
|
|
1315
|
+
* evaluates it (DEV-INSTRUCTIONS §256) — no gate reads it, and none should
|
|
1316
|
+
* without that being a decision someone makes on purpose.
|
|
1317
|
+
*
|
|
1318
|
+
* SD-protected at issuance. Natural language written by a person tends to
|
|
1319
|
+
* name people, accounts and circumstances, so a verifier gets it only when
|
|
1320
|
+
* the holder chooses to disclose it. Keep it out of audit logs and error
|
|
1321
|
+
* messages for the same reason.
|
|
1322
|
+
*
|
|
1323
|
+
* Optional, and permanently so: the type describes credentials already
|
|
1324
|
+
* signed and in circulation, which cannot be re-issued to carry a new
|
|
1325
|
+
* field.
|
|
1326
|
+
*/
|
|
1327
|
+
intent_description?: string;
|
|
1300
1328
|
}
|
|
1301
1329
|
/**
|
|
1302
1330
|
* Permission VC Claims (canonical union of v2 + v3).
|
package/dist/index.js
CHANGED
|
@@ -2763,6 +2763,8 @@ var CredentialType = /* @__PURE__ */ ((CredentialType2) => {
|
|
|
2763
2763
|
CredentialType2["TEMPORARY"] = "TemporaryCredential";
|
|
2764
2764
|
CredentialType2["ADMIN"] = "AdminCredential";
|
|
2765
2765
|
CredentialType2["RECEIPT"] = "ReceiptCredential";
|
|
2766
|
+
CredentialType2["ACCOUNT"] = "AccountCredential";
|
|
2767
|
+
CredentialType2["AGENT_CARD"] = "AgentCardCredential";
|
|
2766
2768
|
return CredentialType2;
|
|
2767
2769
|
})(CredentialType || {});
|
|
2768
2770
|
var CredentialStatus = /* @__PURE__ */ ((CredentialStatus2) => {
|
|
@@ -3209,6 +3211,38 @@ var DEFAULT_DISCLOSURE_CONFIGS = {
|
|
|
3209
3211
|
mandatoryFields: [],
|
|
3210
3212
|
neverDisclose: DEFAULT_NEVER_DISCLOSE
|
|
3211
3213
|
},
|
|
3214
|
+
// OEM ⑯ — account attributes an organisation asserts about the holder.
|
|
3215
|
+
//
|
|
3216
|
+
// Everything identifying is selective. An account credential is presented to
|
|
3217
|
+
// decide whether an action is permitted, and that rarely requires knowing
|
|
3218
|
+
// the account number or whose name is on it. Left always-disclosed, every
|
|
3219
|
+
// verifier the holder ever presents to would learn both — and the fallback
|
|
3220
|
+
// for an unregistered type is TEMPORARY, whose selectiveFields is empty,
|
|
3221
|
+
// which is exactly that outcome. Hence this entry.
|
|
3222
|
+
["AccountCredential" /* ACCOUNT */]: {
|
|
3223
|
+
selectiveFields: ["accountNumber", "accountHolderName", "branchCode"],
|
|
3224
|
+
mandatoryFields: [],
|
|
3225
|
+
neverDisclose: DEFAULT_NEVER_DISCLOSE
|
|
3226
|
+
},
|
|
3227
|
+
// OEM ⑯ Model C — the instance card.
|
|
3228
|
+
//
|
|
3229
|
+
// service_card_url and service_card_hash are absent from selectiveFields,
|
|
3230
|
+
// which is what makes them always-disclosed: the hash proves the fetched
|
|
3231
|
+
// card is the one the issuer signed over, and a holder able to withhold it
|
|
3232
|
+
// could present a card body nobody attested to (AP2 binds checkout_hash for
|
|
3233
|
+
// the same reason).
|
|
3234
|
+
//
|
|
3235
|
+
// 🔴 They are listed in mandatoryFields as documentation, NOT as
|
|
3236
|
+
// enforcement. APIVCManager.issueSDJWTVC passes only `selectiveFields` to
|
|
3237
|
+
// the SD-JWT builder — `mandatoryFields` and `neverDisclose` are not
|
|
3238
|
+
// consumed on that path. Moving these three into selectiveFields would
|
|
3239
|
+
// silently make the hash withholdable and nothing would fail, so the
|
|
3240
|
+
// omission below is the actual guarantee.
|
|
3241
|
+
["AgentCardCredential" /* AGENT_CARD */]: {
|
|
3242
|
+
selectiveFields: ["version"],
|
|
3243
|
+
mandatoryFields: ["service_card_url", "service_card_hash", "service_id"],
|
|
3244
|
+
neverDisclose: DEFAULT_NEVER_DISCLOSE
|
|
3245
|
+
},
|
|
3212
3246
|
["ReceiptCredential" /* RECEIPT */]: {
|
|
3213
3247
|
selectiveFields: ["action", "resource", "outcome", "amount", "description", "date", "transactionId"],
|
|
3214
3248
|
mandatoryFields: ["grantId", "auditEventId", "receiptType"],
|