@sphereon/ssi-sdk.presentation-exchange 0.11.1-next.65
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/.yalc/@veramo/kv-store/LICENSE +201 -0
- package/.yalc/@veramo/kv-store/README.md +132 -0
- package/.yalc/@veramo/kv-store/build/index.d.ts +11 -0
- package/.yalc/@veramo/kv-store/build/index.js +45 -0
- package/.yalc/@veramo/kv-store/build/key-value-store.d.ts +27 -0
- package/.yalc/@veramo/kv-store/build/key-value-store.js +143 -0
- package/.yalc/@veramo/kv-store/build/key-value-types.d.ts +51 -0
- package/.yalc/@veramo/kv-store/build/key-value-types.js +3 -0
- package/.yalc/@veramo/kv-store/build/keyv/keyv-types.d.ts +62 -0
- package/.yalc/@veramo/kv-store/build/keyv/keyv-types.js +3 -0
- package/.yalc/@veramo/kv-store/build/keyv/keyv.d.ts +53 -0
- package/.yalc/@veramo/kv-store/build/keyv/keyv.js +385 -0
- package/.yalc/@veramo/kv-store/build/store-adapters/index.d.ts +3 -0
- package/.yalc/@veramo/kv-store/build/store-adapters/index.js +30 -0
- package/.yalc/@veramo/kv-store/build/store-adapters/tiered/index.d.ts +32 -0
- package/.yalc/@veramo/kv-store/build/store-adapters/tiered/index.js +301 -0
- package/.yalc/@veramo/kv-store/build/store-adapters/tiered/types.d.ts +14 -0
- package/.yalc/@veramo/kv-store/build/store-adapters/tiered/types.js +3 -0
- package/.yalc/@veramo/kv-store/build/store-adapters/typeorm/entities/keyValueStoreEntity.d.ts +11 -0
- package/.yalc/@veramo/kv-store/build/store-adapters/typeorm/entities/keyValueStoreEntity.js +50 -0
- package/.yalc/@veramo/kv-store/build/store-adapters/typeorm/index.d.ts +41 -0
- package/.yalc/@veramo/kv-store/build/store-adapters/typeorm/index.js +186 -0
- package/.yalc/@veramo/kv-store/build/store-adapters/typeorm/migrations/1.createKVDatabase.d.ts +14 -0
- package/.yalc/@veramo/kv-store/build/store-adapters/typeorm/migrations/1.createKVDatabase.js +90 -0
- package/.yalc/@veramo/kv-store/build/store-adapters/typeorm/migrations/index.d.ts +10 -0
- package/.yalc/@veramo/kv-store/build/store-adapters/typeorm/migrations/index.js +13 -0
- package/.yalc/@veramo/kv-store/build/store-adapters/typeorm/types.d.ts +15 -0
- package/.yalc/@veramo/kv-store/build/store-adapters/typeorm/types.js +3 -0
- package/.yalc/@veramo/kv-store/build/tsdoc-metadata.json +11 -0
- package/.yalc/@veramo/kv-store/package.json +39 -0
- package/.yalc/@veramo/kv-store/src/__tests__/keyv.test.ts +204 -0
- package/.yalc/@veramo/kv-store/src/__tests__/kvstore.test.ts +93 -0
- package/.yalc/@veramo/kv-store/src/index.ts +10 -0
- package/.yalc/@veramo/kv-store/src/key-value-store.ts +109 -0
- package/.yalc/@veramo/kv-store/src/key-value-types.ts +97 -0
- package/.yalc/@veramo/kv-store/src/keyv/keyv-types.ts +71 -0
- package/.yalc/@veramo/kv-store/src/keyv/keyv.ts +282 -0
- package/.yalc/@veramo/kv-store/src/store-adapters/index.ts +2 -0
- package/.yalc/@veramo/kv-store/src/store-adapters/tiered/index.ts +158 -0
- package/.yalc/@veramo/kv-store/src/store-adapters/tiered/types.ts +16 -0
- package/.yalc/@veramo/kv-store/src/store-adapters/typeorm/entities/keyValueStoreEntity.ts +20 -0
- package/.yalc/@veramo/kv-store/src/store-adapters/typeorm/index.ts +122 -0
- package/.yalc/@veramo/kv-store/src/store-adapters/typeorm/migrations/1.createKVDatabase.ts +47 -0
- package/.yalc/@veramo/kv-store/src/store-adapters/typeorm/migrations/index.ts +10 -0
- package/.yalc/@veramo/kv-store/src/store-adapters/typeorm/types.ts +18 -0
- package/.yalc/@veramo/kv-store/yalc.sig +1 -0
- package/LICENSE +201 -0
- package/README.md +56 -0
- package/dist/agent/PresentationExchange.d.ts +25 -0
- package/dist/agent/PresentationExchange.d.ts.map +1 -0
- package/dist/agent/PresentationExchange.js +182 -0
- package/dist/agent/PresentationExchange.js.map +1 -0
- package/dist/functions.d.ts +12 -0
- package/dist/functions.d.ts.map +1 -0
- package/dist/functions.js +41 -0
- package/dist/functions.js.map +1 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +27 -0
- package/dist/index.js.map +1 -0
- package/dist/types/IPresentationExchange.d.ts +81 -0
- package/dist/types/IPresentationExchange.d.ts.map +1 -0
- package/dist/types/IPresentationExchange.js +3 -0
- package/dist/types/IPresentationExchange.js.map +1 -0
- package/package.json +67 -0
- package/plugin.schema.json +329 -0
- package/src/agent/PresentationExchange.ts +204 -0
- package/src/functions.ts +56 -0
- package/src/index.ts +8 -0
- package/src/types/IPresentationExchange.ts +114 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PresentationExchange.js","sourceRoot":"","sources":["../../src/agent/PresentationExchange.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oCAaiB;AAIjB,+CAA4E;AAC5E,uCAAqE;AACrE,mDAAoG;AAEpG,2EAAwD;AAExD,MAAa,oBAAoB;IAiB/B,YAAY,IAAc;;QAfjB,WAAM,GAAG,cAAM,CAAC,2BAA2B,CAAA;QAI3C,YAAO,GAA0B;YACxC,qBAAqB,EAAE,IAAI,CAAC,qBAAqB,CAAC,IAAI,CAAC,IAAI,CAAC;YAC5D,yBAAyB,EAAE,IAAI,CAAC,yBAAyB,CAAC,IAAI,CAAC,IAAI,CAAC;YACpE,qBAAqB,EAAE,IAAI,CAAC,qBAAqB,CAAC,IAAI,CAAC,IAAI,CAAC;YAC5D,wBAAwB,EAAE,IAAI,CAAC,wBAAwB,CAAC,IAAI,CAAC,IAAI,CAAC;YAClE,wBAAwB,EAAE,IAAI,CAAC,wBAAwB,CAAC,IAAI,CAAC,IAAI,CAAC;YAClE,oBAAoB,EAAE,IAAI,CAAC,oBAAoB,CAAC,IAAI,CAAC,IAAI,CAAC;YAC1D,8BAA8B,EAAE,IAAI,CAAC,8BAA8B,CAAC,IAAI,CAAC,IAAI,CAAC;YAC9E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AC,KAAK,CAAC,oCAAoC,CAAC,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,MAAM,CAAC,CAAC;iBAClF,GAAG,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,oBAAoB,CAAC;iBAChD,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,EAAE,CAAC,KAAK,IAAI,EAAE,CAAC,KAAK,CAAC,IAAI,KAAK,+BAAmB,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;QACzF,CAAC;KAAA;IAED;;;;OAIG;IAEK,KAAK,CAAC,EAAE,OAAO,EAAwB;QAC7C,MAAM,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,OAAO,aAAP,OAAO,cAAP,OAAO,GAAI,IAAI,CAAC,YAAY,CAAC,CAAA;QAC5D,IAAI,CAAC,KAAK,EAAE;YACV,MAAM,KAAK,CAAC,mCAAmC,OAAO,aAAP,OAAO,cAAP,OAAO,GAAI,IAAI,CAAC,YAAY,EAAE,CAAC,CAAA;SAC/E;QACD,OAAO,KAAK,CAAA;IACd,CAAC;IAEO,SAAS,CAAC,EAAE,SAAS,EAA0B;QACrD,OAAO,SAAS,aAAT,SAAS,cAAT,SAAS,GAAI,IAAI,CAAC,YAAY,CAAA;IACvC,CAAC;IAEO,MAAM,CAAC,EAAE,SAAS,EAAE,YAAY,EAAgD;QACtF,OAAO,GAAG,IAAI,CAAC,SAAS,CAAC,EAAE,SAAS,EAAE,CAAC,IAAI,YAAY,EAAE,CAAA;IAC3D,CAAC;CACF;AApLD,oDAoLC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { IPEXOptions, IPEXPresentationSignCallback, IRequiredContext } from './types/IPresentationExchange';
|
|
2
|
+
import { IPresentationDefinition } from '@sphereon/pex';
|
|
3
|
+
import { Format } from '@sphereon/pex-models';
|
|
4
|
+
export declare function getPresentationDefinition(pexOptions?: IPEXOptions): Promise<IPresentationDefinition | undefined>;
|
|
5
|
+
export declare function createPEXPresentationSignCallback({ kid, fetchRemoteContexts, format, domain, challenge, }: {
|
|
6
|
+
kid: string;
|
|
7
|
+
fetchRemoteContexts?: boolean;
|
|
8
|
+
format?: Format;
|
|
9
|
+
domain?: string;
|
|
10
|
+
challenge?: string;
|
|
11
|
+
}, context: IRequiredContext): Promise<IPEXPresentationSignCallback>;
|
|
12
|
+
//# sourceMappingURL=functions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"functions.d.ts","sourceRoot":"","sources":["../src/functions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,4BAA4B,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAA;AAC3G,OAAO,EAAE,uBAAuB,EAAE,MAAM,eAAe,CAAA;AAGvD,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAE7C,wBAAsB,yBAAyB,CAAC,UAAU,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,uBAAuB,GAAG,SAAS,CAAC,CAItH;AAED,wBAAsB,iCAAiC,CACrD,EACE,GAAG,EACH,mBAAmB,EACnB,MAAM,EACN,MAAM,EACN,SAAS,GACV,EAAE;IACD,GAAG,EAAE,MAAM,CAAA;IACX,mBAAmB,CAAC,EAAE,OAAO,CAAA;IAC7B,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,EACD,OAAO,EAAE,gBAAgB,GACxB,OAAO,CAAC,4BAA4B,CAAC,CA4BvC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.createPEXPresentationSignCallback = exports.getPresentationDefinition = void 0;
|
|
13
|
+
const ssi_types_1 = require("@sphereon/ssi-types");
|
|
14
|
+
function getPresentationDefinition(pexOptions) {
|
|
15
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
16
|
+
return pexOptions === null || pexOptions === void 0 ? void 0 : pexOptions.definition;
|
|
17
|
+
/*const store = await getPresentationDefinitionStore(pexOptions)
|
|
18
|
+
return store && pexOptions?.definitionId ? store.get(pexOptions?.definitionId) : undefined*/
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
exports.getPresentationDefinition = getPresentationDefinition;
|
|
22
|
+
function createPEXPresentationSignCallback({ kid, fetchRemoteContexts, format, domain, challenge, }, context) {
|
|
23
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
24
|
+
return ({ presentation, domain, presentationDefinition, format, challenge, }) => __awaiter(this, void 0, void 0, function* () {
|
|
25
|
+
const formatOptions = format !== null && format !== void 0 ? format : presentationDefinition.format;
|
|
26
|
+
const proofFormat = formatOptions && (!!formatOptions.ldp || !!formatOptions.ldp_vp) ? 'lds' : 'jwt';
|
|
27
|
+
const vp = yield context.agent.createVerifiablePresentation({
|
|
28
|
+
presentation,
|
|
29
|
+
keyRef: kid,
|
|
30
|
+
domain,
|
|
31
|
+
challenge,
|
|
32
|
+
fetchRemoteContexts: fetchRemoteContexts !== undefined ? fetchRemoteContexts : true,
|
|
33
|
+
proofFormat,
|
|
34
|
+
});
|
|
35
|
+
// makes sure we extract an actual JWT from the internal representation in case it is a JWT
|
|
36
|
+
return ssi_types_1.CredentialMapper.storedPresentationToOriginalFormat(vp);
|
|
37
|
+
});
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
exports.createPEXPresentationSignCallback = createPEXPresentationSignCallback;
|
|
41
|
+
//# sourceMappingURL=functions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"functions.js","sourceRoot":"","sources":["../src/functions.ts"],"names":[],"mappings":";;;;;;;;;;;;AAGA,mDAAiF;AAGjF,SAAsB,yBAAyB,CAAC,UAAwB;;QACtE,OAAO,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,UAAU,CAAA;QAC7B;oGAC4F;IAC9F,CAAC;CAAA;AAJD,8DAIC;AAED,SAAsB,iCAAiC,CACrD,EACE,GAAG,EACH,mBAAmB,EACnB,MAAM,EACN,MAAM,EACN,SAAS,GAOV,EACD,OAAyB;;QAEzB,OAAO,CAAO,EACZ,YAAY,EACZ,MAAM,EACN,sBAAsB,EACtB,MAAM,EACN,SAAS,GAOV,EAAsC,EAAE;YACvC,MAAM,aAAa,GAAG,MAAM,aAAN,MAAM,cAAN,MAAM,GAAI,sBAAsB,CAAC,MAAM,CAAA;YAC7D,MAAM,WAAW,GAAG,aAAa,IAAI,CAAC,CAAC,CAAC,aAAa,CAAC,GAAG,IAAI,CAAC,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAA;YAEpG,MAAM,EAAE,GAAG,MAAM,OAAO,CAAC,KAAK,CAAC,4BAA4B,CAAC;gBAC1D,YAAY;gBACZ,MAAM,EAAE,GAAG;gBACX,MAAM;gBACN,SAAS;gBACT,mBAAmB,EAAE,mBAAmB,KAAK,SAAS,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC,CAAC,IAAI;gBACnF,WAAW;aACZ,CAAC,CAAA;YACF,2FAA2F;YAC3F,OAAO,4BAAgB,CAAC,kCAAkC,CAAC,EAA+B,CAAC,CAAA;QAC7F,CAAC,CAAA,CAAA;IACH,CAAC;CAAA;AA3CD,8EA2CC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,QAAA,MAAM,MAAM,KAAmC,CAAA;AAC/C,OAAO,EAAE,MAAM,EAAE,CAAA;AACjB,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAA;AACnE,cAAc,+BAA+B,CAAA;AAC7C,cAAc,aAAa,CAAA"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.PresentationExchange = exports.schema = void 0;
|
|
18
|
+
/**
|
|
19
|
+
* @public
|
|
20
|
+
*/
|
|
21
|
+
const schema = require('../plugin.schema.json');
|
|
22
|
+
exports.schema = schema;
|
|
23
|
+
var PresentationExchange_1 = require("./agent/PresentationExchange");
|
|
24
|
+
Object.defineProperty(exports, "PresentationExchange", { enumerable: true, get: function () { return PresentationExchange_1.PresentationExchange; } });
|
|
25
|
+
__exportStar(require("./types/IPresentationExchange"), exports);
|
|
26
|
+
__exportStar(require("./functions"), exports);
|
|
27
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA;;GAEG;AACH,MAAM,MAAM,GAAG,OAAO,CAAC,uBAAuB,CAAC,CAAA;AACtC,wBAAM;AACf,qEAAmE;AAA1D,4HAAA,oBAAoB,OAAA;AAC7B,gEAA6C;AAC7C,8CAA2B"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { DIDDocumentSection, FindCredentialsArgs, IAgentContext, IDataStoreORM, IDIDManager, IIdentifier, IPluginMethodMap, PresentationPayload } from '@veramo/core';
|
|
2
|
+
import { W3CVerifiableCredential, W3CVerifiablePresentation } from '@sphereon/ssi-types';
|
|
3
|
+
import { IKeyValueStore, IValueData } from '@veramo/kv-store';
|
|
4
|
+
import { IPresentationDefinition, PEVersion, SelectResults } from '@sphereon/pex';
|
|
5
|
+
import { Format, InputDescriptorV1, InputDescriptorV2 } from '@sphereon/pex-models';
|
|
6
|
+
export interface IPresentationExchange extends IPluginMethodMap {
|
|
7
|
+
pexStoreGetDefinition(args: IDefinitionGetArgs): Promise<IPresentationDefinition | undefined>;
|
|
8
|
+
pexStoreHasDefinition(args: IDefinitionExistsArgs): Promise<boolean>;
|
|
9
|
+
pexStorePersistDefinition(args: IDefinitionPersistArgs): Promise<IValueData<IPresentationDefinition>>;
|
|
10
|
+
pexStoreRemoveDefinition(args: IDefinitionRemoveArgs): Promise<boolean>;
|
|
11
|
+
pexStoreClearDefinitions(args: IDefinitionsClearArgs): Promise<boolean>;
|
|
12
|
+
pexDefinitionVersion(presentationDefinition: IPresentationDefinition): Promise<VersionDiscoveryResult>;
|
|
13
|
+
pexDefinitionFilterCredentials(args: IDefinitionCredentialFilterArgs, context: IRequiredContext): Promise<IPEXFilterResult>;
|
|
14
|
+
pexDefinitionFilterCredentialsPerInputDescriptor(args: IDefinitionCredentialFilterArgs, context: IRequiredContext): Promise<IPEXFilterResultWithInputDescriptor[]>;
|
|
15
|
+
}
|
|
16
|
+
export interface IDefinitionGetArgs {
|
|
17
|
+
definitionId: string;
|
|
18
|
+
storeId?: string;
|
|
19
|
+
namespace?: string;
|
|
20
|
+
}
|
|
21
|
+
export type IDefinitionExistsArgs = IDefinitionGetArgs;
|
|
22
|
+
export type IDefinitionClearArgs = IDefinitionGetArgs;
|
|
23
|
+
export type IDefinitionRemoveArgs = IDefinitionGetArgs;
|
|
24
|
+
export type IDefinitionImportArgs = IDefinitionPersistArgs;
|
|
25
|
+
export interface IDefinitionPersistArgs {
|
|
26
|
+
definition: IPresentationDefinition;
|
|
27
|
+
definitionId?: string;
|
|
28
|
+
overwriteExisting?: boolean;
|
|
29
|
+
validation?: boolean;
|
|
30
|
+
ttl?: number;
|
|
31
|
+
storeId?: string;
|
|
32
|
+
namespace?: string;
|
|
33
|
+
}
|
|
34
|
+
export interface IDefinitionsClearArgs {
|
|
35
|
+
storeId?: string;
|
|
36
|
+
}
|
|
37
|
+
export interface IDefinitionCredentialFilterArgs {
|
|
38
|
+
presentationDefinition: IPresentationDefinition;
|
|
39
|
+
credentialFilterOpts?: {
|
|
40
|
+
verifiableCredentials?: W3CVerifiableCredential[];
|
|
41
|
+
filter?: FindCredentialsArgs;
|
|
42
|
+
};
|
|
43
|
+
holderDIDs?: (string | IIdentifier)[];
|
|
44
|
+
limitDisclosureSignatureSuites?: string[];
|
|
45
|
+
restrictToFormats?: Format;
|
|
46
|
+
restrictToDIDMethods?: string[];
|
|
47
|
+
}
|
|
48
|
+
export interface PEXOpts {
|
|
49
|
+
defaultStore?: string;
|
|
50
|
+
defaultNamespace?: string;
|
|
51
|
+
stores?: Map<string, IKeyValueStore<IPresentationDefinition>> | IKeyValueStore<IPresentationDefinition>;
|
|
52
|
+
importDefinitions?: IDefinitionImportArgs[];
|
|
53
|
+
}
|
|
54
|
+
export interface IPEXOptions {
|
|
55
|
+
definition?: IPresentationDefinition;
|
|
56
|
+
definitionId: string;
|
|
57
|
+
}
|
|
58
|
+
export interface IPEXFilterResultWithInputDescriptor extends IPEXFilterResult {
|
|
59
|
+
inputDescriptor: InputDescriptorV1 | InputDescriptorV2;
|
|
60
|
+
}
|
|
61
|
+
export interface IPEXFilterResult {
|
|
62
|
+
id: string;
|
|
63
|
+
selectResults: SelectResults;
|
|
64
|
+
filteredCredentials: W3CVerifiableCredential[];
|
|
65
|
+
}
|
|
66
|
+
export interface IIdentifierOpts {
|
|
67
|
+
identifier: IIdentifier | string;
|
|
68
|
+
verificationMethodSection?: DIDDocumentSection;
|
|
69
|
+
kid?: string;
|
|
70
|
+
}
|
|
71
|
+
export interface VersionDiscoveryResult {
|
|
72
|
+
version?: PEVersion;
|
|
73
|
+
error?: string;
|
|
74
|
+
}
|
|
75
|
+
export type IPEXPresentationSignCallback = (args: IPEXPresentationSignCallBackParams) => Promise<W3CVerifiablePresentation>;
|
|
76
|
+
export interface IPEXPresentationSignCallBackParams {
|
|
77
|
+
presentation: PresentationPayload;
|
|
78
|
+
presentationDefinition: IPresentationDefinition;
|
|
79
|
+
}
|
|
80
|
+
export type IRequiredContext = IAgentContext<IDataStoreORM & IDIDManager>;
|
|
81
|
+
//# sourceMappingURL=IPresentationExchange.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IPresentationExchange.d.ts","sourceRoot":"","sources":["../../src/types/IPresentationExchange.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAClB,mBAAmB,EACnB,aAAa,EACb,aAAa,EACb,WAAW,EACX,WAAW,EACX,gBAAgB,EAChB,mBAAmB,EACpB,MAAM,cAAc,CAAA;AACrB,OAAO,EAAE,u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M,CAAA;CACrB;AAED,MAAM,WAAW,mCAAoC,SAAQ,gBAAgB;IAC3E,eAAe,EAAE,iBAAiB,GAAG,iBAAiB,CAAA;CACvD;AAED,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAE,MAAM,CAAA;IACV,aAAa,EAAE,aAAa,CAAA;IAC5B,mBAAmB,EAAE,uBAAuB,EAAE,CAAA;CAC/C;AAED,MAAM,WAAW,eAAe;IAC9B,UAAU,EAAE,WAAW,GAAG,MAAM,CAAA;IAChC,yBAAyB,CAAC,EAAE,kBAAkB,CAAA;IAC9C,GAAG,CAAC,EAAE,MAAM,CAAA;CACb;AAED,MAAM,WAAW,sBAAsB;IACrC,OAAO,CAAC,EAAE,SAAS,CAAA;IACnB,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AAED,MAAM,MAAM,4BAA4B,GAAG,CAAC,IAAI,EAAE,kCAAkC,KAAK,OAAO,CAAC,yBAAyB,CAAC,CAAA;AAE3H,MAAM,WAAW,kCAAkC;IACjD,YAAY,EAAE,mBAAmB,CAAA;IACjC,sBAAsB,EAAE,uBAAuB,CAAA;CAChD;AAED,MAAM,MAAM,gBAAgB,GAAG,aAAa,CAAC,aAAa,GAAG,WAAW,CAAC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IPresentationExchange.js","sourceRoot":"","sources":["../../src/types/IPresentationExchange.ts"],"names":[],"mappings":""}
|
package/package.json
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@sphereon/ssi-sdk.presentation-exchange",
|
|
3
|
+
"version": "0.11.1-next.65+0d0575e",
|
|
4
|
+
"source": "src/index.ts",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"types": "dist/index.d.ts",
|
|
7
|
+
"veramo": {
|
|
8
|
+
"pluginInterfaces": {
|
|
9
|
+
"IPresentationExchange": "./src/types/IPresentationExchange.ts"
|
|
10
|
+
}
|
|
11
|
+
},
|
|
12
|
+
"scripts": {
|
|
13
|
+
"build": "tsc --build",
|
|
14
|
+
"build:clean": "tsc --build --clean && tsc --build"
|
|
15
|
+
},
|
|
16
|
+
"dependencies": {
|
|
17
|
+
"@sphereon/pex": "2.0.1",
|
|
18
|
+
"@sphereon/pex-models": "^2.0.2",
|
|
19
|
+
"@sphereon/ssi-sdk-ext.did-utils": "^0.12.0",
|
|
20
|
+
"@sphereon/ssi-types": "0.11.1-next.65+0d0575e",
|
|
21
|
+
"@veramo/core": "4.2.0",
|
|
22
|
+
"@veramo/kv-store": "file:.yalc/@veramo/kv-store"
|
|
23
|
+
},
|
|
24
|
+
"devDependencies": {
|
|
25
|
+
"@sphereon/did-uni-client": "^0.6.0",
|
|
26
|
+
"@sphereon/ssi-sdk.agent-config": "0.11.1-next.65+0d0575e",
|
|
27
|
+
"@types/json-buffer": "^3.0.0",
|
|
28
|
+
"@veramo/did-provider-key": "4.2.0",
|
|
29
|
+
"@veramo/did-resolver": "4.2.0",
|
|
30
|
+
"@veramo/remote-client": "4.2.0",
|
|
31
|
+
"@veramo/remote-server": "4.2.0",
|
|
32
|
+
"@veramo/utils": "4.2.0",
|
|
33
|
+
"did-resolver": "^4.1.0",
|
|
34
|
+
"nock": "^13.2.1"
|
|
35
|
+
},
|
|
36
|
+
"resolutions": {
|
|
37
|
+
"@veramo/utils": "4.2.0"
|
|
38
|
+
},
|
|
39
|
+
"files": [
|
|
40
|
+
".yalc/**/*",
|
|
41
|
+
"dist/**/*",
|
|
42
|
+
"src/**/*",
|
|
43
|
+
"README.md",
|
|
44
|
+
"plugin.schema.json",
|
|
45
|
+
"LICENSE"
|
|
46
|
+
],
|
|
47
|
+
"private": false,
|
|
48
|
+
"publishConfig": {
|
|
49
|
+
"access": "public"
|
|
50
|
+
},
|
|
51
|
+
"repository": "git@github.com:Sphereon-Opensource/SSI-SDK.git",
|
|
52
|
+
"author": "Sphereon <dev@sphereon.com>",
|
|
53
|
+
"license": "Apache-2.0",
|
|
54
|
+
"keywords": [
|
|
55
|
+
"Sphereon",
|
|
56
|
+
"SSI",
|
|
57
|
+
"Veramo",
|
|
58
|
+
"DID",
|
|
59
|
+
"SIOP",
|
|
60
|
+
"SIOPv2",
|
|
61
|
+
"OIDC4VP",
|
|
62
|
+
"Presentation Exchange",
|
|
63
|
+
"OpenID Connect",
|
|
64
|
+
"Authenticator"
|
|
65
|
+
],
|
|
66
|
+
"gitHead": "0d0575e7320859beb4857ebe0f995aff9d259ca1"
|
|
67
|
+
}
|
|
@@ -0,0 +1,329 @@
|
|
|
1
|
+
{
|
|
2
|
+
"IDidAuthSiopOpAuthenticator": {
|
|
3
|
+
"components": {
|
|
4
|
+
"schemas": {
|
|
5
|
+
"IGetSiopSessionArgs": {
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"sessionId": {
|
|
9
|
+
"type": "string"
|
|
10
|
+
},
|
|
11
|
+
"additionalProperties": false
|
|
12
|
+
},
|
|
13
|
+
"required": ["sessionId"],
|
|
14
|
+
"description": "Arguments needed for {@link DidAuthSiopOpAuthenticator.getSessionForSiop } "
|
|
15
|
+
},
|
|
16
|
+
"IRegisterSiopSessionArgs": {
|
|
17
|
+
"type": "object",
|
|
18
|
+
"properties": {
|
|
19
|
+
"identifier": {
|
|
20
|
+
"type": "object",
|
|
21
|
+
"properties": {
|
|
22
|
+
"did": {
|
|
23
|
+
"type": "string"
|
|
24
|
+
},
|
|
25
|
+
"alias": {
|
|
26
|
+
"type": "string"
|
|
27
|
+
},
|
|
28
|
+
"provider": {
|
|
29
|
+
"type": "string"
|
|
30
|
+
},
|
|
31
|
+
"controllerKeyId": {
|
|
32
|
+
"type": "string"
|
|
33
|
+
},
|
|
34
|
+
"keys": {
|
|
35
|
+
"type": "array",
|
|
36
|
+
"items": {
|
|
37
|
+
"type": "object",
|
|
38
|
+
"properties": {
|
|
39
|
+
"additionalProperties": true
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
"services": {
|
|
44
|
+
"type": "array",
|
|
45
|
+
"items": {
|
|
46
|
+
"type": "object",
|
|
47
|
+
"properties": {
|
|
48
|
+
"additionalProperties": true
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
"additionalProperties": false,
|
|
54
|
+
"required": ["did", "provider", "keys", "services"]
|
|
55
|
+
},
|
|
56
|
+
"sessionId": {
|
|
57
|
+
"type": "string"
|
|
58
|
+
},
|
|
59
|
+
"expiresIn": {
|
|
60
|
+
"type": "number"
|
|
61
|
+
},
|
|
62
|
+
"additionalProperties": false
|
|
63
|
+
},
|
|
64
|
+
"required": ["identifier"],
|
|
65
|
+
"description": "Arguments needed for {@link DidAuthSiopOpAuthenticator.registerSessionForSiop } "
|
|
66
|
+
},
|
|
67
|
+
"IRemoveSiopSessionArgs": {
|
|
68
|
+
"type": "object",
|
|
69
|
+
"properties": {
|
|
70
|
+
"sessionId": {
|
|
71
|
+
"type": "string"
|
|
72
|
+
},
|
|
73
|
+
"additionalProperties": false
|
|
74
|
+
},
|
|
75
|
+
"required": ["sessionId"],
|
|
76
|
+
"description": "Arguments needed for {@link DidAuthSiopOpAuthenticator.removeSessionForSiop } "
|
|
77
|
+
},
|
|
78
|
+
"IAuthenticateWithSiopArgs": {
|
|
79
|
+
"type": "object",
|
|
80
|
+
"properties": {
|
|
81
|
+
"sessionId": {
|
|
82
|
+
"type": "string"
|
|
83
|
+
},
|
|
84
|
+
"stateId": {
|
|
85
|
+
"type": "string"
|
|
86
|
+
},
|
|
87
|
+
"redirectUrl": {
|
|
88
|
+
"type": "string"
|
|
89
|
+
},
|
|
90
|
+
"additionalProperties": false
|
|
91
|
+
},
|
|
92
|
+
"required": ["sessionId", "stateId", "redirectUrl"],
|
|
93
|
+
"description": "Arguments needed for {@link DidAuthSiopOpAuthenticator.authenticateWithSiop } "
|
|
94
|
+
},
|
|
95
|
+
"IResponse": {
|
|
96
|
+
"type": "object",
|
|
97
|
+
"properties": {
|
|
98
|
+
"status": {
|
|
99
|
+
"type": "number"
|
|
100
|
+
},
|
|
101
|
+
"additionalProperties": true
|
|
102
|
+
},
|
|
103
|
+
"required": ["status"],
|
|
104
|
+
"description": "Result of {@link DidAuthSiopOpAuthenticator.authenticateWithSiop & DidAuthSiopOpAuthenticator.sendSiopAuthenticationResponse } "
|
|
105
|
+
},
|
|
106
|
+
"IGetSiopAuthenticationRequestFromRpArgs": {
|
|
107
|
+
"type": "object",
|
|
108
|
+
"properties": {
|
|
109
|
+
"sessionId": {
|
|
110
|
+
"type": "string"
|
|
111
|
+
},
|
|
112
|
+
"stateId": {
|
|
113
|
+
"type": "string"
|
|
114
|
+
},
|
|
115
|
+
"redirectUrl": {
|
|
116
|
+
"type": "string"
|
|
117
|
+
},
|
|
118
|
+
"additionalProperties": false
|
|
119
|
+
},
|
|
120
|
+
"required": ["sessionId", "stateId", "redirectUrl"],
|
|
121
|
+
"description": "Arguments needed for {@link DidAuthSiopOpAuthenticator.getSiopAuthenticationRequestFromRP } "
|
|
122
|
+
},
|
|
123
|
+
"ParsedAuthenticationRequestURI": {
|
|
124
|
+
"type": "object",
|
|
125
|
+
"properties": {
|
|
126
|
+
"jwt": {
|
|
127
|
+
"type": "string"
|
|
128
|
+
},
|
|
129
|
+
"requestPayload": {
|
|
130
|
+
"type": "object",
|
|
131
|
+
"properties": {
|
|
132
|
+
"additionalProperties": true
|
|
133
|
+
}
|
|
134
|
+
},
|
|
135
|
+
"registration": {
|
|
136
|
+
"type": "object",
|
|
137
|
+
"properties": {
|
|
138
|
+
"additionalProperties": true
|
|
139
|
+
}
|
|
140
|
+
},
|
|
141
|
+
"additionalProperties": false
|
|
142
|
+
},
|
|
143
|
+
"required": ["jwt", "requestPayload", "registration"],
|
|
144
|
+
"description": "Result of {@link DidAuthSiopOpAuthenticator.getSiopAuthenticationRequestFromRP } "
|
|
145
|
+
},
|
|
146
|
+
"IGetSiopAuthenticationRequestDetailsArgs": {
|
|
147
|
+
"type": "object",
|
|
148
|
+
"properties": {
|
|
149
|
+
"sessionId": {
|
|
150
|
+
"type": "string"
|
|
151
|
+
},
|
|
152
|
+
"verifiedAuthenticationRequest": {
|
|
153
|
+
"type": "object",
|
|
154
|
+
"properties": {
|
|
155
|
+
"additionalProperties": true
|
|
156
|
+
}
|
|
157
|
+
},
|
|
158
|
+
"credentialFilter": {
|
|
159
|
+
"type": "object",
|
|
160
|
+
"properties": {
|
|
161
|
+
"additionalProperties": true
|
|
162
|
+
}
|
|
163
|
+
},
|
|
164
|
+
"additionalProperties": false
|
|
165
|
+
},
|
|
166
|
+
"required": ["sessionId", "verifiedAuthenticationRequest"],
|
|
167
|
+
"description": "Arguments needed for {@link DidAuthSiopOpAuthenticator.getSiopAuthenticationRequestDetails } "
|
|
168
|
+
},
|
|
169
|
+
"IAuthRequestDetails": {
|
|
170
|
+
"type": "object",
|
|
171
|
+
"properties": {
|
|
172
|
+
"id": {
|
|
173
|
+
"type": "string"
|
|
174
|
+
},
|
|
175
|
+
"alsoKnownAs": {
|
|
176
|
+
"type": "array",
|
|
177
|
+
"items": {
|
|
178
|
+
"type": "string"
|
|
179
|
+
}
|
|
180
|
+
},
|
|
181
|
+
"vpResponseOpts": {
|
|
182
|
+
"type": "object",
|
|
183
|
+
"properties": {
|
|
184
|
+
"additionalProperties": true
|
|
185
|
+
}
|
|
186
|
+
},
|
|
187
|
+
"additionalProperties": false
|
|
188
|
+
},
|
|
189
|
+
"required": ["id", "vpResponseOpts"],
|
|
190
|
+
"description": "Result of {@link DidAuthSiopOpAuthenticator.getSiopAuthenticationRequestDetails } "
|
|
191
|
+
},
|
|
192
|
+
"IVerifySiopAuthenticationRequestUriArgs": {
|
|
193
|
+
"type": "object",
|
|
194
|
+
"properties": {
|
|
195
|
+
"sessionId": {
|
|
196
|
+
"type": "string"
|
|
197
|
+
},
|
|
198
|
+
"ParsedAuthenticationRequestURI": {
|
|
199
|
+
"type": "object",
|
|
200
|
+
"properties": {
|
|
201
|
+
"additionalProperties": true
|
|
202
|
+
}
|
|
203
|
+
},
|
|
204
|
+
"additionalProperties": false
|
|
205
|
+
},
|
|
206
|
+
"required": ["sessionId", "ParsedAuthenticationRequestURI"],
|
|
207
|
+
"description": "Arguments needed for {@link DidAuthSiopOpAuthenticator.verifySiopAuthenticationRequestURI } "
|
|
208
|
+
},
|
|
209
|
+
"VerifiedAuthorizationRequest": {
|
|
210
|
+
"type": "object",
|
|
211
|
+
"properties": {
|
|
212
|
+
"payload": {
|
|
213
|
+
"type": "object",
|
|
214
|
+
"properties": {
|
|
215
|
+
"additionalProperties": true
|
|
216
|
+
}
|
|
217
|
+
},
|
|
218
|
+
"presentationDefinitions": {
|
|
219
|
+
"type": "object",
|
|
220
|
+
"properties": {
|
|
221
|
+
"additionalProperties": true
|
|
222
|
+
}
|
|
223
|
+
},
|
|
224
|
+
"verifyOpts": {
|
|
225
|
+
"type": "object",
|
|
226
|
+
"properties": {
|
|
227
|
+
"additionalProperties": true
|
|
228
|
+
}
|
|
229
|
+
},
|
|
230
|
+
"additionalProperties": false
|
|
231
|
+
},
|
|
232
|
+
"required": ["payload", "verifyOpts"],
|
|
233
|
+
"description": "Result of {@link DidAuthSiopOpAuthenticator.verifySiopAuthenticationRequestURI } "
|
|
234
|
+
},
|
|
235
|
+
"ISendSiopAuthenticationResponseArgs": {
|
|
236
|
+
"type": "object",
|
|
237
|
+
"properties": {
|
|
238
|
+
"sessionId": {
|
|
239
|
+
"type": "string"
|
|
240
|
+
},
|
|
241
|
+
"verifiedAuthenticationRequest": {
|
|
242
|
+
"type": "object",
|
|
243
|
+
"properties": {
|
|
244
|
+
"additionalProperties": true
|
|
245
|
+
}
|
|
246
|
+
},
|
|
247
|
+
"verifiablePresentationResponse": {
|
|
248
|
+
"type": "object",
|
|
249
|
+
"properties": {
|
|
250
|
+
"additionalProperties": true
|
|
251
|
+
}
|
|
252
|
+
},
|
|
253
|
+
"additionalProperties": false
|
|
254
|
+
},
|
|
255
|
+
"required": ["sessionId", "verifiedAuthenticationRequest"],
|
|
256
|
+
"description": "Arguments needed for {@link DidAuthSiopOpAuthenticator.sendSiopAuthenticationResponse } "
|
|
257
|
+
}
|
|
258
|
+
},
|
|
259
|
+
"methods": {
|
|
260
|
+
"getSessionForSiop": {
|
|
261
|
+
"description": "Get SIOP session",
|
|
262
|
+
"arguments": {
|
|
263
|
+
"$ref": "#/components/schemas/IGetSiopSessionArgs"
|
|
264
|
+
},
|
|
265
|
+
"returnType": "object"
|
|
266
|
+
},
|
|
267
|
+
"registerSessionForSiop": {
|
|
268
|
+
"description": "Register SIOP session",
|
|
269
|
+
"arguments": {
|
|
270
|
+
"$ref": "#/components/schemas/IRegisterSiopSessionArgs"
|
|
271
|
+
},
|
|
272
|
+
"returnType": "object"
|
|
273
|
+
},
|
|
274
|
+
"removeSessionForSiop": {
|
|
275
|
+
"description": "Remove SIOP session",
|
|
276
|
+
"arguments": {
|
|
277
|
+
"$ref": "#/components/schemas/IRemoveSiopSessionArgs"
|
|
278
|
+
},
|
|
279
|
+
"returnType": "boolean"
|
|
280
|
+
},
|
|
281
|
+
"authenticateWithSiop": {
|
|
282
|
+
"description": "Authenticate using DID Auth SIOP",
|
|
283
|
+
"arguments": {
|
|
284
|
+
"$ref": "#/components/schemas/IAuthenticateWithSiopArgs"
|
|
285
|
+
},
|
|
286
|
+
"returnType": {
|
|
287
|
+
"$ref": "#/components/schemas/Response"
|
|
288
|
+
}
|
|
289
|
+
},
|
|
290
|
+
"getSiopAuthenticationRequestFromRP": {
|
|
291
|
+
"description": "Get authentication request from RP",
|
|
292
|
+
"arguments": {
|
|
293
|
+
"$ref": "#/components/schemas/IGetSiopAuthenticationRequestFromRpArgs"
|
|
294
|
+
},
|
|
295
|
+
"returnType": {
|
|
296
|
+
"$ref": "#/components/schemas/ParsedAuthenticationRequestURI"
|
|
297
|
+
}
|
|
298
|
+
},
|
|
299
|
+
"getSiopAuthenticationRequestDetails": {
|
|
300
|
+
"description": "Get authentication request details",
|
|
301
|
+
"arguments": {
|
|
302
|
+
"$ref": "#/components/schemas/IGetSiopAuthenticationRequestDetailsArgs"
|
|
303
|
+
},
|
|
304
|
+
"returnType": {
|
|
305
|
+
"$ref": "#/components/schemas/IAuthRequestDetails"
|
|
306
|
+
}
|
|
307
|
+
},
|
|
308
|
+
"verifySiopAuthenticationRequestURI": {
|
|
309
|
+
"description": "Verify authentication request URI",
|
|
310
|
+
"arguments": {
|
|
311
|
+
"$ref": "#/components/schemas/IVerifySiopAuthenticationRequestUriArgs"
|
|
312
|
+
},
|
|
313
|
+
"returnType": {
|
|
314
|
+
"$ref": "#/components/schemas/VerifiedAuthorizationRequest"
|
|
315
|
+
}
|
|
316
|
+
},
|
|
317
|
+
"sendSiopAuthenticationResponse": {
|
|
318
|
+
"description": "Send authentication response",
|
|
319
|
+
"arguments": {
|
|
320
|
+
"$ref": "#/components/schemas/ISendSiopAuthenticationResponseArgs"
|
|
321
|
+
},
|
|
322
|
+
"returnType": {
|
|
323
|
+
"$ref": "#/components/schemas/IRequiredContext"
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
}
|