scalar BigInt
scalar JSON
type AddressRecord {
coin: Int!
value: String!
name: String
}
type TextRecord {
key: String!
value: String!
}
type Contenthash {
codec: String!
decoded: String!
encoded: String!
}
type Record {
id: ID!
addresses: [AddressRecord!]!
texts: [TextRecord!]!
contenthash: Contenthash
name: Name
}
type Registration {
id: ID!
price_wei: BigInt!
tx_hash: String!
block_number: BigInt!
registrar_contract: String!
tx_sender: String!
block_timestamp: BigInt!
payment_token: String!
is_self_claim: Boolean!
}
type Name {
id: ID! # node (namehash)
label: String!
full_name: String!
expiry: BigInt!
owner: String!
created_at: BigInt!
records: Record
registration: Registration
}
type Query {
# Fetch a single name by id (node), label, or full name
name(id: ID, label: String, full_name: String): Name
# List names with pagination
names(limit: Int = 25, offset: Int = 0): [Name!]!
# Search by label prefix
searchNames(query: String!, limit: Int = 25, offset: Int = 0): [Name!]!
# Get recent registrations
registrations(limit: Int = 25, offset: Int = 0): [Registration!]!
# Optional derived field to resolve primary name for an address (if available)
primaryName(address: String!): Name
}