@sphereon/ssi-sdk-ext.did-provider-web 0.28.1-feature.jose.vcdm.52 → 0.28.1-feature.oyd.cmsm.improv.20

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.ts CHANGED
@@ -1,65 +1,9 @@
1
- import { X509Opts } from '@sphereon/ssi-sdk-ext.key-utils';
2
- import { MinimalImportableKey, TKeyType, IService, IAgentContext, IKeyManager, IDIDManager, IIdentifier, IKey } from '@veramo/core';
3
- import { AbstractIdentifierProvider } from '@veramo/did-manager';
4
-
5
- interface IKeyOpts {
6
- key?: Partial<MinimalImportableKey>;
7
- x509?: X509Opts;
8
- type?: TKeyType | 'RSA';
9
- isController?: boolean;
10
- }
11
- interface IImportProvidedOrGeneratedKeyArgs {
12
- kms?: string;
13
- options?: IKeyOpts;
14
- }
15
- interface ICreateIdentifierArgs {
16
- kms?: string;
17
- alias: string;
18
- options?: {
19
- keys?: IKeyOpts | IKeyOpts[];
20
- services?: IService[];
21
- };
22
- }
23
- type IRequiredContext = IAgentContext<IKeyManager & IDIDManager>;
24
-
25
- type IContext = IAgentContext<IKeyManager>;
26
1
  /**
27
- * {@link @veramo/did-manager#DIDManager} identifier provider for `did:web` identifiers
28
- * @public
2
+ * Provides `did:web` {@link @veramo/did-provider-web#WebDIDProvider | identifier provider } for the
3
+ * {@link @veramo/did-manager#DIDManager}
4
+ *
5
+ * @packageDocumentation
29
6
  */
30
- declare class WebDIDProvider extends AbstractIdentifierProvider {
31
- private readonly defaultKms;
32
- constructor(options: {
33
- defaultKms: string;
34
- });
35
- createIdentifier(args: ICreateIdentifierArgs, context: IContext): Promise<Omit<IIdentifier, 'provider'>>;
36
- updateIdentifier(args: {
37
- did: string;
38
- kms?: string | undefined;
39
- alias?: string | undefined;
40
- options?: any;
41
- }, context: IAgentContext<IKeyManager>): Promise<IIdentifier>;
42
- deleteIdentifier(identifier: IIdentifier, context: IContext): Promise<boolean>;
43
- addKey({ identifier, key, options, }: {
44
- identifier: IIdentifier;
45
- key: IKey;
46
- options?: any;
47
- }, context: IContext): Promise<any>;
48
- addService({ identifier, service, options, }: {
49
- identifier: IIdentifier;
50
- service: IService;
51
- options?: any;
52
- }, context: IContext): Promise<any>;
53
- removeKey(args: {
54
- identifier: IIdentifier;
55
- kid: string;
56
- options?: any;
57
- }, context: IContext): Promise<any>;
58
- removeService(args: {
59
- identifier: IIdentifier;
60
- id: string;
61
- options?: any;
62
- }, context: IContext): Promise<any>;
63
- }
64
-
65
- export { type ICreateIdentifierArgs, type IImportProvidedOrGeneratedKeyArgs, type IKeyOpts, type IRequiredContext, WebDIDProvider };
7
+ export * from './types';
8
+ export { WebDIDProvider } from './web-did-provider';
9
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,cAAc,SAAS,CAAA;AACvB,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAA"}
package/dist/index.js CHANGED
@@ -1,83 +1,27 @@
1
- var __defProp = Object.defineProperty;
2
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
3
-
4
- // src/web-did-provider.ts
5
- import { asDidWeb } from "@sphereon/ssi-sdk-ext.did-utils";
6
- import { importProvidedOrGeneratedKey } from "@sphereon/ssi-sdk-ext.key-utils";
7
- import { AbstractIdentifierProvider } from "@veramo/did-manager";
8
- import Debug from "debug";
9
- var debug = Debug("sphereon:web-did:identifier-provider");
10
- var WebDIDProvider = class extends AbstractIdentifierProvider {
11
- static {
12
- __name(this, "WebDIDProvider");
13
- }
14
- defaultKms;
15
- constructor(options) {
16
- super();
17
- this.defaultKms = options.defaultKms;
18
- }
19
- async createIdentifier(args, context) {
20
- const { kms, alias } = args;
21
- const opts = args.options ?? {};
22
- if (!opts.keys || Array.isArray(opts.keys) && opts.keys.length === 0) {
23
- opts.keys = [
24
- {
25
- type: "Secp256r1",
26
- isController: true
27
- }
28
- ];
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]; } };
29
7
  }
30
- const keyOpts = Array.isArray(opts.keys) ? opts.keys : [
31
- opts.keys
32
- ];
33
- const keys = await Promise.all(keyOpts.map((keyOpt) => importProvidedOrGeneratedKey({
34
- kms: kms ?? this.defaultKms,
35
- options: keyOpt
36
- }, context)));
37
- const controllerIdx = keyOpts.findIndex((opt) => opt.isController);
38
- const controllerKeyId = controllerIdx < 0 ? keys[0].kid : keys[controllerIdx].kid;
39
- const identifier = {
40
- did: await asDidWeb(alias),
41
- controllerKeyId,
42
- keys,
43
- services: opts.services ?? []
44
- };
45
- debug("Created", identifier);
46
- return identifier;
47
- }
48
- async updateIdentifier(args, context) {
49
- throw new Error("WebDIDProvider updateIdentifier not supported yet.");
50
- }
51
- async deleteIdentifier(identifier, context) {
52
- for (const { kid } of identifier.keys) {
53
- await context.agent.keyManagerDelete({
54
- kid
55
- });
56
- }
57
- return true;
58
- }
59
- async addKey({ identifier, key, options }, context) {
60
- return {
61
- success: true
62
- };
63
- }
64
- async addService({ identifier, service, options }, context) {
65
- return {
66
- success: true
67
- };
68
- }
69
- async removeKey(args, context) {
70
- return {
71
- success: true
72
- };
73
- }
74
- async removeService(args, context) {
75
- return {
76
- success: true
77
- };
78
- }
79
- };
80
- export {
81
- WebDIDProvider
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);
82
15
  };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ exports.WebDIDProvider = void 0;
18
+ /**
19
+ * Provides `did:web` {@link @veramo/did-provider-web#WebDIDProvider | identifier provider } for the
20
+ * {@link @veramo/did-manager#DIDManager}
21
+ *
22
+ * @packageDocumentation
23
+ */
24
+ __exportStar(require("./types"), exports);
25
+ var web_did_provider_1 = require("./web-did-provider");
26
+ Object.defineProperty(exports, "WebDIDProvider", { enumerable: true, get: function () { return web_did_provider_1.WebDIDProvider; } });
83
27
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/web-did-provider.ts"],"sourcesContent":["import { asDidWeb } from '@sphereon/ssi-sdk-ext.did-utils'\nimport { importProvidedOrGeneratedKey } from '@sphereon/ssi-sdk-ext.key-utils'\nimport { IAgentContext, IIdentifier, IKey, IKeyManager, IService } from '@veramo/core'\nimport { AbstractIdentifierProvider } from '@veramo/did-manager'\n\nimport Debug from 'debug'\nimport { ICreateIdentifierArgs, IKeyOpts } from './types'\n\nconst debug = Debug('sphereon:web-did:identifier-provider')\n\ntype IContext = IAgentContext<IKeyManager>\n\n/**\n * {@link @veramo/did-manager#DIDManager} identifier provider for `did:web` identifiers\n * @public\n */\nexport class WebDIDProvider extends AbstractIdentifierProvider {\n private readonly defaultKms: string\n\n constructor(options: { defaultKms: string }) {\n super()\n this.defaultKms = options.defaultKms\n }\n\n async createIdentifier(args: ICreateIdentifierArgs, context: IContext): Promise<Omit<IIdentifier, 'provider'>> {\n const { kms, alias } = args\n const opts = args.options ?? {}\n if (!opts.keys || (Array.isArray(opts.keys) && opts.keys.length === 0)) {\n // Let's generate a key as no import keys or types are provided\n opts.keys = [{ type: 'Secp256r1', isController: true }]\n }\n const keyOpts = Array.isArray(opts.keys) ? opts.keys : [opts.keys as IKeyOpts]\n const keys = await Promise.all(\n keyOpts.map((keyOpt: IKeyOpts) => importProvidedOrGeneratedKey({ kms: kms ?? this.defaultKms, options: keyOpt }, context))\n )\n\n const controllerIdx = keyOpts.findIndex((opt) => opt.isController)\n const controllerKeyId = controllerIdx < 0 ? keys[0].kid : keys[controllerIdx].kid\n const identifier: Omit<IIdentifier, 'provider'> = {\n did: await asDidWeb(alias),\n controllerKeyId,\n keys,\n services: opts.services ?? [],\n }\n debug('Created', identifier)\n return identifier\n }\n\n async updateIdentifier(\n args: {\n did: string\n kms?: string | undefined\n alias?: string | undefined\n options?: any\n },\n context: IAgentContext<IKeyManager>\n ): Promise<IIdentifier> {\n throw new Error('WebDIDProvider updateIdentifier not supported yet.')\n }\n\n async deleteIdentifier(identifier: IIdentifier, context: IContext): Promise<boolean> {\n for (const { kid } of identifier.keys) {\n await context.agent.keyManagerDelete({ kid })\n }\n return true\n }\n\n async addKey(\n {\n identifier,\n key,\n options,\n }: {\n identifier: IIdentifier\n key: IKey\n options?: any\n },\n context: IContext\n ): Promise<any> {\n return { success: true }\n }\n\n async addService(\n {\n identifier,\n service,\n options,\n }: {\n identifier: IIdentifier\n service: IService\n options?: any\n },\n context: IContext\n ): Promise<any> {\n return { success: true }\n }\n\n async removeKey(args: { identifier: IIdentifier; kid: string; options?: any }, context: IContext): Promise<any> {\n return { success: true }\n }\n\n async removeService(args: { identifier: IIdentifier; id: string; options?: any }, context: IContext): Promise<any> {\n return { success: true }\n }\n}\n"],"mappings":";;;;AAAA,SAASA,gBAAgB;AACzB,SAASC,oCAAoC;AAE7C,SAASC,kCAAkC;AAE3C,OAAOC,WAAW;AAGlB,IAAMC,QAAQC,MAAM,sCAAA;AAQb,IAAMC,iBAAN,cAA6BC,2BAAAA;EAhBpC,OAgBoCA;;;EACjBC;EAEjBC,YAAYC,SAAiC;AAC3C,UAAK;AACL,SAAKF,aAAaE,QAAQF;EAC5B;EAEA,MAAMG,iBAAiBC,MAA6BC,SAA2D;AAC7G,UAAM,EAAEC,KAAKC,MAAK,IAAKH;AACvB,UAAMI,OAAOJ,KAAKF,WAAW,CAAC;AAC9B,QAAI,CAACM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C,SAAiC;AACjH,WAAO;MAAEgC,SAAS;IAAK;EACzB;AACF;","names":["asDidWeb","importProvidedOrGeneratedKey","AbstractIdentifierProvider","Debug","debug","Debug","WebDIDProvider","AbstractIdentifierProvider","defaultKms","constructor","options","createIdentifier","args","context","kms","alias","opts","keys","Array","isArray","length","type","isController","keyOpts","Promise","all","map","keyOpt","importProvidedOrGeneratedKey","controllerIdx","findIndex","opt","controllerKeyId","kid","identifier","did","asDidWeb","services","updateIdentifier","Error","deleteIdentifier","agent","keyManagerDelete","addKey","key","success","addService","service","removeKey","removeService"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA;;;;;GAKG;AACH,0CAAuB;AACvB,uDAAmD;AAA1C,kHAAA,cAAc,OAAA"}
@@ -0,0 +1,22 @@
1
+ import { X509Opts } from '@sphereon/ssi-sdk-ext.key-utils';
2
+ import { IAgentContext, IDIDManager, IKeyManager, IService, MinimalImportableKey, TKeyType } from '@veramo/core';
3
+ export interface IKeyOpts {
4
+ key?: Partial<MinimalImportableKey>;
5
+ x509?: X509Opts;
6
+ type?: TKeyType | 'RSA';
7
+ isController?: boolean;
8
+ }
9
+ export interface IImportProvidedOrGeneratedKeyArgs {
10
+ kms?: string;
11
+ options?: IKeyOpts;
12
+ }
13
+ export interface ICreateIdentifierArgs {
14
+ kms?: string;
15
+ alias: string;
16
+ options?: {
17
+ keys?: IKeyOpts | IKeyOpts[];
18
+ services?: IService[];
19
+ };
20
+ }
21
+ export type IRequiredContext = IAgentContext<IKeyManager & IDIDManager>;
22
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAA;AAC1D,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,WAAW,EAAE,QAAQ,EAAE,oBAAoB,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAA;AAEhH,MAAM,WAAW,QAAQ;IACvB,GAAG,CAAC,EAAE,OAAO,CAAC,oBAAoB,CAAC,CAAA;IACnC,IAAI,CAAC,EAAE,QAAQ,CAAA;IACf,IAAI,CAAC,EAAE,QAAQ,GAAG,KAAK,CAAA;IACvB,YAAY,CAAC,EAAE,OAAO,CAAA;CACvB;AAiCD,MAAM,WAAW,iCAAiC;IAChD,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,OAAO,CAAC,EAAE,QAAQ,CAAA;CACnB;AAcD,MAAM,WAAW,qBAAqB;IACpC,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,MAAM,CAAA;IACb,OAAO,CAAC,EAAE;QAAE,IAAI,CAAC,EAAE,QAAQ,GAAG,QAAQ,EAAE,CAAC;QAAC,QAAQ,CAAC,EAAE,QAAQ,EAAE,CAAA;KAAE,CAAA;CAClE;AAED,MAAM,MAAM,gBAAgB,GAAG,aAAa,CAAC,WAAW,GAAG,WAAW,CAAC,CAAA"}
package/dist/types.js ADDED
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":""}
@@ -1,33 +1,12 @@
1
- import { X509Opts } from '@sphereon/ssi-sdk-ext.key-utils';
2
- import { MinimalImportableKey, TKeyType, IService, IAgentContext, IKeyManager, IDIDManager, IIdentifier, IKey } from '@veramo/core';
1
+ import { IAgentContext, IIdentifier, IKey, IKeyManager, IService } from '@veramo/core';
3
2
  import { AbstractIdentifierProvider } from '@veramo/did-manager';
4
-
5
- interface IKeyOpts {
6
- key?: Partial<MinimalImportableKey>;
7
- x509?: X509Opts;
8
- type?: TKeyType | 'RSA';
9
- isController?: boolean;
10
- }
11
- interface IImportProvidedOrGeneratedKeyArgs {
12
- kms?: string;
13
- options?: IKeyOpts;
14
- }
15
- interface ICreateIdentifierArgs {
16
- kms?: string;
17
- alias: string;
18
- options?: {
19
- keys?: IKeyOpts | IKeyOpts[];
20
- services?: IService[];
21
- };
22
- }
23
- type IRequiredContext = IAgentContext<IKeyManager & IDIDManager>;
24
-
3
+ import { ICreateIdentifierArgs } from './types';
25
4
  type IContext = IAgentContext<IKeyManager>;
26
5
  /**
27
6
  * {@link @veramo/did-manager#DIDManager} identifier provider for `did:web` identifiers
28
7
  * @public
29
8
  */
30
- declare class WebDIDProvider extends AbstractIdentifierProvider {
9
+ export declare class WebDIDProvider extends AbstractIdentifierProvider {
31
10
  private readonly defaultKms;
32
11
  constructor(options: {
33
12
  defaultKms: string;
@@ -61,5 +40,5 @@ declare class WebDIDProvider extends AbstractIdentifierProvider {
61
40
  options?: any;
62
41
  }, context: IContext): Promise<any>;
63
42
  }
64
-
65
- export { type ICreateIdentifierArgs, type IImportProvidedOrGeneratedKeyArgs, type IKeyOpts, type IRequiredContext, WebDIDProvider };
43
+ export {};
44
+ //# sourceMappingURL=web-did-provider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"web-did-provider.d.ts","sourceRoot":"","sources":["../src/web-did-provider.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,IAAI,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAA;AACtF,OAAO,EAAE,0BAA0B,EAAE,MAAM,qBAAqB,CAAA;AAGhE,OAAO,EAAE,qBAAqB,EAAY,MAAM,SAAS,CAAA;AAIzD,KAAK,QAAQ,GAAG,aAAa,CAAC,WAAW,CAAC,CAAA;AAE1C;;;GAGG;AACH,qBAAa,cAAe,SAAQ,0BAA0B;IAC5D,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAQ;gBAEvB,OAAO,EAAE;QAAE,UAAU,EAAE,MAAM,CAAA;KAAE;IAKrC,gBAAgB,CAAC,IAAI,EAAE,qBAAq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GAAG,OAAO,CAAC,GAAG,CAAC;CAGnH"}
@@ -0,0 +1,88 @@
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
+ var __importDefault = (this && this.__importDefault) || function (mod) {
12
+ return (mod && mod.__esModule) ? mod : { "default": mod };
13
+ };
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ exports.WebDIDProvider = void 0;
16
+ const ssi_sdk_ext_did_utils_1 = require("@sphereon/ssi-sdk-ext.did-utils");
17
+ const ssi_sdk_ext_key_utils_1 = require("@sphereon/ssi-sdk-ext.key-utils");
18
+ const did_manager_1 = require("@veramo/did-manager");
19
+ const debug_1 = __importDefault(require("debug"));
20
+ const debug = (0, debug_1.default)('sphereon:web-did:identifier-provider');
21
+ /**
22
+ * {@link @veramo/did-manager#DIDManager} identifier provider for `did:web` identifiers
23
+ * @public
24
+ */
25
+ class WebDIDProvider extends did_manager_1.AbstractIdentifierProvider {
26
+ constructor(options) {
27
+ super();
28
+ this.defaultKms = options.defaultKms;
29
+ }
30
+ createIdentifier(args, context) {
31
+ return __awaiter(this, void 0, void 0, function* () {
32
+ var _a, _b;
33
+ const { kms, alias } = args;
34
+ const opts = (_a = args.options) !== null && _a !== void 0 ? _a : {};
35
+ if (!opts.keys || (Array.isArray(opts.keys) && opts.keys.length === 0)) {
36
+ // Let's generate a key as no import keys or types are provided
37
+ opts.keys = [{ type: 'Secp256r1', isController: true }];
38
+ }
39
+ const keyOpts = Array.isArray(opts.keys) ? opts.keys : [opts.keys];
40
+ const keys = yield Promise.all(keyOpts.map((keyOpt) => (0, ssi_sdk_ext_key_utils_1.importProvidedOrGeneratedKey)({ kms: kms !== null && kms !== void 0 ? kms : this.defaultKms, options: keyOpt }, context)));
41
+ const controllerIdx = keyOpts.findIndex((opt) => opt.isController);
42
+ const controllerKeyId = controllerIdx < 0 ? keys[0].kid : keys[controllerIdx].kid;
43
+ const identifier = {
44
+ did: yield (0, ssi_sdk_ext_did_utils_1.asDidWeb)(alias),
45
+ controllerKeyId,
46
+ keys,
47
+ services: (_b = opts.services) !== null && _b !== void 0 ? _b : [],
48
+ };
49
+ debug('Created', identifier);
50
+ return identifier;
51
+ });
52
+ }
53
+ updateIdentifier(args, context) {
54
+ return __awaiter(this, void 0, void 0, function* () {
55
+ throw new Error('WebDIDProvider updateIdentifier not supported yet.');
56
+ });
57
+ }
58
+ deleteIdentifier(identifier, context) {
59
+ return __awaiter(this, void 0, void 0, function* () {
60
+ for (const { kid } of identifier.keys) {
61
+ yield context.agent.keyManagerDelete({ kid });
62
+ }
63
+ return true;
64
+ });
65
+ }
66
+ addKey(_a, context_1) {
67
+ return __awaiter(this, arguments, void 0, function* ({ identifier, key, options, }, context) {
68
+ return { success: true };
69
+ });
70
+ }
71
+ addService(_a, context_1) {
72
+ return __awaiter(this, arguments, void 0, function* ({ identifier, service, options, }, context) {
73
+ return { success: true };
74
+ });
75
+ }
76
+ removeKey(args, context) {
77
+ return __awaiter(this, void 0, void 0, function* () {
78
+ return { success: true };
79
+ });
80
+ }
81
+ removeService(args, context) {
82
+ return __awaiter(this, void 0, void 0, function* () {
83
+ return { success: true };
84
+ });
85
+ }
86
+ }
87
+ exports.WebDIDProvider = WebDIDProvider;
88
+ //# sourceMappingURL=web-did-provider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"web-did-provider.js","sourceRoot":"","sources":["../src/web-did-provider.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2EAA0D;AAC1D,2EAA8E;AAE9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B;;YACjG,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAA;QAC1B,CAAC;KAAA;CACF;AAxFD,wCAwFC"}
package/package.json CHANGED
@@ -1,40 +1,27 @@
1
1
  {
2
2
  "name": "@sphereon/ssi-sdk-ext.did-provider-web",
3
3
  "description": "plugin that can enable creation and control of did:web identifiers.",
4
- "version": "0.28.1-feature.jose.vcdm.52+751e224",
5
- "source": "./src/index.ts",
6
- "type": "module",
7
- "main": "./dist/index.cjs",
8
- "module": "./dist/index.js",
9
- "types": "./dist/index.d.ts",
10
- "exports": {
11
- "react-native": "./dist/index.js",
12
- "import": {
13
- "types": "./dist/index.d.ts",
14
- "import": "./dist/index.js"
15
- },
16
- "require": {
17
- "types": "./dist/index.d.cts",
18
- "require": "./dist/index.cjs"
19
- }
20
- },
4
+ "version": "0.28.1-feature.oyd.cmsm.improv.20+7c3cf5a",
5
+ "main": "dist/index.js",
6
+ "exports": "./dist/index.js",
7
+ "types": "dist/index.d.ts",
21
8
  "scripts": {
22
- "build": "tsup --config ../../tsup.config.ts --tsconfig ../../tsconfig.tsup.json"
9
+ "build": "tsc"
23
10
  },
24
11
  "dependencies": {
25
- "@sphereon/ssi-sdk-ext.did-utils": "0.28.1-feature.jose.vcdm.52+751e224",
26
- "@sphereon/ssi-sdk-ext.key-utils": "0.28.1-feature.jose.vcdm.52+751e224",
12
+ "@sphereon/ssi-sdk-ext.did-utils": "0.28.1-feature.oyd.cmsm.improv.20+7c3cf5a",
13
+ "@sphereon/ssi-sdk-ext.key-utils": "0.28.1-feature.oyd.cmsm.improv.20+7c3cf5a",
27
14
  "@veramo/core": "4.2.0",
28
15
  "@veramo/did-manager": "4.2.0",
29
16
  "debug": "^4.3.4"
30
17
  },
31
18
  "devDependencies": {
32
19
  "@types/debug": "^4.1.9",
33
- "typescript": "5.8.3"
20
+ "typescript": "4.9.5"
34
21
  },
35
22
  "files": [
36
- "dist",
37
- "src",
23
+ "dist/**/*",
24
+ "src/**/*",
38
25
  "README.md",
39
26
  "LICENSE"
40
27
  ],
@@ -57,5 +44,5 @@
57
44
  "secp256r1",
58
45
  "RSA"
59
46
  ],
60
- "gitHead": "751e224f245c6ba757827ea4e50ad3c46afbea94"
47
+ "gitHead": "7c3cf5a3b32ef8a31744757aab14c21338880f79"
61
48
  }
package/dist/index.cjs DELETED
@@ -1,114 +0,0 @@
1
- "use strict";
2
- var __create = Object.create;
3
- var __defProp = Object.defineProperty;
4
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
- var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __getProtoOf = Object.getPrototypeOf;
7
- var __hasOwnProp = Object.prototype.hasOwnProperty;
8
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
9
- var __export = (target, all) => {
10
- for (var name in all)
11
- __defProp(target, name, { get: all[name], enumerable: true });
12
- };
13
- var __copyProps = (to, from, except, desc) => {
14
- if (from && typeof from === "object" || typeof from === "function") {
15
- for (let key of __getOwnPropNames(from))
16
- if (!__hasOwnProp.call(to, key) && key !== except)
17
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
18
- }
19
- return to;
20
- };
21
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
22
- // If the importer is in node compatibility mode or this is not an ESM
23
- // file that has been converted to a CommonJS file using a Babel-
24
- // compatible transform (i.e. "__esModule" has not been set), then set
25
- // "default" to the CommonJS "module.exports" for node compatibility.
26
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
27
- mod
28
- ));
29
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
30
-
31
- // src/index.ts
32
- var index_exports = {};
33
- __export(index_exports, {
34
- WebDIDProvider: () => WebDIDProvider
35
- });
36
- module.exports = __toCommonJS(index_exports);
37
-
38
- // src/web-did-provider.ts
39
- var import_ssi_sdk_ext = require("@sphereon/ssi-sdk-ext.did-utils");
40
- var import_ssi_sdk_ext2 = require("@sphereon/ssi-sdk-ext.key-utils");
41
- var import_did_manager = require("@veramo/did-manager");
42
- var import_debug = __toESM(require("debug"), 1);
43
- var debug = (0, import_debug.default)("sphereon:web-did:identifier-provider");
44
- var WebDIDProvider = class extends import_did_manager.AbstractIdentifierProvider {
45
- static {
46
- __name(this, "WebDIDProvider");
47
- }
48
- defaultKms;
49
- constructor(options) {
50
- super();
51
- this.defaultKms = options.defaultKms;
52
- }
53
- async createIdentifier(args, context) {
54
- const { kms, alias } = args;
55
- const opts = args.options ?? {};
56
- if (!opts.keys || Array.isArray(opts.keys) && opts.keys.length === 0) {
57
- opts.keys = [
58
- {
59
- type: "Secp256r1",
60
- isController: true
61
- }
62
- ];
63
- }
64
- const keyOpts = Array.isArray(opts.keys) ? opts.keys : [
65
- opts.keys
66
- ];
67
- const keys = await Promise.all(keyOpts.map((keyOpt) => (0, import_ssi_sdk_ext2.importProvidedOrGeneratedKey)({
68
- kms: kms ?? this.defaultKms,
69
- options: keyOpt
70
- }, context)));
71
- const controllerIdx = keyOpts.findIndex((opt) => opt.isController);
72
- const controllerKeyId = controllerIdx < 0 ? keys[0].kid : keys[controllerIdx].kid;
73
- const identifier = {
74
- did: await (0, import_ssi_sdk_ext.asDidWeb)(alias),
75
- controllerKeyId,
76
- keys,
77
- services: opts.services ?? []
78
- };
79
- debug("Created", identifier);
80
- return identifier;
81
- }
82
- async updateIdentifier(args, context) {
83
- throw new Error("WebDIDProvider updateIdentifier not supported yet.");
84
- }
85
- async deleteIdentifier(identifier, context) {
86
- for (const { kid } of identifier.keys) {
87
- await context.agent.keyManagerDelete({
88
- kid
89
- });
90
- }
91
- return true;
92
- }
93
- async addKey({ identifier, key, options }, context) {
94
- return {
95
- success: true
96
- };
97
- }
98
- async addService({ identifier, service, options }, context) {
99
- return {
100
- success: true
101
- };
102
- }
103
- async removeKey(args, context) {
104
- return {
105
- success: true
106
- };
107
- }
108
- async removeService(args, context) {
109
- return {
110
- success: true
111
- };
112
- }
113
- };
114
- //# sourceMappingURL=index.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/index.ts","../src/web-did-provider.ts"],"sourcesContent":["/**\n * Provides `did:web` {@link @veramo/did-provider-web#WebDIDProvider | identifier provider } for the\n * {@link @veramo/did-manager#DIDManager}\n *\n * @packageDocumentation\n */\nexport * from './types'\nexport { WebDIDProvider } from './web-did-provider'\n","import { asDidWeb } from '@sphereon/ssi-sdk-ext.did-utils'\nimport { importProvidedOrGeneratedKey } from '@sphereon/ssi-sdk-ext.key-utils'\nimport { IAgentContext, IIdentifier, IKey, IKeyManager, IService } from '@veramo/core'\nimport { AbstractIdentifierProvider } from '@veramo/did-manager'\n\nimport Debug from 'debug'\nimport { ICreateIdentifierArgs, IKeyOpts } from './types'\n\nconst debug = Debug('sphereon:web-did:identifier-provider')\n\ntype IContext = IAgentContext<IKeyManager>\n\n/**\n * {@link @veramo/did-manager#DIDManager} identifier provider for `did:web` identifiers\n * @public\n */\nexport class WebDIDProvider extends AbstractIdentifierProvider {\n private readonly defaultKms: string\n\n constructor(options: { defaultKms: string }) {\n super()\n this.defaultKms = options.defaultKms\n }\n\n async createIdentifier(args: ICreateIdentifierArgs, context: IContext): Promise<Omit<IIdentifier, 'provider'>> {\n const { kms, alias } = args\n const opts = args.options ?? {}\n if (!opts.keys || (Array.isArray(opts.keys) && opts.keys.length === 0)) {\n // Let's generate a key as no import keys or types are provided\n opts.keys = [{ type: 'Secp256r1', isController: true }]\n }\n const keyOpts = Array.isArray(opts.keys) ? opts.keys : [opts.keys as IKeyOpts]\n const keys = await Promise.all(\n keyOpts.map((keyOpt: IKeyOpts) => importProvidedOrGeneratedKey({ kms: kms ?? this.defaultKms, options: keyOpt }, context))\n )\n\n const controllerIdx = keyOpts.findIndex((opt) => opt.isController)\n const controllerKeyId = controllerIdx < 0 ? keys[0].kid : keys[controllerIdx].kid\n const identifier: Omit<IIdentifier, 'provider'> = {\n did: await asDidWeb(alias),\n controllerKeyId,\n keys,\n services: opts.services ?? [],\n }\n debug('Created', identifier)\n return identifier\n }\n\n async updateIdentifier(\n args: {\n did: string\n kms?: string | undefined\n alias?: string | undefined\n options?: any\n },\n context: IAgentContext<IKeyManager>\n ): Promise<IIdentifier> {\n throw new Error('WebDIDProvider updateIdentifier not supported yet.')\n }\n\n async deleteIdentifier(identifier: IIdentifier, context: IContext): Promise<boolean> {\n for (const { kid } of identifier.keys) {\n await context.agent.keyManagerDelete({ kid })\n }\n return true\n }\n\n async addKey(\n {\n identifier,\n key,\n options,\n }: {\n identifier: IIdentifier\n key: IKey\n options?: any\n },\n context: IContext\n ): Promise<any> {\n return { success: true }\n }\n\n async addService(\n {\n identifier,\n service,\n options,\n }: {\n identifier: IIdentifier\n service: IService\n options?: any\n },\n context: IContext\n ): Promise<any> {\n return { success: true }\n }\n\n async removeKey(args: { identifier: IIdentifier; kid: string; options?: any }, context: IContext): Promise<any> {\n return { success: true }\n }\n\n async removeService(args: { identifier: IIdentifier; id: string; options?: any }, context: IContext): Promise<any> {\n return { success: true }\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;ACAA,yBAAyB;AACzB,IAAAA,sBAA6C;AAE7C,yBAA2C;AAE3C,mBAAkB;AAGlB,IAAMC,YAAQC,aAAAA,SAAM,sCAAA;AAQb,IAAMC,iBAAN,cAA6BC,8CAAAA;EAhBpC,OAgBoCA;;;EACjBC;EAEjBC,YAAYC,SAAiC;AAC3C,UAAK;AACL,SAAKF,aAAaE,QAAQF;EAC5B;EAEA,MAAMG,iBAAiBC,MAA6BC,SAA2D;AAC7G,UAAM,EAAEC,KAAKC,MAAK,IAAKH;AACvB,UAAMI,OAAOJ,KAAKF,WAAW,CAAC;AAC9B,QAAI,CAACM,KAAKC,QAASC,MAAMC,QAAQH,KAAKC,IAAI,KAAKD,KAAKC,KAAKG,WAAW,GAAI;AAEtEJ,WAAKC,OAAO;QAAC;UAAEI,MAA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","constructor","options","createIdentifier","args","context","kms","alias","opts","keys","Array","isArray","length","type","isController","keyOpts","Promise","all","map","keyOpt","importProvidedOrGeneratedKey","controllerIdx","findIndex","opt","controllerKeyId","kid","identifier","did","asDidWeb","services","updateIdentifier","Error","deleteIdentifier","agent","keyManagerDelete","addKey","key","success","addService","service","removeKey","removeService"]}