@ensnode/ensdb-sdk 1.8.1 → 1.10.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 +3 -3
- package/dist/ensindexer-abstract/index.js +114 -116
- package/dist/ensindexer-abstract/index.js.map +1 -1
- package/dist/{index-DHRbRciU.d.ts → index-DN0SGSyd.d.ts} +141 -79
- package/dist/index.d.ts +74 -11
- package/dist/index.js +279 -271
- package/dist/index.js.map +1 -1
- package/migrations/0001_enable_ext_pg_trgm.sql +3 -0
- package/migrations/meta/0001_snapshot.json +55 -0
- package/migrations/meta/_journal.json +7 -0
- package/package.json +11 -7
|
@@ -1,61 +1,7 @@
|
|
|
1
|
-
import * as ponder from 'ponder';
|
|
2
1
|
import * as drizzle_orm_pg_core from 'drizzle-orm/pg-core';
|
|
3
2
|
import * as drizzle_orm from 'drizzle-orm';
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* Schema Definitions that hold metadata about the ENSNode instance.
|
|
8
|
-
*/
|
|
9
|
-
/**
|
|
10
|
-
* ENSNode Metadata
|
|
11
|
-
*
|
|
12
|
-
* Possible key value pairs are defined by 'EnsNodeMetadata' type:
|
|
13
|
-
* - `EnsNodeMetadataEnsDbVersion`
|
|
14
|
-
* - `EnsNodeMetadataEnsIndexerPublicConfig`
|
|
15
|
-
* - `EnsNodeMetadataEnsIndexerIndexingStatus`
|
|
16
|
-
*/
|
|
17
|
-
declare const ensNodeMetadata: ponder.OnchainTable<{
|
|
18
|
-
name: "ensnode_metadata";
|
|
19
|
-
schema: undefined;
|
|
20
|
-
columns: {
|
|
21
|
-
key: ponder.PgColumn<{
|
|
22
|
-
name: "key";
|
|
23
|
-
tableName: "ensnode_metadata";
|
|
24
|
-
dataType: "string";
|
|
25
|
-
columnType: "PgText";
|
|
26
|
-
data: string;
|
|
27
|
-
driverParam: string;
|
|
28
|
-
notNull: true;
|
|
29
|
-
hasDefault: false;
|
|
30
|
-
isPrimaryKey: true;
|
|
31
|
-
isAutoincrement: false;
|
|
32
|
-
hasRuntimeDefault: false;
|
|
33
|
-
enumValues: [string, ...string[]];
|
|
34
|
-
baseColumn: never;
|
|
35
|
-
identity: undefined;
|
|
36
|
-
generated: undefined;
|
|
37
|
-
}, {}, {}>;
|
|
38
|
-
value: ponder.PgColumn<{
|
|
39
|
-
name: "value";
|
|
40
|
-
tableName: "ensnode_metadata";
|
|
41
|
-
dataType: "json";
|
|
42
|
-
columnType: "PgJsonb";
|
|
43
|
-
data: unknown;
|
|
44
|
-
driverParam: unknown;
|
|
45
|
-
notNull: true;
|
|
46
|
-
hasDefault: false;
|
|
47
|
-
isPrimaryKey: false;
|
|
48
|
-
isAutoincrement: false;
|
|
49
|
-
hasRuntimeDefault: false;
|
|
50
|
-
enumValues: undefined;
|
|
51
|
-
baseColumn: never;
|
|
52
|
-
identity: undefined;
|
|
53
|
-
generated: undefined;
|
|
54
|
-
}, {}, {}>;
|
|
55
|
-
};
|
|
56
|
-
extra: undefined;
|
|
57
|
-
dialect: "pg";
|
|
58
|
-
}>;
|
|
3
|
+
import * as ponder from 'ponder';
|
|
4
|
+
import { DomainId, InterpretedLabel, PermissionsId, PermissionsResourceId, PermissionsUserId, RegistrationId, RegistryId, ENSv2DomainId, RenewalId, ResolverId, ENSv1DomainId, ResolverRecordsId, InterpretedName } from 'enssdk';
|
|
59
5
|
|
|
60
6
|
/**
|
|
61
7
|
* The ENSv2 Schema
|
|
@@ -913,7 +859,7 @@ declare const relations_v2Domain: drizzle_orm.Relations<"v2_domains", {
|
|
|
913
859
|
label: drizzle_orm.One<"labels", true>;
|
|
914
860
|
registrations: drizzle_orm.Many<"registrations">;
|
|
915
861
|
}>;
|
|
916
|
-
declare const registrationType: ponder.OnchainEnum<["NameWrapper", "BaseRegistrar", "ThreeDNS", "
|
|
862
|
+
declare const registrationType: ponder.OnchainEnum<["NameWrapper", "BaseRegistrar", "ThreeDNS", "ENSv2RegistryRegistration", "ENSv2RegistryReservation"]>;
|
|
917
863
|
declare const registration: ponder.OnchainTable<{
|
|
918
864
|
name: "registrations";
|
|
919
865
|
schema: undefined;
|
|
@@ -956,8 +902,8 @@ declare const registration: ponder.OnchainTable<{
|
|
|
956
902
|
}, {}, {
|
|
957
903
|
$type: DomainId;
|
|
958
904
|
}>;
|
|
959
|
-
|
|
960
|
-
name: "
|
|
905
|
+
registrationIndex: ponder.PgColumn<{
|
|
906
|
+
name: "registrationIndex";
|
|
961
907
|
tableName: "registrations";
|
|
962
908
|
dataType: "number";
|
|
963
909
|
columnType: "PgInteger";
|
|
@@ -978,14 +924,14 @@ declare const registration: ponder.OnchainTable<{
|
|
|
978
924
|
tableName: "registrations";
|
|
979
925
|
dataType: "string";
|
|
980
926
|
columnType: "PgEnumColumn";
|
|
981
|
-
data: "BaseRegistrar" | "NameWrapper" | "ThreeDNS" | "
|
|
927
|
+
data: "BaseRegistrar" | "NameWrapper" | "ThreeDNS" | "ENSv2RegistryRegistration" | "ENSv2RegistryReservation";
|
|
982
928
|
driverParam: string;
|
|
983
929
|
notNull: true;
|
|
984
930
|
hasDefault: false;
|
|
985
931
|
isPrimaryKey: false;
|
|
986
932
|
isAutoincrement: false;
|
|
987
933
|
hasRuntimeDefault: false;
|
|
988
|
-
enumValues: ["NameWrapper", "BaseRegistrar", "ThreeDNS", "
|
|
934
|
+
enumValues: ["NameWrapper", "BaseRegistrar", "ThreeDNS", "ENSv2RegistryRegistration", "ENSv2RegistryReservation"];
|
|
989
935
|
baseColumn: never;
|
|
990
936
|
identity: undefined;
|
|
991
937
|
generated: undefined;
|
|
@@ -1098,6 +1044,25 @@ declare const registration: ponder.OnchainTable<{
|
|
|
1098
1044
|
}, {}, {
|
|
1099
1045
|
$type: `0x${string}`;
|
|
1100
1046
|
}>;
|
|
1047
|
+
unregistrantId: ponder.PgColumn<{
|
|
1048
|
+
name: "unregistrantId";
|
|
1049
|
+
tableName: "registrations";
|
|
1050
|
+
dataType: "string";
|
|
1051
|
+
columnType: "PgHex";
|
|
1052
|
+
data: `0x${string}`;
|
|
1053
|
+
driverParam: string;
|
|
1054
|
+
notNull: false;
|
|
1055
|
+
hasDefault: false;
|
|
1056
|
+
isPrimaryKey: false;
|
|
1057
|
+
isAutoincrement: false;
|
|
1058
|
+
hasRuntimeDefault: false;
|
|
1059
|
+
enumValues: undefined;
|
|
1060
|
+
baseColumn: never;
|
|
1061
|
+
identity: undefined;
|
|
1062
|
+
generated: undefined;
|
|
1063
|
+
}, {}, {
|
|
1064
|
+
$type: `0x${string}`;
|
|
1065
|
+
}>;
|
|
1101
1066
|
referrer: ponder.PgColumn<{
|
|
1102
1067
|
name: "referrer";
|
|
1103
1068
|
tableName: "registrations";
|
|
@@ -1231,8 +1196,8 @@ declare const latestRegistrationIndex: ponder.OnchainTable<{
|
|
|
1231
1196
|
}, {}, {
|
|
1232
1197
|
$type: DomainId;
|
|
1233
1198
|
}>;
|
|
1234
|
-
|
|
1235
|
-
name: "
|
|
1199
|
+
registrationIndex: ponder.PgColumn<{
|
|
1200
|
+
name: "registrationIndex";
|
|
1236
1201
|
tableName: "latest_registration_indexes";
|
|
1237
1202
|
dataType: "number";
|
|
1238
1203
|
columnType: "PgInteger";
|
|
@@ -1256,6 +1221,7 @@ declare const registration_relations: drizzle_orm.Relations<"registrations", {
|
|
|
1256
1221
|
v1Domain: drizzle_orm.One<"v1_domains", true>;
|
|
1257
1222
|
v2Domain: drizzle_orm.One<"v2_domains", true>;
|
|
1258
1223
|
registrant: drizzle_orm.One<"accounts", false>;
|
|
1224
|
+
unregistrant: drizzle_orm.One<"accounts", false>;
|
|
1259
1225
|
renewals: drizzle_orm.Many<"renewals">;
|
|
1260
1226
|
event: drizzle_orm.One<"events", true>;
|
|
1261
1227
|
}>;
|
|
@@ -1318,8 +1284,8 @@ declare const renewal: ponder.OnchainTable<{
|
|
|
1318
1284
|
identity: undefined;
|
|
1319
1285
|
generated: undefined;
|
|
1320
1286
|
}, {}, {}>;
|
|
1321
|
-
|
|
1322
|
-
name: "
|
|
1287
|
+
renewalIndex: ponder.PgColumn<{
|
|
1288
|
+
name: "renewalIndex";
|
|
1323
1289
|
tableName: "renewals";
|
|
1324
1290
|
dataType: "number";
|
|
1325
1291
|
columnType: "PgInteger";
|
|
@@ -1472,8 +1438,8 @@ declare const latestRenewalIndex: ponder.OnchainTable<{
|
|
|
1472
1438
|
identity: undefined;
|
|
1473
1439
|
generated: undefined;
|
|
1474
1440
|
}, {}, {}>;
|
|
1475
|
-
|
|
1476
|
-
name: "
|
|
1441
|
+
renewalIndex: ponder.PgColumn<{
|
|
1442
|
+
name: "renewalIndex";
|
|
1477
1443
|
tableName: "latest_renewal_indexes";
|
|
1478
1444
|
dataType: "number";
|
|
1479
1445
|
columnType: "PgInteger";
|
|
@@ -1934,7 +1900,7 @@ declare const reverseNameRecord: ponder.OnchainTable<{
|
|
|
1934
1900
|
tableName: "reverse_name_records";
|
|
1935
1901
|
dataType: "string";
|
|
1936
1902
|
columnType: "PgText";
|
|
1937
|
-
data:
|
|
1903
|
+
data: InterpretedName;
|
|
1938
1904
|
driverParam: string;
|
|
1939
1905
|
notNull: true;
|
|
1940
1906
|
hasDefault: false;
|
|
@@ -1945,7 +1911,9 @@ declare const reverseNameRecord: ponder.OnchainTable<{
|
|
|
1945
1911
|
baseColumn: never;
|
|
1946
1912
|
identity: undefined;
|
|
1947
1913
|
generated: undefined;
|
|
1948
|
-
}, {}, {
|
|
1914
|
+
}, {}, {
|
|
1915
|
+
$type: InterpretedName;
|
|
1916
|
+
}>;
|
|
1949
1917
|
};
|
|
1950
1918
|
extra: {
|
|
1951
1919
|
pk: ponder.PrimaryKeyBuilder<"address" | "coinType">;
|
|
@@ -2042,7 +2010,7 @@ declare const domainResolverRelation: ponder.OnchainTable<{
|
|
|
2042
2010
|
}>;
|
|
2043
2011
|
};
|
|
2044
2012
|
extra: {
|
|
2045
|
-
pk: ponder.PrimaryKeyBuilder<"
|
|
2013
|
+
pk: ponder.PrimaryKeyBuilder<"chainId" | "address" | "domainId">;
|
|
2046
2014
|
};
|
|
2047
2015
|
dialect: "pg";
|
|
2048
2016
|
}>;
|
|
@@ -2223,7 +2191,7 @@ declare const resolverRecords: ponder.OnchainTable<{
|
|
|
2223
2191
|
tableName: "resolver_records";
|
|
2224
2192
|
dataType: "string";
|
|
2225
2193
|
columnType: "PgText";
|
|
2226
|
-
data:
|
|
2194
|
+
data: InterpretedName;
|
|
2227
2195
|
driverParam: string;
|
|
2228
2196
|
notNull: false;
|
|
2229
2197
|
hasDefault: false;
|
|
@@ -2234,7 +2202,96 @@ declare const resolverRecords: ponder.OnchainTable<{
|
|
|
2234
2202
|
baseColumn: never;
|
|
2235
2203
|
identity: undefined;
|
|
2236
2204
|
generated: undefined;
|
|
2205
|
+
}, {}, {
|
|
2206
|
+
$type: InterpretedName;
|
|
2207
|
+
}>;
|
|
2208
|
+
contenthash: ponder.PgColumn<{
|
|
2209
|
+
name: "contenthash";
|
|
2210
|
+
tableName: "resolver_records";
|
|
2211
|
+
dataType: "string";
|
|
2212
|
+
columnType: "PgHex";
|
|
2213
|
+
data: `0x${string}`;
|
|
2214
|
+
driverParam: string;
|
|
2215
|
+
notNull: false;
|
|
2216
|
+
hasDefault: false;
|
|
2217
|
+
isPrimaryKey: false;
|
|
2218
|
+
isAutoincrement: false;
|
|
2219
|
+
hasRuntimeDefault: false;
|
|
2220
|
+
enumValues: undefined;
|
|
2221
|
+
baseColumn: never;
|
|
2222
|
+
identity: undefined;
|
|
2223
|
+
generated: undefined;
|
|
2224
|
+
}, {}, {}>;
|
|
2225
|
+
pubkeyX: ponder.PgColumn<{
|
|
2226
|
+
name: "pubkeyX";
|
|
2227
|
+
tableName: "resolver_records";
|
|
2228
|
+
dataType: "string";
|
|
2229
|
+
columnType: "PgHex";
|
|
2230
|
+
data: `0x${string}`;
|
|
2231
|
+
driverParam: string;
|
|
2232
|
+
notNull: false;
|
|
2233
|
+
hasDefault: false;
|
|
2234
|
+
isPrimaryKey: false;
|
|
2235
|
+
isAutoincrement: false;
|
|
2236
|
+
hasRuntimeDefault: false;
|
|
2237
|
+
enumValues: undefined;
|
|
2238
|
+
baseColumn: never;
|
|
2239
|
+
identity: undefined;
|
|
2240
|
+
generated: undefined;
|
|
2241
|
+
}, {}, {}>;
|
|
2242
|
+
pubkeyY: ponder.PgColumn<{
|
|
2243
|
+
name: "pubkeyY";
|
|
2244
|
+
tableName: "resolver_records";
|
|
2245
|
+
dataType: "string";
|
|
2246
|
+
columnType: "PgHex";
|
|
2247
|
+
data: `0x${string}`;
|
|
2248
|
+
driverParam: string;
|
|
2249
|
+
notNull: false;
|
|
2250
|
+
hasDefault: false;
|
|
2251
|
+
isPrimaryKey: false;
|
|
2252
|
+
isAutoincrement: false;
|
|
2253
|
+
hasRuntimeDefault: false;
|
|
2254
|
+
enumValues: undefined;
|
|
2255
|
+
baseColumn: never;
|
|
2256
|
+
identity: undefined;
|
|
2257
|
+
generated: undefined;
|
|
2258
|
+
}, {}, {}>;
|
|
2259
|
+
dnszonehash: ponder.PgColumn<{
|
|
2260
|
+
name: "dnszonehash";
|
|
2261
|
+
tableName: "resolver_records";
|
|
2262
|
+
dataType: "string";
|
|
2263
|
+
columnType: "PgHex";
|
|
2264
|
+
data: `0x${string}`;
|
|
2265
|
+
driverParam: string;
|
|
2266
|
+
notNull: false;
|
|
2267
|
+
hasDefault: false;
|
|
2268
|
+
isPrimaryKey: false;
|
|
2269
|
+
isAutoincrement: false;
|
|
2270
|
+
hasRuntimeDefault: false;
|
|
2271
|
+
enumValues: undefined;
|
|
2272
|
+
baseColumn: never;
|
|
2273
|
+
identity: undefined;
|
|
2274
|
+
generated: undefined;
|
|
2237
2275
|
}, {}, {}>;
|
|
2276
|
+
version: ponder.PgColumn<{
|
|
2277
|
+
name: "version";
|
|
2278
|
+
tableName: "resolver_records";
|
|
2279
|
+
dataType: "bigint";
|
|
2280
|
+
columnType: "PgEvmBigint";
|
|
2281
|
+
data: bigint;
|
|
2282
|
+
driverParam: string;
|
|
2283
|
+
notNull: false;
|
|
2284
|
+
hasDefault: false;
|
|
2285
|
+
isPrimaryKey: false;
|
|
2286
|
+
isAutoincrement: false;
|
|
2287
|
+
hasRuntimeDefault: false;
|
|
2288
|
+
enumValues: undefined;
|
|
2289
|
+
baseColumn: never;
|
|
2290
|
+
identity: undefined;
|
|
2291
|
+
generated: undefined;
|
|
2292
|
+
}, {}, {
|
|
2293
|
+
$type: bigint;
|
|
2294
|
+
}>;
|
|
2238
2295
|
};
|
|
2239
2296
|
extra: {
|
|
2240
2297
|
byId: drizzle_orm_pg_core.IndexBuilder;
|
|
@@ -2350,7 +2407,7 @@ declare const resolverAddressRecord: ponder.OnchainTable<{
|
|
|
2350
2407
|
}, {}, {}>;
|
|
2351
2408
|
};
|
|
2352
2409
|
extra: {
|
|
2353
|
-
pk: ponder.PrimaryKeyBuilder<"
|
|
2410
|
+
pk: ponder.PrimaryKeyBuilder<"chainId" | "address" | "node" | "coinType">;
|
|
2354
2411
|
};
|
|
2355
2412
|
dialect: "pg";
|
|
2356
2413
|
}>;
|
|
@@ -2461,7 +2518,7 @@ declare const resolverTextRecord: ponder.OnchainTable<{
|
|
|
2461
2518
|
}, {}, {}>;
|
|
2462
2519
|
};
|
|
2463
2520
|
extra: {
|
|
2464
|
-
pk: ponder.PrimaryKeyBuilder<"
|
|
2521
|
+
pk: ponder.PrimaryKeyBuilder<"chainId" | "address" | "node" | "key">;
|
|
2465
2522
|
};
|
|
2466
2523
|
dialect: "pg";
|
|
2467
2524
|
}>;
|
|
@@ -2512,7 +2569,9 @@ declare const migratedNode: ponder.OnchainTable<{
|
|
|
2512
2569
|
baseColumn: never;
|
|
2513
2570
|
identity: undefined;
|
|
2514
2571
|
generated: undefined;
|
|
2515
|
-
}, {}, {
|
|
2572
|
+
}, {}, {
|
|
2573
|
+
$type: `0x${string}`;
|
|
2574
|
+
}>;
|
|
2516
2575
|
};
|
|
2517
2576
|
extra: undefined;
|
|
2518
2577
|
dialect: "pg";
|
|
@@ -2524,7 +2583,7 @@ declare const migratedNode: ponder.OnchainTable<{
|
|
|
2524
2583
|
/**
|
|
2525
2584
|
* Subregistries
|
|
2526
2585
|
*
|
|
2527
|
-
* @see https://ensnode.io/docs/reference/terminology
|
|
2586
|
+
* @see https://ensnode.io/docs/reference/terminology#subregistry
|
|
2528
2587
|
*/
|
|
2529
2588
|
declare const subregistries: ponder.OnchainTable<{
|
|
2530
2589
|
name: "subregistries";
|
|
@@ -2888,7 +2947,9 @@ declare const registrarActions: ponder.OnchainTable<{
|
|
|
2888
2947
|
baseColumn: never;
|
|
2889
2948
|
identity: undefined;
|
|
2890
2949
|
generated: undefined;
|
|
2891
|
-
}, {}, {
|
|
2950
|
+
}, {}, {
|
|
2951
|
+
$type: `0x${string}`;
|
|
2952
|
+
}>;
|
|
2892
2953
|
blockNumber: ponder.PgColumn<{
|
|
2893
2954
|
name: "blockNumber";
|
|
2894
2955
|
tableName: "registrar_actions";
|
|
@@ -3379,6 +3440,8 @@ declare const subgraph_domain: ponder.OnchainTable<{
|
|
|
3379
3440
|
}, {}, {}>;
|
|
3380
3441
|
};
|
|
3381
3442
|
extra: {
|
|
3443
|
+
byExactName: drizzle_orm_pg_core.IndexBuilder;
|
|
3444
|
+
byFuzzyName: drizzle_orm_pg_core.IndexBuilder;
|
|
3382
3445
|
byLabelhash: drizzle_orm_pg_core.IndexBuilder;
|
|
3383
3446
|
byParentId: drizzle_orm_pg_core.IndexBuilder;
|
|
3384
3447
|
byOwnerId: drizzle_orm_pg_core.IndexBuilder;
|
|
@@ -7080,7 +7143,6 @@ declare const abstractEnsIndexerSchema_account_relations: typeof account_relatio
|
|
|
7080
7143
|
declare const abstractEnsIndexerSchema_domainEvent: typeof domainEvent;
|
|
7081
7144
|
declare const abstractEnsIndexerSchema_domainResolverRelation: typeof domainResolverRelation;
|
|
7082
7145
|
declare const abstractEnsIndexerSchema_domainResolverRelation_relations: typeof domainResolverRelation_relations;
|
|
7083
|
-
declare const abstractEnsIndexerSchema_ensNodeMetadata: typeof ensNodeMetadata;
|
|
7084
7146
|
declare const abstractEnsIndexerSchema_event: typeof event;
|
|
7085
7147
|
declare const abstractEnsIndexerSchema_internal_registrarActionMetadata: typeof internal_registrarActionMetadata;
|
|
7086
7148
|
declare const abstractEnsIndexerSchema_internal_registrarActionMetadataType: typeof internal_registrarActionMetadataType;
|
|
@@ -7182,7 +7244,7 @@ declare const abstractEnsIndexerSchema_subregistryRelations: typeof subregistryR
|
|
|
7182
7244
|
declare const abstractEnsIndexerSchema_v1Domain: typeof v1Domain;
|
|
7183
7245
|
declare const abstractEnsIndexerSchema_v2Domain: typeof v2Domain;
|
|
7184
7246
|
declare namespace abstractEnsIndexerSchema {
|
|
7185
|
-
export { abstractEnsIndexerSchema_account as account, abstractEnsIndexerSchema_account_relations as account_relations, abstractEnsIndexerSchema_domainEvent as domainEvent, abstractEnsIndexerSchema_domainResolverRelation as domainResolverRelation, abstractEnsIndexerSchema_domainResolverRelation_relations as domainResolverRelation_relations,
|
|
7247
|
+
export { abstractEnsIndexerSchema_account as account, abstractEnsIndexerSchema_account_relations as account_relations, abstractEnsIndexerSchema_domainEvent as domainEvent, abstractEnsIndexerSchema_domainResolverRelation as domainResolverRelation, abstractEnsIndexerSchema_domainResolverRelation_relations as domainResolverRelation_relations, abstractEnsIndexerSchema_event as event, abstractEnsIndexerSchema_internal_registrarActionMetadata as internal_registrarActionMetadata, abstractEnsIndexerSchema_internal_registrarActionMetadataType as internal_registrarActionMetadataType, abstractEnsIndexerSchema_label as label, abstractEnsIndexerSchema_label_relations as label_relations, abstractEnsIndexerSchema_latestRegistrationIndex as latestRegistrationIndex, abstractEnsIndexerSchema_latestRenewalIndex as latestRenewalIndex, abstractEnsIndexerSchema_migratedNode as migratedNode, abstractEnsIndexerSchema_nameSales as nameSales, abstractEnsIndexerSchema_nameTokens as nameTokens, abstractEnsIndexerSchema_permissions as permissions, abstractEnsIndexerSchema_permissionsEvent as permissionsEvent, abstractEnsIndexerSchema_permissionsResource as permissionsResource, abstractEnsIndexerSchema_permissionsUser as permissionsUser, abstractEnsIndexerSchema_registrarActionRelations as registrarActionRelations, abstractEnsIndexerSchema_registrarActionType as registrarActionType, abstractEnsIndexerSchema_registrarActions as registrarActions, abstractEnsIndexerSchema_registration as registration, abstractEnsIndexerSchema_registrationLifecycleRelations as registrationLifecycleRelations, abstractEnsIndexerSchema_registrationLifecycles as registrationLifecycles, abstractEnsIndexerSchema_registrationType as registrationType, abstractEnsIndexerSchema_registration_relations as registration_relations, abstractEnsIndexerSchema_registry as registry, abstractEnsIndexerSchema_registryCanonicalDomain as registryCanonicalDomain, abstractEnsIndexerSchema_relations_permissions as relations_permissions, abstractEnsIndexerSchema_relations_permissionsResource as relations_permissionsResource, abstractEnsIndexerSchema_relations_permissionsUser as relations_permissionsUser, abstractEnsIndexerSchema_relations_registry as relations_registry, abstractEnsIndexerSchema_relations_v1Domain as relations_v1Domain, abstractEnsIndexerSchema_relations_v2Domain as relations_v2Domain, abstractEnsIndexerSchema_renewal as renewal, abstractEnsIndexerSchema_renewal_relations as renewal_relations, abstractEnsIndexerSchema_resolver as resolver, abstractEnsIndexerSchema_resolverAddressRecord as resolverAddressRecord, abstractEnsIndexerSchema_resolverAddressRecordRelations as resolverAddressRecordRelations, abstractEnsIndexerSchema_resolverEvent as resolverEvent, abstractEnsIndexerSchema_resolverRecords as resolverRecords, abstractEnsIndexerSchema_resolverRecords_relations as resolverRecords_relations, abstractEnsIndexerSchema_resolverTextRecord as resolverTextRecord, abstractEnsIndexerSchema_resolverTextRecordRelations as resolverTextRecordRelations, abstractEnsIndexerSchema_resolver_relations as resolver_relations, abstractEnsIndexerSchema_reverseNameRecord as reverseNameRecord, abstractEnsIndexerSchema_subgraph_abiChanged as subgraph_abiChanged, abstractEnsIndexerSchema_subgraph_abiChangedRelations as subgraph_abiChangedRelations, abstractEnsIndexerSchema_subgraph_account as subgraph_account, abstractEnsIndexerSchema_subgraph_accountRelations as subgraph_accountRelations, abstractEnsIndexerSchema_subgraph_addrChanged as subgraph_addrChanged, abstractEnsIndexerSchema_subgraph_addrChangedRelations as subgraph_addrChangedRelations, abstractEnsIndexerSchema_subgraph_authorisationChanged as subgraph_authorisationChanged, abstractEnsIndexerSchema_subgraph_authorisationChangedRelations as subgraph_authorisationChangedRelations, abstractEnsIndexerSchema_subgraph_contenthashChanged as subgraph_contenthashChanged, abstractEnsIndexerSchema_subgraph_contenthashChangedRelations as subgraph_contenthashChangedRelations, abstractEnsIndexerSchema_subgraph_domain as subgraph_domain, abstractEnsIndexerSchema_subgraph_domainRelations as subgraph_domainRelations, abstractEnsIndexerSchema_subgraph_expiryExtended as subgraph_expiryExtended, abstractEnsIndexerSchema_subgraph_expiryExtendedRelations as subgraph_expiryExtendedRelations, abstractEnsIndexerSchema_subgraph_fusesSet as subgraph_fusesSet, abstractEnsIndexerSchema_subgraph_fusesSetRelations as subgraph_fusesSetRelations, abstractEnsIndexerSchema_subgraph_interfaceChanged as subgraph_interfaceChanged, abstractEnsIndexerSchema_subgraph_interfaceChangedRelations as subgraph_interfaceChangedRelations, abstractEnsIndexerSchema_subgraph_multicoinAddrChanged as subgraph_multicoinAddrChanged, abstractEnsIndexerSchema_subgraph_multicoinAddrChangedRelations as subgraph_multicoinAddrChangedRelations, abstractEnsIndexerSchema_subgraph_nameChanged as subgraph_nameChanged, abstractEnsIndexerSchema_subgraph_nameChangedRelations as subgraph_nameChangedRelations, abstractEnsIndexerSchema_subgraph_nameRegistered as subgraph_nameRegistered, abstractEnsIndexerSchema_subgraph_nameRegisteredRelations as subgraph_nameRegisteredRelations, abstractEnsIndexerSchema_subgraph_nameRenewed as subgraph_nameRenewed, abstractEnsIndexerSchema_subgraph_nameRenewedRelations as subgraph_nameRenewedRelations, abstractEnsIndexerSchema_subgraph_nameTransferred as subgraph_nameTransferred, abstractEnsIndexerSchema_subgraph_nameTransferredRelations as subgraph_nameTransferredRelations, abstractEnsIndexerSchema_subgraph_nameUnwrapped as subgraph_nameUnwrapped, abstractEnsIndexerSchema_subgraph_nameUnwrappedRelations as subgraph_nameUnwrappedRelations, abstractEnsIndexerSchema_subgraph_nameWrapped as subgraph_nameWrapped, abstractEnsIndexerSchema_subgraph_nameWrappedRelations as subgraph_nameWrappedRelations, abstractEnsIndexerSchema_subgraph_newOwner as subgraph_newOwner, abstractEnsIndexerSchema_subgraph_newOwnerRelations as subgraph_newOwnerRelations, abstractEnsIndexerSchema_subgraph_newResolver as subgraph_newResolver, abstractEnsIndexerSchema_subgraph_newResolverRelations as subgraph_newResolverRelations, abstractEnsIndexerSchema_subgraph_newTTL as subgraph_newTTL, abstractEnsIndexerSchema_subgraph_newTTLRelations as subgraph_newTTLRelations, abstractEnsIndexerSchema_subgraph_pubkeyChanged as subgraph_pubkeyChanged, abstractEnsIndexerSchema_subgraph_pubkeyChangedRelations as subgraph_pubkeyChangedRelations, abstractEnsIndexerSchema_subgraph_registration as subgraph_registration, abstractEnsIndexerSchema_subgraph_registrationRelations as subgraph_registrationRelations, abstractEnsIndexerSchema_subgraph_resolver as subgraph_resolver, abstractEnsIndexerSchema_subgraph_resolverRelations as subgraph_resolverRelations, abstractEnsIndexerSchema_subgraph_textChanged as subgraph_textChanged, abstractEnsIndexerSchema_subgraph_textChangedRelations as subgraph_textChangedRelations, abstractEnsIndexerSchema_subgraph_transfer as subgraph_transfer, abstractEnsIndexerSchema_subgraph_transferRelations as subgraph_transferRelations, abstractEnsIndexerSchema_subgraph_versionChanged as subgraph_versionChanged, abstractEnsIndexerSchema_subgraph_versionChangedRelations as subgraph_versionChangedRelations, abstractEnsIndexerSchema_subgraph_wrappedDomain as subgraph_wrappedDomain, abstractEnsIndexerSchema_subgraph_wrappedDomainRelations as subgraph_wrappedDomainRelations, abstractEnsIndexerSchema_subgraph_wrappedTransfer as subgraph_wrappedTransfer, abstractEnsIndexerSchema_subgraph_wrappedTransferRelations as subgraph_wrappedTransferRelations, abstractEnsIndexerSchema_subregistries as subregistries, abstractEnsIndexerSchema_subregistryRelations as subregistryRelations, abstractEnsIndexerSchema_v1Domain as v1Domain, abstractEnsIndexerSchema_v2Domain as v2Domain };
|
|
7186
7248
|
}
|
|
7187
7249
|
|
|
7188
|
-
export {
|
|
7250
|
+
export { subgraph_addrChangedRelations as $, registrationType as A, registration_relations as B, registry as C, registryCanonicalDomain as D, relations_permissions as E, relations_permissionsResource as F, relations_permissionsUser as G, relations_registry as H, relations_v1Domain as I, relations_v2Domain as J, renewal as K, renewal_relations as L, resolver as M, resolverAddressRecord as N, resolverAddressRecordRelations as O, resolverEvent as P, resolverRecords as Q, resolverRecords_relations as R, resolverTextRecord as S, resolverTextRecordRelations as T, resolver_relations as U, reverseNameRecord as V, subgraph_abiChanged as W, subgraph_abiChangedRelations as X, subgraph_account as Y, subgraph_accountRelations as Z, subgraph_addrChanged as _, abstractEnsIndexerSchema as a, subgraph_authorisationChanged as a0, subgraph_authorisationChangedRelations as a1, subgraph_contenthashChanged as a2, subgraph_contenthashChangedRelations as a3, subgraph_domain as a4, subgraph_domainRelations as a5, subgraph_expiryExtended as a6, subgraph_expiryExtendedRelations as a7, subgraph_fusesSet as a8, subgraph_fusesSetRelations as a9, subgraph_resolver as aA, subgraph_resolverRelations as aB, subgraph_textChanged as aC, subgraph_textChangedRelations as aD, subgraph_transfer as aE, subgraph_transferRelations as aF, subgraph_versionChanged as aG, subgraph_versionChangedRelations as aH, subgraph_wrappedDomain as aI, subgraph_wrappedDomainRelations as aJ, subgraph_wrappedTransfer as aK, subgraph_wrappedTransferRelations as aL, subregistries as aM, subregistryRelations as aN, v1Domain as aO, v2Domain as aP, subgraph_interfaceChanged as aa, subgraph_interfaceChangedRelations as ab, subgraph_multicoinAddrChanged as ac, subgraph_multicoinAddrChangedRelations as ad, subgraph_nameChanged as ae, subgraph_nameChangedRelations as af, subgraph_nameRegistered as ag, subgraph_nameRegisteredRelations as ah, subgraph_nameRenewed as ai, subgraph_nameRenewedRelations as aj, subgraph_nameTransferred as ak, subgraph_nameTransferredRelations as al, subgraph_nameUnwrapped as am, subgraph_nameUnwrappedRelations as an, subgraph_nameWrapped as ao, subgraph_nameWrappedRelations as ap, subgraph_newOwner as aq, subgraph_newOwnerRelations as ar, subgraph_newResolver as as, subgraph_newResolverRelations as at, subgraph_newTTL as au, subgraph_newTTLRelations as av, subgraph_pubkeyChanged as aw, subgraph_pubkeyChangedRelations as ax, subgraph_registration as ay, subgraph_registrationRelations as az, account as b, account_relations as c, domainEvent as d, domainResolverRelation as e, domainResolverRelation_relations as f, event as g, internal_registrarActionMetadataType as h, internal_registrarActionMetadata as i, label_relations as j, latestRegistrationIndex as k, label as l, latestRenewalIndex as m, migratedNode as n, nameSales as o, nameTokens as p, permissions as q, permissionsEvent as r, permissionsResource as s, permissionsUser as t, registrarActionRelations as u, registrarActionType as v, registrarActions as w, registration as x, registrationLifecycleRelations as y, registrationLifecycles as z };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,11 +1,44 @@
|
|
|
1
|
-
import { EnsIndexerPublicConfig, CrossChainIndexingStatusSnapshot } from '@ensnode/ensnode-sdk';
|
|
1
|
+
import { EnsIndexerPublicConfig, EnsDbPublicConfig, CrossChainIndexingStatusSnapshot, Unvalidated } from '@ensnode/ensnode-sdk';
|
|
2
2
|
import { NodePgDatabase } from 'drizzle-orm/node-postgres';
|
|
3
|
-
import { a as abstractEnsIndexerSchema } from './index-
|
|
4
|
-
export { b as account, c as account_relations, d as domainEvent, e as domainResolverRelation, f as domainResolverRelation_relations, g as ensNodeMetadata, h as event, i as internal_registrarActionMetadata, j as internal_registrarActionMetadataType, l as label, k as label_relations, m as latestRegistrationIndex, n as latestRenewalIndex, o as migratedNode, p as nameSales, q as nameTokens, r as permissions, s as permissionsEvent, t as permissionsResource, u as permissionsUser, v as registrarActionRelations, w as registrarActionType, x as registrarActions, y as registration, z as registrationLifecycleRelations, A as registrationLifecycles, B as registrationType, C as registration_relations, D as registry, E as registryCanonicalDomain, F as relations_permissions, G as relations_permissionsResource, H as relations_permissionsUser, I as relations_registry, J as relations_v1Domain, K as relations_v2Domain, L as renewal, M as renewal_relations, N as resolver, O as resolverAddressRecord, P as resolverAddressRecordRelations, Q as resolverEvent, R as resolverRecords, S as resolverRecords_relations, T as resolverTextRecord, U as resolverTextRecordRelations, V as resolver_relations, W as reverseNameRecord, X as subgraph_abiChanged, Y as subgraph_abiChangedRelations, Z as subgraph_account, _ as subgraph_accountRelations, $ as subgraph_addrChanged, a0 as subgraph_addrChangedRelations, a1 as subgraph_authorisationChanged, a2 as subgraph_authorisationChangedRelations, a3 as subgraph_contenthashChanged, a4 as subgraph_contenthashChangedRelations, a5 as subgraph_domain, a6 as subgraph_domainRelations, a7 as subgraph_expiryExtended, a8 as subgraph_expiryExtendedRelations, a9 as subgraph_fusesSet, aa as subgraph_fusesSetRelations, ab as subgraph_interfaceChanged, ac as subgraph_interfaceChangedRelations, ad as subgraph_multicoinAddrChanged, ae as subgraph_multicoinAddrChangedRelations, af as subgraph_nameChanged, ag as subgraph_nameChangedRelations, ah as subgraph_nameRegistered, ai as subgraph_nameRegisteredRelations, aj as subgraph_nameRenewed, ak as subgraph_nameRenewedRelations, al as subgraph_nameTransferred, am as subgraph_nameTransferredRelations, an as subgraph_nameUnwrapped, ao as subgraph_nameUnwrappedRelations, ap as subgraph_nameWrapped, aq as subgraph_nameWrappedRelations, ar as subgraph_newOwner, as as subgraph_newOwnerRelations, at as subgraph_newResolver, au as subgraph_newResolverRelations, av as subgraph_newTTL, aw as subgraph_newTTLRelations, ax as subgraph_pubkeyChanged, ay as subgraph_pubkeyChangedRelations, az as subgraph_registration, aA as subgraph_registrationRelations, aB as subgraph_resolver, aC as subgraph_resolverRelations, aD as subgraph_textChanged, aE as subgraph_textChangedRelations, aF as subgraph_transfer, aG as subgraph_transferRelations, aH as subgraph_versionChanged, aI as subgraph_versionChangedRelations, aJ as subgraph_wrappedDomain, aK as subgraph_wrappedDomainRelations, aL as subgraph_wrappedTransfer, aM as subgraph_wrappedTransferRelations, aN as subregistries, aO as subregistryRelations, aP as v1Domain, aQ as v2Domain } from './index-DHRbRciU.js';
|
|
3
|
+
import { a as abstractEnsIndexerSchema } from './index-DN0SGSyd.js';
|
|
5
4
|
import { e as ensNodeSchema } from './index-BHoa233Z.js';
|
|
6
|
-
import 'ponder';
|
|
7
5
|
import 'drizzle-orm/pg-core';
|
|
8
6
|
import 'drizzle-orm';
|
|
7
|
+
import 'ponder';
|
|
8
|
+
import 'enssdk';
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* ENSDb Config
|
|
12
|
+
*/
|
|
13
|
+
interface EnsDbConfig {
|
|
14
|
+
/**
|
|
15
|
+
* PostgreSQL connection string for ENSDb.
|
|
16
|
+
*
|
|
17
|
+
* Guaranteed to be a valid PostgreSQL connection string with the format:
|
|
18
|
+
* `postgresql://username:password@host:port/database` or
|
|
19
|
+
* `postgres://username:password@host:port/database`
|
|
20
|
+
*/
|
|
21
|
+
ensDbUrl: string;
|
|
22
|
+
/**
|
|
23
|
+
* The name of the ENSIndexer Schema in the ENSDb instance.
|
|
24
|
+
*
|
|
25
|
+
* Guaranteed to be a non-empty string that is
|
|
26
|
+
* a valid Postgres database schema identifier
|
|
27
|
+
*/
|
|
28
|
+
ensIndexerSchemaName: string;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* ENSDb Schema Checksum
|
|
32
|
+
*
|
|
33
|
+
* Checksum representing the ENSDb Schema definition, which is a combination of
|
|
34
|
+
* - the ENSIndexer Schema definition, and
|
|
35
|
+
* - the ENSNode Schema definition.
|
|
36
|
+
*
|
|
37
|
+
* This checksum can be used to verify compatibility between
|
|
38
|
+
* the ENSDb Schema definition expected by any client app connecting to ENSDb
|
|
39
|
+
* instance and the actual ENSDb Schema definition present in ENSDb SDK.
|
|
40
|
+
*/
|
|
41
|
+
declare const ENSDB_SCHEMA_CHECKSUM: string;
|
|
9
42
|
|
|
10
43
|
/**
|
|
11
44
|
* Utilities for Drizzle ORM integration with ENSDb.
|
|
@@ -71,19 +104,19 @@ declare class EnsDbReader<ConcreteEnsIndexerSchema extends AbstractEnsIndexerSch
|
|
|
71
104
|
* This also identifies which ENSNode metadata records to read from the ENSNode Schema
|
|
72
105
|
* as the ENSNode Schema is multi-tenant across ENSIndexer instances / ENSIndexer Schemas in an ENSDb.
|
|
73
106
|
*/
|
|
74
|
-
protected
|
|
107
|
+
protected _ensIndexerSchemaName: string;
|
|
75
108
|
protected _ensNodeSchema: EnsNodeSchema;
|
|
76
109
|
/**
|
|
77
|
-
* @param
|
|
110
|
+
* @param ensDbUrl The connection string for Drizzle to connect to the ENSDb instance.
|
|
78
111
|
* @param ensIndexerSchemaName The name of the ENSIndexer schema to read from in ENSDb, used to identify which ENSNode metadata records to read.
|
|
79
112
|
*/
|
|
80
|
-
constructor(
|
|
113
|
+
constructor(ensDbUrl: string, ensIndexerSchemaName: string);
|
|
81
114
|
/**
|
|
82
115
|
* Getter for the Drizzle client for ENSDb instance
|
|
83
116
|
*
|
|
84
117
|
* Useful while working on complex queries for ENSDb.
|
|
85
118
|
*/
|
|
86
|
-
get
|
|
119
|
+
get ensDb(): EnsDbDrizzleClient<ConcreteEnsIndexerSchema>;
|
|
87
120
|
/**
|
|
88
121
|
* Getter for the "concrete" ENSIndexer Schema definition used in the Drizzle client
|
|
89
122
|
* for ENSDb instance.
|
|
@@ -92,10 +125,14 @@ declare class EnsDbReader<ConcreteEnsIndexerSchema extends AbstractEnsIndexerSch
|
|
|
92
125
|
*
|
|
93
126
|
* Note: using `ensIndexerSchema` name for this getter to make it read better
|
|
94
127
|
* in the context of query building. For example:
|
|
95
|
-
* `this.
|
|
96
|
-
* `this.
|
|
128
|
+
* `this.ensDb.select().from(this.ensIndexerSchema.event)` vs.
|
|
129
|
+
* `this.ensDb.select().from(this.concreteEnsIndexerSchema.event)`.
|
|
97
130
|
*/
|
|
98
131
|
get ensIndexerSchema(): ConcreteEnsIndexerSchema;
|
|
132
|
+
/**
|
|
133
|
+
* Getter for the ENSIndexer Schema Name used by this ENSDbReader instance.
|
|
134
|
+
*/
|
|
135
|
+
get ensIndexerSchemaName(): string;
|
|
99
136
|
/**
|
|
100
137
|
* Getter for the ENSNode Schema definition used in the Drizzle client
|
|
101
138
|
* for ENSDb instance.
|
|
@@ -115,6 +152,10 @@ declare class EnsDbReader<ConcreteEnsIndexerSchema extends AbstractEnsIndexerSch
|
|
|
115
152
|
* @returns the existing record, or `undefined`.
|
|
116
153
|
*/
|
|
117
154
|
getEnsIndexerPublicConfig(): Promise<EnsIndexerPublicConfig | undefined>;
|
|
155
|
+
/**
|
|
156
|
+
* Build ENSDb Public Config
|
|
157
|
+
*/
|
|
158
|
+
buildEnsDbPublicConfig(): Promise<EnsDbPublicConfig>;
|
|
118
159
|
/**
|
|
119
160
|
* Get Indexing Status Snapshot
|
|
120
161
|
*
|
|
@@ -130,6 +171,19 @@ declare class EnsDbReader<ConcreteEnsIndexerSchema extends AbstractEnsIndexerSch
|
|
|
130
171
|
* 'ensIndexerSchemaName' and 'key')
|
|
131
172
|
*/
|
|
132
173
|
private getEnsNodeMetadata;
|
|
174
|
+
/**
|
|
175
|
+
* Get PostgreSQL version for the server hosting the ENSDb instance.
|
|
176
|
+
*
|
|
177
|
+
* @throws when the version cannot be retrieved or parsed from the query result.
|
|
178
|
+
*/
|
|
179
|
+
private getPostgresVersion;
|
|
180
|
+
/**
|
|
181
|
+
* Build ENSDb version info.
|
|
182
|
+
*
|
|
183
|
+
* @throws when version info cannot be retrieved or parsed from
|
|
184
|
+
* the ENSDb instance.
|
|
185
|
+
*/
|
|
186
|
+
private buildEnsDbVersionInfo;
|
|
133
187
|
}
|
|
134
188
|
|
|
135
189
|
/**
|
|
@@ -202,4 +256,13 @@ interface EnsNodeMetadataEnsIndexerIndexingStatus {
|
|
|
202
256
|
*/
|
|
203
257
|
type EnsNodeMetadata = EnsNodeMetadataEnsDbVersion | EnsNodeMetadataEnsIndexerPublicConfig | EnsNodeMetadataEnsIndexerIndexingStatus;
|
|
204
258
|
|
|
205
|
-
|
|
259
|
+
/**
|
|
260
|
+
* Validate ENSDb config
|
|
261
|
+
*
|
|
262
|
+
* @param unvalidatedConfig - Unvalidated ENSDb config
|
|
263
|
+
* @returns Valid ENSDb config
|
|
264
|
+
* @throws Error if validation fails, with details about the validation errors
|
|
265
|
+
*/
|
|
266
|
+
declare function validateEnsDbConfig(unvalidatedConfig: Unvalidated<EnsDbConfig>): EnsDbConfig;
|
|
267
|
+
|
|
268
|
+
export { ENSDB_SCHEMA_CHECKSUM, type EnsDbConfig, type EnsDbDrizzleClient, EnsDbReader, EnsDbWriter, type EnsNodeMetadata, type EnsNodeMetadataEnsDbVersion, type EnsNodeMetadataEnsIndexerIndexingStatus, type EnsNodeMetadataEnsIndexerPublicConfig, type EnsNodeMetadataKey, EnsNodeMetadataKeys, validateEnsDbConfig };
|