@subsquid/fuel-stream 0.0.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/lib/archive/data-schema.d.ts +332 -0
- package/lib/archive/data-schema.d.ts.map +1 -0
- package/lib/archive/data-schema.js +293 -0
- package/lib/archive/data-schema.js.map +1 -0
- package/lib/archive/source.d.ts +14 -0
- package/lib/archive/source.d.ts.map +1 -0
- package/lib/archive/source.js +82 -0
- package/lib/archive/source.js.map +1 -0
- package/lib/data/data-partial.d.ts +20 -0
- package/lib/data/data-partial.d.ts.map +1 -0
- package/lib/data/data-partial.js +3 -0
- package/lib/data/data-partial.js.map +1 -0
- package/lib/data/data-request.d.ts +35 -0
- package/lib/data/data-request.d.ts.map +1 -0
- package/lib/data/data-request.js +3 -0
- package/lib/data/data-request.js.map +1 -0
- package/lib/data/model.d.ts +45 -0
- package/lib/data/model.d.ts.map +1 -0
- package/lib/data/model.js +19 -0
- package/lib/data/model.js.map +1 -0
- package/lib/data/util.d.ts +20 -0
- package/lib/data/util.d.ts.map +1 -0
- package/lib/data/util.js +3 -0
- package/lib/data/util.js.map +1 -0
- package/lib/fields.d.ts +6 -0
- package/lib/fields.d.ts.map +1 -0
- package/lib/fields.js +32 -0
- package/lib/fields.js.map +1 -0
- package/lib/filter.d.ts +6 -0
- package/lib/filter.d.ts.map +1 -0
- package/lib/filter.js +172 -0
- package/lib/filter.js.map +1 -0
- package/lib/graphql.d.ts +14 -0
- package/lib/graphql.d.ts.map +1 -0
- package/lib/graphql.js +40 -0
- package/lib/graphql.js.map +1 -0
- package/lib/index.d.ts +3 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +19 -0
- package/lib/index.js.map +1 -0
- package/lib/source.d.ts +118 -0
- package/lib/source.d.ts.map +1 -0
- package/lib/source.js +296 -0
- package/lib/source.js.map +1 -0
- package/package.json +34 -0
- package/src/archive/data-schema.ts +320 -0
- package/src/archive/source.ts +88 -0
- package/src/data/data-partial.ts +25 -0
- package/src/data/data-request.ts +44 -0
- package/src/data/model.ts +114 -0
- package/src/data/util.ts +42 -0
- package/src/fields.ts +35 -0
- package/src/filter.ts +229 -0
- package/src/graphql.ts +51 -0
- package/src/index.ts +2 -0
- package/src/source.ts +416 -0
|
@@ -0,0 +1,332 @@
|
|
|
1
|
+
import { FieldSelection } from '../data/model';
|
|
2
|
+
export declare const getDataSchema: (obj: FieldSelection) => import("@subsquid/util-internal-validation").Validator<{
|
|
3
|
+
header: {
|
|
4
|
+
number: number;
|
|
5
|
+
hash: string;
|
|
6
|
+
daHeight?: bigint | undefined;
|
|
7
|
+
transactionsRoot?: string | undefined;
|
|
8
|
+
transactionsCount?: bigint | undefined;
|
|
9
|
+
messageReceiptRoot?: string | undefined;
|
|
10
|
+
messageReceiptCount?: bigint | undefined;
|
|
11
|
+
applicationHash?: string | undefined;
|
|
12
|
+
prevRoot?: string | undefined;
|
|
13
|
+
time?: bigint | undefined;
|
|
14
|
+
};
|
|
15
|
+
transactions?: {
|
|
16
|
+
index: number;
|
|
17
|
+
bytecodeLength?: bigint | undefined;
|
|
18
|
+
bytecodeWitnessIndex?: number | undefined;
|
|
19
|
+
gasPrice?: bigint | undefined;
|
|
20
|
+
hash?: string | undefined;
|
|
21
|
+
inputAssetIds?: string[] | undefined;
|
|
22
|
+
policies?: {
|
|
23
|
+
gasPrice?: bigint | undefined;
|
|
24
|
+
witnessLimit?: bigint | undefined;
|
|
25
|
+
maturity?: number | undefined;
|
|
26
|
+
maxFee?: bigint | undefined;
|
|
27
|
+
} | undefined;
|
|
28
|
+
inputContract?: {
|
|
29
|
+
utxoId: string;
|
|
30
|
+
balanceRoot: string;
|
|
31
|
+
stateRoot: string;
|
|
32
|
+
txPointer: string;
|
|
33
|
+
contract: string;
|
|
34
|
+
} | undefined;
|
|
35
|
+
inputContracts?: string[] | undefined;
|
|
36
|
+
isCreate?: boolean | undefined;
|
|
37
|
+
isMint?: boolean | undefined;
|
|
38
|
+
isScript?: boolean | undefined;
|
|
39
|
+
maturity?: number | undefined;
|
|
40
|
+
mintAmount?: bigint | undefined;
|
|
41
|
+
mintAssetId?: string | undefined;
|
|
42
|
+
outputContract?: {
|
|
43
|
+
inputIndex: number;
|
|
44
|
+
balanceRoot: string;
|
|
45
|
+
stateRoot: string;
|
|
46
|
+
} | undefined;
|
|
47
|
+
rawPayload?: string | undefined;
|
|
48
|
+
receiptsRoot?: string | undefined;
|
|
49
|
+
salt?: string | undefined;
|
|
50
|
+
script?: string | undefined;
|
|
51
|
+
scriptData?: string | undefined;
|
|
52
|
+
scriptGasLimit?: bigint | undefined;
|
|
53
|
+
storageSlots?: string[] | undefined;
|
|
54
|
+
txPointer?: string | undefined;
|
|
55
|
+
type?: "Script" | "Create" | "Mint" | undefined;
|
|
56
|
+
witnesses?: string[] | undefined;
|
|
57
|
+
}[] | undefined;
|
|
58
|
+
receipts?: {
|
|
59
|
+
transactionIndex: number;
|
|
60
|
+
index: number;
|
|
61
|
+
amount?: bigint | undefined;
|
|
62
|
+
assetId?: string | undefined;
|
|
63
|
+
contract?: string | undefined;
|
|
64
|
+
contractId?: string | undefined;
|
|
65
|
+
data?: string | undefined;
|
|
66
|
+
digest?: string | undefined;
|
|
67
|
+
gas?: bigint | undefined;
|
|
68
|
+
gasUsed?: bigint | undefined;
|
|
69
|
+
is?: bigint | undefined;
|
|
70
|
+
len?: bigint | undefined;
|
|
71
|
+
nonce?: string | undefined;
|
|
72
|
+
param1?: bigint | undefined;
|
|
73
|
+
param2?: bigint | undefined;
|
|
74
|
+
pc?: bigint | undefined;
|
|
75
|
+
ptr?: bigint | undefined;
|
|
76
|
+
ra?: bigint | undefined;
|
|
77
|
+
rb?: bigint | undefined;
|
|
78
|
+
rc?: bigint | undefined;
|
|
79
|
+
rd?: bigint | undefined;
|
|
80
|
+
reason?: bigint | undefined;
|
|
81
|
+
receiptType?: "CALL" | "RETURN" | "RETURN_DATA" | "PANIC" | "REVERT" | "LOG" | "LOG_DATA" | "TRANSFER" | "TRANSFER_OUT" | "SCRIPT_RESULT" | "MESSAGE_OUT" | "MINT" | "BURN" | undefined;
|
|
82
|
+
recipient?: string | undefined;
|
|
83
|
+
result?: bigint | undefined;
|
|
84
|
+
sender?: string | undefined;
|
|
85
|
+
subId?: string | undefined;
|
|
86
|
+
to?: string | undefined;
|
|
87
|
+
toAddress?: string | undefined;
|
|
88
|
+
val?: bigint | undefined;
|
|
89
|
+
}[] | undefined;
|
|
90
|
+
inputs?: ({
|
|
91
|
+
transactionIndex: number;
|
|
92
|
+
index: number;
|
|
93
|
+
utxoId?: string | undefined;
|
|
94
|
+
owner?: string | undefined;
|
|
95
|
+
amount?: bigint | undefined;
|
|
96
|
+
assetId?: string | undefined;
|
|
97
|
+
txPointer?: string | undefined;
|
|
98
|
+
witnessIndex?: number | undefined;
|
|
99
|
+
maturity?: number | undefined;
|
|
100
|
+
predicateGasUsed?: bigint | undefined;
|
|
101
|
+
predicate?: string | undefined;
|
|
102
|
+
predicateData?: string | undefined;
|
|
103
|
+
type: "InputCoin";
|
|
104
|
+
} | {
|
|
105
|
+
transactionIndex: number;
|
|
106
|
+
index: number;
|
|
107
|
+
utxoId?: string | undefined;
|
|
108
|
+
balanceRoot?: string | undefined;
|
|
109
|
+
stateRoot?: string | undefined;
|
|
110
|
+
txPointer?: string | undefined;
|
|
111
|
+
contract?: string | undefined;
|
|
112
|
+
type: "InputContract";
|
|
113
|
+
} | {
|
|
114
|
+
transactionIndex: number;
|
|
115
|
+
index: number;
|
|
116
|
+
sender?: string | undefined;
|
|
117
|
+
recipient?: string | undefined;
|
|
118
|
+
amount?: bigint | undefined;
|
|
119
|
+
nonce?: string | undefined;
|
|
120
|
+
witnessIndex?: number | undefined;
|
|
121
|
+
predicateGasUsed?: bigint | undefined;
|
|
122
|
+
data?: string | undefined;
|
|
123
|
+
predicate?: string | undefined;
|
|
124
|
+
predicateData?: string | undefined;
|
|
125
|
+
type: "InputMessage";
|
|
126
|
+
})[] | undefined;
|
|
127
|
+
outputs?: ({
|
|
128
|
+
transactionIndex: number;
|
|
129
|
+
index: number;
|
|
130
|
+
to?: string | undefined;
|
|
131
|
+
amount?: bigint | undefined;
|
|
132
|
+
assetId?: string | undefined;
|
|
133
|
+
type: "CoinOutput";
|
|
134
|
+
} | {
|
|
135
|
+
transactionIndex: number;
|
|
136
|
+
index: number;
|
|
137
|
+
inputIndex?: number | undefined;
|
|
138
|
+
balanceRoot?: string | undefined;
|
|
139
|
+
stateRoot?: string | undefined;
|
|
140
|
+
type: "ContractOutput";
|
|
141
|
+
} | {
|
|
142
|
+
transactionIndex: number;
|
|
143
|
+
index: number;
|
|
144
|
+
to?: string | undefined;
|
|
145
|
+
amount?: bigint | undefined;
|
|
146
|
+
assetId?: string | undefined;
|
|
147
|
+
type: "ChangeOutput";
|
|
148
|
+
} | {
|
|
149
|
+
transactionIndex: number;
|
|
150
|
+
index: number;
|
|
151
|
+
to?: string | undefined;
|
|
152
|
+
amount?: bigint | undefined;
|
|
153
|
+
assetId?: string | undefined;
|
|
154
|
+
type: "VariableOutput";
|
|
155
|
+
} | {
|
|
156
|
+
transactionIndex: number;
|
|
157
|
+
index: number;
|
|
158
|
+
contract?: {
|
|
159
|
+
id: string;
|
|
160
|
+
bytecode: string;
|
|
161
|
+
salt: string;
|
|
162
|
+
} | undefined;
|
|
163
|
+
stateRoot?: string | undefined;
|
|
164
|
+
type: "ContractCreated";
|
|
165
|
+
})[] | undefined;
|
|
166
|
+
}, {
|
|
167
|
+
header: {
|
|
168
|
+
number: number;
|
|
169
|
+
hash: string;
|
|
170
|
+
daHeight?: string | undefined;
|
|
171
|
+
transactionsRoot?: string | undefined;
|
|
172
|
+
transactionsCount?: string | undefined;
|
|
173
|
+
messageReceiptRoot?: string | undefined;
|
|
174
|
+
messageReceiptCount?: string | undefined;
|
|
175
|
+
applicationHash?: string | undefined;
|
|
176
|
+
prevRoot?: string | undefined;
|
|
177
|
+
time?: string | undefined;
|
|
178
|
+
};
|
|
179
|
+
transactions?: {
|
|
180
|
+
index: number;
|
|
181
|
+
bytecodeLength?: string | null | undefined;
|
|
182
|
+
bytecodeWitnessIndex?: number | null | undefined;
|
|
183
|
+
gasPrice?: string | null | undefined;
|
|
184
|
+
hash?: string | undefined;
|
|
185
|
+
inputAssetIds?: string[] | null | undefined;
|
|
186
|
+
policies?: {
|
|
187
|
+
gasPrice?: string | null | undefined;
|
|
188
|
+
witnessLimit?: string | null | undefined;
|
|
189
|
+
maturity?: number | null | undefined;
|
|
190
|
+
maxFee?: string | null | undefined;
|
|
191
|
+
} | null | undefined;
|
|
192
|
+
inputContract?: {
|
|
193
|
+
utxoId: string;
|
|
194
|
+
balanceRoot: string;
|
|
195
|
+
stateRoot: string;
|
|
196
|
+
txPointer: string;
|
|
197
|
+
contract: string;
|
|
198
|
+
} | null | undefined;
|
|
199
|
+
inputContracts?: string[] | null | undefined;
|
|
200
|
+
isCreate?: boolean | undefined;
|
|
201
|
+
isMint?: boolean | undefined;
|
|
202
|
+
isScript?: boolean | undefined;
|
|
203
|
+
maturity?: number | null | undefined;
|
|
204
|
+
mintAmount?: string | null | undefined;
|
|
205
|
+
mintAssetId?: string | null | undefined;
|
|
206
|
+
outputContract?: {
|
|
207
|
+
inputIndex: number;
|
|
208
|
+
balanceRoot: string;
|
|
209
|
+
stateRoot: string;
|
|
210
|
+
} | null | undefined;
|
|
211
|
+
rawPayload?: string | null | undefined;
|
|
212
|
+
receiptsRoot?: string | null | undefined;
|
|
213
|
+
salt?: string | null | undefined;
|
|
214
|
+
script?: string | null | undefined;
|
|
215
|
+
scriptData?: string | null | undefined;
|
|
216
|
+
scriptGasLimit?: string | null | undefined;
|
|
217
|
+
storageSlots?: string[] | null | undefined;
|
|
218
|
+
txPointer?: string | null | undefined;
|
|
219
|
+
type?: "Script" | "Create" | "Mint" | undefined;
|
|
220
|
+
witnesses?: string[] | null | undefined;
|
|
221
|
+
}[] | null | undefined;
|
|
222
|
+
receipts?: {
|
|
223
|
+
transactionIndex: number;
|
|
224
|
+
index: number;
|
|
225
|
+
amount?: string | null | undefined;
|
|
226
|
+
assetId?: string | null | undefined;
|
|
227
|
+
contract?: string | null | undefined;
|
|
228
|
+
contractId?: string | null | undefined;
|
|
229
|
+
data?: string | null | undefined;
|
|
230
|
+
digest?: string | null | undefined;
|
|
231
|
+
gas?: string | null | undefined;
|
|
232
|
+
gasUsed?: string | null | undefined;
|
|
233
|
+
is?: string | null | undefined;
|
|
234
|
+
len?: string | null | undefined;
|
|
235
|
+
nonce?: string | null | undefined;
|
|
236
|
+
param1?: string | null | undefined;
|
|
237
|
+
param2?: string | null | undefined;
|
|
238
|
+
pc?: string | null | undefined;
|
|
239
|
+
ptr?: string | null | undefined;
|
|
240
|
+
ra?: string | null | undefined;
|
|
241
|
+
rb?: string | null | undefined;
|
|
242
|
+
rc?: string | null | undefined;
|
|
243
|
+
rd?: string | null | undefined;
|
|
244
|
+
reason?: string | null | undefined;
|
|
245
|
+
receiptType?: "CALL" | "RETURN" | "RETURN_DATA" | "PANIC" | "REVERT" | "LOG" | "LOG_DATA" | "TRANSFER" | "TRANSFER_OUT" | "SCRIPT_RESULT" | "MESSAGE_OUT" | "MINT" | "BURN" | undefined;
|
|
246
|
+
recipient?: string | null | undefined;
|
|
247
|
+
result?: string | null | undefined;
|
|
248
|
+
sender?: string | null | undefined;
|
|
249
|
+
subId?: string | null | undefined;
|
|
250
|
+
to?: string | null | undefined;
|
|
251
|
+
toAddress?: string | null | undefined;
|
|
252
|
+
val?: string | null | undefined;
|
|
253
|
+
}[] | null | undefined;
|
|
254
|
+
inputs?: ({
|
|
255
|
+
transactionIndex: number;
|
|
256
|
+
index: number;
|
|
257
|
+
utxoId?: string | undefined;
|
|
258
|
+
owner?: string | undefined;
|
|
259
|
+
amount?: string | undefined;
|
|
260
|
+
assetId?: string | undefined;
|
|
261
|
+
txPointer?: string | undefined;
|
|
262
|
+
witnessIndex?: number | undefined;
|
|
263
|
+
maturity?: number | undefined;
|
|
264
|
+
predicateGasUsed?: string | undefined;
|
|
265
|
+
predicate?: string | undefined;
|
|
266
|
+
predicateData?: string | undefined;
|
|
267
|
+
type: "InputCoin";
|
|
268
|
+
} | {
|
|
269
|
+
transactionIndex: number;
|
|
270
|
+
index: number;
|
|
271
|
+
utxoId?: string | undefined;
|
|
272
|
+
balanceRoot?: string | undefined;
|
|
273
|
+
stateRoot?: string | undefined;
|
|
274
|
+
txPointer?: string | undefined;
|
|
275
|
+
contract?: string | undefined;
|
|
276
|
+
type: "InputContract";
|
|
277
|
+
} | {
|
|
278
|
+
transactionIndex: number;
|
|
279
|
+
index: number;
|
|
280
|
+
sender?: string | undefined;
|
|
281
|
+
recipient?: string | undefined;
|
|
282
|
+
amount?: string | undefined;
|
|
283
|
+
nonce?: string | undefined;
|
|
284
|
+
witnessIndex?: number | undefined;
|
|
285
|
+
predicateGasUsed?: string | undefined;
|
|
286
|
+
data?: string | undefined;
|
|
287
|
+
predicate?: string | undefined;
|
|
288
|
+
predicateData?: string | undefined;
|
|
289
|
+
type: "InputMessage";
|
|
290
|
+
})[] | null | undefined;
|
|
291
|
+
outputs?: ({
|
|
292
|
+
transactionIndex: number;
|
|
293
|
+
index: number;
|
|
294
|
+
to?: string | undefined;
|
|
295
|
+
amount?: string | undefined;
|
|
296
|
+
assetId?: string | undefined;
|
|
297
|
+
type: "CoinOutput";
|
|
298
|
+
} | {
|
|
299
|
+
transactionIndex: number;
|
|
300
|
+
index: number;
|
|
301
|
+
inputIndex?: number | undefined;
|
|
302
|
+
balanceRoot?: string | undefined;
|
|
303
|
+
stateRoot?: string | undefined;
|
|
304
|
+
type: "ContractOutput";
|
|
305
|
+
} | {
|
|
306
|
+
transactionIndex: number;
|
|
307
|
+
index: number;
|
|
308
|
+
to?: string | undefined;
|
|
309
|
+
amount?: string | undefined;
|
|
310
|
+
assetId?: string | undefined;
|
|
311
|
+
type: "ChangeOutput";
|
|
312
|
+
} | {
|
|
313
|
+
transactionIndex: number;
|
|
314
|
+
index: number;
|
|
315
|
+
to?: string | undefined;
|
|
316
|
+
amount?: string | undefined;
|
|
317
|
+
assetId?: string | undefined;
|
|
318
|
+
type: "VariableOutput";
|
|
319
|
+
} | {
|
|
320
|
+
transactionIndex: number;
|
|
321
|
+
index: number;
|
|
322
|
+
contract?: {
|
|
323
|
+
id: string;
|
|
324
|
+
bytecode: string;
|
|
325
|
+
salt: string;
|
|
326
|
+
} | undefined;
|
|
327
|
+
stateRoot?: string | undefined;
|
|
328
|
+
type: "ContractCreated";
|
|
329
|
+
})[] | null | undefined;
|
|
330
|
+
}>;
|
|
331
|
+
export declare function isEmpty(obj: object): boolean;
|
|
332
|
+
//# sourceMappingURL=data-schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"data-schema.d.ts","sourceRoot":"","sources":["../../src/archive/data-schema.ts"],"names":[],"mappings":"AAcA,OAAO,EAAC,cAAc,EAAC,MAAM,eAAe,CAAA;AAI5C,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAwRxB,CAAA;AAgBF,wBAAgB,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAK5C"}
|
|
@@ -0,0 +1,293 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isEmpty = exports.getDataSchema = void 0;
|
|
4
|
+
const util_internal_1 = require("@subsquid/util-internal");
|
|
5
|
+
const util_internal_validation_1 = require("@subsquid/util-internal-validation");
|
|
6
|
+
exports.getDataSchema = (0, util_internal_1.weakMemo)((fields) => {
|
|
7
|
+
let BlockHeader = (0, util_internal_validation_1.object)({
|
|
8
|
+
number: util_internal_validation_1.NAT,
|
|
9
|
+
hash: util_internal_validation_1.BYTES,
|
|
10
|
+
...project(fields.block, {
|
|
11
|
+
daHeight: util_internal_validation_1.BIG_NAT,
|
|
12
|
+
transactionsRoot: util_internal_validation_1.BYTES,
|
|
13
|
+
transactionsCount: util_internal_validation_1.BIG_NAT,
|
|
14
|
+
messageReceiptRoot: util_internal_validation_1.BYTES,
|
|
15
|
+
messageReceiptCount: util_internal_validation_1.BIG_NAT,
|
|
16
|
+
applicationHash: util_internal_validation_1.BYTES,
|
|
17
|
+
prevRoot: util_internal_validation_1.BYTES,
|
|
18
|
+
time: util_internal_validation_1.BIG_NAT,
|
|
19
|
+
})
|
|
20
|
+
});
|
|
21
|
+
let Transaction = (0, util_internal_validation_1.object)({
|
|
22
|
+
index: util_internal_validation_1.NAT,
|
|
23
|
+
...project(fields.transaction, {
|
|
24
|
+
bytecodeLength: (0, util_internal_validation_1.option)(util_internal_validation_1.BIG_NAT),
|
|
25
|
+
bytecodeWitnessIndex: (0, util_internal_validation_1.option)(util_internal_validation_1.NAT),
|
|
26
|
+
gasPrice: (0, util_internal_validation_1.option)(util_internal_validation_1.BIG_NAT),
|
|
27
|
+
hash: util_internal_validation_1.BYTES,
|
|
28
|
+
inputAssetIds: (0, util_internal_validation_1.option)((0, util_internal_validation_1.array)(util_internal_validation_1.BYTES)),
|
|
29
|
+
policies: (0, util_internal_validation_1.option)((0, util_internal_validation_1.object)({
|
|
30
|
+
gasPrice: (0, util_internal_validation_1.option)(util_internal_validation_1.BIG_NAT),
|
|
31
|
+
witnessLimit: (0, util_internal_validation_1.option)(util_internal_validation_1.BIG_NAT),
|
|
32
|
+
maturity: (0, util_internal_validation_1.option)(util_internal_validation_1.NAT),
|
|
33
|
+
maxFee: (0, util_internal_validation_1.option)(util_internal_validation_1.BIG_NAT)
|
|
34
|
+
})),
|
|
35
|
+
inputContract: (0, util_internal_validation_1.option)((0, util_internal_validation_1.object)({
|
|
36
|
+
utxoId: util_internal_validation_1.BYTES,
|
|
37
|
+
balanceRoot: util_internal_validation_1.BYTES,
|
|
38
|
+
stateRoot: util_internal_validation_1.BYTES,
|
|
39
|
+
txPointer: util_internal_validation_1.STRING,
|
|
40
|
+
contract: util_internal_validation_1.BYTES
|
|
41
|
+
})),
|
|
42
|
+
inputContracts: (0, util_internal_validation_1.option)((0, util_internal_validation_1.array)(util_internal_validation_1.BYTES)),
|
|
43
|
+
isCreate: util_internal_validation_1.BOOLEAN,
|
|
44
|
+
isMint: util_internal_validation_1.BOOLEAN,
|
|
45
|
+
isScript: util_internal_validation_1.BOOLEAN,
|
|
46
|
+
maturity: (0, util_internal_validation_1.option)(util_internal_validation_1.NAT),
|
|
47
|
+
mintAmount: (0, util_internal_validation_1.option)(util_internal_validation_1.BIG_NAT),
|
|
48
|
+
mintAssetId: (0, util_internal_validation_1.option)(util_internal_validation_1.BYTES),
|
|
49
|
+
outputContract: (0, util_internal_validation_1.option)((0, util_internal_validation_1.object)({
|
|
50
|
+
inputIndex: util_internal_validation_1.NAT,
|
|
51
|
+
balanceRoot: util_internal_validation_1.BYTES,
|
|
52
|
+
stateRoot: util_internal_validation_1.BYTES
|
|
53
|
+
})),
|
|
54
|
+
rawPayload: (0, util_internal_validation_1.option)(util_internal_validation_1.BYTES),
|
|
55
|
+
receiptsRoot: (0, util_internal_validation_1.option)(util_internal_validation_1.BYTES),
|
|
56
|
+
salt: (0, util_internal_validation_1.option)(util_internal_validation_1.BYTES),
|
|
57
|
+
script: (0, util_internal_validation_1.option)(util_internal_validation_1.BYTES),
|
|
58
|
+
scriptData: (0, util_internal_validation_1.option)(util_internal_validation_1.BYTES),
|
|
59
|
+
scriptGasLimit: (0, util_internal_validation_1.option)(util_internal_validation_1.BIG_NAT),
|
|
60
|
+
storageSlots: (0, util_internal_validation_1.option)((0, util_internal_validation_1.array)(util_internal_validation_1.BYTES)),
|
|
61
|
+
txPointer: (0, util_internal_validation_1.option)(util_internal_validation_1.STRING),
|
|
62
|
+
type: (0, util_internal_validation_1.oneOf)({
|
|
63
|
+
script: (0, util_internal_validation_1.constant)('Script'),
|
|
64
|
+
create: (0, util_internal_validation_1.constant)('Create'),
|
|
65
|
+
mint: (0, util_internal_validation_1.constant)('Mint'),
|
|
66
|
+
}),
|
|
67
|
+
witnesses: (0, util_internal_validation_1.option)((0, util_internal_validation_1.array)(util_internal_validation_1.BYTES)),
|
|
68
|
+
})
|
|
69
|
+
});
|
|
70
|
+
let Receipt = (0, util_internal_validation_1.object)({
|
|
71
|
+
transactionIndex: util_internal_validation_1.NAT,
|
|
72
|
+
index: util_internal_validation_1.NAT,
|
|
73
|
+
...project(fields.receipt, {
|
|
74
|
+
amount: (0, util_internal_validation_1.option)(util_internal_validation_1.BIG_NAT),
|
|
75
|
+
assetId: (0, util_internal_validation_1.option)(util_internal_validation_1.BYTES),
|
|
76
|
+
contract: (0, util_internal_validation_1.option)(util_internal_validation_1.BYTES),
|
|
77
|
+
contractId: (0, util_internal_validation_1.option)(util_internal_validation_1.BYTES),
|
|
78
|
+
data: (0, util_internal_validation_1.option)(util_internal_validation_1.BYTES),
|
|
79
|
+
digest: (0, util_internal_validation_1.option)(util_internal_validation_1.BYTES),
|
|
80
|
+
gas: (0, util_internal_validation_1.option)(util_internal_validation_1.BIG_NAT),
|
|
81
|
+
gasUsed: (0, util_internal_validation_1.option)(util_internal_validation_1.BIG_NAT),
|
|
82
|
+
is: (0, util_internal_validation_1.option)(util_internal_validation_1.BIG_NAT),
|
|
83
|
+
len: (0, util_internal_validation_1.option)(util_internal_validation_1.BIG_NAT),
|
|
84
|
+
nonce: (0, util_internal_validation_1.option)(util_internal_validation_1.BYTES),
|
|
85
|
+
param1: (0, util_internal_validation_1.option)(util_internal_validation_1.BIG_NAT),
|
|
86
|
+
param2: (0, util_internal_validation_1.option)(util_internal_validation_1.BIG_NAT),
|
|
87
|
+
pc: (0, util_internal_validation_1.option)(util_internal_validation_1.BIG_NAT),
|
|
88
|
+
ptr: (0, util_internal_validation_1.option)(util_internal_validation_1.BIG_NAT),
|
|
89
|
+
ra: (0, util_internal_validation_1.option)(util_internal_validation_1.BIG_NAT),
|
|
90
|
+
rb: (0, util_internal_validation_1.option)(util_internal_validation_1.BIG_NAT),
|
|
91
|
+
rc: (0, util_internal_validation_1.option)(util_internal_validation_1.BIG_NAT),
|
|
92
|
+
rd: (0, util_internal_validation_1.option)(util_internal_validation_1.BIG_NAT),
|
|
93
|
+
reason: (0, util_internal_validation_1.option)(util_internal_validation_1.BIG_NAT),
|
|
94
|
+
receiptType: (0, util_internal_validation_1.oneOf)({
|
|
95
|
+
CALL: (0, util_internal_validation_1.constant)('CALL'),
|
|
96
|
+
RETURN: (0, util_internal_validation_1.constant)('RETURN'),
|
|
97
|
+
RETURN_DATA: (0, util_internal_validation_1.constant)('RETURN_DATA'),
|
|
98
|
+
PANIC: (0, util_internal_validation_1.constant)('PANIC'),
|
|
99
|
+
REVERT: (0, util_internal_validation_1.constant)('REVERT'),
|
|
100
|
+
LOG: (0, util_internal_validation_1.constant)('LOG'),
|
|
101
|
+
LOG_DATA: (0, util_internal_validation_1.constant)('LOG_DATA'),
|
|
102
|
+
TRANSFER: (0, util_internal_validation_1.constant)('TRANSFER'),
|
|
103
|
+
TRANSFER_OUT: (0, util_internal_validation_1.constant)('TRANSFER_OUT'),
|
|
104
|
+
SCRIPT_RESULT: (0, util_internal_validation_1.constant)('SCRIPT_RESULT'),
|
|
105
|
+
MESSAGE_OUT: (0, util_internal_validation_1.constant)('MESSAGE_OUT'),
|
|
106
|
+
MINT: (0, util_internal_validation_1.constant)('MINT'),
|
|
107
|
+
BURN: (0, util_internal_validation_1.constant)('BURN'),
|
|
108
|
+
}),
|
|
109
|
+
recipient: (0, util_internal_validation_1.option)(util_internal_validation_1.BYTES),
|
|
110
|
+
result: (0, util_internal_validation_1.option)(util_internal_validation_1.BIG_NAT),
|
|
111
|
+
sender: (0, util_internal_validation_1.option)(util_internal_validation_1.BYTES),
|
|
112
|
+
subId: (0, util_internal_validation_1.option)(util_internal_validation_1.BYTES),
|
|
113
|
+
to: (0, util_internal_validation_1.option)(util_internal_validation_1.BYTES),
|
|
114
|
+
toAddress: (0, util_internal_validation_1.option)(util_internal_validation_1.BYTES),
|
|
115
|
+
val: (0, util_internal_validation_1.option)(util_internal_validation_1.BIG_NAT),
|
|
116
|
+
})
|
|
117
|
+
});
|
|
118
|
+
let InputCoin = (0, util_internal_validation_1.object)({
|
|
119
|
+
transactionIndex: util_internal_validation_1.NAT,
|
|
120
|
+
index: util_internal_validation_1.NAT,
|
|
121
|
+
...project({
|
|
122
|
+
amount: fields.input?.coinAmount,
|
|
123
|
+
assetId: fields.input?.coinAssetId,
|
|
124
|
+
maturity: fields.input?.coinMaturity,
|
|
125
|
+
owner: fields.input?.coinOwner,
|
|
126
|
+
predicate: fields.input?.coinPredicate,
|
|
127
|
+
predicateData: fields.input?.coinPredicateData,
|
|
128
|
+
predicateGasUsed: fields.input?.coinPredicateGasUsed,
|
|
129
|
+
txPointer: fields.input?.coinTxPointer,
|
|
130
|
+
utxoId: fields.input?.coinUtxoId,
|
|
131
|
+
witnessIndex: fields.input?.coinWitnessIndex
|
|
132
|
+
}, {
|
|
133
|
+
utxoId: util_internal_validation_1.BYTES,
|
|
134
|
+
owner: util_internal_validation_1.BYTES,
|
|
135
|
+
amount: util_internal_validation_1.BIG_NAT,
|
|
136
|
+
assetId: util_internal_validation_1.BYTES,
|
|
137
|
+
txPointer: util_internal_validation_1.STRING,
|
|
138
|
+
witnessIndex: util_internal_validation_1.NAT,
|
|
139
|
+
maturity: util_internal_validation_1.NAT,
|
|
140
|
+
predicateGasUsed: util_internal_validation_1.BIG_NAT,
|
|
141
|
+
predicate: util_internal_validation_1.BYTES,
|
|
142
|
+
predicateData: util_internal_validation_1.BYTES,
|
|
143
|
+
})
|
|
144
|
+
});
|
|
145
|
+
let InputContract = (0, util_internal_validation_1.object)({
|
|
146
|
+
transactionIndex: util_internal_validation_1.NAT,
|
|
147
|
+
index: util_internal_validation_1.NAT,
|
|
148
|
+
...project({
|
|
149
|
+
utxoId: fields.input?.contractUtxoId,
|
|
150
|
+
balanceRoot: fields.input?.contractBalanceRoot,
|
|
151
|
+
contract: fields.input?.contractContract,
|
|
152
|
+
stateRoot: fields.input?.contractStateRoot,
|
|
153
|
+
txPointer: fields.input?.contractTxPointer
|
|
154
|
+
}, {
|
|
155
|
+
utxoId: util_internal_validation_1.BYTES,
|
|
156
|
+
balanceRoot: util_internal_validation_1.BYTES,
|
|
157
|
+
stateRoot: util_internal_validation_1.BYTES,
|
|
158
|
+
txPointer: util_internal_validation_1.STRING,
|
|
159
|
+
contract: util_internal_validation_1.BYTES,
|
|
160
|
+
})
|
|
161
|
+
});
|
|
162
|
+
let InputMessage = (0, util_internal_validation_1.object)({
|
|
163
|
+
transactionIndex: util_internal_validation_1.NAT,
|
|
164
|
+
index: util_internal_validation_1.NAT,
|
|
165
|
+
...project({
|
|
166
|
+
sender: fields.input?.messageSender,
|
|
167
|
+
amount: fields.input?.messageAmount,
|
|
168
|
+
data: fields.input?.messageData,
|
|
169
|
+
nonce: fields.input?.messageNonce,
|
|
170
|
+
predicate: fields.input?.messagePredicate,
|
|
171
|
+
predicateData: fields.input?.messagePredicateData,
|
|
172
|
+
predicateGasUsed: fields.input?.messagePredicateGasUsed,
|
|
173
|
+
recipient: fields.input?.messageRecipient,
|
|
174
|
+
witnessIndex: fields.input?.messageWitnessIndex
|
|
175
|
+
}, {
|
|
176
|
+
sender: util_internal_validation_1.BYTES,
|
|
177
|
+
recipient: util_internal_validation_1.BYTES,
|
|
178
|
+
amount: util_internal_validation_1.BIG_NAT,
|
|
179
|
+
nonce: util_internal_validation_1.BYTES,
|
|
180
|
+
witnessIndex: util_internal_validation_1.NAT,
|
|
181
|
+
predicateGasUsed: util_internal_validation_1.BIG_NAT,
|
|
182
|
+
data: util_internal_validation_1.BYTES,
|
|
183
|
+
predicate: util_internal_validation_1.BYTES,
|
|
184
|
+
predicateData: util_internal_validation_1.BYTES,
|
|
185
|
+
})
|
|
186
|
+
});
|
|
187
|
+
let Input = (0, util_internal_validation_1.taggedUnion)('type', {
|
|
188
|
+
InputCoin,
|
|
189
|
+
InputContract,
|
|
190
|
+
InputMessage
|
|
191
|
+
});
|
|
192
|
+
let CoinOutput = (0, util_internal_validation_1.object)({
|
|
193
|
+
transactionIndex: util_internal_validation_1.NAT,
|
|
194
|
+
index: util_internal_validation_1.NAT,
|
|
195
|
+
...project({
|
|
196
|
+
amount: fields.output?.coinAmount,
|
|
197
|
+
assetId: fields.output?.coinAssetId,
|
|
198
|
+
to: fields.output?.coinTo
|
|
199
|
+
}, {
|
|
200
|
+
to: util_internal_validation_1.BYTES,
|
|
201
|
+
amount: util_internal_validation_1.BIG_NAT,
|
|
202
|
+
assetId: util_internal_validation_1.BYTES
|
|
203
|
+
})
|
|
204
|
+
});
|
|
205
|
+
let ContractOutput = (0, util_internal_validation_1.object)({
|
|
206
|
+
transactionIndex: util_internal_validation_1.NAT,
|
|
207
|
+
index: util_internal_validation_1.NAT,
|
|
208
|
+
...project({
|
|
209
|
+
inputIndex: fields.output?.contractInputIndex,
|
|
210
|
+
balanceRoot: fields.output?.contractBalanceRoot,
|
|
211
|
+
stateRoot: fields.output?.contractStateRoot
|
|
212
|
+
}, {
|
|
213
|
+
inputIndex: util_internal_validation_1.NAT,
|
|
214
|
+
balanceRoot: util_internal_validation_1.BYTES,
|
|
215
|
+
stateRoot: util_internal_validation_1.BYTES
|
|
216
|
+
})
|
|
217
|
+
});
|
|
218
|
+
let ChangeOutput = (0, util_internal_validation_1.object)({
|
|
219
|
+
transactionIndex: util_internal_validation_1.NAT,
|
|
220
|
+
index: util_internal_validation_1.NAT,
|
|
221
|
+
...project({
|
|
222
|
+
amount: fields.output?.changeAmount,
|
|
223
|
+
assetId: fields.output?.changeAssetId,
|
|
224
|
+
to: fields.output?.changeTo
|
|
225
|
+
}, {
|
|
226
|
+
to: util_internal_validation_1.BYTES,
|
|
227
|
+
amount: util_internal_validation_1.BIG_NAT,
|
|
228
|
+
assetId: util_internal_validation_1.BYTES
|
|
229
|
+
})
|
|
230
|
+
});
|
|
231
|
+
let VariableOutput = (0, util_internal_validation_1.object)({
|
|
232
|
+
transactionIndex: util_internal_validation_1.NAT,
|
|
233
|
+
index: util_internal_validation_1.NAT,
|
|
234
|
+
...project({
|
|
235
|
+
to: fields.output?.variableTo,
|
|
236
|
+
amount: fields.output?.variableAmount,
|
|
237
|
+
assetId: fields.output?.variableAssetId
|
|
238
|
+
}, {
|
|
239
|
+
to: util_internal_validation_1.BYTES,
|
|
240
|
+
amount: util_internal_validation_1.BIG_NAT,
|
|
241
|
+
assetId: util_internal_validation_1.BYTES
|
|
242
|
+
})
|
|
243
|
+
});
|
|
244
|
+
let ContractCreated = (0, util_internal_validation_1.object)({
|
|
245
|
+
transactionIndex: util_internal_validation_1.NAT,
|
|
246
|
+
index: util_internal_validation_1.NAT,
|
|
247
|
+
...project({
|
|
248
|
+
contract: fields.output?.contractCreatedContract,
|
|
249
|
+
stateRoot: fields.output?.contractCreatedStateRoot
|
|
250
|
+
}, {
|
|
251
|
+
contract: (0, util_internal_validation_1.object)({
|
|
252
|
+
id: util_internal_validation_1.BYTES,
|
|
253
|
+
bytecode: util_internal_validation_1.BYTES,
|
|
254
|
+
salt: util_internal_validation_1.BYTES
|
|
255
|
+
}),
|
|
256
|
+
stateRoot: util_internal_validation_1.BYTES
|
|
257
|
+
})
|
|
258
|
+
});
|
|
259
|
+
let Ouput = (0, util_internal_validation_1.taggedUnion)('type', {
|
|
260
|
+
CoinOutput,
|
|
261
|
+
ContractOutput,
|
|
262
|
+
ChangeOutput,
|
|
263
|
+
VariableOutput,
|
|
264
|
+
ContractCreated
|
|
265
|
+
});
|
|
266
|
+
return (0, util_internal_validation_1.object)({
|
|
267
|
+
header: BlockHeader,
|
|
268
|
+
transactions: (0, util_internal_validation_1.option)((0, util_internal_validation_1.array)(Transaction)),
|
|
269
|
+
receipts: (0, util_internal_validation_1.option)((0, util_internal_validation_1.array)(Receipt)),
|
|
270
|
+
inputs: (0, util_internal_validation_1.option)((0, util_internal_validation_1.array)(Input)),
|
|
271
|
+
outputs: (0, util_internal_validation_1.option)((0, util_internal_validation_1.array)(Ouput)),
|
|
272
|
+
});
|
|
273
|
+
});
|
|
274
|
+
function project(fields, obj) {
|
|
275
|
+
if (fields == null)
|
|
276
|
+
return {};
|
|
277
|
+
let result = {};
|
|
278
|
+
let key;
|
|
279
|
+
for (key in obj) {
|
|
280
|
+
if (fields[key]) {
|
|
281
|
+
result[key] = obj[key];
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
return result;
|
|
285
|
+
}
|
|
286
|
+
function isEmpty(obj) {
|
|
287
|
+
for (let _ in obj) {
|
|
288
|
+
return false;
|
|
289
|
+
}
|
|
290
|
+
return true;
|
|
291
|
+
}
|
|
292
|
+
exports.isEmpty = isEmpty;
|
|
293
|
+
//# sourceMappingURL=data-schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"data-schema.js","sourceRoot":"","sources":["../../src/archive/data-schema.ts"],"names":[],"mappings":";;;AAAA,2DAAgD;AAChD,iFAY2C;AAK9B,QAAA,aAAa,GAAG,IAAA,wBAAQ,EAAC,CAAC,MAAsB,EAAE,EAAE;IAC7D,IAAI,WAAW,GAAG,IAAA,iCAAM,EAAC;QACrB,MAAM,EAAE,8BAAG;QACX,IAAI,EAAE,gCAAK;QACX,GAAG,OAAO,CAAC,MAAM,CAAC,KAAK,EAAE;YACrB,QAAQ,EAAE,kCAAO;YACjB,gBAAgB,EAAE,gCAAK;YACvB,iBAAiB,EAAE,kCAAO;YAC1B,kBAAkB,EAAE,gCAAK;YACzB,mBAAmB,EAAE,kCAAO;YAC5B,eAAe,EAAE,gCA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/fuel-normalization';
|
|
2
|
+
import { ArchiveClient } from '@subsquid/util-internal-archive-client';
|
|
3
|
+
import { RangeRequestList } from '@subsquid/util-internal-range';
|
|
4
|
+
import { DataRequest } from '../data/data-request';
|
|
5
|
+
import { PartialBlock } from '../data/data-partial';
|
|
6
|
+
export declare class FuelGateway {
|
|
7
|
+
private client;
|
|
8
|
+
constructor(client: ArchiveClient);
|
|
9
|
+
getFinalizedHeight(): Promise<number>;
|
|
10
|
+
getBlockHash(height: number): Promise<string | undefined>;
|
|
11
|
+
getBlockHeader(height: number): Promise<BlockHeader>;
|
|
12
|
+
getBlockStream(requests: RangeRequestList<DataRequest>, stopOnHead?: boolean | undefined): AsyncIterable<PartialBlock[]>;
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=source.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"source.d.ts","sourceRoot":"","sources":["../../src/archive/source.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,WAAW,EAAC,MAAM,8BAA8B,CAAA;AAExD,OAAO,EAAC,aAAa,EAAC,MAAM,wCAAwC,CAAA;AAEpE,OAAO,EAAoC,gBAAgB,EAAC,MAAM,+BAA+B,CAAA;AAGjG,OAAO,EAAC,WAAW,EAAC,MAAM,sBAAsB,CAAA;AAEhD,OAAO,EAAC,YAAY,EAAC,MAAM,sBAAsB,CAAA;AAGjD,qBAAa,WAAW;IACR,OAAO,CAAC,MAAM;gBAAN,MAAM,EAAE,aAAa;IAEzC,kBAAkB,IAAI,OAAO,CAAC,MAAM,CAAC;IAI/B,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC;IAUzD,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC;IA2BnD,cAAc,CAAC,QAAQ,EAAE,gBAAgB,CAAC,WAAW,CAAC,EAAE,UAAU,CAAC,EAAE,OAAO,GAAG,SAAS,GAAG,aAAa,CAAC,YAAY,EAAE,CAAC;CA+BlI"}
|