Clusters
  • Introduction
    • Overview
    • Concepts
      • Cluster Name
      • Wallet Name
    • Features
      • Communities
      • Multichain
      • Wallet Bundles
      • Antisquatting
      • Wallet Generation
      • Selective Wallet Sharing
  • Getting started
    • Javascript
      • Authentication
      • Clusters
      • Address → Cluster Name
      • Cluster Name → Address
      • Registration
        • Communities
      • Event Indexing
    • API
      • v1
        • Authentication
        • Clusters
        • Address → Cluster Name
        • Cluster Name → Address
        • Registration
          • Communities
        • Event Indexing
      • v0.1 (Deprecated)
        • Address → Cluster
        • Cluster → Address
        • Cluster → Metadata
        • Registration
        • Managing Wallets
  • Resources
    • Smart Contracts
    • Address Types
    • Using Clusters for ETH->SOL Airdrops
  • Integration Guides
    • Convert hex address to clusters name
    • Registering a name
      • Ethereum Networks
      • Solana
    • Whitelabel Communities Registration Flow
Powered by GitBook
On this page
  1. Introduction
  2. Features

Selective Wallet Sharing

PreviousWallet GenerationNextJavascript

Last updated 9 days ago

Setup selective sharing for your app

1

Create an internal webhook URL

In order for users to selectively share their wallets with your application, a webhook will need to be created to process POST requests coming from the user.

When wallets are shared with your application, you'll get the following POST payload:

{
  "wallets": string[];
  "signer": string;
  "signature": string;
}

All signatures will be signed by 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266

To check the validity of the webhook requests, run the following code:

const address = await recoverMessageAddress({
    message: JSON.stringify(selectedWallets),
    signature: attestation.signature as `0x${string}`
});

The address should match the signer .

2

Retrieve a custom share URL for your app

Go to where you will be prompted to enter the webhook URL that you just created.

Your webhook URL may look something like this: https://api.myapp.com/webhook/share

Once you enter a URL, a unique share link can be created that you can send to your users.

3

Send users to the URL

They will be prompted to select which wallets they want to share. When they click "Share" the data will be sent to your webhook URL.

Users can verify that they are sharing data to the right place but double checking the blue "Sharing with" label as seen below.

https://clusters.xyz/share