@ensnode/ensdb-sdk 1.15.2 → 1.16.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/ensindexer-abstract/index.d.ts +1 -1
- package/dist/ensindexer-abstract/index.js +8 -1
- package/dist/ensindexer-abstract/index.js.map +1 -1
- package/dist/{index-DH9e7wPl.d.ts → index-D36RM4zS.d.ts} +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +8 -1
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { EnsDbPublicConfig, IndexingMetadataContext, IndexingMetadataContextInitialized, Unvalidated } from '@ensnode/ensnode-sdk';
|
|
2
2
|
export { IndexingMetadataContext, IndexingMetadataContextInitialized, IndexingMetadataContextStatusCodes, IndexingMetadataContextUninitialized } from '@ensnode/ensnode-sdk';
|
|
3
3
|
import { NodePgDatabase } from 'drizzle-orm/node-postgres';
|
|
4
|
-
import { a as abstractEnsIndexerSchema } from './index-
|
|
4
|
+
import { a as abstractEnsIndexerSchema } from './index-D36RM4zS.js';
|
|
5
5
|
import { e as ensNodeSchema } from './index-BHoa233Z.js';
|
|
6
6
|
import 'ponder';
|
|
7
7
|
import 'drizzle-orm';
|
package/dist/index.js
CHANGED
|
@@ -144,6 +144,8 @@ var reverseNameRecord = onchainTable2(
|
|
|
144
144
|
(t) => ({
|
|
145
145
|
// keyed by (address, coinType)
|
|
146
146
|
address: t.hex().notNull().$type(),
|
|
147
|
+
// @TODO(cointype-bigint): store as `t.int8({ mode: "number" }).$type<CoinType>()` (like chainId
|
|
148
|
+
// elsewhere) so reads/writes use CoinType directly without bigint round-trips. See #2293.
|
|
147
149
|
coinType: t.bigint().notNull(),
|
|
148
150
|
/**
|
|
149
151
|
* Represents the ENSIP-19 Reverse Name Record for a given (address, coinType).
|
|
@@ -259,6 +261,8 @@ var resolverAddressRecord = onchainTable2(
|
|
|
259
261
|
node: t.hex().notNull().$type(),
|
|
260
262
|
// NOTE: all well-known CoinTypes fit into javascript number but NOT postgres .integer, must be
|
|
261
263
|
// stored as BigInt
|
|
264
|
+
// @TODO(cointype-bigint): use `t.int8({ mode: "number" }).$type<CoinType>()` like `chainId` above
|
|
265
|
+
// to drop bigint round-trips at every read/write boundary. See #2293.
|
|
262
266
|
coinType: t.bigint().notNull(),
|
|
263
267
|
/**
|
|
264
268
|
* Represents the value of the Address Record specified by ((chainId, resolver, node), coinType).
|
|
@@ -269,7 +273,10 @@ var resolverAddressRecord = onchainTable2(
|
|
|
269
273
|
value: t.hex().notNull()
|
|
270
274
|
}),
|
|
271
275
|
(t) => ({
|
|
272
|
-
pk: primaryKey2({ columns: [t.chainId, t.address, t.node, t.coinType] })
|
|
276
|
+
pk: primaryKey2({ columns: [t.chainId, t.address, t.node, t.coinType] }),
|
|
277
|
+
// supports the reverse lookup powering `Account.nameReferences`:
|
|
278
|
+
// `WHERE value = <address> [AND coin_type = <coinType>]`
|
|
279
|
+
byValueAndCoinType: index().on(t.value, t.coinType)
|
|
273
280
|
})
|
|
274
281
|
);
|
|
275
282
|
var resolverAddressRecordRelations = relations(resolverAddressRecord, ({ one }) => ({
|