Skip to content

Commit

Permalink
docs: add missing JWT sign schema
Browse files Browse the repository at this point in the history
fixup
  • Loading branch information
CedrikNikita committed Oct 14, 2024
1 parent a9406fe commit d05aa96
Showing 1 changed file with 25 additions and 4 deletions.
29 changes: 25 additions & 4 deletions docs/deep-link-schema.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ https://wallet.superhero.com/address
### Example

```
https://wallet.superhero.com/address?x-success=https%3A%2F%2Ftest.com%2Fsuccess-connection%3Faddress%3D%7Baddress%7D%26networkdId%3D%7BnetworkId%7D&x-cancel=https%3A%2F%2Ftest.com%2Ffail-connection
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
```


Expand Down Expand Up @@ -58,10 +58,10 @@ const url = `https://wallet.superhero.com/sign-transaction?${query.toString()}&x

```
# 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%2Ftest.com%2Fsuccess-connection%3Ftransaction-hash%3D%7Btransaction-hash%7D&x-cancel=https%3A%2F%2Ftest.com%2Ffail-connection
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%2Ftest.com%2Fsuccess-transaction-signing%3Ftransaction%3D%7Btransaction%7D&x-cancel=https%3A%2F%2Ftest.com%2Ffail-transaction-signing
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
Expand All @@ -84,5 +84,26 @@ https://wallet.superhero.com/sign-message
### Example

```
https://wallet.superhero.com/sign-message?message=test&x-success=https%3A%2F%2Ftest.com%2Fsuccess-message-sign%3Fsignature%3D%7Bsignature%7D%26address%3D%7Baddress%7D&x-cancel=https%3A%2F%2Ftest.com%2Ffail-message-sign
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/jwt-sign
? payload=<payload>
& x-success=<success-url>
& x-cancel=<cancel-url>
```

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

### Example

```
https://wallet.superhero.com/jwt-sign?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-jwt-sign
```

0 comments on commit d05aa96

Please sign in to comment.