@verana-labs/credo-ts-didcomm-vt-flow 1.12.0-dev.1 → 1.12.0-dev.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/build/VtFlowApi.d.ts +3 -3
- package/build/VtFlowApi.js +13 -13
- package/build/VtFlowApi.js.map +1 -1
- package/build/VtFlowModule.js +7 -7
- package/build/VtFlowModuleConfig.d.ts +3 -3
- package/build/VtFlowModuleConfig.js +2 -2
- package/build/errors/VtFlowErrorCode.d.ts +6 -6
- package/build/errors/VtFlowErrorCode.js +11 -11
- package/build/errors/VtFlowErrorCode.js.map +1 -1
- package/build/errors/buildVtFlowProblemReport.js +10 -10
- package/build/errors/buildVtFlowProblemReport.js.map +1 -1
- package/build/handlers/OnboardingRequestHandler.d.ts +10 -0
- package/build/handlers/OnboardingRequestHandler.js +17 -0
- package/build/handlers/{ValidationRequestHandler.js.map → OnboardingRequestHandler.js.map} +1 -1
- package/build/handlers/index.d.ts +1 -1
- package/build/handlers/index.js +3 -3
- package/build/handlers/index.js.map +1 -1
- package/build/index.d.ts +5 -5
- package/build/index.js +4 -4
- package/build/index.js.map +1 -1
- package/build/messages/CredentialStateChangeMessage.d.ts +1 -1
- package/build/messages/CredentialStateChangeMessage.js +1 -1
- package/build/messages/CredentialStateChangeMessage.js.map +1 -1
- package/build/messages/IssuanceRequestMessage.d.ts +7 -7
- package/build/messages/IssuanceRequestMessage.js +10 -10
- package/build/messages/IssuanceRequestMessage.js.map +1 -1
- package/build/messages/OnboardingRequestMessage.d.ts +22 -0
- package/build/messages/{ValidationRequestMessage.js → OnboardingRequestMessage.js} +23 -23
- package/build/messages/OnboardingRequestMessage.js.map +1 -0
- package/build/messages/OobLinkMessage.d.ts +1 -1
- package/build/messages/OobLinkMessage.js +1 -1
- package/build/messages/OobLinkMessage.js.map +1 -1
- package/build/messages/ValidatingMessage.d.ts +1 -1
- package/build/messages/ValidatingMessage.js +1 -1
- package/build/messages/ValidatingMessage.js.map +1 -1
- package/build/messages/VtFlowProtocol.d.ts +1 -1
- package/build/messages/VtFlowProtocol.js +2 -2
- package/build/messages/index.d.ts +3 -3
- package/build/messages/index.js +4 -4
- package/build/repository/VtFlowRecord.d.ts +11 -11
- package/build/repository/VtFlowRecord.js +5 -5
- package/build/repository/VtFlowRecord.js.map +1 -1
- package/build/repository/VtFlowRepository.d.ts +2 -2
- package/build/repository/VtFlowRepository.js +3 -3
- package/build/repository/VtFlowRepository.js.map +1 -1
- package/build/services/VtFlowService.d.ts +23 -23
- package/build/services/VtFlowService.js +51 -46
- package/build/services/VtFlowService.js.map +1 -1
- package/build/services/index.d.ts +1 -1
- package/build/types.d.ts +17 -17
- package/build/types.js +10 -10
- package/build/types.js.map +1 -1
- package/package.json +5 -5
- package/build/handlers/ValidationRequestHandler.d.ts +0 -10
- package/build/handlers/ValidationRequestHandler.js +0 -17
- package/build/messages/ValidationRequestMessage.d.ts +0 -22
- package/build/messages/ValidationRequestMessage.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IssuanceRequestMessage.js","sourceRoot":"","sources":["../../src/messages/IssuanceRequestMessage.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+CAA2G;AAC3G,yDAAgD;AAChD,qDAA6G;AAE7G,qDAAgE;AAYhE,
|
|
1
|
+
{"version":3,"file":"IssuanceRequestMessage.js","sourceRoot":"","sources":["../../src/messages/IssuanceRequestMessage.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+CAA2G;AAC3G,yDAAgD;AAChD,qDAA6G;AAE7G,qDAAgE;AAYhE,wGAAwG;AACxG,MAAa,sBAAuB,SAAQ,wBAAc;IACxD,YAAmB,OAAsC;;QACvD,KAAK,EAAE,CAAA;QAgBO,SAAI,GAAG,sBAAsB,CAAC,IAAI,CAAC,cAAc,CAAA;QAd/D,IAAI,OAAO,EAAE,CAAC;YACZ,IAAI,CAAC,EAAE,GAAG,MAAA,OAAO,CAAC,EAAE,mC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AAE;IACT,IAAA,gCAAc,EAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;IAC9B,IAAA,4BAAU,EAAC,2BAAiB,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;;4DACL"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { DidCommAttachment, DidCommMessage } from '@credo-ts/didcomm';
|
|
2
|
+
export interface OnboardingRequestMessageOptions {
|
|
3
|
+
id?: string;
|
|
4
|
+
participantId: string;
|
|
5
|
+
participantSessionId: string;
|
|
6
|
+
agentParticipantId: string;
|
|
7
|
+
walletAgentParticipantId: string;
|
|
8
|
+
claims?: Record<string, unknown>;
|
|
9
|
+
proofsAttach?: DidCommAttachment[];
|
|
10
|
+
}
|
|
11
|
+
/** Spec `onboarding-request`; opens an OnboardingProcess session and its `@id` becomes the session `thid`. */
|
|
12
|
+
export declare class OnboardingRequestMessage extends DidCommMessage {
|
|
13
|
+
constructor(options: OnboardingRequestMessageOptions);
|
|
14
|
+
static readonly type: import("@credo-ts/didcomm").ParsedMessageType;
|
|
15
|
+
readonly type: string;
|
|
16
|
+
participantId: string;
|
|
17
|
+
participantSessionId: string;
|
|
18
|
+
agentParticipantId: string;
|
|
19
|
+
walletAgentParticipantId: string;
|
|
20
|
+
claims?: Record<string, unknown>;
|
|
21
|
+
proofsAttach?: DidCommAttachment[];
|
|
22
|
+
}
|
|
@@ -9,59 +9,59 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
9
9
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.
|
|
12
|
+
exports.OnboardingRequestMessage = void 0;
|
|
13
13
|
const didcomm_1 = require("@credo-ts/didcomm");
|
|
14
14
|
const class_transformer_1 = require("class-transformer");
|
|
15
15
|
const class_validator_1 = require("class-validator");
|
|
16
16
|
const VtFlowProtocol_1 = require("./VtFlowProtocol");
|
|
17
|
-
/** Spec
|
|
18
|
-
class
|
|
17
|
+
/** Spec `onboarding-request`; opens an OnboardingProcess session and its `@id` becomes the session `thid`. */
|
|
18
|
+
class OnboardingRequestMessage extends didcomm_1.DidCommMessage {
|
|
19
19
|
constructor(options) {
|
|
20
20
|
var _a;
|
|
21
21
|
super();
|
|
22
|
-
this.type =
|
|
22
|
+
this.type = OnboardingRequestMessage.type.messageTypeUri;
|
|
23
23
|
if (options) {
|
|
24
24
|
this.id = (_a = options.id) !== null && _a !== void 0 ? _a : this.generateId();
|
|
25
|
-
this.
|
|
26
|
-
this.
|
|
27
|
-
this.
|
|
28
|
-
this.
|
|
25
|
+
this.participantId = options.participantId;
|
|
26
|
+
this.participantSessionId = options.participantSessionId;
|
|
27
|
+
this.agentParticipantId = options.agentParticipantId;
|
|
28
|
+
this.walletAgentParticipantId = options.walletAgentParticipantId;
|
|
29
29
|
this.claims = options.claims;
|
|
30
30
|
this.proofsAttach = options.proofsAttach;
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
|
-
exports.
|
|
35
|
-
|
|
34
|
+
exports.OnboardingRequestMessage = OnboardingRequestMessage;
|
|
35
|
+
OnboardingRequestMessage.type = (0, didcomm_1.parseMessageType)(VtFlowProtocol_1.VT_FLOW_ONBOARDING_REQUEST_TYPE);
|
|
36
36
|
__decorate([
|
|
37
|
-
(0, didcomm_1.IsValidMessageType)(
|
|
37
|
+
(0, didcomm_1.IsValidMessageType)(OnboardingRequestMessage.type),
|
|
38
38
|
__metadata("design:type", Object)
|
|
39
|
-
],
|
|
39
|
+
], OnboardingRequestMessage.prototype, "type", void 0);
|
|
40
40
|
__decorate([
|
|
41
|
-
(0, class_transformer_1.Expose)({ name: '
|
|
41
|
+
(0, class_transformer_1.Expose)({ name: 'participant_id' }),
|
|
42
42
|
(0, class_validator_1.IsString)(),
|
|
43
43
|
__metadata("design:type", String)
|
|
44
|
-
],
|
|
44
|
+
], OnboardingRequestMessage.prototype, "participantId", void 0);
|
|
45
45
|
__decorate([
|
|
46
|
-
(0, class_transformer_1.Expose)({ name: '
|
|
46
|
+
(0, class_transformer_1.Expose)({ name: 'participant_session_id' }),
|
|
47
47
|
(0, class_validator_1.IsUUID)('4'),
|
|
48
48
|
__metadata("design:type", String)
|
|
49
|
-
],
|
|
49
|
+
], OnboardingRequestMessage.prototype, "participantSessionId", void 0);
|
|
50
50
|
__decorate([
|
|
51
|
-
(0, class_transformer_1.Expose)({ name: '
|
|
51
|
+
(0, class_transformer_1.Expose)({ name: 'agent_participant_id' }),
|
|
52
52
|
(0, class_validator_1.IsString)(),
|
|
53
53
|
__metadata("design:type", String)
|
|
54
|
-
],
|
|
54
|
+
], OnboardingRequestMessage.prototype, "agentParticipantId", void 0);
|
|
55
55
|
__decorate([
|
|
56
|
-
(0, class_transformer_1.Expose)({ name: '
|
|
56
|
+
(0, class_transformer_1.Expose)({ name: 'wallet_agent_participant_id' }),
|
|
57
57
|
(0, class_validator_1.IsString)(),
|
|
58
58
|
__metadata("design:type", String)
|
|
59
|
-
],
|
|
59
|
+
], OnboardingRequestMessage.prototype, "walletAgentParticipantId", void 0);
|
|
60
60
|
__decorate([
|
|
61
61
|
(0, class_validator_1.IsOptional)(),
|
|
62
62
|
(0, class_validator_1.IsObject)(),
|
|
63
63
|
__metadata("design:type", Object)
|
|
64
|
-
],
|
|
64
|
+
], OnboardingRequestMessage.prototype, "claims", void 0);
|
|
65
65
|
__decorate([
|
|
66
66
|
(0, class_transformer_1.Expose)({ name: 'proofs~attach' }),
|
|
67
67
|
(0, class_transformer_1.Type)(() => didcomm_1.DidCommAttachment),
|
|
@@ -70,5 +70,5 @@ __decorate([
|
|
|
70
70
|
(0, class_validator_1.ValidateNested)({ each: true }),
|
|
71
71
|
(0, class_validator_1.IsInstance)(didcomm_1.DidCommAttachment, { each: true }),
|
|
72
72
|
__metadata("design:type", Array)
|
|
73
|
-
],
|
|
74
|
-
//# sourceMappingURL=
|
|
73
|
+
], OnboardingRequestMessage.prototype, "proofsAttach", void 0);
|
|
74
|
+
//# sourceMappingURL=OnboardingRequestMessage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OnboardingRequestMessage.js","sourceRoot":"","sources":["../../src/messages/OnboardingRequestMessage.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+CAA2G;AAC3G,yDAAgD;AAChD,qDAA6G;AAE7G,qDAAkE;AAYlE,8GAA8G;AAC9G,MAAa,wBAAyB,SAAQ,wBAAc;IAC1D,YAAmB,OAAwC;;QACzD,KAAK,EAAE,CAAA;QAgBO,SAAI,GAAG,wBAAwB,CAAC,IAAI,CAAC,cAAc,CAAA;QAdjE,IAAI,OAAO,EAAE,CAAC;YACZ,IAAI,CAAC,EAAE,GAAG,MAAA,OAAO,CAAC,EAAE,mCAAI,IAAI,CAAC,UAAU,EAAE,CAAA;YACzC,IAAI,CAAC,aAAa,GAAG,OAAO,CAAC,aAAa,CAAA;YAC1C,IAAI,CAAC,oBAAoB,GAAG,OAAO,CAAC,oBAAoB,CAAA;YACxD,IAAI,CAAC,kBAAkB,GAAG,OAAO,CAAC,kBAAkB,CAAA;YACpD,IAAI,CAAC,wBAAwB,GAAG,OAAO,CAAC,wBAAwB,CAAA;YAChE,IAAI,CAAC,MAAM,GAAG,OAAO,CAAC,MAAM,CAAA;YAC5B,IAAI,CAAC,YAAY,GAAG,OAAO,CAAC,YAAY,CAAA;QAC1C,CAAC;IACH,CAAC;;AAbH,4DA+CC;AAhCwB,6BAAI,GAAG,IAAA,0BAAgB,EAAC,gDAA+B,CAAC,AAApD,CAAoD;AAG/D;IADf,IAAA,4BAAkB,EAAC,wBAAwB,CAAC,IAAI,CAAC;;sDACiB;AAI5D;IAFN,IAAA,0BAAM,EAAC,EAAE,IAAI,EAAE,gBAAgB,EAAE,CAAC;IAClC,IAAA,0BAAQ,GAAE;;+DACkB;AAItB;IAFN,IAAA,0BAAM,EAAC,EAAE,IAAI,EAAE,wBAAwB,EAAE,CAAC;IAC1C,IAAA,wBAAM,EAAC,GAAG,CAAC;;sEACwB;AAI7B;IAFN,IAAA,0BAAM,EAAC,EAAE,IAAI,EAAE,sBAAsB,EAAE,CAAC;IACxC,IAAA,0BAAQ,GAAE;;oEACuB;AAI3B;IAFN,IAAA,0BAAM,EAAC,EAAE,IAAI,EAAE,6BAA6B,EAAE,CAAC;IAC/C,IAAA,0BAAQ,GAAE;;0EAC6B;AAIjC;IAFN,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;wDAC4B;AAQhC;IANN,IAAA,0BAAM,EAAC,EAAE,IAAI,EAAE,eAAe,EAAE,CAAC;IACjC,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,2BAAiB,CAAC;IAC7B,IAAA,4BAAU,GAAE;IACZ,IAAA,yBAAO,GAAE;IACT,IAAA,gCAAc,EAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;IAC9B,IAAA,4BAAU,EAAC,2BAAiB,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;;8DACL"}
|
|
@@ -6,7 +6,7 @@ export interface OobLinkMessageOptions {
|
|
|
6
6
|
description: string;
|
|
7
7
|
expiresTime?: Date;
|
|
8
8
|
}
|
|
9
|
-
/** Spec
|
|
9
|
+
/** Spec `oob-link`; Validator asks the Applicant to complete an action outside DIDComm, threaded on the vt-flow session `thid`. */
|
|
10
10
|
export declare class OobLinkMessage extends DidCommMessage {
|
|
11
11
|
constructor(options: OobLinkMessageOptions);
|
|
12
12
|
static readonly type: import("@credo-ts/didcomm").ParsedMessageType;
|
|
@@ -14,7 +14,7 @@ const didcomm_1 = require("@credo-ts/didcomm");
|
|
|
14
14
|
const class_transformer_1 = require("class-transformer");
|
|
15
15
|
const class_validator_1 = require("class-validator");
|
|
16
16
|
const VtFlowProtocol_1 = require("./VtFlowProtocol");
|
|
17
|
-
/** Spec
|
|
17
|
+
/** Spec `oob-link`; Validator asks the Applicant to complete an action outside DIDComm, threaded on the vt-flow session `thid`. */
|
|
18
18
|
class OobLinkMessage extends didcomm_1.DidCommMessage {
|
|
19
19
|
constructor(options) {
|
|
20
20
|
var _a;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OobLinkMessage.js","sourceRoot":"","sources":["../../src/messages/OobLinkMessage.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+CAAwF;AACxF,yDAAqD;AACrD,qDAAqE;AAErE,qDAAwD;AAUxD,
|
|
1
|
+
{"version":3,"file":"OobLinkMessage.js","sourceRoot":"","sources":["../../src/messages/OobLinkMessage.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+CAAwF;AACxF,yDAAqD;AACrD,qDAAqE;AAErE,qDAAwD;AAUxD,mIAAmI;AACnI,MAAa,cAAe,SAAQ,wBAAc;IAChD,YAAmB,OAA8B;;QAC/C,KAAK,EAAE,CAAA;QAeO,SAAI,GAAG,cAAc,CAAC,IAAI,CAAC,cAAc,CAAA;QAbvD,IAAI,OAAO,EAAE,CAAC;YACZ,IAAI,CAAC,EAAE,GAAG,MAAA,OAAO,CAAC,EAAE,mCAAI,IAAI,CAAC,UAAU,EAAE,CAAA;YACzC,IAAI,CAAC,GAAG,GAAG,OAAO,CAAC,GAAG,CAAA;YACtB,IAAI,CAAC,WAAW,GAAG,OAAO,CAAC,WAAW,CAAA;YACtC,IAAI,CAAC,WAAW,GAAG,OAAO,CAAC,WAAW,CAAA;YAEtC,IAAI,CAAC,SAAS,CAAC,EAAE,QAAQ,EAAE,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAA;QAChD,CAAC;IACH,CAAC;;AAZH,wCA8BC;AAhBwB,mBAAI,GAAG,IAAA,0BAAgB,EAAC,sCAAqB,CAAC,AAA1C,CAA0C;AAGrD;IADf,IAAA,4BAAkB,EAAC,cAAc,CAAC,IAAI,CAAC;;4CACiB;AAGlD;IADN,IAAA,uBAAK,EAAC,EAAE,WAAW,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC;;2CACjC;AAGZ;IADN,IAAA,0BAAQ,GAAE;;mDACgB;AAMpB;IAJN,IAAA,0BAAM,EAAC,EAAE,IAAI,EAAE,cAAc,EAAE,CAAC;IAChC,IAAA,6BAAS,EAAC,CAAC,EAAE,KAAK,EAAsB,EAAE,EAAE,CAAC,CAAC,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;IACnG,IAAA,4BAAU,GAAE;IACZ,IAAA,wBAAM,GAAE;8BACY,IAAI;mDAAA"}
|
|
@@ -4,7 +4,7 @@ export interface ValidatingMessageOptions {
|
|
|
4
4
|
threadId: string;
|
|
5
5
|
comment?: string;
|
|
6
6
|
}
|
|
7
|
-
/** Spec
|
|
7
|
+
/** Spec `validating`; informational Validator status update sent while validation is in progress. */
|
|
8
8
|
export declare class ValidatingMessage extends DidCommMessage {
|
|
9
9
|
constructor(options: ValidatingMessageOptions);
|
|
10
10
|
static readonly type: import("@credo-ts/didcomm").ParsedMessageType;
|
|
@@ -13,7 +13,7 @@ exports.ValidatingMessage = void 0;
|
|
|
13
13
|
const didcomm_1 = require("@credo-ts/didcomm");
|
|
14
14
|
const class_validator_1 = require("class-validator");
|
|
15
15
|
const VtFlowProtocol_1 = require("./VtFlowProtocol");
|
|
16
|
-
/** Spec
|
|
16
|
+
/** Spec `validating`; informational Validator status update sent while validation is in progress. */
|
|
17
17
|
class ValidatingMessage extends didcomm_1.DidCommMessage {
|
|
18
18
|
constructor(options) {
|
|
19
19
|
var _a;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ValidatingMessage.js","sourceRoot":"","sources":["../../src/messages/ValidatingMessage.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+CAAwF;AACxF,qDAAsD;AAEtD,qDAA0D;AAQ1D,
|
|
1
|
+
{"version":3,"file":"ValidatingMessage.js","sourceRoot":"","sources":["../../src/messages/ValidatingMessage.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+CAAwF;AACxF,qDAAsD;AAEtD,qDAA0D;AAQ1D,qGAAqG;AACrG,MAAa,iBAAkB,SAAQ,wBAAc;IACnD,YAAmB,OAAiC;;QAClD,KAAK,EAAE,CAAA;QAaO,SAAI,GAAG,iBAAiB,CAAC,IAAI,CAAC,cAAc,CAAA;QAX1D,IAAI,OAAO,EAAE,CAAC;YACZ,IAAI,CAAC,EAAE,GAAG,MAAA,OAAO,CAAC,EAAE,mCAAI,IAAI,CAAC,UAAU,EAAE,CAAA;YACzC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC,OAAO,CAAA;YAE9B,IAAI,CAAC,SAAS,CAAC,EAAE,QAAQ,EAAE,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAA;QAChD,CAAC;IACH,CAAC;;AAVH,8CAoBC;AARwB,sBAAI,GAAG,IAAA,0BAAgB,EAAC,wCAAuB,CAAC,AAA5C,CAA4C;AAGvD;IADf,IAAA,4BAAkB,EAAC,iBAAiB,CAAC,IAAI,CAAC;;+CACiB;AAIrD;IAFN,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;kDACY"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/** Canonical URIs for the five vt-flow superprotocol messages. */
|
|
2
2
|
export declare const VT_FLOW_PROTOCOL_URI: "https://didcomm.org/vt-flow/1.0";
|
|
3
|
-
export declare const
|
|
3
|
+
export declare const VT_FLOW_ONBOARDING_REQUEST_TYPE: "https://didcomm.org/vt-flow/1.0/onboarding-request";
|
|
4
4
|
export declare const VT_FLOW_ISSUANCE_REQUEST_TYPE: "https://didcomm.org/vt-flow/1.0/issuance-request";
|
|
5
5
|
export declare const VT_FLOW_OOB_LINK_TYPE: "https://didcomm.org/vt-flow/1.0/oob-link";
|
|
6
6
|
export declare const VT_FLOW_VALIDATING_TYPE: "https://didcomm.org/vt-flow/1.0/validating";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.VT_FLOW_CREDENTIAL_STATE_CHANGE_TYPE = exports.VT_FLOW_VALIDATING_TYPE = exports.VT_FLOW_OOB_LINK_TYPE = exports.VT_FLOW_ISSUANCE_REQUEST_TYPE = exports.
|
|
3
|
+
exports.VT_FLOW_CREDENTIAL_STATE_CHANGE_TYPE = exports.VT_FLOW_VALIDATING_TYPE = exports.VT_FLOW_OOB_LINK_TYPE = exports.VT_FLOW_ISSUANCE_REQUEST_TYPE = exports.VT_FLOW_ONBOARDING_REQUEST_TYPE = exports.VT_FLOW_PROTOCOL_URI = void 0;
|
|
4
4
|
/** Canonical URIs for the five vt-flow superprotocol messages. */
|
|
5
5
|
exports.VT_FLOW_PROTOCOL_URI = 'https://didcomm.org/vt-flow/1.0';
|
|
6
|
-
exports.
|
|
6
|
+
exports.VT_FLOW_ONBOARDING_REQUEST_TYPE = `${exports.VT_FLOW_PROTOCOL_URI}/onboarding-request`;
|
|
7
7
|
exports.VT_FLOW_ISSUANCE_REQUEST_TYPE = `${exports.VT_FLOW_PROTOCOL_URI}/issuance-request`;
|
|
8
8
|
exports.VT_FLOW_OOB_LINK_TYPE = `${exports.VT_FLOW_PROTOCOL_URI}/oob-link`;
|
|
9
9
|
exports.VT_FLOW_VALIDATING_TYPE = `${exports.VT_FLOW_PROTOCOL_URI}/validating`;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { VT_FLOW_PROTOCOL_URI,
|
|
2
|
-
export {
|
|
3
|
-
export type {
|
|
1
|
+
export { VT_FLOW_PROTOCOL_URI, VT_FLOW_ONBOARDING_REQUEST_TYPE, VT_FLOW_ISSUANCE_REQUEST_TYPE, VT_FLOW_OOB_LINK_TYPE, VT_FLOW_VALIDATING_TYPE, VT_FLOW_CREDENTIAL_STATE_CHANGE_TYPE, } from './VtFlowProtocol';
|
|
2
|
+
export { OnboardingRequestMessage } from './OnboardingRequestMessage';
|
|
3
|
+
export type { OnboardingRequestMessageOptions } from './OnboardingRequestMessage';
|
|
4
4
|
export { IssuanceRequestMessage } from './IssuanceRequestMessage';
|
|
5
5
|
export type { IssuanceRequestMessageOptions } from './IssuanceRequestMessage';
|
|
6
6
|
export { OobLinkMessage } from './OobLinkMessage';
|
package/build/messages/index.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.VtCredentialState = exports.CredentialStateChangeMessage = exports.ValidatingMessage = exports.OobLinkMessage = exports.IssuanceRequestMessage = exports.
|
|
3
|
+
exports.VtCredentialState = exports.CredentialStateChangeMessage = exports.ValidatingMessage = exports.OobLinkMessage = exports.IssuanceRequestMessage = exports.OnboardingRequestMessage = exports.VT_FLOW_CREDENTIAL_STATE_CHANGE_TYPE = exports.VT_FLOW_VALIDATING_TYPE = exports.VT_FLOW_OOB_LINK_TYPE = exports.VT_FLOW_ISSUANCE_REQUEST_TYPE = exports.VT_FLOW_ONBOARDING_REQUEST_TYPE = exports.VT_FLOW_PROTOCOL_URI = void 0;
|
|
4
4
|
var VtFlowProtocol_1 = require("./VtFlowProtocol");
|
|
5
5
|
Object.defineProperty(exports, "VT_FLOW_PROTOCOL_URI", { enumerable: true, get: function () { return VtFlowProtocol_1.VT_FLOW_PROTOCOL_URI; } });
|
|
6
|
-
Object.defineProperty(exports, "
|
|
6
|
+
Object.defineProperty(exports, "VT_FLOW_ONBOARDING_REQUEST_TYPE", { enumerable: true, get: function () { return VtFlowProtocol_1.VT_FLOW_ONBOARDING_REQUEST_TYPE; } });
|
|
7
7
|
Object.defineProperty(exports, "VT_FLOW_ISSUANCE_REQUEST_TYPE", { enumerable: true, get: function () { return VtFlowProtocol_1.VT_FLOW_ISSUANCE_REQUEST_TYPE; } });
|
|
8
8
|
Object.defineProperty(exports, "VT_FLOW_OOB_LINK_TYPE", { enumerable: true, get: function () { return VtFlowProtocol_1.VT_FLOW_OOB_LINK_TYPE; } });
|
|
9
9
|
Object.defineProperty(exports, "VT_FLOW_VALIDATING_TYPE", { enumerable: true, get: function () { return VtFlowProtocol_1.VT_FLOW_VALIDATING_TYPE; } });
|
|
10
10
|
Object.defineProperty(exports, "VT_FLOW_CREDENTIAL_STATE_CHANGE_TYPE", { enumerable: true, get: function () { return VtFlowProtocol_1.VT_FLOW_CREDENTIAL_STATE_CHANGE_TYPE; } });
|
|
11
|
-
var
|
|
12
|
-
Object.defineProperty(exports, "
|
|
11
|
+
var OnboardingRequestMessage_1 = require("./OnboardingRequestMessage");
|
|
12
|
+
Object.defineProperty(exports, "OnboardingRequestMessage", { enumerable: true, get: function () { return OnboardingRequestMessage_1.OnboardingRequestMessage; } });
|
|
13
13
|
var IssuanceRequestMessage_1 = require("./IssuanceRequestMessage");
|
|
14
14
|
Object.defineProperty(exports, "IssuanceRequestMessage", { enumerable: true, get: function () { return IssuanceRequestMessage_1.IssuanceRequestMessage; } });
|
|
15
15
|
var OobLinkMessage_1 = require("./OobLinkMessage");
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import type { RecordTags, TagsBase } from '@credo-ts/core';
|
|
2
2
|
import { BaseRecord } from '@credo-ts/core';
|
|
3
3
|
import { VtFlowRole, VtFlowState, VtFlowVariant } from '../types';
|
|
4
|
-
/** Indexed storage tags queryable through `VtFlowRepository`; `
|
|
4
|
+
/** Indexed storage tags queryable through `VtFlowRepository`; `participantId` is OnboardingProcess-only and `schemaId` is DirectIssuance-only. */
|
|
5
5
|
export type DefaultVtFlowTags = {
|
|
6
6
|
threadId: string;
|
|
7
|
-
|
|
7
|
+
participantSessionId: string;
|
|
8
8
|
connectionId: string;
|
|
9
9
|
role: VtFlowRole;
|
|
10
10
|
flowState: VtFlowState;
|
|
11
11
|
flowVariant: VtFlowVariant;
|
|
12
|
-
|
|
12
|
+
participantId?: string;
|
|
13
13
|
schemaId?: string;
|
|
14
14
|
credentialExchangeRecordId?: string;
|
|
15
15
|
subprotocolThid?: string;
|
|
@@ -20,14 +20,14 @@ export interface VtFlowStorageProps {
|
|
|
20
20
|
id?: string;
|
|
21
21
|
createdAt?: Date;
|
|
22
22
|
threadId: string;
|
|
23
|
-
|
|
23
|
+
participantSessionId: string;
|
|
24
24
|
connectionId: string;
|
|
25
25
|
role: VtFlowRole;
|
|
26
26
|
state: VtFlowState;
|
|
27
27
|
variant: VtFlowVariant;
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
28
|
+
agentParticipantId: string;
|
|
29
|
+
walletAgentParticipantId: string;
|
|
30
|
+
participantId?: string;
|
|
31
31
|
schemaId?: string;
|
|
32
32
|
claims?: Record<string, unknown>;
|
|
33
33
|
credentialExchangeRecordId?: string;
|
|
@@ -40,14 +40,14 @@ export declare class VtFlowRecord extends BaseRecord<DefaultVtFlowTags, CustomVt
|
|
|
40
40
|
static readonly type = "VtFlowRecord";
|
|
41
41
|
readonly type = "VtFlowRecord";
|
|
42
42
|
threadId: string;
|
|
43
|
-
|
|
43
|
+
participantSessionId: string;
|
|
44
44
|
connectionId: string;
|
|
45
45
|
role: VtFlowRole;
|
|
46
46
|
state: VtFlowState;
|
|
47
47
|
variant: VtFlowVariant;
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
48
|
+
agentParticipantId: string;
|
|
49
|
+
walletAgentParticipantId: string;
|
|
50
|
+
participantId?: string;
|
|
51
51
|
schemaId?: string;
|
|
52
52
|
claims?: Record<string, unknown>;
|
|
53
53
|
credentialExchangeRecordId?: string;
|
|
@@ -13,14 +13,14 @@ class VtFlowRecord extends core_1.BaseRecord {
|
|
|
13
13
|
this.createdAt = (_b = props.createdAt) !== null && _b !== void 0 ? _b : new Date();
|
|
14
14
|
this._tags = (_c = props.tags) !== null && _c !== void 0 ? _c : {};
|
|
15
15
|
this.threadId = props.threadId;
|
|
16
|
-
this.
|
|
16
|
+
this.participantSessionId = props.participantSessionId;
|
|
17
17
|
this.connectionId = props.connectionId;
|
|
18
18
|
this.role = props.role;
|
|
19
19
|
this.state = props.state;
|
|
20
20
|
this.variant = props.variant;
|
|
21
|
-
this.
|
|
22
|
-
this.
|
|
23
|
-
this.
|
|
21
|
+
this.agentParticipantId = props.agentParticipantId;
|
|
22
|
+
this.walletAgentParticipantId = props.walletAgentParticipantId;
|
|
23
|
+
this.participantId = props.participantId;
|
|
24
24
|
this.schemaId = props.schemaId;
|
|
25
25
|
this.claims = props.claims;
|
|
26
26
|
this.credentialExchangeRecordId = props.credentialExchangeRecordId;
|
|
@@ -29,7 +29,7 @@ class VtFlowRecord extends core_1.BaseRecord {
|
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
31
|
getTags() {
|
|
32
|
-
return Object.assign(Object.assign({}, this._tags), { threadId: this.threadId,
|
|
32
|
+
return Object.assign(Object.assign({}, this._tags), { threadId: this.threadId, participantSessionId: this.participantSessionId, connectionId: this.connectionId, role: this.role, flowState: this.state, flowVariant: this.variant, participantId: this.participantId, schemaId: this.schemaId, credentialExchangeRecordId: this.credentialExchangeRecordId, subprotocolThid: this.subprotocolThid });
|
|
33
33
|
}
|
|
34
34
|
assertRole(expectedRole) {
|
|
35
35
|
if (this.role !== expectedRole) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VtFlowRecord.js","sourceRoot":"","sources":["../../src/repository/VtFlowRecord.ts"],"names":[],"mappings":";;;AAEA,yCAA8D;AAgD9D,uGAAuG;AACvG,MAAa,YAAa,SAAQ,iBAA+C;IAwB/E,YAAmB,KAAyB;;QAC1C,KAAK,EAAE,CAAA;QAvBO,SAAI,GAAG,YAAY,CAAC,IAAI,CAAA;QAyBtC,IAAI,KAAK,EAAE,CAAC;YACV,IAAI,CAAC,EAAE,GAAG,MAAA,KAAK,CAAC,EAAE,mCAAI,YAAK,CAAC,IAAI,EAAE,CAAA;YAClC,IAAI,CAAC,SAAS,GAAG,MAAA,KAAK,CAAC,SAAS,mCAAI,IAAI,IAAI,EAAE,C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CAAC,GAAG,CAAC,CAAA;QACzG,CAAC;IACH,CAAC;IAEM,aAAa,CAAC,eAA8B;QACjD,IAAI,IAAI,CAAC,OAAO,KAAK,eAAe,EAAE,CAAC;YACrC,MAAM,IAAI,iBAAU,CAAC,6BAA6B,IAAI,CAAC,OAAO,gBAAgB,eAAe,IAAI,CAAC,CAAA;QACpG,CAAC;IACH,CAAC;;AAvFH,oCAwFC;AAvFwB,iBAAI,GAAG,cAAc,AAAjB,CAAiB"}
|
|
@@ -2,11 +2,11 @@ import type { AgentContext, StorageService } from '@credo-ts/core';
|
|
|
2
2
|
import { EventEmitter, Repository } from '@credo-ts/core';
|
|
3
3
|
import { VtFlowRole } from '../types';
|
|
4
4
|
import { VtFlowRecord } from './VtFlowRecord';
|
|
5
|
-
/** Credo repository for `VtFlowRecord`; exposes typed lookups by thread, session
|
|
5
|
+
/** Credo repository for `VtFlowRecord`; exposes typed lookups by thread, participant session id, subprotocol `thid`, credential exchange, and connection. */
|
|
6
6
|
export declare class VtFlowRepository extends Repository<VtFlowRecord> {
|
|
7
7
|
constructor(storageService: StorageService<VtFlowRecord>, eventEmitter: EventEmitter);
|
|
8
8
|
findByThreadId(agentContext: AgentContext, threadId: string): Promise<VtFlowRecord | null>;
|
|
9
|
-
|
|
9
|
+
findByParticipantSessionId(agentContext: AgentContext, participantSessionId: string, role?: VtFlowRole): Promise<VtFlowRecord | null>;
|
|
10
10
|
findByCredentialExchangeRecordId(agentContext: AgentContext, credentialExchangeRecordId: string): Promise<VtFlowRecord | null>;
|
|
11
11
|
findBySubprotocolThid(agentContext: AgentContext, subprotocolThid: string): Promise<VtFlowRecord | null>;
|
|
12
12
|
findByConnectionId(agentContext: AgentContext, connectionId: string): Promise<VtFlowRecord[]>;
|
|
@@ -15,7 +15,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
15
15
|
exports.VtFlowRepository = void 0;
|
|
16
16
|
const core_1 = require("@credo-ts/core");
|
|
17
17
|
const VtFlowRecord_1 = require("./VtFlowRecord");
|
|
18
|
-
/** Credo repository for `VtFlowRecord`; exposes typed lookups by thread, session
|
|
18
|
+
/** Credo repository for `VtFlowRecord`; exposes typed lookups by thread, participant session id, subprotocol `thid`, credential exchange, and connection. */
|
|
19
19
|
let VtFlowRepository = class VtFlowRepository extends core_1.Repository {
|
|
20
20
|
constructor(storageService, eventEmitter) {
|
|
21
21
|
super(VtFlowRecord_1.VtFlowRecord, storageService, eventEmitter);
|
|
@@ -23,8 +23,8 @@ let VtFlowRepository = class VtFlowRepository extends core_1.Repository {
|
|
|
23
23
|
findByThreadId(agentContext, threadId) {
|
|
24
24
|
return this.findSingleByQuery(agentContext, { threadId });
|
|
25
25
|
}
|
|
26
|
-
|
|
27
|
-
return this.findSingleByQuery(agentContext, Object.assign({
|
|
26
|
+
findByParticipantSessionId(agentContext, participantSessionId, role) {
|
|
27
|
+
return this.findSingleByQuery(agentContext, Object.assign({ participantSessionId }, (role !== undefined ? { role } : {})));
|
|
28
28
|
}
|
|
29
29
|
findByCredentialExchangeRecordId(agentContext, credentialExchangeRecordId) {
|
|
30
30
|
return this.findSingleByQuery(agentContext, { credentialExchangeRecordId });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VtFlowRepository.js","sourceRoot":"","sources":["../../src/repository/VtFlowRepository.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAEA,yCAA+F;AAI/F,iDAA6C;AAE7C,
|
|
1
|
+
{"version":3,"file":"VtFlowRepository.js","sourceRoot":"","sources":["../../src/repository/VtFlowRepository.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAEA,yCAA+F;AAI/F,iDAA6C;AAE7C,6JAA6J;AAEtJ,IAAM,gBAAgB,GAAtB,MAAM,gBAAiB,SAAQ,iBAAwB;IAC5D,YAC2C,cAA4C,EACrF,YAA0B;QAE1B,KAAK,CAAC,2BAAY,EAAE,cAAc,EAAE,YAAY,CAAC,CAAA;IACnD,CAAC;IAEM,cAAc,CAAC,YAA0B,EAAE,QAAgB;QAChE,OAAO,IAAI,CAAC,iBAAiB,CAAC,YAAY,EAAE,EAAE,QAAQ,EAAE,CAAC,CAAA;IAC3D,CAAC;IAEM,0BAA0B,CAC/B,YAA0B,EAC1B,oBAA4B,EAC5B,IAAiB;QAEjB,OAAO,IAAI,CAAC,iBAAiB,CAAC,YAAY,kBACxC,oBAAoB,IACjB,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EACvC,CAAA;IACJ,CAAC;IAEM,gCAAgC,CAAC,YAA0B,EAAE,0BAAkC;QACpG,OAAO,IAAI,CAAC,iBAAiB,CAAC,YAAY,EAAE,EAAE,0BAA0B,EAAE,CAAC,CAAA;IAC7E,CAAC;IAEM,qBAAqB,CAAC,YAA0B,EAAE,eAAuB;QAC9E,OAAO,IAAI,CAAC,iBAAiB,CAAC,YAAY,EAAE,EAAE,eAAe,EAAE,CAAC,CAAA;IAClE,CAAC;IAEM,kBAAkB,CAAC,YAA0B,EAAE,YAAoB;QACxE,OAAO,IAAI,CAAC,WAAW,CAAC,YAAY,EAAE,EAAE,YAAY,EAAE,CAAC,CAAA;IACzD,CAAC;CACF,CAAA;AAlCY,4CAAgB;2BAAhB,gBAAgB;IAD5B,IAAA,iBAAU,GAAE;IAGR,WAAA,IAAA,aAAM,EAAC,uBAAgB,CAAC,cAAc,CAAC,CAAA;6CAC1B,mBAAY;GAHjB,gBAAgB,CAkC5B"}
|
|
@@ -3,23 +3,23 @@ import type { DidCommCredentialExchangeRecord, DidCommInboundMessageContext } fr
|
|
|
3
3
|
import { EventEmitter } from '@credo-ts/core';
|
|
4
4
|
import { VtFlowModuleConfig } from '../VtFlowModuleConfig';
|
|
5
5
|
import { type BuildVtFlowProblemReportOptions, VtFlowErrorCode, buildVtFlowProblemReport } from '../errors';
|
|
6
|
-
import { CredentialStateChangeMessage, type CredentialStateChangeMessageOptions, IssuanceRequestMessage, OobLinkMessage, type OobLinkMessageOptions, ValidatingMessage, type ValidatingMessageOptions
|
|
6
|
+
import { CredentialStateChangeMessage, type CredentialStateChangeMessageOptions, IssuanceRequestMessage, OnboardingRequestMessage, OobLinkMessage, type OobLinkMessageOptions, ValidatingMessage, type ValidatingMessageOptions } from '../messages';
|
|
7
7
|
import { VtFlowRecord, VtFlowRepository } from '../repository';
|
|
8
8
|
import { VtFlowState } from '../types';
|
|
9
|
-
export interface
|
|
9
|
+
export interface CreateOnboardingRequestParams {
|
|
10
10
|
connectionId: string;
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
11
|
+
participantSessionId: string;
|
|
12
|
+
participantId: string;
|
|
13
|
+
agentParticipantId: string;
|
|
14
|
+
walletAgentParticipantId: string;
|
|
15
15
|
claims?: Record<string, unknown>;
|
|
16
16
|
}
|
|
17
17
|
export interface CreateIssuanceRequestParams {
|
|
18
18
|
connectionId: string;
|
|
19
|
-
|
|
19
|
+
participantSessionId: string;
|
|
20
20
|
schemaId: string;
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
agentParticipantId: string;
|
|
22
|
+
walletAgentParticipantId: string;
|
|
23
23
|
claims?: Record<string, unknown>;
|
|
24
24
|
}
|
|
25
25
|
export interface SendOobLinkParams extends Omit<OobLinkMessageOptions, 'threadId' | 'id'> {
|
|
@@ -40,29 +40,29 @@ export declare class VtFlowService {
|
|
|
40
40
|
private readonly logger;
|
|
41
41
|
private readonly config;
|
|
42
42
|
constructor(repository: VtFlowRepository, eventEmitter: EventEmitter, logger: Logger, config: VtFlowModuleConfig);
|
|
43
|
-
/** Applicant-side
|
|
44
|
-
|
|
45
|
-
message:
|
|
43
|
+
/** Applicant-side OnboardingProcess: build the outbound `onboarding-request` and persist a record in `OR_SENT`. */
|
|
44
|
+
createOnboardingProcessRecord(agentContext: AgentContext, params: CreateOnboardingRequestParams): Promise<{
|
|
45
|
+
message: OnboardingRequestMessage;
|
|
46
46
|
record: VtFlowRecord;
|
|
47
47
|
}>;
|
|
48
|
-
/** Applicant-side
|
|
48
|
+
/** Applicant-side DirectIssuance: build the outbound `issuance-request` and persist a record in `IR_SENT`. */
|
|
49
49
|
createDirectIssuanceRecord(agentContext: AgentContext, params: CreateIssuanceRequestParams): Promise<{
|
|
50
50
|
message: IssuanceRequestMessage;
|
|
51
51
|
record: VtFlowRecord;
|
|
52
52
|
}>;
|
|
53
|
-
/** Validator-side
|
|
54
|
-
|
|
55
|
-
/** Validator-side
|
|
53
|
+
/** Validator-side OnboardingProcess: create or re-attach (by `participant_session_id`) a record in `AWAITING_OR` from an inbound `onboarding-request`. */
|
|
54
|
+
processReceiveOnboardingRequest(messageContext: DidCommInboundMessageContext<OnboardingRequestMessage>): Promise<VtFlowRecord>;
|
|
55
|
+
/** Validator-side DirectIssuance counterpart of `processReceiveOnboardingRequest`, landing the record in `AWAITING_IR`. */
|
|
56
56
|
processReceiveIssuanceRequest(messageContext: DidCommInboundMessageContext<IssuanceRequestMessage>): Promise<VtFlowRecord>;
|
|
57
57
|
/** Applicant-side inbound `oob-link`; transitions the session to `OOB_PENDING`. */
|
|
58
58
|
processReceiveOobLink(messageContext: DidCommInboundMessageContext<OobLinkMessage>): Promise<VtFlowRecord>;
|
|
59
|
-
/** Applicant-side inbound `validating`;
|
|
59
|
+
/** Applicant-side inbound `validating`; OnboardingProcess applicant transitions `OR_SENT => VALIDATING`. */
|
|
60
60
|
processReceiveValidating(messageContext: DidCommInboundMessageContext<ValidatingMessage>): Promise<VtFlowRecord>;
|
|
61
61
|
/** Applicant-side inbound `credential-state-change`; v1.0 handles `REVOKED` only. */
|
|
62
62
|
processReceiveCredentialStateChange(messageContext: DidCommInboundMessageContext<CredentialStateChangeMessage>): Promise<VtFlowRecord | null>;
|
|
63
|
-
/** `
|
|
64
|
-
|
|
65
|
-
/**
|
|
63
|
+
/** `AWAITING_OR => VALIDATING`; caller is expected to have verified participant/agent/wallet IDs on-chain. */
|
|
64
|
+
acceptOnboardingRequest(agentContext: AgentContext, recordId: string): Promise<VtFlowRecord>;
|
|
65
|
+
/** DirectIssuance: `AWAITING_IR => VALIDATING`; transient before `CRED_OFFERED`. */
|
|
66
66
|
acceptIssuanceRequest(agentContext: AgentContext, recordId: string): Promise<VtFlowRecord>;
|
|
67
67
|
/** Reject with a problem-report; transitions to `TERMINATED_BY_{role}` and marks the connection as `TERMINATED`. */
|
|
68
68
|
rejectRequest(agentContext: AgentContext, recordId: string, params: RejectRequestParams): Promise<{
|
|
@@ -79,12 +79,12 @@ export declare class VtFlowService {
|
|
|
79
79
|
record: VtFlowRecord;
|
|
80
80
|
message: OobLinkMessage;
|
|
81
81
|
}>;
|
|
82
|
-
/** Build a `validating` informational message; no state change. */
|
|
82
|
+
/** Build a `validating` informational message; no state change on the Validator side. */
|
|
83
83
|
sendValidatingForSession(agentContext: AgentContext, recordId: string, params?: SendValidatingParams): Promise<{
|
|
84
84
|
record: VtFlowRecord;
|
|
85
85
|
message: ValidatingMessage;
|
|
86
86
|
}>;
|
|
87
|
-
/** `VALIDATING => VALIDATED`; call after `
|
|
87
|
+
/** `VALIDATING => VALIDATED`; call after `SetParticipantOPtoValidated` lands on-chain. */
|
|
88
88
|
markValidated(agentContext: AgentContext, recordId: string): Promise<VtFlowRecord>;
|
|
89
89
|
/** Link a Credo exchange record to the session and transition to `CRED_OFFERED`. */
|
|
90
90
|
attachCredentialExchangeRecord(agentContext: AgentContext, recordId: string, credentialExchangeRecord: DidCommCredentialExchangeRecord): Promise<VtFlowRecord>;
|
|
@@ -107,6 +107,6 @@ export declare class VtFlowService {
|
|
|
107
107
|
getModuleConfig(): VtFlowModuleConfig;
|
|
108
108
|
getLogger(): Logger;
|
|
109
109
|
buildProblemReport(options: BuildVtFlowProblemReportOptions): import("@credo-ts/didcomm").DidCommProblemReportMessage;
|
|
110
|
-
/** Spec
|
|
110
|
+
/** Spec Verifiable Service Identity Check: invokes the caller-provided VS-CONN-VS hook. Throws `vt-flow.not-a-verifiable-service` when the peer fails the check. When no hook is configured, logs a warning and permits. */
|
|
111
111
|
assertVerifiableService(agentContext: AgentContext, connectionId: string): Promise<void>;
|
|
112
112
|
}
|