@fangorn-network/sdk 0.1.0-dev

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (102) hide show
  1. package/LICENSE.md +20 -0
  2. package/README.md +80 -0
  3. package/lib/cli/cli.d.ts +2 -0
  4. package/lib/cli/cli.js +571 -0
  5. package/lib/cli/index.d.ts +10 -0
  6. package/lib/cli/index.js +18 -0
  7. package/lib/cli/sell.d.ts +28 -0
  8. package/lib/cli/sell.js +95 -0
  9. package/lib/cli/stage.d.ts +19 -0
  10. package/lib/cli/stage.js +94 -0
  11. package/lib/config.d.ts +697 -0
  12. package/lib/config.js +45 -0
  13. package/lib/contracts/data-registry/abi.d.ts +442 -0
  14. package/lib/contracts/data-registry/abi.js +508 -0
  15. package/lib/contracts/data-registry/index.d.ts +131 -0
  16. package/lib/contracts/data-registry/index.js +183 -0
  17. package/lib/contracts/index.d.ts +6 -0
  18. package/lib/contracts/index.js +6 -0
  19. package/lib/contracts/logs.d.ts +17 -0
  20. package/lib/contracts/logs.js +28 -0
  21. package/lib/contracts/settlement-registry/abi.d.ts +810 -0
  22. package/lib/contracts/settlement-registry/abi.js +962 -0
  23. package/lib/contracts/settlement-registry/index.d.ts +143 -0
  24. package/lib/contracts/settlement-registry/index.js +213 -0
  25. package/lib/contracts/write.d.ts +59 -0
  26. package/lib/contracts/write.js +102 -0
  27. package/lib/crypto/aes.d.ts +19 -0
  28. package/lib/crypto/aes.js +26 -0
  29. package/lib/crypto/encryption.d.ts +38 -0
  30. package/lib/crypto/encryption.js +68 -0
  31. package/lib/crypto/paid.d.ts +104 -0
  32. package/lib/crypto/paid.js +147 -0
  33. package/lib/crypto/rand.d.ts +5 -0
  34. package/lib/crypto/rand.js +16 -0
  35. package/lib/crypto/types.d.ts +23 -0
  36. package/lib/crypto/types.js +1 -0
  37. package/lib/engine/car.d.ts +14 -0
  38. package/lib/engine/car.js +42 -0
  39. package/lib/engine/index.d.ts +206 -0
  40. package/lib/engine/index.js +377 -0
  41. package/lib/engine/records.d.ts +121 -0
  42. package/lib/engine/records.js +239 -0
  43. package/lib/engine/test-helpers.d.ts +38 -0
  44. package/lib/engine/test-helpers.js +63 -0
  45. package/lib/erc8004.d.ts +56 -0
  46. package/lib/erc8004.js +140 -0
  47. package/lib/fangorn.d.ts +342 -0
  48. package/lib/fangorn.js +642 -0
  49. package/lib/feed.d.ts +34 -0
  50. package/lib/feed.js +67 -0
  51. package/lib/index.d.ts +17 -0
  52. package/lib/index.js +16 -0
  53. package/lib/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.js +77 -0
  54. package/lib/node_modules/@vitest/expect/dist/index.js +1414 -0
  55. package/lib/node_modules/@vitest/pretty-format/dist/index.js +858 -0
  56. package/lib/node_modules/@vitest/runner/dist/chunk-tasks.js +51 -0
  57. package/lib/node_modules/@vitest/runner/dist/index.js +1199 -0
  58. package/lib/node_modules/@vitest/runner/dist/utils.js +3 -0
  59. package/lib/node_modules/@vitest/snapshot/dist/index.js +1075 -0
  60. package/lib/node_modules/@vitest/spy/dist/index.js +353 -0
  61. package/lib/node_modules/@vitest/utils/dist/chunk-_commonjsHelpers.js +7 -0
  62. package/lib/node_modules/@vitest/utils/dist/chunk-pathe.M-eThtNZ.js +81 -0
  63. package/lib/node_modules/@vitest/utils/dist/diff.js +1345 -0
  64. package/lib/node_modules/@vitest/utils/dist/display.js +534 -0
  65. package/lib/node_modules/@vitest/utils/dist/error.js +30 -0
  66. package/lib/node_modules/@vitest/utils/dist/helpers.js +118 -0
  67. package/lib/node_modules/@vitest/utils/dist/serialize.js +76 -0
  68. package/lib/node_modules/@vitest/utils/dist/source-map.js +93 -0
  69. package/lib/node_modules/@vitest/utils/dist/timers.js +36 -0
  70. package/lib/node_modules/chai/index.js +2874 -0
  71. package/lib/node_modules/magic-string/dist/magic-string.es.js +939 -0
  72. package/lib/node_modules/pathe/dist/shared/pathe.M-eThtNZ.js +81 -0
  73. package/lib/node_modules/tinyrainbow/dist/index.js +85 -0
  74. package/lib/node_modules/vitest/dist/chunks/_commonjsHelpers.D26ty3Ew.js +5 -0
  75. package/lib/node_modules/vitest/dist/chunks/date.Bq6ZW5rf.js +50 -0
  76. package/lib/node_modules/vitest/dist/chunks/utils.DvEY5TfP.js +44 -0
  77. package/lib/node_modules/vitest/dist/chunks/vi.2VT5v0um.js +2578 -0
  78. package/lib/providers/storage/car.d.ts +36 -0
  79. package/lib/providers/storage/car.js +81 -0
  80. package/lib/providers/storage/index.d.ts +5 -0
  81. package/lib/providers/storage/index.js +5 -0
  82. package/lib/providers/storage/pinata.d.ts +53 -0
  83. package/lib/providers/storage/pinata.js +178 -0
  84. package/lib/providers/storage/signed-url.d.ts +54 -0
  85. package/lib/providers/storage/signed-url.js +122 -0
  86. package/lib/providers/storage/types.d.ts +62 -0
  87. package/lib/providers/storage/types.js +1 -0
  88. package/lib/providers/storage/utils.d.ts +30 -0
  89. package/lib/providers/storage/utils.js +107 -0
  90. package/lib/repo/index.d.ts +56 -0
  91. package/lib/repo/index.js +73 -0
  92. package/lib/test/key-server.d.ts +12 -0
  93. package/lib/test/key-server.js +30 -0
  94. package/lib/test/mem-registry.d.ts +46 -0
  95. package/lib/test/mem-registry.js +114 -0
  96. package/lib/test/sdk-suite.d.ts +10 -0
  97. package/lib/test/sdk-suite.js +155 -0
  98. package/lib/test/testbed.d.ts +16786 -0
  99. package/lib/test/testbed.js +175 -0
  100. package/lib/types/index.d.ts +37 -0
  101. package/lib/types/index.js +1 -0
  102. package/package.json +87 -0
@@ -0,0 +1,697 @@
1
+ import * as viem_chains0 from "viem/chains";
2
+ import * as viem0 from "viem";
3
+ import { Chain, Hex } from "viem";
4
+ import * as abitype0 from "abitype";
5
+
6
+ //#region src/config.d.ts
7
+ /**
8
+ * Blank input means "not set", never a value of "". Returns the trimmed value,
9
+ * or undefined when it is missing or only whitespace, so it can sit on the left of
10
+ * a `??` fallback. `??` on the raw value would let "" through: it is not nullish.
11
+ */
12
+ declare function nonBlank(value: string | undefined): string | undefined;
13
+ interface NetworkConfig {
14
+ dataRegistryContractAddress: Hex;
15
+ settlementRegistryContractAddress?: Hex;
16
+ fromBlock: bigint;
17
+ chain: Chain;
18
+ rpcUrl: string;
19
+ caip2: number;
20
+ ipfsGateway: string;
21
+ logWindow?: bigint;
22
+ signedUrlWorker?: string;
23
+ }
24
+ declare const BaseSepoliaConfig: {
25
+ dataRegistryContractAddress: "0x0F3eb0E62CF610dbaC6B3aD4Bf4cE38Ab50EBCC5";
26
+ settlementRegistryContractAddress: "0x61A5A195B54F57ada786Ba6689CdB04553cf7fBc";
27
+ fromBlock: bigint;
28
+ chain: {
29
+ blockExplorers: {
30
+ readonly default: {
31
+ readonly name: "Basescan";
32
+ readonly url: "https://sepolia.basescan.org";
33
+ readonly apiUrl: "https://api-sepolia.basescan.org/api";
34
+ };
35
+ };
36
+ blockTime: 2000;
37
+ contracts: {
38
+ readonly disputeGameFactory: {
39
+ readonly 11155111: {
40
+ readonly address: "0xd6E6dBf4F7EA0ac412fD8b65ED297e64BB7a06E1";
41
+ };
42
+ };
43
+ readonly l2OutputOracle: {
44
+ readonly 11155111: {
45
+ readonly address: "0x84457ca9D0163FbC4bbfe4Dfbb20ba46e48DF254";
46
+ };
47
+ };
48
+ readonly portal: {
49
+ readonly 11155111: {
50
+ readonly address: "0x49f53e41452c74589e85ca1677426ba426459e85";
51
+ readonly blockCreated: 4446677;
52
+ };
53
+ };
54
+ readonly l1StandardBridge: {
55
+ readonly 11155111: {
56
+ readonly address: "0xfd0Bf71F60660E2f608ed56e1659C450eB113120";
57
+ readonly blockCreated: 4446677;
58
+ };
59
+ };
60
+ readonly multicall3: {
61
+ readonly address: "0xca11bde05977b3631167028862be2a173976ca11";
62
+ readonly blockCreated: 1059647;
63
+ };
64
+ readonly gasPriceOracle: {
65
+ readonly address: "0x420000000000000000000000000000000000000F";
66
+ };
67
+ readonly l1Block: {
68
+ readonly address: "0x4200000000000000000000000000000000000015";
69
+ };
70
+ readonly l2CrossDomainMessenger: {
71
+ readonly address: "0x4200000000000000000000000000000000000007";
72
+ };
73
+ readonly l2Erc721Bridge: {
74
+ readonly address: "0x4200000000000000000000000000000000000014";
75
+ };
76
+ readonly l2StandardBridge: {
77
+ readonly address: "0x4200000000000000000000000000000000000010";
78
+ };
79
+ readonly l2ToL1MessagePasser: {
80
+ readonly address: "0x4200000000000000000000000000000000000016";
81
+ };
82
+ };
83
+ ensTlds?: readonly string[] | undefined;
84
+ id: 84532;
85
+ name: "Base Sepolia";
86
+ nativeCurrency: {
87
+ readonly name: "Sepolia Ether";
88
+ readonly symbol: "ETH";
89
+ readonly decimals: 18;
90
+ };
91
+ experimental_preconfirmationTime?: number | undefined | undefined;
92
+ rpcUrls: {
93
+ readonly default: {
94
+ readonly http: readonly ["https://sepolia.base.org"];
95
+ };
96
+ };
97
+ sourceId: 11155111;
98
+ testnet: true;
99
+ custom?: Record<string, unknown> | undefined;
100
+ extendSchema?: Record<string, unknown> | undefined;
101
+ fees?: viem0.ChainFees<undefined> | undefined;
102
+ formatters: {
103
+ readonly block: {
104
+ exclude: [] | undefined;
105
+ format: (args: viem_chains0.OpStackRpcBlock, action?: string | undefined) => {
106
+ baseFeePerGas: bigint | null;
107
+ blobGasUsed: bigint;
108
+ difficulty: bigint;
109
+ excessBlobGas: bigint;
110
+ extraData: viem0.Hex;
111
+ gasLimit: bigint;
112
+ gasUsed: bigint;
113
+ hash: `0x${string}` | null;
114
+ logsBloom: `0x${string}` | null;
115
+ miner: abitype0.Address;
116
+ mixHash: viem0.Hash;
117
+ nonce: `0x${string}` | null;
118
+ number: bigint | null;
119
+ parentBeaconBlockRoot?: `0x${string}` | undefined;
120
+ parentHash: viem0.Hash;
121
+ receiptsRoot: viem0.Hex;
122
+ sealFields: viem0.Hex[];
123
+ sha3Uncles: viem0.Hash;
124
+ size: bigint;
125
+ stateRoot: viem0.Hash;
126
+ timestamp: bigint;
127
+ totalDifficulty: bigint | null;
128
+ transactions: `0x${string}`[] | viem_chains0.OpStackTransaction<boolean>[];
129
+ transactionsRoot: viem0.Hash;
130
+ uncles: viem0.Hash[];
131
+ withdrawals?: viem0.Withdrawal[] | undefined | undefined;
132
+ withdrawalsRoot?: `0x${string}` | undefined;
133
+ } & {};
134
+ type: "block";
135
+ };
136
+ readonly transaction: {
137
+ exclude: [] | undefined;
138
+ format: (args: viem_chains0.OpStackRpcTransaction, action?: string | undefined) => ({
139
+ blockHash: `0x${string}` | null;
140
+ blockNumber: bigint | null;
141
+ from: abitype0.Address;
142
+ gas: bigint;
143
+ hash: viem0.Hash;
144
+ input: viem0.Hex;
145
+ nonce: number;
146
+ r: viem0.Hex;
147
+ s: viem0.Hex;
148
+ to: abitype0.Address | null;
149
+ transactionIndex: number | null;
150
+ typeHex: viem0.Hex | null;
151
+ v: bigint;
152
+ value: bigint;
153
+ yParity: number;
154
+ gasPrice?: undefined | undefined;
155
+ maxFeePerBlobGas?: undefined | undefined;
156
+ maxFeePerGas: bigint;
157
+ maxPriorityFeePerGas: bigint;
158
+ isSystemTx?: boolean;
159
+ mint?: bigint | undefined | undefined;
160
+ sourceHash: viem0.Hex;
161
+ type: "deposit";
162
+ } | {
163
+ r: viem0.Hex;
164
+ s: viem0.Hex;
165
+ v: bigint;
166
+ to: abitype0.Address | null;
167
+ from: abitype0.Address;
168
+ gas: bigint;
169
+ nonce: number;
170
+ value: bigint;
171
+ blockHash: `0x${string}` | null;
172
+ blockNumber: bigint | null;
173
+ hash: viem0.Hash;
174
+ input: viem0.Hex;
175
+ transactionIndex: number | null;
176
+ typeHex: viem0.Hex | null;
177
+ accessList?: undefined | undefined;
178
+ authorizationList?: undefined | undefined;
179
+ blobVersionedHashes?: undefined | undefined;
180
+ chainId?: number | undefined;
181
+ yParity?: undefined | undefined;
182
+ type: "legacy";
183
+ gasPrice: bigint;
184
+ maxFeePerBlobGas?: undefined | undefined;
185
+ maxFeePerGas?: undefined | undefined;
186
+ maxPriorityFeePerGas?: undefined | undefined;
187
+ isSystemTx?: undefined | undefined;
188
+ mint?: undefined | undefined;
189
+ sourceHash?: undefined | undefined;
190
+ } | {
191
+ blockHash: `0x${string}` | null;
192
+ blockNumber: bigint | null;
193
+ from: abitype0.Address;
194
+ gas: bigint;
195
+ hash: viem0.Hash;
196
+ input: viem0.Hex;
197
+ nonce: number;
198
+ r: viem0.Hex;
199
+ s: viem0.Hex;
200
+ to: abitype0.Address | null;
201
+ transactionIndex: number | null;
202
+ typeHex: viem0.Hex | null;
203
+ v: bigint;
204
+ value: bigint;
205
+ yParity: number;
206
+ accessList: viem0.AccessList;
207
+ authorizationList?: undefined | undefined;
208
+ blobVersionedHashes?: undefined | undefined;
209
+ chainId: number;
210
+ type: "eip2930";
211
+ gasPrice: bigint;
212
+ maxFeePerBlobGas?: undefined | undefined;
213
+ maxFeePerGas?: undefined | undefined;
214
+ maxPriorityFeePerGas?: undefined | undefined;
215
+ isSystemTx?: undefined | undefined;
216
+ mint?: undefined | undefined;
217
+ sourceHash?: undefined | undefined;
218
+ } | {
219
+ blockHash: `0x${string}` | null;
220
+ blockNumber: bigint | null;
221
+ from: abitype0.Address;
222
+ gas: bigint;
223
+ hash: viem0.Hash;
224
+ input: viem0.Hex;
225
+ nonce: number;
226
+ r: viem0.Hex;
227
+ s: viem0.Hex;
228
+ to: abitype0.Address | null;
229
+ transactionIndex: number | null;
230
+ typeHex: viem0.Hex | null;
231
+ v: bigint;
232
+ value: bigint;
233
+ yParity: number;
234
+ accessList: viem0.AccessList;
235
+ authorizationList?: undefined | undefined;
236
+ blobVersionedHashes?: undefined | undefined;
237
+ chainId: number;
238
+ type: "eip1559";
239
+ gasPrice?: undefined | undefined;
240
+ maxFeePerBlobGas?: undefined | undefined;
241
+ maxFeePerGas: bigint;
242
+ maxPriorityFeePerGas: bigint;
243
+ isSystemTx?: undefined | undefined;
244
+ mint?: undefined | undefined;
245
+ sourceHash?: undefined | undefined;
246
+ } | {
247
+ blockHash: `0x${string}` | null;
248
+ blockNumber: bigint | null;
249
+ from: abitype0.Address;
250
+ gas: bigint;
251
+ hash: viem0.Hash;
252
+ input: viem0.Hex;
253
+ nonce: number;
254
+ r: viem0.Hex;
255
+ s: viem0.Hex;
256
+ to: abitype0.Address | null;
257
+ transactionIndex: number | null;
258
+ typeHex: viem0.Hex | null;
259
+ v: bigint;
260
+ value: bigint;
261
+ yParity: number;
262
+ accessList: viem0.AccessList;
263
+ authorizationList?: undefined | undefined;
264
+ blobVersionedHashes: readonly viem0.Hex[];
265
+ chainId: number;
266
+ type: "eip4844";
267
+ gasPrice?: undefined | undefined;
268
+ maxFeePerBlobGas: bigint;
269
+ maxFeePerGas: bigint;
270
+ maxPriorityFeePerGas: bigint;
271
+ isSystemTx?: undefined | undefined;
272
+ mint?: undefined | undefined;
273
+ sourceHash?: undefined | undefined;
274
+ } | {
275
+ blockHash: `0x${string}` | null;
276
+ blockNumber: bigint | null;
277
+ from: abitype0.Address;
278
+ gas: bigint;
279
+ hash: viem0.Hash;
280
+ input: viem0.Hex;
281
+ nonce: number;
282
+ r: viem0.Hex;
283
+ s: viem0.Hex;
284
+ to: abitype0.Address | null;
285
+ transactionIndex: number | null;
286
+ typeHex: viem0.Hex | null;
287
+ v: bigint;
288
+ value: bigint;
289
+ yParity: number;
290
+ accessList: viem0.AccessList;
291
+ authorizationList: viem0.SignedAuthorizationList;
292
+ blobVersionedHashes?: undefined | undefined;
293
+ chainId: number;
294
+ type: "eip7702";
295
+ gasPrice?: undefined | undefined;
296
+ maxFeePerBlobGas?: undefined | undefined;
297
+ maxFeePerGas: bigint;
298
+ maxPriorityFeePerGas: bigint;
299
+ isSystemTx?: undefined | undefined;
300
+ mint?: undefined | undefined;
301
+ sourceHash?: undefined | undefined;
302
+ }) & {};
303
+ type: "transaction";
304
+ };
305
+ readonly transactionReceipt: {
306
+ exclude: [] | undefined;
307
+ format: (args: viem_chains0.OpStackRpcTransactionReceipt, action?: string | undefined) => {
308
+ blobGasPrice?: bigint | undefined;
309
+ blobGasUsed?: bigint | undefined;
310
+ blockHash: viem0.Hash;
311
+ blockNumber: bigint;
312
+ blockTimestamp?: bigint | undefined;
313
+ contractAddress: abitype0.Address | null | undefined;
314
+ cumulativeGasUsed: bigint;
315
+ effectiveGasPrice: bigint;
316
+ from: abitype0.Address;
317
+ gasUsed: bigint;
318
+ logs: viem0.Log<bigint, number, false>[];
319
+ logsBloom: viem0.Hex;
320
+ root?: `0x${string}` | undefined;
321
+ status: "success" | "reverted";
322
+ to: abitype0.Address | null;
323
+ transactionHash: viem0.Hash;
324
+ transactionIndex: number;
325
+ type: viem0.TransactionType;
326
+ l1GasPrice: bigint | null;
327
+ l1GasUsed: bigint | null;
328
+ l1Fee: bigint | null;
329
+ l1FeeScalar: number | null;
330
+ } & {};
331
+ type: "transactionReceipt";
332
+ };
333
+ };
334
+ prepareTransactionRequest?: ((args: viem0.PrepareTransactionRequestParameters, options: {
335
+ phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
336
+ }) => Promise<viem0.PrepareTransactionRequestParameters>) | [fn: ((args: viem0.PrepareTransactionRequestParameters, options: {
337
+ phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
338
+ }) => Promise<viem0.PrepareTransactionRequestParameters>) | undefined, options: {
339
+ runAt: readonly ("beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters")[];
340
+ }] | undefined;
341
+ serializers: {
342
+ readonly transaction: typeof viem_chains0.serializeTransactionOpStack;
343
+ };
344
+ verifyHash?: ((client: viem0.Client, parameters: viem0.VerifyHashActionParameters) => Promise<viem0.VerifyHashActionReturnType>) | undefined;
345
+ readonly network: "base-sepolia";
346
+ };
347
+ rpcUrl: string;
348
+ caip2: number;
349
+ ipfsGateway: string;
350
+ logWindow: bigint;
351
+ signedUrlWorker: string;
352
+ };
353
+ /**
354
+ * The default network: what `Fangorn.create` uses without a `config`, and the CLI
355
+ * without `CHAIN_NAME`. Base Sepolia, which runs the contracts this SDK's ABIs are
356
+ * built from.
357
+ */
358
+ declare const FangornConfig: {
359
+ dataRegistryContractAddress: "0x0F3eb0E62CF610dbaC6B3aD4Bf4cE38Ab50EBCC5";
360
+ settlementRegistryContractAddress: "0x61A5A195B54F57ada786Ba6689CdB04553cf7fBc";
361
+ fromBlock: bigint;
362
+ chain: {
363
+ blockExplorers: {
364
+ readonly default: {
365
+ readonly name: "Basescan";
366
+ readonly url: "https://sepolia.basescan.org";
367
+ readonly apiUrl: "https://api-sepolia.basescan.org/api";
368
+ };
369
+ };
370
+ blockTime: 2000;
371
+ contracts: {
372
+ readonly disputeGameFactory: {
373
+ readonly 11155111: {
374
+ readonly address: "0xd6E6dBf4F7EA0ac412fD8b65ED297e64BB7a06E1";
375
+ };
376
+ };
377
+ readonly l2OutputOracle: {
378
+ readonly 11155111: {
379
+ readonly address: "0x84457ca9D0163FbC4bbfe4Dfbb20ba46e48DF254";
380
+ };
381
+ };
382
+ readonly portal: {
383
+ readonly 11155111: {
384
+ readonly address: "0x49f53e41452c74589e85ca1677426ba426459e85";
385
+ readonly blockCreated: 4446677;
386
+ };
387
+ };
388
+ readonly l1StandardBridge: {
389
+ readonly 11155111: {
390
+ readonly address: "0xfd0Bf71F60660E2f608ed56e1659C450eB113120";
391
+ readonly blockCreated: 4446677;
392
+ };
393
+ };
394
+ readonly multicall3: {
395
+ readonly address: "0xca11bde05977b3631167028862be2a173976ca11";
396
+ readonly blockCreated: 1059647;
397
+ };
398
+ readonly gasPriceOracle: {
399
+ readonly address: "0x420000000000000000000000000000000000000F";
400
+ };
401
+ readonly l1Block: {
402
+ readonly address: "0x4200000000000000000000000000000000000015";
403
+ };
404
+ readonly l2CrossDomainMessenger: {
405
+ readonly address: "0x4200000000000000000000000000000000000007";
406
+ };
407
+ readonly l2Erc721Bridge: {
408
+ readonly address: "0x4200000000000000000000000000000000000014";
409
+ };
410
+ readonly l2StandardBridge: {
411
+ readonly address: "0x4200000000000000000000000000000000000010";
412
+ };
413
+ readonly l2ToL1MessagePasser: {
414
+ readonly address: "0x4200000000000000000000000000000000000016";
415
+ };
416
+ };
417
+ ensTlds?: readonly string[] | undefined;
418
+ id: 84532;
419
+ name: "Base Sepolia";
420
+ nativeCurrency: {
421
+ readonly name: "Sepolia Ether";
422
+ readonly symbol: "ETH";
423
+ readonly decimals: 18;
424
+ };
425
+ experimental_preconfirmationTime?: number | undefined | undefined;
426
+ rpcUrls: {
427
+ readonly default: {
428
+ readonly http: readonly ["https://sepolia.base.org"];
429
+ };
430
+ };
431
+ sourceId: 11155111;
432
+ testnet: true;
433
+ custom?: Record<string, unknown> | undefined;
434
+ extendSchema?: Record<string, unknown> | undefined;
435
+ fees?: viem0.ChainFees<undefined> | undefined;
436
+ formatters: {
437
+ readonly block: {
438
+ exclude: [] | undefined;
439
+ format: (args: viem_chains0.OpStackRpcBlock, action?: string | undefined) => {
440
+ baseFeePerGas: bigint | null;
441
+ blobGasUsed: bigint;
442
+ difficulty: bigint;
443
+ excessBlobGas: bigint;
444
+ extraData: viem0.Hex;
445
+ gasLimit: bigint;
446
+ gasUsed: bigint;
447
+ hash: `0x${string}` | null;
448
+ logsBloom: `0x${string}` | null;
449
+ miner: abitype0.Address;
450
+ mixHash: viem0.Hash;
451
+ nonce: `0x${string}` | null;
452
+ number: bigint | null;
453
+ parentBeaconBlockRoot?: `0x${string}` | undefined;
454
+ parentHash: viem0.Hash;
455
+ receiptsRoot: viem0.Hex;
456
+ sealFields: viem0.Hex[];
457
+ sha3Uncles: viem0.Hash;
458
+ size: bigint;
459
+ stateRoot: viem0.Hash;
460
+ timestamp: bigint;
461
+ totalDifficulty: bigint | null;
462
+ transactions: `0x${string}`[] | viem_chains0.OpStackTransaction<boolean>[];
463
+ transactionsRoot: viem0.Hash;
464
+ uncles: viem0.Hash[];
465
+ withdrawals?: viem0.Withdrawal[] | undefined | undefined;
466
+ withdrawalsRoot?: `0x${string}` | undefined;
467
+ } & {};
468
+ type: "block";
469
+ };
470
+ readonly transaction: {
471
+ exclude: [] | undefined;
472
+ format: (args: viem_chains0.OpStackRpcTransaction, action?: string | undefined) => ({
473
+ blockHash: `0x${string}` | null;
474
+ blockNumber: bigint | null;
475
+ from: abitype0.Address;
476
+ gas: bigint;
477
+ hash: viem0.Hash;
478
+ input: viem0.Hex;
479
+ nonce: number;
480
+ r: viem0.Hex;
481
+ s: viem0.Hex;
482
+ to: abitype0.Address | null;
483
+ transactionIndex: number | null;
484
+ typeHex: viem0.Hex | null;
485
+ v: bigint;
486
+ value: bigint;
487
+ yParity: number;
488
+ gasPrice?: undefined | undefined;
489
+ maxFeePerBlobGas?: undefined | undefined;
490
+ maxFeePerGas: bigint;
491
+ maxPriorityFeePerGas: bigint;
492
+ isSystemTx?: boolean;
493
+ mint?: bigint | undefined | undefined;
494
+ sourceHash: viem0.Hex;
495
+ type: "deposit";
496
+ } | {
497
+ r: viem0.Hex;
498
+ s: viem0.Hex;
499
+ v: bigint;
500
+ to: abitype0.Address | null;
501
+ from: abitype0.Address;
502
+ gas: bigint;
503
+ nonce: number;
504
+ value: bigint;
505
+ blockHash: `0x${string}` | null;
506
+ blockNumber: bigint | null;
507
+ hash: viem0.Hash;
508
+ input: viem0.Hex;
509
+ transactionIndex: number | null;
510
+ typeHex: viem0.Hex | null;
511
+ accessList?: undefined | undefined;
512
+ authorizationList?: undefined | undefined;
513
+ blobVersionedHashes?: undefined | undefined;
514
+ chainId?: number | undefined;
515
+ yParity?: undefined | undefined;
516
+ type: "legacy";
517
+ gasPrice: bigint;
518
+ maxFeePerBlobGas?: undefined | undefined;
519
+ maxFeePerGas?: undefined | undefined;
520
+ maxPriorityFeePerGas?: undefined | undefined;
521
+ isSystemTx?: undefined | undefined;
522
+ mint?: undefined | undefined;
523
+ sourceHash?: undefined | undefined;
524
+ } | {
525
+ blockHash: `0x${string}` | null;
526
+ blockNumber: bigint | null;
527
+ from: abitype0.Address;
528
+ gas: bigint;
529
+ hash: viem0.Hash;
530
+ input: viem0.Hex;
531
+ nonce: number;
532
+ r: viem0.Hex;
533
+ s: viem0.Hex;
534
+ to: abitype0.Address | null;
535
+ transactionIndex: number | null;
536
+ typeHex: viem0.Hex | null;
537
+ v: bigint;
538
+ value: bigint;
539
+ yParity: number;
540
+ accessList: viem0.AccessList;
541
+ authorizationList?: undefined | undefined;
542
+ blobVersionedHashes?: undefined | undefined;
543
+ chainId: number;
544
+ type: "eip2930";
545
+ gasPrice: bigint;
546
+ maxFeePerBlobGas?: undefined | undefined;
547
+ maxFeePerGas?: undefined | undefined;
548
+ maxPriorityFeePerGas?: undefined | undefined;
549
+ isSystemTx?: undefined | undefined;
550
+ mint?: undefined | undefined;
551
+ sourceHash?: undefined | undefined;
552
+ } | {
553
+ blockHash: `0x${string}` | null;
554
+ blockNumber: bigint | null;
555
+ from: abitype0.Address;
556
+ gas: bigint;
557
+ hash: viem0.Hash;
558
+ input: viem0.Hex;
559
+ nonce: number;
560
+ r: viem0.Hex;
561
+ s: viem0.Hex;
562
+ to: abitype0.Address | null;
563
+ transactionIndex: number | null;
564
+ typeHex: viem0.Hex | null;
565
+ v: bigint;
566
+ value: bigint;
567
+ yParity: number;
568
+ accessList: viem0.AccessList;
569
+ authorizationList?: undefined | undefined;
570
+ blobVersionedHashes?: undefined | undefined;
571
+ chainId: number;
572
+ type: "eip1559";
573
+ gasPrice?: undefined | undefined;
574
+ maxFeePerBlobGas?: undefined | undefined;
575
+ maxFeePerGas: bigint;
576
+ maxPriorityFeePerGas: bigint;
577
+ isSystemTx?: undefined | undefined;
578
+ mint?: undefined | undefined;
579
+ sourceHash?: undefined | undefined;
580
+ } | {
581
+ blockHash: `0x${string}` | null;
582
+ blockNumber: bigint | null;
583
+ from: abitype0.Address;
584
+ gas: bigint;
585
+ hash: viem0.Hash;
586
+ input: viem0.Hex;
587
+ nonce: number;
588
+ r: viem0.Hex;
589
+ s: viem0.Hex;
590
+ to: abitype0.Address | null;
591
+ transactionIndex: number | null;
592
+ typeHex: viem0.Hex | null;
593
+ v: bigint;
594
+ value: bigint;
595
+ yParity: number;
596
+ accessList: viem0.AccessList;
597
+ authorizationList?: undefined | undefined;
598
+ blobVersionedHashes: readonly viem0.Hex[];
599
+ chainId: number;
600
+ type: "eip4844";
601
+ gasPrice?: undefined | undefined;
602
+ maxFeePerBlobGas: bigint;
603
+ maxFeePerGas: bigint;
604
+ maxPriorityFeePerGas: bigint;
605
+ isSystemTx?: undefined | undefined;
606
+ mint?: undefined | undefined;
607
+ sourceHash?: undefined | undefined;
608
+ } | {
609
+ blockHash: `0x${string}` | null;
610
+ blockNumber: bigint | null;
611
+ from: abitype0.Address;
612
+ gas: bigint;
613
+ hash: viem0.Hash;
614
+ input: viem0.Hex;
615
+ nonce: number;
616
+ r: viem0.Hex;
617
+ s: viem0.Hex;
618
+ to: abitype0.Address | null;
619
+ transactionIndex: number | null;
620
+ typeHex: viem0.Hex | null;
621
+ v: bigint;
622
+ value: bigint;
623
+ yParity: number;
624
+ accessList: viem0.AccessList;
625
+ authorizationList: viem0.SignedAuthorizationList;
626
+ blobVersionedHashes?: undefined | undefined;
627
+ chainId: number;
628
+ type: "eip7702";
629
+ gasPrice?: undefined | undefined;
630
+ maxFeePerBlobGas?: undefined | undefined;
631
+ maxFeePerGas: bigint;
632
+ maxPriorityFeePerGas: bigint;
633
+ isSystemTx?: undefined | undefined;
634
+ mint?: undefined | undefined;
635
+ sourceHash?: undefined | undefined;
636
+ }) & {};
637
+ type: "transaction";
638
+ };
639
+ readonly transactionReceipt: {
640
+ exclude: [] | undefined;
641
+ format: (args: viem_chains0.OpStackRpcTransactionReceipt, action?: string | undefined) => {
642
+ blobGasPrice?: bigint | undefined;
643
+ blobGasUsed?: bigint | undefined;
644
+ blockHash: viem0.Hash;
645
+ blockNumber: bigint;
646
+ blockTimestamp?: bigint | undefined;
647
+ contractAddress: abitype0.Address | null | undefined;
648
+ cumulativeGasUsed: bigint;
649
+ effectiveGasPrice: bigint;
650
+ from: abitype0.Address;
651
+ gasUsed: bigint;
652
+ logs: viem0.Log<bigint, number, false>[];
653
+ logsBloom: viem0.Hex;
654
+ root?: `0x${string}` | undefined;
655
+ status: "success" | "reverted";
656
+ to: abitype0.Address | null;
657
+ transactionHash: viem0.Hash;
658
+ transactionIndex: number;
659
+ type: viem0.TransactionType;
660
+ l1GasPrice: bigint | null;
661
+ l1GasUsed: bigint | null;
662
+ l1Fee: bigint | null;
663
+ l1FeeScalar: number | null;
664
+ } & {};
665
+ type: "transactionReceipt";
666
+ };
667
+ };
668
+ prepareTransactionRequest?: ((args: viem0.PrepareTransactionRequestParameters, options: {
669
+ phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
670
+ }) => Promise<viem0.PrepareTransactionRequestParameters>) | [fn: ((args: viem0.PrepareTransactionRequestParameters, options: {
671
+ phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
672
+ }) => Promise<viem0.PrepareTransactionRequestParameters>) | undefined, options: {
673
+ runAt: readonly ("beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters")[];
674
+ }] | undefined;
675
+ serializers: {
676
+ readonly transaction: typeof viem_chains0.serializeTransactionOpStack;
677
+ };
678
+ verifyHash?: ((client: viem0.Client, parameters: viem0.VerifyHashActionParameters) => Promise<viem0.VerifyHashActionReturnType>) | undefined;
679
+ readonly network: "base-sepolia";
680
+ };
681
+ rpcUrl: string;
682
+ caip2: number;
683
+ ipfsGateway: string;
684
+ logWindow: bigint;
685
+ signedUrlWorker: string;
686
+ };
687
+ /**
688
+ * The networks supported by Fangorn, by the name `CHAIN_NAME` takes.
689
+ */
690
+ declare const SupportedNetworks: Record<string, NetworkConfig>;
691
+ /**
692
+ * Get a network's deployment by name ("baseSepolia").
693
+ * @returns The corresponding config if it is supported, otherwise an error
694
+ */
695
+ declare function getNetwork(name: string): NetworkConfig;
696
+ //#endregion
697
+ export { BaseSepoliaConfig, FangornConfig, NetworkConfig, SupportedNetworks, getNetwork as default, nonBlank };