@ensdomains/ensjs 3.0.0-alpha.37 → 3.0.0-alpha.38
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/LICENSE +1 -1
- package/README.md +7 -0
- package/dist/cjs/GqlManager.js +22 -20
- package/dist/cjs/contracts/getContractAddress.js +1 -1
- package/dist/cjs/contracts/index.js +44 -46
- package/dist/cjs/functions/batchWrappers.js +6 -6
- package/dist/cjs/functions/createSubname.js +1 -1
- package/dist/cjs/functions/getAvailable.js +2 -2
- package/dist/cjs/functions/getDNSOwner.js +4 -2
- package/dist/cjs/functions/getExpiry.js +4 -4
- package/dist/cjs/functions/getName.js +2 -2
- package/dist/cjs/functions/getNames.js +6 -6
- package/dist/cjs/functions/getOwner.js +10 -9
- package/dist/cjs/functions/getPrice.js +4 -4
- package/dist/cjs/functions/getProfile.js +10 -10
- package/dist/cjs/functions/getResolver.js +2 -2
- package/dist/cjs/functions/getSpecificRecord.js +6 -6
- package/dist/cjs/functions/getSubnames.js +4 -4
- package/dist/cjs/functions/getWrapperData.js +2 -2
- package/dist/cjs/functions/importDNSSECName.js +5 -5
- package/dist/cjs/functions/setName.js +3 -2
- package/dist/cjs/functions/setRecord.js +2 -1
- package/dist/cjs/functions/setRecords.js +2 -1
- package/dist/cjs/functions/setResolver.js +2 -2
- package/dist/cjs/functions/supportsTLD.js +1 -1
- package/dist/cjs/functions/transferController.js +2 -2
- package/dist/cjs/functions/transferName.js +3 -3
- package/dist/cjs/functions/wrapName.js +3 -3
- package/dist/cjs/generated/factories/BaseRegistrarImplementation__factory.js +1 -1
- package/dist/cjs/generated/factories/BulkRenewal__factory.js +1 -1
- package/dist/cjs/generated/factories/DNSRegistrar__factory.js +1 -1
- package/dist/cjs/generated/factories/DNSSECImpl__factory.js +1 -1
- package/dist/cjs/generated/factories/DefaultReverseResolver__factory.js +1 -1
- package/dist/cjs/generated/factories/ENSRegistry__factory.js +1 -1
- package/dist/cjs/generated/factories/ETHRegistrarController__factory.js +1 -1
- package/dist/cjs/generated/factories/Multicall__factory.js +1 -1
- package/dist/cjs/generated/factories/NameWrapper__factory.js +1 -1
- package/dist/cjs/generated/factories/P256SHA256Algorithm__factory.js +1 -1
- package/dist/cjs/generated/factories/PublicResolver__factory.js +1 -1
- package/dist/cjs/generated/factories/RSASHA1Algorithm__factory.js +1 -1
- package/dist/cjs/generated/factories/RSASHA256Algorithm__factory.js +1 -1
- package/dist/cjs/generated/factories/ReverseRegistrar__factory.js +1 -1
- package/dist/cjs/generated/factories/Root__factory.js +1 -1
- package/dist/cjs/generated/factories/SHA1Digest__factory.js +1 -1
- package/dist/cjs/generated/factories/SHA1NSEC3Digest__factory.js +1 -1
- package/dist/cjs/generated/factories/SHA256Digest__factory.js +1 -1
- package/dist/cjs/generated/factories/StaticMetadataService__factory.js +1 -1
- package/dist/cjs/generated/factories/TLDPublicSuffixList__factory.js +1 -1
- package/dist/cjs/generated/factories/UniversalResolver__factory.js +1 -1
- package/dist/cjs/index.js +295 -296
- package/dist/cjs/utils/labels.js +1 -1
- package/dist/cjs/utils/recordHelpers.js +1 -1
- package/dist/cjs/utils/registerHelpers.js +2 -1
- package/dist/cjs/utils/wrapper.js +1 -1
- package/dist/esm/contracts/getContractAddress.mjs +1 -1
- package/dist/esm/index.mjs +4 -1
- package/package.json +1 -1
- package/src/contracts/getContractAddress.ts +1 -1
- package/src/index.ts +6 -2
package/dist/esm/index.mjs
CHANGED
|
@@ -38,10 +38,13 @@ var ENS = class {
|
|
|
38
38
|
const thisRef = this;
|
|
39
39
|
const mainFunc = async function(...args) {
|
|
40
40
|
await thisRef.checkInitialProvider();
|
|
41
|
-
|
|
41
|
+
let mod = await import(
|
|
42
42
|
/* webpackMode: "lazy", webpackChunkName: "[request]", webpackPreload: true, webpackExclude: /.*\.ts$/ */
|
|
43
43
|
`./functions/${path}`
|
|
44
44
|
);
|
|
45
|
+
if (mod.default?.[exportName]) {
|
|
46
|
+
mod = mod.default;
|
|
47
|
+
}
|
|
45
48
|
if (subFunc !== "combine") {
|
|
46
49
|
const writeable = subFunc === "write" || subFunc === "populateTransaction";
|
|
47
50
|
const func = subFunc && !writeable ? mod[exportName][subFunc] : mod[exportName];
|
package/package.json
CHANGED
|
@@ -46,7 +46,7 @@ const addresses: Record<
|
|
|
46
46
|
'5': '0xD5610A08E370051a01fdfe4bB3ddf5270af1aA48',
|
|
47
47
|
},
|
|
48
48
|
UniversalResolver: {
|
|
49
|
-
'1': '
|
|
49
|
+
'1': '0x74E20Bd2A1fE0cdbe45b9A1d89cb7e0a45b36376',
|
|
50
50
|
'3': '0x74e20bd2a1fe0cdbe45b9a1d89cb7e0a45b36376',
|
|
51
51
|
'4': '0x74e20bd2a1fe0cdbe45b9a1d89cb7e0a45b36376',
|
|
52
52
|
'5': '0x687c30Cc44bFA39A1449e86E172BF002E7b3f0b0',
|
package/src/index.ts
CHANGED
|
@@ -15,7 +15,6 @@ import type createSubname from './functions/createSubname'
|
|
|
15
15
|
import type deleteSubname from './functions/deleteSubname'
|
|
16
16
|
import type getAvailable from './functions/getAvailable'
|
|
17
17
|
import type getDNSOwner from './functions/getDNSOwner'
|
|
18
|
-
import type supportsTLD from './functions/supportsTLD'
|
|
19
18
|
import type getExpiry from './functions/getExpiry'
|
|
20
19
|
import type { getHistory } from './functions/getHistory'
|
|
21
20
|
import type getName from './functions/getName'
|
|
@@ -46,6 +45,7 @@ import type setName from './functions/setName'
|
|
|
46
45
|
import type setRecord from './functions/setRecord'
|
|
47
46
|
import type setRecords from './functions/setRecords'
|
|
48
47
|
import type setResolver from './functions/setResolver'
|
|
48
|
+
import type supportsTLD from './functions/supportsTLD'
|
|
49
49
|
import type transferController from './functions/transferController'
|
|
50
50
|
import type transferName from './functions/transferName'
|
|
51
51
|
import type transferSubname from './functions/transferSubname'
|
|
@@ -259,10 +259,14 @@ export class ENS {
|
|
|
259
259
|
// check the initial provider and set if it exists
|
|
260
260
|
await thisRef.checkInitialProvider()
|
|
261
261
|
// import the module dynamically
|
|
262
|
-
|
|
262
|
+
let mod = await import(
|
|
263
263
|
/* webpackMode: "lazy", webpackChunkName: "[request]", webpackPreload: true, webpackExclude: /.*\.ts$/ */
|
|
264
264
|
`./functions/${path}`
|
|
265
265
|
)
|
|
266
|
+
// if export is nested in default, use default
|
|
267
|
+
if (mod.default?.[exportName]) {
|
|
268
|
+
mod = mod.default
|
|
269
|
+
}
|
|
266
270
|
|
|
267
271
|
// if combine isn't specified, run normally
|
|
268
272
|
// otherwise, create a function from the raw and decode functions
|