@fangorn-network/sdk 2026.9.22-dev → 2026.10.1-9.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 (91) hide show
  1. package/README.md +190 -194
  2. package/lib/cli/cli.d.ts +0 -0
  3. package/lib/cli/cli.js +177 -201
  4. package/lib/cli/index.d.ts +3 -91
  5. package/lib/cli/index.js +5 -2
  6. package/lib/config.d.ts +358 -117
  7. package/lib/config.js +43 -23
  8. package/lib/contracts/app-registry/abi.d.ts +1033 -277
  9. package/lib/contracts/app-registry/abi.js +1214 -335
  10. package/lib/contracts/app-registry/index.d.ts +105 -65
  11. package/lib/contracts/app-registry/index.js +182 -175
  12. package/lib/contracts/data-registry/abi.d.ts +166 -187
  13. package/lib/contracts/data-registry/abi.js +207 -237
  14. package/lib/contracts/data-registry/index.d.ts +4 -151
  15. package/lib/contracts/data-registry/index.js +5 -279
  16. package/lib/contracts/index.d.ts +6 -7
  17. package/lib/contracts/index.js +6 -8
  18. package/lib/contracts/logs.d.ts +4 -1
  19. package/lib/contracts/logs.js +9 -2
  20. package/lib/contracts/membership-registry/abi.d.ts +1145 -0
  21. package/lib/contracts/membership-registry/abi.js +1333 -0
  22. package/lib/contracts/membership-registry/index.d.ts +79 -0
  23. package/lib/contracts/membership-registry/index.js +104 -0
  24. package/lib/contracts/types.d.ts +3 -1
  25. package/lib/contracts/types.js +3 -1
  26. package/lib/contracts/write.d.ts +34 -2
  27. package/lib/contracts/write.js +48 -1
  28. package/lib/crypto/encryption.js +4 -4
  29. package/lib/engine/car.d.ts +2 -2
  30. package/lib/engine/car.js +10 -5
  31. package/lib/engine/index.d.ts +99 -143
  32. package/lib/engine/index.js +156 -295
  33. package/lib/engine/records.d.ts +110 -0
  34. package/lib/engine/records.js +165 -0
  35. package/lib/engine/test-helpers.d.ts +7 -14
  36. package/lib/engine/test-helpers.js +7 -18
  37. package/lib/fangorn.d.ts +129 -156
  38. package/lib/fangorn.js +250 -250
  39. package/lib/feed.d.ts +7 -4
  40. package/lib/feed.js +4 -1
  41. package/lib/index.d.ts +9 -9
  42. package/lib/index.js +8 -9
  43. package/lib/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.js +77 -0
  44. package/lib/node_modules/@vitest/expect/dist/index.js +1414 -0
  45. package/lib/node_modules/@vitest/pretty-format/dist/index.js +858 -0
  46. package/lib/node_modules/@vitest/runner/dist/chunk-tasks.js +51 -0
  47. package/lib/node_modules/@vitest/runner/dist/index.js +1199 -0
  48. package/lib/node_modules/@vitest/runner/dist/utils.js +3 -0
  49. package/lib/node_modules/@vitest/snapshot/dist/index.js +1075 -0
  50. package/lib/node_modules/@vitest/spy/dist/index.js +353 -0
  51. package/lib/node_modules/@vitest/utils/dist/chunk-_commonjsHelpers.js +7 -0
  52. package/lib/node_modules/@vitest/utils/dist/chunk-pathe.M-eThtNZ.js +81 -0
  53. package/lib/node_modules/@vitest/utils/dist/diff.js +1345 -0
  54. package/lib/node_modules/@vitest/utils/dist/display.js +534 -0
  55. package/lib/node_modules/@vitest/utils/dist/error.js +30 -0
  56. package/lib/node_modules/@vitest/utils/dist/helpers.js +118 -0
  57. package/lib/node_modules/@vitest/utils/dist/serialize.js +76 -0
  58. package/lib/node_modules/@vitest/utils/dist/source-map.js +93 -0
  59. package/lib/node_modules/@vitest/utils/dist/timers.js +36 -0
  60. package/lib/node_modules/chai/index.js +2874 -0
  61. package/lib/node_modules/magic-string/dist/magic-string.es.js +939 -0
  62. package/lib/node_modules/pathe/dist/shared/pathe.M-eThtNZ.js +81 -0
  63. package/lib/node_modules/tinyrainbow/dist/index.js +85 -0
  64. package/lib/node_modules/vitest/dist/chunks/_commonjsHelpers.D26ty3Ew.js +5 -0
  65. package/lib/node_modules/vitest/dist/chunks/date.Bq6ZW5rf.js +50 -0
  66. package/lib/node_modules/vitest/dist/chunks/utils.DvEY5TfP.js +44 -0
  67. package/lib/node_modules/vitest/dist/chunks/vi.2VT5v0um.js +2578 -0
  68. package/lib/providers/storage/signed-url.d.ts +16 -6
  69. package/lib/providers/storage/signed-url.js +20 -8
  70. package/lib/registry.d.ts +116 -0
  71. package/lib/registry.js +182 -0
  72. package/lib/test/mem-registry.d.ts +51 -0
  73. package/lib/test/mem-registry.js +107 -0
  74. package/lib/test/sdk-suite.d.ts +13 -0
  75. package/lib/test/sdk-suite.js +226 -0
  76. package/lib/test/testbed.d.ts +16411 -61
  77. package/lib/test/testbed.js +190 -84
  78. package/lib/types/index.d.ts +13 -11
  79. package/package.json +89 -73
  80. package/lib/contracts/data-registry/test.d.ts +0 -1
  81. package/lib/contracts/data-registry/test.js +0 -1
  82. package/lib/contracts/settlement-registry/abi.d.ts +0 -466
  83. package/lib/contracts/settlement-registry/abi.js +0 -535
  84. package/lib/contracts/settlement-registry/index.d.ts +0 -163
  85. package/lib/contracts/settlement-registry/index.js +0 -264
  86. package/lib/contracts/subscription-registry/abi.d.ts +0 -179
  87. package/lib/contracts/subscription-registry/abi.js +0 -195
  88. package/lib/contracts/subscription-registry/index.d.ts +0 -59
  89. package/lib/contracts/subscription-registry/index.js +0 -116
  90. package/lib/engine/graph.d.ts +0 -70
  91. package/lib/engine/graph.js +0 -73
@@ -1,98 +1,10 @@
1
1
  import "./cli.js";
2
- import * as viem0 from "viem";
2
+ import * as viem5646 from "viem";
3
3
 
4
4
  //#region src/cli/index.d.ts
5
- declare const getChain: (chainStr: string) => {
6
- blockExplorers: {
7
- readonly default: {
8
- readonly name: "Arbiscan";
9
- readonly url: "https://sepolia.arbiscan.io";
10
- readonly apiUrl: "https://api-sepolia.arbiscan.io/api";
11
- };
12
- };
13
- blockTime: 250;
14
- contracts: {
15
- readonly multicall3: {
16
- readonly address: "0xca11bde05977b3631167028862be2a173976ca11";
17
- readonly blockCreated: 81930;
18
- };
19
- };
20
- ensTlds?: readonly string[] | undefined;
21
- id: 421614;
22
- name: "Arbitrum Sepolia";
23
- nativeCurrency: {
24
- readonly name: "Arbitrum Sepolia Ether";
25
- readonly symbol: "ETH";
26
- readonly decimals: 18;
27
- };
28
- experimental_preconfirmationTime?: number | undefined | undefined;
29
- rpcUrls: {
30
- readonly default: {
31
- readonly http: readonly ["https://sepolia-rollup.arbitrum.io/rpc"];
32
- };
33
- };
34
- sourceId?: number | undefined | undefined;
35
- testnet: true;
36
- custom?: Record<string, unknown> | undefined;
37
- extendSchema?: Record<string, unknown> | undefined;
38
- fees?: viem0.ChainFees<undefined> | undefined;
39
- formatters?: undefined;
40
- prepareTransactionRequest?: ((args: viem0.PrepareTransactionRequestParameters, options: {
41
- phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
42
- }) => Promise<viem0.PrepareTransactionRequestParameters>) | [fn: ((args: viem0.PrepareTransactionRequestParameters, options: {
43
- phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
44
- }) => Promise<viem0.PrepareTransactionRequestParameters>) | undefined, options: {
45
- runAt: readonly ("beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters")[];
46
- }] | undefined;
47
- serializers?: viem0.ChainSerializers<undefined, viem0.TransactionSerializable> | undefined;
48
- verifyHash?: ((client: viem0.Client, parameters: viem0.VerifyHashActionParameters) => Promise<viem0.VerifyHashActionReturnType>) | undefined;
49
- };
5
+ declare const getChain: (chainStr: string) => viem5646.Chain;
50
6
  declare const handleCancel: (value: unknown) => void;
51
- declare const selectChain: () => Promise<{
52
- blockExplorers: {
53
- readonly default: {
54
- readonly name: "Arbiscan";
55
- readonly url: "https://sepolia.arbiscan.io";
56
- readonly apiUrl: "https://api-sepolia.arbiscan.io/api";
57
- };
58
- };
59
- blockTime: 250;
60
- contracts: {
61
- readonly multicall3: {
62
- readonly address: "0xca11bde05977b3631167028862be2a173976ca11";
63
- readonly blockCreated: 81930;
64
- };
65
- };
66
- ensTlds?: readonly string[] | undefined;
67
- id: 421614;
68
- name: "Arbitrum Sepolia";
69
- nativeCurrency: {
70
- readonly name: "Arbitrum Sepolia Ether";
71
- readonly symbol: "ETH";
72
- readonly decimals: 18;
73
- };
74
- experimental_preconfirmationTime?: number | undefined | undefined;
75
- rpcUrls: {
76
- readonly default: {
77
- readonly http: readonly ["https://sepolia-rollup.arbitrum.io/rpc"];
78
- };
79
- };
80
- sourceId?: number | undefined | undefined;
81
- testnet: true;
82
- custom?: Record<string, unknown> | undefined;
83
- extendSchema?: Record<string, unknown> | undefined;
84
- fees?: viem0.ChainFees<undefined> | undefined;
85
- formatters?: undefined;
86
- prepareTransactionRequest?: ((args: viem0.PrepareTransactionRequestParameters, options: {
87
- phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
88
- }) => Promise<viem0.PrepareTransactionRequestParameters>) | [fn: ((args: viem0.PrepareTransactionRequestParameters, options: {
89
- phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
90
- }) => Promise<viem0.PrepareTransactionRequestParameters>) | undefined, options: {
91
- runAt: readonly ("beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters")[];
92
- }] | undefined;
93
- serializers?: viem0.ChainSerializers<undefined, viem0.TransactionSerializable> | undefined;
94
- verifyHash?: ((client: viem0.Client, parameters: viem0.VerifyHashActionParameters) => Promise<viem0.VerifyHashActionReturnType>) | undefined;
95
- }>;
7
+ declare const selectChain: () => Promise<string>;
96
8
  declare function parseGadgetArg(raw: string): {
97
9
  type: string;
98
10
  args: string[];
package/lib/cli/index.js CHANGED
@@ -4,7 +4,7 @@ import { isCancel, select } from "@clack/prompts";
4
4
 
5
5
  //#region src/cli/index.ts
6
6
  const getChain = (chainStr) => {
7
- return getNetwork(chainStr);
7
+ return getNetwork(chainStr).chain;
8
8
  };
9
9
  const handleCancel = (value) => {
10
10
  if (isCancel(value)) process.exit(0);
@@ -15,10 +15,13 @@ const selectChain = async () => {
15
15
  options: [{
16
16
  value: "arbitrumSepolia",
17
17
  label: "Arbitrum Sepolia"
18
+ }, {
19
+ value: "baseSepolia",
20
+ label: "Base Sepolia"
18
21
  }]
19
22
  });
20
23
  handleCancel(chainChoice);
21
- return getNetwork(chainChoice.toString());
24
+ return chainChoice.toString();
22
25
  };
23
26
  function parseGadgetArg(raw) {
24
27
  const match = /^(\w+)\(([^)]*)\)$/.exec(raw);
package/lib/config.d.ts CHANGED
@@ -1,131 +1,35 @@
1
- import * as viem19 from "viem";
1
+ import * as viem0 from "viem";
2
2
  import { Chain, Hex } from "viem";
3
+ import * as viem_chains0 from "viem/chains";
4
+ import * as abitype0 from "abitype";
3
5
 
4
6
  //#region src/config.d.ts
5
7
  /**
6
8
  * Derive an app id from a human-readable name (keccak256(hex(name)).
7
9
  */
8
10
  declare function appId(name: string): Hex;
9
- declare const DEFAULT_APP = "fangorn";
10
- declare function toAppId(nameOrId: string): Hex;
11
11
  /**
12
- * The networks supported by Fangorn currently
12
+ * Blank input means "not set", never an app called "". Returns the trimmed value,
13
+ * or undefined when it is missing or only whitespace, so it can sit on the left of
14
+ * a `??` fallback. `??` on the raw value would let "" through: it is not nullish.
13
15
  */
14
- declare const SupportedNetworks: {
15
- ArbitrumSepolia: {
16
- name: string;
17
- chain: {
18
- blockExplorers: {
19
- readonly default: {
20
- readonly name: "Arbiscan";
21
- readonly url: "https://sepolia.arbiscan.io";
22
- readonly apiUrl: "https://api-sepolia.arbiscan.io/api";
23
- };
24
- };
25
- blockTime: 250;
26
- contracts: {
27
- readonly multicall3: {
28
- readonly address: "0xca11bde05977b3631167028862be2a173976ca11";
29
- readonly blockCreated: 81930;
30
- };
31
- };
32
- ensTlds?: readonly string[] | undefined;
33
- id: 421614;
34
- name: "Arbitrum Sepolia";
35
- nativeCurrency: {
36
- readonly name: "Arbitrum Sepolia Ether";
37
- readonly symbol: "ETH";
38
- readonly decimals: 18;
39
- };
40
- experimental_preconfirmationTime?: number | undefined | undefined;
41
- rpcUrls: {
42
- readonly default: {
43
- readonly http: readonly ["https://sepolia-rollup.arbitrum.io/rpc"];
44
- };
45
- };
46
- sourceId?: number | undefined | undefined;
47
- testnet: true;
48
- custom?: Record<string, unknown> | undefined;
49
- extendSchema?: Record<string, unknown> | undefined;
50
- fees?: viem19.ChainFees<undefined> | undefined;
51
- formatters?: undefined;
52
- prepareTransactionRequest?: ((args: viem19.PrepareTransactionRequestParameters, options: {
53
- phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
54
- }) => Promise<viem19.PrepareTransactionRequestParameters>) | [fn: ((args: viem19.PrepareTransactionRequestParameters, options: {
55
- phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
56
- }) => Promise<viem19.PrepareTransactionRequestParameters>) | undefined, options: {
57
- runAt: readonly ("beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters")[];
58
- }] | undefined;
59
- serializers?: viem19.ChainSerializers<undefined, viem19.TransactionSerializable> | undefined;
60
- verifyHash?: ((client: viem19.Client, parameters: viem19.VerifyHashActionParameters) => Promise<viem19.VerifyHashActionReturnType>) | undefined;
61
- };
62
- };
63
- };
64
- /**
65
- * Get the network based on the string name
66
- * @param name "arbitrumSepolia" is the only one supported right now
67
- * @returns The corresponding network if it is supported, otherwise an error
68
- */
69
- declare function getNetwork(name: string): {
70
- blockExplorers: {
71
- readonly default: {
72
- readonly name: "Arbiscan";
73
- readonly url: "https://sepolia.arbiscan.io";
74
- readonly apiUrl: "https://api-sepolia.arbiscan.io/api";
75
- };
76
- };
77
- blockTime: 250;
78
- contracts: {
79
- readonly multicall3: {
80
- readonly address: "0xca11bde05977b3631167028862be2a173976ca11";
81
- readonly blockCreated: 81930;
82
- };
83
- };
84
- ensTlds?: readonly string[] | undefined;
85
- id: 421614;
86
- name: "Arbitrum Sepolia";
87
- nativeCurrency: {
88
- readonly name: "Arbitrum Sepolia Ether";
89
- readonly symbol: "ETH";
90
- readonly decimals: 18;
91
- };
92
- experimental_preconfirmationTime?: number | undefined | undefined;
93
- rpcUrls: {
94
- readonly default: {
95
- readonly http: readonly ["https://sepolia-rollup.arbitrum.io/rpc"];
96
- };
97
- };
98
- sourceId?: number | undefined | undefined;
99
- testnet: true;
100
- custom?: Record<string, unknown> | undefined;
101
- extendSchema?: Record<string, unknown> | undefined;
102
- fees?: viem19.ChainFees<undefined> | undefined;
103
- formatters?: undefined;
104
- prepareTransactionRequest?: ((args: viem19.PrepareTransactionRequestParameters, options: {
105
- phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
106
- }) => Promise<viem19.PrepareTransactionRequestParameters>) | [fn: ((args: viem19.PrepareTransactionRequestParameters, options: {
107
- phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
108
- }) => Promise<viem19.PrepareTransactionRequestParameters>) | undefined, options: {
109
- runAt: readonly ("beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters")[];
110
- }] | undefined;
111
- serializers?: viem19.ChainSerializers<undefined, viem19.TransactionSerializable> | undefined;
112
- verifyHash?: ((client: viem19.Client, parameters: viem19.VerifyHashActionParameters) => Promise<viem19.VerifyHashActionReturnType>) | undefined;
113
- };
16
+ declare function nonBlank(value: string | undefined): string | undefined;
17
+ declare function toAppId(nameOrId: string): Hex;
114
18
  interface AppConfig {
115
19
  dataRegistryContractAddress: Hex;
116
20
  appRegistryContractAddress: Hex;
117
- subscriptionRegistryContractAddress: Hex;
118
- settlementRegistryContractAddress: Hex;
21
+ membershipRegistryContractAddress: Hex;
22
+ appRegistryFromBlock: bigint;
119
23
  chain: Chain;
120
24
  rpcUrl: string;
121
25
  caip2: number;
122
26
  ipfsGateway: string;
123
27
  }
124
28
  declare const FangornConfig: {
125
- dataRegistryContractAddress: "0x775026e905d7b58b34d16bcbd385fa630ee36c26";
126
- appRegistryContractAddress: "0x11d228c4774af3d9cae3b4b6874a12576a1a83ec";
127
- subscriptionRegistryContractAddress: "0x9c599136b195d70edea0106017fdf081a0401f9d";
128
- settlementRegistryContractAddress: "0xbbecb93142d1a5144260d2c30fe3c4a11fdda346";
29
+ dataRegistryContractAddress: "0x72B5f83526F3893aF9f1eE0f32A27218EA09f8aE";
30
+ appRegistryContractAddress: "0x55e6209ea1833ceD900989a3b3b22466934E04A5";
31
+ membershipRegistryContractAddress: "0xDF17030Cd65435C86eb043F31DDACa99E819E347";
32
+ appRegistryFromBlock: bigint;
129
33
  chain: {
130
34
  blockExplorers: {
131
35
  readonly default: {
@@ -159,21 +63,358 @@ declare const FangornConfig: {
159
63
  testnet: true;
160
64
  custom?: Record<string, unknown> | undefined;
161
65
  extendSchema?: Record<string, unknown> | undefined;
162
- fees?: viem19.ChainFees<undefined> | undefined;
66
+ fees?: viem0.ChainFees<undefined> | undefined;
163
67
  formatters?: undefined;
164
- prepareTransactionRequest?: ((args: viem19.PrepareTransactionRequestParameters, options: {
68
+ prepareTransactionRequest?: ((args: viem0.PrepareTransactionRequestParameters, options: {
69
+ phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
70
+ }) => Promise<viem0.PrepareTransactionRequestParameters>) | [fn: ((args: viem0.PrepareTransactionRequestParameters, options: {
71
+ phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
72
+ }) => Promise<viem0.PrepareTransactionRequestParameters>) | undefined, options: {
73
+ runAt: readonly ("beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters")[];
74
+ }] | undefined;
75
+ serializers?: viem0.ChainSerializers<undefined, viem0.TransactionSerializable> | undefined;
76
+ verifyHash?: ((client: viem0.Client, parameters: viem0.VerifyHashActionParameters) => Promise<viem0.VerifyHashActionReturnType>) | undefined;
77
+ };
78
+ rpcUrl: string;
79
+ caip2: number;
80
+ ipfsGateway: string;
81
+ };
82
+ declare const BaseSepoliaConfig: {
83
+ dataRegistryContractAddress: "0xE9183f768865dd2Cde5f1B71F8446F0Cd798ebe0";
84
+ appRegistryContractAddress: "0x0D3e98399df41b558048Cdd7D71723c37A3A9D6F";
85
+ membershipRegistryContractAddress: "0x0e96C012b5c53622EcDAA82F342E31C2623A04f5";
86
+ appRegistryFromBlock: bigint;
87
+ chain: {
88
+ blockExplorers: {
89
+ readonly default: {
90
+ readonly name: "Basescan";
91
+ readonly url: "https://sepolia.basescan.org";
92
+ readonly apiUrl: "https://api-sepolia.basescan.org/api";
93
+ };
94
+ };
95
+ blockTime: 2000;
96
+ contracts: {
97
+ readonly disputeGameFactory: {
98
+ readonly 11155111: {
99
+ readonly address: "0xd6E6dBf4F7EA0ac412fD8b65ED297e64BB7a06E1";
100
+ };
101
+ };
102
+ readonly l2OutputOracle: {
103
+ readonly 11155111: {
104
+ readonly address: "0x84457ca9D0163FbC4bbfe4Dfbb20ba46e48DF254";
105
+ };
106
+ };
107
+ readonly portal: {
108
+ readonly 11155111: {
109
+ readonly address: "0x49f53e41452c74589e85ca1677426ba426459e85";
110
+ readonly blockCreated: 4446677;
111
+ };
112
+ };
113
+ readonly l1StandardBridge: {
114
+ readonly 11155111: {
115
+ readonly address: "0xfd0Bf71F60660E2f608ed56e1659C450eB113120";
116
+ readonly blockCreated: 4446677;
117
+ };
118
+ };
119
+ readonly multicall3: {
120
+ readonly address: "0xca11bde05977b3631167028862be2a173976ca11";
121
+ readonly blockCreated: 1059647;
122
+ };
123
+ readonly gasPriceOracle: {
124
+ readonly address: "0x420000000000000000000000000000000000000F";
125
+ };
126
+ readonly l1Block: {
127
+ readonly address: "0x4200000000000000000000000000000000000015";
128
+ };
129
+ readonly l2CrossDomainMessenger: {
130
+ readonly address: "0x4200000000000000000000000000000000000007";
131
+ };
132
+ readonly l2Erc721Bridge: {
133
+ readonly address: "0x4200000000000000000000000000000000000014";
134
+ };
135
+ readonly l2StandardBridge: {
136
+ readonly address: "0x4200000000000000000000000000000000000010";
137
+ };
138
+ readonly l2ToL1MessagePasser: {
139
+ readonly address: "0x4200000000000000000000000000000000000016";
140
+ };
141
+ };
142
+ ensTlds?: readonly string[] | undefined;
143
+ id: 84532;
144
+ name: "Base Sepolia";
145
+ nativeCurrency: {
146
+ readonly name: "Sepolia Ether";
147
+ readonly symbol: "ETH";
148
+ readonly decimals: 18;
149
+ };
150
+ experimental_preconfirmationTime?: number | undefined | undefined;
151
+ rpcUrls: {
152
+ readonly default: {
153
+ readonly http: readonly ["https://sepolia.base.org"];
154
+ };
155
+ };
156
+ sourceId: 11155111;
157
+ testnet: true;
158
+ custom?: Record<string, unknown> | undefined;
159
+ extendSchema?: Record<string, unknown> | undefined;
160
+ fees?: viem0.ChainFees<undefined> | undefined;
161
+ formatters: {
162
+ readonly block: {
163
+ exclude: [] | undefined;
164
+ format: (args: viem_chains0.OpStackRpcBlock, action?: string | undefined) => {
165
+ baseFeePerGas: bigint | null;
166
+ blobGasUsed: bigint;
167
+ difficulty: bigint;
168
+ excessBlobGas: bigint;
169
+ extraData: viem0.Hex;
170
+ gasLimit: bigint;
171
+ gasUsed: bigint;
172
+ hash: `0x${string}` | null;
173
+ logsBloom: `0x${string}` | null;
174
+ miner: abitype0.Address;
175
+ mixHash: viem0.Hash;
176
+ nonce: `0x${string}` | null;
177
+ number: bigint | null;
178
+ parentBeaconBlockRoot?: `0x${string}` | undefined;
179
+ parentHash: viem0.Hash;
180
+ receiptsRoot: viem0.Hex;
181
+ sealFields: viem0.Hex[];
182
+ sha3Uncles: viem0.Hash;
183
+ size: bigint;
184
+ stateRoot: viem0.Hash;
185
+ timestamp: bigint;
186
+ totalDifficulty: bigint | null;
187
+ transactions: `0x${string}`[] | viem_chains0.OpStackTransaction<boolean>[];
188
+ transactionsRoot: viem0.Hash;
189
+ uncles: viem0.Hash[];
190
+ withdrawals?: viem0.Withdrawal[] | undefined | undefined;
191
+ withdrawalsRoot?: `0x${string}` | undefined;
192
+ } & {};
193
+ type: "block";
194
+ };
195
+ readonly transaction: {
196
+ exclude: [] | undefined;
197
+ format: (args: viem_chains0.OpStackRpcTransaction, action?: string | undefined) => ({
198
+ blockHash: `0x${string}` | null;
199
+ blockNumber: bigint | null;
200
+ from: abitype0.Address;
201
+ gas: bigint;
202
+ hash: viem0.Hash;
203
+ input: viem0.Hex;
204
+ nonce: number;
205
+ r: viem0.Hex;
206
+ s: viem0.Hex;
207
+ to: abitype0.Address | null;
208
+ transactionIndex: number | null;
209
+ typeHex: viem0.Hex | null;
210
+ v: bigint;
211
+ value: bigint;
212
+ yParity: number;
213
+ gasPrice?: undefined | undefined;
214
+ maxFeePerBlobGas?: undefined | undefined;
215
+ maxFeePerGas: bigint;
216
+ maxPriorityFeePerGas: bigint;
217
+ isSystemTx?: boolean;
218
+ mint?: bigint | undefined | undefined;
219
+ sourceHash: viem0.Hex;
220
+ type: "deposit";
221
+ } | {
222
+ r: viem0.Hex;
223
+ s: viem0.Hex;
224
+ v: bigint;
225
+ to: abitype0.Address | null;
226
+ from: abitype0.Address;
227
+ gas: bigint;
228
+ nonce: number;
229
+ value: bigint;
230
+ blockHash: `0x${string}` | null;
231
+ blockNumber: bigint | null;
232
+ hash: viem0.Hash;
233
+ input: viem0.Hex;
234
+ transactionIndex: number | null;
235
+ typeHex: viem0.Hex | null;
236
+ accessList?: undefined | undefined;
237
+ authorizationList?: undefined | undefined;
238
+ blobVersionedHashes?: undefined | undefined;
239
+ chainId?: number | undefined;
240
+ yParity?: undefined | undefined;
241
+ type: "legacy";
242
+ gasPrice: bigint;
243
+ maxFeePerBlobGas?: undefined | undefined;
244
+ maxFeePerGas?: undefined | undefined;
245
+ maxPriorityFeePerGas?: undefined | undefined;
246
+ isSystemTx?: undefined | undefined;
247
+ mint?: undefined | undefined;
248
+ sourceHash?: undefined | undefined;
249
+ } | {
250
+ blockHash: `0x${string}` | null;
251
+ blockNumber: bigint | null;
252
+ from: abitype0.Address;
253
+ gas: bigint;
254
+ hash: viem0.Hash;
255
+ input: viem0.Hex;
256
+ nonce: number;
257
+ r: viem0.Hex;
258
+ s: viem0.Hex;
259
+ to: abitype0.Address | null;
260
+ transactionIndex: number | null;
261
+ typeHex: viem0.Hex | null;
262
+ v: bigint;
263
+ value: bigint;
264
+ yParity: number;
265
+ accessList: viem0.AccessList;
266
+ authorizationList?: undefined | undefined;
267
+ blobVersionedHashes?: undefined | undefined;
268
+ chainId: number;
269
+ type: "eip2930";
270
+ gasPrice: bigint;
271
+ maxFeePerBlobGas?: undefined | undefined;
272
+ maxFeePerGas?: undefined | undefined;
273
+ maxPriorityFeePerGas?: undefined | undefined;
274
+ isSystemTx?: undefined | undefined;
275
+ mint?: undefined | undefined;
276
+ sourceHash?: undefined | undefined;
277
+ } | {
278
+ blockHash: `0x${string}` | null;
279
+ blockNumber: bigint | null;
280
+ from: abitype0.Address;
281
+ gas: bigint;
282
+ hash: viem0.Hash;
283
+ input: viem0.Hex;
284
+ nonce: number;
285
+ r: viem0.Hex;
286
+ s: viem0.Hex;
287
+ to: abitype0.Address | null;
288
+ transactionIndex: number | null;
289
+ typeHex: viem0.Hex | null;
290
+ v: bigint;
291
+ value: bigint;
292
+ yParity: number;
293
+ accessList: viem0.AccessList;
294
+ authorizationList?: undefined | undefined;
295
+ blobVersionedHashes?: undefined | undefined;
296
+ chainId: number;
297
+ type: "eip1559";
298
+ gasPrice?: undefined | undefined;
299
+ maxFeePerBlobGas?: undefined | undefined;
300
+ maxFeePerGas: bigint;
301
+ maxPriorityFeePerGas: bigint;
302
+ isSystemTx?: undefined | undefined;
303
+ mint?: undefined | undefined;
304
+ sourceHash?: undefined | undefined;
305
+ } | {
306
+ blockHash: `0x${string}` | null;
307
+ blockNumber: bigint | null;
308
+ from: abitype0.Address;
309
+ gas: bigint;
310
+ hash: viem0.Hash;
311
+ input: viem0.Hex;
312
+ nonce: number;
313
+ r: viem0.Hex;
314
+ s: viem0.Hex;
315
+ to: abitype0.Address | null;
316
+ transactionIndex: number | null;
317
+ typeHex: viem0.Hex | null;
318
+ v: bigint;
319
+ value: bigint;
320
+ yParity: number;
321
+ accessList: viem0.AccessList;
322
+ authorizationList?: undefined | undefined;
323
+ blobVersionedHashes: readonly viem0.Hex[];
324
+ chainId: number;
325
+ type: "eip4844";
326
+ gasPrice?: undefined | undefined;
327
+ maxFeePerBlobGas: bigint;
328
+ maxFeePerGas: bigint;
329
+ maxPriorityFeePerGas: bigint;
330
+ isSystemTx?: undefined | undefined;
331
+ mint?: undefined | undefined;
332
+ sourceHash?: undefined | undefined;
333
+ } | {
334
+ blockHash: `0x${string}` | null;
335
+ blockNumber: bigint | null;
336
+ from: abitype0.Address;
337
+ gas: bigint;
338
+ hash: viem0.Hash;
339
+ input: viem0.Hex;
340
+ nonce: number;
341
+ r: viem0.Hex;
342
+ s: viem0.Hex;
343
+ to: abitype0.Address | null;
344
+ transactionIndex: number | null;
345
+ typeHex: viem0.Hex | null;
346
+ v: bigint;
347
+ value: bigint;
348
+ yParity: number;
349
+ accessList: viem0.AccessList;
350
+ authorizationList: viem0.SignedAuthorizationList;
351
+ blobVersionedHashes?: undefined | undefined;
352
+ chainId: number;
353
+ type: "eip7702";
354
+ gasPrice?: undefined | undefined;
355
+ maxFeePerBlobGas?: undefined | undefined;
356
+ maxFeePerGas: bigint;
357
+ maxPriorityFeePerGas: bigint;
358
+ isSystemTx?: undefined | undefined;
359
+ mint?: undefined | undefined;
360
+ sourceHash?: undefined | undefined;
361
+ }) & {};
362
+ type: "transaction";
363
+ };
364
+ readonly transactionReceipt: {
365
+ exclude: [] | undefined;
366
+ format: (args: viem_chains0.OpStackRpcTransactionReceipt, action?: string | undefined) => {
367
+ blobGasPrice?: bigint | undefined;
368
+ blobGasUsed?: bigint | undefined;
369
+ blockHash: viem0.Hash;
370
+ blockNumber: bigint;
371
+ blockTimestamp?: bigint | undefined;
372
+ contractAddress: abitype0.Address | null | undefined;
373
+ cumulativeGasUsed: bigint;
374
+ effectiveGasPrice: bigint;
375
+ from: abitype0.Address;
376
+ gasUsed: bigint;
377
+ logs: viem0.Log<bigint, number, false>[];
378
+ logsBloom: viem0.Hex;
379
+ root?: `0x${string}` | undefined;
380
+ status: "success" | "reverted";
381
+ to: abitype0.Address | null;
382
+ transactionHash: viem0.Hash;
383
+ transactionIndex: number;
384
+ type: viem0.TransactionType;
385
+ l1GasPrice: bigint | null;
386
+ l1GasUsed: bigint | null;
387
+ l1Fee: bigint | null;
388
+ l1FeeScalar: number | null;
389
+ } & {};
390
+ type: "transactionReceipt";
391
+ };
392
+ };
393
+ prepareTransactionRequest?: ((args: viem0.PrepareTransactionRequestParameters, options: {
165
394
  phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
166
- }) => Promise<viem19.PrepareTransactionRequestParameters>) | [fn: ((args: viem19.PrepareTransactionRequestParameters, options: {
395
+ }) => Promise<viem0.PrepareTransactionRequestParameters>) | [fn: ((args: viem0.PrepareTransactionRequestParameters, options: {
167
396
  phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
168
- }) => Promise<viem19.PrepareTransactionRequestParameters>) | undefined, options: {
397
+ }) => Promise<viem0.PrepareTransactionRequestParameters>) | undefined, options: {
169
398
  runAt: readonly ("beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters")[];
170
399
  }] | undefined;
171
- serializers?: viem19.ChainSerializers<undefined, viem19.TransactionSerializable> | undefined;
172
- verifyHash?: ((client: viem19.Client, parameters: viem19.VerifyHashActionParameters) => Promise<viem19.VerifyHashActionReturnType>) | undefined;
400
+ serializers: {
401
+ readonly transaction: typeof viem_chains0.serializeTransactionOpStack;
402
+ };
403
+ verifyHash?: ((client: viem0.Client, parameters: viem0.VerifyHashActionParameters) => Promise<viem0.VerifyHashActionReturnType>) | undefined;
404
+ readonly network: "base-sepolia";
173
405
  };
174
406
  rpcUrl: string;
175
407
  caip2: number;
176
408
  ipfsGateway: string;
177
409
  };
410
+ /**
411
+ * The networks supported by Fangorn, by the name `CHAIN_NAME` takes.
412
+ */
413
+ declare const SupportedNetworks: Record<string, AppConfig>;
414
+ /**
415
+ * Get a network's deployment by name ("arbitrumSepolia" or "baseSepolia").
416
+ * @returns The corresponding config if it is supported, otherwise an error
417
+ */
418
+ declare function getNetwork(name: string): AppConfig;
178
419
  //#endregion
179
- export { AppConfig, DEFAULT_APP, FangornConfig, SupportedNetworks, appId, getNetwork as default, toAppId };
420
+ export { AppConfig, BaseSepoliaConfig, FangornConfig, SupportedNetworks, appId, getNetwork as default, nonBlank, toAppId };