@credo-ts/cheqd 0.6.1-pr-2091-20241119140918 → 0.6.1

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.
Files changed (88) hide show
  1. package/build/CheqdApi.d.mts +45 -0
  2. package/build/CheqdApi.d.mts.map +1 -0
  3. package/build/CheqdApi.mjs +26 -0
  4. package/build/CheqdApi.mjs.map +1 -0
  5. package/build/CheqdModule.d.mts +15 -0
  6. package/build/CheqdModule.d.mts.map +1 -0
  7. package/build/CheqdModule.mjs +25 -0
  8. package/build/CheqdModule.mjs.map +1 -0
  9. package/build/CheqdModuleConfig.d.mts +21 -0
  10. package/build/CheqdModuleConfig.d.mts.map +1 -0
  11. package/build/CheqdModuleConfig.mjs +14 -0
  12. package/build/CheqdModuleConfig.mjs.map +1 -0
  13. package/build/_virtual/_@oxc-project_runtime@0.99.0/helpers/decorate.mjs +10 -0
  14. package/build/_virtual/_@oxc-project_runtime@0.99.0/helpers/decorateMetadata.mjs +7 -0
  15. package/build/_virtual/_@oxc-project_runtime@0.99.0/helpers/decorateParam.mjs +9 -0
  16. package/build/anoncreds/index.d.mts +1 -0
  17. package/build/anoncreds/index.mjs +1 -0
  18. package/build/anoncreds/services/CheqdAnonCredsRegistry.d.mts +32 -0
  19. package/build/anoncreds/services/CheqdAnonCredsRegistry.d.mts.map +1 -0
  20. package/build/anoncreds/services/CheqdAnonCredsRegistry.mjs +349 -0
  21. package/build/anoncreds/services/CheqdAnonCredsRegistry.mjs.map +1 -0
  22. package/build/anoncreds/utils/identifiers.mjs +56 -0
  23. package/build/anoncreds/utils/identifiers.mjs.map +1 -0
  24. package/build/anoncreds/utils/transform.mjs +104 -0
  25. package/build/anoncreds/utils/transform.mjs.map +1 -0
  26. package/build/dids/CheqdDidRegistrar.d.mts +102 -0
  27. package/build/dids/CheqdDidRegistrar.d.mts.map +1 -0
  28. package/build/dids/CheqdDidRegistrar.mjs +446 -0
  29. package/build/dids/CheqdDidRegistrar.mjs.map +1 -0
  30. package/build/dids/CheqdDidResolver.d.mts +30 -0
  31. package/build/dids/CheqdDidResolver.d.mts.map +1 -0
  32. package/build/dids/CheqdDidResolver.mjs +135 -0
  33. package/build/dids/CheqdDidResolver.mjs.map +1 -0
  34. package/build/dids/didCheqdUtil.mjs +113 -0
  35. package/build/dids/didCheqdUtil.mjs.map +1 -0
  36. package/build/dids/index.d.mts +2 -0
  37. package/build/dids/index.mjs +2 -0
  38. package/build/index.d.mts +10 -0
  39. package/build/index.mjs +11 -0
  40. package/build/ledger/CheqdLedgerService.d.mts +35 -0
  41. package/build/ledger/CheqdLedgerService.d.mts.map +1 -0
  42. package/build/ledger/CheqdLedgerService.mjs +114 -0
  43. package/build/ledger/CheqdLedgerService.mjs.map +1 -0
  44. package/build/ledger/index.d.mts +1 -0
  45. package/build/ledger/index.mjs +1 -0
  46. package/package.json +22 -22
  47. package/build/CheqdApi.d.ts +0 -38
  48. package/build/CheqdApi.js +0 -34
  49. package/build/CheqdApi.js.map +0 -1
  50. package/build/CheqdModule.d.ts +0 -11
  51. package/build/CheqdModule.js +0 -33
  52. package/build/CheqdModule.js.map +0 -1
  53. package/build/CheqdModuleConfig.d.ts +0 -17
  54. package/build/CheqdModuleConfig.js +0 -14
  55. package/build/CheqdModuleConfig.js.map +0 -1
  56. package/build/anoncreds/index.d.ts +0 -1
  57. package/build/anoncreds/index.js +0 -6
  58. package/build/anoncreds/index.js.map +0 -1
  59. package/build/anoncreds/services/CheqdAnonCredsRegistry.d.ts +0 -19
  60. package/build/anoncreds/services/CheqdAnonCredsRegistry.js +0 -368
  61. package/build/anoncreds/services/CheqdAnonCredsRegistry.js.map +0 -1
  62. package/build/anoncreds/utils/identifiers.d.ts +0 -13
  63. package/build/anoncreds/utils/identifiers.js +0 -53
  64. package/build/anoncreds/utils/identifiers.js.map +0 -1
  65. package/build/anoncreds/utils/transform.d.ts +0 -43
  66. package/build/anoncreds/utils/transform.js +0 -170
  67. package/build/anoncreds/utils/transform.js.map +0 -1
  68. package/build/dids/CheqdDidRegistrar.d.ts +0 -86
  69. package/build/dids/CheqdDidRegistrar.js +0 -334
  70. package/build/dids/CheqdDidRegistrar.js.map +0 -1
  71. package/build/dids/CheqdDidResolver.d.ts +0 -25
  72. package/build/dids/CheqdDidResolver.js +0 -171
  73. package/build/dids/CheqdDidResolver.js.map +0 -1
  74. package/build/dids/didCheqdUtil.d.ts +0 -28
  75. package/build/dids/didCheqdUtil.js +0 -129
  76. package/build/dids/didCheqdUtil.js.map +0 -1
  77. package/build/dids/index.d.ts +0 -2
  78. package/build/dids/index.js +0 -8
  79. package/build/dids/index.js.map +0 -1
  80. package/build/index.d.ts +0 -5
  81. package/build/index.js +0 -17
  82. package/build/index.js.map +0 -1
  83. package/build/ledger/CheqdLedgerService.d.ts +0 -37
  84. package/build/ledger/CheqdLedgerService.js +0 -135
  85. package/build/ledger/CheqdLedgerService.js.map +0 -1
  86. package/build/ledger/index.d.ts +0 -1
  87. package/build/ledger/index.js +0 -6
  88. package/build/ledger/index.js.map +0 -1
@@ -1,25 +0,0 @@
1
- import type { Metadata } from '@cheqd/ts-proto/cheqd/resource/v2';
2
- import type { AgentContext, DidResolutionResult, DidResolver, ParsedDid } from '@credo-ts/core';
3
- export declare class CheqdDidResolver implements DidResolver {
4
- readonly supportedMethods: string[];
5
- readonly allowsCaching = true;
6
- readonly allowsLocalDidRecord = true;
7
- resolve(agentContext: AgentContext, did: string, parsed: ParsedDid): Promise<DidResolutionResult>;
8
- resolveResource(agentContext: AgentContext, did: string): Promise<{
9
- error: string;
10
- message: string;
11
- resource?: undefined;
12
- resourceMetadata?: undefined;
13
- resourceResolutionMetadata?: undefined;
14
- } | {
15
- resource: any;
16
- resourceMetadata: Metadata;
17
- resourceResolutionMetadata: {};
18
- error?: undefined;
19
- message?: undefined;
20
- }>;
21
- private resolveAllDidDocVersions;
22
- private dereferenceCollectionResources;
23
- private dereferenceResourceMetadata;
24
- private resolveDidDoc;
25
- }
@@ -1,171 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.CheqdDidResolver = void 0;
4
- const core_1 = require("@credo-ts/core");
5
- const identifiers_1 = require("../anoncreds/utils/identifiers");
6
- const ledger_1 = require("../ledger");
7
- const didCheqdUtil_1 = require("./didCheqdUtil");
8
- class CheqdDidResolver {
9
- constructor() {
10
- this.supportedMethods = ['cheqd'];
11
- this.allowsCaching = true;
12
- this.allowsLocalDidRecord = true;
13
- }
14
- async resolve(agentContext, did, parsed) {
15
- var _a, _b, _c, _d, _e;
16
- const didDocumentMetadata = {};
17
- try {
18
- const parsedDid = (0, identifiers_1.parseCheqdDid)(parsed.didUrl);
19
- if (!parsedDid) {
20
- throw new Error('Invalid DID');
21
- }
22
- switch (did) {
23
- case (_a = did.match(identifiers_1.cheqdDidRegex)) === null || _a === void 0 ? void 0 : _a.input:
24
- return await this.resolveDidDoc(agentContext, parsedDid.did);
25
- case (_b = did.match(identifiers_1.cheqdDidVersionRegex)) === null || _b === void 0 ? void 0 : _b.input: {
26
- const version = did.split('/')[2];
27
- return await this.resolveDidDoc(agentContext, parsedDid.did, version);
28
- }
29
- case (_c = did.match(identifiers_1.cheqdDidVersionsRegex)) === null || _c === void 0 ? void 0 : _c.input:
30
- return await this.resolveAllDidDocVersions(agentContext, parsedDid);
31
- case (_d = did.match(identifiers_1.cheqdDidMetadataRegex)) === null || _d === void 0 ? void 0 : _d.input:
32
- return await this.dereferenceCollectionResources(agentContext, parsedDid);
33
- case (_e = did.match(identifiers_1.cheqdResourceMetadataRegex)) === null || _e === void 0 ? void 0 : _e.input:
34
- return await this.dereferenceResourceMetadata(agentContext, parsedDid);
35
- default:
36
- return {
37
- didDocument: null,
38
- didDocumentMetadata,
39
- didResolutionMetadata: {
40
- error: 'Invalid request',
41
- message: `Unsupported did Url: '${did}'`,
42
- },
43
- };
44
- }
45
- }
46
- catch (error) {
47
- return {
48
- didDocument: null,
49
- didDocumentMetadata,
50
- didResolutionMetadata: {
51
- error: 'notFound',
52
- message: `resolver_error: Unable to resolve did '${did}': ${error}`,
53
- },
54
- };
55
- }
56
- }
57
- async resolveResource(agentContext, did) {
58
- var _a;
59
- const cheqdLedgerService = agentContext.dependencyManager.resolve(ledger_1.CheqdLedgerService);
60
- try {
61
- const parsedDid = (0, identifiers_1.parseCheqdDid)(did);
62
- if (!parsedDid) {
63
- throw new Error('Invalid DID');
64
- }
65
- const { params, id } = parsedDid;
66
- let resourceId;
67
- if ((_a = did.match(identifiers_1.cheqdResourceRegex)) === null || _a === void 0 ? void 0 : _a.input) {
68
- resourceId = did.split('/')[2];
69
- }
70
- else if (params && params.resourceName && params.resourceType) {
71
- let resources = (await cheqdLedgerService.resolveCollectionResources(parsedDid.did, id)).resources;
72
- resources = (0, didCheqdUtil_1.filterResourcesByNameAndType)(resources, params.resourceName, params.resourceType);
73
- if (!resources.length) {
74
- throw new Error(`No resources found`);
75
- }
76
- let resource;
77
- if (params.version) {
78
- resource = resources.find((resource) => resource.version == params.version);
79
- }
80
- else {
81
- const date = params.resourceVersionTime ? new Date(Number(params.resourceVersionTime) * 1000) : new Date();
82
- // find the resourceId closest to the created time
83
- resource = (0, didCheqdUtil_1.getClosestResourceVersion)(resources, date);
84
- }
85
- if (!resource) {
86
- throw new Error(`No resources found`);
87
- }
88
- resourceId = resource.id;
89
- }
90
- else {
91
- return {
92
- error: 'notFound',
93
- message: `resolver_error: Invalid did url '${did}'`,
94
- };
95
- }
96
- if (!core_1.utils.isValidUuid(resourceId)) {
97
- throw new Error('Invalid resource Id');
98
- }
99
- const { resource, metadata } = await cheqdLedgerService.resolveResource(parsedDid.did, id, resourceId);
100
- if (!resource || !metadata) {
101
- throw new Error('resolver_error: Unable to resolve resource, Please try again');
102
- }
103
- const result = await (0, didCheqdUtil_1.renderResourceData)(resource.data, metadata.mediaType);
104
- return {
105
- resource: result,
106
- resourceMetadata: metadata,
107
- resourceResolutionMetadata: {},
108
- };
109
- }
110
- catch (error) {
111
- return {
112
- error: 'notFound',
113
- message: `resolver_error: Unable to resolve resource '${did}': ${error}`,
114
- };
115
- }
116
- }
117
- async resolveAllDidDocVersions(agentContext, parsedDid) {
118
- const cheqdLedgerService = agentContext.dependencyManager.resolve(ledger_1.CheqdLedgerService);
119
- const { did } = parsedDid;
120
- const { didDocumentVersionsMetadata } = await cheqdLedgerService.resolveMetadata(did);
121
- return {
122
- didDocument: new core_1.DidDocument({ id: did }),
123
- didDocumentMetadata: didDocumentVersionsMetadata,
124
- didResolutionMetadata: {},
125
- };
126
- }
127
- async dereferenceCollectionResources(agentContext, parsedDid) {
128
- const cheqdLedgerService = agentContext.dependencyManager.resolve(ledger_1.CheqdLedgerService);
129
- const { did, id } = parsedDid;
130
- const metadata = await cheqdLedgerService.resolveCollectionResources(did, id);
131
- return {
132
- didDocument: new core_1.DidDocument({ id: did }),
133
- didDocumentMetadata: {
134
- linkedResourceMetadata: metadata,
135
- },
136
- didResolutionMetadata: {},
137
- };
138
- }
139
- async dereferenceResourceMetadata(agentContext, parsedDid) {
140
- const cheqdLedgerService = agentContext.dependencyManager.resolve(ledger_1.CheqdLedgerService);
141
- const { did, id } = parsedDid;
142
- if (!parsedDid.path) {
143
- throw new core_1.CredoError(`Missing path in did ${parsedDid.did}`);
144
- }
145
- const [, , resourceId] = parsedDid.path.split('/');
146
- if (!resourceId) {
147
- throw new core_1.CredoError(`Missing resource id in didUrl ${parsedDid.didUrl}`);
148
- }
149
- const metadata = await cheqdLedgerService.resolveResourceMetadata(did, id, resourceId);
150
- return {
151
- didDocument: new core_1.DidDocument({ id: did }),
152
- didDocumentMetadata: {
153
- linkedResourceMetadata: metadata,
154
- },
155
- didResolutionMetadata: {},
156
- };
157
- }
158
- async resolveDidDoc(agentContext, did, version) {
159
- const cheqdLedgerService = agentContext.dependencyManager.resolve(ledger_1.CheqdLedgerService);
160
- const { didDocument, didDocumentMetadata } = await cheqdLedgerService.resolve(did, version);
161
- const { resources } = await cheqdLedgerService.resolveCollectionResources(did, did.split(':')[3]);
162
- didDocumentMetadata.linkedResourceMetadata = resources;
163
- return {
164
- didDocument: core_1.JsonTransformer.fromJSON(didDocument, core_1.DidDocument),
165
- didDocumentMetadata,
166
- didResolutionMetadata: {},
167
- };
168
- }
169
- }
170
- exports.CheqdDidResolver = CheqdDidResolver;
171
- //# sourceMappingURL=CheqdDidResolver.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CheqdDidResolver.js","sourceRoot":"","sources":["../../src/dids/CheqdDidResolver.ts"],"names":[],"mappings":";;;AAIA,yCAAgF;AAEhF,gEAQuC;AACvC,sCAA8C;AAE9C,iDAA4G;AAE5G,MAAa,gBAAgB;IAA7B;QACkB,qBAAgB,GAAG,CAAC,OAAO,CAAC,CAAA;QAC5B,kBAAa,GAAG,IAAI,CAAA;QACpB,yBAAoB,GAAG,IAAI,CAAA;IA2K7C,CAAC;IAzKQ,KAAK,CAAC,OAAO,CAAC,YAA0B,EAAE,GAAW,EAAE,MAAiB;;QAC7E,MAAM,mBAAmB,GAAG,EAAE,CAAA;QAE9B,IAAI,CAAC;YACH,MAAM,SAAS,GAAG,IAAA,2BAAa,EAAC,MAAM,CAAC,MAAM,CAAC,CAAA;YAC9C,IAAI,CAAC,SAAS,EAAE,CAAC;gBACf,MAAM,IAAI,KAAK,CAAC,aAAa,CAAC,CAAA;YAChC,CAAC;YAED,QAAQ,GAAG,EAAE,CAAC;gBACZ,KAAK,MAAA,GAAG,CAAC,KAAK,CAAC,2BAAa,CAAC,0CAAE,KAAK;oBAClC,OAAO,MAAM,IAAI,CAAC,aAAa,CAAC,YAAY,EAAE,SAAS,CAAC,GAAG,CAAC,CAAA;gBAC9D,KAAK,MAAA,GAAG,CAAC,KAAK,CAAC,kCAAoB,CAAC,0CAAE,KAAK,CAAC,CAAC,CAAC;oBAC5C,MAAM,OAAO,GAAG,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAA;oBACjC,OAAO,MAAM,IAAI,CAAC,aAAa,CAAC,YAAY,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QAC3E,CAAC;QAED,MAAM,QAAQ,GAAG,MAAM,kBAAkB,CAAC,uBAAuB,CAAC,GAAG,EAAE,EAAE,EAAE,UAAU,CAAC,CAAA;QACtF,OAAO;YACL,WAAW,EAAE,IAAI,kBAAW,CAAC,EAAE,EAAE,EAAE,GAAG,EAAE,CAAC;YACzC,mBAAmB,EAAE;gBACnB,sBAAsB,EAAE,QAAQ;aACjC;YACD,qBAAqB,EAAE,EAAE;SAC1B,CAAA;IACH,CAAC;IAEO,KAAK,CAAC,aAAa,CAAC,YAA0B,EAAE,GAAW,EAAE,OAAgB;QACnF,MAAM,kBAAkB,GAAG,YAAY,CAAC,iBAAiB,CAAC,OAAO,CAAC,2BAAkB,CAAC,CAAA;QAErF,MAAM,EAAE,WAAW,EAAE,mBAAmB,EAAE,GAAG,MAAM,kBAAkB,CAAC,OAAO,CAAC,GAAG,EAAE,OAAO,CAAC,CAAA;QAC3F,MAAM,EAAE,SAAS,EAAE,GAAG,MAAM,kBAAkB,CAAC,0BAA0B,CAAC,GAAG,EAAE,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;QACjG,mBAAmB,CAAC,sBAAsB,GAAG,SAAS,CAAA;QAEtD,OAAO;YACL,WAAW,EAAE,sBAAe,CAAC,QAAQ,CAAC,WAAW,EAAE,kBAAW,CAAC;YAC/D,mBAAmB;YACnB,qBAAqB,EAAE,EAAE;SAC1B,CAAA;IACH,CAAC;CACF;AA9KD,4CA8KC"}
@@ -1,28 +0,0 @@
1
- import type { CheqdNetwork, DIDDocument, MethodSpecificIdAlgo, TVerificationKey } from '@cheqd/sdk';
2
- import type { Metadata } from '@cheqd/ts-proto/cheqd/resource/v2';
3
- import { VerificationMethods } from '@cheqd/sdk';
4
- import { EnglishMnemonic as _ } from '@cosmjs/crypto';
5
- import { DirectSecp256k1HdWallet, DirectSecp256k1Wallet } from '@cosmjs/proto-signing';
6
- import { DidDocument } from '@credo-ts/core';
7
- export declare function validateSpecCompliantPayload(didDocument: DidDocument): SpecValidationResult;
8
- export declare function createMsgCreateDidDocPayloadToSign(didPayload: DIDDocument, versionId: string): Promise<Uint8Array>;
9
- export declare function createMsgDeactivateDidDocPayloadToSign(didPayload: DIDDocument, versionId?: string): Uint8Array;
10
- export type SpecValidationResult = {
11
- valid: boolean;
12
- error?: string;
13
- };
14
- export declare function generateDidDoc(options: IDidDocOptions): DidDocument;
15
- export interface IDidDocOptions {
16
- verificationMethod: VerificationMethods;
17
- verificationMethodId: TVerificationKey<string, number>;
18
- methodSpecificIdAlgo: MethodSpecificIdAlgo;
19
- network: CheqdNetwork;
20
- publicKey: string;
21
- }
22
- export declare function getClosestResourceVersion(resources: Metadata[], date: Date): Metadata;
23
- export declare function filterResourcesByNameAndType(resources: Metadata[], name: string, type: string): Metadata[];
24
- export declare function renderResourceData(data: Uint8Array, mimeType: string): Promise<any>;
25
- export declare class EnglishMnemonic extends _ {
26
- static readonly _mnemonicMatcher: RegExp;
27
- }
28
- export declare function getCosmosPayerWallet(cosmosPayerSeed?: string): Promise<DirectSecp256k1HdWallet> | Promise<DirectSecp256k1Wallet>;
@@ -1,129 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.EnglishMnemonic = void 0;
4
- exports.validateSpecCompliantPayload = validateSpecCompliantPayload;
5
- exports.createMsgCreateDidDocPayloadToSign = createMsgCreateDidDocPayloadToSign;
6
- exports.createMsgDeactivateDidDocPayloadToSign = createMsgDeactivateDidDocPayloadToSign;
7
- exports.generateDidDoc = generateDidDoc;
8
- exports.getClosestResourceVersion = getClosestResourceVersion;
9
- exports.filterResourcesByNameAndType = filterResourcesByNameAndType;
10
- exports.renderResourceData = renderResourceData;
11
- exports.getCosmosPayerWallet = getCosmosPayerWallet;
12
- const sdk_1 = require("@cheqd/sdk");
13
- const v2_1 = require("@cheqd/ts-proto/cheqd/did/v2");
14
- const crypto_1 = require("@cosmjs/crypto");
15
- const proto_signing_1 = require("@cosmjs/proto-signing");
16
- const core_1 = require("@credo-ts/core");
17
- function validateSpecCompliantPayload(didDocument) {
18
- var _a;
19
- // id is required, validated on both compile and runtime
20
- if (!didDocument.id && !didDocument.id.startsWith('did:cheqd:'))
21
- return { valid: false, error: 'id is required' };
22
- // verificationMethod is required
23
- if (!didDocument.verificationMethod)
24
- return { valid: false, error: 'verificationMethod is required' };
25
- // verificationMethod must be an array
26
- if (!Array.isArray(didDocument.verificationMethod))
27
- return { valid: false, error: 'verificationMethod must be an array' };
28
- // verificationMethod must be not be empty
29
- if (!didDocument.verificationMethod.length)
30
- return { valid: false, error: 'verificationMethod must be not be empty' };
31
- // verificationMethod types must be supported
32
- const isValidVerificationMethod = didDocument.verificationMethod.every((vm) => {
33
- switch (vm.type) {
34
- case sdk_1.VerificationMethods.Ed255192020:
35
- return vm.publicKeyMultibase != null;
36
- case sdk_1.VerificationMethods.JWK:
37
- return vm.publicKeyJwk != null;
38
- case sdk_1.VerificationMethods.Ed255192018:
39
- return vm.publicKeyBase58 != null;
40
- default:
41
- return false;
42
- }
43
- });
44
- if (!isValidVerificationMethod)
45
- return { valid: false, error: 'verificationMethod publicKey is Invalid' };
46
- const isValidService = didDocument.service
47
- ? (_a = didDocument === null || didDocument === void 0 ? void 0 : didDocument.service) === null || _a === void 0 ? void 0 : _a.every((s) => {
48
- return (s === null || s === void 0 ? void 0 : s.serviceEndpoint) && (s === null || s === void 0 ? void 0 : s.id) && (s === null || s === void 0 ? void 0 : s.type);
49
- })
50
- : true;
51
- if (!isValidService)
52
- return { valid: false, error: 'Service is Invalid' };
53
- return { valid: true };
54
- }
55
- // Create helpers in sdk like MsgCreateDidDocPayload.fromDIDDocument to replace the below
56
- async function createMsgCreateDidDocPayloadToSign(didPayload, versionId) {
57
- var _a;
58
- didPayload.service = (_a = didPayload.service) === null || _a === void 0 ? void 0 : _a.map((e) => {
59
- return Object.assign(Object.assign({}, e), { serviceEndpoint: Array.isArray(e.serviceEndpoint) ? e.serviceEndpoint : [e.serviceEndpoint] });
60
- });
61
- const { protobufVerificationMethod, protobufService } = await sdk_1.DIDModule.validateSpecCompliantPayload(didPayload);
62
- return v2_1.MsgCreateDidDocPayload.encode(v2_1.MsgCreateDidDocPayload.fromPartial({
63
- context: didPayload === null || didPayload === void 0 ? void 0 : didPayload['@context'],
64
- id: didPayload.id,
65
- controller: didPayload.controller,
66
- verificationMethod: protobufVerificationMethod,
67
- authentication: didPayload.authentication,
68
- assertionMethod: didPayload.assertionMethod,
69
- capabilityInvocation: didPayload.capabilityInvocation,
70
- capabilityDelegation: didPayload.capabilityDelegation,
71
- keyAgreement: didPayload.keyAgreement,
72
- service: protobufService,
73
- alsoKnownAs: didPayload.alsoKnownAs,
74
- versionId,
75
- })).finish();
76
- }
77
- function createMsgDeactivateDidDocPayloadToSign(didPayload, versionId) {
78
- return v2_1.MsgDeactivateDidDocPayload.encode(v2_1.MsgDeactivateDidDocPayload.fromPartial({
79
- id: didPayload.id,
80
- versionId,
81
- })).finish();
82
- }
83
- function generateDidDoc(options) {
84
- const { verificationMethod, methodSpecificIdAlgo, verificationMethodId, network, publicKey } = options;
85
- const verificationKeys = (0, sdk_1.createVerificationKeys)(publicKey, methodSpecificIdAlgo, verificationMethodId, network);
86
- if (!verificationKeys) {
87
- throw new Error('Invalid DID options');
88
- }
89
- const verificationMethods = (0, sdk_1.createDidVerificationMethod)([verificationMethod], [verificationKeys]);
90
- const didPayload = (0, sdk_1.createDidPayload)(verificationMethods, [verificationKeys]);
91
- return core_1.JsonTransformer.fromJSON(didPayload, core_1.DidDocument);
92
- }
93
- function getClosestResourceVersion(resources, date) {
94
- const result = [...resources].sort(function (a, b) {
95
- if (!a.created || !b.created)
96
- throw new core_1.CredoError("Missing required property 'created' on resource");
97
- const distancea = Math.abs(date.getTime() - a.created.getTime());
98
- const distanceb = Math.abs(date.getTime() - b.created.getTime());
99
- return distancea - distanceb;
100
- });
101
- return result[0];
102
- }
103
- function filterResourcesByNameAndType(resources, name, type) {
104
- return resources.filter((resource) => resource.name == name && resource.resourceType == type);
105
- }
106
- async function renderResourceData(data, mimeType) {
107
- if (mimeType == 'application/json') {
108
- return await core_1.JsonEncoder.fromBuffer(data);
109
- }
110
- else if (mimeType == 'text/plain') {
111
- return core_1.TypedArrayEncoder.toUtf8String(data);
112
- }
113
- else {
114
- return core_1.TypedArrayEncoder.toBase64URL(data);
115
- }
116
- }
117
- class EnglishMnemonic extends crypto_1.EnglishMnemonic {
118
- }
119
- exports.EnglishMnemonic = EnglishMnemonic;
120
- EnglishMnemonic._mnemonicMatcher = /^[a-z]+( [a-z]+)*$/;
121
- function getCosmosPayerWallet(cosmosPayerSeed) {
122
- if (!cosmosPayerSeed || cosmosPayerSeed === '') {
123
- return proto_signing_1.DirectSecp256k1HdWallet.generate();
124
- }
125
- return EnglishMnemonic._mnemonicMatcher.test(cosmosPayerSeed)
126
- ? proto_signing_1.DirectSecp256k1HdWallet.fromMnemonic(cosmosPayerSeed, { prefix: 'cheqd' })
127
- : proto_signing_1.DirectSecp256k1Wallet.fromKey(core_1.TypedArrayEncoder.fromString(cosmosPayerSeed.replace(/^0x/, '')), 'cheqd');
128
- }
129
- //# sourceMappingURL=didCheqdUtil.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"didCheqdUtil.js","sourceRoot":"","sources":["../../src/dids/didCheqdUtil.ts"],"names":[],"mappings":";;;AAeA,oEAsCC;AAGD,gFAwBC;AAED,wFAOC;AAOD,wCASC;AAUD,8DASC;AAED,oEAEC;AAED,gDAQC;AAMD,oDAOC;AApJD,oCAMmB;AACnB,qDAAiG;AACjG,2CAAqD;AACrD,yDAAsF;AACtF,yCAAyG;AAEzG,SAAgB,4BAA4B,CAAC,WAAwB;;IACnE,wDAAwD;IACxD,IAAI,CAAC,WAAW,CAAC,EAAE,IAAI,CAAC,WAAW,CAAC,EAAE,CAAC,UAAU,CAAC,YAAY,CAAC;QAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,gBAAgB,EAAE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AAC,CAAC,uCAAuB,CAAC,YAAY,CAAC,eAAe,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC;QAC5E,CAAC,CAAC,qCAAqB,CAAC,OAAO,CAAC,wBAAiB,CAAC,UAAU,CAAC,eAAe,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,EAAE,OAAO,CAAC,CAAA;AAC9G,CAAC"}
@@ -1,2 +0,0 @@
1
- export { CheqdDidRegistrar, CheqdDidCreateOptions, CheqdDidDeactivateOptions, CheqdDidUpdateOptions, CheqdCreateResourceOptions, } from './CheqdDidRegistrar';
2
- export { CheqdDidResolver } from './CheqdDidResolver';
@@ -1,8 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.CheqdDidResolver = exports.CheqdDidRegistrar = void 0;
4
- var CheqdDidRegistrar_1 = require("./CheqdDidRegistrar");
5
- Object.defineProperty(exports, "CheqdDidRegistrar", { enumerable: true, get: function () { return CheqdDidRegistrar_1.CheqdDidRegistrar; } });
6
- var CheqdDidResolver_1 = require("./CheqdDidResolver");
7
- Object.defineProperty(exports, "CheqdDidResolver", { enumerable: true, get: function () { return CheqdDidResolver_1.CheqdDidResolver; } });
8
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/dids/index.ts"],"names":[],"mappings":";;;AAAA,yDAM4B;AAL1B,sHAAA,iBAAiB,OAAA;AAMnB,uDAAqD;AAA5C,oHAAA,gBAAgB,OAAA"}
package/build/index.d.ts DELETED
@@ -1,5 +0,0 @@
1
- export { CheqdDidRegistrar, CheqdDidCreateOptions, CheqdDidDeactivateOptions, CheqdDidUpdateOptions, CheqdDidResolver, } from './dids';
2
- export { CheqdAnonCredsRegistry } from './anoncreds';
3
- export { CheqdLedgerService } from './ledger';
4
- export { CheqdModule } from './CheqdModule';
5
- export { CheqdModuleConfig, CheqdModuleConfigOptions } from './CheqdModuleConfig';
package/build/index.js DELETED
@@ -1,17 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.CheqdModuleConfig = exports.CheqdModule = exports.CheqdLedgerService = exports.CheqdAnonCredsRegistry = exports.CheqdDidResolver = exports.CheqdDidRegistrar = void 0;
4
- // Dids
5
- var dids_1 = require("./dids");
6
- Object.defineProperty(exports, "CheqdDidRegistrar", { enumerable: true, get: function () { return dids_1.CheqdDidRegistrar; } });
7
- Object.defineProperty(exports, "CheqdDidResolver", { enumerable: true, get: function () { return dids_1.CheqdDidResolver; } });
8
- // AnonCreds
9
- var anoncreds_1 = require("./anoncreds");
10
- Object.defineProperty(exports, "CheqdAnonCredsRegistry", { enumerable: true, get: function () { return anoncreds_1.CheqdAnonCredsRegistry; } });
11
- var ledger_1 = require("./ledger");
12
- Object.defineProperty(exports, "CheqdLedgerService", { enumerable: true, get: function () { return ledger_1.CheqdLedgerService; } });
13
- var CheqdModule_1 = require("./CheqdModule");
14
- Object.defineProperty(exports, "CheqdModule", { enumerable: true, get: function () { return CheqdModule_1.CheqdModule; } });
15
- var CheqdModuleConfig_1 = require("./CheqdModuleConfig");
16
- Object.defineProperty(exports, "CheqdModuleConfig", { enumerable: true, get: function () { return CheqdModuleConfig_1.CheqdModuleConfig; } });
17
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,OAAO;AACP,+BAMe;AALb,yGAAA,iBAAiB,OAAA;AAIjB,wGAAA,gBAAgB,OAAA;AAGlB,YAAY;AACZ,yCAAoD;AAA3C,mHAAA,sBAAsB,OAAA;AAE/B,mCAA6C;AAApC,4GAAA,kBAAkB,OAAA;AAE3B,6CAA2C;AAAlC,0GAAA,WAAW,OAAA;AAEpB,yDAAiF;AAAxE,sHAAA,iBAAiB,OAAA"}
@@ -1,37 +0,0 @@
1
- import type { CheqdSDK, DidStdFee, DIDDocument } from '@cheqd/sdk';
2
- import type { QueryAllDidDocVersionsMetadataResponse, SignInfo } from '@cheqd/ts-proto/cheqd/did/v2';
3
- import type { MsgCreateResourcePayload } from '@cheqd/ts-proto/cheqd/resource/v2';
4
- import type { DirectSecp256k1HdWallet, DirectSecp256k1Wallet } from '@cosmjs/proto-signing';
5
- import type { DidDocumentMetadata } from '@credo-ts/core';
6
- import { Logger } from '@credo-ts/core';
7
- import { CheqdModuleConfig } from '../CheqdModuleConfig';
8
- export interface ICheqdLedgerConfig {
9
- network: string;
10
- rpcUrl: string;
11
- readonly cosmosPayerWallet: Promise<DirectSecp256k1HdWallet | DirectSecp256k1Wallet>;
12
- sdk?: Promise<CheqdSDK>;
13
- }
14
- export declare enum DefaultRPCUrl {
15
- Mainnet = "https://rpc.cheqd.net",
16
- Testnet = "https://rpc.cheqd.network"
17
- }
18
- export declare class CheqdLedgerService {
19
- private networks;
20
- private logger;
21
- constructor(cheqdSdkModuleConfig: CheqdModuleConfig, logger: Logger);
22
- connect(): Promise<void>;
23
- private getSdk;
24
- private initializeSdkForNetwork;
25
- create(didPayload: DIDDocument, signInputs: SignInfo[], versionId?: string | undefined, fee?: DidStdFee): Promise<import("@cosmjs/stargate").DeliverTxResponse>;
26
- update(didPayload: DIDDocument, signInputs: SignInfo[], versionId?: string | undefined, fee?: DidStdFee): Promise<import("@cosmjs/stargate").DeliverTxResponse>;
27
- deactivate(didPayload: DIDDocument, signInputs: SignInfo[], versionId?: string | undefined, fee?: DidStdFee): Promise<import("@cosmjs/stargate").DeliverTxResponse>;
28
- resolve(did: string, version?: string): Promise<import("@cheqd/sdk").DIDDocumentWithMetadata>;
29
- resolveMetadata(did: string): Promise<{
30
- didDocumentVersionsMetadata: DidDocumentMetadata[];
31
- pagination: QueryAllDidDocVersionsMetadataResponse['pagination'];
32
- }>;
33
- createResource(did: string, resourcePayload: Partial<MsgCreateResourcePayload>, signInputs: SignInfo[], fee?: DidStdFee): Promise<import("@cosmjs/stargate").DeliverTxResponse>;
34
- resolveResource(did: string, collectionId: string, resourceId: string): Promise<import("@cheqd/ts-proto/cheqd/resource/v2").ResourceWithMetadata>;
35
- resolveCollectionResources(did: string, collectionId: string): Promise<import("@cheqd/ts-proto/cheqd/resource/v2").QueryCollectionResourcesResponse>;
36
- resolveResourceMetadata(did: string, collectionId: string, resourceId: string): Promise<import("@cheqd/ts-proto/cheqd/resource/v2").Metadata>;
37
- }
@@ -1,135 +0,0 @@
1
- "use strict";
2
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
- return c > 3 && r && Object.defineProperty(target, key, r), r;
7
- };
8
- var __metadata = (this && this.__metadata) || function (k, v) {
9
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
- };
11
- var __param = (this && this.__param) || function (paramIndex, decorator) {
12
- return function (target, key) { decorator(target, key, paramIndex); }
13
- };
14
- Object.defineProperty(exports, "__esModule", { value: true });
15
- exports.CheqdLedgerService = exports.DefaultRPCUrl = void 0;
16
- const sdk_1 = require("@cheqd/sdk");
17
- const core_1 = require("@credo-ts/core");
18
- const CheqdModuleConfig_1 = require("../CheqdModuleConfig");
19
- const identifiers_1 = require("../anoncreds/utils/identifiers");
20
- const didCheqdUtil_1 = require("../dids/didCheqdUtil");
21
- var DefaultRPCUrl;
22
- (function (DefaultRPCUrl) {
23
- DefaultRPCUrl["Mainnet"] = "https://rpc.cheqd.net";
24
- DefaultRPCUrl["Testnet"] = "https://rpc.cheqd.network";
25
- })(DefaultRPCUrl || (exports.DefaultRPCUrl = DefaultRPCUrl = {}));
26
- let CheqdLedgerService = class CheqdLedgerService {
27
- constructor(cheqdSdkModuleConfig, logger) {
28
- this.logger = logger;
29
- this.networks = cheqdSdkModuleConfig.networks.map((config) => {
30
- const { network, rpcUrl, cosmosPayerSeed } = config;
31
- return {
32
- network,
33
- rpcUrl: rpcUrl ? rpcUrl : network === sdk_1.CheqdNetwork.Mainnet ? DefaultRPCUrl.Mainnet : DefaultRPCUrl.Testnet,
34
- cosmosPayerWallet: (0, didCheqdUtil_1.getCosmosPayerWallet)(cosmosPayerSeed),
35
- };
36
- });
37
- }
38
- async connect() {
39
- for (const network of this.networks) {
40
- if (!network.sdk) {
41
- await this.initializeSdkForNetwork(network);
42
- }
43
- else {
44
- this.logger.debug(`Not connecting to network ${network} as SDK already initialized`);
45
- }
46
- }
47
- }
48
- async getSdk(did) {
49
- const parsedDid = (0, identifiers_1.parseCheqdDid)(did);
50
- if (!parsedDid) {
51
- throw new Error('Invalid DID');
52
- }
53
- if (this.networks.length === 0) {
54
- throw new Error('No cheqd networks configured');
55
- }
56
- const network = this.networks.find((network) => network.network === parsedDid.network);
57
- if (!network) {
58
- throw new Error(`Network ${network} not found in cheqd networks configuration`);
59
- }
60
- if (!network.sdk) {
61
- const sdk = await this.initializeSdkForNetwork(network);
62
- if (!sdk)
63
- throw new Error(`Cheqd SDK not initialized for network ${parsedDid.network}`);
64
- return sdk;
65
- }
66
- try {
67
- const sdk = await network.sdk;
68
- return sdk;
69
- }
70
- catch (error) {
71
- throw new Error(`Error initializing cheqd sdk for network ${parsedDid.network}: ${error.message}`);
72
- }
73
- }
74
- async initializeSdkForNetwork(network) {
75
- try {
76
- // Initialize cheqd sdk with promise
77
- network.sdk = (0, sdk_1.createCheqdSDK)({
78
- modules: [sdk_1.DIDModule, sdk_1.ResourceModule],
79
- rpcUrl: network.rpcUrl,
80
- wallet: await network.cosmosPayerWallet.catch((error) => {
81
- throw new core_1.CredoError(`Error initializing cosmos payer wallet: ${error.message}`, { cause: error });
82
- }),
83
- });
84
- return await network.sdk;
85
- }
86
- catch (error) {
87
- this.logger.error(`Skipping connection for network ${network.network} in cheqd sdk due to error in initialization: ${error.message}`);
88
- network.sdk = undefined;
89
- return undefined;
90
- }
91
- }
92
- async create(didPayload, signInputs, versionId, fee) {
93
- const sdk = await this.getSdk(didPayload.id);
94
- return sdk.createDidDocTx(signInputs, didPayload, '', fee, undefined, versionId);
95
- }
96
- async update(didPayload, signInputs, versionId, fee) {
97
- const sdk = await this.getSdk(didPayload.id);
98
- return sdk.updateDidDocTx(signInputs, didPayload, '', fee, undefined, versionId);
99
- }
100
- async deactivate(didPayload, signInputs, versionId, fee) {
101
- const sdk = await this.getSdk(didPayload.id);
102
- return sdk.deactivateDidDocTx(signInputs, didPayload, '', fee, undefined, versionId);
103
- }
104
- async resolve(did, version) {
105
- const sdk = await this.getSdk(did);
106
- return version ? sdk.queryDidDocVersion(did, version) : sdk.queryDidDoc(did);
107
- }
108
- async resolveMetadata(did) {
109
- const sdk = await this.getSdk(did);
110
- return sdk.queryAllDidDocVersionsMetadata(did);
111
- }
112
- async createResource(did, resourcePayload, signInputs, fee) {
113
- const sdk = await this.getSdk(did);
114
- return sdk.createLinkedResourceTx(signInputs, resourcePayload, '', fee, undefined);
115
- }
116
- async resolveResource(did, collectionId, resourceId) {
117
- const sdk = await this.getSdk(did);
118
- return sdk.queryLinkedResource(collectionId, resourceId);
119
- }
120
- async resolveCollectionResources(did, collectionId) {
121
- const sdk = await this.getSdk(did);
122
- return sdk.queryLinkedResources(collectionId);
123
- }
124
- async resolveResourceMetadata(did, collectionId, resourceId) {
125
- const sdk = await this.getSdk(did);
126
- return sdk.queryLinkedResourceMetadata(collectionId, resourceId);
127
- }
128
- };
129
- exports.CheqdLedgerService = CheqdLedgerService;
130
- exports.CheqdLedgerService = CheqdLedgerService = __decorate([
131
- (0, core_1.injectable)(),
132
- __param(1, (0, core_1.inject)(core_1.InjectionSymbols.Logger)),
133
- __metadata("design:paramtypes", [CheqdModuleConfig_1.CheqdModuleConfig, Object])
134
- ], CheqdLedgerService);
135
- //# sour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AAE,YAAoB;QACvE,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAA;QAClC,OAAO,GAAG,CAAC,oBAAoB,CAAC,YAAY,CAAC,CAAA;IAC/C,CAAC;IAEM,KAAK,CAAC,uBAAuB,CAAC,GAAW,EAAE,YAAoB,EAAE,UAAkB;QACxF,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAA;QAClC,OAAO,GAAG,CAAC,2BAA2B,CAAC,YAAY,EAAE,UAAU,CAAC,CAAA;IAClE,CAAC;CACF,CAAA;AA9IY,gDAAkB;6BAAlB,kBAAkB;IAD9B,IAAA,iBAAU,GAAE;IAKkD,WAAA,IAAA,aAAM,EAAC,uBAAgB,CAAC,MAAM,CAAC,CAAA;qCAAnD,qCAAiB;GAJ/C,kBAAkB,CA8I9B"}
@@ -1 +0,0 @@
1
- export { CheqdLedgerService } from './CheqdLedgerService';
@@ -1,6 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.CheqdLedgerService = void 0;
4
- var CheqdLedgerService_1 = require("./CheqdLedgerService");
5
- Object.defineProperty(exports, "CheqdLedgerService", { enumerable: true, get: function () { return CheqdLedgerService_1.CheqdLedgerService; } });
6
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/ledger/index.ts"],"names":[],"mappings":";;;AAAA,2DAAyD;AAAhD,wHAAA,kBAAkB,OAAA"}