viem 0.0.1-alpha.37 → 0.0.1-alpha.39
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/abi.d.ts +4 -3
- package/dist/abi.js +12 -2
- package/dist/abi.mjs +13 -3
- package/dist/{chain-a34aa9a2.d.ts → chain-5158a02f.d.ts} +12 -4
- package/dist/{chain-b1229232.d.ts → chain-cac82525.d.ts} +1 -1
- package/dist/chains.d.ts +3 -3
- package/dist/chains.js +46 -46
- package/dist/chains.mjs +1 -1
- package/dist/{chunk-534U2FZG.js → chunk-2KSQF3Q7.js} +120 -16
- package/dist/chunk-2KSQF3Q7.js.map +1 -0
- package/dist/{chunk-JXFHSHM6.js → chunk-ROQGAAPK.js} +21 -21
- package/dist/{chunk-AS2YWIFN.mjs → chunk-SULUCPAP.mjs} +2 -2
- package/dist/{chunk-WVZFIDQ5.mjs → chunk-X3GO6GTM.mjs} +119 -15
- package/dist/chunk-X3GO6GTM.mjs.map +1 -0
- package/dist/contract.d.ts +8 -8
- package/dist/contract.js +2 -2
- package/dist/contract.mjs +1 -1
- package/dist/{createClient-8024655d.d.ts → createClient-d2007ad2.d.ts} +2 -2
- package/dist/{createPublicClient-f283b09d.d.ts → createPublicClient-8e4c77d4.d.ts} +28 -26
- package/dist/{eip1193-a4f254d2.d.ts → eip1193-0e3a7edf.d.ts} +2 -1
- package/dist/{encodeFunctionResult-c3d6c7ea.d.ts → encodeFunctionResult-12619aad.d.ts} +1 -1
- package/dist/encodePacked-06d825cc.d.ts +12 -0
- package/dist/ens.d.ts +5 -5
- package/dist/ens.js +3 -3
- package/dist/ens.mjs +2 -2
- package/dist/{formatAbiItem-d79cb207.d.ts → formatAbiItem-786dbf93.d.ts} +1 -1
- package/dist/{getAbiItem-48e793da.d.ts → getAbiItem-82247ac8.d.ts} +1 -1
- package/dist/index.d.ts +14 -13
- package/dist/index.js +98 -88
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +12 -2
- package/dist/index.mjs.map +1 -1
- package/dist/{parseGwei-a8c67c77.d.ts → parseGwei-af6d8023.d.ts} +7 -7
- package/dist/public.d.ts +6 -6
- package/dist/public.js +2 -2
- package/dist/public.mjs +1 -1
- package/dist/{test-f8bc2fa7.d.ts → test-6103c96c.d.ts} +13 -13
- package/dist/test.d.ts +6 -6
- package/dist/test.js +2 -2
- package/dist/test.mjs +1 -1
- package/dist/utils/index.d.ts +20 -14
- package/dist/utils/index.js +18 -2
- package/dist/utils/index.mjs +17 -1
- package/dist/wallet.d.ts +5 -5
- package/dist/wallet.js +2 -2
- package/dist/wallet.mjs +1 -1
- package/dist/window.d.ts +3 -3
- package/package.json +2 -2
- package/dist/chunk-534U2FZG.js.map +0 -1
- package/dist/chunk-WVZFIDQ5.mjs.map +0 -1
- /package/dist/{chunk-JXFHSHM6.js.map → chunk-ROQGAAPK.js.map} +0 -0
- /package/dist/{chunk-AS2YWIFN.mjs.map → chunk-SULUCPAP.mjs.map} +0 -0
package/dist/contract.d.ts
CHANGED
@@ -1,10 +1,10 @@
|
|
1
|
-
|
2
|
-
export { D as
|
3
|
-
export { a as
|
4
|
-
export {
|
5
|
-
|
6
|
-
import './chain-a34aa9a2.js';
|
1
|
+
import './chain-5158a02f.js';
|
2
|
+
export { D as DecodeAbiParametersResponse, E as EncodeAbiParametersResponse, G as GetAbiItemArgs, d as decodeAbiParameters, e as encodeAbiParameters, g as getAbiItem } from './getAbiItem-82247ac8.js';
|
3
|
+
export { D as DecodeErrorResultArgs, a as DecodeErrorResultResponse, b as DecodeEventLogArgs, c as DecodeEventLogResponse, d as DecodeFunctionDataArgs, e as DecodeFunctionResultArgs, f as DecodeFunctionResultResponse, E as EncodeDeployDataArgs, g as EncodeErrorResultArgs, h as EncodeEventTopicsArgs, i as EncodeFunctionDataArgs, j as EncodeFunctionResultArgs, 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-12619aad.js';
|
4
|
+
export { a as formatAbiItem, f as formatAbiItemWithArgs } from './formatAbiItem-786dbf93.js';
|
5
|
+
export { m as CreateContractEventFilterArgs, n as CreateContractEventFilterResponse, V as DeployContractArgs, X as DeployContractResponse, o as EstimateContractGasArgs, p as EstimateContractGasResponse, G as GetBytecodeArgs, q as GetBytecodeResponse, r as GetStorageAtArgs, s as GetStorageAtResponse, M as MulticallArgs, t as MulticallResponse, O as OnLogs, u as OnLogsResponse, R as ReadContractArgs, v as ReadContractResponse, w as SimulateContractArgs, x as SimulateContractResponse, y as WatchContractEventArgs, Y as WriteContractArgs, Z as WriteContractResponse, 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-8e4c77d4.js';
|
7
6
|
import '@wagmi/chains';
|
7
|
+
import 'abitype';
|
8
8
|
import 'ethers@6/types/providers';
|
9
|
-
import './eip1193-
|
10
|
-
import './createClient-
|
9
|
+
import './eip1193-0e3a7edf.js';
|
10
|
+
import './createClient-d2007ad2.js';
|
package/dist/contract.js
CHANGED
@@ -23,7 +23,7 @@
|
|
23
23
|
|
24
24
|
|
25
25
|
|
26
|
-
var
|
26
|
+
var _chunk2KSQF3Q7js = require('./chunk-2KSQF3Q7.js');
|
27
27
|
|
28
28
|
|
29
29
|
|
@@ -49,5 +49,5 @@ var _chunk534U2FZGjs = require('./chunk-534U2FZG.js');
|
|
49
49
|
|
50
50
|
|
51
51
|
|
52
|
-
exports.createContractEventFilter =
|
52
|
+
exports.createContractEventFilter = _chunk2KSQF3Q7js.createContractEventFilter; exports.decodeAbiParameters = _chunk2KSQF3Q7js.decodeAbiParameters; exports.decodeErrorResult = _chunk2KSQF3Q7js.decodeErrorResult; exports.decodeEventLog = _chunk2KSQF3Q7js.decodeEventLog; exports.decodeFunctionData = _chunk2KSQF3Q7js.decodeFunctionData; exports.decodeFunctionResult = _chunk2KSQF3Q7js.decodeFunctionResult; exports.deployContract = _chunk2KSQF3Q7js.deployContract; exports.encodeAbiParameters = _chunk2KSQF3Q7js.encodeAbiParameters; exports.encodeDeployData = _chunk2KSQF3Q7js.encodeDeployData; exports.encodeErrorResult = _chunk2KSQF3Q7js.encodeErrorResult; exports.encodeEventTopics = _chunk2KSQF3Q7js.encodeEventTopics; exports.encodeFunctionData = _chunk2KSQF3Q7js.encodeFunctionData; exports.encodeFunctionResult = _chunk2KSQF3Q7js.encodeFunctionResult; exports.estimateContractGas = _chunk2KSQF3Q7js.estimateContractGas; exports.formatAbiItem = _chunk2KSQF3Q7js.formatAbiItem; exports.formatAbiItemWithArgs = _chunk2KSQF3Q7js.formatAbiItemWithArgs; exports.getAbiItem = _chunk2KSQF3Q7js.getAbiItem; exports.getBytecode = _chunk2KSQF3Q7js.getBytecode; exports.getStorageAt = _chunk2KSQF3Q7js.getStorageAt; exports.multicall = _chunk2KSQF3Q7js.multicall; exports.readContract = _chunk2KSQF3Q7js.readContract; exports.simulateContract = _chunk2KSQF3Q7js.simulateContract; exports.watchContractEvent = _chunk2KSQF3Q7js.watchContractEvent; exports.writeContract = _chunk2KSQF3Q7js.writeContract;
|
53
53
|
//# sourceMappingURL=contract.js.map
|
package/dist/contract.mjs
CHANGED
@@ -1,5 +1,5 @@
|
|
1
|
-
import {
|
2
|
-
import {
|
1
|
+
import { C as Chain } from './chain-5158a02f.js';
|
2
|
+
import { R as Requests } from './eip1193-0e3a7edf.js';
|
3
3
|
|
4
4
|
type BaseRpcRequests = {
|
5
5
|
request(...args: any): Promise<any>;
|
@@ -1,7 +1,7 @@
|
|
1
|
-
import { W as WalletPermission, a as WatchAssetParams, P as PublicRequests } from './eip1193-
|
2
|
-
import { a as Transport, b as ClientConfig, C as Client } from './createClient-
|
1
|
+
import { W as WalletPermission, a as WatchAssetParams, P as PublicRequests } from './eip1193-0e3a7edf.js';
|
2
|
+
import { a as Transport, b as ClientConfig, C as Client } from './createClient-d2007ad2.js';
|
3
|
+
import { C as Chain, I as ExtractFormatter, Q as Formatters, S as Formatter, J as Formatted, c as Block, R as RpcBlock, y as Transaction, T as TransactionReceipt, q as RpcTransactionReceipt, V as TransactionType, r as RpcTransactionRequest, t as TransactionRequest, f as BlockTag, H as Hex, W as MergeIntersectionProperties, X as ExtractConstructorArgsFromAbi, a as Hash, Y as GetValue, g as ContractConfig, Z as ExtractResultFromAbi, _ as MaybeAbiEventName, $ as MaybeExtractEventArgsFromAbi, e as BlockNumber, a0 as ExtractEventNameFromAbi, F as FeeHistory, L as Log, K as FormattedTransaction, M as TransactionFormatter, a1 as ExtractEventArgsFromAbi, a2 as Prettify } from './chain-5158a02f.js';
|
3
4
|
import { Abi, Narrow, Address, AbiEvent, ExtractAbiEvent } from 'abitype';
|
4
|
-
import { C as Chain, J as ExtractFormatter, S as Formatters, V as Formatter, K as Formatted, d as Block, R as RpcBlock, z as Transaction, T as TransactionReceipt, r as RpcTransactionReceipt, W as TransactionType, s as RpcTransactionRequest, u as TransactionRequest, g as BlockTag, H as Hex, X as MergeIntersectionProperties, Y as ExtractConstructorArgsFromAbi, a as Hash, Z as GetValue, h as ContractConfig, _ as ExtractResultFromAbi, $ as MaybeAbiEventName, a0 as MaybeExtractEventArgsFromAbi, c as Address$1, f as BlockNumber, a1 as ExtractEventNameFromAbi, F as FeeHistory, L as Log, M as FormattedTransaction, N as TransactionFormatter, a2 as ExtractEventArgsFromAbi, a3 as Prettify } from './chain-a34aa9a2.js';
|
5
5
|
|
6
6
|
type BlockFormatter<TChain extends Chain = Chain> = ExtractFormatter<TChain, 'block', NonNullable<Formatters['block']>>;
|
7
7
|
type FormattedBlock<TFormatter extends Formatter | undefined = Formatter> = Formatted<TFormatter, Block>;
|
@@ -122,14 +122,16 @@ type WriteContractArgs<TChain extends Chain = Chain, TAbi extends Abi | readonly
|
|
122
122
|
type WriteContractResponse = SendTransactionResponse;
|
123
123
|
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>;
|
124
124
|
|
125
|
-
type SimulateContractArgs<TChain extends Chain = Chain, TAbi extends Abi | readonly unknown[] = Abi, TFunctionName extends string = any> = Omit<CallArgs<TChain>, 'to' | 'data' | 'value'> &
|
125
|
+
type SimulateContractArgs<TChain extends Chain = Chain, TAbi extends Abi | readonly unknown[] = Abi, TFunctionName extends string = any, TChainOverride extends Chain | undefined = undefined> = Omit<CallArgs<TChainOverride extends Chain ? TChainOverride : TChain>, 'to' | 'data' | 'value'> & {
|
126
|
+
chain?: TChainOverride;
|
127
|
+
} & ContractConfig<TAbi, TFunctionName, 'payable' | 'nonpayable'> & {
|
126
128
|
value?: GetValue<TAbi, TFunctionName, CallArgs<TChain>['value']>;
|
127
129
|
};
|
128
130
|
type SimulateContractResponse<TChain extends Chain = Chain, TAbi extends Abi | readonly unknown[] = Abi, TFunctionName extends string = string> = {
|
129
131
|
result: ExtractResultFromAbi<TAbi, TFunctionName>;
|
130
132
|
request: WriteContractArgs<TChain, TAbi, TFunctionName> & ContractConfig<TAbi, TFunctionName, 'payable' | 'nonpayable'>;
|
131
133
|
};
|
132
|
-
declare function simulateContract<TChain extends Chain, TAbi extends Abi | readonly unknown[], TFunctionName extends string>(client: PublicClient<any, TChain>, { abi, address, args, functionName, ...callRequest }: SimulateContractArgs<TChain, TAbi, TFunctionName>): Promise<SimulateContractResponse<TChain, TAbi, TFunctionName>>;
|
134
|
+
declare function simulateContract<TChain extends Chain, TAbi extends Abi | readonly unknown[], TFunctionName extends string, TChainOverride extends Chain | undefined>(client: PublicClient<any, TChain>, { abi, address, args, functionName, ...callRequest }: SimulateContractArgs<TChain, TAbi, TFunctionName, TChainOverride>): Promise<SimulateContractResponse<TChainOverride extends Chain ? TChainOverride : TChain, TAbi, TFunctionName>>;
|
133
135
|
|
134
136
|
type CreatePendingTransactionFilterResponse = Filter<'transaction'>;
|
135
137
|
declare function createPendingTransactionFilter(client: PublicClient): Promise<CreatePendingTransactionFilterResponse>;
|
@@ -138,7 +140,7 @@ type CreateBlockFilterResponse = Filter<'block'>;
|
|
138
140
|
declare function createBlockFilter(client: PublicClient): Promise<CreateBlockFilterResponse>;
|
139
141
|
|
140
142
|
type CreateEventFilterArgs<TAbiEvent extends AbiEvent | undefined = undefined, TAbi extends Abi | readonly unknown[] = [TAbiEvent], TEventName extends string | undefined = MaybeAbiEventName<TAbiEvent>, TArgs extends MaybeExtractEventArgsFromAbi<TAbi, TEventName> | undefined = undefined> = {
|
141
|
-
address?: Address
|
143
|
+
address?: Address | Address[];
|
142
144
|
fromBlock?: BlockNumber | BlockTag;
|
143
145
|
toBlock?: BlockNumber | BlockTag;
|
144
146
|
} & (MaybeExtractEventArgsFromAbi<TAbi, TEventName> extends infer TEventFilterArgs ? {
|
@@ -158,7 +160,7 @@ type CreateEventFilterResponse<TAbiEvent extends AbiEvent | undefined = undefine
|
|
158
160
|
declare function createEventFilter<TAbiEvent extends AbiEvent | undefined, TAbi extends Abi | readonly unknown[] = [TAbiEvent], TEventName extends string | undefined = MaybeAbiEventName<TAbiEvent>, TArgs extends MaybeExtractEventArgsFromAbi<TAbi, TEventName> | undefined = undefined>(client: PublicClient, { address, args, event, fromBlock, toBlock, }?: CreateEventFilterArgs<TAbiEvent, TAbi, TEventName, TArgs>): Promise<CreateEventFilterResponse<TAbiEvent, TAbi, TEventName, TArgs>>;
|
159
161
|
|
160
162
|
type CreateContractEventFilterArgs<TAbi extends Abi | readonly unknown[] = Abi, TEventName extends string | undefined = undefined, TArgs extends MaybeExtractEventArgsFromAbi<TAbi, TEventName> | undefined = undefined> = {
|
161
|
-
address?: Address
|
163
|
+
address?: Address | Address[];
|
162
164
|
abi: Narrow<TAbi>;
|
163
165
|
eventName?: ExtractEventNameFromAbi<TAbi, TEventName>;
|
164
166
|
fromBlock?: BlockNumber | BlockTag;
|
@@ -199,7 +201,7 @@ declare function estimateContractGas<TChain extends Chain, TAbi extends Abi | re
|
|
199
201
|
|
200
202
|
type GetBalanceArgs = {
|
201
203
|
/** The address of the account. */
|
202
|
-
address: Address
|
204
|
+
address: Address;
|
203
205
|
} & ({
|
204
206
|
/** The balance of the account at a block number. */
|
205
207
|
blockNumber?: bigint;
|
@@ -289,7 +291,7 @@ type GetBlockTransactionCountResponse = number;
|
|
289
291
|
declare function getBlockTransactionCount<TChain extends Chain>(client: PublicClient<any, TChain>, { blockHash, blockNumber, blockTag, }?: GetBlockTransactionCountArgs): Promise<GetBlockTransactionCountResponse>;
|
290
292
|
|
291
293
|
type GetBytecodeArgs = {
|
292
|
-
address: Address
|
294
|
+
address: Address;
|
293
295
|
} & ({
|
294
296
|
blockNumber?: never;
|
295
297
|
blockTag?: BlockTag;
|
@@ -336,7 +338,7 @@ declare function getGasPrice(client: PublicClient | WalletClient): Promise<GetGa
|
|
336
338
|
|
337
339
|
type GetLogsArgs<TAbiEvent extends AbiEvent | undefined = undefined, TEventName extends string | undefined = MaybeAbiEventName<TAbiEvent>> = {
|
338
340
|
/** Address or list of addresses from which logs originated */
|
339
|
-
address?: Address
|
341
|
+
address?: Address | Address[];
|
340
342
|
} & ({
|
341
343
|
event: TAbiEvent;
|
342
344
|
args?: MaybeExtractEventArgsFromAbi<[TAbiEvent], TEventName>;
|
@@ -362,7 +364,7 @@ type GetLogsResponse<TAbiEvent extends AbiEvent | undefined = undefined, TEventN
|
|
362
364
|
declare function getLogs<TAbiEvent extends AbiEvent | undefined>(client: PublicClient, { address, blockHash, fromBlock, toBlock, event, args, }?: GetLogsArgs<TAbiEvent>): Promise<GetLogsResponse<TAbiEvent>>;
|
363
365
|
|
364
366
|
type GetStorageAtArgs = {
|
365
|
-
address: Address
|
367
|
+
address: Address;
|
366
368
|
slot: Hex;
|
367
369
|
} & ({
|
368
370
|
blockNumber?: never;
|
@@ -474,7 +476,7 @@ type MulticallResults<TContracts extends Contract[], TAllowFailure extends boole
|
|
474
476
|
type MulticallArgs<TContracts extends ContractConfig[] = ContractConfig[], TAllowFailure extends boolean = true> = Pick<CallArgs, 'blockNumber' | 'blockTag'> & {
|
475
477
|
allowFailure?: TAllowFailure;
|
476
478
|
contracts: readonly [...MulticallContracts<TContracts>];
|
477
|
-
multicallAddress: Address
|
479
|
+
multicallAddress: Address;
|
478
480
|
};
|
479
481
|
type MulticallResponse<TContracts extends ContractConfig[] = ContractConfig[], TAllowFailure extends boolean = true> = MulticallResults<TContracts, TAllowFailure>;
|
480
482
|
declare function multicall<TContracts extends ContractConfig[], TAllowFailure extends boolean = true>(client: PublicClient, args: MulticallArgs<TContracts, TAllowFailure>): Promise<MulticallResponse<TContracts, TAllowFailure>>;
|
@@ -558,7 +560,7 @@ type OnLogsResponse$1<TAbi extends Abi | readonly unknown[] = readonly unknown[]
|
|
558
560
|
type OnLogs$1<TAbi extends Abi | readonly unknown[] = readonly unknown[], TEventName extends string = string> = (logs: OnLogsResponse$1<TAbi, TEventName>) => void;
|
559
561
|
type WatchContractEventArgs<TAbi extends Abi | readonly unknown[] = readonly unknown[], TEventName extends string = string> = {
|
560
562
|
/** The address of the contract. */
|
561
|
-
address?: Address
|
563
|
+
address?: Address | Address[];
|
562
564
|
/** Contract ABI. */
|
563
565
|
abi: Narrow<TAbi>;
|
564
566
|
args?: ExtractEventArgsFromAbi<TAbi, TEventName>;
|
@@ -579,7 +581,7 @@ type OnLogsResponse<TAbiEvent extends AbiEvent | undefined = undefined, TEventNa
|
|
579
581
|
type OnLogs<TAbiEvent extends AbiEvent | undefined = undefined, TEventName extends string | undefined = MaybeAbiEventName<TAbiEvent>> = (logs: OnLogsResponse<TAbiEvent, TEventName>) => void;
|
580
582
|
type WatchEventArgs<TAbiEvent extends AbiEvent | undefined = undefined, TEventName extends string | undefined = MaybeAbiEventName<TAbiEvent>> = {
|
581
583
|
/** The address of the contract. */
|
582
|
-
address?: Address
|
584
|
+
address?: Address | Address[];
|
583
585
|
/** Whether or not the event logs should be batched on each invocation. */
|
584
586
|
batch?: boolean;
|
585
587
|
/** The callback to call when an error occurred when trying to get for a new block. */
|
@@ -611,19 +613,19 @@ type WatchPendingTransactionsArgs = {
|
|
611
613
|
};
|
612
614
|
declare function watchPendingTransactions(client: PublicClient, { batch, onError, onTransactions, pollingInterval, }: WatchPendingTransactionsArgs): () => void;
|
613
615
|
|
614
|
-
type Account = JsonRpcAccount |
|
616
|
+
type Account = JsonRpcAccount | LocalAccount;
|
615
617
|
type JsonRpcAccount = {
|
616
|
-
address: Address
|
618
|
+
address: Address;
|
617
619
|
type: 'json-rpc';
|
618
620
|
};
|
619
|
-
type
|
620
|
-
address: Address
|
621
|
+
type LocalAccount = {
|
622
|
+
address: Address;
|
621
623
|
signMessage: (message: string) => Promise<Hash>;
|
622
624
|
signTransaction: (transaction: Omit<TransactionRequest, 'from'> & {
|
623
625
|
chainId: number;
|
624
|
-
from: Address
|
626
|
+
from: Address;
|
625
627
|
}) => Promise<Hash>;
|
626
|
-
type: '
|
628
|
+
type: 'local';
|
627
629
|
};
|
628
630
|
|
629
631
|
type FilterType = 'transaction' | 'block' | 'event';
|
@@ -652,9 +654,9 @@ type GetEnsAddressArgs = Prettify<Pick<ReadContractArgs, 'blockNumber' | 'blockT
|
|
652
654
|
/** ENS name to get address. */
|
653
655
|
name: string;
|
654
656
|
/** Address of ENS Universal Resolver Contract */
|
655
|
-
universalResolverAddress?: Address
|
657
|
+
universalResolverAddress?: Address;
|
656
658
|
}>;
|
657
|
-
type GetEnsAddressResponse = Address
|
659
|
+
type GetEnsAddressResponse = Address;
|
658
660
|
/**
|
659
661
|
* @description Gets address for ENS name.
|
660
662
|
*
|
@@ -670,9 +672,9 @@ declare function getEnsAddress(client: PublicClient, { blockNumber, blockTag, na
|
|
670
672
|
|
671
673
|
type GetEnsNameArgs = Prettify<Pick<ReadContractArgs, 'blockNumber' | 'blockTag'> & {
|
672
674
|
/** Address to get ENS name for. */
|
673
|
-
address: Address
|
675
|
+
address: Address;
|
674
676
|
/** Address of ENS Universal Resolver Contract. */
|
675
|
-
universalResolverAddress?: Address
|
677
|
+
universalResolverAddress?: Address;
|
676
678
|
}>;
|
677
679
|
type GetEnsNameResponse = string | null;
|
678
680
|
/**
|
@@ -715,7 +717,7 @@ type PublicActions<TChain extends Chain = Chain> = {
|
|
715
717
|
getTransactionReceipt: (args: GetTransactionReceiptArgs) => Promise<GetTransactionReceiptResponse<TChain>>;
|
716
718
|
multicall: <TContracts extends ContractConfig[], TAllowFailure extends boolean = true>(args: MulticallArgs<TContracts, TAllowFailure>) => Promise<MulticallResponse<TContracts, TAllowFailure>>;
|
717
719
|
readContract: <TAbi extends Abi | readonly unknown[], TFunctionName extends string>(args: ReadContractArgs<TAbi, TFunctionName>) => Promise<ReadContractResponse>;
|
718
|
-
simulateContract: <TAbi extends Abi | readonly unknown[] = Abi, TFunctionName extends string = any>(args: SimulateContractArgs<TChain, TAbi, TFunctionName>) => Promise<SimulateContractResponse<TChain, TAbi, TFunctionName>>;
|
720
|
+
simulateContract: <TAbi extends Abi | readonly unknown[] = Abi, TFunctionName extends string = any, TChainOverride extends Chain | undefined = undefined>(args: SimulateContractArgs<TChain, TAbi, TFunctionName, TChainOverride>) => Promise<SimulateContractResponse<TChainOverride extends Chain ? TChainOverride : TChain, TAbi, TFunctionName>>;
|
719
721
|
uninstallFilter: (args: UninstallFilterArgs) => Promise<UninstallFilterResponse>;
|
720
722
|
waitForTransactionReceipt: (args: WaitForTransactionReceiptArgs<TChain>) => Promise<WaitForTransactionReceiptResponse<TChain>>;
|
721
723
|
watchBlockNumber: (args: WatchBlockNumberArgs) => ReturnType<typeof watchBlockNumber>;
|
@@ -763,4 +765,4 @@ type PublicClient<TTransport extends Transport = Transport, TChain extends Chain
|
|
763
765
|
*/
|
764
766
|
declare function createPublicClient<TTransport extends Transport, TChain extends Chain>({ chain, key, name, transport, pollingInterval, }: PublicClientConfig<TTransport, TChain>): PublicClient<TTransport, TChain, true>;
|
765
767
|
|
766
|
-
export {
|
768
|
+
export { writeContract as $, Account as A, BlockFormatter as B, CallArgs as C, estimateContractGas as D, EstimateGasArgs as E, FormattedBlock as F, GetBytecodeArgs as G, getBytecode as H, getStorageAt as I, JsonRpcAccount as J, multicall as K, LocalAccount as L, MulticallArgs as M, readContract as N, OnLogs as O, PublicClient as P, simulateContract as Q, ReadContractArgs as R, SendTransactionArgs as S, TransactionReceiptFormatter as T, watchContractEvent as U, DeployContractArgs as V, WalletClient as W, DeployContractResponse as X, WriteContractArgs as Y, WriteContractResponse as Z, deployContract as _, PublicClientConfig as a, ReplacementResponse as a$, GetEnsAddressArgs as a0, GetEnsNameArgs as a1, getEnsAddress as a2, getEnsName as a3, call as a4, createBlockFilter as a5, createEventFilter as a6, createPendingTransactionFilter as a7, estimateGas as a8, getBalance as a9, GetBalanceResponse as aA, GetBlockArgs as aB, GetBlockNumberArgs as aC, GetBlockNumberResponse as aD, GetBlockResponse as aE, GetBlockTransactionCountArgs as aF, GetBlockTransactionCountResponse as aG, GetFeeHistoryArgs as aH, GetFeeHistoryResponse as aI, GetFilterChangesArgs as aJ, GetFilterChangesResponse as aK, GetFilterLogsArgs as aL, GetFilterLogsResponse as aM, GetGasPriceResponse as aN, GetTransactionArgs as aO, GetTransactionConfirmationsArgs as aP, GetTransactionConfirmationsResponse as aQ, GetTransactionReceiptArgs as aR, GetTransactionReceiptResponse as aS, GetTransactionResponse as aT, OnBlock as aU, OnBlockNumber as aV, OnBlockNumberResponse as aW, OnBlockResponse as aX, OnTransactions as aY, OnTransactionsResponse as aZ, ReplacementReason as a_, getBlock as aa, getBlockNumber as ab, getBlockNumberCache as ac, getBlockTransactionCount as ad, getChainId as ae, getFeeHistory as af, getFilterChanges as ag, getFilterLogs as ah, getLogs as ai, getGasPrice as aj, getTransaction as ak, getTransactionConfirmations as al, getTransactionReceipt as am, uninstallFilter as an, waitForTransactionReceipt as ao, watchBlockNumber as ap, watchBlocks as aq, watchEvent as ar, watchPendingTransactions as as, CallResponse as at, CreateBlockFilterResponse as au, CreateEventFilterArgs as av, CreateEventFilterResponse as aw, CreatePendingTransactionFilterResponse as ax, EstimateGasResponse as ay, GetBalanceArgs as az, WalletClientConfig as b, UninstallFilterArgs as b0, UninstallFilterResponse as b1, WaitForTransactionReceiptArgs as b2, WaitForTransactionReceiptResponse as b3, WatchBlockNumberArgs as b4, WatchBlocksArgs as b5, WatchPendingTransactionsArgs as b6, addChain as b7, getAddresses as b8, getPermissions as b9, requestAddresses as ba, requestPermissions as bb, sendTransaction as bc, signMessage as bd, switchChain as be, watchAsset as bf, AddChainArgs as bg, FormattedTransactionRequest as bh, GetPermissionsResponse as bi, GetAddressesResponse as bj, RequestAddressesResponse as bk, RequestPermissionsResponse as bl, SendTransactionResponse as bm, SignMessageArgs as bn, SignMessageResponse as bo, SwitchChainArgs as bp, WatchAssetArgs as bq, WatchAssetResponse as br, createPublicClient as c, createWalletClient as d, FormattedTransactionReceipt as e, FormattedTransactionRequest$1 as f, TransactionRequestFormatter as g, defineBlock as h, defineTransactionReceipt as i, defineTransactionRequest as j, formatBlock as k, formatTransactionRequest as l, CreateContractEventFilterArgs as m, CreateContractEventFilterResponse as n, EstimateContractGasArgs as o, EstimateContractGasResponse as p, GetBytecodeResponse as q, GetStorageAtArgs as r, GetStorageAtResponse as s, MulticallResponse as t, OnLogsResponse as u, ReadContractResponse as v, SimulateContractArgs as w, SimulateContractResponse as x, WatchContractEventArgs as y, createContractEventFilter as z };
|
@@ -1,4 +1,5 @@
|
|
1
|
-
import {
|
1
|
+
import { Address } from 'abitype';
|
2
|
+
import { a as Hash, a3 as Quantity, r as RpcTransactionRequest, l as RpcBlockNumber, f as BlockTag, k as RpcBlockIdentifier, H as Hex, m as RpcFeeHistory, R as RpcBlock, o as RpcLog, a7 as LogTopic, p as RpcTransaction, q as RpcTransactionReceipt, s as RpcUncle } from './chain-5158a02f.js';
|
2
3
|
|
3
4
|
declare class RpcError extends Error {
|
4
5
|
code: number;
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { Abi, Narrow } from 'abitype';
|
2
|
-
import { H as Hex, A as AbiItem,
|
2
|
+
import { H as Hex, A as AbiItem, a7 as LogTopic, a0 as ExtractEventNameFromAbi, a8 as ExtractEventArgsFromTopics, a9 as ExtractFunctionNameFromAbi, a6 as ExtractArgsFromAbi, Z as ExtractResultFromAbi, X as ExtractConstructorArgsFromAbi, aa as ExtractErrorNameFromAbi, ab as ExtractErrorArgsFromAbi, a1 as ExtractEventArgsFromAbi } from './chain-5158a02f.js';
|
3
3
|
|
4
4
|
type DecodeErrorResultArgs = {
|
5
5
|
abi?: Abi;
|
@@ -0,0 +1,12 @@
|
|
1
|
+
import { Narrow, SolidityAddress, SolidityBool, SolidityBytes, SolidityInt, SolidityString, SolidityArrayWithoutTuple, AbiType, AbiParameterToPrimitiveType } from 'abitype';
|
2
|
+
import { H as Hex } from './chain-5158a02f.js';
|
3
|
+
|
4
|
+
type PackedAbiType = SolidityAddress | SolidityBool | SolidityBytes | SolidityInt | SolidityString | SolidityArrayWithoutTuple;
|
5
|
+
type EncodePackedValues<TPackedAbiTypes extends PackedAbiType[] | unknown[]> = {
|
6
|
+
[K in keyof TPackedAbiTypes]: TPackedAbiTypes[K] extends AbiType ? AbiParameterToPrimitiveType<{
|
7
|
+
type: TPackedAbiTypes[K];
|
8
|
+
}> : unknown;
|
9
|
+
};
|
10
|
+
declare function encodePacked<TPackedAbiTypes extends PackedAbiType[] | unknown[]>(types: Narrow<TPackedAbiTypes>, values: EncodePackedValues<TPackedAbiTypes>): Hex;
|
11
|
+
|
12
|
+
export { encodePacked as e };
|
package/dist/ens.d.ts
CHANGED
@@ -1,11 +1,11 @@
|
|
1
|
-
export {
|
1
|
+
export { a0 as GetEnsAddressArgs, a1 as GetEnsNameArgs, a2 as getEnsAddress, a3 as getEnsName } from './createPublicClient-8e4c77d4.js';
|
2
2
|
export { l as labelhash, n as namehash } from './namehash-88f4639d.js';
|
3
|
-
import './
|
4
|
-
import './
|
5
|
-
import '@wagmi/chains';
|
3
|
+
import './chain-5158a02f.js';
|
4
|
+
import './eip1193-0e3a7edf.js';
|
6
5
|
import 'abitype';
|
6
|
+
import './createClient-d2007ad2.js';
|
7
|
+
import '@wagmi/chains';
|
7
8
|
import 'ethers@6/types/providers';
|
8
|
-
import './createClient-8024655d.js';
|
9
9
|
|
10
10
|
/**
|
11
11
|
* @description Normalizes ENS name
|
package/dist/ens.js
CHANGED
@@ -3,8 +3,8 @@
|
|
3
3
|
|
4
4
|
|
5
5
|
|
6
|
-
var
|
7
|
-
require('./chunk-
|
6
|
+
var _chunkROQGAAPKjs = require('./chunk-ROQGAAPK.js');
|
7
|
+
require('./chunk-2KSQF3Q7.js');
|
8
8
|
|
9
9
|
// src/utils/ens/normalize.ts
|
10
10
|
var _idnauts46hx = require('idna-uts46-hx');
|
@@ -17,5 +17,5 @@ function normalize(name) {
|
|
17
17
|
|
18
18
|
|
19
19
|
|
20
|
-
exports.getEnsAddress =
|
20
|
+
exports.getEnsAddress = _chunkROQGAAPKjs.getEnsAddress; exports.getEnsName = _chunkROQGAAPKjs.getEnsName; exports.labelhash = _chunkROQGAAPKjs.labelhash; exports.namehash = _chunkROQGAAPKjs.namehash; exports.normalize = normalize;
|
21
21
|
//# sourceMappingURL=ens.js.map
|
package/dist/ens.mjs
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
import { AbiParameter, AbiParametersToPrimitiveTypes, Narrow, Abi } from 'abitype';
|
2
|
-
import { H as Hex,
|
2
|
+
import { H as Hex, a5 as ExtractNameFromAbi, a6 as ExtractArgsFromAbi } from './chain-5158a02f.js';
|
3
3
|
|
4
4
|
type DecodeAbiParametersResponse<TParams extends readonly AbiParameter[] | readonly unknown[] = readonly AbiParameter[]> = AbiParametersToPrimitiveTypes<TParams extends readonly AbiParameter[] ? TParams : AbiParameter[]>;
|
5
5
|
declare function decodeAbiParameters<TParams extends readonly AbiParameter[] | readonly unknown[]>(params: Narrow<TParams>, data: Hex): DecodeAbiParametersResponse<TParams>;
|
package/dist/index.d.ts
CHANGED
@@ -1,18 +1,19 @@
|
|
1
|
-
import { T as TransportConfig, a as Transport, B as BaseRpcRequests } from './createClient-
|
2
|
-
export { C as Client, b as ClientConfig, a as Transport, T as TransportConfig, c as createClient, d as createTransport } from './createClient-
|
3
|
-
import {
|
4
|
-
export {
|
1
|
+
import { T as TransportConfig, a as Transport, B as BaseRpcRequests } from './createClient-d2007ad2.js';
|
2
|
+
export { C as Client, b as ClientConfig, a as Transport, T as TransportConfig, c as createClient, d as createTransport } from './createClient-d2007ad2.js';
|
3
|
+
import { H as Hex, a as Hash, C as Chain, B as ByteArray } from './chain-5158a02f.js';
|
4
|
+
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-5158a02f.js';
|
5
|
+
import { B as BaseError, H as HttpOptions, R as RpcResponse } from './parseGwei-af6d8023.js';
|
6
|
+
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 ToRlpResponse, 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-af6d8023.js';
|
5
7
|
import WebSocket from 'isomorphic-ws';
|
6
|
-
|
7
|
-
export {
|
8
|
-
export {
|
9
|
-
export { T as TestClient, a as TestClientConfig, c as createTestClient } from './test-f8bc2fa7.js';
|
8
|
+
export { A as Account, B as BlockFormatter, F as FormattedBlock, e as FormattedTransactionReceipt, f as FormattedTransactionRequest, J as JsonRpcAccount, L as LocalAccount, P as PublicClient, a as PublicClientConfig, T as TransactionReceiptFormatter, g as TransactionRequestFormatter, W as WalletClient, b as WalletClientConfig, c as createPublicClient, d as createWalletClient, h as defineBlock, i as defineTransactionReceipt, j as defineTransactionRequest, k as formatBlock, l as formatTransactionRequest } from './createPublicClient-8e4c77d4.js';
|
9
|
+
export { T as TestClient, a as TestClientConfig, c as createTestClient } from './test-6103c96c.js';
|
10
|
+
export { Address, ParseAbi, ParseAbiItem, ParseAbiParameter, ParseAbiParameters, parseAbi, parseAbiItem, parseAbiParameter, parseAbiParameters } from 'abitype';
|
10
11
|
export { l as labelhash, n as namehash } from './namehash-88f4639d.js';
|
11
|
-
export { D as DecodeAbiParametersResponse, E as EncodeAbiParametersResponse, G as GetAbiItemArgs, d as decodeAbiParameters, e as encodeAbiParameters, g as getAbiItem } from './getAbiItem-
|
12
|
-
export { D as DecodeErrorResultArgs, a as DecodeErrorResultResponse, b as DecodeEventLogArgs, c as DecodeEventLogResponse, d as DecodeFunctionDataArgs, e as DecodeFunctionResultArgs, f as DecodeFunctionResultResponse, E as EncodeDeployDataArgs, g as EncodeErrorResultArgs, h as EncodeEventTopicsArgs, i as EncodeFunctionDataArgs, j as EncodeFunctionResultArgs, 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-
|
13
|
-
export {
|
14
|
-
|
15
|
-
import '
|
12
|
+
export { D as DecodeAbiParametersResponse, E as EncodeAbiParametersResponse, G as GetAbiItemArgs, d as decodeAbiParameters, e as encodeAbiParameters, g as getAbiItem } from './getAbiItem-82247ac8.js';
|
13
|
+
export { D as DecodeErrorResultArgs, a as DecodeErrorResultResponse, b as DecodeEventLogArgs, c as DecodeEventLogResponse, d as DecodeFunctionDataArgs, e as DecodeFunctionResultArgs, f as DecodeFunctionResultResponse, E as EncodeDeployDataArgs, g as EncodeErrorResultArgs, h as EncodeEventTopicsArgs, i as EncodeFunctionDataArgs, j as EncodeFunctionResultArgs, 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-12619aad.js';
|
14
|
+
export { e as encodePacked } from './encodePacked-06d825cc.js';
|
15
|
+
export { d as defineChain } from './chain-cac82525.js';
|
16
|
+
import './eip1193-0e3a7edf.js';
|
16
17
|
import '@wagmi/chains';
|
17
18
|
import 'ethers@6/types/providers';
|
18
19
|
|