🥜
Peanut Docs
  • Learn
    • 🥜What is Peanut?
    • 🏦Cashout
      • Supported geographies
    • 📩How to use Peanut Links?
      • ⚙️How do Peanut Links Work?
      • 🔒Trust assumptions
    • 📌Use cases
    • 📚Case Studies
      • 🎁Welcome Packs
      • 📘Raffles to Boost UWAs and Transactions
      • 📗Sending Testnet Tokens at Hackathons
      • 📙IRL Events Marketing
    • ⛓️Supported Chains and Tokens
    • 💰Pricing
    • 🆘Support
  • Integrate
    • Using the SDK
      • Create ClaimLinks
        • Create Link
        • Batch Create Links
        • Create Raffle Links
        • Create Multi-Token Link
        • Create NFT Link
        • Create Gasless Links
        • Create Branded Links
      • Claim
        • Claim Link
        • Claim Gasless Link
        • Claim Cross-Chain Link
        • Claim Raffle Link
        • Claim Link as Sender (Reclaiming)
      • Create Request Link
      • Pay a Request Link
      • Pay a Request Link X-Chain
      • Utils
        • Get Link Details
        • Cross-chain
          • Get Supported Destination Chains
          • Get Supported Destination Tokens
          • Get Cross-Chain Options
          • Get Cross-Chain Route
        • Raffle (Legacy)
          • Get Raffle Info
          • Get User Raffle Status
          • Get Raffle Leaderboard
        • Get Default Provider
        • Get Supported Peanut Chains
        • Toggle Verbosity
        • EthersV5 <> Peanut Transaction Types
        • Estimate Fee Options
        • Get Random String
        • Get all deposits for an Address
        • Get Token Balance
      • API Keys
      • White-Labelling
      • Troubleshooting
      • SDK FAQ
    • Embedding an IFrame
    • Integrate Directly in Smart Contracts
    • Wallet Integrations
      • 🎬UI Examples
  • Other
    • 👾Bug bounties
    • 🔓Security Audit
    • 📜Peanut Protocol Contracts
  • BLOGS
    • Transfer Abstraction
    • Can We Sidestep Onchain Identity?
  • Additional Links
    • 🐦Twitter
    • 😊Telegram
    • 🤙Discord
    • 🥜Work with Us
    • 🎨Press Kit
    • 👨‍⚖️Contact and Legal
Powered by GitBook
On this page
  • 1. Setting the Base URL
  • 2. Updating the App
  • 3. Setting Up a Fallback Website
  1. Integrate
  2. Using the SDK
  3. Create ClaimLinks

Create Branded Links

Want peanut links that dont look like peanut links? Totally possible!

We are an open, permissionless protocol!

If you wish to create a claim link with a custom domain (e.g. walnut.xyz/claim), follow the steps below:

1. Setting the Base URL

To specify your custom domain: pass in a baseUrl to the SDK's createLink function within linkDetails. The baseUrl will be the base URL of the claim link. For example, if you want to use the domain walnut.xyz, pass in https://www.walnut.xyz as the baseUrl.

If you pass in walnut.xyz as your baseUrl, the generated link will be in the format walnut.xyz?c=1... instead of walnut.xyz/claim?c=1.... We recommend adding a subpage (e.g., /claim) after your baseUrl to make the link more intuitive, but this step is optional.

2. Updating the App

For React Native, iOS or Androids, see below:

iOS:

  1. Open your project in Xcode.

  2. Navigate to the "Associated Domains" section.

  3. Add your new base URL to the list of associated domains.

Android:

  1. Open your androidManifest.xml file.

  2. Add your new base URL to the appropriate section.

  3. Create new intent filters associated with the base URL.

apple-app-site-association (AASA) and assetLinks.json files:

The AASA and assetLinks.json files do not require updates since the androidManifest and the associated domains in Xcode have already been updated. You do, however, need to serve them on your custom domain (e.g walnut.xyz) if you want other mobile apps to resolve your domain. If you decide to use the files we provide, all mobile apps registered with Peanut Protocol will be able to resolve your links.

Follow these steps to fetch the two files dynamically from the peanut api:

  1. Fetch the AASA and assetLinks.json file from the Peanut API to serve them dynamically to the corresponding URL.

3. Setting Up a Fallback Website

If a user clicks on your custom link but hasn't installed your app, you should provide a fallback web page. This ensures the user can still claim their link or receive necessary information.

PreviousCreate Gasless LinksNextClaim

Last updated 1 year ago

Make an API call to and to retrieve these files.

For UI implementation examples, refer to the Peanut UI repository at .

For a seamless experience, you can embed the peanut-claim-component on your fallback site. Refer to the documentation on for step-by-step instructions.

https://api.peanut.to/assetLinks.json
https://api.peanut.to/apple-app-site-association
https://github.com/peanutprotocol/peanut-ui
embedding an iframe