Copy import { client } from './client'
import { TEZOS_DOMAINS_WRAPPER_URI , TEZOS_DOMAINS_PLUGIN_JS } from './client'
Get information on a Tezos domains name. This includes a domain's availability, its owner address, subdomains, registraton duration and other metadata.
Copy export const resolveDomainRecords = async (network , domain) => {
return client .query ({
uri : TEZOS_DOMAINS_WRAPPER_URI ,
query : `
query {
resolveDomain(
network: $network,
domain: $domain
)
}
` ,
variables : {
network ,
domain
}
})
}
Fetches the price of a Tezos domain name.
Copy export const getAcquisitionInfo = async (network , domain , days = 365 ) => {
return client .query ({
uri : TEZOS_DOMAINS_PLUGIN_JS ,
query : `
query {
getAcquisitionInfo(
network: $network,
domain: $domain
duration: $days
)
},
` ,
variables : {
network ,
domain ,
days
}
})
}