@ensnode/ensnode-sdk 0.0.0-next-20260605230916 → 0.0.0-next-20260606114511
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 +184 -71
- package/dist/internal.cjs.map +1 -1
- package/dist/internal.js +184 -71
- package/dist/internal.js.map +1 -1
- package/package.json +5 -5
package/dist/internal.cjs
CHANGED
|
@@ -2238,6 +2238,8 @@ var SEPOLIA_V2_ACCOUNT_WITH_V1_AND_V2 = (0, import_enssdk9.toNormalizedAddress)(
|
|
|
2238
2238
|
);
|
|
2239
2239
|
var DEVNET_NAME_WITH_OWNED_RESOLVER = (0, import_enssdk9.asInterpretedName)("example.eth");
|
|
2240
2240
|
var SEPOLIA_V2_NAME = (0, import_enssdk9.asInterpretedName)("roppp.eth");
|
|
2241
|
+
var VITALIK_NAME = (0, import_enssdk9.asInterpretedName)("vitalik.eth");
|
|
2242
|
+
var GREG_NAME = (0, import_enssdk9.asInterpretedName)("gregskril.eth");
|
|
2241
2243
|
var MAINNET_PUBLIC_RESOLVER = getDatasourceContract(
|
|
2242
2244
|
import_datasources5.ENSNamespaceIds.Mainnet,
|
|
2243
2245
|
import_datasources5.DatasourceNames.ReverseResolverRoot,
|
|
@@ -2260,18 +2262,44 @@ var GRAPHQL_API_EXAMPLE_QUERIES = [
|
|
|
2260
2262
|
////////////////
|
|
2261
2263
|
{
|
|
2262
2264
|
id: "hello-world",
|
|
2263
|
-
query:
|
|
2264
|
-
#
|
|
2265
|
-
|
|
2266
|
-
|
|
2267
|
-
#
|
|
2268
|
-
#
|
|
2269
|
-
|
|
2270
|
-
#
|
|
2271
|
-
|
|
2272
|
-
|
|
2265
|
+
query: `query HelloWorld($address: Address!) {
|
|
2266
|
+
# Lookup an Account by address.
|
|
2267
|
+
account(by: { address: $address }) {
|
|
2268
|
+
resolve {
|
|
2269
|
+
# Reverse resolve the ENS primary name of the account
|
|
2270
|
+
# using a convenient ETHEREUM alias for mainnet.
|
|
2271
|
+
primaryName(by: { chainName: ETHEREUM }) {
|
|
2272
|
+
# Get the regular interpreted variant of the primary name
|
|
2273
|
+
# and also the special beautified variant that optimizes names
|
|
2274
|
+
# containing special characters such as emojis for proper display in interfaces.
|
|
2275
|
+
name { interpreted beautified }
|
|
2276
|
+
resolve {
|
|
2277
|
+
# If the account has a primary name on Ethereum (mainnet),
|
|
2278
|
+
# forward resolve the interpreted ENS profile of that name in the same query!.
|
|
2279
|
+
profile {
|
|
2280
|
+
description
|
|
2281
|
+
avatar { httpUrl }
|
|
2282
|
+
addresses { ethereum bitcoin }
|
|
2283
|
+
socials {
|
|
2284
|
+
twitter { handle httpUrl }
|
|
2285
|
+
github { handle httpUrl }
|
|
2286
|
+
}
|
|
2287
|
+
}
|
|
2288
|
+
}
|
|
2289
|
+
}
|
|
2290
|
+
}
|
|
2291
|
+
|
|
2292
|
+
# Also load the count of ENSv1 and ENSv2 domains owned by the account
|
|
2293
|
+
# to see if they have domains they should upgrade to ENSv2
|
|
2294
|
+
v1DomainsCount: domains(where: { version: ENSv1 }) { totalCount }
|
|
2295
|
+
v2DomainsCount: domains(where: { version: ENSv2 }) { totalCount }
|
|
2296
|
+
}
|
|
2273
2297
|
}`,
|
|
2274
|
-
variables: {
|
|
2298
|
+
variables: {
|
|
2299
|
+
default: { address: VITALIK_ADDRESS },
|
|
2300
|
+
[import_datasources5.ENSNamespaceIds.EnsTestEnv]: { address: accounts.owner.address },
|
|
2301
|
+
[import_datasources5.ENSNamespaceIds.SepoliaV2]: { address: SEPOLIA_V2_ACCOUNT_WITH_V1_AND_V2 }
|
|
2302
|
+
}
|
|
2275
2303
|
},
|
|
2276
2304
|
/////////////////
|
|
2277
2305
|
// Find Domains
|
|
@@ -2312,12 +2340,35 @@ query FindDomains(
|
|
|
2312
2340
|
}
|
|
2313
2341
|
}
|
|
2314
2342
|
},
|
|
2315
|
-
///////////////////
|
|
2316
|
-
// Domain By Name
|
|
2317
|
-
///////////////////
|
|
2318
2343
|
{
|
|
2319
2344
|
id: "domain-by-name",
|
|
2320
2345
|
query: `
|
|
2346
|
+
query DomainByName($name: InterpretedName!) {
|
|
2347
|
+
domain(by: { name: $name }) {
|
|
2348
|
+
canonical { name { beautified } }
|
|
2349
|
+
owner { address }
|
|
2350
|
+
resolve {
|
|
2351
|
+
profile {
|
|
2352
|
+
description
|
|
2353
|
+
addresses {
|
|
2354
|
+
ethereum
|
|
2355
|
+
}
|
|
2356
|
+
}
|
|
2357
|
+
}
|
|
2358
|
+
}
|
|
2359
|
+
}`,
|
|
2360
|
+
variables: {
|
|
2361
|
+
default: { name: "eth" },
|
|
2362
|
+
[import_datasources5.ENSNamespaceIds.SepoliaV2]: { name: SEPOLIA_V2_NAME },
|
|
2363
|
+
[import_datasources5.ENSNamespaceIds.Mainnet]: { name: VITALIK_NAME }
|
|
2364
|
+
}
|
|
2365
|
+
},
|
|
2366
|
+
////////////////////////////////
|
|
2367
|
+
// Domain By Name Type Condition
|
|
2368
|
+
////////////////////////////////
|
|
2369
|
+
{
|
|
2370
|
+
id: "domain-by-name-type-condition",
|
|
2371
|
+
query: `
|
|
2321
2372
|
query DomainByName($name: InterpretedName!) {
|
|
2322
2373
|
domain(by: {name: $name}) {
|
|
2323
2374
|
__typename
|
|
@@ -2378,7 +2429,7 @@ query DomainRegistration($name: InterpretedName!) {
|
|
|
2378
2429
|
}
|
|
2379
2430
|
}`,
|
|
2380
2431
|
variables: {
|
|
2381
|
-
default: { name:
|
|
2432
|
+
default: { name: VITALIK_NAME },
|
|
2382
2433
|
[import_datasources5.ENSNamespaceIds.SepoliaV2]: { name: SEPOLIA_V2_NAME }
|
|
2383
2434
|
}
|
|
2384
2435
|
},
|
|
@@ -2388,21 +2439,30 @@ query DomainRegistration($name: InterpretedName!) {
|
|
|
2388
2439
|
{
|
|
2389
2440
|
id: "domain-records",
|
|
2390
2441
|
query: `
|
|
2391
|
-
query DomainRecords(
|
|
2392
|
-
|
|
2393
|
-
|
|
2394
|
-
|
|
2395
|
-
|
|
2442
|
+
query DomainRecords($name: InterpretedName!) {
|
|
2443
|
+
domain(by: {name: $name}) {
|
|
2444
|
+
canonical {
|
|
2445
|
+
name {
|
|
2446
|
+
interpreted
|
|
2447
|
+
}
|
|
2448
|
+
}
|
|
2396
2449
|
resolve {
|
|
2397
2450
|
records {
|
|
2398
|
-
addresses(coinTypes: [60]) {
|
|
2399
|
-
|
|
2451
|
+
addresses(coinTypes: [60, 2147483658, 501]) {
|
|
2452
|
+
coinType
|
|
2453
|
+
address
|
|
2454
|
+
}
|
|
2455
|
+
texts(keys: ["description", "avatar", "url", "com.github", "com.twitter"]) {
|
|
2456
|
+
key
|
|
2457
|
+
value
|
|
2458
|
+
}
|
|
2459
|
+
contenthash
|
|
2400
2460
|
}
|
|
2401
2461
|
}
|
|
2402
2462
|
}
|
|
2403
2463
|
}`,
|
|
2404
2464
|
variables: {
|
|
2405
|
-
default: { name:
|
|
2465
|
+
default: { name: GREG_NAME },
|
|
2406
2466
|
[import_datasources5.ENSNamespaceIds.EnsTestEnv]: {
|
|
2407
2467
|
name: DEVNET_NAME_WITH_OWNED_RESOLVER
|
|
2408
2468
|
},
|
|
@@ -2411,6 +2471,46 @@ query DomainRecords(
|
|
|
2411
2471
|
}
|
|
2412
2472
|
}
|
|
2413
2473
|
},
|
|
2474
|
+
{
|
|
2475
|
+
id: "domain-profile",
|
|
2476
|
+
query: `
|
|
2477
|
+
query DomainProfile($name: InterpretedName!) {
|
|
2478
|
+
domain(by: {name: $name}) {
|
|
2479
|
+
resolve {
|
|
2480
|
+
profile {
|
|
2481
|
+
description
|
|
2482
|
+
avatar {
|
|
2483
|
+
httpUrl
|
|
2484
|
+
}
|
|
2485
|
+
addresses {
|
|
2486
|
+
ethereum
|
|
2487
|
+
base
|
|
2488
|
+
solana
|
|
2489
|
+
bitcoin
|
|
2490
|
+
rootstock
|
|
2491
|
+
}
|
|
2492
|
+
socials {
|
|
2493
|
+
github {
|
|
2494
|
+
handle
|
|
2495
|
+
httpUrl
|
|
2496
|
+
}
|
|
2497
|
+
twitter {
|
|
2498
|
+
handle
|
|
2499
|
+
httpUrl
|
|
2500
|
+
}
|
|
2501
|
+
}
|
|
2502
|
+
website {
|
|
2503
|
+
httpUrl
|
|
2504
|
+
}
|
|
2505
|
+
header {
|
|
2506
|
+
httpUrl
|
|
2507
|
+
}
|
|
2508
|
+
}
|
|
2509
|
+
}
|
|
2510
|
+
}
|
|
2511
|
+
}`,
|
|
2512
|
+
variables: { default: { name: GREG_NAME } }
|
|
2513
|
+
},
|
|
2414
2514
|
//////////////////////
|
|
2415
2515
|
// Domain Subdomains
|
|
2416
2516
|
//////////////////////
|
|
@@ -2420,7 +2520,10 @@ query DomainRecords(
|
|
|
2420
2520
|
query DomainSubdomains($name: InterpretedName!) {
|
|
2421
2521
|
domain(by: {name: $name}) {
|
|
2422
2522
|
canonical { name { interpreted beautified } }
|
|
2423
|
-
subdomains(first: 10
|
|
2523
|
+
subdomains(first: 10, order: {
|
|
2524
|
+
by: NAME,
|
|
2525
|
+
dir: ASC
|
|
2526
|
+
}) {
|
|
2424
2527
|
edges {
|
|
2425
2528
|
node {
|
|
2426
2529
|
canonical { name { interpreted beautified } }
|
|
@@ -2429,7 +2532,11 @@ query DomainSubdomains($name: InterpretedName!) {
|
|
|
2429
2532
|
}
|
|
2430
2533
|
}
|
|
2431
2534
|
}`,
|
|
2432
|
-
variables: {
|
|
2535
|
+
variables: {
|
|
2536
|
+
default: { name: "eth" },
|
|
2537
|
+
// in mainnet there is too many subdomains of eth
|
|
2538
|
+
[import_datasources5.ENSNamespaceIds.Mainnet]: { name: "base.eth" }
|
|
2539
|
+
}
|
|
2433
2540
|
},
|
|
2434
2541
|
////////////////////////////////////
|
|
2435
2542
|
// Most Recently Registered Subdomains
|
|
@@ -2534,21 +2641,21 @@ query AccountDomains(
|
|
|
2534
2641
|
// Account Primary Names
|
|
2535
2642
|
/////////////////////////
|
|
2536
2643
|
{
|
|
2537
|
-
id: "account-primary-
|
|
2644
|
+
id: "account-primary-name",
|
|
2538
2645
|
query: `
|
|
2539
|
-
query
|
|
2646
|
+
query AccountPrimaryName($address: Address!) {
|
|
2540
2647
|
account(by: { address: $address }) {
|
|
2541
2648
|
address
|
|
2542
2649
|
resolve {
|
|
2543
|
-
|
|
2544
|
-
coinType
|
|
2545
|
-
chainName
|
|
2650
|
+
primaryName(by: { chainName: ETHEREUM }) {
|
|
2546
2651
|
name { interpreted beautified }
|
|
2547
2652
|
resolve {
|
|
2548
|
-
|
|
2549
|
-
|
|
2550
|
-
|
|
2551
|
-
|
|
2653
|
+
profile {
|
|
2654
|
+
description
|
|
2655
|
+
socials {
|
|
2656
|
+
twitter {
|
|
2657
|
+
httpUrl
|
|
2658
|
+
}
|
|
2552
2659
|
}
|
|
2553
2660
|
}
|
|
2554
2661
|
}
|
|
@@ -2702,15 +2809,18 @@ query DomainResolver($name: InterpretedName!) {
|
|
|
2702
2809
|
domain(by: { name: $name }) {
|
|
2703
2810
|
resolver {
|
|
2704
2811
|
assigned {
|
|
2705
|
-
|
|
2706
|
-
|
|
2707
|
-
|
|
2812
|
+
contract {
|
|
2813
|
+
address
|
|
2814
|
+
}
|
|
2815
|
+
events(first: 5) {
|
|
2816
|
+
edges { node { topics data timestamp } }
|
|
2817
|
+
}
|
|
2708
2818
|
}
|
|
2709
2819
|
}
|
|
2710
2820
|
}
|
|
2711
2821
|
}`,
|
|
2712
2822
|
variables: {
|
|
2713
|
-
default: { name:
|
|
2823
|
+
default: { name: VITALIK_NAME },
|
|
2714
2824
|
[import_datasources5.ENSNamespaceIds.EnsTestEnv]: { name: DEVNET_NAME_WITH_OWNED_RESOLVER },
|
|
2715
2825
|
[import_datasources5.ENSNamespaceIds.SepoliaV2]: { name: SEPOLIA_V2_NAME }
|
|
2716
2826
|
}
|
|
@@ -2754,31 +2864,19 @@ query ResolverByAddress($contract: AccountIdInput!) {
|
|
|
2754
2864
|
id: "namegraph",
|
|
2755
2865
|
query: `
|
|
2756
2866
|
query Namegraph {
|
|
2757
|
-
|
|
2758
|
-
id
|
|
2759
|
-
|
|
2760
|
-
|
|
2761
|
-
|
|
2762
|
-
|
|
2763
|
-
|
|
2764
|
-
|
|
2765
|
-
edges {
|
|
2766
|
-
node {
|
|
2767
|
-
canonical { name { interpreted beautified } }
|
|
2768
|
-
|
|
2769
|
-
subdomains {
|
|
2770
|
-
edges {
|
|
2771
|
-
node {
|
|
2772
|
-
canonical { name { interpreted beautified } }
|
|
2773
|
-
}
|
|
2774
|
-
}
|
|
2775
|
-
}
|
|
2776
|
-
}
|
|
2777
|
-
}
|
|
2867
|
+
domain(by: { name: "eth" }) {
|
|
2868
|
+
registry { id contract { chainId address } }
|
|
2869
|
+
parent { id }
|
|
2870
|
+
subregistry {
|
|
2871
|
+
domains {
|
|
2872
|
+
edges {
|
|
2873
|
+
node {
|
|
2874
|
+
canonical { name { beautified } }
|
|
2778
2875
|
}
|
|
2779
2876
|
}
|
|
2780
2877
|
}
|
|
2781
2878
|
}
|
|
2879
|
+
subdomains { edges { node { canonical { name { beautified } } } } }
|
|
2782
2880
|
}
|
|
2783
2881
|
}`,
|
|
2784
2882
|
variables: { default: {} }
|
|
@@ -2816,23 +2914,38 @@ query GetEthDomains {
|
|
|
2816
2914
|
variables: { default: {} }
|
|
2817
2915
|
},
|
|
2818
2916
|
{
|
|
2819
|
-
id: "
|
|
2917
|
+
id: "accelerate-resolve",
|
|
2820
2918
|
query: `
|
|
2821
|
-
query
|
|
2822
|
-
|
|
2823
|
-
|
|
2824
|
-
|
|
2825
|
-
|
|
2826
|
-
|
|
2827
|
-
|
|
2828
|
-
|
|
2829
|
-
|
|
2830
|
-
|
|
2919
|
+
query AccelerateResolve($address: Address!) {
|
|
2920
|
+
account(by: { address: $address }) {
|
|
2921
|
+
address
|
|
2922
|
+
resolve(accelerate: true) {
|
|
2923
|
+
trace
|
|
2924
|
+
acceleration {
|
|
2925
|
+
requested
|
|
2926
|
+
attempted
|
|
2927
|
+
}
|
|
2928
|
+
primaryName(by: { chainName: ETHEREUM }) {
|
|
2929
|
+
name { interpreted beautified }
|
|
2930
|
+
resolve {
|
|
2931
|
+
trace
|
|
2932
|
+
acceleration {
|
|
2933
|
+
requested
|
|
2934
|
+
attempted
|
|
2935
|
+
}
|
|
2936
|
+
profile {
|
|
2937
|
+
description
|
|
2938
|
+
}
|
|
2939
|
+
}
|
|
2831
2940
|
}
|
|
2832
2941
|
}
|
|
2833
2942
|
}
|
|
2834
2943
|
}`,
|
|
2835
|
-
variables: {
|
|
2944
|
+
variables: {
|
|
2945
|
+
default: { address: VITALIK_ADDRESS },
|
|
2946
|
+
[import_datasources5.ENSNamespaceIds.EnsTestEnv]: { address: accounts.owner.address },
|
|
2947
|
+
[import_datasources5.ENSNamespaceIds.SepoliaV2]: { address: SEPOLIA_V2_ACCOUNT_WITH_V1_AND_V2 }
|
|
2948
|
+
}
|
|
2836
2949
|
}
|
|
2837
2950
|
];
|
|
2838
2951
|
var graphqlApiExampleQueryById = new Map(
|