viem 0.1.19 → 0.1.21
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.js +2 -2
- package/dist/abi.mjs +1 -1
- package/dist/chains.js +63 -63
- package/dist/chains.mjs +1 -1
- package/dist/{chunk-IHWYS4OQ.mjs → chunk-HZ3XNLWB.mjs} +15 -12
- package/dist/chunk-HZ3XNLWB.mjs.map +1 -0
- package/dist/{chunk-XMKUHSC7.js → chunk-M5K2FJOM.js} +15 -12
- package/dist/chunk-M5K2FJOM.js.map +1 -0
- package/dist/{chunk-5V5M3ZN3.mjs → chunk-PCOB33JR.mjs} +2 -2
- package/dist/chunk-PCOB33JR.mjs.map +1 -0
- package/dist/{chunk-5KPMXLJZ.js → chunk-YYL4XXAP.js} +19 -19
- package/dist/chunk-YYL4XXAP.js.map +1 -0
- package/dist/contract.d.ts +1 -1
- package/dist/contract.js +2 -2
- package/dist/contract.mjs +1 -1
- package/dist/{createPublicClient-0021fc35.d.ts → createPublicClient-75540130.d.ts} +2 -2
- package/dist/ens.d.ts +1 -1
- package/dist/ens.js +3 -3
- package/dist/ens.mjs +2 -2
- package/dist/ethers.d.ts +1 -1
- package/dist/ethers.js +3 -3
- package/dist/ethers.js.map +1 -1
- package/dist/ethers.mjs +1 -1
- package/dist/ethers.mjs.map +1 -1
- package/dist/index.d.ts +4 -4
- 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-c2fb9fa2.d.ts → parseGwei-6fff7cbe.d.ts} +1 -1
- package/dist/public.d.ts +1 -1
- package/dist/public.js +2 -2
- package/dist/public.mjs +1 -1
- package/dist/test.d.ts +3 -3
- package/dist/test.js +2 -2
- package/dist/test.mjs +1 -1
- package/dist/utils/index.d.ts +4 -4
- package/dist/utils/index.js +2 -2
- package/dist/utils/index.mjs +1 -1
- package/dist/wallet.d.ts +1 -1
- package/dist/wallet.js +2 -2
- package/dist/wallet.mjs +1 -1
- package/package.json +1 -1
- package/dist/chunk-5KPMXLJZ.js.map +0 -1
- package/dist/chunk-5V5M3ZN3.mjs.map +0 -1
- package/dist/chunk-IHWYS4OQ.mjs.map +0 -1
- package/dist/chunk-XMKUHSC7.js.map +0 -1
- package/dist/{test-a203fdee.d.ts → test-2bd23d7e.d.ts} +1 -1
@@ -11,7 +11,7 @@ import {
|
|
11
11
|
stringToBytes,
|
12
12
|
toBytes,
|
13
13
|
toHex
|
14
|
-
} from "./chunk-
|
14
|
+
} from "./chunk-HZ3XNLWB.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-PCOB33JR.mjs.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../src/utils/ens/labelhash.ts","../src/utils/ens/namehash.ts","../src/utils/ens/packetToBytes.ts","../src/actions/ens/getEnsAddress.ts","../src/actions/ens/getEnsName.ts"],"sourcesContent":["import { bytesToHex, stringToBytes } from '../encoding'\nimport { keccak256 } from '../hash'\n\n/**\n * @description Hashes ENS label\n *\n * - Since ENS labels prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to [normalize ENS labels](https://docs.ens.domains/contract-api-reference/name-processing#normalising-names) with [UTS-46 normalization](https://unicode.org/reports/tr46) before passing them to `labelhash`. You can use the built-in [`normalize`](https://viem.sh/docs/ens/utilities/normalize.html) function for this.\n *\n * @example\n * labelhash('eth')\n * '0x4f5b812789fc606be1b3b16908db13fc7a9adf7ca72641f84d75b47069d3d7f0'\n */\nexport function labelhash(label: string) {\n let result = new Uint8Array(32).fill(0)\n if (!label) return bytesToHex(result)\n return keccak256(stringToBytes(label))\n}\n","import { concat } from '../data'\nimport { bytesToHex, stringToBytes } from '../encoding'\nimport { keccak256 } from '../hash'\n\n/**\n * @description Hashes ENS name\n *\n * - Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to [normalize ENS names](https://docs.ens.domains/contract-api-reference/name-processing#normalising-names) with [UTS-46 normalization](https://unicode.org/reports/tr46) before passing them to `namehash`. You can use the built-in [`normalize`](https://viem.sh/docs/ens/utilities/normalize.html) function for this.\n *\n * @example\n * namehash('wagmi-dev.eth')\n * '0xf246651c1b9a6b141d19c2604e9a58f567973833990f830d882534a747801359'\n *\n * @link https://eips.ethereum.org/EIPS/eip-137\n */\nexport function namehash(name: string) {\n let result = new Uint8Array(32).fill(0)\n if (!name) return bytesToHex(result)\n\n const labels = name.split('.')\n // Iterate in reverse order building up hash\n for (let i = labels.length - 1; i >= 0; i -= 1) {\n const hashed = keccak256(stringToBytes(labels[i]), 'bytes')\n result = keccak256(concat([result, hashed]), 'bytes')\n }\n\n return bytesToHex(result)\n}\n","// Adapted from https://github.com/mafintosh/dns-packet\nimport type { ByteArray } from '../../types'\nimport { toBytes } from '../encoding'\n\n/*\n * @description Encodes a DNS packet into a ByteArray containing a UDP payload.\n */\nexport function packetToBytes(packet: string): ByteArray {\n function length(value: string) {\n if (value === '.' || value === '..') return 1\n return toBytes(value.replace(/^\\.|\\.$/gm, '')).length + 2\n }\n\n const bytes = new Uint8Array(length(packet))\n // strip leading and trailing `.`\n const value = packet.replace(/^\\.|\\.$/gm, '')\n if (!value.length) return bytes\n\n let offset = 0\n const list = value.split('.')\n for (let i = 0; i < list.length; i++) {\n const encoded = toBytes(list[i])\n bytes[offset] = encoded.length\n bytes.set(encoded, offset + 1)\n offset += encoded.length + 1\n }\n\n return bytes\n}\n","import type { PublicClient } from '../../clients'\nimport type { Address, Prettify } from '../../types'\nimport {\n decodeFunctionResult,\n encodeFunctionData,\n getChainContractAddress,\n toHex,\n} from '../../utils'\nimport { namehash, packetToBytes } from '../../utils/ens'\nimport { readContract, ReadContractParameters } from '../public'\n\nexport type GetEnsAddressParameters = Prettify<\n Pick<ReadContractParameters, 'blockNumber' | 'blockTag'> & {\n /** ENS name to get address. */\n name: string\n /** Address of ENS Universal Resolver Contract */\n universalResolverAddress?: Address\n }\n>\n\nexport type GetEnsAddressReturnType = Address\n\n/**\n * @description Gets address for ENS name.\n *\n * - Calls `resolve(bytes, bytes)` on ENS Universal Resolver Contract.\n * - Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to [normalize ENS names](https://docs.ens.domains/contract-api-reference/name-processing#normalising-names) with [UTS-46 normalization](https://unicode.org/reports/tr46) before passing them to `getEnsAddress`. You can use the built-in [`normalize`](https://viem.sh/docs/ens/utilities/normalize.html) function for this.\n *\n * @example\n * import { normalize } from 'viem/ens'\n *\n * const ensAddress = await getEnsAddress(publicClient, {\n * name: normalize('wagmi-dev.eth'),\n * })\n * // '0xd2135CfB216b74109775236E36d4b433F1DF507B'\n */\nexport async function getEnsAddress(\n client: PublicClient,\n {\n blockNumber,\n blockTag,\n name,\n universalResolverAddress: universalResolverAddress_,\n }: GetEnsAddressParameters,\n): Promise<GetEnsAddressReturnType> {\n let universalResolverAddress = universalResolverAddress_\n if (!universalResolverAddress) {\n if (!client.chain)\n throw new Error(\n 'client chain not configured. universalResolverAddress is required.',\n )\n\n universalResolverAddress = getChainContractAddress({\n blockNumber,\n chain: client.chain,\n contract: 'ensUniversalResolver',\n })\n }\n\n const res = await readContract(client, {\n address: universalResolverAddress,\n abi: [\n {\n name: 'resolve',\n type: 'function',\n stateMutability: 'view',\n inputs: [\n { name: 'name', type: 'bytes' },\n { name: 'data', type: 'bytes' },\n ],\n outputs: [\n { name: '', type: 'bytes' },\n { name: 'address', type: 'address' },\n ],\n },\n ],\n functionName: 'resolve',\n args: [\n toHex(packetToBytes(name)),\n encodeFunctionData({\n abi: [\n {\n name: 'addr',\n type: 'function',\n stateMutability: 'view',\n inputs: [{ name: 'name', type: 'bytes32' }],\n outputs: [],\n },\n ],\n functionName: 'addr',\n args: [namehash(name)],\n }),\n ],\n blockNumber,\n blockTag,\n })\n return decodeFunctionResult({\n abi: [\n {\n name: 'addr',\n type: 'function',\n stateMutability: 'view',\n inputs: [],\n outputs: [{ name: 'name', type: 'address' }],\n },\n ],\n functionName: 'addr',\n data: res[0],\n })\n}\n","import type { PublicClient } from '../../clients'\nimport { panicReasons } from '../../constants'\nimport {\n ContractFunctionExecutionError,\n ContractFunctionRevertedError,\n} from '../../errors'\nimport type { Address, Prettify } from '../../types'\nimport { getChainContractAddress, toHex } from '../../utils'\nimport { packetToBytes } from '../../utils/ens'\nimport { readContract, ReadContractParameters } from '../public'\n\nexport type GetEnsNameParameters = Prettify<\n Pick<ReadContractParameters, 'blockNumber' | 'blockTag'> & {\n /** Address to get ENS name for. */\n address: Address\n /** Address of ENS Universal Resolver Contract. */\n universalResolverAddress?: Address\n }\n>\n\nexport type GetEnsNameReturnType = string | null\n\n/**\n * @description Gets primary name for specified address.\n *\n * - Calls `reverse(bytes)` on ENS Universal Resolver Contract.\n *\n * @example\n * const ensName = await getEnsName(publicClient, {\n * address: '0xd2135CfB216b74109775236E36d4b433F1DF507B',\n * })\n * // 'wagmi-dev.eth'\n */\nexport async function getEnsName(\n client: PublicClient,\n {\n address,\n blockNumber,\n blockTag,\n universalResolverAddress: universalResolverAddress_,\n }: GetEnsNameParameters,\n): Promise<GetEnsNameReturnType> {\n let universalResolverAddress = universalResolverAddress_\n if (!universalResolverAddress) {\n if (!client.chain)\n throw new Error(\n 'client chain not configured. universalResolverAddress is required.',\n )\n\n universalResolverAddress = getChainContractAddress({\n blockNumber,\n chain: client.chain,\n contract: 'ensUniversalResolver',\n })\n }\n\n const reverseNode = `${address.toLowerCase().substring(2)}.addr.reverse`\n try {\n const res = await readContract(client, {\n address: universalResolverAddress,\n abi: [\n {\n name: 'reverse',\n type: 'function',\n stateMutability: 'view',\n inputs: [{ type: 'bytes', name: 'reverseName' }],\n outputs: [\n { type: 'string', name: 'resolvedName' },\n { type: 'address', name: 'resolvedAddress' },\n { type: 'address', name: 'reverseResolver' },\n { type: 'address', name: 'resolver' },\n ],\n },\n ],\n functionName: 'reverse',\n args: [toHex(packetToBytes(reverseNode))],\n blockNumber,\n blockTag,\n })\n return res[0]\n } catch (error) {\n if (\n error instanceof ContractFunctionExecutionError &&\n (error.cause as ContractFunctionRevertedError).reason === panicReasons[50]\n )\n // No primary name set for address.\n return null\n throw error\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAYO,SAAS,UAAU,OAAe;AACvC,MAAI,SAAS,IAAI,WAAW,EAAE,EAAE,KAAK,CAAC;AACtC,MAAI,CAAC;AAAO,WAAO,WAAW,MAAM;AACpC,SAAO,UAAU,cAAc,KAAK,CAAC;AACvC;;;ACDO,SAAS,SAAS,MAAc;AACrC,MAAI,SAAS,IAAI,WAAW,EAAE,EAAE,KAAK,CAAC;AACtC,MAAI,CAAC;AAAM,WAAO,WAAW,MAAM;AAEnC,QAAM,SAAS,KAAK,MAAM,GAAG;AAE7B,WAAS,IAAI,OAAO,SAAS,GAAG,KAAK,GAAG,KAAK,GAAG;AAC9C,UAAM,SAAS,UAAU,cAAc,OAAO,CAAC,CAAC,GAAG,OAAO;AAC1D,aAAS,UAAU,OAAO,CAAC,QAAQ,MAAM,CAAC,GAAG,OAAO;AAAA,EACtD;AAEA,SAAO,WAAW,MAAM;AAC1B;;;ACpBO,SAAS,cAAc,QAA2B;AACvD,WAAS,OAAOA,QAAe;AAC7B,QAAIA,WAAU,OAAOA,WAAU;AAAM,aAAO;AAC5C,WAAO,QAAQA,OAAM,QAAQ,aAAa,EAAE,CAAC,EAAE,SAAS;AAAA,EAC1D;AAEA,QAAM,QAAQ,IAAI,WAAW,OAAO,MAAM,CAAC;AAE3C,QAAM,QAAQ,OAAO,QAAQ,aAAa,EAAE;AAC5C,MAAI,CAAC,MAAM;AAAQ,WAAO;AAE1B,MAAI,SAAS;AACb,QAAM,OAAO,MAAM,MAAM,GAAG;AAC5B,WAAS,IAAI,GAAG,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AAA,MACA;AAAA,IACF,CAAC;AACD,WAAO,IAAI,CAAC;AAAA,EACd,SAAS,OAAP;AACA,QACE,iBAAiB,kCAChB,MAAM,MAAwC,WAAW,aAAa,EAAE;AAGzE,aAAO;AACT,UAAM;AAAA,EACR;AACF;","names":["value"]}
|
@@ -11,27 +11,27 @@
|
|
11
11
|
|
12
12
|
|
13
13
|
|
14
|
-
var
|
14
|
+
var _chunkM5K2FJOMjs = require('./chunk-M5K2FJOM.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 _chunkM5K2FJOMjs.bytesToHex.call(void 0, result);
|
21
|
+
return _chunkM5K2FJOMjs.keccak256.call(void 0, _chunkM5K2FJOMjs.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 _chunkM5K2FJOMjs.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 = _chunkM5K2FJOMjs.keccak256.call(void 0, _chunkM5K2FJOMjs.stringToBytes.call(void 0, labels[i]), "bytes");
|
32
|
+
result = _chunkM5K2FJOMjs.keccak256.call(void 0, _chunkM5K2FJOMjs.concat.call(void 0, [result, hashed]), "bytes");
|
33
33
|
}
|
34
|
-
return
|
34
|
+
return _chunkM5K2FJOMjs.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 _chunkM5K2FJOMjs.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 = _chunkM5K2FJOMjs.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 = _chunkM5K2FJOMjs.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 _chunkM5K2FJOMjs.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
|
+
_chunkM5K2FJOMjs.toHex.call(void 0, packetToBytes(name)),
|
98
|
+
_chunkM5K2FJOMjs.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 _chunkM5K2FJOMjs.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 = _chunkM5K2FJOMjs.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 _chunkM5K2FJOMjs.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: [_chunkM5K2FJOMjs.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 _chunkM5K2FJOMjs.ContractFunctionExecutionError && error.cause.reason === _chunkM5K2FJOMjs.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-YYL4XXAP.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../src/utils/ens/labelhash.ts","../src/utils/ens/namehash.ts","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, stringToBytes } from '../encoding'\nimport { keccak256 } from '../hash'\n\n/**\n * @description Hashes ENS label\n *\n * - Since ENS labels prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to [normalize ENS labels](https://docs.ens.domains/contract-api-reference/name-processing#normalising-names) with [UTS-46 normalization](https://unicode.org/reports/tr46) before passing them to `labelhash`. You can use the built-in [`normalize`](https://viem.sh/docs/ens/utilities/normalize.html) function for this.\n *\n * @example\n * labelhash('eth')\n * '0x4f5b812789fc606be1b3b16908db13fc7a9adf7ca72641f84d75b47069d3d7f0'\n */\nexport function labelhash(label: string) {\n let result = new Uint8Array(32).fill(0)\n if (!label) return bytesToHex(result)\n return keccak256(stringToBytes(label))\n}\n","import { concat } from '../data'\nimport { bytesToHex, stringToBytes } from '../encoding'\nimport { keccak256 } from '../hash'\n\n/**\n * @description Hashes ENS name\n *\n * - Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to [normalize ENS names](https://docs.ens.domains/contract-api-reference/name-processing#normalising-names) with [UTS-46 normalization](https://unicode.org/reports/tr46) before passing them to `namehash`. You can use the built-in [`normalize`](https://viem.sh/docs/ens/utilities/normalize.html) function for this.\n *\n * @example\n * namehash('wagmi-dev.eth')\n * '0xf246651c1b9a6b141d19c2604e9a58f567973833990f830d882534a747801359'\n *\n * @link https://eips.ethereum.org/EIPS/eip-137\n */\nexport function namehash(name: string) {\n let result = new Uint8Array(32).fill(0)\n if (!name) return bytesToHex(result)\n\n const labels = name.split('.')\n // Iterate in reverse order building up hash\n for (let i = labels.length - 1; i >= 0; i -= 1) {\n const hashed = keccak256(stringToBytes(labels[i]), 'bytes')\n result = keccak256(concat([result, hashed]), 'bytes')\n }\n\n return bytesToHex(result)\n}\n","// Adapted from https://github.com/mafintosh/dns-packet\nimport type { ByteArray } from '../../types'\nimport { toBytes } from '../encoding'\n\n/*\n * @description Encodes a DNS packet into a ByteArray containing a UDP payload.\n */\nexport function packetToBytes(packet: string): ByteArray {\n function length(value: string) {\n if (value === '.' || value === '..') return 1\n return toBytes(value.replace(/^\\.|\\.$/gm, '')).length + 2\n }\n\n const bytes = new Uint8Array(length(packet))\n // strip leading and trailing `.`\n const value = packet.replace(/^\\.|\\.$/gm, '')\n if (!value.length) return bytes\n\n let offset = 0\n const list = value.split('.')\n for (let i = 0; i < list.length; i++) {\n const encoded = toBytes(list[i])\n bytes[offset] = encoded.length\n bytes.set(encoded, offset + 1)\n offset += encoded.length + 1\n }\n\n return bytes\n}\n","import type { PublicClient } from '../../clients'\nimport type { Address, Prettify } from '../../types'\nimport {\n decodeFunctionResult,\n encodeFunctionData,\n getChainContractAddress,\n toHex,\n} from '../../utils'\nimport { namehash, packetToBytes } from '../../utils/ens'\nimport { readContract, ReadContractParameters } from '../public'\n\nexport type GetEnsAddressParameters = Prettify<\n Pick<ReadContractParameters, 'blockNumber' | 'blockTag'> & {\n /** ENS name to get address. */\n name: string\n /** Address of ENS Universal Resolver Contract */\n universalResolverAddress?: Address\n }\n>\n\nexport type GetEnsAddressReturnType = Address\n\n/**\n * @description Gets address for ENS name.\n *\n * - Calls `resolve(bytes, bytes)` on ENS Universal Resolver Contract.\n * - Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to [normalize ENS names](https://docs.ens.domains/contract-api-reference/name-processing#normalising-names) with [UTS-46 normalization](https://unicode.org/reports/tr46) before passing them to `getEnsAddress`. You can use the built-in [`normalize`](https://viem.sh/docs/ens/utilities/normalize.html) function for this.\n *\n * @example\n * import { normalize } from 'viem/ens'\n *\n * const ensAddress = await getEnsAddress(publicClient, {\n * name: normalize('wagmi-dev.eth'),\n * })\n * // '0xd2135CfB216b74109775236E36d4b433F1DF507B'\n */\nexport async function getEnsAddress(\n client: PublicClient,\n {\n blockNumber,\n blockTag,\n name,\n universalResolverAddress: universalResolverAddress_,\n }: GetEnsAddressParameters,\n): Promise<GetEnsAddressReturnType> {\n let universalResolverAddress = universalResolverAddress_\n if (!universalResolverAddress) {\n if (!client.chain)\n throw new Error(\n 'client chain not configured. universalResolverAddress is required.',\n )\n\n universalResolverAddress = getChainContractAddress({\n blockNumber,\n chain: client.chain,\n contract: 'ensUniversalResolver',\n })\n }\n\n const res = await readContract(client, {\n address: universalResolverAddress,\n abi: [\n {\n name: 'resolve',\n type: 'function',\n stateMutability: 'view',\n inputs: [\n { name: 'name', type: 'bytes' },\n { name: 'data', type: 'bytes' },\n ],\n outputs: [\n { name: '', type: 'bytes' },\n { name: 'address', type: 'address' },\n ],\n },\n ],\n functionName: 'resolve',\n args: [\n toHex(packetToBytes(name)),\n encodeFunctionData({\n abi: [\n {\n name: 'addr',\n type: 'function',\n stateMutability: 'view',\n inputs: [{ name: 'name', type: 'bytes32' }],\n outputs: [],\n },\n ],\n functionName: 'addr',\n args: [namehash(name)],\n }),\n ],\n blockNumber,\n blockTag,\n })\n return decodeFunctionResult({\n abi: [\n {\n name: 'addr',\n type: 'function',\n stateMutability: 'view',\n inputs: [],\n outputs: [{ name: 'name', type: 'address' }],\n },\n ],\n functionName: 'addr',\n data: res[0],\n })\n}\n","import type { PublicClient } from '../../clients'\nimport { panicReasons } from '../../constants'\nimport {\n ContractFunctionExecutionError,\n ContractFunctionRevertedError,\n} from '../../errors'\nimport type { Address, Prettify } from '../../types'\nimport { getChainContractAddress, toHex } from '../../utils'\nimport { packetToBytes } from '../../utils/ens'\nimport { readContract, ReadContractParameters } from '../public'\n\nexport type GetEnsNameParameters = Prettify<\n Pick<ReadContractParameters, 'blockNumber' | 'blockTag'> & {\n /** Address to get ENS name for. */\n address: Address\n /** Address of ENS Universal Resolver Contract. */\n universalResolverAddress?: Address\n }\n>\n\nexport type GetEnsNameReturnType = string | null\n\n/**\n * @description Gets primary name for specified address.\n *\n * - Calls `reverse(bytes)` on ENS Universal Resolver Contract.\n *\n * @example\n * const ensName = await getEnsName(publicClient, {\n * address: '0xd2135CfB216b74109775236E36d4b433F1DF507B',\n * })\n * // 'wagmi-dev.eth'\n */\nexport async function getEnsName(\n client: PublicClient,\n {\n address,\n blockNumber,\n blockTag,\n universalResolverAddress: universalResolverAddress_,\n }: GetEnsNameParameters,\n): Promise<GetEnsNameReturnType> {\n let universalResolverAddress = universalResolverAddress_\n if (!universalResolverAddress) {\n if (!client.chain)\n throw new Error(\n 'client chain not configured. universalResolverAddress is required.',\n )\n\n universalResolverAddress = getChainContractAddress({\n blockNumber,\n chain: client.chain,\n contract: 'ensUniversalResolver',\n })\n }\n\n const reverseNode = `${address.toLowerCase().substring(2)}.addr.reverse`\n try {\n const res = await readContract(client, {\n address: universalResolverAddress,\n abi: [\n {\n name: 'reverse',\n type: 'function',\n stateMutability: 'view',\n inputs: [{ type: 'bytes', name: 'reverseName' }],\n outputs: [\n { type: 'string', name: 'resolvedName' },\n { type: 'address', name: 'resolvedAddress' },\n { type: 'address', name: 'reverseResolver' },\n { type: 'address', name: 'resolver' },\n ],\n },\n ],\n functionName: 'reverse',\n args: [toHex(packetToBytes(reverseNode))],\n blockNumber,\n blockTag,\n })\n return res[0]\n } catch (error) {\n if (\n error instanceof ContractFunctionExecutionError &&\n (error.cause as ContractFunctionRevertedError).reason === panicReasons[50]\n )\n // No primary name set for address.\n return null\n throw error\n }\n}\n"]}
|
package/dist/contract.d.ts
CHANGED
@@ -1,4 +1,4 @@
|
|
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-
|
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-75540130.js';
|
2
2
|
export { D as DecodeAbiParametersReturnType, E as EncodeAbiParametersReturnType, G as GetAbiItemParameters, d as decodeAbiParameters, e as encodeAbiParameters, g as getAbiItem } from './getAbiItem-3e809ff9.js';
|
3
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-1f324375.js';
|
4
4
|
export { a as formatAbiItem, f as formatAbiItemWithArgs } from './formatAbiItem-15e8817d.js';
|
package/dist/contract.js
CHANGED
@@ -23,7 +23,7 @@
|
|
23
23
|
|
24
24
|
|
25
25
|
|
26
|
-
var
|
26
|
+
var _chunkM5K2FJOMjs = require('./chunk-M5K2FJOM.js');
|
27
27
|
|
28
28
|
|
29
29
|
|
@@ -49,5 +49,5 @@ var _chunkXMKUHSC7js = require('./chunk-XMKUHSC7.js');
|
|
49
49
|
|
50
50
|
|
51
51
|
|
52
|
-
exports.createContractEventFilter =
|
52
|
+
exports.createContractEventFilter = _chunkM5K2FJOMjs.createContractEventFilter; exports.decodeAbiParameters = _chunkM5K2FJOMjs.decodeAbiParameters; exports.decodeErrorResult = _chunkM5K2FJOMjs.decodeErrorResult; exports.decodeEventLog = _chunkM5K2FJOMjs.decodeEventLog; exports.decodeFunctionData = _chunkM5K2FJOMjs.decodeFunctionData; exports.decodeFunctionResult = _chunkM5K2FJOMjs.decodeFunctionResult; exports.deployContract = _chunkM5K2FJOMjs.deployContract; exports.encodeAbiParameters = _chunkM5K2FJOMjs.encodeAbiParameters; exports.encodeDeployData = _chunkM5K2FJOMjs.encodeDeployData; exports.encodeErrorResult = _chunkM5K2FJOMjs.encodeErrorResult; exports.encodeEventTopics = _chunkM5K2FJOMjs.encodeEventTopics; exports.encodeFunctionData = _chunkM5K2FJOMjs.encodeFunctionData; exports.encodeFunctionResult = _chunkM5K2FJOMjs.encodeFunctionResult; exports.estimateContractGas = _chunkM5K2FJOMjs.estimateContractGas; exports.formatAbiItem = _chunkM5K2FJOMjs.formatAbiItem; exports.formatAbiItemWithArgs = _chunkM5K2FJOMjs.formatAbiItemWithArgs; exports.getAbiItem = _chunkM5K2FJOMjs.getAbiItem; exports.getBytecode = _chunkM5K2FJOMjs.getBytecode; exports.getStorageAt = _chunkM5K2FJOMjs.getStorageAt; exports.multicall = _chunkM5K2FJOMjs.multicall; exports.readContract = _chunkM5K2FJOMjs.readContract; exports.simulateContract = _chunkM5K2FJOMjs.simulateContract; exports.watchContractEvent = _chunkM5K2FJOMjs.watchContractEvent; exports.writeContract = _chunkM5K2FJOMjs.writeContract;
|
53
53
|
//# sourceMappingURL=contract.js.map
|
package/dist/contract.mjs
CHANGED
@@ -607,7 +607,7 @@ type SendTransactionParameters<TChain extends Chain = Chain> = FormattedTransact
|
|
607
607
|
chain: TChain;
|
608
608
|
});
|
609
609
|
type SendTransactionReturnType = Hash;
|
610
|
-
declare function sendTransaction<TChain extends Chain>(client: WalletClient, args: SendTransactionParameters<TChain>): Promise<SendTransactionReturnType>;
|
610
|
+
declare function sendTransaction<TChain extends Chain>(client: WalletClient<any, any>, args: SendTransactionParameters<TChain>): Promise<SendTransactionReturnType>;
|
611
611
|
|
612
612
|
type SignMessageParameters = {
|
613
613
|
account: Account;
|
@@ -811,7 +811,7 @@ type WalletClient<TTransport extends Transport = Transport, TChain extends Chain
|
|
811
811
|
/**
|
812
812
|
* @description Creates a wallet client with a given transport.
|
813
813
|
*/
|
814
|
-
declare function createWalletClient<TTransport extends Transport, TChain extends Chain>({ transport, key, name, pollingInterval, }: WalletClientConfig<TTransport, TChain>): WalletClient<TTransport, TChain, true>;
|
814
|
+
declare function createWalletClient<TTransport extends Transport, TChain extends Chain>({ chain, transport, key, name, pollingInterval, }: WalletClientConfig<TTransport, TChain>): WalletClient<TTransport, TChain, true>;
|
815
815
|
|
816
816
|
type WalletActions<TChain extends Chain = Chain> = {
|
817
817
|
addChain: (args: AddChainParameters) => Promise<void>;
|
package/dist/ens.d.ts
CHANGED
@@ -1,4 +1,4 @@
|
|
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-75540130.js';
|
2
2
|
export { l as labelhash, n as namehash } from './namehash-afff0feb.js';
|
3
3
|
import './eip1193-4f4e240c.js';
|
4
4
|
import 'abitype';
|
package/dist/ens.js
CHANGED
@@ -3,8 +3,8 @@
|
|
3
3
|
|
4
4
|
|
5
5
|
|
6
|
-
var
|
7
|
-
require('./chunk-
|
6
|
+
var _chunkYYL4XXAPjs = require('./chunk-YYL4XXAP.js');
|
7
|
+
require('./chunk-M5K2FJOM.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 = _chunkYYL4XXAPjs.getEnsAddress; exports.getEnsName = _chunkYYL4XXAPjs.getEnsName; exports.labelhash = _chunkYYL4XXAPjs.labelhash; exports.namehash = _chunkYYL4XXAPjs.namehash; exports.normalize = normalize;
|
21
21
|
//# sourceMappingURL=ens.js.map
|
package/dist/ens.mjs
CHANGED
package/dist/ethers.d.ts
CHANGED
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 _chunkM5K2FJOMjs = require('./chunk-M5K2FJOM.js');
|
5
5
|
|
6
6
|
// src/adapters/ethers.ts
|
7
|
-
var getAccount2 = (wallet) =>
|
7
|
+
var getAccount2 = (wallet) => _chunkM5K2FJOMjs.getAccount.call(void 0, {
|
8
8
|
address: wallet.address,
|
9
9
|
async signMessage(message) {
|
10
|
-
return await wallet.signMessage(
|
10
|
+
return await wallet.signMessage(_chunkM5K2FJOMjs.toBytes.call(void 0, message));
|
11
11
|
},
|
12
12
|
async signTransaction(txn) {
|
13
13
|
return await wallet.signTransaction({
|
package/dist/ethers.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../src/adapters/ethers.ts"],"names":["getAccount"],"mappings":";;;;;;AAyCO,IAAMA,cAAa,CAAC,WACzB,WAAY;AAAA,EACV,SAAS,OAAO;AAAA,EAChB,MAAM,YAAY,SAAS;AACzB,WAAQ,MAAM,OAAO,YAAY,QAAQ,OAAO,CAAC;AAAA,EACnD;AAAA,EACA,MAAM,gBAAgB,KAAK;AACzB,WAAQ,MAAM,OAAO,gBAAgB;AAAA,MACnC,GAAG;AAAA,MACH,UAAU,IAAI;AAAA,IAChB,CAAC;AAAA,EACH;AAAA,EACA,MAAM,cAAc,EAAE,QAAQ,OAAO,QAAQ,QAAQ,GAAG;AACtD,UAAM,EAAE,cAAc,GAAG,GAAG,MAAM,IAAI;AACtC,UAAM,gBAAgB,OAAO,gBACzB,OAAO,cAAc,KAAK,MAAM,IAChC,OAAO,eAAe,KAAK,MAAM;AACrC,WAAQ,MAAM;AAAA,MACZ,UAAU,CAAC;AAAA,MACX;AAAA,MACA;AAAA,IACF;AAAA,EACF;AACF,CAAC","sourcesContent":["import { Address, Hash } from '../types'\nimport { getAccount as getAccount_, toBytes } from '../utils'\n\ntype BigNumberish = string | number | bigint\ntype BytesLike = string | Uint8Array\n\ntype TypedDataDomain = {\n name?: string\n version?: string\n chainId?: BigNumberish\n verifyingContract?: string\n salt?: BytesLike\n}\ntype TypedDataField = {\n name: string\n type: string\n}\n\ntype EthersWallet = {\n address: string\n signMessage(message: Uint8Array): Promise<string>\n signTransaction(txn: any): Promise<string>\n} & (\n | {\n signTypedData(\n domain: TypedDataDomain,\n types: Record<string, TypedDataField[]>,\n value: Record<string, any>,\n ): Promise<string>\n _signTypedData?: never\n }\n | {\n signTypedData?: never\n _signTypedData(\n domain: TypedDataDomain,\n types: Record<string, TypedDataField[]>,\n value: Record<string, any>,\n ): Promise<string>\n }\n)\n\nexport const getAccount = (wallet: EthersWallet) =>\n getAccount_({\n address: wallet.address as Address,\n async signMessage(message) {\n return (await wallet.signMessage(toBytes(message))) as Hash\n },\n async signTransaction(txn) {\n return (await wallet.signTransaction({\n ...txn,\n gasLimit: txn.gas,\n })) as Hash\n },\n async signTypedData({ domain, types: types_, message }) {\n const { EIP712Domain: _, ...types } = types_ as any\n const signTypedData = wallet.signTypedData\n ? wallet.signTypedData.bind(wallet)\n : wallet._signTypedData.bind(wallet)\n return (await signTypedData(\n domain ?? {},\n types as Record<string, TypedDataField[]>,\n message,\n )) as Hash\n },\n })\n"]}
|
1
|
+
{"version":3,"sources":["../src/adapters/ethers.ts"],"names":["getAccount"],"mappings":";;;;;;AAyCO,IAAMA,cAAa,CAAC,WACzB,WAAY;AAAA,EACV,SAAS,OAAO;AAAA,EAChB,MAAM,YAAY,SAAS;AACzB,WAAQ,MAAM,OAAO,YAAY,QAAQ,OAAO,CAAC;AAAA,EACnD;AAAA,EACA,MAAM,gBAAgB,KAAK;AACzB,WAAQ,MAAM,OAAO,gBAAgB;AAAA,MACnC,GAAG;AAAA,MACH,UAAU,IAAI;AAAA,IAChB,CAAC;AAAA,EACH;AAAA,EACA,MAAM,cAAc,EAAE,QAAQ,OAAO,QAAQ,QAAQ,GAAG;AACtD,UAAM,EAAE,cAAc,GAAG,GAAG,MAAM,IAAI;AACtC,UAAM,gBAAgB,OAAO,gBACzB,OAAO,cAAc,KAAK,MAAM,IAChC,OAAO,eAAe,KAAK,MAAM;AACrC,WAAQ,MAAM;AAAA,MACZ,UAAU,CAAC;AAAA,MACX;AAAA,MACA;AAAA,IACF;AAAA,EACF;AACF,CAAC","sourcesContent":["import type { Address, Hash } from '../types'\nimport { getAccount as getAccount_, toBytes } from '../utils'\n\ntype BigNumberish = string | number | bigint\ntype BytesLike = string | Uint8Array\n\ntype TypedDataDomain = {\n name?: string\n version?: string\n chainId?: BigNumberish\n verifyingContract?: string\n salt?: BytesLike\n}\ntype TypedDataField = {\n name: string\n type: string\n}\n\ntype EthersWallet = {\n address: string\n signMessage(message: Uint8Array): Promise<string>\n signTransaction(txn: any): Promise<string>\n} & (\n | {\n signTypedData(\n domain: TypedDataDomain,\n types: Record<string, TypedDataField[]>,\n value: Record<string, any>,\n ): Promise<string>\n _signTypedData?: never\n }\n | {\n signTypedData?: never\n _signTypedData(\n domain: TypedDataDomain,\n types: Record<string, TypedDataField[]>,\n value: Record<string, any>,\n ): Promise<string>\n }\n)\n\nexport const getAccount = (wallet: EthersWallet) =>\n getAccount_({\n address: wallet.address as Address,\n async signMessage(message) {\n return (await wallet.signMessage(toBytes(message))) as Hash\n },\n async signTransaction(txn) {\n return (await wallet.signTransaction({\n ...txn,\n gasLimit: txn.gas,\n })) as Hash\n },\n async signTypedData({ domain, types: types_, message }) {\n const { EIP712Domain: _, ...types } = types_ as any\n const signTypedData = wallet.signTypedData\n ? wallet.signTypedData.bind(wallet)\n : wallet._signTypedData.bind(wallet)\n return (await signTypedData(\n domain ?? {},\n types as Record<string, TypedDataField[]>,\n message,\n )) as Hash\n },\n })\n"]}
|
package/dist/ethers.mjs
CHANGED
package/dist/ethers.mjs.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../src/adapters/ethers.ts"],"sourcesContent":["import { Address, Hash } from '../types'\nimport { getAccount as getAccount_, toBytes } from '../utils'\n\ntype BigNumberish = string | number | bigint\ntype BytesLike = string | Uint8Array\n\ntype TypedDataDomain = {\n name?: string\n version?: string\n chainId?: BigNumberish\n verifyingContract?: string\n salt?: BytesLike\n}\ntype TypedDataField = {\n name: string\n type: string\n}\n\ntype EthersWallet = {\n address: string\n signMessage(message: Uint8Array): Promise<string>\n signTransaction(txn: any): Promise<string>\n} & (\n | {\n signTypedData(\n domain: TypedDataDomain,\n types: Record<string, TypedDataField[]>,\n value: Record<string, any>,\n ): Promise<string>\n _signTypedData?: never\n }\n | {\n signTypedData?: never\n _signTypedData(\n domain: TypedDataDomain,\n types: Record<string, TypedDataField[]>,\n value: Record<string, any>,\n ): Promise<string>\n }\n)\n\nexport const getAccount = (wallet: EthersWallet) =>\n getAccount_({\n address: wallet.address as Address,\n async signMessage(message) {\n return (await wallet.signMessage(toBytes(message))) as Hash\n },\n async signTransaction(txn) {\n return (await wallet.signTransaction({\n ...txn,\n gasLimit: txn.gas,\n })) as Hash\n },\n async signTypedData({ domain, types: types_, message }) {\n const { EIP712Domain: _, ...types } = types_ as any\n const signTypedData = wallet.signTypedData\n ? wallet.signTypedData.bind(wallet)\n : wallet._signTypedData.bind(wallet)\n return (await signTypedData(\n domain ?? {},\n types as Record<string, TypedDataField[]>,\n message,\n )) as Hash\n },\n })\n"],"mappings":";;;;;;AAyCO,IAAMA,cAAa,CAAC,WACzB,WAAY;AAAA,EACV,SAAS,OAAO;AAAA,EAChB,MAAM,YAAY,SAAS;AACzB,WAAQ,MAAM,OAAO,YAAY,QAAQ,OAAO,CAAC;AAAA,EACnD;AAAA,EACA,MAAM,gBAAgB,KAAK;AACzB,WAAQ,MAAM,OAAO,gBAAgB;AAAA,MACnC,GAAG;AAAA,MACH,UAAU,IAAI;AAAA,IAChB,CAAC;AAAA,EACH;AAAA,EACA,MAAM,cAAc,EAAE,QAAQ,OAAO,QAAQ,QAAQ,GAAG;AACtD,UAAM,EAAE,cAAc,GAAG,GAAG,MAAM,IAAI;AACtC,UAAM,gBAAgB,OAAO,gBACzB,OAAO,cAAc,KAAK,MAAM,IAChC,OAAO,eAAe,KAAK,MAAM;AACrC,WAAQ,MAAM;AAAA,MACZ,UAAU,CAAC;AAAA,MACX;AAAA,MACA;AAAA,IACF;AAAA,EACF;AACF,CAAC;","names":["getAccount"]}
|
1
|
+
{"version":3,"sources":["../src/adapters/ethers.ts"],"sourcesContent":["import type { Address, Hash } from '../types'\nimport { getAccount as getAccount_, toBytes } from '../utils'\n\ntype BigNumberish = string | number | bigint\ntype BytesLike = string | Uint8Array\n\ntype TypedDataDomain = {\n name?: string\n version?: string\n chainId?: BigNumberish\n verifyingContract?: string\n salt?: BytesLike\n}\ntype TypedDataField = {\n name: string\n type: string\n}\n\ntype EthersWallet = {\n address: string\n signMessage(message: Uint8Array): Promise<string>\n signTransaction(txn: any): Promise<string>\n} & (\n | {\n signTypedData(\n domain: TypedDataDomain,\n types: Record<string, TypedDataField[]>,\n value: Record<string, any>,\n ): Promise<string>\n _signTypedData?: never\n }\n | {\n signTypedData?: never\n _signTypedData(\n domain: TypedDataDomain,\n types: Record<string, TypedDataField[]>,\n value: Record<string, any>,\n ): Promise<string>\n }\n)\n\nexport const getAccount = (wallet: EthersWallet) =>\n getAccount_({\n address: wallet.address as Address,\n async signMessage(message) {\n return (await wallet.signMessage(toBytes(message))) as Hash\n },\n async signTransaction(txn) {\n return (await wallet.signTransaction({\n ...txn,\n gasLimit: txn.gas,\n })) as Hash\n },\n async signTypedData({ domain, types: types_, message }) {\n const { EIP712Domain: _, ...types } = types_ as any\n const signTypedData = wallet.signTypedData\n ? wallet.signTypedData.bind(wallet)\n : wallet._signTypedData.bind(wallet)\n return (await signTypedData(\n domain ?? {},\n types as Record<string, TypedDataField[]>,\n message,\n )) as Hash\n },\n })\n"],"mappings":";;;;;;AAyCO,IAAMA,cAAa,CAAC,WACzB,WAAY;AAAA,EACV,SAAS,OAAO;AAAA,EAChB,MAAM,YAAY,SAAS;AACzB,WAAQ,MAAM,OAAO,YAAY,QAAQ,OAAO,CAAC;AAAA,EACnD;AAAA,EACA,MAAM,gBAAgB,KAAK;AACzB,WAAQ,MAAM,OAAO,gBAAgB;AAAA,MACnC,GAAG;AAAA,MACH,UAAU,IAAI;AAAA,IAChB,CAAC;AAAA,EACH;AAAA,EACA,MAAM,cAAc,EAAE,QAAQ,OAAO,QAAQ,QAAQ,GAAG;AACtD,UAAM,EAAE,cAAc,GAAG,GAAG,MAAM,IAAI;AACtC,UAAM,gBAAgB,OAAO,gBACzB,OAAO,cAAc,KAAK,MAAM,IAChC,OAAO,eAAe,KAAK,MAAM;AACrC,WAAQ,MAAM;AAAA,MACZ,UAAU,CAAC;AAAA,MACX;AAAA,MACA;AAAA,IACF;AAAA,EACF;AACF,CAAC;","names":["getAccount"]}
|
package/dist/index.d.ts
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
import { T as TransportConfig, a as Transport, B as BaseRpcRequests } from './createClient-a28317a9.js';
|
2
2
|
export { C as Client, b as ClientConfig, a as Transport, T as TransportConfig, c as createClient, d as createTransport } from './createClient-a28317a9.js';
|
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 hashMessage, a0 as hexToBigInt, a1 as hexToBool, a2 as hexToBytes, a3 as hexToNumber, a4 as hexToString, a5 as isAddress, a6 as isAddressEqual, a7 as isBytes, a8 as isHex, a9 as keccak256, aa as numberToBytes, ab as numberToHex, ac as pad, ad as padBytes, ae as padHex, af as parseEther, ag as parseGwei, ah as parseUnits, ai as recoverAddress, aj as recoverMessageAddress, ak as size, al as slice, am as sliceBytes, an as sliceHex, ao as stringToBytes, ap as stringToHex, aq as stringify, ar as toBytes, as as toHex, at as toRlp, au as trim, av as verifyMessage } from './parseGwei-
|
3
|
+
import { B as BaseError, H as HttpOptions, R as RpcResponse } from './parseGwei-6fff7cbe.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 hashMessage, a0 as hexToBigInt, a1 as hexToBool, a2 as hexToBytes, a3 as hexToNumber, a4 as hexToString, a5 as isAddress, a6 as isAddressEqual, a7 as isBytes, a8 as isHex, a9 as keccak256, aa as numberToBytes, ab as numberToHex, ac as pad, ad as padBytes, ae as padHex, af as parseEther, ag as parseGwei, ah as parseUnits, ai as recoverAddress, aj as recoverMessageAddress, ak as size, al as slice, am as sliceBytes, an as sliceHex, ao as stringToBytes, ap as stringToHex, aq as stringify, ar as toBytes, as as toHex, at as toRlp, au as trim, av as verifyMessage } from './parseGwei-6fff7cbe.js';
|
5
5
|
import WebSocket from 'isomorphic-ws';
|
6
6
|
import { H as Hex, A as AbiItem, a as Hash, C as Chain, B as ByteArray } from './chain-1b53ef88.js';
|
7
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, E as ExtractArgsFromAbi, h as ExtractConstructorArgsFromAbi, i as ExtractErrorArgsFromAbi, j as ExtractErrorNameFromAbi, k as ExtractEventArgsFromAbi, l as ExtractEventArgsFromTopics, m as ExtractEventNameFromAbi, W as ExtractFormatter, n as ExtractFunctionNameFromAbi, o as ExtractNameFromAbi, p as ExtractResultFromAbi, F as FeeHistory, q as FeeValues, r as FeeValuesEIP1559, s as FeeValuesLegacy, X as Formatted, Y as FormattedTransaction, a as Hash, H as Hex, L as Log, R as RpcBlock, t as RpcBlockIdentifier, u as RpcBlockNumber, v as RpcFeeHistory, w as RpcFeeValues, x as RpcLog, y as RpcTransaction, z as RpcTransactionReceipt, D as RpcTransactionRequest, G as RpcUncle, O as Transaction, P as TransactionBase, Q as TransactionEIP1559, S as TransactionEIP2930, Z as TransactionFormatter, U as TransactionLegacy, T as TransactionReceipt, I as TransactionRequest, J as TransactionRequestBase, K as TransactionRequestEIP1559, M as TransactionRequestEIP2930, N as TransactionRequestLegacy, V as Uncle, _ as defineTransaction, $ as formatTransaction, a0 as transactionType } from './chain-1b53ef88.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-
|
9
|
-
export { T as TestClient, a as TestClientConfig, c as createTestClient } from './test-
|
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-75540130.js';
|
9
|
+
export { T as TestClient, a as TestClientConfig, c as createTestClient } from './test-2bd23d7e.js';
|
10
10
|
import { AbiParameter } from 'abitype';
|
11
11
|
export { Address, ParseAbi, ParseAbiItem, ParseAbiParameter, ParseAbiParameters, parseAbi, parseAbiItem, parseAbiParameter, parseAbiParameters } from 'abitype';
|
12
12
|
export { l as labelhash, n as namehash } from './namehash-afff0feb.js';
|