viem 0.1.13 → 0.1.14
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 +3 -3
- package/dist/abi.js +2 -2
- package/dist/abi.mjs +1 -1
- package/dist/{chain-792d51c3.d.ts → chain-0ce17567.d.ts} +1 -1
- package/dist/{chain-41dcec4b.d.ts → chain-5b8fb5eb.d.ts} +1 -1
- package/dist/chains.d.ts +3 -3
- package/dist/chains.js +63 -63
- package/dist/chains.mjs +1 -1
- package/dist/{chunk-BJPR4EAT.mjs → chunk-KH3WJ45D.mjs} +2 -2
- package/dist/{chunk-3FWCHYKE.js → chunk-P5JTF7JS.js} +27 -13
- package/dist/chunk-P5JTF7JS.js.map +1 -0
- package/dist/{chunk-S4MOKUQW.mjs → chunk-S3SV7Y4G.mjs} +26 -12
- package/dist/chunk-S3SV7Y4G.mjs.map +1 -0
- package/dist/{chunk-65E5HTFA.js → chunk-TZWWCJQ5.js} +19 -19
- package/dist/contract.d.ts +7 -7
- package/dist/contract.js +2 -2
- package/dist/contract.mjs +1 -1
- package/dist/{createClient-6cd6daa3.d.ts → createClient-98b1c2e7.d.ts} +2 -2
- package/dist/{createPublicClient-34d3ba9d.d.ts → createPublicClient-812a1dae.d.ts} +3 -3
- package/dist/{eip1193-2f116cf7.d.ts → eip1193-44504199.d.ts} +1 -1
- package/dist/{encodeFunctionResult-874fe003.d.ts → encodeFunctionResult-e491eb56.d.ts} +4 -4
- package/dist/{encodePacked-9ab98aa9.d.ts → encodePacked-d7942f6b.d.ts} +1 -1
- package/dist/ens.d.ts +4 -4
- package/dist/ens.js +3 -3
- package/dist/ens.mjs +2 -2
- package/dist/ethers.d.ts +4 -4
- package/dist/ethers.js +3 -3
- package/dist/ethers.mjs +1 -1
- package/dist/{formatAbiItem-1bdb43d3.d.ts → formatAbiItem-29a73545.d.ts} +1 -1
- package/dist/{getAbiItem-f19d50a2.d.ts → getAbiItem-779cb566.d.ts} +1 -1
- package/dist/index.d.ts +24 -14
- package/dist/index.js +92 -90
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +4 -2
- package/dist/index.mjs.map +1 -1
- package/dist/{parseGwei-a35c7c87.d.ts → parseGwei-75956089.d.ts} +3 -3
- package/dist/public.d.ts +4 -4
- package/dist/public.js +2 -2
- package/dist/public.mjs +1 -1
- package/dist/{test-6b2b1b0d.d.ts → test-d0a36452.d.ts} +3 -3
- package/dist/test.d.ts +5 -5
- package/dist/test.js +2 -2
- package/dist/test.mjs +1 -1
- package/dist/utils/index.d.ts +13 -13
- package/dist/utils/index.js +2 -2
- package/dist/utils/index.mjs +1 -1
- package/dist/wallet.d.ts +4 -4
- package/dist/wallet.js +2 -2
- package/dist/wallet.mjs +1 -1
- package/dist/window.d.ts +2 -2
- package/package.json +1 -1
- package/dist/chunk-3FWCHYKE.js.map +0 -1
- package/dist/chunk-S4MOKUQW.mjs.map +0 -1
- /package/dist/{chunk-BJPR4EAT.mjs.map → chunk-KH3WJ45D.mjs.map} +0 -0
- /package/dist/{chunk-65E5HTFA.js.map → chunk-TZWWCJQ5.js.map} +0 -0
@@ -11,27 +11,27 @@
|
|
11
11
|
|
12
12
|
|
13
13
|
|
14
|
-
var
|
14
|
+
var _chunkP5JTF7JSjs = require('./chunk-P5JTF7JS.js');
|
15
15
|
|
16
16
|
// src/utils/ens/labelhash.ts
|
17
17
|
function labelhash(label) {
|
18
18
|
let result = new Uint8Array(32).fill(0);
|
19
19
|
if (!label)
|
20
|
-
return
|
21
|
-
return
|
20
|
+
return _chunkP5JTF7JSjs.bytesToHex.call(void 0, result);
|
21
|
+
return _chunkP5JTF7JSjs.keccak256.call(void 0, _chunkP5JTF7JSjs.stringToBytes.call(void 0, label));
|
22
22
|
}
|
23
23
|
|
24
24
|
// src/utils/ens/namehash.ts
|
25
25
|
function namehash(name) {
|
26
26
|
let result = new Uint8Array(32).fill(0);
|
27
27
|
if (!name)
|
28
|
-
return
|
28
|
+
return _chunkP5JTF7JSjs.bytesToHex.call(void 0, result);
|
29
29
|
const labels = name.split(".");
|
30
30
|
for (let i = labels.length - 1; i >= 0; i -= 1) {
|
31
|
-
const hashed =
|
32
|
-
result =
|
31
|
+
const hashed = _chunkP5JTF7JSjs.keccak256.call(void 0, _chunkP5JTF7JSjs.stringToBytes.call(void 0, labels[i]), "bytes");
|
32
|
+
result = _chunkP5JTF7JSjs.keccak256.call(void 0, _chunkP5JTF7JSjs.concat.call(void 0, [result, hashed]), "bytes");
|
33
33
|
}
|
34
|
-
return
|
34
|
+
return _chunkP5JTF7JSjs.bytesToHex.call(void 0, result);
|
35
35
|
}
|
36
36
|
|
37
37
|
// src/utils/ens/packetToBytes.ts
|
@@ -39,7 +39,7 @@ function packetToBytes(packet) {
|
|
39
39
|
function length(value2) {
|
40
40
|
if (value2 === "." || value2 === "..")
|
41
41
|
return 1;
|
42
|
-
return
|
42
|
+
return _chunkP5JTF7JSjs.toBytes.call(void 0, value2.replace(/^\.|\.$/gm, "")).length + 2;
|
43
43
|
}
|
44
44
|
const bytes = new Uint8Array(length(packet));
|
45
45
|
const value = packet.replace(/^\.|\.$/gm, "");
|
@@ -48,7 +48,7 @@ function packetToBytes(packet) {
|
|
48
48
|
let offset = 0;
|
49
49
|
const list = value.split(".");
|
50
50
|
for (let i = 0; i < list.length; i++) {
|
51
|
-
const encoded =
|
51
|
+
const encoded = _chunkP5JTF7JSjs.toBytes.call(void 0, list[i]);
|
52
52
|
bytes[offset] = encoded.length;
|
53
53
|
bytes.set(encoded, offset + 1);
|
54
54
|
offset += encoded.length + 1;
|
@@ -69,13 +69,13 @@ async function getEnsAddress(client, {
|
|
69
69
|
throw new Error(
|
70
70
|
"client chain not configured. universalResolverAddress is required."
|
71
71
|
);
|
72
|
-
universalResolverAddress =
|
72
|
+
universalResolverAddress = _chunkP5JTF7JSjs.getChainContractAddress.call(void 0, {
|
73
73
|
blockNumber,
|
74
74
|
chain: client.chain,
|
75
75
|
contract: "ensUniversalResolver"
|
76
76
|
});
|
77
77
|
}
|
78
|
-
const res = await
|
78
|
+
const res = await _chunkP5JTF7JSjs.readContract.call(void 0, client, {
|
79
79
|
address: universalResolverAddress,
|
80
80
|
abi: [
|
81
81
|
{
|
@@ -94,8 +94,8 @@ async function getEnsAddress(client, {
|
|
94
94
|
],
|
95
95
|
functionName: "resolve",
|
96
96
|
args: [
|
97
|
-
|
98
|
-
|
97
|
+
_chunkP5JTF7JSjs.toHex.call(void 0, packetToBytes(name)),
|
98
|
+
_chunkP5JTF7JSjs.encodeFunctionData.call(void 0, {
|
99
99
|
abi: [
|
100
100
|
{
|
101
101
|
name: "addr",
|
@@ -112,7 +112,7 @@ async function getEnsAddress(client, {
|
|
112
112
|
blockNumber,
|
113
113
|
blockTag
|
114
114
|
});
|
115
|
-
return
|
115
|
+
return _chunkP5JTF7JSjs.decodeFunctionResult.call(void 0, {
|
116
116
|
abi: [
|
117
117
|
{
|
118
118
|
name: "addr",
|
@@ -140,7 +140,7 @@ async function getEnsName(client, {
|
|
140
140
|
throw new Error(
|
141
141
|
"client chain not configured. universalResolverAddress is required."
|
142
142
|
);
|
143
|
-
universalResolverAddress =
|
143
|
+
universalResolverAddress = _chunkP5JTF7JSjs.getChainContractAddress.call(void 0, {
|
144
144
|
blockNumber,
|
145
145
|
chain: client.chain,
|
146
146
|
contract: "ensUniversalResolver"
|
@@ -148,7 +148,7 @@ async function getEnsName(client, {
|
|
148
148
|
}
|
149
149
|
const reverseNode = `${address.toLowerCase().substring(2)}.addr.reverse`;
|
150
150
|
try {
|
151
|
-
const res = await
|
151
|
+
const res = await _chunkP5JTF7JSjs.readContract.call(void 0, client, {
|
152
152
|
address: universalResolverAddress,
|
153
153
|
abi: [
|
154
154
|
{
|
@@ -165,13 +165,13 @@ async function getEnsName(client, {
|
|
165
165
|
}
|
166
166
|
],
|
167
167
|
functionName: "reverse",
|
168
|
-
args: [
|
168
|
+
args: [_chunkP5JTF7JSjs.toHex.call(void 0, packetToBytes(reverseNode))],
|
169
169
|
blockNumber,
|
170
170
|
blockTag
|
171
171
|
});
|
172
172
|
return res[0];
|
173
173
|
} catch (error) {
|
174
|
-
if (error instanceof
|
174
|
+
if (error instanceof _chunkP5JTF7JSjs.ContractFunctionExecutionError && error.cause.reason === _chunkP5JTF7JSjs.panicReasons[50])
|
175
175
|
return null;
|
176
176
|
throw error;
|
177
177
|
}
|
@@ -183,4 +183,4 @@ async function getEnsName(client, {
|
|
183
183
|
|
184
184
|
|
185
185
|
exports.labelhash = labelhash; exports.namehash = namehash; exports.getEnsAddress = getEnsAddress; exports.getEnsName = getEnsName;
|
186
|
-
//# sourceMappingURL=chunk-
|
186
|
+
//# sourceMappingURL=chunk-TZWWCJQ5.js.map
|
package/dist/contract.d.ts
CHANGED
@@ -1,9 +1,9 @@
|
|
1
|
-
export { m as CreateContractEventFilterParameters, n as CreateContractEventFilterReturnType, V as DeployContractParameters, X as DeployContractReturnType, o as EstimateContractGasParameters, p as EstimateContractGasReturnType, G as GetBytecodeParameters, q as GetBytecodeReturnType, r as GetStorageAtParameters, s as GetStorageAtReturnType, M as MulticallParameters, t as MulticallReturnType, O as OnLogsFn, u as OnLogsParameter, R as ReadContractParameters, v as ReadContractReturnType, w as SimulateContractParameters, x as SimulateContractReturnType, y as WatchContractEventParameters, Y as WriteContractParameters, Z as WriteContractReturnType, z as createContractEventFilter, _ as deployContract, D as estimateContractGas, H as getBytecode, I as getStorageAt, K as multicall, N as readContract, Q as simulateContract, U as watchContractEvent, $ as writeContract } from './createPublicClient-
|
2
|
-
export { D as DecodeAbiParametersReturnType, E as EncodeAbiParametersReturnType, G as GetAbiItemParameters, d as decodeAbiParameters, e as encodeAbiParameters, g as getAbiItem } from './getAbiItem-
|
3
|
-
export { D as DecodeErrorResultParameters, a as DecodeErrorResultReturnType, b as DecodeEventLogParameters, c as DecodeEventLogReturnType, d as DecodeFunctionDataParameters, e as DecodeFunctionResultParameters, f as DecodeFunctionResultReturnType, E as EncodeDeployDataParameters, g as EncodeErrorResultParameters, h as EncodeEventTopicsParameters, i as EncodeFunctionDataParameters, j as EncodeFunctionResultParameters, k as decodeErrorResult, l as decodeEventLog, m as decodeFunctionData, n as decodeFunctionResult, o as encodeDeployData, p as encodeErrorResult, q as encodeEventTopics, r as encodeFunctionData, s as encodeFunctionResult } from './encodeFunctionResult-
|
4
|
-
export { a as formatAbiItem, f as formatAbiItemWithArgs } from './formatAbiItem-
|
5
|
-
import './eip1193-
|
1
|
+
export { m as CreateContractEventFilterParameters, n as CreateContractEventFilterReturnType, V as DeployContractParameters, X as DeployContractReturnType, o as EstimateContractGasParameters, p as EstimateContractGasReturnType, G as GetBytecodeParameters, q as GetBytecodeReturnType, r as GetStorageAtParameters, s as GetStorageAtReturnType, M as MulticallParameters, t as MulticallReturnType, O as OnLogsFn, u as OnLogsParameter, R as ReadContractParameters, v as ReadContractReturnType, w as SimulateContractParameters, x as SimulateContractReturnType, y as WatchContractEventParameters, Y as WriteContractParameters, Z as WriteContractReturnType, z as createContractEventFilter, _ as deployContract, D as estimateContractGas, H as getBytecode, I as getStorageAt, K as multicall, N as readContract, Q as simulateContract, U as watchContractEvent, $ as writeContract } from './createPublicClient-812a1dae.js';
|
2
|
+
export { D as DecodeAbiParametersReturnType, E as EncodeAbiParametersReturnType, G as GetAbiItemParameters, d as decodeAbiParameters, e as encodeAbiParameters, g as getAbiItem } from './getAbiItem-779cb566.js';
|
3
|
+
export { D as DecodeErrorResultParameters, a as DecodeErrorResultReturnType, b as DecodeEventLogParameters, c as DecodeEventLogReturnType, d as DecodeFunctionDataParameters, e as DecodeFunctionResultParameters, f as DecodeFunctionResultReturnType, E as EncodeDeployDataParameters, g as EncodeErrorResultParameters, h as EncodeEventTopicsParameters, i as EncodeFunctionDataParameters, j as EncodeFunctionResultParameters, k as decodeErrorResult, l as decodeEventLog, m as decodeFunctionData, n as decodeFunctionResult, o as encodeDeployData, p as encodeErrorResult, q as encodeEventTopics, r as encodeFunctionData, s as encodeFunctionResult } from './encodeFunctionResult-e491eb56.js';
|
4
|
+
export { a as formatAbiItem, f as formatAbiItemWithArgs } from './formatAbiItem-29a73545.js';
|
5
|
+
import './eip1193-44504199.js';
|
6
6
|
import 'abitype';
|
7
|
-
import './chain-
|
7
|
+
import './chain-0ce17567.js';
|
8
8
|
import '@wagmi/chains';
|
9
|
-
import './createClient-
|
9
|
+
import './createClient-98b1c2e7.js';
|
package/dist/contract.js
CHANGED
@@ -23,7 +23,7 @@
|
|
23
23
|
|
24
24
|
|
25
25
|
|
26
|
-
var
|
26
|
+
var _chunkP5JTF7JSjs = require('./chunk-P5JTF7JS.js');
|
27
27
|
|
28
28
|
|
29
29
|
|
@@ -49,5 +49,5 @@ var _chunk3FWCHYKEjs = require('./chunk-3FWCHYKE.js');
|
|
49
49
|
|
50
50
|
|
51
51
|
|
52
|
-
exports.createContractEventFilter =
|
52
|
+
exports.createContractEventFilter = _chunkP5JTF7JSjs.createContractEventFilter; exports.decodeAbiParameters = _chunkP5JTF7JSjs.decodeAbiParameters; exports.decodeErrorResult = _chunkP5JTF7JSjs.decodeErrorResult; exports.decodeEventLog = _chunkP5JTF7JSjs.decodeEventLog; exports.decodeFunctionData = _chunkP5JTF7JSjs.decodeFunctionData; exports.decodeFunctionResult = _chunkP5JTF7JSjs.decodeFunctionResult; exports.deployContract = _chunkP5JTF7JSjs.deployContract; exports.encodeAbiParameters = _chunkP5JTF7JSjs.encodeAbiParameters; exports.encodeDeployData = _chunkP5JTF7JSjs.encodeDeployData; exports.encodeErrorResult = _chunkP5JTF7JSjs.encodeErrorResult; exports.encodeEventTopics = _chunkP5JTF7JSjs.encodeEventTopics; exports.encodeFunctionData = _chunkP5JTF7JSjs.encodeFunctionData; exports.encodeFunctionResult = _chunkP5JTF7JSjs.encodeFunctionResult; exports.estimateContractGas = _chunkP5JTF7JSjs.estimateContractGas; exports.formatAbiItem = _chunkP5JTF7JSjs.formatAbiItem; exports.formatAbiItemWithArgs = _chunkP5JTF7JSjs.formatAbiItemWithArgs; exports.getAbiItem = _chunkP5JTF7JSjs.getAbiItem; exports.getBytecode = _chunkP5JTF7JSjs.getBytecode; exports.getStorageAt = _chunkP5JTF7JSjs.getStorageAt; exports.multicall = _chunkP5JTF7JSjs.multicall; exports.readContract = _chunkP5JTF7JSjs.readContract; exports.simulateContract = _chunkP5JTF7JSjs.simulateContract; exports.watchContractEvent = _chunkP5JTF7JSjs.watchContractEvent; exports.writeContract = _chunkP5JTF7JSjs.writeContract;
|
53
53
|
//# sourceMappingURL=contract.js.map
|
package/dist/contract.mjs
CHANGED
@@ -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-44504199.js';
|
2
|
+
import { C as Chain } from './chain-0ce17567.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-44504199.js';
|
2
|
+
import { a as Transport, b as ClientConfig, C as Client } from './createClient-98b1c2e7.js';
|
3
3
|
import { Abi, Narrow, Address, AbiEvent, ExtractAbiEvent, TypedData, TypedDataDomain, TypedDataToPrimitiveTypes } from 'abitype';
|
4
|
-
import { C as Chain, H as Hex, Q as ExtractConstructorArgsFromAbi, I as ExtractFormatter, S as Formatters, V as Formatter, J as Formatted, c as Block, R as RpcBlock, y as Transaction, T as TransactionReceipt, q as RpcTransactionReceipt, W as TransactionType, r as RpcTransactionRequest, t as TransactionRequest, f as BlockTag, X as MergeIntersectionProperties, g as ContractConfig, Y as GetValue, Z as ExtractResultFromAbi, _ as MaybeAbiEventName, $ as MaybeExtractEventArgsFromAbi, e as BlockNumber, a0 as ExtractEventNameFromAbi, a as Hash, F as FeeHistory, L as Log, K as FormattedTransaction, M as TransactionFormatter, a1 as ExtractEventArgsFromAbi, a2 as Prettify } from './chain-
|
4
|
+
import { C as Chain, H as Hex, Q as ExtractConstructorArgsFromAbi, I as ExtractFormatter, S as Formatters, V as Formatter, J as Formatted, c as Block, R as RpcBlock, y as Transaction, T as TransactionReceipt, q as RpcTransactionReceipt, W as TransactionType, r as RpcTransactionRequest, t as TransactionRequest, f as BlockTag, X as MergeIntersectionProperties, g as ContractConfig, Y as GetValue, Z as ExtractResultFromAbi, _ as MaybeAbiEventName, $ as MaybeExtractEventArgsFromAbi, e as BlockNumber, a0 as ExtractEventNameFromAbi, a as Hash, F as FeeHistory, L as Log, K as FormattedTransaction, M as TransactionFormatter, a1 as ExtractEventArgsFromAbi, a2 as Prettify } from './chain-0ce17567.js';
|
5
5
|
|
6
6
|
type AddChainParameters = {
|
7
7
|
chain: Chain;
|
@@ -1,5 +1,5 @@
|
|
1
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,
|
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, ab as LogTopic, p as RpcTransaction, q as RpcTransactionReceipt, s as RpcUncle } from './chain-0ce17567.js';
|
3
3
|
|
4
4
|
declare class RpcError extends Error {
|
5
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, a0 as ExtractEventNameFromAbi, a7 as ExtractEventArgsFromTopics, a8 as ExtractFunctionNameFromAbi, a6 as ExtractArgsFromAbi, Z as ExtractResultFromAbi, Q as ExtractConstructorArgsFromAbi, a9 as ExtractErrorNameFromAbi, aa as ExtractErrorArgsFromAbi, a1 as ExtractEventArgsFromAbi } from './chain-0ce17567.js';
|
3
3
|
|
4
4
|
type DecodeErrorResultParameters = {
|
5
5
|
abi?: Abi;
|
@@ -12,16 +12,16 @@ type DecodeErrorResultReturnType = {
|
|
12
12
|
};
|
13
13
|
declare function decodeErrorResult({ abi, data, }: DecodeErrorResultParameters): DecodeErrorResultReturnType;
|
14
14
|
|
15
|
-
type DecodeEventLogParameters<TAbi extends Abi | readonly unknown[] = Abi, TEventName extends string = string, TTopics extends
|
15
|
+
type DecodeEventLogParameters<TAbi extends Abi | readonly unknown[] = Abi, TEventName extends string = string, TTopics extends Hex[] = Hex[], TData extends Hex | undefined = undefined> = {
|
16
16
|
abi: Narrow<TAbi>;
|
17
17
|
data?: TData;
|
18
18
|
eventName?: ExtractEventNameFromAbi<TAbi, TEventName>;
|
19
19
|
topics: [signature: Hex, ...args: TTopics];
|
20
20
|
};
|
21
|
-
type DecodeEventLogReturnType<TAbi extends Abi | readonly unknown[] = Abi, TEventName extends string = string, TTopics extends
|
21
|
+
type DecodeEventLogReturnType<TAbi extends Abi | readonly unknown[] = Abi, TEventName extends string = string, TTopics extends Hex[] = Hex[], TData extends Hex | undefined = undefined> = {
|
22
22
|
eventName: TEventName;
|
23
23
|
} & ExtractEventArgsFromTopics<TAbi, TEventName, TTopics, TData>;
|
24
|
-
declare function decodeEventLog<TAbi extends Abi | readonly unknown[], TEventName extends string, TTopics extends
|
24
|
+
declare function decodeEventLog<TAbi extends Abi | readonly unknown[], TEventName extends string, TTopics extends Hex[], TData extends Hex | undefined = undefined>({ abi, data, topics, }: DecodeEventLogParameters<TAbi, TEventName, TTopics, TData>): DecodeEventLogReturnType<TAbi, TEventName, TTopics, TData>;
|
25
25
|
|
26
26
|
type DecodeFunctionDataParameters = {
|
27
27
|
abi: Abi | readonly unknown[];
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { Narrow, SolidityAddress, SolidityBool, SolidityBytes, SolidityInt, SolidityString, SolidityArrayWithoutTuple, AbiType, AbiParameterToPrimitiveType } from 'abitype';
|
2
|
-
import { H as Hex } from './chain-
|
2
|
+
import { H as Hex } from './chain-0ce17567.js';
|
3
3
|
|
4
4
|
type PackedAbiType = SolidityAddress | SolidityBool | SolidityBytes | SolidityInt | SolidityString | SolidityArrayWithoutTuple;
|
5
5
|
type EncodePackedValues<TPackedAbiTypes extends PackedAbiType[] | unknown[]> = {
|
package/dist/ens.d.ts
CHANGED
@@ -1,10 +1,10 @@
|
|
1
|
-
export { a0 as GetEnsAddressParameters, a1 as GetEnsNameParameters, a2 as getEnsAddress, a3 as getEnsName } from './createPublicClient-
|
1
|
+
export { a0 as GetEnsAddressParameters, a1 as GetEnsNameParameters, a2 as getEnsAddress, a3 as getEnsName } from './createPublicClient-812a1dae.js';
|
2
2
|
export { l as labelhash, n as namehash } from './namehash-afff0feb.js';
|
3
|
-
import './eip1193-
|
3
|
+
import './eip1193-44504199.js';
|
4
4
|
import 'abitype';
|
5
|
-
import './chain-
|
5
|
+
import './chain-0ce17567.js';
|
6
6
|
import '@wagmi/chains';
|
7
|
-
import './createClient-
|
7
|
+
import './createClient-98b1c2e7.js';
|
8
8
|
|
9
9
|
/**
|
10
10
|
* @description Normalizes ENS name
|
package/dist/ens.js
CHANGED
@@ -3,8 +3,8 @@
|
|
3
3
|
|
4
4
|
|
5
5
|
|
6
|
-
var
|
7
|
-
require('./chunk-
|
6
|
+
var _chunkTZWWCJQ5js = require('./chunk-TZWWCJQ5.js');
|
7
|
+
require('./chunk-P5JTF7JS.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 = _chunkTZWWCJQ5js.getEnsAddress; exports.getEnsName = _chunkTZWWCJQ5js.getEnsName; exports.labelhash = _chunkTZWWCJQ5js.labelhash; exports.namehash = _chunkTZWWCJQ5js.namehash; exports.normalize = normalize;
|
21
21
|
//# sourceMappingURL=ens.js.map
|
package/dist/ens.mjs
CHANGED
package/dist/ethers.d.ts
CHANGED
@@ -1,9 +1,9 @@
|
|
1
|
-
import { A as Account } from './createPublicClient-
|
2
|
-
import './eip1193-
|
1
|
+
import { A as Account } from './createPublicClient-812a1dae.js';
|
2
|
+
import './eip1193-44504199.js';
|
3
3
|
import 'abitype';
|
4
|
-
import './chain-
|
4
|
+
import './chain-0ce17567.js';
|
5
5
|
import '@wagmi/chains';
|
6
|
-
import './createClient-
|
6
|
+
import './createClient-98b1c2e7.js';
|
7
7
|
|
8
8
|
type BigNumberish = string | number | bigint;
|
9
9
|
type BytesLike = string | Uint8Array;
|
package/dist/ethers.js
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }
|
2
2
|
|
3
3
|
|
4
|
-
var
|
4
|
+
var _chunkP5JTF7JSjs = require('./chunk-P5JTF7JS.js');
|
5
5
|
|
6
6
|
// src/adapters/ethers.ts
|
7
|
-
var getAccount2 = (wallet) =>
|
7
|
+
var getAccount2 = (wallet) => _chunkP5JTF7JSjs.getAccount.call(void 0, {
|
8
8
|
address: wallet.address,
|
9
9
|
async signMessage(message) {
|
10
|
-
return await wallet.signMessage(
|
10
|
+
return await wallet.signMessage(_chunkP5JTF7JSjs.toBytes.call(void 0, message));
|
11
11
|
},
|
12
12
|
async signTransaction(txn) {
|
13
13
|
return await wallet.signTransaction({
|
package/dist/ethers.mjs
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
import { AbiParameter, AbiParametersToPrimitiveTypes, Narrow, Abi } from 'abitype';
|
2
|
-
import { H as Hex, a5 as ExtractNameFromAbi, a6 as ExtractArgsFromAbi } from './chain-
|
2
|
+
import { H as Hex, a5 as ExtractNameFromAbi, a6 as ExtractArgsFromAbi } from './chain-0ce17567.js';
|
3
3
|
|
4
4
|
type DecodeAbiParametersReturnType<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): DecodeAbiParametersReturnType<TParams>;
|
package/dist/index.d.ts
CHANGED
@@ -1,19 +1,20 @@
|
|
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 { B as BaseError, H as HttpOptions, R as RpcResponse } from './parseGwei-
|
4
|
-
export { B as BaseError, C as CallExecutionError, a as ContractFunctionExecutionError, b as ContractFunctionRevertedError, c as ContractFunctionZeroDataError, E as EstimateGasExecutionError, d as ExecutionRevertedError, F as FeeCapTooHighError, e as FeeCapTooLowError, G as GetContractAddressOptions, o as GetCreate2AddressOptions, p as GetCreateAddressOptions, I as InsufficientFundsError, f as IntrinsicGasTooHighError, g as IntrinsicGasTooLowError, N as NonceMaxValueError, h as NonceTooHighError, i as NonceTooLowError, j as RawContractError, T as TipAboveFeeCapError, q as ToRlpReturnType, k as TransactionExecutionError, m as TransactionNotFoundError, n as TransactionReceiptNotFoundError, l as TransactionTypeNotSupportedError, U as UnknownNodeError, W as WaitForTransactionReceiptTimeoutError, r as boolToBytes, s as boolToHex, t as bytesToBigint, u as bytesToBool, v as bytesToHex, w as bytesToNumber, x as bytesToString, y as concat, z as concatBytes, A as concatHex, D as formatEther, J as formatGwei, K as formatUnits, L as fromBytes, M as fromHex, O as fromRlp, P as getAccount, Q as getAddress, S as getContractAddress, V as getContractError, X as getCreate2Address, Y as getCreateAddress, Z as getEventSelector, _ as getFunctionSelector, $ as hexToBigInt, a0 as hexToBool, a1 as hexToBytes, a2 as hexToNumber, a3 as hexToString, a4 as isAddress, a5 as isAddressEqual, a6 as isBytes, a7 as isHex, a8 as keccak256, a9 as numberToBytes, aa as numberToHex, ab as pad, ac as padBytes, ad as padHex, ae as parseEther, af as parseGwei, ag as parseUnits, ah as size, ai as slice, aj as sliceBytes, ak as sliceHex, al as stringToBytes, am as stringToHex, an as stringify, ao as toBytes, ap as toHex, aq as toRlp, ar as trim } from './parseGwei-
|
1
|
+
import { T as TransportConfig, a as Transport, B as BaseRpcRequests } from './createClient-98b1c2e7.js';
|
2
|
+
export { C as Client, b as ClientConfig, a as Transport, T as TransportConfig, c as createClient, d as createTransport } from './createClient-98b1c2e7.js';
|
3
|
+
import { B as BaseError, H as HttpOptions, R as RpcResponse } from './parseGwei-75956089.js';
|
4
|
+
export { B as BaseError, C as CallExecutionError, a as ContractFunctionExecutionError, b as ContractFunctionRevertedError, c as ContractFunctionZeroDataError, E as EstimateGasExecutionError, d as ExecutionRevertedError, F as FeeCapTooHighError, e as FeeCapTooLowError, G as GetContractAddressOptions, o as GetCreate2AddressOptions, p as GetCreateAddressOptions, I as InsufficientFundsError, f as IntrinsicGasTooHighError, g as IntrinsicGasTooLowError, N as NonceMaxValueError, h as NonceTooHighError, i as NonceTooLowError, j as RawContractError, T as TipAboveFeeCapError, q as ToRlpReturnType, k as TransactionExecutionError, m as TransactionNotFoundError, n as TransactionReceiptNotFoundError, l as TransactionTypeNotSupportedError, U as UnknownNodeError, W as WaitForTransactionReceiptTimeoutError, r as boolToBytes, s as boolToHex, t as bytesToBigint, u as bytesToBool, v as bytesToHex, w as bytesToNumber, x as bytesToString, y as concat, z as concatBytes, A as concatHex, D as formatEther, J as formatGwei, K as formatUnits, L as fromBytes, M as fromHex, O as fromRlp, P as getAccount, Q as getAddress, S as getContractAddress, V as getContractError, X as getCreate2Address, Y as getCreateAddress, Z as getEventSelector, _ as getFunctionSelector, $ as hexToBigInt, a0 as hexToBool, a1 as hexToBytes, a2 as hexToNumber, a3 as hexToString, a4 as isAddress, a5 as isAddressEqual, a6 as isBytes, a7 as isHex, a8 as keccak256, a9 as numberToBytes, aa as numberToHex, ab as pad, ac as padBytes, ad as padHex, ae as parseEther, af as parseGwei, ag as parseUnits, ah as size, ai as slice, aj as sliceBytes, ak as sliceHex, al as stringToBytes, am as stringToHex, an as stringify, ao as toBytes, ap as toHex, aq as toRlp, ar as trim } from './parseGwei-75956089.js';
|
5
5
|
import WebSocket from 'isomorphic-ws';
|
6
|
-
import { H as Hex, a as Hash, C as Chain, B as ByteArray } from './chain-
|
7
|
-
export { A as AbiItem, b as AccessList, c as Block, d as BlockIdentifier, e as BlockNumber, f as BlockTag, B as ByteArray, C as Chain, g as ContractConfig, 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-
|
8
|
-
export { A as Account, B as BlockFormatter, F as FormattedBlock, e as FormattedTransactionReceipt, f as FormattedTransactionRequest, J as JsonRpcAccount, L as LocalAccount, P as PublicClient, a as PublicClientConfig, T as TransactionReceiptFormatter, g as TransactionRequestFormatter, W as WalletClient, b as WalletClientConfig, c as createPublicClient, d as createWalletClient, h as defineBlock, i as defineTransactionReceipt, j as defineTransactionRequest, k as formatBlock, l as formatTransactionRequest } from './createPublicClient-
|
9
|
-
export { T as TestClient, a as TestClientConfig, c as createTestClient } from './test-
|
6
|
+
import { H as Hex, A as AbiItem, a as Hash, C as Chain, B as ByteArray } from './chain-0ce17567.js';
|
7
|
+
export { A as AbiItem, b as AccessList, c as Block, d as BlockIdentifier, e as BlockNumber, f as BlockTag, B as ByteArray, C as Chain, g as ContractConfig, 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-0ce17567.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-812a1dae.js';
|
9
|
+
export { T as TestClient, a as TestClientConfig, c as createTestClient } from './test-d0a36452.js';
|
10
|
+
import { AbiParameter } from 'abitype';
|
10
11
|
export { Address, ParseAbi, ParseAbiItem, ParseAbiParameter, ParseAbiParameters, parseAbi, parseAbiItem, parseAbiParameter, parseAbiParameters } from 'abitype';
|
11
12
|
export { l as labelhash, n as namehash } from './namehash-afff0feb.js';
|
12
|
-
export { D as DecodeAbiParametersReturnType, E as EncodeAbiParametersReturnType, G as GetAbiItemParameters, d as decodeAbiParameters, e as encodeAbiParameters, g as getAbiItem } from './getAbiItem-
|
13
|
-
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-
|
14
|
-
export { e as encodePacked } from './encodePacked-
|
15
|
-
export { d as defineChain } from './chain-
|
16
|
-
import './eip1193-
|
13
|
+
export { D as DecodeAbiParametersReturnType, E as EncodeAbiParametersReturnType, G as GetAbiItemParameters, d as decodeAbiParameters, e as encodeAbiParameters, g as getAbiItem } from './getAbiItem-779cb566.js';
|
14
|
+
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-e491eb56.js';
|
15
|
+
export { e as encodePacked } from './encodePacked-d7942f6b.js';
|
16
|
+
export { d as defineChain } from './chain-5b8fb5eb.js';
|
17
|
+
import './eip1193-44504199.js';
|
17
18
|
import '@wagmi/chains';
|
18
19
|
|
19
20
|
declare class AbiConstructorNotFoundError extends BaseError {
|
@@ -99,6 +100,15 @@ declare class AbiFunctionSignatureNotFoundError extends BaseError {
|
|
99
100
|
docsPath: string;
|
100
101
|
});
|
101
102
|
}
|
103
|
+
declare class DecodeLogTopicsMismatch extends BaseError {
|
104
|
+
name: string;
|
105
|
+
constructor({ abiItem, param, }: {
|
106
|
+
abiItem: AbiItem;
|
107
|
+
param: AbiParameter & {
|
108
|
+
indexed: boolean;
|
109
|
+
};
|
110
|
+
});
|
111
|
+
}
|
102
112
|
declare class InvalidAbiEncodingTypeError extends BaseError {
|
103
113
|
name: string;
|
104
114
|
constructor(type: string, { docsPath }: {
|
@@ -485,4 +495,4 @@ declare const weiUnits: {
|
|
485
495
|
gwei: number;
|
486
496
|
};
|
487
497
|
|
488
|
-
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 };
|
498
|
+
export { AbiConstructorNotFoundError, AbiConstructorParamsNotFoundError, AbiDecodingDataSizeInvalidError, AbiDecodingZeroDataError, AbiEncodingArrayLengthMismatchError, AbiEncodingLengthMismatchError, AbiErrorInputsNotFoundError, AbiErrorNotFoundError, AbiErrorSignatureNotFoundError, AbiEventNotFoundError, AbiEventSignatureNotFoundError, AbiFunctionNotFoundError, AbiFunctionOutputsNotFoundError, AbiFunctionSignatureNotFoundError, BlockNotFoundError, ChainDoesNotSupportContract, CustomTransport, CustomTransportConfig, DataLengthTooLongError, DataLengthTooShortError, DecodeLogTopicsMismatch, 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 };
|