viem 0.1.23 → 0.1.24
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/abi.js +2 -2
- package/dist/abi.mjs +1 -1
- package/dist/chains.js +63 -63
- package/dist/chains.mjs +1 -1
- package/dist/{chunk-66PXETQB.js → chunk-CVKFUFQP.js} +19 -19
- package/dist/{chunk-JG6MI5ZV.mjs → chunk-DZQWSJNJ.mjs} +3 -2
- package/dist/{chunk-JG6MI5ZV.mjs.map → chunk-DZQWSJNJ.mjs.map} +1 -1
- package/dist/{chunk-HRVPAYH7.mjs → chunk-QQ7PCGDW.mjs} +2 -2
- package/dist/{chunk-Z54YSSBJ.js → chunk-TO4LQVPW.js} +4 -3
- package/dist/{chunk-Z54YSSBJ.js.map → chunk-TO4LQVPW.js.map} +1 -1
- package/dist/contract.d.ts +2 -2
- package/dist/contract.js +2 -2
- package/dist/contract.mjs +1 -1
- package/dist/{createPublicClient-b250a534.d.ts → createPublicClient-31d44569.d.ts} +1 -1
- package/dist/{createClient-a28317a9.d.ts → createTransport-e3eba9f7.d.ts} +28 -26
- package/dist/ens.d.ts +2 -2
- package/dist/ens.js +3 -3
- package/dist/ens.mjs +2 -2
- package/dist/ethers.d.ts +2 -2
- package/dist/ethers.js +3 -3
- package/dist/ethers.mjs +1 -1
- package/dist/index.d.ts +41 -7
- package/dist/index.js +213 -137
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +123 -47
- package/dist/index.mjs.map +1 -1
- package/dist/{parseGwei-bd0eea6c.d.ts → parseGwei-361e8a12.d.ts} +1 -1
- package/dist/public.d.ts +2 -2
- package/dist/public.js +2 -2
- package/dist/public.mjs +1 -1
- package/dist/{test-2bd23d7e.d.ts → test-67630299.d.ts} +1 -1
- package/dist/test.d.ts +3 -3
- package/dist/test.js +2 -2
- package/dist/test.mjs +1 -1
- package/dist/utils/index.d.ts +5 -5
- package/dist/utils/index.js +2 -2
- package/dist/utils/index.mjs +1 -1
- package/dist/wallet.d.ts +2 -2
- package/dist/wallet.js +2 -2
- package/dist/wallet.mjs +1 -1
- package/package.json +1 -1
- /package/dist/{chunk-66PXETQB.js.map → chunk-CVKFUFQP.js.map} +0 -0
- /package/dist/{chunk-HRVPAYH7.mjs.map → chunk-QQ7PCGDW.mjs.map} +0 -0
package/dist/contract.d.ts
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
export { m as CreateContractEventFilterParameters, n as CreateContractEventFilterReturnType, V as DeployContractParameters, X as DeployContractReturnType, o as EstimateContractGasParameters, p as EstimateContractGasReturnType, G as GetBytecodeParameters, q as GetBytecodeReturnType, r as GetStorageAtParameters, s as GetStorageAtReturnType, M as MulticallParameters, t as MulticallReturnType, O as OnLogsFn, u as OnLogsParameter, R as ReadContractParameters, v as ReadContractReturnType, w as SimulateContractParameters, x as SimulateContractReturnType, y as WatchContractEventParameters, Y as WriteContractParameters, Z as WriteContractReturnType, z as createContractEventFilter, _ as deployContract, D as estimateContractGas, H as getBytecode, I as getStorageAt, K as multicall, N as readContract, Q as simulateContract, U as watchContractEvent, $ as writeContract } from './createPublicClient-
|
1
|
+
export { m as CreateContractEventFilterParameters, n as CreateContractEventFilterReturnType, V as DeployContractParameters, X as DeployContractReturnType, o as EstimateContractGasParameters, p as EstimateContractGasReturnType, G as GetBytecodeParameters, q as GetBytecodeReturnType, r as GetStorageAtParameters, s as GetStorageAtReturnType, M as MulticallParameters, t as MulticallReturnType, O as OnLogsFn, u as OnLogsParameter, R as ReadContractParameters, v as ReadContractReturnType, w as SimulateContractParameters, x as SimulateContractReturnType, y as WatchContractEventParameters, Y as WriteContractParameters, Z as WriteContractReturnType, z as createContractEventFilter, _ as deployContract, D as estimateContractGas, H as getBytecode, I as getStorageAt, K as multicall, N as readContract, Q as simulateContract, U as watchContractEvent, $ as writeContract } from './createPublicClient-31d44569.js';
|
2
2
|
export { D as DecodeAbiParametersReturnType, E as EncodeAbiParametersReturnType, G as GetAbiItemParameters, d as decodeAbiParameters, e as encodeAbiParameters, g as getAbiItem } from './getAbiItem-3e809ff9.js';
|
3
3
|
export { D as DecodeErrorResultParameters, a as DecodeErrorResultReturnType, b as DecodeEventLogParameters, c as DecodeEventLogReturnType, d as DecodeFunctionDataParameters, e as DecodeFunctionResultParameters, f as DecodeFunctionResultReturnType, E as EncodeDeployDataParameters, g as EncodeErrorResultParameters, h as EncodeEventTopicsParameters, i as EncodeFunctionDataParameters, j as EncodeFunctionResultParameters, k as decodeErrorResult, l as decodeEventLog, m as decodeFunctionData, n as decodeFunctionResult, o as encodeDeployData, p as encodeErrorResult, q as encodeEventTopics, r as encodeFunctionData, s as encodeFunctionResult } from './encodeFunctionResult-1f324375.js';
|
4
4
|
export { a as formatAbiItem, f as formatAbiItemWithArgs } from './formatAbiItem-15e8817d.js';
|
@@ -6,4 +6,4 @@ import './eip1193-4f4e240c.js';
|
|
6
6
|
import 'abitype';
|
7
7
|
import './chain-1b53ef88.js';
|
8
8
|
import '@wagmi/chains';
|
9
|
-
import './
|
9
|
+
import './createTransport-e3eba9f7.js';
|
package/dist/contract.js
CHANGED
@@ -23,7 +23,7 @@
|
|
23
23
|
|
24
24
|
|
25
25
|
|
26
|
-
var
|
26
|
+
var _chunkTO4LQVPWjs = require('./chunk-TO4LQVPW.js');
|
27
27
|
|
28
28
|
|
29
29
|
|
@@ -49,5 +49,5 @@ var _chunkZ54YSSBJjs = require('./chunk-Z54YSSBJ.js');
|
|
49
49
|
|
50
50
|
|
51
51
|
|
52
|
-
exports.createContractEventFilter =
|
52
|
+
exports.createContractEventFilter = _chunkTO4LQVPWjs.createContractEventFilter; exports.decodeAbiParameters = _chunkTO4LQVPWjs.decodeAbiParameters; exports.decodeErrorResult = _chunkTO4LQVPWjs.decodeErrorResult; exports.decodeEventLog = _chunkTO4LQVPWjs.decodeEventLog; exports.decodeFunctionData = _chunkTO4LQVPWjs.decodeFunctionData; exports.decodeFunctionResult = _chunkTO4LQVPWjs.decodeFunctionResult; exports.deployContract = _chunkTO4LQVPWjs.deployContract; exports.encodeAbiParameters = _chunkTO4LQVPWjs.encodeAbiParameters; exports.encodeDeployData = _chunkTO4LQVPWjs.encodeDeployData; exports.encodeErrorResult = _chunkTO4LQVPWjs.encodeErrorResult; exports.encodeEventTopics = _chunkTO4LQVPWjs.encodeEventTopics; exports.encodeFunctionData = _chunkTO4LQVPWjs.encodeFunctionData; exports.encodeFunctionResult = _chunkTO4LQVPWjs.encodeFunctionResult; exports.estimateContractGas = _chunkTO4LQVPWjs.estimateContractGas; exports.formatAbiItem = _chunkTO4LQVPWjs.formatAbiItem; exports.formatAbiItemWithArgs = _chunkTO4LQVPWjs.formatAbiItemWithArgs; exports.getAbiItem = _chunkTO4LQVPWjs.getAbiItem; exports.getBytecode = _chunkTO4LQVPWjs.getBytecode; exports.getStorageAt = _chunkTO4LQVPWjs.getStorageAt; exports.multicall = _chunkTO4LQVPWjs.multicall; exports.readContract = _chunkTO4LQVPWjs.readContract; exports.simulateContract = _chunkTO4LQVPWjs.simulateContract; exports.watchContractEvent = _chunkTO4LQVPWjs.watchContractEvent; exports.writeContract = _chunkTO4LQVPWjs.writeContract;
|
53
53
|
//# sourceMappingURL=contract.js.map
|
package/dist/contract.mjs
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
import { W as WalletPermission, a as WatchAssetParams, P as PublicRequests } from './eip1193-4f4e240c.js';
|
2
|
-
import { a as Transport, b as ClientConfig, C as Client } from './
|
2
|
+
import { a as Transport, b as ClientConfig, C as Client } from './createTransport-e3eba9f7.js';
|
3
3
|
import { Abi, Narrow, Address, AbiEvent, ExtractAbiEvent, TypedData, TypedDataDomain, TypedDataToPrimitiveTypes } from 'abitype';
|
4
4
|
import { C as Chain, H as Hex, h as ExtractConstructorArgsFromAbi, W as ExtractFormatter, a1 as Formatters, a2 as Formatter, X as Formatted, c as Block, R as RpcBlock, O as Transaction, T as TransactionReceipt, z as RpcTransactionReceipt, a3 as TransactionType, D as RpcTransactionRequest, I as TransactionRequest, f as BlockTag, a4 as MergeIntersectionProperties, g as ContractConfig, a5 as GetValue, p as ExtractResultFromAbi, a6 as MaybeAbiEventName, a7 as MaybeExtractEventArgsFromAbi, e as BlockNumber, m as ExtractEventNameFromAbi, a as Hash, F as FeeHistory, L as Log, Y as FormattedTransaction, Z as TransactionFormatter, k as ExtractEventArgsFromAbi, a8 as Prettify } from './chain-1b53ef88.js';
|
5
5
|
|
@@ -1,6 +1,32 @@
|
|
1
1
|
import { R as Requests } from './eip1193-4f4e240c.js';
|
2
2
|
import { C as Chain } from './chain-1b53ef88.js';
|
3
3
|
|
4
|
+
type Client<TTransport extends Transport = Transport, TChain extends Chain = Chain, TRequests extends BaseRpcRequests = Requests> = {
|
5
|
+
/** Chain for the client. */
|
6
|
+
chain?: TChain;
|
7
|
+
/** A key for the client. */
|
8
|
+
key: string;
|
9
|
+
/** A name for the client. */
|
10
|
+
name: string;
|
11
|
+
/** Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. */
|
12
|
+
pollingInterval: number;
|
13
|
+
/** Request function wrapped with friendly error handling */
|
14
|
+
request: TRequests['request'];
|
15
|
+
/** The RPC transport (http, webSocket, custom, etc) */
|
16
|
+
transport: ReturnType<TTransport>['config'] & ReturnType<TTransport>['value'];
|
17
|
+
/** The type of client. */
|
18
|
+
type: string;
|
19
|
+
/** A unique ID for the client. */
|
20
|
+
uid: string;
|
21
|
+
};
|
22
|
+
type ClientConfig<TTransport extends Transport = Transport, TChain extends Chain = Chain, TRequests extends BaseRpcRequests = Requests> = Partial<Pick<Client<TTransport, TChain, TRequests>, 'chain' | 'key' | 'name' | 'pollingInterval' | 'type'>> & {
|
23
|
+
transport: TTransport;
|
24
|
+
};
|
25
|
+
/**
|
26
|
+
* @description Creates a base client with the given transport.
|
27
|
+
*/
|
28
|
+
declare function createClient<TTransport extends Transport, TChain extends Chain, TRequests extends BaseRpcRequests>({ chain, key, name, pollingInterval, transport, type, }: ClientConfig<TTransport, TChain, TRequests>): Client<TTransport, TChain, TRequests>;
|
29
|
+
|
4
30
|
type BaseRpcRequests = {
|
5
31
|
request(...args: any): Promise<any>;
|
6
32
|
};
|
@@ -22,7 +48,9 @@ type TransportConfig<TType extends string = string, TRequests extends BaseRpcReq
|
|
22
48
|
};
|
23
49
|
type Transport<TType extends string = string, TRpcAttributes = Record<string, any>, TRequests extends BaseRpcRequests['request'] = Requests['request']> = <TChain extends Chain = Chain>({ chain, }: {
|
24
50
|
chain?: TChain;
|
51
|
+
pollingInterval?: ClientConfig['pollingInterval'];
|
25
52
|
retryCount?: TransportConfig['retryCount'];
|
53
|
+
timeout?: TransportConfig['timeout'];
|
26
54
|
}) => {
|
27
55
|
config: TransportConfig<TType>;
|
28
56
|
request: TRequests;
|
@@ -33,30 +61,4 @@ type Transport<TType extends string = string, TRpcAttributes = Record<string, an
|
|
33
61
|
*/
|
34
62
|
declare function createTransport<TType extends string = string, TRpcAttributes = any>({ key, name, request, retryCount, retryDelay, timeout, type, }: TransportConfig<TType>, value?: TRpcAttributes): ReturnType<Transport<TType, TRpcAttributes>>;
|
35
63
|
|
36
|
-
type Client<TTransport extends Transport = Transport, TChain extends Chain = Chain, TRequests extends BaseRpcRequests = Requests> = {
|
37
|
-
/** Chain for the client. */
|
38
|
-
chain?: TChain;
|
39
|
-
/** A key for the client. */
|
40
|
-
key: string;
|
41
|
-
/** A name for the client. */
|
42
|
-
name: string;
|
43
|
-
/** Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. */
|
44
|
-
pollingInterval: number;
|
45
|
-
/** Request function wrapped with friendly error handling */
|
46
|
-
request: TRequests['request'];
|
47
|
-
/** The RPC transport (http, webSocket, custom, etc) */
|
48
|
-
transport: ReturnType<TTransport>['config'] & ReturnType<TTransport>['value'];
|
49
|
-
/** The type of client. */
|
50
|
-
type: string;
|
51
|
-
/** A unique ID for the client. */
|
52
|
-
uid: string;
|
53
|
-
};
|
54
|
-
type ClientConfig<TTransport extends Transport = Transport, TChain extends Chain = Chain, TRequests extends BaseRpcRequests = Requests> = Partial<Pick<Client<TTransport, TChain, TRequests>, 'chain' | 'key' | 'name' | 'pollingInterval' | 'type'>> & {
|
55
|
-
transport: TTransport;
|
56
|
-
};
|
57
|
-
/**
|
58
|
-
* @description Creates a base client with the given transport.
|
59
|
-
*/
|
60
|
-
declare function createClient<TTransport extends Transport, TChain extends Chain, TRequests extends BaseRpcRequests>({ chain, key, name, pollingInterval, transport, type, }: ClientConfig<TTransport, TChain, TRequests>): Client<TTransport, TChain, TRequests>;
|
61
|
-
|
62
64
|
export { BaseRpcRequests as B, Client as C, TransportConfig as T, Transport as a, ClientConfig as b, createClient as c, createTransport as d };
|
package/dist/ens.d.ts
CHANGED
@@ -1,10 +1,10 @@
|
|
1
|
-
export { a0 as GetEnsAddressParameters, a1 as GetEnsNameParameters, a2 as getEnsAddress, a3 as getEnsName } from './createPublicClient-
|
1
|
+
export { a0 as GetEnsAddressParameters, a1 as GetEnsNameParameters, a2 as getEnsAddress, a3 as getEnsName } from './createPublicClient-31d44569.js';
|
2
2
|
export { l as labelhash, n as namehash } from './namehash-afff0feb.js';
|
3
3
|
import './eip1193-4f4e240c.js';
|
4
4
|
import 'abitype';
|
5
5
|
import './chain-1b53ef88.js';
|
6
6
|
import '@wagmi/chains';
|
7
|
-
import './
|
7
|
+
import './createTransport-e3eba9f7.js';
|
8
8
|
|
9
9
|
/**
|
10
10
|
* @description Normalizes ENS name
|
package/dist/ens.js
CHANGED
@@ -3,8 +3,8 @@
|
|
3
3
|
|
4
4
|
|
5
5
|
|
6
|
-
var
|
7
|
-
require('./chunk-
|
6
|
+
var _chunkCVKFUFQPjs = require('./chunk-CVKFUFQP.js');
|
7
|
+
require('./chunk-TO4LQVPW.js');
|
8
8
|
|
9
9
|
// src/utils/ens/normalize.ts
|
10
10
|
var _idnauts46hx = require('idna-uts46-hx');
|
@@ -17,5 +17,5 @@ function normalize(name) {
|
|
17
17
|
|
18
18
|
|
19
19
|
|
20
|
-
exports.getEnsAddress =
|
20
|
+
exports.getEnsAddress = _chunkCVKFUFQPjs.getEnsAddress; exports.getEnsName = _chunkCVKFUFQPjs.getEnsName; exports.labelhash = _chunkCVKFUFQPjs.labelhash; exports.namehash = _chunkCVKFUFQPjs.namehash; exports.normalize = normalize;
|
21
21
|
//# sourceMappingURL=ens.js.map
|
package/dist/ens.mjs
CHANGED
package/dist/ethers.d.ts
CHANGED
@@ -1,9 +1,9 @@
|
|
1
|
-
import { A as Account } from './createPublicClient-
|
1
|
+
import { A as Account } from './createPublicClient-31d44569.js';
|
2
2
|
import './eip1193-4f4e240c.js';
|
3
3
|
import 'abitype';
|
4
4
|
import './chain-1b53ef88.js';
|
5
5
|
import '@wagmi/chains';
|
6
|
-
import './
|
6
|
+
import './createTransport-e3eba9f7.js';
|
7
7
|
|
8
8
|
type BigNumberish = string | number | bigint;
|
9
9
|
type BytesLike = string | Uint8Array;
|
package/dist/ethers.js
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }
|
2
2
|
|
3
3
|
|
4
|
-
var
|
4
|
+
var _chunkTO4LQVPWjs = require('./chunk-TO4LQVPW.js');
|
5
5
|
|
6
6
|
// src/adapters/ethers.ts
|
7
|
-
var getAccount2 = (wallet) =>
|
7
|
+
var getAccount2 = (wallet) => _chunkTO4LQVPWjs.getAccount.call(void 0, {
|
8
8
|
address: wallet.address,
|
9
9
|
async signMessage(message) {
|
10
|
-
return await wallet.signMessage(
|
10
|
+
return await wallet.signMessage(_chunkTO4LQVPWjs.toBytes.call(void 0, message));
|
11
11
|
},
|
12
12
|
async signTransaction(txn) {
|
13
13
|
return await wallet.signTransaction({
|
package/dist/ethers.mjs
CHANGED
package/dist/index.d.ts
CHANGED
@@ -1,12 +1,12 @@
|
|
1
|
-
import { T as TransportConfig, a as Transport, B as BaseRpcRequests } from './
|
2
|
-
export { C as Client, b as ClientConfig, a as Transport, T as TransportConfig, c as createClient, d as createTransport } from './
|
3
|
-
import { B as BaseError, H as HttpOptions, R as RpcResponse } from './parseGwei-
|
4
|
-
export { B as BaseError, C as CallExecutionError, a as ContractFunctionExecutionError, b as ContractFunctionRevertedError, c as ContractFunctionZeroDataError, E as EstimateGasExecutionError, d as ExecutionRevertedError, F as FeeCapTooHighError, e as FeeCapTooLowError, G as GetContractAddressOptions, o as GetCreate2AddressOptions, p as GetCreateAddressOptions, I as InsufficientFundsError, f as IntrinsicGasTooHighError, g as IntrinsicGasTooLowError, N as NonceMaxValueError, h as NonceTooHighError, i as NonceTooLowError, j as RawContractError, T as TipAboveFeeCapError, q as ToRlpReturnType, k as TransactionExecutionError, m as TransactionNotFoundError, n as TransactionReceiptNotFoundError, l as TransactionTypeNotSupportedError, U as UnknownNodeError, W as WaitForTransactionReceiptTimeoutError, r as boolToBytes, s as boolToHex, t as bytesToBigint, u as bytesToBool, v as bytesToHex, w as bytesToNumber, x as bytesToString, y as concat, z as concatBytes, A as concatHex, D as formatEther, J as formatGwei, K as formatUnits, L as fromBytes, M as fromHex, O as fromRlp, P as getAccount, Q as getAddress, S as getContractAddress, V as getContractError, X as getCreate2Address, Y as getCreateAddress, Z as getEventSelector, _ as getFunctionSelector, $ as hashMessage, a0 as hexToBigInt, a1 as hexToBool, a2 as hexToBytes, a3 as hexToNumber, a4 as hexToString, a5 as isAddress, a6 as isAddressEqual, a7 as isBytes, a8 as isHex, a9 as keccak256, aa as numberToBytes, ab as numberToHex, ac as pad, ad as padBytes, ae as padHex, af as parseEther, ag as parseGwei, ah as parseUnits, ai as recoverAddress, aj as recoverMessageAddress, ak as size, al as slice, am as sliceBytes, an as sliceHex, ao as stringToBytes, ap as stringToHex, aq as stringify, ar as toBytes, as as toHex, at as toRlp, au as trim, av as verifyMessage } from './parseGwei-
|
1
|
+
import { T as TransportConfig, a as Transport, B as BaseRpcRequests } from './createTransport-e3eba9f7.js';
|
2
|
+
export { C as Client, b as ClientConfig, a as Transport, T as TransportConfig, c as createClient, d as createTransport } from './createTransport-e3eba9f7.js';
|
3
|
+
import { B as BaseError, H as HttpOptions, R as RpcResponse } from './parseGwei-361e8a12.js';
|
4
|
+
export { B as BaseError, C as CallExecutionError, a as ContractFunctionExecutionError, b as ContractFunctionRevertedError, c as ContractFunctionZeroDataError, E as EstimateGasExecutionError, d as ExecutionRevertedError, F as FeeCapTooHighError, e as FeeCapTooLowError, G as GetContractAddressOptions, o as GetCreate2AddressOptions, p as GetCreateAddressOptions, I as InsufficientFundsError, f as IntrinsicGasTooHighError, g as IntrinsicGasTooLowError, N as NonceMaxValueError, h as NonceTooHighError, i as NonceTooLowError, j as RawContractError, T as TipAboveFeeCapError, q as ToRlpReturnType, k as TransactionExecutionError, m as TransactionNotFoundError, n as TransactionReceiptNotFoundError, l as TransactionTypeNotSupportedError, U as UnknownNodeError, W as WaitForTransactionReceiptTimeoutError, r as boolToBytes, s as boolToHex, t as bytesToBigint, u as bytesToBool, v as bytesToHex, w as bytesToNumber, x as bytesToString, y as concat, z as concatBytes, A as concatHex, D as formatEther, J as formatGwei, K as formatUnits, L as fromBytes, M as fromHex, O as fromRlp, P as getAccount, Q as getAddress, S as getContractAddress, V as getContractError, X as getCreate2Address, Y as getCreateAddress, Z as getEventSelector, _ as getFunctionSelector, $ as hashMessage, a0 as hexToBigInt, a1 as hexToBool, a2 as hexToBytes, a3 as hexToNumber, a4 as hexToString, a5 as isAddress, a6 as isAddressEqual, a7 as isBytes, a8 as isHex, a9 as keccak256, aa as numberToBytes, ab as numberToHex, ac as pad, ad as padBytes, ae as padHex, af as parseEther, ag as parseGwei, ah as parseUnits, ai as recoverAddress, aj as recoverMessageAddress, ak as size, al as slice, am as sliceBytes, an as sliceHex, ao as stringToBytes, ap as stringToHex, aq as stringify, ar as toBytes, as as toHex, at as toRlp, au as trim, av as verifyMessage } from './parseGwei-361e8a12.js';
|
5
5
|
import WebSocket from 'isomorphic-ws';
|
6
6
|
import { H as Hex, A as AbiItem, a as Hash, C as Chain, B as ByteArray } from './chain-1b53ef88.js';
|
7
7
|
export { A as AbiItem, b as AccessList, c as Block, d as BlockIdentifier, e as BlockNumber, f as BlockTag, B as ByteArray, C as Chain, g as ContractConfig, E as ExtractArgsFromAbi, h as ExtractConstructorArgsFromAbi, i as ExtractErrorArgsFromAbi, j as ExtractErrorNameFromAbi, k as ExtractEventArgsFromAbi, l as ExtractEventArgsFromTopics, m as ExtractEventNameFromAbi, W as ExtractFormatter, n as ExtractFunctionNameFromAbi, o as ExtractNameFromAbi, p as ExtractResultFromAbi, F as FeeHistory, q as FeeValues, r as FeeValuesEIP1559, s as FeeValuesLegacy, X as Formatted, Y as FormattedTransaction, a as Hash, H as Hex, L as Log, R as RpcBlock, t as RpcBlockIdentifier, u as RpcBlockNumber, v as RpcFeeHistory, w as RpcFeeValues, x as RpcLog, y as RpcTransaction, z as RpcTransactionReceipt, D as RpcTransactionRequest, G as RpcUncle, O as Transaction, P as TransactionBase, Q as TransactionEIP1559, S as TransactionEIP2930, Z as TransactionFormatter, U as TransactionLegacy, T as TransactionReceipt, I as TransactionRequest, J as TransactionRequestBase, K as TransactionRequestEIP1559, M as TransactionRequestEIP2930, N as TransactionRequestLegacy, V as Uncle, _ as defineTransaction, $ as formatTransaction, a0 as transactionType } from './chain-1b53ef88.js';
|
8
|
-
export { A as Account, B as BlockFormatter, F as FormattedBlock, e as FormattedTransactionReceipt, f as FormattedTransactionRequest, J as JsonRpcAccount, L as LocalAccount, P as PublicClient, a as PublicClientConfig, T as TransactionReceiptFormatter, g as TransactionRequestFormatter, W as WalletClient, b as WalletClientConfig, c as createPublicClient, d as createWalletClient, h as defineBlock, i as defineTransactionReceipt, j as defineTransactionRequest, k as formatBlock, l as formatTransactionRequest } from './createPublicClient-
|
9
|
-
export { T as TestClient, a as TestClientConfig, c as createTestClient } from './test-
|
8
|
+
export { A as Account, B as BlockFormatter, F as FormattedBlock, e as FormattedTransactionReceipt, f as FormattedTransactionRequest, J as JsonRpcAccount, L as LocalAccount, P as PublicClient, a as PublicClientConfig, T as TransactionReceiptFormatter, g as TransactionRequestFormatter, W as WalletClient, b as WalletClientConfig, c as createPublicClient, d as createWalletClient, h as defineBlock, i as defineTransactionReceipt, j as defineTransactionRequest, k as formatBlock, l as formatTransactionRequest } from './createPublicClient-31d44569.js';
|
9
|
+
export { T as TestClient, a as TestClientConfig, c as createTestClient } from './test-67630299.js';
|
10
10
|
import { AbiParameter } from 'abitype';
|
11
11
|
export { Address, ParseAbi, ParseAbiItem, ParseAbiParameter, ParseAbiParameters, parseAbi, parseAbiItem, parseAbiParameter, parseAbiParameters } from 'abitype';
|
12
12
|
export { l as labelhash, n as namehash } from './namehash-afff0feb.js';
|
@@ -375,11 +375,45 @@ type CustomTransport = Transport<'custom', EthereumProvider['request']>;
|
|
375
375
|
*/
|
376
376
|
declare function custom<TProvider extends EthereumProvider>(provider: TProvider, config?: CustomTransportConfig): CustomTransport;
|
377
377
|
|
378
|
+
type RankOptions = {
|
379
|
+
/**
|
380
|
+
* The polling interval (in ms) at which the ranker should ping the RPC URL.
|
381
|
+
* @default client.pollingInterval
|
382
|
+
*/
|
383
|
+
interval?: number;
|
384
|
+
/**
|
385
|
+
* The number of previous samples to perform ranking on.
|
386
|
+
* @default 10
|
387
|
+
*/
|
388
|
+
sampleCount?: number;
|
389
|
+
/**
|
390
|
+
* Timeout when sampling transports.
|
391
|
+
* @default 1_000
|
392
|
+
*/
|
393
|
+
timeout?: number;
|
394
|
+
/**
|
395
|
+
* Weights to apply to the scores. Weight values are proportional.
|
396
|
+
*/
|
397
|
+
weights?: {
|
398
|
+
/**
|
399
|
+
* The weight to apply to the latency score.
|
400
|
+
* @default 0.3
|
401
|
+
*/
|
402
|
+
latency?: number;
|
403
|
+
/**
|
404
|
+
* The weight to apply to the stability score.
|
405
|
+
* @default 0.7
|
406
|
+
*/
|
407
|
+
stability?: number;
|
408
|
+
};
|
409
|
+
};
|
378
410
|
type FallbackTransportConfig = {
|
379
411
|
/** The key of the Fallback transport. */
|
380
412
|
key?: TransportConfig['key'];
|
381
413
|
/** The name of the Fallback transport. */
|
382
414
|
name?: TransportConfig['name'];
|
415
|
+
/** Toggle to enable ranking, or rank options. */
|
416
|
+
rank?: boolean | RankOptions;
|
383
417
|
/** The max number of times to retry. */
|
384
418
|
retryCount?: TransportConfig['retryCount'];
|
385
419
|
/** The base delay (in ms) between retries. */
|
@@ -388,7 +422,7 @@ type FallbackTransportConfig = {
|
|
388
422
|
type FallbackTransport = Transport<'fallback', {
|
389
423
|
transports: Transport[];
|
390
424
|
}>;
|
391
|
-
declare function fallback(
|
425
|
+
declare function fallback(transports_: Transport[], config?: FallbackTransportConfig): FallbackTransport;
|
392
426
|
|
393
427
|
type HttpTransportConfig = {
|
394
428
|
/**
|