@certik/skynet 0.25.0 → 0.25.1

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/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.25.1
4
+
5
+ - Updated README.md for deployment instructions
6
+
3
7
  ## 0.25.0
4
8
 
5
9
  - Added support for GraphQL v2 with `version` parameter to `gql` function
package/README.md CHANGED
@@ -13,11 +13,17 @@ const { scanWholeTable } = require("@certik/skynet/dynamodb");
13
13
  ## Test
14
14
 
15
15
  ```bash
16
- bun test
16
+ bun run test
17
+ ```
18
+
19
+ ## Build
20
+
21
+ ```bash
22
+ bun run build
17
23
  ```
18
24
 
19
25
  ## Publish
20
26
 
21
27
  ```bash
22
- bun publish --access public
28
+ bun run pub
23
29
  ```
package/dist/abi.d.ts ADDED
@@ -0,0 +1,111 @@
1
+ export declare const ERC20: ({
2
+ constant: boolean;
3
+ inputs: {
4
+ name: string;
5
+ type: string;
6
+ }[];
7
+ name: string;
8
+ outputs: {
9
+ name: string;
10
+ type: string;
11
+ }[];
12
+ payable: boolean;
13
+ stateMutability: string;
14
+ type: string;
15
+ } | {
16
+ name: string;
17
+ payable: boolean;
18
+ stateMutability: string;
19
+ type: string;
20
+ constant?: undefined;
21
+ inputs?: undefined;
22
+ outputs?: undefined;
23
+ } | {
24
+ inputs: {
25
+ indexed: boolean;
26
+ name: string;
27
+ type: string;
28
+ }[];
29
+ name: string;
30
+ type: string;
31
+ constant?: undefined;
32
+ outputs?: undefined;
33
+ payable?: undefined;
34
+ stateMutability?: undefined;
35
+ })[];
36
+ export declare const ERC721: ({
37
+ inputs: {
38
+ indexed: boolean;
39
+ internalType: string;
40
+ name: string;
41
+ type: string;
42
+ }[];
43
+ name: string;
44
+ type: string;
45
+ constant?: undefined;
46
+ outputs?: undefined;
47
+ payable?: undefined;
48
+ stateMutability?: undefined;
49
+ } | {
50
+ constant: boolean;
51
+ inputs: never[];
52
+ name: string;
53
+ outputs: {
54
+ name: string;
55
+ type: string;
56
+ }[];
57
+ payable: boolean;
58
+ stateMutability: string;
59
+ type: string;
60
+ } | {
61
+ inputs: {
62
+ internalType: string;
63
+ name: string;
64
+ type: string;
65
+ }[];
66
+ name: string;
67
+ outputs: {
68
+ internalType: string;
69
+ name: string;
70
+ type: string;
71
+ }[];
72
+ stateMutability: string;
73
+ type: string;
74
+ constant?: undefined;
75
+ payable?: undefined;
76
+ })[];
77
+ export declare const BEP20: ({
78
+ constant: boolean;
79
+ inputs: {
80
+ name: string;
81
+ type: string;
82
+ }[];
83
+ name: string;
84
+ outputs: {
85
+ name: string;
86
+ type: string;
87
+ }[];
88
+ payable: boolean;
89
+ stateMutability: string;
90
+ type: string;
91
+ } | {
92
+ name: string;
93
+ payable: boolean;
94
+ stateMutability: string;
95
+ type: string;
96
+ constant?: undefined;
97
+ inputs?: undefined;
98
+ outputs?: undefined;
99
+ } | {
100
+ inputs: {
101
+ indexed: boolean;
102
+ name: string;
103
+ type: string;
104
+ }[];
105
+ name: string;
106
+ type: string;
107
+ constant?: undefined;
108
+ outputs?: undefined;
109
+ payable?: undefined;
110
+ stateMutability?: undefined;
111
+ })[];
package/dist/abi.js ADDED
@@ -0,0 +1,571 @@
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
+ };
@@ -0,0 +1,2 @@
1
+ export declare function parseAddress(address: string): string[];
2
+ export declare function composeAddress(protocol: string, addr: string): string;