@ensnode/ensnode-sdk 0.0.0-next-20260619184733 → 0.0.0-next-20260619185655
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 +18 -7
- package/dist/internal.cjs.map +1 -1
- package/dist/internal.js +18 -7
- package/dist/internal.js.map +1 -1
- package/package.json +5 -5
package/dist/internal.cjs
CHANGED
|
@@ -3316,7 +3316,9 @@ var GRAPHQL_API_EXAMPLE_QUERIES = [
|
|
|
3316
3316
|
}
|
|
3317
3317
|
|
|
3318
3318
|
# Also load the count of ENSv1 and ENSv2 domains owned by the account
|
|
3319
|
-
# to see if they have domains they should upgrade to ENSv2
|
|
3319
|
+
# to see if they have domains they should upgrade to ENSv2.
|
|
3320
|
+
# For simplicity this example query doesn't include additional logic
|
|
3321
|
+
# to filter out domains that have expired.
|
|
3320
3322
|
v1DomainsCount: domains(where: { version: ENSv1 }) { totalCount }
|
|
3321
3323
|
v2DomainsCount: domains(where: { version: ENSv2 }) { totalCount }
|
|
3322
3324
|
}
|
|
@@ -3745,11 +3747,16 @@ query AccountPrimaryNames($address: Address!) {
|
|
|
3745
3747
|
account(by: { address: $address }) {
|
|
3746
3748
|
address
|
|
3747
3749
|
resolve {
|
|
3750
|
+
# Reverse resolution: given this address + a chain, get the primary
|
|
3751
|
+
# name the address has set for that chain.
|
|
3752
|
+
# primaryName returns the result for a single chain (here, Optimism).
|
|
3753
|
+
# (onePrimaryName / twoPrimaryNames are just GraphQL aliases.)
|
|
3748
3754
|
onePrimaryName: primaryName(by: { chainName: OPTIMISM }) {
|
|
3749
3755
|
chainName
|
|
3750
3756
|
name { interpreted beautified }
|
|
3751
3757
|
}
|
|
3752
3758
|
|
|
3759
|
+
# primaryNames returns one result per requested chain, in a single call.
|
|
3753
3760
|
twoPrimaryNames: primaryNames(where: { chainNames: [ETHEREUM, BASE] }) {
|
|
3754
3761
|
chainName
|
|
3755
3762
|
name { interpreted beautified }
|
|
@@ -3931,13 +3938,14 @@ query AccountResolverPermissions($address: Address!) {
|
|
|
3931
3938
|
query DomainResolver($name: InterpretedName!) {
|
|
3932
3939
|
domain(by: { name: $name }) {
|
|
3933
3940
|
resolver {
|
|
3941
|
+
# the Resolver explicitly assigned to this Domain
|
|
3934
3942
|
assigned {
|
|
3935
|
-
contract {
|
|
3936
|
-
|
|
3937
|
-
|
|
3938
|
-
|
|
3939
|
-
|
|
3940
|
-
}
|
|
3943
|
+
contract { address }
|
|
3944
|
+
}
|
|
3945
|
+
# the Resolver that ENS Forward Resolution (ENSIP-10) actually lands
|
|
3946
|
+
# on for this Domain \u2014 i.e. its effective Resolver
|
|
3947
|
+
effective {
|
|
3948
|
+
contract { address }
|
|
3941
3949
|
}
|
|
3942
3950
|
}
|
|
3943
3951
|
}
|
|
@@ -4012,6 +4020,9 @@ query Namegraph {
|
|
|
4012
4020
|
query: `
|
|
4013
4021
|
query AccountMigratedNames($address: Address!) {
|
|
4014
4022
|
account(by: { address: $address }) {
|
|
4023
|
+
# Count the ENSv1 and ENSv2 domains owned by the account.
|
|
4024
|
+
# For simplicity this example query doesn't include additional logic
|
|
4025
|
+
# to filter out domains that have expired.
|
|
4015
4026
|
v1DomainsCount: domains(where: { version: ENSv1 }) { totalCount }
|
|
4016
4027
|
v2DomainsCount: domains(where: { version: ENSv2 }) { totalCount }
|
|
4017
4028
|
}
|