@cheqd/studio 3.3.0 → 3.4.0-develop.2
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/app.d.ts.map +1 -1
- package/dist/app.js +7 -0
- package/dist/app.js.map +1 -1
- package/dist/controllers/api/accreditation.d.ts +227 -0
- package/dist/controllers/api/accreditation.d.ts.map +1 -0
- package/dist/controllers/api/accreditation.js +667 -0
- package/dist/controllers/api/accreditation.js.map +1 -0
- package/dist/controllers/validator/index.d.ts +1 -1
- package/dist/controllers/validator/index.d.ts.map +1 -1
- package/dist/controllers/validator/index.js +1 -1
- package/dist/controllers/validator/index.js.map +1 -1
- package/dist/helpers/helpers.d.ts +3 -0
- package/dist/helpers/helpers.d.ts.map +1 -1
- package/dist/helpers/helpers.js +17 -0
- package/dist/helpers/helpers.js.map +1 -1
- package/dist/middleware/auth/routes/api/accreditation-auth.d.ts +5 -0
- package/dist/middleware/auth/routes/api/accreditation-auth.d.ts.map +1 -0
- package/dist/middleware/auth/routes/api/accreditation-auth.js +21 -0
- package/dist/middleware/auth/routes/api/accreditation-auth.js.map +1 -0
- package/dist/middleware/authentication.d.ts.map +1 -1
- package/dist/middleware/authentication.js +2 -0
- package/dist/middleware/authentication.js.map +1 -1
- package/dist/services/api/accreditation.d.ts +11 -0
- package/dist/services/api/accreditation.d.ts.map +1 -0
- package/dist/services/api/accreditation.js +116 -0
- package/dist/services/api/accreditation.js.map +1 -0
- package/dist/services/api/credentials.d.ts +1 -1
- package/dist/services/api/credentials.d.ts.map +1 -1
- package/dist/services/api/credentials.js +10 -2
- package/dist/services/api/credentials.js.map +1 -1
- package/dist/services/connectors/resource.d.ts +22 -0
- package/dist/services/connectors/resource.d.ts.map +1 -0
- package/dist/services/connectors/resource.js +38 -0
- package/dist/services/connectors/resource.js.map +1 -0
- package/dist/services/w3c-credential.d.ts +1 -0
- package/dist/services/w3c-credential.d.ts.map +1 -1
- package/dist/services/w3c-credential.js +2 -0
- package/dist/services/w3c-credential.js.map +1 -1
- package/dist/static/swagger-api.json +616 -0
- package/dist/types/accreditation.d.ts +84 -0
- package/dist/types/accreditation.d.ts.map +1 -0
- package/dist/types/accreditation.js +23 -0
- package/dist/types/accreditation.js.map +1 -0
- package/dist/types/constants.d.ts.map +1 -1
- package/dist/types/constants.js +1 -1
- package/dist/types/constants.js.map +1 -1
- package/dist/types/credential.d.ts +10 -4
- package/dist/types/credential.d.ts.map +1 -1
- package/dist/types/credential.js +5 -1
- package/dist/types/credential.js.map +1 -1
- package/dist/types/swagger-api-types.d.ts +233 -0
- package/dist/types/swagger-api-types.d.ts.map +1 -1
- package/dist/types/swagger-api-types.js +233 -0
- package/dist/types/swagger-api-types.js.map +1 -1
- package/package.json +21 -21
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { VerifiableCredential } from '@veramo/core';
|
|
2
|
+
import type { CredentialRequest, PublishRequest, VerifyCredentialRequestBody } from './credential';
|
|
3
|
+
import { BulkRevocationResult, BulkSuspensionResult, BulkUnsuspensionResult, RevocationResult, SuspensionResult, UnsuspensionResult } from '@cheqd/did-provider-cheqd/build/types';
|
|
4
|
+
export declare enum DIDAccreditationTypes {
|
|
5
|
+
VerifiableAuthorisationForTrustChain = "VerifiableAuthorisationForTrustChain",
|
|
6
|
+
VerifiableAccreditationToAccredit = "VerifiableAccreditationToAccredit",
|
|
7
|
+
VerifiableAccreditationToAttest = "VerifiableAccreditationToAttest"
|
|
8
|
+
}
|
|
9
|
+
export declare enum AccreditationRequestType {
|
|
10
|
+
authorize = "authorize",
|
|
11
|
+
accredit = "accredit",
|
|
12
|
+
attest = "attest"
|
|
13
|
+
}
|
|
14
|
+
export type AccreditationSchemaType = {
|
|
15
|
+
type: string;
|
|
16
|
+
schemaId: string;
|
|
17
|
+
};
|
|
18
|
+
export type SchemaUrlType = {
|
|
19
|
+
type: string;
|
|
20
|
+
url: string;
|
|
21
|
+
};
|
|
22
|
+
export type DIDAccreditationRequestBody = Omit<CredentialRequest, 'attributes' | 'credentialSummary' | 'credentialSchema' | 'credentialName'> & {
|
|
23
|
+
schemas: SchemaUrlType[];
|
|
24
|
+
accreditationName: string;
|
|
25
|
+
attributes?: Record<string, unknown>;
|
|
26
|
+
type: string[] | undefined;
|
|
27
|
+
rootAuthorization?: string;
|
|
28
|
+
parentAccreditation?: string;
|
|
29
|
+
trustFramework?: string;
|
|
30
|
+
trustFrameworkId?: string;
|
|
31
|
+
};
|
|
32
|
+
export type DIDAccreditationRequestParams = {
|
|
33
|
+
accreditationType: 'authorize' | 'accredit' | 'attest';
|
|
34
|
+
};
|
|
35
|
+
export interface DIDUrlParams {
|
|
36
|
+
didUrl?: string;
|
|
37
|
+
did?: string;
|
|
38
|
+
resourceId?: string;
|
|
39
|
+
resourceName?: string;
|
|
40
|
+
resourceType?: string;
|
|
41
|
+
}
|
|
42
|
+
export interface VerifyAccreditationRequestBody extends Pick<VerifyCredentialRequestBody, 'policies'>, DIDUrlParams {
|
|
43
|
+
subjectDid: string;
|
|
44
|
+
schemas?: SchemaUrlType[];
|
|
45
|
+
}
|
|
46
|
+
type DidUrl = Pick<VerifyAccreditationRequestBody, 'policies' | 'subjectDid' | 'schemas'> & {
|
|
47
|
+
didUrl: string;
|
|
48
|
+
};
|
|
49
|
+
type DidAndResourceId = Pick<VerifyAccreditationRequestBody, 'policies' | 'subjectDid' | 'schemas'> & {
|
|
50
|
+
did: string;
|
|
51
|
+
resourceId: string;
|
|
52
|
+
};
|
|
53
|
+
type DidResourceNameAndType = Pick<VerifyAccreditationRequestBody, 'policies' | 'subjectDid' | 'schemas'> & {
|
|
54
|
+
did: string;
|
|
55
|
+
resourceName: string;
|
|
56
|
+
resourceType: string;
|
|
57
|
+
};
|
|
58
|
+
export type VerifyAccreditationRequest = DidUrl | DidAndResourceId | DidResourceNameAndType;
|
|
59
|
+
export declare function isDidUrl(body: DIDUrlParams): body is DidUrl;
|
|
60
|
+
export declare function isDidAndResourceId(body: DIDUrlParams): body is DidAndResourceId;
|
|
61
|
+
export declare function isDidAndResourceName(body: DIDUrlParams): body is DidResourceNameAndType;
|
|
62
|
+
export interface VerfifiableAccreditation extends VerifiableCredential {
|
|
63
|
+
credentialSubject: {
|
|
64
|
+
id: string;
|
|
65
|
+
accreditedFor: AccreditationSchemaType[];
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
export interface RevokeAccreditationRequestBody extends DIDUrlParams {
|
|
69
|
+
symmetricKey?: string;
|
|
70
|
+
}
|
|
71
|
+
export interface SuspendAccreditationRequestBody extends DIDUrlParams {
|
|
72
|
+
symmetricKey?: string;
|
|
73
|
+
}
|
|
74
|
+
export interface UnsuspendAccreditationRequestBody extends DIDUrlParams {
|
|
75
|
+
symmetricKey?: string;
|
|
76
|
+
}
|
|
77
|
+
export type RevokeAccreditationResponseBody = RevocationResult | BulkRevocationResult;
|
|
78
|
+
export type SuspendAccreditationResponseBody = SuspensionResult | BulkSuspensionResult;
|
|
79
|
+
export type UnsuspendAccreditationResponseBody = UnsuspensionResult | BulkUnsuspensionResult;
|
|
80
|
+
export type RevokeAccreditationRequestQuery = PublishRequest;
|
|
81
|
+
export type SuspendAccreditationRequestQuery = PublishRequest;
|
|
82
|
+
export type UnsuspendAccreditationRequestQuery = PublishRequest;
|
|
83
|
+
export {};
|
|
84
|
+
//# sourceMappingURL=accreditation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"accreditation.d.ts","sourceRoot":"","sources":["../../src/types/accreditation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,KAAK,EAAE,iBAAiB,EAAE,cAAc,EAAE,2BAA2B,EAAE,MAAM,cAAc,CAAC;AACnG,OAAO,EACN,oBAAoB,EACpB,oBAAoB,EACpB,sBAAsB,EACtB,gBAAgB,EAChB,gBAAgB,EAChB,kBAAkB,EAClB,MAAM,uCAAuC,CAAC;AAG/C,oBAAY,qBAAqB;IAChC,oCAA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AY,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,MAAM,+BAA+B,GAAG,gBAAgB,GAAG,oBAAoB,CAAC;AAEtF,MAAM,MAAM,gCAAgC,GAAG,gBAAgB,GAAG,oBAAoB,CAAC;AAEvF,MAAM,MAAM,kCAAkC,GAAG,kBAAkB,GAAG,sBAAsB,CAAC;AAE7F,MAAM,MAAM,+BAA+B,GAAG,cAAc,CAAC;AAE7D,MAAM,MAAM,gCAAgC,GAAG,cAAc,CAAC;AAE9D,MAAM,MAAM,kCAAkC,GAAG,cAAc,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
// Enums
|
|
2
|
+
export var DIDAccreditationTypes;
|
|
3
|
+
(function (DIDAccreditationTypes) {
|
|
4
|
+
DIDAccreditationTypes["VerifiableAuthorisationForTrustChain"] = "VerifiableAuthorisationForTrustChain";
|
|
5
|
+
DIDAccreditationTypes["VerifiableAccreditationToAccredit"] = "VerifiableAccreditationToAccredit";
|
|
6
|
+
DIDAccreditationTypes["VerifiableAccreditationToAttest"] = "VerifiableAccreditationToAttest";
|
|
7
|
+
})(DIDAccreditationTypes || (DIDAccreditationTypes = {}));
|
|
8
|
+
export var AccreditationRequestType;
|
|
9
|
+
(function (AccreditationRequestType) {
|
|
10
|
+
AccreditationRequestType["authorize"] = "authorize";
|
|
11
|
+
AccreditationRequestType["accredit"] = "accredit";
|
|
12
|
+
AccreditationRequestType["attest"] = "attest";
|
|
13
|
+
})(AccreditationRequestType || (AccreditationRequestType = {}));
|
|
14
|
+
export function isDidUrl(body) {
|
|
15
|
+
return typeof body.didUrl === 'string';
|
|
16
|
+
}
|
|
17
|
+
export function isDidAndResourceId(body) {
|
|
18
|
+
return typeof body.did === 'string' && typeof body.resourceId === 'string';
|
|
19
|
+
}
|
|
20
|
+
export function isDidAndResourceName(body) {
|
|
21
|
+
return (typeof body.did === 'string' && typeof body.resourceName === 'string' && typeof body.resourceType === 'string');
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=accreditation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"accreditation.js","sourceRoot":"","sources":["../../src/types/accreditation.ts"],"names":[],"mappings":"AAWA,QAAQ;AACR,MAAM,CAAN,IAAY,qBAIX;AAJD,WAAY,qBAAqB;IAChC,sGAA6E,CAAA;IAC7E,gGAAuE,CAAA;IACvE,4FAAmE,CAAA;AACpE,CAAC,EAJW,qBAAqB,KAArB,qBAAqB,QAIhC;AAED,MAAM,CAAN,IAAY,wBAIX;AAJD,WAAY,wBAAwB;IACnC,mDAAuB,CAAA;IACvB,iDAAqB,CAAA;IACrB,6CAAiB,CAAA;AAClB,CAAC,EAJW,wBAAwB,KAAxB,wBAAwB,QAInC;AA0DD,MAAM,UAAU,QAAQ,CAAC,IAAkB;IAC1C,OAAO,OAAO,IAAI,CAAC,MAAM,KAAK,QAAQ,CAAC;AACxC,CAAC;AAED,MAAM,UAAU,kBAAkB,CAAC,IAAkB;IACpD,OAAO,OAAO,IAAI,CAAC,GAAG,KAAK,QAAQ,IAAI,OAAO,IAAI,CAAC,UAAU,KAAK,QAAQ,CAAC;AAC5E,CAAC;AAED,MAAM,UAAU,oBAAoB,CAAC,IAAkB;IACtD,OAAO,CACN,OAAO,IAAI,CAAC,GAAG,KAAK,QAAQ,IAAI,OAAO,IAAI,CAAC,YAAY,KAAK,QAAQ,IAAI,OAAO,IAAI,CAAC,YAAY,KAAK,QAAQ,CAC9G,CAAC;AACH,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/types/constants.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAKrD,eAAO,MAAM,OAAO;;;;;;;CAGnB,CAAC;AAGF,eAAO,MAAM,oBAAoB,QAA8D,CAAC;AAChG,eAAO,MAAM,oBAAoB,KAA2D,CAAC;AAC7F,eAAO,MAAM,cAAc,SAA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BAAmB;IACjC,cAAc,mBAAmB;IACjC,cAAc,mBAAmB;IACjC,WAAW,gBAAgB;IAC3B,YAAY,iBAAiB;IAG7B,qBAAqB,0BAA0B;CAC/C;AAED,eAAO,MAAM,cAAc,iBAAiB,CAAC;AAC7C,eAAO,MAAM,mBAAmB,wBAAwB,CAAC;AACzD,eAAO,MAAM,kBAAkB,UAA2E,CAAC;AAC3G,eAAO,MAAM,6BAA6B,KAAK,CAAC;AAChD,eAAO,MAAM,qBAAqB,WAAqB,CAAC"}
|
package/dist/types/constants.js
CHANGED
|
@@ -48,7 +48,7 @@ export const FAUCET_URI = process.env.FAUCET_URI || 'https://faucet-api.cheqd.ne
|
|
|
48
48
|
export const DEFAULT_DENOM_EXPONENT = 9;
|
|
49
49
|
export const TESTNET_MINIMUM_BALANCE = process.env.TESTNET_MINIMUM_BALANCE || 1000;
|
|
50
50
|
// Verifiable Credential constants
|
|
51
|
-
export const VC_CONTEXT = ['https://www.w3.org/2018/credentials/v1'
|
|
51
|
+
export const VC_CONTEXT = ['https://www.w3.org/2018/credentials/v1'];
|
|
52
52
|
export const VC_TYPE = 'VerifiableCredential';
|
|
53
53
|
export const VC_PROOF_FORMAT = 'jwt';
|
|
54
54
|
export const VC_REMOVE_ORIGINAL_FIELDS = true;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/types/constants.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AACjC,MAAM,CAAC,MAAM,EAAE,CAAC;AAEhB,mBAAmB;AACnB,MAAM,CAAC,MAAM,OAAO,GAAG;IACtB,IAAI,EAAE,EAAE,cAAc,EAAE,kBAAkB,EAAE;IAC5C,IAAI,EAAE,EAAE,cAAc,EAAE,YAAY,EAAE;CACtC,CAAC;AAEF,wBAAwB;AACxB,MAAM,CAAC,MAAM,oBAAoB,GAAG,OAAO,CAAC,GAAG,CAAC,oBAAoB,IAAI,uBAAuB,CA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AAA;IAC7E,8FAAyE,CAAA;IACzE,kGAA6E,CAAA;IAC7E,8FAAyE,CAAA;IACzE,wEAAmD,CAAA;IACnD,0EAAqD,CAAA;IACrD,wBAAwB;IACxB,0DAAqC,CAAA;IACrC,4DAAuC,CAAA;IACvC,4DAAuC,CAAA;IACvC,8DAAyC,CAAA;IACzC,kEAA6C,CAAA;IAC7C,UAAU;IACV,sDAAiC,CAAA;IACjC,gDAA2B,CAAA;IAC3B,kEAA6C,CAAA;IAC7C,iBAAiB;IACjB,8CAAyB,CAAA;IACzB,8CAAyB,CAAA;IACzB,0CAAqB,CAAA;IACrB,0BAA0B;IAC1B,gEAA2C,CAAA;IAC3C,gEAA2C,CAAA;IAC3C,eAAe;IACf,gEAA2C,CAAA;IAC3C,gEAA2C,CAAA;IAC3C,gEAA2C,CAAA;IAC3C,gFAA2D,CAAA;IAE3D,qBAAqB;IACrB,sDAAiC,CAAA;IACjC,sDAAiC,CAAA;IACjC,sDAAiC,CAAA;IACjC,gDAA2B,CAAA;IAC3B,kDAA6B,CAAA;IAE7B,oBAAoB;IACpB,oEAA+C,CAAA;AAChD,CAAC,EAnDW,iBAAiB,KAAjB,iBAAiB,QAmD5B;AAED,MAAM,CAAC,MAAM,cAAc,GAAG,cAAc,CAAC;AAC7C,MAAM,CAAC,MAAM,mBAAmB,GAAG,qBAAqB,CAAC;AACzD,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,sBAAsB,EAAE,sBAAsB,EAAE,sBAAsB,CAAC,CAAC;AAC3G,MAAM,CAAC,MAAM,6BAA6B,GAAG,EAAE,CAAC;AAChD,MAAM,CAAC,MAAM,qBAAqB,GAAG,SAAkB,CAAC"}
|
|
@@ -3,6 +3,10 @@ import type { StatusOptions } from './credential-status.js';
|
|
|
3
3
|
import type { UnsuccessfulResponseBody } from './shared.js';
|
|
4
4
|
import type { BulkRevocationResult, BulkSuspensionResult, BulkUnsuspensionResult, RevocationResult, SuspensionResult, UnsuspensionResult } from '@cheqd/did-provider-cheqd';
|
|
5
5
|
import type { VerificationOptions } from './shared.js';
|
|
6
|
+
export declare enum CredentialConnectors {
|
|
7
|
+
Verida = 0,
|
|
8
|
+
Resource = 1
|
|
9
|
+
}
|
|
6
10
|
export interface CredentialRequest {
|
|
7
11
|
subjectDid: string;
|
|
8
12
|
attributes: Record<string, unknown>;
|
|
@@ -18,6 +22,8 @@ export interface CredentialRequest {
|
|
|
18
22
|
termsOfUse?: AdditionalData | AdditionalData[];
|
|
19
23
|
refreshService?: AdditionalData | AdditionalData[];
|
|
20
24
|
evidence?: AdditionalData | AdditionalData[];
|
|
25
|
+
connector?: CredentialConnectors;
|
|
26
|
+
credentialId?: string;
|
|
21
27
|
[x: string]: any;
|
|
22
28
|
}
|
|
23
29
|
export type AdditionalData = {
|
|
@@ -28,7 +34,7 @@ export type AdditionalData = {
|
|
|
28
34
|
export type VerificationPoliciesRequest = {
|
|
29
35
|
policies: VerificationPolicies;
|
|
30
36
|
};
|
|
31
|
-
export type
|
|
37
|
+
export type PublishRequest = {
|
|
32
38
|
publish?: boolean;
|
|
33
39
|
};
|
|
34
40
|
export type SymmetricKeyRequest = {
|
|
@@ -44,11 +50,11 @@ export type VerifyCredentialRequestBody = {
|
|
|
44
50
|
} & VerificationPoliciesRequest;
|
|
45
51
|
export type VerifyCredentialRequestQuery = VerificationOptions;
|
|
46
52
|
export type RevokeCredentialRequestBody = CredentialRequestBody;
|
|
47
|
-
export type RevokeCredentialRequestQuery =
|
|
53
|
+
export type RevokeCredentialRequestQuery = PublishRequest;
|
|
48
54
|
export type SuspendCredentialRequestBody = CredentialRequestBody;
|
|
49
|
-
export type SuspendCredentialRequestQuery =
|
|
55
|
+
export type SuspendCredentialRequestQuery = PublishRequest;
|
|
50
56
|
export type UnsuspendCredentialRequestBody = CredentialRequestBody;
|
|
51
|
-
export type UnsuspendCredentialRequestQuery =
|
|
57
|
+
export type UnsuspendCredentialRequestQuery = PublishRequest;
|
|
52
58
|
export type IssueCredentialResponseBody = VerifiableCredential;
|
|
53
59
|
export type VerifyCredentialResponseBody = IVerifyResult;
|
|
54
60
|
export type RevokeCredentialResponseBody = RevocationResult | BulkRevocationResult;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"credential.d.ts","sourceRoot":"","sources":["../../src/types/credential.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAC;AACvH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAC;AAC5D,OAAO,KAAK,EACX,oBAAoB,EACpB,oBAAoB,EACpB,sBAAsB,EACtB,gBAAgB,EAChB,gBAAgB,EAChB,kBAAkB,EAClB,MAAM,2BAA2B,CAAC;AACnC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAEvD,MAAM,WAAW,iBAAiB;IACjC,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACpC,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,cAAc,CAAC,EAAE,QAAQ,CAAC;IAC1B,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,QAAQ,GAAG,KAAK,CAAC;IACzB,gBAAgB,CAAC,EAAE,aAAa,CAAC;IACjC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,UAAU,CAAC,EAAE,cAAc,GAAG,cAAc,EAAE,CAAC;IAC/C,cAAc,CAAC,EAAE,cAAc,GAAG,cAAc,EAAE,CAAC;IACnD,QAAQ,CAAC,EAAE,cAAc,GAAG,cAAc,EAAE,CA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AAG,gBAAgB,GAAG,oBAAoB,CAAC;AAEnF,MAAM,MAAM,6BAA6B,GAAG,gBAAgB,GAAG,oBAAoB,CAAC;AAEpF,MAAM,MAAM,+BAA+B,GAAG,kBAAkB,GAAG,sBAAsB,CAAC;AAI1F,MAAM,MAAM,sCAAsC,GAAG,wBAAwB,CAAC;AAE9E,MAAM,MAAM,sCAAsC,GAAG,wBAAwB,CAAC;AAE9E,MAAM,MAAM,0CAA0C,GAAG,wBAAwB,CAAC;AAElF,MAAM,MAAM,uCAAuC,GAAG,wBAAwB,GAAG,4BAA4B,CAAC;AAE9G,MAAM,MAAM,uCAAuC,GAAG,IAAI,CAAC,gBAAgB,EAAE,SAAS,CAAC,GAAG,wBAAwB,CAAC;AAEnH,MAAM,MAAM,wCAAwC,GAAG,IAAI,CAAC,gBAAgB,EAAE,WAAW,CAAC,GAAG,wBAAwB,CAAC;AAEtH,MAAM,MAAM,0CAA0C,GACnD,IAAI,CAAC,kBAAkB,EAAE,aAAa,CAAC,GACvC,wBAAwB,CAAC"}
|
package/dist/types/credential.js
CHANGED
|
@@ -1,2 +1,6 @@
|
|
|
1
|
-
export
|
|
1
|
+
export var CredentialConnectors;
|
|
2
|
+
(function (CredentialConnectors) {
|
|
3
|
+
CredentialConnectors[CredentialConnectors["Verida"] = 0] = "Verida";
|
|
4
|
+
CredentialConnectors[CredentialConnectors["Resource"] = 1] = "Resource";
|
|
5
|
+
})(CredentialConnectors || (CredentialConnectors = {}));
|
|
2
6
|
//# sourceMappingURL=credential.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"credential.js","sourceRoot":"","sources":["../../src/types/credential.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"credential.js","sourceRoot":"","sources":["../../src/types/credential.ts"],"names":[],"mappings":"AAaA,MAAM,CAAN,IAAY,oBAGX;AAHD,WAAY,oBAAoB;IAC/B,mEAAM,CAAA;IACN,uEAAQ,CAAA;AACT,CAAC,EAHW,oBAAoB,KAApB,oBAAoB,QAG/B"}
|
|
@@ -130,6 +130,11 @@
|
|
|
130
130
|
* documentPresence: Physical,
|
|
131
131
|
* licenseNumber: 123AB4567
|
|
132
132
|
* }
|
|
133
|
+
* connector:
|
|
134
|
+
* type: string
|
|
135
|
+
* enum:
|
|
136
|
+
* - verida
|
|
137
|
+
* - resource
|
|
133
138
|
* required:
|
|
134
139
|
* - issuerDid
|
|
135
140
|
* - subjectDid
|
|
@@ -322,6 +327,227 @@
|
|
|
322
327
|
* id: did:cheqd:testnet:7bf81a20-633c-4cc7-bc4a-5a45801005e0#key-1
|
|
323
328
|
* publicKeyBase58: BTJiso1S4iSiReP6wGksSneGfiKHxz9SYcm2KknpqBJt
|
|
324
329
|
* type: Ed25519VerificationKey2018
|
|
330
|
+
* AccreditationIssueRequest:
|
|
331
|
+
* description: Input fields for the creating a Verifiable Accreditation.
|
|
332
|
+
* type: object
|
|
333
|
+
* additionalProperties: false
|
|
334
|
+
* properties:
|
|
335
|
+
* issuerDid:
|
|
336
|
+
* description: DID of the Verifiable Accreditation issuer. This needs to be a `did:cheqd` DID.
|
|
337
|
+
* type: string
|
|
338
|
+
* example: did:cheqd:testnet:7bf81a20-633c-4cc7-bc4a-5a45801005e0
|
|
339
|
+
* subjectDid:
|
|
340
|
+
* description: DID of the Verifiable Accreditation holder/subject. This needs to be a `did:cheqd` DID.
|
|
341
|
+
* type: string
|
|
342
|
+
* example: did:cheqd:testnet:z6MkhaXgBZDvotDkL5257faiztiGiC2QtKLGpbnnEGta2doK
|
|
343
|
+
* schemas:
|
|
344
|
+
* description: The list of schemas the subject DID is accredited for.
|
|
345
|
+
* type: array
|
|
346
|
+
* items:
|
|
347
|
+
* $ref: '#/components/schemas/SchemaUrl'
|
|
348
|
+
* accreditationName:
|
|
349
|
+
* description: Unique name of the Verifiable Accreditation.
|
|
350
|
+
* type: string
|
|
351
|
+
* attributes:
|
|
352
|
+
* description: JSON object containing the attributes to be included in the Accreditation.
|
|
353
|
+
* type: object
|
|
354
|
+
* '@context':
|
|
355
|
+
* description: Optional properties to be included in the `@context` property of the Accreditation.
|
|
356
|
+
* type: array
|
|
357
|
+
* items:
|
|
358
|
+
* type: string
|
|
359
|
+
* example: [https://schema.org/schema.jsonld, https://veramo.io/contexts/profile/v1]
|
|
360
|
+
* parentAccreditation:
|
|
361
|
+
* description: DID URL of the parent Verifiable Accreditation, required for accredit/attest operation.
|
|
362
|
+
* type: string
|
|
363
|
+
* rootAuthorization:
|
|
364
|
+
* description: DID URL of the root Verifiable Accreditation, required for accredit/attest operation.
|
|
365
|
+
* type: string
|
|
366
|
+
* trustFramework:
|
|
367
|
+
* description: Name or Type of the Trust Framework, required for authorize operation.
|
|
368
|
+
* type: string
|
|
369
|
+
* trustFrameworkId:
|
|
370
|
+
* description: Url of the Trust Framework, required for authorize operation.
|
|
371
|
+
* type: string
|
|
372
|
+
* type:
|
|
373
|
+
* description: Optional properties to be included in the `type` property of the Accreditation.
|
|
374
|
+
* type: array
|
|
375
|
+
* items:
|
|
376
|
+
* type: string
|
|
377
|
+
* example: [Person]
|
|
378
|
+
* expirationDate:
|
|
379
|
+
* description: Optional expiration date according to the <a href=https://www.w3.org/TR/vc-data-model/#expiration> VC Data Model specification</a>.
|
|
380
|
+
* type: string
|
|
381
|
+
* format: date-time
|
|
382
|
+
* example: 2023-06-08T13:49:28.000Z
|
|
383
|
+
* format:
|
|
384
|
+
* description: Format of the Verifiable Accreditation. Defaults to VC-JWT.
|
|
385
|
+
* type: string
|
|
386
|
+
* enum:
|
|
387
|
+
* - jwt
|
|
388
|
+
* - jsonld
|
|
389
|
+
* example: jwt
|
|
390
|
+
* credentialStatus:
|
|
391
|
+
* description: Optional `credentialStatus` properties for VC revocation or suspension. Takes `statusListName` and `statusListPurpose` as inputs.
|
|
392
|
+
* type: object
|
|
393
|
+
* required:
|
|
394
|
+
* - statusPurpose
|
|
395
|
+
* - statusListName
|
|
396
|
+
* properties:
|
|
397
|
+
* statusPurpose:
|
|
398
|
+
* type: string
|
|
399
|
+
* enum:
|
|
400
|
+
* - revocation
|
|
401
|
+
* - suspension
|
|
402
|
+
* statusListName:
|
|
403
|
+
* type: string
|
|
404
|
+
* statusListIndex:
|
|
405
|
+
* type: number
|
|
406
|
+
* statusListVersion:
|
|
407
|
+
* type: string
|
|
408
|
+
* format: date-time
|
|
409
|
+
* statusListRangeStart:
|
|
410
|
+
* type: number
|
|
411
|
+
* statusListRangeEnd:
|
|
412
|
+
* type: number
|
|
413
|
+
* indexNotIn:
|
|
414
|
+
* type: number
|
|
415
|
+
* example:
|
|
416
|
+
* statusPurpose: revocation
|
|
417
|
+
* statusListName: employee-credentials
|
|
418
|
+
* termsOfUse:
|
|
419
|
+
* description: Terms of use can be utilized by an issuer or a holder to communicate the terms under which a verifiable credential was issued.
|
|
420
|
+
* type: array
|
|
421
|
+
* items:
|
|
422
|
+
* type: object
|
|
423
|
+
* example: {
|
|
424
|
+
* type: IssuerPolicy,
|
|
425
|
+
* id: http://example.com/policies/credential/4,
|
|
426
|
+
* profile: http://example.com/profiles/credential,
|
|
427
|
+
* prohibition: [{
|
|
428
|
+
* assigner: https://example.edu/issuers/14,
|
|
429
|
+
* assignee: AllVerifiers,
|
|
430
|
+
* target: http://example.edu/credentials/3732,
|
|
431
|
+
* action: [ "Archival" ]
|
|
432
|
+
* }]
|
|
433
|
+
* }
|
|
434
|
+
* refreshService:
|
|
435
|
+
* description: RefreshService property MUST be one or more refresh services that provides enough information to the recipient's software such that the recipient can refresh the verifiable credential.
|
|
436
|
+
* type: array
|
|
437
|
+
* items:
|
|
438
|
+
* type: object
|
|
439
|
+
* example: {
|
|
440
|
+
* type: ManualRefreshService2018,
|
|
441
|
+
* id: https://example.edu/refresh/3732
|
|
442
|
+
* }
|
|
443
|
+
* evidence:
|
|
444
|
+
* description: Evidence property MUST be one or more evidence schemes providing enough information for a verifier to determine whether the evidence gathered by the issuer meets its confidence requirements for relying on the credential.
|
|
445
|
+
* type: array
|
|
446
|
+
* items:
|
|
447
|
+
* type: object
|
|
448
|
+
* example: {
|
|
449
|
+
* type: ["DocumentVerification"],
|
|
450
|
+
* id: https://example.edu/evidence/f2aeec97-fc0d-42bf-8ca7-0548192d4231,
|
|
451
|
+
* verifier: "https://example.edu/issuers/14",
|
|
452
|
+
* evidenceDocument: DriversLicense,
|
|
453
|
+
* subjectPresence: Physical,
|
|
454
|
+
* documentPresence: Physical,
|
|
455
|
+
* licenseNumber: 123AB4567
|
|
456
|
+
* }
|
|
457
|
+
* connector:
|
|
458
|
+
* type: string
|
|
459
|
+
* enum:
|
|
460
|
+
* - verida
|
|
461
|
+
* - resource
|
|
462
|
+
* required:
|
|
463
|
+
* - issuerDid
|
|
464
|
+
* - subjectDid
|
|
465
|
+
* - schemas
|
|
466
|
+
* - accreditationName
|
|
467
|
+
* example:
|
|
468
|
+
* issuerDid: did:cheqd:testnet:7bf81a20-633c-4cc7-bc4a-5a45801005e0
|
|
469
|
+
* subjectDid: did:cheqd:testnet:2582fe17-9b25-45e4-8104-1cfca430f0c3
|
|
470
|
+
* schemas:
|
|
471
|
+
* - type: MuseumPassCredential
|
|
472
|
+
* url: https://resolver.cheqd.net/1.0/identifiers/did:cheqd:testnet:0a5b94d0-a417-48ed-a6f5-4abc9e95888d?resourceName=MuseumPassCredentialSchema&resourceType=JsonSchemaValidator2018
|
|
473
|
+
* format: jwt
|
|
474
|
+
* accreditationName: authorizeAccreditation
|
|
475
|
+
* trustFramework: https://learn.cheqd.io/governance/start
|
|
476
|
+
* trustFrameworkId: cheqd Governance Framework
|
|
477
|
+
* parentAccreditation: did:cheqd:testnet:15b74787-6e48-4fd5-8020-eab24e990578?resourceName=accreditAccreditation&resourceType=VerifiableAccreditationToAccredit
|
|
478
|
+
* rootAuthorization: did:cheqd:testnet:5RpEg66jhhbmASWPXJRWrA?resourceName=authorizeAccreditation&resourceType=VerifiableAuthorisationForTrustChain
|
|
479
|
+
* credentialStatus:
|
|
480
|
+
* statusPurpose: revocation
|
|
481
|
+
* statusListName: employee-credentials
|
|
482
|
+
* statusListIndex: 10
|
|
483
|
+
* AccreditationVerifyRequest:
|
|
484
|
+
* type: object
|
|
485
|
+
* properties:
|
|
486
|
+
* subjectDid:
|
|
487
|
+
* description: DID of the Verifiable Accreditation holder/subject. This needs to be a `did:key` DID.
|
|
488
|
+
* type: string
|
|
489
|
+
* example: did:cheqd:testnet:5efa5126-c070-420f-a9c2-d22ae6eefb92
|
|
490
|
+
* didUrl:
|
|
491
|
+
* description: Verifiable Accreditation to be verified as a VC-JWT string or a JSON object.
|
|
492
|
+
* type: string
|
|
493
|
+
* example: did:cheqd:testnet:7c2b990c-3d05-4ebf-91af-f4f4d0091d2e?resourceName=cheqd-issuer-logo&resourceType=CredentialArtwork
|
|
494
|
+
* did:
|
|
495
|
+
* type: string
|
|
496
|
+
* example: did:cheqd:testnet:7c2b990c-3d05-4ebf-91af-f4f4d0091d2e
|
|
497
|
+
* resourceId:
|
|
498
|
+
* type: string
|
|
499
|
+
* example: 398cee0a-efac-4643-9f4c-74c48c72a14b
|
|
500
|
+
* resourceName:
|
|
501
|
+
* type: string
|
|
502
|
+
* example: cheqd-issuer-logo
|
|
503
|
+
* resourceType:
|
|
504
|
+
* type: string
|
|
505
|
+
* example: CredentialArtwork
|
|
506
|
+
* schemas:
|
|
507
|
+
* description: The list of schemas the subject DID is accredited for.
|
|
508
|
+
* type: array
|
|
509
|
+
* items:
|
|
510
|
+
* $ref: '#/components/schemas/SchemaUrl'
|
|
511
|
+
* policies:
|
|
512
|
+
* description: Custom verification policies to execute when verifying Accreditation.
|
|
513
|
+
* type: object
|
|
514
|
+
* properties:
|
|
515
|
+
* issuanceDate:
|
|
516
|
+
* description: Policy to skip the `issuanceDate` (`nbf`) timestamp check when set to `false`.
|
|
517
|
+
* type: boolean
|
|
518
|
+
* default: true
|
|
519
|
+
* expirationDate:
|
|
520
|
+
* description: Policy to skip the `expirationDate` (`exp`) timestamp check when set to `false`.
|
|
521
|
+
* type: boolean
|
|
522
|
+
* default: true
|
|
523
|
+
* audience:
|
|
524
|
+
* description: Policy to skip the audience check when set to `false`.
|
|
525
|
+
* type: boolean
|
|
526
|
+
* default: false
|
|
527
|
+
* required:
|
|
528
|
+
* - subjectDid
|
|
529
|
+
* AccreditationRevokeRequest:
|
|
530
|
+
* type: object
|
|
531
|
+
* properties:
|
|
532
|
+
* didUrl:
|
|
533
|
+
* description: Verifiable Accreditation to be verified as a VC-JWT string or a JSON object.
|
|
534
|
+
* type: string
|
|
535
|
+
* example: did:cheqd:testnet:7c2b990c-3d05-4ebf-91af-f4f4d0091d2e?resourceName=cheqd-issuer-logo&resourceType=CredentialArtwork
|
|
536
|
+
* did:
|
|
537
|
+
* type: string
|
|
538
|
+
* example: did:cheqd:testnet:7c2b990c-3d05-4ebf-91af-f4f4d0091d2e
|
|
539
|
+
* resourceId:
|
|
540
|
+
* type: string
|
|
541
|
+
* example: 398cee0a-efac-4643-9f4c-74c48c72a14b
|
|
542
|
+
* resourceName:
|
|
543
|
+
* type: string
|
|
544
|
+
* example: cheqd-issuer-logo
|
|
545
|
+
* resourceType:
|
|
546
|
+
* type: string
|
|
547
|
+
* example: CredentialArtwork
|
|
548
|
+
* symmetricKey:
|
|
549
|
+
* description: The symmetric key used to encrypt the StatusList2021 DID-Linked Resource. Required if the StatusList2021 DID-Linked Resource is encrypted.
|
|
550
|
+
* type: string
|
|
325
551
|
* PresentationCreateRequest:
|
|
326
552
|
* type: object
|
|
327
553
|
* required:
|
|
@@ -1345,6 +1571,13 @@
|
|
|
1345
1571
|
* type: string
|
|
1346
1572
|
* primaryEmail:
|
|
1347
1573
|
* type: string
|
|
1574
|
+
* SchemaUrl:
|
|
1575
|
+
* type: object
|
|
1576
|
+
* properties:
|
|
1577
|
+
* type:
|
|
1578
|
+
* type: string
|
|
1579
|
+
* url:
|
|
1580
|
+
* type: string
|
|
1348
1581
|
* InvalidRequest:
|
|
1349
1582
|
* description: A problem with the input fields has occurred. Additional state information plus metadata may be available in the response body.
|
|
1350
1583
|
* type: object
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"swagger-api-types.d.ts","sourceRoot":"","sources":["../../src/types/swagger-api-types.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"swagger-api-types.d.ts","sourceRoot":"","sources":["../../src/types/swagger-api-types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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