@verana-labs/vs-agent-sdk 2.0.0-dev.9 → 2.0.0-dev.90

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.
Files changed (183) hide show
  1. package/README.md +0 -2
  2. package/build/adminApi/AdminApiError.d.ts +28 -0
  3. package/build/adminApi/AdminApiError.js +67 -0
  4. package/build/adminApi/AdminApiError.js.map +1 -0
  5. package/build/adminApi/didcommModules.d.ts +2 -0
  6. package/build/adminApi/didcommModules.js +8 -0
  7. package/build/adminApi/didcommModules.js.map +1 -0
  8. package/build/adminApi/index.d.ts +4 -0
  9. package/build/adminApi/index.js +21 -0
  10. package/build/adminApi/index.js.map +1 -0
  11. package/build/adminApi/moduleEndpoint.d.ts +8 -0
  12. package/build/adminApi/moduleEndpoint.js +28 -0
  13. package/build/adminApi/moduleEndpoint.js.map +1 -0
  14. package/build/adminApi/pagination/PageDto.d.ts +7 -0
  15. package/build/adminApi/pagination/PageDto.js +50 -0
  16. package/build/adminApi/pagination/PageDto.js.map +1 -0
  17. package/build/adminApi/pagination/PaginationQueryDto.d.ts +11 -0
  18. package/build/adminApi/pagination/PaginationQueryDto.js +46 -0
  19. package/build/adminApi/pagination/PaginationQueryDto.js.map +1 -0
  20. package/build/adminApi/pagination/cursor.d.ts +28 -0
  21. package/build/adminApi/pagination/cursor.js +64 -0
  22. package/build/adminApi/pagination/cursor.js.map +1 -0
  23. package/build/adminApi/pagination/index.d.ts +4 -0
  24. package/build/adminApi/pagination/index.js +21 -0
  25. package/build/adminApi/pagination/index.js.map +1 -0
  26. package/build/adminApi/pagination/paginate.d.ts +27 -0
  27. package/build/adminApi/pagination/paginate.js +77 -0
  28. package/build/adminApi/pagination/paginate.js.map +1 -0
  29. package/build/agent/VsAgent.d.ts +25 -34
  30. package/build/agent/VsAgent.js +86 -205
  31. package/build/agent/VsAgent.js.map +1 -1
  32. package/build/agent/createVsAgent.d.ts +9 -6
  33. package/build/agent/createVsAgent.js +5 -5
  34. package/build/agent/createVsAgent.js.map +1 -1
  35. package/build/blockchain/AnonCredsTrustService.d.ts +84 -0
  36. package/build/blockchain/AnonCredsTrustService.js +276 -0
  37. package/build/blockchain/AnonCredsTrustService.js.map +1 -0
  38. package/build/blockchain/AuthorizationService.d.ts +5 -3
  39. package/build/blockchain/AuthorizationService.js +17 -29
  40. package/build/blockchain/AuthorizationService.js.map +1 -1
  41. package/build/blockchain/IndexerWebSocketService.d.ts +7 -2
  42. package/build/blockchain/IndexerWebSocketService.js +67 -36
  43. package/build/blockchain/IndexerWebSocketService.js.map +1 -1
  44. package/build/blockchain/VeranaChainService.d.ts +38 -27
  45. package/build/blockchain/VeranaChainService.js +169 -177
  46. package/build/blockchain/VeranaChainService.js.map +1 -1
  47. package/build/blockchain/VeranaIndexerService.d.ts +14 -1
  48. package/build/blockchain/VeranaIndexerService.js +122 -8
  49. package/build/blockchain/VeranaIndexerService.js.map +1 -1
  50. package/build/blockchain/feePreflight.d.ts +32 -0
  51. package/build/blockchain/feePreflight.js +89 -0
  52. package/build/blockchain/feePreflight.js.map +1 -0
  53. package/build/blockchain/handlers/IndexerHandlerRegistry.d.ts +0 -1
  54. package/build/blockchain/handlers/IndexerHandlerRegistry.js.map +1 -1
  55. package/build/blockchain/handlers/authorizationHandlers.js +2 -2
  56. package/build/blockchain/handlers/authorizationHandlers.js.map +1 -1
  57. package/build/blockchain/handlers/defaultHandlers.js +7 -2
  58. package/build/blockchain/handlers/defaultHandlers.js.map +1 -1
  59. package/build/blockchain/handlers/index.d.ts +1 -0
  60. package/build/blockchain/handlers/index.js +1 -0
  61. package/build/blockchain/handlers/index.js.map +1 -1
  62. package/build/blockchain/handlers/selfIssuanceHandlers.d.ts +13 -0
  63. package/build/blockchain/handlers/selfIssuanceHandlers.js +76 -0
  64. package/build/blockchain/handlers/selfIssuanceHandlers.js.map +1 -0
  65. package/build/blockchain/handlers/stateMutations.d.ts +27 -4
  66. package/build/blockchain/handlers/stateMutations.js +325 -44
  67. package/build/blockchain/handlers/stateMutations.js.map +1 -1
  68. package/build/blockchain/index.d.ts +4 -0
  69. package/build/blockchain/index.js +4 -0
  70. package/build/blockchain/index.js.map +1 -1
  71. package/build/blockchain/indexerMappers.d.ts +3 -0
  72. package/build/blockchain/indexerMappers.js +53 -0
  73. package/build/blockchain/indexerMappers.js.map +1 -0
  74. package/build/blockchain/triggerResolver.d.ts +26 -0
  75. package/build/blockchain/triggerResolver.js +120 -0
  76. package/build/blockchain/triggerResolver.js.map +1 -0
  77. package/build/blockchain/types.d.ts +13 -70
  78. package/build/blockchain/types.js.map +1 -1
  79. package/build/bootstrap/EcsBootstrapService.d.ts +13 -4
  80. package/build/bootstrap/EcsBootstrapService.js +170 -124
  81. package/build/bootstrap/EcsBootstrapService.js.map +1 -1
  82. package/build/connections/ParentConnectionModule.d.ts +20 -0
  83. package/build/connections/ParentConnectionModule.js +56 -0
  84. package/build/connections/ParentConnectionModule.js.map +1 -0
  85. package/build/credentials/FullTailsFileService.d.ts +0 -1
  86. package/build/credentials/FullTailsFileService.js +0 -49
  87. package/build/credentials/FullTailsFileService.js.map +1 -1
  88. package/build/did/CachedDocumentLoader.d.ts +3 -0
  89. package/build/did/CachedDocumentLoader.js +7 -1
  90. package/build/did/CachedDocumentLoader.js.map +1 -1
  91. package/build/did/CachedWebDidResolver.d.ts +0 -4
  92. package/build/did/CachedWebDidResolver.js +1 -5
  93. package/build/did/CachedWebDidResolver.js.map +1 -1
  94. package/build/did/artifactServices.d.ts +12 -0
  95. package/build/did/artifactServices.js +48 -0
  96. package/build/did/artifactServices.js.map +1 -0
  97. package/build/did/legacyDidWeb.d.ts +6 -4
  98. package/build/did/legacyDidWeb.js +17 -14
  99. package/build/did/legacyDidWeb.js.map +1 -1
  100. package/build/did/publicDid.d.ts +4 -0
  101. package/build/did/publicDid.js +19 -0
  102. package/build/did/publicDid.js.map +1 -0
  103. package/build/events/BaseMessageEvents.js +139 -5
  104. package/build/events/BaseMessageEvents.js.map +1 -1
  105. package/build/events/ConnectionEvents.js +151 -87
  106. package/build/events/ConnectionEvents.js.map +1 -1
  107. package/build/events/VsAgentEvents.d.ts +11 -9
  108. package/build/events/VsAgentEvents.js +8 -1
  109. package/build/events/VsAgentEvents.js.map +1 -1
  110. package/build/events/VtFlowEvents.d.ts +1 -1
  111. package/build/events/VtFlowEvents.js +29 -17
  112. package/build/events/VtFlowEvents.js.map +1 -1
  113. package/build/index.d.ts +7 -1
  114. package/build/index.js +15 -2
  115. package/build/index.js.map +1 -1
  116. package/build/plugins/setupBaseDidComm.js +9 -12
  117. package/build/plugins/setupBaseDidComm.js.map +1 -1
  118. package/build/transports/VsAgentWsInboundTransport.d.ts +1 -1
  119. package/build/transports/VsAgentWsInboundTransport.js +20 -14
  120. package/build/transports/VsAgentWsInboundTransport.js.map +1 -1
  121. package/build/types.d.ts +14 -13
  122. package/build/types.js +1 -2
  123. package/build/types.js.map +1 -1
  124. package/build/utils/agent.d.ts +34 -4
  125. package/build/utils/agent.js +103 -22
  126. package/build/utils/agent.js.map +1 -1
  127. package/build/utils/boundedFetch.d.ts +13 -0
  128. package/build/utils/boundedFetch.js +47 -0
  129. package/build/utils/boundedFetch.js.map +1 -0
  130. package/build/utils/didReadiness.js +5 -2
  131. package/build/utils/didReadiness.js.map +1 -1
  132. package/build/utils/ecsClaims.d.ts +46 -0
  133. package/build/utils/ecsClaims.js +115 -0
  134. package/build/utils/ecsClaims.js.map +1 -0
  135. package/build/utils/ecsService.d.ts +8 -0
  136. package/build/utils/ecsService.js +23 -0
  137. package/build/utils/ecsService.js.map +1 -0
  138. package/build/utils/index.d.ts +7 -0
  139. package/build/utils/index.js +7 -0
  140. package/build/utils/index.js.map +1 -1
  141. package/build/utils/publishedDidRecord.d.ts +15 -0
  142. package/build/utils/publishedDidRecord.js +83 -0
  143. package/build/utils/publishedDidRecord.js.map +1 -0
  144. package/build/utils/selfIssuedEcsCredential.d.ts +8 -0
  145. package/build/utils/selfIssuedEcsCredential.js +153 -0
  146. package/build/utils/selfIssuedEcsCredential.js.map +1 -0
  147. package/build/utils/setupSelfTr.d.ts +35 -74
  148. package/build/utils/setupSelfTr.js +93 -312
  149. package/build/utils/setupSelfTr.js.map +1 -1
  150. package/build/utils/trustCredentialStore.d.ts +78 -9
  151. package/build/utils/trustCredentialStore.js +324 -136
  152. package/build/utils/trustCredentialStore.js.map +1 -1
  153. package/build/utils/typeMetadata.d.ts +44 -0
  154. package/build/utils/typeMetadata.js +89 -0
  155. package/build/utils/typeMetadata.js.map +1 -0
  156. package/build/utils/util.d.ts +20 -0
  157. package/build/utils/util.js +29 -0
  158. package/build/utils/util.js.map +1 -1
  159. package/build/utils/vcdm2.d.ts +34 -0
  160. package/build/utils/vcdm2.js +60 -0
  161. package/build/utils/vcdm2.js.map +1 -0
  162. package/build/utils/vtjscResolver.d.ts +23 -0
  163. package/build/utils/vtjscResolver.js +53 -0
  164. package/build/utils/vtjscResolver.js.map +1 -0
  165. package/build/vtFlow/VtFlowOrchestrator.d.ts +107 -15
  166. package/build/vtFlow/VtFlowOrchestrator.js +678 -116
  167. package/build/vtFlow/VtFlowOrchestrator.js.map +1 -1
  168. package/build/vtFlow/assertVerifiableService.d.ts +31 -2
  169. package/build/vtFlow/assertVerifiableService.js +68 -10
  170. package/build/vtFlow/assertVerifiableService.js.map +1 -1
  171. package/build/vtFlow/ecsIssuanceExemption.d.ts +12 -0
  172. package/build/vtFlow/ecsIssuanceExemption.js +84 -0
  173. package/build/vtFlow/ecsIssuanceExemption.js.map +1 -0
  174. package/build/vtFlow/index.d.ts +1 -0
  175. package/build/vtFlow/index.js +1 -0
  176. package/build/vtFlow/index.js.map +1 -1
  177. package/package.json +18 -12
  178. package/build/did/migrateWebVhLog.d.ts +0 -34
  179. package/build/did/migrateWebVhLog.js +0 -230
  180. package/build/did/migrateWebVhLog.js.map +0 -1
  181. package/build/did/migrateWebVhVersionTime.d.ts +0 -9
  182. package/build/did/migrateWebVhVersionTime.js +0 -191
  183. package/build/did/migrateWebVhVersionTime.js.map +0 -1
@@ -1,28 +1,20 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.EcsBootstrapService = void 0;
4
+ const didcomm_1 = require("@credo-ts/didcomm");
4
5
  const credo_ts_didcomm_vt_flow_1 = require("@verana-labs/credo-ts-didcomm-vt-flow");
5
6
  const vs_agent_model_1 = require("@verana-labs/vs-agent-model");
6
7
  const blockchain_1 = require("../blockchain");
8
+ const feePreflight_1 = require("../blockchain/feePreflight");
9
+ const triggerResolver_1 = require("../blockchain/triggerResolver");
7
10
  const types_1 = require("../types");
8
11
  const didReadiness_1 = require("../utils/didReadiness");
12
+ const VtFlowOrchestrator_1 = require("../vtFlow/VtFlowOrchestrator");
13
+ const ecsClaims_1 = require("../utils/ecsClaims");
9
14
  const START_OP_MSG = '/verana.pp.v1.MsgStartParticipantOP';
10
15
  const SELF_CREATE_MSG = '/verana.pp.v1.MsgSelfCreateParticipant';
11
16
  const ISSUER_ONBOARDING_MODE_OPEN = 1;
12
17
  const ISSUER_ONBOARDING_MODE_GRANTOR = 3;
13
- const ECS_TITLE_BY_TYPE = {
14
- ServiceCredential: vs_agent_model_1.ECS.SERVICE,
15
- OrganizationCredential: vs_agent_model_1.ECS.ORG,
16
- PersonaCredential: vs_agent_model_1.ECS.PERSONA,
17
- UserAgentCredential: vs_agent_model_1.ECS.USER_AGENT,
18
- BadgeCredential: vs_agent_model_1.ECS.BADGE,
19
- };
20
- const DELEGATED_OUTCOME_TIMEOUT_MS = 15 * 60000;
21
- // Thin safety net for any remaining transient failure (e.g. a network blip from
22
- // the parent's vantage point), on top of the readiness wait in waitUntilOwnDidIsPubliclyResolvable.
23
- const DELEGATED_REQUEST_MAX_ATTEMPTS = 2;
24
- const DELEGATED_REQUEST_ATTEMPT_TIMEOUT_MS = 60000;
25
- const DELEGATED_REQUEST_RETRY_DELAY_MS = 5000;
26
18
  class EcsBootstrapService {
27
19
  constructor(agent, indexer, options, logger) {
28
20
  this.agent = agent;
@@ -31,6 +23,10 @@ class EcsBootstrapService {
31
23
  this.logger = logger;
32
24
  }
33
25
  async run() {
26
+ // Both repair steps sign nothing on chain, so they run before any gate, in either mode, and
27
+ // also for a deployment whose participants the Corporation operator provisions out of band.
28
+ await this.acceptPendingOffers();
29
+ await this.resumePendingOnboardings();
34
30
  if (this.options.mode === 'delegated')
35
31
  return this.runDelegated();
36
32
  return this.runStandalone();
@@ -38,12 +34,11 @@ class EcsBootstrapService {
38
34
  async runStandalone() {
39
35
  const skip = await this.preflight();
40
36
  if (skip) {
41
- this.logger.info(`[EcsBootstrap] standalone bootstrap skipped: ${skip}`);
37
+ this.logger.info(`[EcsBootstrap] standalone bootstrap skipped: ${skip}; this agent expects its participants to be provisioned out of band`);
42
38
  return;
43
39
  }
44
40
  const chain = this.agent.veranaChain;
45
41
  const indexer = this.indexer;
46
- await this.acceptPendingOffers();
47
42
  const { credential, credentialType, service } = await this.discoverEcsSchemas(indexer);
48
43
  await this.ensureHolderParticipant(chain, indexer, credential, credentialType);
49
44
  await this.ensureServiceIssuer(chain, indexer, service);
@@ -59,9 +54,15 @@ class EcsBootstrapService {
59
54
  return 'the Verana indexer is not configured';
60
55
  if (!((_a = this.options.trustedEcosystemDids) === null || _a === void 0 ? void 0 : _a.length))
61
56
  return 'TRUSTED_ECS_ECOSYSTEM_DIDS is not set';
62
- const operatorAuths = await chain.listOperatorAuthorizations();
63
- if (!operatorAuths.some(a => a.msgTypes.includes(START_OP_MSG))) {
64
- return `operator ${chain.address} has no OperatorAuthorization covering MsgStartParticipantOP`;
57
+ return this.operatorSkipReason(chain);
58
+ }
59
+ // StartParticipantOP costs a trust deposit and a fee, so both the authorization and the funds
60
+ // must be there. Neither is a misconfiguration: the operator may provision the entry itself.
61
+ async operatorSkipReason(chain) {
62
+ var _a, _b;
63
+ const operatorAuths = (_b = (await ((_a = this.indexer) === null || _a === void 0 ? void 0 : _a.listOperatorAuthorizations(chain.address)))) !== null && _b !== void 0 ? _b : [];
64
+ if (!operatorAuths.some(auth => auth.msgTypes.includes(START_OP_MSG))) {
65
+ return `operator ${chain.address} holds no OperatorAuthorization covering MsgStartParticipantOP`;
65
66
  }
66
67
  const balance = await chain.getBalance();
67
68
  if (Number(balance.amount) === 0) {
@@ -78,12 +79,33 @@ class EcsBootstrapService {
78
79
  role: credo_ts_didcomm_vt_flow_1.VtFlowRole.Applicant,
79
80
  });
80
81
  for (const record of pending) {
82
+ const connection = await this.agent.didcomm.connections.findById(record.connectionId);
83
+ if (!(connection === null || connection === void 0 ? void 0 : connection.isReady) && record.applicantParticipantId) {
84
+ try {
85
+ await new VtFlowOrchestrator_1.VtFlowOrchestrator(this.agent).startOnboardingProcess({
86
+ applicantParticipantId: Number(record.applicantParticipantId),
87
+ });
88
+ this.logger.info(`[EcsBootstrap] reconnected flow ${record.id} so the validator can offer again`);
89
+ }
90
+ catch (error) {
91
+ this.logger.warn(`[EcsBootstrap] could not reconnect flow ${record.id}: ${error.message}`);
92
+ }
93
+ continue;
94
+ }
81
95
  if (!record.credentialExchangeRecordId)
82
96
  continue;
83
97
  try {
84
- await this.agent.didcomm.credentials.acceptOffer({
85
- credentialExchangeRecordId: record.credentialExchangeRecordId,
86
- });
98
+ const exchange = await this.agent.didcomm.credentials.getById(record.credentialExchangeRecordId);
99
+ if (exchange.state === didcomm_1.DidCommCredentialState.CredentialReceived) {
100
+ const { verifyCredential } = this.agent.dependencyManager.resolve(credo_ts_didcomm_vt_flow_1.VtFlowModuleConfig);
101
+ const agentContext = this.agent.context;
102
+ if (await (verifyCredential === null || verifyCredential === void 0 ? void 0 : verifyCredential({ agentContext, record, credentialExchangeRecord: exchange }))) {
103
+ await this.agent.didcomm.credentials.acceptCredential({ credentialExchangeRecordId: exchange.id });
104
+ this.logger.info(`[EcsBootstrap] accepted the verified credential of flow ${record.id}`);
105
+ }
106
+ continue;
107
+ }
108
+ await api.acceptCredentialOffer(record.id);
87
109
  this.logger.info(`[EcsBootstrap] re-accepted the pending credential offer for flow ${record.id}`);
88
110
  }
89
111
  catch (error) {
@@ -91,6 +113,59 @@ class EcsBootstrapService {
91
113
  }
92
114
  }
93
115
  }
116
+ /**
117
+ * StartParticipantOP pays a trust deposit, and it cannot be undone. The onboarding request that
118
+ * must follow it travels over DIDComm from the chain event handler, which catches its own
119
+ * failure. The indexer marks that block processed all the same and never replays it, so an
120
+ * unreachable validator leaves the entry at PENDING for ever. This boot step closes that gap.
121
+ */
122
+ async resumePendingOnboardings() {
123
+ if (!this.indexer || !this.agent.did)
124
+ return;
125
+ const own = await this.indexer.listParticipants({ did: this.agent.did }).catch(() => []);
126
+ for (const participant of own) {
127
+ if (participant.op_state !== 'PENDING' || participant.revoked || participant.slashed)
128
+ continue;
129
+ try {
130
+ await this.resumeOnboarding(participant);
131
+ }
132
+ catch (error) {
133
+ this.logger.warn(`[EcsBootstrap] could not resume the onboarding of participant ${participant.id}: ${error.message}`);
134
+ }
135
+ }
136
+ }
137
+ async resumeOnboarding(participant) {
138
+ // A flow that a peer ended on purpose is not an interruption; only an error deserves a retry.
139
+ const api = this.agent.dependencyManager.resolve(credo_ts_didcomm_vt_flow_1.VtFlowApi);
140
+ const [latest] = (await api.findAllByQuery({
141
+ applicantParticipantId: String(participant.id),
142
+ role: credo_ts_didcomm_vt_flow_1.VtFlowRole.Applicant,
143
+ flowVariant: credo_ts_didcomm_vt_flow_1.VtFlowVariant.OnboardingProcess,
144
+ })).sort((a, b) => b.createdAt.getTime() - a.createdAt.getTime());
145
+ if (latest && (0, credo_ts_didcomm_vt_flow_1.isVtFlowTerminalState)(latest.state) && latest.state !== credo_ts_didcomm_vt_flow_1.VtFlowState.Error)
146
+ return;
147
+ // The agent validates its own entry when it controls the ECOSYSTEM root of the schema, so
148
+ // there is no peer to send a request to: the interrupted step is the chain outcome itself.
149
+ if (await this.isSelfValidated(participant)) {
150
+ const chain = this.agent.veranaChain;
151
+ if (!chain)
152
+ return;
153
+ await chain.setParticipantOPToValidated({ id: participant.id, validationFees: 0, issuanceFees: 0, verificationFees: 0 }, { granter: (0, feePreflight_1.feeGranterFor)(this.agent, participant.id) });
154
+ await this.triggerResolverBestEffort();
155
+ this.logger.info(`[EcsBootstrap] validated the interrupted self-issued participant ${participant.id}`);
156
+ return;
157
+ }
158
+ await (0, didReadiness_1.waitUntilOwnDidIsPubliclyResolvable)(this.agent, this.logger);
159
+ const claims = await this.onboardingClaims(participant.schema_id);
160
+ const record = await new VtFlowOrchestrator_1.VtFlowOrchestrator(this.agent).startOnboardingProcess(Object.assign({ applicantParticipantId: participant.id }, (claims ? { claims } : {})));
161
+ this.logger.info(`[EcsBootstrap] checked the onboarding of participant ${participant.id} (flow ${record.id}, state ${record.state})`);
162
+ }
163
+ async isSelfValidated(participant) {
164
+ if (participant.validator_participant_id == null)
165
+ return false;
166
+ const validator = await this.indexer.getParticipant(participant.validator_participant_id).catch(() => undefined);
167
+ return (validator === null || validator === void 0 ? void 0 : validator.did) === this.agent.did;
168
+ }
94
169
  // WL-ECS: only ecosystems on the configured allowlist may provide the essential credential schemas.
95
170
  async discoverEcsSchemas(indexer) {
96
171
  const ecosystems = await indexer.listEcosystems();
@@ -114,7 +189,7 @@ class EcsBootstrapService {
114
189
  const schemas = await indexer.listCredentialSchemas(ecosystemId);
115
190
  const classified = await Promise.all(schemas
116
191
  .filter(schema => !schema.archived)
117
- .map(async (schema) => ({ schema, type: await this.classifySchema(schema) })));
192
+ .map(async (schema) => ({ schema, type: await (0, vs_agent_model_1.classifyEcsSchema)(schema.json_schema) })));
118
193
  const byType = (type) => { var _a; return (_a = classified.find(c => c.type === type)) === null || _a === void 0 ? void 0 : _a.schema; };
119
194
  const service = byType(vs_agent_model_1.ECS.SERVICE);
120
195
  if (!service)
@@ -126,20 +201,6 @@ class EcsBootstrapService {
126
201
  throw new Error('no ECS Organization or Persona credential schema');
127
202
  return { credential, credentialType: org ? vs_agent_model_1.ECS.ORG : vs_agent_model_1.ECS.PERSONA, service };
128
203
  }
129
- async classifySchema(schema) {
130
- var _a;
131
- try {
132
- const parsed = JSON.parse(schema.json_schema);
133
- const byDigest = await (0, vs_agent_model_1.identifySchema)(parsed);
134
- if (byDigest)
135
- return byDigest;
136
- const title = typeof parsed.title === 'string' ? parsed.title : '';
137
- return (_a = ECS_TITLE_BY_TYPE[title]) !== null && _a !== void 0 ? _a : null;
138
- }
139
- catch (_b) {
140
- return null;
141
- }
142
- }
143
204
  async ensureHolderParticipant(chain, indexer, schema, credentialType) {
144
205
  // If this agent controls the schema's ECOSYSTEM root, it has no external ISSUER to seek a
145
206
  // HOLDER credential from — it must become the ISSUER itself (see ensureSelfIssuedParticipant).
@@ -201,13 +262,8 @@ class EcsBootstrapService {
201
262
  validatorParticipantId: root.id,
202
263
  did: this.agent.did,
203
264
  });
204
- await chain.setParticipantOPToValidated({
205
- id: participantId,
206
- validationFees: 0,
207
- issuanceFees: 0,
208
- verificationFees: 0,
209
- });
210
- await this.triggerResolverBestEffort(chain, participantId);
265
+ await chain.setParticipantOPToValidated({ id: participantId, validationFees: 0, issuanceFees: 0, verificationFees: 0 }, { granter: (0, feePreflight_1.feeGranterFor)(this.agent, participantId) });
266
+ await this.triggerResolverBestEffort();
211
267
  this.logger.info(`[EcsBootstrap] self-issued ISSUER participant ${participantId} for the ECS ${credentialType} schema (ecosystem root ${root.id})`);
212
268
  }
213
269
  async ensureServiceIssuer(chain, indexer, schema) {
@@ -222,11 +278,14 @@ class EcsBootstrapService {
222
278
  this.logger.info(`[EcsBootstrap] reusing Service ISSUER participant ${usable.id}`);
223
279
  return;
224
280
  }
225
- const onChainSchema = await chain.getCredentialSchema(schema.id);
281
+ const onChainSchema = await indexer
282
+ .getCredentialSchema(schema.id)
283
+ .then(blockchain_1.toCredentialSchema)
284
+ .catch(() => undefined);
226
285
  if (!onChainSchema)
227
286
  throw new Error(`Service schema ${schema.id} not found on chain`);
228
287
  if (onChainSchema.issuerOnboardingMode === ISSUER_ONBOARDING_MODE_OPEN) {
229
- const operatorAuths = await chain.listOperatorAuthorizations();
288
+ const operatorAuths = await indexer.listOperatorAuthorizations(chain.address);
230
289
  if (!operatorAuths.some(a => a.msgTypes.includes(SELF_CREATE_MSG))) {
231
290
  throw new Error(`operator ${chain.address} has no OperatorAuthorization covering MsgSelfCreateParticipant (required for OPEN issuer onboarding)`);
232
291
  }
@@ -239,7 +298,7 @@ class EcsBootstrapService {
239
298
  did: this.agent.did,
240
299
  effectiveUntil: root.effective_until ? new Date(root.effective_until) : undefined,
241
300
  });
242
- await this.triggerResolverBestEffort(chain, participantId);
301
+ await this.triggerResolverBestEffort();
243
302
  this.logger.info(`[EcsBootstrap] self-created Service ISSUER participant ${participantId}`);
244
303
  return;
245
304
  }
@@ -265,13 +324,10 @@ class EcsBootstrapService {
265
324
  });
266
325
  return candidates.find(p => !p.revoked && !p.slashed && p.did !== this.agent.did);
267
326
  }
268
- async triggerResolverBestEffort(chain, participantId) {
269
- try {
270
- await chain.triggerResolver(participantId);
271
- }
272
- catch (error) {
273
- this.logger.warn(`[EcsBootstrap] TriggerResolver failed for participant ${participantId}: ${error.message}`);
274
- }
327
+ // [VSA-VPR-TX-5]: the new entry is an ISSUER entry, which cannot carry TriggerResolver, so the
328
+ // trigger names the HOLDER entry of the agent. The helper logs the outcome, and never throws
329
+ async triggerResolverBestEffort() {
330
+ await (0, triggerResolver_1.triggerResolverForOwnDid)(this.agent, 'the agent became a Verifiable Service');
275
331
  }
276
332
  isUsableParticipant(p) {
277
333
  return (!p.revoked &&
@@ -288,101 +344,91 @@ class EcsBootstrapService {
288
344
  throw new Error('delegated bootstrap requires a public DID');
289
345
  if (!this.indexer)
290
346
  throw new Error('delegated bootstrap requires the Verana indexer');
347
+ const chain = this.agent.veranaChain;
348
+ if (!chain)
349
+ throw new Error('delegated bootstrap requires the Verana chain');
291
350
  if (!this.options.verifyPeer) {
292
351
  throw new Error(`cannot verify parent VS ${parentDid}: verifiable public registries are not configured (set VERANA_CHAIN_ID)`);
293
352
  }
294
- await (0, didReadiness_1.waitUntilOwnDidIsPubliclyResolvable)(this.agent, this.logger);
295
353
  const verified = await this.options.verifyPeer(parentDid).catch(() => false);
296
354
  if (!verified) {
297
355
  throw new Error(`parent VS ${parentDid} is not a Verifiable Service`);
298
356
  }
299
- const schemaId = await this.findParentServiceSchemaId(parentDid);
300
- let lastError;
301
- for (let attempt = 1; attempt <= DELEGATED_REQUEST_MAX_ATTEMPTS; attempt++) {
302
- try {
303
- await this.requestDelegatedServiceCredential(parentDid, schemaId, attempt);
304
- return;
305
- }
306
- catch (error) {
307
- lastError = error;
308
- this.logger.warn(`[EcsBootstrap] delegated issuance attempt ${attempt}/${DELEGATED_REQUEST_MAX_ATTEMPTS} failed: ${lastError.message}`);
309
- if (attempt < DELEGATED_REQUEST_MAX_ATTEMPTS) {
310
- await new Promise(resolve => setTimeout(resolve, DELEGATED_REQUEST_RETRY_DELAY_MS));
311
- }
357
+ const validator = await this.findParentServiceIssuer(parentDid);
358
+ await this.assertTrustedEcosystem(validator.schema_id);
359
+ // An existing entry means the process already ran, or the operator provisioned it.
360
+ const own = await this.indexer.listParticipants({
361
+ did: this.agent.did,
362
+ role: blockchain_1.ParticipantRole.Holder,
363
+ schemaId: validator.schema_id,
364
+ });
365
+ const existing = own.find(participant => this.isUsableParticipant(participant));
366
+ if (existing) {
367
+ // The parent named by AGENT_DELEGATED_PARENT_VS_DID must be the validator of the entry;
368
+ // any other validator would issue the Service credential of another accountable party.
369
+ if (Number(existing.validator_participant_id) !== validator.id) {
370
+ throw new Error(`HOLDER participant ${existing.id} for the ECS Service schema ${validator.schema_id} names validator ${existing.validator_participant_id}, not the parent VS ${parentDid} (validator ${validator.id})`);
312
371
  }
372
+ this.logger.info(`[EcsBootstrap] HOLDER participant ${existing.id} for the ECS Service schema ${validator.schema_id} already exists; the onboarding process continues on its own`);
373
+ return;
313
374
  }
314
- throw lastError !== null && lastError !== void 0 ? lastError : new Error(`parent VS ${parentDid} did not complete the issuance in time`);
315
- }
316
- async requestDelegatedServiceCredential(parentDid, schemaId, attempt) {
317
- let connectionId;
318
- try {
319
- const { connectionRecord } = await this.agent.didcomm.oob.receiveImplicitInvitation({
320
- did: parentDid,
321
- ourDid: this.agent.did,
322
- label: this.agent.label,
323
- didCommVersion: 'v2',
324
- });
325
- if (!connectionRecord)
326
- throw new Error('no connection record returned');
327
- const ready = await this.agent.didcomm.connections.returnWhenIsConnected(connectionRecord.id);
328
- connectionId = ready.id;
329
- }
330
- catch (error) {
331
- throw new Error(`parent VS ${parentDid} is unreachable: ${error.message}`);
375
+ // [VSA-VTI-FLOW-OP-NEW] step 1: the applicant submits StartParticipantOP. The agent then
376
+ // reacts to its own chain event and sends the onboarding request, so nothing is awaited here.
377
+ // Direct Issuance does not apply: it needs holder_onboarding_mode = PERMISSIONLESS, and the
378
+ // ECS Service schema uses ISSUER_ONBOARDING_PROCESS.
379
+ const skip = await this.operatorSkipReason(chain);
380
+ if (skip) {
381
+ this.logger.info(`[EcsBootstrap] delegated bootstrap skipped: ${skip}; this agent expects its HOLDER participant to be provisioned out of band, with validator ${validator.id}`);
382
+ return;
332
383
  }
333
- const api = this.agent.dependencyManager.resolve(credo_ts_didcomm_vt_flow_1.VtFlowApi);
334
- const record = await api.sendIssuanceRequest({
335
- connectionId,
336
- schemaId: String(schemaId),
337
- agentParticipantId: '0',
338
- walletAgentParticipantId: '0',
384
+ const { participantId } = await chain.startParticipantOP({
385
+ role: types_1.HOLDER_PARTICIPANT_TYPE,
386
+ validatorParticipantId: validator.id,
387
+ did: this.agent.did,
339
388
  });
340
- this.logger.info(`[EcsBootstrap] requested the Service credential (schema ${schemaId}) from parent VS ${parentDid} (attempt ${attempt}/${DELEGATED_REQUEST_MAX_ATTEMPTS})`);
341
- const isLastAttempt = attempt === DELEGATED_REQUEST_MAX_ATTEMPTS;
342
- const timeoutMs = isLastAttempt ? DELEGATED_OUTCOME_TIMEOUT_MS : DELEGATED_REQUEST_ATTEMPT_TIMEOUT_MS;
343
- await this.awaitDelegatedOutcome(record.id, parentDid, timeoutMs);
389
+ this.logger.info(`[EcsBootstrap] started HOLDER onboarding ${participantId} for the ECS Service schema ${validator.schema_id} with parent VS ${parentDid} (validator ${validator.id})`);
344
390
  }
345
- async findParentServiceSchemaId(parentDid) {
391
+ async findParentServiceIssuer(parentDid) {
346
392
  const participants = await this.indexer.listParticipants({
347
393
  did: parentDid,
348
394
  role: blockchain_1.ParticipantRole.Issuer,
349
395
  participantState: blockchain_1.ParticipantState.Active,
350
396
  });
351
397
  for (const participant of participants) {
398
+ if (participant.revoked || participant.slashed)
399
+ continue;
352
400
  const schema = await this.indexer.getCredentialSchema(participant.schema_id).catch(() => undefined);
353
401
  if (!schema)
354
402
  continue;
355
- if ((await this.classifySchema(schema)) === vs_agent_model_1.ECS.SERVICE)
356
- return schema.id;
403
+ if ((await (0, vs_agent_model_1.classifyEcsSchema)(schema.json_schema)) === vs_agent_model_1.ECS.SERVICE)
404
+ return participant;
357
405
  }
358
406
  throw new Error(`parent VS ${parentDid} holds no active ISSUER participant for an ECS Service schema`);
359
407
  }
360
- awaitDelegatedOutcome(recordId, parentDid, timeoutMs) {
361
- return new Promise((resolve, reject) => {
362
- const listener = ({ payload }) => {
363
- if (payload.vtFlowRecordId !== recordId)
364
- return;
365
- if (payload.state === credo_ts_didcomm_vt_flow_1.VtFlowState.Completed) {
366
- cleanup();
367
- resolve();
368
- }
369
- else if (payload.state === credo_ts_didcomm_vt_flow_1.VtFlowState.TerminatedByValidator ||
370
- payload.state === credo_ts_didcomm_vt_flow_1.VtFlowState.Error) {
371
- cleanup();
372
- reject(new Error(`parent VS ${parentDid} rejected the Service credential request`));
373
- }
374
- };
375
- const cleanup = () => {
376
- clearTimeout(timer);
377
- this.agent.events.off(credo_ts_didcomm_vt_flow_1.VtFlowEventTypes.VtFlowStateChanged, listener);
378
- };
379
- const timer = setTimeout(() => {
380
- cleanup();
381
- reject(new Error(`parent VS ${parentDid} did not complete the issuance in time`));
382
- }, timeoutMs);
383
- timer.unref();
384
- this.agent.events.on(credo_ts_didcomm_vt_flow_1.VtFlowEventTypes.VtFlowStateChanged, listener);
385
- });
408
+ // WL-ECS: an allowlist is optional in delegated mode, but it binds the flow once the operator sets it.
409
+ async assertTrustedEcosystem(schemaId) {
410
+ var _a;
411
+ const trusted = this.options.trustedEcosystemDids;
412
+ if (!(trusted === null || trusted === void 0 ? void 0 : trusted.length))
413
+ return;
414
+ const schema = await this.indexer.getCredentialSchema(schemaId).catch(() => undefined);
415
+ const ecosystem = schema
416
+ ? await this.indexer.getEcosystem(schema.ecosystem_id).catch(() => undefined)
417
+ : undefined;
418
+ if (!ecosystem || ecosystem.archived || !trusted.includes(ecosystem.did)) {
419
+ throw new Error(`the ECS Service schema ${schemaId} belongs to ecosystem ${(_a = ecosystem === null || ecosystem === void 0 ? void 0 : ecosystem.did) !== null && _a !== void 0 ? _a : '<unresolvable>'}, which TRUSTED_ECS_ECOSYSTEM_DIDS does not list`);
420
+ }
421
+ }
422
+ async onboardingClaims(schemaId) {
423
+ if (!this.agent.ecsClaims || !this.agent.did)
424
+ return undefined;
425
+ const schema = await this.agent.indexer.getCredentialSchema(schemaId);
426
+ const ecsKey = schema && (await (0, vs_agent_model_1.classifyEcsSchema)(schema.json_schema));
427
+ if (!ecsKey) {
428
+ this.agent.config.logger.info(`[ecs-claims] schema ${schemaId} is not an ECS schema, sending no claims`);
429
+ return undefined;
430
+ }
431
+ return await (0, ecsClaims_1.composeEcsClaims)(this.agent.ecsClaims, ecsKey, this.agent.config.logger);
386
432
  }
387
433
  }
388
434
  exports.EcsBootstrapService = EcsBootstrapService;
@@ -1 +1 @@
1
- {"version":3,"file":"EcsBootstrapService.js","sourceRoot":"","sources":["../../src/bootstrap/EcsBootstrapService.ts"],"names":[],"mappings":";;;AACA,oFAM8C;AAC9C,gEAAiE;AAGjE,8CAOsB;AACtB,oCAA2E;AAC3E,wDAA2E;AAE3E,MAAM,YAAY,GAAG,qCAAqC,CAAA;AAC1D,MAAM,eAAe,GAAG,wCAAwC,CAAA;AAEhE,MAAM,2BAA2B,GAAG,CAAC,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9D,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,mBAAmB,CAAC,QAAQ,CAAC,CAAA;QACrE,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,MAAM,IAAA,kCAAiB,EAAC,MAAM,CAAC,WAAW,CAAC,CAAC,CAAA;QACtE,IAAI,CAAC,MAAM,EAAE,CAAC;YACZ,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,uBAAuB,QAAQ,0CAA0C,CAAC,CAAA;YACxG,OAAO,SAAS,CAAA;QAClB,CAAC;QACD,OAAO,MAAM,IAAA,4BAAgB,EAAC,IAAI,CAAC,KAAK,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,CAAA;IACvF,CAAC;CACF;AA3fD,kDA2fC"}
@@ -0,0 +1,20 @@
1
+ import type { AgentContext, DependencyManager, Module, StorageService } from '@credo-ts/core';
2
+ import type { DidCommConnectionRecord } from '@credo-ts/didcomm';
3
+ import { EventEmitter } from '@credo-ts/core';
4
+ import { DidCommConnectionRepository, DidCommOutOfBandRepository } from '@credo-ts/didcomm';
5
+ export declare const PARENT_CONNECTION_TAG = "parentConnectionId";
6
+ /**
7
+ * Copies the `parentConnectionId` tag from the out-of-band record before the first save.
8
+ * Credo emits the first state change after this save, so the first event has the tag.
9
+ */
10
+ export declare class ParentConnectionRepository extends DidCommConnectionRepository {
11
+ private readonly outOfBandRepository;
12
+ constructor(storageService: StorageService<DidCommConnectionRecord>, eventEmitter: EventEmitter, outOfBandRepository: DidCommOutOfBandRepository);
13
+ save(agentContext: AgentContext, record: DidCommConnectionRecord): Promise<void>;
14
+ }
15
+ /**
16
+ * Put this module after `didcomm` in the module map. The container uses the last registration.
17
+ */
18
+ export declare class ParentConnectionModule implements Module {
19
+ register(dependencyManager: DependencyManager): void;
20
+ }
@@ -0,0 +1,56 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ var __param = (this && this.__param) || function (paramIndex, decorator) {
12
+ return function (target, key) { decorator(target, key, paramIndex); }
13
+ };
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ exports.ParentConnectionModule = exports.ParentConnectionRepository = exports.PARENT_CONNECTION_TAG = void 0;
16
+ const core_1 = require("@credo-ts/core");
17
+ const didcomm_1 = require("@credo-ts/didcomm");
18
+ exports.PARENT_CONNECTION_TAG = 'parentConnectionId';
19
+ /**
20
+ * Copies the `parentConnectionId` tag from the out-of-band record before the first save.
21
+ * Credo emits the first state change after this save, so the first event has the tag.
22
+ */
23
+ let ParentConnectionRepository = class ParentConnectionRepository extends didcomm_1.DidCommConnectionRepository {
24
+ constructor(storageService, eventEmitter, outOfBandRepository) {
25
+ super(storageService, eventEmitter);
26
+ this.outOfBandRepository = outOfBandRepository;
27
+ }
28
+ async save(agentContext, record) {
29
+ if (record.outOfBandId && !record.getTag(exports.PARENT_CONNECTION_TAG)) {
30
+ const outOfBandRecord = await this.outOfBandRepository.findById(agentContext, record.outOfBandId);
31
+ const parentConnectionId = outOfBandRecord === null || outOfBandRecord === void 0 ? void 0 : outOfBandRecord.getTag(exports.PARENT_CONNECTION_TAG);
32
+ if (typeof parentConnectionId === 'string')
33
+ record.setTag(exports.PARENT_CONNECTION_TAG, parentConnectionId);
34
+ }
35
+ await super.save(agentContext, record);
36
+ }
37
+ };
38
+ exports.ParentConnectionRepository = ParentConnectionRepository;
39
+ exports.ParentConnectionRepository = ParentConnectionRepository = __decorate([
40
+ (0, core_1.injectable)(),
41
+ __param(0, (0, core_1.inject)(core_1.InjectionSymbols.StorageService)),
42
+ __param(1, (0, core_1.inject)(core_1.EventEmitter)),
43
+ __param(2, (0, core_1.inject)(didcomm_1.DidCommOutOfBandRepository)),
44
+ __metadata("design:paramtypes", [Object, core_1.EventEmitter,
45
+ didcomm_1.DidCommOutOfBandRepository])
46
+ ], ParentConnectionRepository);
47
+ /**
48
+ * Put this module after `didcomm` in the module map. The container uses the last registration.
49
+ */
50
+ class ParentConnectionModule {
51
+ register(dependencyManager) {
52
+ dependencyManager.registerSingleton(didcomm_1.DidCommConnectionRepository, ParentConnectionRepository);
53
+ }
54
+ }
55
+ exports.ParentConnectionModule = ParentConnectionModule;
56
+ //# sourceMappingURL=ParentConnectionModule.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ParentConnectionModule.js","sourceRoot":"","sources":["../../src/connections/ParentConnectionModule.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAGA,yCAAmF;AACnF,+CAA2F;AAE9E,QAAA,qBAAqB,GAAG,oBAAoB,CAAA;AAEzD;;;GAGG;AAEI,IAAM,0BAA0B,GAAhC,MAAM,0BAA2B,SAAQ,qCAA2B;IACzE,YAC2C,cAAuD,EAC1E,YAA0B,EACK,mBAA+C;QAEpG,KAAK,CAAC,cAAc,EAAE,YAAY,CAAC,CAAA;QAFkB,wBAAmB,GAAnB,mBAAmB,CAA4B;IAGtG,CAAC;IAEM,KAAK,CAAC,IAAI,CAAC,YAA0B,EAAE,MAA+B;QAC3E,IAAI,MAAM,CAAC,WAAW,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,6BAAqB,CAAC,EAAE,CAAC;YAChE,MAAM,eAAe,GAAG,MAAM,IAAI,CAAC,mBAAmB,CAAC,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC,WAAW,CAAC,CAAA;YACjG,MAAM,kBAAkB,GAAG,eAAe,aAAf,eAAe,uBAAf,eAAe,CAAE,MAAM,CAAC,6BAAqB,CAAC,CAAA;YACzE,IAAI,OAAO,kBAAkB,KAAK,QAAQ;gBAAE,MAAM,CAAC,MAAM,CAAC,6BAAqB,EAAE,kBAAkB,CAAC,CAAA;QACtG,CAAC;QACD,MAAM,KAAK,CAAC,IAAI,CAAC,YAAY,EAAE,MAAM,CAAC,CAAA;IACxC,CAAC;CACF,CAAA;AAjBY,gEAA0B;qCAA1B,0BAA0B;IADtC,IAAA,iBAAU,GAAE;IAGR,WAAA,IAAA,aAAM,EAAC,uBAAgB,CAAC,cAAc,CAAC,CAAA;IACvC,WAAA,IAAA,aAAM,EAAC,mBAAY,CAAC,CAAA;IACpB,WAAA,IAAA,aAAM,EAAC,oCAA0B,CAAC,CAAA;6CADC,mBAAY;QAC0B,oCAA0B;GAJ3F,0BAA0B,CAiBtC;AAED;;GAEG;AACH,MAAa,sBAAsB;IAC1B,QAAQ,CAAC,iBAAoC;QAClD,iBAAiB,CAAC,iBAAiB,CAAC,qCAA2B,EAAE,0BAA0B,CAAC,CAAA;IAC9F,CAAC;CACF;AAJD,wDAIC"}
@@ -3,7 +3,6 @@ import type { AgentContext } from '@credo-ts/core';
3
3
  import { BasicTailsFileService } from '@credo-ts/anoncreds';
4
4
  export declare function isValidTailsFileName(name: string): boolean;
5
5
  export declare function getTailsDirectoryPath(agentContext: AgentContext): string;
6
- export declare function migrateLegacyTailsFiles(agentContext: AgentContext): void;
7
6
  export declare class FullTailsFileService extends BasicTailsFileService {
8
7
  private tailsServerBaseUrl;
9
8
  constructor(options: {