@ensdomains/ensjs 3.0.0-alpha.40 → 3.0.0-alpha.41

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.
Files changed (37) hide show
  1. package/dist/cjs/functions/getSpecificRecord.js +83 -0
  2. package/dist/cjs/index.js +10 -0
  3. package/dist/cjs/utils/recordHelpers.js +54 -0
  4. package/dist/esm/functions/getSpecificRecord.mjs +78 -1
  5. package/dist/esm/index.mjs +10 -0
  6. package/dist/esm/utils/recordHelpers.mjs +48 -0
  7. package/dist/types/functions/burnFuses.d.ts +1 -1
  8. package/dist/types/functions/commitName.d.ts +6 -6
  9. package/dist/types/functions/createSubname.d.ts +1 -1
  10. package/dist/types/functions/deleteSubname.d.ts +1 -1
  11. package/dist/types/functions/getSpecificRecord.d.ts +22 -0
  12. package/dist/types/functions/importDNSSECName.d.ts +1 -1
  13. package/dist/types/functions/registerName.d.ts +1 -1
  14. package/dist/types/functions/renewNames.d.ts +2 -2
  15. package/dist/types/functions/setName.d.ts +1 -1
  16. package/dist/types/functions/setRecord.d.ts +5 -1
  17. package/dist/types/functions/setRecords.d.ts +1 -1
  18. package/dist/types/functions/setResolver.d.ts +1 -1
  19. package/dist/types/functions/transferController.d.ts +1 -1
  20. package/dist/types/functions/transferName.d.ts +1 -1
  21. package/dist/types/functions/transferSubname.d.ts +1 -1
  22. package/dist/types/functions/types.d.ts +3 -1
  23. package/dist/types/functions/unwrapName.d.ts +1 -1
  24. package/dist/types/functions/wrapName.d.ts +1 -1
  25. package/dist/types/index.d.ts +25 -3
  26. package/dist/types/utils/recordHelpers.d.ts +14 -2
  27. package/dist/types/utils/writeTx.d.ts +5 -5
  28. package/package.json +4 -1
  29. package/src/@types/pako.d.ts +188 -0
  30. package/src/contracts/bulkRenewal.ts +1 -1
  31. package/src/functions/getSpecificRecord.test.ts +162 -0
  32. package/src/functions/getSpecificRecord.ts +95 -1
  33. package/src/functions/setRecord.test.ts +147 -1
  34. package/src/functions/setRecord.ts +6 -1
  35. package/src/functions/types.ts +4 -0
  36. package/src/index.ts +12 -0
  37. package/src/utils/recordHelpers.ts +63 -1
@@ -1,7 +1,9 @@
1
1
  "use strict";
2
+ var __create = Object.create;
2
3
  var __defProp = Object.defineProperty;
3
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
5
7
  var __hasOwnProp = Object.prototype.hasOwnProperty;
6
8
  var __export = (target, all) => {
7
9
  for (var name in all)
@@ -15,12 +17,18 @@ var __copyProps = (to, from, except, desc) => {
15
17
  }
16
18
  return to;
17
19
  };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
+ mod
23
+ ));
18
24
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
25
  var getSpecificRecord_exports = {};
20
26
  __export(getSpecificRecord_exports, {
27
+ _getABI: () => _getABI,
21
28
  _getAddr: () => _getAddr,
22
29
  _getContentHash: () => _getContentHash,
23
30
  _getText: () => _getText,
31
+ getABI: () => getABI,
24
32
  getAddr: () => getAddr,
25
33
  getContentHash: () => getContentHash,
26
34
  getText: () => getText
@@ -28,6 +36,7 @@ __export(getSpecificRecord_exports, {
28
36
  module.exports = __toCommonJS(getSpecificRecord_exports);
29
37
  var import_address_encoder = require("@ensdomains/address-encoder");
30
38
  var import_bytes = require("@ethersproject/bytes");
39
+ var import_strings = require("@ethersproject/strings");
31
40
  var import_contentHash = require("../utils/contentHash");
32
41
  var import_normalise = require("../utils/normalise");
33
42
  const _getContentHash = {
@@ -193,3 +202,77 @@ const getAddr = {
193
202
  return _getAddr.decode({ contracts }, urData.data, _name, coinType);
194
203
  }
195
204
  };
205
+ const supportedContentTypes = "0xf";
206
+ const _getABI = {
207
+ raw: async ({ contracts }, name) => {
208
+ const publicResolver = await (contracts == null ? void 0 : contracts.getPublicResolver());
209
+ return {
210
+ to: "0x0000000000000000000000000000000000000000",
211
+ data: publicResolver.interface.encodeFunctionData("ABI", [
212
+ (0, import_normalise.namehash)(name),
213
+ supportedContentTypes
214
+ ])
215
+ };
216
+ },
217
+ decode: async ({ contracts }, data) => {
218
+ const publicResolver = await (contracts == null ? void 0 : contracts.getPublicResolver());
219
+ const [bnContentType, encodedABIData] = publicResolver.interface.decodeFunctionResult("ABI", data);
220
+ if (!bnContentType || !data) {
221
+ return;
222
+ }
223
+ const contentType = bnContentType.toNumber();
224
+ if (!contentType) {
225
+ return;
226
+ }
227
+ let abiData;
228
+ let decoded = false;
229
+ switch (contentType) {
230
+ case 1:
231
+ abiData = JSON.parse((0, import_strings.toUtf8String)(encodedABIData));
232
+ decoded = true;
233
+ break;
234
+ case 2: {
235
+ const { inflate } = await import("pako/dist/pako_inflate.min.js");
236
+ abiData = JSON.parse(
237
+ inflate((0, import_bytes.arrayify)(encodedABIData), { to: "string" })
238
+ );
239
+ decoded = true;
240
+ break;
241
+ }
242
+ case 4: {
243
+ const { decodeFirst } = await import("cbor");
244
+ abiData = await decodeFirst((0, import_bytes.arrayify)(encodedABIData));
245
+ decoded = true;
246
+ break;
247
+ }
248
+ case 8:
249
+ abiData = (0, import_strings.toUtf8String)(encodedABIData);
250
+ decoded = false;
251
+ break;
252
+ default:
253
+ try {
254
+ abiData = (0, import_strings.toUtf8String)(encodedABIData);
255
+ } catch {
256
+ abiData = encodedABIData;
257
+ }
258
+ decoded = false;
259
+ }
260
+ return {
261
+ contentType,
262
+ decoded,
263
+ abi: abiData
264
+ };
265
+ }
266
+ };
267
+ const getABI = {
268
+ raw: async ({ contracts, universalWrapper }, name) => {
269
+ const prData = await _getABI.raw({ contracts }, name);
270
+ return universalWrapper.raw(name, prData.data);
271
+ },
272
+ decode: async ({ contracts, universalWrapper }, data) => {
273
+ const urData = await universalWrapper.decode(data);
274
+ if (!urData)
275
+ return;
276
+ return _getABI.decode({ contracts }, urData.data);
277
+ }
278
+ };
package/dist/cjs/index.js CHANGED
@@ -230,6 +230,16 @@ class ENS {
230
230
  ["contracts"],
231
231
  "_getText"
232
232
  );
233
+ this.getABI = this.generateRawFunction(
234
+ "initialGetters",
235
+ ["contracts", "universalWrapper"],
236
+ "getABI"
237
+ );
238
+ this._getABI = this.generateRawFunction(
239
+ "initialGetters",
240
+ ["contracts"],
241
+ "_getABI"
242
+ );
233
243
  this.getOwner = this.generateRawFunction(
234
244
  "initialGetters",
235
245
  ["contracts", "multicallWrapper", "gqlInstance"],
@@ -1,7 +1,9 @@
1
1
  "use strict";
2
+ var __create = Object.create;
2
3
  var __defProp = Object.defineProperty;
3
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
5
7
  var __hasOwnProp = Object.prototype.hasOwnProperty;
6
8
  var __export = (target, all) => {
7
9
  for (var name in all)
@@ -15,15 +17,21 @@ var __copyProps = (to, from, except, desc) => {
15
17
  }
16
18
  return to;
17
19
  };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
+ mod
23
+ ));
18
24
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
25
  var recordHelpers_exports = {};
20
26
  __export(recordHelpers_exports, {
27
+ generateABIInput: () => generateABIInput,
21
28
  generateRecordCallArray: () => generateRecordCallArray,
22
29
  generateSetAddr: () => generateSetAddr,
23
30
  generateSingleRecordCall: () => generateSingleRecordCall
24
31
  });
25
32
  module.exports = __toCommonJS(recordHelpers_exports);
26
33
  var import_address_encoder = require("@ensdomains/address-encoder");
34
+ var import_utils = require("ethers/lib/utils");
27
35
  var import_contentHash = require("./contentHash");
28
36
  const generateSetAddr = (namehash, coinType, address, resolver) => {
29
37
  let coinTypeInstance;
@@ -39,6 +47,34 @@ const generateSetAddr = (namehash, coinType, address, resolver) => {
39
47
  [namehash, inputCoinType, encodedAddress]
40
48
  );
41
49
  };
50
+ const generateABIInput = async (encodeAs, data) => {
51
+ let contentType;
52
+ let encodedData;
53
+ switch (encodeAs) {
54
+ case "json":
55
+ contentType = 1;
56
+ encodedData = JSON.stringify(data);
57
+ break;
58
+ case "zlib": {
59
+ contentType = 2;
60
+ const { deflate } = await import("pako/dist/pako_deflate.min.js");
61
+ encodedData = deflate(JSON.stringify(data));
62
+ break;
63
+ }
64
+ case "cbor": {
65
+ contentType = 4;
66
+ const { encode } = await import("cbor");
67
+ encodedData = encode(data);
68
+ break;
69
+ }
70
+ default: {
71
+ contentType = 8;
72
+ encodedData = data;
73
+ break;
74
+ }
75
+ }
76
+ return { contentType, data: encodedData };
77
+ };
42
78
  function generateSingleRecordCall(namehash, resolver, type) {
43
79
  if (type === "contentHash") {
44
80
  return (_r) => {
@@ -56,6 +92,24 @@ function generateSingleRecordCall(namehash, resolver, type) {
56
92
  ]);
57
93
  };
58
94
  }
95
+ if (type === "abi") {
96
+ return (_r) => {
97
+ const record = _r;
98
+ const { contentType = 1, data } = record;
99
+ let encodedData = data;
100
+ if (!(0, import_utils.isBytesLike)(encodedData)) {
101
+ if (typeof encodedData === "object") {
102
+ encodedData = JSON.stringify(encodedData);
103
+ }
104
+ encodedData = (0, import_utils.toUtf8Bytes)(encodedData);
105
+ }
106
+ return resolver.interface.encodeFunctionData("setABI", [
107
+ namehash,
108
+ contentType,
109
+ encodedData
110
+ ]);
111
+ };
112
+ }
59
113
  return (_r) => {
60
114
  const record = _r;
61
115
  if (type === "text") {
@@ -1,6 +1,7 @@
1
1
  // src/functions/getSpecificRecord.ts
2
2
  import { formatsByCoinType, formatsByName } from "@ensdomains/address-encoder";
3
- import { hexStripZeros, isBytesLike } from "@ethersproject/bytes";
3
+ import { arrayify, hexStripZeros, isBytesLike } from "@ethersproject/bytes";
4
+ import { toUtf8String } from "@ethersproject/strings";
4
5
  import { decodeContenthash } from "../utils/contentHash.mjs";
5
6
  import { namehash } from "../utils/normalise.mjs";
6
7
  var _getContentHash = {
@@ -166,10 +167,86 @@ var getAddr = {
166
167
  return _getAddr.decode({ contracts }, urData.data, _name, coinType);
167
168
  }
168
169
  };
170
+ var supportedContentTypes = "0xf";
171
+ var _getABI = {
172
+ raw: async ({ contracts }, name) => {
173
+ const publicResolver = await contracts?.getPublicResolver();
174
+ return {
175
+ to: "0x0000000000000000000000000000000000000000",
176
+ data: publicResolver.interface.encodeFunctionData("ABI", [
177
+ namehash(name),
178
+ supportedContentTypes
179
+ ])
180
+ };
181
+ },
182
+ decode: async ({ contracts }, data) => {
183
+ const publicResolver = await contracts?.getPublicResolver();
184
+ const [bnContentType, encodedABIData] = publicResolver.interface.decodeFunctionResult("ABI", data);
185
+ if (!bnContentType || !data) {
186
+ return;
187
+ }
188
+ const contentType = bnContentType.toNumber();
189
+ if (!contentType) {
190
+ return;
191
+ }
192
+ let abiData;
193
+ let decoded = false;
194
+ switch (contentType) {
195
+ case 1:
196
+ abiData = JSON.parse(toUtf8String(encodedABIData));
197
+ decoded = true;
198
+ break;
199
+ case 2: {
200
+ const { inflate } = await import("pako/dist/pako_inflate.min.js");
201
+ abiData = JSON.parse(
202
+ inflate(arrayify(encodedABIData), { to: "string" })
203
+ );
204
+ decoded = true;
205
+ break;
206
+ }
207
+ case 4: {
208
+ const { decodeFirst } = await import("cbor");
209
+ abiData = await decodeFirst(arrayify(encodedABIData));
210
+ decoded = true;
211
+ break;
212
+ }
213
+ case 8:
214
+ abiData = toUtf8String(encodedABIData);
215
+ decoded = false;
216
+ break;
217
+ default:
218
+ try {
219
+ abiData = toUtf8String(encodedABIData);
220
+ } catch {
221
+ abiData = encodedABIData;
222
+ }
223
+ decoded = false;
224
+ }
225
+ return {
226
+ contentType,
227
+ decoded,
228
+ abi: abiData
229
+ };
230
+ }
231
+ };
232
+ var getABI = {
233
+ raw: async ({ contracts, universalWrapper }, name) => {
234
+ const prData = await _getABI.raw({ contracts }, name);
235
+ return universalWrapper.raw(name, prData.data);
236
+ },
237
+ decode: async ({ contracts, universalWrapper }, data) => {
238
+ const urData = await universalWrapper.decode(data);
239
+ if (!urData)
240
+ return;
241
+ return _getABI.decode({ contracts }, urData.data);
242
+ }
243
+ };
169
244
  export {
245
+ _getABI,
170
246
  _getAddr,
171
247
  _getContentHash,
172
248
  _getText,
249
+ getABI,
173
250
  getAddr,
174
251
  getContentHash,
175
252
  getText
@@ -207,6 +207,16 @@ var ENS = class {
207
207
  ["contracts"],
208
208
  "_getText"
209
209
  );
210
+ getABI = this.generateRawFunction(
211
+ "initialGetters",
212
+ ["contracts", "universalWrapper"],
213
+ "getABI"
214
+ );
215
+ _getABI = this.generateRawFunction(
216
+ "initialGetters",
217
+ ["contracts"],
218
+ "_getABI"
219
+ );
210
220
  getOwner = this.generateRawFunction(
211
221
  "initialGetters",
212
222
  ["contracts", "multicallWrapper", "gqlInstance"],
@@ -1,5 +1,6 @@
1
1
  // src/utils/recordHelpers.ts
2
2
  import { formatsByCoinType, formatsByName } from "@ensdomains/address-encoder";
3
+ import { isBytesLike, toUtf8Bytes } from "ethers/lib/utils";
3
4
  import { encodeContenthash } from "./contentHash.mjs";
4
5
  var generateSetAddr = (namehash, coinType, address, resolver) => {
5
6
  let coinTypeInstance;
@@ -15,6 +16,34 @@ var generateSetAddr = (namehash, coinType, address, resolver) => {
15
16
  [namehash, inputCoinType, encodedAddress]
16
17
  );
17
18
  };
19
+ var generateABIInput = async (encodeAs, data) => {
20
+ let contentType;
21
+ let encodedData;
22
+ switch (encodeAs) {
23
+ case "json":
24
+ contentType = 1;
25
+ encodedData = JSON.stringify(data);
26
+ break;
27
+ case "zlib": {
28
+ contentType = 2;
29
+ const { deflate } = await import("pako/dist/pako_deflate.min.js");
30
+ encodedData = deflate(JSON.stringify(data));
31
+ break;
32
+ }
33
+ case "cbor": {
34
+ contentType = 4;
35
+ const { encode } = await import("cbor");
36
+ encodedData = encode(data);
37
+ break;
38
+ }
39
+ default: {
40
+ contentType = 8;
41
+ encodedData = data;
42
+ break;
43
+ }
44
+ }
45
+ return { contentType, data: encodedData };
46
+ };
18
47
  function generateSingleRecordCall(namehash, resolver, type) {
19
48
  if (type === "contentHash") {
20
49
  return (_r) => {
@@ -32,6 +61,24 @@ function generateSingleRecordCall(namehash, resolver, type) {
32
61
  ]);
33
62
  };
34
63
  }
64
+ if (type === "abi") {
65
+ return (_r) => {
66
+ const record = _r;
67
+ const { contentType = 1, data } = record;
68
+ let encodedData = data;
69
+ if (!isBytesLike(encodedData)) {
70
+ if (typeof encodedData === "object") {
71
+ encodedData = JSON.stringify(encodedData);
72
+ }
73
+ encodedData = toUtf8Bytes(encodedData);
74
+ }
75
+ return resolver.interface.encodeFunctionData("setABI", [
76
+ namehash,
77
+ contentType,
78
+ encodedData
79
+ ]);
80
+ };
81
+ }
35
82
  return (_r) => {
36
83
  const record = _r;
37
84
  if (type === "text") {
@@ -69,6 +116,7 @@ var generateRecordCallArray = (namehash, records, resolver) => {
69
116
  return calls;
70
117
  };
71
118
  export {
119
+ generateABIInput,
72
120
  generateRecordCallArray,
73
121
  generateSetAddr,
74
122
  generateSingleRecordCall
@@ -1,3 +1,3 @@
1
1
  import { ENSArgs } from '..';
2
2
  import { FuseProps } from '../utils/fuses';
3
- export default function ({ contracts, signer }: ENSArgs<'contracts' | 'signer'>, name: string, props: FuseProps): Promise<import("@ethersproject/contracts").PopulatedTransaction>;
3
+ export default function ({ contracts, signer }: ENSArgs<'contracts' | 'signer'>, name: string, props: FuseProps): Promise<import("ethers").PopulatedTransaction>;
@@ -7,20 +7,20 @@ export default function ({ contracts }: ENSArgs<'contracts'>, name: string, { re
7
7
  customData: {
8
8
  secret: string;
9
9
  commitment: string;
10
- wrapperExpiry: import("@ethersproject/bignumber").BigNumberish;
10
+ wrapperExpiry: import("ethers").BigNumberish;
11
11
  };
12
12
  to?: string | undefined;
13
13
  from?: string | undefined;
14
14
  nonce?: number | undefined;
15
- gasLimit?: import("@ethersproject/bignumber").BigNumber | undefined;
16
- gasPrice?: import("@ethersproject/bignumber").BigNumber | undefined;
15
+ gasLimit?: import("ethers").BigNumber | undefined;
16
+ gasPrice?: import("ethers").BigNumber | undefined;
17
17
  data?: string | undefined;
18
- value?: import("@ethersproject/bignumber").BigNumber | undefined;
18
+ value?: import("ethers").BigNumber | undefined;
19
19
  chainId?: number | undefined;
20
20
  type?: number | undefined;
21
21
  accessList?: import("@ethersproject/transactions").AccessList | undefined;
22
- maxFeePerGas?: import("@ethersproject/bignumber").BigNumber | undefined;
23
- maxPriorityFeePerGas?: import("@ethersproject/bignumber").BigNumber | undefined;
22
+ maxFeePerGas?: import("ethers").BigNumber | undefined;
23
+ maxPriorityFeePerGas?: import("ethers").BigNumber | undefined;
24
24
  ccipReadEnabled?: boolean | undefined;
25
25
  }>;
26
26
  export {};
@@ -12,5 +12,5 @@ declare type NameWrapperArgs = {
12
12
  expiry?: Expiry;
13
13
  } & BaseArgs;
14
14
  declare type Args = BaseArgs | NameWrapperArgs;
15
- export default function ({ contracts, signer, getExpiry, }: ENSArgs<'contracts' | 'signer' | 'getExpiry'>, name: string, { owner, resolverAddress, contract, ...wrapperArgs }: Args): Promise<import("@ethersproject/contracts").PopulatedTransaction>;
15
+ export default function ({ contracts, signer, getExpiry, }: ENSArgs<'contracts' | 'signer' | 'getExpiry'>, name: string, { owner, resolverAddress, contract, ...wrapperArgs }: Args): Promise<import("ethers").PopulatedTransaction>;
16
16
  export {};
@@ -2,5 +2,5 @@ import { ENSArgs } from '..';
2
2
  declare type Args = {
3
3
  contract: 'registry' | 'nameWrapper';
4
4
  };
5
- export default function ({ contracts, signer }: ENSArgs<'contracts' | 'signer' | 'getExpiry'>, name: string, { contract }: Args): Promise<import("@ethersproject/contracts").PopulatedTransaction>;
5
+ export default function ({ contracts, signer }: ENSArgs<'contracts' | 'signer' | 'getExpiry'>, name: string, { contract }: Args): Promise<import("ethers").PopulatedTransaction>;
6
6
  export {};
@@ -71,3 +71,25 @@ export declare const getAddr: {
71
71
  addr: string;
72
72
  } | undefined>;
73
73
  };
74
+ export declare const _getABI: {
75
+ raw: ({ contracts }: ENSArgs<'contracts'>, name: string) => Promise<{
76
+ to: string;
77
+ data: string;
78
+ }>;
79
+ decode: ({ contracts }: ENSArgs<'contracts'>, data: string) => Promise<{
80
+ contentType: number;
81
+ decoded: boolean;
82
+ abi: string | object;
83
+ } | undefined>;
84
+ };
85
+ export declare const getABI: {
86
+ raw: ({ contracts, universalWrapper }: ENSArgs<'contracts' | 'universalWrapper'>, name: string) => Promise<{
87
+ to: string;
88
+ data: string;
89
+ }>;
90
+ decode: ({ contracts, universalWrapper }: ENSArgs<'contracts' | 'universalWrapper'>, data: string) => Promise<{
91
+ contentType: number;
92
+ decoded: boolean;
93
+ abi: string | object;
94
+ } | undefined>;
95
+ };
@@ -4,4 +4,4 @@ export declare type ImportDNSSECNameProps = {
4
4
  address: string;
5
5
  proverResult: any;
6
6
  };
7
- export default function ({ contracts, provider }: ENSArgs<'contracts' | 'signer' | 'provider'>, name: string, { address, proverResult }: ImportDNSSECNameProps): Promise<import("@ethersproject/contracts").PopulatedTransaction | undefined>;
7
+ export default function ({ contracts, provider }: ENSArgs<'contracts' | 'signer' | 'provider'>, name: string, { address, proverResult }: ImportDNSSECNameProps): Promise<import("ethers").PopulatedTransaction | undefined>;
@@ -4,5 +4,5 @@ import { BaseRegistrationParams } from '../utils/registerHelpers';
4
4
  declare type Params = BaseRegistrationParams & {
5
5
  value: BigNumber;
6
6
  };
7
- export default function ({ contracts }: ENSArgs<'contracts'>, name: string, { resolverAddress, value, ...params }: Params): Promise<import("@ethersproject/contracts").PopulatedTransaction>;
7
+ export default function ({ contracts }: ENSArgs<'contracts'>, name: string, { resolverAddress, value, ...params }: Params): Promise<import("ethers").PopulatedTransaction>;
8
8
  export {};
@@ -8,6 +8,6 @@ declare type BaseProps = {
8
8
  export declare function renewNameWithData({ contracts }: ENSArgs<'contracts'>, name: string, { duration, value, fuses, wrapperExpiry, }: BaseProps & {
9
9
  fuses?: FuseProps;
10
10
  wrapperExpiry?: BigNumberish;
11
- }): Promise<import("@ethersproject/contracts").PopulatedTransaction>;
12
- export default function ({ contracts }: ENSArgs<'contracts'>, nameOrNames: string | string[], { duration, value }: BaseProps): Promise<import("@ethersproject/contracts").PopulatedTransaction>;
11
+ }): Promise<import("ethers").PopulatedTransaction>;
12
+ export default function ({ contracts }: ENSArgs<'contracts'>, nameOrNames: string | string[], { duration, value }: BaseProps): Promise<import("ethers").PopulatedTransaction>;
13
13
  export {};
@@ -2,4 +2,4 @@ import { ENSArgs } from '..';
2
2
  export default function ({ contracts, signer }: ENSArgs<'contracts' | 'signer'>, name: string, { address, resolver, }?: {
3
3
  address?: string;
4
4
  resolver?: string;
5
- }): Promise<import("@ethersproject/contracts").PopulatedTransaction>;
5
+ }): Promise<import("ethers").PopulatedTransaction>;
@@ -11,7 +11,11 @@ declare type AddrOrTextInput = {
11
11
  record: RecordInput<'addr' | 'text'>;
12
12
  type: 'addr' | 'text';
13
13
  };
14
- export default function ({ contracts, provider, getResolver, signer, }: ENSArgs<'contracts' | 'provider' | 'getResolver' | 'signer'>, name: string, { record, type, resolverAddress, }: BaseInput & (ContentHashInput | AddrOrTextInput)): Promise<{
14
+ declare type ABIInput = {
15
+ record: RecordInput<'abi'>;
16
+ type: 'abi';
17
+ };
18
+ export default function ({ contracts, provider, getResolver, signer, }: ENSArgs<'contracts' | 'provider' | 'getResolver' | 'signer'>, name: string, { record, type, resolverAddress, }: BaseInput & (ContentHashInput | AddrOrTextInput | ABIInput)): Promise<{
15
19
  to: string;
16
20
  data: string;
17
21
  }>;
@@ -3,4 +3,4 @@ import { RecordOptions } from '../utils/recordHelpers';
3
3
  export default function ({ contracts, provider, getResolver, signer, }: ENSArgs<'contracts' | 'provider' | 'getResolver' | 'signer'>, name: string, { records, resolverAddress, }: {
4
4
  records: RecordOptions;
5
5
  resolverAddress?: string;
6
- }): Promise<import("@ethersproject/contracts").PopulatedTransaction>;
6
+ }): Promise<import("ethers").PopulatedTransaction>;
@@ -2,4 +2,4 @@ import { ENSArgs } from '..';
2
2
  export default function ({ contracts, signer }: ENSArgs<'contracts' | 'signer'>, name: string, { contract, resolver, }: {
3
3
  contract: 'registry' | 'nameWrapper';
4
4
  resolver?: string;
5
- }): Promise<import("@ethersproject/contracts").PopulatedTransaction>;
5
+ }): Promise<import("ethers").PopulatedTransaction>;
@@ -2,4 +2,4 @@ import { ENSArgs } from '..';
2
2
  export default function ({ contracts, signer }: ENSArgs<'contracts' | 'signer'>, name: string, { newOwner, isOwner, }: {
3
3
  newOwner: string;
4
4
  isOwner: boolean;
5
- }): Promise<import("@ethersproject/contracts").PopulatedTransaction>;
5
+ }): Promise<import("ethers").PopulatedTransaction>;
@@ -3,4 +3,4 @@ export default function ({ contracts, signer }: ENSArgs<'contracts' | 'signer'>,
3
3
  newOwner: string;
4
4
  contract: 'registry' | 'nameWrapper' | 'baseRegistrar';
5
5
  reclaim?: boolean;
6
- }): Promise<import("@ethersproject/contracts").PopulatedTransaction>;
6
+ }): Promise<import("ethers").PopulatedTransaction>;
@@ -10,5 +10,5 @@ declare type NameWrapperArgs = {
10
10
  expiry?: Expiry;
11
11
  } & BaseArgs;
12
12
  declare type Args = BaseArgs | NameWrapperArgs;
13
- export default function ({ contracts, signer, getExpiry, }: ENSArgs<'contracts' | 'signer' | 'getExpiry'>, name: string, { contract, owner, resolverAddress, ...wrapperArgs }: Args): Promise<import("@ethersproject/contracts").PopulatedTransaction>;
13
+ export default function ({ contracts, signer, getExpiry, }: ENSArgs<'contracts' | 'signer' | 'getExpiry'>, name: string, { contract, owner, resolverAddress, ...wrapperArgs }: Args): Promise<import("ethers").PopulatedTransaction>;
14
14
  export {};
@@ -15,7 +15,7 @@ import type getPrice from './getPrice';
15
15
  import type getProfile from './getProfile';
16
16
  import type getRecords from './getRecords';
17
17
  import type getResolver from './getResolver';
18
- import type { getAddr, getContentHash, getText, _getAddr, _getContentHash, _getText } from './getSpecificRecord';
18
+ import type { getABI, getAddr, getContentHash, getText, _getABI, _getAddr, _getContentHash, _getText } from './getSpecificRecord';
19
19
  import type getSubnames from './getSubnames';
20
20
  import type getWrapperData from './getWrapperData';
21
21
  import type importDNSSECName from './importDNSSECName';
@@ -54,9 +54,11 @@ declare type Function = {
54
54
  getAddr: typeof getAddr;
55
55
  getContentHash: typeof getContentHash;
56
56
  getText: typeof getText;
57
+ getABI: typeof getABI;
57
58
  _getAddr: typeof _getAddr;
58
59
  _getContentHash: typeof _getContentHash;
59
60
  _getText: typeof _getText;
61
+ _getABI: typeof _getABI;
60
62
  getSubnames: typeof getSubnames;
61
63
  getWrapperData: typeof getWrapperData;
62
64
  importDNSSECName: typeof importDNSSECName;
@@ -2,4 +2,4 @@ import { ENSArgs } from '..';
2
2
  export default function ({ contracts, signer }: ENSArgs<'contracts' | 'signer'>, name: string, { newController, newRegistrant, }: {
3
3
  newController: string;
4
4
  newRegistrant?: string;
5
- }): Promise<import("@ethersproject/contracts").PopulatedTransaction>;
5
+ }): Promise<import("ethers").PopulatedTransaction>;
@@ -6,4 +6,4 @@ export default function ({ contracts, signer, getExpiry, }: ENSArgs<'contracts'
6
6
  fuseOptions?: FuseOptions | string | number;
7
7
  expiry?: Expiry;
8
8
  resolverAddress?: string;
9
- }): Promise<import("@ethersproject/contracts").PopulatedTransaction>;
9
+ }): Promise<import("ethers").PopulatedTransaction>;
@@ -238,7 +238,7 @@ export declare class ENS {
238
238
  decode: ({ contracts }: ENSArgs<"contracts">, data: string) => Promise<{
239
239
  fuseObj: import("./utils/fuses").CurrentFuses;
240
240
  expiryDate: Date;
241
- rawFuses: import("@ethersproject/bignumber").BigNumber;
241
+ rawFuses: import("ethers").BigNumber;
242
242
  owner: any;
243
243
  } | undefined>;
244
244
  }>;
@@ -337,6 +337,28 @@ export declare class ENS {
337
337
  }>;
338
338
  decode: ({ contracts }: ENSArgs<"contracts">, data: string) => Promise<string | undefined>;
339
339
  }>;
340
+ getABI: GeneratedRawFunction<{
341
+ raw: ({ contracts, universalWrapper }: ENSArgs<"contracts" | "universalWrapper">, name: string) => Promise<{
342
+ to: string;
343
+ data: string;
344
+ }>;
345
+ decode: ({ contracts, universalWrapper }: ENSArgs<"contracts" | "universalWrapper">, data: string) => Promise<{
346
+ contentType: number;
347
+ decoded: boolean;
348
+ abi: string | object;
349
+ } | undefined>;
350
+ }>;
351
+ _getABI: GeneratedRawFunction<{
352
+ raw: ({ contracts }: ENSArgs<"contracts">, name: string) => Promise<{
353
+ to: string;
354
+ data: string;
355
+ }>;
356
+ decode: ({ contracts }: ENSArgs<"contracts">, data: string) => Promise<{
357
+ contentType: number;
358
+ decoded: boolean;
359
+ abi: string | object;
360
+ } | undefined>;
361
+ }>;
340
362
  getOwner: GeneratedRawFunction<{
341
363
  raw: ({ contracts, multicallWrapper }: ENSArgs<"contracts" | "multicallWrapper">, name: string, contract?: "nameWrapper" | "registrar" | "registry" | undefined) => Promise<{
342
364
  to: string;
@@ -414,8 +436,8 @@ export declare class ENS {
414
436
  data: string;
415
437
  }>;
416
438
  decode: ({ contracts, multicallWrapper }: ENSArgs<"contracts" | "multicallWrapper">, data: string, _nameOrNames: string | string[], _duration: number, legacy?: boolean | undefined) => Promise<{
417
- base: import("@ethersproject/bignumber").BigNumber;
418
- premium: import("@ethersproject/bignumber").BigNumber;
439
+ base: import("ethers").BigNumber;
440
+ premium: import("ethers").BigNumber;
419
441
  } | undefined>;
420
442
  }>;
421
443
  getDNSOwner: (dnsName: string) => Promise<any>;