Selective Wallet Sharing

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;
}

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 https://clusters.xyz/share 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.

Last updated