Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/domain-profile-omnigraph.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"ensapi": patch
---

**Omnigraph API:** Introduces `Domain.resolve.profile` and `PrimaryNameRecord.resolve.profile` for resolving semantic record values.
1 change: 1 addition & 0 deletions apps/ensapi/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@
"zod": "catalog:"
},
"devDependencies": {
"@ensnode/integration-test-env": "workspace:*",
"@ensnode/shared-configs": "workspace:*",
"@types/node": "catalog:",
"@types/prismjs": "^1.26.6",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

import { describe, expect, it } from "vitest";

import { accounts } from "@ensnode/datasources/devnet";
import { accounts } from "@ensnode/integration-test-env/devnet";

const BASE_URL = process.env.ENSNODE_URL!;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

import { describe, expect, it } from "vitest";

import { accounts } from "@ensnode/datasources/devnet";
import { accounts } from "@ensnode/integration-test-env/devnet";

const BASE_URL = process.env.ENSNODE_URL!;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,12 @@

import { describe, expect, it } from "vitest";

import { accounts, addresses, fixtures } from "@ensnode/datasources/devnet";
import {
accounts,
addresses,
fixtures,
testEthTextRecords,
} from "@ensnode/integration-test-env/devnet";

const BASE_URL = process.env.ENSNODE_URL!;

Expand Down Expand Up @@ -60,7 +65,9 @@ describe("GET /api/resolve/records/:name", () => {
expected: {
status: 200,
body: {
records: { texts: { description: "test.eth" } },
records: {
texts: { [testEthTextRecords.description.key]: testEthTextRecords.description.value },
},
accelerationRequested: false,
accelerationAttempted: false,
},
Expand Down Expand Up @@ -157,7 +164,7 @@ describe("GET /api/resolve/records/:name", () => {
expected: {
status: 200,
body: {
records: { texts: { avatar: "https://example.com/avatar.png" } },
records: { texts: { [testEthTextRecords.avatar.key]: testEthTextRecords.avatar.value } },
accelerationRequested: false,
accelerationAttempted: false,
},
Expand Down Expand Up @@ -187,8 +194,8 @@ describe("GET /api/resolve/records/:name", () => {
records: {
addresses: {
60: accounts.owner.address,
0: fixtures.bitcoinAddress,
2: fixtures.litecoinAddress,
0: fixtures.rawAddresses.bitcoin.raw,
2: fixtures.rawAddresses.litecoin.raw,
777777: null,
},
},
Expand All @@ -204,7 +211,7 @@ describe("GET /api/resolve/records/:name", () => {
query: [
"name=true",
"addresses=60,0,2",
"texts=avatar,description,url,email,com.twitter,com.github",
"texts=avatar,description,url,email,com.twitter,com.github,com.x,org.telegram",
"contenthash=true",
"pubkey=true",
"version=true",
Expand All @@ -217,16 +224,18 @@ describe("GET /api/resolve/records/:name", () => {
records: {
addresses: {
60: accounts.owner.address,
0: fixtures.bitcoinAddress,
2: fixtures.litecoinAddress,
0: fixtures.rawAddresses.bitcoin.raw,
2: fixtures.rawAddresses.litecoin.raw,
},
texts: {
avatar: "https://example.com/avatar.png",
description: "test.eth",
url: "https://ens.domains",
email: "test@ens.domains",
"com.twitter": "ensdomains",
"com.github": "ensdomains",
[testEthTextRecords.avatar.key]: testEthTextRecords.avatar.value,
[testEthTextRecords.description.key]: testEthTextRecords.description.value,
[testEthTextRecords.url.key]: testEthTextRecords.url.value,
[testEthTextRecords.email.key]: testEthTextRecords.email.value,
[testEthTextRecords.twitter.key]: testEthTextRecords.twitter.value,
[testEthTextRecords.github.key]: testEthTextRecords.github.value,
[testEthTextRecords.x.key]: testEthTextRecords.x.value,
[testEthTextRecords.telegram.key]: testEthTextRecords.telegram.value,
},
contenthash: fixtures.contenthash,
pubkey: {
Expand Down
20 changes: 20 additions & 0 deletions apps/ensapi/src/omnigraph-api/builder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,21 @@ import { AttributeNames, createOpenTelemetryWrapper } from "@pothos/tracing-open
import type {
BeautifiedLabel,
BeautifiedName,
BinanceAddress,
BitcoinAddress,
BitcoinCashAddress,
ChainId,
CoinType,
DogecoinAddress,
DomainId,
Email,
Hex,
InterfaceId,
InterpretedLabel,
InterpretedName,
JsonValue,
LitecoinAddress,
MonacoinAddress,
Node,
NormalizedAddress,
PermissionsId,
Expand All @@ -26,6 +33,9 @@ import type {
RenewalId,
ResolverId,
ResolverRecordsId,
RippleAddress,
RootstockAddress,
SolanaAddress,
} from "enssdk";
import { getNamedType } from "graphql";
import superjson from "superjson";
Expand Down Expand Up @@ -65,6 +75,16 @@ export type BuilderScalars = {
BigInt: { Input: bigint; Output: bigint };
JSON: { Input: JsonValue; Output: JsonValue };
Address: { Input: NormalizedAddress; Output: NormalizedAddress };
Email: { Input: Email; Output: Email };
BitcoinAddress: { Input: BitcoinAddress; Output: BitcoinAddress };
LitecoinAddress: { Input: LitecoinAddress; Output: LitecoinAddress };
DogecoinAddress: { Input: DogecoinAddress; Output: DogecoinAddress };
MonacoinAddress: { Input: MonacoinAddress; Output: MonacoinAddress };
RootstockAddress: { Input: RootstockAddress; Output: RootstockAddress };
RippleAddress: { Input: RippleAddress; Output: RippleAddress };
BitcoinCashAddress: { Input: BitcoinCashAddress; Output: BitcoinCashAddress };
BinanceAddress: { Input: BinanceAddress; Output: BinanceAddress };
SolanaAddress: { Input: SolanaAddress; Output: SolanaAddress };
Hex: { Input: Hex; Output: Hex };
ChainId: { Input: ChainId; Output: ChainId };
CoinType: { Input: CoinType; Output: CoinType };
Expand Down
Loading
Loading