@verana-labs/credo-ts-didcomm-vt-flow 1.12.0-dev.1 → 1.12.0-dev.11
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 +15 -15
- package/build/VtFlowApi.js.map +1 -1
- package/build/VtFlowModule.js +7 -7
- package/build/VtFlowModuleConfig.d.ts +5 -4
- package/build/VtFlowModuleConfig.js +2 -2
- package/build/VtFlowModuleConfig.js.map +1 -1
- 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 +27 -25
- package/build/services/VtFlowService.js +65 -53
- 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
package/build/VtFlowApi.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { VtFlowRecord } from './repository';
|
|
2
|
-
import type { NotifyCredentialStateChangeOptions, OfferCredentialForSessionOptions, ProblemReportDispatchOptions, SendIssuanceRequestOptions,
|
|
2
|
+
import type { NotifyCredentialStateChangeOptions, OfferCredentialForSessionOptions, ProblemReportDispatchOptions, SendIssuanceRequestOptions, SendOnboardingRequestOptions, SendOobLinkOptions } from './types';
|
|
3
3
|
import type { Query, QueryOptions } from '@credo-ts/core';
|
|
4
4
|
import type { DidCommCredentialExchangeRecord, DidCommCredentialProtocol } from '@credo-ts/didcomm';
|
|
5
5
|
import { AgentContext } from '@credo-ts/core';
|
|
@@ -16,11 +16,11 @@ export declare class VtFlowApi {
|
|
|
16
16
|
private readonly credentialsModuleConfig;
|
|
17
17
|
private readonly credentialExchangeRepository;
|
|
18
18
|
constructor(vtFlowService: VtFlowService, messageSender: DidCommMessageSender, connectionService: DidCommConnectionService, agentContext: AgentContext, config: VtFlowModuleConfig, credentialsModuleConfig: DidCommCredentialsModuleConfig<DidCommCredentialProtocol[]>, credentialExchangeRepository: DidCommCredentialExchangeRepository);
|
|
19
|
-
|
|
19
|
+
sendOnboardingRequest(options: SendOnboardingRequestOptions): Promise<VtFlowRecord>;
|
|
20
20
|
sendIssuanceRequest(options: SendIssuanceRequestOptions): Promise<VtFlowRecord>;
|
|
21
21
|
acceptReceivedCredential(vtFlowRecordId: string): Promise<VtFlowRecord>;
|
|
22
22
|
terminateSession(options: ProblemReportDispatchOptions): Promise<VtFlowRecord>;
|
|
23
|
-
|
|
23
|
+
acceptOnboardingRequest(vtFlowRecordId: string): Promise<VtFlowRecord>;
|
|
24
24
|
acceptIssuanceRequest(vtFlowRecordId: string): Promise<VtFlowRecord>;
|
|
25
25
|
rejectRequest(options: ProblemReportDispatchOptions): Promise<VtFlowRecord>;
|
|
26
26
|
sendOobLink(options: SendOobLinkOptions): Promise<VtFlowRecord>;
|
package/build/VtFlowApi.js
CHANGED
|
@@ -27,18 +27,18 @@ let VtFlowApi = class VtFlowApi {
|
|
|
27
27
|
this.credentialExchangeRepository = credentialExchangeRepository;
|
|
28
28
|
void this.config;
|
|
29
29
|
}
|
|
30
|
-
async
|
|
30
|
+
async sendOnboardingRequest(options) {
|
|
31
31
|
var _a;
|
|
32
32
|
const connection = await this.connectionService.getById(this.agentContext, options.connectionId);
|
|
33
33
|
connection.assertReady();
|
|
34
|
-
await this.vtFlowService.
|
|
35
|
-
const
|
|
36
|
-
const { message, record } = await this.vtFlowService.
|
|
34
|
+
await this.vtFlowService.checkIsVerifiableService(this.agentContext, connection);
|
|
35
|
+
const participantSessionId = (_a = options.participantSessionId) !== null && _a !== void 0 ? _a : core_1.utils.uuid();
|
|
36
|
+
const { message, record } = await this.vtFlowService.createOnboardingProcessRecord(this.agentContext, {
|
|
37
37
|
connectionId: options.connectionId,
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
38
|
+
participantSessionId,
|
|
39
|
+
participantId: options.participantId,
|
|
40
|
+
agentParticipantId: options.agentParticipantId,
|
|
41
|
+
walletAgentParticipantId: options.walletAgentParticipantId,
|
|
42
42
|
claims: options.claims,
|
|
43
43
|
});
|
|
44
44
|
const outboundMessageContext = await (0, didcomm_1.getOutboundDidCommMessageContext)(this.agentContext, {
|
|
@@ -53,14 +53,14 @@ let VtFlowApi = class VtFlowApi {
|
|
|
53
53
|
var _a;
|
|
54
54
|
const connection = await this.connectionService.getById(this.agentContext, options.connectionId);
|
|
55
55
|
connection.assertReady();
|
|
56
|
-
await this.vtFlowService.
|
|
57
|
-
const
|
|
56
|
+
await this.vtFlowService.checkIsVerifiableService(this.agentContext, connection);
|
|
57
|
+
const participantSessionId = (_a = options.participantSessionId) !== null && _a !== void 0 ? _a : core_1.utils.uuid();
|
|
58
58
|
const { message, record } = await this.vtFlowService.createDirectIssuanceRecord(this.agentContext, {
|
|
59
59
|
connectionId: options.connectionId,
|
|
60
|
-
|
|
60
|
+
participantSessionId,
|
|
61
61
|
schemaId: options.schemaId,
|
|
62
|
-
|
|
63
|
-
|
|
62
|
+
agentParticipantId: options.agentParticipantId,
|
|
63
|
+
walletAgentParticipantId: options.walletAgentParticipantId,
|
|
64
64
|
claims: options.claims,
|
|
65
65
|
});
|
|
66
66
|
const outboundMessageContext = await (0, didcomm_1.getOutboundDidCommMessageContext)(this.agentContext, {
|
|
@@ -92,8 +92,8 @@ let VtFlowApi = class VtFlowApi {
|
|
|
92
92
|
await this.dispatchMessage(record.connectionId, problemReport, record);
|
|
93
93
|
return record;
|
|
94
94
|
}
|
|
95
|
-
|
|
96
|
-
return this.vtFlowService.
|
|
95
|
+
acceptOnboardingRequest(vtFlowRecordId) {
|
|
96
|
+
return this.vtFlowService.acceptOnboardingRequest(this.agentContext, vtFlowRecordId);
|
|
97
97
|
}
|
|
98
98
|
acceptIssuanceRequest(vtFlowRecordId) {
|
|
99
99
|
return this.vtFlowService.acceptIssuanceRequest(this.agentContext, vtFlowRecordId);
|
package/build/VtFlowApi.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VtFlowApi.js","sourceRoot":"","sources":["../src/VtFlowApi.ts"],"names":[],"mappings":";;;;;;;;;;;;AAgBA,yCAA4E;AAC5E,+CAQ0B;AAE1B,6DAAyD;AACzD,yCAA0C;AAC1C,mCAAoC;AAEpC,oIAAoI;AAE7H,IAAM,SAAS,GAAf,MAAM,SAAS;IACpB,YACmB,aAA4B,EAC5B,aAAmC,EACnC,iBAA2C,EAC3C,YAA0B,EAC1B,MAA0B,EAC1B,uBAAoF,EACpF,4BAAiE;QANjE,kBAAa,GAAb,aAAa,CAAe;QAC5B,kBAAa,GAAb,aAAa,CAAsB;QACnC,sBAAiB,GAAjB,iBAAiB,CAA0B;QAC3C,iBAAY,GAAZ,YAAY,CAAc;QAC1B,WAAM,GAAN,MAAM,CAAoB;QAC1B,4BAAuB,GAAvB,uBAAuB,CAA6D;QACpF,iCAA4B,GAA5B,4BAA4B,CAAqC;QAElF,KAAK,IAAI,CAAC,MAAM,CAAA;IAClB,CAAC;IAEM,KAAK,CAAC,qBAAqB,CAAC,OAAqC;;QACtE,MAAM,UAAU,GAAG,MAAM,IAAI,CAAC,iBAAiB,CAAC,OAAO,CAAC,IAAI,CAAC,YAAY,EAAE,OAAO,CAAC,YAAY,CAAC,CAAA;QAChG,UAAU,CAAC,WAAW,EAAE,CAAA;QACxB,MAAM,IAAI,CAAC,aAAa,CAAC,
|
|
1
|
+
{"version":3,"file":"VtFlowApi.js","sourceRoot":"","sources":["../src/VtFlowApi.ts"],"names":[],"mappings":";;;;;;;;;;;;AAgBA,yCAA4E;AAC5E,+CAQ0B;AAE1B,6DAAyD;AACzD,yCAA0C;AAC1C,mCAAoC;AAEpC,oIAAoI;AAE7H,IAAM,SAAS,GAAf,MAAM,SAAS;IACpB,YACmB,aAA4B,EAC5B,aAAmC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B,uCAAkB;QACD,wCAA8B;QACzB,6CAAmC;GARzE,SAAS,CAmQrB"}
|
package/build/VtFlowModule.js
CHANGED
|
@@ -28,7 +28,7 @@ class VtFlowModule {
|
|
|
28
28
|
const service = agentContext.dependencyManager.resolve(services_1.VtFlowService);
|
|
29
29
|
const eventEmitter = agentContext.dependencyManager.resolve(core_1.EventEmitter);
|
|
30
30
|
messageHandlerRegistry.registerMessageHandlers([
|
|
31
|
-
new handlers_1.
|
|
31
|
+
new handlers_1.OnboardingRequestHandler(service),
|
|
32
32
|
new handlers_1.IssuanceRequestHandler(service),
|
|
33
33
|
new handlers_1.OobLinkHandler(service),
|
|
34
34
|
new handlers_1.ValidatingHandler(service),
|
|
@@ -130,13 +130,13 @@ class VtFlowModule {
|
|
|
130
130
|
}
|
|
131
131
|
if (record.role !== types_1.VtFlowRole.Validator)
|
|
132
132
|
return;
|
|
133
|
-
if (payload.state === types_1.VtFlowState.
|
|
133
|
+
if (payload.state === types_1.VtFlowState.AwaitingOr &&
|
|
134
134
|
payload.previousState === null &&
|
|
135
|
-
config.
|
|
135
|
+
config.autoAcceptOnboardingRequest) {
|
|
136
136
|
service
|
|
137
137
|
.getLogger()
|
|
138
|
-
.debug(`[vt-flow] auto-accepting
|
|
139
|
-
await service.
|
|
138
|
+
.debug(`[vt-flow] auto-accepting OR for ${record.id} (autoAcceptOnboardingRequest=true)`);
|
|
139
|
+
await service.acceptOnboardingRequest(agentContext, record.id);
|
|
140
140
|
return;
|
|
141
141
|
}
|
|
142
142
|
if (payload.state === types_1.VtFlowState.AwaitingIr &&
|
|
@@ -150,12 +150,12 @@ class VtFlowModule {
|
|
|
150
150
|
}
|
|
151
151
|
if (payload.state === types_1.VtFlowState.Validating &&
|
|
152
152
|
config.autoMarkValidated &&
|
|
153
|
-
record.variant === types_1.VtFlowVariant.
|
|
153
|
+
record.variant === types_1.VtFlowVariant.OnboardingProcess) {
|
|
154
154
|
service.getLogger().debug(`[vt-flow] auto-mark-validated for ${record.id} (autoMarkValidated=true)`);
|
|
155
155
|
await service.markValidated(agentContext, record.id);
|
|
156
156
|
return;
|
|
157
157
|
}
|
|
158
|
-
const readyToOffer = (record.variant === types_1.VtFlowVariant.
|
|
158
|
+
const readyToOffer = (record.variant === types_1.VtFlowVariant.OnboardingProcess && payload.state === types_1.VtFlowState.Validated) ||
|
|
159
159
|
(record.variant === types_1.VtFlowVariant.DirectIssuance && payload.state === types_1.VtFlowState.Validating);
|
|
160
160
|
if (readyToOffer && config.autoOfferCredential && config.buildCredentialOffer) {
|
|
161
161
|
service
|
|
@@ -26,15 +26,16 @@ export interface VtFlowCredentialOfferPayload {
|
|
|
26
26
|
export type VtFlowBuildCredentialOfferHook = (ctx: VtFlowBuildCredentialOfferContext) => Promise<VtFlowCredentialOfferPayload | null>;
|
|
27
27
|
export interface VtFlowAssertVerifiableServiceContext {
|
|
28
28
|
agentContext: AgentContext;
|
|
29
|
-
|
|
29
|
+
peerDid: string;
|
|
30
|
+
connectionId?: string;
|
|
30
31
|
}
|
|
31
|
-
/** Spec
|
|
32
|
+
/** Spec Verifiable Service Identity Check: caller-provided VS-CONN-VS gate invoked at session start (Applicant before sending OR/IR, Validator on receipt of OR/IR). Return `false` (or throw) to reject the peer; the module then aborts the operation with a `vt-flow.not-a-verifiable-service` error. When the hook is undefined, the module logs a warning and permits — production callers MUST configure this for spec-conformant trust resolution. */
|
|
32
33
|
export type VtFlowAssertVerifiableServiceHook = (ctx: VtFlowAssertVerifiableServiceContext) => Promise<boolean>;
|
|
33
34
|
/** Options accepted by VtFlowModule; all flags default to false, `oobExpirationDays` defaults to 7, `terminalRetentionDays` to 90. */
|
|
34
35
|
export interface VtFlowModuleConfigOptions {
|
|
35
36
|
oobExpirationDays?: number;
|
|
36
37
|
terminalRetentionDays?: number;
|
|
37
|
-
|
|
38
|
+
autoAcceptOnboardingRequest?: boolean;
|
|
38
39
|
autoAcceptIssuanceRequest?: boolean;
|
|
39
40
|
verifyCredential?: VtFlowVerifyCredentialHook;
|
|
40
41
|
onCompleted?: VtFlowOnCompletedHook;
|
|
@@ -51,7 +52,7 @@ export declare class VtFlowModuleConfig {
|
|
|
51
52
|
constructor(options?: VtFlowModuleConfigOptions);
|
|
52
53
|
get oobExpirationDays(): number;
|
|
53
54
|
get terminalRetentionDays(): number;
|
|
54
|
-
get
|
|
55
|
+
get autoAcceptOnboardingRequest(): boolean;
|
|
55
56
|
get autoAcceptIssuanceRequest(): boolean;
|
|
56
57
|
get verifyCredential(): VtFlowVerifyCredentialHook | undefined;
|
|
57
58
|
get onCompleted(): VtFlowOnCompletedHook | undefined;
|
|
@@ -14,9 +14,9 @@ class VtFlowModuleConfig {
|
|
|
14
14
|
var _a;
|
|
15
15
|
return (_a = this.options.terminalRetentionDays) !== null && _a !== void 0 ? _a : 90;
|
|
16
16
|
}
|
|
17
|
-
get
|
|
17
|
+
get autoAcceptOnboardingRequest() {
|
|
18
18
|
var _a;
|
|
19
|
-
return (_a = this.options.
|
|
19
|
+
return (_a = this.options.autoAcceptOnboardingRequest) !== null && _a !== void 0 ? _a : false;
|
|
20
20
|
}
|
|
21
21
|
get autoAcceptIssuanceRequest() {
|
|
22
22
|
var _a;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VtFlowModuleConfig.js","sourceRoot":"","sources":["../src/VtFlowModuleConfig.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"VtFlowModuleConfig.js","sourceRoot":"","sources":["../src/VtFlowModuleConfig.ts"],"names":[],"mappings":";;;AA4DA,2EAA2E;AAC3E,MAAa,kBAAkB;IAG7B,YAAmB,UAAqC,EAAE;QACxD,IAAI,CAAC,OAAO,GAAG,OAAO,CAAA;IACxB,CAAC;IAED,IAAW,iBAAiB;;QAC1B,OAAO,MAAA,IAAI,CAAC,OAAO,CAAC,iBAAiB,mCAAI,CAAC,CAAA;IAC5C,CAAC;IAED,IAAW,qBAAqB;;QAC9B,OAAO,MAAA,IAAI,CAAC,OAAO,CAAC,qBAAqB,mCAAI,EAAE,CAAA;IACjD,CAAC;IAED,IAAW,2BAA2B;;QACpC,OAAO,MAAA,IAAI,CAAC,OAAO,CAAC,2BAA2B,mCAAI,KAAK,CAAA;IAC1D,CAAC;IAED,IAAW,yBAAyB;;QAClC,OAAO,MAAA,IAAI,CAAC,OAAO,CAAC,yBAAyB,mCAAI,KAAK,CAAA;IACxD,CAAC;IAED,IAAW,gBAAgB;QACzB,OAAO,IAAI,CAAC,OAAO,CAAC,gBAAgB,CAAA;IACtC,CAAC;IAED,IAAW,WAAW;QACpB,OAAO,IAAI,CAAC,OAAO,CAAC,WAAW,CAAA;IACjC,CAAC;IAED,IAAW,iBAAiB;;QAC1B,OAAO,MAAA,IAAI,CAAC,OAAO,CAAC,iBAAiB,mCAAI,KAAK,CAAA;IAChD,CAAC;IAED,IAAW,mBAAmB;;QAC5B,OAAO,MAAA,IAAI,CAAC,OAAO,CAAC,mBAAmB,mCAAI,KAAK,CAAA;IAClD,CAAC;IAED,IAAW,oBAAoB;QAC7B,OAAO,IAAI,CAAC,OAAO,CAAC,oBAAoB,CAAA;IAC1C,CAAC;IAED,IAAW,yBAAyB;;QAClC,OAAO,MAAA,IAAI,CAAC,OAAO,CAAC,yBAAyB,mCAAI,KAAK,CAAA;IACxD,CAAC;IAED,IAAW,4BAA4B;;QACrC,OAAO,MAAA,IAAI,CAAC,OAAO,CAAC,4BAA4B,mCAAI,KAAK,CAAA;IAC3D,CAAC;IAED,IAAW,uBAAuB;QAChC,OAAO,IAAI,CAAC,OAAO,CAAC,uBAAuB,CAAA;IAC7C,CAAC;CACF;AAtDD,gDAsDC"}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
/** Wire `description.code` values for vt-flow problem-reports (see spec
|
|
1
|
+
/** Wire `description.code` values for vt-flow problem-reports (see spec Error Codes). */
|
|
2
2
|
export declare enum VtFlowErrorCode {
|
|
3
|
-
|
|
3
|
+
OrRequired = "vt-flow.or-required",
|
|
4
4
|
IrRequired = "vt-flow.ir-required",
|
|
5
5
|
UnsupportedMessage = "vt-flow.unsupported-message",
|
|
6
|
-
|
|
6
|
+
InvalidParticipantId = "vt-flow.invalid-participant-id",
|
|
7
7
|
InvalidSchemaId = "vt-flow.invalid-schema-id",
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
InvalidAgentParticipantId = "vt-flow.invalid-agent-participant-id",
|
|
9
|
+
InvalidWalletAgentParticipantId = "vt-flow.invalid-wallet-agent-participant-id",
|
|
10
10
|
InvalidClaims = "vt-flow.invalid-claims",
|
|
11
|
-
|
|
11
|
+
InvalidParticipantSessionId = "vt-flow.invalid-participant-session-id",
|
|
12
12
|
NotAVerifiableService = "vt-flow.not-a-verifiable-service",
|
|
13
13
|
ValidationFailed = "vt-flow.validation-failed",
|
|
14
14
|
OobExpired = "vt-flow.oob-expired",
|
|
@@ -2,18 +2,18 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.VT_FLOW_ERROR_INFO = exports.VtFlowErrorCode = void 0;
|
|
4
4
|
exports.isVtFlowErrorCode = isVtFlowErrorCode;
|
|
5
|
-
/** Wire `description.code` values for vt-flow problem-reports (see spec
|
|
5
|
+
/** Wire `description.code` values for vt-flow problem-reports (see spec Error Codes). */
|
|
6
6
|
var VtFlowErrorCode;
|
|
7
7
|
(function (VtFlowErrorCode) {
|
|
8
|
-
VtFlowErrorCode["
|
|
8
|
+
VtFlowErrorCode["OrRequired"] = "vt-flow.or-required";
|
|
9
9
|
VtFlowErrorCode["IrRequired"] = "vt-flow.ir-required";
|
|
10
10
|
VtFlowErrorCode["UnsupportedMessage"] = "vt-flow.unsupported-message";
|
|
11
|
-
VtFlowErrorCode["
|
|
11
|
+
VtFlowErrorCode["InvalidParticipantId"] = "vt-flow.invalid-participant-id";
|
|
12
12
|
VtFlowErrorCode["InvalidSchemaId"] = "vt-flow.invalid-schema-id";
|
|
13
|
-
VtFlowErrorCode["
|
|
14
|
-
VtFlowErrorCode["
|
|
13
|
+
VtFlowErrorCode["InvalidAgentParticipantId"] = "vt-flow.invalid-agent-participant-id";
|
|
14
|
+
VtFlowErrorCode["InvalidWalletAgentParticipantId"] = "vt-flow.invalid-wallet-agent-participant-id";
|
|
15
15
|
VtFlowErrorCode["InvalidClaims"] = "vt-flow.invalid-claims";
|
|
16
|
-
VtFlowErrorCode["
|
|
16
|
+
VtFlowErrorCode["InvalidParticipantSessionId"] = "vt-flow.invalid-participant-session-id";
|
|
17
17
|
VtFlowErrorCode["NotAVerifiableService"] = "vt-flow.not-a-verifiable-service";
|
|
18
18
|
VtFlowErrorCode["ValidationFailed"] = "vt-flow.validation-failed";
|
|
19
19
|
VtFlowErrorCode["OobExpired"] = "vt-flow.oob-expired";
|
|
@@ -21,27 +21,27 @@ var VtFlowErrorCode;
|
|
|
21
21
|
VtFlowErrorCode["InternalError"] = "vt-flow.internal-error";
|
|
22
22
|
})(VtFlowErrorCode || (exports.VtFlowErrorCode = VtFlowErrorCode = {}));
|
|
23
23
|
exports.VT_FLOW_ERROR_INFO = {
|
|
24
|
-
[VtFlowErrorCode.
|
|
24
|
+
[VtFlowErrorCode.OrRequired]: { whoRetries: 'you', impact: 'thread', retryable: true },
|
|
25
25
|
[VtFlowErrorCode.IrRequired]: { whoRetries: 'you', impact: 'thread', retryable: true },
|
|
26
26
|
[VtFlowErrorCode.UnsupportedMessage]: {
|
|
27
27
|
whoRetries: 'none',
|
|
28
28
|
impact: 'connection',
|
|
29
29
|
retryable: false,
|
|
30
30
|
},
|
|
31
|
-
[VtFlowErrorCode.
|
|
31
|
+
[VtFlowErrorCode.InvalidParticipantId]: { whoRetries: 'you', impact: 'thread', retryable: true },
|
|
32
32
|
[VtFlowErrorCode.InvalidSchemaId]: { whoRetries: 'you', impact: 'thread', retryable: true },
|
|
33
|
-
[VtFlowErrorCode.
|
|
33
|
+
[VtFlowErrorCode.InvalidAgentParticipantId]: {
|
|
34
34
|
whoRetries: 'you',
|
|
35
35
|
impact: 'thread',
|
|
36
36
|
retryable: true,
|
|
37
37
|
},
|
|
38
|
-
[VtFlowErrorCode.
|
|
38
|
+
[VtFlowErrorCode.InvalidWalletAgentParticipantId]: {
|
|
39
39
|
whoRetries: 'you',
|
|
40
40
|
impact: 'thread',
|
|
41
41
|
retryable: true,
|
|
42
42
|
},
|
|
43
43
|
[VtFlowErrorCode.InvalidClaims]: { whoRetries: 'you', impact: 'thread', retryable: true },
|
|
44
|
-
[VtFlowErrorCode.
|
|
44
|
+
[VtFlowErrorCode.InvalidParticipantSessionId]: {
|
|
45
45
|
whoRetries: 'you',
|
|
46
46
|
impact: 'thread',
|
|
47
47
|
retryable: true,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VtFlowErrorCode.js","sourceRoot":"","sources":["../../src/errors/VtFlowErrorCode.ts"],"names":[],"mappings":";;;AA4EA,8CAEC;AA9ED,
|
|
1
|
+
{"version":3,"file":"VtFlowErrorCode.js","sourceRoot":"","sources":["../../src/errors/VtFlowErrorCode.ts"],"names":[],"mappings":";;;AA4EA,8CAEC;AA9ED,yFAAyF;AACzF,IAAY,eAeX;AAfD,WAAY,eAAe;IACzB,qDAAkC,CAAA;IAClC,qDAAkC,CAAA;IAClC,qEAAkD,CAAA;IAClD,0EAAuD,CAAA;IACvD,gEAA6C,CAAA;IAC7C,qFAAkE,CAAA;IAClE,kGAA+E,CAAA;IAC/E,2DAAwC,CAAA;IACxC,yFAAsE,CAAA;IACtE,6EAA0D,CAAA;IAC1D,iEAA8C,CAAA;IAC9C,qDAAkC,CAAA;IAClC,mEAAgD,CAAA;IAChD,2DAAwC,CAAA;AAC1C,CAAC,EAfW,eAAe,+BAAf,eAAe,QAe1B;AAeY,QAAA,kBAAkB,GAAuD;IACpF,CAAC,eAAe,CAAC,UAAU,CAAC,EAAE,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,IAAI,EAAE;IACtF,CAAC,eAAe,CAAC,UAAU,CAAC,EAAE,EAAE,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EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,IAAI,EAAE;IACtF,CAAC,eAAe,CAAC,iBAAiB,CAAC,EAAE;QACnC,UAAU,EAAE,MAAM;QAClB,MAAM,EAAE,QAAQ;QAChB,SAAS,EAAE,KAAK;KACjB;IACD,CAAC,eAAe,CAAC,aAAa,CAAC,EAAE,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,KAAK,EAAE;CAC5F,CAAA;AAED,SAAgB,iBAAiB,CAAC,IAAY;IAC5C,OAAQ,MAAM,CAAC,MAAM,CAAC,eAAe,CAAc,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAA;AACpE,CAAC"}
|
|
@@ -32,24 +32,24 @@ function buildVtFlowProblemReport(options) {
|
|
|
32
32
|
}
|
|
33
33
|
function defaultEnglishDescription(code) {
|
|
34
34
|
switch (code) {
|
|
35
|
-
case VtFlowErrorCode_1.VtFlowErrorCode.
|
|
36
|
-
return '
|
|
35
|
+
case VtFlowErrorCode_1.VtFlowErrorCode.OrRequired:
|
|
36
|
+
return 'An onboarding-request was expected for this session.';
|
|
37
37
|
case VtFlowErrorCode_1.VtFlowErrorCode.IrRequired:
|
|
38
38
|
return 'An issuance-request was expected for this session.';
|
|
39
39
|
case VtFlowErrorCode_1.VtFlowErrorCode.UnsupportedMessage:
|
|
40
40
|
return 'The received message is not supported in the current state.';
|
|
41
|
-
case VtFlowErrorCode_1.VtFlowErrorCode.
|
|
42
|
-
return 'The supplied
|
|
41
|
+
case VtFlowErrorCode_1.VtFlowErrorCode.InvalidParticipantId:
|
|
42
|
+
return 'The supplied participant_id is invalid for this Validator.';
|
|
43
43
|
case VtFlowErrorCode_1.VtFlowErrorCode.InvalidSchemaId:
|
|
44
44
|
return 'The supplied schema_id is not supported by this Validator.';
|
|
45
|
-
case VtFlowErrorCode_1.VtFlowErrorCode.
|
|
46
|
-
return 'The supplied
|
|
47
|
-
case VtFlowErrorCode_1.VtFlowErrorCode.
|
|
48
|
-
return 'The supplied
|
|
45
|
+
case VtFlowErrorCode_1.VtFlowErrorCode.InvalidAgentParticipantId:
|
|
46
|
+
return 'The supplied agent_participant_id did not resolve on-chain.';
|
|
47
|
+
case VtFlowErrorCode_1.VtFlowErrorCode.InvalidWalletAgentParticipantId:
|
|
48
|
+
return 'The supplied wallet_agent_participant_id did not resolve on-chain.';
|
|
49
49
|
case VtFlowErrorCode_1.VtFlowErrorCode.InvalidClaims:
|
|
50
50
|
return 'The submitted claims do not satisfy the schema.';
|
|
51
|
-
case VtFlowErrorCode_1.VtFlowErrorCode.
|
|
52
|
-
return 'The supplied
|
|
51
|
+
case VtFlowErrorCode_1.VtFlowErrorCode.InvalidParticipantSessionId:
|
|
52
|
+
return 'The supplied participant_session_id is invalid or conflicts with an existing session.';
|
|
53
53
|
case VtFlowErrorCode_1.VtFlowErrorCode.NotAVerifiableService:
|
|
54
54
|
return "The peer's DID does not identify a Verifiable Service.";
|
|
55
55
|
case VtFlowErrorCode_1.VtFlowErrorCode.ValidationFailed:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"buildVtFlowProblemReport.js","sourceRoot":"","sources":["../../src/errors/buildVtFlowProblemReport.ts"],"names":[],"mappings":";;AA4BA,4DAkBC;AA9CD,+CAA+F;AAE/F,uDAAuE;AAYvE,MAAM,aAAa,GAA6D;IAC9E,GAAG,EAAE,0BAAgB,CAAC,GAAG;IACzB,EAAE,EAAE,0BAAgB,CAAC,EAAE;IACvB,IAAI,EAAE,0BAAgB,CAAC,IAAI;IAC3B,IAAI,EAAE,0BAAgB,CAAC,IAAI;CAC5B,CAAA;AAED,MAAM,SAAS,GAA8D;IAC3E,OAAO,EAAE,sBAAY,CAAC,OAAO;IAC7B,MAAM,EAAE,sBAAY,CAAC,MAAM;IAC3B,UAAU,EAAE,sBAAY,CAAC,UAAU;CACpC,CAAA;AAED,qLAAqL;AACrL,SAAgB,wBAAwB,CACtC,OAAwC;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;QACtE,KAAK,iCAAe,CAAC,+BAA+B;YAClD,OAAO,oEAAoE,CAAA;QAC7E,KAAK,iCAAe,CAAC,aAAa;YAChC,OAAO,iDAAiD,CAAA;QAC1D,KAAK,iCAAe,CAAC,2BAA2B;YAC9C,OAAO,uFAAuF,CAAA;QAChG,KAAK,iCAAe,CAAC,qBAAqB;YACxC,OAAO,wDAAwD,CAAA;QACjE,KAAK,iCAAe,CAAC,gBAAgB;YACnC,OAAO,6DAA6D,CAAA;QACtE,KAAK,iCAAe,CAAC,UAAU;YAC7B,OAAO,yDAAyD,CAAA;QAClE,KAAK,iCAAe,CAAC,iBAAiB;YACpC,OAAO,yCAAyC,CAAA;QAClD,KAAK,iCAAe,CAAC,aAAa;YAChC,OAAO,0DAA0D,CAAA;QACnE,OAAO,CAAC,CAAC,CAAC;YACR,MAAM,WAAW,GAAU,IAAI,CAAA;YAC/B,KAAK,WAAW,CAAA;YAChB,OAAO,wBAAwB,CAAA;QACjC,CAAC;IACH,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { VtFlowService } from '../services';
|
|
2
|
+
import type { DidCommMessageHandler, DidCommMessageHandlerInboundMessage } from '@credo-ts/didcomm';
|
|
3
|
+
import { OnboardingRequestMessage } from '../messages';
|
|
4
|
+
/** Validator-side inbound handler for `onboarding-request`; delegates to `VtFlowService.processReceiveOnboardingRequest`. */
|
|
5
|
+
export declare class OnboardingRequestHandler implements DidCommMessageHandler {
|
|
6
|
+
private readonly vtFlowService;
|
|
7
|
+
supportedMessages: (typeof OnboardingRequestMessage)[];
|
|
8
|
+
constructor(vtFlowService: VtFlowService);
|
|
9
|
+
handle(messageContext: DidCommMessageHandlerInboundMessage<OnboardingRequestHandler>): Promise<undefined>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.OnboardingRequestHandler = void 0;
|
|
4
|
+
const messages_1 = require("../messages");
|
|
5
|
+
/** Validator-side inbound handler for `onboarding-request`; delegates to `VtFlowService.processReceiveOnboardingRequest`. */
|
|
6
|
+
class OnboardingRequestHandler {
|
|
7
|
+
constructor(vtFlowService) {
|
|
8
|
+
this.vtFlowService = vtFlowService;
|
|
9
|
+
this.supportedMessages = [messages_1.OnboardingRequestMessage];
|
|
10
|
+
}
|
|
11
|
+
async handle(messageContext) {
|
|
12
|
+
await this.vtFlowService.processReceiveOnboardingRequest(messageContext);
|
|
13
|
+
return undefined;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
exports.OnboardingRequestHandler = OnboardingRequestHandler;
|
|
17
|
+
//# sourceMappingURL=OnboardingRequestHandler.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"
|
|
1
|
+
{"version":3,"file":"OnboardingRequestHandler.js","sourceRoot":"","sources":["../../src/handlers/OnboardingRequestHandler.ts"],"names":[],"mappings":";;;AAGA,0CAAsD;AAEtD,6HAA6H;AAC7H,MAAa,wBAAwB;IAGnC,YAAoC,aAA4B;QAA5B,kBAAa,GAAb,aAAa,CAAe;QAFzD,sBAAiB,GAAG,CAAC,mCAAwB,CAAC,CAAA;IAEc,CAAC;IAE7D,KAAK,CAAC,MAAM,CAAC,cAA6E;QAC/F,MAAM,IAAI,CAAC,aAAa,CAAC,+BAA+B,CAAC,cAAc,CAAC,CAAA;QACxE,OAAO,SAAS,CAAA;IAClB,CAAC;CACF;AATD,4DASC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { CredentialStateChangeHandler } from './CredentialStateChangeHandler';
|
|
2
2
|
export { IssuanceRequestHandler } from './IssuanceRequestHandler';
|
|
3
3
|
export { OobLinkHandler } from './OobLinkHandler';
|
|
4
|
+
export { OnboardingRequestHandler } from './OnboardingRequestHandler';
|
|
4
5
|
export { ValidatingHandler } from './ValidatingHandler';
|
|
5
|
-
export { ValidationRequestHandler } from './ValidationRequestHandler';
|
package/build/handlers/index.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.ValidatingHandler = exports.OnboardingRequestHandler = exports.OobLinkHandler = exports.IssuanceRequestHandler = exports.CredentialStateChangeHandler = void 0;
|
|
4
4
|
var CredentialStateChangeHandler_1 = require("./CredentialStateChangeHandler");
|
|
5
5
|
Object.defineProperty(exports, "CredentialStateChangeHandler", { enumerable: true, get: function () { return CredentialStateChangeHandler_1.CredentialStateChangeHandler; } });
|
|
6
6
|
var IssuanceRequestHandler_1 = require("./IssuanceRequestHandler");
|
|
7
7
|
Object.defineProperty(exports, "IssuanceRequestHandler", { enumerable: true, get: function () { return IssuanceRequestHandler_1.IssuanceRequestHandler; } });
|
|
8
8
|
var OobLinkHandler_1 = require("./OobLinkHandler");
|
|
9
9
|
Object.defineProperty(exports, "OobLinkHandler", { enumerable: true, get: function () { return OobLinkHandler_1.OobLinkHandler; } });
|
|
10
|
+
var OnboardingRequestHandler_1 = require("./OnboardingRequestHandler");
|
|
11
|
+
Object.defineProperty(exports, "OnboardingRequestHandler", { enumerable: true, get: function () { return OnboardingRequestHandler_1.OnboardingRequestHandler; } });
|
|
10
12
|
var ValidatingHandler_1 = require("./ValidatingHandler");
|
|
11
13
|
Object.defineProperty(exports, "ValidatingHandler", { enumerable: true, get: function () { return ValidatingHandler_1.ValidatingHandler; } });
|
|
12
|
-
var ValidationRequestHandler_1 = require("./ValidationRequestHandler");
|
|
13
|
-
Object.defineProperty(exports, "ValidationRequestHandler", { enumerable: true, get: function () { return ValidationRequestHandler_1.ValidationRequestHandler; } });
|
|
14
14
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/handlers/index.ts"],"names":[],"mappings":";;;AAAA,+EAA6E;AAApE,4IAAA,4BAA4B,OAAA;AACrC,mEAAiE;AAAxD,gIAAA,sBAAsB,OAAA;AAC/B,mDAAiD;AAAxC,gHAAA,cAAc,OAAA;AACvB,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/handlers/index.ts"],"names":[],"mappings":";;;AAAA,+EAA6E;AAApE,4IAAA,4BAA4B,OAAA;AACrC,mEAAiE;AAAxD,gIAAA,sBAAsB,OAAA;AAC/B,mDAAiD;AAAxC,gHAAA,cAAc,OAAA;AACvB,uEAAqE;AAA5D,oIAAA,wBAAwB,OAAA;AACjC,yDAAuD;AAA9C,sHAAA,iBAAiB,OAAA"}
|
package/build/index.d.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
export { VtFlowEventTypes, VtFlowRole, VtFlowState, VtFlowTerminalStates, VtFlowVariant, isVtFlowTerminalState, } from './types';
|
|
2
|
-
export type { NotifyCredentialStateChangeOptions, OfferCredentialForSessionOptions, ProblemReportDispatchOptions, SendIssuanceRequestOptions,
|
|
3
|
-
export { VT_FLOW_PROTOCOL_URI,
|
|
4
|
-
export type {
|
|
2
|
+
export type { NotifyCredentialStateChangeOptions, OfferCredentialForSessionOptions, ProblemReportDispatchOptions, SendIssuanceRequestOptions, SendOnboardingRequestOptions, SendOobLinkOptions, VtFlowStateChangedEvent, } from './types';
|
|
3
|
+
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, OnboardingRequestMessage, IssuanceRequestMessage, OobLinkMessage, ValidatingMessage, CredentialStateChangeMessage, VtCredentialState, } from './messages';
|
|
4
|
+
export type { OnboardingRequestMessageOptions, IssuanceRequestMessageOptions, OobLinkMessageOptions, ValidatingMessageOptions, CredentialStateChangeMessageOptions, } from './messages';
|
|
5
5
|
export { VT_FLOW_ERROR_INFO, VtFlowErrorCode, buildVtFlowProblemReport, isVtFlowErrorCode } from './errors';
|
|
6
6
|
export type { BuildVtFlowProblemReportOptions, ErrorImpact, VtFlowErrorInfo, WhoRetries } from './errors';
|
|
7
7
|
export { VtFlowRecord, VtFlowRepository } from './repository';
|
|
8
8
|
export type { CustomVtFlowTags, DefaultVtFlowTags, VtFlowStorageProps, VtFlowTags } from './repository';
|
|
9
9
|
export { VtFlowService } from './services';
|
|
10
|
-
export type { CreateIssuanceRequestParams,
|
|
11
|
-
export { CredentialStateChangeHandler, IssuanceRequestHandler, OobLinkHandler, ValidatingHandler,
|
|
10
|
+
export type { CreateIssuanceRequestParams, CreateOnboardingRequestParams } from './services';
|
|
11
|
+
export { CredentialStateChangeHandler, IssuanceRequestHandler, OnboardingRequestHandler, OobLinkHandler, ValidatingHandler, } from './handlers';
|
|
12
12
|
export { VtFlowModuleConfig } from './VtFlowModuleConfig';
|
|
13
13
|
export type { VtFlowAssertVerifiableServiceContext, VtFlowAssertVerifiableServiceHook, VtFlowBuildCredentialOfferContext, VtFlowBuildCredentialOfferHook, VtFlowCredentialLifecycleContext, VtFlowCredentialOfferPayload, VtFlowModuleConfigOptions, VtFlowOnCompletedHook, VtFlowVerifyCredentialHook, } from './VtFlowModuleConfig';
|
|
14
14
|
export { VtFlowModule } from './VtFlowModule';
|
package/build/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.setupVtFlow = exports.VtFlowApi = exports.VtFlowModule = exports.VtFlowModuleConfig = exports.
|
|
3
|
+
exports.setupVtFlow = exports.VtFlowApi = exports.VtFlowModule = exports.VtFlowModuleConfig = exports.ValidatingHandler = exports.OobLinkHandler = exports.OnboardingRequestHandler = exports.IssuanceRequestHandler = exports.CredentialStateChangeHandler = exports.VtFlowService = exports.VtFlowRepository = exports.VtFlowRecord = exports.isVtFlowErrorCode = exports.buildVtFlowProblemReport = exports.VtFlowErrorCode = exports.VT_FLOW_ERROR_INFO = 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 = exports.isVtFlowTerminalState = exports.VtFlowVariant = exports.VtFlowTerminalStates = exports.VtFlowState = exports.VtFlowRole = exports.VtFlowEventTypes = void 0;
|
|
4
4
|
// Types: enums, events, API option interfaces
|
|
5
5
|
var types_1 = require("./types");
|
|
6
6
|
Object.defineProperty(exports, "VtFlowEventTypes", { enumerable: true, get: function () { return types_1.VtFlowEventTypes; } });
|
|
@@ -12,12 +12,12 @@ Object.defineProperty(exports, "isVtFlowTerminalState", { enumerable: true, get:
|
|
|
12
12
|
// Wire messages
|
|
13
13
|
var messages_1 = require("./messages");
|
|
14
14
|
Object.defineProperty(exports, "VT_FLOW_PROTOCOL_URI", { enumerable: true, get: function () { return messages_1.VT_FLOW_PROTOCOL_URI; } });
|
|
15
|
-
Object.defineProperty(exports, "
|
|
15
|
+
Object.defineProperty(exports, "VT_FLOW_ONBOARDING_REQUEST_TYPE", { enumerable: true, get: function () { return messages_1.VT_FLOW_ONBOARDING_REQUEST_TYPE; } });
|
|
16
16
|
Object.defineProperty(exports, "VT_FLOW_ISSUANCE_REQUEST_TYPE", { enumerable: true, get: function () { return messages_1.VT_FLOW_ISSUANCE_REQUEST_TYPE; } });
|
|
17
17
|
Object.defineProperty(exports, "VT_FLOW_OOB_LINK_TYPE", { enumerable: true, get: function () { return messages_1.VT_FLOW_OOB_LINK_TYPE; } });
|
|
18
18
|
Object.defineProperty(exports, "VT_FLOW_VALIDATING_TYPE", { enumerable: true, get: function () { return messages_1.VT_FLOW_VALIDATING_TYPE; } });
|
|
19
19
|
Object.defineProperty(exports, "VT_FLOW_CREDENTIAL_STATE_CHANGE_TYPE", { enumerable: true, get: function () { return messages_1.VT_FLOW_CREDENTIAL_STATE_CHANGE_TYPE; } });
|
|
20
|
-
Object.defineProperty(exports, "
|
|
20
|
+
Object.defineProperty(exports, "OnboardingRequestMessage", { enumerable: true, get: function () { return messages_1.OnboardingRequestMessage; } });
|
|
21
21
|
Object.defineProperty(exports, "IssuanceRequestMessage", { enumerable: true, get: function () { return messages_1.IssuanceRequestMessage; } });
|
|
22
22
|
Object.defineProperty(exports, "OobLinkMessage", { enumerable: true, get: function () { return messages_1.OobLinkMessage; } });
|
|
23
23
|
Object.defineProperty(exports, "ValidatingMessage", { enumerable: true, get: function () { return messages_1.ValidatingMessage; } });
|
|
@@ -40,9 +40,9 @@ Object.defineProperty(exports, "VtFlowService", { enumerable: true, get: functio
|
|
|
40
40
|
var handlers_1 = require("./handlers");
|
|
41
41
|
Object.defineProperty(exports, "CredentialStateChangeHandler", { enumerable: true, get: function () { return handlers_1.CredentialStateChangeHandler; } });
|
|
42
42
|
Object.defineProperty(exports, "IssuanceRequestHandler", { enumerable: true, get: function () { return handlers_1.IssuanceRequestHandler; } });
|
|
43
|
+
Object.defineProperty(exports, "OnboardingRequestHandler", { enumerable: true, get: function () { return handlers_1.OnboardingRequestHandler; } });
|
|
43
44
|
Object.defineProperty(exports, "OobLinkHandler", { enumerable: true, get: function () { return handlers_1.OobLinkHandler; } });
|
|
44
45
|
Object.defineProperty(exports, "ValidatingHandler", { enumerable: true, get: function () { return handlers_1.ValidatingHandler; } });
|
|
45
|
-
Object.defineProperty(exports, "ValidationRequestHandler", { enumerable: true, get: function () { return handlers_1.ValidationRequestHandler; } });
|
|
46
46
|
// Module surface
|
|
47
47
|
var VtFlowModuleConfig_1 = require("./VtFlowModuleConfig");
|
|
48
48
|
Object.defineProperty(exports, "VtFlowModuleConfig", { enumerable: true, get: function () { return VtFlowModuleConfig_1.VtFlowModuleConfig; } });
|
package/build/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,8CAA8C;AAC9C,iCAOgB;AANd,yGAAA,gBAAgB,OAAA;AAChB,mGAAA,UAAU,OAAA;AACV,oGAAA,WAAW,OAAA;AACX,6GAAA,oBAAoB,OAAA;AACpB,sGAAA,aAAa,OAAA;AACb,8GAAA,qBAAqB,OAAA;AAYvB,gBAAgB;AAChB,uCAamB;AAZjB,gHAAA,oBAAoB,OAAA;AACpB,2HAAA,+BAA+B,OAAA;AAC/B,yHAAA,6BAA6B,OAAA;AAC7B,iHAAA,qBAAqB,OAAA;AACrB,mHAAA,uBAAuB,OAAA;AACvB,gIAAA,oCAAoC,OAAA;AACpC,oHAAA,wBAAwB,OAAA;AACxB,kHAAA,sBAAsB,OAAA;AACtB,0GAAA,cAAc,OAAA;AACd,6GAAA,iBAAiB,OAAA;AACjB,wHAAA,4BAA4B,OAAA;AAC5B,6GAAA,iBAAiB,OAAA;AAUnB,SAAS;AACT,mCAA2G;AAAlG,4GAAA,kBAAkB,OAAA;AAAE,yGAAA,eAAe,OAAA;AAAE,kHAAA,wBAAwB,OAAA;AAAE,2GAAA,iBAAiB,OAAA;AAGzF,sBAAsB;AACtB,2CAA6D;AAApD,0GAAA,YAAY,OAAA;AAAE,8GAAA,gBAAgB,OAAA;AAGvC,UAAU;AACV,uCAA0C;AAAjC,yGAAA,aAAa,OAAA;AAGtB,WAAW;AACX,uCAMmB;AALjB,wHAAA,4BAA4B,OAAA;AAC5B,kHAAA,sBAAsB,OAAA;AACtB,0GAAA,cAAc,OAAA;AACd,6GAAA,iBAAiB,OAAA;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,8CAA8C;AAC9C,iCAOgB;AANd,yGAAA,gBAAgB,OAAA;AAChB,mGAAA,UAAU,OAAA;AACV,oGAAA,WAAW,OAAA;AACX,6GAAA,oBAAoB,OAAA;AACpB,sGAAA,aAAa,OAAA;AACb,8GAAA,qBAAqB,OAAA;AAYvB,gBAAgB;AAChB,uCAamB;AAZjB,gHAAA,oBAAoB,OAAA;AACpB,2HAAA,+BAA+B,OAAA;AAC/B,yHAAA,6BAA6B,OAAA;AAC7B,iHAAA,qBAAqB,OAAA;AACrB,mHAAA,uBAAuB,OAAA;AACvB,gIAAA,oCAAoC,OAAA;AACpC,oHAAA,wBAAwB,OAAA;AACxB,kHAAA,sBAAsB,OAAA;AACtB,0GAAA,cAAc,OAAA;AACd,6GAAA,iBAAiB,OAAA;AACjB,wHAAA,4BAA4B,OAAA;AAC5B,6GAAA,iBAAiB,OAAA;AAUnB,SAAS;AACT,mCAA2G;AAAlG,4GAAA,kBAAkB,OAAA;AAAE,yGAAA,eAAe,OAAA;AAAE,kHAAA,wBAAwB,OAAA;AAAE,2GAAA,iBAAiB,OAAA;AAGzF,sBAAsB;AACtB,2CAA6D;AAApD,0GAAA,YAAY,OAAA;AAAE,8GAAA,gBAAgB,OAAA;AAGvC,UAAU;AACV,uCAA0C;AAAjC,yGAAA,aAAa,OAAA;AAGtB,WAAW;AACX,uCAMmB;AALjB,wHAAA,4BAA4B,OAAA;AAC5B,kHAAA,sBAAsB,OAAA;AACtB,oHAAA,wBAAwB,OAAA;AACxB,0GAAA,cAAc,OAAA;AACd,6GAAA,iBAAiB,OAAA;AAGnB,iBAAiB;AACjB,2DAAyD;AAAhD,wHAAA,kBAAkB,OAAA;AAa3B,+CAA6C;AAApC,4GAAA,YAAY,OAAA;AACrB,yCAAuC;AAA9B,sGAAA,SAAS,OAAA;AAElB,6CAA2C;AAAlC,0GAAA,WAAW,OAAA"}
|
|
@@ -10,7 +10,7 @@ export interface CredentialStateChangeMessageOptions {
|
|
|
10
10
|
state: VtCredentialState | string;
|
|
11
11
|
reason?: string;
|
|
12
12
|
}
|
|
13
|
-
/** Spec
|
|
13
|
+
/** Spec `credential-state-change`; Validator => Applicant post-issuance notification referencing the IC V2 subprotocol `thid`. */
|
|
14
14
|
export declare class CredentialStateChangeMessage extends DidCommMessage {
|
|
15
15
|
constructor(options: CredentialStateChangeMessageOptions);
|
|
16
16
|
static readonly type: import("@credo-ts/didcomm").ParsedMessageType;
|
|
@@ -19,7 +19,7 @@ var VtCredentialState;
|
|
|
19
19
|
(function (VtCredentialState) {
|
|
20
20
|
VtCredentialState["Revoked"] = "REVOKED";
|
|
21
21
|
})(VtCredentialState || (exports.VtCredentialState = VtCredentialState = {}));
|
|
22
|
-
/** Spec
|
|
22
|
+
/** Spec `credential-state-change`; Validator => Applicant post-issuance notification referencing the IC V2 subprotocol `thid`. */
|
|
23
23
|
class CredentialStateChangeMessage extends didcomm_1.DidCommMessage {
|
|
24
24
|
constructor(options) {
|
|
25
25
|
var _a;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CredentialStateChangeMessage.js","sourceRoot":"","sources":["../../src/messages/CredentialStateChangeMessage.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+CAAwF;AACxF,yDAA0C;AAC1C,qDAAsD;AAEtD,qDAAuE;AAEvE,8IAA8I;AAC9I,IAAY,iBAEX;AAFD,WAAY,iBAAiB;IAC3B,wCAAmB,CAAA;AACrB,CAAC,EAFW,iBAAiB,iCAAjB,iBAAiB,QAE5B;AAUD,
|
|
1
|
+
{"version":3,"file":"CredentialStateChangeMessage.js","sourceRoot":"","sources":["../../src/messages/CredentialStateChangeMessage.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+CAAwF;AACxF,yDAA0C;AAC1C,qDAAsD;AAEtD,qDAAuE;AAEvE,8IAA8I;AAC9I,IAAY,iBAEX;AAFD,WAAY,iBAAiB;IAC3B,wCAAmB,CAAA;AACrB,CAAC,EAFW,iBAAiB,iCAAjB,iBAAiB,QAE5B;AAUD,kIAAkI;AAClI,MAAa,4BAA6B,SAAQ,wBAAc;IAC9D,YAAmB,OAA4C;;QAC7D,KAAK,EAAE,CAAA;QAeO,SAAI,GAAG,4BAA4B,CAAC,IAAI,CAAC,cAAc,CAAA;QAbrE,IAAI,OAAO,EAAE,CAAC;YACZ,IAAI,CAAC,EAAE,GAAG,MAAA,OAAO,CAAC,EAAE,mCAAI,IAAI,CAAC,UAAU,EAAE,CAAA;YACzC,IAAI,CAAC,eAAe,GAAG,OAAO,CAAC,eAAe,CAAA;YAC9C,IAAI,CAAC,KAAK,GAAG,OAAO,CAAC,KAAK,CAAA;YAC1B,IAAI,CAAC,MAAM,GAAG,OAAO,CAAC,MAAM,CAAA;YAE5B,IAAI,CAAC,SAAS,CAAC,EAAE,QAAQ,EAAE,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAA;QAChD,CAAC;IACH,CAAC;;AAZH,oEA6BC;AAfwB,iCAAI,GAAG,IAAA,0BAAgB,EAAC,qDAAoC,CAAC,AAAzD,CAAyD;AAGpE;IADf,IAAA,4BAAkB,EAAC,4BAA4B,CAAC,IAAI,CAAC;;0DACiB;AAIhE;IAFN,IAAA,0BAAM,EAAC,EAAE,IAAI,EAAE,kBAAkB,EAAE,CAAC;IACpC,IAAA,0BAAQ,GAAE;;qEACoB;AAGxB;IADN,IAAA,0BAAQ,GAAE;;2DAC8B;AAIlC;IAFN,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;4DACW"}
|
|
@@ -2,21 +2,21 @@ import { DidCommAttachment, DidCommMessage } from '@credo-ts/didcomm';
|
|
|
2
2
|
export interface IssuanceRequestMessageOptions {
|
|
3
3
|
id?: string;
|
|
4
4
|
schemaId: string;
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
participantSessionId: string;
|
|
6
|
+
agentParticipantId: string;
|
|
7
|
+
walletAgentParticipantId: string;
|
|
8
8
|
claims?: Record<string, unknown>;
|
|
9
9
|
proofsAttach?: DidCommAttachment[];
|
|
10
10
|
}
|
|
11
|
-
/** Spec
|
|
11
|
+
/** Spec `issuance-request`; opens a DirectIssuance session and its `@id` becomes the session `thid`. */
|
|
12
12
|
export declare class IssuanceRequestMessage extends DidCommMessage {
|
|
13
13
|
constructor(options: IssuanceRequestMessageOptions);
|
|
14
14
|
static readonly type: import("@credo-ts/didcomm").ParsedMessageType;
|
|
15
15
|
readonly type: string;
|
|
16
16
|
schemaId: string;
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
participantSessionId: string;
|
|
18
|
+
agentParticipantId: string;
|
|
19
|
+
walletAgentParticipantId: string;
|
|
20
20
|
claims?: Record<string, unknown>;
|
|
21
21
|
proofsAttach?: DidCommAttachment[];
|
|
22
22
|
}
|