Learn how to use Airstack to universally resolve and reverse resolve 0x addresses to Solana addresses, web3 socials (Lens & Farcaster) and ENS Domains (including offchain Namestone & cb.id).
Table Of Contents
In this guide, you will learn how to use Airstack to:
To access the Airstack APIs in other languages, you can use https://api.airstack.xyz/gql as your GraphQL endpoint.
Get All Solana Addresses Connected To 0x Address
You can get all the solana addresses connected to a given 0x addresss by using the Wallet API:
Try Demo
Code
queryMyQuery { Wallet( input: {identity: "0xe0235804378c31948e81441f656d826ee5998bc6", blockchain: ethereum} ) {farcaster: socials(input: {filter: {dappName: {_eq: farcaster}}}) { connectedAddresses { # Fetch all SOL connected addresses from Farcaster (if any) address chainId blockchain timestamp } } domains { multiChainAddresses { # Fetch all SOL address registered with ENS (if any) address symbol } } }}
{"data": {"Wallet": {"farcaster": [ {"connectedAddresses": [ // No SOL address connected in FC {"address":"0xe0235804378c31948e81441f656d826ee5998bc6","chainId":"1","blockchain":"ethereum","timestamp":"2023-07-04T18:54:04Z" } ] } ],"domains": [ {"multiChainAddresses": [ {// This is the SOL address registered by user in ENS"address":"GJQUFnCu7ZJHxtxeaeskjnqyx8QFAN1PsiGuShDMPsqV","symbol":"SOL" }, {"address":"0xe0235804378c31948E81441f656D826eE5998Bc6","symbol":"ETH" } ] } ] } }}
Get All 0x Addresses Connected To Solana Address
You can get all the 0x addresses connected to a given solana addresss by using the Wallet API:
Get All Web3 Social Accounts (Lens, Farcaster) and ENS Domains Resolved From An Array of 0x addresses
You can resolve an array of 0x addresses to their web3 socials and ENS Domains (including offchain domains, e.g. Namestone & cb.id) using the Socials and Domains API:
Try Demo
Code
queryMyQuery { # Get All Web3 socials (Lens/Farcaster) Socials( input: {filter: {identity: {_in: ["0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045"] } },blockchain: ethereum } ) { Social { userAssociatedAddresses dappName profileName } } # Get All ENS domains, including offchain Namestone & cb.id Domains( input: {filter: {resolvedAddress: {_in: ["0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045"] } },blockchain: ethereum } ) { Domain { resolvedAddress name isPrimary } }}
{"data": {"Socials": {"Social": [ {"userAssociatedAddresses": ["0xadd746be46ff36f10c81d6e3ba282537f4c68077","0xd8da6bf26964af9d7eed9e03e53415d37aa96045" ],"dappName":"farcaster","profileName":"vitalik.eth"// Farcaster fname }, {"userAssociatedAddresses": ["0xd8da6bf26964af9d7eed9e03e53415d37aa96045" ],"dappName":"lens","profileName":"lens/@vitalik"// Lens Profile } ] },"Domains": {"Domain": [ {"resolvedAddress":"0xd8da6bf26964af9d7eed9e03e53415d37aa96045","name":"quantumdapps.eth","isPrimary":false }, {"resolvedAddress":"0xd8da6bf26964af9d7eed9e03e53415d37aa96045","name":"vitalik.eth","isPrimary":true// This indicates that this is the primary ENS },// Other ENS domains ] } }}
Get All The 0x addresses from a given ENS name(s)
You can get the 0x addresses of ENS names by using the Domains API:
Try Demo
Code
queryGetUserDetailsFromENS { Domains( input: {filter: {name: { # Add more ENS Domains into the array_in: ["vitalik.eth"] } },blockchain: ethereum } ) { Domain { resolvedAddress name } }}