@ensnode/ensnode-sdk 1.15.0 → 1.15.2

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.js CHANGED
@@ -102,6 +102,7 @@ var makeDefaultableChainIdSchema = (valueLabel = "Defaultable Chain ID") => make
102
102
  var makeDefaultableChainIdStringSchema = (valueLabel = "Defaultable Chain ID String") => z.string({ error: `${valueLabel} must be a string representing a chain ID.` }).pipe(z.coerce.number({ error: `${valueLabel} must represent a non-negative integer (>=0).` })).pipe(makeDefaultableChainIdSchema(`The numeric value represented by ${valueLabel}`));
103
103
  var makeCoinTypeSchema = (valueLabel = "Coin Type") => z.number({ error: `${valueLabel} must be a number.` }).int({ error: `${valueLabel} must be an integer.` }).nonnegative({ error: `${valueLabel} must be a non-negative integer (>=0).` }).transform((val) => val);
104
104
  var makeCoinTypeStringSchema = (valueLabel = "Coin Type String") => z.string({ error: `${valueLabel} must be a string representing a coin type.` }).pipe(z.coerce.number({ error: `${valueLabel} must represent a non-negative integer (>=0).` })).pipe(makeCoinTypeSchema(`The numeric value represented by ${valueLabel}`));
105
+ var makeEmailSchema = (valueLabel = "Email") => z.string({ error: `${valueLabel} must be a string.` }).trim().pipe(z.email({ error: `${valueLabel} must be a valid email address.` })).transform((value) => value);
105
106
  var makeNormalizedAddressSchema = (valueLabel = "EVM address") => z.string().check((ctx) => {
106
107
  if (!isAddress(ctx.value, { strict: false })) {
107
108
  ctx.issues.push({
@@ -1964,19 +1965,76 @@ var errorResponseInternalServerErrorExample = {
1964
1965
  };
1965
1966
 
1966
1967
  // src/omnigraph-api/example-queries.ts
1967
- import { asInterpretedName, toNormalizedAddress as toNormalizedAddress3 } from "enssdk";
1968
+ import { asInterpretedName, toNormalizedAddress as toNormalizedAddress4 } from "enssdk";
1968
1969
  import { DatasourceNames as DatasourceNames2, ENSNamespaceIds as ENSNamespaceIds3 } from "@ensnode/datasources";
1969
- import { accounts } from "@ensnode/datasources/devnet";
1970
+
1971
+ // ../integration-test-env/src/devnet/fixtures.ts
1972
+ import { getCoderByCoinName } from "@ensdomains/address-encoder";
1973
+ import { bytesToHex } from "@ensdomains/address-encoder/utils";
1974
+ import { asNormalizedAddress, toNormalizedAddress as toNormalizedAddress3 } from "enssdk";
1975
+ import { mnemonicToAccount } from "viem/accounts";
1976
+ var mnemonic = "test test test test test test test test test test test junk";
1977
+ function createAccount(addressIndex, resolver) {
1978
+ const account = mnemonicToAccount(mnemonic, { addressIndex });
1979
+ return {
1980
+ ...account,
1981
+ address: toNormalizedAddress3(account.address),
1982
+ resolver
1983
+ };
1984
+ }
1985
+ var accounts = {
1986
+ deployer: createAccount(0, asNormalizedAddress("0x9c97ec2d79944fa55aa2eb6385bc8711cacf18d2")),
1987
+ owner: createAccount(1, asNormalizedAddress("0x8550d35164e7f86bb6adf4cedb3f012913c9d563")),
1988
+ user: createAccount(2, asNormalizedAddress("0x98a84b915ffe27241033ac8f29c6b7849a0fb6e4")),
1989
+ user2: createAccount(3, asNormalizedAddress("0xd04f8f3726a417cfadeea604fc94cf66112b9af6"))
1990
+ };
1991
+ var addresses = {
1992
+ one: asNormalizedAddress(`0x${"1".repeat(40)}`)
1993
+ };
1994
+ var getRawAddress = (coinName, address) => {
1995
+ const coder = getCoderByCoinName(coinName);
1996
+ return {
1997
+ coinType: coder.coinType,
1998
+ raw: bytesToHex(coder.decode(address)),
1999
+ address
2000
+ };
2001
+ };
2002
+ var testEthTextRecords = {
2003
+ avatar: { key: "avatar", value: "https://example.com/avatar.png" },
2004
+ twitter: { key: "com.twitter", value: "ensdomains" },
2005
+ github: { key: "com.github", value: "@ensdomains" },
2006
+ x: { key: "com.x", value: "this_is_real_ensdomains_not_twitter_but_x_haha" },
2007
+ telegram: { key: "org.telegram", value: "t.me/ensdomains" },
2008
+ url: { key: "url", value: "https://ens.domains" },
2009
+ email: { key: "email", value: "test@ens.domains" },
2010
+ description: { key: "description", value: "test.eth" },
2011
+ header: { key: "header", value: "https://example.com/header.png" }
2012
+ };
2013
+ var rawAddresses = {
2014
+ bitcoin: getRawAddress("btc", "bc1qw508d6qejxtdg4y5r3zarvary0c5xw7kv8f3t4"),
2015
+ litecoin: getRawAddress("ltc", "LaMT348PWRnrqeeWArpwQPbuanpXDZGEUz"),
2016
+ dogecoin: getRawAddress("doge", "DBXu2kgc3xtvCUWFcxFE3r9hEYgmuaaCyD"),
2017
+ monacoin: getRawAddress("mona", "MHxgS2XMXjeJ4if2PRRbWYcdwZPWfdwaDT"),
2018
+ rootstock: getRawAddress("rbtc", "0x5aaEB6053f3e94c9b9a09f33669435E7ef1bEAeD"),
2019
+ binance: getRawAddress("bnb", "bnb1grpf0955h0ykzq3ar5nmum7y6gdfl6lxfn46h2"),
2020
+ solana: getRawAddress("sol", "FncazAs6omJJjtLVzquzT9KoyXn6tFixr9kGjr42ktLj")
2021
+ };
2022
+ var fixtures = {
2023
+ abiBytes: `0x${"01".repeat(32)}`,
2024
+ fourBytesInterface: "0x11100111",
2025
+ publicKeyX: `0x${"02".repeat(32)}`,
2026
+ publicKeyY: `0x${"03".repeat(32)}`,
2027
+ contenthash: `0x${"04".repeat(32)}`,
2028
+ rawAddresses,
2029
+ textRecords: testEthTextRecords
2030
+ };
2031
+
2032
+ // src/omnigraph-api/example-queries.ts
1970
2033
  var SEPOLIA_V2_V2_ETH_REGISTRY = getDatasourceContract(
1971
2034
  ENSNamespaceIds3.SepoliaV2,
1972
2035
  DatasourceNames2.ENSv2Root,
1973
2036
  "ETHRegistry"
1974
2037
  );
1975
- var SEPOLIA_V2_V2_ETH_REGISTRAR = getDatasourceContract(
1976
- ENSNamespaceIds3.SepoliaV2,
1977
- DatasourceNames2.ENSv2Root,
1978
- "ETHRegistrar"
1979
- );
1980
2038
  var ENS_TEST_ENV_V2_ETH_REGISTRY = getDatasourceContract(
1981
2039
  ENSNamespaceIds3.EnsTestEnv,
1982
2040
  DatasourceNames2.ENSv2Root,
@@ -1987,24 +2045,24 @@ var ENS_TEST_ENV_V2_ETH_REGISTRAR = getDatasourceContract(
1987
2045
  DatasourceNames2.ENSv2Root,
1988
2046
  "ETHRegistrar"
1989
2047
  );
1990
- var VITALIK_ADDRESS = toNormalizedAddress3("0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045");
1991
- var _SEPOLIA_V2_USER_ADDRESS = toNormalizedAddress3("0x2f8e8b1126e75fde0b7f731e7cb5847eba2d2574");
1992
- var SEPOLIA_V2_ADDRESS_WITH_LOT_OF_NAMES = toNormalizedAddress3(
1993
- "0x205d2686da3bf33f64c17f21462c51b5ead462cf"
2048
+ var VITALIK_ADDRESS = toNormalizedAddress4("0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045");
2049
+ var SEPOLIA_V2_ACCOUNT = toNormalizedAddress4("0x801d2e48d378f161dba7ad7ad002ad557714c191");
2050
+ var SEPOLIA_V2_ACCOUNT_WITH_V1_AND_V2 = toNormalizedAddress4(
2051
+ "0xffffffffff52d316b7bd028358089bc8066b8f80"
1994
2052
  );
1995
2053
  var DEVNET_NAME_WITH_OWNED_RESOLVER = asInterpretedName("example.eth");
1996
- var SEPOLIA_V2_NAME_WITH_OWNED_RESOLVER = asInterpretedName("sfmonicdebmig.eth");
1997
- var SEPOLIA_V2_TEST_NAME = asInterpretedName("test-name.eth");
2054
+ var SEPOLIA_V2_NAME = asInterpretedName("roppp.eth");
2055
+ var VITALIK_NAME = asInterpretedName("vitalik.eth");
2056
+ var GREG_NAME = asInterpretedName("gregskril.eth");
1998
2057
  var MAINNET_PUBLIC_RESOLVER = getDatasourceContract(
1999
2058
  ENSNamespaceIds3.Mainnet,
2000
2059
  DatasourceNames2.ReverseResolverRoot,
2001
2060
  "DefaultPublicResolver5"
2002
2061
  );
2003
- var SEPOLIA_V2_PUBLIC_RESOLVER = getDatasourceContract(
2004
- ENSNamespaceIds3.SepoliaV2,
2005
- DatasourceNames2.ReverseResolverRoot,
2006
- "DefaultPublicResolver5"
2007
- );
2062
+ var SEPOLIA_V2_RESOLVER_WITH_RECORDS = {
2063
+ chainId: 11155111,
2064
+ address: toNormalizedAddress4("0x8fade66b79cc9f707ab26799354482eb93a5b7dd")
2065
+ };
2008
2066
  function getGraphqlApiExampleQueryById(id) {
2009
2067
  const found = graphqlApiExampleQueryById.get(id);
2010
2068
  if (!found) {
@@ -2018,18 +2076,44 @@ var GRAPHQL_API_EXAMPLE_QUERIES = [
2018
2076
  ////////////////
2019
2077
  {
2020
2078
  id: "hello-world",
2021
- query: `#
2022
- # Welcome to this interactive playground for
2023
- # ENSNode's GraphQL API!
2024
- #
2025
- # You can get started by typing your query here or by using
2026
- # the Explorer on the left to select the data you want to query.
2027
- #
2028
- # There are also example queries in the tabs above \u261D\uFE0F
2029
- query HelloWorld {
2030
- domain(by: { name: "eth" }) { canonical { name { interpreted beautified } } owner { address } }
2079
+ query: `query HelloWorld($address: Address!) {
2080
+ # Lookup an Account by address.
2081
+ account(by: { address: $address }) {
2082
+ resolve {
2083
+ # Reverse resolve the ENS primary name of the account
2084
+ # using a convenient ETHEREUM alias for mainnet.
2085
+ primaryName(by: { chainName: ETHEREUM }) {
2086
+ # Get the regular interpreted variant of the primary name
2087
+ # and also the special beautified variant that optimizes names
2088
+ # containing special characters such as emojis for proper display in interfaces.
2089
+ name { interpreted beautified }
2090
+ resolve {
2091
+ # If the account has a primary name on Ethereum (mainnet),
2092
+ # forward resolve the interpreted ENS profile of that name in the same query!.
2093
+ profile {
2094
+ description
2095
+ avatar { httpUrl }
2096
+ addresses { ethereum bitcoin }
2097
+ socials {
2098
+ twitter { handle httpUrl }
2099
+ github { handle httpUrl }
2100
+ }
2101
+ }
2102
+ }
2103
+ }
2104
+ }
2105
+
2106
+ # Also load the count of ENSv1 and ENSv2 domains owned by the account
2107
+ # to see if they have domains they should upgrade to ENSv2
2108
+ v1DomainsCount: domains(where: { version: ENSv1 }) { totalCount }
2109
+ v2DomainsCount: domains(where: { version: ENSv2 }) { totalCount }
2110
+ }
2031
2111
  }`,
2032
- variables: { default: {} }
2112
+ variables: {
2113
+ default: { address: VITALIK_ADDRESS },
2114
+ [ENSNamespaceIds3.EnsTestEnv]: { address: accounts.owner.address },
2115
+ [ENSNamespaceIds3.SepoliaV2]: { address: SEPOLIA_V2_ACCOUNT_WITH_V1_AND_V2 }
2116
+ }
2033
2117
  },
2034
2118
  /////////////////
2035
2119
  // Find Domains
@@ -2065,17 +2149,40 @@ query FindDomains(
2065
2149
  order: { by: "NAME", dir: "DESC" }
2066
2150
  },
2067
2151
  [ENSNamespaceIds3.SepoliaV2]: {
2068
- name: { starts_with: "test-na" },
2152
+ name: { starts_with: "sf" },
2069
2153
  order: { by: "NAME", dir: "DESC" }
2070
2154
  }
2071
2155
  }
2072
2156
  },
2073
- ///////////////////
2074
- // Domain By Name
2075
- ///////////////////
2076
2157
  {
2077
2158
  id: "domain-by-name",
2078
2159
  query: `
2160
+ query DomainByName($name: InterpretedName!) {
2161
+ domain(by: { name: $name }) {
2162
+ canonical { name { beautified } }
2163
+ owner { address }
2164
+ resolve {
2165
+ profile {
2166
+ description
2167
+ addresses {
2168
+ ethereum
2169
+ }
2170
+ }
2171
+ }
2172
+ }
2173
+ }`,
2174
+ variables: {
2175
+ default: { name: "eth" },
2176
+ [ENSNamespaceIds3.SepoliaV2]: { name: SEPOLIA_V2_NAME },
2177
+ [ENSNamespaceIds3.Mainnet]: { name: VITALIK_NAME }
2178
+ }
2179
+ },
2180
+ ////////////////////////////////
2181
+ // Domain By Name Type Condition
2182
+ ////////////////////////////////
2183
+ {
2184
+ id: "domain-by-name-type-condition",
2185
+ query: `
2079
2186
  query DomainByName($name: InterpretedName!) {
2080
2187
  domain(by: {name: $name}) {
2081
2188
  __typename
@@ -2092,7 +2199,7 @@ query DomainByName($name: InterpretedName!) {
2092
2199
  }`,
2093
2200
  variables: {
2094
2201
  default: { name: "eth" },
2095
- [ENSNamespaceIds3.SepoliaV2]: { name: SEPOLIA_V2_TEST_NAME }
2202
+ [ENSNamespaceIds3.SepoliaV2]: { name: SEPOLIA_V2_NAME }
2096
2203
  }
2097
2204
  },
2098
2205
  ///////////////////////
@@ -2136,10 +2243,88 @@ query DomainRegistration($name: InterpretedName!) {
2136
2243
  }
2137
2244
  }`,
2138
2245
  variables: {
2139
- default: { name: "vitalik.eth" },
2140
- [ENSNamespaceIds3.SepoliaV2]: { name: SEPOLIA_V2_NAME_WITH_OWNED_RESOLVER }
2246
+ default: { name: VITALIK_NAME },
2247
+ [ENSNamespaceIds3.SepoliaV2]: { name: SEPOLIA_V2_NAME }
2141
2248
  }
2142
2249
  },
2250
+ ////////////////////
2251
+ // Domain Records
2252
+ ////////////////////
2253
+ {
2254
+ id: "domain-records",
2255
+ query: `
2256
+ query DomainRecords($name: InterpretedName!) {
2257
+ domain(by: {name: $name}) {
2258
+ canonical {
2259
+ name {
2260
+ interpreted
2261
+ }
2262
+ }
2263
+ resolve {
2264
+ records {
2265
+ addresses(coinTypes: [60, 2147483658, 501]) {
2266
+ coinType
2267
+ address
2268
+ }
2269
+ texts(keys: ["description", "avatar", "url", "com.github", "com.twitter"]) {
2270
+ key
2271
+ value
2272
+ }
2273
+ contenthash
2274
+ }
2275
+ }
2276
+ }
2277
+ }`,
2278
+ variables: {
2279
+ default: { name: GREG_NAME },
2280
+ [ENSNamespaceIds3.EnsTestEnv]: {
2281
+ name: DEVNET_NAME_WITH_OWNED_RESOLVER
2282
+ },
2283
+ [ENSNamespaceIds3.SepoliaV2]: {
2284
+ name: SEPOLIA_V2_NAME
2285
+ }
2286
+ }
2287
+ },
2288
+ {
2289
+ id: "domain-profile",
2290
+ query: `
2291
+ query DomainProfile($name: InterpretedName!) {
2292
+ domain(by: {name: $name}) {
2293
+ resolve {
2294
+ profile {
2295
+ description
2296
+ avatar {
2297
+ httpUrl
2298
+ }
2299
+ addresses {
2300
+ ethereum
2301
+ base
2302
+ solana
2303
+ bitcoin
2304
+ rootstock
2305
+ }
2306
+ socials {
2307
+ github {
2308
+ handle
2309
+ httpUrl
2310
+ }
2311
+ twitter {
2312
+ handle
2313
+ httpUrl
2314
+ }
2315
+ }
2316
+ website {
2317
+ httpUrl
2318
+ }
2319
+ header {
2320
+ httpUrl
2321
+ }
2322
+ }
2323
+ }
2324
+ }
2325
+ }`,
2326
+ variables: { default: { name: GREG_NAME } }
2327
+ },
2143
2328
  //////////////////////
2144
2329
  // Domain Subdomains
2145
2330
  //////////////////////
@@ -2149,7 +2334,34 @@ query DomainRegistration($name: InterpretedName!) {
2149
2334
  query DomainSubdomains($name: InterpretedName!) {
2150
2335
  domain(by: {name: $name}) {
2151
2336
  canonical { name { interpreted beautified } }
2152
- subdomains(first: 10) {
2337
+ subdomains(first: 10, order: {
2338
+ by: NAME,
2339
+ dir: ASC
2340
+ }) {
2341
+ edges {
2342
+ node {
2343
+ canonical { name { interpreted beautified } }
2344
+ }
2345
+ }
2346
+ }
2347
+ }
2348
+ }`,
2349
+ variables: {
2350
+ default: { name: "eth" },
2351
+ // in mainnet there is too many subdomains of eth
2352
+ [ENSNamespaceIds3.Mainnet]: { name: "base.eth" }
2353
+ }
2354
+ },
2355
+ ////////////////////////////////////
2356
+ // Most Recently Registered Subdomains
2357
+ ////////////////////////////////////
2358
+ {
2359
+ id: "domain-subdomains-recently-registered",
2360
+ query: `
2361
+ query RecentlyRegisteredSubdomains($name: InterpretedName!) {
2362
+ domain(by: {name: $name}) {
2363
+ canonical { name { interpreted beautified } }
2364
+ subdomains(first: 10, order: {by: REGISTRATION_TIMESTAMP, dir: DESC}) {
2153
2365
  edges {
2154
2366
  node {
2155
2367
  canonical { name { interpreted beautified } }
@@ -2210,7 +2422,7 @@ query DomainEvents($name: InterpretedName!) {
2210
2422
  }`,
2211
2423
  variables: {
2212
2424
  default: { name: "newowner.eth" },
2213
- [ENSNamespaceIds3.SepoliaV2]: { name: "sfmonicdebmig.eth" }
2425
+ [ENSNamespaceIds3.SepoliaV2]: { name: SEPOLIA_V2_NAME }
2214
2426
  }
2215
2427
  },
2216
2428
  ////////////////////
@@ -2236,7 +2448,39 @@ query AccountDomains(
2236
2448
  variables: {
2237
2449
  default: { address: VITALIK_ADDRESS },
2238
2450
  [ENSNamespaceIds3.EnsTestEnv]: { address: accounts.owner.address },
2239
- [ENSNamespaceIds3.SepoliaV2]: { address: SEPOLIA_V2_ADDRESS_WITH_LOT_OF_NAMES }
2451
+ [ENSNamespaceIds3.SepoliaV2]: { address: SEPOLIA_V2_ACCOUNT }
2452
+ }
2453
+ },
2454
+ /////////////////////////
2455
+ // Account Primary Names
2456
+ /////////////////////////
2457
+ {
2458
+ id: "account-primary-name",
2459
+ query: `
2460
+ query AccountPrimaryName($address: Address!) {
2461
+ account(by: { address: $address }) {
2462
+ address
2463
+ resolve {
2464
+ primaryName(by: { chainName: ETHEREUM }) {
2465
+ name { interpreted beautified }
2466
+ resolve {
2467
+ profile {
2468
+ description
2469
+ socials {
2470
+ twitter {
2471
+ httpUrl
2472
+ }
2473
+ }
2474
+ }
2475
+ }
2476
+ }
2477
+ }
2478
+ }
2479
+ }`,
2480
+ variables: {
2481
+ default: { address: VITALIK_ADDRESS },
2482
+ [ENSNamespaceIds3.EnsTestEnv]: { address: accounts.owner.address },
2483
+ [ENSNamespaceIds3.SepoliaV2]: { address: SEPOLIA_V2_ACCOUNT }
2240
2484
  }
2241
2485
  },
2242
2486
  ////////////////////
@@ -2255,7 +2499,7 @@ query AccountEvents(
2255
2499
  variables: {
2256
2500
  default: { address: VITALIK_ADDRESS },
2257
2501
  [ENSNamespaceIds3.EnsTestEnv]: { address: accounts.deployer.address },
2258
- [ENSNamespaceIds3.SepoliaV2]: { address: SEPOLIA_V2_ADDRESS_WITH_LOT_OF_NAMES }
2502
+ [ENSNamespaceIds3.SepoliaV2]: { address: SEPOLIA_V2_ACCOUNT }
2259
2503
  }
2260
2504
  },
2261
2505
  /////////////////////
@@ -2316,8 +2560,8 @@ query PermissionsByContract(
2316
2560
  variables: {
2317
2561
  // TODO: same as above
2318
2562
  default: { contract: ENS_TEST_ENV_V2_ETH_REGISTRAR },
2319
- // TODO: example response is empty for this address on Sepolia V2
2320
- [ENSNamespaceIds3.SepoliaV2]: { contract: SEPOLIA_V2_V2_ETH_REGISTRAR }
2563
+ // the ETHRegistrar holds no EAC permissions on sepolia-v2; the ETHRegistry does
2564
+ [ENSNamespaceIds3.SepoliaV2]: { contract: SEPOLIA_V2_V2_ETH_REGISTRY }
2321
2565
  }
2322
2566
  },
2323
2567
  ////////////////////////
@@ -2340,8 +2584,7 @@ query PermissionsByUser($address: Address!) {
2340
2584
  }`,
2341
2585
  variables: {
2342
2586
  default: { address: accounts.deployer.address },
2343
- // TODO: example response is empty for this address on Sepolia V2
2344
- [ENSNamespaceIds3.SepoliaV2]: { address: SEPOLIA_V2_ADDRESS_WITH_LOT_OF_NAMES }
2587
+ [ENSNamespaceIds3.SepoliaV2]: { address: SEPOLIA_V2_ACCOUNT }
2345
2588
  }
2346
2589
  },
2347
2590
  //////////////////////////////////
@@ -2367,7 +2610,7 @@ query AccountResolverPermissions($address: Address!) {
2367
2610
  }`,
2368
2611
  variables: {
2369
2612
  default: { address: accounts.deployer.address },
2370
- [ENSNamespaceIds3.SepoliaV2]: { address: SEPOLIA_V2_ADDRESS_WITH_LOT_OF_NAMES }
2613
+ [ENSNamespaceIds3.SepoliaV2]: { address: SEPOLIA_V2_ACCOUNT }
2371
2614
  }
2372
2615
  },
2373
2616
  //////////////////////////////
@@ -2380,17 +2623,20 @@ query DomainResolver($name: InterpretedName!) {
2380
2623
  domain(by: { name: $name }) {
2381
2624
  resolver {
2382
2625
  assigned {
2383
- records { edges { node { node keys coinTypes } } }
2384
- permissions { resources { edges { node { resource users { edges { node { user { address } roles } } } } } } }
2385
- events { totalCount edges { node { topics data timestamp } } }
2626
+ contract {
2627
+ address
2628
+ }
2629
+ events(first: 5) {
2630
+ edges { node { topics data timestamp } }
2631
+ }
2386
2632
  }
2387
2633
  }
2388
2634
  }
2389
2635
  }`,
2390
2636
  variables: {
2391
- default: { name: "vitalik.eth" },
2637
+ default: { name: VITALIK_NAME },
2392
2638
  [ENSNamespaceIds3.EnsTestEnv]: { name: DEVNET_NAME_WITH_OWNED_RESOLVER },
2393
- [ENSNamespaceIds3.SepoliaV2]: { name: SEPOLIA_V2_NAME_WITH_OWNED_RESOLVER }
2639
+ [ENSNamespaceIds3.SepoliaV2]: { name: SEPOLIA_V2_NAME }
2394
2640
  }
2395
2641
  },
2396
2642
  ////////////////////////
@@ -2422,7 +2668,7 @@ query ResolverByAddress($contract: AccountIdInput!) {
2422
2668
  }`,
2423
2669
  variables: {
2424
2670
  default: { contract: MAINNET_PUBLIC_RESOLVER },
2425
- [ENSNamespaceIds3.SepoliaV2]: { contract: SEPOLIA_V2_PUBLIC_RESOLVER }
2671
+ [ENSNamespaceIds3.SepoliaV2]: { contract: SEPOLIA_V2_RESOLVER_WITH_RECORDS }
2426
2672
  }
2427
2673
  },
2428
2674
  //////////////
@@ -2432,34 +2678,88 @@ query ResolverByAddress($contract: AccountIdInput!) {
2432
2678
  id: "namegraph",
2433
2679
  query: `
2434
2680
  query Namegraph {
2435
- root {
2436
- id
2437
- domains {
2438
- edges {
2439
- node {
2440
- canonical { name { interpreted beautified } }
2441
-
2442
- subdomains {
2443
- edges {
2444
- node {
2445
- canonical { name { interpreted beautified } }
2446
-
2447
- subdomains {
2448
- edges {
2449
- node {
2450
- canonical { name { interpreted beautified } }
2451
- }
2452
- }
2453
- }
2454
- }
2455
- }
2681
+ domain(by: { name: "eth" }) {
2682
+ registry { id contract { chainId address } }
2683
+ parent { id }
2684
+ subregistry {
2685
+ domains {
2686
+ edges {
2687
+ node {
2688
+ canonical { name { beautified } }
2456
2689
  }
2457
2690
  }
2458
2691
  }
2459
2692
  }
2693
+ subdomains { edges { node { canonical { name { beautified } } } } }
2460
2694
  }
2461
2695
  }`,
2462
2696
  variables: { default: {} }
2697
+ },
2698
+ /////////////////////////////
2699
+ // ENSv1 → ENSv2 Migration
2700
+ /////////////////////////////
2701
+ {
2702
+ id: "account-migrated-names",
2703
+ query: `
2704
+ query AccountMigratedNames($address: Address!) {
2705
+ account(by: { address: $address }) {
2706
+ v1DomainsCount: domains(where: { version: ENSv1 }) { totalCount }
2707
+ v2DomainsCount: domains(where: { version: ENSv2 }) { totalCount }
2708
+ }
2709
+ }`,
2710
+ variables: {
2711
+ default: { address: VITALIK_ADDRESS },
2712
+ [ENSNamespaceIds3.SepoliaV2]: { address: SEPOLIA_V2_ACCOUNT_WITH_V1_AND_V2 }
2713
+ }
2714
+ },
2715
+ {
2716
+ id: "eth-by-version",
2717
+ query: `
2718
+ query GetEthDomains {
2719
+ domains(where: { name: { eq: "eth" } }) {
2720
+ edges {
2721
+ node {
2722
+ __typename
2723
+ id
2724
+ }
2725
+ }
2726
+ }
2727
+ }`,
2728
+ variables: { default: {} }
2729
+ },
2730
+ {
2731
+ id: "accelerate-resolve",
2732
+ query: `
2733
+ query AccelerateResolve($address: Address!) {
2734
+ account(by: { address: $address }) {
2735
+ address
2736
+ resolve(accelerate: true) {
2737
+ trace
2738
+ acceleration {
2739
+ requested
2740
+ attempted
2741
+ }
2742
+ primaryName(by: { chainName: ETHEREUM }) {
2743
+ name { interpreted beautified }
2744
+ resolve {
2745
+ trace
2746
+ acceleration {
2747
+ requested
2748
+ attempted
2749
+ }
2750
+ profile {
2751
+ description
2752
+ }
2753
+ }
2754
+ }
2755
+ }
2756
+ }
2757
+ }`,
2758
+ variables: {
2759
+ default: { address: VITALIK_ADDRESS },
2760
+ [ENSNamespaceIds3.EnsTestEnv]: { address: accounts.owner.address },
2761
+ [ENSNamespaceIds3.SepoliaV2]: { address: SEPOLIA_V2_ACCOUNT_WITH_V1_AND_V2 }
2762
+ }
2463
2763
  }
2464
2764
  ];
2465
2765
  var graphqlApiExampleQueryById = new Map(
@@ -2498,7 +2798,8 @@ async function supportsInterface({
2498
2798
  abi: EIP_165_ABI,
2499
2799
  functionName: "supportsInterface",
2500
2800
  address,
2501
- args: [selector]
2801
+ args: [selector],
2802
+ retryEmptyResponse: false
2502
2803
  });
2503
2804
  } catch {
2504
2805
  return false;
@@ -2907,8 +3208,8 @@ import { isAddressEqual as isAddressEqual4, zeroAddress as zeroAddress5 } from "
2907
3208
  var interpretAddress = (owner) => isAddressEqual4(zeroAddress5, owner) ? null : owner;
2908
3209
 
2909
3210
  // src/shared/interpretation/interpret-record-values.ts
2910
- import { isInterpretedName, toNormalizedAddress as toNormalizedAddress4 } from "enssdk";
2911
- import { isAddress as isAddress2, isAddressEqual as isAddressEqual5, zeroAddress as zeroAddress6 } from "viem";
3211
+ import { isInterpretedName } from "enssdk";
3212
+ import { isHex as isHex2, zeroAddress as zeroAddress6 } from "viem";
2912
3213
 
2913
3214
  // src/shared/null-bytes.ts
2914
3215
  var hasNullByte = (value) => value.indexOf("\0") !== -1;
@@ -2920,12 +3221,11 @@ function interpretNameRecordValue(value) {
2920
3221
  return value;
2921
3222
  }
2922
3223
  function interpretAddressRecordValue(value) {
2923
- if (hasNullByte(value)) return null;
2924
- if (value === "") return null;
2925
3224
  if (value === "0x") return null;
2926
- if (!isAddress2(value, { strict: false })) return value;
2927
- if (isAddressEqual5(value, zeroAddress6)) return null;
2928
- return toNormalizedAddress4(value);
3225
+ if (!isHex2(value, { strict: true })) return null;
3226
+ const normalized = value.toLowerCase();
3227
+ if (normalized === zeroAddress6) return null;
3228
+ return normalized;
2929
3229
  }
2930
3230
  function interpretTextRecordKey(key) {
2931
3231
  if (hasNullByte(key)) return null;
@@ -3117,7 +3417,11 @@ var getManagedName = (namespace, contract) => {
3117
3417
  };
3118
3418
 
3119
3419
  // src/shared/root-registry.ts
3120
- import { makeENSv1RegistryId, makeENSv2RegistryId } from "enssdk";
3420
+ import {
3421
+ makeConcreteRegistryId,
3422
+ makeENSv1RegistryId,
3423
+ makeENSv2RegistryId
3424
+ } from "enssdk";
3121
3425
  import { DatasourceNames as DatasourceNames6 } from "@ensnode/datasources";
3122
3426
  var getENSv1RootRegistry = (namespace) => getDatasourceContract(namespace, DatasourceNames6.ENSRoot, "ENSv1Registry");
3123
3427
 
@@ -3321,6 +3625,7 @@ export {
3321
3625
  makeENSIndexerPublicConfigSchema,
3322
3626
  makeENSIndexerVersionInfoSchema,
3323
3627
  makeENSNamespaceIdSchema,
3628
+ makeEmailSchema,
3324
3629
  makeEnsApiIndexingStatusResponseErrorSchema,
3325
3630
  makeEnsApiIndexingStatusResponseOkSchema,
3326
3631
  makeEnsApiIndexingStatusResponseSchema,