@dorafactory/maci-sdk 0.0.20 → 0.0.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.
- package/dist/browser.d.mts +85 -5
- package/dist/browser.d.ts +85 -5
- package/dist/browser.js +380 -24
- package/dist/browser.js.map +1 -1
- package/dist/browser.mjs +380 -24
- package/dist/browser.mjs.map +1 -1
- package/dist/index.d.mts +85 -5
- package/dist/index.d.ts +85 -5
- package/dist/index.js +380 -24
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +380 -24
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/libs/contract/contract.ts +32 -21
- package/src/libs/contract/types.ts +4 -4
- package/src/libs/contract/utils.ts +26 -6
- package/src/libs/errors/types.ts +3 -0
- package/src/libs/indexer/indexer.ts +21 -0
- package/src/libs/maci/maci.ts +60 -0
- package/src/libs/query/operator.ts +338 -0
- package/src/types/index.ts +86 -0
package/src/types/index.ts
CHANGED
|
@@ -114,6 +114,19 @@ export type ProofType = {
|
|
|
114
114
|
}[];
|
|
115
115
|
};
|
|
116
116
|
|
|
117
|
+
export type OperatorDelayType = {
|
|
118
|
+
blockHeight: string;
|
|
119
|
+
delayProcessDmsgCount: number;
|
|
120
|
+
delayDuration: string;
|
|
121
|
+
delayReason: string;
|
|
122
|
+
delayType: string;
|
|
123
|
+
id: string;
|
|
124
|
+
nodeId: string;
|
|
125
|
+
operatorAddress: string;
|
|
126
|
+
timestamp: string;
|
|
127
|
+
roundAddress: string;
|
|
128
|
+
};
|
|
129
|
+
|
|
117
130
|
export type OperatorType = {
|
|
118
131
|
id: string;
|
|
119
132
|
validatorAddress: string;
|
|
@@ -192,6 +205,36 @@ export type OperatorResponse =
|
|
|
192
205
|
}>
|
|
193
206
|
| ErrorResponse;
|
|
194
207
|
|
|
208
|
+
export type MissRateResponse =
|
|
209
|
+
| SuccessResponse<{
|
|
210
|
+
missRate: (MissRateType & {
|
|
211
|
+
date: string;
|
|
212
|
+
})[];
|
|
213
|
+
}>
|
|
214
|
+
| ErrorResponse;
|
|
215
|
+
|
|
216
|
+
// export type ClaimableResponse =
|
|
217
|
+
// | SuccessResponse<{
|
|
218
|
+
// claimable: ClaimableType;
|
|
219
|
+
// }>
|
|
220
|
+
// | ErrorResponse;
|
|
221
|
+
|
|
222
|
+
export type OperatorDelayOperationsResponse =
|
|
223
|
+
| SuccessResponse<{
|
|
224
|
+
operatorDelayOperations: {
|
|
225
|
+
pageInfo: {
|
|
226
|
+
endCursor: string;
|
|
227
|
+
hasNextPage: boolean;
|
|
228
|
+
};
|
|
229
|
+
edges: {
|
|
230
|
+
cursor: string;
|
|
231
|
+
node: OperatorDelayType;
|
|
232
|
+
}[];
|
|
233
|
+
totalCount: number;
|
|
234
|
+
};
|
|
235
|
+
}>
|
|
236
|
+
| ErrorResponse;
|
|
237
|
+
|
|
195
238
|
export type OperatorsResponse =
|
|
196
239
|
| SuccessResponse<{
|
|
197
240
|
operators: {
|
|
@@ -235,6 +278,33 @@ export type RoundsCountGraphqlResponse = {
|
|
|
235
278
|
};
|
|
236
279
|
};
|
|
237
280
|
|
|
281
|
+
export type VoteCountGraphqlResponse = {
|
|
282
|
+
data: {
|
|
283
|
+
signupsCount: {
|
|
284
|
+
totalCount: number;
|
|
285
|
+
};
|
|
286
|
+
messagesCount: {
|
|
287
|
+
totalCount: number;
|
|
288
|
+
};
|
|
289
|
+
};
|
|
290
|
+
};
|
|
291
|
+
|
|
292
|
+
export type OperatorDelayOperationsGraphqlResponse = {
|
|
293
|
+
data: {
|
|
294
|
+
operatorDelayOperations: {
|
|
295
|
+
pageInfo: {
|
|
296
|
+
endCursor: string;
|
|
297
|
+
hasNextPage: boolean;
|
|
298
|
+
};
|
|
299
|
+
edges: {
|
|
300
|
+
cursor: string;
|
|
301
|
+
node: OperatorDelayType;
|
|
302
|
+
}[];
|
|
303
|
+
totalCount: number;
|
|
304
|
+
};
|
|
305
|
+
};
|
|
306
|
+
};
|
|
307
|
+
|
|
238
308
|
export type TransactionGraphqlResponse = {
|
|
239
309
|
data: {
|
|
240
310
|
transaction: TransactionType;
|
|
@@ -348,3 +418,19 @@ export type SignUpEventsGraphqlResponse = {
|
|
|
348
418
|
};
|
|
349
419
|
};
|
|
350
420
|
};
|
|
421
|
+
|
|
422
|
+
export type MissRateType = {
|
|
423
|
+
delayCount: number;
|
|
424
|
+
deactivateDelay: {
|
|
425
|
+
count: number;
|
|
426
|
+
dmsgCount: number;
|
|
427
|
+
};
|
|
428
|
+
tallyDelay: {
|
|
429
|
+
count: number;
|
|
430
|
+
};
|
|
431
|
+
totalDelayDuration: number;
|
|
432
|
+
avgDelayDuration: number;
|
|
433
|
+
tallyCount: number;
|
|
434
|
+
deactivateCount: number;
|
|
435
|
+
missRate: number;
|
|
436
|
+
};
|