Onchain Identity
Every Lens profile is owned by an EVM wallet address. This allow us to build up an onchain identity for these profiles.
We have integrated with various different onchain identity based services to allow you to query the onchain identity of a profile.
For example, you can query if a profile is verified on Proof of Humanity, Sybil, Worldcoin, and has an ENS name.
Request
The onchain identity is available on the Profile
type as onChainIdentity
. This means you can access this information on any method that returns a Profile
object.
Here is an example of how to query the onchain identity of a profile on the profile
method.
- profileId:
string
(required)- The identifier of the profile to fetch the onchain identity for.
Invocation
const { onChainIdentity } = await lensClient.profile.fetch({
profileId: "PROFILE_ID",
})
query Profile {
profile(request: { profileId: "0x06" }) {
onChainIdentity {
ens {
name
}
proofOfHumanity
sybilDotOrg {
verified
source {
twitter {
handle
}
}
}
worldcoin {
isHuman
}
}
}
}
Response
{
"data": {
"profile": {
// ... other profile fields omitted
"onChainIdentity": {
"ens": {
"name": "svg.eth"
},
"proofOfHumanity": true,
"sybilDotOrg": {
"verified": false,
"source": {
"twitter": {
"handle": null
}
}
},
"worldcoin": {
"isHuman": true
}
}
}
}
}
Updated about 1 month ago