Look up a Carrier address from a beagles.eth name
Read a Beagle user's Carrier address and userid from their beagles.eth name with an ordinary ENS library on Ethereum mainnet. No Beagle API and no key.
November 2026What you get
A Beagle user can register a name such as help.beagles.eth. Its public record carries the user's Carrier address, so anyone who knows the name can send them a friend request. Read it with any ENS library that supports CCIP-Read: viem 2.35 or later, or ethers 6.17 or later.
| Text key | What it is |
|---|---|
carrierAddress | The Carrier address: the long form, which a friend request needs |
carrierUserId | The userid: the short form, used for messages once you are friends |
alias | The display name, such as Beagle Chat Help |
avatar | An image URL. For a chosen CryptoPunk, a PNG on larvalabs.com. Empty when the user set none. |
A bound Solana wallet is an address record, not a text key: getEnsAddress({ name, coinType: 501n }). ENS returns the 32-byte public key as hex; base58-encode it for the usual Solana form.
How the lookup works
ENS does not store these values, and the code below names no Beagle server. Each lookup goes like this:
The client asks the ENS registry on Ethereum mainnet which resolver serves the name. For *.beagles.eth it is the Beagle resolver, 0x71B81d547de647D94a1892817c2Bc9BC93c5bAdd.
The resolver holds no profile data. It answers with an EIP-3668 (CCIP-Read) redirect to the Beagle gateway.
The client fetches the record from the gateway, which signs its reply.
The client hands the signed reply back to the resolver contract, which verifies the signature on-chain. A forged or altered answer is rejected.
The RPC provider and the Beagle gateway both see which name you looked up.
Current viem and ethers resolve names through the ENSv2 Universal Resolver, so getEnsResolver reports a shared ENS contract (the same one it reports for vitalik.eth), not the Beagle resolver. The lookup still reaches the Beagle resolver and gateway.
Example
mkdir ens-lookup && cd ens-lookup
npm init -y
npm i viem@^2.35Save this as lookup.mjs:
// Read a Beagle user's Carrier fields through ENS on Ethereum mainnet.
// ENS does not store them: the resolver sends the lookup to the Beagle
// gateway and checks the gateway's signature.
import { createPublicClient, http } from 'viem'
import { mainnet } from 'viem/chains'
import { normalize } from 'viem/ens'
const name = normalize(process.argv[2] ?? 'help.beagles.eth')
const client = createPublicClient({
chain: mainnet,
transport: http('https://ethereum-rpc.publicnode.com'),
})
const [carrierAddress, carrierUserId, alias, avatar] = await Promise.all([
client.getEnsText({ name, key: 'carrierAddress' }),
client.getEnsText({ name, key: 'carrierUserId' }),
client.getEnsText({ name, key: 'alias' }),
client.getEnsAvatar({ name }),
])
console.log({ name, alias, avatar, carrierAddress, carrierUserId })node lookup.mjs help.beagles.ethIt prints:
{
name: 'help.beagles.eth',
alias: 'Beagle Chat Help',
avatar: null,
carrierAddress: '<Carrier address>',
carrierUserId: '<userid>'
}With ethers 6.17 or later (npm i ethers@^6.17), the same lookup is:
import { ethers } from 'ethers'
const provider = new ethers.JsonRpcProvider('https://ethereum-rpc.publicnode.com')
const resolver = await provider.getResolver('help.beagles.eth')
const carrierAddress = await resolver?.getText('carrierAddress')
const carrierUserId = await resolver?.getText('carrierUserId')
console.log({ carrierAddress, carrierUserId })- A missing value is `null`. An unregistered name, an expired record and a key the user never set all return
null. With viem, passstrict: truetogetEnsTextto throw when a lookup fails or its answer is rejected. - Names are lowercase.
normalizeturnsHelp.Beagles.ethintohelp.beagles.eth, and the gateway accepts any case. - Any Ethereum mainnet RPC works. The example uses a public one; use your own provider in production.
- Older libraries fail. viem before 2.35, for example 2.21, calls a retired ENS batch gateway and the lookup throws.
Send a friend request
carrierAddress is what a friend request takes. With agent-mesh, run mesh friend <carrierAddress> "hi". In the Beagle apps, paste it where you add a friend.
The address contains the userid, so you can check that the two keys agree. @decentnetwork/peer has the helper:
import { carrierIdFromAddress } from '@decentnetwork/peer'
if (carrierIdFromAddress(carrierAddress) !== carrierUserId) throw new Error('address and userid disagree')A beagles.eth record says only what its owner wrote. When the relationship matters, confirm the name through another channel before you accept a friend.
Other ENS tools
- ensdata.net and similar APIs return a fixed set of standard fields. They never ask for
carrierAddressorcarrierUserId, so those keys never appear there. - ENS has no "list all records" call. A client gets only the keys it asks for by name, so generic ENS apps don't show the Carrier keys.
- Standard keys such as
descriptionandurlcome back as the user stored them.