@verana-labs/vs-agent-sdk 1.12.0-dev.2 → 1.12.0-dev.20
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/README.md +35 -46
- package/build/agent/VsAgent.d.ts +6 -0
- package/build/agent/VsAgent.js +25 -13
- package/build/agent/VsAgent.js.map +1 -1
- package/build/agent/createVsAgent.d.ts +1 -0
- package/build/agent/createVsAgent.js +1 -0
- package/build/agent/createVsAgent.js.map +1 -1
- package/build/blockchain/IndexerWebSocketService.d.ts +15 -13
- package/build/blockchain/IndexerWebSocketService.js +207 -103
- package/build/blockchain/IndexerWebSocketService.js.map +1 -1
- package/build/blockchain/VeranaChainService.d.ts +33 -11
- package/build/blockchain/VeranaChainService.js +246 -55
- package/build/blockchain/VeranaChainService.js.map +1 -1
- package/build/blockchain/VeranaHelpers.js +3 -2
- package/build/blockchain/VeranaHelpers.js.map +1 -1
- package/build/blockchain/VeranaIndexerService.d.ts +7 -5
- package/build/blockchain/VeranaIndexerService.js +30 -23
- package/build/blockchain/VeranaIndexerService.js.map +1 -1
- package/build/blockchain/handlers/IndexerHandlerRegistry.d.ts +5 -3
- package/build/blockchain/handlers/IndexerHandlerRegistry.js +6 -0
- package/build/blockchain/handlers/IndexerHandlerRegistry.js.map +1 -1
- package/build/blockchain/handlers/defaultHandlers.d.ts +4 -1
- package/build/blockchain/handlers/defaultHandlers.js +76 -44
- package/build/blockchain/handlers/defaultHandlers.js.map +1 -1
- package/build/blockchain/handlers/stateMutations.d.ts +15 -4
- package/build/blockchain/handlers/stateMutations.js +200 -31
- package/build/blockchain/handlers/stateMutations.js.map +1 -1
- package/build/blockchain/indexerSync.d.ts +10 -0
- package/build/blockchain/indexerSync.js +34 -0
- package/build/blockchain/indexerSync.js.map +1 -0
- package/build/blockchain/types.d.ts +290 -49
- package/build/blockchain/types.js +27 -1
- package/build/blockchain/types.js.map +1 -1
- package/build/credentials/FullTailsFileService.d.ts +4 -4
- package/build/credentials/FullTailsFileService.js +78 -71
- package/build/credentials/FullTailsFileService.js.map +1 -1
- package/build/did/adminApiService.d.ts +2 -0
- package/build/did/adminApiService.js +17 -0
- package/build/did/adminApiService.js.map +1 -0
- package/build/did/migrateWebVhVersionTime.d.ts +9 -0
- package/build/did/migrateWebVhVersionTime.js +191 -0
- package/build/did/migrateWebVhVersionTime.js.map +1 -0
- package/build/events/VsAgentEvents.d.ts +16 -2
- package/build/events/VsAgentEvents.js +2 -0
- package/build/events/VsAgentEvents.js.map +1 -1
- package/build/events/VtFlowEvents.d.ts +3 -0
- package/build/events/VtFlowEvents.js +35 -0
- package/build/events/VtFlowEvents.js.map +1 -0
- package/build/events/index.d.ts +1 -0
- package/build/events/index.js +1 -0
- package/build/events/index.js.map +1 -1
- package/build/index.d.ts +4 -4
- package/build/index.js +9 -6
- package/build/index.js.map +1 -1
- package/build/plugins/setupBaseDidComm.d.ts +3 -1
- package/build/plugins/setupBaseDidComm.js +3 -1
- package/build/plugins/setupBaseDidComm.js.map +1 -1
- package/build/types.d.ts +1 -0
- package/build/types.js +2 -1
- package/build/types.js.map +1 -1
- package/build/utils/trustCredentialStore.js +2 -0
- package/build/utils/trustCredentialStore.js.map +1 -1
- package/build/utils/util.d.ts +5 -1
- package/build/utils/util.js +17 -5
- package/build/utils/util.js.map +1 -1
- package/build/vtFlow/VtFlowOrchestrator.d.ts +41 -0
- package/build/vtFlow/VtFlowOrchestrator.js +284 -0
- package/build/vtFlow/VtFlowOrchestrator.js.map +1 -0
- package/build/vtFlow/assertVerifiableService.d.ts +8 -0
- package/build/vtFlow/assertVerifiableService.js +28 -0
- package/build/vtFlow/assertVerifiableService.js.map +1 -0
- package/build/vtFlow/credentialDigest.d.ts +3 -0
- package/build/vtFlow/credentialDigest.js +23 -0
- package/build/vtFlow/credentialDigest.js.map +1 -0
- package/build/vtFlow/index.d.ts +2 -0
- package/build/vtFlow/index.js +19 -0
- package/build/vtFlow/index.js.map +1 -0
- package/package.json +16 -12
|
@@ -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 = '
|
|
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
|
|
84
|
+
export interface SyncedEcosystem {
|
|
48
85
|
id: number;
|
|
49
86
|
did: string;
|
|
50
|
-
|
|
87
|
+
corporationId: number;
|
|
51
88
|
archived: boolean;
|
|
52
|
-
|
|
89
|
+
activeVersion?: number;
|
|
53
90
|
lastModifiedBlock: number;
|
|
54
91
|
}
|
|
55
92
|
export interface SyncedCredentialSchema {
|
|
56
93
|
id: number;
|
|
57
|
-
|
|
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
|
|
101
|
+
export interface SyncedParticipant {
|
|
65
102
|
id: number;
|
|
66
103
|
schemaId: number;
|
|
67
104
|
did: string;
|
|
68
|
-
|
|
69
|
-
|
|
105
|
+
role: number;
|
|
106
|
+
opState?: string;
|
|
70
107
|
effectiveUntil?: string;
|
|
71
108
|
revoked: boolean;
|
|
72
109
|
slashed: boolean;
|
|
@@ -74,85 +111,289 @@ export interface SyncedPermission {
|
|
|
74
111
|
}
|
|
75
112
|
export interface VeranaSyncState {
|
|
76
113
|
lastBlockHeight: number;
|
|
77
|
-
|
|
114
|
+
ecosystems: Record<string, SyncedEcosystem>;
|
|
78
115
|
credentialSchemas: Record<string, SyncedCredentialSchema>;
|
|
79
|
-
|
|
116
|
+
participants: Record<string, SyncedParticipant>;
|
|
117
|
+
partialBlock?: number;
|
|
118
|
+
partialKeys?: string[];
|
|
80
119
|
}
|
|
81
|
-
export interface
|
|
120
|
+
export interface EcosystemDto {
|
|
82
121
|
id: number;
|
|
83
122
|
did: string;
|
|
84
|
-
|
|
123
|
+
corporation_id: number;
|
|
85
124
|
archived: string | null;
|
|
86
|
-
|
|
125
|
+
active_version?: number;
|
|
87
126
|
}
|
|
88
127
|
export interface CredentialSchemaDto {
|
|
89
128
|
id: number;
|
|
90
|
-
|
|
129
|
+
ecosystem_id: number;
|
|
91
130
|
json_schema: string;
|
|
92
|
-
|
|
93
|
-
|
|
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
|
|
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
|
-
|
|
103
|
-
|
|
104
|
-
|
|
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
|
+
}
|
|
172
|
+
export interface ParticipantSessionRecordDto {
|
|
173
|
+
created?: string;
|
|
174
|
+
issuer_participant_id?: number;
|
|
175
|
+
verifier_participant_id?: number;
|
|
176
|
+
wallet_agent_participant_id?: number;
|
|
177
|
+
agent_participant_id?: number;
|
|
178
|
+
}
|
|
179
|
+
export interface ParticipantSessionDto {
|
|
180
|
+
id: string;
|
|
181
|
+
corporation_id?: number;
|
|
182
|
+
vs_operator?: string;
|
|
183
|
+
created?: string;
|
|
184
|
+
modified?: string;
|
|
185
|
+
session_records?: ParticipantSessionRecordDto[];
|
|
186
|
+
}
|
|
187
|
+
export interface DigestDto {
|
|
188
|
+
digest: string;
|
|
189
|
+
created: string;
|
|
190
|
+
}
|
|
191
|
+
export interface RawParticipant {
|
|
192
|
+
id: number;
|
|
193
|
+
schemaId: number;
|
|
194
|
+
role: number;
|
|
195
|
+
did: string;
|
|
196
|
+
corporationId?: number;
|
|
197
|
+
validatorParticipantId: number;
|
|
198
|
+
opState?: number;
|
|
199
|
+
opSummaryDigest?: string;
|
|
200
|
+
revoked: Date | undefined;
|
|
201
|
+
slashed: Date | undefined;
|
|
202
|
+
}
|
|
203
|
+
export interface Ecosystem {
|
|
204
|
+
id: number;
|
|
205
|
+
did: string;
|
|
206
|
+
corporationId: number;
|
|
207
|
+
archived: boolean;
|
|
208
|
+
activeVersion: number;
|
|
209
|
+
}
|
|
210
|
+
export interface CredentialSchema {
|
|
211
|
+
id: number;
|
|
212
|
+
ecosystemId: number;
|
|
213
|
+
jsonSchema: string;
|
|
214
|
+
issuerOnboardingMode: number;
|
|
215
|
+
verifierOnboardingMode: number;
|
|
216
|
+
holderOnboardingMode: number;
|
|
217
|
+
archived: Date | undefined;
|
|
218
|
+
}
|
|
219
|
+
export interface OperatorAuthorization {
|
|
220
|
+
id: number;
|
|
221
|
+
corporationId: number;
|
|
222
|
+
operator: string;
|
|
223
|
+
msgTypes: string[];
|
|
224
|
+
}
|
|
225
|
+
export interface ParticipantAuthorizationRecord {
|
|
226
|
+
participantId: number;
|
|
227
|
+
msgTypes: string[];
|
|
228
|
+
}
|
|
229
|
+
export interface VsOperatorAuthorization {
|
|
230
|
+
id: number;
|
|
231
|
+
corporationId: number;
|
|
232
|
+
vsOperator: string;
|
|
233
|
+
records: ParticipantAuthorizationRecord[];
|
|
109
234
|
}
|
|
110
|
-
export interface
|
|
111
|
-
|
|
112
|
-
id:
|
|
235
|
+
export interface ParticipantQueryClient {
|
|
236
|
+
GetParticipant(req: {
|
|
237
|
+
id: number;
|
|
113
238
|
}): Promise<{
|
|
114
|
-
|
|
239
|
+
participant?: RawParticipant;
|
|
115
240
|
}>;
|
|
116
|
-
|
|
117
|
-
|
|
241
|
+
FindParticipantsWithDID(req: object): Promise<{
|
|
242
|
+
participants: RawParticipant[];
|
|
118
243
|
}>;
|
|
119
|
-
|
|
244
|
+
GetParticipantSession(req: {
|
|
120
245
|
id: string;
|
|
121
246
|
}): Promise<{
|
|
122
247
|
session?: unknown;
|
|
123
248
|
}>;
|
|
124
249
|
}
|
|
250
|
+
export interface EcosystemQueryClient {
|
|
251
|
+
GetEcosystem(req: {
|
|
252
|
+
id: number;
|
|
253
|
+
}): Promise<{
|
|
254
|
+
ecosystem?: Ecosystem;
|
|
255
|
+
}>;
|
|
256
|
+
}
|
|
257
|
+
export interface CredentialSchemaQueryClient {
|
|
258
|
+
GetCredentialSchema(req: {
|
|
259
|
+
id: number;
|
|
260
|
+
}): Promise<{
|
|
261
|
+
schema?: CredentialSchema;
|
|
262
|
+
}>;
|
|
263
|
+
}
|
|
264
|
+
export interface DelegationQueryClient {
|
|
265
|
+
ListOperatorAuthorizations(req: {
|
|
266
|
+
corporationId: number;
|
|
267
|
+
operator: string;
|
|
268
|
+
responseMaxSize: number;
|
|
269
|
+
}): Promise<{
|
|
270
|
+
operatorAuthorizations: OperatorAuthorization[];
|
|
271
|
+
}>;
|
|
272
|
+
ListVSOperatorAuthorizations(req: {
|
|
273
|
+
corporationId: number;
|
|
274
|
+
vsOperator: string;
|
|
275
|
+
responseMaxSize: number;
|
|
276
|
+
}): Promise<{
|
|
277
|
+
vsOperatorAuthorizations: VsOperatorAuthorization[];
|
|
278
|
+
}>;
|
|
279
|
+
}
|
|
125
280
|
export interface VeranaChainConfig {
|
|
126
281
|
rpcUrl: string;
|
|
127
282
|
chainId?: string;
|
|
128
283
|
mnemonic: string;
|
|
284
|
+
sessionOperatorMnemonic?: string;
|
|
129
285
|
logger: BaseLogger;
|
|
130
286
|
gasPrice?: string;
|
|
287
|
+
corporationAddress?: string;
|
|
288
|
+
autoTriggerResolver?: boolean;
|
|
289
|
+
}
|
|
290
|
+
/** Wrapper for optional uint64 values per `verana.pp.v1.OptionalUInt64`. */
|
|
291
|
+
export interface OptionalUInt64 {
|
|
292
|
+
value: number;
|
|
131
293
|
}
|
|
132
|
-
export interface
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
country: string;
|
|
294
|
+
export interface StartParticipantOPParams {
|
|
295
|
+
role: number;
|
|
296
|
+
validatorParticipantId: number;
|
|
136
297
|
did: string;
|
|
137
|
-
validationFees?:
|
|
138
|
-
|
|
139
|
-
|
|
298
|
+
validationFees?: OptionalUInt64;
|
|
299
|
+
issuanceFees?: OptionalUInt64;
|
|
300
|
+
verificationFees?: OptionalUInt64;
|
|
301
|
+
vsOperator?: string;
|
|
302
|
+
vsOperatorAuthzMsgTypes?: string[];
|
|
140
303
|
}
|
|
141
|
-
export interface
|
|
142
|
-
id:
|
|
304
|
+
export interface SetParticipantOPToValidatedParams {
|
|
305
|
+
id: number;
|
|
143
306
|
effectiveUntil?: Date;
|
|
144
|
-
validationFees
|
|
145
|
-
issuanceFees
|
|
146
|
-
verificationFees
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
}
|
|
152
|
-
export interface
|
|
307
|
+
validationFees?: number;
|
|
308
|
+
issuanceFees?: number;
|
|
309
|
+
verificationFees?: number;
|
|
310
|
+
opSummaryDigest: string;
|
|
311
|
+
issuanceFeeDiscount?: number;
|
|
312
|
+
verificationFeeDiscount?: number;
|
|
313
|
+
corporation?: string;
|
|
314
|
+
}
|
|
315
|
+
export interface CreateOrUpdateParticipantSessionParams {
|
|
153
316
|
id: string;
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
317
|
+
issuerParticipantId?: number;
|
|
318
|
+
verifierParticipantId?: number;
|
|
319
|
+
agentParticipantId: number;
|
|
320
|
+
walletAgentParticipantId: number;
|
|
321
|
+
digest?: string;
|
|
322
|
+
corporation?: string;
|
|
323
|
+
}
|
|
324
|
+
export interface Coin {
|
|
325
|
+
denom: string;
|
|
326
|
+
amount: string;
|
|
327
|
+
}
|
|
328
|
+
export interface DurationParam {
|
|
329
|
+
seconds: number;
|
|
330
|
+
nanos?: number;
|
|
331
|
+
}
|
|
332
|
+
export interface GrantOperatorAuthorizationParams {
|
|
333
|
+
grantee: string;
|
|
334
|
+
msgTypes: string[];
|
|
335
|
+
expiration?: Date;
|
|
336
|
+
authzSpendLimit?: Coin[];
|
|
337
|
+
authzSpendLimitPeriod?: DurationParam;
|
|
338
|
+
withFeegrant?: boolean;
|
|
339
|
+
feegrantSpendLimit?: Coin[];
|
|
340
|
+
feegrantSpendLimitPeriod?: DurationParam;
|
|
341
|
+
feeSpendLimit?: Coin[];
|
|
342
|
+
}
|
|
343
|
+
export interface RevokeOperatorAuthorizationParams {
|
|
344
|
+
grantee: string;
|
|
345
|
+
}
|
|
346
|
+
export interface CreateEcosystemParams {
|
|
347
|
+
did: string;
|
|
348
|
+
language: string;
|
|
349
|
+
docUrl: string;
|
|
350
|
+
docDigestSri: string;
|
|
351
|
+
aka?: string;
|
|
352
|
+
}
|
|
353
|
+
export interface ArchiveEcosystemParams {
|
|
354
|
+
ecosystemId: number;
|
|
355
|
+
archive: boolean;
|
|
356
|
+
}
|
|
357
|
+
/** Wrapper for optional uint32 values per `verana.cs.v1.OptionalUInt32`. */
|
|
358
|
+
export interface OptionalUInt32 {
|
|
359
|
+
value: number;
|
|
360
|
+
}
|
|
361
|
+
export interface CreateCredentialSchemaParams {
|
|
362
|
+
ecosystemId: number;
|
|
363
|
+
jsonSchema: string;
|
|
364
|
+
issuerOnboardingMode?: number;
|
|
365
|
+
verifierOnboardingMode?: number;
|
|
366
|
+
holderOnboardingMode?: number;
|
|
367
|
+
pricingAssetType?: number;
|
|
368
|
+
pricingAsset?: string;
|
|
369
|
+
digestAlgorithm?: string;
|
|
370
|
+
issuerGrantorValidationValidityPeriod?: OptionalUInt32;
|
|
371
|
+
verifierGrantorValidationValidityPeriod?: OptionalUInt32;
|
|
372
|
+
issuerValidationValidityPeriod?: OptionalUInt32;
|
|
373
|
+
verifierValidationValidityPeriod?: OptionalUInt32;
|
|
374
|
+
holderValidationValidityPeriod?: OptionalUInt32;
|
|
375
|
+
}
|
|
376
|
+
export interface CreateRootParticipantParams {
|
|
377
|
+
schemaId: number;
|
|
378
|
+
did: string;
|
|
379
|
+
effectiveFrom?: Date;
|
|
380
|
+
effectiveUntil?: Date;
|
|
381
|
+
validationFees?: number;
|
|
382
|
+
issuanceFees?: number;
|
|
383
|
+
verificationFees?: number;
|
|
384
|
+
}
|
|
385
|
+
export interface SelfCreateParticipantParams {
|
|
386
|
+
role: number;
|
|
387
|
+
validatorParticipantId: number;
|
|
388
|
+
did: string;
|
|
389
|
+
effectiveFrom?: Date;
|
|
390
|
+
effectiveUntil?: Date;
|
|
391
|
+
validationFees?: number;
|
|
392
|
+
verificationFees?: number;
|
|
393
|
+
vsOperator?: string;
|
|
394
|
+
vsOperatorAuthzMsgTypes?: string[];
|
|
395
|
+
vsOperatorAuthzSpendLimit?: Coin[];
|
|
396
|
+
vsOperatorAuthzWithFeegrant?: boolean;
|
|
397
|
+
vsOperatorAuthzFeeSpendLimit?: Coin[];
|
|
398
|
+
vsOperatorAuthzPeriod?: DurationParam;
|
|
158
399
|
}
|
|
@@ -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":";;;
|
|
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
|
|
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;
|