@certik/skynet 0.21.0 → 0.22.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.
- package/CHANGELOG.md +9 -0
- package/abi.ts +2 -4
- package/api.ts +7 -7
- package/app.ts +6 -12
- package/bun.lockb +0 -0
- package/const.ts +1 -1
- package/date.ts +1 -1
- package/deploy.ts +4 -4
- package/dist/abi.d.ts +112 -0
- package/dist/abi.d.ts.map +1 -0
- package/dist/abi.js +616 -0
- package/dist/address.d.ts +3 -0
- package/dist/address.d.ts.map +1 -0
- package/dist/address.js +69 -0
- package/dist/api.d.ts +32 -0
- package/dist/api.d.ts.map +1 -0
- package/dist/api.js +35174 -0
- package/dist/app.d.ts +102 -0
- package/dist/app.d.ts.map +1 -0
- package/dist/app.js +71714 -0
- package/dist/availability.d.ts +24 -0
- package/dist/availability.d.ts.map +1 -0
- package/dist/availability.js +926 -0
- package/dist/cli.d.ts +6 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +86 -0
- package/dist/const.d.ts +35 -0
- package/dist/const.d.ts.map +1 -0
- package/dist/const.js +207 -0
- package/dist/databricks.d.ts +4 -0
- package/dist/databricks.d.ts.map +1 -0
- package/dist/databricks.js +84920 -0
- package/dist/date.d.ts +6 -0
- package/dist/date.d.ts.map +1 -0
- package/dist/date.js +101 -0
- package/dist/deploy.d.ts +76 -0
- package/dist/deploy.d.ts.map +1 -0
- package/dist/deploy.js +17506 -0
- package/dist/dynamodb.d.ts +17 -0
- package/dist/dynamodb.d.ts.map +1 -0
- package/dist/dynamodb.js +27365 -0
- package/dist/env.d.ts +7 -0
- package/dist/env.d.ts.map +1 -0
- package/dist/env.js +71 -0
- package/dist/graphql.d.ts +6 -0
- package/dist/graphql.d.ts.map +1 -0
- package/dist/graphql.js +73 -0
- package/dist/indexer.d.ts +70 -0
- package/dist/indexer.d.ts.map +1 -0
- package/dist/indexer.js +36979 -0
- package/dist/log.d.ts +14 -0
- package/dist/log.d.ts.map +1 -0
- package/dist/log.js +108 -0
- package/dist/object-hash.d.ts +2 -0
- package/dist/object-hash.d.ts.map +1 -0
- package/dist/object-hash.js +446 -0
- package/dist/opsgenie.d.ts +21 -0
- package/dist/opsgenie.d.ts.map +1 -0
- package/dist/opsgenie.js +320 -0
- package/dist/por.d.ts +38 -0
- package/dist/por.d.ts.map +1 -0
- package/dist/por.js +164 -0
- package/dist/s3.d.ts +21 -0
- package/dist/s3.d.ts.map +1 -0
- package/dist/s3.js +28878 -0
- package/dist/search.d.ts +6 -0
- package/dist/search.d.ts.map +1 -0
- package/dist/search.js +37754 -0
- package/dist/selector.d.ts +18 -0
- package/dist/selector.d.ts.map +1 -0
- package/dist/selector.js +89 -0
- package/dist/slack.d.ts +9 -0
- package/dist/slack.d.ts.map +1 -0
- package/dist/slack.js +16844 -0
- package/dist/util.d.ts +5 -0
- package/dist/util.d.ts.map +1 -0
- package/dist/util.js +72 -0
- package/dist/xxhash.win32-x64-msvc-hrdz34v7.node +0 -0
- package/examples/api.ts +1 -1
- package/examples/indexer.ts +1 -1
- package/examples/mode-indexer.ts +1 -1
- package/indexer.ts +11 -11
- package/package.json +98 -3
- package/por.ts +181 -0
- package/search.ts +2 -2
- package/tsconfig.build.json +24 -0
- package/tsconfig.json +5 -5
package/dist/abi.js
ADDED
|
@@ -0,0 +1,616 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
4
|
+
var __defProp = Object.defineProperty;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __toESM = (mod, isNodeMode, target) => {
|
|
9
|
+
target = mod != null ? __create(__getProtoOf(mod)) : {};
|
|
10
|
+
const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
|
|
11
|
+
for (let key of __getOwnPropNames(mod))
|
|
12
|
+
if (!__hasOwnProp.call(to, key))
|
|
13
|
+
__defProp(to, key, {
|
|
14
|
+
get: () => mod[key],
|
|
15
|
+
enumerable: true
|
|
16
|
+
});
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __moduleCache = /* @__PURE__ */ new WeakMap;
|
|
20
|
+
var __toCommonJS = (from) => {
|
|
21
|
+
var entry = __moduleCache.get(from), desc;
|
|
22
|
+
if (entry)
|
|
23
|
+
return entry;
|
|
24
|
+
entry = __defProp({}, "__esModule", { value: true });
|
|
25
|
+
if (from && typeof from === "object" || typeof from === "function")
|
|
26
|
+
__getOwnPropNames(from).map((key) => !__hasOwnProp.call(entry, key) && __defProp(entry, key, {
|
|
27
|
+
get: () => from[key],
|
|
28
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
29
|
+
}));
|
|
30
|
+
__moduleCache.set(from, entry);
|
|
31
|
+
return entry;
|
|
32
|
+
};
|
|
33
|
+
var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
|
|
34
|
+
var __export = (target, all) => {
|
|
35
|
+
for (var name in all)
|
|
36
|
+
__defProp(target, name, {
|
|
37
|
+
get: all[name],
|
|
38
|
+
enumerable: true,
|
|
39
|
+
configurable: true,
|
|
40
|
+
set: (newValue) => all[name] = () => newValue
|
|
41
|
+
});
|
|
42
|
+
};
|
|
43
|
+
var __esm = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
|
|
44
|
+
var __require = import.meta.require;
|
|
45
|
+
|
|
46
|
+
// abi.ts
|
|
47
|
+
var ERC20 = [
|
|
48
|
+
{
|
|
49
|
+
constant: true,
|
|
50
|
+
inputs: [],
|
|
51
|
+
name: "name",
|
|
52
|
+
outputs: [
|
|
53
|
+
{
|
|
54
|
+
name: "",
|
|
55
|
+
type: "string"
|
|
56
|
+
}
|
|
57
|
+
],
|
|
58
|
+
payable: false,
|
|
59
|
+
stateMutability: "view",
|
|
60
|
+
type: "function"
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
constant: false,
|
|
64
|
+
inputs: [
|
|
65
|
+
{
|
|
66
|
+
name: "_spender",
|
|
67
|
+
type: "address"
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
name: "_value",
|
|
71
|
+
type: "uint256"
|
|
72
|
+
}
|
|
73
|
+
],
|
|
74
|
+
name: "approve",
|
|
75
|
+
outputs: [
|
|
76
|
+
{
|
|
77
|
+
name: "",
|
|
78
|
+
type: "bool"
|
|
79
|
+
}
|
|
80
|
+
],
|
|
81
|
+
payable: false,
|
|
82
|
+
stateMutability: "nonpayable",
|
|
83
|
+
type: "function"
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
constant: true,
|
|
87
|
+
inputs: [],
|
|
88
|
+
name: "totalSupply",
|
|
89
|
+
outputs: [
|
|
90
|
+
{
|
|
91
|
+
name: "",
|
|
92
|
+
type: "uint256"
|
|
93
|
+
}
|
|
94
|
+
],
|
|
95
|
+
payable: false,
|
|
96
|
+
stateMutability: "view",
|
|
97
|
+
type: "function"
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
constant: false,
|
|
101
|
+
inputs: [
|
|
102
|
+
{
|
|
103
|
+
name: "_from",
|
|
104
|
+
type: "address"
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
name: "_to",
|
|
108
|
+
type: "address"
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
name: "_value",
|
|
112
|
+
type: "uint256"
|
|
113
|
+
}
|
|
114
|
+
],
|
|
115
|
+
name: "transferFrom",
|
|
116
|
+
outputs: [
|
|
117
|
+
{
|
|
118
|
+
name: "",
|
|
119
|
+
type: "bool"
|
|
120
|
+
}
|
|
121
|
+
],
|
|
122
|
+
payable: false,
|
|
123
|
+
stateMutability: "nonpayable",
|
|
124
|
+
type: "function"
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
constant: true,
|
|
128
|
+
inputs: [],
|
|
129
|
+
name: "decimals",
|
|
130
|
+
outputs: [
|
|
131
|
+
{
|
|
132
|
+
name: "",
|
|
133
|
+
type: "uint8"
|
|
134
|
+
}
|
|
135
|
+
],
|
|
136
|
+
payable: false,
|
|
137
|
+
stateMutability: "view",
|
|
138
|
+
type: "function"
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
constant: true,
|
|
142
|
+
inputs: [
|
|
143
|
+
{
|
|
144
|
+
name: "_owner",
|
|
145
|
+
type: "address"
|
|
146
|
+
}
|
|
147
|
+
],
|
|
148
|
+
name: "balanceOf",
|
|
149
|
+
outputs: [
|
|
150
|
+
{
|
|
151
|
+
name: "balance",
|
|
152
|
+
type: "uint256"
|
|
153
|
+
}
|
|
154
|
+
],
|
|
155
|
+
payable: false,
|
|
156
|
+
stateMutability: "view",
|
|
157
|
+
type: "function"
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
constant: true,
|
|
161
|
+
inputs: [],
|
|
162
|
+
name: "symbol",
|
|
163
|
+
outputs: [
|
|
164
|
+
{
|
|
165
|
+
name: "",
|
|
166
|
+
type: "string"
|
|
167
|
+
}
|
|
168
|
+
],
|
|
169
|
+
payable: false,
|
|
170
|
+
stateMutability: "view",
|
|
171
|
+
type: "function"
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
constant: false,
|
|
175
|
+
inputs: [
|
|
176
|
+
{
|
|
177
|
+
name: "_to",
|
|
178
|
+
type: "address"
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
name: "_value",
|
|
182
|
+
type: "uint256"
|
|
183
|
+
}
|
|
184
|
+
],
|
|
185
|
+
name: "transfer",
|
|
186
|
+
outputs: [
|
|
187
|
+
{
|
|
188
|
+
name: "",
|
|
189
|
+
type: "bool"
|
|
190
|
+
}
|
|
191
|
+
],
|
|
192
|
+
payable: false,
|
|
193
|
+
stateMutability: "nonpayable",
|
|
194
|
+
type: "function"
|
|
195
|
+
},
|
|
196
|
+
{
|
|
197
|
+
constant: true,
|
|
198
|
+
inputs: [
|
|
199
|
+
{
|
|
200
|
+
name: "_owner",
|
|
201
|
+
type: "address"
|
|
202
|
+
},
|
|
203
|
+
{
|
|
204
|
+
name: "_spender",
|
|
205
|
+
type: "address"
|
|
206
|
+
}
|
|
207
|
+
],
|
|
208
|
+
name: "allowance",
|
|
209
|
+
outputs: [
|
|
210
|
+
{
|
|
211
|
+
name: "",
|
|
212
|
+
type: "uint256"
|
|
213
|
+
}
|
|
214
|
+
],
|
|
215
|
+
payable: false,
|
|
216
|
+
stateMutability: "view",
|
|
217
|
+
type: "function"
|
|
218
|
+
},
|
|
219
|
+
{
|
|
220
|
+
name: "Approval",
|
|
221
|
+
payable: true,
|
|
222
|
+
stateMutability: "payable",
|
|
223
|
+
type: "fallback"
|
|
224
|
+
},
|
|
225
|
+
{
|
|
226
|
+
inputs: [
|
|
227
|
+
{
|
|
228
|
+
indexed: true,
|
|
229
|
+
name: "owner",
|
|
230
|
+
type: "address"
|
|
231
|
+
},
|
|
232
|
+
{
|
|
233
|
+
indexed: true,
|
|
234
|
+
name: "spender",
|
|
235
|
+
type: "address"
|
|
236
|
+
},
|
|
237
|
+
{
|
|
238
|
+
indexed: false,
|
|
239
|
+
name: "value",
|
|
240
|
+
type: "uint256"
|
|
241
|
+
}
|
|
242
|
+
],
|
|
243
|
+
name: "Approval",
|
|
244
|
+
type: "event"
|
|
245
|
+
},
|
|
246
|
+
{
|
|
247
|
+
inputs: [
|
|
248
|
+
{
|
|
249
|
+
indexed: true,
|
|
250
|
+
name: "from",
|
|
251
|
+
type: "address"
|
|
252
|
+
},
|
|
253
|
+
{
|
|
254
|
+
indexed: true,
|
|
255
|
+
name: "to",
|
|
256
|
+
type: "address"
|
|
257
|
+
},
|
|
258
|
+
{
|
|
259
|
+
indexed: false,
|
|
260
|
+
name: "value",
|
|
261
|
+
type: "uint256"
|
|
262
|
+
}
|
|
263
|
+
],
|
|
264
|
+
name: "Transfer",
|
|
265
|
+
type: "event"
|
|
266
|
+
}
|
|
267
|
+
];
|
|
268
|
+
var ERC721 = [
|
|
269
|
+
{
|
|
270
|
+
inputs: [
|
|
271
|
+
{
|
|
272
|
+
indexed: true,
|
|
273
|
+
internalType: "address",
|
|
274
|
+
name: "owner",
|
|
275
|
+
type: "address"
|
|
276
|
+
},
|
|
277
|
+
{
|
|
278
|
+
indexed: true,
|
|
279
|
+
internalType: "address",
|
|
280
|
+
name: "approved",
|
|
281
|
+
type: "address"
|
|
282
|
+
},
|
|
283
|
+
{
|
|
284
|
+
indexed: true,
|
|
285
|
+
internalType: "uint256",
|
|
286
|
+
name: "tokenId",
|
|
287
|
+
type: "uint256"
|
|
288
|
+
}
|
|
289
|
+
],
|
|
290
|
+
name: "Approval",
|
|
291
|
+
type: "event"
|
|
292
|
+
},
|
|
293
|
+
{
|
|
294
|
+
inputs: [
|
|
295
|
+
{
|
|
296
|
+
indexed: true,
|
|
297
|
+
internalType: "address",
|
|
298
|
+
name: "owner",
|
|
299
|
+
type: "address"
|
|
300
|
+
},
|
|
301
|
+
{
|
|
302
|
+
indexed: true,
|
|
303
|
+
internalType: "address",
|
|
304
|
+
name: "operator",
|
|
305
|
+
type: "address"
|
|
306
|
+
},
|
|
307
|
+
{
|
|
308
|
+
indexed: false,
|
|
309
|
+
internalType: "bool",
|
|
310
|
+
name: "approved",
|
|
311
|
+
type: "bool"
|
|
312
|
+
}
|
|
313
|
+
],
|
|
314
|
+
name: "ApprovalForAll",
|
|
315
|
+
type: "event"
|
|
316
|
+
},
|
|
317
|
+
{
|
|
318
|
+
inputs: [
|
|
319
|
+
{
|
|
320
|
+
indexed: true,
|
|
321
|
+
internalType: "address",
|
|
322
|
+
name: "from",
|
|
323
|
+
type: "address"
|
|
324
|
+
},
|
|
325
|
+
{
|
|
326
|
+
indexed: true,
|
|
327
|
+
internalType: "address",
|
|
328
|
+
name: "to",
|
|
329
|
+
type: "address"
|
|
330
|
+
},
|
|
331
|
+
{
|
|
332
|
+
indexed: true,
|
|
333
|
+
internalType: "uint256",
|
|
334
|
+
name: "tokenId",
|
|
335
|
+
type: "uint256"
|
|
336
|
+
}
|
|
337
|
+
],
|
|
338
|
+
name: "Transfer",
|
|
339
|
+
type: "event"
|
|
340
|
+
},
|
|
341
|
+
{
|
|
342
|
+
inputs: [
|
|
343
|
+
{
|
|
344
|
+
internalType: "address",
|
|
345
|
+
name: "to",
|
|
346
|
+
type: "address"
|
|
347
|
+
},
|
|
348
|
+
{
|
|
349
|
+
internalType: "uint256",
|
|
350
|
+
name: "tokenId",
|
|
351
|
+
type: "uint256"
|
|
352
|
+
}
|
|
353
|
+
],
|
|
354
|
+
name: "approve",
|
|
355
|
+
outputs: [],
|
|
356
|
+
stateMutability: "nonpayable",
|
|
357
|
+
type: "function"
|
|
358
|
+
},
|
|
359
|
+
{
|
|
360
|
+
constant: true,
|
|
361
|
+
inputs: [],
|
|
362
|
+
name: "totalSupply",
|
|
363
|
+
outputs: [
|
|
364
|
+
{
|
|
365
|
+
name: "",
|
|
366
|
+
type: "uint256"
|
|
367
|
+
}
|
|
368
|
+
],
|
|
369
|
+
payable: false,
|
|
370
|
+
stateMutability: "view",
|
|
371
|
+
type: "function"
|
|
372
|
+
},
|
|
373
|
+
{
|
|
374
|
+
inputs: [
|
|
375
|
+
{
|
|
376
|
+
internalType: "address",
|
|
377
|
+
name: "owner",
|
|
378
|
+
type: "address"
|
|
379
|
+
}
|
|
380
|
+
],
|
|
381
|
+
name: "balanceOf",
|
|
382
|
+
outputs: [
|
|
383
|
+
{
|
|
384
|
+
internalType: "uint256",
|
|
385
|
+
name: "balance",
|
|
386
|
+
type: "uint256"
|
|
387
|
+
}
|
|
388
|
+
],
|
|
389
|
+
stateMutability: "view",
|
|
390
|
+
type: "function"
|
|
391
|
+
},
|
|
392
|
+
{
|
|
393
|
+
inputs: [
|
|
394
|
+
{
|
|
395
|
+
internalType: "uint256",
|
|
396
|
+
name: "tokenId",
|
|
397
|
+
type: "uint256"
|
|
398
|
+
}
|
|
399
|
+
],
|
|
400
|
+
name: "getApproved",
|
|
401
|
+
outputs: [
|
|
402
|
+
{
|
|
403
|
+
internalType: "address",
|
|
404
|
+
name: "operator",
|
|
405
|
+
type: "address"
|
|
406
|
+
}
|
|
407
|
+
],
|
|
408
|
+
stateMutability: "view",
|
|
409
|
+
type: "function"
|
|
410
|
+
},
|
|
411
|
+
{
|
|
412
|
+
inputs: [
|
|
413
|
+
{
|
|
414
|
+
internalType: "address",
|
|
415
|
+
name: "owner",
|
|
416
|
+
type: "address"
|
|
417
|
+
},
|
|
418
|
+
{
|
|
419
|
+
internalType: "address",
|
|
420
|
+
name: "operator",
|
|
421
|
+
type: "address"
|
|
422
|
+
}
|
|
423
|
+
],
|
|
424
|
+
name: "isApprovedForAll",
|
|
425
|
+
outputs: [
|
|
426
|
+
{
|
|
427
|
+
internalType: "bool",
|
|
428
|
+
name: "",
|
|
429
|
+
type: "bool"
|
|
430
|
+
}
|
|
431
|
+
],
|
|
432
|
+
stateMutability: "view",
|
|
433
|
+
type: "function"
|
|
434
|
+
},
|
|
435
|
+
{
|
|
436
|
+
inputs: [],
|
|
437
|
+
name: "name",
|
|
438
|
+
outputs: [
|
|
439
|
+
{
|
|
440
|
+
internalType: "string",
|
|
441
|
+
name: "",
|
|
442
|
+
type: "string"
|
|
443
|
+
}
|
|
444
|
+
],
|
|
445
|
+
stateMutability: "view",
|
|
446
|
+
type: "function"
|
|
447
|
+
},
|
|
448
|
+
{
|
|
449
|
+
inputs: [
|
|
450
|
+
{
|
|
451
|
+
internalType: "uint256",
|
|
452
|
+
name: "tokenId",
|
|
453
|
+
type: "uint256"
|
|
454
|
+
}
|
|
455
|
+
],
|
|
456
|
+
name: "ownerOf",
|
|
457
|
+
outputs: [
|
|
458
|
+
{
|
|
459
|
+
internalType: "address",
|
|
460
|
+
name: "owner",
|
|
461
|
+
type: "address"
|
|
462
|
+
}
|
|
463
|
+
],
|
|
464
|
+
stateMutability: "view",
|
|
465
|
+
type: "function"
|
|
466
|
+
},
|
|
467
|
+
{
|
|
468
|
+
inputs: [
|
|
469
|
+
{
|
|
470
|
+
internalType: "address",
|
|
471
|
+
name: "from",
|
|
472
|
+
type: "address"
|
|
473
|
+
},
|
|
474
|
+
{
|
|
475
|
+
internalType: "address",
|
|
476
|
+
name: "to",
|
|
477
|
+
type: "address"
|
|
478
|
+
},
|
|
479
|
+
{
|
|
480
|
+
internalType: "uint256",
|
|
481
|
+
name: "tokenId",
|
|
482
|
+
type: "uint256"
|
|
483
|
+
}
|
|
484
|
+
],
|
|
485
|
+
name: "safeTransferFrom",
|
|
486
|
+
outputs: [],
|
|
487
|
+
stateMutability: "nonpayable",
|
|
488
|
+
type: "function"
|
|
489
|
+
},
|
|
490
|
+
{
|
|
491
|
+
inputs: [
|
|
492
|
+
{
|
|
493
|
+
internalType: "address",
|
|
494
|
+
name: "from",
|
|
495
|
+
type: "address"
|
|
496
|
+
},
|
|
497
|
+
{
|
|
498
|
+
internalType: "address",
|
|
499
|
+
name: "to",
|
|
500
|
+
type: "address"
|
|
501
|
+
},
|
|
502
|
+
{
|
|
503
|
+
internalType: "uint256",
|
|
504
|
+
name: "tokenId",
|
|
505
|
+
type: "uint256"
|
|
506
|
+
},
|
|
507
|
+
{
|
|
508
|
+
internalType: "bytes",
|
|
509
|
+
name: "data",
|
|
510
|
+
type: "bytes"
|
|
511
|
+
}
|
|
512
|
+
],
|
|
513
|
+
name: "safeTransferFrom",
|
|
514
|
+
outputs: [],
|
|
515
|
+
stateMutability: "nonpayable",
|
|
516
|
+
type: "function"
|
|
517
|
+
},
|
|
518
|
+
{
|
|
519
|
+
inputs: [
|
|
520
|
+
{
|
|
521
|
+
internalType: "address",
|
|
522
|
+
name: "operator",
|
|
523
|
+
type: "address"
|
|
524
|
+
},
|
|
525
|
+
{
|
|
526
|
+
internalType: "bool",
|
|
527
|
+
name: "_approved",
|
|
528
|
+
type: "bool"
|
|
529
|
+
}
|
|
530
|
+
],
|
|
531
|
+
name: "setApprovalForAll",
|
|
532
|
+
outputs: [],
|
|
533
|
+
stateMutability: "nonpayable",
|
|
534
|
+
type: "function"
|
|
535
|
+
},
|
|
536
|
+
{
|
|
537
|
+
inputs: [
|
|
538
|
+
{
|
|
539
|
+
internalType: "bytes4",
|
|
540
|
+
name: "interfaceId",
|
|
541
|
+
type: "bytes4"
|
|
542
|
+
}
|
|
543
|
+
],
|
|
544
|
+
name: "supportsInterface",
|
|
545
|
+
outputs: [
|
|
546
|
+
{
|
|
547
|
+
internalType: "bool",
|
|
548
|
+
name: "",
|
|
549
|
+
type: "bool"
|
|
550
|
+
}
|
|
551
|
+
],
|
|
552
|
+
stateMutability: "view",
|
|
553
|
+
type: "function"
|
|
554
|
+
},
|
|
555
|
+
{
|
|
556
|
+
inputs: [],
|
|
557
|
+
name: "symbol",
|
|
558
|
+
outputs: [
|
|
559
|
+
{
|
|
560
|
+
internalType: "string",
|
|
561
|
+
name: "",
|
|
562
|
+
type: "string"
|
|
563
|
+
}
|
|
564
|
+
],
|
|
565
|
+
stateMutability: "view",
|
|
566
|
+
type: "function"
|
|
567
|
+
},
|
|
568
|
+
{
|
|
569
|
+
inputs: [
|
|
570
|
+
{
|
|
571
|
+
internalType: "uint256",
|
|
572
|
+
name: "tokenId",
|
|
573
|
+
type: "uint256"
|
|
574
|
+
}
|
|
575
|
+
],
|
|
576
|
+
name: "tokenURI",
|
|
577
|
+
outputs: [
|
|
578
|
+
{
|
|
579
|
+
internalType: "string",
|
|
580
|
+
name: "",
|
|
581
|
+
type: "string"
|
|
582
|
+
}
|
|
583
|
+
],
|
|
584
|
+
stateMutability: "view",
|
|
585
|
+
type: "function"
|
|
586
|
+
},
|
|
587
|
+
{
|
|
588
|
+
inputs: [
|
|
589
|
+
{
|
|
590
|
+
internalType: "address",
|
|
591
|
+
name: "from",
|
|
592
|
+
type: "address"
|
|
593
|
+
},
|
|
594
|
+
{
|
|
595
|
+
internalType: "address",
|
|
596
|
+
name: "to",
|
|
597
|
+
type: "address"
|
|
598
|
+
},
|
|
599
|
+
{
|
|
600
|
+
internalType: "uint256",
|
|
601
|
+
name: "tokenId",
|
|
602
|
+
type: "uint256"
|
|
603
|
+
}
|
|
604
|
+
],
|
|
605
|
+
name: "transferFrom",
|
|
606
|
+
outputs: [],
|
|
607
|
+
stateMutability: "nonpayable",
|
|
608
|
+
type: "function"
|
|
609
|
+
}
|
|
610
|
+
];
|
|
611
|
+
var BEP20 = ERC20;
|
|
612
|
+
export {
|
|
613
|
+
ERC721,
|
|
614
|
+
ERC20,
|
|
615
|
+
BEP20
|
|
616
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"address.d.ts","sourceRoot":"","sources":["../address.ts"],"names":[],"mappings":"AAAA,wBAAgB,YAAY,CAAC,OAAO,EAAE,MAAM,YAqB3C;AAED,wBAAgB,cAAc,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,UAE5D"}
|
package/dist/address.js
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
4
|
+
var __defProp = Object.defineProperty;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __toESM = (mod, isNodeMode, target) => {
|
|
9
|
+
target = mod != null ? __create(__getProtoOf(mod)) : {};
|
|
10
|
+
const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
|
|
11
|
+
for (let key of __getOwnPropNames(mod))
|
|
12
|
+
if (!__hasOwnProp.call(to, key))
|
|
13
|
+
__defProp(to, key, {
|
|
14
|
+
get: () => mod[key],
|
|
15
|
+
enumerable: true
|
|
16
|
+
});
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __moduleCache = /* @__PURE__ */ new WeakMap;
|
|
20
|
+
var __toCommonJS = (from) => {
|
|
21
|
+
var entry = __moduleCache.get(from), desc;
|
|
22
|
+
if (entry)
|
|
23
|
+
return entry;
|
|
24
|
+
entry = __defProp({}, "__esModule", { value: true });
|
|
25
|
+
if (from && typeof from === "object" || typeof from === "function")
|
|
26
|
+
__getOwnPropNames(from).map((key) => !__hasOwnProp.call(entry, key) && __defProp(entry, key, {
|
|
27
|
+
get: () => from[key],
|
|
28
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
29
|
+
}));
|
|
30
|
+
__moduleCache.set(from, entry);
|
|
31
|
+
return entry;
|
|
32
|
+
};
|
|
33
|
+
var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
|
|
34
|
+
var __export = (target, all) => {
|
|
35
|
+
for (var name in all)
|
|
36
|
+
__defProp(target, name, {
|
|
37
|
+
get: all[name],
|
|
38
|
+
enumerable: true,
|
|
39
|
+
configurable: true,
|
|
40
|
+
set: (newValue) => all[name] = () => newValue
|
|
41
|
+
});
|
|
42
|
+
};
|
|
43
|
+
var __esm = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
|
|
44
|
+
var __require = import.meta.require;
|
|
45
|
+
|
|
46
|
+
// address.ts
|
|
47
|
+
function parseAddress(address) {
|
|
48
|
+
const separatorIndex = address.indexOf(":");
|
|
49
|
+
let protocolPart;
|
|
50
|
+
let addressPart;
|
|
51
|
+
if (separatorIndex === -1) {
|
|
52
|
+
protocolPart = "eth";
|
|
53
|
+
addressPart = address;
|
|
54
|
+
} else {
|
|
55
|
+
protocolPart = address.slice(0, separatorIndex);
|
|
56
|
+
addressPart = address.slice(separatorIndex + 1);
|
|
57
|
+
}
|
|
58
|
+
if (addressPart.startsWith("0x")) {
|
|
59
|
+
addressPart = addressPart.toLowerCase();
|
|
60
|
+
}
|
|
61
|
+
return [protocolPart, addressPart];
|
|
62
|
+
}
|
|
63
|
+
function composeAddress(protocol, addr) {
|
|
64
|
+
return `${protocol}:${addr}`;
|
|
65
|
+
}
|
|
66
|
+
export {
|
|
67
|
+
parseAddress,
|
|
68
|
+
composeAddress
|
|
69
|
+
};
|
package/dist/api.d.ts
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
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 {};
|
|
32
|
+
//# sourceMappingURL=api.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../api.ts"],"names":[],"mappings":"AACA,OAAO,OAAO,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAK/D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAE3C,MAAM,MAAM,UAAU,GAAG,CAAC,GAAG,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE,YAAY,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;AAE5F,KAAK,KAAK,GAAG;IACX,MAAM,CAAC,EAAE,KAAK,GAAG,MAAM,GAAG,KAAK,GAAG,QAAQ,GAAG,OAAO,CAAC;IACrD,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,UAAU,EAAE,CAAC;IAC3B,OAAO,EAAE,CAAC,IAAI,EAAE;QAAE,GAAG,EAAE,OAAO,CAAC;QAAC,GAAG,EAAE,QAAQ,CAAC;QAAC,OAAO,CAAC,EAAE,OAAO,CAAA;KAAE,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACrF,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC;AAEF,KAAK,KAAK,GAAG;IACX,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC1C,CAAC;AAyGF,wBAAsB,WAAW,CAAC,EAChC,UAAU,EACV,IAAI,EACJ,QAAa,EACb,MAAM,EACN,KAAK,EACL,YAAY,GACb,EAAE;IACD,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,MAAM,EAAE,KAAK,EAAE,CAAC;IAChB,KAAK,EAAE,KAAK,CAAC;IACb,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE;QAAE,GAAG,EAAE,UAAU,CAAC,OAAO,OAAO,CAAC,CAAA;KAAE,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CAC7E,iBAyFA"}
|