## AllDomains Web3 Protocol ### **What is AllDomains?** **AllDomains** is a Web3 platform to create, register, and trade customizable Web3 Identities for .everyone With AllDomains any user can choose not only a name they desire but also the community they wish to associate with, adding a new layer of customization to their Web3 identity. Be it a Token, an NFT collection, or a DAO, **everyone can create their own TLD** and unite their whole community under a unique brand. **AllDomains** opens up **Top Level Domain** (TLD) creation so that any project or community can distribute its own **.\[anything\]** domains providing users with the freedom of choice for their Web3 ID. At the same time, AllDomains is the first protocol to **bridge the gap between Web2 and Web3** by enabling Web2 domain name registrations on Solana. To this end, we have launched **pilot domain name** registrations for the **.ID Web2 TLD**. These work for both their initially intended purposes and as Web3 domain names in parallel. **Only trust information provided by these official channels:** - AllDomains -> [https://alldomains.id](https://alldomains.id/) - Twitter -> [https://twitter.com/AllDomains\_](https://twitter.com/AllDomains) - Discord -> [https://discord.gg/alldomains](https://discord.gg/alldomains) - Telegram -> [https://t.me/AllDomainsID](https://t.me/AllDomainsID) **Beware of impersonators/scammers on social platforms** Our administrators will never: - Direct message you first - Ask for funds - Ask for your private keys [NextWhat is a Web3 domain/TLD](https://docs.alldomains.id/protocol/overview/what-is-a-web3-domain-tld) Last updated 7 months ago ## AllDomains TLDs Overview There are currently >60 TLDs under the AllDomains Protocol umbrella and the list is expanding You can check the complete list by visiting our website: [https://alldomains.id](https://alldomains.id/) [PreviousBenefits of using Web3 domains](https://docs.alldomains.id/protocol/overview/benefits-of-using-web3-domains) [NextGetting Started](https://docs.alldomains.id/protocol/getting-started) Last updated 7 months ago ## All Domains Sitemap https://docs.alldomains.id/protocol/sitemap-pages.xml ## Renewable Domain Names We are revolutionizing the process of domain creation on Solana by introducing renewable domain names for the first time ever. _Why renewable domain names?_ Having renewable domain names prevents people from squatting on a whole bag of domain names. Having multiple TLDs with renewal fees ensures that there will always be at least one domain name you are looking for available. **Hybrid Domain Names** .ID was a world-first iteration of a hybrid TLD across all blockchain platforms. Claiming an đŸ„š.ID domain name allows users to make use of the same domain name on both Web2 and associate it with their desired Solana Public Key, allowing users and projects to extract the maximum out of their social
 .ID. **Going multi-chain** While most of AllDomains is currently built on Solana, our long-term vision extends beyond a single blockchain. Our aim is to become a cross-chain solution, facilitating the bridging of domains from other blockchains to Solana and vice versa. We are excited to announce that AllDomains is **now live on Eclipse and SOON SVM**, further expanding our reach. Additionally, we will be **live on Monad as soon as its Mainnet launches.** Our commitment to seamless interoperability continues as we connect domains with major blockchains like Ethereum, Bitcoin, Arbitrum, and more. **Get your TLD!** Our TLD Program, also known as TLD House, can support an unlimited number of TLDs. All NFT collections, games, projects, users, and Web3 communities can now create their OWN unique Web3 domain names upon application. Please contact us at [https://alldomains.id/launch-tld](https://alldomains.id/launch-tld) **Domain Wrapping** Most of our domains are available for wrapping as **NFTs** and listed on secondary markets through our own NFT Wrapping contract - NameHouse - a Solana Program that enables any domain from any new TLD to be wrapped as an NFT and traded on any Solana NFT Marketplace. The NFT wrapper is active for the hybrid Web2 and Web3 .ID TLD. This enables Real World Asset (RWA) trading on Solana. **Dynamic Pricing and Multiple Claim Choices** Most of our domain names can be claimed in a multitude of SPLs, and we are always looking to add more to our list! Our domain names can also be customized to be claimed in various ways: - Claim via NFT - Claim via SFT - Claim via QR Code for IRL events - Claim using multiple SPLs - Claim using Token Extensions - Claim using your own $TOKEN ## Dynamic Domain Pricing Since some of our partnered **TLDs are priced in different SPLs** ($WIF, $SAMO, $MYRO etc.) with a high volatility rate, we have decided to **peg** the domain name registration fees **at specific $USDC** **values** (based on our partners' preferences). This tech allowed us to implement SPL pricing for ALL our domain names. Along with $SOL and $USDC, you can now use select partnered tokens ($WEN, $BONK, $CHAT, $SLERF) to claim ANY of our domain names. If you choose to do so, the swap to $USDC will happen instantly via the current Jupiter Exchange price and their standard 2% exchange fee. We have already integrated Token Extensions and soon you will have the option to claim our domains using even more tokens! To see the complete list of tokens you can use to claim our domain names hit the _Cog_ button above the _Powered by Jupiter_ line! Click on any of the mentioned tokens, and prices will update accordingly! ![](https://docs.alldomains.id/~gitbook/image?url=https%3A%2F%2F4163218443-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FW79USbvVh7YhdsI3PhOO%252Fuploads%252F5hy5VRdIU15xEMV9oQXD%252FScreenshot%25202024-06-11%2520132718.png%3Falt%3Dmedia%26token%3D57116ba8-8545-4b23-84aa-a0dcc97ad009&width=768&dpr=4&quality=100&sign=b00db59a&sv=2) Tokens you can use to claim domain names [PreviousRegister a domain name](https://docs.alldomains.id/protocol/getting-started/register-a-domain-name) [NextBuy from a Marketplace](https://docs.alldomains.id/protocol/getting-started/buy-from-a-marketplace) Last updated 1 year ago ## AllDomains Web3 Protocol ### [Direct link to heading](https://docs.alldomains.id/protocol\#what-is-alldomains) **What is AllDomains?** **AllDomains** is a Web3 platform to create, register, and trade customizable Web3 Identities for .everyone With AllDomains any user can choose not only a name they desire but also the community they wish to associate with, adding a new layer of customization to their Web3 identity. Be it a Token, an NFT collection, or a DAO, **everyone can create their own TLD** and unite their whole community under a unique brand. **AllDomains** opens up **Top Level Domain** (TLD) creation so that any project or community can distribute its own **.\[anything\]** domains providing users with the freedom of choice for their Web3 ID. At the same time, AllDomains is the first protocol to **bridge the gap between Web2 and Web3** by enabling Web2 domain name registrations on Solana. To this end, we have launched **pilot domain name** registrations for the **.ID Web2 TLD**. These work for both their initially intended purposes and as Web3 domain names in parallel. **Only trust information provided by these official channels:** - AllDomains -> [https://alldomains.id](https://alldomains.id/) - Twitter -> [https://twitter.com/AllDomains\_](https://twitter.com/AllDomains) - Discord -> [https://discord.gg/alldomains](https://discord.gg/alldomains) - Telegram -> [https://t.me/AllDomainsID](https://t.me/AllDomainsID) [NextWhat is a Web3 domain/TLD](https://docs.alldomains.id/protocol/overview/what-is-a-web3-domain-tld) Last updated 7 months ago ## Web3 Domain Overview A **Web3 domain** is a human-readable and unique address that is easy to remember & communicate and can be used in place of a Public Key (more commonly known as a Wallet Address). A **TLD** is the final component of a domain name and it’s the highest level in the hierarchical **AllDomains** registry. **.** Unlike Web 2 domains that are hosted on the global network of Domain Name System (DNS) servers, **Web3** domains leverage blockchain technology making them decentralized and more importantly allowing them to interact with blockchain apps and smart contracts. [PreviousOverview](https://docs.alldomains.id/protocol) [NextAllDomains Features](https://docs.alldomains.id/protocol/overview/alldomains-features) Last updated 1 year ago ## Benefits of Web3 Domains - An easy-to-remember address for sending and receiving cryptocurrency, making transactions as easy as sending an email - The domain only belongs to the owner, which can not be censored - Secure and open due to their decentralized and transparent nature - Status symbol and social identity - Can be leveraged as a personal or business brand - Crypto equivalent of a custom license plate - Wrapped as NFTs can be sold on secondary markets - Can be [integrated](https://docs.alldomains.id/protocol/integrations) with wallets, dApps, and other tools - Fun and easy to use [PreviousAllDomains Features](https://docs.alldomains.id/protocol/overview/alldomains-features) [NextAllDomains TLDs](https://docs.alldomains.id/protocol/overview/alldomains-tlds) Last updated 1 year ago ## AllDomains Domain Search Searching for AllDomains Domains To search for any AllDomains domain name visit our website: [**https://alldomains.id/**](https://alldomains.id/) [PreviousAllDomains TLDs](https://docs.alldomains.id/protocol/overview/alldomains-tlds) [NextRegister a domain name](https://docs.alldomains.id/protocol/getting-started/register-a-domain-name) Last updated 1 year ago ## Register a Domain #### [Direct link to heading](https://docs.alldomains.id/protocol/getting-started/register-a-domain-name\#to-register-a-new-domain) To r **egister a new domain:** 1. Go to [alldomains.id](https://alldomains.id/) ​ 2. Search for the domain name you want: ![](https://docs.alldomains.id/~gitbook/image?url=https%3A%2F%2F4163218443-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FW79USbvVh7YhdsI3PhOO%252Fuploads%252FDBAMR4ui3mbEtpMkSQcb%252FCapture1.PNG%3Falt%3Dmedia%26token%3D70b593be-f116-4bdb-83b9-70d08505a99b&width=768&dpr=4&quality=100&sign=56c9aa4f&sv=2) Search for a Domain Name 1. If you don't know exactly what you're looking for, scroll up and down the TLD list and find your favorite one! Alternatively, if you know exactly what domain name you want, just type in the complete domain in the search bar (e.g. alldomains.maxi) to get that specific result You can use filters to select certain TLDs to compare prices or check the expiration dates for previously purchased domain names. Feel free to play around and discover your best choice! 1. Once you have decided on the domain name you want to purchase, select the SPL you want to use for your purchase and the renewal period, and click Buy Now. Some domain names are only available through community-specific tokens (e.g. .superteam domains require a specific token you can only acquire from Superteam) [PreviousGetting Started](https://docs.alldomains.id/protocol/getting-started) [NextDynamic Pricing](https://docs.alldomains.id/protocol/getting-started/dynamic-pricing) Last updated 4 months ago ## Web3 Domains Overview 1https://docs.alldomains.id/protocol2024-10-30T13:45:51.591Z0.84https://docs.alldomains.id/protocol/overview/what-is-a-web3-domain-tld2024-03-28T08:20:22.974Z0.84https://docs.alldomains.id/protocol/overview/alldomains-features2025-04-17T09:03:20.035Z0.84https://docs.alldomains.id/protocol/overview/benefits-of-using-web3-domains2024-04-01T08:19:10.261Z0.84https://docs.alldomains.id/protocol/overview/alldomains-tlds2024-10-30T13:51:06.370Z1https://docs.alldomains.id/protocol/getting-started2024-06-11T10:30:24.244Z0.84https://docs.alldomains.id/protocol/getting-started/register-a-domain-name2025-02-14T14:37:28.357Z0.84https://docs.alldomains.id/protocol/getting-started/dynamic-pricing2024-06-11T10:29:50.254Z0.84https://docs.alldomains.id/protocol/getting-started/buy-from-a-marketplace2024-03-19T20:23:48.313Z0.84https://docs.alldomains.id/protocol/getting-started/selling-a-domain2024-03-19T20:25:15.541Z0.84https://docs.alldomains.id/protocol/getting-started/manage-your-domains2025-02-14T14:48:05.912Z0.84https://docs.alldomains.id/protocol/getting-started/using-your-domain2024-03-28T08:23:31.763Z0.84https://docs.alldomains.id/protocol/getting-started/expiration-and-grace-period2024-04-30T13:18:30.790Z0.84https://docs.alldomains.id/protocol/getting-started/enable-notifications2024-04-30T13:19:37.553Z0.84https://docs.alldomains.id/protocol/getting-started/verify-with-matrica2024-05-15T16:34:29.795Z1https://docs.alldomains.id/protocol/getting-a-tld2024-06-11T10:02:17.057Z0.84https://docs.alldomains.id/protocol/getting-a-tld/disclaimer2024-03-19T22:18:17.843Z1https://docs.alldomains.id/protocol/developer-guide2024-08-09T07:06:08.444Z0.84https://docs.alldomains.id/protocol/developer-guide/programs2025-02-17T12:53:33.665Z0.84https://docs.alldomains.id/protocol/developer-guide/ad-sdks2024-05-10T07:04:25.981Z0.7https://docs.alldomains.id/protocol/developer-guide/ad-sdks/svm-sdks0.59https://docs.alldomains.id/protocol/developer-guide/ad-sdks/svm-sdks/solana-mainnet-sdk2025-04-18T09:40:23.954Z0.59https://docs.alldomains.id/protocol/developer-guide/ad-sdks/svm-sdks/eclipse-mainnet-sdk2025-01-06T12:04:07.815Z0.59https://docs.alldomains.id/protocol/developer-guide/ad-sdks/svm-sdks/soon-mainnet-sdk2025-04-18T09:40:23.954Z0.59https://docs.alldomains.id/protocol/developer-guide/ad-sdks/svm-sdks/sonic-mainnet-sdk2025-04-18T09:32:01.850Z0.59https://docs.alldomains.id/protocol/developer-guide/ad-sdks/svm-sdks/yona-devnet-sdk2024-09-04T10:47:26.793Z0.7https://docs.alldomains.id/protocol/developer-guide/ad-sdks/evm-sdks2025-03-03T16:21:56.847Z0.59https://docs.alldomains.id/protocol/developer-guide/ad-sdks/evm-sdks/monad-sdk2025-03-03T17:20:58.596Z0.7https://docs.alldomains.id/protocol/developer-guide/ad-sdks/move-sdks0.84https://docs.alldomains.id/protocol/developer-guide/records2024-03-11T05:58:57.680Z0.84https://docs.alldomains.id/protocol/developer-guide/structure-architecture2024-08-09T07:06:08.444Z1https://docs.alldomains.id/protocol/integrations2024-11-06T13:42:39.288Z0.84https://docs.alldomains.id/protocol/integrations/solana2025-02-20T13:00:20.857Z0.84https://docs.alldomains.id/protocol/integrations/eclipse2025-02-20T13:04:22.413Z0.84https://docs.alldomains.id/protocol/integrations/monad2025-06-10T11:40:12.634Z0.84https://docs.alldomains.id/protocol/integrations/soon-svm2025-04-14T11:41:17.200Z0.84https://docs.alldomains.id/protocol/integrations/sonic-svm2025-05-02T07:38:04.384Z1https://docs.alldomains.id/protocol/the-alldomains-experience2024-12-09T13:43:35.539Z0.84https://docs.alldomains.id/protocol/the-alldomains-experience/referral-program2024-07-01T17:03:00.611Z0.84https://docs.alldomains.id/protocol/the-alldomains-experience/on-eclipse2024-12-04T14:52:27.218Z0.84https://docs.alldomains.id/protocol/the-alldomains-experience/terms-and-conditions2024-06-24T16:14:32.888Z1https://docs.alldomains.id/protocol/partner-guide2024-05-15T17:26:39.186Z0.84https://docs.alldomains.id/protocol/partner-guide/how-to-set-up-matrica2025-02-14T14:56:06.231Z1https://docs.alldomains.id/protocol/alldomains-pools-v1.02024-03-28T08:25:56.535Z0.84https://docs.alldomains.id/protocol/alldomains-pools-v1.0/activating-nft-wrapping2024-03-28T08:25:56.595Z0.84https://docs.alldomains.id/protocol/alldomains-pools-v1.0/listing-on-secondary-markets2024-03-28T08:25:56.607Z0.84https://docs.alldomains.id/protocol/alldomains-pools-v1.0/marketing-your-tld2024-03-28T08:28:25.469Z0.84https://docs.alldomains.id/protocol/alldomains-pools-v1.0/claiming-rewards2024-06-11T10:34:29.080Z0.84https://docs.alldomains.id/protocol/alldomains-pools-v1.0/reclaim-your-tokens2024-03-28T08:28:25.405Z1https://docs.alldomains.id/protocol/.sol-plus-domain-names2025-05-27T14:41:57.735Z0.84https://docs.alldomains.id/protocol/.sol-plus-domain-names/faq2025-05-23T06:53:46.945Z1https://docs.alldomains.id/protocol/.token-domain-names2024-06-13T14:05:38.049Z0.84https://docs.alldomains.id/protocol/.token-domain-names/how-does-ticker-.token-work2024-06-13T14:12:42.224Z0.84https://docs.alldomains.id/protocol/.token-domain-names/how-to-register-a-.token-domain-name2024-06-13T16:38:37.575Z1https://docs.alldomains.id/protocol/solana-eclipse-bridge2024-12-19T18:23:55.903Z0.84https://docs.alldomains.id/protocol/solana-eclipse-bridge/using-the-bridge2024-12-19T18:22:56.085Z0.84https://docs.alldomains.id/protocol/solana-eclipse-bridge/get-gas2024-12-19T18:19:38.979Z1https://docs.alldomains.id/protocol/links2024-08-19T14:15:07.653Z1https://docs.alldomains.id/protocol/brand-kit2024-03-28T08:28:48.517Z1https://docs.alldomains.id/protocol/roadmap2025-04-08T08:05:09.266Z1https://docs.alldomains.id/protocol/contact2025-02-14T14:57:27.688Z ## Buying NFT Domains You can also purchase a domain on most of the popular NFT Marketplaces on Solana. Simply search “??? Domain Names” ("Poor Domain Names", "Bonk Domain Names" etc.) on any of these marketplaces to start browsing NFT domains e.g. - [https://www.tensor.trade/trade/bonk\_domain\_names](https://www.tensor.trade/trade/bonk_domain_names) - [https://magiceden.io/marketplace/bonk\_domain\_names](https://magiceden.io/marketplace/bonk_domain_names) [PreviousDynamic Pricing](https://docs.alldomains.id/protocol/getting-started/dynamic-pricing) [NextSelling a Domain](https://docs.alldomains.id/protocol/getting-started/selling-a-domain) Last updated 1 year ago ## Selling a Domain To sell a domain users need to wrap their domains as NFTs. Domains can be wrapped (as NFTs) or unwrapped to reveal the domain at any time. When a user wraps their domain: 1. The domain is transferred to an escrow account 2. The smart contract creates an NFT that is transferred to the user in return 3. When the NFT is unwrapped, the program will burn the NFT and return the domain to the owner Users can wrap and unwrap their domain names a limitless number of times Once a domain is wrapped (as an NFT) they can view it in their wallet and trade it on any NFT marketplace. Learn how to wrap/unwrap your Domain on the next page: [Manage your domains ->](https://docs.alldomains.id/protocol/getting-started/manage-your-domains) [PreviousBuy from a Marketplace](https://docs.alldomains.id/protocol/getting-started/buy-from-a-marketplace) [NextManage your Domains](https://docs.alldomains.id/protocol/getting-started/manage-your-domains) Last updated 1 year ago ## Domain Management Guide To manage your domains, go to [alldomains.id](https://alldomains.id/), connect your wallet click on it again, and go to your personal profile: ![](https://docs.alldomains.id/~gitbook/image?url=https%3A%2F%2F4163218443-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FW79USbvVh7YhdsI3PhOO%252Fuploads%252FGsiyB6bxCnRYumHP3JpX%252Fimage.png%3Falt%3Dmedia%26token%3D6f9fd851-ec4a-47ff-968a-c2938d3525cc&width=768&dpr=4&quality=100&sign=25a6d4ae&sv=2) View Profile Once you do so, you will be greeted by the following interface: ![](https://docs.alldomains.id/~gitbook/image?url=https%3A%2F%2F4163218443-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FW79USbvVh7YhdsI3PhOO%252Fuploads%252Fc4ztam30u4Byn6nhVFjR%252Fimage.png%3Falt%3Dmedia%26token%3D6b8445d0-8c05-4ea2-9366-86a5a098c481&width=768&dpr=4&quality=100&sign=cdf108a1&sv=2) Your Profile Dashboard ### [Direct link to heading](https://docs.alldomains.id/protocol/getting-started/manage-your-domains\#extend-renew-domain) Extend/Renew domain You can easily renew in advance and extend your domains. Click Extend, select the period and click Renew! ![](https://docs.alldomains.id/~gitbook/image?url=https%3A%2F%2F4163218443-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FW79USbvVh7YhdsI3PhOO%252Fuploads%252F7CeWqoJtvGK1vBFTxV0c%252Fimage.png%3Falt%3Dmedia%26token%3Dc98dce44-8514-4ebd-9b0b-8228d574b9c4&width=768&dpr=4&quality=100&sign=5e4b97aa&sv=2) Renew your domain name ### [Direct link to heading](https://docs.alldomains.id/protocol/getting-started/manage-your-domains\#set-your-main-domain-name) **Set your Main Domain Name** If you own multiple AllDomains assets but want a specific one displayed by our Integration Partners (e.g., Birdeye), you must choose a Main Domain! You can set your favorite domain by clicking the "☆" icon associated with one of your domains and signing off the transaction. If your wallet is already associated with a .sol domain name, our integration partners will display that one first, as there is no protocol consensus yet. If you want your AllDomains asset to take precedence, move the .sol domain to another wallet. ### [Direct link to heading](https://docs.alldomains.id/protocol/getting-started/manage-your-domains\#domain-records) **Domain Records** You can edit your domain records by clicking the **Records** button under the domain name. See the [Records](https://docs.alldomains.id/protocol/developer-guide/records) section for the complete list. ![](https://docs.alldomains.id/~gitbook/image?url=https%3A%2F%2F4163218443-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FW79USbvVh7YhdsI3PhOO%252Fuploads%252Fgk2A7DQcK4jKc6ftsdYz%252Fimage.png%3Falt%3Dmedia%26token%3D19efedb2-7339-4d44-9a5b-eb9e3c626c72&width=768&dpr=4&quality=100&sign=5a516743&sv=2) Edit Domain Records You can only edit records for unwrapped domain names. See _Wrap/Unwrap a domain name to/from an NFT_ below! ### [Direct link to heading](https://docs.alldomains.id/protocol/getting-started/manage-your-domains\#transfer-a-domain) Transfer a domain Easily transfer your domain to another Solana address 1. Click on the Send button next to the domain you want to transfer ![](https://docs.alldomains.id/~gitbook/image?url=https%3A%2F%2F4163218443-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FW79USbvVh7YhdsI3PhOO%252Fuploads%252FxAgXEwQ24spvqSdR9EQm%252Fimage.png%3Falt%3Dmedia%26token%3Da1c136b3-f48e-4be2-8bd2-87a2f98584e5&width=768&dpr=4&quality=100&sign=c61a5b40&sv=2) Transfer domain 1. In the Modal window that appears enter the Solana address/domain name you want to send the domain to and click Transfer ![](https://docs.alldomains.id/~gitbook/image?url=https%3A%2F%2F4163218443-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FW79USbvVh7YhdsI3PhOO%252Fuploads%252F2BTlLGFnydirtwnCsjV0%252Fimage.png%3Falt%3Dmedia%26token%3De4dcb92b-9d92-4a50-804f-8c51c04fd5a1&width=768&dpr=4&quality=100&sign=6cd2cbec&sv=2) Transfer your domain name **Wrap /Unwrap a domain name to/from an NFT** Depending on the state of a domain there is either a " **Wrap**" or " **Unwrap**" button next to it. If you click on any of the Wrap or Unwrap buttons a modal to change the state from and to an NFT appears depending on the domain's current state. Be sure to have some spare $SOL to generate the NFT token account when wrapping a domain name for the first time. ![](https://docs.alldomains.id/~gitbook/image?url=https%3A%2F%2F4163218443-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FW79USbvVh7YhdsI3PhOO%252Fuploads%252FPraK3heto8LU1dbF5qHP%252Fimage.png%3Falt%3Dmedia%26token%3Df2c5e43c-0fdf-4d6b-8d38-c08d5ffcb156&width=768&dpr=4&quality=100&sign=8cb79324&sv=2) Wrap your domain name as NFT Wrapping or unwrapping will not affect the way your domain name works! You can still receive SOL, SPLs, or NFTs to a wrapped domain name. ![](https://docs.alldomains.id/~gitbook/image?url=https%3A%2F%2F4163218443-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FW79USbvVh7YhdsI3PhOO%252Fuploads%252FLp8U3GYULcOVTfQ80QIU%252Fimage.png%3Falt%3Dmedia%26token%3D168eecca-ede4-4f4b-bd90-cb082ecc06ae&width=768&dpr=4&quality=100&sign=5f428fca&sv=2) Unwrap your domain name Wrapped domain names can be transferred as regular NFTs directly from your Solana Wallet. [PreviousSelling a Domain](https://docs.alldomains.id/protocol/getting-started/selling-a-domain) [NextUsing your Domain](https://docs.alldomains.id/protocol/getting-started/using-your-domain) Last updated 4 months ago ## Using Your Domain After registering a new domain name with us, your domain will initially not be displayed anywhere! The domain however is already associated with your wallet address and can be readily used. If you want to check the domain ownership without wrapping your domain up, head to your profile dashboard! Among the many uses you can find for your domain name, the most popular by far is simply transferring funds or assets via your wallet! **Perform a transaction with a domain name** To send SOL or any other token using a domain name simply add the domain name in the Recipient field, where you would usually add the wallet address. Hit Next, and you’re done! ![](https://docs.alldomains.id/~gitbook/image?url=https%3A%2F%2F4163218443-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FW79USbvVh7YhdsI3PhOO%252Fuploads%252Fg6MlhRVwEbmqRUxsN4SA%252Fimage.png%3Falt%3Dmedia%26token%3D59b04d50-5f2c-4b14-8b70-4045056acc98&width=768&dpr=4&quality=100&sign=f130de9b&sv=2) Transfer funds using a domain name If you encounter any error while trying to perform a transaction there are a couple of reasons behind it: 1. You have the wrong domain name 2. The wallet you are using has not yet integrated our domain names. ![](https://docs.alldomains.id/~gitbook/image?url=https%3A%2F%2F4163218443-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FW79USbvVh7YhdsI3PhOO%252Fuploads%252FcJO62kp99h4MrFLRNkib%252Fimage.png%3Falt%3Dmedia%26token%3D2a14e29b-b50b-4f29-9112-9ba8446f0ada&width=768&dpr=4&quality=100&sign=544f682d&sv=2) Error with an unregistered domain name More use cases are available via our [integration](https://docs.alldomains.id/protocol/integrations) partners. Just keep an eye on the expanding list of integrations. Some communities that launched TLDs with us have taken domain names to another level entirely. Some have enabled discord gating, while others allow you to stake your domain names or even offer registration rewards! [PreviousManage your Domains](https://docs.alldomains.id/protocol/getting-started/manage-your-domains) [NextExpiration and Grace Period](https://docs.alldomains.id/protocol/getting-started/expiration-and-grace-period) Last updated 1 year ago ## Domain Expiration Guide At the moment, a 50-day Grace Period is in effect for all domain names However, the code for having a “grace period” is new, and not all our partners have had a chance to integrate it yet. If your domain expires, you can no longer receive tokens with it or use it in any of our partner's products. Please check the expiration date of your domain name on your personal dashboard. **After this code gets integrated, this is how the Grace Period will work:** First 45 days after your domain expires you retain ownership of the asset, and it will still work with all our integrations For 5 more days after that you retain ownership of the asset, but it will no longer be useable After the grace period passes, the account closes and anyone can register the domain name We are looking forward to providing a new **“Gift a renewal”** mechanic for our domain names. Domains in the Grace Period will still show up on Secondary Markets, but after this period passes, they will be dropped from the verified collection and will no longer show up on marketplaces. This ensures **you do not risk buying an expired domain name** without the possibility of renewal. If you want to ensure you never lose a domain name to expiration [enabling notifications](https://docs.alldomains.id/protocol/getting-started/enable-notifications) will keep your domains safe! [PreviousUsing your Domain](https://docs.alldomains.id/protocol/getting-started/using-your-domain) [NextEnable Notifications](https://docs.alldomains.id/protocol/getting-started/enable-notifications) Last updated 1 year ago ## Domain Notification Setup Want to ensure you do not run the risk of losing your domain due to expiration, while also being among the first to discover and benefit from new integrations? Our [Dialect](https://www.dialect.to/) \- Powered notification system can ensure you are always updated with everything happening with your domain name! To enable Notifications for your domain name, go to our website, [https://alldomains.id/](https://alldomains.id/) and connect the wallet that holds it. After doing so, click on the _**Notifications Bell**_ and then on the _**Set up Notifications**_ button ![](https://docs.alldomains.id/~gitbook/image?url=https%3A%2F%2F4163218443-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FW79USbvVh7YhdsI3PhOO%252Fuploads%252FsswuQVYtfhwF068v7Dax%252F3Screenshot%25202024-04-30%2520160727.png%3Falt%3Dmedia%26token%3D30bc8b85-ecfa-4ce9-82e7-85aa01161dfb&width=768&dpr=4&quality=100&sign=6be555da&sv=2) Setting up Notifications There are three platforms you can choose from: _**1\. In App**_ notifications will notify you on our website, meaning you will periodically need to check in for new notification _**2\. Telegram notifications**_ will allow the Dialect bot to DM you whenever a new notification is received _**3\. Email**_ notifications If you want to be 100% sure you never miss anything, you can opt for all three; however, if you’d rather not be bothered too often, you can choose only one or two. You can also choose what exactly you want to be notified about: _**1\. Domain name expiry**_ will notify you each time any of your domain names are getting close to the expiration date: - 30 days before the domain name enters the Grace Period - Domain name enters the 45-day Grace Period - The Grace Period ends, but you still own the domain name for another 5 days _**2\. New TLD launch**_ will notify you each time a new TLD becomes available _**3\. General announcements**_ will notify you whenever a new integration comes online and any important product updates To set up any of these notifications follow the steps! They are the standard steps required to verify your identity. [PreviousExpiration and Grace Period](https://docs.alldomains.id/protocol/getting-started/expiration-and-grace-period) [NextVerify with Matrica](https://docs.alldomains.id/protocol/getting-started/verify-with-matrica) Last updated 1 year ago ## Matrica Verification Guide If you're a member of a community that's implemented the Matrica domain name gating for their Discord, it's crucial to follow these steps for verification: 1\. Go to [https://matrica.io/](https://matrica.io/) and click on the connect button. You can connect either with a Solana Wallet or your Discord account! 2\. You can now start creating your Matrica account and customize it any way you choose! 3\. If you own multiple community domain names and hold these in different wallets you can associate as many domain names/wallets as you choose here [https://matrica.io/settings](https://matrica.io/settings) This will allow you to get membership roles on a single Discord/Telegram account for assets held across multiple wallets/communities. ![](https://docs.alldomains.id/~gitbook/image?url=https%3A%2F%2F4163218443-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FW79USbvVh7YhdsI3PhOO%252Fuploads%252FHjIJWaWd9NyAyXb4wsZQ%252Funnamed%2520%283%29.png%3Falt%3Dmedia%26token%3D2be1f738-8525-4b13-b7ee-afc680670100&width=768&dpr=4&quality=100&sign=fc4d0cea&sv=2) Matrica Profile Landing Page 4\. After following the steps above go to the community server and look for their Matrica channel. Follow the steps there and you should be all set. It can take up to 15 minutes for your roles to refresh so please be patient. [PreviousEnable Notifications](https://docs.alldomains.id/protocol/getting-started/enable-notifications) [NextGetting a TLD](https://docs.alldomains.id/protocol/getting-a-tld) Last updated 1 year ago ## Get Your TLD As stated before, **AllDomains** opens up **Top-Level Domain**(TLD) creation so that any project, community, or user can distribute its own . _**\[anything\]**_ domains, providing users with the freedom of choice for their Web3 ID. Our **Get Your TLD** feature enables just that, by allowing you to claim your TLD, set up your own revenue plan, prices, NFTs background, etc. The choice for your _**.\[anything\]**_ is yours! Of course, as with any other Web3 asset, some may be more valuable than others! Pay attention to your communities’ needs, rituals, and slogans, and choose the TLD you think best suits you! Some communities may decide to go for a more formal TLD (.thug), while others for a more viral one (.caw). The choice is yours, just remember, a TLD can be a valuable tool for your projects’ branding, provide value to its users, and drive up your engagement! aim for something that best represents your product, values, and users! We can offer you a wide variety of custom claim methods for your TLDs: - Claim via NFT - Claim via SFT - Claim via QR Code for IRL events - Claim using multiple SPLs - Claim using Token Extensions - Claim using your own $TOKEN If you want to start a new TLD please contact us via the form here [https://alldomains.id/launch-tld](https://alldomains.id/launch-tld) **Disclaimer:** Please be aware that certain words with offensive or controversial connotations will not be made available on the AllDomains platform. We are committed to promoting a respectful and inclusive environment for all users. [PreviousVerify with Matrica](https://docs.alldomains.id/protocol/getting-started/verify-with-matrica) [NextDisclaimer](https://docs.alldomains.id/protocol/getting-a-tld/disclaimer) Last updated 1 year ago ## TLD Integration Disclaimer While our goal is to provide seamless integrations for all new TLDs, it is essential to note that some integrations may not activate automatically. We cannot guarantee that all integrations will go online on day one. We strive to continually improve our platform to deliver the best possible services. Support will be provided to each TLD to get the same integrations as the existing ones! We would greatly appreciate your help bringing more integrations for the protocol online. More integrations make all our TLDs more valuable! The complete list of existing integrations can be viewed [here!](https://docs.alldomains.id/protocol/integrations) [PreviousGetting a TLD](https://docs.alldomains.id/protocol/getting-a-tld) [NextDeveloper Guide](https://docs.alldomains.id/protocol/developer-guide) Last updated 1 year ago ## AllDomains Developer Guide This following sections provide informations about: - [Programs](https://docs.alldomains.id/protocol/developer-guide/programs) - [**AD SDK**](https://docs.alldomains.id/protocol/developer-guide/ad-sdks) - [Records](https://docs.alldomains.id/protocol/developer-guide/records) - [Structure/Architecture](https://docs.alldomains.id/protocol/developer-guide/structure-architecture) - [Integrations](https://docs.alldomains.id/protocol/integrations) [PreviousDisclaimer](https://docs.alldomains.id/protocol/getting-a-tld/disclaimer) [NextPrograms](https://docs.alldomains.id/protocol/developer-guide/programs) Last updated 10 months ago ## Solana Domain Programs ## [Direct link to heading](https://docs.alldomains.id/protocol/developer-guide/programs\#ans) ANS ANS - All Name Service: a Solana Program that allows users create human readable domain names that can be used in place of a Public Key. Deployed on [Mainnet](https://explorer.solana.com/address/ALTNSZ46uaAUU7XUV6awvdorLGqAsPwa9shm7h4uP2FK) and [Devnet](https://explorer.solana.com/address/ALTNSZ46uaAUU7XUV6awvdorLGqAsPwa9shm7h4uP2FK?cluster=devnet). Copy ```inline-grid min-w-full grid-cols-[auto_1fr] p-2 [count-reset:line] print:whitespace-pre-wrap ALTNSZ46uaAUU7XUV6awvdorLGqAsPwa9shm7h4uP2FK ``` ## [Direct link to heading](https://docs.alldomains.id/protocol/developer-guide/programs\#tld-house) TLD House A Solana Program that gives any project the possibility to have their own TLD ( **.anything**) on Solana to give/sell or use in any way they want in their community. Deployed on [Mainnet](https://explorer.solana.com/address/TLDHkysf5pCnKsVA4gXpNvmy7psXLPEu4LAdDJthT9S) and [Devnet](https://explorer.solana.com/address/TLDHkysf5pCnKsVA4gXpNvmy7psXLPEu4LAdDJthT9S?cluster=devnet). Copy ```inline-grid min-w-full grid-cols-[auto_1fr] p-2 [count-reset:line] print:whitespace-pre-wrap TLDHkysf5pCnKsVA4gXpNvmy7psXLPEu4LAdDJthT9S ``` ## [Direct link to heading](https://docs.alldomains.id/protocol/developer-guide/programs\#name-house) Name House Domain NFT Wrapping / Unwrapping: a Solana Program that enables any domain from any TLD to be wrapped as an NFT and be traded on any SOLANA NFT marketplace. Deployed on [Mainnet](https://explorer.solana.com/address/NH3uX6FtVE2fNREAioP7hm5RaozotZxeL6khU1EHx51) and [Devnet](https://explorer.solana.com/address/NH3uX6FtVE2fNREAioP7hm5RaozotZxeL6khU1EHx51?cluster=devnet). Copy ```inline-grid min-w-full grid-cols-[auto_1fr] p-2 [count-reset:line] print:whitespace-pre-wrap NH3uX6FtVE2fNREAioP7hm5RaozotZxeL6khU1EHx51 ``` ## [Direct link to heading](https://docs.alldomains.id/protocol/developer-guide/programs\#tld-manager) TLD Manager to be updated ## [Direct link to heading](https://docs.alldomains.id/protocol/developer-guide/programs\#all-campaign) All Campaign to be updated [PreviousDeveloper Guide](https://docs.alldomains.id/protocol/developer-guide) [NextAD SDKs](https://docs.alldomains.id/protocol/developer-guide/ad-sdks) Last updated 3 months ago ## AllDomains Protocol SDKs ### [Direct link to heading](https://docs.alldomains.id/protocol/developer-guide/ad-sdks\#how-to-integrate-alldomains-protocol) How to integrate AllDomains Protocol: libraries are opensource with MIT licenses: Typescript: [https://github.com/onsol-labs/tld-parser](https://github.com/onsol-labs/tld-parser) Rust: [https://github.com/onsol-labs/tld-parse](https://github.com/onsol-labs/tld-parser) [-rs](https://github.com/onsol-labs/tld-parser-rs) #### [Direct link to heading](https://docs.alldomains.id/protocol/developer-guide/ad-sdks\#id-1.-installation) 1\. Installation Copy ```inline-grid min-w-full grid-cols-[auto_1fr] p-2 [count-reset:line] print:whitespace-pre-wrap npm install @onsol/tldparser ethers ``` #### [Direct link to heading](https://docs.alldomains.id/protocol/developer-guide/ad-sdks\#id-2.-domain-resolution) 2\. Domain Resolution The following code shows how to get the Public Key owner of a domain name - works with **any AllDomains TLD** Copy ```inline-grid min-w-full grid-cols-[auto_1fr] p-2 [count-reset:line] print:whitespace-pre-wrap import { TldParser } from "@onsol/tldparser"; import { Connection } from "@solana/web3.js"; const RPC_URL = 'https://api.mainnet-beta.solana.com'; // initialize a Solana Connection const connection = new Connection(RPC_URL); // get the owner pubkey of a domain name async function resolveDomain(domain){ // initialize a Tld Parser const parser = new TldParser(connection); return await parser.getOwnerFromDomainTld(domain); } //get the owner pubkey of "miester.abc"; resolveDomain("miester.abc"); //get the owner pubkey of "miester.bonk" resolveDomain("miester.bonk"); //get the owner pubkey of "miester.poor" resolveDomain("miester.poor"); ``` #### [Direct link to heading](https://docs.alldomains.id/protocol/developer-guide/ad-sdks\#id-3.-get-domains-owned-by-a-public-key) 3\. Get domains owned by a Public Key **a. Get all owned domains** Copy ```inline-grid min-w-full grid-cols-[auto_1fr] p-2 [count-reset:line] print:whitespace-pre-wrap import { TldParser, NameRecordHeader } from "@onsol/tldparser"; import { Connection, PublicKey } from "@solana/web3.js"; const RPC_URL = 'https://api.mainnet-beta.solana.com'; // initialize a Solana Connection const connection = new Connection(RPC_URL); // get all the domains owned by a public key async function getOwnedDomains(owner: PublicKey){ // initialize a Tld Parser const parser = new TldParser(connection); // get all owned domains let allUserDomains = await parser.getParsedAllUserDomains(owner); return allUserDomains; } // get all owned domains getOwnedDomains(new PublicKey("")); ``` **b. Get only unwrapped owned domains** Copy ```inline-grid min-w-full grid-cols-[auto_1fr] p-2 [count-reset:line] print:whitespace-pre-wrap import { TldParser, NameRecordHeader } from "@onsol/tldparser"; import { Connection, PublicKey } from "@solana/web3.js"; const RPC_URL = 'https://api.mainnet-beta.solana.com'; // initialize a Solana Connection const connection = new Connection(RPC_URL); // get only the unwrapped domains owned by a public key async function getOwnedUnwrappedDomains(owner: PublicKey){ // initialize a Tld Parser const parser = new TldParser(connection); // get only unwrapped domains let unwrappedUserDomains = await parser.getParsedAllUserDomainsUnwrapped(owner); return unwrappedUserDomains; } // get only unwrapped owned domains getOwnedUnwrappedDomains(new PublicKey("")); ``` #### [Direct link to heading](https://docs.alldomains.id/protocol/developer-guide/ad-sdks\#id-4.-get-domains-owned-by-a-public-key-from-a-specific-tld) 4\. Get domains owned by a Public Key from a specific TLD **a. Get all owned domains from a specific TLD** Copy ```inline-grid min-w-full grid-cols-[auto_1fr] p-2 [count-reset:line] print:whitespace-pre-wrap import { TldParser, NameRecordHeader } from "@onsol/tldparser"; import { Connection, PublicKey } from "@solana/web3.js"; const RPC_URL = 'https://api.mainnet-beta.solana.com'; // initialize a Solana Connection const connection = new Connection(RPC_URL); // get the all the domains owned by a public key in a TLD async function getOwnedDomainsFromTld(owner, tld){ // initialize a Tld Parser const parser = new TldParser(connection); // get all owned domains from a TLD let ownedDomainsFromTld = parser.getParsedAllUserDomainsFromTld(owner, tld); return ownedDomainsFromTld; } //get all owned domains in the ".abc" Tld, without the "." getOwnedDomainsFromTld(new PublicKey(""), "abc"); //get all owned domains in the ".bonk" Tld, without the "." getOwnedDomainsFromTld(new PublicKey(""), "bonk"); //get all owned domains in the ".poor" Tld, without the "." getOwnedDomainsFromTld(new PublicKey(""), "poor"); ``` **b. Get all only unwrapped owned domains from a specific TLD** Copy ```inline-grid min-w-full grid-cols-[auto_1fr] p-2 [count-reset:line] print:whitespace-pre-wrap import { TldParser, NameRecordHeader } from "@onsol/tldparser"; import { Connection, PublicKey } from "@solana/web3.js"; const RPC_URL = 'https://api.mainnet-beta.solana.com'; // initialize a Solana Connection const connection = new Connection(RPC_URL); // get only the unwrapped domains owned by a public key from a TLD async function getOwnedUnwrappedDomainsFromTld(owner, tld){ // initialize a Tld Parser const parser = new TldParser(connection); // get only unwrapped domains from a TLD let ownedUnwrappedDomainsFromTld = parser.getParsedAllUserDomainsFromTldUnwrapped(owner, tld); return ownedUnwrappedDomainsFromTld; } //get owned unwraped domains in the ".abc" Tld, without the "." getOwnedUnwrappedDomainsFromTld(new PublicKey(""), "abc"); //get owned unwraped domains in the ".bonk" Tld getOwnedUnwrappedDomainsFromTld(new PublicKey(""), "bonk"); //get owned unwraped domains in the ".poor" Tld getOwnedUnwrappedDomainsFromTld(new PublicKey(""), "poor"); ``` #### [Direct link to heading](https://docs.alldomains.id/protocol/developer-guide/ad-sdks\#id-5.-get-all-active-alldomains-tlds) 5\. Get all active AllDomains TLDs Copy ```inline-grid min-w-full grid-cols-[auto_1fr] p-2 [count-reset:line] print:whitespace-pre-wrap import { getAllTld } from "@onsol/tldparser"; import { Connection } from "@solana/web3.js"; const RPC_URL = 'https://api.mainnet-beta.solana.com'; // initialize a Solana Connection const connection = new Connection(RPC_URL); //get all active AllDomains TLDs const allTlds = await getAllTld(connection); ``` #### [Direct link to heading](https://docs.alldomains.id/protocol/developer-guide/ad-sdks\#id-6.-get-all-domains-registered-in-all-tlds) 6\. Get all domains registered in All TLDs Copy ```inline-grid min-w-full grid-cols-[auto_1fr] p-2 [count-reset:line] print:whitespace-pre-wrap import { NameRecordHeader, TldParser, findAllDomainsForTld, getAllTld } from "@onsol/tldparser"; import { Connection } from "@solana/web3.js"; const RPC_URL = 'https://api.mainnet-beta.solana.com'; // initialize a Solana Connection const connection = new Connection(RPC_URL); // slow // please use no. 8 for a batch/faster implementation // this code doesn't check if a domain is expired or not async function getAllRegisteredDomains(connection: Connection){ //get all TLDs const allTlds = await getAllTld(connection); const parser = new TldParser(connection); let domains = []; for (let tld of allTlds) { //get the parent name record for a TLD const parentNameRecord = await NameRecordHeader.fromAccountAddress(connection, tld.parentAccount); //get all name accounts in a specific TLD const allNameAccountsForTld = await findAllDomainsForTld(connection, tld.parentAccount); if (!parentNameRecord || !parentNameRecord.owner) return; //parse all name accounts in a specific TLD for (let nameAccount of allNameAccountsForTld) { //get domain as string without the tld const domain = await parser.reverseLookupNameAccount(nameAccount, parentNameRecord.owner); domains.push( { nameAccount: nameAccount, domain: `${domain}${tld.tld}` }); } } return domains; } // get all domains registered on AllDomains console.log(await getAllRegisteredDomains(connection)) ``` 1. #### [Direct link to heading](https://docs.alldomains.id/protocol/developer-guide/ad-sdks\#get-user-main-domain) Get User Main Domain Copy ```inline-grid min-w-full grid-cols-[auto_1fr] p-2 [count-reset:line] print:whitespace-pre-wrap import { MainDomain, findMainDomain } from "@onsol/tldparser"; import { Connection, PublicKey } from "@solana/web3.js"; // returns MainDomain struct if it is available. it will return undefined if it is not. // MainDomains are usually shown as mainDomain.domain + mainDomain.tld // the mainDomain.nameAccount is proof that the user has set it. const fetchMainDomain = async (connection: Connection, pubkey: string | PublicKey): Promise => { if (typeof pubkey === "string") { pubkey = new PublicKey(pubkey) } const [mainDomainPubkey] = findMainDomain(pubkey); let mainDomain = undefined; try { mainDomain = await MainDomain.fromAccountAddress( connection, mainDomainPubkey, ); return mainDomain } catch (e) { console.log("No main domain found") } return mainDomain }; const CONNECTION = new Connection(""); console.log(await fetchMainDomain(CONNECTION, "2EGGxj2qbNAJNgLCPKca8sxZYetyTjnoRspTPjzN2D67")) // MainDomain { // nameAccount: PublicKey [PublicKey(9YzfCEHb62bQ47snUyjkxhC9Eb6y7CSodK3m8CKWstjV)] { // _bn: // }, // tld: '.abc', // domain: 'miester' // } ``` #### [Direct link to heading](https://docs.alldomains.id/protocol/developer-guide/ad-sdks\#id-8.-batch-get-alldomains-domains) 8\. Batch get AllDomains Domains Copy ```inline-grid min-w-full grid-cols-[auto_1fr] p-2 [count-reset:line] print:whitespace-pre-wrap import { ANS_PROGRAM_ID, findNameHouse, findNftRecord, getAllTld, getHashedName, getNameAccountKeyWithBump, NameRecordHeader, NftRecord, TldParser, } from "@onsol/tldparser"; import { Connection, GetProgramAccountsResponse, PublicKey, } from "@solana/web3.js"; import { setTimeout } from "timers/promises"; const connection = new Connection(""); async function findAllDomainsForTld( connection: Connection, parentAccount: PublicKey, ): Promise<{ pubkey: PublicKey; nameRecordHeader: NameRecordHeader }[]> { const filters: any = [\ {\ memcmp: {\ offset: 8,\ bytes: parentAccount.toBase58(),\ },\ },\ ]; const accounts: GetProgramAccountsResponse = await connection.getProgramAccounts(ANS_PROGRAM_ID, { filters: filters, }); return accounts.map((a) => { return { pubkey: a.pubkey, nameRecordHeader: NameRecordHeader.fromAccountInfo(a.account), }; }); } export async function performReverseLookupBatched( connection: Connection, nameAccounts: PublicKey[], tldHouse: PublicKey, ): Promise<(string | undefined)[]> { let reverseLookupDomains: (string | undefined)[] = []; while (nameAccounts.length > 0) { const currentBatch = nameAccounts.splice(0, 100); const promises = currentBatch.map(async (nameAccount) => { const reverseLookupHashedName = await getHashedName( nameAccount.toBase58(), ); const [reverseLookUpAccount] = getNameAccountKeyWithBump( reverseLookupHashedName, tldHouse, undefined, ); return reverseLookUpAccount; }); const reverseLookUpAccounts: PublicKey[] = await Promise.all(promises); const reverseLookupAccountInfos = await connection.getMultipleAccountsInfo(reverseLookUpAccounts); const batchDomains = reverseLookupAccountInfos.map( (reverseLookupAccountInfo) => { const domain = reverseLookupAccountInfo?.data .subarray(200, reverseLookupAccountInfo?.data.length) .toString(); return domain; }, ); reverseLookupDomains = reverseLookupDomains.concat(batchDomains); } return reverseLookupDomains; } // onlyDomains will grab only domains and no nfts async function getAllRegisteredDomains( tldExpected?: string, onlyDomains: boolean = false, ) { // get all TLDs const allTlds = await getAllTld(connection); const domains = []; for (const tld of allTlds) { if (tldExpected) { if (tld.tld != tldExpected) continue; } // get the parent name record for a TLD const parentNameRecord = await NameRecordHeader.fromAccountAddress( connection, tld.parentAccount, ); if (!parentNameRecord) continue; if (!parentNameRecord.owner) continue; // get all name accounts in a specific TLD const allNameAccountsForTld = await findAllDomainsForTld( connection, tld.parentAccount, ); await setTimeout(50); const [nameHouseAccount] = findNameHouse(parentNameRecord.owner); const nameAccountPubkeys = allNameAccountsForTld.map((a) => a.pubkey); const domainsReverse = await performReverseLookupBatched( connection, nameAccountPubkeys, parentNameRecord.owner, ); let index = 0; for (const domain of domainsReverse) { const [nftRecord] = findNftRecord( allNameAccountsForTld[index].pubkey, nameHouseAccount, ); let finalOwner = allNameAccountsForTld[index].nameRecordHeader.owner?.toString(); if (finalOwner == nftRecord.toString() && !onlyDomains) { const nftRecordData = await NftRecord.fromAccountAddress( connection, nftRecord, ); const largestAccounts = await connection.getTokenLargestAccounts( nftRecordData.nftMintAccount, ); if (largestAccounts.value.length > 0) { const largestAccountInfo = await connection.getParsedAccountInfo( largestAccounts.value[0].address, ); if (largestAccountInfo?.value?.data) { finalOwner = new PublicKey( // @ts-ignore largestAccountInfo.value.data.parsed.info.owner, ).toString(); } } await setTimeout(50); } domains.push({ nameAccount: allNameAccountsForTld[index].pubkey, domain: `${domain}${tld.tld}`, owner: finalOwner, expiresAt: allNameAccountsForTld[index].nameRecordHeader.expiresAt, createdAt: allNameAccountsForTld[index].nameRecordHeader.createdAt, }); index += 1; } } return domains; } async function main() { // or ".eyekon" or ".superteam" or ".monke" // if tldExpected is undefined it will grab all domains const tldExpected: string | undefined = ".zk"; // if set true it will grab only domains and no nfts const onlyDomains = false; const domains = await getAllRegisteredDomains(tldExpected, onlyDomains); console.log(JSON.stringify(domains)); // console.log(domains?.length) } // get all domains registered on AllDomains main(); ``` #### [Direct link to heading](https://docs.alldomains.id/protocol/developer-guide/ad-sdks\#id-9.-batch-get-main-domains) 9\. Batch get Main Domains Copy ```inline-grid min-w-full grid-cols-[auto_1fr] p-2 [count-reset:line] print:whitespace-pre-wrap import { MainDomain, findMainDomain, } from "@onsol/tldparser"; import { Connection, PublicKey } from "@solana/web3.js"; import pLimit from "p-limit"; // const connection = new Connection(""); export const getMultipleMainDomains = async ( connection: Connection, pubkeys: PublicKey[], ): Promise<{ pubkey: string; mainDomain: string | undefined }[]> => { const mainDomainKeys = pubkeys.map((pubkey) => findMainDomain(pubkey)[0]); const mainDomainAccounts = await connection.getMultipleAccountsInfo(mainDomainKeys); return pubkeys.map((pubkey, index) => { const mainDomainAccount = mainDomainAccounts[index]; if (!!mainDomainAccount?.data) { const mainDomainData = MainDomain.fromAccountInfo(mainDomainAccount)[0]; return { pubkey: pubkey.toString(), mainDomain: mainDomainData.domain + mainDomainData.tld, }; } return { pubkey: pubkey.toString(), mainDomain: undefined }; }); }; // retrives users main domain in batches of 100 with pLimit of 20 it calls the rpc 20 times per second // thus, 2000 accounts data can be fetched per second. // pLimit could be increased depending on your rpc limits. async function getMainDomainsSample(connection: Connection, data: any[]) { const mainDomains: { pubkey: string; mainDomain: string | undefined }[] = []; const batches = []; for (let i = 0; i < data.length; i += 100) { batches.push(data.slice(i, i + 100)); } const limit = pLimit(20); await Promise.all( batches.map(async (batch) => { await limit(async () => { const publicKeys = batch.map((data) => data.userPubkey ? new PublicKey(data.userPubkey) : PublicKey.default, ); mainDomains.push( ...(await getMultipleMainDomains(connection, publicKeys)), ); }); }), ); return mainDomains } ``` [PreviousPrograms](https://docs.alldomains.id/protocol/developer-guide/programs) [NextSVM SDKs](https://docs.alldomains.id/protocol/developer-guide/ad-sdks/svm-sdks) Last updated 1 year ago ## SDKs for Mainnets [Solana mainnet SDK](https://docs.alldomains.id/protocol/developer-guide/ad-sdks/svm-sdks/solana-mainnet-sdk) [Eclipse mainnet SDK](https://docs.alldomains.id/protocol/developer-guide/ad-sdks/svm-sdks/eclipse-mainnet-sdk) [SOON mainnet SDK](https://docs.alldomains.id/protocol/developer-guide/ad-sdks/svm-sdks/soon-mainnet-sdk) [Sonic mainnet SDK](https://docs.alldomains.id/protocol/developer-guide/ad-sdks/svm-sdks/sonic-mainnet-sdk) [Yona devnet SDK](https://docs.alldomains.id/protocol/developer-guide/ad-sdks/svm-sdks/yona-devnet-sdk) [PreviousAD SDKs](https://docs.alldomains.id/protocol/developer-guide/ad-sdks) [NextSolana mainnet SDK](https://docs.alldomains.id/protocol/developer-guide/ad-sdks/svm-sdks/solana-mainnet-sdk) ## AllDomains Solana SDK ### [Direct link to heading](https://docs.alldomains.id/protocol/developer-guide/ad-sdks/svm-sdks/solana-mainnet-sdk\#how-to-integrate-alldomains-protocol) How to integrate AllDomains Protocol: libraries are opensource with MIT licenses: Typescript: [https://github.com/onsol-labs/tld-parser](https://github.com/onsol-labs/tld-parser) Rust: [https://github.com/onsol-labs/tld-parse](https://github.com/onsol-labs/tld-parser) [-rs](https://github.com/onsol-labs/tld-parser-rs) #### [Direct link to heading](https://docs.alldomains.id/protocol/developer-guide/ad-sdks/svm-sdks/solana-mainnet-sdk\#id-1.-installation) 1\. Installation Copy ```inline-grid min-w-full grid-cols-[auto_1fr] p-2 [count-reset:line] print:whitespace-pre-wrap npm install @onsol/tldparser ``` #### [Direct link to heading](https://docs.alldomains.id/protocol/developer-guide/ad-sdks/svm-sdks/solana-mainnet-sdk\#id-2.-domain-resolution) 2\. Domain Resolution The following code shows how to get the Public Key owner of a domain name - works with **any AllDomains TLD** Copy ```inline-grid min-w-full grid-cols-[auto_1fr] p-2 [count-reset:line] print:whitespace-pre-wrap import { TldParser } from "@onsol/tldparser"; import { Connection } from "@solana/web3.js"; const RPC_URL = 'https://api.mainnet-beta.solana.com'; // initialize a Solana Connection const connection = new Connection(RPC_URL); // get the owner pubkey of a domain name async function resolveDomain(domain){ // initialize a Tld Parser const parser = new TldParser(connection); return await parser.getOwnerFromDomainTld(domain); } //get the owner pubkey of "miester.solana"; resolveDomain("miester.solana"); //get the owner pubkey of "miester.bonk" resolveDomain("miester.bonk"); //get the owner pubkey of "miester.poor" resolveDomain("miester.poor"); ``` #### [Direct link to heading](https://docs.alldomains.id/protocol/developer-guide/ad-sdks/svm-sdks/solana-mainnet-sdk\#id-3.-get-domains-owned-by-a-public-key) 3\. Get domains owned by a Public Key **a. Get all owned domains** Copy ```inline-grid min-w-full grid-cols-[auto_1fr] p-2 [count-reset:line] print:whitespace-pre-wrap import { TldParser, NameRecordHeader } from "@onsol/tldparser"; import { Connection, PublicKey } from "@solana/web3.js"; const RPC_URL = 'https://api.mainnet-beta.solana.com'; // initialize a Solana Connection const connection = new Connection(RPC_URL); // get all the domains owned by a public key async function getOwnedDomains(owner: PublicKey){ // initialize a Tld Parser const parser = new TldParser(connection); // get all owned domains let allUserDomains = await parser.getParsedAllUserDomains(owner); return allUserDomains; } // get all owned domains getOwnedDomains(new PublicKey("")); ``` **b. Get only unwrapped owned domains** Copy ```inline-grid min-w-full grid-cols-[auto_1fr] p-2 [count-reset:line] print:whitespace-pre-wrap import { TldParser, NameRecordHeader } from "@onsol/tldparser"; import { Connection, PublicKey } from "@solana/web3.js"; const RPC_URL = 'https://api.mainnet-beta.solana.com'; // initialize a Solana Connection const connection = new Connection(RPC_URL); // get only the unwrapped domains owned by a public key async function getOwnedUnwrappedDomains(owner: PublicKey){ // initialize a Tld Parser const parser = new TldParser(connection); // get only unwrapped domains let unwrappedUserDomains = await parser.getParsedAllUserDomainsUnwrapped(owner); return unwrappedUserDomains; } // get only unwrapped owned domains getOwnedUnwrappedDomains(new PublicKey("")); ``` #### [Direct link to heading](https://docs.alldomains.id/protocol/developer-guide/ad-sdks/svm-sdks/solana-mainnet-sdk\#id-4.-get-domains-owned-by-a-public-key-from-a-specific-tld) 4\. Get domains owned by a Public Key from a specific TLD **a. Get all owned domains from a specific TLD** Copy ```inline-grid min-w-full grid-cols-[auto_1fr] p-2 [count-reset:line] print:whitespace-pre-wrap import { TldParser, NameRecordHeader } from "@onsol/tldparser"; import { Connection, PublicKey } from "@solana/web3.js"; const RPC_URL = 'https://api.mainnet-beta.solana.com'; // initialize a Solana Connection const connection = new Connection(RPC_URL); // get the all the domains owned by a public key in a TLD async function getOwnedDomainsFromTld(owner, tld){ // initialize a Tld Parser const parser = new TldParser(connection); // get all owned domains from a TLD let ownedDomainsFromTld = parser.getParsedAllUserDomainsFromTld(owner, tld); return ownedDomainsFromTld; } //get all owned domains in the ".solana" Tld, without the "." getOwnedDomainsFromTld(new PublicKey(""), "solana"); //get all owned domains in the ".bonk" Tld, without the "." getOwnedDomainsFromTld(new PublicKey(""), "bonk"); //get all owned domains in the ".poor" Tld, without the "." getOwnedDomainsFromTld(new PublicKey(""), "poor"); ``` **b. Get all only unwrapped owned domains from a specific TLD** Copy ```inline-grid min-w-full grid-cols-[auto_1fr] p-2 [count-reset:line] print:whitespace-pre-wrap import { TldParser, NameRecordHeader } from "@onsol/tldparser"; import { Connection, PublicKey } from "@solana/web3.js"; const RPC_URL = 'https://api.mainnet-beta.solana.com'; // initialize a Solana Connection const connection = new Connection(RPC_URL); // get only the unwrapped domains owned by a public key from a TLD async function getOwnedUnwrappedDomainsFromTld(owner, tld){ // initialize a Tld Parser const parser = new TldParser(connection); // get only unwrapped domains from a TLD let ownedUnwrappedDomainsFromTld = parser.getParsedAllUserDomainsFromTldUnwrapped(owner, tld); return ownedUnwrappedDomainsFromTld; } // get owned unwraped domains in the ".solana" Tld, without the "." getOwnedUnwrappedDomainsFromTld(new PublicKey(""), "solana"); // get owned unwraped domains in the ".bonk" Tld getOwnedUnwrappedDomainsFromTld(new PublicKey(""), "bonk"); // get owned unwraped domains in the ".poor" Tld getOwnedUnwrappedDomainsFromTld(new PublicKey(""), "poor"); ``` #### [Direct link to heading](https://docs.alldomains.id/protocol/developer-guide/ad-sdks/svm-sdks/solana-mainnet-sdk\#id-5.-get-all-active-alldomains-tlds) 5\. Get all active AllDomains TLDs Copy ```inline-grid min-w-full grid-cols-[auto_1fr] p-2 [count-reset:line] print:whitespace-pre-wrap import { getAllTld } from "@onsol/tldparser"; import { Connection } from "@solana/web3.js"; const RPC_URL = 'https://api.mainnet-beta.solana.com'; // initialize a Solana Connection const connection = new Connection(RPC_URL); // get all active AllDomains TLDs const allTlds = await getAllTld(connection); ``` #### [Direct link to heading](https://docs.alldomains.id/protocol/developer-guide/ad-sdks/svm-sdks/solana-mainnet-sdk\#id-6.-get-all-domains-registered-in-all-tlds) 6\. Get all domains registered in All TLDs Copy ```inline-grid min-w-full grid-cols-[auto_1fr] p-2 [count-reset:line] print:whitespace-pre-wrap import { NameRecordHeader, TldParser, findAllDomainsForTld, getAllTld } from "@onsol/tldparser"; import { Connection } from "@solana/web3.js"; const RPC_URL = 'https://api.mainnet-beta.solana.com'; // initialize a Solana Connection const connection = new Connection(RPC_URL); // slow // please use no. 8 for a batch/faster implementation // this code doesn't check if a domain is expired or not async function getAllRegisteredDomains(connection: Connection){ //get all TLDs const allTlds = await getAllTld(connection); const parser = new TldParser(connection); let domains = []; for (let tld of allTlds) { //get the parent name record for a TLD const parentNameRecord = await NameRecordHeader.fromAccountAddress(connection, tld.parentAccount); //get all name accounts in a specific TLD const allNameAccountsForTld = await findAllDomainsForTld(connection, tld.parentAccount); if (!parentNameRecord || !parentNameRecord.owner) return; //parse all name accounts in a specific TLD for (let nameAccount of allNameAccountsForTld) { //get domain as string without the tld const domain = await parser.reverseLookupNameAccount(nameAccount, parentNameRecord.owner); domains.push( { nameAccount: nameAccount, domain: `${domain}${tld.tld}` }); } } return domains; } // get all domains registered on AllDomains console.log(await getAllRegisteredDomains(connection)) ``` 1. #### [Direct link to heading](https://docs.alldomains.id/protocol/developer-guide/ad-sdks/svm-sdks/solana-mainnet-sdk\#get-user-main-domain) Get User Main Domain Copy ```inline-grid min-w-full grid-cols-[auto_1fr] p-2 [count-reset:line] print:whitespace-pre-wrap import { MainDomain, findMainDomain } from "@onsol/tldparser"; import { Connection, PublicKey } from "@solana/web3.js"; // returns MainDomain struct if it is available. it will return undefined if it is not. // MainDomains are usually shown as mainDomain.domain + mainDomain.tld // the mainDomain.nameAccount is proof that the user has set it. const fetchMainDomain = async (connection: Connection, pubkey: string | PublicKey): Promise => { if (typeof pubkey === "string") { pubkey = new PublicKey(pubkey) } const [mainDomainPubkey] = findMainDomain(pubkey); let mainDomain = undefined; try { mainDomain = await MainDomain.fromAccountAddress( connection, mainDomainPubkey, ); return mainDomain } catch (e) { console.log("No main domain found") } return mainDomain }; const CONNECTION = new Connection(""); console.log(await fetchMainDomain(CONNECTION, "2EGGxj2qbNAJNgLCPKca8sxZYetyTjnoRspTPjzN2D67")) // MainDomain { // nameAccount: PublicKey [PublicKey(9YzfCEHb62bQ47snUyjkxhC9Eb6y7CSodK3m8CKWstjV)] { // _bn: // }, // tld: '.solana', // domain: 'miester' // } ``` #### [Direct link to heading](https://docs.alldomains.id/protocol/developer-guide/ad-sdks/svm-sdks/solana-mainnet-sdk\#id-8.-batch-get-alldomains-domains) 8\. Batch get AllDomains Domains Copy ```inline-grid min-w-full grid-cols-[auto_1fr] p-2 [count-reset:line] print:whitespace-pre-wrap import { ANS_PROGRAM_ID, findNameHouse, findNftRecord, getAllTld, getHashedName, getNameAccountKeyWithBump, NameRecordHeader, NftRecord, TldParser, } from "@onsol/tldparser"; import { Connection, GetProgramAccountsResponse, PublicKey, } from "@solana/web3.js"; import { setTimeout } from "timers/promises"; const connection = new Connection(""); async function findAllDomainsForTld( connection: Connection, parentAccount: PublicKey, ): Promise<{ pubkey: PublicKey; nameRecordHeader: NameRecordHeader }[]> { const filters: any = [\ {\ memcmp: {\ offset: 8,\ bytes: parentAccount.toBase58(),\ },\ },\ ]; const accounts: GetProgramAccountsResponse = await connection.getProgramAccounts(ANS_PROGRAM_ID, { filters: filters, }); return accounts.map((a) => { return { pubkey: a.pubkey, nameRecordHeader: NameRecordHeader.fromAccountInfo(a.account), }; }); } export async function performReverseLookupBatched( connection: Connection, nameAccounts: PublicKey[], tldHouse: PublicKey, ): Promise<(string | undefined)[]> { let reverseLookupDomains: (string | undefined)[] = []; while (nameAccounts.length > 0) { const currentBatch = nameAccounts.splice(0, 100); const promises = currentBatch.map(async (nameAccount) => { const reverseLookupHashedName = await getHashedName( nameAccount.toBase58(), ); const [reverseLookUpAccount] = getNameAccountKeyWithBump( reverseLookupHashedName, tldHouse, undefined, ); return reverseLookUpAccount; }); const reverseLookUpAccounts: PublicKey[] = await Promise.all(promises); const reverseLookupAccountInfos = await connection.getMultipleAccountsInfo(reverseLookUpAccounts); const batchDomains = reverseLookupAccountInfos.map( (reverseLookupAccountInfo) => { const domain = reverseLookupAccountInfo?.data .subarray(200, reverseLookupAccountInfo?.data.length) .toString(); return domain; }, ); reverseLookupDomains = reverseLookupDomains.concat(batchDomains); } return reverseLookupDomains; } // onlyDomains will grab only domains and no nfts async function getAllRegisteredDomains( tldExpected?: string, onlyDomains: boolean = false, ) { // get all TLDs const allTlds = await getAllTld(connection); const domains = []; for (const tld of allTlds) { if (tldExpected) { if (tld.tld != tldExpected) continue; } // get the parent name record for a TLD const parentNameRecord = await NameRecordHeader.fromAccountAddress( connection, tld.parentAccount, ); if (!parentNameRecord) continue; if (!parentNameRecord.owner) continue; // get all name accounts in a specific TLD const allNameAccountsForTld = await findAllDomainsForTld( connection, tld.parentAccount, ); await setTimeout(50); const [nameHouseAccount] = findNameHouse(parentNameRecord.owner); const nameAccountPubkeys = allNameAccountsForTld.map((a) => a.pubkey); const domainsReverse = await performReverseLookupBatched( connection, nameAccountPubkeys, parentNameRecord.owner, ); let index = 0; for (const domain of domainsReverse) { const [nftRecord] = findNftRecord( allNameAccountsForTld[index].pubkey, nameHouseAccount, ); let finalOwner = allNameAccountsForTld[index].nameRecordHeader.owner?.toString(); if (finalOwner == nftRecord.toString() && !onlyDomains) { const nftRecordData = await NftRecord.fromAccountAddress( connection, nftRecord, ); const largestAccounts = await connection.getTokenLargestAccounts( nftRecordData.nftMintAccount, ); if (largestAccounts.value.length > 0) { const largestAccountInfo = await connection.getParsedAccountInfo( largestAccounts.value[0].address, ); if (largestAccountInfo?.value?.data) { finalOwner = new PublicKey( // @ts-ignore largestAccountInfo.value.data.parsed.info.owner, ).toString(); } } await setTimeout(50); } domains.push({ nameAccount: allNameAccountsForTld[index].pubkey, domain: `${domain}${tld.tld}`, owner: finalOwner, expiresAt: allNameAccountsForTld[index].nameRecordHeader.expiresAt, createdAt: allNameAccountsForTld[index].nameRecordHeader.createdAt, }); index += 1; } } return domains; } async function main() { // or ".eyekon" or ".superteam" or ".monke" // if tldExpected is undefined it will grab all domains const tldExpected: string | undefined = ".zk"; // if set true it will grab only domains and no nfts const onlyDomains = false; const domains = await getAllRegisteredDomains(tldExpected, onlyDomains); console.log(JSON.stringify(domains)); // console.log(domains?.length) } // get all domains registered on AllDomains main(); ``` #### [Direct link to heading](https://docs.alldomains.id/protocol/developer-guide/ad-sdks/svm-sdks/solana-mainnet-sdk\#id-9.-batch-get-main-domains) 9\. Batch get Main Domains Copy ```inline-grid min-w-full grid-cols-[auto_1fr] p-2 [count-reset:line] print:whitespace-pre-wrap import { MainDomain, findMainDomain, } from "@onsol/tldparser"; import { Connection, PublicKey } from "@solana/web3.js"; import pLimit from "p-limit"; // const connection = new Connection(""); export const getMultipleMainDomains = async ( connection: Connection, pubkeys: PublicKey[], ): Promise<{ pubkey: string; mainDomain: string | undefined }[]> => { const mainDomainKeys = pubkeys.map((pubkey) => findMainDomain(pubkey)[0]); const mainDomainAccounts = await connection.getMultipleAccountsInfo(mainDomainKeys); return pubkeys.map((pubkey, index) => { const mainDomainAccount = mainDomainAccounts[index]; if (!!mainDomainAccount?.data) { const mainDomainData = MainDomain.fromAccountInfo(mainDomainAccount)[0]; return { pubkey: pubkey.toString(), mainDomain: mainDomainData.domain + mainDomainData.tld, }; } return { pubkey: pubkey.toString(), mainDomain: undefined }; }); }; // retrives users main domain in batches of 100 with pLimit of 20 it calls the rpc 20 times per second // thus, 2000 accounts data can be fetched per second. // pLimit could be increased depending on your rpc limits. async function getMainDomainsSample(connection: Connection, data: any[]) { const mainDomains: { pubkey: string; mainDomain: string | undefined }[] = []; const batches = []; for (let i = 0; i < data.length; i += 100) { batches.push(data.slice(i, i + 100)); } const limit = pLimit(20); await Promise.all( batches.map(async (batch) => { await limit(async () => { const publicKeys = batch.map((data) => data.userPubkey ? new PublicKey(data.userPubkey) : PublicKey.default, ); mainDomains.push( ...(await getMultipleMainDomains(connection, publicKeys)), ); }); }), ); return mainDomains } ``` [PreviousSVM SDKs](https://docs.alldomains.id/protocol/developer-guide/ad-sdks/svm-sdks) [NextEclipse mainnet SDK](https://docs.alldomains.id/protocol/developer-guide/ad-sdks/svm-sdks/eclipse-mainnet-sdk) Last updated 1 month ago ## AllDomains Protocol SDK ### [Direct link to heading](https://docs.alldomains.id/protocol/developer-guide/ad-sdks/svm-sdks/eclipse-mainnet-sdk\#how-to-integrate-alldomains-protocol) How to integrate AllDomains Protocol: libraries are opensource with MIT licenses: Typescript: [https://github.com/onsol-labs/tld-parser](https://github.com/onsol-labs/tld-parser) Rust: [https://github.com/onsol-labs/tld-parse](https://github.com/onsol-labs/tld-parser) [-rs](https://github.com/onsol-labs/tld-parser-rs) #### [Direct link to heading](https://docs.alldomains.id/protocol/developer-guide/ad-sdks/svm-sdks/eclipse-mainnet-sdk\#id-1.-installation) 1\. Installation Copy ```inline-grid min-w-full grid-cols-[auto_1fr] p-2 [count-reset:line] print:whitespace-pre-wrap npm install @onsol/tldparser ``` #### [Direct link to heading](https://docs.alldomains.id/protocol/developer-guide/ad-sdks/svm-sdks/eclipse-mainnet-sdk\#id-2.-domain-resolution) 2\. Domain Resolution The following code shows how to get the Public Key owner of a domain name - works with **any AllDomains TLD** Copy ```inline-grid min-w-full grid-cols-[auto_1fr] p-2 [count-reset:line] print:whitespace-pre-wrap import { TldParser } from "@onsol/tldparser"; import { Connection } from "@solana/web3.js"; const RPC_URL = 'https://mainnetbeta-rpc.eclipse.xyz'; // initialize a Solana Connection const connection = new Connection(RPC_URL); // get the owner pubkey of a domain name async function resolveDomain(domain){ // initialize a Tld Parser const parser = new TldParser(connection); return await parser.getOwnerFromDomainTld(domain); } //get the owner pubkey of "miester.turbo"; resolveDomain("miester.turbo"); ``` #### [Direct link to heading](https://docs.alldomains.id/protocol/developer-guide/ad-sdks/svm-sdks/eclipse-mainnet-sdk\#id-3.-get-domains-owned-by-a-public-key) 3\. Get domains owned by a Public Key **a. Get all owned domains** Copy ```inline-grid min-w-full grid-cols-[auto_1fr] p-2 [count-reset:line] print:whitespace-pre-wrap import { TldParser, NameRecordHeader } from "@onsol/tldparser"; import { Connection, PublicKey } from "@solana/web3.js"; const RPC_URL = 'https://mainnetbeta-rpc.eclipse.xyz'; // initialize a Solana Connection const connection = new Connection(RPC_URL); // get all the domains owned by a public key async function getOwnedDomains(owner: PublicKey){ // initialize a Tld Parser const parser = new TldParser(connection); // get all owned domains let allUserDomains = await parser.getParsedAllUserDomains(owner); return allUserDomains; } // get all owned domains getOwnedDomains(new PublicKey("")); ``` **b. Get only unwrapped owned domains** Copy ```inline-grid min-w-full grid-cols-[auto_1fr] p-2 [count-reset:line] print:whitespace-pre-wrap import { TldParser, NameRecordHeader } from "@onsol/tldparser"; import { Connection, PublicKey } from "@solana/web3.js"; const RPC_URL = 'https://mainnetbeta-rpc.eclipse.xyz'; // initialize a Solana Connection const connection = new Connection(RPC_URL); // get only the unwrapped domains owned by a public key async function getOwnedUnwrappedDomains(owner: PublicKey){ // initialize a Tld Parser const parser = new TldParser(connection); // get only unwrapped domains let unwrappedUserDomains = await parser.getParsedAllUserDomainsUnwrapped(owner); return unwrappedUserDomains; } // get only unwrapped owned domains getOwnedUnwrappedDomains(new PublicKey("")); ``` #### [Direct link to heading](https://docs.alldomains.id/protocol/developer-guide/ad-sdks/svm-sdks/eclipse-mainnet-sdk\#id-4.-get-domains-owned-by-a-public-key-from-a-specific-tld) 4\. Get domains owned by a Public Key from a specific TLD **a. Get all owned domains from a specific TLD** Copy ```inline-grid min-w-full grid-cols-[auto_1fr] p-2 [count-reset:line] print:whitespace-pre-wrap import { TldParser, NameRecordHeader } from "@onsol/tldparser"; import { Connection, PublicKey } from "@solana/web3.js"; const RPC_URL = 'https://mainnetbeta-rpc.eclipse.xyz'; // initialize a Solana Connection const connection = new Connection(RPC_URL); // get the all the domains owned by a public key in a TLD async function getOwnedDomainsFromTld(owner, tld){ // initialize a Tld Parser const parser = new TldParser(connection); // get all owned domains from a TLD let ownedDomainsFromTld = parser.getParsedAllUserDomainsFromTld(owner, tld); return ownedDomainsFromTld; } // get all owned domains in the ".turbo" Tld, without the "." getOwnedDomainsFromTld(new PublicKey(""), "turbo"); ``` **b. Get all only unwrapped owned domains from a specific TLD** Copy ```inline-grid min-w-full grid-cols-[auto_1fr] p-2 [count-reset:line] print:whitespace-pre-wrap import { TldParser, NameRecordHeader } from "@onsol/tldparser"; import { Connection, PublicKey } from "@solana/web3.js"; const RPC_URL = 'https://mainnetbeta-rpc.eclipse.xyz'; // initialize a Solana Connection const connection = new Connection(RPC_URL); // get only the unwrapped domains owned by a public key from a TLD async function getOwnedUnwrappedDomainsFromTld(owner, tld){ // initialize a Tld Parser const parser = new TldParser(connection); // get only unwrapped domains from a TLD let ownedUnwrappedDomainsFromTld = parser.getParsedAllUserDomainsFromTldUnwrapped(owner, tld); return ownedUnwrappedDomainsFromTld; } // get owned unwraped domains in the ".turbo" Tld, without the "." getOwnedUnwrappedDomainsFromTld(new PublicKey(""), "turbo"); ``` #### [Direct link to heading](https://docs.alldomains.id/protocol/developer-guide/ad-sdks/svm-sdks/eclipse-mainnet-sdk\#id-5.-get-all-active-alldomains-tlds) 5\. Get all active AllDomains TLDs Copy ```inline-grid min-w-full grid-cols-[auto_1fr] p-2 [count-reset:line] print:whitespace-pre-wrap import { getAllTld } from "@onsol/tldparser"; import { Connection } from "@solana/web3.js"; const RPC_URL = 'https://mainnetbeta-rpc.eclipse.xyz'; // initialize a Solana Connection const connection = new Connection(RPC_URL); // get all active AllDomains TLDs const allTlds = await getAllTld(connection); ``` #### [Direct link to heading](https://docs.alldomains.id/protocol/developer-guide/ad-sdks/svm-sdks/eclipse-mainnet-sdk\#id-6.-get-all-domains-registered-in-all-tlds) 6\. Get all domains registered in All TLDs Copy ```inline-grid min-w-full grid-cols-[auto_1fr] p-2 [count-reset:line] print:whitespace-pre-wrap import { NameRecordHeader, TldParser, findAllDomainsForTld, getAllTld } from "@onsol/tldparser"; import { Connection } from "@solana/web3.js"; const RPC_URL = 'https://mainnetbeta-rpc.eclipse.xyz'; // initialize a Solana Connection const connection = new Connection(RPC_URL); // slow // please use no. 8 for a batch/faster implementation // this code doesn't check if a domain is expired or not async function getAllRegisteredDomains(connection: Connection){ //get all TLDs const allTlds = await getAllTld(connection); const parser = new TldParser(connection); let domains = []; for (let tld of allTlds) { //get the parent name record for a TLD const parentNameRecord = await NameRecordHeader.fromAccountAddress(connection, tld.parentAccount); //get all name accounts in a specific TLD const allNameAccountsForTld = await findAllDomainsForTld(connection, tld.parentAccount); if (!parentNameRecord || !parentNameRecord.owner) return; //parse all name accounts in a specific TLD for (let nameAccount of allNameAccountsForTld) { //get domain as string without the tld const domain = await parser.reverseLookupNameAccount(nameAccount, parentNameRecord.owner); domains.push( { nameAccount: nameAccount, domain: `${domain}${tld.tld}` }); } } return domains; } // get all domains registered on AllDomains console.log(await getAllRegisteredDomains(connection)) ``` 1. #### [Direct link to heading](https://docs.alldomains.id/protocol/developer-guide/ad-sdks/svm-sdks/eclipse-mainnet-sdk\#get-user-main-domain) Get User Main Domain Copy ```inline-grid min-w-full grid-cols-[auto_1fr] p-2 [count-reset:line] print:whitespace-pre-wrap import { MainDomain, findMainDomain } from "@onsol/tldparser"; import { Connection, PublicKey } from "@solana/web3.js"; // returns MainDomain struct if it is available. it will return undefined if it is not. // MainDomains are usually shown as mainDomain.domain + mainDomain.tld // the mainDomain.nameAccount is proof that the user has set it. const fetchMainDomain = async (connection: Connection, pubkey: string | PublicKey): Promise => { if (typeof pubkey === "string") { pubkey = new PublicKey(pubkey) } const [mainDomainPubkey] = findMainDomain(pubkey); let mainDomain = undefined; try { mainDomain = await MainDomain.fromAccountAddress( connection, mainDomainPubkey, ); return mainDomain } catch (e) { console.log("No main domain found") } return mainDomain }; const CONNECTION = new Connection(""); console.log(await fetchMainDomain(CONNECTION, "2EGGxj2qbNAJNgLCPKca8sxZYetyTjnoRspTPjzN2D67")) // MainDomain { // nameAccount: PublicKey [PublicKey(9YzfCEHb62bQ47snUyjkxhC9Eb6y7CSodK3m8CKWstjV)] { // _bn: // }, // tld: '.turbo', // domain: 'miester' // } ``` #### [Direct link to heading](https://docs.alldomains.id/protocol/developer-guide/ad-sdks/svm-sdks/eclipse-mainnet-sdk\#id-8.-batch-get-alldomains-domains) 8\. Batch get AllDomains Domains Copy ```inline-grid min-w-full grid-cols-[auto_1fr] p-2 [count-reset:line] print:whitespace-pre-wrap import { ANS_PROGRAM_ID, findNameHouse, findNftRecord, getAllTld, getHashedName, getNameAccountKeyWithBump, NameRecordHeader, NftRecord, TldParser, } from "@onsol/tldparser"; import { Connection, GetProgramAccountsResponse, PublicKey, } from "@solana/web3.js"; import { setTimeout } from "timers/promises"; const connection = new Connection(""); async function findAllDomainsForTld( connection: Connection, parentAccount: PublicKey, ): Promise<{ pubkey: PublicKey; nameRecordHeader: NameRecordHeader }[]> { const filters: any = [\ {\ memcmp: {\ offset: 8,\ bytes: parentAccount.toBase58(),\ },\ },\ ]; const accounts: GetProgramAccountsResponse = await connection.getProgramAccounts(ANS_PROGRAM_ID, { filters: filters, }); return accounts.map((a) => { return { pubkey: a.pubkey, nameRecordHeader: NameRecordHeader.fromAccountInfo(a.account), }; }); } export async function performReverseLookupBatched( connection: Connection, nameAccounts: PublicKey[], tldHouse: PublicKey, ): Promise<(string | undefined)[]> { let reverseLookupDomains: (string | undefined)[] = []; while (nameAccounts.length > 0) { const currentBatch = nameAccounts.splice(0, 100); const promises = currentBatch.map(async (nameAccount) => { const reverseLookupHashedName = await getHashedName( nameAccount.toBase58(), ); const [reverseLookUpAccount] = getNameAccountKeyWithBump( reverseLookupHashedName, tldHouse, undefined, ); return reverseLookUpAccount; }); const reverseLookUpAccounts: PublicKey[] = await Promise.all(promises); const reverseLookupAccountInfos = await connection.getMultipleAccountsInfo(reverseLookUpAccounts); const batchDomains = reverseLookupAccountInfos.map( (reverseLookupAccountInfo) => { const domain = reverseLookupAccountInfo?.data .subarray(200, reverseLookupAccountInfo?.data.length) .toString(); return domain; }, ); reverseLookupDomains = reverseLookupDomains.concat(batchDomains); } return reverseLookupDomains; } // onlyDomains will grab only domains and no nfts async function getAllRegisteredDomains( tldExpected?: string, onlyDomains: boolean = false, ) { // get all TLDs const allTlds = await getAllTld(connection); const domains = []; for (const tld of allTlds) { if (tldExpected) { if (tld.tld != tldExpected) continue; } // get the parent name record for a TLD const parentNameRecord = await NameRecordHeader.fromAccountAddress( connection, tld.parentAccount, ); if (!parentNameRecord) continue; if (!parentNameRecord.owner) continue; // get all name accounts in a specific TLD const allNameAccountsForTld = await findAllDomainsForTld( connection, tld.parentAccount, ); await setTimeout(50); const [nameHouseAccount] = findNameHouse(parentNameRecord.owner); const nameAccountPubkeys = allNameAccountsForTld.map((a) => a.pubkey); const domainsReverse = await performReverseLookupBatched( connection, nameAccountPubkeys, parentNameRecord.owner, ); let index = 0; for (const domain of domainsReverse) { const [nftRecord] = findNftRecord( allNameAccountsForTld[index].pubkey, nameHouseAccount, ); let finalOwner = allNameAccountsForTld[index].nameRecordHeader.owner?.toString(); if (finalOwner == nftRecord.toString() && !onlyDomains) { const nftRecordData = await NftRecord.fromAccountAddress( connection, nftRecord, ); const largestAccounts = await connection.getTokenLargestAccounts( nftRecordData.nftMintAccount, ); if (largestAccounts.value.length > 0) { const largestAccountInfo = await connection.getParsedAccountInfo( largestAccounts.value[0].address, ); if (largestAccountInfo?.value?.data) { finalOwner = new PublicKey( // @ts-ignore largestAccountInfo.value.data.parsed.info.owner, ).toString(); } } await setTimeout(50); } domains.push({ nameAccount: allNameAccountsForTld[index].pubkey, domain: `${domain}${tld.tld}`, owner: finalOwner, expiresAt: allNameAccountsForTld[index].nameRecordHeader.expiresAt, createdAt: allNameAccountsForTld[index].nameRecordHeader.createdAt, }); index += 1; } } return domains; } async function main() { // or ".eyekon" or ".superteam" or ".monke" // if tldExpected is undefined it will grab all domains const tldExpected: string | undefined = ".zk"; // if set true it will grab only domains and no nfts const onlyDomains = false; const domains = await getAllRegisteredDomains(tldExpected, onlyDomains); console.log(JSON.stringify(domains)); // console.log(domains?.length) } // get all domains registered on AllDomains main(); ``` #### [Direct link to heading](https://docs.alldomains.id/protocol/developer-guide/ad-sdks/svm-sdks/eclipse-mainnet-sdk\#id-9.-batch-get-main-domains) 9\. Batch get Main Domains Copy ```inline-grid min-w-full grid-cols-[auto_1fr] p-2 [count-reset:line] print:whitespace-pre-wrap import { MainDomain, findMainDomain, } from "@onsol/tldparser"; import { Connection, PublicKey } from "@solana/web3.js"; import pLimit from "p-limit"; // const connection = new Connection(""); export const getMultipleMainDomains = async ( connection: Connection, pubkeys: PublicKey[], ): Promise<{ pubkey: string; mainDomain: string | undefined }[]> => { const mainDomainKeys = pubkeys.map((pubkey) => findMainDomain(pubkey)[0]); const mainDomainAccounts = await connection.getMultipleAccountsInfo(mainDomainKeys); return pubkeys.map((pubkey, index) => { const mainDomainAccount = mainDomainAccounts[index]; if (!!mainDomainAccount?.data) { const mainDomainData = MainDomain.fromAccountInfo(mainDomainAccount)[0]; return { pubkey: pubkey.toString(), mainDomain: mainDomainData.domain + mainDomainData.tld, }; } return { pubkey: pubkey.toString(), mainDomain: undefined }; }); }; // retrives users main domain in batches of 100 with pLimit of 20 it calls the rpc 20 times per second // thus, 2000 accounts data can be fetched per second. // pLimit could be increased depending on your rpc limits. async function getMainDomainsSample(connection: Connection, data: any[]) { const mainDomains: { pubkey: string; mainDomain: string | undefined }[] = []; const batches = []; for (let i = 0; i < data.length; i += 100) { batches.push(data.slice(i, i + 100)); } const limit = pLimit(20); await Promise.all( batches.map(async (batch) => { await limit(async () => { const publicKeys = batch.map((data) => data.userPubkey ? new PublicKey(data.userPubkey) : PublicKey.default, ); mainDomains.push( ...(await getMultipleMainDomains(connection, publicKeys)), ); }); }), ); return mainDomains } ``` [PreviousSolana mainnet SDK](https://docs.alldomains.id/protocol/developer-guide/ad-sdks/svm-sdks/solana-mainnet-sdk) [NextSOON mainnet SDK](https://docs.alldomains.id/protocol/developer-guide/ad-sdks/svm-sdks/soon-mainnet-sdk) Last updated 5 months ago ## AllDomains SDK Integration How to integrate AllDomains Protocol: Libraries are opensource with MIT licenses: Typescript: [https://github.com/onsol-labs/tld-parser](https://github.com/onsol-labs/tld-parser) Rust: [https://github.com/onsol-labs/tld-parse](https://github.com/onsol-labs/tld-parser) [-rs](https://github.com/onsol-labs/tld-parser-rs) #### [Direct link to heading](https://docs.alldomains.id/protocol/developer-guide/ad-sdks/svm-sdks/soon-mainnet-sdk\#id-1.-installation) 1\. Installation Copy ```inline-grid min-w-full grid-cols-[auto_1fr] p-2 [count-reset:line] print:whitespace-pre-wrap npm install @onsol/tldparser ``` #### [Direct link to heading](https://docs.alldomains.id/protocol/developer-guide/ad-sdks/svm-sdks/soon-mainnet-sdk\#id-2.-domain-resolution) 2\. Domain Resolution The following code shows how to get the Public Key owner of a domain name - works with **any AllDomains TLD** Copy ```inline-grid min-w-full grid-cols-[auto_1fr] p-2 [count-reset:line] print:whitespace-pre-wrap import { TldParser } from "@onsol/tldparser"; import { Connection } from "@solana/web3.js"; const RPC_URL = 'https://rpc.mainnet.soo.network/rpc'; // initialize a Solana Connection const connection = new Connection(RPC_URL); // get the owner pubkey of a domain name async function resolveDomain(domain){ // initialize a Tld Parser const parser = new TldParser(connection); return await parser.getOwnerFromDomainTld(domain); } //get the owner pubkey of "miester.soon"; resolveDomain("miester.soon"); ``` #### [Direct link to heading](https://docs.alldomains.id/protocol/developer-guide/ad-sdks/svm-sdks/soon-mainnet-sdk\#id-3.-get-domains-owned-by-a-public-key) 3\. Get domains owned by a Public Key **a. Get all owned domains** Copy ```inline-grid min-w-full grid-cols-[auto_1fr] p-2 [count-reset:line] print:whitespace-pre-wrap import { TldParser, NameRecordHeader } from "@onsol/tldparser"; import { Connection, PublicKey } from "@solana/web3.js"; const RPC_URL = 'https://rpc.mainnet.soo.network/rpc'; // initialize a Solana Connection const connection = new Connection(RPC_URL); // get all the domains owned by a public key async function getOwnedDomains(owner: PublicKey){ // initialize a Tld Parser const parser = new TldParser(connection); // get all owned domains let allUserDomains = await parser.getParsedAllUserDomains(owner); return allUserDomains; } // get all owned domains getOwnedDomains(new PublicKey("")); ``` **b. Get only unwrapped owned domains** Copy ```inline-grid min-w-full grid-cols-[auto_1fr] p-2 [count-reset:line] print:whitespace-pre-wrap import { TldParser, NameRecordHeader } from "@onsol/tldparser"; import { Connection, PublicKey } from "@solana/web3.js"; const RPC_URL = 'https://rpc.mainnet.soo.network/rpc'; // initialize a Solana Connection const connection = new Connection(RPC_URL); // get only the unwrapped domains owned by a public key async function getOwnedUnwrappedDomains(owner: PublicKey){ // initialize a Tld Parser const parser = new TldParser(connection); // get only unwrapped domains let unwrappedUserDomains = await parser.getParsedAllUserDomainsUnwrapped(owner); return unwrappedUserDomains; } // get only unwrapped owned domains getOwnedUnwrappedDomains(new PublicKey("")); ``` #### [Direct link to heading](https://docs.alldomains.id/protocol/developer-guide/ad-sdks/svm-sdks/soon-mainnet-sdk\#id-4.-get-domains-owned-by-a-public-key-from-a-specific-tld) 4\. Get domains owned by a Public Key from a specific TLD **a. Get all owned domains from a specific TLD** Copy ```inline-grid min-w-full grid-cols-[auto_1fr] p-2 [count-reset:line] print:whitespace-pre-wrap import { TldParser, NameRecordHeader } from "@onsol/tldparser"; import { Connection, PublicKey } from "@solana/web3.js"; const RPC_URL = 'https://rpc.mainnet.soo.network/rpc'; // initialize a Solana Connection const connection = new Connection(RPC_URL); // get the all the domains owned by a public key in a TLD async function getOwnedDomainsFromTld(owner, tld){ // initialize a Tld Parser const parser = new TldParser(connection); // get all owned domains from a TLD let ownedDomainsFromTld = parser.getParsedAllUserDomainsFromTld(owner, tld); return ownedDomainsFromTld; } // get all owned domains in the ".soon" Tld, without the "." getOwnedDomainsFromTld(new PublicKey(""), "soon"); ``` **b. Get all only unwrapped owned domains from a specific TLD** Copy ```inline-grid min-w-full grid-cols-[auto_1fr] p-2 [count-reset:line] print:whitespace-pre-wrap import { TldParser, NameRecordHeader } from "@onsol/tldparser"; import { Connection, PublicKey } from "@solana/web3.js"; const RPC_URL = 'https://rpc.mainnet.soo.network/rpc'; // initialize a Solana Connection const connection = new Connection(RPC_URL); // get only the unwrapped domains owned by a public key from a TLD async function getOwnedUnwrappedDomainsFromTld(owner, tld){ // initialize a Tld Parser const parser = new TldParser(connection); // get only unwrapped domains from a TLD let ownedUnwrappedDomainsFromTld = parser.getParsedAllUserDomainsFromTldUnwrapped(owner, tld); return ownedUnwrappedDomainsFromTld; } // get owned unwraped domains in the ".soon" Tld, without the "." getOwnedUnwrappedDomainsFromTld(new PublicKey(""), "soon"); ``` #### [Direct link to heading](https://docs.alldomains.id/protocol/developer-guide/ad-sdks/svm-sdks/soon-mainnet-sdk\#id-5.-get-all-active-alldomains-tlds) 5\. Get all active AllDomains TLDs Copy ```inline-grid min-w-full grid-cols-[auto_1fr] p-2 [count-reset:line] print:whitespace-pre-wrap import { getAllTld } from "@onsol/tldparser"; import { Connection } from "@solana/web3.js"; const RPC_URL = 'https://rpc.mainnet.soo.network/rpc'; // initialize a Solana Connection const connection = new Connection(RPC_URL); // get all active AllDomains TLDs const allTlds = await getAllTld(connection); ``` #### [Direct link to heading](https://docs.alldomains.id/protocol/developer-guide/ad-sdks/svm-sdks/soon-mainnet-sdk\#id-6.-get-all-domains-registered-in-all-tlds) 6\. Get all domains registered in All TLDs Copy ```inline-grid min-w-full grid-cols-[auto_1fr] p-2 [count-reset:line] print:whitespace-pre-wrap import { NameRecordHeader, TldParser, findAllDomainsForTld, getAllTld } from "@onsol/tldparser"; import { Connection } from "@solana/web3.js"; const RPC_URL = 'https://rpc.mainnet.soo.network/rpc'; // initialize a Solana Connection const connection = new Connection(RPC_URL); // slow // please use no. 8 for a batch/faster implementation // this code doesn't check if a domain is expired or not async function getAllRegisteredDomains(connection: Connection){ //get all TLDs const allTlds = await getAllTld(connection); const parser = new TldParser(connection); let domains = []; for (let tld of allTlds) { //get the parent name record for a TLD const parentNameRecord = await NameRecordHeader.fromAccountAddress(connection, tld.parentAccount); //get all name accounts in a specific TLD const allNameAccountsForTld = await findAllDomainsForTld(connection, tld.parentAccount); if (!parentNameRecord || !parentNameRecord.owner) return; //parse all name accounts in a specific TLD for (let nameAccount of allNameAccountsForTld) { //get domain as string without the tld const domain = await parser.reverseLookupNameAccount(nameAccount, parentNameRecord.owner); domains.push( { nameAccount: nameAccount, domain: `${domain}${tld.tld}` }); } } return domains; } // get all domains registered on AllDomains console.log(await getAllRegisteredDomains(connection)) ``` 1. #### [Direct link to heading](https://docs.alldomains.id/protocol/developer-guide/ad-sdks/svm-sdks/soon-mainnet-sdk\#get-user-main-domain) Get User Main Domain Copy ```inline-grid min-w-full grid-cols-[auto_1fr] p-2 [count-reset:line] print:whitespace-pre-wrap import { MainDomain, findMainDomain } from "@onsol/tldparser"; import { Connection, PublicKey } from "@solana/web3.js"; // returns MainDomain struct if it is available. it will return undefined if it is not. // MainDomains are usually shown as mainDomain.domain + mainDomain.tld // the mainDomain.nameAccount is proof that the user has set it. const fetchMainDomain = async (connection: Connection, pubkey: string | PublicKey): Promise => { if (typeof pubkey === "string") { pubkey = new PublicKey(pubkey) } const [mainDomainPubkey] = findMainDomain(pubkey); let mainDomain = undefined; try { mainDomain = await MainDomain.fromAccountAddress( connection, mainDomainPubkey, ); return mainDomain } catch (e) { console.log("No main domain found") } return mainDomain }; const CONNECTION = new Connection(""); console.log(await fetchMainDomain(CONNECTION, "2EGGxj2qbNAJNgLCPKca8sxZYetyTjnoRspTPjzN2D67")) // MainDomain { // nameAccount: PublicKey [PublicKey(9YzfCEHb62bQ47snUyjkxhC9Eb6y7CSodK3m8CKWstjV)] { // _bn: // }, // tld: '.soon', // domain: 'miester' // } ``` #### [Direct link to heading](https://docs.alldomains.id/protocol/developer-guide/ad-sdks/svm-sdks/soon-mainnet-sdk\#id-8.-batch-get-alldomains-domains) 8\. Batch get AllDomains Domains Copy ```inline-grid min-w-full grid-cols-[auto_1fr] p-2 [count-reset:line] print:whitespace-pre-wrap import { ANS_PROGRAM_ID, findNameHouse, findNftRecord, getAllTld, getHashedName, getNameAccountKeyWithBump, NameRecordHeader, NftRecord, TldParser, } from "@onsol/tldparser"; import { Connection, GetProgramAccountsResponse, PublicKey, } from "@solana/web3.js"; import { setTimeout } from "timers/promises"; const connection = new Connection(""); async function findAllDomainsForTld( connection: Connection, parentAccount: PublicKey, ): Promise<{ pubkey: PublicKey; nameRecordHeader: NameRecordHeader }[]> { const filters: any = [\ {\ memcmp: {\ offset: 8,\ bytes: parentAccount.toBase58(),\ },\ },\ ]; const accounts: GetProgramAccountsResponse = await connection.getProgramAccounts(ANS_PROGRAM_ID, { filters: filters, }); return accounts.map((a) => { return { pubkey: a.pubkey, nameRecordHeader: NameRecordHeader.fromAccountInfo(a.account), }; }); } export async function performReverseLookupBatched( connection: Connection, nameAccounts: PublicKey[], tldHouse: PublicKey, ): Promise<(string | undefined)[]> { let reverseLookupDomains: (string | undefined)[] = []; while (nameAccounts.length > 0) { const currentBatch = nameAccounts.splice(0, 100); const promises = currentBatch.map(async (nameAccount) => { const reverseLookupHashedName = await getHashedName( nameAccount.toBase58(), ); const [reverseLookUpAccount] = getNameAccountKeyWithBump( reverseLookupHashedName, tldHouse, undefined, ); return reverseLookUpAccount; }); const reverseLookUpAccounts: PublicKey[] = await Promise.all(promises); const reverseLookupAccountInfos = await connection.getMultipleAccountsInfo(reverseLookUpAccounts); const batchDomains = reverseLookupAccountInfos.map( (reverseLookupAccountInfo) => { const domain = reverseLookupAccountInfo?.data .subarray(200, reverseLookupAccountInfo?.data.length) .toString(); return domain; }, ); reverseLookupDomains = reverseLookupDomains.concat(batchDomains); } return reverseLookupDomains; } // onlyDomains will grab only domains and no nfts async function getAllRegisteredDomains( tldExpected?: string, onlyDomains: boolean = false, ) { // get all TLDs const allTlds = await getAllTld(connection); const domains = []; for (const tld of allTlds) { if (tldExpected) { if (tld.tld != tldExpected) continue; } // get the parent name record for a TLD const parentNameRecord = await NameRecordHeader.fromAccountAddress( connection, tld.parentAccount, ); if (!parentNameRecord) continue; if (!parentNameRecord.owner) continue; // get all name accounts in a specific TLD const allNameAccountsForTld = await findAllDomainsForTld( connection, tld.parentAccount, ); await setTimeout(50); const [nameHouseAccount] = findNameHouse(parentNameRecord.owner); const nameAccountPubkeys = allNameAccountsForTld.map((a) => a.pubkey); const domainsReverse = await performReverseLookupBatched( connection, nameAccountPubkeys, parentNameRecord.owner, ); let index = 0; for (const domain of domainsReverse) { const [nftRecord] = findNftRecord( allNameAccountsForTld[index].pubkey, nameHouseAccount, ); let finalOwner = allNameAccountsForTld[index].nameRecordHeader.owner?.toString(); if (finalOwner == nftRecord.toString() && !onlyDomains) { const nftRecordData = await NftRecord.fromAccountAddress( connection, nftRecord, ); const largestAccounts = await connection.getTokenLargestAccounts( nftRecordData.nftMintAccount, ); if (largestAccounts.value.length > 0) { const largestAccountInfo = await connection.getParsedAccountInfo( largestAccounts.value[0].address, ); if (largestAccountInfo?.value?.data) { finalOwner = new PublicKey( // @ts-ignore largestAccountInfo.value.data.parsed.info.owner, ).toString(); } } await setTimeout(50); } domains.push({ nameAccount: allNameAccountsForTld[index].pubkey, domain: `${domain}${tld.tld}`, owner: finalOwner, expiresAt: allNameAccountsForTld[index].nameRecordHeader.expiresAt, createdAt: allNameAccountsForTld[index].nameRecordHeader.createdAt, }); index += 1; } } return domains; } async function main() { // or ".soon" or ".superteam" or ".monke" // if tldExpected is undefined it will grab all domains const tldExpected: string | undefined = ".zk"; // if set true it will grab only domains and no nfts const onlyDomains = false; const domains = await getAllRegisteredDomains(tldExpected, onlyDomains); console.log(JSON.stringify(domains)); // console.log(domains?.length) } // get all domains registered on AllDomains main(); ``` #### [Direct link to heading](https://docs.alldomains.id/protocol/developer-guide/ad-sdks/svm-sdks/soon-mainnet-sdk\#id-9.-batch-get-main-domains) 9\. Batch get Main Domains Copy ```inline-grid min-w-full grid-cols-[auto_1fr] p-2 [count-reset:line] print:whitespace-pre-wrap import { MainDomain, findMainDomain, } from "@onsol/tldparser"; import { Connection, PublicKey } from "@solana/web3.js"; import pLimit from "p-limit"; // const connection = new Connection(""); export const getMultipleMainDomains = async ( connection: Connection, pubkeys: PublicKey[], ): Promise<{ pubkey: string; mainDomain: string | undefined }[]> => { const mainDomainKeys = pubkeys.map((pubkey) => findMainDomain(pubkey)[0]); const mainDomainAccounts = await connection.getMultipleAccountsInfo(mainDomainKeys); return pubkeys.map((pubkey, index) => { const mainDomainAccount = mainDomainAccounts[index]; if (!!mainDomainAccount?.data) { const mainDomainData = MainDomain.fromAccountInfo(mainDomainAccount)[0]; return { pubkey: pubkey.toString(), mainDomain: mainDomainData.domain + mainDomainData.tld, }; } return { pubkey: pubkey.toString(), mainDomain: undefined }; }); }; // retrives users main domain in batches of 100 with pLimit of 20 it calls the rpc 20 times per second // thus, 2000 accounts data can be fetched per second. // pLimit could be increased depending on your rpc limits. async function getMainDomainsSample(connection: Connection, data: any[]) { const mainDomains: { pubkey: string; mainDomain: string | undefined }[] = []; const batches = []; for (let i = 0; i < data.length; i += 100) { batches.push(data.slice(i, i + 100)); } const limit = pLimit(20); await Promise.all( batches.map(async (batch) => { await limit(async () => { const publicKeys = batch.map((data) => data.userPubkey ? new PublicKey(data.userPubkey) : PublicKey.default, ); mainDomains.push( ...(await getMultipleMainDomains(connection, publicKeys)), ); }); }), ); return mainDomains } ``` [PreviousEclipse mainnet SDK](https://docs.alldomains.id/protocol/developer-guide/ad-sdks/svm-sdks/eclipse-mainnet-sdk) [NextSonic mainnet SDK](https://docs.alldomains.id/protocol/developer-guide/ad-sdks/svm-sdks/sonic-mainnet-sdk) Last updated 1 month ago ## AllDomains SDK Integration How to integrate AllDomains Protocol: Libraries are opensource with MIT licenses: Typescript: [https://github.com/onsol-labs/tld-parser](https://github.com/onsol-labs/tld-parser) Rust: [https://github.com/onsol-labs/tld-parse](https://github.com/onsol-labs/tld-parser) [-rs](https://github.com/onsol-labs/tld-parser-rs) #### [Direct link to heading](https://docs.alldomains.id/protocol/developer-guide/ad-sdks/svm-sdks/sonic-mainnet-sdk\#id-1.-installation) 1\. Installation Copy ```inline-grid min-w-full grid-cols-[auto_1fr] p-2 [count-reset:line] print:whitespace-pre-wrap npm install @onsol/tldparser ``` #### [Direct link to heading](https://docs.alldomains.id/protocol/developer-guide/ad-sdks/svm-sdks/sonic-mainnet-sdk\#id-2.-domain-resolution) 2\. Domain Resolution The following code shows how to get the Public Key owner of a domain name - works with **any AllDomains TLD** Copy ```inline-grid min-w-full grid-cols-[auto_1fr] p-2 [count-reset:line] print:whitespace-pre-wrap import { TldParser } from "@onsol/tldparser"; import { Connection } from "@solana/web3.js"; export const SONIC_MAINNET = "https://rpc.mainnet-alpha.sonic.game/"; // initialize a Solana Connection const connection = new Connection(RPC_URL); // get the owner pubkey of a domain name async function resolveDomain(domain){ // initialize a Tld Parser const parser = new TldParser(connection); return await parser.getOwnerFromDomainTld(domain); } //get the owner pubkey of "miester.sonic"; resolveDomain("miester.sonic"); ``` #### [Direct link to heading](https://docs.alldomains.id/protocol/developer-guide/ad-sdks/svm-sdks/sonic-mainnet-sdk\#id-3.-get-domains-owned-by-a-public-key) 3\. Get domains owned by a Public Key **a. Get all owned domains** Copy ```inline-grid min-w-full grid-cols-[auto_1fr] p-2 [count-reset:line] print:whitespace-pre-wrap import { TldParser, NameRecordHeader } from "@onsol/tldparser"; import { Connection, PublicKey } from "@solana/web3.js"; export const SONIC_MAINNET = "https://rpc.mainnet-alpha.sonic.game/"; // initialize a Solana Connection const connection = new Connection(RPC_URL); // get all the domains owned by a public key async function getOwnedDomains(owner: PublicKey){ // initialize a Tld Parser const parser = new TldParser(connection); // get all owned domains let allUserDomains = await parser.getParsedAllUserDomains(owner); return allUserDomains; } // get all owned domains getOwnedDomains(new PublicKey("")); ``` **b. Get only unwrapped owned domains** Copy ```inline-grid min-w-full grid-cols-[auto_1fr] p-2 [count-reset:line] print:whitespace-pre-wrap import { TldParser, NameRecordHeader } from "@onsol/tldparser"; import { Connection, PublicKey } from "@solana/web3.js"; export const SONIC_MAINNET = "https://rpc.mainnet-alpha.sonic.game/"; // initialize a Solana Connection const connection = new Connection(RPC_URL); // get only the unwrapped domains owned by a public key async function getOwnedUnwrappedDomains(owner: PublicKey){ // initialize a Tld Parser const parser = new TldParser(connection); // get only unwrapped domains let unwrappedUserDomains = await parser.getParsedAllUserDomainsUnwrapped(owner); return unwrappedUserDomains; } // get only unwrapped owned domains getOwnedUnwrappedDomains(new PublicKey("")); ``` #### [Direct link to heading](https://docs.alldomains.id/protocol/developer-guide/ad-sdks/svm-sdks/sonic-mainnet-sdk\#id-4.-get-domains-owned-by-a-public-key-from-a-specific-tld) 4\. Get domains owned by a Public Key from a specific TLD **a. Get all owned domains from a specific TLD** Copy ```inline-grid min-w-full grid-cols-[auto_1fr] p-2 [count-reset:line] print:whitespace-pre-wrap import { TldParser, NameRecordHeader } from "@onsol/tldparser"; import { Connection, PublicKey } from "@solana/web3.js"; export const SONIC_MAINNET = "https://rpc.mainnet-alpha.sonic.game/"; // initialize a Solana Connection const connection = new Connection(RPC_URL); // get the all the domains owned by a public key in a TLD async function getOwnedDomainsFromTld(owner, tld){ // initialize a Tld Parser const parser = new TldParser(connection); // get all owned domains from a TLD let ownedDomainsFromTld = parser.getParsedAllUserDomainsFromTld(owner, tld); return ownedDomainsFromTld; } // get all owned domains in the ".sonic" Tld, without the "." getOwnedDomainsFromTld(new PublicKey(""), "sonic"); ``` **b. Get all only unwrapped owned domains from a specific TLD** Copy ```inline-grid min-w-full grid-cols-[auto_1fr] p-2 [count-reset:line] print:whitespace-pre-wrap import { TldParser, NameRecordHeader } from "@onsol/tldparser"; import { Connection, PublicKey } from "@solana/web3.js"; export const SONIC_MAINNET = "https://rpc.mainnet-alpha.sonic.game/"; // initialize a Solana Connection const connection = new Connection(RPC_URL); // get only the unwrapped domains owned by a public key from a TLD async function getOwnedUnwrappedDomainsFromTld(owner, tld){ // initialize a Tld Parser const parser = new TldParser(connection); // get only unwrapped domains from a TLD let ownedUnwrappedDomainsFromTld = parser.getParsedAllUserDomainsFromTldUnwrapped(owner, tld); return ownedUnwrappedDomainsFromTld; } // get owned unwraped domains in the ".sonic" Tld, without the "." getOwnedUnwrappedDomainsFromTld(new PublicKey(""), "sonic"); ``` #### [Direct link to heading](https://docs.alldomains.id/protocol/developer-guide/ad-sdks/svm-sdks/sonic-mainnet-sdk\#id-5.-get-all-active-alldomains-tlds) 5\. Get all active AllDomains TLDs Copy ```inline-grid min-w-full grid-cols-[auto_1fr] p-2 [count-reset:line] print:whitespace-pre-wrap import { getAllTld } from "@onsol/tldparser"; import { Connection } from "@solana/web3.js"; export const SONIC_MAINNET = "https://rpc.mainnet-alpha.sonic.game/"; // initialize a Solana Connection const connection = new Connection(RPC_URL); // get all active AllDomains TLDs const allTlds = await getAllTld(connection); ``` #### [Direct link to heading](https://docs.alldomains.id/protocol/developer-guide/ad-sdks/svm-sdks/sonic-mainnet-sdk\#id-6.-get-all-domains-registered-in-all-tlds) 6\. Get all domains registered in All TLDs Copy ```inline-grid min-w-full grid-cols-[auto_1fr] p-2 [count-reset:line] print:whitespace-pre-wrap import { NameRecordHeader, TldParser, findAllDomainsForTld, getAllTld } from "@onsol/tldparser"; import { Connection } from "@solana/web3.js"; export const SONIC_MAINNET = "https://rpc.mainnet-alpha.sonic.game/"; // initialize a Solana Connection const connection = new Connection(RPC_URL); // slow // please use no. 8 for a batch/faster implementation // this code doesn't check if a domain is expired or not async function getAllRegisteredDomains(connection: Connection){ //get all TLDs const allTlds = await getAllTld(connection); const parser = new TldParser(connection); let domains = []; for (let tld of allTlds) { //get the parent name record for a TLD const parentNameRecord = await NameRecordHeader.fromAccountAddress(connection, tld.parentAccount); //get all name accounts in a specific TLD const allNameAccountsForTld = await findAllDomainsForTld(connection, tld.parentAccount); if (!parentNameRecord || !parentNameRecord.owner) return; //parse all name accounts in a specific TLD for (let nameAccount of allNameAccountsForTld) { //get domain as string without the tld const domain = await parser.reverseLookupNameAccount(nameAccount, parentNameRecord.owner); domains.push( { nameAccount: nameAccount, domain: `${domain}${tld.tld}` }); } } return domains; } // get all domains registered on AllDomains console.log(await getAllRegisteredDomains(connection)) ``` 1. #### [Direct link to heading](https://docs.alldomains.id/protocol/developer-guide/ad-sdks/svm-sdks/sonic-mainnet-sdk\#get-user-main-domain) Get User Main Domain Copy ```inline-grid min-w-full grid-cols-[auto_1fr] p-2 [count-reset:line] print:whitespace-pre-wrap import { MainDomain, findMainDomain } from "@onsol/tldparser"; import { Connection, PublicKey } from "@solana/web3.js"; // returns MainDomain struct if it is available. it will return undefined if it is not. // MainDomains are usually shown as mainDomain.domain + mainDomain.tld // the mainDomain.nameAccount is proof that the user has set it. const fetchMainDomain = async (connection: Connection, pubkey: string | PublicKey): Promise => { if (typeof pubkey === "string") { pubkey = new PublicKey(pubkey) } const [mainDomainPubkey] = findMainDomain(pubkey); let mainDomain = undefined; try { mainDomain = await MainDomain.fromAccountAddress( connection, mainDomainPubkey, ); return mainDomain } catch (e) { console.log("No main domain found") } return mainDomain }; const CONNECTION = new Connection(""); console.log(await fetchMainDomain(CONNECTION, "2EGGxj2qbNAJNgLCPKca8sxZYetyTjnoRspTPjzN2D67")) // MainDomain { // nameAccount: PublicKey [PublicKey(9YzfCEHb62bQ47snUyjkxhC9Eb6y7CSodK3m8CKWstjV)] { // _bn: // }, // tld: '.sonic', // domain: 'miester' // } ``` #### [Direct link to heading](https://docs.alldomains.id/protocol/developer-guide/ad-sdks/svm-sdks/sonic-mainnet-sdk\#id-8.-batch-get-alldomains-domains) 8\. Batch get AllDomains Domains Copy ```inline-grid min-w-full grid-cols-[auto_1fr] p-2 [count-reset:line] print:whitespace-pre-wrap import { ANS_PROGRAM_ID, findNameHouse, findNftRecord, getAllTld, getHashedName, getNameAccountKeyWithBump, NameRecordHeader, NftRecord, TldParser, } from "@onsol/tldparser"; import { Connection, GetProgramAccountsResponse, PublicKey, } from "@solana/web3.js"; import { setTimeout } from "timers/promises"; const connection = new Connection(""); async function findAllDomainsForTld( connection: Connection, parentAccount: PublicKey, ): Promise<{ pubkey: PublicKey; nameRecordHeader: NameRecordHeader }[]> { const filters: any = [\ {\ memcmp: {\ offset: 8,\ bytes: parentAccount.toBase58(),\ },\ },\ ]; const accounts: GetProgramAccountsResponse = await connection.getProgramAccounts(ANS_PROGRAM_ID, { filters: filters, }); return accounts.map((a) => { return { pubkey: a.pubkey, nameRecordHeader: NameRecordHeader.fromAccountInfo(a.account), }; }); } export async function performReverseLookupBatched( connection: Connection, nameAccounts: PublicKey[], tldHouse: PublicKey, ): Promise<(string | undefined)[]> { let reverseLookupDomains: (string | undefined)[] = []; while (nameAccounts.length > 0) { const currentBatch = nameAccounts.splice(0, 100); const promises = currentBatch.map(async (nameAccount) => { const reverseLookupHashedName = await getHashedName( nameAccount.toBase58(), ); const [reverseLookUpAccount] = getNameAccountKeyWithBump( reverseLookupHashedName, tldHouse, undefined, ); return reverseLookUpAccount; }); const reverseLookUpAccounts: PublicKey[] = await Promise.all(promises); const reverseLookupAccountInfos = await connection.getMultipleAccountsInfo(reverseLookUpAccounts); const batchDomains = reverseLookupAccountInfos.map( (reverseLookupAccountInfo) => { const domain = reverseLookupAccountInfo?.data .subarray(200, reverseLookupAccountInfo?.data.length) .toString(); return domain; }, ); reverseLookupDomains = reverseLookupDomains.concat(batchDomains); } return reverseLookupDomains; } // onlyDomains will grab only domains and no nfts async function getAllRegisteredDomains( tldExpected?: string, onlyDomains: boolean = false, ) { // get all TLDs const allTlds = await getAllTld(connection); const domains = []; for (const tld of allTlds) { if (tldExpected) { if (tld.tld != tldExpected) continue; } // get the parent name record for a TLD const parentNameRecord = await NameRecordHeader.fromAccountAddress( connection, tld.parentAccount, ); if (!parentNameRecord) continue; if (!parentNameRecord.owner) continue; // get all name accounts in a specific TLD const allNameAccountsForTld = await findAllDomainsForTld( connection, tld.parentAccount, ); await setTimeout(50); const [nameHouseAccount] = findNameHouse(parentNameRecord.owner); const nameAccountPubkeys = allNameAccountsForTld.map((a) => a.pubkey); const domainsReverse = await performReverseLookupBatched( connection, nameAccountPubkeys, parentNameRecord.owner, ); let index = 0; for (const domain of domainsReverse) { const [nftRecord] = findNftRecord( allNameAccountsForTld[index].pubkey, nameHouseAccount, ); let finalOwner = allNameAccountsForTld[index].nameRecordHeader.owner?.toString(); if (finalOwner == nftRecord.toString() && !onlyDomains) { const nftRecordData = await NftRecord.fromAccountAddress( connection, nftRecord, ); const largestAccounts = await connection.getTokenLargestAccounts( nftRecordData.nftMintAccount, ); if (largestAccounts.value.length > 0) { const largestAccountInfo = await connection.getParsedAccountInfo( largestAccounts.value[0].address, ); if (largestAccountInfo?.value?.data) { finalOwner = new PublicKey( // @ts-ignore largestAccountInfo.value.data.parsed.info.owner, ).toString(); } } await setTimeout(50); } domains.push({ nameAccount: allNameAccountsForTld[index].pubkey, domain: `${domain}${tld.tld}`, owner: finalOwner, expiresAt: allNameAccountsForTld[index].nameRecordHeader.expiresAt, createdAt: allNameAccountsForTld[index].nameRecordHeader.createdAt, }); index += 1; } } return domains; } async function main() { // or ".sonic" or ".superteam" or ".monke" // if tldExpected is undefined it will grab all domains const tldExpected: string | undefined = ".zk"; // if set true it will grab only domains and no nfts const onlyDomains = false; const domains = await getAllRegisteredDomains(tldExpected, onlyDomains); console.log(JSON.stringify(domains)); // console.log(domains?.length) } // get all domains registered on AllDomains main(); ``` #### [Direct link to heading](https://docs.alldomains.id/protocol/developer-guide/ad-sdks/svm-sdks/sonic-mainnet-sdk\#id-9.-batch-get-main-domains) 9\. Batch get Main Domains Copy ```inline-grid min-w-full grid-cols-[auto_1fr] p-2 [count-reset:line] print:whitespace-pre-wrap import { MainDomain, findMainDomain, } from "@onsol/tldparser"; import { Connection, PublicKey } from "@solana/web3.js"; import pLimit from "p-limit"; // const connection = new Connection(""); export const getMultipleMainDomains = async ( connection: Connection, pubkeys: PublicKey[], ): Promise<{ pubkey: string; mainDomain: string | undefined }[]> => { const mainDomainKeys = pubkeys.map((pubkey) => findMainDomain(pubkey)[0]); const mainDomainAccounts = await connection.getMultipleAccountsInfo(mainDomainKeys); return pubkeys.map((pubkey, index) => { const mainDomainAccount = mainDomainAccounts[index]; if (!!mainDomainAccount?.data) { const mainDomainData = MainDomain.fromAccountInfo(mainDomainAccount)[0]; return { pubkey: pubkey.toString(), mainDomain: mainDomainData.domain + mainDomainData.tld, }; } return { pubkey: pubkey.toString(), mainDomain: undefined }; }); }; // retrives users main domain in batches of 100 with pLimit of 20 it calls the rpc 20 times per second // thus, 2000 accounts data can be fetched per second. // pLimit could be increased depending on your rpc limits. async function getMainDomainsSample(connection: Connection, data: any[]) { const mainDomains: { pubkey: string; mainDomain: string | undefined }[] = []; const batches = []; for (let i = 0; i < data.length; i += 100) { batches.push(data.slice(i, i + 100)); } const limit = pLimit(20); await Promise.all( batches.map(async (batch) => { await limit(async () => { const publicKeys = batch.map((data) => data.userPubkey ? new PublicKey(data.userPubkey) : PublicKey.default, ); mainDomains.push( ...(await getMultipleMainDomains(connection, publicKeys)), ); }); }), ); return mainDomains } ``` [PreviousSOON mainnet SDK](https://docs.alldomains.id/protocol/developer-guide/ad-sdks/svm-sdks/soon-mainnet-sdk) [NextYona devnet SDK](https://docs.alldomains.id/protocol/developer-guide/ad-sdks/svm-sdks/yona-devnet-sdk) Last updated 1 month ago ## Yona Devnet SDK Guide Devnet Only How to integrate AllDomains Protocol: Libraries are opensource with MIT licenses: Typescript: [https://github.com/onsol-labs/tld-parser](https://github.com/onsol-labs/tld-parser) Rust: [https://github.com/onsol-labs/tld-parse](https://github.com/onsol-labs/tld-parser) [-rs](https://github.com/onsol-labs/tld-parser-rs) #### [Direct link to heading](https://docs.alldomains.id/protocol/developer-guide/ad-sdks/svm-sdks/yona-devnet-sdk\#id-1.-installation) 1\. Installation Copy ```inline-grid min-w-full grid-cols-[auto_1fr] p-2 [count-reset:line] print:whitespace-pre-wrap npm install @onsol/tldparser ``` #### [Direct link to heading](https://docs.alldomains.id/protocol/developer-guide/ad-sdks/svm-sdks/yona-devnet-sdk\#id-2.-domain-resolution) 2\. Domain Resolution The following code shows how to get the Public Key owner of a domain name - works with **any AllDomains TLD** Copy ```inline-grid min-w-full grid-cols-[auto_1fr] p-2 [count-reset:line] print:whitespace-pre-wrap import { TldParser } from "@onsol/tldparser"; import { Connection } from "@solana/web3.js"; const RPC_URL = 'https://devnet-rpc.yona.network/'; // initialize a Solana Connection const connection = new Connection(RPC_URL); // get the owner pubkey of a domain name async function resolveDomain(domain){ // initialize a Tld Parser const parser = new TldParser(connection); return await parser.getOwnerFromDomainTld(domain); } //get the owner pubkey of "miester.turbo"; resolveDomain("miester.turbo"); ``` #### [Direct link to heading](https://docs.alldomains.id/protocol/developer-guide/ad-sdks/svm-sdks/yona-devnet-sdk\#id-3.-get-domains-owned-by-a-public-key) 3\. Get domains owned by a Public Key **a. Get all owned domains** Copy ```inline-grid min-w-full grid-cols-[auto_1fr] p-2 [count-reset:line] print:whitespace-pre-wrap import { TldParser, NameRecordHeader } from "@onsol/tldparser"; import { Connection, PublicKey } from "@solana/web3.js"; const RPC_URL = 'https://devnet-rpc.yona.network/'; // initialize a Solana Connection const connection = new Connection(RPC_URL); // get all the domains owned by a public key async function getOwnedDomains(owner: PublicKey){ // initialize a Tld Parser const parser = new TldParser(connection); // get all owned domains let allUserDomains = await parser.getParsedAllUserDomains(owner); return allUserDomains; } // get all owned domains getOwnedDomains(new PublicKey("")); ``` **b. Get only unwrapped owned domains** Copy ```inline-grid min-w-full grid-cols-[auto_1fr] p-2 [count-reset:line] print:whitespace-pre-wrap import { TldParser, NameRecordHeader } from "@onsol/tldparser"; import { Connection, PublicKey } from "@solana/web3.js"; const RPC_URL = 'https://devnet-rpc.yona.network/'; // initialize a Solana Connection const connection = new Connection(RPC_URL); // get only the unwrapped domains owned by a public key async function getOwnedUnwrappedDomains(owner: PublicKey){ // initialize a Tld Parser const parser = new TldParser(connection); // get only unwrapped domains let unwrappedUserDomains = await parser.getParsedAllUserDomainsUnwrapped(owner); return unwrappedUserDomains; } // get only unwrapped owned domains getOwnedUnwrappedDomains(new PublicKey("")); ``` #### [Direct link to heading](https://docs.alldomains.id/protocol/developer-guide/ad-sdks/svm-sdks/yona-devnet-sdk\#id-4.-get-domains-owned-by-a-public-key-from-a-specific-tld) 4\. Get domains owned by a Public Key from a specific TLD **a. Get all owned domains from a specific TLD** Copy ```inline-grid min-w-full grid-cols-[auto_1fr] p-2 [count-reset:line] print:whitespace-pre-wrap import { TldParser, NameRecordHeader } from "@onsol/tldparser"; import { Connection, PublicKey } from "@solana/web3.js"; const RPC_URL = 'https://devnet-rpc.yona.network/'; // initialize a Solana Connection const connection = new Connection(RPC_URL); // get the all the domains owned by a public key in a TLD async function getOwnedDomainsFromTld(owner, tld){ // initialize a Tld Parser const parser = new TldParser(connection); // get all owned domains from a TLD let ownedDomainsFromTld = parser.getParsedAllUserDomainsFromTld(owner, tld); return ownedDomainsFromTld; } // get all owned domains in the ".turbo" Tld, without the "." getOwnedDomainsFromTld(new PublicKey(""), "turbo"); ``` **b. Get all only unwrapped owned domains from a specific TLD** Copy ```inline-grid min-w-full grid-cols-[auto_1fr] p-2 [count-reset:line] print:whitespace-pre-wrap import { TldParser, NameRecordHeader } from "@onsol/tldparser"; import { Connection, PublicKey } from "@solana/web3.js"; const RPC_URL = 'https://devnet-rpc.yona.network/'; // initialize a Solana Connection const connection = new Connection(RPC_URL); // get only the unwrapped domains owned by a public key from a TLD async function getOwnedUnwrappedDomainsFromTld(owner, tld){ // initialize a Tld Parser const parser = new TldParser(connection); // get only unwrapped domains from a TLD let ownedUnwrappedDomainsFromTld = parser.getParsedAllUserDomainsFromTldUnwrapped(owner, tld); return ownedUnwrappedDomainsFromTld; } // get owned unwraped domains in the ".turbo" Tld, without the "." getOwnedUnwrappedDomainsFromTld(new PublicKey(""), "turbo"); ``` #### [Direct link to heading](https://docs.alldomains.id/protocol/developer-guide/ad-sdks/svm-sdks/yona-devnet-sdk\#id-5.-get-all-active-alldomains-tlds) 5\. Get all active AllDomains TLDs Copy ```inline-grid min-w-full grid-cols-[auto_1fr] p-2 [count-reset:line] print:whitespace-pre-wrap import { getAllTld } from "@onsol/tldparser"; import { Connection } from "@solana/web3.js"; const RPC_URL = 'https://devnet-rpc.yona.network/'; // initialize a Solana Connection const connection = new Connection(RPC_URL); // get all active AllDomains TLDs const allTlds = await getAllTld(connection); ``` #### [Direct link to heading](https://docs.alldomains.id/protocol/developer-guide/ad-sdks/svm-sdks/yona-devnet-sdk\#id-6.-get-all-domains-registered-in-all-tlds) 6\. Get all domains registered in All TLDs Copy ```inline-grid min-w-full grid-cols-[auto_1fr] p-2 [count-reset:line] print:whitespace-pre-wrap import { NameRecordHeader, TldParser, findAllDomainsForTld, getAllTld } from "@onsol/tldparser"; import { Connection } from "@solana/web3.js"; const RPC_URL = 'https://devnet-rpc.yona.network/'; // initialize a Solana Connection const connection = new Connection(RPC_URL); // slow // please use no. 8 for a batch/faster implementation // this code doesn't check if a domain is expired or not async function getAllRegisteredDomains(connection: Connection){ //get all TLDs const allTlds = await getAllTld(connection); const parser = new TldParser(connection); let domains = []; for (let tld of allTlds) { //get the parent name record for a TLD const parentNameRecord = await NameRecordHeader.fromAccountAddress(connection, tld.parentAccount); //get all name accounts in a specific TLD const allNameAccountsForTld = await findAllDomainsForTld(connection, tld.parentAccount); if (!parentNameRecord || !parentNameRecord.owner) return; //parse all name accounts in a specific TLD for (let nameAccount of allNameAccountsForTld) { //get domain as string without the tld const domain = await parser.reverseLookupNameAccount(nameAccount, parentNameRecord.owner); domains.push( { nameAccount: nameAccount, domain: `${domain}${tld.tld}` }); } } return domains; } // get all domains registered on AllDomains console.log(await getAllRegisteredDomains(connection)) ``` 1. #### [Direct link to heading](https://docs.alldomains.id/protocol/developer-guide/ad-sdks/svm-sdks/yona-devnet-sdk\#get-user-main-domain) Get User Main Domain Copy ```inline-grid min-w-full grid-cols-[auto_1fr] p-2 [count-reset:line] print:whitespace-pre-wrap import { MainDomain, findMainDomain } from "@onsol/tldparser"; import { Connection, PublicKey } from "@solana/web3.js"; // returns MainDomain struct if it is available. it will return undefined if it is not. // MainDomains are usually shown as mainDomain.domain + mainDomain.tld // the mainDomain.nameAccount is proof that the user has set it. const fetchMainDomain = async (connection: Connection, pubkey: string | PublicKey): Promise => { if (typeof pubkey === "string") { pubkey = new PublicKey(pubkey) } const [mainDomainPubkey] = findMainDomain(pubkey); let mainDomain = undefined; try { mainDomain = await MainDomain.fromAccountAddress( connection, mainDomainPubkey, ); return mainDomain } catch (e) { console.log("No main domain found") } return mainDomain }; const CONNECTION = new Connection(""); console.log(await fetchMainDomain(CONNECTION, "2EGGxj2qbNAJNgLCPKca8sxZYetyTjnoRspTPjzN2D67")) // MainDomain { // nameAccount: PublicKey [PublicKey(9YzfCEHb62bQ47snUyjkxhC9Eb6y7CSodK3m8CKWstjV)] { // _bn: // }, // tld: '.abc', // domain: 'miester' // } ``` #### [Direct link to heading](https://docs.alldomains.id/protocol/developer-guide/ad-sdks/svm-sdks/yona-devnet-sdk\#id-8.-batch-get-alldomains-domains) 8\. Batch get AllDomains Domains Copy ```inline-grid min-w-full grid-cols-[auto_1fr] p-2 [count-reset:line] print:whitespace-pre-wrap import { ANS_PROGRAM_ID, findNameHouse, findNftRecord, getAllTld, getHashedName, getNameAccountKeyWithBump, NameRecordHeader, NftRecord, TldParser, } from "@onsol/tldparser"; import { Connection, GetProgramAccountsResponse, PublicKey, } from "@solana/web3.js"; import { setTimeout } from "timers/promises"; const connection = new Connection(""); async function findAllDomainsForTld( connection: Connection, parentAccount: PublicKey, ): Promise<{ pubkey: PublicKey; nameRecordHeader: NameRecordHeader }[]> { const filters: any = [\ {\ memcmp: {\ offset: 8,\ bytes: parentAccount.toBase58(),\ },\ },\ ]; const accounts: GetProgramAccountsResponse = await connection.getProgramAccounts(ANS_PROGRAM_ID, { filters: filters, }); return accounts.map((a) => { return { pubkey: a.pubkey, nameRecordHeader: NameRecordHeader.fromAccountInfo(a.account), }; }); } export async function performReverseLookupBatched( connection: Connection, nameAccounts: PublicKey[], tldHouse: PublicKey, ): Promise<(string | undefined)[]> { let reverseLookupDomains: (string | undefined)[] = []; while (nameAccounts.length > 0) { const currentBatch = nameAccounts.splice(0, 100); const promises = currentBatch.map(async (nameAccount) => { const reverseLookupHashedName = await getHashedName( nameAccount.toBase58(), ); const [reverseLookUpAccount] = getNameAccountKeyWithBump( reverseLookupHashedName, tldHouse, undefined, ); return reverseLookUpAccount; }); const reverseLookUpAccounts: PublicKey[] = await Promise.all(promises); const reverseLookupAccountInfos = await connection.getMultipleAccountsInfo(reverseLookUpAccounts); const batchDomains = reverseLookupAccountInfos.map( (reverseLookupAccountInfo) => { const domain = reverseLookupAccountInfo?.data .subarray(200, reverseLookupAccountInfo?.data.length) .toString(); return domain; }, ); reverseLookupDomains = reverseLookupDomains.concat(batchDomains); } return reverseLookupDomains; } // onlyDomains will grab only domains and no nfts async function getAllRegisteredDomains( tldExpected?: string, onlyDomains: boolean = false, ) { // get all TLDs const allTlds = await getAllTld(connection); const domains = []; for (const tld of allTlds) { if (tldExpected) { if (tld.tld != tldExpected) continue; } // get the parent name record for a TLD const parentNameRecord = await NameRecordHeader.fromAccountAddress( connection, tld.parentAccount, ); if (!parentNameRecord) continue; if (!parentNameRecord.owner) continue; // get all name accounts in a specific TLD const allNameAccountsForTld = await findAllDomainsForTld( connection, tld.parentAccount, ); await setTimeout(50); const [nameHouseAccount] = findNameHouse(parentNameRecord.owner); const nameAccountPubkeys = allNameAccountsForTld.map((a) => a.pubkey); const domainsReverse = await performReverseLookupBatched( connection, nameAccountPubkeys, parentNameRecord.owner, ); let index = 0; for (const domain of domainsReverse) { const [nftRecord] = findNftRecord( allNameAccountsForTld[index].pubkey, nameHouseAccount, ); let finalOwner = allNameAccountsForTld[index].nameRecordHeader.owner?.toString(); if (finalOwner == nftRecord.toString() && !onlyDomains) { const nftRecordData = await NftRecord.fromAccountAddress( connection, nftRecord, ); const largestAccounts = await connection.getTokenLargestAccounts( nftRecordData.nftMintAccount, ); if (largestAccounts.value.length > 0) { const largestAccountInfo = await connection.getParsedAccountInfo( largestAccounts.value[0].address, ); if (largestAccountInfo?.value?.data) { finalOwner = new PublicKey( // @ts-ignore largestAccountInfo.value.data.parsed.info.owner, ).toString(); } } await setTimeout(50); } domains.push({ nameAccount: allNameAccountsForTld[index].pubkey, domain: `${domain}${tld.tld}`, owner: finalOwner, expiresAt: allNameAccountsForTld[index].nameRecordHeader.expiresAt, createdAt: allNameAccountsForTld[index].nameRecordHeader.createdAt, }); index += 1; } } return domains; } async function main() { // or ".eyekon" or ".superteam" or ".monke" // if tldExpected is undefined it will grab all domains const tldExpected: string | undefined = ".zk"; // if set true it will grab only domains and no nfts const onlyDomains = false; const domains = await getAllRegisteredDomains(tldExpected, onlyDomains); console.log(JSON.stringify(domains)); // console.log(domains?.length) } // get all domains registered on AllDomains main(); ``` #### [Direct link to heading](https://docs.alldomains.id/protocol/developer-guide/ad-sdks/svm-sdks/yona-devnet-sdk\#id-9.-batch-get-main-domains) 9\. Batch get Main Domains Copy ```inline-grid min-w-full grid-cols-[auto_1fr] p-2 [count-reset:line] print:whitespace-pre-wrap import { MainDomain, findMainDomain, } from "@onsol/tldparser"; import { Connection, PublicKey } from "@solana/web3.js"; import pLimit from "p-limit"; // const connection = new Connection(""); export const getMultipleMainDomains = async ( connection: Connection, pubkeys: PublicKey[], ): Promise<{ pubkey: string; mainDomain: string | undefined }[]> => { const mainDomainKeys = pubkeys.map((pubkey) => findMainDomain(pubkey)[0]); const mainDomainAccounts = await connection.getMultipleAccountsInfo(mainDomainKeys); return pubkeys.map((pubkey, index) => { const mainDomainAccount = mainDomainAccounts[index]; if (!!mainDomainAccount?.data) { const mainDomainData = MainDomain.fromAccountInfo(mainDomainAccount)[0]; return { pubkey: pubkey.toString(), mainDomain: mainDomainData.domain + mainDomainData.tld, }; } return { pubkey: pubkey.toString(), mainDomain: undefined }; }); }; // retrives users main domain in batches of 100 with pLimit of 20 it calls the rpc 20 times per second // thus, 2000 accounts data can be fetched per second. // pLimit could be increased depending on your rpc limits. async function getMainDomainsSample(connection: Connection, data: any[]) { const mainDomains: { pubkey: string; mainDomain: string | undefined }[] = []; const batches = []; for (let i = 0; i < data.length; i += 100) { batches.push(data.slice(i, i + 100)); } const limit = pLimit(20); await Promise.all( batches.map(async (batch) => { await limit(async () => { const publicKeys = batch.map((data) => data.userPubkey ? new PublicKey(data.userPubkey) : PublicKey.default, ); mainDomains.push( ...(await getMultipleMainDomains(connection, publicKeys)), ); }); }), ); return mainDomains } ``` [PreviousSonic mainnet SDK](https://docs.alldomains.id/protocol/developer-guide/ad-sdks/svm-sdks/sonic-mainnet-sdk) [NextEVM SDKs](https://docs.alldomains.id/protocol/developer-guide/ad-sdks/evm-sdks) Last updated 9 months ago ## EVM SDKs Overview [Monad SDK](https://docs.alldomains.id/protocol/developer-guide/ad-sdks/evm-sdks/monad-sdk) [PreviousYona devnet SDK](https://docs.alldomains.id/protocol/developer-guide/ad-sdks/svm-sdks/yona-devnet-sdk) [NextMonad SDK](https://docs.alldomains.id/protocol/developer-guide/ad-sdks/evm-sdks/monad-sdk) Last updated 3 months ago ## AllDomains Monad SDK ## [Direct link to heading](https://docs.alldomains.id/protocol/developer-guide/ad-sdks/evm-sdks/monad-sdk\#alldomains-monad-evm-sdk-documentation) AllDomains Monad EVM SDK Documentation ### [Direct link to heading](https://docs.alldomains.id/protocol/developer-guide/ad-sdks/evm-sdks/monad-sdk\#overview) Overview The AllDomains Monad EVM SDK is a library designed to interact with top-level domain (TLD) names on EVM-compatible chains (e.g., Monad). This SDK provides functionality to manage domain names, retrieve ownership details, and handle domain records across supported blockchains. ### [Direct link to heading](https://docs.alldomains.id/protocol/developer-guide/ad-sdks/evm-sdks/monad-sdk\#supported-chains) Supported Chains - Monad Testnet (EVM) ### [Direct link to heading](https://docs.alldomains.id/protocol/developer-guide/ad-sdks/evm-sdks/monad-sdk\#installation) Installation To install the AllDomains Monad EVM SDK, add the following line to your `package.json` or run the command: Copy ```inline-grid min-w-full grid-cols-[auto_1fr] p-2 [count-reset:line] print:whitespace-pre-wrap npm install @onsol/tldparser ``` ### [Direct link to heading](https://docs.alldomains.id/protocol/developer-guide/ad-sdks/evm-sdks/monad-sdk\#usage-examples) Usage Examples #### [Direct link to heading](https://docs.alldomains.id/protocol/developer-guide/ad-sdks/evm-sdks/monad-sdk\#id-1.-initialize-evm-connection) 1\. Initialize EVM Connection Copy ```inline-grid min-w-full grid-cols-[auto_1fr] p-2 [count-reset:line] print:whitespace-pre-wrap import { TldParser, NetworkWithRpc } from '@onsol/tldparser'; import { getAddress } from 'ethers'; // Set up RPC URL and initialize a network instance const RPC_URL = 'https://testnet-rpc.monad.xyz'; const PUBLIC_KEY = getAddress('0x94Bfb92da83B27B39370550CA038Af96d182462f'); const settings = new NetworkWithRpc('monad', 10143, RPC_URL); // Create an instance of TldParser const parser = new TldParser(settings, 'monad'); ``` #### [Direct link to heading](https://docs.alldomains.id/protocol/developer-guide/ad-sdks/evm-sdks/monad-sdk\#id-2.-get-all-user-domains) 2\. Get All User Domains Copy ```inline-grid min-w-full grid-cols-[auto_1fr] p-2 [count-reset:line] print:whitespace-pre-wrap const allDomains = await parser.getAllUserDomains(PUBLIC_KEY); // Output: [NameRecord { domain_name: "miester", tld: ".mon", ... }] ``` #### [Direct link to heading](https://docs.alldomains.id/protocol/developer-guide/ad-sdks/evm-sdks/monad-sdk\#id-3.-get-domains-for-a-specific-tld) 3\. Get Domains for a Specific TLD Copy ```inline-grid min-w-full grid-cols-[auto_1fr] p-2 [count-reset:line] print:whitespace-pre-wrap const tldDomains = await parser.getAllUserDomainsFromTld(PUBLIC_KEY, '.mon'); // Output: [NameRecord { domain_name: "miester", tld: ".mon", ... }] ``` #### [Direct link to heading](https://docs.alldomains.id/protocol/developer-guide/ad-sdks/evm-sdks/monad-sdk\#id-4.-get-domain-owner) 4\. Get Domain Owner Copy ```inline-grid min-w-full grid-cols-[auto_1fr] p-2 [count-reset:line] print:whitespace-pre-wrap const owner = await parser.getOwnerFromDomainTld('miester.mon'); // Output: "0x94Bfb92da83B27B39370550CA038Af96d182462f" ``` #### [Direct link to heading](https://docs.alldomains.id/protocol/developer-guide/ad-sdks/evm-sdks/monad-sdk\#id-5.-get-name-record) 5\. Get Name Record Copy ```inline-grid min-w-full grid-cols-[auto_1fr] p-2 [count-reset:line] print:whitespace-pre-wrap const nameRecord = await parser.getNameRecordFromDomainTld('miester.mon'); // Output: NameRecord { created_at, domain_name, expires_at, main_domain_address, tld, transferrable } ``` ### [Direct link to heading](https://docs.alldomains.id/protocol/developer-guide/ad-sdks/evm-sdks/monad-sdk\#core-methods-available-on-both-chains) Core Methods (Available on Both Chains) - `getAllUserDomains(userAccount)`: Retrieves all domains owned by a user. - `getAllUserDomainsFromTld(userAccount, tld)`: Retrieves domains for a specific TLD. - `getOwnerFromDomainTld(domainTld)`: Retrieves the owner of a domain. - `getNameRecordFromDomainTld(domainTld)`: Retrieves detailed record data for a domain. - `getMainDomain(userAddress)`: Retrieves the user's main domain. [PreviousEVM SDKs](https://docs.alldomains.id/protocol/developer-guide/ad-sdks/evm-sdks) [NextMOVE SDKs](https://docs.alldomains.id/protocol/developer-guide/ad-sdks/move-sdks) Last updated 3 months ago ## Move SDKs Guide [PreviousMonad SDK](https://docs.alldomains.id/protocol/developer-guide/ad-sdks/evm-sdks/monad-sdk) [NextRecords](https://docs.alldomains.id/protocol/developer-guide/records) ## AllDomains Protocol Records The following records are currently available on AllDomains Protocol: Name Value IPFS An IPFS CID ARWV An Arweave address SOL A address ETH An ETH address BTC A BTC address LTC A LTC address DOGE A DOGE address email An Email address url A website URL discord A discord username github A Github username reddit A Reddit username twitter A Twitter username telegram A Telegram username pic A Profile picture SHDW A SHDW DRIVE address #### [Direct link to heading](https://docs.alldomains.id/protocol/developer-guide/records\#resolving-a-record) Resolving a record: Copy ```inline-grid min-w-full grid-cols-[auto_1fr] p-2 [count-reset:line] print:whitespace-pre-wrap import { NameRecordHeader, getDomainKey, Record } from "@onsol/tldparser"; import { Connection } from "@solana/web3.js"; const RPC_URL = 'https://api.mainnet-beta.solana.com'; const connection = new Connection(RPC_URL); //domain const domain = "vlad.abc"; /** we are getting the IPFS record value here but any from the list can be used **/ const recordPubkey = (await getDomainKey(Record.IPFS + "." + domain, true)).pubkey const nameRecord = await NameRecordHeader.fromAccountAddress(connection, recordPubkey); const idx = nameRecord?.data?.indexOf(0x00); //get the record value const recordValue = nameRecord?.data?.subarray(0, idx).toString(); ``` [PreviousMOVE SDKs](https://docs.alldomains.id/protocol/developer-guide/ad-sdks/move-sdks) [NextStructure/Architecture](https://docs.alldomains.id/protocol/developer-guide/structure-architecture) Last updated 1 year ago ## NameRecord Structure Guide NameRecord: Copy ```inline-grid min-w-full grid-cols-[auto_1fr] p-2 [count-reset:line] print:whitespace-pre-wrap #[account] pub struct NameRecordHeader { // Names are hierarchical. `parent_name` contains the account address of the parent // name, or `Pubkey::default()` if no parent exists. pub parent_name: Pubkey, // The owner of this name pub owner: Pubkey, // The class of data this account represents // If `Pubkey::default()` the data is unspecified. pub nclass: Pubkey, // expires_at is an unix timestamp in UTC. // programs must respect the expiry_at. after by which a rent is void. // the data is invalid unless extended by the owner or // new owner comes with new data replacing the old one. // defaults to 0 // if it is 0, the domain is forever pub expires_at: u64, // time in unix timestamp in utc. // when the name account has been created. pub created_at: u64, // immutable owner domains pub non_transferable: bool, } ``` [PreviousRecords](https://docs.alldomains.id/protocol/developer-guide/records) [NextIntegrations](https://docs.alldomains.id/protocol/integrations) Last updated 10 months ago ## AllDomains Integrations **AllDomains** can seamlessly integrate with any application within all ecosystems it's been deployed. Expanding its utility, you can utilize our domain names across the following products on the respective ecosystems: ### [Direct link to heading](https://docs.alldomains.id/protocol/integrations\#undefined) [PreviousStructure/Architecture](https://docs.alldomains.id/protocol/developer-guide/structure-architecture) [NextSolana](https://docs.alldomains.id/protocol/integrations/solana) Last updated 7 months ago ## Solana Integrations Overview ### [Direct link to heading](https://docs.alldomains.id/protocol/integrations/solana\#wallets) **Wallets:** Name About **Solflare** [https://twitter.com/solflare\_wallet](https://twitter.com/solflare_wallet) **Phantom** [https://twitter.com/phantom](https://twitter.com/phantom) **Helium Wallet** [https://twitter.com/helium](https://twitter.com/helium) **Backpack** [https://twitter.com/Backpack](https://twitter.com/Backpack) **Nightly** [https://x.com/Nightly\_app](https://x.com/Nightly_app) ### [Direct link to heading](https://docs.alldomains.id/protocol/integrations/solana\#marketplaces) **Marketplaces:** Name About **MagicEden** [https://twitter.com/MagicEden](https://twitter.com/MagicEden) **Hyperspace** [https://twitter.com/hyperspacexyz](https://twitter.com/hyperspacexyz) **Hadeswap** [https://twitter.com/hadeswap](https://twitter.com/hadeswap) **Tensor** [https://twitter.com/tensor\_hq](https://twitter.com/tensor_hq) ### [Direct link to heading](https://docs.alldomains.id/protocol/integrations/solana\#explorers) Explorers: Name About **SolanaFM** [https://twitter.com/solanafm](https://twitter.com/solanafm) **Solscan** [https://solscan.io/](https://solscan.io/) **SolanaExplorer** [https://explorer.solana.com/](https://explorer.solana.com/) ### [Direct link to heading](https://docs.alldomains.id/protocol/integrations/solana\#tools) **Tools:** Name About **Squads** [https://twitter.com/SquadsProtocol](https://twitter.com/SquadsProtocol) Solana MultiSig management protocol for web3 native teams **Dialect** [https://twitter.com/saydialect](https://twitter.com/saydialect) Enabling a more engaging dapp experience with timely, targeted messages and notifications **Solstis** [https://twitter.com/solstis\_app](https://twitter.com/solstis_app) **Solana ChatGPT Plugin** [https://chatgpt.solanalabs.com/](https://chatgpt.solanalabs.com/) **FluxBeam** [https://twitter.com/FluxBeamDEX](https://twitter.com/FluxBeamDEX) **Solfees** [https://twitter.com/ronnyhaase](https://twitter.com/ronnyhaase) **Birdeye** [https://twitter.com/birdeye\_so](https://twitter.com/birdeye_so) **CryptoSlam** [https://twitter.com/cryptoslamio](https://twitter.com/cryptoslamio) **Solworks AirdropChecker** [https://solana-airdrop-checker.solworks.dev/](https://solana-airdrop-checker.solworks.dev/) **SolChat** [https://twitter.com/SolChatCoin](https://twitter.com/SolChatCoin) **Matrica** [https://twitter.com/MatricaLabs](https://twitter.com/MatricaLabs) **SolMail** [https://x.com/SolMailOfficial](https://x.com/SolMailOfficial) **Rugcheck** [https://rugcheck.xyz/verify/token](https://rugcheck.xyz/verify/token) **Jupiter Portfolio** [https://portfolio.jup.ag/](https://portfolio.jup.ag/) **Webacy** [https://www.webacy.com/](https://www.webacy.com/) **Biblio** [https://biblio.tech/](https://biblio.tech/) **DotBlinkMe** [https://www.dotblink.me/search](https://www.dotblink.me/search) **TipLink** [https://tiplink.io/](https://tiplink.io/) **CarrotDeFi** [https://x.com/DeFiCarrot](https://x.com/DeFiCarrot) **Realms** [https://app.realms.today/realms](https://app.realms.today/realms) **Solana Agent Kit** [https://www.solanaagentkit.xyz/](https://www.solanaagentkit.xyz/) **Step Finance** [https://app.step.finance/en/dashboard](https://app.step.finance/en/dashboard) ### [Direct link to heading](https://docs.alldomains.id/protocol/integrations/solana\#leaderboards) Leaderboards Name About **Sharp Trade** [https://sharptrade.fi/leaderboard](https://sharptrade.fi/leaderboard) [PreviousIntegrations](https://docs.alldomains.id/protocol/integrations) [NextEclipse](https://docs.alldomains.id/protocol/integrations/eclipse) Last updated 3 months ago ## Eclipse Integrations Overview ### [Direct link to heading](https://docs.alldomains.id/protocol/integrations/eclipse\#wallets) **Wallets:** Name About **Backpack** [https://twitter.com/Backpack](https://twitter.com/Backpack) **Salmon** (In Progress) [https://x.com/salmonwallet](https://x.com/salmonwallet) **Nightly** [https://x.com/Nightly\_app](https://x.com/Nightly_app) ### [Direct link to heading](https://docs.alldomains.id/protocol/integrations/eclipse\#marketplaces) **Marketplaces:** Name About **Scope**(In Progress) [https://x.com/scopenft](https://x.com/scopenft) ### [Direct link to heading](https://docs.alldomains.id/protocol/integrations/eclipse\#explorers) Explorers: Name About **Eclipse XRAY** [https://www.eclipsexray.id/](https://www.eclipsexray.id/) **EclipseScan** [https://eclipsescan.xyz/](https://eclipsescan.xyz/) **Explorer \| Eclipse** [https://explorer.eclipse.xyz/](https://explorer.eclipse.xyz/?cluster=devnet) ### [Direct link to heading](https://docs.alldomains.id/protocol/integrations/eclipse\#tools) **Tools:** Name About **Nimbus** [https://getnimbus.io/](https://getnimbus.io/) **FightHorse** [https://x.com/thefighthorse](https://x.com/thefighthorse) **MoonLaunchFun** [https://x.com/Moonlaunchfun](https://x.com/Moonlaunchfun) ### [Direct link to heading](https://docs.alldomains.id/protocol/integrations/eclipse\#analytics) Analytics Name About **Pine Analytics** [https://www.pineanalytics.xyz/](https://www.pineanalytics.xyz/) ### [Direct link to heading](https://docs.alldomains.id/protocol/integrations/eclipse\#leaderboards) Leaderboards Name About **Sharp Trade** [https://eclipse.sharptrade.fi/leaderboard](https://eclipse.sharptrade.fi/leaderboard) **Purebet** [https://exchange.purebet.io/leaderboard](https://exchange.purebet.io/leaderboard) **Invariant** [https://eclipse.invariant.app/points](https://eclipse.invariant.app/points) ### [Direct link to heading](https://docs.alldomains.id/protocol/integrations/eclipse\#gaming) Gaming Name About **Cryptara Conquest** [https://eclipse.cryptara.world/home](https://eclipse.cryptara.world/home) [PreviousSolana](https://docs.alldomains.id/protocol/integrations/solana) [NextMonad](https://docs.alldomains.id/protocol/integrations/monad) Last updated 3 months ago ## Monad Integration Resources ## [Direct link to heading](https://docs.alldomains.id/protocol/integrations/monad\#wallets) Wallets: Name About **Haha Wallet** [https://x.com/haha\_app](https://x.com/haha_app) ## [Direct link to heading](https://docs.alldomains.id/protocol/integrations/monad\#tools) Tools: Name About **Narwhal Finance** [https://testnet.narwhal.finance/](https://testnet.narwhal.finance/) **Dirol Protocol** [https://www.dirol.network/](https://www.dirol.network/) **Clober DEX** [https://www.clober.io/](https://www.clober.io/) **shMonad (Fastlane)** [https://shmonad.xyz/](https://shmonad.xyz/) **Montools Bulk Transfer** [https://montools.xyz/bulktransfer](https://montools.xyz/bulktransfer) **Monorail** [https://testnet-preview.monorail.xyz/](https://testnet-preview.monorail.xyz/) [PreviousEclipse](https://docs.alldomains.id/protocol/integrations/eclipse) [NextSOON SVM](https://docs.alldomains.id/protocol/integrations/soon-svm) Last updated 5 days ago ## SOON Explorer BETA Name About **SOON Explorer (BETA)** [https://soo.network/ecosystem](https://soo.network/ecosystem) [PreviousMonad](https://docs.alldomains.id/protocol/integrations/monad) [NextSonic SVM](https://docs.alldomains.id/protocol/integrations/sonic-svm) Last updated 2 months ago ## Sonic SVM Integrations ## [Direct link to heading](https://docs.alldomains.id/protocol/integrations/sonic-svm\#wallets) Wallets Name About Backpack [https://twitter.com/Backpack](https://twitter.com/Backpack) [PreviousSOON SVM](https://docs.alldomains.id/protocol/integrations/soon-svm) [NextThe AllDomains Experience](https://docs.alldomains.id/protocol/the-alldomains-experience) Last updated 1 month ago ## AllDomains Experience Overview **Season 1 Summary:** Start Date: **June 24th 2024** **TL;DR:** The higher your points, the better your rewards **How to join:** You can easily join the AllDomains Experience by visiting [alldomains.id](https://alldomains.id/), connecting your wallet, and going to your profile page. There, you can access your dashboard. For your profile to become active, you must register at least one of our domain names. **How it works:** You will earn points by completing various AllDomains-related tasks on our platform and partner platforms. Our goal is to empower users and revolutionize the Domain playbook. We believe rewarding real platform users who understand the full capacity of Domains will accelerate our growth. As you complete tasks you will find yourself surprised by all the different applications of our Domains, the features you can enable for them, and the features they can enable for communities. Some activities that will get you points during Season 1 include: - **Owning an unexpired Domain** - **Renewing a Domain** - **Setting up your Main Domain** - **Joining Discord** - **Opting in to Dialect notifications for Domains** - **Holding specific web3 tokens and NFTs (SMBs, Lads, Saga Genesis and Chapter 2 etc.)** - **Participating in our Referral Links program** Season 1 will unquestionably have more tasks that could earn you points. Additionally, the total points awarded for any given task are subject to change at any point throughout the Seasons. Please read our [Terms and Conditions.](https://docs.alldomains.id/protocol/the-alldomains-experience/terms-and-conditions) What other tasks you ask? If you are observant you may catch some hints... [PreviousSonic SVM](https://docs.alldomains.id/protocol/integrations/sonic-svm) [NextReferral Program](https://docs.alldomains.id/protocol/the-alldomains-experience/referral-program) Last updated 6 months ago ## Referral Program Overview The AllDomains Experience task Referral Program allows you to create your own referral link. You can then share it with your friends and leverage the power of your network to increase your points total significantly. **Finding your referral link:** The referral link is being displayed in multiple places across your profile. Use any of them to copy it and send it to your friends. ![](https://docs.alldomains.id/~gitbook/image?url=https%3A%2F%2F4163218443-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FW79USbvVh7YhdsI3PhOO%252Fuploads%252Fogkd3GxMwzj2sG7bCOQr%252FReferral%2520Docs.png%3Falt%3Dmedia%26token%3Df4359f1c-2ae2-42c6-a819-a22b51a55568&width=768&dpr=4&quality=100&sign=40541861&sv=2) Find your Referral Link **Referral Program Mechanics:** Referral links work for inviting accounts that don’t yet own one of our domain names. If any of your friends registers his first domain name using your referral link and begins his AllDomains Experience journey, you will both be rewarded: - You will get 10% of all Experience Points your friend gathers **for the duration of the campaign** - They will get an additional 420 Experience Points for registering a domain (In total 840 points: 420 for registering their first domain + the 420 bonus) The 10% Experience Points bonus does not apply subsequently (friends invited by your friends). If you **share a referral link** but don’t own one of our domain names yourself, your points will still accumulate, but your **profile will not be active** until you register a domain name. [PreviousThe AllDomains Experience](https://docs.alldomains.id/protocol/the-alldomains-experience) [NextOn Eclipse](https://docs.alldomains.id/protocol/the-alldomains-experience/on-eclipse) Last updated 11 months ago ## AllDomains Experience Following our successful launch of **.turbo TLD**, we have opened the AllDomains Experience for all **Eclipse domain name** owners To get access to the AllDomains Experience on Eclipse, you will have to either: **A.** Renew a freely claimed domain name (domains claimed pre-public launch) or **B.** Publicly claim a .turbo domain (available soon) After doing either of the steps above, using your dashboard, you will get access to a new string of tasks that can earn you Experience Points: - Renew domain - repeatable; rewards issued per action - Join our Discord server - Follow us on X - Set up a main domain - Link your X account - completed by default for users that registered pre-public More tasks are being developed and will be available in the upcoming days [PreviousReferral Program](https://docs.alldomains.id/protocol/the-alldomains-experience/referral-program) [NextTerms and conditions](https://docs.alldomains.id/protocol/the-alldomains-experience/terms-and-conditions) Last updated 6 months ago ## AllDomains Experience Terms Point programmes can be an effective method for AllDomains to acquire new users, reward loyalty, and ultimately get our products into the hands of users who will find value in using them. Season 1 is designed to both highlight and encourage all the tasks within the AllDomains Dashboard. We believe the more actions taken by a user will result in a more rewarding experience. The AllDomains Experience S1 (and future campaigns) aims to attract these users, and incentivize them to use the platform and our products. ### [Direct link to heading](https://docs.alldomains.id/protocol/the-alldomains-experience/terms-and-conditions\#terms-and-conditions) Terms and conditions Through interaction with alldomains.id services, users can earn “AllDomains Experience” Points. AllDomains Experience Points do not hold any inherent value in real currency, do not constitute the personal property of the user, nor are they treated as currency or a medium of exchange. Points are also non-redeemable, non-refundable, and non-convertible into any form of currency or other value. **We reserve the right to:** - Remove points/exclude players for fraud - Change the points value for the available challenges at any time during the campaign's duration. Changes will be made visible on the website **Please note:** - Some points are assigned to the domain name, not the wallet (Register a Domain Name task), while others are assigned to the paying wallet (Renew a Domain Name task) - Challenges should remain completed for the whole duration of the campaign. If at any point an action needed to complete a challenge will be reverted by the user, the points awarded can be removed from the profile - Ex. activate notifications, points are awarded and after that, the notifications are disabled We may revise and update these Terms and Conditions for all current and upcoming tasks. All changes are effective immediately when we post them and apply to all access to and use of the Website thereafter. [PreviousOn Eclipse](https://docs.alldomains.id/protocol/the-alldomains-experience/on-eclipse) [NextPartner Guide](https://docs.alldomains.id/protocol/partner-guide) Last updated 11 months ago ## TLD Optimization Guide If you have enabled your own TLDs: Congratulations! You are on your way to making your community far more visible in all its blockchain interactions and cementing yourself as a Solana household name! This guide is designed to inform you on the various ways you can leverage your TLD to optimize the usefulness and attractiveness of your domain names by ensuring you leverage our integrations to their highest potential. [PreviousTerms and conditions](https://docs.alldomains.id/protocol/the-alldomains-experience/terms-and-conditions) [NextHow to set up Matrica](https://docs.alldomains.id/protocol/partner-guide/how-to-set-up-matrica) Last updated 1 year ago ## Matrica Role Setup Guide You can now reward your most faithful community members by enabling domain name-based Matrica role verification! These roles can be used in various ways, either purely as vanity roles or by gating access to specific channels, perks (like limiting access to giveaway channels), and holder bonuses inside your Discord and/or Telegram. ## [Direct link to heading](https://docs.alldomains.id/protocol/partner-guide/how-to-set-up-matrica\#getting-started-and-matrica-plans) **Getting Started and Matrica Plans** Be sure the person that is in charge of this process has role creation privileges in Discord and Bot Invite privileges in Discord/Telegram To get your Matrica profile started visit [https://business.matrica.io/](https://business.matrica.io/) and join their Discord here: [https://discord.gg/matricalabs](https://discord.gg/matricalabs) Follow these steps 1\. Fill in the required information ![](https://docs.alldomains.id/~gitbook/image?url=https%3A%2F%2F4163218443-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FW79USbvVh7YhdsI3PhOO%252Fuploads%252FweR8Uum3k34EsbsqABNp%252Funnamed%2520%286%29.png%3Falt%3Dmedia%26token%3D6bd8bc40-801c-470c-ab34-2ab0fb05f72d&width=768&dpr=4&quality=100&sign=2cce9fea&sv=2) The Matrica Community Application Form 1. Select either a Premium or Enterprise Plan: ![](https://docs.alldomains.id/~gitbook/image?url=https%3A%2F%2F4163218443-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FW79USbvVh7YhdsI3PhOO%252Fuploads%252FDREz0k6MBCExooC0Y244%252Funnamed%2520%287%29.png%3Falt%3Dmedia%26token%3D3fb5d1d9-e87b-422a-abb9-646ddc273ef2&width=768&dpr=4&quality=100&sign=7f5bd368&sv=2) Matrica Community Plans If you choose the Premium Plan, enabling domain name roles will also require a one-off $500 investment, as this is a custom service. This service is free for partners on Matrica’s Enterprise Plan. 1. To get the required details for making the one-time payment please open a ticket in the Matrica Discord or contact their team here [https://calendly.com/MatricaLabs](https://calendly.com/MatricaLabs) Alternatively, you can also request support from AllDomains who will be happy to assist and put you in contact with the Matrica team. 1. Matrica will then enable domain name verification for your Discord and Telegram communities. ## [Direct link to heading](https://docs.alldomains.id/protocol/partner-guide/how-to-set-up-matrica\#setting-up-discord-verification) **Setting up Discord Verification** 1. Go to your “Verification” page and invite the Matrica Bot to your Discord Server. This will automatically create the Bot's “Matrica” role in your Discord. 2. Create the role(s) you want your domain name holders to have (e.g., .bonk domain; feel free to be creative). 3. Make sure that the “Matrica” role is above the one(s) you just created in your Role Priority list on Discord. You can even put Matrica as the highest on the Role List to make sure everyone gets their role ![](https://docs.alldomains.id/~gitbook/image?url=https%3A%2F%2F4163218443-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FW79USbvVh7YhdsI3PhOO%252Fuploads%252Fu7QwR0TjkMTbCdJ37FKn%252Funnamed%2520%285%29.png%3Falt%3Dmedia%26token%3D67228545-f8b3-4aa9-8f43-afc22eca0579&width=768&dpr=4&quality=100&sign=fc6da2a8&sv=2) Move Matrica ABOVE the Roles you want it to control ### [Direct link to heading](https://docs.alldomains.id/protocol/partner-guide/how-to-set-up-matrica\#setting-up-the-rules) **Setting up the Rules** Now that the bot has been set up in your Discord is time to create the verifying rules. 1. Head back to [https://business.matrica.io/verification](https://business.matrica.io/verification) and click the _**Create New Rule**_ button: ![](https://docs.alldomains.id/~gitbook/image?url=https%3A%2F%2F4163218443-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FW79USbvVh7YhdsI3PhOO%252Fuploads%252Fy6zbnjlQvO3nKRi4RjJ4%252Funnamed%2520%284%29.png%3Falt%3Dmedia%26token%3Deedaf3c1-8030-41bd-844a-5cbfa6c61698&width=768&dpr=4&quality=100&sign=90da5e96&sv=2) Create Verifying Rules 1. Select the _Role_ you want to assign, then select “Domain” for the _Role Type_. 2. Identify your community’s TLD and select it from the dropdown list. Be sure to **check the AllDomain Only button**; otherwise, .sol domain names might also be considered! 1. Select the number of domain names a user should own to get the specified role (should be at least 1). 2. You can add tiered domain-holding Roles (e.g 1 domain = shrimp role, 5 domains = dolphin role, etc.). Click Save and you’re done 3. You can also add multiple Rules for the same Role (e.g.: hold 1 domain and/or 1 NFT). Let’s take the image above as an example: All users that hold at least 1 _**.all**_ domain name will automatically be assigned the “he like orange” role. With this integration, you can add multiple rules and play around in many fun and creative ways. Find out what best suits your community’s needs, and don’t be afraid to experiment. Now, you can gate specific channels to specific user roles and even layer up your access based on domain name ownership. One great example is giving only certain members access to Subber Raffles, while others can, depending on their role, access FCFS Giveaways. ## [Direct link to heading](https://docs.alldomains.id/protocol/partner-guide/how-to-set-up-matrica\#setting-up-telegram-gating) **Setting up Telegram Gating** Setting up Telegram is easier: Just invite the Telegram Bot to your Group and create the rules. **If you want your Telegram Group to stay Public do not use the Matrica Bot!** The Telegram Bot can only gate **the entire group** and **can not be used to gate** just certain parts of it **(Topics)**. This essentially transforms your Public Group into a Private Group (gated by domain name ownership) ## [Direct link to heading](https://docs.alldomains.id/protocol/partner-guide/how-to-set-up-matrica\#additional-sources-and-information) Additional sources and information For a more in-depth look at setting up Matrica verification (NFTs, Tokens, etc. included) visit their Set Up Guide here [https://docs.matrica.io/guides/community-guide](https://docs.matrica.io/guides/community-guide) Also, if your users are new to Matrica feel free to share this “How to Verify” guide with them: [Verify with Matrica](https://docs.alldomains.id/protocol/getting-started/verify-with-matrica) [PreviousPartner Guide](https://docs.alldomains.id/protocol/partner-guide) [NextAllDomains Pools (v1.0)](https://docs.alldomains.id/protocol/alldomains-pools-v1.0) Last updated 4 months ago ## Active Pools Overview **The information described below is intended for the current mechanics of active pools.** If you want to launch a new TLD please contact us via the form here [https://alldomains.id/launch-tld](https://alldomains.id/launch-tld) [PreviousHow to set up Matrica](https://docs.alldomains.id/protocol/partner-guide/how-to-set-up-matrica) [NextActivating NFT wrapping](https://docs.alldomains.id/protocol/alldomains-pools-v1.0/activating-nft-wrapping) Last updated 1 year ago ## Activating NFT Wrapping NFT wrapping will be set up by the AllDomains Team. To do so the Pool Initiator will need to join our [Discord,](https://discord.gg/UP6gqQx7vy) open a ticket, and provide: A **700x700 .png** image for the NFT background Be aware that the wrapper will always print the domain name in white with a lower left alignment (see below): ![](https://docs.alldomains.id/~gitbook/image?url=https%3A%2F%2Flh4.googleusercontent.com%2F9GPfi40QRXzwf1hMxcOEOPd7f4Z1Lo6zGZKaAL4YmnzABJtKkmdMeb7f3Ble9mCoAGegrD2_ScHalhYXWPISNH81NT4ehId6jgF_pMNxfFVGt2bxkDBrrXs6q2eGHGdsYCEsiOZDpWRlLfP5nmlMe4I&width=768&dpr=4&quality=100&sign=e54cf1ac&sv=2) NFT Background Example A **700x700 px** .png image to be used as the main collection image on secondary marketplaces (see below) [PreviousAllDomains Pools (v1.0)](https://docs.alldomains.id/protocol/alldomains-pools-v1.0) [NextListing on secondary markets](https://docs.alldomains.id/protocol/alldomains-pools-v1.0/listing-on-secondary-markets) Last updated 1 year ago ## Listing TLD Collections AllDomains does not provide an automated listing on marketplaces. We recommend each Collaborator list the TLD Collection on marketplaces like Magic Eden to allow them to add their proper links and social channels, and take ownership of their assets. We can verify the collection for you, but all links will also point to the AllDomains social channels instead of our collaborators (login is required, since the impossibility for us to verifiy with your social channels). Here is the guide to list: [https://help.magiceden.io/en/articles/6006558-how-to-list-your-nft-collection-on-magic-eden-a-guide-for-creators#h\_3c2481d9f9](https://help.magiceden.io/en/articles/6006558-how-to-list-your-nft-collection-on-magic-eden-a-guide-for-creators#h_3c2481d9f9) [https://airtable.com/appDEhsoqZFoMJT17/shr1KRWcqRWYEeYLW](https://airtable.com/appDEhsoqZFoMJT17/shr1KRWcqRWYEeYLW) The NFTs created after wrapping support the MCC standard, which means you can provide your Verified Collection Address (VCA). To obtain your VCA, enter the hash of one of your NFTs in [Solana Explorer](https://explorer.solana.com/) and copy the Verified Collection Address. ![](https://docs.alldomains.id/~gitbook/image?url=https%3A%2F%2Flh3.googleusercontent.com%2FMeOMY1oPyjX6Sr2Pl4Zu3a4jh4SxkJZ9RnB8WFRNLIrnsTzp_8huWQSCLbUHArTPcKwOzHu0qWvFw4bLPbu3y7o475ohFA_Dz_KotHKPSCv1SkA6lwzRE_KwL1wUogNhv-_f9wP2-bPQCDkjPwyujpE&width=768&dpr=4&quality=100&sign=1c73a656&sv=2) One more hint: If you generate our own Hash List, please specify that the collection is not fixed, it’s open so you don’t have to update the hash list containing the new NFTs, for each new collection. You can do that by leaving a message for the Magic Eden Listing Operations team under "Anything else we should know? ![](https://docs.alldomains.id/~gitbook/image?url=https%3A%2F%2Flh3.googleusercontent.com%2FyWDQJwUiQCVqW6NAgL1T1GH7UL-DZwhomG7EOWNfbdgNy9GdqcHITrapw8w69Ofk78c8oBfsKqacrrXMY1RHqeLCP7MDPjNB66Z3PajNa9WANRP1C36hzmt8dRZN2VEmUJXO6Kk-YFurtdxiZyvpLPc&width=768&dpr=4&quality=100&sign=d2e18e9&sv=2) Please open a [Discord](https://discord.gg/UP6gqQx7vy) Ticket in case you have any issues and we will try, and contact the marketplace support. [PreviousActivating NFT wrapping](https://docs.alldomains.id/protocol/alldomains-pools-v1.0/activating-nft-wrapping) [NextMarketing your TLD](https://docs.alldomains.id/protocol/alldomains-pools-v1.0/marketing-your-tld) Last updated 1 year ago ## Marketing Your TLD Now that your TLD is live implementing a few basic marketing tactics is essential to help improve visibility. These will help strengthen and grow your community while increasing sales numbers. First thing first! If you are not a member of our discord server, join it here: [https://discord.gg/Xf7YQQccaq](https://discord.gg/Xf7YQQccaq). Second, you will want to create a dedicated Twitter/X account for your new TLD and add it to the TLD list, so we ALL know to follow you! When people are interested in learning about your custom domain or would like to purchase, you want them to be able to access the information quickly and easily. Put the All Domains website purchase link directly into your X bio. Also, put any other pertinent info about the main project associated with the TLD and community info/links. Then, you want to ensure all your accounts are connected. This means they follow one another, and the social media managers are connected via a group chat. Include All Domains in this group chat, too! This way, we can send tweets for others to support/retweet or immediately address any ideas/concerns. This brings us to cross-marketing tactics. As frequently as possible, while still feeling natural, we should tag one another's accounts in our tweets. Win and help win. These can be direct marketing tweets, giveaways, shitposts, or fun feuds on the timeline. All these listed above are standard methods to beat the algorithm and increase views across the platform. **A few other general tips for Twitter visibility:** \- tweets with graphics or gifs attached get boosted in the algo \- never start a tweet with a "@" symbol... if you have to, put a single period "." right before it. If you don't, that tweet is mostly only visible to whoever you "@" in the opening \- tagging other accounts boosts visibility \- if you are associated with a token, always use your ticker (ex: $ALL) at the end of the tweet. Again, it boosts visibility in the algo and increases your occurrence in searches when people are looking for info on your token \- Utilize raid groups, whether a group chat on X or a channel in Discord. You want 10-15 people minimum, ready to engage within the first minutes you tweet. The algo takes time into consideration. If you don't get engagement right off the bat, then you get buried. Have your team and community support you in this! Crossover graphics between your project and All Domains are always a good idea. Then, when we retweet each other, it has a shared interest for all parties involved. This can also be combined with other TLDs in fun and engaging ways! Don’t be shy to use AI! If you need a team member skilled at photo edits or graphic creation, mobilizing your community for this is a great way to get quality work on the cheap. Have memes and art contests with a devoted Discord or TG channel. Encourage people to get involved and offer small prizes related to your project. Keeping one another in the loop on everything happening is essential. Both the positive and potentially harmful. So, in addition to the X group chat we share, there will also be an open voice channel in Discord where we can speak directly. [PreviousListing on secondary markets](https://docs.alldomains.id/protocol/alldomains-pools-v1.0/listing-on-secondary-markets) [NextClaiming rewards](https://docs.alldomains.id/protocol/alldomains-pools-v1.0/claiming-rewards) Last updated 1 year ago ## Automatic Rewards Distribution All Rewards are now being automatically distributed daily! [PreviousMarketing your TLD](https://docs.alldomains.id/protocol/alldomains-pools-v1.0/marketing-your-tld) [NextReclaim Your Tokens](https://docs.alldomains.id/protocol/alldomains-pools-v1.0/reclaim-your-tokens) Last updated 1 year ago ## Reclaim Your Tokens Currently, our new UI does not display the Reclaim Tokens button. This will be remedied shortly and contributors will be able to reclaim 50% of their initial deposits. Remember that since we are discontinuing TLD Pools, once you reclaim your tokens, you will no longer be able to rejoin the Pool. [PreviousClaiming rewards](https://docs.alldomains.id/protocol/alldomains-pools-v1.0/claiming-rewards) [Next.sol PLUS domain names](https://docs.alldomains.id/protocol/.sol-plus-domain-names) Last updated 1 year ago ## .sol PLUS Domain Upgrade ### [Direct link to heading](https://docs.alldomains.id/protocol/.sol-plus-domain-names\#what-is-.sol-plus) What is .sol PLUS? .sol PLUS is an upgraded version of your existing .sol domain on Solana. By upgrading your .sol domain with AllDomains, you transform it into a renewable, revenue-sharing asset — keeping your same .sol domain name but unlocking powerful new benefits like: - Ongoing royalties from future sales and renewals - Partnership revenue shared with you, SNS, and AllDomains - Prevention of domain dormancy and squatting * * * ### [Direct link to heading](https://docs.alldomains.id/protocol/.sol-plus-domain-names\#how-does-.sol-plus-work) How Does .sol PLUS Work? #### [Direct link to heading](https://docs.alldomains.id/protocol/.sol-plus-domain-names\#upgrading-your-domain) Upgrading Your Domain When you upgrade your .sol domain, you transfer its ownership to AllDomains’ smart contract. In return, you receive full ownership of your .sol PLUS domain — which keeps the exact same domain name as your original (e.g., upgrading 1.sol means you now own 1.sol under the .sol PLUS system). This process is permanent and irreversible, so upgrading your domain commits you to the .sol PLUS system and its benefits. * * * #### [Direct link to heading](https://docs.alldomains.id/protocol/.sol-plus-domain-names\#renewals) Renewals - The upgrader of a .sol domain can renew their .sol PLUS domain for free every year, indefinitely, as long as they renew before the expiration date. - If you sell your .sol PLUS domain, the new owner will be responsible for renewal fees. - There is a 50-day grace period after expiration to renew your domain before it is returned to AllDomains and made available for resale. Renewal notifications will be sent via Dialect, Email, and Telegram to keep you informed. Renewal costs: **Upgrader:** $0/year (renew must be done yearly) **Rest:** 1 char domains $375/yr 2 char domains $350/yr 3 char domains $320/yr 4 char domains $80/yr 5+ char domains $10/yr * * * #### [Direct link to heading](https://docs.alldomains.id/protocol/.sol-plus-domain-names\#revenue-sharing-model) Revenue Sharing Model Every time a .sol PLUS domain generates revenue through sales or renewals, the proceeds are split as follows: **Party** **Share of Royalties** Upgrader 40% AllDomains 40% SNS 20% - The upgrader receives 40% of all future royalties, including secondary sales and renewals. - AllDomains and SNS share the remaining royalties. - Royalties are tracked and paid out automatically on-chain with every transaction generating revenue. E.G.: You upgrade 1.sol to the 1.sol PLUS system You then sell this domain for 100 $SOL You receive: 95 $SOL + 40% Royalties (2 $SOL) AllDomains receives: 40% Royalties (2 $SOL) SNS receives: 20% Royalties (1 $SOL) If the new buyer sells the domain again, the royalties generated will once again be split at the same ratio between you, AllDomains and SNS. ### [Direct link to heading](https://docs.alldomains.id/protocol/.sol-plus-domain-names\#benefits-of-upgrading-to-.sol-plus) Benefits of Upgrading to .sol PLUS #### [Direct link to heading](https://docs.alldomains.id/protocol/.sol-plus-domain-names\#for-domain-owners) For Domain Owners - Ongoing Royalties: Earn passive income from your domain’s future sales and renewals. - Renewability: Keep your domain active and avoid losing it due to dormancy. - Market Liquidity: Domains that are abandoned or not renewed can return to the market, increasing availability. - Partnership: Become an active participant in the Solana naming ecosystem and share in the revenue generated. #### [Direct link to heading](https://docs.alldomains.id/protocol/.sol-plus-domain-names\#for-sns) For SNS - Gains new, recurring revenue streams from renewals and sales. - Helps revive dormant or inactive domains and increase market turnover. - Maintains control of the .sol TLD while partnering to improve the ecosystem. #### [Direct link to heading](https://docs.alldomains.id/protocol/.sol-plus-domain-names\#for-alldomains) For AllDomains - Enables strategic growth by tapping into the existing .sol user base. - Creates a sustainable, recurring revenue business model. - Boosts engagement and liquidity in the Solana domain market. * * * ### [Direct link to heading](https://docs.alldomains.id/protocol/.sol-plus-domain-names\#how-to-upgrade-your-.sol-domain) How to Upgrade Your .sol Domain 1. Connect your Solana wallet to the AllDomains website. 2. Select the .sol domain you want to upgrade. 3. Confirm the upgrade transaction (standard Solana gas fees apply). 4. Receive your .sol PLUS domain with renewability and royalty benefits. [PreviousReclaim Your Tokens](https://docs.alldomains.id/protocol/alldomains-pools-v1.0/reclaim-your-tokens) [NextFAQ](https://docs.alldomains.id/protocol/.sol-plus-domain-names/faq) Last updated 19 days ago ## .sol PLUS Domain FAQ #### [Direct link to heading](https://docs.alldomains.id/protocol/.sol-plus-domain-names/faq\#what-is-.sol-plus) What is .sol PLUS? .sol PLUS is an upgraded version of your existing .sol domain. By upgrading your .sol domain with AllDomains, you gain revenue-sharing benefits while retaining your original domain name and unlocking new recurring income opportunities. * * * #### [Direct link to heading](https://docs.alldomains.id/protocol/.sol-plus-domain-names/faq\#why-upgrade-to-.sol-plus-domain-names) Why upgrade to .sol PLUS domain names? Upgrading to .sol PLUS transforms your existing .sol domain into a powerful, revenue-generating digital asset. Here’s why upgrading is the smartest move for your domain: - **Earn Recurring Royalties:** As the upgrader, receive **40% of all future royalties** from sales and renewals — creating ongoing passive income. - **Maintain Full Ownership:** Your domain name stays exactly the same (.sol), fully compatible with all wallets and dApps. - **Market Liquidity:** Renewal fees discourage squatting, while abandoned domains return to the market — keeping the ecosystem vibrant. - **Partnership Benefits:** Share revenue with AllDomains and SNS, strengthening the Solana naming ecosystem. - **Secure and Transparent:** Royalties and ownership are tracked automatically on-chain for complete transparency. Upgrade now to unlock these advantages and position yourself as a leader in the future of Solana domain ownership. * * * #### [Direct link to heading](https://docs.alldomains.id/protocol/.sol-plus-domain-names/faq\#how-does-upgrading-work) How does upgrading work? When you upgrade your .sol domain, you transfer ownership to AllDomains’ smart contract and receive the corresponding .sol PLUS domain — keeping the same domain name and gaining new features. Upgrading is permanent and irreversible. * * * #### [Direct link to heading](https://docs.alldomains.id/protocol/.sol-plus-domain-names/faq\#how-do-renewals-work) How do renewals work? - The **upgrader** of a .sol PLUS domain receives **40% of all royalties** from future sales and renewals. The remaining royalties are split between AllDomains (40%) and SNS (20%). Only the original upgrader is entitled to this 40% share, regardless of future owners. * * * #### [Direct link to heading](https://docs.alldomains.id/protocol/.sol-plus-domain-names/faq\#how-does-revenue-sharing-work) How does revenue sharing work? - You receive **40% of all royalties** from future sales and renewals of your .sol PLUS domain. - AllDomains and SNS share the remaining royalties (40% and 20%, respectively). - Royalties are automatically tracked and distributed on-chain. * * * #### [Direct link to heading](https://docs.alldomains.id/protocol/.sol-plus-domain-names/faq\#can-i-sell-my-upgraded-.sol-plus-domain) Can I sell my upgraded .sol PLUS domain? Yes. When you sell your domain, the new owner takes over renewal responsibilities, but you continue to earn 40% royalties as the upgrader on all future sales and renewals. * * * #### [Direct link to heading](https://docs.alldomains.id/protocol/.sol-plus-domain-names/faq\#what-happens-if-i-dont-renew) What happens if I don’t renew? If the domain isn’t renewed within the 50-day grace period, it returns to AllDomains for resale — keeping the domain market active and liquid. * * * #### [Direct link to heading](https://docs.alldomains.id/protocol/.sol-plus-domain-names/faq\#will-upgrading-affect-my-existing-.sol-domains-compatibility) Will upgrading affect my existing .sol domain’s compatibility? No. Your domain stays fully compatible with all SNS integrations, wallets, and dApps — just with the added benefits of renewability and royalties. * * * #### [Direct link to heading](https://docs.alldomains.id/protocol/.sol-plus-domain-names/faq\#are-there-any-extra-fees) Are there any extra fees? Upgrading and transactions incur only standard, minimal Solana network fees. There are no extra charges by AllDomains. * * * #### [Direct link to heading](https://docs.alldomains.id/protocol/.sol-plus-domain-names/faq\#can-i-revert-back-to-a-regular-.sol-domain) Can I revert back to a regular .sol domain? No. Upgrading to .sol PLUS is a permanent decision and cannot be reversed. * * * If you have more questions or need help upgrading, please visit our Discord for support [Previous.sol PLUS domain names](https://docs.alldomains.id/protocol/.sol-plus-domain-names) [Next.Token Domain Names](https://docs.alldomains.id/protocol/.token-domain-names) Last updated 23 days ago ## .token Domain Names In collaboration with @Rugcheckxyz we are launching .token domain names. Our new enhanced .token domains have been created to battle a by-product of Solana's success. Approximately 15,000 new tokens are launched on Solana daily, making manual verification methods impossible. Platforms such as RugCheck have been designed to allow users to check and verify a token’s viability and identify potential risks. RugCheck requests are also at an all-time high, processing thousands of token audits every day. [PreviousFAQ](https://docs.alldomains.id/protocol/.sol-plus-domain-names/faq) [NextHow does {ticker}.token work?](https://docs.alldomains.id/protocol/.token-domain-names/how-does-ticker-.token-work) Last updated 1 year ago ## .token Domain Registration This partnership with [@Rugcheckxyz](https://x.com/Rugcheckxyz) will allow domain names to be registered by TOKEN teams aiming at long-term stability and building trust with their users! These domain names will serve as an on-chain identity for projects hosting all the associated information and links for the project on the domain's metadata. There is a multitude of perks for your .token domain names: - Token verification with automatic eligibility check via [https://rugcheck.xyz](https://rugcheck.xyz/) - The domain acts as a verification badge for the project’s mint address - .Token domains can also hold associated metadata\* i.e description, website, X, telegram, discord URLs - Allows users to search explorers using {ticker}.token to view project funds and activity quickly without the need to locate and copy/paste addresses You can also think of _**.token domain name**_ verification as an _**authenticity certificate:**_ Getting a .token domain name for your $TICKER will allow you to: - Verify token ownership: Authenticate the identity of the token and check that the funds are safe - Combat fake tokens: Reduce the risk of swaps between counterfeit versions of the token - Build community trust: Signal users that the token is trustworthy and has a long-term vision - Improve trust scores: Many protocols prioritize verified tokens. RugCheck will perform regular automatic audits of verified tokens. Should a token fail an audit or not be renewed, the token domain will be revoked \*Token Metadata Storage: **Alpha version (current):** Web2 DB **Second version:** On-chain Program that owns the Records for each Token’s Metadata. The authorities that can change the data will be @AllDomains\_ and [@Rugcheckxyz](https://x.com/Rugcheckxyz) **Third version:** Add a more complex ACL for managing the Metadata. This could be either multiple parties or a DAO. [Previous.Token Domain Names](https://docs.alldomains.id/protocol/.token-domain-names) [NextHow to register a .token domain name](https://docs.alldomains.id/protocol/.token-domain-names/how-to-register-a-.token-domain-name) Last updated 1 year ago ## .token Domain Registration Head over to [https://rugcheck.xyz/verify/token](https://rugcheck.xyz/verify/token) Only tokens that pass the automated analytics checks will be allowed to apply **Requirements to claim:** - Symbol must not already exist on the verified list - Must not be a duplicate - Token must have a Rugcheck score below 2000 - Mint authority must be revoked - Freeze authority must be revoked - Metadata must be set - Liquidity must be locked in a Rugcheck-approved locker (for new tokensor existing strict list, this isn't required). The list of approved lockers can be accessed here [https://rugcheck.xyz/integrations](https://rugcheck.xyz/integrations) - Token must be older than 72 hours Eligible projects will then be allowed to claim their .token domain name. Similar to all our standard domains, token domains are renewable. However, please note that we withhold the right to revoke the token domain if the token fails subsequent audits and you fail to make the necessary improvements. Claim your domain name, and you’re all set! [PreviousHow does {ticker}.token work?](https://docs.alldomains.id/protocol/.token-domain-names/how-does-ticker-.token-work) [NextSolana - Eclipse Bridge](https://docs.alldomains.id/protocol/solana-eclipse-bridge) Last updated 1 year ago ## Solana - Eclipse Bridge Unlock the power of cross-chain interoperability with the AllDomains Solana - Eclipse bridge. You can now easily transfer assets and data between the Solana blockchain and Eclipse, empowering seamless interactions across two of the most powerful blockchain ecosystems in Web3. **What are crypto bridges?** Crypto bridges are software protocols that facilitate communication between different blockchains, much like a bridge connecting two islands for travel. They enable direct cross-chain asset transfers with just a few clicks, bypassing the need for centralized exchanges and their lengthy processes. #### [Direct link to heading](https://docs.alldomains.id/protocol/solana-eclipse-bridge\#heres-everything-you-can-expect-from-the-alldomains-solana-eclipse-bridge) Here’s everything you can expect from the AllDomains Solana - Eclipse bridge: **Bridge swiftly:** Transfer tokens from Solana to Eclipse and back again without needing to use centralized exchanges or using complex bridges. **Fastest way to do it:** Want to swap your Eclipse $ETH to Solana $SOL? It takes less than a minute for our bridge to do just that! **Safely transfer assets:** With Hyperlane as our trusted provider, you can bridge with confidence and without worry. **Jumpstart your Eclipse journey:** Our _Get Gas_ feature will ensure you get the gas needed to transact instantly. This is another step towards AllDomains being able to provide multi-chain identities and a unified social graph. Bridge your tokens here: [https://bridge.alldomains.id/](https://bridge.alldomains.id/) [PreviousHow to register a .token domain name](https://docs.alldomains.id/protocol/.token-domain-names/how-to-register-a-.token-domain-name) [NextUsing the Bridge](https://docs.alldomains.id/protocol/solana-eclipse-bridge/using-the-bridge) Last updated 5 months ago ## Solana-Eclipse Bridge Guide Our Solana - Eclipse bridge works both ways, meaning you can either: A. Bridge from Solana to Eclipse Or B. Bridge from Eclipse to Solana #### [Direct link to heading](https://docs.alldomains.id/protocol/solana-eclipse-bridge/using-the-bridge\#to-bridge-from-solana-to-eclipse-follow-these-steps) To bridge from Solana to Eclipse, follow these steps: 1\. Connect your Solana Wallet 2\. Select the amount of $SOL you want to bridge 3\. In the \*Recipient\* field, add the Eclipse wallet address or domain name you want to receive your $SOL 4\. Click \*Continue\*, check the details, click \*Send to Eclipse\* and approve the transaction. Make sure you have enough Gas ($SOL) left in your wallet for the transaction to pass. ![](https://docs.alldomains.id/~gitbook/image?url=https%3A%2F%2F4163218443-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FW79USbvVh7YhdsI3PhOO%252Fuploads%252FyBfHAsrU0DPLt7F9i84A%252FScreenshot%25202024-12-19%2520145419.png%3Falt%3Dmedia%26token%3Dffa4dff5-cf4e-4a3f-99e9-a8231d304bb1&width=768&dpr=4&quality=100&sign=d54a7f65&sv=2) Solana to Eclipse Bridge You can only bridge Solana $SOL to Eclipse $SOL using this route. You will need some Eclipse $ETH (Gas) to start transacting. If you lack Gas in your Eclipse wallet, see the following page: [Get Gas](https://docs.alldomains.id/protocol/solana-eclipse-bridge/get-gas) The bridging process will take about a minute to complete. #### [Direct link to heading](https://docs.alldomains.id/protocol/solana-eclipse-bridge/using-the-bridge\#to-bridge-from-eclipse-to-solana-follow-these-steps) To bridge from Eclipse to Solana, follow these steps: 1. Connect your Eclipse wallet 2. Select the token you want to bridge: either $SOL or $ETH !If you choose to bridge $ETH this will be automatically swapped to $SOL via Hyperlane 3. In the _Recipient_ field, add the **Solana wallet address or domain name** you want to receive your $SOL 4. Click _Continue_, check the details, click _Send to Solana,_ and approve the transaction. Be sure you have enough Gas ($ETH) left in your wallet for the transaction to pass. ![](https://docs.alldomains.id/~gitbook/image?url=https%3A%2F%2F4163218443-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FW79USbvVh7YhdsI3PhOO%252Fuploads%252Fd4vGUzCfgwW3ELovrjIl%252FScreenshot%25202024-12-19%2520145550.png%3Falt%3Dmedia%26token%3D7f96579a-e958-4b40-96da-81258770ef03&width=768&dpr=4&quality=100&sign=4ef8d723&sv=2) Eclipse to Solana Bridge Congratulations! You’ve just bridged from Solana to Eclipse, and back again! You now know how to quickly transfer assets between the Solana and Eclipse blockchains, empowering seamless interactions across two of the most powerful blockchain ecosystems in Web3. [PreviousSolana - Eclipse Bridge](https://docs.alldomains.id/protocol/solana-eclipse-bridge) [NextGet Gas](https://docs.alldomains.id/protocol/solana-eclipse-bridge/get-gas) Last updated 5 months ago ## Get Gas for Transactions As with any blockchain, you will need to pay a small amount of money (gas) in the chain’s native token (in Eclipse’s case, that’s $ETH) to be able to perform any kind of transaction. If you just bridged your $SOL (or $USDC) and only own these assets in your Eclipse wallet, you must swap a small amount of these into $ETH to be able to use the chain. #### [Direct link to heading](https://docs.alldomains.id/protocol/solana-eclipse-bridge/get-gas\#the-get-gas-feature-on-our-website-allows-you-to-get-gas-in-four-easy-steps) The Get Gas feature on our website allows you to get gas in four easy steps: 1. Connect your Eclipse Wallet 2. Select the token ($SOL/$USDC) you want to swap for $ETH 3. Select the amount you want to swap ($5/$10/$20) 4. Click Get Gas and approve the transaction ![](https://docs.alldomains.id/~gitbook/image?url=https%3A%2F%2F4163218443-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FW79USbvVh7YhdsI3PhOO%252Fuploads%252FMYBcaBH8J8sFFB8sOdjA%252FScreenshot%25202024-12-19%2520134302.png%3Falt%3Dmedia%26token%3Da698aa48-29dc-4f04-9221-36a31abe7af4&width=768&dpr=4&quality=100&sign=87e5e09f&sv=2) Get Gas Since Eclipse is an SVM (Solana Virtual Machine), the gas you just loaded should be enough to get you through plenty of transactions. If you run out of gas at any point, you can return and load more from the Get Gas feature. [PreviousUsing the Bridge](https://docs.alldomains.id/protocol/solana-eclipse-bridge/using-the-bridge) [NextLinks](https://docs.alldomains.id/protocol/links) Last updated 5 months ago ## AllDomains Protocol Links - AllDomains -> [https://alldomains.id](https://alldomains.id/) - Twitter -> [https://twitter.com/AllDomains\_](https://twitter.com/AllDomains) - Discord -> [https://discord.gg/alldomains](https://discord.gg/alldomains) - Telegram -> [https://t.me/AllDomainsID](https://t.me/AllDomainsID) - Claim a TLD -> [https://alldomains.id/launch-tld](https://alldomains.id/launch-tld) [PreviousGet Gas](https://docs.alldomains.id/protocol/solana-eclipse-bridge/get-gas) [NextBrand kit](https://docs.alldomains.id/protocol/brand-kit) Last updated 10 months ago ## AllDomains Brand Kit Please access the AllDomains Brand Kit here: [https://xd.adobe.com/view/f6a65052-0d69-4e58-92cc-13f915d07493-a3f5/specs/](https://xd.adobe.com/view/f6a65052-0d69-4e58-92cc-13f915d07493-a3f5/specs/) [PreviousLinks](https://docs.alldomains.id/protocol/links) [NextRoadmap](https://docs.alldomains.id/protocol/roadmap) Last updated 1 year ago ## All Domains Roadmap TBD [PreviousBrand kit](https://docs.alldomains.id/protocol/brand-kit) [NextContact](https://docs.alldomains.id/protocol/contact) Last updated 2 months ago ## AllDomains Contact Info Twitter -> [https://twitter.com/AllDomains\_](https://twitter.com/AllDomains) Github -> [https://github.com/onsol-labs](https://github.com/onsol-labs) Discord -> [https://discord.gg/alldomains](https://discord.gg/alldomains) Email -> [contact@alldomains.id](mailto:contact@alldomains.id) Telegram -> [https://t.me/AllDomainsID](https://t.me/AllDomainsID) [PreviousRoadmap](https://docs.alldomains.id/protocol/roadmap)