@verana-labs/vs-agent-sdk 1.12.0-dev.2 → 1.12.0-dev.21

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 (78) hide show
  1. package/README.md +35 -46
  2. package/build/agent/VsAgent.d.ts +6 -0
  3. package/build/agent/VsAgent.js +25 -13
  4. package/build/agent/VsAgent.js.map +1 -1
  5. package/build/agent/createVsAgent.d.ts +1 -0
  6. package/build/agent/createVsAgent.js +1 -0
  7. package/build/agent/createVsAgent.js.map +1 -1
  8. package/build/blockchain/IndexerWebSocketService.d.ts +15 -13
  9. package/build/blockchain/IndexerWebSocketService.js +207 -103
  10. package/build/blockchain/IndexerWebSocketService.js.map +1 -1
  11. package/build/blockchain/VeranaChainService.d.ts +33 -11
  12. package/build/blockchain/VeranaChainService.js +246 -55
  13. package/build/blockchain/VeranaChainService.js.map +1 -1
  14. package/build/blockchain/VeranaHelpers.js +3 -2
  15. package/build/blockchain/VeranaHelpers.js.map +1 -1
  16. package/build/blockchain/VeranaIndexerService.d.ts +9 -5
  17. package/build/blockchain/VeranaIndexerService.js +41 -23
  18. package/build/blockchain/VeranaIndexerService.js.map +1 -1
  19. package/build/blockchain/handlers/IndexerHandlerRegistry.d.ts +5 -3
  20. package/build/blockchain/handlers/IndexerHandlerRegistry.js +6 -0
  21. package/build/blockchain/handlers/IndexerHandlerRegistry.js.map +1 -1
  22. package/build/blockchain/handlers/defaultHandlers.d.ts +4 -1
  23. package/build/blockchain/handlers/defaultHandlers.js +76 -44
  24. package/build/blockchain/handlers/defaultHandlers.js.map +1 -1
  25. package/build/blockchain/handlers/stateMutations.d.ts +17 -4
  26. package/build/blockchain/handlers/stateMutations.js +229 -31
  27. package/build/blockchain/handlers/stateMutations.js.map +1 -1
  28. package/build/blockchain/indexerSync.d.ts +10 -0
  29. package/build/blockchain/indexerSync.js +34 -0
  30. package/build/blockchain/indexerSync.js.map +1 -0
  31. package/build/blockchain/types.d.ts +291 -49
  32. package/build/blockchain/types.js +27 -1
  33. package/build/blockchain/types.js.map +1 -1
  34. package/build/credentials/FullTailsFileService.d.ts +4 -4
  35. package/build/credentials/FullTailsFileService.js +78 -71
  36. package/build/credentials/FullTailsFileService.js.map +1 -1
  37. package/build/did/adminApiService.d.ts +2 -0
  38. package/build/did/adminApiService.js +17 -0
  39. package/build/did/adminApiService.js.map +1 -0
  40. package/build/did/migrateWebVhVersionTime.d.ts +9 -0
  41. package/build/did/migrateWebVhVersionTime.js +191 -0
  42. package/build/did/migrateWebVhVersionTime.js.map +1 -0
  43. package/build/events/VsAgentEvents.d.ts +16 -2
  44. package/build/events/VsAgentEvents.js +2 -0
  45. package/build/events/VsAgentEvents.js.map +1 -1
  46. package/build/events/VtFlowEvents.d.ts +3 -0
  47. package/build/events/VtFlowEvents.js +35 -0
  48. package/build/events/VtFlowEvents.js.map +1 -0
  49. package/build/events/index.d.ts +1 -0
  50. package/build/events/index.js +1 -0
  51. package/build/events/index.js.map +1 -1
  52. package/build/index.d.ts +4 -4
  53. package/build/index.js +9 -6
  54. package/build/index.js.map +1 -1
  55. package/build/plugins/setupBaseDidComm.d.ts +3 -1
  56. package/build/plugins/setupBaseDidComm.js +3 -1
  57. package/build/plugins/setupBaseDidComm.js.map +1 -1
  58. package/build/types.d.ts +2 -0
  59. package/build/types.js +3 -1
  60. package/build/types.js.map +1 -1
  61. package/build/utils/trustCredentialStore.js +2 -0
  62. package/build/utils/trustCredentialStore.js.map +1 -1
  63. package/build/utils/util.d.ts +5 -1
  64. package/build/utils/util.js +17 -5
  65. package/build/utils/util.js.map +1 -1
  66. package/build/vtFlow/VtFlowOrchestrator.d.ts +41 -0
  67. package/build/vtFlow/VtFlowOrchestrator.js +285 -0
  68. package/build/vtFlow/VtFlowOrchestrator.js.map +1 -0
  69. package/build/vtFlow/assertVerifiableService.d.ts +8 -0
  70. package/build/vtFlow/assertVerifiableService.js +28 -0
  71. package/build/vtFlow/assertVerifiableService.js.map +1 -0
  72. package/build/vtFlow/credentialDigest.d.ts +3 -0
  73. package/build/vtFlow/credentialDigest.js +23 -0
  74. package/build/vtFlow/credentialDigest.js.map +1 -0
  75. package/build/vtFlow/index.d.ts +2 -0
  76. package/build/vtFlow/index.js +19 -0
  77. package/build/vtFlow/index.js.map +1 -0
  78. package/package.json +16 -12
@@ -0,0 +1,10 @@
1
+ import { IndexerEventRecord } from './types';
2
+ export declare function eventKey(event: IndexerEventRecord): string;
3
+ export declare function isProcessableEvent(event: IndexerEventRecord): boolean;
4
+ export declare function sortEventsByPosition(events: IndexerEventRecord[]): IndexerEventRecord[];
5
+ export interface RestCursorResult {
6
+ done: boolean;
7
+ cursor: number;
8
+ blockExceedsPage: boolean;
9
+ }
10
+ export declare function nextRestCursor(events: IndexerEventRecord[], currentCursor: number, pageLimit: number): RestCursorResult;
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.eventKey = eventKey;
4
+ exports.isProcessableEvent = isProcessableEvent;
5
+ exports.sortEventsByPosition = sortEventsByPosition;
6
+ exports.nextRestCursor = nextRestCursor;
7
+ function eventKey(event) {
8
+ return `${event.tx_hash}:${event.payload.message_index}`;
9
+ }
10
+ function isProcessableEvent(event) {
11
+ var _a;
12
+ return event.type === 'indexer-event' && event.block_height > 0 && Boolean((_a = event.payload) === null || _a === void 0 ? void 0 : _a.sender);
13
+ }
14
+ function sortEventsByPosition(events) {
15
+ return [...events].sort((a, b) => {
16
+ if (a.block_height !== b.block_height)
17
+ return a.block_height - b.block_height;
18
+ if (a.payload.tx_index !== b.payload.tx_index)
19
+ return a.payload.tx_index - b.payload.tx_index;
20
+ return a.payload.message_index - b.payload.message_index;
21
+ });
22
+ }
23
+ // A full page can stop partway through a block, so step back one block and let dedup skip the
24
+ // repeats. If one block fills the whole page, move past it.
25
+ function nextRestCursor(events, currentCursor, pageLimit) {
26
+ if (events.length < pageLimit)
27
+ return { done: true, cursor: currentCursor, blockExceedsPage: false };
28
+ const maxBlock = events.reduce((max, e) => (e.block_height > max ? e.block_height : max), currentCursor);
29
+ const rewound = maxBlock - 1;
30
+ if (rewound > currentCursor)
31
+ return { done: false, cursor: rewound, blockExceedsPage: false };
32
+ return { done: false, cursor: maxBlock, blockExceedsPage: true };
33
+ }
34
+ //# sourceMappingURL=indexerSync.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"indexerSync.js","sourceRoot":"","sources":["../../src/blockchain/indexerSync.ts"],"names":[],"mappings":";;AAEA,4BAEC;AAED,gDAEC;AAED,oDAMC;AAUD,wCAUC;AAlCD,SAAgB,QAAQ,CAAC,KAAyB;IAChD,OAAO,GAAG,KAAK,CAAC,OAAO,IAAI,KAAK,CAAC,OAAO,CAAC,aAAa,EAAE,CAAA;AAC1D,CAAC;AAED,SAAgB,kBAAkB,CAAC,KAAyB;;IAC1D,OAAO,KAAK,CAAC,IAAI,KAAK,eAAe,IAAI,KAAK,CAAC,YAAY,GAAG,CAAC,IAAI,OAAO,CAAC,MAAA,KAAK,CAAC,OAAO,0CAAE,MAAM,CAAC,CAAA;AACnG,CAAC;AAED,SAAgB,oBAAoB,CAAC,MAA4B;IAC/D,OAAO,CAAC,GAAG,MAAM,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE;QAC/B,IAAI,CAAC,CAAC,YAAY,KAAK,CAAC,CAAC,YAAY;YAAE,OAAO,CAAC,CAAC,YAAY,GAAG,CAAC,CAAC,YAAY,CAAA;QAC7E,IAAI,CAAC,CAAC,OAAO,CAAC,QAAQ,KAAK,CAAC,CAAC,OAAO,CAAC,QAAQ;YAAE,OAAO,CAAC,CAAC,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAA;QAC7F,OAAO,CAAC,CAAC,OAAO,CAAC,aAAa,GAAG,CAAC,CAAC,OAAO,CAAC,aAAa,CAAA;IAC1D,CAAC,CAAC,CAAA;AACJ,CAAC;AAQD,8FAA8F;AAC9F,4DAA4D;AAC5D,SAAgB,cAAc,CAC5B,MAA4B,EAC5B,aAAqB,EACrB,SAAiB;IAEjB,IAAI,MAAM,CAAC,MAAM,GAAG,SAAS;QAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,aAAa,EAAE,gBAAgB,EAAE,KAAK,EAAE,CAAA;IACpG,MAAM,QAAQ,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,YAAY,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,aAAa,CAAC,CAAA;IACxG,MAAM,OAAO,GAAG,QAAQ,GAAG,CAAC,CAAA;IAC5B,IAAI,OAAO,GAAG,aAAa;QAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,gBAAgB,EAAE,KAAK,EAAE,CAAA;IAC7F,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,gBAAgB,EAAE,IAAI,EAAE,CAAA;AAClE,CAAC"}
@@ -1,4 +1,22 @@
1
1
  import { BaseLogger } from '@credo-ts/core';
2
+ export declare enum ValidationState {
3
+ UNSPECIFIED = 0,
4
+ PENDING = 1,
5
+ VALIDATED = 2,
6
+ TERMINATED = 3
7
+ }
8
+ export interface Participant {
9
+ id: number;
10
+ schemaId: number;
11
+ role: number;
12
+ did: string;
13
+ corporation: string;
14
+ validatorParticipantId: number;
15
+ opState?: ValidationState;
16
+ opSummaryDigest: string;
17
+ revoked: Date | undefined;
18
+ slashed: Date | undefined;
19
+ }
2
20
  export declare const VERANA_BECH32_PREFIX = "verana";
3
21
  export declare const RECORD_ID = "verana-blockchain-sync-state";
4
22
  export type IndexerEventRecord = {
@@ -18,14 +36,33 @@ export type IndexerEventRecord = {
18
36
  related_dids: string[];
19
37
  entity_type?: string;
20
38
  entity_id?: string;
39
+ corporation_id?: number;
40
+ related_corporation_ids?: number[];
21
41
  };
22
42
  };
43
+ export interface IndexerReadyMessage {
44
+ type: 'ready';
45
+ block: number;
46
+ blockTime: string;
47
+ blockIntervalMs: number;
48
+ }
49
+ export interface IndexerBlockMessage {
50
+ type: 'block';
51
+ block: number;
52
+ blockTime: string;
53
+ events: IndexerEventRecord[];
54
+ }
55
+ export interface IndexerSubscribeMessage {
56
+ action: 'subscribe';
57
+ dids?: string[];
58
+ corporationId?: number;
59
+ }
23
60
  export interface IndexerEventsResponse {
24
61
  events: IndexerEventRecord[];
25
62
  count: number;
26
63
  after_block_height: number;
27
64
  }
28
- export type IndexerEntityType = 'TrustRegistry' | 'CredentialSchema' | 'Permission' | 'PermissionSession' | 'TrustDeposit';
65
+ export type IndexerEntityType = 'Ecosystem' | 'CredentialSchema' | 'Participant' | 'ParticipantSession' | 'TrustDeposit';
29
66
  export interface IndexerActivity {
30
67
  timestamp: string;
31
68
  block_height: string | number;
@@ -44,29 +81,29 @@ export interface VeranaIdxConfig {
44
81
  baseUrl: string;
45
82
  logger: BaseLogger;
46
83
  }
47
- export interface SyncedTrustRegistry {
84
+ export interface SyncedEcosystem {
48
85
  id: number;
49
86
  did: string;
50
- controller: string;
87
+ corporationId: number;
51
88
  archived: boolean;
52
- activeGfVersion?: number;
89
+ activeVersion?: number;
53
90
  lastModifiedBlock: number;
54
91
  }
55
92
  export interface SyncedCredentialSchema {
56
93
  id: number;
57
- trId: number;
94
+ ecosystemId: number;
58
95
  jsonSchema: string;
59
96
  issuerMode?: string;
60
97
  verifierMode?: string;
61
98
  archived: boolean;
62
99
  lastModifiedBlock: number;
63
100
  }
64
- export interface SyncedPermission {
101
+ export interface SyncedParticipant {
65
102
  id: number;
66
103
  schemaId: number;
67
104
  did: string;
68
- type: number;
69
- vpState?: string;
105
+ role: number;
106
+ opState?: string;
70
107
  effectiveUntil?: string;
71
108
  revoked: boolean;
72
109
  slashed: boolean;
@@ -74,85 +111,290 @@ export interface SyncedPermission {
74
111
  }
75
112
  export interface VeranaSyncState {
76
113
  lastBlockHeight: number;
77
- trustRegistries: Record<string, SyncedTrustRegistry>;
114
+ ecosystems: Record<string, SyncedEcosystem>;
78
115
  credentialSchemas: Record<string, SyncedCredentialSchema>;
79
- permissions: Record<string, SyncedPermission>;
116
+ participants: Record<string, SyncedParticipant>;
117
+ partialBlock?: number;
118
+ partialKeys?: string[];
80
119
  }
81
- export interface TrustRegistryDto {
120
+ export interface EcosystemDto {
82
121
  id: number;
83
122
  did: string;
84
- controller: string;
123
+ corporation_id: number;
85
124
  archived: string | null;
86
- active_gf_version?: number;
125
+ active_version?: number;
87
126
  }
88
127
  export interface CredentialSchemaDto {
89
128
  id: number;
90
- tr_id: number;
129
+ ecosystem_id: number;
91
130
  json_schema: string;
92
- issuer_perm_management_mode?: string;
93
- verifier_perm_management_mode?: string;
131
+ issuer_onboarding_mode?: string;
132
+ verifier_onboarding_mode?: string;
94
133
  archived: string | null;
95
134
  created: string;
96
135
  modified: string;
97
136
  }
98
- export interface PermissionDto {
137
+ export declare enum ParticipantRole {
138
+ Issuer = "ISSUER",
139
+ Verifier = "VERIFIER",
140
+ IssuerGrantor = "ISSUER_GRANTOR",
141
+ VerifierGrantor = "VERIFIER_GRANTOR",
142
+ Ecosystem = "ECOSYSTEM",
143
+ Holder = "HOLDER"
144
+ }
145
+ export declare enum ParticipantState {
146
+ Active = "ACTIVE",
147
+ Future = "FUTURE",
148
+ Inactive = "INACTIVE",
149
+ Expired = "EXPIRED",
150
+ Revoked = "REVOKED",
151
+ Slashed = "SLASHED",
152
+ Repaid = "REPAID"
153
+ }
154
+ export interface ParticipantDto {
99
155
  id: number;
100
156
  schema_id: number;
101
157
  did: string | null;
102
- type: number;
103
- perm_state: 'ACTIVE' | 'REVOKED' | 'SLASHED' | 'REPAID' | 'EXPIRED' | 'FUTURE' | 'INACTIVE';
104
- vp_state?: string;
158
+ role: ParticipantRole;
159
+ participant_state?: ParticipantState;
160
+ op_state?: string;
105
161
  revoked: string | null;
106
162
  slashed: string | null;
107
163
  effective_until?: string;
108
164
  modified: string;
165
+ validator_participant_id?: number | null;
166
+ op_summary_digest?: string;
167
+ }
168
+ export interface CorporationDto {
169
+ id: number;
170
+ did?: string | null;
171
+ policy_address?: string | null;
172
+ }
173
+ export interface ParticipantSessionRecordDto {
174
+ created?: string;
175
+ issuer_participant_id?: number;
176
+ verifier_participant_id?: number;
177
+ wallet_agent_participant_id?: number;
178
+ agent_participant_id?: number;
179
+ }
180
+ export interface ParticipantSessionDto {
181
+ id: string;
182
+ corporation_id?: number;
183
+ vs_operator?: string;
184
+ created?: string;
185
+ modified?: string;
186
+ session_records?: ParticipantSessionRecordDto[];
187
+ }
188
+ export interface DigestDto {
189
+ digest: string;
190
+ created: string;
191
+ }
192
+ export interface RawParticipant {
193
+ id: number;
194
+ schemaId: number;
195
+ role: number;
196
+ did: string;
197
+ corporationId?: number;
198
+ validatorParticipantId: number;
199
+ opState?: number;
200
+ opSummaryDigest?: string;
201
+ revoked: Date | undefined;
202
+ slashed: Date | undefined;
203
+ }
204
+ export interface Ecosystem {
205
+ id: number;
206
+ did: string;
207
+ corporationId: number;
208
+ archived: boolean;
209
+ activeVersion: number;
210
+ }
211
+ export interface CredentialSchema {
212
+ id: number;
213
+ ecosystemId: number;
214
+ jsonSchema: string;
215
+ issuerOnboardingMode: number;
216
+ verifierOnboardingMode: number;
217
+ holderOnboardingMode: number;
218
+ archived: Date | undefined;
219
+ }
220
+ export interface OperatorAuthorization {
221
+ id: number;
222
+ corporationId: number;
223
+ operator: string;
224
+ msgTypes: string[];
225
+ }
226
+ export interface ParticipantAuthorizationRecord {
227
+ participantId: number;
228
+ msgTypes: string[];
229
+ }
230
+ export interface VsOperatorAuthorization {
231
+ id: number;
232
+ corporationId: number;
233
+ vsOperator: string;
234
+ records: ParticipantAuthorizationRecord[];
109
235
  }
110
- export interface PermQueryClient {
111
- GetPermission(req: {
112
- id: Long;
236
+ export interface ParticipantQueryClient {
237
+ GetParticipant(req: {
238
+ id: number;
113
239
  }): Promise<{
114
- permission?: unknown;
240
+ participant?: RawParticipant;
115
241
  }>;
116
- FindPermissionsWithDID(req: object): Promise<{
117
- permissions: unknown[];
242
+ FindParticipantsWithDID(req: object): Promise<{
243
+ participants: RawParticipant[];
118
244
  }>;
119
- GetPermissionSession(req: {
245
+ GetParticipantSession(req: {
120
246
  id: string;
121
247
  }): Promise<{
122
248
  session?: unknown;
123
249
  }>;
124
250
  }
251
+ export interface EcosystemQueryClient {
252
+ GetEcosystem(req: {
253
+ id: number;
254
+ }): Promise<{
255
+ ecosystem?: Ecosystem;
256
+ }>;
257
+ }
258
+ export interface CredentialSchemaQueryClient {
259
+ GetCredentialSchema(req: {
260
+ id: number;
261
+ }): Promise<{
262
+ schema?: CredentialSchema;
263
+ }>;
264
+ }
265
+ export interface DelegationQueryClient {
266
+ ListOperatorAuthorizations(req: {
267
+ corporationId: number;
268
+ operator: string;
269
+ responseMaxSize: number;
270
+ }): Promise<{
271
+ operatorAuthorizations: OperatorAuthorization[];
272
+ }>;
273
+ ListVSOperatorAuthorizations(req: {
274
+ corporationId: number;
275
+ vsOperator: string;
276
+ responseMaxSize: number;
277
+ }): Promise<{
278
+ vsOperatorAuthorizations: VsOperatorAuthorization[];
279
+ }>;
280
+ }
125
281
  export interface VeranaChainConfig {
126
282
  rpcUrl: string;
127
283
  chainId?: string;
128
284
  mnemonic: string;
285
+ sessionOperatorMnemonic?: string;
129
286
  logger: BaseLogger;
130
287
  gasPrice?: string;
288
+ corporationAddress?: string;
289
+ autoTriggerResolver?: boolean;
290
+ }
291
+ /** Wrapper for optional uint64 values per `verana.pp.v1.OptionalUInt64`. */
292
+ export interface OptionalUInt64 {
293
+ value: number;
131
294
  }
132
- export interface StartPermissionVPParams {
133
- type: number;
134
- validatorPermId: Long;
135
- country: string;
295
+ export interface StartParticipantOPParams {
296
+ role: number;
297
+ validatorParticipantId: number;
136
298
  did: string;
137
- validationFees?: {
138
- value: Long;
139
- };
299
+ validationFees?: OptionalUInt64;
300
+ issuanceFees?: OptionalUInt64;
301
+ verificationFees?: OptionalUInt64;
302
+ vsOperator?: string;
303
+ vsOperatorAuthzMsgTypes?: string[];
140
304
  }
141
- export interface SetPermissionVPToValidatedParams {
142
- id: Long;
305
+ export interface SetParticipantOPToValidatedParams {
306
+ id: number;
143
307
  effectiveUntil?: Date;
144
- validationFees: Long;
145
- issuanceFees: Long;
146
- verificationFees: Long;
147
- country: string;
148
- vpSummaryDigestSri: string;
149
- issuanceFeeDiscount: Long;
150
- verificationFeeDiscount: Long;
151
- }
152
- export interface CreateOrUpdatePermissionSessionParams {
308
+ validationFees?: number;
309
+ issuanceFees?: number;
310
+ verificationFees?: number;
311
+ opSummaryDigest?: string;
312
+ issuanceFeeDiscount?: number;
313
+ verificationFeeDiscount?: number;
314
+ corporation?: string;
315
+ }
316
+ export interface CreateOrUpdateParticipantSessionParams {
153
317
  id: string;
154
- issuerPermId: Long;
155
- verifierPermId: Long;
156
- agentPermId: Long;
157
- walletAgentPermId: Long;
318
+ issuerParticipantId?: number;
319
+ verifierParticipantId?: number;
320
+ agentParticipantId: number;
321
+ walletAgentParticipantId: number;
322
+ digest?: string;
323
+ corporation?: string;
324
+ }
325
+ export interface Coin {
326
+ denom: string;
327
+ amount: string;
328
+ }
329
+ export interface DurationParam {
330
+ seconds: number;
331
+ nanos?: number;
332
+ }
333
+ export interface GrantOperatorAuthorizationParams {
334
+ grantee: string;
335
+ msgTypes: string[];
336
+ expiration?: Date;
337
+ authzSpendLimit?: Coin[];
338
+ authzSpendLimitPeriod?: DurationParam;
339
+ withFeegrant?: boolean;
340
+ feegrantSpendLimit?: Coin[];
341
+ feegrantSpendLimitPeriod?: DurationParam;
342
+ feeSpendLimit?: Coin[];
343
+ }
344
+ export interface RevokeOperatorAuthorizationParams {
345
+ grantee: string;
346
+ }
347
+ export interface CreateEcosystemParams {
348
+ did: string;
349
+ language: string;
350
+ docUrl: string;
351
+ docDigestSri: string;
352
+ aka?: string;
353
+ }
354
+ export interface ArchiveEcosystemParams {
355
+ ecosystemId: number;
356
+ archive: boolean;
357
+ }
358
+ /** Wrapper for optional uint32 values per `verana.cs.v1.OptionalUInt32`. */
359
+ export interface OptionalUInt32 {
360
+ value: number;
361
+ }
362
+ export interface CreateCredentialSchemaParams {
363
+ ecosystemId: number;
364
+ jsonSchema: string;
365
+ issuerOnboardingMode?: number;
366
+ verifierOnboardingMode?: number;
367
+ holderOnboardingMode?: number;
368
+ pricingAssetType?: number;
369
+ pricingAsset?: string;
370
+ digestAlgorithm?: string;
371
+ issuerGrantorValidationValidityPeriod?: OptionalUInt32;
372
+ verifierGrantorValidationValidityPeriod?: OptionalUInt32;
373
+ issuerValidationValidityPeriod?: OptionalUInt32;
374
+ verifierValidationValidityPeriod?: OptionalUInt32;
375
+ holderValidationValidityPeriod?: OptionalUInt32;
376
+ }
377
+ export interface CreateRootParticipantParams {
378
+ schemaId: number;
379
+ did: string;
380
+ effectiveFrom?: Date;
381
+ effectiveUntil?: Date;
382
+ validationFees?: number;
383
+ issuanceFees?: number;
384
+ verificationFees?: number;
385
+ }
386
+ export interface SelfCreateParticipantParams {
387
+ role: number;
388
+ validatorParticipantId: number;
389
+ did: string;
390
+ effectiveFrom?: Date;
391
+ effectiveUntil?: Date;
392
+ validationFees?: number;
393
+ verificationFees?: number;
394
+ vsOperator?: string;
395
+ vsOperatorAuthzMsgTypes?: string[];
396
+ vsOperatorAuthzSpendLimit?: Coin[];
397
+ vsOperatorAuthzWithFeegrant?: boolean;
398
+ vsOperatorAuthzFeeSpendLimit?: Coin[];
399
+ vsOperatorAuthzPeriod?: DurationParam;
158
400
  }
@@ -1,6 +1,32 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.RECORD_ID = exports.VERANA_BECH32_PREFIX = void 0;
3
+ exports.ParticipantState = exports.ParticipantRole = exports.RECORD_ID = exports.VERANA_BECH32_PREFIX = exports.ValidationState = void 0;
4
+ var ValidationState;
5
+ (function (ValidationState) {
6
+ ValidationState[ValidationState["UNSPECIFIED"] = 0] = "UNSPECIFIED";
7
+ ValidationState[ValidationState["PENDING"] = 1] = "PENDING";
8
+ ValidationState[ValidationState["VALIDATED"] = 2] = "VALIDATED";
9
+ ValidationState[ValidationState["TERMINATED"] = 3] = "TERMINATED";
10
+ })(ValidationState || (exports.ValidationState = ValidationState = {}));
4
11
  exports.VERANA_BECH32_PREFIX = 'verana';
5
12
  exports.RECORD_ID = 'verana-blockchain-sync-state';
13
+ var ParticipantRole;
14
+ (function (ParticipantRole) {
15
+ ParticipantRole["Issuer"] = "ISSUER";
16
+ ParticipantRole["Verifier"] = "VERIFIER";
17
+ ParticipantRole["IssuerGrantor"] = "ISSUER_GRANTOR";
18
+ ParticipantRole["VerifierGrantor"] = "VERIFIER_GRANTOR";
19
+ ParticipantRole["Ecosystem"] = "ECOSYSTEM";
20
+ ParticipantRole["Holder"] = "HOLDER";
21
+ })(ParticipantRole || (exports.ParticipantRole = ParticipantRole = {}));
22
+ var ParticipantState;
23
+ (function (ParticipantState) {
24
+ ParticipantState["Active"] = "ACTIVE";
25
+ ParticipantState["Future"] = "FUTURE";
26
+ ParticipantState["Inactive"] = "INACTIVE";
27
+ ParticipantState["Expired"] = "EXPIRED";
28
+ ParticipantState["Revoked"] = "REVOKED";
29
+ ParticipantState["Slashed"] = "SLASHED";
30
+ ParticipantState["Repaid"] = "REPAID";
31
+ })(ParticipantState || (exports.ParticipantState = ParticipantState = {}));
6
32
  //# sourceMappingURL=types.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/blockchain/types.ts"],"names":[],"mappings":";;;AAEa,QAAA,oBAAoB,GAAG,QAAQ,CAAA;AAC/B,QAAA,SAAS,GAAG,8BAA8B,CAAA"}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/blockchain/types.ts"],"names":[],"mappings":";;;AAEA,IAAY,eAKX;AALD,WAAY,eAAe;IACzB,mEAAe,CAAA;IACf,2DAAW,CAAA;IACX,+DAAa,CAAA;IACb,iEAAc,CAAA;AAChB,CAAC,EALW,eAAe,+BAAf,eAAe,QAK1B;AAeY,QAAA,oBAAoB,GAAG,QAAQ,CAAA;AAC/B,QAAA,SAAS,GAAG,8BAA8B,CAAA;AAyIvD,IAAY,eAOX;AAPD,WAAY,eAAe;IACzB,oCAAiB,CAAA;IACjB,wCAAqB,CAAA;IACrB,mDAAgC,CAAA;IAChC,uDAAoC,CAAA;IACpC,0CAAuB,CAAA;IACvB,oCAAiB,CAAA;AACnB,CAAC,EAPW,eAAe,+BAAf,eAAe,QAO1B;AAED,IAAY,gBAQX;AARD,WAAY,gBAAgB;IAC1B,qCAAiB,CAAA;IACjB,qCAAiB,CAAA;IACjB,yCAAqB,CAAA;IACrB,uCAAmB,CAAA;IACnB,uCAAmB,CAAA;IACnB,uCAAmB,CAAA;IACnB,qCAAiB,CAAA;AACnB,CAAC,EARW,gBAAgB,gCAAhB,gBAAgB,QAQ3B"}
@@ -1,10 +1,12 @@
1
1
  import type { AnonCredsRevocationRegistryDefinition } from '@credo-ts/anoncreds';
2
2
  import type { AgentContext } from '@credo-ts/core';
3
3
  import { BasicTailsFileService } from '@credo-ts/anoncreds';
4
+ export declare function isValidTailsFileName(name: string): boolean;
5
+ export declare function getTailsDirectoryPath(agentContext: AgentContext): string;
6
+ export declare function migrateLegacyTailsFiles(agentContext: AgentContext): void;
4
7
  export declare class FullTailsFileService extends BasicTailsFileService {
5
8
  private tailsServerBaseUrl;
6
9
  constructor(options: {
7
- tailsDirectoryPath?: string;
8
10
  tailsServerBaseUrl: string;
9
11
  });
10
12
  uploadTailsFile(agentContext: AgentContext, options: {
@@ -13,6 +15,4 @@ export declare class FullTailsFileService extends BasicTailsFileService {
13
15
  tailsFileUrl: string;
14
16
  }>;
15
17
  }
16
- export declare const baseFilePath = "./tails";
17
- export declare const tailsIndex: Record<string, string>;
18
- export declare function deleteTailsEntry(tailsFileUrl: string): void;
18
+ export declare function deleteTailsFile(agentContext: AgentContext, tailsFileUrl: string): void;