fangorn-sdk 2026.2.2-4.4 → 2026.2.26
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/README.md +1 -9
- package/lib/cli/cli.js +1 -0
- package/lib/cli/index.d.ts +154 -154
- package/lib/config.d.ts +154 -154
- package/lib/interface/datasource-registry/dataSourceRegistry.d.ts +2 -2
- package/lib/interface/settlement-tracker/settlementTracker.d.ts +2 -2
- package/lib/modules/gadgets/payment.d.ts +1 -0
- package/lib/modules/gadgets/payment.js +1 -3
- package/lib/test/testbed.d.ts +1 -1
- package/lib/test/testbed.js +3 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -62,18 +62,10 @@ const walletClient = createWalletClient({
|
|
|
62
62
|
transport: http(rpcUrl),
|
|
63
63
|
chain,
|
|
64
64
|
});
|
|
65
|
-
|
|
66
65
|
// For ArbSep, also supports BaseSepolia (wallet client must match)
|
|
67
66
|
const config: AppConfig = FangornConfig.ArbitrumSepolia;
|
|
68
|
-
|
|
69
|
-
// setup the Lit client (for encryption)
|
|
70
|
-
const litClient = await createLitClient({
|
|
71
|
-
network: nagaDev,
|
|
72
|
-
});
|
|
73
67
|
// and the encryption service
|
|
74
|
-
const encryptionService = new LitEncryptionService(
|
|
75
|
-
chainName: chain,
|
|
76
|
-
});
|
|
68
|
+
const encryptionService = new LitEncryptionService(chain);
|
|
77
69
|
|
|
78
70
|
// setup the storage client
|
|
79
71
|
const pinata = new PinataSDK({
|
package/lib/cli/cli.js
CHANGED
|
@@ -404,6 +404,7 @@ program.command("upload").description("Upload file(s) to a data source").argumen
|
|
|
404
404
|
params.commitment = fieldToHex(await computeTagCommitment(owner, name, file.tag, options.price));
|
|
405
405
|
params.chainName = options.chain;
|
|
406
406
|
params.settlementTrackerContractAddress = options.chain === "arbitrumSepolia" ? "0x7c6ae9eb3398234eb69b2f3acfae69065505ff69" : "0x708751829f5f5f584da4142b62cd5cc9235c8a18";
|
|
407
|
+
params.pinataJwt = loadConfig().jwt;
|
|
407
408
|
return def.build(params);
|
|
408
409
|
}
|
|
409
410
|
return selectGadget(owner, name, file.tag, options.price);
|
package/lib/cli/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "./cli.js";
|
|
2
|
-
import * as
|
|
3
|
-
import * as
|
|
2
|
+
import * as viem_chains9 from "viem/chains";
|
|
3
|
+
import * as viem143 from "viem";
|
|
4
4
|
|
|
5
5
|
//#region src/cli/index.d.ts
|
|
6
6
|
declare const getChain: (chainStr: string) => {
|
|
@@ -35,9 +35,9 @@ declare const getChain: (chainStr: string) => {
|
|
|
35
35
|
sourceId?: number | undefined | undefined;
|
|
36
36
|
testnet: true;
|
|
37
37
|
custom?: Record<string, unknown> | undefined;
|
|
38
|
-
fees?:
|
|
38
|
+
fees?: viem143.ChainFees<undefined> | undefined;
|
|
39
39
|
formatters?: undefined;
|
|
40
|
-
serializers?:
|
|
40
|
+
serializers?: viem143.ChainSerializers<undefined, viem143.TransactionSerializable> | undefined;
|
|
41
41
|
} | {
|
|
42
42
|
blockExplorers: {
|
|
43
43
|
readonly default: {
|
|
@@ -110,56 +110,56 @@ declare const getChain: (chainStr: string) => {
|
|
|
110
110
|
sourceId: 11155111;
|
|
111
111
|
testnet: true;
|
|
112
112
|
custom?: Record<string, unknown> | undefined;
|
|
113
|
-
fees?:
|
|
113
|
+
fees?: viem143.ChainFees<undefined> | undefined;
|
|
114
114
|
formatters: {
|
|
115
115
|
readonly block: {
|
|
116
116
|
exclude: [] | undefined;
|
|
117
|
-
format: (args:
|
|
117
|
+
format: (args: viem_chains9.OpStackRpcBlock, action?: string | undefined) => {
|
|
118
118
|
baseFeePerGas: bigint | null;
|
|
119
119
|
blobGasUsed: bigint;
|
|
120
120
|
difficulty: bigint;
|
|
121
121
|
excessBlobGas: bigint;
|
|
122
|
-
extraData:
|
|
122
|
+
extraData: viem143.Hex;
|
|
123
123
|
gasLimit: bigint;
|
|
124
124
|
gasUsed: bigint;
|
|
125
125
|
hash: `0x${string}` | null;
|
|
126
126
|
logsBloom: `0x${string}` | null;
|
|
127
|
-
miner:
|
|
128
|
-
mixHash:
|
|
127
|
+
miner: viem143.Address;
|
|
128
|
+
mixHash: viem143.Hash;
|
|
129
129
|
nonce: `0x${string}` | null;
|
|
130
130
|
number: bigint | null;
|
|
131
131
|
parentBeaconBlockRoot?: `0x${string}` | undefined;
|
|
132
|
-
parentHash:
|
|
133
|
-
receiptsRoot:
|
|
134
|
-
sealFields:
|
|
135
|
-
sha3Uncles:
|
|
132
|
+
parentHash: viem143.Hash;
|
|
133
|
+
receiptsRoot: viem143.Hex;
|
|
134
|
+
sealFields: viem143.Hex[];
|
|
135
|
+
sha3Uncles: viem143.Hash;
|
|
136
136
|
size: bigint;
|
|
137
|
-
stateRoot:
|
|
137
|
+
stateRoot: viem143.Hash;
|
|
138
138
|
timestamp: bigint;
|
|
139
139
|
totalDifficulty: bigint | null;
|
|
140
|
-
transactions: `0x${string}`[] |
|
|
141
|
-
transactionsRoot:
|
|
142
|
-
uncles:
|
|
143
|
-
withdrawals?:
|
|
140
|
+
transactions: `0x${string}`[] | viem_chains9.OpStackTransaction<boolean>[];
|
|
141
|
+
transactionsRoot: viem143.Hash;
|
|
142
|
+
uncles: viem143.Hash[];
|
|
143
|
+
withdrawals?: viem143.Withdrawal[] | undefined | undefined;
|
|
144
144
|
withdrawalsRoot?: `0x${string}` | undefined;
|
|
145
145
|
} & {};
|
|
146
146
|
type: "block";
|
|
147
147
|
};
|
|
148
148
|
readonly transaction: {
|
|
149
149
|
exclude: [] | undefined;
|
|
150
|
-
format: (args:
|
|
150
|
+
format: (args: viem_chains9.OpStackRpcTransaction, action?: string | undefined) => ({
|
|
151
151
|
blockHash: `0x${string}` | null;
|
|
152
152
|
blockNumber: bigint | null;
|
|
153
|
-
from:
|
|
153
|
+
from: viem143.Address;
|
|
154
154
|
gas: bigint;
|
|
155
|
-
hash:
|
|
156
|
-
input:
|
|
155
|
+
hash: viem143.Hash;
|
|
156
|
+
input: viem143.Hex;
|
|
157
157
|
nonce: number;
|
|
158
|
-
r:
|
|
159
|
-
s:
|
|
160
|
-
to:
|
|
158
|
+
r: viem143.Hex;
|
|
159
|
+
s: viem143.Hex;
|
|
160
|
+
to: viem143.Address | null;
|
|
161
161
|
transactionIndex: number | null;
|
|
162
|
-
typeHex:
|
|
162
|
+
typeHex: viem143.Hex | null;
|
|
163
163
|
v: bigint;
|
|
164
164
|
value: bigint;
|
|
165
165
|
yParity: number;
|
|
@@ -169,23 +169,23 @@ declare const getChain: (chainStr: string) => {
|
|
|
169
169
|
maxPriorityFeePerGas: bigint;
|
|
170
170
|
isSystemTx?: boolean;
|
|
171
171
|
mint?: bigint | undefined | undefined;
|
|
172
|
-
sourceHash:
|
|
172
|
+
sourceHash: viem143.Hex;
|
|
173
173
|
type: "deposit";
|
|
174
174
|
} | {
|
|
175
|
-
r:
|
|
176
|
-
s:
|
|
175
|
+
r: viem143.Hex;
|
|
176
|
+
s: viem143.Hex;
|
|
177
177
|
v: bigint;
|
|
178
178
|
value: bigint;
|
|
179
179
|
gas: bigint;
|
|
180
|
-
to:
|
|
181
|
-
from:
|
|
180
|
+
to: viem143.Address | null;
|
|
181
|
+
from: viem143.Address;
|
|
182
182
|
nonce: number;
|
|
183
183
|
blockHash: `0x${string}` | null;
|
|
184
184
|
blockNumber: bigint | null;
|
|
185
185
|
transactionIndex: number | null;
|
|
186
|
-
hash:
|
|
187
|
-
input:
|
|
188
|
-
typeHex:
|
|
186
|
+
hash: viem143.Hash;
|
|
187
|
+
input: viem143.Hex;
|
|
188
|
+
typeHex: viem143.Hex | null;
|
|
189
189
|
accessList?: undefined | undefined;
|
|
190
190
|
authorizationList?: undefined | undefined;
|
|
191
191
|
blobVersionedHashes?: undefined | undefined;
|
|
@@ -202,20 +202,20 @@ declare const getChain: (chainStr: string) => {
|
|
|
202
202
|
} | {
|
|
203
203
|
blockHash: `0x${string}` | null;
|
|
204
204
|
blockNumber: bigint | null;
|
|
205
|
-
from:
|
|
205
|
+
from: viem143.Address;
|
|
206
206
|
gas: bigint;
|
|
207
|
-
hash:
|
|
208
|
-
input:
|
|
207
|
+
hash: viem143.Hash;
|
|
208
|
+
input: viem143.Hex;
|
|
209
209
|
nonce: number;
|
|
210
|
-
r:
|
|
211
|
-
s:
|
|
212
|
-
to:
|
|
210
|
+
r: viem143.Hex;
|
|
211
|
+
s: viem143.Hex;
|
|
212
|
+
to: viem143.Address | null;
|
|
213
213
|
transactionIndex: number | null;
|
|
214
|
-
typeHex:
|
|
214
|
+
typeHex: viem143.Hex | null;
|
|
215
215
|
v: bigint;
|
|
216
216
|
value: bigint;
|
|
217
217
|
yParity: number;
|
|
218
|
-
accessList:
|
|
218
|
+
accessList: viem143.AccessList;
|
|
219
219
|
authorizationList?: undefined | undefined;
|
|
220
220
|
blobVersionedHashes?: undefined | undefined;
|
|
221
221
|
chainId: number;
|
|
@@ -230,20 +230,20 @@ declare const getChain: (chainStr: string) => {
|
|
|
230
230
|
} | {
|
|
231
231
|
blockHash: `0x${string}` | null;
|
|
232
232
|
blockNumber: bigint | null;
|
|
233
|
-
from:
|
|
233
|
+
from: viem143.Address;
|
|
234
234
|
gas: bigint;
|
|
235
|
-
hash:
|
|
236
|
-
input:
|
|
235
|
+
hash: viem143.Hash;
|
|
236
|
+
input: viem143.Hex;
|
|
237
237
|
nonce: number;
|
|
238
|
-
r:
|
|
239
|
-
s:
|
|
240
|
-
to:
|
|
238
|
+
r: viem143.Hex;
|
|
239
|
+
s: viem143.Hex;
|
|
240
|
+
to: viem143.Address | null;
|
|
241
241
|
transactionIndex: number | null;
|
|
242
|
-
typeHex:
|
|
242
|
+
typeHex: viem143.Hex | null;
|
|
243
243
|
v: bigint;
|
|
244
244
|
value: bigint;
|
|
245
245
|
yParity: number;
|
|
246
|
-
accessList:
|
|
246
|
+
accessList: viem143.AccessList;
|
|
247
247
|
authorizationList?: undefined | undefined;
|
|
248
248
|
blobVersionedHashes?: undefined | undefined;
|
|
249
249
|
chainId: number;
|
|
@@ -258,22 +258,22 @@ declare const getChain: (chainStr: string) => {
|
|
|
258
258
|
} | {
|
|
259
259
|
blockHash: `0x${string}` | null;
|
|
260
260
|
blockNumber: bigint | null;
|
|
261
|
-
from:
|
|
261
|
+
from: viem143.Address;
|
|
262
262
|
gas: bigint;
|
|
263
|
-
hash:
|
|
264
|
-
input:
|
|
263
|
+
hash: viem143.Hash;
|
|
264
|
+
input: viem143.Hex;
|
|
265
265
|
nonce: number;
|
|
266
|
-
r:
|
|
267
|
-
s:
|
|
268
|
-
to:
|
|
266
|
+
r: viem143.Hex;
|
|
267
|
+
s: viem143.Hex;
|
|
268
|
+
to: viem143.Address | null;
|
|
269
269
|
transactionIndex: number | null;
|
|
270
|
-
typeHex:
|
|
270
|
+
typeHex: viem143.Hex | null;
|
|
271
271
|
v: bigint;
|
|
272
272
|
value: bigint;
|
|
273
273
|
yParity: number;
|
|
274
|
-
accessList:
|
|
274
|
+
accessList: viem143.AccessList;
|
|
275
275
|
authorizationList?: undefined | undefined;
|
|
276
|
-
blobVersionedHashes: readonly
|
|
276
|
+
blobVersionedHashes: readonly viem143.Hex[];
|
|
277
277
|
chainId: number;
|
|
278
278
|
type: "eip4844";
|
|
279
279
|
gasPrice?: undefined | undefined;
|
|
@@ -286,21 +286,21 @@ declare const getChain: (chainStr: string) => {
|
|
|
286
286
|
} | {
|
|
287
287
|
blockHash: `0x${string}` | null;
|
|
288
288
|
blockNumber: bigint | null;
|
|
289
|
-
from:
|
|
289
|
+
from: viem143.Address;
|
|
290
290
|
gas: bigint;
|
|
291
|
-
hash:
|
|
292
|
-
input:
|
|
291
|
+
hash: viem143.Hash;
|
|
292
|
+
input: viem143.Hex;
|
|
293
293
|
nonce: number;
|
|
294
|
-
r:
|
|
295
|
-
s:
|
|
296
|
-
to:
|
|
294
|
+
r: viem143.Hex;
|
|
295
|
+
s: viem143.Hex;
|
|
296
|
+
to: viem143.Address | null;
|
|
297
297
|
transactionIndex: number | null;
|
|
298
|
-
typeHex:
|
|
298
|
+
typeHex: viem143.Hex | null;
|
|
299
299
|
v: bigint;
|
|
300
300
|
value: bigint;
|
|
301
301
|
yParity: number;
|
|
302
|
-
accessList:
|
|
303
|
-
authorizationList:
|
|
302
|
+
accessList: viem143.AccessList;
|
|
303
|
+
authorizationList: viem143.SignedAuthorizationList;
|
|
304
304
|
blobVersionedHashes?: undefined | undefined;
|
|
305
305
|
chainId: number;
|
|
306
306
|
type: "eip7702";
|
|
@@ -316,24 +316,24 @@ declare const getChain: (chainStr: string) => {
|
|
|
316
316
|
};
|
|
317
317
|
readonly transactionReceipt: {
|
|
318
318
|
exclude: [] | undefined;
|
|
319
|
-
format: (args:
|
|
319
|
+
format: (args: viem_chains9.OpStackRpcTransactionReceipt, action?: string | undefined) => {
|
|
320
320
|
blobGasPrice?: bigint | undefined;
|
|
321
321
|
blobGasUsed?: bigint | undefined;
|
|
322
|
-
blockHash:
|
|
322
|
+
blockHash: viem143.Hash;
|
|
323
323
|
blockNumber: bigint;
|
|
324
|
-
contractAddress:
|
|
324
|
+
contractAddress: viem143.Address | null | undefined;
|
|
325
325
|
cumulativeGasUsed: bigint;
|
|
326
326
|
effectiveGasPrice: bigint;
|
|
327
|
-
from:
|
|
327
|
+
from: viem143.Address;
|
|
328
328
|
gasUsed: bigint;
|
|
329
|
-
logs:
|
|
330
|
-
logsBloom:
|
|
329
|
+
logs: viem143.Log<bigint, number, false>[];
|
|
330
|
+
logsBloom: viem143.Hex;
|
|
331
331
|
root?: `0x${string}` | undefined;
|
|
332
332
|
status: "success" | "reverted";
|
|
333
|
-
to:
|
|
334
|
-
transactionHash:
|
|
333
|
+
to: viem143.Address | null;
|
|
334
|
+
transactionHash: viem143.Hash;
|
|
335
335
|
transactionIndex: number;
|
|
336
|
-
type:
|
|
336
|
+
type: viem143.TransactionType;
|
|
337
337
|
l1GasPrice: bigint | null;
|
|
338
338
|
l1GasUsed: bigint | null;
|
|
339
339
|
l1Fee: bigint | null;
|
|
@@ -343,7 +343,7 @@ declare const getChain: (chainStr: string) => {
|
|
|
343
343
|
};
|
|
344
344
|
};
|
|
345
345
|
serializers: {
|
|
346
|
-
readonly transaction: typeof
|
|
346
|
+
readonly transaction: typeof viem_chains9.serializeTransactionOpStack;
|
|
347
347
|
};
|
|
348
348
|
readonly network: "base-sepolia";
|
|
349
349
|
};
|
|
@@ -380,9 +380,9 @@ declare const selectChain: () => Promise<{
|
|
|
380
380
|
sourceId?: number | undefined | undefined;
|
|
381
381
|
testnet: true;
|
|
382
382
|
custom?: Record<string, unknown> | undefined;
|
|
383
|
-
fees?:
|
|
383
|
+
fees?: viem143.ChainFees<undefined> | undefined;
|
|
384
384
|
formatters?: undefined;
|
|
385
|
-
serializers?:
|
|
385
|
+
serializers?: viem143.ChainSerializers<undefined, viem143.TransactionSerializable> | undefined;
|
|
386
386
|
} | {
|
|
387
387
|
blockExplorers: {
|
|
388
388
|
readonly default: {
|
|
@@ -455,56 +455,56 @@ declare const selectChain: () => Promise<{
|
|
|
455
455
|
sourceId: 11155111;
|
|
456
456
|
testnet: true;
|
|
457
457
|
custom?: Record<string, unknown> | undefined;
|
|
458
|
-
fees?:
|
|
458
|
+
fees?: viem143.ChainFees<undefined> | undefined;
|
|
459
459
|
formatters: {
|
|
460
460
|
readonly block: {
|
|
461
461
|
exclude: [] | undefined;
|
|
462
|
-
format: (args:
|
|
462
|
+
format: (args: viem_chains9.OpStackRpcBlock, action?: string | undefined) => {
|
|
463
463
|
baseFeePerGas: bigint | null;
|
|
464
464
|
blobGasUsed: bigint;
|
|
465
465
|
difficulty: bigint;
|
|
466
466
|
excessBlobGas: bigint;
|
|
467
|
-
extraData:
|
|
467
|
+
extraData: viem143.Hex;
|
|
468
468
|
gasLimit: bigint;
|
|
469
469
|
gasUsed: bigint;
|
|
470
470
|
hash: `0x${string}` | null;
|
|
471
471
|
logsBloom: `0x${string}` | null;
|
|
472
|
-
miner:
|
|
473
|
-
mixHash:
|
|
472
|
+
miner: viem143.Address;
|
|
473
|
+
mixHash: viem143.Hash;
|
|
474
474
|
nonce: `0x${string}` | null;
|
|
475
475
|
number: bigint | null;
|
|
476
476
|
parentBeaconBlockRoot?: `0x${string}` | undefined;
|
|
477
|
-
parentHash:
|
|
478
|
-
receiptsRoot:
|
|
479
|
-
sealFields:
|
|
480
|
-
sha3Uncles:
|
|
477
|
+
parentHash: viem143.Hash;
|
|
478
|
+
receiptsRoot: viem143.Hex;
|
|
479
|
+
sealFields: viem143.Hex[];
|
|
480
|
+
sha3Uncles: viem143.Hash;
|
|
481
481
|
size: bigint;
|
|
482
|
-
stateRoot:
|
|
482
|
+
stateRoot: viem143.Hash;
|
|
483
483
|
timestamp: bigint;
|
|
484
484
|
totalDifficulty: bigint | null;
|
|
485
|
-
transactions: `0x${string}`[] |
|
|
486
|
-
transactionsRoot:
|
|
487
|
-
uncles:
|
|
488
|
-
withdrawals?:
|
|
485
|
+
transactions: `0x${string}`[] | viem_chains9.OpStackTransaction<boolean>[];
|
|
486
|
+
transactionsRoot: viem143.Hash;
|
|
487
|
+
uncles: viem143.Hash[];
|
|
488
|
+
withdrawals?: viem143.Withdrawal[] | undefined | undefined;
|
|
489
489
|
withdrawalsRoot?: `0x${string}` | undefined;
|
|
490
490
|
} & {};
|
|
491
491
|
type: "block";
|
|
492
492
|
};
|
|
493
493
|
readonly transaction: {
|
|
494
494
|
exclude: [] | undefined;
|
|
495
|
-
format: (args:
|
|
495
|
+
format: (args: viem_chains9.OpStackRpcTransaction, action?: string | undefined) => ({
|
|
496
496
|
blockHash: `0x${string}` | null;
|
|
497
497
|
blockNumber: bigint | null;
|
|
498
|
-
from:
|
|
498
|
+
from: viem143.Address;
|
|
499
499
|
gas: bigint;
|
|
500
|
-
hash:
|
|
501
|
-
input:
|
|
500
|
+
hash: viem143.Hash;
|
|
501
|
+
input: viem143.Hex;
|
|
502
502
|
nonce: number;
|
|
503
|
-
r:
|
|
504
|
-
s:
|
|
505
|
-
to:
|
|
503
|
+
r: viem143.Hex;
|
|
504
|
+
s: viem143.Hex;
|
|
505
|
+
to: viem143.Address | null;
|
|
506
506
|
transactionIndex: number | null;
|
|
507
|
-
typeHex:
|
|
507
|
+
typeHex: viem143.Hex | null;
|
|
508
508
|
v: bigint;
|
|
509
509
|
value: bigint;
|
|
510
510
|
yParity: number;
|
|
@@ -514,23 +514,23 @@ declare const selectChain: () => Promise<{
|
|
|
514
514
|
maxPriorityFeePerGas: bigint;
|
|
515
515
|
isSystemTx?: boolean;
|
|
516
516
|
mint?: bigint | undefined | undefined;
|
|
517
|
-
sourceHash:
|
|
517
|
+
sourceHash: viem143.Hex;
|
|
518
518
|
type: "deposit";
|
|
519
519
|
} | {
|
|
520
|
-
r:
|
|
521
|
-
s:
|
|
520
|
+
r: viem143.Hex;
|
|
521
|
+
s: viem143.Hex;
|
|
522
522
|
v: bigint;
|
|
523
523
|
value: bigint;
|
|
524
524
|
gas: bigint;
|
|
525
|
-
to:
|
|
526
|
-
from:
|
|
525
|
+
to: viem143.Address | null;
|
|
526
|
+
from: viem143.Address;
|
|
527
527
|
nonce: number;
|
|
528
528
|
blockHash: `0x${string}` | null;
|
|
529
529
|
blockNumber: bigint | null;
|
|
530
530
|
transactionIndex: number | null;
|
|
531
|
-
hash:
|
|
532
|
-
input:
|
|
533
|
-
typeHex:
|
|
531
|
+
hash: viem143.Hash;
|
|
532
|
+
input: viem143.Hex;
|
|
533
|
+
typeHex: viem143.Hex | null;
|
|
534
534
|
accessList?: undefined | undefined;
|
|
535
535
|
authorizationList?: undefined | undefined;
|
|
536
536
|
blobVersionedHashes?: undefined | undefined;
|
|
@@ -547,20 +547,20 @@ declare const selectChain: () => Promise<{
|
|
|
547
547
|
} | {
|
|
548
548
|
blockHash: `0x${string}` | null;
|
|
549
549
|
blockNumber: bigint | null;
|
|
550
|
-
from:
|
|
550
|
+
from: viem143.Address;
|
|
551
551
|
gas: bigint;
|
|
552
|
-
hash:
|
|
553
|
-
input:
|
|
552
|
+
hash: viem143.Hash;
|
|
553
|
+
input: viem143.Hex;
|
|
554
554
|
nonce: number;
|
|
555
|
-
r:
|
|
556
|
-
s:
|
|
557
|
-
to:
|
|
555
|
+
r: viem143.Hex;
|
|
556
|
+
s: viem143.Hex;
|
|
557
|
+
to: viem143.Address | null;
|
|
558
558
|
transactionIndex: number | null;
|
|
559
|
-
typeHex:
|
|
559
|
+
typeHex: viem143.Hex | null;
|
|
560
560
|
v: bigint;
|
|
561
561
|
value: bigint;
|
|
562
562
|
yParity: number;
|
|
563
|
-
accessList:
|
|
563
|
+
accessList: viem143.AccessList;
|
|
564
564
|
authorizationList?: undefined | undefined;
|
|
565
565
|
blobVersionedHashes?: undefined | undefined;
|
|
566
566
|
chainId: number;
|
|
@@ -575,20 +575,20 @@ declare const selectChain: () => Promise<{
|
|
|
575
575
|
} | {
|
|
576
576
|
blockHash: `0x${string}` | null;
|
|
577
577
|
blockNumber: bigint | null;
|
|
578
|
-
from:
|
|
578
|
+
from: viem143.Address;
|
|
579
579
|
gas: bigint;
|
|
580
|
-
hash:
|
|
581
|
-
input:
|
|
580
|
+
hash: viem143.Hash;
|
|
581
|
+
input: viem143.Hex;
|
|
582
582
|
nonce: number;
|
|
583
|
-
r:
|
|
584
|
-
s:
|
|
585
|
-
to:
|
|
583
|
+
r: viem143.Hex;
|
|
584
|
+
s: viem143.Hex;
|
|
585
|
+
to: viem143.Address | null;
|
|
586
586
|
transactionIndex: number | null;
|
|
587
|
-
typeHex:
|
|
587
|
+
typeHex: viem143.Hex | null;
|
|
588
588
|
v: bigint;
|
|
589
589
|
value: bigint;
|
|
590
590
|
yParity: number;
|
|
591
|
-
accessList:
|
|
591
|
+
accessList: viem143.AccessList;
|
|
592
592
|
authorizationList?: undefined | undefined;
|
|
593
593
|
blobVersionedHashes?: undefined | undefined;
|
|
594
594
|
chainId: number;
|
|
@@ -603,22 +603,22 @@ declare const selectChain: () => Promise<{
|
|
|
603
603
|
} | {
|
|
604
604
|
blockHash: `0x${string}` | null;
|
|
605
605
|
blockNumber: bigint | null;
|
|
606
|
-
from:
|
|
606
|
+
from: viem143.Address;
|
|
607
607
|
gas: bigint;
|
|
608
|
-
hash:
|
|
609
|
-
input:
|
|
608
|
+
hash: viem143.Hash;
|
|
609
|
+
input: viem143.Hex;
|
|
610
610
|
nonce: number;
|
|
611
|
-
r:
|
|
612
|
-
s:
|
|
613
|
-
to:
|
|
611
|
+
r: viem143.Hex;
|
|
612
|
+
s: viem143.Hex;
|
|
613
|
+
to: viem143.Address | null;
|
|
614
614
|
transactionIndex: number | null;
|
|
615
|
-
typeHex:
|
|
615
|
+
typeHex: viem143.Hex | null;
|
|
616
616
|
v: bigint;
|
|
617
617
|
value: bigint;
|
|
618
618
|
yParity: number;
|
|
619
|
-
accessList:
|
|
619
|
+
accessList: viem143.AccessList;
|
|
620
620
|
authorizationList?: undefined | undefined;
|
|
621
|
-
blobVersionedHashes: readonly
|
|
621
|
+
blobVersionedHashes: readonly viem143.Hex[];
|
|
622
622
|
chainId: number;
|
|
623
623
|
type: "eip4844";
|
|
624
624
|
gasPrice?: undefined | undefined;
|
|
@@ -631,21 +631,21 @@ declare const selectChain: () => Promise<{
|
|
|
631
631
|
} | {
|
|
632
632
|
blockHash: `0x${string}` | null;
|
|
633
633
|
blockNumber: bigint | null;
|
|
634
|
-
from:
|
|
634
|
+
from: viem143.Address;
|
|
635
635
|
gas: bigint;
|
|
636
|
-
hash:
|
|
637
|
-
input:
|
|
636
|
+
hash: viem143.Hash;
|
|
637
|
+
input: viem143.Hex;
|
|
638
638
|
nonce: number;
|
|
639
|
-
r:
|
|
640
|
-
s:
|
|
641
|
-
to:
|
|
639
|
+
r: viem143.Hex;
|
|
640
|
+
s: viem143.Hex;
|
|
641
|
+
to: viem143.Address | null;
|
|
642
642
|
transactionIndex: number | null;
|
|
643
|
-
typeHex:
|
|
643
|
+
typeHex: viem143.Hex | null;
|
|
644
644
|
v: bigint;
|
|
645
645
|
value: bigint;
|
|
646
646
|
yParity: number;
|
|
647
|
-
accessList:
|
|
648
|
-
authorizationList:
|
|
647
|
+
accessList: viem143.AccessList;
|
|
648
|
+
authorizationList: viem143.SignedAuthorizationList;
|
|
649
649
|
blobVersionedHashes?: undefined | undefined;
|
|
650
650
|
chainId: number;
|
|
651
651
|
type: "eip7702";
|
|
@@ -661,24 +661,24 @@ declare const selectChain: () => Promise<{
|
|
|
661
661
|
};
|
|
662
662
|
readonly transactionReceipt: {
|
|
663
663
|
exclude: [] | undefined;
|
|
664
|
-
format: (args:
|
|
664
|
+
format: (args: viem_chains9.OpStackRpcTransactionReceipt, action?: string | undefined) => {
|
|
665
665
|
blobGasPrice?: bigint | undefined;
|
|
666
666
|
blobGasUsed?: bigint | undefined;
|
|
667
|
-
blockHash:
|
|
667
|
+
blockHash: viem143.Hash;
|
|
668
668
|
blockNumber: bigint;
|
|
669
|
-
contractAddress:
|
|
669
|
+
contractAddress: viem143.Address | null | undefined;
|
|
670
670
|
cumulativeGasUsed: bigint;
|
|
671
671
|
effectiveGasPrice: bigint;
|
|
672
|
-
from:
|
|
672
|
+
from: viem143.Address;
|
|
673
673
|
gasUsed: bigint;
|
|
674
|
-
logs:
|
|
675
|
-
logsBloom:
|
|
674
|
+
logs: viem143.Log<bigint, number, false>[];
|
|
675
|
+
logsBloom: viem143.Hex;
|
|
676
676
|
root?: `0x${string}` | undefined;
|
|
677
677
|
status: "success" | "reverted";
|
|
678
|
-
to:
|
|
679
|
-
transactionHash:
|
|
678
|
+
to: viem143.Address | null;
|
|
679
|
+
transactionHash: viem143.Hash;
|
|
680
680
|
transactionIndex: number;
|
|
681
|
-
type:
|
|
681
|
+
type: viem143.TransactionType;
|
|
682
682
|
l1GasPrice: bigint | null;
|
|
683
683
|
l1GasUsed: bigint | null;
|
|
684
684
|
l1Fee: bigint | null;
|
|
@@ -688,7 +688,7 @@ declare const selectChain: () => Promise<{
|
|
|
688
688
|
};
|
|
689
689
|
};
|
|
690
690
|
serializers: {
|
|
691
|
-
readonly transaction: typeof
|
|
691
|
+
readonly transaction: typeof viem_chains9.serializeTransactionOpStack;
|
|
692
692
|
};
|
|
693
693
|
readonly network: "base-sepolia";
|
|
694
694
|
}>;
|
package/lib/config.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import * as
|
|
1
|
+
import * as viem_chains0 from "viem/chains";
|
|
2
|
+
import * as viem0 from "viem";
|
|
3
3
|
import { Chain, Hex } from "viem";
|
|
4
4
|
|
|
5
5
|
//#region src/config.d.ts
|
|
@@ -41,9 +41,9 @@ declare const SupportedNetworks: {
|
|
|
41
41
|
sourceId?: number | undefined | undefined;
|
|
42
42
|
testnet: true;
|
|
43
43
|
custom?: Record<string, unknown> | undefined;
|
|
44
|
-
fees?:
|
|
44
|
+
fees?: viem0.ChainFees<undefined> | undefined;
|
|
45
45
|
formatters?: undefined;
|
|
46
|
-
serializers?:
|
|
46
|
+
serializers?: viem0.ChainSerializers<undefined, viem0.TransactionSerializable> | undefined;
|
|
47
47
|
};
|
|
48
48
|
};
|
|
49
49
|
BaseSepolia: {
|
|
@@ -120,56 +120,56 @@ declare const SupportedNetworks: {
|
|
|
120
120
|
sourceId: 11155111;
|
|
121
121
|
testnet: true;
|
|
122
122
|
custom?: Record<string, unknown> | undefined;
|
|
123
|
-
fees?:
|
|
123
|
+
fees?: viem0.ChainFees<undefined> | undefined;
|
|
124
124
|
formatters: {
|
|
125
125
|
readonly block: {
|
|
126
126
|
exclude: [] | undefined;
|
|
127
|
-
format: (args:
|
|
127
|
+
format: (args: viem_chains0.OpStackRpcBlock, action?: string | undefined) => {
|
|
128
128
|
baseFeePerGas: bigint | null;
|
|
129
129
|
blobGasUsed: bigint;
|
|
130
130
|
difficulty: bigint;
|
|
131
131
|
excessBlobGas: bigint;
|
|
132
|
-
extraData:
|
|
132
|
+
extraData: viem0.Hex;
|
|
133
133
|
gasLimit: bigint;
|
|
134
134
|
gasUsed: bigint;
|
|
135
135
|
hash: `0x${string}` | null;
|
|
136
136
|
logsBloom: `0x${string}` | null;
|
|
137
|
-
miner:
|
|
138
|
-
mixHash:
|
|
137
|
+
miner: viem0.Address;
|
|
138
|
+
mixHash: viem0.Hash;
|
|
139
139
|
nonce: `0x${string}` | null;
|
|
140
140
|
number: bigint | null;
|
|
141
141
|
parentBeaconBlockRoot?: `0x${string}` | undefined;
|
|
142
|
-
parentHash:
|
|
143
|
-
receiptsRoot:
|
|
144
|
-
sealFields:
|
|
145
|
-
sha3Uncles:
|
|
142
|
+
parentHash: viem0.Hash;
|
|
143
|
+
receiptsRoot: viem0.Hex;
|
|
144
|
+
sealFields: viem0.Hex[];
|
|
145
|
+
sha3Uncles: viem0.Hash;
|
|
146
146
|
size: bigint;
|
|
147
|
-
stateRoot:
|
|
147
|
+
stateRoot: viem0.Hash;
|
|
148
148
|
timestamp: bigint;
|
|
149
149
|
totalDifficulty: bigint | null;
|
|
150
|
-
transactions: `0x${string}`[] |
|
|
151
|
-
transactionsRoot:
|
|
152
|
-
uncles:
|
|
153
|
-
withdrawals?:
|
|
150
|
+
transactions: `0x${string}`[] | viem_chains0.OpStackTransaction<boolean>[];
|
|
151
|
+
transactionsRoot: viem0.Hash;
|
|
152
|
+
uncles: viem0.Hash[];
|
|
153
|
+
withdrawals?: viem0.Withdrawal[] | undefined | undefined;
|
|
154
154
|
withdrawalsRoot?: `0x${string}` | undefined;
|
|
155
155
|
} & {};
|
|
156
156
|
type: "block";
|
|
157
157
|
};
|
|
158
158
|
readonly transaction: {
|
|
159
159
|
exclude: [] | undefined;
|
|
160
|
-
format: (args:
|
|
160
|
+
format: (args: viem_chains0.OpStackRpcTransaction, action?: string | undefined) => ({
|
|
161
161
|
blockHash: `0x${string}` | null;
|
|
162
162
|
blockNumber: bigint | null;
|
|
163
|
-
from:
|
|
163
|
+
from: viem0.Address;
|
|
164
164
|
gas: bigint;
|
|
165
|
-
hash:
|
|
166
|
-
input:
|
|
165
|
+
hash: viem0.Hash;
|
|
166
|
+
input: viem0.Hex;
|
|
167
167
|
nonce: number;
|
|
168
|
-
r:
|
|
169
|
-
s:
|
|
170
|
-
to:
|
|
168
|
+
r: viem0.Hex;
|
|
169
|
+
s: viem0.Hex;
|
|
170
|
+
to: viem0.Address | null;
|
|
171
171
|
transactionIndex: number | null;
|
|
172
|
-
typeHex:
|
|
172
|
+
typeHex: viem0.Hex | null;
|
|
173
173
|
v: bigint;
|
|
174
174
|
value: bigint;
|
|
175
175
|
yParity: number;
|
|
@@ -179,23 +179,23 @@ declare const SupportedNetworks: {
|
|
|
179
179
|
maxPriorityFeePerGas: bigint;
|
|
180
180
|
isSystemTx?: boolean;
|
|
181
181
|
mint?: bigint | undefined | undefined;
|
|
182
|
-
sourceHash:
|
|
182
|
+
sourceHash: viem0.Hex;
|
|
183
183
|
type: "deposit";
|
|
184
184
|
} | {
|
|
185
|
-
r:
|
|
186
|
-
s:
|
|
185
|
+
r: viem0.Hex;
|
|
186
|
+
s: viem0.Hex;
|
|
187
187
|
v: bigint;
|
|
188
188
|
value: bigint;
|
|
189
189
|
gas: bigint;
|
|
190
|
-
to:
|
|
191
|
-
from:
|
|
190
|
+
to: viem0.Address | null;
|
|
191
|
+
from: viem0.Address;
|
|
192
192
|
nonce: number;
|
|
193
193
|
blockHash: `0x${string}` | null;
|
|
194
194
|
blockNumber: bigint | null;
|
|
195
195
|
transactionIndex: number | null;
|
|
196
|
-
hash:
|
|
197
|
-
input:
|
|
198
|
-
typeHex:
|
|
196
|
+
hash: viem0.Hash;
|
|
197
|
+
input: viem0.Hex;
|
|
198
|
+
typeHex: viem0.Hex | null;
|
|
199
199
|
accessList?: undefined | undefined;
|
|
200
200
|
authorizationList?: undefined | undefined;
|
|
201
201
|
blobVersionedHashes?: undefined | undefined;
|
|
@@ -212,20 +212,20 @@ declare const SupportedNetworks: {
|
|
|
212
212
|
} | {
|
|
213
213
|
blockHash: `0x${string}` | null;
|
|
214
214
|
blockNumber: bigint | null;
|
|
215
|
-
from:
|
|
215
|
+
from: viem0.Address;
|
|
216
216
|
gas: bigint;
|
|
217
|
-
hash:
|
|
218
|
-
input:
|
|
217
|
+
hash: viem0.Hash;
|
|
218
|
+
input: viem0.Hex;
|
|
219
219
|
nonce: number;
|
|
220
|
-
r:
|
|
221
|
-
s:
|
|
222
|
-
to:
|
|
220
|
+
r: viem0.Hex;
|
|
221
|
+
s: viem0.Hex;
|
|
222
|
+
to: viem0.Address | null;
|
|
223
223
|
transactionIndex: number | null;
|
|
224
|
-
typeHex:
|
|
224
|
+
typeHex: viem0.Hex | null;
|
|
225
225
|
v: bigint;
|
|
226
226
|
value: bigint;
|
|
227
227
|
yParity: number;
|
|
228
|
-
accessList:
|
|
228
|
+
accessList: viem0.AccessList;
|
|
229
229
|
authorizationList?: undefined | undefined;
|
|
230
230
|
blobVersionedHashes?: undefined | undefined;
|
|
231
231
|
chainId: number;
|
|
@@ -240,20 +240,20 @@ declare const SupportedNetworks: {
|
|
|
240
240
|
} | {
|
|
241
241
|
blockHash: `0x${string}` | null;
|
|
242
242
|
blockNumber: bigint | null;
|
|
243
|
-
from:
|
|
243
|
+
from: viem0.Address;
|
|
244
244
|
gas: bigint;
|
|
245
|
-
hash:
|
|
246
|
-
input:
|
|
245
|
+
hash: viem0.Hash;
|
|
246
|
+
input: viem0.Hex;
|
|
247
247
|
nonce: number;
|
|
248
|
-
r:
|
|
249
|
-
s:
|
|
250
|
-
to:
|
|
248
|
+
r: viem0.Hex;
|
|
249
|
+
s: viem0.Hex;
|
|
250
|
+
to: viem0.Address | null;
|
|
251
251
|
transactionIndex: number | null;
|
|
252
|
-
typeHex:
|
|
252
|
+
typeHex: viem0.Hex | null;
|
|
253
253
|
v: bigint;
|
|
254
254
|
value: bigint;
|
|
255
255
|
yParity: number;
|
|
256
|
-
accessList:
|
|
256
|
+
accessList: viem0.AccessList;
|
|
257
257
|
authorizationList?: undefined | undefined;
|
|
258
258
|
blobVersionedHashes?: undefined | undefined;
|
|
259
259
|
chainId: number;
|
|
@@ -268,22 +268,22 @@ declare const SupportedNetworks: {
|
|
|
268
268
|
} | {
|
|
269
269
|
blockHash: `0x${string}` | null;
|
|
270
270
|
blockNumber: bigint | null;
|
|
271
|
-
from:
|
|
271
|
+
from: viem0.Address;
|
|
272
272
|
gas: bigint;
|
|
273
|
-
hash:
|
|
274
|
-
input:
|
|
273
|
+
hash: viem0.Hash;
|
|
274
|
+
input: viem0.Hex;
|
|
275
275
|
nonce: number;
|
|
276
|
-
r:
|
|
277
|
-
s:
|
|
278
|
-
to:
|
|
276
|
+
r: viem0.Hex;
|
|
277
|
+
s: viem0.Hex;
|
|
278
|
+
to: viem0.Address | null;
|
|
279
279
|
transactionIndex: number | null;
|
|
280
|
-
typeHex:
|
|
280
|
+
typeHex: viem0.Hex | null;
|
|
281
281
|
v: bigint;
|
|
282
282
|
value: bigint;
|
|
283
283
|
yParity: number;
|
|
284
|
-
accessList:
|
|
284
|
+
accessList: viem0.AccessList;
|
|
285
285
|
authorizationList?: undefined | undefined;
|
|
286
|
-
blobVersionedHashes: readonly
|
|
286
|
+
blobVersionedHashes: readonly viem0.Hex[];
|
|
287
287
|
chainId: number;
|
|
288
288
|
type: "eip4844";
|
|
289
289
|
gasPrice?: undefined | undefined;
|
|
@@ -296,21 +296,21 @@ declare const SupportedNetworks: {
|
|
|
296
296
|
} | {
|
|
297
297
|
blockHash: `0x${string}` | null;
|
|
298
298
|
blockNumber: bigint | null;
|
|
299
|
-
from:
|
|
299
|
+
from: viem0.Address;
|
|
300
300
|
gas: bigint;
|
|
301
|
-
hash:
|
|
302
|
-
input:
|
|
301
|
+
hash: viem0.Hash;
|
|
302
|
+
input: viem0.Hex;
|
|
303
303
|
nonce: number;
|
|
304
|
-
r:
|
|
305
|
-
s:
|
|
306
|
-
to:
|
|
304
|
+
r: viem0.Hex;
|
|
305
|
+
s: viem0.Hex;
|
|
306
|
+
to: viem0.Address | null;
|
|
307
307
|
transactionIndex: number | null;
|
|
308
|
-
typeHex:
|
|
308
|
+
typeHex: viem0.Hex | null;
|
|
309
309
|
v: bigint;
|
|
310
310
|
value: bigint;
|
|
311
311
|
yParity: number;
|
|
312
|
-
accessList:
|
|
313
|
-
authorizationList:
|
|
312
|
+
accessList: viem0.AccessList;
|
|
313
|
+
authorizationList: viem0.SignedAuthorizationList;
|
|
314
314
|
blobVersionedHashes?: undefined | undefined;
|
|
315
315
|
chainId: number;
|
|
316
316
|
type: "eip7702";
|
|
@@ -326,24 +326,24 @@ declare const SupportedNetworks: {
|
|
|
326
326
|
};
|
|
327
327
|
readonly transactionReceipt: {
|
|
328
328
|
exclude: [] | undefined;
|
|
329
|
-
format: (args:
|
|
329
|
+
format: (args: viem_chains0.OpStackRpcTransactionReceipt, action?: string | undefined) => {
|
|
330
330
|
blobGasPrice?: bigint | undefined;
|
|
331
331
|
blobGasUsed?: bigint | undefined;
|
|
332
|
-
blockHash:
|
|
332
|
+
blockHash: viem0.Hash;
|
|
333
333
|
blockNumber: bigint;
|
|
334
|
-
contractAddress:
|
|
334
|
+
contractAddress: viem0.Address | null | undefined;
|
|
335
335
|
cumulativeGasUsed: bigint;
|
|
336
336
|
effectiveGasPrice: bigint;
|
|
337
|
-
from:
|
|
337
|
+
from: viem0.Address;
|
|
338
338
|
gasUsed: bigint;
|
|
339
|
-
logs:
|
|
340
|
-
logsBloom:
|
|
339
|
+
logs: viem0.Log<bigint, number, false>[];
|
|
340
|
+
logsBloom: viem0.Hex;
|
|
341
341
|
root?: `0x${string}` | undefined;
|
|
342
342
|
status: "success" | "reverted";
|
|
343
|
-
to:
|
|
344
|
-
transactionHash:
|
|
343
|
+
to: viem0.Address | null;
|
|
344
|
+
transactionHash: viem0.Hash;
|
|
345
345
|
transactionIndex: number;
|
|
346
|
-
type:
|
|
346
|
+
type: viem0.TransactionType;
|
|
347
347
|
l1GasPrice: bigint | null;
|
|
348
348
|
l1GasUsed: bigint | null;
|
|
349
349
|
l1Fee: bigint | null;
|
|
@@ -353,7 +353,7 @@ declare const SupportedNetworks: {
|
|
|
353
353
|
};
|
|
354
354
|
};
|
|
355
355
|
serializers: {
|
|
356
|
-
readonly transaction: typeof
|
|
356
|
+
readonly transaction: typeof viem_chains0.serializeTransactionOpStack;
|
|
357
357
|
};
|
|
358
358
|
readonly network: "base-sepolia";
|
|
359
359
|
};
|
|
@@ -396,9 +396,9 @@ declare function getNetwork(name: string): {
|
|
|
396
396
|
sourceId?: number | undefined | undefined;
|
|
397
397
|
testnet: true;
|
|
398
398
|
custom?: Record<string, unknown> | undefined;
|
|
399
|
-
fees?:
|
|
399
|
+
fees?: viem0.ChainFees<undefined> | undefined;
|
|
400
400
|
formatters?: undefined;
|
|
401
|
-
serializers?:
|
|
401
|
+
serializers?: viem0.ChainSerializers<undefined, viem0.TransactionSerializable> | undefined;
|
|
402
402
|
} | {
|
|
403
403
|
blockExplorers: {
|
|
404
404
|
readonly default: {
|
|
@@ -471,56 +471,56 @@ declare function getNetwork(name: string): {
|
|
|
471
471
|
sourceId: 11155111;
|
|
472
472
|
testnet: true;
|
|
473
473
|
custom?: Record<string, unknown> | undefined;
|
|
474
|
-
fees?:
|
|
474
|
+
fees?: viem0.ChainFees<undefined> | undefined;
|
|
475
475
|
formatters: {
|
|
476
476
|
readonly block: {
|
|
477
477
|
exclude: [] | undefined;
|
|
478
|
-
format: (args:
|
|
478
|
+
format: (args: viem_chains0.OpStackRpcBlock, action?: string | undefined) => {
|
|
479
479
|
baseFeePerGas: bigint | null;
|
|
480
480
|
blobGasUsed: bigint;
|
|
481
481
|
difficulty: bigint;
|
|
482
482
|
excessBlobGas: bigint;
|
|
483
|
-
extraData:
|
|
483
|
+
extraData: viem0.Hex;
|
|
484
484
|
gasLimit: bigint;
|
|
485
485
|
gasUsed: bigint;
|
|
486
486
|
hash: `0x${string}` | null;
|
|
487
487
|
logsBloom: `0x${string}` | null;
|
|
488
|
-
miner:
|
|
489
|
-
mixHash:
|
|
488
|
+
miner: viem0.Address;
|
|
489
|
+
mixHash: viem0.Hash;
|
|
490
490
|
nonce: `0x${string}` | null;
|
|
491
491
|
number: bigint | null;
|
|
492
492
|
parentBeaconBlockRoot?: `0x${string}` | undefined;
|
|
493
|
-
parentHash:
|
|
494
|
-
receiptsRoot:
|
|
495
|
-
sealFields:
|
|
496
|
-
sha3Uncles:
|
|
493
|
+
parentHash: viem0.Hash;
|
|
494
|
+
receiptsRoot: viem0.Hex;
|
|
495
|
+
sealFields: viem0.Hex[];
|
|
496
|
+
sha3Uncles: viem0.Hash;
|
|
497
497
|
size: bigint;
|
|
498
|
-
stateRoot:
|
|
498
|
+
stateRoot: viem0.Hash;
|
|
499
499
|
timestamp: bigint;
|
|
500
500
|
totalDifficulty: bigint | null;
|
|
501
|
-
transactions: `0x${string}`[] |
|
|
502
|
-
transactionsRoot:
|
|
503
|
-
uncles:
|
|
504
|
-
withdrawals?:
|
|
501
|
+
transactions: `0x${string}`[] | viem_chains0.OpStackTransaction<boolean>[];
|
|
502
|
+
transactionsRoot: viem0.Hash;
|
|
503
|
+
uncles: viem0.Hash[];
|
|
504
|
+
withdrawals?: viem0.Withdrawal[] | undefined | undefined;
|
|
505
505
|
withdrawalsRoot?: `0x${string}` | undefined;
|
|
506
506
|
} & {};
|
|
507
507
|
type: "block";
|
|
508
508
|
};
|
|
509
509
|
readonly transaction: {
|
|
510
510
|
exclude: [] | undefined;
|
|
511
|
-
format: (args:
|
|
511
|
+
format: (args: viem_chains0.OpStackRpcTransaction, action?: string | undefined) => ({
|
|
512
512
|
blockHash: `0x${string}` | null;
|
|
513
513
|
blockNumber: bigint | null;
|
|
514
|
-
from:
|
|
514
|
+
from: viem0.Address;
|
|
515
515
|
gas: bigint;
|
|
516
|
-
hash:
|
|
517
|
-
input:
|
|
516
|
+
hash: viem0.Hash;
|
|
517
|
+
input: viem0.Hex;
|
|
518
518
|
nonce: number;
|
|
519
|
-
r:
|
|
520
|
-
s:
|
|
521
|
-
to:
|
|
519
|
+
r: viem0.Hex;
|
|
520
|
+
s: viem0.Hex;
|
|
521
|
+
to: viem0.Address | null;
|
|
522
522
|
transactionIndex: number | null;
|
|
523
|
-
typeHex:
|
|
523
|
+
typeHex: viem0.Hex | null;
|
|
524
524
|
v: bigint;
|
|
525
525
|
value: bigint;
|
|
526
526
|
yParity: number;
|
|
@@ -530,23 +530,23 @@ declare function getNetwork(name: string): {
|
|
|
530
530
|
maxPriorityFeePerGas: bigint;
|
|
531
531
|
isSystemTx?: boolean;
|
|
532
532
|
mint?: bigint | undefined | undefined;
|
|
533
|
-
sourceHash:
|
|
533
|
+
sourceHash: viem0.Hex;
|
|
534
534
|
type: "deposit";
|
|
535
535
|
} | {
|
|
536
|
-
r:
|
|
537
|
-
s:
|
|
536
|
+
r: viem0.Hex;
|
|
537
|
+
s: viem0.Hex;
|
|
538
538
|
v: bigint;
|
|
539
539
|
value: bigint;
|
|
540
540
|
gas: bigint;
|
|
541
|
-
to:
|
|
542
|
-
from:
|
|
541
|
+
to: viem0.Address | null;
|
|
542
|
+
from: viem0.Address;
|
|
543
543
|
nonce: number;
|
|
544
544
|
blockHash: `0x${string}` | null;
|
|
545
545
|
blockNumber: bigint | null;
|
|
546
546
|
transactionIndex: number | null;
|
|
547
|
-
hash:
|
|
548
|
-
input:
|
|
549
|
-
typeHex:
|
|
547
|
+
hash: viem0.Hash;
|
|
548
|
+
input: viem0.Hex;
|
|
549
|
+
typeHex: viem0.Hex | null;
|
|
550
550
|
accessList?: undefined | undefined;
|
|
551
551
|
authorizationList?: undefined | undefined;
|
|
552
552
|
blobVersionedHashes?: undefined | undefined;
|
|
@@ -563,20 +563,20 @@ declare function getNetwork(name: string): {
|
|
|
563
563
|
} | {
|
|
564
564
|
blockHash: `0x${string}` | null;
|
|
565
565
|
blockNumber: bigint | null;
|
|
566
|
-
from:
|
|
566
|
+
from: viem0.Address;
|
|
567
567
|
gas: bigint;
|
|
568
|
-
hash:
|
|
569
|
-
input:
|
|
568
|
+
hash: viem0.Hash;
|
|
569
|
+
input: viem0.Hex;
|
|
570
570
|
nonce: number;
|
|
571
|
-
r:
|
|
572
|
-
s:
|
|
573
|
-
to:
|
|
571
|
+
r: viem0.Hex;
|
|
572
|
+
s: viem0.Hex;
|
|
573
|
+
to: viem0.Address | null;
|
|
574
574
|
transactionIndex: number | null;
|
|
575
|
-
typeHex:
|
|
575
|
+
typeHex: viem0.Hex | null;
|
|
576
576
|
v: bigint;
|
|
577
577
|
value: bigint;
|
|
578
578
|
yParity: number;
|
|
579
|
-
accessList:
|
|
579
|
+
accessList: viem0.AccessList;
|
|
580
580
|
authorizationList?: undefined | undefined;
|
|
581
581
|
blobVersionedHashes?: undefined | undefined;
|
|
582
582
|
chainId: number;
|
|
@@ -591,20 +591,20 @@ declare function getNetwork(name: string): {
|
|
|
591
591
|
} | {
|
|
592
592
|
blockHash: `0x${string}` | null;
|
|
593
593
|
blockNumber: bigint | null;
|
|
594
|
-
from:
|
|
594
|
+
from: viem0.Address;
|
|
595
595
|
gas: bigint;
|
|
596
|
-
hash:
|
|
597
|
-
input:
|
|
596
|
+
hash: viem0.Hash;
|
|
597
|
+
input: viem0.Hex;
|
|
598
598
|
nonce: number;
|
|
599
|
-
r:
|
|
600
|
-
s:
|
|
601
|
-
to:
|
|
599
|
+
r: viem0.Hex;
|
|
600
|
+
s: viem0.Hex;
|
|
601
|
+
to: viem0.Address | null;
|
|
602
602
|
transactionIndex: number | null;
|
|
603
|
-
typeHex:
|
|
603
|
+
typeHex: viem0.Hex | null;
|
|
604
604
|
v: bigint;
|
|
605
605
|
value: bigint;
|
|
606
606
|
yParity: number;
|
|
607
|
-
accessList:
|
|
607
|
+
accessList: viem0.AccessList;
|
|
608
608
|
authorizationList?: undefined | undefined;
|
|
609
609
|
blobVersionedHashes?: undefined | undefined;
|
|
610
610
|
chainId: number;
|
|
@@ -619,22 +619,22 @@ declare function getNetwork(name: string): {
|
|
|
619
619
|
} | {
|
|
620
620
|
blockHash: `0x${string}` | null;
|
|
621
621
|
blockNumber: bigint | null;
|
|
622
|
-
from:
|
|
622
|
+
from: viem0.Address;
|
|
623
623
|
gas: bigint;
|
|
624
|
-
hash:
|
|
625
|
-
input:
|
|
624
|
+
hash: viem0.Hash;
|
|
625
|
+
input: viem0.Hex;
|
|
626
626
|
nonce: number;
|
|
627
|
-
r:
|
|
628
|
-
s:
|
|
629
|
-
to:
|
|
627
|
+
r: viem0.Hex;
|
|
628
|
+
s: viem0.Hex;
|
|
629
|
+
to: viem0.Address | null;
|
|
630
630
|
transactionIndex: number | null;
|
|
631
|
-
typeHex:
|
|
631
|
+
typeHex: viem0.Hex | null;
|
|
632
632
|
v: bigint;
|
|
633
633
|
value: bigint;
|
|
634
634
|
yParity: number;
|
|
635
|
-
accessList:
|
|
635
|
+
accessList: viem0.AccessList;
|
|
636
636
|
authorizationList?: undefined | undefined;
|
|
637
|
-
blobVersionedHashes: readonly
|
|
637
|
+
blobVersionedHashes: readonly viem0.Hex[];
|
|
638
638
|
chainId: number;
|
|
639
639
|
type: "eip4844";
|
|
640
640
|
gasPrice?: undefined | undefined;
|
|
@@ -647,21 +647,21 @@ declare function getNetwork(name: string): {
|
|
|
647
647
|
} | {
|
|
648
648
|
blockHash: `0x${string}` | null;
|
|
649
649
|
blockNumber: bigint | null;
|
|
650
|
-
from:
|
|
650
|
+
from: viem0.Address;
|
|
651
651
|
gas: bigint;
|
|
652
|
-
hash:
|
|
653
|
-
input:
|
|
652
|
+
hash: viem0.Hash;
|
|
653
|
+
input: viem0.Hex;
|
|
654
654
|
nonce: number;
|
|
655
|
-
r:
|
|
656
|
-
s:
|
|
657
|
-
to:
|
|
655
|
+
r: viem0.Hex;
|
|
656
|
+
s: viem0.Hex;
|
|
657
|
+
to: viem0.Address | null;
|
|
658
658
|
transactionIndex: number | null;
|
|
659
|
-
typeHex:
|
|
659
|
+
typeHex: viem0.Hex | null;
|
|
660
660
|
v: bigint;
|
|
661
661
|
value: bigint;
|
|
662
662
|
yParity: number;
|
|
663
|
-
accessList:
|
|
664
|
-
authorizationList:
|
|
663
|
+
accessList: viem0.AccessList;
|
|
664
|
+
authorizationList: viem0.SignedAuthorizationList;
|
|
665
665
|
blobVersionedHashes?: undefined | undefined;
|
|
666
666
|
chainId: number;
|
|
667
667
|
type: "eip7702";
|
|
@@ -677,24 +677,24 @@ declare function getNetwork(name: string): {
|
|
|
677
677
|
};
|
|
678
678
|
readonly transactionReceipt: {
|
|
679
679
|
exclude: [] | undefined;
|
|
680
|
-
format: (args:
|
|
680
|
+
format: (args: viem_chains0.OpStackRpcTransactionReceipt, action?: string | undefined) => {
|
|
681
681
|
blobGasPrice?: bigint | undefined;
|
|
682
682
|
blobGasUsed?: bigint | undefined;
|
|
683
|
-
blockHash:
|
|
683
|
+
blockHash: viem0.Hash;
|
|
684
684
|
blockNumber: bigint;
|
|
685
|
-
contractAddress:
|
|
685
|
+
contractAddress: viem0.Address | null | undefined;
|
|
686
686
|
cumulativeGasUsed: bigint;
|
|
687
687
|
effectiveGasPrice: bigint;
|
|
688
|
-
from:
|
|
688
|
+
from: viem0.Address;
|
|
689
689
|
gasUsed: bigint;
|
|
690
|
-
logs:
|
|
691
|
-
logsBloom:
|
|
690
|
+
logs: viem0.Log<bigint, number, false>[];
|
|
691
|
+
logsBloom: viem0.Hex;
|
|
692
692
|
root?: `0x${string}` | undefined;
|
|
693
693
|
status: "success" | "reverted";
|
|
694
|
-
to:
|
|
695
|
-
transactionHash:
|
|
694
|
+
to: viem0.Address | null;
|
|
695
|
+
transactionHash: viem0.Hash;
|
|
696
696
|
transactionIndex: number;
|
|
697
|
-
type:
|
|
697
|
+
type: viem0.TransactionType;
|
|
698
698
|
l1GasPrice: bigint | null;
|
|
699
699
|
l1GasUsed: bigint | null;
|
|
700
700
|
l1Fee: bigint | null;
|
|
@@ -704,7 +704,7 @@ declare function getNetwork(name: string): {
|
|
|
704
704
|
};
|
|
705
705
|
};
|
|
706
706
|
serializers: {
|
|
707
|
-
readonly transaction: typeof
|
|
707
|
+
readonly transaction: typeof viem_chains0.serializeTransactionOpStack;
|
|
708
708
|
};
|
|
709
709
|
readonly network: "base-sepolia";
|
|
710
710
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as viem287 from "viem";
|
|
2
2
|
import { Address, Hash, Hex, PublicClient, WalletClient } from "viem";
|
|
3
3
|
|
|
4
4
|
//#region src/interface/datasource-registry/dataSourceRegistry.d.ts
|
|
@@ -18,7 +18,7 @@ declare class DataSourceRegistry {
|
|
|
18
18
|
getOwnedDataSources(address: Address): Promise<Hex[]>;
|
|
19
19
|
registerDataSource(name: string, agentId: string): Promise<Hex>;
|
|
20
20
|
updateDataSource(name: string, newManifestCid: string): Promise<Hash>;
|
|
21
|
-
waitForTransaction(hash: Hash): Promise<
|
|
21
|
+
waitForTransaction(hash: Hash): Promise<viem287.TransactionReceipt>;
|
|
22
22
|
}
|
|
23
23
|
//#endregion
|
|
24
24
|
export { DataSourceRegistry, Vault };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as viem288 from "viem";
|
|
2
2
|
import { Address, Hash, Hex, PublicClient, WalletClient } from "viem";
|
|
3
3
|
|
|
4
4
|
//#region src/interface/settlement-tracker/settlementTracker.d.ts
|
|
@@ -26,7 +26,7 @@ declare class SettlementTracker {
|
|
|
26
26
|
r: Hex;
|
|
27
27
|
s: Hex;
|
|
28
28
|
}): Promise<Hash>;
|
|
29
|
-
waitForTransaction(hash: Hash): Promise<
|
|
29
|
+
waitForTransaction(hash: Hash): Promise<viem288.TransactionReceipt>;
|
|
30
30
|
}
|
|
31
31
|
//#endregion
|
|
32
32
|
export { SettlementTracker };
|
|
@@ -64,8 +64,6 @@ var PaymentGadget = class {
|
|
|
64
64
|
};
|
|
65
65
|
}
|
|
66
66
|
async toLitActionIpfsHash() {
|
|
67
|
-
const jwt = process.env.PINATA_JWT;
|
|
68
|
-
if (!jwt) throw new Error("PINATA_JWT is required");
|
|
69
67
|
const content = this.toLitAction();
|
|
70
68
|
const name = "lit-action-payment-gadget-v1";
|
|
71
69
|
const form = new FormData();
|
|
@@ -74,7 +72,7 @@ var PaymentGadget = class {
|
|
|
74
72
|
form.append("pinataMetadata", JSON.stringify({ name }));
|
|
75
73
|
const res = await fetch("https://api.pinata.cloud/pinning/pinFileToIPFS", {
|
|
76
74
|
method: "POST",
|
|
77
|
-
headers: { Authorization: `Bearer ${
|
|
75
|
+
headers: { Authorization: `Bearer ${this.params.pinataJwt}` },
|
|
78
76
|
body: form
|
|
79
77
|
});
|
|
80
78
|
if (!res.ok) {
|
package/lib/test/testbed.d.ts
CHANGED
|
@@ -22,7 +22,7 @@ declare class TestBed {
|
|
|
22
22
|
* Upload files with empty wallet gadget
|
|
23
23
|
*/
|
|
24
24
|
fileUploadEmptyWallet(datasourceName: string, filedata: Filedata[]): Promise<string>;
|
|
25
|
-
fileUploadPaymentGadget(datasourceName: string, filedata: Filedata, usdcPrice: string, settlementTrackerContractAddress: Address): Promise<string>;
|
|
25
|
+
fileUploadPaymentGadget(datasourceName: string, filedata: Filedata, usdcPrice: string, settlementTrackerContractAddress: Address, jwt: string): Promise<string>;
|
|
26
26
|
tryDecrypt(owner: Address, name: string, tag: string): Promise<Uint8Array>;
|
|
27
27
|
tryDecryptDelegator(owner: Address, name: string, tag: string): Promise<Uint8Array>;
|
|
28
28
|
checkDatasourceRegistryExistence(who: Address, name: string): Promise<boolean>;
|
package/lib/test/testbed.js
CHANGED
|
@@ -65,13 +65,14 @@ var TestBed = class TestBed {
|
|
|
65
65
|
async fileUploadEmptyWallet(datasourceName, filedata) {
|
|
66
66
|
return await this.delegatorFangorn.upload(datasourceName, filedata, (_file) => emptyWallet(this.litChain));
|
|
67
67
|
}
|
|
68
|
-
async fileUploadPaymentGadget(datasourceName, filedata, usdcPrice, settlementTrackerContractAddress) {
|
|
68
|
+
async fileUploadPaymentGadget(datasourceName, filedata, usdcPrice, settlementTrackerContractAddress, jwt) {
|
|
69
69
|
return await this.delegatorFangorn.upload(datasourceName, [filedata], async (file) => {
|
|
70
70
|
return new PaymentGadget({
|
|
71
71
|
commitment: fieldToHex(await computeTagCommitment(this.delegatorAddress, datasourceName, file.tag, usdcPrice)),
|
|
72
72
|
chainName: this.config.chainName,
|
|
73
73
|
settlementTrackerContractAddress,
|
|
74
|
-
usdcPrice
|
|
74
|
+
usdcPrice,
|
|
75
|
+
pinataJwt: jwt
|
|
75
76
|
});
|
|
76
77
|
});
|
|
77
78
|
}
|