viem 0.1.13 → 0.1.15
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-3a97fb0b.d.ts} +2 -2
- package/dist/{chain-41dcec4b.d.ts → chain-94e42876.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-3FWCHYKE.js → chunk-BDYQ746J.js} +103 -74
- package/dist/chunk-BDYQ746J.js.map +1 -0
- package/dist/{chunk-S4MOKUQW.mjs → chunk-CTM2Y4HV.mjs} +102 -73
- package/dist/chunk-CTM2Y4HV.mjs.map +1 -0
- package/dist/{chunk-65E5HTFA.js → chunk-FBE36F5T.js} +19 -19
- package/dist/{chunk-BJPR4EAT.mjs → chunk-WUKEVVZO.mjs} +2 -2
- 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-ddc3fa22.d.ts} +2 -2
- package/dist/{createPublicClient-34d3ba9d.d.ts → createPublicClient-6792b8e9.d.ts} +3 -3
- package/dist/{eip1193-2f116cf7.d.ts → eip1193-343f2a94.d.ts} +1 -1
- package/dist/{encodeFunctionResult-874fe003.d.ts → encodeFunctionResult-4d3bafb8.d.ts} +5 -5
- package/dist/{encodePacked-9ab98aa9.d.ts → encodePacked-a51cd55a.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-e5d7437a.d.ts} +1 -1
- package/dist/{getAbiItem-f19d50a2.d.ts → getAbiItem-de2d6ac0.d.ts} +1 -1
- package/dist/index.d.ts +30 -14
- package/dist/index.js +94 -90
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +6 -2
- package/dist/index.mjs.map +1 -1
- package/dist/{parseGwei-a35c7c87.d.ts → parseGwei-21da474e.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-07a99259.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-65E5HTFA.js.map → chunk-FBE36F5T.js.map} +0 -0
- /package/dist/{chunk-BJPR4EAT.mjs.map → chunk-WUKEVVZO.mjs.map} +0 -0
@@ -11,27 +11,27 @@
|
|
11
11
|
|
12
12
|
|
13
13
|
|
14
|
-
var
|
14
|
+
var _chunkBDYQ746Jjs = require('./chunk-BDYQ746J.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 _chunkBDYQ746Jjs.bytesToHex.call(void 0, result);
|
21
|
+
return _chunkBDYQ746Jjs.keccak256.call(void 0, _chunkBDYQ746Jjs.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 _chunkBDYQ746Jjs.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 = _chunkBDYQ746Jjs.keccak256.call(void 0, _chunkBDYQ746Jjs.stringToBytes.call(void 0, labels[i]), "bytes");
|
32
|
+
result = _chunkBDYQ746Jjs.keccak256.call(void 0, _chunkBDYQ746Jjs.concat.call(void 0, [result, hashed]), "bytes");
|
33
33
|
}
|
34
|
-
return
|
34
|
+
return _chunkBDYQ746Jjs.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 _chunkBDYQ746Jjs.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 = _chunkBDYQ746Jjs.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 = _chunkBDYQ746Jjs.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 _chunkBDYQ746Jjs.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
|
+
_chunkBDYQ746Jjs.toHex.call(void 0, packetToBytes(name)),
|
98
|
+
_chunkBDYQ746Jjs.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 _chunkBDYQ746Jjs.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 = _chunkBDYQ746Jjs.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 _chunkBDYQ746Jjs.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: [_chunkBDYQ746Jjs.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 _chunkBDYQ746Jjs.ContractFunctionExecutionError && error.cause.reason === _chunkBDYQ746Jjs.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-FBE36F5T.js.map
|
@@ -11,7 +11,7 @@ import {
|
|
11
11
|
stringToBytes,
|
12
12
|
toBytes,
|
13
13
|
toHex
|
14
|
-
} from "./chunk-
|
14
|
+
} from "./chunk-CTM2Y4HV.mjs";
|
15
15
|
|
16
16
|
// src/utils/ens/labelhash.ts
|
17
17
|
function labelhash(label) {
|
@@ -183,4 +183,4 @@ export {
|
|
183
183
|
getEnsAddress,
|
184
184
|
getEnsName
|
185
185
|
};
|
186
|
-
//# sourceMappingURL=chunk-
|
186
|
+
//# sourceMappingURL=chunk-WUKEVVZO.mjs.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-6792b8e9.js';
|
2
|
+
export { D as DecodeAbiParametersReturnType, E as EncodeAbiParametersReturnType, G as GetAbiItemParameters, d as decodeAbiParameters, e as encodeAbiParameters, g as getAbiItem } from './getAbiItem-de2d6ac0.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-4d3bafb8.js';
|
4
|
+
export { a as formatAbiItem, f as formatAbiItemWithArgs } from './formatAbiItem-e5d7437a.js';
|
5
|
+
import './eip1193-343f2a94.js';
|
6
6
|
import 'abitype';
|
7
|
-
import './chain-
|
7
|
+
import './chain-3a97fb0b.js';
|
8
8
|
import '@wagmi/chains';
|
9
|
-
import './createClient-
|
9
|
+
import './createClient-ddc3fa22.js';
|
package/dist/contract.js
CHANGED
@@ -23,7 +23,7 @@
|
|
23
23
|
|
24
24
|
|
25
25
|
|
26
|
-
var
|
26
|
+
var _chunkBDYQ746Jjs = require('./chunk-BDYQ746J.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 = _chunkBDYQ746Jjs.createContractEventFilter; exports.decodeAbiParameters = _chunkBDYQ746Jjs.decodeAbiParameters; exports.decodeErrorResult = _chunkBDYQ746Jjs.decodeErrorResult; exports.decodeEventLog = _chunkBDYQ746Jjs.decodeEventLog; exports.decodeFunctionData = _chunkBDYQ746Jjs.decodeFunctionData; exports.decodeFunctionResult = _chunkBDYQ746Jjs.decodeFunctionResult; exports.deployContract = _chunkBDYQ746Jjs.deployContract; exports.encodeAbiParameters = _chunkBDYQ746Jjs.encodeAbiParameters; exports.encodeDeployData = _chunkBDYQ746Jjs.encodeDeployData; exports.encodeErrorResult = _chunkBDYQ746Jjs.encodeErrorResult; exports.encodeEventTopics = _chunkBDYQ746Jjs.encodeEventTopics; exports.encodeFunctionData = _chunkBDYQ746Jjs.encodeFunctionData; exports.encodeFunctionResult = _chunkBDYQ746Jjs.encodeFunctionResult; exports.estimateContractGas = _chunkBDYQ746Jjs.estimateContractGas; exports.formatAbiItem = _chunkBDYQ746Jjs.formatAbiItem; exports.formatAbiItemWithArgs = _chunkBDYQ746Jjs.formatAbiItemWithArgs; exports.getAbiItem = _chunkBDYQ746Jjs.getAbiItem; exports.getBytecode = _chunkBDYQ746Jjs.getBytecode; exports.getStorageAt = _chunkBDYQ746Jjs.getStorageAt; exports.multicall = _chunkBDYQ746Jjs.multicall; exports.readContract = _chunkBDYQ746Jjs.readContract; exports.simulateContract = _chunkBDYQ746Jjs.simulateContract; exports.watchContractEvent = _chunkBDYQ746Jjs.watchContractEvent; exports.writeContract = _chunkBDYQ746Jjs.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-343f2a94.js';
|
2
|
+
import { C as Chain } from './chain-3a97fb0b.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-343f2a94.js';
|
2
|
+
import { a as Transport, b as ClientConfig, C as Client } from './createClient-ddc3fa22.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-3a97fb0b.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-3a97fb0b.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-3a97fb0b.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
|
-
topics: [signature: Hex, ...args: TTopics];
|
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-3a97fb0b.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-6792b8e9.js';
|
2
2
|
export { l as labelhash, n as namehash } from './namehash-afff0feb.js';
|
3
|
-
import './eip1193-
|
3
|
+
import './eip1193-343f2a94.js';
|
4
4
|
import 'abitype';
|
5
|
-
import './chain-
|
5
|
+
import './chain-3a97fb0b.js';
|
6
6
|
import '@wagmi/chains';
|
7
|
-
import './createClient-
|
7
|
+
import './createClient-ddc3fa22.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 _chunkFBE36F5Tjs = require('./chunk-FBE36F5T.js');
|
7
|
+
require('./chunk-BDYQ746J.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 = _chunkFBE36F5Tjs.getEnsAddress; exports.getEnsName = _chunkFBE36F5Tjs.getEnsName; exports.labelhash = _chunkFBE36F5Tjs.labelhash; exports.namehash = _chunkFBE36F5Tjs.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-6792b8e9.js';
|
2
|
+
import './eip1193-343f2a94.js';
|
3
3
|
import 'abitype';
|
4
|
-
import './chain-
|
4
|
+
import './chain-3a97fb0b.js';
|
5
5
|
import '@wagmi/chains';
|
6
|
-
import './createClient-
|
6
|
+
import './createClient-ddc3fa22.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 _chunkBDYQ746Jjs = require('./chunk-BDYQ746J.js');
|
5
5
|
|
6
6
|
// src/adapters/ethers.ts
|
7
|
-
var getAccount2 = (wallet) =>
|
7
|
+
var getAccount2 = (wallet) => _chunkBDYQ746Jjs.getAccount.call(void 0, {
|
8
8
|
address: wallet.address,
|
9
9
|
async signMessage(message) {
|
10
|
-
return await wallet.signMessage(
|
10
|
+
return await wallet.signMessage(_chunkBDYQ746Jjs.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-3a97fb0b.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-ddc3fa22.js';
|
2
|
+
export { C as Client, b as ClientConfig, a as Transport, T as TransportConfig, c as createClient, d as createTransport } from './createClient-ddc3fa22.js';
|
3
|
+
import { B as BaseError, H as HttpOptions, R as RpcResponse } from './parseGwei-21da474e.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-21da474e.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-3a97fb0b.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-3a97fb0b.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-6792b8e9.js';
|
9
|
+
export { T as TestClient, a as TestClientConfig, c as createTestClient } from './test-07a99259.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-de2d6ac0.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-4d3bafb8.js';
|
15
|
+
export { e as encodePacked } from './encodePacked-a51cd55a.js';
|
16
|
+
export { d as defineChain } from './chain-94e42876.js';
|
17
|
+
import './eip1193-343f2a94.js';
|
17
18
|
import '@wagmi/chains';
|
18
19
|
|
19
20
|
declare class AbiConstructorNotFoundError extends BaseError {
|
@@ -69,6 +70,12 @@ declare class AbiErrorSignatureNotFoundError extends BaseError {
|
|
69
70
|
docsPath: string;
|
70
71
|
});
|
71
72
|
}
|
73
|
+
declare class AbiEventSignatureEmptyTopicsError extends BaseError {
|
74
|
+
name: string;
|
75
|
+
constructor({ docsPath }: {
|
76
|
+
docsPath: string;
|
77
|
+
});
|
78
|
+
}
|
72
79
|
declare class AbiEventSignatureNotFoundError extends BaseError {
|
73
80
|
name: string;
|
74
81
|
constructor(signature: Hex, { docsPath }: {
|
@@ -99,6 +106,15 @@ declare class AbiFunctionSignatureNotFoundError extends BaseError {
|
|
99
106
|
docsPath: string;
|
100
107
|
});
|
101
108
|
}
|
109
|
+
declare class DecodeLogTopicsMismatch extends BaseError {
|
110
|
+
name: string;
|
111
|
+
constructor({ abiItem, param, }: {
|
112
|
+
abiItem: AbiItem;
|
113
|
+
param: AbiParameter & {
|
114
|
+
indexed: boolean;
|
115
|
+
};
|
116
|
+
});
|
117
|
+
}
|
102
118
|
declare class InvalidAbiEncodingTypeError extends BaseError {
|
103
119
|
name: string;
|
104
120
|
constructor(type: string, { docsPath }: {
|
@@ -485,4 +501,4 @@ declare const weiUnits: {
|
|
485
501
|
gwei: number;
|
486
502
|
};
|
487
503
|
|
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 };
|
504
|
+
export { AbiConstructorNotFoundError, AbiConstructorParamsNotFoundError, AbiDecodingDataSizeInvalidError, AbiDecodingZeroDataError, AbiEncodingArrayLengthMismatchError, AbiEncodingLengthMismatchError, AbiErrorInputsNotFoundError, AbiErrorNotFoundError, AbiErrorSignatureNotFoundError, AbiEventNotFoundError, AbiEventSignatureEmptyTopicsError, 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 };
|