# Selective Wallet Sharing

## Setup selective sharing for your app

{% stepper %}
{% step %}

### 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:

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

{% hint style="warning" %}
All signatures will be signed by `0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266`
{% endhint %}

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

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

The `address` should match the `signer` .
{% endstep %}

{% step %}

### 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.

{% hint style="info" %}
Your webhook URL may look something like this: `https://api.myapp.com/webhook/share`
{% endhint %}

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

<figure><img src="/files/aEerabQAmXyqIWlfaJPg" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### 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.&#x20;

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

<figure><img src="/files/5oOLIH7z4W4nGU2GBYQ6" alt=""><figcaption></figcaption></figure>
{% endstep %}
{% endstepper %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.clusters.xyz/introduction/features/selective-wallet-sharing.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
