@ensnode/ensnode-sdk 1.11.1 → 1.12.0
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/index.cjs +6 -31
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +8 -24
- package/dist/index.d.ts +8 -24
- package/dist/index.js +7 -36
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
package/dist/index.cjs
CHANGED
|
@@ -143,7 +143,7 @@ __export(index_exports, {
|
|
|
143
143
|
getDatasourceContract: () => getDatasourceContract,
|
|
144
144
|
getDefaultEnsNodeUrl: () => getDefaultEnsNodeUrl,
|
|
145
145
|
getENSRootChainId: () => import_datasources.getENSRootChainId,
|
|
146
|
-
|
|
146
|
+
getENSv1RootRegistry: () => getENSv1RootRegistry,
|
|
147
147
|
getENSv1RootRegistryId: () => getENSv1RootRegistryId,
|
|
148
148
|
getENSv2RootRegistry: () => getENSv2RootRegistry,
|
|
149
149
|
getENSv2RootRegistryId: () => getENSv2RootRegistryId,
|
|
@@ -158,7 +158,6 @@ __export(index_exports, {
|
|
|
158
158
|
getOmnichainIndexingStatus: () => getOmnichainIndexingStatus,
|
|
159
159
|
getResolvePrimaryNameChainIdParam: () => getResolvePrimaryNameChainIdParam,
|
|
160
160
|
getRootRegistryId: () => getRootRegistryId,
|
|
161
|
-
getRootRegistryIds: () => getRootRegistryIds,
|
|
162
161
|
getTimestampForHighestOmnichainKnownBlock: () => getTimestampForHighestOmnichainKnownBlock,
|
|
163
162
|
getTimestampForLowestOmnichainStartBlock: () => getTimestampForLowestOmnichainStartBlock,
|
|
164
163
|
hasNullByte: () => hasNullByte,
|
|
@@ -187,6 +186,7 @@ __export(index_exports, {
|
|
|
187
186
|
isRegistrationFullyExpired: () => isRegistrationFullyExpired,
|
|
188
187
|
isRegistrationInGracePeriod: () => isRegistrationInGracePeriod,
|
|
189
188
|
isResolvedIdentity: () => isResolvedIdentity,
|
|
189
|
+
isRootRegistryId: () => isRootRegistryId,
|
|
190
190
|
isSelectionEmpty: () => isSelectionEmpty,
|
|
191
191
|
isSubgraphCompatible: () => isSubgraphCompatible,
|
|
192
192
|
isWebSocketProtocol: () => isWebSocketProtocol,
|
|
@@ -5012,9 +5012,9 @@ var replaceBigInts = (obj, replacer) => {
|
|
|
5012
5012
|
// src/shared/root-registry.ts
|
|
5013
5013
|
var import_enssdk11 = require("enssdk");
|
|
5014
5014
|
var import_datasources10 = require("@ensnode/datasources");
|
|
5015
|
-
var
|
|
5016
|
-
var getENSv1RootRegistryId = (namespace) => (0, import_enssdk11.makeENSv1RegistryId)(
|
|
5017
|
-
var isENSv1Registry = (namespace, contract) => accountIdEqual(
|
|
5015
|
+
var getENSv1RootRegistry = (namespace) => getDatasourceContract(namespace, import_datasources10.DatasourceNames.ENSRoot, "ENSv1Registry");
|
|
5016
|
+
var getENSv1RootRegistryId = (namespace) => (0, import_enssdk11.makeENSv1RegistryId)(getENSv1RootRegistry(namespace));
|
|
5017
|
+
var isENSv1Registry = (namespace, contract) => accountIdEqual(getENSv1RootRegistry(namespace), contract);
|
|
5018
5018
|
var getENSv2RootRegistry = (namespace) => getDatasourceContract(namespace, import_datasources10.DatasourceNames.ENSv2Root, "RootRegistry");
|
|
5019
5019
|
var getENSv2RootRegistryId = (namespace) => (0, import_enssdk11.makeENSv2RegistryId)(getENSv2RootRegistry(namespace));
|
|
5020
5020
|
var isENSv2RootRegistry = (namespace, contract) => accountIdEqual(getENSv2RootRegistry(namespace), contract);
|
|
@@ -5025,32 +5025,7 @@ var maybeGetENSv2RootRegistryId = (namespace) => {
|
|
|
5025
5025
|
return (0, import_enssdk11.makeENSv2RegistryId)(root);
|
|
5026
5026
|
};
|
|
5027
5027
|
var getRootRegistryId = (namespace) => maybeGetENSv2RootRegistryId(namespace) ?? getENSv1RootRegistryId(namespace);
|
|
5028
|
-
var
|
|
5029
|
-
const v1RootRegistryId = getENSv1RootRegistryId(namespace);
|
|
5030
|
-
const v2RootRegistryId = maybeGetENSv2RootRegistryId(namespace);
|
|
5031
|
-
const basenamesRegistry = maybeGetDatasourceContract(
|
|
5032
|
-
namespace,
|
|
5033
|
-
import_datasources10.DatasourceNames.Basenames,
|
|
5034
|
-
"Registry"
|
|
5035
|
-
);
|
|
5036
|
-
const lineanamesRegistry = maybeGetDatasourceContract(
|
|
5037
|
-
namespace,
|
|
5038
|
-
import_datasources10.DatasourceNames.Lineanames,
|
|
5039
|
-
"Registry"
|
|
5040
|
-
);
|
|
5041
|
-
return [
|
|
5042
|
-
v1RootRegistryId,
|
|
5043
|
-
basenamesRegistry && (0, import_enssdk11.makeENSv1VirtualRegistryId)(
|
|
5044
|
-
basenamesRegistry,
|
|
5045
|
-
getManagedName(namespace, basenamesRegistry).node
|
|
5046
|
-
),
|
|
5047
|
-
lineanamesRegistry && (0, import_enssdk11.makeENSv1VirtualRegistryId)(
|
|
5048
|
-
lineanamesRegistry,
|
|
5049
|
-
getManagedName(namespace, lineanamesRegistry).node
|
|
5050
|
-
),
|
|
5051
|
-
v2RootRegistryId
|
|
5052
|
-
].filter((id) => !!id);
|
|
5053
|
-
};
|
|
5028
|
+
var isRootRegistryId = (namespace, registryId) => registryId === getENSv1RootRegistryId(namespace) || registryId === maybeGetENSv2RootRegistryId(namespace);
|
|
5054
5029
|
|
|
5055
5030
|
// src/shared/url.ts
|
|
5056
5031
|
function isHttpProtocol(url) {
|