@ensnode/ensnode-sdk 0.0.0-next-20260610144612 → 0.0.0-next-20260612123740

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
@@ -2214,6 +2214,78 @@ var fixtures = {
2214
2214
  rawAddresses,
2215
2215
  textRecords: testEthTextRecords
2216
2216
  };
2217
+ var contenthashFixtures = {
2218
+ ipfs: "0xe3010170122029f2d17be6139079dc48696d1f582a8530eb9805b561eda517e22a892c7e3f1f",
2219
+ swarm: "0xe40101fa011b20d1de9994b4d039f6548d191eb26786769f580809256b4685ef316805265ea162",
2220
+ ipns: "0xe50101720024080112205cbd1cc86ac20d6640795809c2a185bb2504538a2de8076da5a6971b8acb4715",
2221
+ onion: "0xbc037a716b746c776934666563766f367269",
2222
+ onion3: "0xbd037035336c663537716f7679757677736336786e72707079706c79337674716d376c3670636f626b6d797173696f6679657a6e667535757164",
2223
+ skynet: "0x90b2c60508004007fd43b74149b31aacbbf2784e874d09b086bed15fd54cacff7120cce95372",
2224
+ arweave: "0x90b2ca05cacdf63edf2e0bb4eb5711dd38b0723aca5f3c4ab62ceeb7c1110740833d4894"
2225
+ };
2226
+ var additionallyRegisteredNames = [
2227
+ {
2228
+ type: "ENSv2",
2229
+ name: "contenthash.eth",
2230
+ label: "contenthash",
2231
+ records: {},
2232
+ subnames: [
2233
+ {
2234
+ label: "ipfs",
2235
+ name: "ipfs.contenthash.eth",
2236
+ records: { contenthash: contenthashFixtures.ipfs }
2237
+ },
2238
+ {
2239
+ label: "swarm",
2240
+ name: "swarm.contenthash.eth",
2241
+ records: { contenthash: contenthashFixtures.swarm }
2242
+ },
2243
+ {
2244
+ label: "ipns",
2245
+ name: "ipns.contenthash.eth",
2246
+ records: { contenthash: contenthashFixtures.ipns }
2247
+ },
2248
+ {
2249
+ label: "onion",
2250
+ name: "onion.contenthash.eth",
2251
+ records: { contenthash: contenthashFixtures.onion }
2252
+ },
2253
+ {
2254
+ label: "onion3",
2255
+ name: "onion3.contenthash.eth",
2256
+ records: { contenthash: contenthashFixtures.onion3 }
2257
+ },
2258
+ {
2259
+ label: "skynet",
2260
+ name: "skynet.contenthash.eth",
2261
+ records: { contenthash: contenthashFixtures.skynet }
2262
+ },
2263
+ {
2264
+ label: "arweave",
2265
+ name: "arweave.contenthash.eth",
2266
+ records: { contenthash: contenthashFixtures.arweave }
2267
+ }
2268
+ ]
2269
+ },
2270
+ {
2271
+ type: "ENSv1",
2272
+ name: "legacy-v1-wrapped.eth",
2273
+ label: "legacy-v1-wrapped",
2274
+ wrapped: true
2275
+ },
2276
+ {
2277
+ type: "ENSv1",
2278
+ name: "legacy-v1-unwrapped.eth",
2279
+ label: "legacy-v1-unwrapped",
2280
+ wrapped: false
2281
+ },
2282
+ {
2283
+ type: "ENSv2",
2284
+ name: "emptyrecords.eth",
2285
+ label: "emptyrecords",
2286
+ records: { contenthash: "0x" }
2287
+ }
2288
+ ];
2217
2289
 
2218
2290
  // src/omnigraph-api/example-queries.ts
2219
2291
  var SEPOLIA_V2_V2_ETH_REGISTRY = getDatasourceContract(
@@ -2240,6 +2312,7 @@ var DEVNET_NAME_WITH_OWNED_RESOLVER = (0, import_enssdk9.asInterpretedName)("exa
2240
2312
  var SEPOLIA_V2_NAME = (0, import_enssdk9.asInterpretedName)("roppp.eth");
2241
2313
  var VITALIK_NAME = (0, import_enssdk9.asInterpretedName)("vitalik.eth");
2242
2314
  var GREG_NAME = (0, import_enssdk9.asInterpretedName)("gregskril.eth");
2315
+ var GREG_ADDRESS = (0, import_enssdk9.toNormalizedAddress)("0x179a862703a4adfb29896552df9e307980d19285");
2243
2316
  var OFFCHAIN_NAME = (0, import_enssdk9.asInterpretedName)("patricio.onpoap.eth");
2244
2317
  var MAINNET_PUBLIC_RESOLVER = getDatasourceContract(
2245
2318
  import_datasources5.ENSNamespaceIds.Mainnet,
@@ -2276,7 +2349,7 @@ var GRAPHQL_API_EXAMPLE_QUERIES = [
2276
2349
  name { interpreted beautified }
2277
2350
  resolve {
2278
2351
  # If the account has a primary name on Ethereum (mainnet),
2279
- # forward resolve the interpreted ENS profile of that name in the same query!.
2352
+ # forward resolve the interpreted ENS profile of that name in the same query!
2280
2353
  profile {
2281
2354
  description
2282
2355
  avatar { httpUrl }
@@ -2509,6 +2582,49 @@ query DomainProfile($name: InterpretedName!) {
2509
2582
  }
2510
2583
  }
2511
2584
  }
2585
+ }`,
2586
+ variables: { default: { name: GREG_NAME } }
2587
+ },
2588
+ {
2589
+ id: "domain-profile-and-records",
2590
+ query: `
2591
+ query DomainProfileAndRecords($name: InterpretedName!) {
2592
+ domain(by: { name: $name }) {
2593
+ resolve {
2594
+ profile {
2595
+ avatar {
2596
+ httpUrl
2597
+ }
2598
+ addresses {
2599
+ ethereum
2600
+ solana
2601
+ }
2602
+ socials {
2603
+ github {
2604
+ handle
2605
+ httpUrl
2606
+ }
2607
+ twitter {
2608
+ handle
2609
+ httpUrl
2610
+ }
2611
+ }
2612
+ website {
2613
+ httpUrl
2614
+ }
2615
+ }
2616
+ records {
2617
+ addresses(coinTypes: [60, 501]) {
2618
+ coinType
2619
+ address
2620
+ }
2621
+ texts(keys: ["avatar", "com.twitter", "com.github", "url"]) {
2622
+ key
2623
+ value
2624
+ }
2625
+ }
2626
+ }
2627
+ }
2512
2628
  }`,
2513
2629
  variables: { default: { name: GREG_NAME } }
2514
2630
  },
@@ -2671,9 +2787,34 @@ query AccountDomains(
2671
2787
  // Account Primary Names
2672
2788
  /////////////////////////
2673
2789
  {
2674
- id: "account-primary-name",
2790
+ id: "account-primary-names",
2675
2791
  query: `
2676
- query AccountPrimaryName($address: Address!) {
2792
+ query AccountPrimaryNames($address: Address!) {
2793
+ account(by: { address: $address }) {
2794
+ address
2795
+ resolve {
2796
+ onePrimaryName: primaryName(by: { chainName: OPTIMISM }) {
2797
+ chainName
2798
+ name { interpreted beautified }
2799
+ }
2800
+
2801
+ twoPrimaryNames: primaryNames(where: { chainNames: [ETHEREUM, BASE] }) {
2802
+ chainName
2803
+ name { interpreted beautified }
2804
+ }
2805
+ }
2806
+ }
2807
+ }`,
2808
+ variables: {
2809
+ default: { address: GREG_ADDRESS },
2810
+ [import_datasources5.ENSNamespaceIds.EnsTestEnv]: { address: accounts.owner.address },
2811
+ [import_datasources5.ENSNamespaceIds.SepoliaV2]: { address: SEPOLIA_V2_ACCOUNT }
2812
+ }
2813
+ },
2814
+ {
2815
+ id: "account-primary-name-records",
2816
+ query: `
2817
+ query AccountPrimaryNameRecords($address: Address!) {
2677
2818
  account(by: { address: $address }) {
2678
2819
  address
2679
2820
  resolve {
@@ -2949,23 +3090,14 @@ query GetEthDomains {
2949
3090
  query AccelerateResolve($address: Address!) {
2950
3091
  account(by: { address: $address }) {
2951
3092
  address
2952
- resolve(accelerate: true) {
2953
- trace
2954
- acceleration {
2955
- requested
2956
- attempted
2957
- }
3093
+ # resolve is automatically accelerated. To disable, resolve(accelerate: false)
3094
+ resolve {
3095
+ acceleration { requested attempted }
2958
3096
  primaryName(by: { chainName: ETHEREUM }) {
2959
3097
  name { interpreted beautified }
2960
3098
  resolve {
2961
- trace
2962
- acceleration {
2963
- requested
2964
- attempted
2965
- }
2966
- profile {
2967
- description
2968
- }
3099
+ acceleration { requested attempted }
3100
+ profile { description }
2969
3101
  }
2970
3102
  }
2971
3103
  }