@cheqd/did-provider-cheqd 3.6.3-develop.2 → 3.6.3-develop.3
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/build/cjs/agent/ICheqd.js +10 -10
- package/build/cjs/agent/ICheqd.js.map +1 -1
- package/build/cjs/did-manager/cheqd-did-resolver.d.ts +1 -1
- package/build/cjs/did-manager/cheqd-did-resolver.d.ts.map +1 -1
- package/build/cjs/did-manager/cheqd-did-resolver.js +3 -3
- package/build/cjs/did-manager/cheqd-did-resolver.js.map +1 -1
- package/build/cjs/index.d.ts +2 -2
- package/build/cjs/index.d.ts.map +1 -1
- package/build/cjs/index.js +2 -6
- package/build/cjs/index.js.map +1 -1
- package/build/esm/agent/ICheqd.js +11 -11
- package/build/esm/agent/ICheqd.js.map +1 -1
- package/build/esm/did-manager/cheqd-did-resolver.d.ts +1 -1
- package/build/esm/did-manager/cheqd-did-resolver.d.ts.map +1 -1
- package/build/esm/did-manager/cheqd-did-resolver.js +2 -2
- package/build/esm/did-manager/cheqd-did-resolver.js.map +1 -1
- package/build/esm/index.d.ts +2 -2
- package/build/esm/index.d.ts.map +1 -1
- package/build/esm/index.js +2 -2
- package/build/esm/index.js.map +1 -1
- package/build/tsconfig.cjs.tsbuildinfo +1 -1
- package/build/tsconfig.esm.tsbuildinfo +1 -1
- package/build/tsconfig.types.tsbuildinfo +1 -1
- package/build/types/did-manager/cheqd-did-resolver.d.ts +1 -1
- package/build/types/did-manager/cheqd-did-resolver.d.ts.map +1 -1
- package/build/types/index.d.ts +2 -2
- package/build/types/index.d.ts.map +1 -1
- package/package.json +1 -7
- package/src/agent/ICheqd.ts +11 -11
- package/src/did-manager/cheqd-did-resolver.ts +2 -2
- package/src/index.ts +2 -5
|
@@ -6,7 +6,7 @@ interface Options {
|
|
|
6
6
|
* Default resolver url.
|
|
7
7
|
* @public
|
|
8
8
|
*/
|
|
9
|
-
export declare const
|
|
9
|
+
export declare const DefaultResolverUrl = "https://resolver.cheqd.net/1.0/identifiers/";
|
|
10
10
|
/**
|
|
11
11
|
* Creates a CheqdDIDResolver instance that can be used with `did-resolver`.
|
|
12
12
|
* @public
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cheqd-did-resolver.d.ts","sourceRoot":"","sources":["../../../src/did-manager/cheqd-did-resolver.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,oBAAoB,EACpB,mBAAmB,EACnB,WAAW,EACX,SAAS,EACT,UAAU,EACX,MAAM,cAAc,CAAA;AAErB,UAAU,OAAO;IACf,GAAG,EAAE,MAAM,CAAA;CACZ;AAED;;;GAGG;AACH,eAAO,MAAM,
|
|
1
|
+
{"version":3,"file":"cheqd-did-resolver.d.ts","sourceRoot":"","sources":["../../../src/did-manager/cheqd-did-resolver.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,oBAAoB,EACpB,mBAAmB,EACnB,WAAW,EACX,SAAS,EACT,UAAU,EACX,MAAM,cAAc,CAAA;AAErB,UAAU,OAAO;IACf,GAAG,EAAE,MAAM,CAAA;CACZ;AAED;;;GAGG;AACH,eAAO,MAAM,kBAAkB,gDAAgD,CAAA;AAE/E;;;GAGG;AACH,wBAAgB,WAAW,CAAC,OAAO,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CAI1E;AAED;;;GAGG;AACH,qBAAa,gBAAgB;IAC3B,OAAO,CAAC,WAAW,CAAqB;gBAE5B,OAAO,CAAC,EAAE,OAAO;IAIvB,OAAO,CACX,GAAG,EAAE,MAAM,EAEX,MAAM,EAAE,SAAS,EAEjB,OAAO,EAAE,UAAU,EAEnB,OAAO,EAAE,oBAAoB,GAC5B,OAAO,CAAC,mBAAmB,CAAC;IAY/B,KAAK,IAAI,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC;CAGrC"}
|
package/build/types/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @public
|
|
3
3
|
*/
|
|
4
4
|
export * from './did-manager/cheqd-did-provider.js';
|
|
5
|
-
export
|
|
6
|
-
export
|
|
5
|
+
export * from './did-manager/cheqd-did-resolver.js';
|
|
6
|
+
export * from './did-manager/resolver.js';
|
|
7
7
|
export * from './agent/index.js';
|
|
8
8
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,cAAc,qCAAqC,CAAA;AACnD,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,cAAc,qCAAqC,CAAA;AACnD,cAAc,qCAAqC,CAAA;AACnD,cAAc,2BAA2B,CAAA;AACzC,cAAc,kBAAkB,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cheqd/did-provider-cheqd",
|
|
3
|
-
"version": "3.6.3-develop.
|
|
3
|
+
"version": "3.6.3-develop.3",
|
|
4
4
|
"description": "Veramo SDK plugin for the did:cheqd DID method",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "Cheqd Foundation Limited (https://github.com/cheqd)",
|
|
@@ -43,12 +43,6 @@
|
|
|
43
43
|
"import": "./build/esm/utils/index.js",
|
|
44
44
|
"require": "./build/cjs/utils/index.js",
|
|
45
45
|
"default": "./build/esm/utils/index.js"
|
|
46
|
-
},
|
|
47
|
-
"./*": {
|
|
48
|
-
"types": "./build/types/*.d.ts",
|
|
49
|
-
"import": "./build/esm/*.js",
|
|
50
|
-
"require": "./build/cjs/*.js",
|
|
51
|
-
"default": "./build/esm/*.js"
|
|
52
46
|
}
|
|
53
47
|
},
|
|
54
48
|
"veramo": {
|
package/src/agent/ICheqd.ts
CHANGED
|
@@ -76,7 +76,7 @@ import {
|
|
|
76
76
|
randomFromRange,
|
|
77
77
|
toBlob,
|
|
78
78
|
} from '../utils/helpers.js'
|
|
79
|
-
import {
|
|
79
|
+
import { DefaultResolverUrl } from '../did-manager/cheqd-did-resolver.js'
|
|
80
80
|
import { AlternativeUri } from '@cheqd/ts-proto/cheqd/resource/v2/resource.js'
|
|
81
81
|
|
|
82
82
|
const debug = Debug('veramo:did-provider-cheqd')
|
|
@@ -1302,7 +1302,7 @@ export class Cheqd implements IAgentPlugin {
|
|
|
1302
1302
|
return {
|
|
1303
1303
|
created: await context.agent[BroadcastStatusList2021MethodName]({ kms: args.kms, payload, network: network as CheqdNetwork }),
|
|
1304
1304
|
resource: data[0],
|
|
1305
|
-
resourceMetadata: await Cheqd.fetchStatusList2021Metadata({ credentialStatus: { id: `${
|
|
1305
|
+
resourceMetadata: await Cheqd.fetchStatusList2021Metadata({ credentialStatus: { id: `${DefaultResolverUrl}${args.issuerDid}?resourceName=${args.statusListName}&resourceType=${DefaultStatusList2021ResourceTypes[args.statusPurpose]}`, type: 'StatusList2021Entry' } } as VerifiableCredential),
|
|
1306
1306
|
encrypted: args.encrypted,
|
|
1307
1307
|
symmetricKey: args?.returnSymmetricKey ? data[1]?.symmetricKey : undefined,
|
|
1308
1308
|
} satisfies CreateStatusList2021Result
|
|
@@ -1471,7 +1471,7 @@ export class Cheqd implements IAgentPlugin {
|
|
|
1471
1471
|
: args.issuanceOptions.credential.issuer as string
|
|
1472
1472
|
|
|
1473
1473
|
// generate status list credential
|
|
1474
|
-
const statusListCredential = `${
|
|
1474
|
+
const statusListCredential = `${DefaultResolverUrl}${issuer}?resourceName=${args.statusOptions.statusListName}&resourceType=StatusList2021Revocation`
|
|
1475
1475
|
|
|
1476
1476
|
// construct credential status
|
|
1477
1477
|
const credentialStatus = {
|
|
@@ -1522,7 +1522,7 @@ export class Cheqd implements IAgentPlugin {
|
|
|
1522
1522
|
: args.issuanceOptions.credential.issuer as string
|
|
1523
1523
|
|
|
1524
1524
|
// generate status list credential
|
|
1525
|
-
const statusListCredential = `${
|
|
1525
|
+
const statusListCredential = `${DefaultResolverUrl}${issuer}?resourceName=${args.statusOptions.statusListName}&resourceType=StatusList2021Suspension`
|
|
1526
1526
|
|
|
1527
1527
|
// construct credential status
|
|
1528
1528
|
const credentialStatus = {
|
|
@@ -1674,7 +1674,7 @@ export class Cheqd implements IAgentPlugin {
|
|
|
1674
1674
|
const resourceType = args.statusOptions.statusPurpose === 'revocation' ? 'StatusList2021Revocation' : 'StatusList2021Suspension'
|
|
1675
1675
|
|
|
1676
1676
|
// construct status list credential
|
|
1677
|
-
const statusListCredential = `${
|
|
1677
|
+
const statusListCredential = `${DefaultResolverUrl}${args.statusOptions.issuerDid}?resourceName=${args.statusOptions.statusListName}&resourceType=${resourceType}`
|
|
1678
1678
|
|
|
1679
1679
|
// construct credential status
|
|
1680
1680
|
args.credential = {
|
|
@@ -1741,7 +1741,7 @@ export class Cheqd implements IAgentPlugin {
|
|
|
1741
1741
|
if (!args.revocationOptions.statusListIndex) throw new Error('[did-provider-cheqd]: revocation: revocationOptions.statusListIndex is required')
|
|
1742
1742
|
|
|
1743
1743
|
// construct status list credential
|
|
1744
|
-
const statusListCredential = `${
|
|
1744
|
+
const statusListCredential = `${DefaultResolverUrl}${args.revocationOptions.issuerDid}?resourceName=${args.revocationOptions.statusListName}&resourceType=StatusList2021Revocation`
|
|
1745
1745
|
|
|
1746
1746
|
// construct credential status
|
|
1747
1747
|
args.credential = {
|
|
@@ -1842,7 +1842,7 @@ export class Cheqd implements IAgentPlugin {
|
|
|
1842
1842
|
if (!args.revocationOptions.statusListIndices || !args.revocationOptions.statusListIndices.length || args.revocationOptions.statusListIndices.length === 0 || !args.revocationOptions.statusListIndices.every(index => !isNaN(+index))) throw new Error('[did-provider-cheqd]: revocation: revocationOptions.statusListIndex is required and must be an array of indices')
|
|
1843
1843
|
|
|
1844
1844
|
// construct status list credential
|
|
1845
|
-
const statusListCredential = `${
|
|
1845
|
+
const statusListCredential = `${DefaultResolverUrl}${args.revocationOptions.issuerDid}?resourceName=${args.revocationOptions.statusListName}&resourceType=StatusList2021Revocation`
|
|
1846
1846
|
|
|
1847
1847
|
// construct credential status
|
|
1848
1848
|
args.credentials = args.revocationOptions.statusListIndices.map(index => ({
|
|
@@ -1932,7 +1932,7 @@ export class Cheqd implements IAgentPlugin {
|
|
|
1932
1932
|
if (!args.suspensionOptions.statusListIndex) throw new Error('[did-provider-cheqd]: suspension: suspensionOptions.statusListIndex is required')
|
|
1933
1933
|
|
|
1934
1934
|
// construct status list credential
|
|
1935
|
-
const statusListCredential = `${
|
|
1935
|
+
const statusListCredential = `${DefaultResolverUrl}${args.suspensionOptions.issuerDid}?resourceName=${args.suspensionOptions.statusListName}&resourceType=StatusList2021Suspension`
|
|
1936
1936
|
|
|
1937
1937
|
// construct credential status
|
|
1938
1938
|
args.credential = {
|
|
@@ -2030,7 +2030,7 @@ export class Cheqd implements IAgentPlugin {
|
|
|
2030
2030
|
if (!args.suspensionOptions.statusListIndices || !args.suspensionOptions.statusListIndices.length || args.suspensionOptions.statusListIndices.length === 0 || !args.suspensionOptions.statusListIndices.every(index => !isNaN(+index))) throw new Error('[did-provider-cheqd]: suspension: suspensionOptions.statusListIndex is required and must be an array of indices')
|
|
2031
2031
|
|
|
2032
2032
|
// construct status list credential
|
|
2033
|
-
const statusListCredential = `${
|
|
2033
|
+
const statusListCredential = `${DefaultResolverUrl}${args.suspensionOptions.issuerDid}?resourceName=${args.suspensionOptions.statusListName}&resourceType=StatusList2021Suspension`
|
|
2034
2034
|
|
|
2035
2035
|
// construct credential status
|
|
2036
2036
|
args.credentials = args.suspensionOptions.statusListIndices.map(index => ({
|
|
@@ -2117,7 +2117,7 @@ export class Cheqd implements IAgentPlugin {
|
|
|
2117
2117
|
if (!args.unsuspensionOptions.statusListIndex) throw new Error('[did-provider-cheqd]: unsuspension: unsuspensionOptions.statusListIndex is required')
|
|
2118
2118
|
|
|
2119
2119
|
// construct status list credential
|
|
2120
|
-
const statusListCredential = `${
|
|
2120
|
+
const statusListCredential = `${DefaultResolverUrl}${args.unsuspensionOptions.issuerDid}?resourceName=${args.unsuspensionOptions.statusListName}&resourceType=StatusList2021Suspension`
|
|
2121
2121
|
|
|
2122
2122
|
// construct credential status
|
|
2123
2123
|
args.credential = {
|
|
@@ -2215,7 +2215,7 @@ export class Cheqd implements IAgentPlugin {
|
|
|
2215
2215
|
if (!args.unsuspensionOptions.statusListIndices || !args.unsuspensionOptions.statusListIndices.length || args.unsuspensionOptions.statusListIndices.length === 0 || !args.unsuspensionOptions.statusListIndices.every(index => !isNaN(+index))) throw new Error('[did-provider-cheqd]: unsuspension: unsuspensionOptions.statusListIndex is required and must be an array of indices')
|
|
2216
2216
|
|
|
2217
2217
|
// construct status list credential
|
|
2218
|
-
const statusListCredential = `${
|
|
2218
|
+
const statusListCredential = `${DefaultResolverUrl}${args.unsuspensionOptions.issuerDid}?resourceName=${args.unsuspensionOptions.statusListName}&resourceType=StatusList2021Suspension`
|
|
2219
2219
|
|
|
2220
2220
|
// construct credential status
|
|
2221
2221
|
args.credentials = args.unsuspensionOptions.statusListIndices.map(index => ({
|
|
@@ -14,7 +14,7 @@ interface Options {
|
|
|
14
14
|
* Default resolver url.
|
|
15
15
|
* @public
|
|
16
16
|
*/
|
|
17
|
-
export const
|
|
17
|
+
export const DefaultResolverUrl = 'https://resolver.cheqd.net/1.0/identifiers/'
|
|
18
18
|
|
|
19
19
|
/**
|
|
20
20
|
* Creates a CheqdDIDResolver instance that can be used with `did-resolver`.
|
|
@@ -31,7 +31,7 @@ export function getResolver(options?: Options): Record<string, DIDResolver> {
|
|
|
31
31
|
* @public
|
|
32
32
|
*/
|
|
33
33
|
export class CheqdDidResolver {
|
|
34
|
-
private resolverUrl =
|
|
34
|
+
private resolverUrl = DefaultResolverUrl
|
|
35
35
|
|
|
36
36
|
constructor(options?: Options) {
|
|
37
37
|
if (options?.url) this.resolverUrl = options.url
|
package/src/index.ts
CHANGED
|
@@ -2,9 +2,6 @@
|
|
|
2
2
|
* @public
|
|
3
3
|
*/
|
|
4
4
|
export * from './did-manager/cheqd-did-provider.js'
|
|
5
|
-
export
|
|
6
|
-
|
|
7
|
-
getResolver
|
|
8
|
-
} from './did-manager/cheqd-did-resolver.js'
|
|
9
|
-
export { CheqdUniversalResolver } from './did-manager/resolver.js'
|
|
5
|
+
export * from './did-manager/cheqd-did-resolver.js'
|
|
6
|
+
export * from './did-manager/resolver.js'
|
|
10
7
|
export * from './agent/index.js'
|