@ensnode/ensdb-sdk 0.0.0-next-20260605151421 → 0.0.0-next-20260605170840
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/ensindexer-abstract/index.d.ts +1 -1
- package/dist/ensindexer-abstract/index.js +43 -2
- package/dist/ensindexer-abstract/index.js.map +1 -1
- package/dist/{index-CnJNuGUb.d.ts → index-0zeOX9HM.d.ts} +50 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.js +43 -2
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { C as CANONICAL_NAME_PREFIX_LENGTH, b as account, c as account_relations, d as domain, e as domainEvent, f as domainResolverRelation, g as domainResolverRelation_relations, h as domainType, i as event, j as internal_registrarActionMetadata, k as internal_registrarActionMetadataType, l as label, m as label_relations, n as latestRegistrationIndex, o as latestRegistrationIndex_relations, p as latestRenewalIndex, q as latestRenewalIndex_relations, r as migratedNodeByNode, s as migratedNodeByParent, t as nameSales, u as nameTokens, v as permissions, w as permissionsEvent, x as permissionsResource, y as permissionsUser, z as permissionsUserEvent, A as registrarActionRelations, B as registrarActionType, D as registrarActions, E as registration, F as registrationLifecycleRelations, G as registrationLifecycles, H as registrationType, I as registration_relations, J as registry, K as registryType, L as relations_domain, M as relations_permissions, N as relations_permissionsResource, O as relations_permissionsUser, P as relations_registry, Q as renewal,
|
|
1
|
+
export { C as CANONICAL_NAME_PREFIX_LENGTH, R as REGISTRATION_SORT_SENTINEL, b as account, c as account_relations, d as domain, e as domainEvent, f as domainResolverRelation, g as domainResolverRelation_relations, h as domainType, i as event, j as internal_registrarActionMetadata, k as internal_registrarActionMetadataType, l as label, m as label_relations, n as latestRegistrationIndex, o as latestRegistrationIndex_relations, p as latestRenewalIndex, q as latestRenewalIndex_relations, r as migratedNodeByNode, s as migratedNodeByParent, t as nameSales, u as nameTokens, v as permissions, w as permissionsEvent, x as permissionsResource, y as permissionsUser, z as permissionsUserEvent, A as registrarActionRelations, B as registrarActionType, D as registrarActions, E as registration, F as registrationLifecycleRelations, G as registrationLifecycles, H as registrationType, I as registration_relations, J as registry, K as registryType, L as relations_domain, M as relations_permissions, N as relations_permissionsResource, O as relations_permissionsUser, P as relations_registry, Q as renewal, S as renewal_relations, T as resolver, U as resolverAddressRecord, V as resolverAddressRecordRelations, W as resolverEvent, X as resolverRecords, Y as resolverRecords_relations, Z as resolverTextRecord, _ as resolverTextRecordRelations, $ as resolver_relations, a0 as reverseNameRecord, a1 as subgraph_abiChanged, a2 as subgraph_abiChangedRelations, a3 as subgraph_account, a4 as subgraph_accountRelations, a5 as subgraph_addrChanged, a6 as subgraph_addrChangedRelations, a7 as subgraph_authorisationChanged, a8 as subgraph_authorisationChangedRelations, a9 as subgraph_contenthashChanged, aa as subgraph_contenthashChangedRelations, ab as subgraph_domain, ac as subgraph_domainRelations, ad as subgraph_expiryExtended, ae as subgraph_expiryExtendedRelations, af as subgraph_fusesSet, ag as subgraph_fusesSetRelations, ah as subgraph_interfaceChanged, ai as subgraph_interfaceChangedRelations, aj as subgraph_multicoinAddrChanged, ak as subgraph_multicoinAddrChangedRelations, al as subgraph_nameChanged, am as subgraph_nameChangedRelations, an as subgraph_nameRegistered, ao as subgraph_nameRegisteredRelations, ap as subgraph_nameRenewed, aq as subgraph_nameRenewedRelations, ar as subgraph_nameTransferred, as as subgraph_nameTransferredRelations, at as subgraph_nameUnwrapped, au as subgraph_nameUnwrappedRelations, av as subgraph_nameWrapped, aw as subgraph_nameWrappedRelations, ax as subgraph_newOwner, ay as subgraph_newOwnerRelations, az as subgraph_newResolver, aA as subgraph_newResolverRelations, aB as subgraph_newTTL, aC as subgraph_newTTLRelations, aD as subgraph_pubkeyChanged, aE as subgraph_pubkeyChangedRelations, aF as subgraph_registration, aG as subgraph_registrationRelations, aH as subgraph_resolver, aI as subgraph_resolverRelations, aJ as subgraph_textChanged, aK as subgraph_textChangedRelations, aL as subgraph_transfer, aM as subgraph_transferRelations, aN as subgraph_versionChanged, aO as subgraph_versionChangedRelations, aP as subgraph_wrappedDomain, aQ as subgraph_wrappedDomainRelations, aR as subgraph_wrappedTransfer, aS as subgraph_wrappedTransferRelations, aT as subregistries, aU as subregistryRelations, aV as truncateCanonicalNamePrefix } from '../index-0zeOX9HM.js';
|
|
2
2
|
import 'ponder';
|
|
3
3
|
import 'drizzle-orm';
|
|
4
4
|
import 'drizzle-orm/pg-core';
|
|
@@ -1569,6 +1569,7 @@ var relations_registry = relations4(registry, ({ one, many }) => ({
|
|
|
1569
1569
|
references: [permissions.chainId, permissions.address]
|
|
1570
1570
|
})
|
|
1571
1571
|
}));
|
|
1572
|
+
var REGISTRATION_SORT_SENTINEL = 2n ** 256n - 1n;
|
|
1572
1573
|
var domainType = onchainEnum2("DomainType", ["ENSv1Domain", "ENSv2Domain"]);
|
|
1573
1574
|
var CANONICAL_NAME_PREFIX_LENGTH = 64;
|
|
1574
1575
|
function truncateCanonicalNamePrefix(name) {
|
|
@@ -1652,7 +1653,29 @@ var domain = onchainTable6(
|
|
|
1652
1653
|
*
|
|
1653
1654
|
* @dev the computed Node (via `namehash`) of this Domain's Canonical Name.
|
|
1654
1655
|
*/
|
|
1655
|
-
canonicalNode: t.hex().$type()
|
|
1656
|
+
canonicalNode: t.hex().$type(),
|
|
1657
|
+
/**
|
|
1658
|
+
* Materialized `start` of this Domain's latest Registration, or {@link REGISTRATION_SORT_SENTINEL}
|
|
1659
|
+
* when the Domain has no Registration. Mirror of the latest `registration.start` (see
|
|
1660
|
+
* `latestRegistrationIndex`), maintained inline by `registration-db-helpers.ts`.
|
|
1661
|
+
*
|
|
1662
|
+
* @dev Exists purely so REGISTRATION_TIMESTAMP-ordered find-domains queries can use the
|
|
1663
|
+
* `(registry_id, __latest_registration_start, id)` composite index instead of joining through
|
|
1664
|
+
* `latest_registration_indexes` → `registrations` and sorting. Held NOT NULL (absent → sentinel)
|
|
1665
|
+
* so the keyset stays a plain tuple compare with no NULL-placement special casing; see
|
|
1666
|
+
* find-domains-resolver-helpers.ts. Double-underscore prefix marks it as an internal
|
|
1667
|
+
* materialized mirror, not part of the on-chain protocol surface; the canonical (possibly null)
|
|
1668
|
+
* value lives on the Registration entity.
|
|
1669
|
+
*/
|
|
1670
|
+
__latestRegistrationStart: t.bigint("__latest_registration_start").notNull().default(REGISTRATION_SORT_SENTINEL),
|
|
1671
|
+
/**
|
|
1672
|
+
* Materialized `expiry` of this Domain's latest Registration, or {@link REGISTRATION_SORT_SENTINEL}
|
|
1673
|
+
* when the Domain has no Registration or its latest Registration never expires (effectively +∞).
|
|
1674
|
+
* Mirror of the latest `registration.expiry`, maintained inline by `registration-db-helpers.ts`.
|
|
1675
|
+
*
|
|
1676
|
+
* @dev See `__latestRegistrationStart`. Backs REGISTRATION_EXPIRY-ordered queries.
|
|
1677
|
+
*/
|
|
1678
|
+
__latestRegistrationExpiry: t.bigint("__latest_registration_expiry").notNull().default(REGISTRATION_SORT_SENTINEL)
|
|
1656
1679
|
// NOTE: Domain-Resolver Relations tracked via Protocol Acceleration plugin
|
|
1657
1680
|
}),
|
|
1658
1681
|
(t) => ({
|
|
@@ -1680,7 +1703,24 @@ var domain = onchainTable6(
|
|
|
1680
1703
|
// hash index for resolver-record → canonical-domain joins
|
|
1681
1704
|
byCanonicalNode: index5().using("hash", t.canonicalNode),
|
|
1682
1705
|
// btree for ORDER BY canonical_depth (typeahead and DEPTH-ordered browse)
|
|
1683
|
-
byCanonicalDepth: index5().on(t.canonicalDepth)
|
|
1706
|
+
byCanonicalDepth: index5().on(t.canonicalDepth),
|
|
1707
|
+
// Composites for `WHERE registry_id = X ORDER BY <latest registration value> LIMIT N`
|
|
1708
|
+
// (REGISTRATION_TIMESTAMP / REGISTRATION_EXPIRY ordering in find-domains queries). The latest
|
|
1709
|
+
// registration's start/expiry is mirrored onto the Domain row (see `__latestRegistration*`) so
|
|
1710
|
+
// the order is an index-ordered scan, not a join through `latest_registration_indexes` →
|
|
1711
|
+
// `registrations` followed by a sort. The columns are NOT NULL (absent → `REGISTRATION_SORT_SENTINEL`),
|
|
1712
|
+
// so a single plain composite per column serves both ASC and DESC (forward / backward scan) with
|
|
1713
|
+
// a plain keyset tuple — see find-domains-resolver-helpers.ts.
|
|
1714
|
+
byRegistryAndLatestRegistrationStart: index5().on(
|
|
1715
|
+
t.registryId,
|
|
1716
|
+
t.__latestRegistrationStart,
|
|
1717
|
+
t.id
|
|
1718
|
+
),
|
|
1719
|
+
byRegistryAndLatestRegistrationExpiry: index5().on(
|
|
1720
|
+
t.registryId,
|
|
1721
|
+
t.__latestRegistrationExpiry,
|
|
1722
|
+
t.id
|
|
1723
|
+
)
|
|
1684
1724
|
})
|
|
1685
1725
|
);
|
|
1686
1726
|
var relations_domain = relations4(domain, ({ one, many }) => ({
|
|
@@ -1941,6 +1981,7 @@ var label_relations = relations4(label, ({ many }) => ({
|
|
|
1941
1981
|
}));
|
|
1942
1982
|
export {
|
|
1943
1983
|
CANONICAL_NAME_PREFIX_LENGTH,
|
|
1984
|
+
REGISTRATION_SORT_SENTINEL,
|
|
1944
1985
|
account,
|
|
1945
1986
|
account_relations,
|
|
1946
1987
|
domain,
|