viem 0.0.1-alpha.35 → 0.0.1-alpha.36
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/README.md +132 -0
- package/dist/abi.d.ts +2 -2
- package/dist/abi.js +2 -2
- package/dist/abi.mjs +1 -1
- package/dist/{chain-7b7ac245.d.ts → chain-a34aa9a2.d.ts} +65 -63
- package/dist/{chain-145cfaf3.d.ts → chain-b1229232.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-57YM6E7I.js → chunk-4AEFOF5R.js} +21 -23
- package/dist/chunk-4AEFOF5R.js.map +1 -0
- package/dist/{chunk-PBW4YL37.mjs → chunk-AXATFOBJ.mjs} +1835 -140
- package/dist/chunk-AXATFOBJ.mjs.map +1 -0
- package/dist/{chunk-5NDMORWZ.mjs → chunk-CUT73KXY.mjs} +3 -5
- package/dist/{chunk-5NDMORWZ.mjs.map → chunk-CUT73KXY.mjs.map} +1 -1
- package/dist/{chunk-HQCSH22G.js → chunk-KXGQFW2R.js} +1824 -129
- package/dist/chunk-KXGQFW2R.js.map +1 -0
- package/dist/contract.d.ts +7 -7
- package/dist/contract.js +2 -6
- package/dist/contract.mjs +11 -15
- package/dist/{createClient-7c715e2c.d.ts → createClient-8024655d.d.ts} +3 -11
- package/dist/{createPublicClient-4d24afb2.d.ts → createPublicClient-f283b09d.d.ts} +62 -59
- package/dist/{eip1193-d538ae6d.d.ts → eip1193-a4f254d2.d.ts} +2 -2
- package/dist/{encodeFunctionResult-f59f4cfe.d.ts → encodeFunctionResult-c3d6c7ea.d.ts} +1 -1
- package/dist/ens.d.ts +4 -4
- package/dist/ens.js +3 -4
- package/dist/ens.js.map +1 -1
- package/dist/ens.mjs +2 -3
- package/dist/ens.mjs.map +1 -1
- package/dist/{formatAbiItem-89d97367.d.ts → formatAbiItem-d79cb207.d.ts} +1 -1
- package/dist/{getAbiItem-c9cbc8b8.d.ts → getAbiItem-48e793da.d.ts} +1 -1
- package/dist/index.d.ts +27 -16
- package/dist/index.js +89 -93
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +78 -82
- package/dist/index.mjs.map +1 -1
- package/dist/{parseGwei-ad6d1914.d.ts → parseGwei-5dc2744d.d.ts} +9 -20
- package/dist/public.d.ts +6 -6
- package/dist/public.js +2 -3
- package/dist/public.mjs +1 -2
- package/dist/{test-8646fb50.d.ts → test-f8bc2fa7.d.ts} +3 -11
- package/dist/test.d.ts +5 -5
- package/dist/test.js +2 -3
- package/dist/test.mjs +1 -2
- package/dist/utils/index.d.ts +27 -16
- package/dist/utils/index.js +2 -4
- package/dist/utils/index.mjs +7 -9
- package/dist/wallet.d.ts +4 -4
- package/dist/wallet.js +2 -4
- package/dist/wallet.mjs +5 -7
- package/dist/window.d.ts +2 -2
- package/package.json +1 -1
- package/dist/chunk-3FT7UKPT.js +0 -1216
- package/dist/chunk-3FT7UKPT.js.map +0 -1
- package/dist/chunk-57YM6E7I.js.map +0 -1
- package/dist/chunk-A665BF7O.js +0 -205
- package/dist/chunk-A665BF7O.js.map +0 -1
- package/dist/chunk-HQCSH22G.js.map +0 -1
- package/dist/chunk-PBW4YL37.mjs.map +0 -1
- package/dist/chunk-PH5LCMME.mjs +0 -205
- package/dist/chunk-PH5LCMME.mjs.map +0 -1
- package/dist/chunk-TJK6AFBM.js +0 -265
- package/dist/chunk-TJK6AFBM.js.map +0 -1
- package/dist/chunk-WQDVW7EJ.mjs +0 -1216
- package/dist/chunk-WQDVW7EJ.mjs.map +0 -1
- package/dist/chunk-YEVW7GK5.mjs +0 -265
- package/dist/chunk-YEVW7GK5.mjs.map +0 -1
package/dist/contract.d.ts
CHANGED
@@ -1,10 +1,10 @@
|
|
1
|
-
export { D as DecodeAbiParametersResponse, E as EncodeAbiParametersResponse, G as GetAbiItemArgs, d as decodeAbiParameters, e as encodeAbiParameters, g as getAbiItem } from './getAbiItem-
|
2
|
-
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-
|
3
|
-
export { a as formatAbiItem, f as formatAbiItemWithArgs } from './formatAbiItem-
|
4
|
-
export {
|
1
|
+
export { D as DecodeAbiParametersResponse, E as EncodeAbiParametersResponse, G as GetAbiItemArgs, d as decodeAbiParameters, e as encodeAbiParameters, g as getAbiItem } from './getAbiItem-48e793da.js';
|
2
|
+
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-c3d6c7ea.js';
|
3
|
+
export { a as formatAbiItem, f as formatAbiItemWithArgs } from './formatAbiItem-d79cb207.js';
|
4
|
+
export { n as CreateContractEventFilterArgs, o as CreateContractEventFilterResponse, U as DeployContractArgs, V as DeployContractResponse, p as EstimateContractGasArgs, q as EstimateContractGasResponse, G as GetBytecodeArgs, r as GetBytecodeResponse, s as GetStorageAtArgs, t as GetStorageAtResponse, M as MulticallArgs, u as MulticallResponse, O as OnLogs, v as OnLogsResponse, R as ReadContractArgs, w as ReadContractResponse, x as SimulateContractArgs, y as SimulateContractResponse, z as WatchContractEventArgs, X as WriteContractArgs, Y as WriteContractResponse, D as createContractEventFilter, Z as deployContract, H as estimateContractGas, I as getBytecode, J as getStorageAt, K as multicall, L as readContract, N as simulateContract, Q as watchContractEvent, _ as writeContract } from './createPublicClient-f283b09d.js';
|
5
5
|
import 'abitype';
|
6
|
-
import './chain-
|
6
|
+
import './chain-a34aa9a2.js';
|
7
7
|
import '@wagmi/chains';
|
8
8
|
import 'ethers@6/types/providers';
|
9
|
-
import './eip1193-
|
10
|
-
import './createClient-
|
9
|
+
import './eip1193-a4f254d2.js';
|
10
|
+
import './createClient-8024655d.js';
|
package/dist/contract.js
CHANGED
@@ -1,7 +1,6 @@
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
2
2
|
|
3
3
|
|
4
|
-
var _chunkA665BF7Ojs = require('./chunk-A665BF7O.js');
|
5
4
|
|
6
5
|
|
7
6
|
|
@@ -11,7 +10,6 @@ var _chunkA665BF7Ojs = require('./chunk-A665BF7O.js');
|
|
11
10
|
|
12
11
|
|
13
12
|
|
14
|
-
var _chunk3FT7UKPTjs = require('./chunk-3FT7UKPT.js');
|
15
13
|
|
16
14
|
|
17
15
|
|
@@ -25,9 +23,9 @@ var _chunk3FT7UKPTjs = require('./chunk-3FT7UKPT.js');
|
|
25
23
|
|
26
24
|
|
27
25
|
|
26
|
+
var _chunkKXGQFW2Rjs = require('./chunk-KXGQFW2R.js');
|
28
27
|
|
29
28
|
|
30
|
-
var _chunkHQCSH22Gjs = require('./chunk-HQCSH22G.js');
|
31
29
|
|
32
30
|
|
33
31
|
|
@@ -51,7 +49,5 @@ var _chunkHQCSH22Gjs = require('./chunk-HQCSH22G.js');
|
|
51
49
|
|
52
50
|
|
53
51
|
|
54
|
-
|
55
|
-
|
56
|
-
exports.createContractEventFilter = _chunk3FT7UKPTjs.createContractEventFilter; exports.decodeAbiParameters = _chunkHQCSH22Gjs.decodeAbiParameters; exports.decodeErrorResult = _chunkHQCSH22Gjs.decodeErrorResult; exports.decodeEventLog = _chunkHQCSH22Gjs.decodeEventLog; exports.decodeFunctionData = _chunkHQCSH22Gjs.decodeFunctionData; exports.decodeFunctionResult = _chunkHQCSH22Gjs.decodeFunctionResult; exports.deployContract = _chunkA665BF7Ojs.deployContract; exports.encodeAbiParameters = _chunkHQCSH22Gjs.encodeAbiParameters; exports.encodeDeployData = _chunkHQCSH22Gjs.encodeDeployData; exports.encodeErrorResult = _chunkHQCSH22Gjs.encodeErrorResult; exports.encodeEventTopics = _chunkHQCSH22Gjs.encodeEventTopics; exports.encodeFunctionData = _chunkHQCSH22Gjs.encodeFunctionData; exports.encodeFunctionResult = _chunkHQCSH22Gjs.encodeFunctionResult; exports.estimateContractGas = _chunk3FT7UKPTjs.estimateContractGas; exports.formatAbiItem = _chunkHQCSH22Gjs.formatAbiItem; exports.formatAbiItemWithArgs = _chunkHQCSH22Gjs.formatAbiItemWithArgs; exports.getAbiItem = _chunkHQCSH22Gjs.getAbiItem; exports.getBytecode = _chunk3FT7UKPTjs.getBytecode; exports.getStorageAt = _chunk3FT7UKPTjs.getStorageAt; exports.multicall = _chunk3FT7UKPTjs.multicall; exports.readContract = _chunk3FT7UKPTjs.readContract; exports.simulateContract = _chunk3FT7UKPTjs.simulateContract; exports.watchContractEvent = _chunk3FT7UKPTjs.watchContractEvent; exports.writeContract = _chunkA665BF7Ojs.writeContract;
|
52
|
+
exports.createContractEventFilter = _chunkKXGQFW2Rjs.createContractEventFilter; exports.decodeAbiParameters = _chunkKXGQFW2Rjs.decodeAbiParameters; exports.decodeErrorResult = _chunkKXGQFW2Rjs.decodeErrorResult; exports.decodeEventLog = _chunkKXGQFW2Rjs.decodeEventLog; exports.decodeFunctionData = _chunkKXGQFW2Rjs.decodeFunctionData; exports.decodeFunctionResult = _chunkKXGQFW2Rjs.decodeFunctionResult; exports.deployContract = _chunkKXGQFW2Rjs.deployContract; exports.encodeAbiParameters = _chunkKXGQFW2Rjs.encodeAbiParameters; exports.encodeDeployData = _chunkKXGQFW2Rjs.encodeDeployData; exports.encodeErrorResult = _chunkKXGQFW2Rjs.encodeErrorResult; exports.encodeEventTopics = _chunkKXGQFW2Rjs.encodeEventTopics; exports.encodeFunctionData = _chunkKXGQFW2Rjs.encodeFunctionData; exports.encodeFunctionResult = _chunkKXGQFW2Rjs.encodeFunctionResult; exports.estimateContractGas = _chunkKXGQFW2Rjs.estimateContractGas; exports.formatAbiItem = _chunkKXGQFW2Rjs.formatAbiItem; exports.formatAbiItemWithArgs = _chunkKXGQFW2Rjs.formatAbiItemWithArgs; exports.getAbiItem = _chunkKXGQFW2Rjs.getAbiItem; exports.getBytecode = _chunkKXGQFW2Rjs.getBytecode; exports.getStorageAt = _chunkKXGQFW2Rjs.getStorageAt; exports.multicall = _chunkKXGQFW2Rjs.multicall; exports.readContract = _chunkKXGQFW2Rjs.readContract; exports.simulateContract = _chunkKXGQFW2Rjs.simulateContract; exports.watchContractEvent = _chunkKXGQFW2Rjs.watchContractEvent; exports.writeContract = _chunkKXGQFW2Rjs.writeContract;
|
57
53
|
//# sourceMappingURL=contract.js.map
|
package/dist/contract.mjs
CHANGED
@@ -1,33 +1,29 @@
|
|
1
|
-
import {
|
2
|
-
deployContract,
|
3
|
-
writeContract
|
4
|
-
} from "./chunk-PH5LCMME.mjs";
|
5
1
|
import {
|
6
2
|
createContractEventFilter,
|
7
|
-
estimateContractGas,
|
8
|
-
getBytecode,
|
9
|
-
getStorageAt,
|
10
|
-
multicall,
|
11
|
-
readContract,
|
12
|
-
simulateContract,
|
13
|
-
watchContractEvent
|
14
|
-
} from "./chunk-WQDVW7EJ.mjs";
|
15
|
-
import {
|
16
3
|
decodeAbiParameters,
|
17
4
|
decodeErrorResult,
|
18
5
|
decodeEventLog,
|
19
6
|
decodeFunctionData,
|
20
7
|
decodeFunctionResult,
|
8
|
+
deployContract,
|
21
9
|
encodeAbiParameters,
|
22
10
|
encodeDeployData,
|
23
11
|
encodeErrorResult,
|
24
12
|
encodeEventTopics,
|
25
13
|
encodeFunctionData,
|
26
14
|
encodeFunctionResult,
|
15
|
+
estimateContractGas,
|
27
16
|
formatAbiItem,
|
28
17
|
formatAbiItemWithArgs,
|
29
|
-
getAbiItem
|
30
|
-
|
18
|
+
getAbiItem,
|
19
|
+
getBytecode,
|
20
|
+
getStorageAt,
|
21
|
+
multicall,
|
22
|
+
readContract,
|
23
|
+
simulateContract,
|
24
|
+
watchContractEvent,
|
25
|
+
writeContract
|
26
|
+
} from "./chunk-AXATFOBJ.mjs";
|
31
27
|
export {
|
32
28
|
createContractEventFilter,
|
33
29
|
decodeAbiParameters,
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import { R as Requests } from './eip1193-
|
2
|
-
import { C as Chain } from './chain-
|
1
|
+
import { R as Requests } from './eip1193-a4f254d2.js';
|
2
|
+
import { C as Chain } from './chain-a34aa9a2.js';
|
3
3
|
|
4
4
|
type BaseRpcRequests = {
|
5
5
|
request(...args: any): Promise<any>;
|
@@ -55,15 +55,7 @@ type ClientConfig<TTransport extends Transport = Transport, TChain extends Chain
|
|
55
55
|
transport: TTransport;
|
56
56
|
};
|
57
57
|
/**
|
58
|
-
* @description Creates a base
|
59
|
-
*
|
60
|
-
* - Intended to be used as a base for other RPC clients.
|
61
|
-
* - Has access to _all_ EIP-1474 RPC methods.
|
62
|
-
*
|
63
|
-
* @example
|
64
|
-
* import { mainnet } from 'viem/chains'
|
65
|
-
* import { createClient, http } from 'viem/clients'
|
66
|
-
* const client = createClient(http({ chain: mainnet }))
|
58
|
+
* @description Creates a base client with the given transport.
|
67
59
|
*/
|
68
60
|
declare function createClient<TTransport extends Transport, TChain extends Chain, TRequests extends BaseRpcRequests>({ chain, key, name, pollingInterval, transport, type, }: ClientConfig<TTransport, TChain, TRequests>): Client<TTransport, TChain, TRequests>;
|
69
61
|
|
@@ -1,7 +1,7 @@
|
|
1
|
-
import { W as WalletPermission, a as WatchAssetParams,
|
2
|
-
import { a as Transport, b as ClientConfig, C as Client } from './createClient-
|
3
|
-
import { Abi, Narrow, Address
|
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,
|
1
|
+
import { W as WalletPermission, a as WatchAssetParams, P as PublicRequests } from './eip1193-a4f254d2.js';
|
2
|
+
import { a as Transport, b as ClientConfig, C as Client } from './createClient-8024655d.js';
|
3
|
+
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>;
|
@@ -31,16 +31,16 @@ type FormattedTransactionRequest$1<TFormatter extends Formatter | undefined = Fo
|
|
31
31
|
declare function formatTransactionRequest(transactionRequest: Partial<TransactionRequest>): RpcTransactionRequest;
|
32
32
|
declare const defineTransactionRequest: <TFormat extends Formatter<Partial<TransactionRequest<bigint, number>>, Partial<RpcTransactionRequest> & {
|
33
33
|
[key: string]: unknown;
|
34
|
-
}>, TExclude extends ("value" | "
|
34
|
+
}>, TExclude extends ("value" | "from" | "gasPrice" | "maxFeePerGas" | "maxPriorityFeePerGas" | "data" | "gas" | "nonce" | "to" | "accessList")[] = []>({ exclude, format: formatOverride, }: {
|
35
35
|
exclude?: TExclude | undefined;
|
36
36
|
format?: TFormat | undefined;
|
37
37
|
}) => (data: Partial<TransactionRequest<bigint, number>> & {
|
38
38
|
[key: string]: unknown;
|
39
39
|
}) => RpcTransactionRequest & ReturnType<TFormat> & { [K in TExclude[number]]: never; };
|
40
40
|
|
41
|
-
type FormattedCall<TFormatter extends Formatter | undefined = Formatter> = MergeIntersectionProperties<Formatted<TFormatter, TransactionRequest, true>, TransactionRequest>;
|
41
|
+
type FormattedCall<TFormatter extends Formatter | undefined = Formatter> = MergeIntersectionProperties<Omit<Formatted<TFormatter, TransactionRequest, true>, 'from'>, TransactionRequest>;
|
42
42
|
type CallArgs<TChain extends Chain = Chain> = FormattedCall<TransactionRequestFormatter<TChain>> & {
|
43
|
-
|
43
|
+
account?: Account;
|
44
44
|
} & ({
|
45
45
|
/** The balance of the account at a block number. */
|
46
46
|
blockNumber?: bigint;
|
@@ -67,8 +67,8 @@ type DeployContractArgs<TChain extends Chain = Chain, TAbi extends Abi | readonl
|
|
67
67
|
type DeployContractResponse = SendTransactionResponse;
|
68
68
|
declare function deployContract<TChain extends Chain, TAbi extends Abi | readonly unknown[]>(walletClient: WalletClient, { abi, args, bytecode, ...request }: DeployContractArgs<TChain, TAbi>): Promise<DeployContractResponse>;
|
69
69
|
|
70
|
-
type
|
71
|
-
declare function
|
70
|
+
type GetAddressesResponse = Address[];
|
71
|
+
declare function getAddresses(client: WalletClient): Promise<GetAddressesResponse>;
|
72
72
|
|
73
73
|
type GetChainIdResponse = number;
|
74
74
|
declare function getChainId(client: PublicClient | WalletClient): Promise<GetChainIdResponse>;
|
@@ -76,8 +76,8 @@ declare function getChainId(client: PublicClient | WalletClient): Promise<GetCha
|
|
76
76
|
type GetPermissionsResponse = WalletPermission[];
|
77
77
|
declare function getPermissions(client: WalletClient): Promise<WalletPermission[]>;
|
78
78
|
|
79
|
-
type
|
80
|
-
declare function
|
79
|
+
type RequestAddressesResponse = Address[];
|
80
|
+
declare function requestAddresses(client: WalletClient): Promise<RequestAddressesResponse>;
|
81
81
|
|
82
82
|
type RequestPermissionsArgs = {
|
83
83
|
eth_accounts: Record<string, any>;
|
@@ -87,8 +87,10 @@ type RequestPermissionsArgs = {
|
|
87
87
|
type RequestPermissionsResponse = WalletPermission[];
|
88
88
|
declare function requestPermissions(client: WalletClient, permissions: RequestPermissionsArgs): Promise<WalletPermission[]>;
|
89
89
|
|
90
|
-
type FormattedTransactionRequest<TFormatter extends Formatter | undefined = Formatter> = MergeIntersectionProperties<Formatted<TFormatter, TransactionRequest, true>, TransactionRequest>;
|
91
|
-
type SendTransactionArgs<TChain extends Chain = Chain> = FormattedTransactionRequest<TransactionRequestFormatter<TChain>> &
|
90
|
+
type FormattedTransactionRequest<TFormatter extends Formatter | undefined = Formatter> = MergeIntersectionProperties<Omit<Formatted<TFormatter, TransactionRequest, true>, 'from'>, TransactionRequest>;
|
91
|
+
type SendTransactionArgs<TChain extends Chain = Chain> = FormattedTransactionRequest<TransactionRequestFormatter<TChain>> & {
|
92
|
+
account: Account;
|
93
|
+
} & ({
|
92
94
|
assertChain?: false;
|
93
95
|
chain?: TChain;
|
94
96
|
} | {
|
@@ -99,11 +101,11 @@ type SendTransactionResponse = Hash;
|
|
99
101
|
declare function sendTransaction<TChain extends Chain>(client: WalletClient, args: SendTransactionArgs<TChain>): Promise<SendTransactionResponse>;
|
100
102
|
|
101
103
|
type SignMessageArgs = {
|
102
|
-
|
103
|
-
data:
|
104
|
+
account: Account;
|
105
|
+
data: string;
|
104
106
|
};
|
105
107
|
type SignMessageResponse = Hex;
|
106
|
-
declare function signMessage(client: WalletClient, {
|
108
|
+
declare function signMessage(client: WalletClient, { account, data }: SignMessageArgs): Promise<SignMessageResponse>;
|
107
109
|
|
108
110
|
type SwitchChainArgs = {
|
109
111
|
id: Chain['id'];
|
@@ -136,7 +138,7 @@ type CreateBlockFilterResponse = Filter<'block'>;
|
|
136
138
|
declare function createBlockFilter(client: PublicClient): Promise<CreateBlockFilterResponse>;
|
137
139
|
|
138
140
|
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> = {
|
139
|
-
address?: Address | Address[];
|
141
|
+
address?: Address$1 | Address$1[];
|
140
142
|
fromBlock?: BlockNumber | BlockTag;
|
141
143
|
toBlock?: BlockNumber | BlockTag;
|
142
144
|
} & (MaybeExtractEventArgsFromAbi<TAbi, TEventName> extends infer TEventFilterArgs ? {
|
@@ -156,7 +158,7 @@ type CreateEventFilterResponse<TAbiEvent extends AbiEvent | undefined = undefine
|
|
156
158
|
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>>;
|
157
159
|
|
158
160
|
type CreateContractEventFilterArgs<TAbi extends Abi | readonly unknown[] = Abi, TEventName extends string | undefined = undefined, TArgs extends MaybeExtractEventArgsFromAbi<TAbi, TEventName> | undefined = undefined> = {
|
159
|
-
address?: Address | Address[];
|
161
|
+
address?: Address$1 | Address$1[];
|
160
162
|
abi: Narrow<TAbi>;
|
161
163
|
eventName?: ExtractEventNameFromAbi<TAbi, TEventName>;
|
162
164
|
fromBlock?: BlockNumber | BlockTag;
|
@@ -171,8 +173,10 @@ type CreateContractEventFilterArgs<TAbi extends Abi | readonly unknown[] = Abi,
|
|
171
173
|
type CreateContractEventFilterResponse<TAbi extends Abi | readonly unknown[] = Abi, TEventName extends string | undefined = undefined, TArgs extends MaybeExtractEventArgsFromAbi<TAbi, TEventName> | undefined = undefined> = Filter<'event', TAbi, TEventName, TArgs>;
|
172
174
|
declare function createContractEventFilter<TAbi extends Abi | readonly unknown[], TEventName extends string | undefined, TArgs extends MaybeExtractEventArgsFromAbi<TAbi, TEventName> | undefined>(client: PublicClient, { address, abi, args, eventName, fromBlock, toBlock, }: CreateContractEventFilterArgs<TAbi, TEventName, TArgs>): Promise<CreateContractEventFilterResponse<TAbi, TEventName, TArgs>>;
|
173
175
|
|
174
|
-
type FormattedEstimateGas<TFormatter extends Formatter | undefined = Formatter> = MergeIntersectionProperties<Formatted<TFormatter, TransactionRequest, true>, TransactionRequest>;
|
175
|
-
type EstimateGasArgs<TChain extends Chain = Chain> = FormattedEstimateGas<TransactionRequestFormatter<TChain>> &
|
176
|
+
type FormattedEstimateGas<TFormatter extends Formatter | undefined = Formatter> = MergeIntersectionProperties<Omit<Formatted<TFormatter, TransactionRequest, true>, 'from'>, TransactionRequest>;
|
177
|
+
type EstimateGasArgs<TChain extends Chain = Chain> = FormattedEstimateGas<TransactionRequestFormatter<TChain>> & {
|
178
|
+
account: Account;
|
179
|
+
} & ({
|
176
180
|
/** The balance of the account at a block number. */
|
177
181
|
blockNumber?: bigint;
|
178
182
|
blockTag?: never;
|
@@ -185,17 +189,17 @@ type EstimateGasResponse = bigint;
|
|
185
189
|
/**
|
186
190
|
* @description Estimates the gas necessary to complete a transaction without submitting it to the network.
|
187
191
|
*/
|
188
|
-
declare function estimateGas<TChain extends Chain>(client: PublicClient<any, TChain
|
192
|
+
declare function estimateGas<TChain extends Chain>(client: PublicClient<any, TChain> | WalletClient, args: EstimateGasArgs<TChain>): Promise<EstimateGasResponse>;
|
189
193
|
|
190
|
-
type EstimateContractGasArgs<TChain extends Chain = Chain, TAbi extends Abi | readonly unknown[] = Abi, TFunctionName extends string = any> = Omit<
|
191
|
-
value?: GetValue<TAbi, TFunctionName,
|
194
|
+
type EstimateContractGasArgs<TChain extends Chain = Chain, TAbi extends Abi | readonly unknown[] = Abi, TFunctionName extends string = any> = Omit<EstimateGasArgs<TChain>, 'data' | 'to' | 'value'> & ContractConfig<TAbi, TFunctionName, 'payable' | 'nonpayable'> & {
|
195
|
+
value?: GetValue<TAbi, TFunctionName, EstimateGasArgs<TChain>['value']>;
|
192
196
|
};
|
193
197
|
type EstimateContractGasResponse = bigint;
|
194
198
|
declare function estimateContractGas<TChain extends Chain, TAbi extends Abi | readonly unknown[], TFunctionName extends string>(client: PublicClient<any, TChain>, { abi, address, args, functionName, ...request }: EstimateContractGasArgs<TChain, TAbi, TFunctionName>): Promise<EstimateContractGasResponse>;
|
195
199
|
|
196
200
|
type GetBalanceArgs = {
|
197
201
|
/** The address of the account. */
|
198
|
-
address: Address;
|
202
|
+
address: Address$1;
|
199
203
|
} & ({
|
200
204
|
/** The balance of the account at a block number. */
|
201
205
|
blockNumber?: bigint;
|
@@ -231,7 +235,7 @@ type GetBlockArgs = {
|
|
231
235
|
blockTag?: BlockTag;
|
232
236
|
});
|
233
237
|
type GetBlockResponse<TChain extends Chain = Chain> = FormattedBlock<BlockFormatter<TChain>>;
|
234
|
-
declare function getBlock<TChain extends Chain>(client: PublicClient<any, TChain
|
238
|
+
declare function getBlock<TChain extends Chain>(client: PublicClient<any, TChain> | WalletClient, { blockHash, blockNumber, blockTag, includeTransactions, }?: GetBlockArgs): Promise<GetBlockResponse<TChain>>;
|
235
239
|
|
236
240
|
type GetBlockNumberArgs = {
|
237
241
|
/** The maximum age (in ms) of the cached value. */
|
@@ -285,7 +289,7 @@ type GetBlockTransactionCountResponse = number;
|
|
285
289
|
declare function getBlockTransactionCount<TChain extends Chain>(client: PublicClient<any, TChain>, { blockHash, blockNumber, blockTag, }?: GetBlockTransactionCountArgs): Promise<GetBlockTransactionCountResponse>;
|
286
290
|
|
287
291
|
type GetBytecodeArgs = {
|
288
|
-
address: Address;
|
292
|
+
address: Address$1;
|
289
293
|
} & ({
|
290
294
|
blockNumber?: never;
|
291
295
|
blockTag?: BlockTag;
|
@@ -328,11 +332,11 @@ type GetGasPriceResponse = bigint;
|
|
328
332
|
/**
|
329
333
|
* @description Returns the current price of gas (in wei).
|
330
334
|
*/
|
331
|
-
declare function getGasPrice(client: PublicClient): Promise<GetGasPriceResponse>;
|
335
|
+
declare function getGasPrice(client: PublicClient | WalletClient): Promise<GetGasPriceResponse>;
|
332
336
|
|
333
337
|
type GetLogsArgs<TAbiEvent extends AbiEvent | undefined = undefined, TEventName extends string | undefined = MaybeAbiEventName<TAbiEvent>> = {
|
334
338
|
/** Address or list of addresses from which logs originated */
|
335
|
-
address?: Address | Address[];
|
339
|
+
address?: Address$1 | Address$1[];
|
336
340
|
} & ({
|
337
341
|
event: TAbiEvent;
|
338
342
|
args?: MaybeExtractEventArgsFromAbi<[TAbiEvent], TEventName>;
|
@@ -358,7 +362,7 @@ type GetLogsResponse<TAbiEvent extends AbiEvent | undefined = undefined, TEventN
|
|
358
362
|
declare function getLogs<TAbiEvent extends AbiEvent | undefined>(client: PublicClient, { address, blockHash, fromBlock, toBlock, event, args, }?: GetLogsArgs<TAbiEvent>): Promise<GetLogsResponse<TAbiEvent>>;
|
359
363
|
|
360
364
|
type GetStorageAtArgs = {
|
361
|
-
address: Address;
|
365
|
+
address: Address$1;
|
362
366
|
slot: Hex;
|
363
367
|
} & ({
|
364
368
|
blockNumber?: never;
|
@@ -423,7 +427,7 @@ type GetTransactionReceiptArgs = {
|
|
423
427
|
hash: Hash;
|
424
428
|
};
|
425
429
|
type GetTransactionReceiptResponse<TChain extends Chain = Chain> = FormattedTransactionReceipt<TransactionReceiptFormatter<TChain>>;
|
426
|
-
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>>;
|
430
|
+
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, false>>;
|
427
431
|
|
428
432
|
type MAXIMUM_DEPTH = 20;
|
429
433
|
type Contract<TAbi extends Abi | readonly unknown[] = Abi | readonly unknown[], TFunctionName extends string = string> = {
|
@@ -470,7 +474,7 @@ type MulticallResults<TContracts extends Contract[], TAllowFailure extends boole
|
|
470
474
|
type MulticallArgs<TContracts extends ContractConfig[] = ContractConfig[], TAllowFailure extends boolean = true> = Pick<CallArgs, 'blockNumber' | 'blockTag'> & {
|
471
475
|
allowFailure?: TAllowFailure;
|
472
476
|
contracts: readonly [...MulticallContracts<TContracts>];
|
473
|
-
multicallAddress: Address;
|
477
|
+
multicallAddress: Address$1;
|
474
478
|
};
|
475
479
|
type MulticallResponse<TContracts extends ContractConfig[] = ContractConfig[], TAllowFailure extends boolean = true> = MulticallResults<TContracts, TAllowFailure>;
|
476
480
|
declare function multicall<TContracts extends ContractConfig[], TAllowFailure extends boolean = true>(client: PublicClient, args: MulticallArgs<TContracts, TAllowFailure>): Promise<MulticallResponse<TContracts, TAllowFailure>>;
|
@@ -554,7 +558,7 @@ type OnLogsResponse$1<TAbi extends Abi | readonly unknown[] = readonly unknown[]
|
|
554
558
|
type OnLogs$1<TAbi extends Abi | readonly unknown[] = readonly unknown[], TEventName extends string = string> = (logs: OnLogsResponse$1<TAbi, TEventName>) => void;
|
555
559
|
type WatchContractEventArgs<TAbi extends Abi | readonly unknown[] = readonly unknown[], TEventName extends string = string> = {
|
556
560
|
/** The address of the contract. */
|
557
|
-
address?: Address | Address[];
|
561
|
+
address?: Address$1 | Address$1[];
|
558
562
|
/** Contract ABI. */
|
559
563
|
abi: Narrow<TAbi>;
|
560
564
|
args?: ExtractEventArgsFromAbi<TAbi, TEventName>;
|
@@ -575,7 +579,7 @@ type OnLogsResponse<TAbiEvent extends AbiEvent | undefined = undefined, TEventNa
|
|
575
579
|
type OnLogs<TAbiEvent extends AbiEvent | undefined = undefined, TEventName extends string | undefined = MaybeAbiEventName<TAbiEvent>> = (logs: OnLogsResponse<TAbiEvent, TEventName>) => void;
|
576
580
|
type WatchEventArgs<TAbiEvent extends AbiEvent | undefined = undefined, TEventName extends string | undefined = MaybeAbiEventName<TAbiEvent>> = {
|
577
581
|
/** The address of the contract. */
|
578
|
-
address?: Address | Address[];
|
582
|
+
address?: Address$1 | Address$1[];
|
579
583
|
/** Whether or not the event logs should be batched on each invocation. */
|
580
584
|
batch?: boolean;
|
581
585
|
/** The callback to call when an error occurred when trying to get for a new block. */
|
@@ -607,6 +611,21 @@ type WatchPendingTransactionsArgs = {
|
|
607
611
|
};
|
608
612
|
declare function watchPendingTransactions(client: PublicClient, { batch, onError, onTransactions, pollingInterval, }: WatchPendingTransactionsArgs): () => void;
|
609
613
|
|
614
|
+
type Account = JsonRpcAccount | ExternallyOwnedAccount;
|
615
|
+
type JsonRpcAccount = {
|
616
|
+
address: Address$1;
|
617
|
+
type: 'json-rpc';
|
618
|
+
};
|
619
|
+
type ExternallyOwnedAccount = {
|
620
|
+
address: Address$1;
|
621
|
+
signMessage: (message: string) => Promise<Hash>;
|
622
|
+
signTransaction: (transaction: Omit<TransactionRequest, 'from'> & {
|
623
|
+
chainId: number;
|
624
|
+
from: Address$1;
|
625
|
+
}) => Promise<Hash>;
|
626
|
+
type: 'externally-owned';
|
627
|
+
};
|
628
|
+
|
610
629
|
type FilterType = 'transaction' | 'block' | 'event';
|
611
630
|
type Filter<TFilterType extends FilterType = 'event', TAbi extends Abi | readonly unknown[] = Abi, TEventName extends string | undefined = undefined, TArgs extends MaybeExtractEventArgsFromAbi<TAbi, TEventName> | undefined = MaybeExtractEventArgsFromAbi<TAbi, TEventName>> = {
|
612
631
|
id: Hex;
|
@@ -633,9 +652,9 @@ type GetEnsAddressArgs = Prettify<Pick<ReadContractArgs, 'blockNumber' | 'blockT
|
|
633
652
|
/** ENS name to get address. */
|
634
653
|
name: string;
|
635
654
|
/** Address of ENS Universal Resolver Contract */
|
636
|
-
universalResolverAddress?: Address;
|
655
|
+
universalResolverAddress?: Address$1;
|
637
656
|
}>;
|
638
|
-
type GetEnsAddressResponse = Address;
|
657
|
+
type GetEnsAddressResponse = Address$1;
|
639
658
|
/**
|
640
659
|
* @description Gets address for ENS name.
|
641
660
|
*
|
@@ -651,9 +670,9 @@ declare function getEnsAddress(client: PublicClient, { blockNumber, blockTag, na
|
|
651
670
|
|
652
671
|
type GetEnsNameArgs = Prettify<Pick<ReadContractArgs, 'blockNumber' | 'blockTag'> & {
|
653
672
|
/** Address to get ENS name for. */
|
654
|
-
address: Address;
|
673
|
+
address: Address$1;
|
655
674
|
/** Address of ENS Universal Resolver Contract. */
|
656
|
-
universalResolverAddress?: Address;
|
675
|
+
universalResolverAddress?: Address$1;
|
657
676
|
}>;
|
658
677
|
type GetEnsNameResponse = string | null;
|
659
678
|
/**
|
@@ -716,48 +735,32 @@ type WalletClientConfig<TTransport extends Transport = Transport, TChain extends
|
|
716
735
|
pollingInterval?: ClientConfig['pollingInterval'];
|
717
736
|
transport: ClientConfig<TTransport, TChain>['transport'];
|
718
737
|
};
|
719
|
-
type WalletClient<TTransport extends Transport = Transport, TChain extends Chain = Chain, TIncludeActions extends boolean = true> = Client<TTransport, TChain
|
738
|
+
type WalletClient<TTransport extends Transport = Transport, TChain extends Chain = Chain, TIncludeActions extends boolean = true> = Client<TTransport, TChain> & (TIncludeActions extends true ? WalletActions<TChain> : {});
|
720
739
|
/**
|
721
740
|
* @description Creates a wallet client with a given transport.
|
722
|
-
*
|
723
|
-
* - Only has access to "wallet" & "signable" EIP-1474 RPC methods
|
724
|
-
* (ie. `eth_sendTransaction`, `eth_requestAccounts`, etc).
|
725
|
-
*
|
726
|
-
* @example
|
727
|
-
* import { createWalletClient, custom } from 'viem'
|
728
|
-
* const client = createWalletClient(
|
729
|
-
* custom(window.ethereum)
|
730
|
-
* )
|
731
741
|
*/
|
732
742
|
declare function createWalletClient<TTransport extends Transport, TChain extends Chain>({ transport, key, name, pollingInterval, }: WalletClientConfig<TTransport, TChain>): WalletClient<TTransport, TChain, true>;
|
733
743
|
|
734
744
|
type WalletActions<TChain extends Chain = Chain> = {
|
735
745
|
addChain: (args: AddChainArgs) => Promise<void>;
|
736
746
|
deployContract: <TAbi extends Abi | readonly unknown[]>(args: DeployContractArgs<TChain, TAbi>) => Promise<DeployContractResponse>;
|
737
|
-
|
747
|
+
getAddresses: () => Promise<GetAddressesResponse>;
|
738
748
|
getChainId: () => Promise<GetChainIdResponse>;
|
739
749
|
getPermissions: () => Promise<GetPermissionsResponse>;
|
740
|
-
|
750
|
+
requestAddresses: () => Promise<RequestAddressesResponse>;
|
741
751
|
requestPermissions: (args: RequestPermissionsArgs) => Promise<RequestPermissionsResponse>;
|
742
|
-
sendTransaction: (args: SendTransactionArgs<
|
752
|
+
sendTransaction: <TChainOverride extends Chain>(args: SendTransactionArgs<TChainOverride>) => Promise<SendTransactionResponse>;
|
743
753
|
signMessage: (args: SignMessageArgs) => Promise<SignMessageResponse>;
|
744
754
|
switchChain: (args: SwitchChainArgs) => Promise<void>;
|
745
755
|
watchAsset: (args: WatchAssetArgs) => Promise<WatchAssetResponse>;
|
746
|
-
writeContract: <TAbi extends Abi | readonly unknown[], TFunctionName extends string>(args: WriteContractArgs<
|
756
|
+
writeContract: <TAbi extends Abi | readonly unknown[], TFunctionName extends string, TChainOverride extends Chain>(args: WriteContractArgs<TChainOverride, TAbi, TFunctionName>) => Promise<WriteContractResponse>;
|
747
757
|
};
|
748
758
|
|
749
759
|
type PublicClientConfig<TTransport extends Transport = Transport, TChain extends Chain = Chain> = Pick<ClientConfig<TTransport, TChain>, 'chain' | 'key' | 'name' | 'pollingInterval' | 'transport'>;
|
750
760
|
type PublicClient<TTransport extends Transport = Transport, TChain extends Chain = Chain, TIncludeActions extends boolean = true> = Client<TTransport, TChain, PublicRequests> & (TIncludeActions extends true ? PublicActions<TChain> : {});
|
751
761
|
/**
|
752
762
|
* @description Creates a public client with a given transport.
|
753
|
-
*
|
754
|
-
* - Only has access to "public" EIP-1474 RPC methods (ie. `eth_blockNumber`, etc).
|
755
|
-
*
|
756
|
-
* @example
|
757
|
-
* import { mainnet } from 'viem/chains'
|
758
|
-
* import { createPublicClient, http } from 'viem/clients'
|
759
|
-
* const client = createPublicClient({ transport: http('https://...') })
|
760
763
|
*/
|
761
764
|
declare function createPublicClient<TTransport extends Transport, TChain extends Chain>({ chain, key, name, transport, pollingInterval, }: PublicClientConfig<TTransport, TChain>): PublicClient<TTransport, TChain, true>;
|
762
765
|
|
763
|
-
export {
|
766
|
+
export { GetEnsAddressArgs as $, Account as A, BlockFormatter as B, CallArgs as C, createContractEventFilter as D, ExternallyOwnedAccount as E, FormattedBlock as F, GetBytecodeArgs as G, estimateContractGas as H, getBytecode as I, getStorageAt as J, multicall as K, readContract as L, MulticallArgs as M, simulateContract as N, OnLogs as O, PublicClient as P, watchContractEvent as Q, ReadContractArgs as R, SendTransactionArgs as S, TransactionReceiptFormatter as T, DeployContractArgs as U, DeployContractResponse as V, WalletClient as W, WriteContractArgs as X, WriteContractResponse as Y, deployContract as Z, writeContract as _, PublicClientConfig as a, UninstallFilterArgs as a$, GetEnsNameArgs as a0, getEnsAddress as a1, getEnsName as a2, call as a3, createBlockFilter as a4, createEventFilter as a5, createPendingTransactionFilter as a6, estimateGas as a7, getBalance as a8, getBlock as a9, GetBlockArgs as aA, GetBlockNumberArgs as aB, GetBlockNumberResponse as aC, GetBlockResponse as aD, GetBlockTransactionCountArgs as aE, GetBlockTransactionCountResponse as aF, GetFeeHistoryArgs as aG, GetFeeHistoryResponse as aH, GetFilterChangesArgs as aI, GetFilterChangesResponse as aJ, GetFilterLogsArgs as aK, GetFilterLogsResponse as aL, GetGasPriceResponse as aM, GetTransactionArgs as aN, GetTransactionConfirmationsArgs as aO, GetTransactionConfirmationsResponse as aP, GetTransactionReceiptArgs as aQ, GetTransactionReceiptResponse as aR, GetTransactionResponse as aS, OnBlock as aT, OnBlockNumber as aU, OnBlockNumberResponse as aV, OnBlockResponse as aW, OnTransactions as aX, OnTransactionsResponse as aY, ReplacementReason as aZ, ReplacementResponse as a_, getBlockNumber as aa, getBlockNumberCache as ab, getBlockTransactionCount as ac, getChainId as ad, getFeeHistory as ae, getFilterChanges as af, getFilterLogs as ag, getLogs as ah, getGasPrice as ai, getTransaction as aj, getTransactionConfirmations as ak, getTransactionReceipt as al, uninstallFilter as am, waitForTransactionReceipt as an, watchBlockNumber as ao, watchBlocks as ap, watchEvent as aq, watchPendingTransactions as ar, CallResponse as as, CreateBlockFilterResponse as at, CreateEventFilterArgs as au, CreateEventFilterResponse as av, CreatePendingTransactionFilterResponse as aw, EstimateGasResponse as ax, GetBalanceArgs as ay, GetBalanceResponse as az, WalletClientConfig as b, UninstallFilterResponse as b0, WaitForTransactionReceiptArgs as b1, WaitForTransactionReceiptResponse as b2, WatchBlockNumberArgs as b3, WatchBlocksArgs as b4, WatchPendingTransactionsArgs as b5, addChain as b6, getAddresses as b7, getPermissions as b8, requestAddresses as b9, requestPermissions as ba, sendTransaction as bb, signMessage as bc, switchChain as bd, watchAsset as be, AddChainArgs as bf, FormattedTransactionRequest as bg, GetPermissionsResponse as bh, GetAddressesResponse as bi, RequestAddressesResponse as bj, RequestPermissionsResponse as bk, SendTransactionResponse as bl, SignMessageArgs as bm, SignMessageResponse as bn, SwitchChainArgs as bo, WatchAssetArgs as bp, WatchAssetResponse as bq, 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, EstimateGasArgs as m, CreateContractEventFilterArgs as n, CreateContractEventFilterResponse as o, EstimateContractGasArgs as p, EstimateContractGasResponse as q, GetBytecodeResponse as r, GetStorageAtArgs as s, GetStorageAtResponse as t, MulticallResponse as u, OnLogsResponse as v, ReadContractResponse as w, SimulateContractArgs as x, SimulateContractResponse as y, WatchContractEventArgs as z };
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import {
|
1
|
+
import { c as Address, a as Hash, a4 as Quantity, s as RpcTransactionRequest, m as RpcBlockNumber, g as BlockTag, l as RpcBlockIdentifier, H as Hex, n as RpcFeeHistory, R as RpcBlock, p as RpcLog, a8 as LogTopic, q as RpcTransaction, r as RpcTransactionReceipt, t as RpcUncle } from './chain-a34aa9a2.js';
|
2
2
|
|
3
3
|
declare class RpcError extends Error {
|
4
4
|
code: number;
|
@@ -997,4 +997,4 @@ type WalletRequests = {
|
|
997
997
|
};
|
998
998
|
type Requests = PublicRequests & SignableRequests & WalletRequests;
|
999
999
|
|
1000
|
-
export { Events as E, PublicRequests as P, Requests as R,
|
1000
|
+
export { Events as E, PublicRequests as P, Requests as R, TestRequests as T, WalletPermission as W, WatchAssetParams as a };
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { Abi, Narrow } from 'abitype';
|
2
|
-
import { H as Hex,
|
2
|
+
import { H as Hex, A as AbiItem, a8 as LogTopic, a1 as ExtractEventNameFromAbi, a9 as ExtractEventArgsFromTopics, aa as ExtractFunctionNameFromAbi, a7 as ExtractArgsFromAbi, _ as ExtractResultFromAbi, Y as ExtractConstructorArgsFromAbi, ab as ExtractErrorNameFromAbi, ac as ExtractErrorArgsFromAbi, a2 as ExtractEventArgsFromAbi } from './chain-a34aa9a2.js';
|
3
3
|
|
4
4
|
type DecodeErrorResultArgs = {
|
5
5
|
abi?: Abi;
|
package/dist/ens.d.ts
CHANGED
@@ -1,11 +1,11 @@
|
|
1
|
-
export {
|
1
|
+
export { $ as GetEnsAddressArgs, a0 as GetEnsNameArgs, a1 as getEnsAddress, a2 as getEnsName } from './createPublicClient-f283b09d.js';
|
2
2
|
export { l as labelhash, n as namehash } from './namehash-88f4639d.js';
|
3
|
-
import './eip1193-
|
4
|
-
import './chain-
|
3
|
+
import './eip1193-a4f254d2.js';
|
4
|
+
import './chain-a34aa9a2.js';
|
5
5
|
import '@wagmi/chains';
|
6
6
|
import 'abitype';
|
7
7
|
import 'ethers@6/types/providers';
|
8
|
-
import './createClient-
|
8
|
+
import './createClient-8024655d.js';
|
9
9
|
|
10
10
|
/**
|
11
11
|
* @description Normalizes ENS name
|
package/dist/ens.js
CHANGED
@@ -3,9 +3,8 @@
|
|
3
3
|
|
4
4
|
|
5
5
|
|
6
|
-
var
|
7
|
-
require('./chunk-
|
8
|
-
require('./chunk-HQCSH22G.js');
|
6
|
+
var _chunk4AEFOF5Rjs = require('./chunk-4AEFOF5R.js');
|
7
|
+
require('./chunk-KXGQFW2R.js');
|
9
8
|
|
10
9
|
// src/utils/ens/normalize.ts
|
11
10
|
var _idnauts46hx = require('idna-uts46-hx');
|
@@ -18,5 +17,5 @@ function normalize(name) {
|
|
18
17
|
|
19
18
|
|
20
19
|
|
21
|
-
exports.getEnsAddress =
|
20
|
+
exports.getEnsAddress = _chunk4AEFOF5Rjs.getEnsAddress; exports.getEnsName = _chunk4AEFOF5Rjs.getEnsName; exports.labelhash = _chunk4AEFOF5Rjs.labelhash; exports.namehash = _chunk4AEFOF5Rjs.namehash; exports.normalize = normalize;
|
22
21
|
//# sourceMappingURL=ens.js.map
|
package/dist/ens.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../src/utils/ens/normalize.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"sources":["../src/utils/ens/normalize.ts"],"names":[],"mappings":";;;;;;;;;AAAA,SAAS,iBAAiB;AAWnB,SAAS,UAAU,MAAc;AACtC,SAAO,UAAU,MAAM,EAAE,cAAc,KAAK,CAAC;AAC/C","sourcesContent":["import { toUnicode } from 'idna-uts46-hx'\n\n/**\n * @description Normalizes ENS name\n *\n * @example\n * normalize('wagmi-dev.eth')\n * 'wagmi-dev.eth'\n *\n * @see https://docs.ens.domains/contract-api-reference/name-processing#normalising-names\n */\nexport function normalize(name: string) {\n return toUnicode(name, { useStd3ASCII: true })\n}\n"]}
|
package/dist/ens.mjs
CHANGED
@@ -3,9 +3,8 @@ import {
|
|
3
3
|
getEnsName,
|
4
4
|
labelhash,
|
5
5
|
namehash
|
6
|
-
} from "./chunk-
|
7
|
-
import "./chunk-
|
8
|
-
import "./chunk-PBW4YL37.mjs";
|
6
|
+
} from "./chunk-CUT73KXY.mjs";
|
7
|
+
import "./chunk-AXATFOBJ.mjs";
|
9
8
|
|
10
9
|
// src/utils/ens/normalize.ts
|
11
10
|
import { toUnicode } from "idna-uts46-hx";
|
package/dist/ens.mjs.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../src/utils/ens/normalize.ts"],"sourcesContent":["import { toUnicode } from 'idna-uts46-hx'\n\n/**\n * @description Normalizes ENS name\n *\n * @example\n * normalize('wagmi-dev.eth')\n * 'wagmi-dev.eth'\n *\n * @see https://docs.ens.domains/contract-api-reference/name-processing#normalising-names\n */\nexport function normalize(name: string) {\n return toUnicode(name, { useStd3ASCII: true })\n}\n"],"mappings":"
|
1
|
+
{"version":3,"sources":["../src/utils/ens/normalize.ts"],"sourcesContent":["import { toUnicode } from 'idna-uts46-hx'\n\n/**\n * @description Normalizes ENS name\n *\n * @example\n * normalize('wagmi-dev.eth')\n * 'wagmi-dev.eth'\n *\n * @see https://docs.ens.domains/contract-api-reference/name-processing#normalising-names\n */\nexport function normalize(name: string) {\n return toUnicode(name, { useStd3ASCII: true })\n}\n"],"mappings":";;;;;;;;;AAAA,SAAS,iBAAiB;AAWnB,SAAS,UAAU,MAAc;AACtC,SAAO,UAAU,MAAM,EAAE,cAAc,KAAK,CAAC;AAC/C;","names":[]}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { AbiParameter, AbiParametersToPrimitiveTypes, Narrow, Abi } from 'abitype';
|
2
|
-
import { H as Hex, a6 as ExtractNameFromAbi, a7 as ExtractArgsFromAbi } from './chain-
|
2
|
+
import { H as Hex, a6 as ExtractNameFromAbi, a7 as ExtractArgsFromAbi } from './chain-a34aa9a2.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>;
|