@fangorn-network/sdk 2026.8.12-dev → 2026.9.22-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 (40) hide show
  1. package/README.md +175 -62
  2. package/lib/cli/cli.d.ts +0 -0
  3. package/lib/cli/cli.js +348 -17
  4. package/lib/cli/index.d.ts +13 -13
  5. package/lib/config.d.ts +28 -352
  6. package/lib/config.js +11 -20
  7. package/lib/contracts/app-registry/abi.d.ts +509 -0
  8. package/lib/contracts/app-registry/abi.js +575 -0
  9. package/lib/contracts/app-registry/index.d.ts +120 -0
  10. package/lib/contracts/app-registry/index.js +266 -0
  11. package/lib/contracts/data-registry/abi.d.ts +124 -125
  12. package/lib/contracts/data-registry/abi.js +145 -142
  13. package/lib/contracts/data-registry/index.d.ts +20 -27
  14. package/lib/contracts/data-registry/index.js +32 -78
  15. package/lib/contracts/index.d.ts +8 -3
  16. package/lib/contracts/index.js +8 -3
  17. package/lib/contracts/logs.d.ts +18 -0
  18. package/lib/contracts/logs.js +25 -0
  19. package/lib/contracts/settlement-registry/abi.d.ts +430 -11
  20. package/lib/contracts/settlement-registry/abi.js +528 -41
  21. package/lib/contracts/settlement-registry/index.d.ts +148 -10
  22. package/lib/contracts/settlement-registry/index.js +233 -9
  23. package/lib/contracts/subscription-registry/abi.d.ts +179 -0
  24. package/lib/contracts/subscription-registry/abi.js +195 -0
  25. package/lib/contracts/subscription-registry/index.d.ts +59 -0
  26. package/lib/contracts/subscription-registry/index.js +116 -0
  27. package/lib/contracts/types.d.ts +8 -0
  28. package/lib/contracts/types.js +10 -0
  29. package/lib/contracts/write.d.ts +27 -0
  30. package/lib/contracts/write.js +55 -0
  31. package/lib/crypto/encryption.js +4 -4
  32. package/lib/engine/index.d.ts +14 -12
  33. package/lib/engine/index.js +13 -7
  34. package/lib/fangorn.d.ts +71 -6
  35. package/lib/fangorn.js +86 -7
  36. package/lib/index.d.ts +9 -4
  37. package/lib/index.js +9 -4
  38. package/lib/test/testbed.js +9 -3
  39. package/lib/types/index.d.ts +6 -0
  40. package/package.json +73 -85
package/lib/config.d.ts CHANGED
@@ -1,23 +1,15 @@
1
- import * as viem0 from "viem";
1
+ import * as viem19 from "viem";
2
2
  import { Chain, Hex } from "viem";
3
- import * as viem_chains0 from "viem/chains";
4
- import * as abitype0 from "abitype";
5
3
 
6
4
  //#region src/config.d.ts
7
5
  /**
8
- * Derive an app id from a human-readable name. Apps claim one of these on-chain
9
- * with `registerApp`; it prefixes every namespace key the app's publishers write.
6
+ * Derive an app id from a human-readable name (keccak256(hex(name)).
10
7
  */
11
8
  declare function appId(name: string): Hex;
12
- /** The app every client publishes under until told otherwise. */
13
9
  declare const DEFAULT_APP = "fangorn";
14
- /**
15
- * Accept either form callers have on hand: a human-readable app name, or an
16
- * already-derived app id (32-byte hex), which is what an app owner sees on-chain.
17
- */
18
10
  declare function toAppId(nameOrId: string): Hex;
19
11
  /**
20
- * The networks supproted by Fangorn currently
12
+ * The networks supported by Fangorn currently
21
13
  */
22
14
  declare const SupportedNetworks: {
23
15
  ArbitrumSepolia: {
@@ -55,339 +47,17 @@ declare const SupportedNetworks: {
55
47
  testnet: true;
56
48
  custom?: Record<string, unknown> | undefined;
57
49
  extendSchema?: Record<string, unknown> | undefined;
58
- fees?: viem0.ChainFees<undefined> | undefined;
50
+ fees?: viem19.ChainFees<undefined> | undefined;
59
51
  formatters?: undefined;
60
- prepareTransactionRequest?: ((args: viem0.PrepareTransactionRequestParameters, options: {
52
+ prepareTransactionRequest?: ((args: viem19.PrepareTransactionRequestParameters, options: {
61
53
  phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
62
- }) => Promise<viem0.PrepareTransactionRequestParameters>) | [fn: ((args: viem0.PrepareTransactionRequestParameters, options: {
54
+ }) => Promise<viem19.PrepareTransactionRequestParameters>) | [fn: ((args: viem19.PrepareTransactionRequestParameters, options: {
63
55
  phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
64
- }) => Promise<viem0.PrepareTransactionRequestParameters>) | undefined, options: {
56
+ }) => Promise<viem19.PrepareTransactionRequestParameters>) | undefined, options: {
65
57
  runAt: readonly ("beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters")[];
66
58
  }] | undefined;
67
- serializers?: viem0.ChainSerializers<undefined, viem0.TransactionSerializable> | undefined;
68
- verifyHash?: ((client: viem0.Client, parameters: viem0.VerifyHashActionParameters) => Promise<viem0.VerifyHashActionReturnType>) | undefined;
69
- };
70
- };
71
- BaseSepolia: {
72
- name: string;
73
- chain: {
74
- blockExplorers: {
75
- readonly default: {
76
- readonly name: "Basescan";
77
- readonly url: "https://sepolia.basescan.org";
78
- readonly apiUrl: "https://api-sepolia.basescan.org/api";
79
- };
80
- };
81
- blockTime: 2000;
82
- contracts: {
83
- readonly disputeGameFactory: {
84
- readonly 11155111: {
85
- readonly address: "0xd6E6dBf4F7EA0ac412fD8b65ED297e64BB7a06E1";
86
- };
87
- };
88
- readonly l2OutputOracle: {
89
- readonly 11155111: {
90
- readonly address: "0x84457ca9D0163FbC4bbfe4Dfbb20ba46e48DF254";
91
- };
92
- };
93
- readonly portal: {
94
- readonly 11155111: {
95
- readonly address: "0x49f53e41452c74589e85ca1677426ba426459e85";
96
- readonly blockCreated: 4446677;
97
- };
98
- };
99
- readonly l1StandardBridge: {
100
- readonly 11155111: {
101
- readonly address: "0xfd0Bf71F60660E2f608ed56e1659C450eB113120";
102
- readonly blockCreated: 4446677;
103
- };
104
- };
105
- readonly multicall3: {
106
- readonly address: "0xca11bde05977b3631167028862be2a173976ca11";
107
- readonly blockCreated: 1059647;
108
- };
109
- readonly gasPriceOracle: {
110
- readonly address: "0x420000000000000000000000000000000000000F";
111
- };
112
- readonly l1Block: {
113
- readonly address: "0x4200000000000000000000000000000000000015";
114
- };
115
- readonly l2CrossDomainMessenger: {
116
- readonly address: "0x4200000000000000000000000000000000000007";
117
- };
118
- readonly l2Erc721Bridge: {
119
- readonly address: "0x4200000000000000000000000000000000000014";
120
- };
121
- readonly l2StandardBridge: {
122
- readonly address: "0x4200000000000000000000000000000000000010";
123
- };
124
- readonly l2ToL1MessagePasser: {
125
- readonly address: "0x4200000000000000000000000000000000000016";
126
- };
127
- };
128
- ensTlds?: readonly string[] | undefined;
129
- id: 84532;
130
- name: "Base Sepolia";
131
- nativeCurrency: {
132
- readonly name: "Sepolia Ether";
133
- readonly symbol: "ETH";
134
- readonly decimals: 18;
135
- };
136
- experimental_preconfirmationTime?: number | undefined | undefined;
137
- rpcUrls: {
138
- readonly default: {
139
- readonly http: readonly ["https://sepolia.base.org"];
140
- };
141
- };
142
- sourceId: 11155111;
143
- testnet: true;
144
- custom?: Record<string, unknown> | undefined;
145
- extendSchema?: Record<string, unknown> | undefined;
146
- fees?: viem0.ChainFees<undefined> | undefined;
147
- formatters: {
148
- readonly block: {
149
- exclude: [] | undefined;
150
- format: (args: viem_chains0.OpStackRpcBlock, action?: string | undefined) => {
151
- baseFeePerGas: bigint | null;
152
- blobGasUsed: bigint;
153
- difficulty: bigint;
154
- excessBlobGas: bigint;
155
- extraData: viem0.Hex;
156
- gasLimit: bigint;
157
- gasUsed: bigint;
158
- hash: `0x${string}` | null;
159
- logsBloom: `0x${string}` | null;
160
- miner: abitype0.Address;
161
- mixHash: viem0.Hash;
162
- nonce: `0x${string}` | null;
163
- number: bigint | null;
164
- parentBeaconBlockRoot?: `0x${string}` | undefined;
165
- parentHash: viem0.Hash;
166
- receiptsRoot: viem0.Hex;
167
- sealFields: viem0.Hex[];
168
- sha3Uncles: viem0.Hash;
169
- size: bigint;
170
- stateRoot: viem0.Hash;
171
- timestamp: bigint;
172
- totalDifficulty: bigint | null;
173
- transactions: `0x${string}`[] | viem_chains0.OpStackTransaction<boolean>[];
174
- transactionsRoot: viem0.Hash;
175
- uncles: viem0.Hash[];
176
- withdrawals?: viem0.Withdrawal[] | undefined | undefined;
177
- withdrawalsRoot?: `0x${string}` | undefined;
178
- } & {};
179
- type: "block";
180
- };
181
- readonly transaction: {
182
- exclude: [] | undefined;
183
- format: (args: viem_chains0.OpStackRpcTransaction, action?: string | undefined) => ({
184
- blockHash: `0x${string}` | null;
185
- blockNumber: bigint | null;
186
- from: abitype0.Address;
187
- gas: bigint;
188
- hash: viem0.Hash;
189
- input: viem0.Hex;
190
- nonce: number;
191
- r: viem0.Hex;
192
- s: viem0.Hex;
193
- to: abitype0.Address | null;
194
- transactionIndex: number | null;
195
- typeHex: viem0.Hex | null;
196
- v: bigint;
197
- value: bigint;
198
- yParity: number;
199
- gasPrice?: undefined | undefined;
200
- maxFeePerBlobGas?: undefined | undefined;
201
- maxFeePerGas: bigint;
202
- maxPriorityFeePerGas: bigint;
203
- isSystemTx?: boolean;
204
- mint?: bigint | undefined | undefined;
205
- sourceHash: viem0.Hex;
206
- type: "deposit";
207
- } | {
208
- r: viem0.Hex;
209
- s: viem0.Hex;
210
- v: bigint;
211
- to: abitype0.Address | null;
212
- from: abitype0.Address;
213
- gas: bigint;
214
- nonce: number;
215
- value: bigint;
216
- blockHash: `0x${string}` | null;
217
- blockNumber: bigint | null;
218
- hash: viem0.Hash;
219
- input: viem0.Hex;
220
- transactionIndex: number | null;
221
- typeHex: viem0.Hex | null;
222
- accessList?: undefined | undefined;
223
- authorizationList?: undefined | undefined;
224
- blobVersionedHashes?: undefined | undefined;
225
- chainId?: number | undefined;
226
- yParity?: undefined | undefined;
227
- type: "legacy";
228
- gasPrice: bigint;
229
- maxFeePerBlobGas?: undefined | undefined;
230
- maxFeePerGas?: undefined | undefined;
231
- maxPriorityFeePerGas?: undefined | undefined;
232
- isSystemTx?: undefined | undefined;
233
- mint?: undefined | undefined;
234
- sourceHash?: undefined | undefined;
235
- } | {
236
- blockHash: `0x${string}` | null;
237
- blockNumber: bigint | null;
238
- from: abitype0.Address;
239
- gas: bigint;
240
- hash: viem0.Hash;
241
- input: viem0.Hex;
242
- nonce: number;
243
- r: viem0.Hex;
244
- s: viem0.Hex;
245
- to: abitype0.Address | null;
246
- transactionIndex: number | null;
247
- typeHex: viem0.Hex | null;
248
- v: bigint;
249
- value: bigint;
250
- yParity: number;
251
- accessList: viem0.AccessList;
252
- authorizationList?: undefined | undefined;
253
- blobVersionedHashes?: undefined | undefined;
254
- chainId: number;
255
- type: "eip2930";
256
- gasPrice: bigint;
257
- maxFeePerBlobGas?: undefined | undefined;
258
- maxFeePerGas?: undefined | undefined;
259
- maxPriorityFeePerGas?: undefined | undefined;
260
- isSystemTx?: undefined | undefined;
261
- mint?: undefined | undefined;
262
- sourceHash?: undefined | undefined;
263
- } | {
264
- blockHash: `0x${string}` | null;
265
- blockNumber: bigint | null;
266
- from: abitype0.Address;
267
- gas: bigint;
268
- hash: viem0.Hash;
269
- input: viem0.Hex;
270
- nonce: number;
271
- r: viem0.Hex;
272
- s: viem0.Hex;
273
- to: abitype0.Address | null;
274
- transactionIndex: number | null;
275
- typeHex: viem0.Hex | null;
276
- v: bigint;
277
- value: bigint;
278
- yParity: number;
279
- accessList: viem0.AccessList;
280
- authorizationList?: undefined | undefined;
281
- blobVersionedHashes?: undefined | undefined;
282
- chainId: number;
283
- type: "eip1559";
284
- gasPrice?: undefined | undefined;
285
- maxFeePerBlobGas?: undefined | undefined;
286
- maxFeePerGas: bigint;
287
- maxPriorityFeePerGas: bigint;
288
- isSystemTx?: undefined | undefined;
289
- mint?: undefined | undefined;
290
- sourceHash?: undefined | undefined;
291
- } | {
292
- blockHash: `0x${string}` | null;
293
- blockNumber: bigint | null;
294
- from: abitype0.Address;
295
- gas: bigint;
296
- hash: viem0.Hash;
297
- input: viem0.Hex;
298
- nonce: number;
299
- r: viem0.Hex;
300
- s: viem0.Hex;
301
- to: abitype0.Address | null;
302
- transactionIndex: number | null;
303
- typeHex: viem0.Hex | null;
304
- v: bigint;
305
- value: bigint;
306
- yParity: number;
307
- accessList: viem0.AccessList;
308
- authorizationList?: undefined | undefined;
309
- blobVersionedHashes: readonly viem0.Hex[];
310
- chainId: number;
311
- type: "eip4844";
312
- gasPrice?: undefined | undefined;
313
- maxFeePerBlobGas: bigint;
314
- maxFeePerGas: bigint;
315
- maxPriorityFeePerGas: bigint;
316
- isSystemTx?: undefined | undefined;
317
- mint?: undefined | undefined;
318
- sourceHash?: undefined | undefined;
319
- } | {
320
- blockHash: `0x${string}` | null;
321
- blockNumber: bigint | null;
322
- from: abitype0.Address;
323
- gas: bigint;
324
- hash: viem0.Hash;
325
- input: viem0.Hex;
326
- nonce: number;
327
- r: viem0.Hex;
328
- s: viem0.Hex;
329
- to: abitype0.Address | null;
330
- transactionIndex: number | null;
331
- typeHex: viem0.Hex | null;
332
- v: bigint;
333
- value: bigint;
334
- yParity: number;
335
- accessList: viem0.AccessList;
336
- authorizationList: viem0.SignedAuthorizationList;
337
- blobVersionedHashes?: undefined | undefined;
338
- chainId: number;
339
- type: "eip7702";
340
- gasPrice?: undefined | undefined;
341
- maxFeePerBlobGas?: undefined | undefined;
342
- maxFeePerGas: bigint;
343
- maxPriorityFeePerGas: bigint;
344
- isSystemTx?: undefined | undefined;
345
- mint?: undefined | undefined;
346
- sourceHash?: undefined | undefined;
347
- }) & {};
348
- type: "transaction";
349
- };
350
- readonly transactionReceipt: {
351
- exclude: [] | undefined;
352
- format: (args: viem_chains0.OpStackRpcTransactionReceipt, action?: string | undefined) => {
353
- blobGasPrice?: bigint | undefined;
354
- blobGasUsed?: bigint | undefined;
355
- blockHash: viem0.Hash;
356
- blockNumber: bigint;
357
- blockTimestamp?: bigint | undefined;
358
- contractAddress: abitype0.Address | null | undefined;
359
- cumulativeGasUsed: bigint;
360
- effectiveGasPrice: bigint;
361
- from: abitype0.Address;
362
- gasUsed: bigint;
363
- logs: viem0.Log<bigint, number, false>[];
364
- logsBloom: viem0.Hex;
365
- root?: `0x${string}` | undefined;
366
- status: "success" | "reverted";
367
- to: abitype0.Address | null;
368
- transactionHash: viem0.Hash;
369
- transactionIndex: number;
370
- type: viem0.TransactionType;
371
- l1GasPrice: bigint | null;
372
- l1GasUsed: bigint | null;
373
- l1Fee: bigint | null;
374
- l1FeeScalar: number | null;
375
- } & {};
376
- type: "transactionReceipt";
377
- };
378
- };
379
- prepareTransactionRequest?: ((args: viem0.PrepareTransactionRequestParameters, options: {
380
- phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
381
- }) => Promise<viem0.PrepareTransactionRequestParameters>) | [fn: ((args: viem0.PrepareTransactionRequestParameters, options: {
382
- phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
383
- }) => Promise<viem0.PrepareTransactionRequestParameters>) | undefined, options: {
384
- runAt: readonly ("beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters")[];
385
- }] | undefined;
386
- serializers: {
387
- readonly transaction: typeof viem_chains0.serializeTransactionOpStack;
388
- };
389
- verifyHash?: ((client: viem0.Client, parameters: viem0.VerifyHashActionParameters) => Promise<viem0.VerifyHashActionReturnType>) | undefined;
390
- readonly network: "base-sepolia";
59
+ serializers?: viem19.ChainSerializers<undefined, viem19.TransactionSerializable> | undefined;
60
+ verifyHash?: ((client: viem19.Client, parameters: viem19.VerifyHashActionParameters) => Promise<viem19.VerifyHashActionReturnType>) | undefined;
391
61
  };
392
62
  };
393
63
  };
@@ -429,27 +99,33 @@ declare function getNetwork(name: string): {
429
99
  testnet: true;
430
100
  custom?: Record<string, unknown> | undefined;
431
101
  extendSchema?: Record<string, unknown> | undefined;
432
- fees?: viem0.ChainFees<undefined> | undefined;
102
+ fees?: viem19.ChainFees<undefined> | undefined;
433
103
  formatters?: undefined;
434
- prepareTransactionRequest?: ((args: viem0.PrepareTransactionRequestParameters, options: {
104
+ prepareTransactionRequest?: ((args: viem19.PrepareTransactionRequestParameters, options: {
435
105
  phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
436
- }) => Promise<viem0.PrepareTransactionRequestParameters>) | [fn: ((args: viem0.PrepareTransactionRequestParameters, options: {
106
+ }) => Promise<viem19.PrepareTransactionRequestParameters>) | [fn: ((args: viem19.PrepareTransactionRequestParameters, options: {
437
107
  phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
438
- }) => Promise<viem0.PrepareTransactionRequestParameters>) | undefined, options: {
108
+ }) => Promise<viem19.PrepareTransactionRequestParameters>) | undefined, options: {
439
109
  runAt: readonly ("beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters")[];
440
110
  }] | undefined;
441
- serializers?: viem0.ChainSerializers<undefined, viem0.TransactionSerializable> | undefined;
442
- verifyHash?: ((client: viem0.Client, parameters: viem0.VerifyHashActionParameters) => Promise<viem0.VerifyHashActionReturnType>) | undefined;
111
+ serializers?: viem19.ChainSerializers<undefined, viem19.TransactionSerializable> | undefined;
112
+ verifyHash?: ((client: viem19.Client, parameters: viem19.VerifyHashActionParameters) => Promise<viem19.VerifyHashActionReturnType>) | undefined;
443
113
  };
444
114
  interface AppConfig {
445
115
  dataRegistryContractAddress: Hex;
116
+ appRegistryContractAddress: Hex;
117
+ subscriptionRegistryContractAddress: Hex;
118
+ settlementRegistryContractAddress: Hex;
446
119
  chain: Chain;
447
120
  rpcUrl: string;
448
121
  caip2: number;
449
122
  ipfsGateway: string;
450
123
  }
451
124
  declare const FangornConfig: {
452
- dataRegistryContractAddress: "0x9dfa1680e682e0fc79c5904ab453c04c7252572c";
125
+ dataRegistryContractAddress: "0x775026e905d7b58b34d16bcbd385fa630ee36c26";
126
+ appRegistryContractAddress: "0x11d228c4774af3d9cae3b4b6874a12576a1a83ec";
127
+ subscriptionRegistryContractAddress: "0x9c599136b195d70edea0106017fdf081a0401f9d";
128
+ settlementRegistryContractAddress: "0xbbecb93142d1a5144260d2c30fe3c4a11fdda346";
453
129
  chain: {
454
130
  blockExplorers: {
455
131
  readonly default: {
@@ -483,17 +159,17 @@ declare const FangornConfig: {
483
159
  testnet: true;
484
160
  custom?: Record<string, unknown> | undefined;
485
161
  extendSchema?: Record<string, unknown> | undefined;
486
- fees?: viem0.ChainFees<undefined> | undefined;
162
+ fees?: viem19.ChainFees<undefined> | undefined;
487
163
  formatters?: undefined;
488
- prepareTransactionRequest?: ((args: viem0.PrepareTransactionRequestParameters, options: {
164
+ prepareTransactionRequest?: ((args: viem19.PrepareTransactionRequestParameters, options: {
489
165
  phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
490
- }) => Promise<viem0.PrepareTransactionRequestParameters>) | [fn: ((args: viem0.PrepareTransactionRequestParameters, options: {
166
+ }) => Promise<viem19.PrepareTransactionRequestParameters>) | [fn: ((args: viem19.PrepareTransactionRequestParameters, options: {
491
167
  phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
492
- }) => Promise<viem0.PrepareTransactionRequestParameters>) | undefined, options: {
168
+ }) => Promise<viem19.PrepareTransactionRequestParameters>) | undefined, options: {
493
169
  runAt: readonly ("beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters")[];
494
170
  }] | undefined;
495
- serializers?: viem0.ChainSerializers<undefined, viem0.TransactionSerializable> | undefined;
496
- verifyHash?: ((client: viem0.Client, parameters: viem0.VerifyHashActionParameters) => Promise<viem0.VerifyHashActionReturnType>) | undefined;
171
+ serializers?: viem19.ChainSerializers<undefined, viem19.TransactionSerializable> | undefined;
172
+ verifyHash?: ((client: viem19.Client, parameters: viem19.VerifyHashActionParameters) => Promise<viem19.VerifyHashActionReturnType>) | undefined;
497
173
  };
498
174
  rpcUrl: string;
499
175
  caip2: number;
package/lib/config.js CHANGED
@@ -1,36 +1,24 @@
1
1
  import { keccak256, toHex } from "viem";
2
- import { arbitrumSepolia, baseSepolia } from "viem/chains";
2
+ import { arbitrumSepolia } from "viem/chains";
3
3
 
4
4
  //#region src/config.ts
5
5
  /**
6
- * Derive an app id from a human-readable name. Apps claim one of these on-chain
7
- * with `registerApp`; it prefixes every namespace key the app's publishers write.
6
+ * Derive an app id from a human-readable name (keccak256(hex(name)).
8
7
  */
9
8
  function appId(name) {
10
9
  return keccak256(toHex(name));
11
10
  }
12
- /** The app every client publishes under until told otherwise. */
13
11
  const DEFAULT_APP = "fangorn";
14
- /**
15
- * Accept either form callers have on hand: a human-readable app name, or an
16
- * already-derived app id (32-byte hex), which is what an app owner sees on-chain.
17
- */
18
12
  function toAppId(nameOrId) {
19
13
  return /^0x[0-9a-fA-F]{64}$/.test(nameOrId) ? nameOrId : appId(nameOrId);
20
14
  }
21
15
  /**
22
- * The networks supproted by Fangorn currently
16
+ * The networks supported by Fangorn currently
23
17
  */
24
- const SupportedNetworks = {
25
- ArbitrumSepolia: {
26
- name: "arbitrumSepolia",
27
- chain: arbitrumSepolia
28
- },
29
- BaseSepolia: {
30
- name: "baseSepolia",
31
- chain: baseSepolia
32
- }
33
- };
18
+ const SupportedNetworks = { ArbitrumSepolia: {
19
+ name: "arbitrumSepolia",
20
+ chain: arbitrumSepolia
21
+ } };
34
22
  /**
35
23
  * Get the network based on the string name
36
24
  * @param name "arbitrumSepolia" is the only one supported right now
@@ -41,7 +29,10 @@ function getNetwork(name) {
41
29
  throw new Error(`Chain ${name} is not supported`);
42
30
  }
43
31
  const FangornConfig = {
44
- dataRegistryContractAddress: "0x9dfa1680e682e0fc79c5904ab453c04c7252572c",
32
+ dataRegistryContractAddress: "0x775026e905d7b58b34d16bcbd385fa630ee36c26",
33
+ appRegistryContractAddress: "0x11d228c4774af3d9cae3b4b6874a12576a1a83ec",
34
+ subscriptionRegistryContractAddress: "0x9c599136b195d70edea0106017fdf081a0401f9d",
35
+ settlementRegistryContractAddress: "0xbbecb93142d1a5144260d2c30fe3c4a11fdda346",
45
36
  chain: arbitrumSepolia,
46
37
  rpcUrl: "https://sepolia-rollup.arbitrum.io/rpc",
47
38
  caip2: 421614,