@2060.io/vs-agent-model 1.6.0-dev.9 → 1.6.0
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.
|
@@ -13,7 +13,8 @@ export declare class Claim {
|
|
|
13
13
|
value: string;
|
|
14
14
|
}
|
|
15
15
|
export interface CredentialIssuanceMessageOptions extends BaseMessageOptions {
|
|
16
|
-
credentialDefinitionId
|
|
16
|
+
credentialDefinitionId?: string;
|
|
17
|
+
jsonSchemaCredentialId?: string;
|
|
17
18
|
revocationRegistryDefinitionId?: string;
|
|
18
19
|
revocationRegistryIndex?: number;
|
|
19
20
|
claims?: Claim[];
|
|
@@ -23,6 +24,7 @@ export declare class CredentialIssuanceMessage extends BaseMessage {
|
|
|
23
24
|
readonly type = MessageType.CredentialIssuanceMessage;
|
|
24
25
|
static readonly type = MessageType.CredentialIssuanceMessage;
|
|
25
26
|
credentialDefinitionId?: string;
|
|
27
|
+
jsonSchemaCredentialId?: string;
|
|
26
28
|
revocationRegistryDefinitionId?: string;
|
|
27
29
|
revocationRegistryIndex?: number;
|
|
28
30
|
claims?: Claim[];
|
|
@@ -52,6 +52,7 @@ class CredentialIssuanceMessage extends BaseMessage_1.BaseMessage {
|
|
|
52
52
|
this.timestamp = (_b = options.timestamp) !== null && _b !== void 0 ? _b : new Date();
|
|
53
53
|
this.connectionId = options.connectionId;
|
|
54
54
|
this.credentialDefinitionId = options.credentialDefinitionId;
|
|
55
|
+
this.jsonSchemaCredentialId = options.jsonSchemaCredentialId;
|
|
55
56
|
this.revocationRegistryDefinitionId = options.revocationRegistryDefinitionId;
|
|
56
57
|
this.revocationRegistryIndex = options.revocationRegistryIndex;
|
|
57
58
|
this.claims = (_c = options.claims) === null || _c === void 0 ? void 0 : _c.map(item => new Claim(item));
|
|
@@ -62,8 +63,14 @@ exports.CredentialIssuanceMessage = CredentialIssuanceMessage;
|
|
|
62
63
|
CredentialIssuanceMessage.type = MessageType_1.MessageType.CredentialIssuanceMessage;
|
|
63
64
|
__decorate([
|
|
64
65
|
(0, class_validator_1.IsString)(),
|
|
66
|
+
(0, class_validator_1.IsOptional)(),
|
|
65
67
|
__metadata("design:type", String)
|
|
66
68
|
], CredentialIssuanceMessage.prototype, "credentialDefinitionId", void 0);
|
|
69
|
+
__decorate([
|
|
70
|
+
(0, class_validator_1.IsString)(),
|
|
71
|
+
(0, class_validator_1.IsOptional)(),
|
|
72
|
+
__metadata("design:type", String)
|
|
73
|
+
], CredentialIssuanceMessage.prototype, "jsonSchemaCredentialId", void 0);
|
|
67
74
|
__decorate([
|
|
68
75
|
(0, class_validator_1.IsString)(),
|
|
69
76
|
(0, class_validator_1.IsOptional)(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CredentialIssuanceMessage.js","sourceRoot":"","sources":["../../src/messages/CredentialIssuanceMessage.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,4BAAyB;AAEzB,yDAAgD;AAChD,qDAAqG;AAErG,+CAA+D;AAC/D,+CAA2C;AAQ3C,MAAa,KAAK;IAChB,YAAmB,OAAqB;QACtC,IAAI,OAAO,EAAE,CAAC;YACZ,IAAI,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,CAAA;YACxB,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAA;YAChC,IAAI,CAAC,KAAK,GAAG,OAAO,CAAC,KAAK,CAAA;QAC5B,CAAC;IACH,CAAC;CAcF;AArBD,sBAqBC;AAVQ;IAFN,IAAA,0BAAM,GAAE;IACR,IAAA,0BAAQ,GAAE;;mCACS;AAKb;IAHN,IAAA,0BAAM,GAAE;IACR,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;uCACW;AAIjB;IAFN,IAAA,0BAAM,GAAE;IACR,IAAA,0BAAQ,GAAE;;oCACU;
|
|
1
|
+
{"version":3,"file":"CredentialIssuanceMessage.js","sourceRoot":"","sources":["../../src/messages/CredentialIssuanceMessage.ts"],"names":[],"mapp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C,uBAAuB,GAAG,OAAO,CAAC,uBAAuB,CAAA;YAC9D,IAAI,CAAC,MAAM,GAAG,MAAA,OAAO,CAAC,MAAM,0CAAE,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,KAAK,CAAC,IAAI,CAAC,CAAC,CAAA;QAC5D,CAAC;IACH,CAAC;;AAfH,8DA0CC;AAxBwB,8BAAI,GAAG,yBAAW,CAAC,yBAAyB,AAAxC,CAAwC;AAI5D;IAFN,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;yEACyB;AAI/B;IAFN,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;yEACyB;AAI/B;IAFN,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;iFACiC;AAIvC;IAFN,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;0EAC0B;AAOhC;IALN,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,KAAK,CAAC;IACjB,IAAA,yBAAO,GAAE;IACT,IAAA,gCAAc,GAAE;IAChB,IAAA,4BAAU,EAAC,KAAK,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;IACjC,IAAA,4BAAU,GAAE;;yDACU"}
|
package/build/types.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { HandshakeProtocol, ReceiveOutOfBandInvitationConfig, OutOfBandDidCommService, ProofState } from '@credo-ts/core';
|
|
1
|
+
import type { HandshakeProtocol, ReceiveOutOfBandInvitationConfig, OutOfBandDidCommService, ProofState, JsonObject } from '@credo-ts/core';
|
|
2
2
|
import { Claim, ClaimOptions } from './messages/CredentialIssuanceMessage';
|
|
3
3
|
export interface VsAgentInfo {
|
|
4
4
|
label: string;
|
|
@@ -17,10 +17,20 @@ export interface CreateCredentialTypeOptions {
|
|
|
17
17
|
attributes: string[];
|
|
18
18
|
schemaId?: string;
|
|
19
19
|
supportRevocation?: boolean;
|
|
20
|
+
relatedJsonSchemaCredentialId?: string;
|
|
21
|
+
}
|
|
22
|
+
export interface CredentialIssuanceRequest {
|
|
23
|
+
format: 'jsonld' | 'anoncreds';
|
|
24
|
+
jsonSchemaCredentialId: string;
|
|
25
|
+
claims: JsonObject;
|
|
26
|
+
did?: string;
|
|
27
|
+
}
|
|
28
|
+
export interface CredentialIssuanceResponse {
|
|
29
|
+
status: number;
|
|
30
|
+
didcommInvitationUrl?: string;
|
|
31
|
+
jsonSchemaCredentialId?: string;
|
|
32
|
+
credential?: Record<string, unknown>;
|
|
20
33
|
}
|
|
21
|
-
type JsonObject = {
|
|
22
|
-
[key: string]: unknown;
|
|
23
|
-
};
|
|
24
34
|
export interface ImportCredentialTypeOptions {
|
|
25
35
|
id: string;
|
|
26
36
|
data: {
|
|
@@ -37,6 +47,7 @@ export interface CredentialTypeInfo extends CreateCredentialTypeOptions {
|
|
|
37
47
|
}
|
|
38
48
|
export interface CredentialTypeResult extends Omit<CredentialTypeInfo, 'supportRevocation'> {
|
|
39
49
|
revocationSupported: boolean;
|
|
50
|
+
relatedJsonSchemaCredentialId?: string;
|
|
40
51
|
}
|
|
41
52
|
export interface RevocationRegistryInfo {
|
|
42
53
|
credentialDefinitionId: string;
|
package/package.json
CHANGED
|
@@ -2,7 +2,11 @@
|
|
|
2
2
|
"name": "@2060.io/vs-agent-model",
|
|
3
3
|
"main": "build/index",
|
|
4
4
|
"types": "build/index",
|
|
5
|
-
"version": "1.6.0
|
|
5
|
+
"version": "1.6.0",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "https://github.com/2060-io/vs-agent"
|
|
9
|
+
},
|
|
6
10
|
"files": [
|
|
7
11
|
"build"
|
|
8
12
|
],
|
|
@@ -30,6 +34,6 @@
|
|
|
30
34
|
"clean": "rimraf -rf ./build",
|
|
31
35
|
"compile": "tsc -p tsconfig.build.json",
|
|
32
36
|
"version": "pnpm version",
|
|
33
|
-
"test": "
|
|
37
|
+
"test": "vitest"
|
|
34
38
|
}
|
|
35
39
|
}
|