Socket
Socket
Sign inDemoInstall

viem

Package Overview
Dependencies
Maintainers
1
Versions
2132
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

viem - npm Package Compare versions

Comparing version 0.0.1-sushi.27 to 0.1.0

abi/package.json

12

dist/chains.d.ts

@@ -1,5 +0,7 @@

import { R as RpcBlock, d as Block, x as Transaction, H as Hex, o as RpcTransaction, p as RpcTransactionReceipt, T as TransactionReceipt, K as TransactionType, s as TransactionRequest, q as RpcTransactionRequest } from './chain-9a8c6614.js';
export { C as Chain } from './chain-9a8c6614.js';
export { d as defineChain } from './chain-83ece55b.js';
import { R as RpcBlock, c as Block, y as Transaction, H as Hex, p as RpcTransaction, q as RpcTransactionReceipt, T as TransactionReceipt, V as TransactionType, t as TransactionRequest, r as RpcTransactionRequest } from './chain-819c7ff7.js';
export { C as Chain } from './chain-819c7ff7.js';
export { d as defineChain } from './chain-a4f98ba3.js';
import '@wagmi/chains';
import 'abitype';
import 'ethers@6/types/providers';

@@ -375,6 +377,6 @@ declare const arbitrum: {

} & {
nonce: never;
difficulty: never;
gasLimit: never;
mixHash: never;
nonce: never;
uncles: never;

@@ -451,6 +453,6 @@ };

} & {
nonce: never;
difficulty: never;
gasLimit: never;
mixHash: never;
nonce: never;
uncles: never;

@@ -457,0 +459,0 @@ };

@@ -7,3 +7,3 @@ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } }

var _chunk3MFDRMZWjs = require('./chunk-3MFDRMZW.js');
var _chunkQJNPIGP5js = require('./chunk-QJNPIGP5.js');

@@ -13,3 +13,3 @@ // src/chains.ts

var celoFormatters = {
block: _chunk3MFDRMZWjs.defineBlock.call(void 0, {
block: _chunkQJNPIGP5js.defineBlock.call(void 0, {
exclude: ["difficulty", "gasLimit", "mixHash", "nonce", "uncles"],

@@ -20,3 +20,3 @@ format: (block) => ({

}),
transaction: _chunk3MFDRMZWjs.defineTransaction.call(void 0, {
transaction: _chunkQJNPIGP5js.defineTransaction.call(void 0, {
format: (transaction) => ({

@@ -28,3 +28,3 @@ feeCurrency: transaction.feeCurrency,

}),
transactionReceipt: _chunk3MFDRMZWjs.defineTransactionReceipt.call(void 0, {
transactionReceipt: _chunkQJNPIGP5js.defineTransactionReceipt.call(void 0, {
format: (transaction) => ({

@@ -36,3 +36,3 @@ feeCurrency: transaction.feeCurrency,

}),
transactionRequest: _chunk3MFDRMZWjs.defineTransactionRequest.call(void 0, {
transactionRequest: _chunkQJNPIGP5js.defineTransactionRequest.call(void 0, {
format: (transactionRequest) => ({

@@ -45,48 +45,48 @@ feeCurrency: transactionRequest.feeCurrency,

};
var arbitrum2 = _chunk3MFDRMZWjs.defineChain.call(void 0, chains.arbitrum);
var arbitrumGoerli2 = _chunk3MFDRMZWjs.defineChain.call(void 0, chains.arbitrumGoerli);
var aurora2 = _chunk3MFDRMZWjs.defineChain.call(void 0, chains.aurora);
var auroraGoerli = _chunk3MFDRMZWjs.defineChain.call(void 0, chains.auroraTestnet);
var avalanche2 = _chunk3MFDRMZWjs.defineChain.call(void 0, chains.avalanche);
var avalancheFuji2 = _chunk3MFDRMZWjs.defineChain.call(void 0, chains.avalancheFuji);
var bronos2 = _chunk3MFDRMZWjs.defineChain.call(void 0, chains.bronos);
var bronosTestnet2 = _chunk3MFDRMZWjs.defineChain.call(void 0, chains.bronosTestnet);
var bsc2 = _chunk3MFDRMZWjs.defineChain.call(void 0, chains.bsc);
var bscTestnet2 = _chunk3MFDRMZWjs.defineChain.call(void 0, chains.bscTestnet);
var canto2 = _chunk3MFDRMZWjs.defineChain.call(void 0, chains.canto);
var celo2 = _chunk3MFDRMZWjs.defineChain.call(void 0, {
var arbitrum2 = _chunkQJNPIGP5js.defineChain.call(void 0, chains.arbitrum);
var arbitrumGoerli2 = _chunkQJNPIGP5js.defineChain.call(void 0, chains.arbitrumGoerli);
var aurora2 = _chunkQJNPIGP5js.defineChain.call(void 0, chains.aurora);
var auroraGoerli = _chunkQJNPIGP5js.defineChain.call(void 0, chains.auroraTestnet);
var avalanche2 = _chunkQJNPIGP5js.defineChain.call(void 0, chains.avalanche);
var avalancheFuji2 = _chunkQJNPIGP5js.defineChain.call(void 0, chains.avalancheFuji);
var bronos2 = _chunkQJNPIGP5js.defineChain.call(void 0, chains.bronos);
var bronosTestnet2 = _chunkQJNPIGP5js.defineChain.call(void 0, chains.bronosTestnet);
var bsc2 = _chunkQJNPIGP5js.defineChain.call(void 0, chains.bsc);
var bscTestnet2 = _chunkQJNPIGP5js.defineChain.call(void 0, chains.bscTestnet);
var canto2 = _chunkQJNPIGP5js.defineChain.call(void 0, chains.canto);
var celo2 = _chunkQJNPIGP5js.defineChain.call(void 0, {
...chains.celo,
formatters: celoFormatters
});
var celoAlfajores2 = _chunk3MFDRMZWjs.defineChain.call(void 0, {
var celoAlfajores2 = _chunkQJNPIGP5js.defineChain.call(void 0, {
...chains.celoAlfajores,
formatters: celoFormatters
});
var crossbell2 = _chunk3MFDRMZWjs.defineChain.call(void 0, chains.crossbell);
var evmos2 = _chunk3MFDRMZWjs.defineChain.call(void 0, chains.evmos);
var evmosTestnet2 = _chunk3MFDRMZWjs.defineChain.call(void 0, chains.evmosTestnet);
var fantom2 = _chunk3MFDRMZWjs.defineChain.call(void 0, chains.fantom);
var fantomTestnet2 = _chunk3MFDRMZWjs.defineChain.call(void 0, chains.fantomTestnet);
var filecoin2 = _chunk3MFDRMZWjs.defineChain.call(void 0, chains.filecoin);
var filecoinTestnet = _chunk3MFDRMZWjs.defineChain.call(void 0, chains.filecoinHyperspace);
var foundry2 = _chunk3MFDRMZWjs.defineChain.call(void 0, chains.foundry);
var goerli2 = _chunk3MFDRMZWjs.defineChain.call(void 0, chains.goerli);
var gnosis2 = _chunk3MFDRMZWjs.defineChain.call(void 0, chains.gnosis);
var gnosisChiado2 = _chunk3MFDRMZWjs.defineChain.call(void 0, chains.gnosisChiado);
var hardhat2 = _chunk3MFDRMZWjs.defineChain.call(void 0, chains.hardhat);
var iotex2 = _chunk3MFDRMZWjs.defineChain.call(void 0, chains.iotex);
var iotexTestnet2 = _chunk3MFDRMZWjs.defineChain.call(void 0, chains.iotexTestnet);
var localhost2 = _chunk3MFDRMZWjs.defineChain.call(void 0, chains.localhost);
var mainnet2 = _chunk3MFDRMZWjs.defineChain.call(void 0, chains.mainnet);
var metis2 = _chunk3MFDRMZWjs.defineChain.call(void 0, chains.metis);
var metisGoerli2 = _chunk3MFDRMZWjs.defineChain.call(void 0, chains.metisGoerli);
var optimism2 = _chunk3MFDRMZWjs.defineChain.call(void 0, chains.optimism);
var optimismGoerli2 = _chunk3MFDRMZWjs.defineChain.call(void 0, chains.optimismGoerli);
var polygon2 = _chunk3MFDRMZWjs.defineChain.call(void 0, chains.polygon);
var polygonMumbai2 = _chunk3MFDRMZWjs.defineChain.call(void 0, chains.polygonMumbai);
var sepolia2 = _chunk3MFDRMZWjs.defineChain.call(void 0, chains.sepolia);
var taraxa2 = _chunk3MFDRMZWjs.defineChain.call(void 0, chains.taraxa);
var taraxaTestnet2 = _chunk3MFDRMZWjs.defineChain.call(void 0, chains.taraxaTestnet);
var zkSync2 = _chunk3MFDRMZWjs.defineChain.call(void 0, chains.zkSync);
var zkSyncTestnet2 = _chunk3MFDRMZWjs.defineChain.call(void 0, chains.zkSyncTestnet);
var crossbell2 = _chunkQJNPIGP5js.defineChain.call(void 0, chains.crossbell);
var evmos2 = _chunkQJNPIGP5js.defineChain.call(void 0, chains.evmos);
var evmosTestnet2 = _chunkQJNPIGP5js.defineChain.call(void 0, chains.evmosTestnet);
var fantom2 = _chunkQJNPIGP5js.defineChain.call(void 0, chains.fantom);
var fantomTestnet2 = _chunkQJNPIGP5js.defineChain.call(void 0, chains.fantomTestnet);
var filecoin2 = _chunkQJNPIGP5js.defineChain.call(void 0, chains.filecoin);
var filecoinTestnet = _chunkQJNPIGP5js.defineChain.call(void 0, chains.filecoinHyperspace);
var foundry2 = _chunkQJNPIGP5js.defineChain.call(void 0, chains.foundry);
var goerli2 = _chunkQJNPIGP5js.defineChain.call(void 0, chains.goerli);
var gnosis2 = _chunkQJNPIGP5js.defineChain.call(void 0, chains.gnosis);
var gnosisChiado2 = _chunkQJNPIGP5js.defineChain.call(void 0, chains.gnosisChiado);
var hardhat2 = _chunkQJNPIGP5js.defineChain.call(void 0, chains.hardhat);
var iotex2 = _chunkQJNPIGP5js.defineChain.call(void 0, chains.iotex);
var iotexTestnet2 = _chunkQJNPIGP5js.defineChain.call(void 0, chains.iotexTestnet);
var localhost2 = _chunkQJNPIGP5js.defineChain.call(void 0, chains.localhost);
var mainnet2 = _chunkQJNPIGP5js.defineChain.call(void 0, chains.mainnet);
var metis2 = _chunkQJNPIGP5js.defineChain.call(void 0, chains.metis);
var metisGoerli2 = _chunkQJNPIGP5js.defineChain.call(void 0, chains.metisGoerli);
var optimism2 = _chunkQJNPIGP5js.defineChain.call(void 0, chains.optimism);
var optimismGoerli2 = _chunkQJNPIGP5js.defineChain.call(void 0, chains.optimismGoerli);
var polygon2 = _chunkQJNPIGP5js.defineChain.call(void 0, chains.polygon);
var polygonMumbai2 = _chunkQJNPIGP5js.defineChain.call(void 0, chains.polygonMumbai);
var sepolia2 = _chunkQJNPIGP5js.defineChain.call(void 0, chains.sepolia);
var taraxa2 = _chunkQJNPIGP5js.defineChain.call(void 0, chains.taraxa);
var taraxaTestnet2 = _chunkQJNPIGP5js.defineChain.call(void 0, chains.taraxaTestnet);
var zkSync2 = _chunkQJNPIGP5js.defineChain.call(void 0, chains.zkSync);
var zkSyncTestnet2 = _chunkQJNPIGP5js.defineChain.call(void 0, chains.zkSyncTestnet);

@@ -134,3 +134,3 @@

exports.arbitrum = arbitrum2; exports.arbitrumGoerli = arbitrumGoerli2; exports.aurora = aurora2; exports.auroraGoerli = auroraGoerli; exports.avalanche = avalanche2; exports.avalancheFuji = avalancheFuji2; exports.bronos = bronos2; exports.bronosTestnet = bronosTestnet2; exports.bsc = bsc2; exports.bscTestnet = bscTestnet2; exports.canto = canto2; exports.celo = celo2; exports.celoAlfajores = celoAlfajores2; exports.crossbell = crossbell2; exports.defineChain = _chunk3MFDRMZWjs.defineChain; exports.evmos = evmos2; exports.evmosTestnet = evmosTestnet2; exports.fantom = fantom2; exports.fantomTestnet = fantomTestnet2; exports.filecoin = filecoin2; exports.filecoinTestnet = filecoinTestnet; exports.foundry = foundry2; exports.gnosis = gnosis2; exports.gnosisChiado = gnosisChiado2; exports.goerli = goerli2; exports.hardhat = hardhat2; exports.iotex = iotex2; exports.iotexTestnet = iotexTestnet2; exports.localhost = localhost2; exports.mainnet = mainnet2; exports.metis = metis2; exports.metisGoerli = metisGoerli2; exports.optimism = optimism2; exports.optimismGoerli = optimismGoerli2; exports.polygon = polygon2; exports.polygonMumbai = polygonMumbai2; exports.sepolia = sepolia2; exports.taraxa = taraxa2; exports.taraxaTestnet = taraxaTestnet2; exports.zkSync = zkSync2; exports.zkSyncTestnet = zkSyncTestnet2;
exports.arbitrum = arbitrum2; exports.arbitrumGoerli = arbitrumGoerli2; exports.aurora = aurora2; exports.auroraGoerli = auroraGoerli; exports.avalanche = avalanche2; exports.avalancheFuji = avalancheFuji2; exports.bronos = bronos2; exports.bronosTestnet = bronosTestnet2; exports.bsc = bsc2; exports.bscTestnet = bscTestnet2; exports.canto = canto2; exports.celo = celo2; exports.celoAlfajores = celoAlfajores2; exports.crossbell = crossbell2; exports.defineChain = _chunkQJNPIGP5js.defineChain; exports.evmos = evmos2; exports.evmosTestnet = evmosTestnet2; exports.fantom = fantom2; exports.fantomTestnet = fantomTestnet2; exports.filecoin = filecoin2; exports.filecoinTestnet = filecoinTestnet; exports.foundry = foundry2; exports.gnosis = gnosis2; exports.gnosisChiado = gnosisChiado2; exports.goerli = goerli2; exports.hardhat = hardhat2; exports.iotex = iotex2; exports.iotexTestnet = iotexTestnet2; exports.localhost = localhost2; exports.mainnet = mainnet2; exports.metis = metis2; exports.metisGoerli = metisGoerli2; exports.optimism = optimism2; exports.optimismGoerli = optimismGoerli2; exports.polygon = polygon2; exports.polygonMumbai = polygonMumbai2; exports.sepolia = sepolia2; exports.taraxa = taraxa2; exports.taraxaTestnet = taraxaTestnet2; exports.zkSync = zkSync2; exports.zkSyncTestnet = zkSyncTestnet2;
//# sourceMappingURL=chains.js.map

@@ -1,123 +0,10 @@

export { D as DecodeAbiArgs, a as DecodeEventLogArgs, b as DecodeEventLogResponse, c as DecodeFunctionDataArgs, d as DecodeFunctionResultArgs, e as DecodeFunctionResultResponse, E as EncodeAbiArgs, f as EncodeDeployDataArgs, g as EncodeErrorResultArgs, h as EncodeEventTopicsArgs, i as EncodeFunctionDataArgs, j as EncodeFunctionResultArgs, G as GetAbiItemArgs, k as decodeAbi, l as decodeEventLog, m as decodeFunctionData, n as decodeFunctionResult, o as encodeAbi, p as encodeDeployData, q as encodeErrorResult, r as encodeEventTopics, s as encodeFunctionData, t as encodeFunctionResult, v as formatAbiItem, u as formatAbiItemWithArgs, w as getAbiItem } from './getAbiItem-540089dd.js';
export { a as DecodeErrorResultArgs, D as DecodeErrorResultResponse, d as decodeErrorResult } from './decodeErrorResult-b0d3ce71.js';
import { Abi, Narrow } from 'abitype';
import { C as Chain, H as Hex, A as Address, b as BlockTag, L as Log } from './chain-9a8c6614.js';
import { C as ContractConfig, E as ExtractResultFromAbi, a as ExtractConstructorArgsFromAbi, G as GetValue, b as ExtractEventNameFromAbi, c as ExtractEventArgsFromAbi } from './contract-3b4a1df6.js';
import { P as PublicClient } from './createPublicClient-9823f081.js';
import { W as WalletClient } from './createWalletClient-6dbbe0ee.js';
import { S as SendTransactionArgs, a as SendTransactionResponse } from './sendTransaction-50d22f3e.js';
import { C as CallArgs } from './call-14050d5c.js';
export { G as GetBytecodeArgs, a as GetBytecodeResponse, O as OnLogs, b as OnLogsResponse, g as getBytecode } from './watchEvent-ca77f9e9.js';
export { R as ReadContractArgs, a as ReadContractResponse, r as readContract } from './readContract-5c96b3bc.js';
import 'abitype/dist/abi-78346466';
import './chain-819c7ff7.js';
export { D as DecodeAbiParametersReturnType, E as EncodeAbiParametersReturnType, G as GetAbiItemParameters, d as decodeAbiParameters, e as encodeAbiParameters, g as getAbiItem } from './getAbiItem-159f3263.js';
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-9eb553ce.js';
export { a as formatAbiItem, f as formatAbiItemWithArgs } from './formatAbiItem-622d2303.js';
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-e2eae0fc.js';
import '@wagmi/chains';
import './eip1193-bbebfb3d.js';
import './createClient-cc01b906.js';
import './transactionRequest-37f60d32.js';
type MAXIMUM_DEPTH = 20;
type Contract<TAbi extends Abi | readonly unknown[] = Abi | readonly unknown[], TFunctionName extends string = string> = {
abi: TAbi;
functionName: TFunctionName;
};
type MulticallContracts<TContracts extends Contract[], TProperties extends Record<string, any> = object, Result extends any[] = [], Depth extends ReadonlyArray<number> = []> = Depth['length'] extends MAXIMUM_DEPTH ? (ContractConfig & TProperties)[] : TContracts extends [] ? [] : TContracts extends [infer Head extends Contract] ? [
...Result,
ContractConfig<Head['abi'], Head['functionName']> & TProperties
] : TContracts extends [
infer Head extends Contract,
...infer Tail extends Contract[]
] ? MulticallContracts<[
...Tail
], TProperties, [
...Result,
ContractConfig<Head['abi'], Head['functionName']> & TProperties
], [
...Depth,
1
]> : unknown[] extends TContracts ? TContracts : TContracts extends ContractConfig<infer TAbi, infer TFunctionName>[] ? (ContractConfig<TAbi, TFunctionName> & TProperties)[] : (ContractConfig & TProperties)[];
type MulticallResult<Result, TAllowFailure extends boolean = true> = TAllowFailure extends true ? ({
error?: undefined;
result: Result;
status: 'success';
} | {
error: Error;
result?: undefined;
status: 'error';
}) : Result;
type MulticallResults<TContracts extends Contract[], TAllowFailure extends boolean = true, Result extends any[] = [], Depth extends ReadonlyArray<number> = []> = Depth['length'] extends MAXIMUM_DEPTH ? MulticallResult<ExtractResultFromAbi, TAllowFailure>[] : TContracts extends [] ? [] : TContracts extends [infer Head extends Contract] ? [...Result, MulticallResult<ExtractResultFromAbi<Head['abi'], Head['functionName']>, TAllowFailure>] : TContracts extends [
infer Head extends Contract,
...infer Tail extends Contract[]
] ? MulticallResults<[
...Tail
], TAllowFailure, [
...Result,
MulticallResult<ExtractResultFromAbi<Head['abi'], Head['functionName']>, TAllowFailure>
], [
...Depth,
1
]> : TContracts extends ContractConfig<infer TAbi, infer TFunctionName>[] ? MulticallResult<ExtractResultFromAbi<TAbi, TFunctionName>, TAllowFailure>[] : MulticallResult<ExtractResultFromAbi, TAllowFailure>[];
type DeployContractArgs<TChain extends Chain = Chain, TAbi extends Abi | readonly unknown[] = Abi> = Omit<SendTransactionArgs<TChain>, 'accessList' | 'to' | 'data' | 'value'> & {
abi: Narrow<TAbi>;
bytecode: Hex;
} & ExtractConstructorArgsFromAbi<TAbi>;
type DeployContractResponse = SendTransactionResponse;
declare function deployContract<TChain extends Chain, TAbi extends Abi>(walletClient: WalletClient, { abi, args, bytecode, ...request }: DeployContractArgs<TChain, TAbi>): Promise<DeployContractResponse>;
type WriteContractArgs<TChain extends Chain = Chain, TAbi extends Abi | readonly unknown[] = Abi, TFunctionName extends string = string> = Omit<SendTransactionArgs<TChain>, 'to' | 'data' | 'value'> & {
value?: GetValue<TAbi, TFunctionName, SendTransactionArgs<TChain>['value']>;
} & ContractConfig<TAbi, TFunctionName, 'payable' | 'nonpayable'>;
type WriteContractResponse = SendTransactionResponse;
declare function writeContract<TChain extends Chain, TAbi extends Abi | readonly unknown[], TFunctionName extends string>(client: WalletClient, { abi, address, args, functionName, ...request }: WriteContractArgs<TChain, TAbi, TFunctionName>): Promise<WriteContractResponse>;
type SimulateContractArgs<TChain extends Chain = Chain, TAbi extends Abi | readonly unknown[] = Abi, TFunctionName extends string = any> = Omit<CallArgs<TChain>, 'to' | 'data' | 'value'> & ContractConfig<TAbi, TFunctionName, 'payable' | 'nonpayable'> & {
value?: GetValue<TAbi, TFunctionName, CallArgs<TChain>['value']>;
};
type SimulateContractResponse<TChain extends Chain = Chain, TAbi extends Abi | readonly unknown[] = Abi, TFunctionName extends string = string> = {
result: ExtractResultFromAbi<TAbi, TFunctionName>;
request: WriteContractArgs<TChain, TAbi, TFunctionName> & ContractConfig<TAbi, TFunctionName, 'payable' | 'nonpayable'>;
};
declare function simulateContract<TChain extends Chain, TAbi extends Abi | readonly unknown[], TFunctionName extends string>(client: PublicClient, { abi, address, args, functionName, ...callRequest }: SimulateContractArgs<TChain, TAbi, TFunctionName>): Promise<SimulateContractResponse<TChain, TAbi, TFunctionName>>;
type GetStorageAtArgs = {
address: Address;
slot: Hex;
} & ({
blockNumber?: never;
blockTag?: BlockTag;
} | {
blockNumber?: bigint;
blockTag?: never;
});
type GetStorageAtResponse = Hex | undefined;
declare function getStorageAt(client: PublicClient, { address, blockNumber, blockTag, slot }: GetStorageAtArgs): Promise<GetStorageAtResponse>;
type MulticallArgs<TContracts extends ContractConfig[] = ContractConfig[], TAllowFailure extends boolean = true> = Pick<CallArgs, 'blockNumber' | 'blockTag'> & {
allowFailure?: TAllowFailure;
contracts: readonly [...MulticallContracts<TContracts>];
multicallAddress: Address;
};
type MulticallResponse<TContracts extends ContractConfig[] = ContractConfig[], TAllowFailure extends boolean = true> = MulticallResults<TContracts, TAllowFailure>;
declare function multicall<TContracts extends ContractConfig[], TAllowFailure extends boolean = true>(client: PublicClient, args: MulticallArgs<TContracts, TAllowFailure>): Promise<MulticallResponse<TContracts, TAllowFailure>>;
type OnLogsResponse = Log[];
type OnLogs = (logs: OnLogsResponse) => void;
type WatchContractEventArgs<TAbi extends Abi | readonly unknown[] = Abi, TEventName extends string = any> = {
/** The address of the contract. */
address: Address | Address[];
/** Contract ABI. */
abi: TAbi;
/** Whether or not the event logs should be batched on each invocation. */
batch?: boolean;
/** Contract event. */
eventName?: ExtractEventNameFromAbi<TAbi, TEventName>;
/** The callback to call when an error occurred when trying to get for a new block. */
onError?: (error: Error) => void;
/** The callback to call when new event logs are received. */
onLogs: OnLogs;
/** Polling frequency (in ms). Defaults to Client's pollingInterval config. */
pollingInterval?: number;
} & ExtractEventArgsFromAbi<TAbi, TEventName>;
declare function watchContractEvent<TAbi extends Abi | readonly unknown[] = Abi, TEventName extends string = any>(client: PublicClient, { abi, address, args, batch, eventName, onError, onLogs, pollingInterval, }: WatchContractEventArgs<TAbi, TEventName>): () => void;
export { DeployContractArgs, DeployContractResponse, GetStorageAtArgs, GetStorageAtResponse, MulticallArgs, MulticallResponse, SimulateContractArgs, SimulateContractResponse, WatchContractEventArgs, WriteContractArgs, WriteContractResponse, deployContract, getStorageAt, multicall, simulateContract, watchContractEvent, writeContract };
import 'abitype';
import 'ethers@6/types/providers';
import './eip1193-a882d1b8.js';
import './createClient-a47ae6f5.js';

@@ -8,7 +8,5 @@ "use strict";Object.defineProperty(exports, "__esModule", {value: true});

var _chunkXB55RCBEjs = require('./chunk-XB55RCBE.js');
var _chunk4MP6LO5Vjs = require('./chunk-4MP6LO5V.js');

@@ -29,3 +27,3 @@

var _chunk3MFDRMZWjs = require('./chunk-3MFDRMZW.js');
var _chunkQJNPIGP5js = require('./chunk-QJNPIGP5.js');

@@ -54,3 +52,5 @@

exports.decodeAbi = _chunk3MFDRMZWjs.decodeAbi; exports.decodeErrorResult = _chunk3MFDRMZWjs.decodeErrorResult; exports.decodeEventLog = _chunk3MFDRMZWjs.decodeEventLog; exports.decodeFunctionData = _chunk3MFDRMZWjs.decodeFunctionData; exports.decodeFunctionResult = _chunk3MFDRMZWjs.decodeFunctionResult; exports.deployContract = _chunk4MP6LO5Vjs.deployContract; exports.encodeAbi = _chunk3MFDRMZWjs.encodeAbi; exports.encodeDeployData = _chunk3MFDRMZWjs.encodeDeployData; exports.encodeErrorResult = _chunk3MFDRMZWjs.encodeErrorResult; exports.encodeEventTopics = _chunk3MFDRMZWjs.encodeEventTopics; exports.encodeFunctionData = _chunk3MFDRMZWjs.encodeFunctionData; exports.encodeFunctionResult = _chunk3MFDRMZWjs.encodeFunctionResult; exports.formatAbiItem = _chunk3MFDRMZWjs.formatAbiItem; exports.formatAbiItemWithArgs = _chunk3MFDRMZWjs.formatAbiItemWithArgs; exports.getAbiItem = _chunk3MFDRMZWjs.getAbiItem; exports.getBytecode = _chunkXB55RCBEjs.getBytecode; exports.getStorageAt = _chunkXB55RCBEjs.getStorageAt; exports.multicall = _chunkXB55RCBEjs.multicall; exports.readContract = _chunkXB55RCBEjs.readContract; exports.simulateContract = _chunkXB55RCBEjs.simulateContract; exports.watchContractEvent = _chunkXB55RCBEjs.watchContractEvent; exports.writeContract = _chunk4MP6LO5Vjs.writeContract;
exports.createContractEventFilter = _chunkQJNPIGP5js.createContractEventFilter; exports.decodeAbiParameters = _chunkQJNPIGP5js.decodeAbiParameters; exports.decodeErrorResult = _chunkQJNPIGP5js.decodeErrorResult; exports.decodeEventLog = _chunkQJNPIGP5js.decodeEventLog; exports.decodeFunctionData = _chunkQJNPIGP5js.decodeFunctionData; exports.decodeFunctionResult = _chunkQJNPIGP5js.decodeFunctionResult; exports.deployContract = _chunkQJNPIGP5js.deployContract; exports.encodeAbiParameters = _chunkQJNPIGP5js.encodeAbiParameters; exports.encodeDeployData = _chunkQJNPIGP5js.encodeDeployData; exports.encodeErrorResult = _chunkQJNPIGP5js.encodeErrorResult; exports.encodeEventTopics = _chunkQJNPIGP5js.encodeEventTopics; exports.encodeFunctionData = _chunkQJNPIGP5js.encodeFunctionData; exports.encodeFunctionResult = _chunkQJNPIGP5js.encodeFunctionResult; exports.estimateContractGas = _chunkQJNPIGP5js.estimateContractGas; exports.formatAbiItem = _chunkQJNPIGP5js.formatAbiItem; exports.formatAbiItemWithArgs = _chunkQJNPIGP5js.formatAbiItemWithArgs; exports.getAbiItem = _chunkQJNPIGP5js.getAbiItem; exports.getBytecode = _chunkQJNPIGP5js.getBytecode; exports.getStorageAt = _chunkQJNPIGP5js.getStorageAt; exports.multicall = _chunkQJNPIGP5js.multicall; exports.readContract = _chunkQJNPIGP5js.readContract; exports.simulateContract = _chunkQJNPIGP5js.simulateContract; exports.watchContractEvent = _chunkQJNPIGP5js.watchContractEvent; exports.writeContract = _chunkQJNPIGP5js.writeContract;
//# sourceMappingURL=contract.js.map

@@ -1,72 +0,11 @@

import { P as Prettify, A as Address } from './chain-9a8c6614.js';
import { P as PublicClient } from './createPublicClient-9823f081.js';
import { R as ReadContractArgs } from './readContract-5c96b3bc.js';
export { a0 as GetEnsAddressParameters, a1 as GetEnsNameParameters, a2 as getEnsAddress, a3 as getEnsName } from './createPublicClient-e2eae0fc.js';
export { l as labelhash, n as namehash } from './namehash-afff0feb.js';
import './chain-819c7ff7.js';
import './eip1193-a882d1b8.js';
import 'abitype';
import './createClient-a47ae6f5.js';
import '@wagmi/chains';
import './eip1193-bbebfb3d.js';
import './createClient-cc01b906.js';
import 'abitype';
import './contract-3b4a1df6.js';
import './call-14050d5c.js';
import './transactionRequest-37f60d32.js';
import 'ethers@6/types/providers';
type GetEnsAddressArgs = Prettify<Pick<ReadContractArgs, 'blockNumber' | 'blockTag'> & {
/** ENS name to get address. */
name: string;
/** Address of ENS Universal Resolver Contract */
universalResolverAddress?: Address;
}>;
/**
* @description Gets address for ENS name.
*
* - Calls `resolve(bytes, bytes)` on ENS Universal Resolver Contract.
*
* @example
* const ensAddress = await getEnsAddress(publicClient, {
* name: 'wagmi-dev.eth',
* })
* // '0xd2135CfB216b74109775236E36d4b433F1DF507B'
*/
declare function getEnsAddress(client: PublicClient, { blockNumber, blockTag, name, universalResolverAddress: universalResolverAddress_, }: GetEnsAddressArgs): Promise<`0x${string}`>;
type GetEnsNameArgs = Prettify<Pick<ReadContractArgs, 'blockNumber' | 'blockTag'> & {
/** Address to get ENS name for. */
address: Address;
/** Address of ENS Universal Resolver Contract. */
universalResolverAddress?: Address;
}>;
/**
* @description Gets primary name for specified address.
*
* - Calls `reverse(bytes)` on ENS Universal Resolver Contract.
*
* @example
* const ensName = await getEnsName(publicClient, {
* address: '0xd2135CfB216b74109775236E36d4b433F1DF507B',
* })
* // 'wagmi-dev.eth'
*/
declare function getEnsName(client: PublicClient, { address, blockNumber, blockTag, universalResolverAddress: universalResolverAddress_, }: GetEnsNameArgs): Promise<string | null>;
/**
* @description Hashes ENS label
*
* @example
* labelhash('eth')
* '0x4f5b812789fc606be1b3b16908db13fc7a9adf7ca72641f84d75b47069d3d7f0'
*/
declare function labelhash(label: string): `0x${string}`;
/**
* @description Hashes ENS name
*
* @example
* namehash('wagmi-dev.eth')
* '0xf246651c1b9a6b141d19c2604e9a58f567973833990f830d882534a747801359'
*
* @see https://eips.ethereum.org/EIPS/eip-137
* @see https://docs.ens.domains/contract-api-reference/name-processing#hashing-names
*/
declare function namehash(name: string): `0x${string}`;
/**
* @description Normalizes ENS name

@@ -82,2 +21,2 @@ *

export { GetEnsAddressArgs, GetEnsNameArgs, getEnsAddress, getEnsName, labelhash, namehash, normalize };
export { normalize };

@@ -1,18 +0,9 @@

"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
var _chunkXB55RCBEjs = require('./chunk-XB55RCBE.js');
var _chunkHCZO3OIXjs = require('./chunk-HCZO3OIX.js');
require('./chunk-QJNPIGP5.js');
var _chunk3MFDRMZWjs = require('./chunk-3MFDRMZW.js');
// src/utils/ens/normalize.ts

@@ -24,194 +15,8 @@ var _idnauts46hx = require('idna-uts46-hx');

// src/utils/ens/labelhash.ts
function labelhash(label) {
let result = new Uint8Array(32).fill(0);
if (!label)
return _chunk3MFDRMZWjs.bytesToHex.call(void 0, result);
return _chunk3MFDRMZWjs.keccak256.call(void 0, _chunk3MFDRMZWjs.stringToBytes.call(void 0, normalize(label)));
}
// src/utils/ens/namehash.ts
function namehash(name) {
let result = new Uint8Array(32).fill(0);
if (!name)
return _chunk3MFDRMZWjs.bytesToHex.call(void 0, result);
const labels = normalize(name).split(".");
for (let i = labels.length - 1; i >= 0; i -= 1) {
const hashed = _chunk3MFDRMZWjs.keccak256.call(void 0, _chunk3MFDRMZWjs.stringToBytes.call(void 0, labels[i]), "bytes");
result = _chunk3MFDRMZWjs.keccak256.call(void 0, _chunk3MFDRMZWjs.concat.call(void 0, [result, hashed]), "bytes");
}
return _chunk3MFDRMZWjs.bytesToHex.call(void 0, result);
}
// src/utils/ens/packetToBytes.ts
function packetToBytes(packet) {
function length(value2) {
if (value2 === "." || value2 === "..")
return 1;
return _chunk3MFDRMZWjs.encodeBytes.call(void 0, value2.replace(/^\.|\.$/gm, "")).length + 2;
}
const bytes = new Uint8Array(length(packet));
const value = packet.replace(/^\.|\.$/gm, "");
if (!value.length)
return bytes;
let offset = 0;
const list = value.split(".");
for (let i = 0; i < list.length; i++) {
const encoded = _chunk3MFDRMZWjs.encodeBytes.call(void 0, list[i]);
bytes[offset] = encoded.length;
bytes.set(encoded, offset + 1);
offset += encoded.length + 1;
}
return bytes;
}
// src/actions/ens/getEnsAddress.ts
async function getEnsAddress(client, {
blockNumber,
blockTag,
name,
universalResolverAddress: universalResolverAddress_
}) {
let universalResolverAddress = universalResolverAddress_;
if (!universalResolverAddress) {
if (!client.chain)
throw new Error(
"client chain not configured. universalResolverAddress is required."
);
const contract = _optionalChain([client, 'access', _ => _.chain, 'optionalAccess', _2 => _2.contracts, 'optionalAccess', _3 => _3.ensUniversalResolver]);
if (!contract)
throw new (0, _chunk3MFDRMZWjs.ChainDoesNotSupportContract)({
chain: client.chain,
contract: { name: "ensUniversalResolver" }
});
if (blockNumber && contract.blockCreated && contract.blockCreated > blockNumber)
throw new (0, _chunk3MFDRMZWjs.ChainDoesNotSupportContract)({
blockNumber,
chain: client.chain,
contract: {
name: "ensUniversalResolver",
blockCreated: contract.blockCreated
}
});
universalResolverAddress = contract.address;
}
const res = await _chunkXB55RCBEjs.readContract.call(void 0, client, {
address: universalResolverAddress,
abi: [
{
name: "resolve",
type: "function",
stateMutability: "view",
inputs: [
{ name: "name", type: "bytes" },
{ name: "data", type: "bytes" }
],
outputs: [
{ name: "", type: "bytes" },
{ name: "address", type: "address" }
]
}
],
functionName: "resolve",
args: [
_chunk3MFDRMZWjs.encodeHex.call(void 0, packetToBytes(name)),
_chunk3MFDRMZWjs.encodeFunctionData.call(void 0, {
abi: [
{
name: "addr",
type: "function",
stateMutability: "view",
inputs: [{ name: "name", type: "bytes32" }],
outputs: []
}
],
functionName: "addr",
args: [namehash(name)]
})
],
blockNumber,
blockTag
});
return _chunk3MFDRMZWjs.decodeFunctionResult.call(void 0, {
abi: [
{
name: "addr",
type: "function",
stateMutability: "view",
inputs: [],
outputs: [{ name: "name", type: "address" }]
}
],
functionName: "addr",
data: res[0]
});
}
// src/actions/ens/getEnsName.ts
async function getEnsName(client, {
address,
blockNumber,
blockTag,
universalResolverAddress: universalResolverAddress_
}) {
let universalResolverAddress = universalResolverAddress_;
if (!universalResolverAddress) {
if (!client.chain)
throw new Error(
"client chain not configured. universalResolverAddress is required."
);
const contract = _optionalChain([client, 'access', _4 => _4.chain, 'optionalAccess', _5 => _5.contracts, 'optionalAccess', _6 => _6.ensUniversalResolver]);
if (!contract)
throw new (0, _chunk3MFDRMZWjs.ChainDoesNotSupportContract)({
chain: client.chain,
contract: { name: "ensUniversalResolver" }
});
if (blockNumber && contract.blockCreated && contract.blockCreated > blockNumber)
throw new (0, _chunk3MFDRMZWjs.ChainDoesNotSupportContract)({
blockNumber,
chain: client.chain,
contract: {
name: "ensUniversalResolver",
blockCreated: contract.blockCreated
}
});
universalResolverAddress = contract.address;
}
const reverseNode = `${address.toLowerCase().substring(2)}.addr.reverse`;
try {
const res = await _chunkXB55RCBEjs.readContract.call(void 0, client, {
address: universalResolverAddress,
abi: [
{
name: "reverse",
type: "function",
stateMutability: "view",
inputs: [{ type: "bytes", name: "reverseName" }],
outputs: [
{ type: "string", name: "resolvedName" },
{ type: "address", name: "resolvedAddress" },
{ type: "address", name: "reverseResolver" },
{ type: "address", name: "resolver" }
]
}
],
functionName: "reverse",
args: [_chunk3MFDRMZWjs.encodeHex.call(void 0, packetToBytes(reverseNode))],
blockNumber,
blockTag
});
return res[0];
} catch (error) {
if (error instanceof _chunk3MFDRMZWjs.ContractFunctionExecutionError && error.cause.reason === _chunk3MFDRMZWjs.panicReasons[50])
return null;
throw error;
}
}
exports.getEnsAddress = getEnsAddress; exports.getEnsName = getEnsName; exports.labelhash = labelhash; exports.namehash = namehash; exports.normalize = normalize;
exports.getEnsAddress = _chunkHCZO3OIXjs.getEnsAddress; exports.getEnsName = _chunkHCZO3OIXjs.getEnsName; exports.labelhash = _chunkHCZO3OIXjs.labelhash; exports.namehash = _chunkHCZO3OIXjs.namehash; exports.normalize = normalize;
//# sourceMappingURL=ens.js.map

@@ -1,16 +0,19 @@

import { T as TransportConfig, a as Transport, B as BaseRpcRequests } from './createClient-cc01b906.js';
export { C as Client, b as ClientConfig, a as Transport, T as TransportConfig, c as createClient, d as createTransport } from './createClient-cc01b906.js';
import { T as TransportConfig, a as Transport, B as BaseRpcRequests } from './createClient-a47ae6f5.js';
export { C as Client, b as ClientConfig, a as Transport, T as TransportConfig, c as createClient, d as createTransport } from './createClient-a47ae6f5.js';
import { H as Hex, a as Hash, C as Chain, B as ByteArray } from './chain-819c7ff7.js';
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, I as ExtractFormatter, F as FeeHistory, h as FeeValues, i as FeeValuesEIP1559, j as FeeValuesLegacy, J as Formatted, K as FormattedTransaction, a as Hash, H as Hex, L as Log, R as RpcBlock, k as RpcBlockIdentifier, l as RpcBlockNumber, m as RpcFeeHistory, n as RpcFeeValues, o as RpcLog, p as RpcTransaction, q as RpcTransactionReceipt, r as RpcTransactionRequest, s as RpcUncle, y as Transaction, z as TransactionBase, D as TransactionEIP1559, E as TransactionEIP2930, M as TransactionFormatter, G as TransactionLegacy, T as TransactionReceipt, t as TransactionRequest, u as TransactionRequestBase, v as TransactionRequestEIP1559, w as TransactionRequestEIP2930, x as TransactionRequestLegacy, U as Uncle, N as defineTransaction, O as formatTransaction, P as transactionType } from './chain-819c7ff7.js';
import { B as BaseError, H as HttpOptions, R as RpcResponse } from './parseGwei-a2d0d77a.js';
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 formatEther, z as formatGwei, A as formatUnits, D as fromBytes, J as fromHex, K as fromRlp, L as getAccount, M as getAddress, O as getContractAddress, P as getContractError, Q as getCreate2Address, S as getCreateAddress, V as getEventSelector, X as getFunctionSelector, Y as hexToBigInt, Z as hexToBool, _ as hexToBytes, $ as hexToNumber, a0 as hexToString, a1 as isAddress, a2 as isAddressEqual, a3 as isBytes, a4 as isHex, a5 as keccak256, a6 as numberToBytes, a7 as numberToHex, a8 as pad, a9 as padBytes, aa as padHex, ab as parseEther, ac as parseGwei, ad as parseUnits, ae as size, af as slice, ag as sliceBytes, ah as sliceHex, ai as stringToBytes, aj as stringToHex, ak as stringify, al as toBytes, am as toHex, an as toRlp, ao as trim } from './parseGwei-a2d0d77a.js';
import WebSocket from 'isomorphic-ws';
import { H as Hex, A as Address, a as Hash, B as ByteArray, b as BlockTag } from './chain-9a8c6614.js';
export { c as AccessList, A as Address, d as Block, e as BlockIdentifier, f as BlockNumber, b as BlockTag, B as ByteArray, C as Chain, F as FeeHistory, g as FeeValues, h as FeeValuesEIP1559, i as FeeValuesLegacy, a as Hash, H as Hex, L as Log, R as RpcBlock, j as RpcBlockIdentifier, k as RpcBlockNumber, l as RpcFeeHistory, m as RpcFeeValues, n as RpcLog, o as RpcTransaction, p as RpcTransactionReceipt, q as RpcTransactionRequest, r as RpcUncle, x as Transaction, y as TransactionBase, z as TransactionEIP1559, D as TransactionEIP2930, E as TransactionLegacy, T as TransactionReceipt, s as TransactionRequest, t as TransactionRequestBase, u as TransactionRequestEIP1559, v as TransactionRequestEIP2930, w as TransactionRequestLegacy, U as Uncle } from './chain-9a8c6614.js';
import { B as BaseError, R as RpcResponse } from './rpc-c367eceb.js';
export { B as BaseError, C as ContractFunctionExecutionError, a as ContractFunctionRevertedError, b as ContractFunctionZeroDataError } from './rpc-c367eceb.js';
export { P as PublicClient, a as PublicClientConfig, c as createPublicClient } from './createPublicClient-9823f081.js';
export { T as TestClient, a as TestClientConfig, c as createTestClient } from './createTestClient-63b16109.js';
export { W as WalletClient, a as WalletClientConfig, c as createWalletClient } from './createWalletClient-6dbbe0ee.js';
export { A as AbiItem, C as ContractConfig } from './contract-3b4a1df6.js';
import './eip1193-bbebfb3d.js';
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-e2eae0fc.js';
export { T as TestClient, a as TestClientConfig, c as createTestClient } from './test-13f4413b.js';
export { Address, ParseAbi, ParseAbiItem, ParseAbiParameter, ParseAbiParameters, parseAbi, parseAbiItem, parseAbiParameter, parseAbiParameters } from 'abitype';
export { l as labelhash, n as namehash } from './namehash-afff0feb.js';
export { D as DecodeAbiParametersReturnType, E as EncodeAbiParametersReturnType, G as GetAbiItemParameters, d as decodeAbiParameters, e as encodeAbiParameters, g as getAbiItem } from './getAbiItem-159f3263.js';
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-9eb553ce.js';
export { e as encodePacked } from './encodePacked-4c019ed8.js';
export { d as defineChain } from './chain-a4f98ba3.js';
import './eip1193-a882d1b8.js';
import '@wagmi/chains';
import 'abitype';
import './decodeErrorResult-b0d3ce71.js';
import 'ethers@6/types/providers';

@@ -33,2 +36,6 @@ declare class AbiConstructorNotFoundError extends BaseError {

}
declare class AbiDecodingZeroDataError extends BaseError {
name: string;
constructor();
}
declare class AbiEncodingArrayLengthMismatchError extends BaseError {

@@ -67,2 +74,8 @@ name: string;

}
declare class AbiEventSignatureNotFoundError extends BaseError {
name: string;
constructor(signature: Hex, { docsPath }: {
docsPath: string;
});
}
declare class AbiEventNotFoundError extends BaseError {

@@ -116,3 +129,3 @@ name: string;

constructor({ address }: {
address: Address;
address: string;
});

@@ -129,2 +142,14 @@ }

declare class ChainDoesNotSupportContract extends BaseError {
name: string;
constructor({ blockNumber, chain, contract, }: {
blockNumber?: bigint;
chain: Chain;
contract: {
name: string;
blockCreated?: number;
};
});
}
declare class SizeExceedsPaddingSizeError extends BaseError {

@@ -180,9 +205,15 @@ name: string;

name: string;
status: number;
constructor({ body, details, status, url, }: {
body: {
[key: string]: unknown;
};
headers?: Headers;
status?: number;
url: string;
constructor({ body, details, headers, status, url, }: {
body: {
[key: string]: unknown;
};
details: string;
status: number;
details?: string;
headers?: Headers;
status?: number;
url: string;

@@ -226,4 +257,5 @@ });

declare class RequestError extends BaseError {
constructor(err: Error, { docsPath, shortMessage }: {
constructor(err: Error, { docsPath, metaMessages, shortMessage, }: {
docsPath?: string;
metaMessages?: string[];
shortMessage: string;

@@ -299,33 +331,16 @@ });

}
declare class UnknownRpcError extends RequestError {
declare class UserRejectedRequestError extends RpcRequestError {
name: string;
constructor(err: Error);
code: number;
constructor(err: RpcError);
}
declare class InvalidGasArgumentsError extends BaseError {
declare class SwitchChainError extends RpcRequestError {
name: string;
constructor();
code: number;
constructor(err: RpcError);
}
declare class TransactionNotFoundError extends BaseError {
declare class UnknownRpcError extends RequestError {
name: string;
constructor({ blockHash, blockNumber, blockTag, hash, index, }: {
blockHash?: Hash;
blockNumber?: bigint;
blockTag?: BlockTag;
hash?: Hash;
index?: number;
});
constructor(err: Error);
}
declare class TransactionReceiptNotFoundError extends BaseError {
name: string;
constructor({ hash }: {
hash: Hash;
});
}
declare class WaitForTransactionReceiptTimeoutError extends BaseError {
name: string;
constructor({ hash }: {
hash: Hash;
});
}

@@ -344,2 +359,6 @@ declare class UrlRequiredError extends BaseError {

name?: TransportConfig['name'];
/** The max number of times to retry. */
retryCount?: TransportConfig['retryCount'];
/** The base delay (in ms) between retries. */
retryDelay?: TransportConfig['retryDelay'];
};

@@ -350,5 +369,3 @@ type CustomTransport = Transport<'custom', EthereumProvider['request']>;

*/
declare function custom<TProvider extends EthereumProvider>(
/** An Ethereum provider with an EIP-1193 "request" attribute. */
provider: TProvider, { key, name }?: CustomTransportConfig): CustomTransport;
declare function custom<TProvider extends EthereumProvider>(provider: TProvider, config?: CustomTransportConfig): CustomTransport;

@@ -360,2 +377,6 @@ type FallbackTransportConfig = {

name?: TransportConfig['name'];
/** The max number of times to retry. */
retryCount?: TransportConfig['retryCount'];
/** The base delay (in ms) between retries. */
retryDelay?: TransportConfig['retryDelay'];
};

@@ -365,5 +386,10 @@ type FallbackTransport = Transport<'fallback', {

}>;
declare function fallback(transports: Transport[], { key, name }?: FallbackTransportConfig): FallbackTransport;
declare function fallback(transports: Transport[], config?: FallbackTransportConfig): FallbackTransport;
type HttpTransportConfig = {
/**
* Request configuration to pass to `fetch`.
* @link https://developer.mozilla.org/en-US/docs/Web/API/fetch
*/
fetchOptions?: HttpOptions['fetchOptions'];
/** The key of the HTTP transport. */

@@ -373,2 +399,8 @@ key?: TransportConfig['key'];

name?: TransportConfig['name'];
/** The max number of times to retry. */
retryCount?: TransportConfig['retryCount'];
/** The base delay (in ms) between retries. */
retryDelay?: TransportConfig['retryDelay'];
/** The timeout (in ms) for the HTTP request. Default: 10_000 */
timeout?: TransportConfig['timeout'];
};

@@ -383,9 +415,9 @@ type HttpTransport = Transport<'http', {

/** URL of the JSON-RPC API. Defaults to the chain's public RPC URL. */
url?: string, { key, name }?: HttpTransportConfig): HttpTransport;
url?: string, config?: HttpTransportConfig): HttpTransport;
type WebSocketTransportSubscribeArgs = {
type WebSocketTransportSubscribeParameters = {
onData: (data: RpcResponse) => void;
onError?: (error: any) => void;
};
type WebSocketTransportSubscribeResponse = {
type WebSocketTransportSubscribeReturnType = {
subscriptionId: Hash;

@@ -395,3 +427,3 @@ unsubscribe: () => Promise<RpcResponse<boolean>>;

type WebSocketTransportSubscribe = {
subscribe(args: WebSocketTransportSubscribeArgs & {
subscribe(args: WebSocketTransportSubscribeParameters & {
/**

@@ -402,3 +434,3 @@ * @description Add information about compiled contracts

params: ['newHeads'];
}): Promise<WebSocketTransportSubscribeResponse>;
}): Promise<WebSocketTransportSubscribeReturnType>;
};

@@ -410,2 +442,8 @@ type WebSocketTransportConfig = {

name?: TransportConfig['name'];
/** The max number of times to retry. */
retryCount?: TransportConfig['retryCount'];
/** The base delay (in ms) between retries. */
retryDelay?: TransportConfig['retryDelay'];
/** The timeout (in ms) for async WebSocket requests. Default: 10_000 */
timeout?: TransportConfig['timeout'];
};

@@ -421,3 +459,3 @@ type WebSocketTransport = Transport<'webSocket', {

/** URL of the JSON-RPC API. Defaults to the chain's public RPC URL. */
url?: string, { key, name, }?: WebSocketTransportConfig): WebSocketTransport;
url?: string, config?: WebSocketTransportConfig): WebSocketTransport;

@@ -455,2 +493,15 @@ declare const multicall3Abi: readonly [{

export { AbiConstructorNotFoundError, AbiConstructorParamsNotFoundError, AbiDecodingDataSizeInvalidError, AbiEncodingArrayLengthMismatchError, AbiEncodingLengthMismatchError, AbiErrorInputsNotFoundError, AbiErrorNotFoundError, AbiErrorSignatureNotFoundError, AbiEventNotFoundError, AbiFunctionNotFoundError, AbiFunctionOutputsNotFoundError, AbiFunctionSignatureNotFoundError, BlockNotFoundError, CustomTransport, CustomTransportConfig, DataLengthTooLongError, DataLengthTooShortError, FallbackTransport, FallbackTransportConfig, FilterTypeNotSupportedError, HttpRequestError, HttpTransport, HttpTransportConfig, InternalRpcError, InvalidAbiDecodingTypeError, InvalidAbiEncodingTypeError, InvalidAddressError, InvalidArrayError, InvalidBytesBooleanError, InvalidDefinitionTypeError, InvalidGasArgumentsError, InvalidHexBooleanError, InvalidHexValueError, InvalidInputRpcError, InvalidParamsRpcError, InvalidRequestRpcError, JsonRpcVersionUnsupportedError, LimitExceededRpcError, MethodNotFoundRpcError, MethodNotSupportedRpcError, OffsetOutOfBoundsError, ParseRpcError, RequestError, ResourceNotFoundRpcError, ResourceUnavailableRpcError, RpcError, RpcRequestError, SizeExceedsPaddingSizeError, TimeoutError, TransactionNotFoundError, TransactionReceiptNotFoundError, TransactionRejectedRpcError, UnknownRpcError, UrlRequiredError, WaitForTransactionReceiptTimeoutError, WebSocketRequestError, WebSocketTransport, WebSocketTransportConfig, custom, fallback, http, multicall3Abi, webSocket };
declare const etherUnits: {
gwei: number;
wei: number;
};
declare const gweiUnits: {
ether: number;
wei: number;
};
declare const weiUnits: {
ether: number;
gwei: number;
};
export { AbiConstructorNotFoundError, AbiConstructorParamsNotFoundError, AbiDecodingDataSizeInvalidError, AbiDecodingZeroDataError, AbiEncodingArrayLengthMismatchError, AbiEncodingLengthMismatchError, AbiErrorInputsNotFoundError, AbiErrorNotFoundError, AbiErrorSignatureNotFoundError, AbiEventNotFoundError, AbiEventSignatureNotFoundError, AbiFunctionNotFoundError, AbiFunctionOutputsNotFoundError, AbiFunctionSignatureNotFoundError, BlockNotFoundError, ChainDoesNotSupportContract, CustomTransport, CustomTransportConfig, DataLengthTooLongError, DataLengthTooShortError, FallbackTransport, FallbackTransportConfig, FilterTypeNotSupportedError, HttpRequestError, HttpTransport, HttpTransportConfig, InternalRpcError, InvalidAbiDecodingTypeError, InvalidAbiEncodingTypeError, InvalidAddressError, InvalidArrayError, InvalidBytesBooleanError, InvalidDefinitionTypeError, InvalidHexBooleanError, InvalidHexValueError, InvalidInputRpcError, InvalidParamsRpcError, InvalidRequestRpcError, JsonRpcVersionUnsupportedError, LimitExceededRpcError, MethodNotFoundRpcError, MethodNotSupportedRpcError, OffsetOutOfBoundsError, ParseRpcError, RequestError, ResourceNotFoundRpcError, ResourceUnavailableRpcError, RpcError, RpcRequestError, SizeExceedsPaddingSizeError, SwitchChainError, TimeoutError, TransactionRejectedRpcError, UnknownRpcError, UrlRequiredError, UserRejectedRequestError, WebSocketRequestError, WebSocketTransport, WebSocketTransportConfig, custom, etherUnits, fallback, gweiUnits, http, multicall3Abi, webSocket, weiUnits };

@@ -1,2 +0,2 @@

"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }

@@ -6,2 +6,3 @@

var _chunkHCZO3OIXjs = require('./chunk-HCZO3OIX.js');

@@ -62,8 +63,192 @@

var _chunk3MFDRMZWjs = require('./chunk-3MFDRMZW.js');
var _chunkQJNPIGP5js = require('./chunk-QJNPIGP5.js');
// src/clients/transports/createTransport.ts
function createTransport(config, value) {
function createTransport({
key,
name,
request,
retryCount = 3,
retryDelay = 150,
timeout,
type
}, value) {
return {
config,
config: { key, name, request, retryCount, retryDelay, timeout, type },
request: _chunkQJNPIGP5js.buildRequest.call(void 0, request, { retryCount, retryDelay }),
value

@@ -74,7 +259,10 @@ };

// src/clients/transports/custom.ts
function custom(provider, { key = "custom", name = "Custom Provider" } = {}) {
return () => createTransport({
function custom(provider, config = {}) {
const { key = "custom", name = "Custom Provider", retryDelay } = config;
return ({ retryCount: defaultRetryCount }) => createTransport({
key,
name,
request: provider.request.bind(provider),
retryCount: _nullishCoalesce(config.retryCount, () => ( defaultRetryCount)),
retryDelay,
type: "custom"

@@ -85,3 +273,4 @@ });

// src/clients/transports/fallback.ts
function fallback(transports, { key = "fallback", name = "Fallback" } = {}) {
function fallback(transports, config = {}) {
const { key = "fallback", name = "Fallback", retryCount, retryDelay } = config;
return ({ chain }) => createTransport(

@@ -93,5 +282,5 @@ {

const fetch = async (i = 0) => {
const transport = transports[i]({ chain });
const transport = transports[i]({ chain, retryCount: 0 });
try {
return await transport.config.request({
return await transport.request({
method,

@@ -101,3 +290,3 @@ params

} catch (err) {
if (err instanceof _chunk3MFDRMZWjs.RpcError && !_chunk3MFDRMZWjs.isNonDeterministicError.call(void 0, err))
if (_chunkQJNPIGP5js.isDeterministicError.call(void 0, err))
throw err;

@@ -111,2 +300,4 @@ if (i === transports.length - 1)

},
retryCount,
retryDelay,
type: "fallback"

@@ -116,3 +307,3 @@ },

transports: transports.map(
(fn) => fn({ chain })
(fn) => fn({ chain, retryCount: 0 })
)

@@ -124,7 +315,15 @@ }

// src/clients/transports/http.ts
function http(url, { key = "http", name = "HTTP JSON-RPC" } = {}) {
return ({ chain }) => {
function http(url, config = {}) {
const {
fetchOptions,
key = "http",
name = "HTTP JSON-RPC",
retryDelay,
timeout = 1e4
} = config;
return ({ chain, retryCount: defaultRetryCount }) => {
const retryCount = _nullishCoalesce(config.retryCount, () => ( defaultRetryCount));
const url_ = url || _optionalChain([chain, 'optionalAccess', _ => _.rpcUrls, 'access', _2 => _2.default, 'access', _3 => _3.http, 'access', _4 => _4[0]]);
if (!url_)
throw new (0, _chunk3MFDRMZWjs.UrlRequiredError)();
throw new (0, _chunkQJNPIGP5js.UrlRequiredError)();
return createTransport(

@@ -135,10 +334,15 @@ {

async request({ method, params }) {
const { result } = await _chunk3MFDRMZWjs.rpc.http(url_, {
const { result } = await _chunkQJNPIGP5js.rpc.http(url_, {
body: {
method,
params
}
},
fetchOptions,
timeout
});
return result;
},
retryCount,
retryDelay,
timeout,
type: "http"

@@ -154,10 +358,14 @@ },

// src/clients/transports/webSocket.ts
function webSocket(url, {
key = "webSocket",
name = "WebSocket JSON-RPC"
} = {}) {
return ({ chain }) => {
function webSocket(url, config = {}) {
const {
key = "webSocket",
name = "WebSocket JSON-RPC",
retryDelay,
timeout = 1e4
} = config;
return ({ chain, retryCount: defaultRetryCount }) => {
const retryCount = _nullishCoalesce(config.retryCount, () => ( defaultRetryCount));
const url_ = url || _optionalChain([chain, 'optionalAccess', _5 => _5.rpcUrls, 'access', _6 => _6.default, 'access', _7 => _7.webSocket, 'optionalAccess', _8 => _8[0]]);
if (!url_)
throw new (0, _chunk3MFDRMZWjs.UrlRequiredError)();
throw new (0, _chunkQJNPIGP5js.UrlRequiredError)();
return createTransport(

@@ -168,8 +376,12 @@ {

async request({ method, params }) {
const socket = await _chunk3MFDRMZWjs.getSocket.call(void 0, url_);
const { result } = await _chunk3MFDRMZWjs.rpc.webSocketAsync(socket, {
body: { method, params }
const socket = await _chunkQJNPIGP5js.getSocket.call(void 0, url_);
const { result } = await _chunkQJNPIGP5js.rpc.webSocketAsync(socket, {
body: { method, params },
timeout
});
return result;
},
retryCount,
retryDelay,
timeout,
type: "webSocket"

@@ -179,8 +391,8 @@ },

getSocket() {
return _chunk3MFDRMZWjs.getSocket.call(void 0, url_);
return _chunkQJNPIGP5js.getSocket.call(void 0, url_);
},
async subscribe({ params, onData, onError }) {
const socket = await _chunk3MFDRMZWjs.getSocket.call(void 0, url_);
const socket = await _chunkQJNPIGP5js.getSocket.call(void 0, url_);
const { result: subscriptionId } = await new Promise(
(resolve, reject) => _chunk3MFDRMZWjs.rpc.webSocket(socket, {
(resolve, reject) => _chunkQJNPIGP5js.rpc.webSocket(socket, {
body: {

@@ -207,3 +419,3 @@ method: "eth_subscribe",

return new Promise(
(resolve, reject) => _chunk3MFDRMZWjs.rpc.webSocket(socket, {
(resolve, reject) => _chunkQJNPIGP5js.rpc.webSocket(socket, {
body: {

@@ -226,10 +438,10 @@ method: "eth_unsubscribe",

// src/utils/uid.ts
var size = 256;
var index = size;
var size2 = 256;
var index = size2;
var buffer;
function uid(length = 11) {
if (!buffer || index + length > size * 2) {
if (!buffer || index + length > size2 * 2) {
buffer = "";
index = 0;
for (let i = 0; i < size; i++) {
for (let i = 0; i < size2; i++) {
buffer += (256 + Math.random() * 256 | 0).toString(16).substring(1);

@@ -250,3 +462,3 @@ }

}) {
const { config, value } = transport({ chain });
const { config, request, value } = transport({ chain });
return {

@@ -257,3 +469,3 @@ chain,

pollingInterval,
request: _chunk3MFDRMZWjs.buildRequest.call(void 0, config.request),
request,
transport: { ...config, ...value },

@@ -265,2 +477,88 @@ type,

// src/clients/decorators/public.ts
var publicActions = (client) => ({
call: (args) => _chunkQJNPIGP5js.call.call(void 0, client, args),
createBlockFilter: () => _chunkQJNPIGP5js.createBlockFilter.call(void 0, client),
createContractEventFilter: (args) => _chunkQJNPIGP5js.createContractEventFilter.call(void 0, client, args),
createEventFilter: (args) => _chunkQJNPIGP5js.createEventFilter.call(void 0, client, args),
createPendingTransactionFilter: () => _chunkQJNPIGP5js.createPendingTransactionFilter.call(void 0, client),
estimateContractGas: (args) => _chunkQJNPIGP5js.estimateContractGas.call(void 0, client, args),
estimateGas: (args) => _chunkQJNPIGP5js.estimateGas.call(void 0, client, args),
getBalance: (args) => _chunkQJNPIGP5js.getBalance.call(void 0, client, args),
getBlock: (args) => _chunkQJNPIGP5js.getBlock.call(void 0, client, args),
getBlockNumber: (args) => _chunkQJNPIGP5js.getBlockNumber.call(void 0, client, args),
getBlockTransactionCount: (args) => _chunkQJNPIGP5js.getBlockTransactionCount.call(void 0, client, args),
getBytecode: (args) => _chunkQJNPIGP5js.getBytecode.call(void 0, client, args),
getChainId: () => _chunkQJNPIGP5js.getChainId.call(void 0, client),
getEnsAddress: (args) => _chunkHCZO3OIXjs.getEnsAddress.call(void 0, client, args),
getEnsName: (args) => _chunkHCZO3OIXjs.getEnsName.call(void 0, client, args),
getFeeHistory: (args) => _chunkQJNPIGP5js.getFeeHistory.call(void 0, client, args),
getFilterChanges: (args) => _chunkQJNPIGP5js.getFilterChanges.call(void 0, client, args),
getFilterLogs: (args) => _chunkQJNPIGP5js.getFilterLogs.call(void 0, client, args),
getGasPrice: () => _chunkQJNPIGP5js.getGasPrice.call(void 0, client),
getLogs: (args) => _chunkQJNPIGP5js.getLogs.call(void 0, client, args),
getStorageAt: (args) => _chunkQJNPIGP5js.getStorageAt.call(void 0, client, args),
getTransaction: (args) => _chunkQJNPIGP5js.getTransaction.call(void 0, client, args),
getTransactionConfirmations: (args) => _chunkQJNPIGP5js.getTransactionConfirmations.call(void 0, client, args),
getTransactionReceipt: (args) => _chunkQJNPIGP5js.getTransactionReceipt.call(void 0, client, args),
multicall: (args) => _chunkQJNPIGP5js.multicall.call(void 0, client, args),
readContract: (args) => _chunkQJNPIGP5js.readContract.call(void 0, client, args),
simulateContract: (args) => _chunkQJNPIGP5js.simulateContract.call(void 0, client, args),
uninstallFilter: (args) => _chunkQJNPIGP5js.uninstallFilter.call(void 0, client, args),
waitForTransactionReceipt: (args) => _chunkQJNPIGP5js.waitForTransactionReceipt.call(void 0, client, args),
watchBlocks: (args) => _chunkQJNPIGP5js.watchBlocks.call(void 0, client, args),
watchBlockNumber: (args) => _chunkQJNPIGP5js.watchBlockNumber.call(void 0, client, args),
watchContractEvent: (args) => _chunkQJNPIGP5js.watchContractEvent.call(void 0, client, args),
watchEvent: (args) => _chunkQJNPIGP5js.watchEvent.call(void 0, client, args),
watchPendingTransactions: (args) => _chunkQJNPIGP5js.watchPendingTransactions.call(void 0, client, args)
});
// src/clients/decorators/test.ts
var testActions = (client) => ({
dropTransaction: (args) => _chunkQJNPIGP5js.dropTransaction.call(void 0, client, args),
getAutomine: () => _chunkQJNPIGP5js.getAutomine.call(void 0, client),
getTxpoolContent: () => _chunkQJNPIGP5js.getTxpoolContent.call(void 0, client),
getTxpoolStatus: () => _chunkQJNPIGP5js.getTxpoolStatus.call(void 0, client),
impersonateAccount: (args) => _chunkQJNPIGP5js.impersonateAccount.call(void 0, client, args),
increaseTime: (args) => _chunkQJNPIGP5js.increaseTime.call(void 0, client, args),
inspectTxpool: () => _chunkQJNPIGP5js.inspectTxpool.call(void 0, client),
mine: (args) => _chunkQJNPIGP5js.mine.call(void 0, client, args),
removeBlockTimestampInterval: () => _chunkQJNPIGP5js.removeBlockTimestampInterval.call(void 0, client),
reset: (args) => _chunkQJNPIGP5js.reset.call(void 0, client, args),
revert: (args) => _chunkQJNPIGP5js.revert.call(void 0, client, args),
sendUnsignedTransaction: (args) => _chunkQJNPIGP5js.sendUnsignedTransaction.call(void 0, client, args),
setAutomine: (args) => _chunkQJNPIGP5js.setAutomine.call(void 0, client, args),
setBalance: (args) => _chunkQJNPIGP5js.setBalance.call(void 0, client, args),
setBlockGasLimit: (args) => _chunkQJNPIGP5js.setBlockGasLimit.call(void 0, client, args),
setBlockTimestampInterval: (args) => _chunkQJNPIGP5js.setBlockTimestampInterval.call(void 0, client, args),
setCode: (args) => _chunkQJNPIGP5js.setCode.call(void 0, client, args),
setCoinbase: (args) => _chunkQJNPIGP5js.setCoinbase.call(void 0, client, args),
setIntervalMining: (args) => _chunkQJNPIGP5js.setIntervalMining.call(void 0, client, args),
setLoggingEnabled: (args) => _chunkQJNPIGP5js.setLoggingEnabled.call(void 0, client, args),
setMinGasPrice: (args) => _chunkQJNPIGP5js.setMinGasPrice.call(void 0, client, args),
setNextBlockBaseFeePerGas: (args) => _chunkQJNPIGP5js.setNextBlockBaseFeePerGas.call(void 0, client, args),
setNextBlockTimestamp: (args) => _chunkQJNPIGP5js.setNextBlockTimestamp.call(void 0, client, args),
setNonce: (args) => _chunkQJNPIGP5js.setNonce.call(void 0, client, args),
setRpcUrl: (args) => _chunkQJNPIGP5js.setRpcUrl.call(void 0, client, args),
setStorageAt: (args) => _chunkQJNPIGP5js.setStorageAt.call(void 0, client, args),
snapshot: () => _chunkQJNPIGP5js.snapshot.call(void 0, client),
stopImpersonatingAccount: (args) => _chunkQJNPIGP5js.stopImpersonatingAccount.call(void 0, client, args)
});
// src/clients/decorators/wallet.ts
var walletActions = (client) => ({
addChain: (args) => _chunkQJNPIGP5js.addChain.call(void 0, client, args),
deployContract: (args) => _chunkQJNPIGP5js.deployContract.call(void 0, client, args),
getAddresses: () => _chunkQJNPIGP5js.getAddresses.call(void 0, client),
getChainId: () => _chunkQJNPIGP5js.getChainId.call(void 0, client),
getPermissions: () => _chunkQJNPIGP5js.getPermissions.call(void 0, client),
requestAddresses: () => _chunkQJNPIGP5js.requestAddresses.call(void 0, client),
requestPermissions: (args) => _chunkQJNPIGP5js.requestPermissions.call(void 0, client, args),
sendTransaction: (args) => _chunkQJNPIGP5js.sendTransaction.call(void 0, client, args),
signMessage: (args) => _chunkQJNPIGP5js.signMessage.call(void 0, client, args),
switchChain: (args) => _chunkQJNPIGP5js.switchChain.call(void 0, client, args),
watchAsset: (args) => _chunkQJNPIGP5js.watchAsset.call(void 0, client, args),
writeContract: (args) => _chunkQJNPIGP5js.writeContract.call(void 0, client, args)
});
// src/clients/createPublicClient.ts

@@ -274,4 +572,3 @@ function createPublicClient({

}) {
chain;
return createClient({
const client = createClient({
chain,

@@ -284,2 +581,6 @@ key,

});
return {
...client,
...publicActions(client)
};
}

@@ -296,3 +597,3 @@

}) {
return {
const client = {
...createClient({

@@ -308,2 +609,6 @@ chain,

};
return {
...client,
...testActions(client)
};
}

@@ -318,9 +623,13 @@

}) {
return createClient({
const client = createClient({
key,
name,
pollingInterval,
transport,
transport: () => transport({ retryCount: 0 }),
type: "walletClient"
});
return {
...client,
...walletActions(client)
};
}

@@ -392,3 +701,104 @@

exports.AbiConstructorNotFoundError = _chunk3MFDRMZWjs.AbiConstructorNotFoundError; exports.AbiConstructorParamsNotFoundError = _chunk3MFDRMZWjs.AbiConstructorParamsNotFoundError; exports.AbiDecodingDataSizeInvalidError = _chunk3MFDRMZWjs.AbiDecodingDataSizeInvalidError; exports.AbiEncodingArrayLengthMismatchError = _chunk3MFDRMZWjs.AbiEncodingArrayLengthMismatchError; exports.AbiEncodingLengthMismatchError = _chunk3MFDRMZWjs.AbiEncodingLengthMismatchError; exports.AbiErrorInputsNotFoundError = _chunk3MFDRMZWjs.AbiErrorInputsNotFoundError; exports.AbiErrorNotFoundError = _chunk3MFDRMZWjs.AbiErrorNotFoundError; exports.AbiErrorSignatureNotFoundError = _chunk3MFDRMZWjs.AbiErrorSignatureNotFoundError; exports.AbiEventNotFoundError = _chunk3MFDRMZWjs.AbiEventNotFoundError; exports.AbiFunctionNotFoundError = _chunk3MFDRMZWjs.AbiFunctionNotFoundError; exports.AbiFunctionOutputsNotFoundError = _chunk3MFDRMZWjs.AbiFunctionOutputsNotFoundError; exports.AbiFunctionSignatureNotFoundError = _chunk3MFDRMZWjs.AbiFunctionSignatureNotFoundError; exports.BaseError = _chunk3MFDRMZWjs.BaseError; exports.BlockNotFoundError = _chunk3MFDRMZWjs.BlockNotFoundError; exports.ContractFunctionExecutionError = _chunk3MFDRMZWjs.ContractFunctionExecutionError; exports.ContractFunctionRevertedError = _chunk3MFDRMZWjs.ContractFunctionRevertedError; exports.ContractFunctionZeroDataError = _chunk3MFDRMZWjs.ContractFunctionZeroDataError; exports.DataLengthTooLongError = _chunk3MFDRMZWjs.DataLengthTooLongError; exports.DataLengthTooShortError = _chunk3MFDRMZWjs.DataLengthTooShortError; exports.FilterTypeNotSupportedError = _chunk3MFDRMZWjs.FilterTypeNotSupportedError; exports.HttpRequestError = _chunk3MFDRMZWjs.HttpRequestError; exports.InternalRpcError = _chunk3MFDRMZWjs.InternalRpcError; exports.InvalidAbiDecodingTypeError = _chunk3MFDRMZWjs.InvalidAbiDecodingTypeError; exports.InvalidAbiEncodingTypeError = _chunk3MFDRMZWjs.InvalidAbiEncodingTypeError; exports.InvalidAddressError = _chunk3MFDRMZWjs.InvalidAddressError; exports.InvalidArrayError = _chunk3MFDRMZWjs.InvalidArrayError; exports.InvalidBytesBooleanError = _chunk3MFDRMZWjs.InvalidBytesBooleanError; exports.InvalidDefinitionTypeError = _chunk3MFDRMZWjs.InvalidDefinitionTypeError; exports.InvalidGasArgumentsError = _chunk3MFDRMZWjs.InvalidGasArgumentsError; exports.InvalidHexBooleanError = _chunk3MFDRMZWjs.InvalidHexBooleanError; exports.InvalidHexValueError = _chunk3MFDRMZWjs.InvalidHexValueError; exports.InvalidInputRpcError = _chunk3MFDRMZWjs.InvalidInputRpcError; exports.InvalidParamsRpcError = _chunk3MFDRMZWjs.InvalidParamsRpcError; exports.InvalidRequestRpcError = _chunk3MFDRMZWjs.InvalidRequestRpcError; exports.JsonRpcVersionUnsupportedError = _chunk3MFDRMZWjs.JsonRpcVersionUnsupportedError; exports.LimitExceededRpcError = _chunk3MFDRMZWjs.LimitExceededRpcError; exports.MethodNotFoundRpcError = _chunk3MFDRMZWjs.MethodNotFoundRpcError; exports.MethodNotSupportedRpcError = _chunk3MFDRMZWjs.MethodNotSupportedRpcError; exports.OffsetOutOfBoundsError = _chunk3MFDRMZWjs.OffsetOutOfBoundsError; exports.ParseRpcError = _chunk3MFDRMZWjs.ParseRpcError; exports.RequestError = _chunk3MFDRMZWjs.RequestError; exports.ResourceNotFoundRpcError = _chunk3MFDRMZWjs.ResourceNotFoundRpcError; exports.ResourceUnavailableRpcError = _chunk3MFDRMZWjs.ResourceUnavailableRpcError; exports.RpcError = _chunk3MFDRMZWjs.RpcError; exports.RpcRequestError = _chunk3MFDRMZWjs.RpcRequestError; exports.SizeExceedsPaddingSizeError = _chunk3MFDRMZWjs.SizeExceedsPaddingSizeError; exports.TimeoutError = _chunk3MFDRMZWjs.TimeoutError; exports.TransactionNotFoundError = _chunk3MFDRMZWjs.TransactionNotFoundError; exports.TransactionReceiptNotFoundError = _chunk3MFDRMZWjs.TransactionReceiptNotFoundError; exports.TransactionRejectedRpcError = _chunk3MFDRMZWjs.TransactionRejectedRpcError; exports.UnknownRpcError = _chunk3MFDRMZWjs.UnknownRpcError; exports.UrlRequiredError = _chunk3MFDRMZWjs.UrlRequiredError; exports.WaitForTransactionReceiptTimeoutError = _chunk3MFDRMZWjs.WaitForTransactionReceiptTimeoutError; exports.WebSocketRequestError = _chunk3MFDRMZWjs.WebSocketRequestError; exports.createClient = createClient; exports.createPublicClient = createPublicClient; exports.createTestClient = createTestClient; exports.createTransport = createTransport; exports.createWalletClient = createWalletClient; exports.custom = custom; exports.fallback = fallback; exports.http = http; exports.multicall3Abi = _chunk3MFDRMZWjs.multicall3Abi; exports.webSocket = webSocket;
exports.AbiConstructorNotFoundError = _chunkQJNPIGP5js.AbiConstructorNotFoundError; exports.AbiConstructorParamsNotFoundError = _chunkQJNPIGP5js.AbiConstructorParamsNotFoundError; exports.AbiDecodingDataSizeInvalidError = _chunkQJNPIGP5js.AbiDecodingDataSizeInvalidError; exports.AbiDecodingZeroDataError = _chunkQJNPIGP5js.AbiDecodingZeroDataError; exports.AbiEncodingArrayLengthMismatchError = _chunkQJNPIGP5js.AbiEncodingArrayLengthMismatchError; exports.AbiEncodingLengthMismatchError = _chunkQJNPIGP5js.AbiEncodingLengthMismatchError; exports.AbiErrorInputsNotFoundError = _chunkQJNPIGP5js.AbiErrorInputsNotFoundError; exports.AbiErrorNotFoundError = _chunkQJNPIGP5js.AbiErrorNotFoundError; exports.AbiErrorSignatureNotFoundError = _chunkQJNPIGP5js.AbiErrorSignatureNotFoundError; exports.AbiEventNotFoundError = _chunkQJNPIGP5js.AbiEventNotFoundError; exports.AbiEventSignatureNotFoundError = _chunkQJNPIGP5js.AbiEventSignatureNotFoundError; exports.AbiFunctionNotFoundError = _chunkQJNPIGP5js.AbiFunctionNotFoundError; exports.AbiFunctionOutputsNotFoundError = _chunkQJNPIGP5js.AbiFunctionOutputsNotFoundError; exports.AbiFunctionSignatureNotFoundError = _chunkQJNPIGP5js.AbiFunctionSignatureNotFoundError; exports.BaseError = _chunkQJNPIGP5js.BaseError; exports.BlockNotFoundError = _chunkQJNPIGP5js.BlockNotFoundError; exports.CallExecutionError = _chunkQJNPIGP5js.CallExecutionError; exports.ChainDoesNotSupportContract = _chunkQJNPIGP5js.ChainDoesNotSupportContract; exports.ContractFunctionExecutionError = _chunkQJNPIGP5js.ContractFunctionExecutionError; exports.ContractFunctionRevertedError = _chunkQJNPIGP5js.ContractFunctionRevertedError; exports.ContractFunctionZeroDataError = _chunkQJNPIGP5js.ContractFunctionZeroDataError; exports.DataLengthTooLongError = _chunkQJNPIGP5js.DataLengthTooLongError; exports.DataLengthTooShortError = _chunkQJNPIGP5js.DataLengthTooShortError; exports.EstimateGasExecutionError = _chunkQJNPIGP5js.EstimateGasExecutionError; exports.ExecutionRevertedError = _chunkQJNPIGP5js.ExecutionRevertedError; exports.FeeCapTooHighError = _chunkQJNPIGP5js.FeeCapTooHighError; exports.FeeCapTooLowError = _chunkQJNPIGP5js.FeeCapTooLowError; exports.FilterTypeNotSupportedError = _chunkQJNPIGP5js.FilterTypeNotSupportedError; exports.HttpRequestError = _chunkQJNPIGP5js.HttpRequestError; exports.InsufficientFundsError = _chunkQJNPIGP5js.InsufficientFundsError; exports.InternalRpcError = _chunkQJNPIGP5js.InternalRpcError; exports.IntrinsicGasTooHighError = _chunkQJNPIGP5js.IntrinsicGasTooHighError; exports.IntrinsicGasTooLowError = _chunkQJNPIGP5js.IntrinsicGasTooLowError; exports.InvalidAbiDecodingTypeError = _chunkQJNPIGP5js.InvalidAbiDecodingTypeError; exports.InvalidAbiEncodingTypeError = _chunkQJNPIGP5js.InvalidAbiEncodingTypeError; exports.InvalidAddressError = _chunkQJNPIGP5js.InvalidAddressError; exports.InvalidArrayError = _chunkQJNPIGP5js.InvalidArrayError; exports.InvalidBytesBooleanError = _chunkQJNPIGP5js.InvalidBytesBooleanError; exports.InvalidDefinitionTypeError = _chunkQJNPIGP5js.InvalidDefinitionTypeError; exports.InvalidHexBooleanError = _chunkQJNPIGP5js.InvalidHexBooleanError; exports.InvalidHexValueError = _chunkQJNPIGP5js.InvalidHexValueError; exports.InvalidInputRpcError = _chunkQJNPIGP5js.InvalidInputRpcError; exports.InvalidParamsRpcError = _chunkQJNPIGP5js.InvalidParamsRpcError; exports.InvalidRequestRpcError = _chunkQJNPIGP5js.InvalidRequestRpcError; exports.JsonRpcVersionUnsupportedError = _chunkQJNPIGP5js.JsonRpcVersionUnsupportedError; exports.LimitExceededRpcError = _chunkQJNPIGP5js.LimitExceededRpcError; exports.MethodNotFoundRpcError = _chunkQJNPIGP5js.MethodNotFoundRpcError; exports.MethodNotSupportedRpcError = _chunkQJNPIGP5js.MethodNotSupportedRpcError; exports.NonceMaxValueError = _chunkQJNPIGP5js.NonceMaxValueError; exports.NonceTooHighError = _chunkQJNPIGP5js.NonceTooHighError; exports.NonceTooLowError = _chunkQJNPIGP5js.NonceTooLowError; exports.OffsetOutOfBoundsError = _chunkQJNPIGP5js.OffsetOutOfBoundsError; exports.ParseRpcError = _chunkQJNPIGP5js.ParseRpcError; exports.RawContractError = _chunkQJNPIGP5js.RawContractError; exports.RequestError = _chunkQJNPIGP5js.RequestError; exports.ResourceNotFoundRpcError = _chunkQJNPIGP5js.ResourceNotFoundRpcError; exports.ResourceUnavailableRpcError = _chunkQJNPIGP5js.ResourceUnavailableRpcError; exports.RpcError = _chunkQJNPIGP5js.RpcError; exports.RpcRequestError = _chunkQJNPIGP5js.RpcRequestError; exports.SizeExceedsPaddingSizeError = _chunkQJNPIGP5js.SizeExceedsPaddingSizeError; exports.SwitchChainError = _chunkQJNPIGP5js.SwitchChainError; exports.TimeoutError = _chunkQJNPIGP5js.TimeoutError; exports.TipAboveFeeCapError = _chunkQJNPIGP5js.TipAboveFeeCapError; exports.TransactionExecutionError = _chunkQJNPIGP5js.TransactionExecutionError; exports.TransactionNotFoundError = _chunkQJNPIGP5js.TransactionNotFoundError; exports.TransactionReceiptNotFoundError = _chunkQJNPIGP5js.TransactionReceiptNotFoundError; exports.TransactionRejectedRpcError = _chunkQJNPIGP5js.TransactionRejectedRpcError; exports.TransactionTypeNotSupportedError = _chunkQJNPIGP5js.TransactionTypeNotSupportedError; exports.UnknownNodeError = _chunkQJNPIGP5js.UnknownNodeError; exports.UnknownRpcError = _chunkQJNPIGP5js.UnknownRpcError; exports.UrlRequiredError = _chunkQJNPIGP5js.UrlRequiredError; exports.UserRejectedRequestError = _chunkQJNPIGP5js.UserRejectedRequestError; exports.WaitForTransactionReceiptTimeoutError = _chunkQJNPIGP5js.WaitForTransactionReceiptTimeoutError; exports.WebSocketRequestError = _chunkQJNPIGP5js.WebSocketRequestError; exports.boolToBytes = _chunkQJNPIGP5js.boolToBytes; exports.boolToHex = _chunkQJNPIGP5js.boolToHex; exports.bytesToBigint = _chunkQJNPIGP5js.bytesToBigint; exports.bytesToBool = _chunkQJNPIGP5js.bytesToBool; exports.bytesToHex = _chunkQJNPIGP5js.bytesToHex; exports.bytesToNumber = _chunkQJNPIGP5js.bytesToNumber; exports.bytesToString = _chunkQJNPIGP5js.bytesToString; exports.createClient = createClient; exports.createPublicClient = createPublicClient; exports.createTestClient = createTestClient; exports.createTransport = createTransport; exports.createWalletClient = createWalletClient; exports.custom = custom; exports.decodeAbiParameters = _chunkQJNPIGP5js.decodeAbiParameters; exports.decodeErrorResult = _chunkQJNPIGP5js.decodeErrorResult; exports.decodeEventLog = _chunkQJNPIGP5js.decodeEventLog; exports.decodeFunctionData = _chunkQJNPIGP5js.decodeFunctionData; exports.decodeFunctionResult = _chunkQJNPIGP5js.decodeFunctionResult; exports.defineBlock = _chunkQJNPIGP5js.defineBlock; exports.defineChain = _chunkQJNPIGP5js.defineChain; exports.defineTransaction = _chunkQJNPIGP5js.defineTransaction; exports.defineTransactionReceipt = _chunkQJNPIGP5js.defineTransactionReceipt; exports.defineTransactionRequest = _chunkQJNPIGP5js.defineTransactionRequest; exports.encodeAbiParameters = _chunkQJNPIGP5js.encodeAbiParameters; exports.encodeDeployData = _chunkQJNPIGP5js.encodeDeployData; exports.encodeErrorResult = _chunkQJNPIGP5js.encodeErrorResult; exports.encodeEventTopics = _chunkQJNPIGP5js.encodeEventTopics; exports.encodeFunctionData = _chunkQJNPIGP5js.encodeFunctionData; exports.encodeFunctionResult = _chunkQJNPIGP5js.encodeFunctionResult; exports.encodePacked = _chunkQJNPIGP5js.encodePacked; exports.etherUnits = _chunkQJNPIGP5js.etherUnits; exports.fallback = fallback; exports.formatBlock = _chunkQJNPIGP5js.formatBlock; exports.formatEther = _chunkQJNPIGP5js.formatEther; exports.formatGwei = _chunkQJNPIGP5js.formatGwei; exports.formatTransaction = _chunkQJNPIGP5js.formatTransaction; exports.formatTransactionRequest = _chunkQJNPIGP5js.formatTransactionRequest; exports.formatUnits = _chunkQJNPIGP5js.formatUnits; exports.fromBytes = _chunkQJNPIGP5js.fromBytes; exports.fromHex = _chunkQJNPIGP5js.fromHex; exports.fromRlp = _chunkQJNPIGP5js.fromRlp; exports.getAbiItem = _chunkQJNPIGP5js.getAbiItem; exports.getAccount = _chunkQJNPIGP5js.getAccount; exports.getAddress = _chunkQJNPIGP5js.getAddress; exports.getContractAddress = _chunkQJNPIGP5js.getContractAddress; exports.getContractError = _chunkQJNPIGP5js.getContractError; exports.getCreate2Address = _chunkQJNPIGP5js.getCreate2Address; exports.getCreateAddress = _chunkQJNPIGP5js.getCreateAddress; exports.getEventSelector = _chunkQJNPIGP5js.getEventSelector; exports.getFunctionSelector = _chunkQJNPIGP5js.getFunctionSelector; exports.gweiUnits = _chunkQJNPIGP5js.gweiUnits; exports.hexToBigInt = _chunkQJNPIGP5js.hexToBigInt; exports.hexToBool = _chunkQJNPIGP5js.hexToBool; exports.hexToBytes = _chunkQJNPIGP5js.hexToBytes; exports.hexToNumber = _chunkQJNPIGP5js.hexToNumber; exports.hexToString = _chunkQJNPIGP5js.hexToString; exports.http = http; exports.isAddress = _chunkQJNPIGP5js.isAddress; exports.isAddressEqual = _chunkQJNPIGP5js.isAddressEqual; exports.isBytes = _chunkQJNPIGP5js.isBytes; exports.isHex = _chunkQJNPIGP5js.isHex; exports.keccak256 = _chunkQJNPIGP5js.keccak256; exports.labelhash = _chunkHCZO3OIXjs.labelhash; exports.multicall3Abi = _chunkQJNPIGP5js.multicall3Abi; exports.namehash = _chunkHCZO3OIXjs.namehash; exports.numberToBytes = _chunkQJNPIGP5js.numberToBytes; exports.numberToHex = _chunkQJNPIGP5js.numberToHex; exports.pad = _chunkQJNPIGP5js.pad; exports.padBytes = _chunkQJNPIGP5js.padBytes; exports.padHex = _chunkQJNPIGP5js.padHex; exports.parseAbi = _chunkQJNPIGP5js.parseAbi; exports.parseAbiItem = _chunkQJNPIGP5js.parseAbiItem; exports.parseAbiParameter = _chunkQJNPIGP5js.parseAbiParameter; exports.parseAbiParameters = _chunkQJNPIGP5js.parseAbiParameters; exports.parseEther = _chunkQJNPIGP5js.parseEther; exports.parseGwei = _chunkQJNPIGP5js.parseGwei; exports.parseUnits = _chunkQJNPIGP5js.parseUnits; exports.size = _chunkQJNPIGP5js.size; exports.slice = _chunkQJNPIGP5js.slice; exports.sliceBytes = _chunkQJNPIGP5js.sliceBytes; exports.sliceHex = _chunkQJNPIGP5js.sliceHex; exports.stringToBytes = _chunkQJNPIGP5js.stringToBytes; exports.stringToHex = _chunkQJNPIGP5js.stringToHex; exports.stringify = _chunkQJNPIGP5js.stringify; exports.toBytes = _chunkQJNPIGP5js.toBytes; exports.toHex = _chunkQJNPIGP5js.toHex; exports.toRlp = _chunkQJNPIGP5js.toRlp; exports.transactionType = _chunkQJNPIGP5js.transactionType; exports.trim = _chunkQJNPIGP5js.trim; exports.webSocket = webSocket; exports.weiUnits = _chunkQJNPIGP5js.weiUnits;
//# sourceMappingURL=index.js.map

@@ -1,244 +0,11 @@

export { C as CallArgs, a as CallResponse, c as call } from './call-14050d5c.js';
import { H as Hex, X as EstimateGasParameters, b as BlockTag, A as Address, a as Hash, C as Chain, F as FeeHistory, L as Log, f as BlockNumber, Y as FormattedTransaction, Z as TransactionFormatter, V as Formatted, W as ExtractFormatter, O as Formatter, p as RpcTransactionReceipt, T as TransactionReceipt, K as TransactionType, x as Transaction } from './chain-9a8c6614.js';
import { P as PublicClient } from './createPublicClient-9823f081.js';
import { F as FormattedBlock, B as BlockFormatter, a as FormattedTransactionReceipt, T as TransactionReceiptFormatter } from './transactionReceipt-504958d3.js';
import { E as EventFilterArgs } from './watchEvent-ca77f9e9.js';
export { G as GetBytecodeArgs, a as GetBytecodeResponse, g as getBytecode, w as watchEvent } from './watchEvent-ca77f9e9.js';
import { j as EventDefinition } from './contract-3b4a1df6.js';
import './transactionRequest-37f60d32.js';
import { P as PublicClient, W as WalletClient } from './createPublicClient-e2eae0fc.js';
export { C as CallParameters, at as CallReturnType, au as CreateBlockFilterReturnType, av as CreateEventFilterParameters, aw as CreateEventFilterReturnType, ax as CreatePendingTransactionFilterReturnType, E as EstimateGasParameters, ay as EstimateGasReturnType, az as GetBalanceParameters, aA as GetBalanceReturnType, aC as GetBlockNumberParameters, aD as GetBlockNumberReturnType, aB as GetBlockParameters, aE as GetBlockReturnType, aF as GetBlockTransactionCountParameters, aG as GetBlockTransactionCountReturnType, G as GetBytecodeParameters, q as GetBytecodeReturnType, aH as GetFeeHistoryParameters, aI as GetFeeHistoryReturnType, aJ as GetFilterChangesParameters, aK as GetFilterChangesReturnType, aL as GetFilterLogsParameters, aM as GetFilterLogsReturnType, aN as GetGasPriceReturnType, aP as GetTransactionConfirmationsParameters, aQ as GetTransactionConfirmationsReturnType, aO as GetTransactionParameters, aR as GetTransactionReceiptParameters, aS as GetTransactionReceiptReturnType, aT as GetTransactionReturnType, aU as OnBlock, aV as OnBlockNumberFn, aW as OnBlockNumberParameter, aX as OnBlockParameter, O as OnLogsFn, u as OnLogsParameter, aY as OnTransactionsFn, aZ as OnTransactionsParameter, a_ as ReplacementReason, a$ as ReplacementReturnType, b0 as UninstallFilterParameters, b1 as UninstallFilterReturnType, b2 as WaitForTransactionReceiptParameters, b3 as WaitForTransactionReceiptReturnType, b4 as WatchBlockNumberParameters, b5 as WatchBlocksParameters, b6 as WatchPendingTransactionsParameters, a4 as call, a5 as createBlockFilter, a6 as createEventFilter, a7 as createPendingTransactionFilter, a8 as estimateGas, a9 as getBalance, aa as getBlock, ab as getBlockNumber, ac as getBlockNumberCache, ad as getBlockTransactionCount, H as getBytecode, ae as getChainId, af as getFeeHistory, ag as getFilterChanges, ah as getFilterLogs, aj as getGasPrice, ai as getLogs, ak as getTransaction, al as getTransactionConfirmations, am as getTransactionReceipt, an as uninstallFilter, ao as waitForTransactionReceipt, ap as watchBlockNumber, aq as watchBlocks, ar as watchEvent, as as watchPendingTransactions } from './createPublicClient-e2eae0fc.js';
import { f as BlockTag } from './chain-819c7ff7.js';
import { Address } from 'abitype';
import './eip1193-a882d1b8.js';
import './createClient-a47ae6f5.js';
import '@wagmi/chains';
import './eip1193-bbebfb3d.js';
import './createClient-cc01b906.js';
import 'abitype';
import 'ethers@6/types/providers';
type FilterType = 'transaction' | 'block' | 'event';
type Filter<TFilterType extends FilterType = 'event'> = {
id: Hex;
type: TFilterType;
};
type CreatePendingTransactionFilterResponse = Filter<'transaction'>;
declare function createPendingTransactionFilter(client: PublicClient): Promise<CreatePendingTransactionFilterResponse>;
type CreateBlockFilterResponse = Filter<'block'>;
declare function createBlockFilter(client: PublicClient): Promise<CreateBlockFilterResponse>;
type EstimateGasArgs = EstimateGasParameters & ({
/** The balance of the account at a block number. */
blockNumber?: bigint;
blockTag?: never;
} | {
blockNumber?: never;
/** The balance of the account at a block tag. */
blockTag?: BlockTag;
});
type EstimateGasResponse = bigint;
/**
* @description Estimates the gas necessary to complete a transaction without submitting it to the network.
*/
declare function estimateGas(client: PublicClient, { blockNumber, blockTag, data, from, gas, gasPrice, maxFeePerGas, maxPriorityFeePerGas, to, value, }: EstimateGasArgs): Promise<EstimateGasResponse>;
type GetBalanceArgs = {
/** The address of the account. */
address: Address;
} & ({
/** The balance of the account at a block number. */
blockNumber?: bigint;
blockTag?: never;
} | {
blockNumber?: never;
/** The balance of the account at a block tag. */
blockTag?: BlockTag;
});
type GetBalanceResponse = bigint;
/**
* @description Returns the balance of an address in wei.
*/
declare function getBalance(client: PublicClient, { address, blockNumber, blockTag }: GetBalanceArgs): Promise<GetBalanceResponse>;
type GetBlockArgs = {
/** Whether or not to include transaction data in the response. */
includeTransactions?: boolean;
} & ({
/** Hash of the block. */
blockHash?: Hash;
blockNumber?: never;
blockTag?: never;
} | {
blockHash?: never;
/** The block number. */
blockNumber?: bigint;
blockTag?: never;
} | {
blockHash?: never;
blockNumber?: never;
/** The block tag. Defaults to 'latest'. */
blockTag?: BlockTag;
});
type GetBlockResponse<TChain extends Chain = Chain> = FormattedBlock<BlockFormatter<TChain>>;
declare function getBlock<TChain extends Chain>(client: PublicClient<any, TChain>, { blockHash, blockNumber, blockTag, includeTransactions, }?: GetBlockArgs): Promise<GetBlockResponse<TChain>>;
type GetBlockNumberArgs = {
/** The maximum age (in ms) of the cached value. */
maxAge?: number;
};
type GetBlockNumberResponse = bigint;
declare function getBlockNumberCache(id: string): {
clear: () => void;
promise: {
clear: () => boolean;
get: () => Promise<unknown> | undefined;
set: (data: Promise<unknown>) => Map<string, Promise<unknown>>;
};
response: {
clear: () => boolean;
get: () => {
created: Date;
data: unknown;
} | undefined;
set: (data: {
created: Date;
data: unknown;
}) => Map<string, {
created: Date;
data: unknown;
}>;
};
};
/**
* @description Returns the number of the most recent block seen.
*/
declare function getBlockNumber(client: PublicClient, { maxAge }?: GetBlockNumberArgs): Promise<GetBlockNumberResponse>;
type GetBlockTransactionCountArgs = {
/** Hash of the block. */
blockHash?: Hash;
blockNumber?: never;
blockTag?: never;
} | {
blockHash?: never;
/** The block number. */
blockNumber?: bigint;
blockTag?: never;
} | {
blockHash?: never;
blockNumber?: never;
/** The block tag. Defaults to 'latest'. */
blockTag?: BlockTag;
};
type GetBlockTransactionCountResponse = number;
declare function getBlockTransactionCount<TChain extends Chain>(client: PublicClient<any, TChain>, { blockHash, blockNumber, blockTag, }?: GetBlockTransactionCountArgs): Promise<GetBlockTransactionCountResponse>;
declare function getChainId(client: PublicClient): Promise<number>;
type GetFeeHistoryArgs = {
blockCount: number;
rewardPercentiles: number[];
} & ({
blockNumber?: never;
blockTag?: BlockTag;
} | {
blockNumber?: bigint;
blockTag?: never;
});
type GetFeeHistoryResponse = FeeHistory;
/**
* @description Returns a collection of historical gas information.
*/
declare function getFeeHistory(client: PublicClient, { blockCount, blockNumber, blockTag, rewardPercentiles, }: GetFeeHistoryArgs): Promise<GetFeeHistoryResponse>;
type GetFilterChangesArgs<TFilterType extends FilterType> = {
filter: Filter<TFilterType>;
};
type GetFilterChangesResponse<TFilterType extends FilterType> = TFilterType extends 'event' ? Log[] : Hash[];
declare function getFilterChanges<TFilterType extends FilterType>(client: PublicClient, { filter }: GetFilterChangesArgs<TFilterType>): Promise<GetFilterChangesResponse<TFilterType>>;
type GetFilterLogsArgs = {
filter: Filter<'event'>;
};
type GetFilterLogsResponse = Log[];
declare function getFilterLogs<TFilterType extends FilterType>(client: PublicClient, { filter }: GetFilterLogsArgs): Promise<GetFilterLogsResponse>;
type GetGasPriceResponse = bigint;
/**
* @description Returns the current price of gas (in wei).
*/
declare function getGasPrice(client: PublicClient): Promise<GetGasPriceResponse>;
type GetLogsArgs<TEventDefinition extends EventDefinition> = {
/** Address or list of addresses from which logs originated */
address?: Address | Address[];
} & ({
event: TEventDefinition;
args?: EventFilterArgs<TEventDefinition>;
} | {
event?: never;
args?: never;
}) & ({
/** Block number or tag after which to include logs */
fromBlock?: BlockNumber<bigint> | BlockTag;
/** Block number or tag before which to include logs */
toBlock?: BlockNumber<bigint> | BlockTag;
blockHash?: never;
} | {
fromBlock?: never;
toBlock?: never;
/** Hash of block to include logs from */
blockHash?: Hash;
});
type GetLogsResponse = Log[];
/**
* @description Returns a collection of event logs.
*/
declare function getLogs<TEventDefinition extends EventDefinition>(client: PublicClient, { address, blockHash, fromBlock, toBlock, event, args, }?: GetLogsArgs<TEventDefinition>): Promise<GetLogsResponse>;
type GetTransactionArgs = {
/** The block hash */
blockHash: Hash;
blockNumber?: never;
blockTag?: never;
hash?: never;
/** The index of the transaction on the block. */
index: number;
} | {
blockHash?: never;
/** The block number */
blockNumber: bigint;
blockTag?: never;
hash?: never;
/** The index of the transaction on the block. */
index: number;
} | {
blockHash?: never;
blockNumber?: never;
/** The block tag. */
blockTag: BlockTag;
hash?: never;
/** The index of the transaction on the block. */
index: number;
} | {
blockHash?: never;
blockNumber?: never;
blockTag?: never;
/** The hash of the transaction. */
hash: Hash;
index?: number;
};
type GetTransactionResponse<TChain extends Chain = Chain> = FormattedTransaction<TransactionFormatter<TChain>>;
/** @description Returns information about a transaction given a hash or block identifier. */
declare function getTransaction<TChain extends Chain>(client: PublicClient<any, TChain>, { blockHash, blockNumber, blockTag, hash, index, }: GetTransactionArgs): Promise<GetTransactionResponse<TChain>>;
type GetTransactionConfirmationsArgs<TChain extends Chain> = {
/** The transaction hash. */
hash: Hash;
transactionReceipt?: never;
} | {
hash?: never;
/** The transaction receipt. */
transactionReceipt: FormattedTransactionReceipt<TransactionReceiptFormatter<TChain>>;
};
type GetTransactionConfirmationsResponse = bigint;
declare function getTransactionConfirmations<TChain extends Chain>(client: PublicClient<any, TChain>, { hash, transactionReceipt }: GetTransactionConfirmationsArgs<TChain>): Promise<GetTransactionConfirmationsResponse>;
type GetTransactionCountArgs = {
type GetTransactionCountParameters = {
/** The account address. */

@@ -255,100 +22,8 @@ address: Address;

});
type GetTransactionCountResponse = number;
type GetTransactionCountReturnType = number;
/**
* @description Returns the number of transactions an account has broadcast / sent.
*/
declare function getTransactionCount(client: PublicClient, { address, blockTag, blockNumber }: GetTransactionCountArgs): Promise<GetTransactionCountResponse>;
declare function getTransactionCount(client: PublicClient | WalletClient, { address, blockTag, blockNumber }: GetTransactionCountParameters): Promise<GetTransactionCountReturnType>;
type GetTransactionReceiptArgs = {
/** The hash of the transaction. */
hash: Hash;
};
type GetTransactionReceiptResponse<TChain extends Chain = Chain> = FormattedTransactionReceipt<TransactionReceiptFormatter<TChain>>;
declare function getTransactionReceipt<TChain extends Chain>(client: PublicClient<any, TChain>, { hash }: GetTransactionReceiptArgs): Promise<Formatted<ExtractFormatter<TChain, "transactionReceipt", Formatter<RpcTransactionReceipt, TransactionReceipt<bigint, number, "success" | "reverted", TransactionType>>>, TransactionReceipt<bigint, number, "success" | "reverted", TransactionType>, false>>;
type UninstallFilterArgs = {
filter: Filter<any>;
};
type UninstallFilterResponse = boolean;
declare function uninstallFilter(client: PublicClient, { filter }: UninstallFilterArgs): Promise<UninstallFilterResponse>;
type ReplacementReason = 'cancelled' | 'replaced' | 'repriced';
type ReplacementResponse<TChain extends Chain = Chain> = {
reason: ReplacementReason;
replacedTransaction: Transaction;
transaction: Transaction;
transactionReceipt: GetTransactionReceiptResponse<TChain>;
};
type WaitForTransactionReceiptResponse<TChain extends Chain = Chain> = GetTransactionReceiptResponse<TChain>;
type WaitForTransactionReceiptArgs<TChain extends Chain = Chain> = {
/** The number of confirmations (blocks that have passed) to wait before resolving. */
confirmations?: number;
/** The hash of the transaction. */
hash: Hash;
onReplaced?: (response: ReplacementResponse<TChain>) => void;
/** Polling frequency (in ms). Defaults to the client's pollingInterval config. */
pollingInterval?: number;
/** Optional timeout (in milliseconds) to wait before stopping polling. */
timeout?: number;
};
declare function waitForTransactionReceipt<TChain extends Chain>(client: PublicClient<any, TChain>, { confirmations, hash, onReplaced, pollingInterval, timeout, }: WaitForTransactionReceiptArgs<TChain>): Promise<WaitForTransactionReceiptResponse<TChain>>;
type OnBlockNumberResponse = GetBlockNumberResponse;
type OnBlockNumber = (blockNumber: OnBlockNumberResponse, prevBlockNumber: OnBlockNumberResponse | undefined) => void;
type WatchBlockNumberArgs = {
/** Whether or not to emit the missed block numbers to the callback. */
emitMissed?: boolean;
/** Whether or not to emit the latest block number to the callback when the subscription opens. */
emitOnBegin?: boolean;
/** The callback to call when a new block number is received. */
onBlockNumber: OnBlockNumber;
/** The callback to call when an error occurred when trying to get for a new block. */
onError?: (error: Error) => void;
/** Polling frequency (in ms). Defaults to Client's pollingInterval config. */
pollingInterval?: number;
};
/** @description Watches and returns incoming block numbers. */
declare function watchBlockNumber(client: PublicClient, { emitOnBegin, emitMissed, onBlockNumber, onError, pollingInterval, }: WatchBlockNumberArgs): () => void;
type OnBlockResponse<TChain extends Chain = Chain, TIncludeTransactions = false> = Omit<GetBlockResponse<TChain>, TIncludeTransactions extends false ? 'transactions' : ''>;
type OnBlock<TChain extends Chain = Chain, TIncludeTransactions = false> = (block: OnBlockResponse<TChain, TIncludeTransactions>, prevBlock: OnBlockResponse<TChain, TIncludeTransactions> | undefined) => void;
type WatchBlocksArgs<TChain extends Chain = Chain> = {
/** The block tag. Defaults to "latest". */
blockTag?: BlockTag;
/** Whether or not to emit the missed blocks to the callback. */
emitMissed?: boolean;
/** Whether or not to emit the block to the callback when the subscription opens. */
emitOnBegin?: boolean;
/** The callback to call when an error occurred when trying to get for a new block. */
onError?: (error: Error) => void;
/** Polling frequency (in ms). Defaults to the client's pollingInterval config. */
pollingInterval?: number;
} & ({
/** Whether or not to include transaction data in the response. */
includeTransactions: true;
/** The callback to call when a new block is received. */
onBlock: OnBlock<TChain, true>;
} | {
/** Whether or not to include transaction data in the response. */
includeTransactions?: false;
/** The callback to call when a new block is received. */
onBlock: OnBlock<TChain>;
});
/** @description Watches and returns information for incoming blocks. */
declare function watchBlocks<TChain extends Chain, TWatchBlocksArgs extends WatchBlocksArgs<TChain>>(client: PublicClient<any, TChain>, { blockTag, emitMissed, emitOnBegin, onBlock, onError, includeTransactions, pollingInterval, }: TWatchBlocksArgs): () => void;
type OnTransactionsResponse = Hash[];
type OnTransactions = (transactions: OnTransactionsResponse) => void;
type WatchPendingTransactionsArgs = {
/** Whether or not the transaction hashes should be batched on each invocation. */
batch?: boolean;
/** The callback to call when an error occurred when trying to get for a new block. */
onError?: (error: Error) => void;
/** The callback to call when new transactions are received. */
onTransactions: OnTransactions;
/** Polling frequency (in ms). Defaults to Client's pollingInterval config. */
pollingInterval?: number;
};
declare function watchPendingTransactions(client: PublicClient, { batch, onError, onTransactions, pollingInterval, }: WatchPendingTransactionsArgs): () => void;
export { CreateBlockFilterResponse, CreatePendingTransactionFilterResponse, EstimateGasArgs, EstimateGasResponse, GetBalanceArgs, GetBalanceResponse, GetBlockArgs, GetBlockNumberArgs, GetBlockNumberResponse, GetBlockResponse, GetBlockTransactionCountArgs, GetBlockTransactionCountResponse, GetFeeHistoryArgs, GetFeeHistoryResponse, GetFilterChangesArgs, GetFilterChangesResponse, GetFilterLogsArgs, GetFilterLogsResponse, GetGasPriceResponse, GetTransactionArgs, GetTransactionConfirmationsArgs, GetTransactionConfirmationsResponse, GetTransactionCountArgs, GetTransactionCountResponse, GetTransactionReceiptArgs, GetTransactionReceiptResponse, GetTransactionResponse, OnBlock, OnBlockNumber, OnBlockNumberResponse, OnBlockResponse, OnTransactions, OnTransactionsResponse, ReplacementReason, ReplacementResponse, UninstallFilterArgs, UninstallFilterResponse, WaitForTransactionReceiptArgs, WaitForTransactionReceiptResponse, WatchBlockNumberArgs, WatchBlocksArgs, WatchPendingTransactionsArgs, createBlockFilter, createPendingTransactionFilter, estimateGas, getBalance, getBlock, getBlockNumber, getBlockNumberCache, getBlockTransactionCount, getChainId, getFeeHistory, getFilterChanges, getFilterLogs, getGasPrice, getLogs, getTransaction, getTransactionConfirmations, getTransactionCount, getTransactionReceipt, uninstallFilter, waitForTransactionReceipt, watchBlockNumber, watchBlocks, watchPendingTransactions };
export { GetTransactionCountParameters, GetTransactionCountReturnType, getTransactionCount };

@@ -28,5 +28,4 @@ "use strict";Object.defineProperty(exports, "__esModule", {value: true});

var _chunkXB55RCBEjs = require('./chunk-XB55RCBE.js');
require('./chunk-3MFDRMZW.js');
var _chunkQJNPIGP5js = require('./chunk-QJNPIGP5.js');

@@ -58,3 +57,5 @@

exports.call = _chunkXB55RCBEjs.call; exports.createBlockFilter = _chunkXB55RCBEjs.createBlockFilter; exports.createPendingTransactionFilter = _chunkXB55RCBEjs.createPendingTransactionFilter; exports.estimateGas = _chunkXB55RCBEjs.estimateGas; exports.getBalance = _chunkXB55RCBEjs.getBalance; exports.getBlock = _chunkXB55RCBEjs.getBlock; exports.getBlockNumber = _chunkXB55RCBEjs.getBlockNumber; exports.getBlockNumberCache = _chunkXB55RCBEjs.getBlockNumberCache; exports.getBlockTransactionCount = _chunkXB55RCBEjs.getBlockTransactionCount; exports.getBytecode = _chunkXB55RCBEjs.getBytecode; exports.getChainId = _chunkXB55RCBEjs.getChainId; exports.getFeeHistory = _chunkXB55RCBEjs.getFeeHistory; exports.getFilterChanges = _chunkXB55RCBEjs.getFilterChanges; exports.getFilterLogs = _chunkXB55RCBEjs.getFilterLogs; exports.getGasPrice = _chunkXB55RCBEjs.getGasPrice; exports.getLogs = _chunkXB55RCBEjs.getLogs; exports.getTransaction = _chunkXB55RCBEjs.getTransaction; exports.getTransactionConfirmations = _chunkXB55RCBEjs.getTransactionConfirmations; exports.getTransactionCount = _chunkXB55RCBEjs.getTransactionCount; exports.getTransactionReceipt = _chunkXB55RCBEjs.getTransactionReceipt; exports.uninstallFilter = _chunkXB55RCBEjs.uninstallFilter; exports.waitForTransactionReceipt = _chunkXB55RCBEjs.waitForTransactionReceipt; exports.watchBlockNumber = _chunkXB55RCBEjs.watchBlockNumber; exports.watchBlocks = _chunkXB55RCBEjs.watchBlocks; exports.watchEvent = _chunkXB55RCBEjs.watchEvent; exports.watchPendingTransactions = _chunkXB55RCBEjs.watchPendingTransactions;
exports.call = _chunkQJNPIGP5js.call; exports.createBlockFilter = _chunkQJNPIGP5js.createBlockFilter; exports.createEventFilter = _chunkQJNPIGP5js.createEventFilter; exports.createPendingTransactionFilter = _chunkQJNPIGP5js.createPendingTransactionFilter; exports.estimateGas = _chunkQJNPIGP5js.estimateGas; exports.getBalance = _chunkQJNPIGP5js.getBalance; exports.getBlock = _chunkQJNPIGP5js.getBlock; exports.getBlockNumber = _chunkQJNPIGP5js.getBlockNumber; exports.getBlockNumberCache = _chunkQJNPIGP5js.getBlockNumberCache; exports.getBlockTransactionCount = _chunkQJNPIGP5js.getBlockTransactionCount; exports.getBytecode = _chunkQJNPIGP5js.getBytecode; exports.getChainId = _chunkQJNPIGP5js.getChainId; exports.getFeeHistory = _chunkQJNPIGP5js.getFeeHistory; exports.getFilterChanges = _chunkQJNPIGP5js.getFilterChanges; exports.getFilterLogs = _chunkQJNPIGP5js.getFilterLogs; exports.getGasPrice = _chunkQJNPIGP5js.getGasPrice; exports.getLogs = _chunkQJNPIGP5js.getLogs; exports.getTransaction = _chunkQJNPIGP5js.getTransaction; exports.getTransactionConfirmations = _chunkQJNPIGP5js.getTransactionConfirmations; exports.getTransactionCount = _chunkQJNPIGP5js.getTransactionCount; exports.getTransactionReceipt = _chunkQJNPIGP5js.getTransactionReceipt; exports.uninstallFilter = _chunkQJNPIGP5js.uninstallFilter; exports.waitForTransactionReceipt = _chunkQJNPIGP5js.waitForTransactionReceipt; exports.watchBlockNumber = _chunkQJNPIGP5js.watchBlockNumber; exports.watchBlocks = _chunkQJNPIGP5js.watchBlocks; exports.watchEvent = _chunkQJNPIGP5js.watchEvent; exports.watchPendingTransactions = _chunkQJNPIGP5js.watchPendingTransactions;
//# sourceMappingURL=public.js.map

@@ -1,161 +0,20 @@

import { a as Hash, o as RpcTransaction, A as Address, Q as Quantity, s as TransactionRequest, H as Hex } from './chain-9a8c6614.js';
import { T as TestClient } from './createTestClient-63b16109.js';
import { T as TestClient } from './test-13f4413b.js';
export { D as DropTransactionParameters, I as ImpersonateAccountParameters, z as IncreaseTimeParameters, M as MineParameters, R as ResetParameters, A as RevertParameters, S as SendUnsignedTransactionParameters, B as SendUnsignedTransactionReturnType, C as SetBalanceParameters, E as SetBlockGasLimitParameters, F as SetBlockTimestampIntervalParameters, G as SetCodeParameters, H as SetCoinbaseParameters, J as SetIntervalMiningParameters, K as SetMinGasPriceParameters, L as SetNextBlockBaseFeePerGasParameters, N as SetNextBlockTimestampParameters, O as SetNonceParameters, P as SetStorageAtParameters, Q as StopImpersonatingAccountParameters, d as dropTransaction, g as getAutomine, b as getTxpoolContent, e as getTxpoolStatus, i as impersonateAccount, f as increaseTime, h as inspectTxpool, m as mine, r as reset, j as revert, s as sendUnsignedTransaction, k as setBalance, l as setBlockGasLimit, n as setBlockTimestampInterval, o as setCode, p as setCoinbase, q as setIntervalMining, t as setMinGasPrice, u as setNextBlockBaseFeePerGas, v as setNextBlockTimestamp, w as setNonce, x as setStorageAt, y as stopImpersonatingAccount } from './test-13f4413b.js';
import './chain-819c7ff7.js';
import './eip1193-a882d1b8.js';
import 'abitype';
import './createClient-a47ae6f5.js';
import '@wagmi/chains';
import './eip1193-bbebfb3d.js';
import './createClient-cc01b906.js';
import 'ethers@6/types/providers';
type DropTransactionArgs = {
/** The hash of the transaction to drop. */
hash: Hash;
};
declare function dropTransaction(client: TestClient, { hash }: DropTransactionArgs): Promise<void>;
type GetAutomineResponse = boolean;
declare function getAutomine(client: TestClient): Promise<GetAutomineResponse>;
declare function getTxpoolContent(client: TestClient): Promise<{
pending: Record<`0x${string}`, Record<string, RpcTransaction>>;
queued: Record<`0x${string}`, Record<string, RpcTransaction>>;
}>;
declare function getTxpoolStatus(client: TestClient): Promise<{
pending: number;
queued: number;
}>;
type ImpersonateAccountArgs = {
/** The account to impersonate. */
address: Address;
};
declare function impersonateAccount(client: TestClient, { address }: ImpersonateAccountArgs): Promise<void>;
type IncreaseTimeArgs = {
/** The amount of seconds to jump forward in time. */
seconds: number;
};
declare function increaseTime(client: TestClient, { seconds }: IncreaseTimeArgs): Promise<`0x${string}`>;
declare function inspectTxpool(client: TestClient): Promise<{
pending: Record<`0x${string}`, Record<string, string>>;
queued: Record<`0x${string}`, Record<string, string>>;
}>;
type MineArgs = {
/** Number of blocks to mine. */
blocks: number;
/** Interval between each block in seconds. */
interval?: number;
};
declare function mine(client: TestClient, { blocks, interval }: MineArgs): Promise<void>;
declare function removeBlockTimestampInterval(client: TestClient): Promise<void>;
type ResetArgs = {
/** The block number to reset from. */
blockNumber?: bigint;
/** The JSON RPC URL. */
jsonRpcUrl?: string;
};
declare function reset(client: TestClient, { blockNumber, jsonRpcUrl }?: ResetArgs): Promise<void>;
type RevertArgs = {
/** The snapshot ID to revert to. */
id: Quantity;
};
declare function revert(client: TestClient, { id }: RevertArgs): Promise<void>;
type SendUnsignedTransactionArgs = TransactionRequest;
type SendUnsignedTransactionResponse = Hash;
declare function sendUnsignedTransaction(client: TestClient, request: SendUnsignedTransactionArgs): Promise<SendUnsignedTransactionResponse>;
declare function setAutomine(client: TestClient, enabled: boolean): Promise<void>;
type SetBalanceArgs = {
/** The account address. */
address: Address;
/** Amount (in wei) to set */
value: bigint;
};
declare function setBalance(client: TestClient, { address, value }: SetBalanceArgs): Promise<void>;
type SetBlockGasLimitArgs = {
/** Gas limit (in wei). */
gasLimit: bigint;
};
declare function setBlockGasLimit(client: TestClient, { gasLimit }: SetBlockGasLimitArgs): Promise<void>;
type SetBlockTimestampIntervalArgs = {
/** The interval (in seconds). */
interval: number;
};
declare function setBlockTimestampInterval(client: TestClient, { interval }: SetBlockTimestampIntervalArgs): Promise<void>;
type SetCodeArgs = {
/** The account address. */
address: Address;
/** The bytecode to set */
bytecode: Hex;
};
declare function setCode(client: TestClient, { address, bytecode }: SetCodeArgs): Promise<void>;
type SetCoinbaseArgs = {
/** The coinbase address. */
address: Address;
};
declare function setCoinbase(client: TestClient, { address }: SetCoinbaseArgs): Promise<void>;
type SetIntervalMiningArgs = {
/** The mining interval. */
interval: number;
};
declare function setIntervalMining(client: TestClient, { interval }: SetIntervalMiningArgs): Promise<void>;
declare function setLoggingEnabled(client: TestClient, enabled: boolean): Promise<void>;
type SetMinGasPriceArgs = {
/** The gas price. */
gasPrice: bigint;
};
declare function setMinGasPrice(client: TestClient, { gasPrice }: SetMinGasPriceArgs): Promise<void>;
type SetNextBlockBaseFeePerGasArgs = {
/** Base fee per gas (in wei). */
baseFeePerGas: bigint;
};
declare function setNextBlockBaseFeePerGas(client: TestClient, { baseFeePerGas }: SetNextBlockBaseFeePerGasArgs): Promise<void>;
type SetNextBlockTimestampArgs = {
/** The timestamp (in seconds). */
timestamp: bigint;
};
declare function setNextBlockTimestamp(client: TestClient, { timestamp }: SetNextBlockTimestampArgs): Promise<void>;
type SetNonceArgs = {
/** The account address. */
address: Address;
/** The nonce to set. */
nonce: number;
};
declare function setNonce(client: TestClient, { address, nonce }: SetNonceArgs): Promise<void>;
declare function setRpcUrl(client: TestClient, jsonRpcUrl: string): Promise<void>;
type SetStorageAtArgs = {
/** The account address. */
address: Address;
/** The storage slot (index). Can either be a number or hash value. */
index: number | Hash;
/** The value to store as a 32 byte hex string. */
value: Hex;
};
declare function setStorageAt(client: TestClient, { address, index, value }: SetStorageAtArgs): Promise<void>;
declare function snapshot(client: TestClient): Promise<`0x${string}`>;
type StopImpersonatingAccountArgs = {
/** The account to impersonate. */
address: Address;
};
declare function stopImpersonatingAccount(client: TestClient, { address }: StopImpersonatingAccountArgs): Promise<void>;
export { DropTransactionArgs, ImpersonateAccountArgs, IncreaseTimeArgs, MineArgs, ResetArgs, RevertArgs, SendUnsignedTransactionArgs, SendUnsignedTransactionResponse, SetBalanceArgs, SetBlockGasLimitArgs, SetBlockTimestampIntervalArgs, SetCodeArgs, SetCoinbaseArgs, SetIntervalMiningArgs, SetMinGasPriceArgs, SetNextBlockBaseFeePerGasArgs, SetNextBlockTimestampArgs, SetNonceArgs, SetStorageAtArgs, StopImpersonatingAccountArgs, dropTransaction, getAutomine, getTxpoolContent, getTxpoolStatus, impersonateAccount, increaseTime, inspectTxpool, mine, removeBlockTimestampInterval, reset, revert, sendUnsignedTransaction, setAutomine, setBalance, setBlockGasLimit, setBlockTimestampInterval, setCode, setCoinbase, setIntervalMining, setLoggingEnabled, setMinGasPrice, setNextBlockBaseFeePerGas, setNextBlockTimestamp, setNonce, setRpcUrl, setStorageAt, snapshot, stopImpersonatingAccount };
export { removeBlockTimestampInterval, setAutomine, setLoggingEnabled, setRpcUrl, snapshot };

@@ -5,231 +5,31 @@ "use strict";Object.defineProperty(exports, "__esModule", {value: true});

var _chunk3MFDRMZWjs = require('./chunk-3MFDRMZW.js');
// src/actions/test/dropTransaction.ts
async function dropTransaction(client, { hash }) {
return await client.request({
method: `${client.mode}_dropTransaction`,
params: [hash]
});
}
// src/actions/test/getAutomine.ts
async function getAutomine(client) {
return await client.request({
method: `${client.mode}_getAutomine`
});
}
// src/actions/test/getTxpoolContent.ts
async function getTxpoolContent(client) {
return await client.request({
method: "txpool_content"
});
}
// src/actions/test/getTxpoolStatus.ts
async function getTxpoolStatus(client) {
const { pending, queued } = await client.request({
method: "txpool_status"
});
return {
pending: _chunk3MFDRMZWjs.hexToNumber.call(void 0, pending),
queued: _chunk3MFDRMZWjs.hexToNumber.call(void 0, queued)
};
}
// src/actions/test/impersonateAccount.ts
async function impersonateAccount(client, { address }) {
return await client.request({
method: `${client.mode}_impersonateAccount`,
params: [address]
});
}
// src/actions/test/increaseTime.ts
async function increaseTime(client, { seconds }) {
return await client.request({
method: "evm_increaseTime",
params: [_chunk3MFDRMZWjs.numberToHex.call(void 0, seconds)]
});
}
// src/actions/test/inspectTxpool.ts
async function inspectTxpool(client) {
return await client.request({
method: "txpool_inspect"
});
}
// src/actions/test/mine.ts
async function mine(client, { blocks, interval }) {
return await client.request({
method: `${client.mode}_mine`,
params: [_chunk3MFDRMZWjs.numberToHex.call(void 0, blocks), _chunk3MFDRMZWjs.numberToHex.call(void 0, interval || 0)]
});
}
// src/actions/test/removeBlockTimestampInterval.ts
async function removeBlockTimestampInterval(client) {
return await client.request({
method: `${client.mode}_removeBlockTimestampInterval`
});
}
// src/actions/test/reset.ts
async function reset(client, { blockNumber, jsonRpcUrl } = {}) {
return await client.request({
method: `${client.mode}_reset`,
params: [{ forking: { blockNumber: Number(blockNumber), jsonRpcUrl } }]
});
}
// src/actions/test/revert.ts
async function revert(client, { id }) {
return await client.request({
method: "evm_revert",
params: [id]
});
}
// src/actions/test/sendUnsignedTransaction.ts
async function sendUnsignedTransaction(client, request) {
const request_ = _chunk3MFDRMZWjs.formatTransactionRequest.call(void 0, request);
const hash = await client.request({
method: "eth_sendUnsignedTransaction",
params: [request_]
});
return hash;
}
// src/actions/test/setAutomine.ts
async function setAutomine(client, enabled) {
return await client.request({
method: "evm_setAutomine",
params: [enabled]
});
}
// src/actions/test/setBalance.ts
async function setBalance(client, { address, value }) {
return await client.request({
method: `${client.mode}_setBalance`,
params: [address, _chunk3MFDRMZWjs.numberToHex.call(void 0, value)]
});
}
// src/actions/test/setBlockGasLimit.ts
async function setBlockGasLimit(client, { gasLimit }) {
return await client.request({
method: "evm_setBlockGasLimit",
params: [_chunk3MFDRMZWjs.numberToHex.call(void 0, gasLimit)]
});
}
// src/actions/test/setBlockTimestampInterval.ts
async function setBlockTimestampInterval(client, { interval }) {
return await client.request({
method: `${client.mode}_setBlockTimestampInterval`,
params: [interval]
});
}
// src/actions/test/setCode.ts
async function setCode(client, { address, bytecode }) {
return await client.request({
method: `${client.mode}_setCode`,
params: [address, bytecode]
});
}
// src/actions/test/setCoinbase.ts
async function setCoinbase(client, { address }) {
return await client.request({
method: `${client.mode}_setCoinbase`,
params: [address]
});
}
// src/actions/test/setIntervalMining.ts
async function setIntervalMining(client, { interval }) {
return await client.request({
method: "evm_setIntervalMining",
params: [interval]
});
}
// src/actions/test/setLoggingEnabled.ts
async function setLoggingEnabled(client, enabled) {
return await client.request({
method: `${client.mode}_setLoggingEnabled`,
params: [enabled]
});
}
// src/actions/test/setMinGasPrice.ts
async function setMinGasPrice(client, { gasPrice }) {
return await client.request({
method: `${client.mode}_setMinGasPrice`,
params: [_chunk3MFDRMZWjs.numberToHex.call(void 0, gasPrice)]
});
}
// src/actions/test/setNextBlockBaseFeePerGas.ts
async function setNextBlockBaseFeePerGas(client, { baseFeePerGas }) {
return await client.request({
method: `${client.mode}_setNextBlockBaseFeePerGas`,
params: [_chunk3MFDRMZWjs.numberToHex.call(void 0, baseFeePerGas)]
});
}
// src/actions/test/setNextBlockTimestamp.ts
async function setNextBlockTimestamp(client, { timestamp }) {
return await client.request({
method: "evm_setNextBlockTimestamp",
params: [_chunk3MFDRMZWjs.numberToHex.call(void 0, timestamp)]
});
}
// src/actions/test/setNonce.ts
async function setNonce(client, { address, nonce }) {
return await client.request({
method: `${client.mode}_setNonce`,
params: [address, _chunk3MFDRMZWjs.numberToHex.call(void 0, nonce)]
});
}
// src/actions/test/setRpcUrl.ts
async function setRpcUrl(client, jsonRpcUrl) {
return await client.request({
method: `${client.mode}_setRpcUrl`,
params: [jsonRpcUrl]
});
}
var _chunkQJNPIGP5js = require('./chunk-QJNPIGP5.js');
// src/actions/test/setStorageAt.ts
async function setStorageAt(client, { address, index, value }) {
return await client.request({
method: `${client.mode}_setStorageAt`,
params: [
address,
typeof index === "number" ? _chunk3MFDRMZWjs.numberToHex.call(void 0, index) : index,
value
]
});
}
// src/actions/test/snapshot.ts
async function snapshot(client) {
return await client.request({
method: "evm_snapshot"
});
}
// src/actions/test/stopImpersonatingAccount.ts
async function stopImpersonatingAccount(client, { address }) {
return await client.request({
method: `${client.mode}_stopImpersonatingAccount`,
params: [address]
});
}

@@ -261,6 +61,3 @@

exports.dropTransaction = dropTransaction; exports.getAutomine = getAutomine; exports.getTxpoolContent = getTxpoolContent; exports.getTxpoolStatus = getTxpoolStatus; exports.impersonateAccount = impersonateAccount; exports.increaseTime = increaseTime; exports.inspectTxpool = inspectTxpool; exports.mine = mine; exports.removeBlockTimestampInterval = removeBlockTimestampInterval; exports.reset = reset; exports.revert = revert; exports.sendUnsignedTransaction = sendUnsignedTransaction; exports.setAutomine = setAutomine; exports.setBalance = setBalance; exports.setBlockGasLimit = setBlockGasLimit; exports.setBlockTimestampInterval = setBlockTimestampInterval; exports.setCode = setCode; exports.setCoinbase = setCoinbase; exports.setIntervalMining = setIntervalMining; exports.setLoggingEnabled = setLoggingEnabled; exports.setMinGasPrice = setMinGasPrice; exports.setNextBlockBaseFeePerGas = setNextBlockBaseFeePerGas; exports.setNextBlockTimestamp = setNextBlockTimestamp; exports.setNonce = setNonce; exports.setRpcUrl = setRpcUrl; exports.setStorageAt = setStorageAt; exports.snapshot = snapshot; exports.stopImpersonatingAccount = stopImpersonatingAccount;
exports.dropTransaction = _chunkQJNPIGP5js.dropTransaction; exports.getAutomine = _chunkQJNPIGP5js.getAutomine; exports.getTxpoolContent = _chunkQJNPIGP5js.getTxpoolContent; exports.getTxpoolStatus = _chunkQJNPIGP5js.getTxpoolStatus; exports.impersonateAccount = _chunkQJNPIGP5js.impersonateAccount; exports.increaseTime = _chunkQJNPIGP5js.increaseTime; exports.inspectTxpool = _chunkQJNPIGP5js.inspectTxpool; exports.mine = _chunkQJNPIGP5js.mine; exports.removeBlockTimestampInterval = _chunkQJNPIGP5js.removeBlockTimestampInterval; exports.reset = _chunkQJNPIGP5js.reset; exports.revert = _chunkQJNPIGP5js.revert; exports.sendUnsignedTransaction = _chunkQJNPIGP5js.sendUnsignedTransaction; exports.setAutomine = _chunkQJNPIGP5js.setAutomine; exports.setBalance = _chunkQJNPIGP5js.setBalance; exports.setBlockGasLimit = _chunkQJNPIGP5js.setBlockGasLimit; exports.setBlockTimestampInterval = _chunkQJNPIGP5js.setBlockTimestampInterval; exports.setCode = _chunkQJNPIGP5js.setCode; exports.setCoinbase = _chunkQJNPIGP5js.setCoinbase; exports.setIntervalMining = _chunkQJNPIGP5js.setIntervalMining; exports.setLoggingEnabled = _chunkQJNPIGP5js.setLoggingEnabled; exports.setMinGasPrice = _chunkQJNPIGP5js.setMinGasPrice; exports.setNextBlockBaseFeePerGas = _chunkQJNPIGP5js.setNextBlockBaseFeePerGas; exports.setNextBlockTimestamp = _chunkQJNPIGP5js.setNextBlockTimestamp; exports.setNonce = _chunkQJNPIGP5js.setNonce; exports.setRpcUrl = _chunkQJNPIGP5js.setRpcUrl; exports.setStorageAt = _chunkQJNPIGP5js.setStorageAt; exports.snapshot = _chunkQJNPIGP5js.snapshot; exports.stopImpersonatingAccount = _chunkQJNPIGP5js.stopImpersonatingAccount;
//# sourceMappingURL=test.js.map

@@ -1,40 +0,20 @@

export { D as DecodeAbiArgs, a as DecodeEventLogArgs, b as DecodeEventLogResponse, c as DecodeFunctionDataArgs, d as DecodeFunctionResultArgs, e as DecodeFunctionResultResponse, E as EncodeAbiArgs, f as EncodeDeployDataArgs, g as EncodeErrorResultArgs, h as EncodeEventTopicsArgs, i as EncodeFunctionDataArgs, j as EncodeFunctionResultArgs, G as GetAbiItemArgs, k as decodeAbi, l as decodeEventLog, m as decodeFunctionData, n as decodeFunctionResult, o as encodeAbi, p as encodeDeployData, q as encodeErrorResult, r as encodeEventTopics, s as encodeFunctionData, t as encodeFunctionResult, v as formatAbiItem, u as formatAbiItemWithArgs, w as getAbiItem } from '../getAbiItem-540089dd.js';
export { a as DecodeErrorResultArgs, D as DecodeErrorResultResponse, d as decodeErrorResult } from '../decodeErrorResult-b0d3ce71.js';
import { A as Address, B as ByteArray, H as Hex, O as Formatter } from '../chain-9a8c6614.js';
export { W as ExtractFormatter, V as Formatted, Y as FormattedTransaction, Z as TransactionFormatter, _ as defineFormatter, $ as defineTransaction, a0 as format, a1 as formatTransaction, a2 as transactionType } from '../chain-9a8c6614.js';
export { d as defineChain } from '../chain-83ece55b.js';
import { Abi } from 'abitype';
import { B as BaseError, C as ContractFunctionExecutionError } from '../rpc-c367eceb.js';
export { r as rpc } from '../rpc-c367eceb.js';
export { B as BlockFormatter, F as FormattedBlock, a as FormattedTransactionReceipt, T as TransactionReceiptFormatter, d as defineBlock, b as defineTransactionReceipt, f as formatBlock } from '../transactionReceipt-504958d3.js';
export { F as FormattedTransactionRequest, T as TransactionRequestFormatter, d as defineTransactionRequest, f as formatTransactionRequest } from '../transactionRequest-37f60d32.js';
import { j as EventDefinition } from '../contract-3b4a1df6.js';
import 'abitype/dist/abi-78346466';
import { Address } from 'abitype';
export { ParseAbi, ParseAbiItem, ParseAbiParameter, ParseAbiParameters, parseAbi, parseAbiItem, parseAbiParameter, parseAbiParameters } from 'abitype';
export { D as DecodeAbiParametersReturnType, E as EncodeAbiParametersReturnType, G as GetAbiItemParameters, d as decodeAbiParameters, e as encodeAbiParameters, g as getAbiItem } from '../getAbiItem-159f3263.js';
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-9eb553ce.js';
export { e as encodePacked } from '../encodePacked-4c019ed8.js';
export { a as formatAbiItem, f as formatAbiItemWithArgs } from '../formatAbiItem-622d2303.js';
import { B as BaseError, C as CallExecutionError, E as EstimateGasExecutionError, d as ExecutionRevertedError, F as FeeCapTooHighError, e as FeeCapTooLowError, h as NonceTooHighError, i as NonceTooLowError, N as NonceMaxValueError, I as InsufficientFundsError, f as IntrinsicGasTooHighError, g as IntrinsicGasTooLowError, l as TransactionTypeNotSupportedError, T as TipAboveFeeCapError, U as UnknownNodeError, k as TransactionExecutionError } from '../parseGwei-a2d0d77a.js';
export { G as GetContractAddressOptions, o as GetCreate2AddressOptions, p as GetCreateAddressOptions, H as HttpOptions, R as RpcResponse, ap as Socket, q as ToRlpReturnType, r as boolToBytes, s as boolToHex, t as bytesToBigint, u as bytesToBool, v as bytesToHex, w as bytesToNumber, x as bytesToString, y as formatEther, z as formatGwei, A as formatUnits, D as fromBytes, J as fromHex, K as fromRlp, L as getAccount, M as getAddress, O as getContractAddress, P as getContractError, Q as getCreate2Address, S as getCreateAddress, V as getEventSelector, X as getFunctionSelector, aq as getSocket, Y as hexToBigInt, Z as hexToBool, _ as hexToBytes, $ as hexToNumber, a0 as hexToString, a1 as isAddress, a2 as isAddressEqual, a3 as isBytes, a4 as isHex, a5 as keccak256, a6 as numberToBytes, a7 as numberToHex, a8 as pad, a9 as padBytes, aa as padHex, ab as parseEther, ac as parseGwei, ad as parseUnits, ar as rpc, ae as size, af as slice, ag as sliceBytes, ah as sliceHex, ai as stringToBytes, aj as stringToHex, ak as stringify, al as toBytes, am as toHex, an as toRlp, ao as trim } from '../parseGwei-a2d0d77a.js';
export { d as defineChain } from '../chain-a4f98ba3.js';
import { S as Formatter, C as Chain } from '../chain-819c7ff7.js';
export { I as ExtractFormatter, J as Formatted, K as FormattedTransaction, M as TransactionFormatter, ac as defineFormatter, N as defineTransaction, ad as format, O as formatTransaction, P as transactionType } from '../chain-819c7ff7.js';
import { C as CallParameters, E as EstimateGasParameters, S as SendTransactionParameters, W as WalletClient, P as PublicClient } from '../createPublicClient-e2eae0fc.js';
export { B as BlockFormatter, F as FormattedBlock, e as FormattedTransactionReceipt, f as FormattedTransactionRequest, T as TransactionReceiptFormatter, g as TransactionRequestFormatter, h as defineBlock, i as defineTransactionReceipt, j as defineTransactionRequest, k as formatBlock, l as formatTransactionRequest } from '../createPublicClient-e2eae0fc.js';
import 'isomorphic-ws';
import '@wagmi/chains';
import 'isomorphic-ws';
import 'ethers@6/types/providers';
import '../eip1193-a882d1b8.js';
import '../createClient-a47ae6f5.js';
declare function getAddress(address: Address): `0x${string}`;
type GetCreateAddressOptions = {
from: Address;
nonce: bigint;
};
type GetCreate2AddressOptions = {
bytecode: ByteArray | Hex;
from: Address;
salt: ByteArray | Hex;
};
type GetContractAddressOptions = ({
opcode?: 'CREATE';
} & GetCreateAddressOptions) | ({
opcode: 'CREATE2';
} & GetCreate2AddressOptions);
declare function getContractAddress(opts: GetContractAddressOptions): `0x${string}`;
declare function getCreateAddress(opts: GetCreateAddressOptions): `0x${string}`;
declare function getCreate2Address(opts: GetCreate2AddressOptions): `0x${string}`;
declare function isAddress(address: Address): boolean;
declare function isAddressEqual(a: Address, b: Address): boolean;
declare function buildRequest<TRequest extends (args: any) => Promise<any>>(request: TRequest, { retryDelay, retryCount, }?: {

@@ -58,65 +38,3 @@ retryDelay?: number;

declare function getContractError(err: BaseError, { abi, address, args, docsPath, functionName, sender, }: {
abi: Abi;
args: any;
address?: Address;
docsPath?: string;
functionName: string;
sender?: Address;
}): ContractFunctionExecutionError;
declare function isBytes(value: any): boolean;
declare function isHex(value: any): boolean;
type PadOptions = {
dir?: 'left' | 'right';
size?: number;
};
type PadResult<TValue extends ByteArray | Hex> = TValue extends Hex ? Hex : ByteArray;
declare function pad<TValue extends ByteArray | Hex>(hexOrBytes: TValue, { dir, size }?: PadOptions): PadResult<TValue>;
declare function padHex(hex_: Hex, { dir, size }?: PadOptions): `0x${string}`;
declare function padBytes(bytes: ByteArray, { dir, size }?: PadOptions): Uint8Array;
type TrimOptions = {
dir?: 'left' | 'right';
};
type TrimResult<TValue extends ByteArray | Hex> = TValue extends Hex ? Hex : ByteArray;
declare function trim<TValue extends ByteArray | Hex>(hexOrBytes: TValue, { dir }?: TrimOptions): TrimResult<TValue>;
/**
* @description Retrieves the size of the value (in bytes).
*
* @param value The value (hex or byte array) to retrieve the size of.
* @returns The size of the value (in bytes).
*/
declare function size(value: Hex | ByteArray): number;
type SliceResult<TValue extends ByteArray | Hex> = TValue extends Hex ? Hex : ByteArray;
/**
* @description Returns a section of the hex or byte array given a start/end bytes offset.
*
* @param value The hex or byte array to slice.
* @param start The start offset (in bytes).
* @param end The end offset (in bytes).
*/
declare function slice<TValue extends ByteArray | Hex>(value: TValue, start?: number, end?: number): SliceResult<TValue>;
/**
* @description Returns a section of the byte array given a start/end bytes offset.
*
* @param value The byte array to slice.
* @param start The start offset (in bytes).
* @param end The end offset (in bytes).
*/
declare function sliceBytes(value: ByteArray, start?: number, end?: number): Uint8Array;
/**
* @description Returns a section of the hex value given a start/end bytes offset.
*
* @param value The hex value to slice.
* @param start The start offset (in bytes).
* @param end The end offset (in bytes).
*/
declare function sliceHex(value_: Hex, start?: number, end?: number): string;
/**
* @description Picks out the keys from `value` that exist in the formatter.

@@ -128,141 +46,36 @@ */

/**
* @description Encodes a boolean into a hex string
*/
declare function boolToHex(value: boolean): Hex;
/**
* @description Encodes a bytes array into a hex string
*/
declare function bytesToHex(value: ByteArray): Hex;
/**
* @description Encodes a string, number, bigint, or ByteArray into a hex string
*/
declare function encodeHex(value: string | number | bigint | boolean | ByteArray): Hex;
type NumberToHexOpts$1 = {
signed?: boolean;
size: number;
} | {
signed?: never;
size?: never;
};
/**
* @description Encodes a number or bigint into a hex string
*/
declare function numberToHex(value_: number | bigint, opts?: NumberToHexOpts$1): Hex;
/**
* @description Encodes a UTF-8 string into a hex string
*/
declare function stringToHex(value: string): Hex;
declare function getCallError(err: BaseError, { docsPath, ...args }: CallParameters & {
chain?: Chain;
docsPath?: string;
}): CallExecutionError;
/**
* @description Encodes a boolean into a byte array.
*/
declare function boolToBytes(value: boolean): Uint8Array;
/** @description Encodes a UTF-8 string, hex value, bigint, number or boolean to a byte array. */
declare function encodeBytes(value: string | bigint | number | boolean | Hex): ByteArray;
/**
* @description Encodes a hex string into a byte array.
*/
declare function hexToBytes(hex_: Hex): ByteArray;
/**
* @description Encodes a number into a byte array.
*/
declare function numberToBytes(value: bigint | number, opts?: NumberToHexOpts$1): Uint8Array;
/**
* @description Encodes a UTF-8 string into a byte array.
*/
declare function stringToBytes(value: string): ByteArray;
declare function getEstimateGasError(err: BaseError, { docsPath, ...args }: EstimateGasParameters & {
chain?: Chain;
docsPath?: string;
}): EstimateGasExecutionError;
type RecursiveArray<T> = T | Array<RecursiveArray<T>>;
type To$1 = 'hex' | 'bytes';
type EncodeRlpResponse<TTo extends To$1> = TTo extends 'bytes' ? ByteArray : TTo extends 'hex' ? Hex : never;
declare function encodeRlp<TTo extends To$1 = 'hex'>(hexOrBytes: RecursiveArray<Hex> | RecursiveArray<ByteArray>, to_?: TTo): EncodeRlpResponse<TTo>;
declare function containsNodeError(err: BaseError): boolean;
declare function getNodeError(err: BaseError, args: Partial<SendTransactionParameters<any>>): ExecutionRevertedError | FeeCapTooHighError | FeeCapTooLowError | NonceTooHighError | NonceTooLowError | NonceMaxValueError | InsufficientFundsError | IntrinsicGasTooHighError | IntrinsicGasTooLowError | TransactionTypeNotSupportedError | TipAboveFeeCapError | UnknownNodeError;
type DecodeBytesResponse<TTo> = TTo extends 'string' ? string : TTo extends 'hex' ? Hex : TTo extends 'bigint' ? bigint : TTo extends 'number' ? number : TTo extends 'boolean' ? boolean : never;
/**
* @description Decodes a byte array into a UTF-8 string, hex value, number, bigint or boolean.
*/
declare function decodeBytes<TTo extends 'string' | 'hex' | 'bigint' | 'number' | 'boolean'>(bytes: ByteArray, to: TTo): DecodeBytesResponse<TTo>;
/**
* @description Decodes a byte array into a bigint.
*/
declare function bytesToBigint(bytes: ByteArray): bigint;
/**
* @description Decodes a byte array into a boolean.
*/
declare function bytesToBool(bytes: ByteArray): boolean;
declare function getTransactionError(err: BaseError, { docsPath, ...args }: SendTransactionParameters & {
docsPath?: string;
}): TransactionExecutionError;
/**
* @description Decodes a byte array into a number.
*/
declare function bytesToNumber(bytes: ByteArray): number;
/**
* @description Decodes a byte array into a UTF-8 string.
*/
declare function bytesToString(bytes: ByteArray): string;
declare const arrayRegex: RegExp;
declare const bytesRegex: RegExp;
declare const integerRegex: RegExp;
type DecodeHexResponse<TTo> = TTo extends 'string' ? string : TTo extends 'bigint' ? bigint : TTo extends 'number' ? number : TTo extends 'bytes' ? ByteArray : TTo extends 'boolean' ? boolean : never;
/**
* @description Decodes a hex string into a string, number, bigint, boolean, or bytes32 array.
*/
declare function decodeHex<TTo extends 'string' | 'bigint' | 'number' | 'bytes' | 'boolean'>(hex: Hex, to: TTo): DecodeHexResponse<TTo>;
type HexToBigIntOpts = {
signed?: boolean;
};
/**
* @description Decodes a hex string into a bigint.
*/
declare function hexToBigInt(hex: Hex, opts?: HexToBigIntOpts): bigint;
/**
* @description Decodes a hex string into a boolean.
*/
declare function hexToBool(hex: Hex): boolean;
type NumberToHexOpts = HexToBigIntOpts;
/**
* @description Decodes a hex string into a number.
*/
declare function hexToNumber(hex: Hex, opts?: NumberToHexOpts): number;
/**
* @description Decodes a hex string into a UTF-8 string.
*/
declare function hexToString(hex: Hex): string;
declare function assertRequest(args: Partial<SendTransactionParameters<Chain>>): void;
type DecodeRlpResponse<TTo> = TTo extends 'bytes' ? ByteArray : TTo extends 'hex' ? Hex : never;
declare function decodeRlp<TTo extends 'bytes' | 'hex'>(value: ByteArray | Hex, to: TTo): RecursiveArray<DecodeRlpResponse<TTo>>;
declare const getEventSignature: (event: EventDefinition) => `0x${string}`;
declare const getFunctionSignature: (fn: string) => `0x${string}`;
type To = 'hex' | 'bytes';
type Keccak256Hash<TTo extends To> = (TTo extends 'bytes' ? ByteArray : never) | (TTo extends 'hex' ? Hex : never);
declare function keccak256<TTo extends To = 'hex'>(value: ByteArray, to_?: TTo): Keccak256Hash<TTo>;
declare function stringify(value: unknown): string;
declare const etherUnits: {
gwei: number;
wei: number;
type PrepareRequestParameters<TParameters extends SendTransactionParameters = SendTransactionParameters> = TParameters;
type PrepareRequestReturnType<TParameters extends SendTransactionParameters = SendTransactionParameters> = TParameters & {
from: Address;
gas: SendTransactionParameters['gas'];
gasPrice?: SendTransactionParameters['gasPrice'];
maxFeePerGas?: SendTransactionParameters['maxFeePerGas'];
maxPriorityFeePerGas?: SendTransactionParameters['maxPriorityFeePerGas'];
nonce: SendTransactionParameters['nonce'];
};
declare const gweiUnits: {
ether: number;
wei: number;
};
declare const weiUnits: {
ether: number;
gwei: number;
};
declare function prepareRequest<TParameters extends SendTransactionParameters>(client: WalletClient<any, any> | PublicClient<any, any>, args: PrepareRequestParameters<TParameters>): Promise<PrepareRequestReturnType<TParameters>>;
declare function formatEther(wei: bigint, unit?: 'wei' | 'gwei'): string;
declare function formatGwei(wei: bigint, unit?: 'wei'): string;
declare function formatUnit(value: bigint, decimals: number): string;
declare function parseUnit(value: `${number}`, decimals: number): bigint;
declare function parseEther(ether: `${number}`, unit?: 'wei' | 'gwei'): bigint;
declare function parseGwei(ether: `${number}`, unit?: 'wei'): bigint;
export { EncodeRlpResponse, GetContractAddressOptions, GetCreate2AddressOptions, GetCreateAddressOptions, boolToBytes, boolToHex, buildRequest, bytesToBigint, bytesToBool, bytesToHex, bytesToNumber, bytesToString, decodeBytes, decodeHex, decodeRlp, encodeBytes, encodeHex, encodeRlp, etherUnits, extract, extractFunctionName, extractFunctionParams, extractFunctionParts, extractFunctionType, formatEther, formatGwei, formatUnit, getAddress, getContractAddress, getContractError, getCreate2Address, getCreateAddress, getEventSignature, getFunctionSignature, gweiUnits, hexToBigInt, hexToBool, hexToBytes, hexToNumber, hexToString, isAddress, isAddressEqual, isBytes, isHex, keccak256, numberToBytes, numberToHex, pad, padBytes, padHex, parseEther, parseGwei, parseUnit, size, slice, sliceBytes, sliceHex, stringToBytes, stringToHex, stringify, trim, weiUnits };
export { arrayRegex, assertRequest, buildRequest, bytesRegex, containsNodeError, extract, extractFunctionName, extractFunctionParams, extractFunctionParts, extractFunctionType, getCallError, getEstimateGasError, getNodeError, getTransactionError, integerRegex, prepareRequest };

@@ -86,3 +86,2 @@ "use strict";Object.defineProperty(exports, "__esModule", {value: true});

var _chunk3MFDRMZWjs = require('../chunk-3MFDRMZW.js');

@@ -102,2 +101,3 @@

var _chunkQJNPIGP5js = require('../chunk-QJNPIGP5.js');

@@ -174,3 +174,31 @@

exports.boolToBytes = _chunk3MFDRMZWjs.boolToBytes; exports.boolToHex = _chunk3MFDRMZWjs.boolToHex; exports.buildRequest = _chunk3MFDRMZWjs.buildRequest; exports.bytesToBigint = _chunk3MFDRMZWjs.bytesToBigint; exports.bytesToBool = _chunk3MFDRMZWjs.bytesToBool; exports.bytesToHex = _chunk3MFDRMZWjs.bytesToHex; exports.bytesToNumber = _chunk3MFDRMZWjs.bytesToNumber; exports.bytesToString = _chunk3MFDRMZWjs.bytesToString; exports.decodeAbi = _chunk3MFDRMZWjs.decodeAbi; exports.decodeBytes = _chunk3MFDRMZWjs.decodeBytes; exports.decodeErrorResult = _chunk3MFDRMZWjs.decodeErrorResult; exports.decodeEventLog = _chunk3MFDRMZWjs.decodeEventLog; exports.decodeFunctionData = _chunk3MFDRMZWjs.decodeFunctionData; exports.decodeFunctionResult = _chunk3MFDRMZWjs.decodeFunctionResult; exports.decodeHex = _chunk3MFDRMZWjs.decodeHex; exports.decodeRlp = _chunk3MFDRMZWjs.decodeRlp; exports.defineBlock = _chunk3MFDRMZWjs.defineBlock; exports.defineChain = _chunk3MFDRMZWjs.defineChain; exports.defineFormatter = _chunk3MFDRMZWjs.defineFormatter; exports.defineTransaction = _chunk3MFDRMZWjs.defineTransaction; exports.defineTransactionReceipt = _chunk3MFDRMZWjs.defineTransactionReceipt; exports.defineTransactionRequest = _chunk3MFDRMZWjs.defineTransactionRequest; exports.encodeAbi = _chunk3MFDRMZWjs.encodeAbi; exports.encodeBytes = _chunk3MFDRMZWjs.encodeBytes; exports.encodeDeployData = _chunk3MFDRMZWjs.encodeDeployData; exports.encodeErrorResult = _chunk3MFDRMZWjs.encodeErrorResult; exports.encodeEventTopics = _chunk3MFDRMZWjs.encodeEventTopics; exports.encodeFunctionData = _chunk3MFDRMZWjs.encodeFunctionData; exports.encodeFunctionResult = _chunk3MFDRMZWjs.encodeFunctionResult; exports.encodeHex = _chunk3MFDRMZWjs.encodeHex; exports.encodeRlp = _chunk3MFDRMZWjs.encodeRlp; exports.etherUnits = _chunk3MFDRMZWjs.etherUnits; exports.extract = _chunk3MFDRMZWjs.extract; exports.extractFunctionName = _chunk3MFDRMZWjs.extractFunctionName; exports.extractFunctionParams = _chunk3MFDRMZWjs.extractFunctionParams; exports.extractFunctionParts = _chunk3MFDRMZWjs.extractFunctionParts; exports.extractFunctionType = _chunk3MFDRMZWjs.extractFunctionType; exports.format = _chunk3MFDRMZWjs.format; exports.formatAbiItem = _chunk3MFDRMZWjs.formatAbiItem; exports.formatAbiItemWithArgs = _chunk3MFDRMZWjs.formatAbiItemWithArgs; exports.formatBlock = _chunk3MFDRMZWjs.formatBlock; exports.formatEther = _chunk3MFDRMZWjs.formatEther; exports.formatGwei = _chunk3MFDRMZWjs.formatGwei; exports.formatTransaction = _chunk3MFDRMZWjs.formatTransaction; exports.formatTransactionRequest = _chunk3MFDRMZWjs.formatTransactionRequest; exports.formatUnit = _chunk3MFDRMZWjs.formatUnit; exports.getAbiItem = _chunk3MFDRMZWjs.getAbiItem; exports.getAddress = _chunk3MFDRMZWjs.getAddress; exports.getContractAddress = _chunk3MFDRMZWjs.getContractAddress; exports.getContractError = _chunk3MFDRMZWjs.getContractError; exports.getCreate2Address = _chunk3MFDRMZWjs.getCreate2Address; exports.getCreateAddress = _chunk3MFDRMZWjs.getCreateAddress; exports.getEventSignature = _chunk3MFDRMZWjs.getEventSignature; exports.getFunctionSignature = _chunk3MFDRMZWjs.getFunctionSignature; exports.gweiUnits = _chunk3MFDRMZWjs.gweiUnits; exports.hexToBigInt = _chunk3MFDRMZWjs.hexToBigInt; exports.hexToBool = _chunk3MFDRMZWjs.hexToBool; exports.hexToBytes = _chunk3MFDRMZWjs.hexToBytes; exports.hexToNumber = _chunk3MFDRMZWjs.hexToNumber; exports.hexToString = _chunk3MFDRMZWjs.hexToString; exports.isAddress = _chunk3MFDRMZWjs.isAddress; exports.isAddressEqual = _chunk3MFDRMZWjs.isAddressEqual; exports.isBytes = _chunk3MFDRMZWjs.isBytes; exports.isHex = _chunk3MFDRMZWjs.isHex; exports.keccak256 = _chunk3MFDRMZWjs.keccak256; exports.numberToBytes = _chunk3MFDRMZWjs.numberToBytes; exports.numberToHex = _chunk3MFDRMZWjs.numberToHex; exports.pad = _chunk3MFDRMZWjs.pad; exports.padBytes = _chunk3MFDRMZWjs.padBytes; exports.padHex = _chunk3MFDRMZWjs.padHex; exports.parseEther = _chunk3MFDRMZWjs.parseEther; exports.parseGwei = _chunk3MFDRMZWjs.parseGwei; exports.parseUnit = _chunk3MFDRMZWjs.parseUnit; exports.rpc = _chunk3MFDRMZWjs.rpc; exports.size = _chunk3MFDRMZWjs.size; exports.slice = _chunk3MFDRMZWjs.slice; exports.sliceBytes = _chunk3MFDRMZWjs.sliceBytes; exports.sliceHex = _chunk3MFDRMZWjs.sliceHex; exports.stringToBytes = _chunk3MFDRMZWjs.stringToBytes; exports.stringToHex = _chunk3MFDRMZWjs.stringToHex; exports.stringify = _chunk3MFDRMZWjs.stringify; exports.transactionType = _chunk3MFDRMZWjs.transactionType; exports.trim = _chunk3MFDRMZWjs.trim; exports.weiUnits = _chunk3MFDRMZWjs.weiUnits;
exports.arrayRegex = _chunkQJNPIGP5js.arrayRegex; exports.assertRequest = _chunkQJNPIGP5js.assertRequest; exports.boolToBytes = _chunkQJNPIGP5js.boolToBytes; exports.boolToHex = _chunkQJNPIGP5js.boolToHex; exports.buildRequest = _chunkQJNPIGP5js.buildRequest; exports.bytesRegex = _chunkQJNPIGP5js.bytesRegex; exports.bytesToBigint = _chunkQJNPIGP5js.bytesToBigint; exports.bytesToBool = _chunkQJNPIGP5js.bytesToBool; exports.bytesToHex = _chunkQJNPIGP5js.bytesToHex; exports.bytesToNumber = _chunkQJNPIGP5js.bytesToNumber; exports.bytesToString = _chunkQJNPIGP5js.bytesToString; exports.containsNodeError = _chunkQJNPIGP5js.containsNodeError; exports.decodeAbiParameters = _chunkQJNPIGP5js.decodeAbiParameters; exports.decodeErrorResult = _chunkQJNPIGP5js.decodeErrorResult; exports.decodeEventLog = _chunkQJNPIGP5js.decodeEventLog; exports.decodeFunctionData = _chunkQJNPIGP5js.decodeFunctionData; exports.decodeFunctionResult = _chunkQJNPIGP5js.decodeFunctionResult; exports.defineBlock = _chunkQJNPIGP5js.defineBlock; exports.defineChain = _chunkQJNPIGP5js.defineChain; exports.defineFormatter = _chunkQJNPIGP5js.defineFormatter; exports.defineTransaction = _chunkQJNPIGP5js.defineTransaction; exports.defineTransactionReceipt = _chunkQJNPIGP5js.defineTransactionReceipt; exports.defineTransactionRequest = _chunkQJNPIGP5js.defineTransactionRequest; exports.encodeAbiParameters = _chunkQJNPIGP5js.encodeAbiParameters; exports.encodeDeployData = _chunkQJNPIGP5js.encodeDeployData; exports.encodeErrorResult = _chunkQJNPIGP5js.encodeErrorResult; exports.encodeEventTopics = _chunkQJNPIGP5js.encodeEventTopics; exports.encodeFunctionData = _chunkQJNPIGP5js.encodeFunctionData; exports.encodeFunctionResult = _chunkQJNPIGP5js.encodeFunctionResult; exports.encodePacked = _chunkQJNPIGP5js.encodePacked; exports.extract = _chunkQJNPIGP5js.extract; exports.extractFunctionName = _chunkQJNPIGP5js.extractFunctionName; exports.extractFunctionParams = _chunkQJNPIGP5js.extractFunctionParams; exports.extractFunctionParts = _chunkQJNPIGP5js.extractFunctionParts; exports.extractFunctionType = _chunkQJNPIGP5js.extractFunctionType; exports.format = _chunkQJNPIGP5js.format; exports.formatAbiItem = _chunkQJNPIGP5js.formatAbiItem; exports.formatAbiItemWithArgs = _chunkQJNPIGP5js.formatAbiItemWithArgs; exports.formatBlock = _chunkQJNPIGP5js.formatBlock; exports.formatEther = _chunkQJNPIGP5js.formatEther; exports.formatGwei = _chunkQJNPIGP5js.formatGwei; exports.formatTransaction = _chunkQJNPIGP5js.formatTransaction; exports.formatTransactionRequest = _chunkQJNPIGP5js.formatTransactionRequest; exports.formatUnits = _chunkQJNPIGP5js.formatUnits; exports.fromBytes = _chunkQJNPIGP5js.fromBytes; exports.fromHex = _chunkQJNPIGP5js.fromHex; exports.fromRlp = _chunkQJNPIGP5js.fromRlp; exports.getAbiItem = _chunkQJNPIGP5js.getAbiItem; exports.getAccount = _chunkQJNPIGP5js.getAccount; exports.getAddress = _chunkQJNPIGP5js.getAddress; exports.getCallError = _chunkQJNPIGP5js.getCallError; exports.getContractAddress = _chunkQJNPIGP5js.getContractAddress; exports.getContractError = _chunkQJNPIGP5js.getContractError; exports.getCreate2Address = _chunkQJNPIGP5js.getCreate2Address; exports.getCreateAddress = _chunkQJNPIGP5js.getCreateAddress; exports.getEstimateGasError = _chunkQJNPIGP5js.getEstimateGasError; exports.getEventSelector = _chunkQJNPIGP5js.getEventSelector; exports.getFunctionSelector = _chunkQJNPIGP5js.getFunctionSelector; exports.getNodeError = _chunkQJNPIGP5js.getNodeError; exports.getSocket = _chunkQJNPIGP5js.getSocket; exports.getTransactionError = _chunkQJNPIGP5js.getTransactionError; exports.hexToBigInt = _chunkQJNPIGP5js.hexToBigInt; exports.hexToBool = _chunkQJNPIGP5js.hexToBool; exports.hexToBytes = _chunkQJNPIGP5js.hexToBytes; exports.hexToNumber = _chunkQJNPIGP5js.hexToNumber; exports.hexToString = _chunkQJNPIGP5js.hexToString; exports.integerRegex = _chunkQJNPIGP5js.integerRegex; exports.isAddress = _chunkQJNPIGP5js.isAddress; exports.isAddressEqual = _chunkQJNPIGP5js.isAddressEqual; exports.isBytes = _chunkQJNPIGP5js.isBytes; exports.isHex = _chunkQJNPIGP5js.isHex; exports.keccak256 = _chunkQJNPIGP5js.keccak256; exports.numberToBytes = _chunkQJNPIGP5js.numberToBytes; exports.numberToHex = _chunkQJNPIGP5js.numberToHex; exports.pad = _chunkQJNPIGP5js.pad; exports.padBytes = _chunkQJNPIGP5js.padBytes; exports.padHex = _chunkQJNPIGP5js.padHex; exports.parseAbi = _chunkQJNPIGP5js.parseAbi; exports.parseAbiItem = _chunkQJNPIGP5js.parseAbiItem; exports.parseAbiParameter = _chunkQJNPIGP5js.parseAbiParameter; exports.parseAbiParameters = _chunkQJNPIGP5js.parseAbiParameters; exports.parseEther = _chunkQJNPIGP5js.parseEther; exports.parseGwei = _chunkQJNPIGP5js.parseGwei; exports.parseUnits = _chunkQJNPIGP5js.parseUnits; exports.prepareRequest = _chunkQJNPIGP5js.prepareRequest; exports.rpc = _chunkQJNPIGP5js.rpc; exports.size = _chunkQJNPIGP5js.size; exports.slice = _chunkQJNPIGP5js.slice; exports.sliceBytes = _chunkQJNPIGP5js.sliceBytes; exports.sliceHex = _chunkQJNPIGP5js.sliceHex; exports.stringToBytes = _chunkQJNPIGP5js.stringToBytes; exports.stringToHex = _chunkQJNPIGP5js.stringToHex; exports.stringify = _chunkQJNPIGP5js.stringify; exports.toBytes = _chunkQJNPIGP5js.toBytes; exports.toHex = _chunkQJNPIGP5js.toHex; exports.toRlp = _chunkQJNPIGP5js.toRlp; exports.transactionType = _chunkQJNPIGP5js.transactionType; exports.trim = _chunkQJNPIGP5js.trim;
//# sourceMappingURL=index.js.map

@@ -1,42 +0,7 @@

import { C as Chain, A as Address, H as Hex, B as ByteArray } from './chain-9a8c6614.js';
import { W as WalletClient } from './createWalletClient-6dbbe0ee.js';
import { a as WalletPermission, b as WatchAssetParams } from './eip1193-bbebfb3d.js';
export { F as FormattedTransactionRequest, S as SendTransactionArgs, a as SendTransactionResponse, s as sendTransaction } from './sendTransaction-50d22f3e.js';
export { bg as AddChainParameters, bh as FormattedTransactionRequest, bj as GetAddressesReturnType, bi as GetPermissionsReturnType, bk as RequestAddressesReturnType, bl as RequestPermissionsReturnType, S as SendTransactionParameters, bm as SendTransactionReturnType, bn as SignMessageParameters, bo as SignMessageReturnType, bp as SwitchChainParameters, bq as WatchAssetParameters, br as WatchAssetReturnType, b7 as addChain, b8 as getAddresses, b9 as getPermissions, ba as requestAddresses, bb as requestPermissions, bc as sendTransaction, bd as signMessage, be as switchChain, bf as watchAsset } from './createPublicClient-e2eae0fc.js';
import './chain-819c7ff7.js';
import './eip1193-a882d1b8.js';
import 'abitype';
import './createClient-a47ae6f5.js';
import '@wagmi/chains';
import './createClient-cc01b906.js';
import './transactionRequest-37f60d32.js';
declare function addChain(client: WalletClient, chain: Chain): Promise<void>;
declare function getAccounts(client: WalletClient): Promise<`0x${string}`[]>;
type GetPermissionsResponse = WalletPermission[];
declare function getPermissions(client: WalletClient): Promise<WalletPermission[]>;
declare function requestAccounts(client: WalletClient): Promise<`0x${string}`[]>;
type RequestPermissionsArgs = {
eth_accounts: Record<string, any>;
} & {
[key: string]: Record<string, any>;
};
type RequestPermissionsResponse = WalletPermission[];
declare function requestPermissions(client: WalletClient, permissions: RequestPermissionsArgs): Promise<WalletPermission[]>;
type SignMessageArgs = {
from: Address;
data: Hex | ByteArray;
};
type SignMessageResponse = Hex;
declare function signMessage(client: WalletClient, { from, data: data_ }: SignMessageArgs): Promise<SignMessageResponse>;
type SwitchChainArgs = {
id: Chain['id'];
};
declare function switchChain(client: WalletClient, { id }: SwitchChainArgs): Promise<void>;
type WatchAssetArgs = WatchAssetParams;
type WatchAssetResponse = boolean;
declare function watchAsset(client: WalletClient, params: WatchAssetParams): Promise<WatchAssetResponse>;
export { GetPermissionsResponse, RequestPermissionsResponse, SignMessageArgs, SignMessageResponse, SwitchChainArgs, WatchAssetArgs, WatchAssetResponse, addChain, getAccounts, getPermissions, requestAccounts, requestPermissions, signMessage, switchChain, watchAsset };
import 'ethers@6/types/providers';

@@ -11,4 +11,3 @@ "use strict";Object.defineProperty(exports, "__esModule", {value: true});

var _chunk4MP6LO5Vjs = require('./chunk-4MP6LO5V.js');
require('./chunk-3MFDRMZW.js');
var _chunkQJNPIGP5js = require('./chunk-QJNPIGP5.js');

@@ -24,3 +23,3 @@

exports.addChain = _chunk4MP6LO5Vjs.addChain; exports.getAccounts = _chunk4MP6LO5Vjs.getAccounts; exports.getPermissions = _chunk4MP6LO5Vjs.getPermissions; exports.requestAccounts = _chunk4MP6LO5Vjs.requestAccounts; exports.requestPermissions = _chunk4MP6LO5Vjs.requestPermissions; exports.sendTransaction = _chunk4MP6LO5Vjs.sendTransaction; exports.signMessage = _chunk4MP6LO5Vjs.signMessage; exports.switchChain = _chunk4MP6LO5Vjs.switchChain; exports.watchAsset = _chunk4MP6LO5Vjs.watchAsset;
exports.addChain = _chunkQJNPIGP5js.addChain; exports.getAddresses = _chunkQJNPIGP5js.getAddresses; exports.getPermissions = _chunkQJNPIGP5js.getPermissions; exports.requestAddresses = _chunkQJNPIGP5js.requestAddresses; exports.requestPermissions = _chunkQJNPIGP5js.requestPermissions; exports.sendTransaction = _chunkQJNPIGP5js.sendTransaction; exports.signMessage = _chunkQJNPIGP5js.signMessage; exports.switchChain = _chunkQJNPIGP5js.switchChain; exports.watchAsset = _chunkQJNPIGP5js.watchAsset;
//# sourceMappingURL=wallet.js.map

@@ -1,4 +0,6 @@

import { R as Requests, E as Events } from './eip1193-bbebfb3d.js';
import './chain-9a8c6614.js';
import { R as Requests, E as Events } from './eip1193-a882d1b8.js';
import 'abitype';
import './chain-819c7ff7.js';
import '@wagmi/chains';
import 'ethers@6/types/providers';

@@ -5,0 +7,0 @@ type WindowProvider = Requests & Events;

@@ -7,18 +7,16 @@ {

"@wagmi/chains": "~0.2.8",
"abitype": "~0.3.0",
"abitype": "~0.6.2",
"idna-uts46-hx": "^4.1.2",
"isomorphic-unfetch": "^4.0.2",
"isomorphic-ws": "^5.0.0",
"ws": "^8.12.0"
},
"version": "0.0.1-sushi.27",
"version": "0.1.0",
"files": [
"/abi",
"/dist",
"/chains",
"/contract",
"/dist",
"/ens",
"/public",
"/src",
"/test",
"/types",
"/utils",

@@ -34,2 +32,7 @@ "/wallet",

},
"./abi": {
"types": "./dist/abi.d.ts",
"module": "./dist/abi.mjs",
"default": "./dist/abi.js"
},
"./chains": {

@@ -36,0 +39,0 @@ "types": "./dist/chains.d.ts",

<p align="center">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://github.com/wagmi-dev/viem/blob/main/.github/viem-dark.svg">
<img alt="wagmi logo" src="https://github.com/wagmi-dev/viem/blob/main/.github/viem-light.svg" width="auto" height="60">
<source media="(prefers-color-scheme: dark)" srcset="https://github.com/wagmi-dev/viem/blob/main/.github/gh-logo-dark.svg">
<img alt="viem logo" src="https://github.com/wagmi-dev/viem/blob/main/.github/gh-logo-light.svg" width="auto" height="60">
</picture>

@@ -13,5 +13,135 @@ </p>

<p align="center">
<a aria-label="Version" href="https://www.npmjs.com/package/viem">
<img
alt="version"
src="https://img.shields.io/npm/v/viem?colorA=2B323B&colorB=1e2329&style=flat&label=Version"
/>
</a>
<a href="https://codecov.io/github/wagmi-dev/viem" >
<img src="https://codecov.io/github/wagmi-dev/viem/branch/main/graph/badge.svg?token=iUTN9R4Qfg"/>
</a>
<a aria-label="License" href="https://www.npmjs.com/package/viem">
<img
alt=""
src="https://img.shields.io/github/license/wagmi-dev/viem?colorA=2B323B&colorB=1e2329&style=flat&label=License"
/>
</a>
</p>
## Features
- Abstractions over the [JSON-RPC API](https://ethereum.org/en/developers/docs/apis/json-rpc/) to make your life easier
- First-class APIs for interacting with [Smart Contracts](https://ethereum.org/en/glossary/#smart-contract)
- Language closely aligned to official [Ethereum terminology](https://ethereum.org/en/glossary/)
- Import your Browser Extension, WalletConnect or Private Key Wallet
- Browser native [BigInt](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt), instead of large BigNumber libraries
- Utilities for working with [ABIs](https://ethereum.org/en/glossary/#abi) (encoding/decoding/inspection)
- TypeScript ready ([infer types](https://viem.sh/docs/typescript) from ABIs and EIP-712 Typed Data)
- First-class support for [Anvil](https://book.getfoundry.sh/) & [Hardhat](https://hardhat.org/)
- Test suite running against [forked](https://ethereum.org/en/glossary/#fork) Ethereum network
... and a lot lot more.
## Overview
```ts
// 1. Import modules.
import { createPublicClient, http } from 'viem';
import { mainnet } from 'viem/chains';
// 2. Set up your client with desired chain & transport.
const client = createPublicClient({
chain: mainnet,
transport: http(),
});
// 3. Consume an action!
const blockNumber = await client.getBlockNumber();
```
## Community
Check out the following places for more viem-related content:
- Follow [@wagmi_sh](https://twitter.com/wagmi_sh), [@jakemoxey](https://twitter.com/jakemoxey), and [@awkweb](https://twitter.com/awkweb) on Twitter for project updates
- Join the [discussions on GitHub](https://github.com/wagmi-dev/viem/discussions)
- [Share your project/organization](https://github.com/wagmi-dev/viem/discussions/104) that uses viem
## Support
- [GitHub Sponsors](https://github.com/sponsors/wagmi-dev?metadata_campaign=docs_support)
- [Gitcoin Grant](https://wagmi.sh/gitcoin)
- [wagmi-dev.eth](https://etherscan.io/enslookup-search?search=wagmi-dev.eth)
## Sponsors
<a href="https://paradigm.xyz">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/wagmi-dev/.github/main/content/sponsors/paradigm-dark.svg">
<img alt="paradigm logo" src="https://raw.githubusercontent.com/wagmi-dev/.github/main/content/sponsors/paradigm-light.svg" width="auto" height="70">
</picture>
</a>
<br>
<a href="https://twitter.com/family">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/wagmi-dev/.github/main/content/sponsors/family-dark.svg">
<img alt="family logo" src="https://raw.githubusercontent.com/wagmi-dev/.github/main/content/sponsors/family-light.svg" width="auto" height="50">
</picture>
</a>
<a href="https://twitter.com/context">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/wagmi-dev/.github/main/content/sponsors/context-dark.svg">
<img alt="context logo" src="https://raw.githubusercontent.com/wagmi-dev/.github/main/content/sponsors/context-light.svg" width="auto" height="50">
</picture>
</a>
<a href="https://walletconnect.com">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/wagmi-dev/.github/main/content/sponsors/walletconnect-dark.svg">
<img alt="WalletConnect logo" src="https://raw.githubusercontent.com/wagmi-dev/.github/main/content/sponsors/walletconnect-light.svg" width="auto" height="50">
</picture>
</a>
<a href="https://looksrare.org">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/wagmi-dev/.github/main/content/sponsors/looksrare-dark.svg">
<img alt="LooksRare logo" src="https://raw.githubusercontent.com/wagmi-dev/.github/8923685e23fe9708b74d456c3f9e7a2b90f6abd9/content/sponsors/looksrare-light.svg" width="auto" height="50">
</picture>
</a>
<a href="https://twitter.com/prtyDAO">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/wagmi-dev/.github/main/content/sponsors/partydao-dark.svg">
<img alt="PartyDAO logo" src="https://raw.githubusercontent.com/wagmi-dev/.github/main/content/sponsors/partydao-light.svg" width="auto" height="50">
</picture>
</a>
<a href="https://dynamic.xyz">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/wagmi-dev/.github/main/content/sponsors/dynamic-dark.svg">
<img alt="Dynamic logo" src="https://raw.githubusercontent.com/wagmi-dev/.github/main/content/sponsors/dynamic-light.svg" width="auto" height="50">
</picture>
</a>
<a href="https://sushi.com">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/wagmi-dev/.github/main/content/sponsors/sushi-dark.svg">
<img alt="Sushi logo" src="https://raw.githubusercontent.com/wagmi-dev/.github/main/content/sponsors/sushi-light.svg" width="auto" height="50">
</picture>
</a>
<a href="https://stripe.com">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/wagmi-dev/.github/main/content/sponsors/stripe-dark.svg">
<img alt="Stripe logo" src="https://raw.githubusercontent.com/wagmi-dev/.github/main/content/sponsors/stripe-light.svg" width="auto" height="50">
</picture>
</a>
## Contributing
If you're interested in contributing, please read the [contributing docs](/.github/CONTRIBUTING.md) **before submitting a pull request**.
## Authors
- [@jxom](https://github.com/jxom) (jxom.eth, [Twitter](https://twitter.com/jakemoxey))
- [@tmm](https://github.com/tmm) (awkweb.eth, [Twitter](https://twitter.com/awkweb))
## License
[MIT](/LICENSE) License

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc