@ensnode/ensnode-sdk 0.0.0-next-20260521212120 → 0.0.0-next-20260522173121

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/internal.cjs CHANGED
@@ -2152,22 +2152,22 @@ var errorResponseInternalServerErrorExample = {
2152
2152
  var import_enssdk8 = require("enssdk");
2153
2153
  var import_datasources5 = require("@ensnode/datasources");
2154
2154
  var import_devnet = require("@ensnode/datasources/devnet");
2155
- var SEPOLIA_V2_V2_ETH_REGISTRY = maybeGetDatasourceContract(
2155
+ var SEPOLIA_V2_V2_ETH_REGISTRY = getDatasourceContract(
2156
2156
  import_datasources5.ENSNamespaceIds.SepoliaV2,
2157
2157
  import_datasources5.DatasourceNames.ENSv2Root,
2158
2158
  "ETHRegistry"
2159
2159
  );
2160
- var SEPOLIA_V2_V2_ETH_REGISTRAR = maybeGetDatasourceContract(
2160
+ var SEPOLIA_V2_V2_ETH_REGISTRAR = getDatasourceContract(
2161
2161
  import_datasources5.ENSNamespaceIds.SepoliaV2,
2162
2162
  import_datasources5.DatasourceNames.ENSv2Root,
2163
2163
  "ETHRegistrar"
2164
2164
  );
2165
- var ENS_TEST_ENV_V2_ETH_REGISTRY = maybeGetDatasourceContract(
2165
+ var ENS_TEST_ENV_V2_ETH_REGISTRY = getDatasourceContract(
2166
2166
  import_datasources5.ENSNamespaceIds.EnsTestEnv,
2167
2167
  import_datasources5.DatasourceNames.ENSv2Root,
2168
2168
  "ETHRegistry"
2169
2169
  );
2170
- var ENS_TEST_ENV_V2_ETH_REGISTRAR = maybeGetDatasourceContract(
2170
+ var ENS_TEST_ENV_V2_ETH_REGISTRAR = getDatasourceContract(
2171
2171
  import_datasources5.ENSNamespaceIds.EnsTestEnv,
2172
2172
  import_datasources5.DatasourceNames.ENSv2Root,
2173
2173
  "ETHRegistrar"
@@ -2180,6 +2180,16 @@ var SEPOLIA_V2_ADDRESS_WITH_LOT_OF_NAMES = (0, import_enssdk8.toNormalizedAddres
2180
2180
  var DEVNET_NAME_WITH_OWNED_RESOLVER = (0, import_enssdk8.asInterpretedName)("example.eth");
2181
2181
  var SEPOLIA_V2_NAME_WITH_OWNED_RESOLVER = (0, import_enssdk8.asInterpretedName)("sfmonicdebmig.eth");
2182
2182
  var SEPOLIA_V2_TEST_NAME = (0, import_enssdk8.asInterpretedName)("test-name.eth");
2183
+ var MAINNET_PUBLIC_RESOLVER = getDatasourceContract(
2184
+ import_datasources5.ENSNamespaceIds.Mainnet,
2185
+ import_datasources5.DatasourceNames.ReverseResolverRoot,
2186
+ "DefaultPublicResolver5"
2187
+ );
2188
+ var SEPOLIA_V2_PUBLIC_RESOLVER = getDatasourceContract(
2189
+ import_datasources5.ENSNamespaceIds.SepoliaV2,
2190
+ import_datasources5.DatasourceNames.ReverseResolverRoot,
2191
+ "DefaultPublicResolver5"
2192
+ );
2183
2193
  function getGraphqlApiExampleQueryById(id) {
2184
2194
  const found = graphqlApiExampleQueryById.get(id);
2185
2195
  if (!found) {
@@ -2202,7 +2212,7 @@ var GRAPHQL_API_EXAMPLE_QUERIES = [
2202
2212
  #
2203
2213
  # There are also example queries in the tabs above \u261D\uFE0F
2204
2214
  query HelloWorld {
2205
- domain(by: { name: "eth" }) { canonical { name { interpreted } } owner { address } }
2215
+ domain(by: { name: "eth" }) { canonical { name { interpreted beautified } } owner { address } }
2206
2216
  }`,
2207
2217
  variables: { default: {} }
2208
2218
  },
@@ -2226,7 +2236,7 @@ query FindDomains(
2226
2236
  __typename
2227
2237
  id
2228
2238
  label { interpreted hash }
2229
- canonical { name { interpreted } }
2239
+ canonical { name { interpreted beautified } }
2230
2240
 
2231
2241
  registration { expiry event { timestamp } }
2232
2242
  }
@@ -2270,6 +2280,51 @@ query DomainByName($name: InterpretedName!) {
2270
2280
  [import_datasources5.ENSNamespaceIds.SepoliaV2]: { name: SEPOLIA_V2_TEST_NAME }
2271
2281
  }
2272
2282
  },
2283
+ ///////////////////////
2284
+ // Domain Registration
2285
+ ///////////////////////
2286
+ {
2287
+ id: "domain-registration",
2288
+ query: `
2289
+ query DomainRegistration($name: InterpretedName!) {
2290
+ domain(by: { name: $name }) {
2291
+ canonical { name { interpreted } }
2292
+
2293
+ registration {
2294
+ __typename
2295
+ id
2296
+ start
2297
+ expiry
2298
+ expired
2299
+ referrer
2300
+ registrar { chainId address }
2301
+ registrant { address }
2302
+ renewals(first: 5) {
2303
+ totalCount
2304
+ edges { node { duration base premium referrer } }
2305
+ }
2306
+
2307
+ # ENSv1 .eth registrations (also Basenames & Lineanames)
2308
+ ... on BaseRegistrarRegistration {
2309
+ baseCost
2310
+ premium
2311
+ isInGracePeriod
2312
+ # present when the .eth name is wrapped by the NameWrapper
2313
+ wrapped { fuses tokenId }
2314
+ }
2315
+
2316
+ # names held natively in the NameWrapper
2317
+ ... on NameWrapperRegistration {
2318
+ fuses
2319
+ }
2320
+ }
2321
+ }
2322
+ }`,
2323
+ variables: {
2324
+ default: { name: "vitalik.eth" },
2325
+ [import_datasources5.ENSNamespaceIds.SepoliaV2]: { name: SEPOLIA_V2_NAME_WITH_OWNED_RESOLVER }
2326
+ }
2327
+ },
2273
2328
  //////////////////////
2274
2329
  // Domain Subdomains
2275
2330
  //////////////////////
@@ -2278,11 +2333,11 @@ query DomainByName($name: InterpretedName!) {
2278
2333
  query: `
2279
2334
  query DomainSubdomains($name: InterpretedName!) {
2280
2335
  domain(by: {name: $name}) {
2281
- canonical { name { interpreted } }
2336
+ canonical { name { interpreted beautified } }
2282
2337
  subdomains(first: 10) {
2283
2338
  edges {
2284
2339
  node {
2285
- canonical { name { interpreted } }
2340
+ canonical { name { interpreted beautified } }
2286
2341
  }
2287
2342
  }
2288
2343
  }
@@ -2290,6 +2345,31 @@ query DomainSubdomains($name: InterpretedName!) {
2290
2345
  }`,
2291
2346
  variables: { default: { name: "eth" } }
2292
2347
  },
2348
+ ////////////////////////
2349
+ // Subdomains Pagination
2350
+ ////////////////////////
2351
+ {
2352
+ id: "subdomains-pagination",
2353
+ query: `
2354
+ query SubdomainsPagination($first: Int!, $after: String) {
2355
+ domain(by: { name: "eth" }) {
2356
+ canonical { name { interpreted } }
2357
+
2358
+ # paginate child names: pass pageInfo.endCursor back as $after for the next page
2359
+ subdomains(first: $first, after: $after) {
2360
+ totalCount
2361
+ pageInfo { hasNextPage endCursor }
2362
+ edges {
2363
+ cursor
2364
+ node {
2365
+ canonical { name { interpreted } }
2366
+ }
2367
+ }
2368
+ }
2369
+ }
2370
+ }`,
2371
+ variables: { default: { first: 10, after: null } }
2372
+ },
2293
2373
  /////////////////
2294
2374
  // Domain Events
2295
2375
  /////////////////
@@ -2332,7 +2412,7 @@ query AccountDomains(
2332
2412
  edges {
2333
2413
  node {
2334
2414
  label { interpreted }
2335
- canonical { name { interpreted } }
2415
+ canonical { name { interpreted beautified } }
2336
2416
  }
2337
2417
  }
2338
2418
  }
@@ -2377,7 +2457,7 @@ query RegistryDomains(
2377
2457
  edges {
2378
2458
  node {
2379
2459
  label { interpreted }
2380
- canonical { name { interpreted } }
2460
+ canonical { name { interpreted beautified } }
2381
2461
  }
2382
2462
  }
2383
2463
  }
@@ -2498,6 +2578,38 @@ query DomainResolver($name: InterpretedName!) {
2498
2578
  [import_datasources5.ENSNamespaceIds.SepoliaV2]: { name: SEPOLIA_V2_NAME_WITH_OWNED_RESOLVER }
2499
2579
  }
2500
2580
  },
2581
+ ////////////////////////
2582
+ // Resolver By Address
2583
+ ////////////////////////
2584
+ {
2585
+ id: "resolver-by-address",
2586
+ query: `
2587
+ query ResolverByAddress($contract: AccountIdInput!) {
2588
+ resolver(by: { contract: $contract }) {
2589
+ id
2590
+ contract { chainId address }
2591
+
2592
+ # records this resolver stores, keyed by node
2593
+ records(first: 5) {
2594
+ totalCount
2595
+ edges {
2596
+ node {
2597
+ node
2598
+ name
2599
+ keys
2600
+ coinTypes
2601
+ }
2602
+ }
2603
+ }
2604
+
2605
+ events { totalCount edges { node { topics data timestamp } } }
2606
+ }
2607
+ }`,
2608
+ variables: {
2609
+ default: { contract: MAINNET_PUBLIC_RESOLVER },
2610
+ [import_datasources5.ENSNamespaceIds.SepoliaV2]: { contract: SEPOLIA_V2_PUBLIC_RESOLVER }
2611
+ }
2612
+ },
2501
2613
  //////////////
2502
2614
  // Namegraph
2503
2615
  //////////////
@@ -2510,17 +2622,17 @@ query Namegraph {
2510
2622
  domains {
2511
2623
  edges {
2512
2624
  node {
2513
- canonical { name { interpreted } }
2625
+ canonical { name { interpreted beautified } }
2514
2626
 
2515
2627
  subdomains {
2516
2628
  edges {
2517
2629
  node {
2518
- canonical { name { interpreted } }
2630
+ canonical { name { interpreted beautified } }
2519
2631
 
2520
2632
  subdomains {
2521
2633
  edges {
2522
2634
  node {
2523
- canonical { name { interpreted } }
2635
+ canonical { name { interpreted beautified } }
2524
2636
  }
2525
2637
  }
2526
2638
  }