@certik/skynet 0.23.0 → 0.25.0

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 (56) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/examples/api.ts +0 -0
  3. package/examples/indexer.ts +0 -0
  4. package/examples/mode-indexer.ts +0 -0
  5. package/package.json +1 -12
  6. package/src/graphql.ts +14 -4
  7. package/src/por.ts +18 -23
  8. package/src/slack.ts +16 -12
  9. package/.vscode/settings.json +0 -5
  10. package/dist/abi.d.ts +0 -111
  11. package/dist/abi.js +0 -571
  12. package/dist/address.d.ts +0 -2
  13. package/dist/address.js +0 -24
  14. package/dist/api.d.ts +0 -31
  15. package/dist/api.js +0 -260
  16. package/dist/app.d.ts +0 -101
  17. package/dist/app.js +0 -2077
  18. package/dist/availability.d.ts +0 -23
  19. package/dist/availability.js +0 -133
  20. package/dist/cli.d.ts +0 -5
  21. package/dist/cli.js +0 -41
  22. package/dist/const.d.ts +0 -34
  23. package/dist/const.js +0 -162
  24. package/dist/databricks.d.ts +0 -3
  25. package/dist/databricks.js +0 -208
  26. package/dist/date.d.ts +0 -5
  27. package/dist/date.js +0 -56
  28. package/dist/deploy.d.ts +0 -75
  29. package/dist/deploy.js +0 -587
  30. package/dist/dynamodb.d.ts +0 -16
  31. package/dist/dynamodb.js +0 -479
  32. package/dist/env.d.ts +0 -6
  33. package/dist/env.js +0 -26
  34. package/dist/goalert.d.ts +0 -19
  35. package/dist/goalert.js +0 -43
  36. package/dist/graphql.d.ts +0 -5
  37. package/dist/graphql.js +0 -28
  38. package/dist/indexer.d.ts +0 -69
  39. package/dist/indexer.js +0 -1099
  40. package/dist/log.d.ts +0 -13
  41. package/dist/log.js +0 -63
  42. package/dist/object-hash.d.ts +0 -1
  43. package/dist/object-hash.js +0 -61
  44. package/dist/por.d.ts +0 -37
  45. package/dist/por.js +0 -120
  46. package/dist/s3.d.ts +0 -20
  47. package/dist/s3.js +0 -122
  48. package/dist/search.d.ts +0 -5
  49. package/dist/search.js +0 -105
  50. package/dist/selector.d.ts +0 -17
  51. package/dist/selector.js +0 -44
  52. package/dist/slack.d.ts +0 -9
  53. package/dist/slack.js +0 -32
  54. package/dist/util.d.ts +0 -4
  55. package/dist/util.js +0 -27
  56. package/src/databricks.ts +0 -82
package/dist/abi.js DELETED
@@ -1,571 +0,0 @@
1
- // src/abi.ts
2
- var ERC20 = [
3
- {
4
- constant: true,
5
- inputs: [],
6
- name: "name",
7
- outputs: [
8
- {
9
- name: "",
10
- type: "string"
11
- }
12
- ],
13
- payable: false,
14
- stateMutability: "view",
15
- type: "function"
16
- },
17
- {
18
- constant: false,
19
- inputs: [
20
- {
21
- name: "_spender",
22
- type: "address"
23
- },
24
- {
25
- name: "_value",
26
- type: "uint256"
27
- }
28
- ],
29
- name: "approve",
30
- outputs: [
31
- {
32
- name: "",
33
- type: "bool"
34
- }
35
- ],
36
- payable: false,
37
- stateMutability: "nonpayable",
38
- type: "function"
39
- },
40
- {
41
- constant: true,
42
- inputs: [],
43
- name: "totalSupply",
44
- outputs: [
45
- {
46
- name: "",
47
- type: "uint256"
48
- }
49
- ],
50
- payable: false,
51
- stateMutability: "view",
52
- type: "function"
53
- },
54
- {
55
- constant: false,
56
- inputs: [
57
- {
58
- name: "_from",
59
- type: "address"
60
- },
61
- {
62
- name: "_to",
63
- type: "address"
64
- },
65
- {
66
- name: "_value",
67
- type: "uint256"
68
- }
69
- ],
70
- name: "transferFrom",
71
- outputs: [
72
- {
73
- name: "",
74
- type: "bool"
75
- }
76
- ],
77
- payable: false,
78
- stateMutability: "nonpayable",
79
- type: "function"
80
- },
81
- {
82
- constant: true,
83
- inputs: [],
84
- name: "decimals",
85
- outputs: [
86
- {
87
- name: "",
88
- type: "uint8"
89
- }
90
- ],
91
- payable: false,
92
- stateMutability: "view",
93
- type: "function"
94
- },
95
- {
96
- constant: true,
97
- inputs: [
98
- {
99
- name: "_owner",
100
- type: "address"
101
- }
102
- ],
103
- name: "balanceOf",
104
- outputs: [
105
- {
106
- name: "balance",
107
- type: "uint256"
108
- }
109
- ],
110
- payable: false,
111
- stateMutability: "view",
112
- type: "function"
113
- },
114
- {
115
- constant: true,
116
- inputs: [],
117
- name: "symbol",
118
- outputs: [
119
- {
120
- name: "",
121
- type: "string"
122
- }
123
- ],
124
- payable: false,
125
- stateMutability: "view",
126
- type: "function"
127
- },
128
- {
129
- constant: false,
130
- inputs: [
131
- {
132
- name: "_to",
133
- type: "address"
134
- },
135
- {
136
- name: "_value",
137
- type: "uint256"
138
- }
139
- ],
140
- name: "transfer",
141
- outputs: [
142
- {
143
- name: "",
144
- type: "bool"
145
- }
146
- ],
147
- payable: false,
148
- stateMutability: "nonpayable",
149
- type: "function"
150
- },
151
- {
152
- constant: true,
153
- inputs: [
154
- {
155
- name: "_owner",
156
- type: "address"
157
- },
158
- {
159
- name: "_spender",
160
- type: "address"
161
- }
162
- ],
163
- name: "allowance",
164
- outputs: [
165
- {
166
- name: "",
167
- type: "uint256"
168
- }
169
- ],
170
- payable: false,
171
- stateMutability: "view",
172
- type: "function"
173
- },
174
- {
175
- name: "Approval",
176
- payable: true,
177
- stateMutability: "payable",
178
- type: "fallback"
179
- },
180
- {
181
- inputs: [
182
- {
183
- indexed: true,
184
- name: "owner",
185
- type: "address"
186
- },
187
- {
188
- indexed: true,
189
- name: "spender",
190
- type: "address"
191
- },
192
- {
193
- indexed: false,
194
- name: "value",
195
- type: "uint256"
196
- }
197
- ],
198
- name: "Approval",
199
- type: "event"
200
- },
201
- {
202
- inputs: [
203
- {
204
- indexed: true,
205
- name: "from",
206
- type: "address"
207
- },
208
- {
209
- indexed: true,
210
- name: "to",
211
- type: "address"
212
- },
213
- {
214
- indexed: false,
215
- name: "value",
216
- type: "uint256"
217
- }
218
- ],
219
- name: "Transfer",
220
- type: "event"
221
- }
222
- ];
223
- var ERC721 = [
224
- {
225
- inputs: [
226
- {
227
- indexed: true,
228
- internalType: "address",
229
- name: "owner",
230
- type: "address"
231
- },
232
- {
233
- indexed: true,
234
- internalType: "address",
235
- name: "approved",
236
- type: "address"
237
- },
238
- {
239
- indexed: true,
240
- internalType: "uint256",
241
- name: "tokenId",
242
- type: "uint256"
243
- }
244
- ],
245
- name: "Approval",
246
- type: "event"
247
- },
248
- {
249
- inputs: [
250
- {
251
- indexed: true,
252
- internalType: "address",
253
- name: "owner",
254
- type: "address"
255
- },
256
- {
257
- indexed: true,
258
- internalType: "address",
259
- name: "operator",
260
- type: "address"
261
- },
262
- {
263
- indexed: false,
264
- internalType: "bool",
265
- name: "approved",
266
- type: "bool"
267
- }
268
- ],
269
- name: "ApprovalForAll",
270
- type: "event"
271
- },
272
- {
273
- inputs: [
274
- {
275
- indexed: true,
276
- internalType: "address",
277
- name: "from",
278
- type: "address"
279
- },
280
- {
281
- indexed: true,
282
- internalType: "address",
283
- name: "to",
284
- type: "address"
285
- },
286
- {
287
- indexed: true,
288
- internalType: "uint256",
289
- name: "tokenId",
290
- type: "uint256"
291
- }
292
- ],
293
- name: "Transfer",
294
- type: "event"
295
- },
296
- {
297
- inputs: [
298
- {
299
- internalType: "address",
300
- name: "to",
301
- type: "address"
302
- },
303
- {
304
- internalType: "uint256",
305
- name: "tokenId",
306
- type: "uint256"
307
- }
308
- ],
309
- name: "approve",
310
- outputs: [],
311
- stateMutability: "nonpayable",
312
- type: "function"
313
- },
314
- {
315
- constant: true,
316
- inputs: [],
317
- name: "totalSupply",
318
- outputs: [
319
- {
320
- name: "",
321
- type: "uint256"
322
- }
323
- ],
324
- payable: false,
325
- stateMutability: "view",
326
- type: "function"
327
- },
328
- {
329
- inputs: [
330
- {
331
- internalType: "address",
332
- name: "owner",
333
- type: "address"
334
- }
335
- ],
336
- name: "balanceOf",
337
- outputs: [
338
- {
339
- internalType: "uint256",
340
- name: "balance",
341
- type: "uint256"
342
- }
343
- ],
344
- stateMutability: "view",
345
- type: "function"
346
- },
347
- {
348
- inputs: [
349
- {
350
- internalType: "uint256",
351
- name: "tokenId",
352
- type: "uint256"
353
- }
354
- ],
355
- name: "getApproved",
356
- outputs: [
357
- {
358
- internalType: "address",
359
- name: "operator",
360
- type: "address"
361
- }
362
- ],
363
- stateMutability: "view",
364
- type: "function"
365
- },
366
- {
367
- inputs: [
368
- {
369
- internalType: "address",
370
- name: "owner",
371
- type: "address"
372
- },
373
- {
374
- internalType: "address",
375
- name: "operator",
376
- type: "address"
377
- }
378
- ],
379
- name: "isApprovedForAll",
380
- outputs: [
381
- {
382
- internalType: "bool",
383
- name: "",
384
- type: "bool"
385
- }
386
- ],
387
- stateMutability: "view",
388
- type: "function"
389
- },
390
- {
391
- inputs: [],
392
- name: "name",
393
- outputs: [
394
- {
395
- internalType: "string",
396
- name: "",
397
- type: "string"
398
- }
399
- ],
400
- stateMutability: "view",
401
- type: "function"
402
- },
403
- {
404
- inputs: [
405
- {
406
- internalType: "uint256",
407
- name: "tokenId",
408
- type: "uint256"
409
- }
410
- ],
411
- name: "ownerOf",
412
- outputs: [
413
- {
414
- internalType: "address",
415
- name: "owner",
416
- type: "address"
417
- }
418
- ],
419
- stateMutability: "view",
420
- type: "function"
421
- },
422
- {
423
- inputs: [
424
- {
425
- internalType: "address",
426
- name: "from",
427
- type: "address"
428
- },
429
- {
430
- internalType: "address",
431
- name: "to",
432
- type: "address"
433
- },
434
- {
435
- internalType: "uint256",
436
- name: "tokenId",
437
- type: "uint256"
438
- }
439
- ],
440
- name: "safeTransferFrom",
441
- outputs: [],
442
- stateMutability: "nonpayable",
443
- type: "function"
444
- },
445
- {
446
- inputs: [
447
- {
448
- internalType: "address",
449
- name: "from",
450
- type: "address"
451
- },
452
- {
453
- internalType: "address",
454
- name: "to",
455
- type: "address"
456
- },
457
- {
458
- internalType: "uint256",
459
- name: "tokenId",
460
- type: "uint256"
461
- },
462
- {
463
- internalType: "bytes",
464
- name: "data",
465
- type: "bytes"
466
- }
467
- ],
468
- name: "safeTransferFrom",
469
- outputs: [],
470
- stateMutability: "nonpayable",
471
- type: "function"
472
- },
473
- {
474
- inputs: [
475
- {
476
- internalType: "address",
477
- name: "operator",
478
- type: "address"
479
- },
480
- {
481
- internalType: "bool",
482
- name: "_approved",
483
- type: "bool"
484
- }
485
- ],
486
- name: "setApprovalForAll",
487
- outputs: [],
488
- stateMutability: "nonpayable",
489
- type: "function"
490
- },
491
- {
492
- inputs: [
493
- {
494
- internalType: "bytes4",
495
- name: "interfaceId",
496
- type: "bytes4"
497
- }
498
- ],
499
- name: "supportsInterface",
500
- outputs: [
501
- {
502
- internalType: "bool",
503
- name: "",
504
- type: "bool"
505
- }
506
- ],
507
- stateMutability: "view",
508
- type: "function"
509
- },
510
- {
511
- inputs: [],
512
- name: "symbol",
513
- outputs: [
514
- {
515
- internalType: "string",
516
- name: "",
517
- type: "string"
518
- }
519
- ],
520
- stateMutability: "view",
521
- type: "function"
522
- },
523
- {
524
- inputs: [
525
- {
526
- internalType: "uint256",
527
- name: "tokenId",
528
- type: "uint256"
529
- }
530
- ],
531
- name: "tokenURI",
532
- outputs: [
533
- {
534
- internalType: "string",
535
- name: "",
536
- type: "string"
537
- }
538
- ],
539
- stateMutability: "view",
540
- type: "function"
541
- },
542
- {
543
- inputs: [
544
- {
545
- internalType: "address",
546
- name: "from",
547
- type: "address"
548
- },
549
- {
550
- internalType: "address",
551
- name: "to",
552
- type: "address"
553
- },
554
- {
555
- internalType: "uint256",
556
- name: "tokenId",
557
- type: "uint256"
558
- }
559
- ],
560
- name: "transferFrom",
561
- outputs: [],
562
- stateMutability: "nonpayable",
563
- type: "function"
564
- }
565
- ];
566
- var BEP20 = ERC20;
567
- export {
568
- ERC721,
569
- ERC20,
570
- BEP20
571
- };
package/dist/address.d.ts DELETED
@@ -1,2 +0,0 @@
1
- export declare function parseAddress(address: string): string[];
2
- export declare function composeAddress(protocol: string, addr: string): string;
package/dist/address.js DELETED
@@ -1,24 +0,0 @@
1
- // src/address.ts
2
- function parseAddress(address) {
3
- const separatorIndex = address.indexOf(":");
4
- let protocolPart;
5
- let addressPart;
6
- if (separatorIndex === -1) {
7
- protocolPart = "eth";
8
- addressPart = address;
9
- } else {
10
- protocolPart = address.slice(0, separatorIndex);
11
- addressPart = address.slice(separatorIndex + 1);
12
- }
13
- if (addressPart.startsWith("0x")) {
14
- addressPart = addressPart.toLowerCase();
15
- }
16
- return [protocolPart, addressPart];
17
- }
18
- function composeAddress(protocol, addr) {
19
- return `${protocol}:${addr}`;
20
- }
21
- export {
22
- parseAddress,
23
- composeAddress
24
- };
package/dist/api.d.ts DELETED
@@ -1,31 +0,0 @@
1
- import express from "express";
2
- import type { Request, Response, NextFunction } from "express";
3
- import type { Selector } from "./selector";
4
- export type Middleware = (req: Request, res: Response, next: NextFunction) => Promise<void>;
5
- type Route = {
6
- method?: "GET" | "POST" | "PUT" | "DELETE" | "PATCH";
7
- path: string;
8
- middlewares?: Middleware[];
9
- handler: (args: {
10
- req: Request;
11
- res: Response;
12
- verbose?: boolean;
13
- }) => Promise<void>;
14
- protected?: boolean;
15
- };
16
- type Serve = {
17
- prefix: string;
18
- port: number;
19
- apiKey?: string | Record<string, string>;
20
- };
21
- export declare function startApiApp({ binaryName, name, selector, routes, serve, beforeListen, }: {
22
- binaryName: string;
23
- name: string;
24
- selector?: Selector;
25
- routes: Route[];
26
- serve: Serve;
27
- beforeListen?: (args: {
28
- app: ReturnType<typeof express>;
29
- }) => Promise<void>;
30
- }): Promise<void>;
31
- export {};