Skip to main content

Onchain Identity

Enrich your app by surfacing onchain identity such as avatars, ENS, Farcaster, and more.

accounts

Takes an array of addresses as input. Returns account information including:

  • Display name and avatar
  • ENS records
  • Social profiles (Lens, Farcaster)
  • Account metadata

Example Use Case: Social Profile

Let's say you are building a profile for users and want to surface their identity primitives. Start by passing addresses for the user. Then return displayName and description with their sources as well as information from ensRecord, farcasterProfile, and lensProfile.

Example Variable

{
"addresses": [
"0x52c8ff44260056f896e20d8a43610dd88f05701b",
"0xd8da6bf26964af9d7eed9e03e53415d37aa96045"]
}

Example Query

query ($addresses: [Address!]!) {
accounts(addresses: $addresses) {
displayName {
source
value
}
description {
source
value
}
ensRecord {
name
}
farcasterProfile {
username
fid
}
lensProfile {
handle
}
}
}

Example Response

{
"data": {
"accounts": [
{
"displayName": {
"source": "ENS",
"value": "0xjasper.eth"
},
"description": {
"source": "ENS",
"value": "designer of stuff at Zapper"
},
"ensRecord": {
"name": "0xjasper.eth"
},
"farcasterProfile": {
"username": "jasper",
"fid": 177
},
"lensProfile": {
"handle": "0xjasper"
}
},
{
"displayName": {
"source": "ENS",
"value": "vitalik.eth"
},
"description": {
"source": "LENS",
"value": "Ethereum\n\nFable of the Dragon Tyrant (not mine but it's important): https://www.youtube.com/watch?v=cZYNADOHhVY\n\nAbolish daylight savings time and leap seconds"
},
"ensRecord": {
"name": "vitalik.eth"
},
"farcasterProfile": {
"username": "vitalik.eth",
"fid": 5650
},
"lensProfile": {
"handle": "vitalik"
}
}
]
}
}

Try in sandbox

Arguments

ArguementDescriptionType
addressesThe addresses being queried, as an array.Address!

Fields

FieldDescriptionType
addressReturns the address that was queried for.Address!
avatarReturns the avatar object, which contains avatar informatiom from multiple sources such as ENS, Farcaster, Lens, or Zapper.AccountAvatar!
descriptionReturns a description along with the source from either ENS, Farcaster, or Lens.Description!
displayNameReturns a display name along with the source from either Zapper's indexed labels, ENS, Farcaster, or Lens.DisplayName!
ensRecordReturns the ENS record associated with the address as well as its metadata.EnsRecord!
lensProfileReturns the Lens profile associated with the address as well as its metadata.LensProfile!
farcasterProfileReturns the Farcaster profile associated with the address as well as its metadata.FarcasterProfile!
labelReturns the label that has been indexed by Zapper, if any.String!
socialLinksReturns links such as Website, Twitter, Github, Email, Warpcast, or Hey.AccountSocialLink!
openenURIReturns a Opepen URI.String!
blockiesURIReturns a Blockie URI.String!
isFollowedByTakes an argument address and returns true/false.Boolean!
followStatsData on Zapper followers and following.FollowerStats!
followersReturns Zapper followers.FollowerConnection!
followingReturns Zapper following.FollowingConnection!
isContractReturns a true/false for whether this address is a contract.Boolean!