@1delta/providers 0.0.41 → 0.0.42

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/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
- import * as viem_zksync from 'viem/zksync';
2
- import * as viem_chains from 'viem/chains';
3
1
  import * as viem from 'viem';
4
2
  import { PublicClient } from 'viem';
3
+ import * as viem_zksync from 'viem/zksync';
4
+ import * as viem_chains from 'viem/chains';
5
5
 
6
6
  declare const katana: {
7
7
  blockExplorers: {
@@ -88,6 +88,268 @@ declare const plasma: {
88
88
  }] | undefined;
89
89
  serializers?: viem.ChainSerializers<undefined, viem.TransactionSerializable> | undefined;
90
90
  };
91
+ declare const customChains: {
92
+ readonly artela: {
93
+ blockExplorers: {
94
+ readonly default: {
95
+ readonly name: "Explorer";
96
+ readonly url: "https://artscan.artela.network";
97
+ };
98
+ };
99
+ blockTime?: number | undefined | undefined;
100
+ contracts: {
101
+ readonly multicall3: {
102
+ readonly address: "0xcA11bde05977b3631167028862bE2a173976CA11";
103
+ readonly blockCreated: 1;
104
+ };
105
+ };
106
+ ensTlds?: readonly string[] | undefined;
107
+ id: 11820;
108
+ name: "Artela Mainnet";
109
+ nativeCurrency: {
110
+ readonly decimals: 18;
111
+ readonly name: "ART";
112
+ readonly symbol: "ART";
113
+ };
114
+ experimental_preconfirmationTime?: number | undefined | undefined;
115
+ rpcUrls: {
116
+ readonly default: {
117
+ readonly http: readonly ["https://node-euro.artela.network/rpc"];
118
+ };
119
+ };
120
+ sourceId?: number | undefined | undefined;
121
+ testnet?: boolean | undefined | undefined;
122
+ custom?: Record<string, unknown> | undefined;
123
+ fees?: viem.ChainFees<undefined> | undefined;
124
+ formatters?: undefined;
125
+ prepareTransactionRequest?: ((args: viem.PrepareTransactionRequestParameters, options: {
126
+ phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
127
+ }) => Promise<viem.PrepareTransactionRequestParameters>) | [fn: ((args: viem.PrepareTransactionRequestParameters, options: {
128
+ phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
129
+ }) => Promise<viem.PrepareTransactionRequestParameters>) | undefined, options: {
130
+ runAt: readonly ("beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters")[];
131
+ }] | undefined;
132
+ serializers?: viem.ChainSerializers<undefined, viem.TransactionSerializable> | undefined;
133
+ };
134
+ readonly botanix: {
135
+ blockExplorers: {
136
+ readonly default: {
137
+ readonly name: "Explorer";
138
+ readonly url: "https://botanixscan.io/";
139
+ };
140
+ };
141
+ blockTime?: number | undefined | undefined;
142
+ contracts: {
143
+ readonly multicall3: {
144
+ readonly address: "0xcA11bde05977b3631167028862bE2a173976CA11";
145
+ readonly blockCreated: 1;
146
+ };
147
+ };
148
+ ensTlds?: readonly string[] | undefined;
149
+ id: 3637;
150
+ name: "Botanix";
151
+ nativeCurrency: {
152
+ readonly decimals: 18;
153
+ readonly name: "BTC";
154
+ readonly symbol: "BTC";
155
+ };
156
+ experimental_preconfirmationTime?: number | undefined | undefined;
157
+ rpcUrls: {
158
+ readonly default: {
159
+ readonly http: readonly ["https://rpc.ankr.com/botanix_mainnet", "https://rpc.botanixlabs.com"];
160
+ };
161
+ };
162
+ sourceId?: number | undefined | undefined;
163
+ testnet?: boolean | undefined | undefined;
164
+ custom?: Record<string, unknown> | undefined;
165
+ fees?: viem.ChainFees<undefined> | undefined;
166
+ formatters?: undefined;
167
+ prepareTransactionRequest?: ((args: viem.PrepareTransactionRequestParameters, options: {
168
+ phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
169
+ }) => Promise<viem.PrepareTransactionRequestParameters>) | [fn: ((args: viem.PrepareTransactionRequestParameters, options: {
170
+ phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
171
+ }) => Promise<viem.PrepareTransactionRequestParameters>) | undefined, options: {
172
+ runAt: readonly ("beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters")[];
173
+ }] | undefined;
174
+ serializers?: viem.ChainSerializers<undefined, viem.TransactionSerializable> | undefined;
175
+ };
176
+ readonly crossfi: {
177
+ blockExplorers: {
178
+ readonly default: {
179
+ readonly name: "Explorer";
180
+ readonly url: "https://xfiscan.com/";
181
+ };
182
+ };
183
+ blockTime?: number | undefined | undefined;
184
+ contracts?: {
185
+ [x: string]: viem.ChainContract | {
186
+ [sourceId: number]: viem.ChainContract | undefined;
187
+ } | undefined;
188
+ ensRegistry?: viem.ChainContract | undefined;
189
+ ensUniversalResolver?: viem.ChainContract | undefined;
190
+ multicall3?: viem.ChainContract | undefined;
191
+ erc6492Verifier?: viem.ChainContract | undefined;
192
+ } | undefined;
193
+ ensTlds?: readonly string[] | undefined;
194
+ id: 4158;
195
+ name: "CrossFi Mainet";
196
+ nativeCurrency: {
197
+ readonly decimals: 18;
198
+ readonly name: "XFI";
199
+ readonly symbol: "XFI";
200
+ };
201
+ experimental_preconfirmationTime?: number | undefined | undefined;
202
+ rpcUrls: {
203
+ readonly default: {
204
+ readonly http: readonly ["https://rpc.mainnet.ms/"];
205
+ };
206
+ };
207
+ sourceId?: number | undefined | undefined;
208
+ testnet?: boolean | undefined | undefined;
209
+ custom?: Record<string, unknown> | undefined;
210
+ fees?: viem.ChainFees<undefined> | undefined;
211
+ formatters?: undefined;
212
+ prepareTransactionRequest?: ((args: viem.PrepareTransactionRequestParameters, options: {
213
+ phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
214
+ }) => Promise<viem.PrepareTransactionRequestParameters>) | [fn: ((args: viem.PrepareTransactionRequestParameters, options: {
215
+ phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
216
+ }) => Promise<viem.PrepareTransactionRequestParameters>) | undefined, options: {
217
+ runAt: readonly ("beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters")[];
218
+ }] | undefined;
219
+ serializers?: viem.ChainSerializers<undefined, viem.TransactionSerializable> | undefined;
220
+ };
221
+ readonly GraphLinq: {
222
+ blockExplorers: {
223
+ readonly default: {
224
+ readonly name: "Explorer";
225
+ readonly url: "https://explorer.graphlinq.io";
226
+ };
227
+ };
228
+ blockTime?: number | undefined | undefined;
229
+ contracts?: {
230
+ [x: string]: viem.ChainContract | {
231
+ [sourceId: number]: viem.ChainContract | undefined;
232
+ } | undefined;
233
+ ensRegistry?: viem.ChainContract | undefined;
234
+ ensUniversalResolver?: viem.ChainContract | undefined;
235
+ multicall3?: viem.ChainContract | undefined;
236
+ erc6492Verifier?: viem.ChainContract | undefined;
237
+ } | undefined;
238
+ ensTlds?: readonly string[] | undefined;
239
+ id: 614;
240
+ name: "GraphLinq Chain";
241
+ nativeCurrency: {
242
+ readonly decimals: 18;
243
+ readonly name: "GLQ";
244
+ readonly symbol: "GLQ";
245
+ };
246
+ experimental_preconfirmationTime?: number | undefined | undefined;
247
+ rpcUrls: {
248
+ readonly default: {
249
+ readonly http: readonly ["https://glq-dataseed.graphlinq.io"];
250
+ };
251
+ };
252
+ sourceId?: number | undefined | undefined;
253
+ testnet?: boolean | undefined | undefined;
254
+ custom?: Record<string, unknown> | undefined;
255
+ fees?: viem.ChainFees<undefined> | undefined;
256
+ formatters?: undefined;
257
+ prepareTransactionRequest?: ((args: viem.PrepareTransactionRequestParameters, options: {
258
+ phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
259
+ }) => Promise<viem.PrepareTransactionRequestParameters>) | [fn: ((args: viem.PrepareTransactionRequestParameters, options: {
260
+ phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
261
+ }) => Promise<viem.PrepareTransactionRequestParameters>) | undefined, options: {
262
+ runAt: readonly ("beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters")[];
263
+ }] | undefined;
264
+ serializers?: viem.ChainSerializers<undefined, viem.TransactionSerializable> | undefined;
265
+ };
266
+ readonly hyperEvm: {
267
+ blockExplorers: {
268
+ readonly default: {
269
+ readonly name: "Explorer";
270
+ readonly url: "https://hypurrscan.io/";
271
+ };
272
+ };
273
+ blockTime?: number | undefined | undefined;
274
+ contracts: {
275
+ readonly multicall3: {
276
+ readonly address: "0xcA11bde05977b3631167028862bE2a173976CA11";
277
+ readonly blockCreated: 1;
278
+ };
279
+ };
280
+ ensTlds?: readonly string[] | undefined;
281
+ id: 999;
282
+ name: "Hyper EVM";
283
+ nativeCurrency: {
284
+ readonly decimals: 18;
285
+ readonly name: "HYPE";
286
+ readonly symbol: "HYPE";
287
+ };
288
+ experimental_preconfirmationTime?: number | undefined | undefined;
289
+ rpcUrls: {
290
+ readonly default: {
291
+ readonly http: readonly ["https://rpc.hyperliquid.xyz/evm"];
292
+ };
293
+ };
294
+ sourceId?: number | undefined | undefined;
295
+ testnet?: boolean | undefined | undefined;
296
+ custom?: Record<string, unknown> | undefined;
297
+ fees?: viem.ChainFees<undefined> | undefined;
298
+ formatters?: undefined;
299
+ prepareTransactionRequest?: ((args: viem.PrepareTransactionRequestParameters, options: {
300
+ phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
301
+ }) => Promise<viem.PrepareTransactionRequestParameters>) | [fn: ((args: viem.PrepareTransactionRequestParameters, options: {
302
+ phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
303
+ }) => Promise<viem.PrepareTransactionRequestParameters>) | undefined, options: {
304
+ runAt: readonly ("beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters")[];
305
+ }] | undefined;
306
+ serializers?: viem.ChainSerializers<undefined, viem.TransactionSerializable> | undefined;
307
+ };
308
+ readonly monadMainnet: {
309
+ blockExplorers: {
310
+ readonly default: {
311
+ readonly name: "Explorer";
312
+ readonly url: "https://monadvision.com/";
313
+ };
314
+ };
315
+ blockTime?: number | undefined | undefined;
316
+ contracts: {
317
+ readonly multicall3: {
318
+ readonly address: "0xcA11bde05977b3631167028862bE2a173976CA11";
319
+ readonly blockCreated: 1;
320
+ };
321
+ };
322
+ ensTlds?: readonly string[] | undefined;
323
+ id: 143;
324
+ name: "Monad Mainnet";
325
+ nativeCurrency: {
326
+ readonly name: "Monad";
327
+ readonly symbol: "MON";
328
+ readonly decimals: 18;
329
+ };
330
+ experimental_preconfirmationTime?: number | undefined | undefined;
331
+ rpcUrls: {
332
+ readonly default: {
333
+ readonly http: readonly ["https://rpc-mainnet.monadinfra.com", "https://rpc.monad.xyz", "https://rpc1.monad.xyz", "https://rpc2.monad.xyz", "https://rpc3.monad.xyz", "https://rpc4.monad.xyz"];
334
+ };
335
+ };
336
+ sourceId?: number | undefined | undefined;
337
+ testnet?: boolean | undefined | undefined;
338
+ custom?: Record<string, unknown> | undefined;
339
+ fees?: viem.ChainFees<undefined> | undefined;
340
+ formatters?: undefined;
341
+ prepareTransactionRequest?: ((args: viem.PrepareTransactionRequestParameters, options: {
342
+ phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
343
+ }) => Promise<viem.PrepareTransactionRequestParameters>) | [fn: ((args: viem.PrepareTransactionRequestParameters, options: {
344
+ phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
345
+ }) => Promise<viem.PrepareTransactionRequestParameters>) | undefined, options: {
346
+ runAt: readonly ("beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters")[];
347
+ }] | undefined;
348
+ serializers?: viem.ChainSerializers<undefined, viem.TransactionSerializable> | undefined;
349
+ readonly network: "monad";
350
+ };
351
+ };
352
+
91
353
  declare function getEvmChain(chain: string): {
92
354
  blockExplorers: {
93
355
  readonly default: {
@@ -1115,7 +1377,7 @@ declare function getEvmChain(chain: string): {
1115
1377
  readonly default: {
1116
1378
  readonly name: "PolygonScan";
1117
1379
  readonly url: "https://polygonscan.com";
1118
- readonly apiUrl: "https://api.polygonscan.com/api";
1380
+ readonly apiUrl: "https://api.etherscan.io/v2/api";
1119
1381
  };
1120
1382
  };
1121
1383
  blockTime: 2000;
@@ -7469,44 +7731,32 @@ declare function getEvmChain(chain: string): {
7469
7731
  }] | undefined;
7470
7732
  serializers?: viem.ChainSerializers<undefined, viem.TransactionSerializable> | undefined;
7471
7733
  };
7472
- /**
7473
- * Get correct transport according to the input url with optional config
7474
- */
7734
+
7735
+ declare const LIST_OVERRIDES: Record<string, string[]>;
7736
+
7475
7737
  declare function createTransport(url: string, config?: any): viem.WebSocketTransport | viem.HttpTransport<undefined, false>;
7476
- /**
7477
- * Get correct transport according to the input url
7478
- */
7479
7738
  declare function getTransport(url: string): viem.WebSocketTransport | viem.HttpTransport<undefined, false>;
7480
- /**
7481
- * @deprecated Use getEvmClientUniversal instead
7482
- */
7739
+
7740
+ declare const DEFAULT_BATCH_SIZE = 4096;
7741
+ declare function trimTrailingSlash(url?: string): string | undefined;
7742
+ declare function deepCompare(a: any, b: any): boolean;
7743
+
7483
7744
  declare function getEvmClient(chain: string, rpcId?: number): PublicClient;
7484
7745
  declare function getEvmClientUniversal({ chain, rpcId, }: {
7485
7746
  chain: string;
7486
7747
  rpcId: number;
7487
7748
  }): PublicClient;
7488
- declare function createMulticallRetry(customRpcs?: {
7489
- [chainId: string]: string[];
7490
- }): (chain: string, calls: any[], abi: any, batchSize?: number, maxRetries?: number, providerId?: number, allowFailure?: boolean, logErrors?: boolean) => Promise<any[]>;
7491
7749
  /**
7492
- * @deprecated Use getEvmClientWithCustomRpcsUniversal instead
7750
+ * @deprecated use getEvmClientWithCustomRpcsUniversal instead
7751
+ * @see getEvmClientWithCustomRpcsUniversal
7493
7752
  */
7494
- declare function getEvmClientWithCustomRpcs(chain: string, rpcId?: number, customRpcs?: {
7495
- [chainId: string]: string[];
7496
- }): PublicClient;
7753
+ declare function getEvmClientWithCustomRpcs(chain: string, rpcId?: number, customRpcs?: Record<string, string[]>): PublicClient;
7497
7754
  declare function getEvmClientWithCustomRpcsUniversal({ chain, rpcId, customRpcs, }: {
7498
7755
  chain: string;
7499
7756
  rpcId: number;
7500
- customRpcs: {
7501
- [chainId: string]: string[];
7502
- };
7757
+ customRpcs: Record<string, string[]>;
7503
7758
  }): PublicClient;
7504
- /**
7505
- * @deprecated Use multicallRetryUniversal instead
7506
- */
7507
- declare function multicallRetry(chain: string, calls: any[], abi: any, batchSize?: number, maxRetries?: number, providerId?: number, allowFailure?: boolean, overrdies?: {
7508
- [chainId: string]: string[];
7509
- }, logErrors?: boolean): Promise<any[]>;
7759
+
7510
7760
  interface MulticallRetryParams {
7511
7761
  chain: string;
7512
7762
  calls: any[];
@@ -7515,11 +7765,15 @@ interface MulticallRetryParams {
7515
7765
  maxRetries?: number;
7516
7766
  providerId?: number;
7517
7767
  allowFailure?: boolean;
7518
- overrdies?: {
7519
- [chainId: string]: string[];
7520
- };
7768
+ overrdies?: Record<string, string[]>;
7521
7769
  logErrors?: boolean;
7522
7770
  }
7771
+ declare function createMulticallRetry(customRpcs?: Record<string, string[]>): (chain: string, calls: any[], abi: any, batchSize?: number, maxRetries?: number, providerId?: number, allowFailure?: boolean, logErrors?: boolean, revertedIndices?: Set<number>) => Promise<any[]>;
7772
+ /**
7773
+ * @deprecated use multicallRetryUniversal instead
7774
+ * @see multicallRetryUniversal
7775
+ */
7776
+ declare function multicallRetry(chain: string, calls: any[], abi: any, batchSize?: number, maxRetries?: number, providerId?: number, allowFailure?: boolean, overrdies?: Record<string, string[]>, logErrors?: boolean): Promise<any[]>;
7523
7777
  declare function multicallRetryUniversal({ chain, calls, abi, batchSize, maxRetries, providerId, allowFailure, overrdies, logErrors, }: MulticallRetryParams): Promise<any[]>;
7524
7778
 
7525
- export { type MulticallRetryParams, createMulticallRetry, createTransport, getEvmChain, getEvmClient, getEvmClientUniversal, getEvmClientWithCustomRpcs, getEvmClientWithCustomRpcsUniversal, getTransport, katana, multicallRetry, multicallRetryUniversal, plasma };
7779
+ export { DEFAULT_BATCH_SIZE, LIST_OVERRIDES, type MulticallRetryParams, createMulticallRetry, createTransport, customChains, deepCompare, getEvmChain, getEvmClient, getEvmClientUniversal, getEvmClientWithCustomRpcs, getEvmClientWithCustomRpcsUniversal, getTransport, katana, multicallRetry, multicallRetryUniversal, plasma, trimTrailingSlash };