Reference
Name resolution API
One public endpoint: .agent name in, address and owner out. No API key. The explorer and the swap activity feed both run on it.
Resolve a name
curl
curl https://api.autyon.io/api/names/aut
# {
# "name": "aut.agent",
# "address": "0x1526838F2f154a1169c16798deBD2F2Cf1A09576",
# "owner": "0x1526838F2f154a1169c16798deBD2F2Cf1A09576"
# }From JavaScript:
resolve.ts
const res = await fetch('https://api.autyon.io/api/names/aut')
const { name, address, owner } = await res.json()Don't pay against it
The API is a convenience read. If funds move based on a resolved address, resolve on-chain. An HTTP endpoint is a thing that can be wrong, slow, or MITM'd, and the resolver contract can't be. The @autyon/sdk already does it this way: address from the resolver, API only as a cross-check, mismatch aborts the payment.