@ensnode/ensnode-sdk 1.16.0 → 1.17.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.
@@ -1,5 +1,5 @@
1
- import { a as EnsIndexerPublicConfig, r as CurrencyId, i as PriceEth, I as RegistrarActionPricingAvailable, J as RegistrarActionPricingUnknown, p as SerializedPriceEth, N as NamespaceSpecificValue, T as TheGraphFallback, g as PriceDai, h as PriceEnsTokens, j as PriceUsdc } from './namespace-specific-value-BBZET9O0.cjs';
2
- export { a4 as TheGraphCannotFallbackReason, a5 as TheGraphCannotFallbackReasonSchema, a6 as TheGraphFallbackSchema, ad as interpretAddress, ae as interpretAddressRecordValue, af as interpretContenthashValue, ag as interpretDnszonehashValue, ah as interpretNameRecordValue, ai as interpretPubkeyValue, aj as interpretTextRecordKey, ak as interpretTextRecordValue, ap as makeENSApiPublicConfigSchema, aq as makeEnsApiPublicConfigSchema, m as makeErrorResponseSchema, ar as makeSerializedEnsApiPublicConfigSchema } from './namespace-specific-value-BBZET9O0.cjs';
1
+ import { a as EnsIndexerPublicConfig, r as CurrencyId, i as PriceEth, I as RegistrarActionPricingAvailable, J as RegistrarActionPricingUnknown, p as SerializedPriceEth, N as NamespaceSpecificValue, T as TheGraphFallback, g as PriceDai, h as PriceEnsTokens, j as PriceUsdc } from './namespace-specific-value-C9XIUp1F.cjs';
2
+ export { a4 as TheGraphCannotFallbackReason, a5 as TheGraphCannotFallbackReasonSchema, a6 as TheGraphFallbackSchema, ad as interpretAddress, ae as interpretAddressRecordValue, af as interpretContenthashValue, ag as interpretDnszonehashValue, ah as interpretMetadataKey, ai as interpretNameRecordValue, aj as interpretPubkeyValue, ak as interpretTextRecordKey, al as interpretTextRecordValue, aq as makeENSApiPublicConfigSchema, ar as makeEnsApiPublicConfigSchema, m as makeErrorResponseSchema, as as makeSerializedEnsApiPublicConfigSchema } from './namespace-specific-value-C9XIUp1F.cjs';
3
3
  import { z } from 'zod/v4';
4
4
  import * as enssdk from 'enssdk';
5
5
  import { InterpretedName, InterfaceId, Address, ChainId, ChainIdString, AccountId, DomainId, RegistryId } from 'enssdk';
@@ -1,5 +1,5 @@
1
- import { a as EnsIndexerPublicConfig, r as CurrencyId, i as PriceEth, I as RegistrarActionPricingAvailable, J as RegistrarActionPricingUnknown, p as SerializedPriceEth, N as NamespaceSpecificValue, T as TheGraphFallback, g as PriceDai, h as PriceEnsTokens, j as PriceUsdc } from './namespace-specific-value-BBZET9O0.js';
2
- export { a4 as TheGraphCannotFallbackReason, a5 as TheGraphCannotFallbackReasonSchema, a6 as TheGraphFallbackSchema, ad as interpretAddress, ae as interpretAddressRecordValue, af as interpretContenthashValue, ag as interpretDnszonehashValue, ah as interpretNameRecordValue, ai as interpretPubkeyValue, aj as interpretTextRecordKey, ak as interpretTextRecordValue, ap as makeENSApiPublicConfigSchema, aq as makeEnsApiPublicConfigSchema, m as makeErrorResponseSchema, ar as makeSerializedEnsApiPublicConfigSchema } from './namespace-specific-value-BBZET9O0.js';
1
+ import { a as EnsIndexerPublicConfig, r as CurrencyId, i as PriceEth, I as RegistrarActionPricingAvailable, J as RegistrarActionPricingUnknown, p as SerializedPriceEth, N as NamespaceSpecificValue, T as TheGraphFallback, g as PriceDai, h as PriceEnsTokens, j as PriceUsdc } from './namespace-specific-value-C9XIUp1F.js';
2
+ export { a4 as TheGraphCannotFallbackReason, a5 as TheGraphCannotFallbackReasonSchema, a6 as TheGraphFallbackSchema, ad as interpretAddress, ae as interpretAddressRecordValue, af as interpretContenthashValue, ag as interpretDnszonehashValue, ah as interpretMetadataKey, ai as interpretNameRecordValue, aj as interpretPubkeyValue, ak as interpretTextRecordKey, al as interpretTextRecordValue, aq as makeENSApiPublicConfigSchema, ar as makeEnsApiPublicConfigSchema, m as makeErrorResponseSchema, as as makeSerializedEnsApiPublicConfigSchema } from './namespace-specific-value-C9XIUp1F.js';
3
3
  import { z } from 'zod/v4';
4
4
  import * as enssdk from 'enssdk';
5
5
  import { InterpretedName, InterfaceId, Address, ChainId, ChainIdString, AccountId, DomainId, RegistryId } from 'enssdk';
package/dist/internal.js CHANGED
@@ -3028,6 +3028,27 @@ var fixtures = {
3028
3028
  rawAddresses,
3029
3029
  textRecords: testEthTextRecords
3030
3030
  };
3031
+ var efpSeedTargets = {
3032
+ /** ADD + ADD_TAG("block") + ADD_TAG("block") -> tags === ["block"] (dedup). */
3033
+ dedup: asNormalizedAddress(`0x${"d1".repeat(20)}`),
3034
+ /** ADD + ADD_TAG("vip") + REMOVE + ADD -> record present, tags === [] (embed cascade + fresh). */
3035
+ cascade: asNormalizedAddress(`0x${"ca".repeat(20)}`),
3036
+ /** ADD + REMOVE(target + junk) -> record gone (canonical 22-byte keying). */
3037
+ junk: asNormalizedAddress(`0x${"1c".repeat(20)}`),
3038
+ /** Anchors a list whose `user` role must survive a storage-location re-point away and back. */
3039
+ durable: asNormalizedAddress(`0x${"d0".repeat(20)}`),
3040
+ /** Followed plainly by the validated {@link efpFollowActorAddress} list — a real follow. */
3041
+ followPlain: asNormalizedAddress(`0x${"f0".repeat(20)}`),
3042
+ /** Followed but `block`-tagged by that list — excluded from `following` / `followers`. */
3043
+ followBlocked: asNormalizedAddress(`0x${"fb".repeat(20)}`)
3044
+ };
3045
+ var efpSeedRoleUser = asNormalizedAddress(`0x${"ab".repeat(20)}`);
3046
+ var efpSeedActorAddress = asNormalizedAddress(
3047
+ "0x976ea74026e726554db657fa54763abd0c3a0aa9"
3048
+ );
3049
+ var efpFollowActorAddress = asNormalizedAddress(
3050
+ "0x14dc79964da2c08b23698b3d3cc7ca32193d9955"
3051
+ );
3031
3052
  var contenthashFixtures = {
3032
3053
  // CIDv0 input — decodes back to CIDv1
3033
3054
  ipfs: getRawContenthash("ipfs", "QmRAQB6YaCyidP37UdDnjFY5vQuiBrcqdyoW1CuDgwxkD4"),
@@ -3077,6 +3098,7 @@ var SEPOLIA_V2_ACCOUNT_WITH_V1_AND_V2 = toNormalizedAddress4(
3077
3098
  var DEVNET_NAME_WITH_OWNED_RESOLVER = asInterpretedName("example.eth");
3078
3099
  var SEPOLIA_V2_NAME = asInterpretedName("roppp.eth");
3079
3100
  var VITALIK_NAME = asInterpretedName("vitalik.eth");
3101
+ var DPERRI_DNS_NAME = asInterpretedName("dperri.com");
3080
3102
  var GREG_NAME = asInterpretedName("gregskril.eth");
3081
3103
  var GREG_ADDRESS = toNormalizedAddress4("0x179a862703a4adfb29896552df9e307980d19285");
3082
3104
  var OFFCHAIN_NAME = asInterpretedName("patricio.onpoap.eth");
@@ -3130,7 +3152,9 @@ var GRAPHQL_API_EXAMPLE_QUERIES = [
3130
3152
  }
3131
3153
 
3132
3154
  # Also load the count of ENSv1 and ENSv2 domains owned by the account
3133
- # to see if they have domains they should upgrade to ENSv2
3155
+ # to see if they have domains they should upgrade to ENSv2.
3156
+ # For simplicity this example query doesn't include additional logic
3157
+ # to filter out domains that have expired.
3134
3158
  v1DomainsCount: domains(where: { version: ENSv1 }) { totalCount }
3135
3159
  v2DomainsCount: domains(where: { version: ENSv2 }) { totalCount }
3136
3160
  }
@@ -3559,11 +3583,16 @@ query AccountPrimaryNames($address: Address!) {
3559
3583
  account(by: { address: $address }) {
3560
3584
  address
3561
3585
  resolve {
3586
+ # Reverse resolution: given this address + a chain, get the primary
3587
+ # name the address has set for that chain.
3588
+ # primaryName returns the result for a single chain (here, Optimism).
3589
+ # (onePrimaryName / twoPrimaryNames are just GraphQL aliases.)
3562
3590
  onePrimaryName: primaryName(by: { chainName: OPTIMISM }) {
3563
3591
  chainName
3564
3592
  name { interpreted beautified }
3565
3593
  }
3566
3594
 
3595
+ # primaryNames returns one result per requested chain, in a single call.
3567
3596
  twoPrimaryNames: primaryNames(where: { chainNames: [ETHEREUM, BASE] }) {
3568
3597
  chainName
3569
3598
  name { interpreted beautified }
@@ -3745,19 +3774,20 @@ query AccountResolverPermissions($address: Address!) {
3745
3774
  query DomainResolver($name: InterpretedName!) {
3746
3775
  domain(by: { name: $name }) {
3747
3776
  resolver {
3777
+ # the Resolver explicitly assigned to this Domain
3748
3778
  assigned {
3749
- contract {
3750
- address
3751
- }
3752
- events(first: 5) {
3753
- edges { node { topics data timestamp } }
3754
- }
3779
+ contract { address }
3780
+ }
3781
+ # the Resolver that ENS Forward Resolution (ENSIP-10) actually lands
3782
+ # on for this Domain \u2014 i.e. its effective Resolver
3783
+ effective {
3784
+ contract { address }
3755
3785
  }
3756
3786
  }
3757
3787
  }
3758
3788
  }`,
3759
3789
  variables: {
3760
- default: { name: VITALIK_NAME },
3790
+ default: { name: DPERRI_DNS_NAME },
3761
3791
  [ENSNamespaceIds3.EnsTestEnv]: { name: DEVNET_NAME_WITH_OWNED_RESOLVER },
3762
3792
  [ENSNamespaceIds3.SepoliaV2]: { name: SEPOLIA_V2_NAME }
3763
3793
  }
@@ -3826,6 +3856,9 @@ query Namegraph {
3826
3856
  query: `
3827
3857
  query AccountMigratedNames($address: Address!) {
3828
3858
  account(by: { address: $address }) {
3859
+ # Count the ENSv1 and ENSv2 domains owned by the account.
3860
+ # For simplicity this example query doesn't include additional logic
3861
+ # to filter out domains that have expired.
3829
3862
  v1DomainsCount: domains(where: { version: ENSv1 }) { totalCount }
3830
3863
  v2DomainsCount: domains(where: { version: ENSv2 }) { totalCount }
3831
3864
  }
@@ -4346,6 +4379,10 @@ function interpretTextRecordKey(key) {
4346
4379
  if (key === "") return null;
4347
4380
  return key;
4348
4381
  }
4382
+ function interpretMetadataKey(key) {
4383
+ if (hasNullByte(key)) return null;
4384
+ return key;
4385
+ }
4349
4386
  function interpretTextRecordValue(value) {
4350
4387
  if (hasNullByte(value)) return null;
4351
4388
  if (value === "") return null;
@@ -4701,6 +4738,7 @@ export {
4701
4738
  interpretAddressRecordValue,
4702
4739
  interpretContenthashValue,
4703
4740
  interpretDnszonehashValue,
4741
+ interpretMetadataKey,
4704
4742
  interpretNameRecordValue,
4705
4743
  interpretPubkeyValue,
4706
4744
  interpretTextRecordKey,