@ensdomains/ensjs 3.0.0-beta.1 → 3.0.0-beta.3
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/cjs/clients/decorators/subgraph.js.map +1 -1
- package/dist/cjs/contracts/consts.js +52 -1
- package/dist/cjs/contracts/consts.js.map +1 -1
- package/dist/cjs/dns.js +3 -3
- package/dist/cjs/dns.js.map +1 -1
- package/dist/cjs/errors/subgraph.js.map +1 -1
- package/dist/cjs/errors/utils.js +15 -18
- package/dist/cjs/errors/utils.js.map +1 -1
- package/dist/cjs/errors/version.js +1 -1
- package/dist/cjs/functions/dns/{prepareDnsImport.js → getDnsImportData.js} +3 -3
- package/dist/cjs/functions/dns/{prepareDnsImport.js.map → getDnsImportData.js.map} +1 -1
- package/dist/cjs/functions/dns/importDnsName.js +7 -7
- package/dist/cjs/functions/dns/importDnsName.js.map +1 -1
- package/dist/cjs/functions/public/_getContentHash.js +1 -1
- package/dist/cjs/functions/public/getSupportedInterfaces.js +1 -1
- package/dist/cjs/functions/public/getSupportedInterfaces.js.map +1 -1
- package/dist/cjs/functions/public/getWrapperData.js.map +1 -1
- package/dist/cjs/functions/subgraph/filters.js +3 -0
- package/dist/cjs/functions/subgraph/filters.js.map +1 -0
- package/dist/cjs/functions/subgraph/getNameHistory.js +1 -1
- package/dist/cjs/functions/subgraph/getNamesForAddress.js +140 -182
- package/dist/cjs/functions/subgraph/getNamesForAddress.js.map +1 -1
- package/dist/cjs/functions/subgraph/getSubnames.js +95 -108
- package/dist/cjs/functions/subgraph/getSubnames.js.map +1 -1
- package/dist/cjs/functions/subgraph/types.js +3 -0
- package/dist/cjs/functions/subgraph/types.js.map +1 -0
- package/dist/cjs/functions/subgraph/utils.js.map +1 -1
- package/dist/cjs/functions/wallet/createSubname.js +1 -1
- package/dist/cjs/functions/wallet/createSubname.js.map +1 -1
- package/dist/cjs/functions/wallet/setChildFuses.js +1 -1
- package/dist/cjs/functions/wallet/setChildFuses.js.map +1 -1
- package/dist/cjs/functions/wallet/setFuses.js +1 -1
- package/dist/cjs/functions/wallet/setFuses.js.map +1 -1
- package/dist/cjs/functions/wallet/wrapName.js +3 -1
- package/dist/cjs/functions/wallet/wrapName.js.map +1 -1
- package/dist/cjs/index.js +1 -2
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/utils/contentHash.js +54 -131
- package/dist/cjs/utils/contentHash.js.map +1 -1
- package/dist/cjs/utils/encoders/encodeSetContentHash.js +1 -4
- package/dist/cjs/utils/encoders/encodeSetContentHash.js.map +1 -1
- package/dist/cjs/utils/format.js +1 -5
- package/dist/cjs/utils/format.js.map +1 -1
- package/dist/cjs/utils/fuses.js +181 -200
- package/dist/cjs/utils/fuses.js.map +1 -1
- package/dist/cjs/utils/index.js +4 -7
- package/dist/cjs/utils/index.js.map +1 -1
- package/dist/cjs/utils/registerHelpers.js +3 -1
- package/dist/cjs/utils/registerHelpers.js.map +1 -1
- package/dist/esm/clients/decorators/subgraph.js.map +1 -1
- package/dist/esm/contracts/consts.js +52 -1
- package/dist/esm/contracts/consts.js.map +1 -1
- package/dist/esm/dns.js +1 -1
- package/dist/esm/dns.js.map +1 -1
- package/dist/esm/errors/subgraph.js.map +1 -1
- package/dist/esm/errors/utils.js +13 -16
- package/dist/esm/errors/utils.js.map +1 -1
- package/dist/esm/errors/version.js +1 -1
- package/dist/esm/functions/dns/{prepareDnsImport.js → getDnsImportData.js} +9 -10
- package/dist/esm/functions/dns/getDnsImportData.js.map +1 -0
- package/dist/esm/functions/dns/importDnsName.js +12 -12
- package/dist/esm/functions/dns/importDnsName.js.map +1 -1
- package/dist/esm/functions/public/_getContentHash.js +2 -2
- package/dist/esm/functions/public/getSupportedInterfaces.js +2 -2
- package/dist/esm/functions/public/getSupportedInterfaces.js.map +1 -1
- package/dist/esm/functions/public/getWrapperData.js.map +1 -1
- package/dist/esm/functions/subgraph/filters.js +2 -0
- package/dist/esm/functions/subgraph/filters.js.map +1 -0
- package/dist/esm/functions/subgraph/getNameHistory.js +2 -2
- package/dist/esm/functions/subgraph/getNamesForAddress.js +144 -183
- package/dist/esm/functions/subgraph/getNamesForAddress.js.map +1 -1
- package/dist/esm/functions/subgraph/getSubnames.js +101 -111
- package/dist/esm/functions/subgraph/getSubnames.js.map +1 -1
- package/dist/esm/functions/subgraph/types.js +2 -0
- package/dist/esm/functions/subgraph/types.js.map +1 -0
- package/dist/esm/functions/subgraph/utils.js.map +1 -1
- package/dist/esm/functions/wallet/createSubname.js +1 -1
- package/dist/esm/functions/wallet/createSubname.js.map +1 -1
- package/dist/esm/functions/wallet/setChildFuses.js +1 -1
- package/dist/esm/functions/wallet/setChildFuses.js.map +1 -1
- package/dist/esm/functions/wallet/setFuses.js +2 -2
- package/dist/esm/functions/wallet/setFuses.js.map +1 -1
- package/dist/esm/functions/wallet/wrapName.js +4 -2
- package/dist/esm/functions/wallet/wrapName.js.map +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/utils/contentHash.js +51 -128
- package/dist/esm/utils/contentHash.js.map +1 -1
- package/dist/esm/utils/encoders/encodeSetContentHash.js +2 -5
- package/dist/esm/utils/encoders/encodeSetContentHash.js.map +1 -1
- package/dist/esm/utils/format.js +0 -2
- package/dist/esm/utils/format.js.map +1 -1
- package/dist/esm/utils/fuses.js +180 -201
- package/dist/esm/utils/fuses.js.map +1 -1
- package/dist/esm/utils/index.js +2 -2
- package/dist/esm/utils/index.js.map +1 -1
- package/dist/esm/utils/registerHelpers.js +4 -2
- package/dist/esm/utils/registerHelpers.js.map +1 -1
- package/dist/types/clients/decorators/subgraph.d.ts +1 -1
- package/dist/types/clients/decorators/subgraph.d.ts.map +1 -1
- package/dist/types/clients/decorators/wallet.d.ts +12 -12
- package/dist/types/clients/public.d.ts +1 -1
- package/dist/types/clients/subgraph.d.ts +1 -1
- package/dist/types/clients/wallet.d.ts +43 -79
- package/dist/types/clients/wallet.d.ts.map +1 -1
- package/dist/types/contracts/consts.d.ts +51 -2
- package/dist/types/contracts/consts.d.ts.map +1 -1
- package/dist/types/dns.d.ts +1 -1
- package/dist/types/dns.d.ts.map +1 -1
- package/dist/types/errors/subgraph.d.ts +4 -4
- package/dist/types/errors/subgraph.d.ts.map +1 -1
- package/dist/types/errors/utils.d.ts +10 -13
- package/dist/types/errors/utils.d.ts.map +1 -1
- package/dist/types/errors/version.d.ts +1 -1
- package/dist/types/functions/dns/{prepareDnsImport.d.ts → getDnsImportData.d.ts} +11 -12
- package/dist/types/functions/dns/{prepareDnsImport.d.ts.map → getDnsImportData.d.ts.map} +1 -1
- package/dist/types/functions/dns/importDnsName.d.ts +36 -36
- package/dist/types/functions/dns/importDnsName.d.ts.map +1 -1
- package/dist/types/functions/public/getSupportedInterfaces.d.ts +19 -4
- package/dist/types/functions/public/getSupportedInterfaces.d.ts.map +1 -1
- package/dist/types/functions/public/getWrapperData.d.ts +2 -2
- package/dist/types/functions/public/getWrapperData.d.ts.map +1 -1
- package/dist/types/functions/subgraph/filters.d.ts +693 -0
- package/dist/types/functions/subgraph/filters.d.ts.map +1 -0
- package/dist/types/functions/subgraph/getNamesForAddress.d.ts +2 -0
- package/dist/types/functions/subgraph/getNamesForAddress.d.ts.map +1 -1
- package/dist/types/functions/subgraph/getSubnames.d.ts +3 -1
- package/dist/types/functions/subgraph/getSubnames.d.ts.map +1 -1
- package/dist/types/functions/subgraph/types.d.ts +13 -0
- package/dist/types/functions/subgraph/types.d.ts.map +1 -0
- package/dist/types/functions/subgraph/utils.d.ts +2 -2
- package/dist/types/functions/subgraph/utils.d.ts.map +1 -1
- package/dist/types/functions/wallet/commitName.d.ts +25 -25
- package/dist/types/functions/wallet/createSubname.d.ts +28 -28
- package/dist/types/functions/wallet/createSubname.d.ts.map +1 -1
- package/dist/types/functions/wallet/deleteSubname.d.ts +25 -25
- package/dist/types/functions/wallet/registerName.d.ts +24 -24
- package/dist/types/functions/wallet/renewNames.d.ts +24 -24
- package/dist/types/functions/wallet/setAbiRecord.d.ts +25 -25
- package/dist/types/functions/wallet/setAddressRecord.d.ts +25 -25
- package/dist/types/functions/wallet/setChildFuses.d.ts +27 -27
- package/dist/types/functions/wallet/setChildFuses.d.ts.map +1 -1
- package/dist/types/functions/wallet/setContentHashRecord.d.ts +25 -25
- package/dist/types/functions/wallet/setFuses.d.ts +27 -27
- package/dist/types/functions/wallet/setFuses.d.ts.map +1 -1
- package/dist/types/functions/wallet/setPrimaryName.d.ts +25 -25
- package/dist/types/functions/wallet/setRecords.d.ts +25 -25
- package/dist/types/functions/wallet/setResolver.d.ts +25 -25
- package/dist/types/functions/wallet/setTextRecord.d.ts +25 -25
- package/dist/types/functions/wallet/transferName.d.ts +25 -25
- package/dist/types/functions/wallet/unwrapName.d.ts +25 -25
- package/dist/types/functions/wallet/wrapName.d.ts +27 -27
- package/dist/types/functions/wallet/wrapName.d.ts.map +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/utils/contentHash.d.ts +7 -11
- package/dist/types/utils/contentHash.d.ts.map +1 -1
- package/dist/types/utils/encoders/encodeSetContentHash.d.ts.map +1 -1
- package/dist/types/utils/format.d.ts +0 -2
- package/dist/types/utils/format.d.ts.map +1 -1
- package/dist/types/utils/fuses.d.ts +164 -125
- package/dist/types/utils/fuses.d.ts.map +1 -1
- package/dist/types/utils/index.d.ts +2 -2
- package/dist/types/utils/index.d.ts.map +1 -1
- package/dist/types/utils/registerHelpers.d.ts +2 -2
- package/dist/types/utils/registerHelpers.d.ts.map +1 -1
- package/package.json +4 -3
- package/src/clients/decorators/subgraph.ts +1 -0
- package/src/contracts/consts.ts +57 -12
- package/src/dns.ts +5 -5
- package/src/errors/subgraph.ts +4 -4
- package/src/errors/utils.ts +21 -18
- package/src/errors/version.ts +1 -1
- package/src/functions/dns/{prepareDnsImport.ts → getDnsImportData.ts} +12 -13
- package/src/functions/dns/importDnsName.ts +20 -15
- package/src/functions/public/_getContentHash.ts +2 -2
- package/src/functions/public/getSupportedInterfaces.ts +48 -10
- package/src/functions/public/getWrapperData.ts +2 -2
- package/src/functions/subgraph/filters.ts +702 -0
- package/src/functions/subgraph/getNameHistory.ts +2 -2
- package/src/functions/subgraph/getNamesForAddress.ts +170 -186
- package/src/functions/subgraph/getSubnames.ts +121 -113
- package/src/functions/subgraph/types.ts +13 -0
- package/src/functions/subgraph/utils.ts +2 -2
- package/src/functions/wallet/createSubname.ts +4 -4
- package/src/functions/wallet/setChildFuses.ts +3 -3
- package/src/functions/wallet/setFuses.ts +6 -3
- package/src/functions/wallet/wrapName.ts +8 -3
- package/src/index.ts +0 -1
- package/src/utils/contentHash.ts +59 -113
- package/src/utils/encoders/encodeSetContentHash.ts +2 -4
- package/src/utils/format.ts +0 -6
- package/src/utils/fuses.ts +308 -308
- package/src/utils/index.ts +4 -5
- package/src/utils/registerHelpers.ts +5 -3
- package/dist/esm/functions/dns/prepareDnsImport.js.map +0 -1
- package/src/@types/@ensdomains/content-hash.d.ts +0 -1
- package/src/functions/dns/getDnsOwner.test.ts +0 -195
- package/src/functions/dns/importDnsName.test.ts +0 -117
- package/src/functions/dns/prepareDnsImport.test.ts +0 -115
- package/src/functions/public/batch.test.ts +0 -67
- package/src/functions/public/ccip.test.ts +0 -78
- package/src/functions/public/getAbiRecord.test.ts +0 -174
- package/src/functions/public/getAddressRecord.test.ts +0 -83
- package/src/functions/public/getAvailable.test.ts +0 -17
- package/src/functions/public/getContentHashRecord.test.ts +0 -28
- package/src/functions/public/getExpiry.test.ts +0 -48
- package/src/functions/public/getName.test.ts +0 -66
- package/src/functions/public/getOwner.test.ts +0 -87
- package/src/functions/public/getPrice.test.ts +0 -45
- package/src/functions/public/getRecords.test.ts +0 -49
- package/src/functions/public/getResolver.test.ts +0 -12
- package/src/functions/public/getTextRecord.test.ts +0 -20
- package/src/functions/public/getWrapperData.test.ts +0 -79
- package/src/functions/public/getWrapperName.test.ts +0 -19
- package/src/functions/subgraph/client.test.ts +0 -170
- package/src/functions/subgraph/getDecodedName.test.ts +0 -31
- package/src/functions/subgraph/getNameHistory.test.ts +0 -39
- package/src/functions/subgraph/getNamesForAddress.test.ts +0 -244
- package/src/functions/subgraph/getSubgraphRecords.test.ts +0 -74
- package/src/functions/subgraph/getSubgraphRegistrant.test.ts +0 -34
- package/src/functions/subgraph/getSubnames.test.ts +0 -202
- package/src/functions/wallet/commitName.test.ts +0 -58
- package/src/functions/wallet/createSubname.test.ts +0 -73
- package/src/functions/wallet/deleteSubname.test.ts +0 -150
- package/src/functions/wallet/registerName.test.ts +0 -81
- package/src/functions/wallet/renewNames.test.ts +0 -92
- package/src/functions/wallet/setAbiRecord.test.ts +0 -156
- package/src/functions/wallet/setAddressRecord.test.ts +0 -121
- package/src/functions/wallet/setChildFuses.test.ts +0 -97
- package/src/functions/wallet/setContentHashRecord.test.ts +0 -69
- package/src/functions/wallet/setFuses.test.ts +0 -287
- package/src/functions/wallet/setPrimaryName.test.ts +0 -71
- package/src/functions/wallet/setRecords.test.ts +0 -127
- package/src/functions/wallet/setResolver.test.ts +0 -114
- package/src/functions/wallet/setTextRecord.test.ts +0 -67
- package/src/functions/wallet/transferName.test.ts +0 -201
- package/src/functions/wallet/unwrapName.test.ts +0 -93
- package/src/functions/wallet/wrapName.test.ts +0 -195
- package/src/utils/generateRecordCallArray.test.ts +0 -84
- package/src/utils/labels.test.ts +0 -163
- package/src/utils/makeLabelNodeAndParent.test.ts +0 -11
- package/src/utils/makeSafeSecondsDate.test.ts +0 -14
- package/src/utils/normalise.test.ts +0 -35
- package/src/utils/ownerFromContract.test.ts +0 -52
- package/src/utils/registerHelpers.test.ts +0 -159
- package/src/utils/validation.test.ts +0 -170
- package/src/utils/wrapper.test.ts +0 -46
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { type Account, type Address, type Hash, type SendTransactionParameters, type Transport } from 'viem';
|
|
2
2
|
import type { ChainWithEns, WalletWithEns } from '../../contracts/consts.js';
|
|
3
3
|
import type { Prettify, SimpleTransactionRequest, WriteTransactionParameters } from '../../types.js';
|
|
4
|
-
import type {
|
|
4
|
+
import type { GetDnsImportDataReturnType } from './getDnsImportData.js';
|
|
5
5
|
type BaseImportDnsNameDataParameters = {
|
|
6
6
|
/** Name to import */
|
|
7
7
|
name: string;
|
|
8
|
-
/** Data returned from `
|
|
9
|
-
|
|
8
|
+
/** Data returned from `getDnsImportData()` */
|
|
9
|
+
dnsImportData: GetDnsImportDataReturnType;
|
|
10
10
|
/** Address to claim the name for */
|
|
11
11
|
address?: Address;
|
|
12
12
|
/** Address of the resolver to use (default: `ensPublicResolver`) */
|
|
@@ -85,17 +85,17 @@ export declare const makeFunctionData: <TChain extends ChainWithEns, TAccount ex
|
|
|
85
85
|
[x: `address[${string}]`]: undefined;
|
|
86
86
|
[x: `bool[${string}]`]: undefined;
|
|
87
87
|
[x: `bytes[${string}]`]: undefined;
|
|
88
|
-
[x: `
|
|
89
|
-
[x: `
|
|
88
|
+
[x: `bytes3[${string}]`]: undefined;
|
|
89
|
+
[x: `bytes10[${string}]`]: undefined;
|
|
90
90
|
[x: `bytes16[${string}]`]: undefined;
|
|
91
91
|
[x: `bytes1[${string}]`]: undefined;
|
|
92
|
-
[x: `
|
|
92
|
+
[x: `bytes2[${string}]`]: undefined;
|
|
93
93
|
[x: `bytes4[${string}]`]: undefined;
|
|
94
94
|
[x: `bytes5[${string}]`]: undefined;
|
|
95
95
|
[x: `bytes6[${string}]`]: undefined;
|
|
96
96
|
[x: `bytes7[${string}]`]: undefined;
|
|
97
|
+
[x: `bytes8[${string}]`]: undefined;
|
|
97
98
|
[x: `bytes9[${string}]`]: undefined;
|
|
98
|
-
[x: `bytes10[${string}]`]: undefined;
|
|
99
99
|
[x: `bytes11[${string}]`]: undefined;
|
|
100
100
|
[x: `bytes12[${string}]`]: undefined;
|
|
101
101
|
[x: `bytes13[${string}]`]: undefined;
|
|
@@ -118,8 +118,8 @@ export declare const makeFunctionData: <TChain extends ChainWithEns, TAccount ex
|
|
|
118
118
|
[x: `bytes31[${string}]`]: undefined;
|
|
119
119
|
[x: `bytes32[${string}]`]: undefined;
|
|
120
120
|
[x: `int[${string}]`]: undefined;
|
|
121
|
-
[x: `int8[${string}]`]: undefined;
|
|
122
121
|
[x: `int16[${string}]`]: undefined;
|
|
122
|
+
[x: `int8[${string}]`]: undefined;
|
|
123
123
|
[x: `int24[${string}]`]: undefined;
|
|
124
124
|
[x: `int32[${string}]`]: undefined;
|
|
125
125
|
[x: `int40[${string}]`]: undefined;
|
|
@@ -151,8 +151,8 @@ export declare const makeFunctionData: <TChain extends ChainWithEns, TAccount ex
|
|
|
151
151
|
[x: `int248[${string}]`]: undefined;
|
|
152
152
|
[x: `int256[${string}]`]: undefined;
|
|
153
153
|
[x: `uint[${string}]`]: undefined;
|
|
154
|
-
[x: `uint8[${string}]`]: undefined;
|
|
155
154
|
[x: `uint16[${string}]`]: undefined;
|
|
155
|
+
[x: `uint8[${string}]`]: undefined;
|
|
156
156
|
[x: `uint24[${string}]`]: undefined;
|
|
157
157
|
[x: `uint32[${string}]`]: undefined;
|
|
158
158
|
[x: `uint40[${string}]`]: undefined;
|
|
@@ -187,17 +187,17 @@ export declare const makeFunctionData: <TChain extends ChainWithEns, TAccount ex
|
|
|
187
187
|
address?: undefined;
|
|
188
188
|
bool?: undefined;
|
|
189
189
|
bytes?: undefined;
|
|
190
|
-
|
|
191
|
-
|
|
190
|
+
bytes3?: undefined;
|
|
191
|
+
bytes10?: undefined;
|
|
192
192
|
bytes16?: undefined;
|
|
193
193
|
bytes1?: undefined;
|
|
194
|
-
|
|
194
|
+
bytes2?: undefined;
|
|
195
195
|
bytes4?: undefined;
|
|
196
196
|
bytes5?: undefined;
|
|
197
197
|
bytes6?: undefined;
|
|
198
198
|
bytes7?: undefined;
|
|
199
|
+
bytes8?: undefined;
|
|
199
200
|
bytes9?: undefined;
|
|
200
|
-
bytes10?: undefined;
|
|
201
201
|
bytes11?: undefined;
|
|
202
202
|
bytes12?: undefined;
|
|
203
203
|
bytes13?: undefined;
|
|
@@ -219,8 +219,8 @@ export declare const makeFunctionData: <TChain extends ChainWithEns, TAccount ex
|
|
|
219
219
|
bytes30?: undefined;
|
|
220
220
|
bytes31?: undefined;
|
|
221
221
|
bytes32?: undefined;
|
|
222
|
-
int8?: undefined;
|
|
223
222
|
int16?: undefined;
|
|
223
|
+
int8?: undefined;
|
|
224
224
|
int24?: undefined;
|
|
225
225
|
int32?: undefined;
|
|
226
226
|
int40?: undefined;
|
|
@@ -251,8 +251,8 @@ export declare const makeFunctionData: <TChain extends ChainWithEns, TAccount ex
|
|
|
251
251
|
int240?: undefined;
|
|
252
252
|
int248?: undefined;
|
|
253
253
|
int256?: undefined;
|
|
254
|
-
uint8?: undefined;
|
|
255
254
|
uint16?: undefined;
|
|
255
|
+
uint8?: undefined;
|
|
256
256
|
uint24?: undefined;
|
|
257
257
|
uint32?: undefined;
|
|
258
258
|
uint40?: undefined;
|
|
@@ -287,7 +287,7 @@ export declare const makeFunctionData: <TChain extends ChainWithEns, TAccount ex
|
|
|
287
287
|
switchChain: (args: import("viem").SwitchChainParameters) => Promise<void>;
|
|
288
288
|
watchAsset: (args: import("viem").WatchAssetParams) => Promise<boolean>;
|
|
289
289
|
writeContract: <TAbi_1 extends import("viem").Abi | readonly unknown[], TFunctionName extends string, TChainOverride_2 extends import("viem").Chain | undefined>(args: import("viem").WriteContractParameters<TAbi_1, TFunctionName, TChain, TAccount, TChainOverride_2>) => Promise<`0x${string}`>;
|
|
290
|
-
}, { name,
|
|
290
|
+
}, { name, dnsImportData, address, resolverAddress, }: ImportDnsNameDataParameters) => ImportDnsNameDataReturnType;
|
|
291
291
|
/**
|
|
292
292
|
* Creates a transaction to import a DNS name to ENS.
|
|
293
293
|
* @param wallet - {@link WalletWithEns}
|
|
@@ -297,9 +297,9 @@ export declare const makeFunctionData: <TChain extends ChainWithEns, TAccount ex
|
|
|
297
297
|
* @example
|
|
298
298
|
* import { createPublicClient, createWalletClient, http, custom } from 'viem'
|
|
299
299
|
* import { mainnet } from 'viem/chains'
|
|
300
|
-
* import {
|
|
300
|
+
* import { addEnsContracts, getDnsImportData, importDnsName } from '@ensdomains/ensjs'
|
|
301
301
|
*
|
|
302
|
-
* const
|
|
302
|
+
* const mainnetWithEns = addEnsContracts(mainnet)
|
|
303
303
|
* const client = createPublicClient({
|
|
304
304
|
* chain: mainnetWithEns,
|
|
305
305
|
* transport: http(),
|
|
@@ -308,15 +308,15 @@ export declare const makeFunctionData: <TChain extends ChainWithEns, TAccount ex
|
|
|
308
308
|
* chain: mainnetWithEns,
|
|
309
309
|
* transport: custom(window.ethereum),
|
|
310
310
|
* })
|
|
311
|
-
* const
|
|
311
|
+
* const dnsImportData = await getDnsImportData(client, {
|
|
312
312
|
* name: 'example.com',
|
|
313
313
|
* })
|
|
314
|
-
* const hash = await importDnsName(
|
|
314
|
+
* const hash = await importDnsName(wallet, {
|
|
315
315
|
* name: 'example.com',
|
|
316
|
-
*
|
|
316
|
+
* dnsImportData,
|
|
317
317
|
* })
|
|
318
318
|
*/
|
|
319
|
-
declare function importDnsName<TChain extends ChainWithEns, TAccount extends Account | undefined, TChainOverride extends ChainWithEns | undefined = ChainWithEns>(wallet: WalletWithEns<Transport, TChain, TAccount>, { name, address,
|
|
319
|
+
declare function importDnsName<TChain extends ChainWithEns, TAccount extends Account | undefined, TChainOverride extends ChainWithEns | undefined = ChainWithEns>(wallet: WalletWithEns<Transport, TChain, TAccount>, { name, address, dnsImportData, resolverAddress, ...txArgs }: ImportDnsNameParameters<TChain, TAccount, TChainOverride>): Promise<ImportDnsNameReturnType>;
|
|
320
320
|
declare namespace importDnsName {
|
|
321
321
|
var makeFunctionData: <TChain extends ChainWithEns, TAccount extends Account | undefined>(wallet: {
|
|
322
322
|
account: TAccount;
|
|
@@ -379,17 +379,17 @@ declare namespace importDnsName {
|
|
|
379
379
|
[x: `address[${string}]`]: undefined;
|
|
380
380
|
[x: `bool[${string}]`]: undefined;
|
|
381
381
|
[x: `bytes[${string}]`]: undefined;
|
|
382
|
-
[x: `
|
|
383
|
-
[x: `
|
|
382
|
+
[x: `bytes3[${string}]`]: undefined;
|
|
383
|
+
[x: `bytes10[${string}]`]: undefined;
|
|
384
384
|
[x: `bytes16[${string}]`]: undefined;
|
|
385
385
|
[x: `bytes1[${string}]`]: undefined;
|
|
386
|
-
[x: `
|
|
386
|
+
[x: `bytes2[${string}]`]: undefined;
|
|
387
387
|
[x: `bytes4[${string}]`]: undefined;
|
|
388
388
|
[x: `bytes5[${string}]`]: undefined;
|
|
389
389
|
[x: `bytes6[${string}]`]: undefined;
|
|
390
390
|
[x: `bytes7[${string}]`]: undefined;
|
|
391
|
+
[x: `bytes8[${string}]`]: undefined;
|
|
391
392
|
[x: `bytes9[${string}]`]: undefined;
|
|
392
|
-
[x: `bytes10[${string}]`]: undefined;
|
|
393
393
|
[x: `bytes11[${string}]`]: undefined;
|
|
394
394
|
[x: `bytes12[${string}]`]: undefined;
|
|
395
395
|
[x: `bytes13[${string}]`]: undefined;
|
|
@@ -412,8 +412,8 @@ declare namespace importDnsName {
|
|
|
412
412
|
[x: `bytes31[${string}]`]: undefined;
|
|
413
413
|
[x: `bytes32[${string}]`]: undefined;
|
|
414
414
|
[x: `int[${string}]`]: undefined;
|
|
415
|
-
[x: `int8[${string}]`]: undefined;
|
|
416
415
|
[x: `int16[${string}]`]: undefined;
|
|
416
|
+
[x: `int8[${string}]`]: undefined;
|
|
417
417
|
[x: `int24[${string}]`]: undefined;
|
|
418
418
|
[x: `int32[${string}]`]: undefined;
|
|
419
419
|
[x: `int40[${string}]`]: undefined;
|
|
@@ -445,8 +445,8 @@ declare namespace importDnsName {
|
|
|
445
445
|
[x: `int248[${string}]`]: undefined;
|
|
446
446
|
[x: `int256[${string}]`]: undefined;
|
|
447
447
|
[x: `uint[${string}]`]: undefined;
|
|
448
|
-
[x: `uint8[${string}]`]: undefined;
|
|
449
448
|
[x: `uint16[${string}]`]: undefined;
|
|
449
|
+
[x: `uint8[${string}]`]: undefined;
|
|
450
450
|
[x: `uint24[${string}]`]: undefined;
|
|
451
451
|
[x: `uint32[${string}]`]: undefined;
|
|
452
452
|
[x: `uint40[${string}]`]: undefined;
|
|
@@ -481,17 +481,17 @@ declare namespace importDnsName {
|
|
|
481
481
|
address?: undefined;
|
|
482
482
|
bool?: undefined;
|
|
483
483
|
bytes?: undefined;
|
|
484
|
-
|
|
485
|
-
|
|
484
|
+
bytes3?: undefined;
|
|
485
|
+
bytes10?: undefined;
|
|
486
486
|
bytes16?: undefined;
|
|
487
487
|
bytes1?: undefined;
|
|
488
|
-
|
|
488
|
+
bytes2?: undefined;
|
|
489
489
|
bytes4?: undefined;
|
|
490
490
|
bytes5?: undefined;
|
|
491
491
|
bytes6?: undefined;
|
|
492
492
|
bytes7?: undefined;
|
|
493
|
+
bytes8?: undefined;
|
|
493
494
|
bytes9?: undefined;
|
|
494
|
-
bytes10?: undefined;
|
|
495
495
|
bytes11?: undefined;
|
|
496
496
|
bytes12?: undefined;
|
|
497
497
|
bytes13?: undefined;
|
|
@@ -513,8 +513,8 @@ declare namespace importDnsName {
|
|
|
513
513
|
bytes30?: undefined;
|
|
514
514
|
bytes31?: undefined;
|
|
515
515
|
bytes32?: undefined;
|
|
516
|
-
int8?: undefined;
|
|
517
516
|
int16?: undefined;
|
|
517
|
+
int8?: undefined;
|
|
518
518
|
int24?: undefined;
|
|
519
519
|
int32?: undefined;
|
|
520
520
|
int40?: undefined;
|
|
@@ -545,8 +545,8 @@ declare namespace importDnsName {
|
|
|
545
545
|
int240?: undefined;
|
|
546
546
|
int248?: undefined;
|
|
547
547
|
int256?: undefined;
|
|
548
|
-
uint8?: undefined;
|
|
549
548
|
uint16?: undefined;
|
|
549
|
+
uint8?: undefined;
|
|
550
550
|
uint24?: undefined;
|
|
551
551
|
uint32?: undefined;
|
|
552
552
|
uint40?: undefined;
|
|
@@ -581,9 +581,9 @@ declare namespace importDnsName {
|
|
|
581
581
|
switchChain: (args: import("viem").SwitchChainParameters) => Promise<void>;
|
|
582
582
|
watchAsset: (args: import("viem").WatchAssetParams) => Promise<boolean>;
|
|
583
583
|
writeContract: <TAbi_1 extends import("viem").Abi | readonly unknown[], TFunctionName extends string, TChainOverride_2 extends import("viem").Chain | undefined>(args: import("viem").WriteContractParameters<TAbi_1, TFunctionName, TChain, TAccount, TChainOverride_2>) => Promise<`0x${string}`>;
|
|
584
|
-
}, { name,
|
|
585
|
-
to: `0x${string}`;
|
|
584
|
+
}, { name, dnsImportData, address, resolverAddress, }: ImportDnsNameDataParameters) => {
|
|
586
585
|
data: `0x${string}`;
|
|
586
|
+
to: `0x${string}`;
|
|
587
587
|
};
|
|
588
588
|
}
|
|
589
589
|
export default importDnsName;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"importDnsName.d.ts","sourceRoot":"","sources":["../../../../src/functions/dns/importDnsName.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,OAAO,EACZ,KAAK,OAAO,EACZ,KAAK,IAAI,EACT,KAAK,yBAAyB,EAC9B,KAAK,SAAS,EACf,MAAM,MAAM,CAAA;AACb,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAA;AAO5E,OAAO,KAAK,EACV,QAAQ,EACR,wBAAwB,EACxB,0BAA0B,EAC3B,MAAM,gBAAgB,CAAA;AAEvB,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,uBAAuB,CAAA;AAEvE,KAAK,+BAA+B,GAAG;IACrC,qBAAqB;IACrB,IAAI,EAAE,MAAM,CAAA;IACZ,8CAA8C;IAC9C,
|
|
1
|
+
{"version":3,"file":"importDnsName.d.ts","sourceRoot":"","sources":["../../../../src/functions/dns/importDnsName.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,OAAO,EACZ,KAAK,OAAO,EACZ,KAAK,IAAI,EACT,KAAK,yBAAyB,EAC9B,KAAK,SAAS,EACf,MAAM,MAAM,CAAA;AACb,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uDAUxB,2BAA2B,KAC7B,2BA+CF,CAAA;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,iBAAe,aAAa,CAC1B,MAAM,SAAS,YAAY,EAC3B,QAAQ,SAAS,OAAO,GAAG,SAAS,EACpC,cAAc,SAAS,YAAY,GAAG,SAAS,GAAG,YAAY,EAE9D,MAAM,EAAE,aAAa,CAAC,SAAS,EAAE,MAAM,EAAE,QAAQ,CAAC,EAClD,EACE,IAAI,EACJ,OAAO,EACP,aAAa,EACb,eAAe,EACf,GAAG,MAAM,EACV,EAAE,uBAAuB,CAAC,MAAM,EAAE,QAAQ,EAAE,cAAc,CAAC,GAC3D,OAAO,CAAC,uBAAuB,CAAC,CAYlC;kBAzBc,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6B5B,eAAe,aAAa,CAAA"}
|
|
@@ -1,11 +1,26 @@
|
|
|
1
1
|
import { BaseError, type Address, type Hex } from 'viem';
|
|
2
2
|
import type { ClientWithEns } from '../../contracts/consts.js';
|
|
3
3
|
import type { SimpleTransactionRequest, TransactionRequestWithPassthrough } from '../../types.js';
|
|
4
|
-
export type GetSupportedInterfacesParameters = {
|
|
4
|
+
export type GetSupportedInterfacesParameters<TInterfaces extends readonly Hex[]> = {
|
|
5
5
|
address: Address;
|
|
6
|
-
interfaces:
|
|
6
|
+
interfaces: TInterfaces;
|
|
7
7
|
};
|
|
8
|
-
export type GetSupportedInterfacesReturnType
|
|
9
|
-
|
|
8
|
+
export type GetSupportedInterfacesReturnType<TInterfaces extends readonly Hex[]> = {
|
|
9
|
+
-readonly [K in keyof TInterfaces]: boolean;
|
|
10
|
+
};
|
|
11
|
+
declare const encode: <TInterfaces extends `0x${string}`[]>(client: ClientWithEns, { address, interfaces }: GetSupportedInterfacesParameters<TInterfaces>) => TransactionRequestWithPassthrough;
|
|
12
|
+
declare const decode: <const TInterfaces extends readonly `0x${string}`[]>(client: ClientWithEns, data: Hex | BaseError, passthrough: SimpleTransactionRequest[]) => Promise<GetSupportedInterfacesReturnType<TInterfaces>>;
|
|
13
|
+
type EncoderFunction = typeof encode;
|
|
14
|
+
type DecoderFunction = typeof decode;
|
|
15
|
+
type BatchableFunctionObject = {
|
|
16
|
+
encode: EncoderFunction;
|
|
17
|
+
decode: DecoderFunction;
|
|
18
|
+
batch: <const TInterfaces extends readonly Hex[], TParams extends GetSupportedInterfacesParameters<TInterfaces>>(args: TParams) => {
|
|
19
|
+
args: [TParams];
|
|
20
|
+
encode: EncoderFunction;
|
|
21
|
+
decode: typeof decode<TInterfaces>;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
declare const getSupportedInterfaces: (<const TInterfaces extends readonly `0x${string}`[]>(client: ClientWithEns, { address, interfaces }: GetSupportedInterfacesParameters<TInterfaces>) => Promise<GetSupportedInterfacesReturnType<TInterfaces>>) & BatchableFunctionObject;
|
|
10
25
|
export default getSupportedInterfaces;
|
|
11
26
|
//# sourceMappingURL=getSupportedInterfaces.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getSupportedInterfaces.d.ts","sourceRoot":"","sources":["../../../../src/functions/public/getSupportedInterfaces.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"getSupportedInterfaces.d.ts","sourceRoot":"","sources":["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,7 +1,7 @@
|
|
|
1
1
|
import { BaseError, type Address, type Hex } from 'viem';
|
|
2
2
|
import type { ClientWithEns } from '../../contracts/consts.js';
|
|
3
3
|
import type { DateWithValue, GenericPassthrough, Prettify, TransactionRequestWithPassthrough } from '../../types.js';
|
|
4
|
-
import {
|
|
4
|
+
import { type DecodedFuses } from '../../utils/fuses.js';
|
|
5
5
|
import { type GeneratedFunction } from '../../utils/generateFunction.js';
|
|
6
6
|
export type GetWrapperDataParameters = {
|
|
7
7
|
/** Name to get wrapper data for */
|
|
@@ -9,7 +9,7 @@ export type GetWrapperDataParameters = {
|
|
|
9
9
|
};
|
|
10
10
|
export type GetWrapperDataReturnType = Prettify<{
|
|
11
11
|
/** Fuse object */
|
|
12
|
-
fuses:
|
|
12
|
+
fuses: DecodedFuses & {
|
|
13
13
|
value: number;
|
|
14
14
|
};
|
|
15
15
|
/** Expiry of the name */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getWrapperData.d.ts","sourceRoot":"","sources":["../../../../src/functions/public/getWrapperData.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EAIT,KAAK,OAAO,EACZ,KAAK,GAAG,EACT,MAAM,MAAM,CAAA;AACb,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAA;AAG9D,OAAO,KAAK,EACV,aAAa,EACb,kBAAkB,EAClB,QAAQ,EACR,iCAAiC,EAClC,MAAM,gBAAgB,CAAA;AAEvB,OAAO,
|
|
1
|
+
{"version":3,"file":"getWrapperData.d.ts","sourceRoot":"","sources":["../../../../src/functions/public/getWrapperData.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EAIT,KAAK,OAAO,EACZ,KAAK,GAAG,EACT,MAAM,MAAM,CAAA;AACb,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAA;AAG9D,OAAO,KAAK,EACV,aAAa,EACb,kBAAkB,EAClB,QAAQ,EACR,iCAAiC,EAClC,MAAM,gBAAgB,CAAA;AAEvB,OAAO,EAAe,KAAK,YAAY,EAAE,MAAM,sBAAsB,CAAA;AACrE,OAAO,EAEL,KAAK,iBAAiB,EACvB,MAAM,iCAAiC,CAAA;AAIxC,MAAM,MAAM,wBAAwB,GAAG;IACrC,mCAAmC;IACnC,IAAI,EAAE,MAAM,CAAA;CACb,CAAA;AAED,MAAM,MAAM,wBAAwB,GAAG,QAAQ,CAAC;IAC9C,kBAAkB;IAClB,KAAK,EAAE,YAAY,GAAG;QACpB,KAAK,EAAE,MAAM,CAAA;KACd,CAAA;IACD,yBAAyB;IACzB,MAAM,EAAE,aAAa,CAAC,MAAM,CAAC,GAAG,IAAI,CAAA;IACpC,wBAAwB;IACxB,KAAK,EAAE,OAAO,CAAA;CACf,GAAG,IAAI,CAAC,CAAA;AAET,QAAA,MAAM,MAAM,WACF,aAAa,YACX,wBAAwB,KACjC,iCAeF,CAAA;AAED,QAAA,MAAM,MAAM,YACD,aAAa,QAChB,GAAG,GAAG,SAAS,eACR,kBAAkB,KAC9B,QAAQ,wBAAwB,CAkClC,CAAA;AAED,KAAK,uBAAuB,GAAG,iBAAiB,CAAC,OAAO,MAAM,EAAE,OAAO,MAAM,CAAC,CAAA;AAE9E;;;;;;;;;;;;;;;;GAgBG;AACH,QAAA,MAAM,cAAc,YACV,aAAa,YACX,wBAAwB,KAC/B,QAAQ,wBAAwB,CAAC,2BACb,CAAA;AAEzB,eAAe,cAAc,CAAA"}
|