> For the complete documentation index, see [llms.txt](https://docs.aeternity.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.aeternity.com/developer-documentation/superhero-wallet/docs/deep-link-schema.md).

# Deep link URL Schema

Remember that all parameters specified must be URI encoded.

## Connect to a wallet

```bash
https://wallet.superhero.com/address
  ? x-success=<success-url>
  & x-cancel=<cancel-url>
```

| URL Params             | Description                                                                                                                                                                                                                                                                       |
| ---------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `x-success` (required) | <p>This is a callback URL in case user accepts the connection attempt. Callback <strong>must</strong> contain:<br>- <code>{address}</code> parameter in order to get current address;<br>- <code>{networkId}</code> parameter in order to get current <code>networkId</code>.</p> |
| `x-cancel` (required)  | This is a callback URL in case user rejected connection attempt.                                                                                                                                                                                                                  |

### Example

```
https://wallet.superhero.com/address?x-success=https%3A%2F%2Fexample.com%2Fsuccess-connection%3Faddress%3D%7Baddress%7D%26networkdId%3D%7BnetworkId%7D&x-cancel=https%3A%2F%2Fexample.com%2Ffail-connection
```

## Sign a transaction

```bash
https://wallet.superhero.com/sign-transaction
  ? transaction=<Encoding.Transaction>
  & networkId=<string>
  & broadcast=<boolean>
  & replace-caller=<boolean>
  & innerTx=<boolean>
  & x-success=<success-url>
  & x-cancel=<cancel-url>
```

| URL Params                  | Description                                                                                                                                                                                                                                                                                                                                                           |
| --------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `transaction` (required)    | Valid transaction in [Encoding.Transaction](https://docs.aeternity.com/aepp-sdk-js/latest/api/enums/Encoding.html#Transaction) format `tx_`.                                                                                                                                                                                                                          |
| `networkId` (required)      | The `networkId` identifier of the network which the wallet should sign your transaction with.                                                                                                                                                                                                                                                                         |
| `broadcast` (optional)      | This flag is for sending a signed transaction by the wallet.                                                                                                                                                                                                                                                                                                          |
| `replace-caller` (optional) | This flag is used to ensure that the transmitted `transaction` is called using the current address.                                                                                                                                                                                                                                                                   |
| `innerTx` (optional)        | This flag is used to sign as inner transaction for PayingFor.                                                                                                                                                                                                                                                                                                         |
| `x-success` (required)      | <p>This is a callback URL in case user signs the transaction. If the <code>broadcast</code> flag is:<br>- <code>false/not set</code> callback <strong>must</strong> contain <code>{transaction}</code> parameter in order to get the signed transaction;<br>- <code>true</code> callback can have <code>{transaction-hash}</code> of the broadcasted transaction.</p> |
| `x-cancel` (required)       | This is a callback URL in case user doesn't sign the transaction.                                                                                                                                                                                                                                                                                                     |

### Example of sign transaction deep link creation:

```javascript
const rawTx = await aeSdk.buildTx(transaction);
const query = new URLSearchParams({
    transaction: rawTx,
    networkId: 'ae_uat', // or your network id
    broadcast: "true",
  });
const url = `https://wallet.superhero.com/sign-transaction?${query.toString()}&x-success=<success-url>&x-cancel=<cancel-url>`;
```

### Deep link example

```
# broadcast set to true
https://wallet.superhero.com/sign-transaction?transaction=tx_%2BFEMAaEB915T9XgiInpYtGMJXW2rZXyrgEV0vmLeC%2BH5UnnQkDehAfdeU%2FV4IiJ6WLRjCV1tq2V8q4BFdL5i3gvh%2BVJ50JA3C4YPJvVhyAAAAYAYTgEV&networkId=ae_uat&broadcast=true&x-success=https%3A%2F%2Fexample.com%2Fsuccess-connection%3Ftransaction-hash%3D%7Btransaction-hash%7D&x-cancel=https%3A%2F%2Fexample.com%2Ffail-connection

# broadcast set to false
https://wallet.superhero.com/sign-transaction?transaction=tx_%2BFEMAaEB915T9XgiInpYtGMJXW2rZXyrgEV0vmLeC%2BH5UnnQkDehAfdeU%2FV4IiJ6WLRjCV1tq2V8q4BFdL5i3gvh%2BVJ50JA3C4YPJvVhyAAAAYAYTgEV&networkId=ae_uat&x-success=https%3A%2F%2Fexample.com%2Fsuccess-transaction-signing%3Ftransaction%3D%7Btransaction%7D&x-cancel=https%3A%2F%2Fexample.com%2Ffail-transaction-signing
```

## Sign a message

```bash
https://wallet.superhero.com/sign-message
  ? message=<message>
  & encoding=<string>
  & x-success=<success-url>
  & x-cancel=<cancel-url>
```

| URL Params             | Description                                                                                                                                                                                                                                          |
| ---------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `message` (required)   | Message to sign.                                                                                                                                                                                                                                     |
| `encoding` (optional)  | Encoding of the message. Currently only `hex` is supported.                                                                                                                                                                                          |
| `x-success` (required) | <p>This is a callback URL in case user signs the message. Callback <strong>must</strong> contain:<br>- <code>{signature}</code> parameter in order to get signed message;<br>- <code>{address}</code> parameter in order to get current address.</p> |
| `x-cancel` (required)  | This is a callback URL in case user rejected to sign the message.                                                                                                                                                                                    |

### Example

```
https://wallet.superhero.com/sign-message?message=test&x-success=https%3A%2F%2Fexample.com%2Fsuccess-message-sign%3Fsignature%3D%7Bsignature%7D%26address%3D%7Baddress%7D&x-cancel=https%3A%2F%2Fexample.com%2Ffail-message-sign
```

## Sign a JWT

```bash
https://wallet.superhero.com/sign-jwt
  ? payload=<payload>
  & x-success=<success-url>
  & x-cancel=<cancel-url>
```

| URL Params             | Description                                                                                                                                                                                                                                               |
| ---------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `payload` (required)   | Payload is the JWT.                                                                                                                                                                                                                                       |
| `x-success` (required) | <p>This is a callback URL in case user signs the message. Callback <strong>must</strong> contain:<br>- <code>{signed-payload}</code> parameter in order to get signed payload;<br>- <code>{address}</code> parameter in order to get current address.</p> |
| `x-cancel` (required)  | This is a callback URL in case user rejected to sign the message.                                                                                                                                                                                         |

### Example

```
https://wallet.superhero.com/sign-jwt?payload=%7B%22test%22%3A1%7D&x-success=https%3A%2F%2Fexample.com%3Fsigned-payload%3D%7Bsigned-payload%7D&x-cancel=https%3A%2F%2Fexample.com%2Ffail-sign-jwt
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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.aeternity.com/developer-documentation/superhero-wallet/docs/deep-link-schema.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.
