-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3184 from superhero-com/release/v2.2.9
Release v2.2.9
- Loading branch information
Showing
155 changed files
with
3,064 additions
and
2,230 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,10 @@ | ||
module.exports = { | ||
presets: [ | ||
['@babel/preset-env', { | ||
useBuiltIns: 'usage', | ||
targets: '> 0.25%, not dead, not ie 11, not op_mini all', | ||
corejs: 3.22, | ||
}], | ||
'@vue/cli-plugin-babel/preset', | ||
], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
# 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)| This is a callback URL in case user accepts the connection attempt. Callback **must** contain: <br> - `{address}` parameter in order to get current address; <br> - `{networkId}` parameter in order to get current `networkId`.| | ||
|`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%2Ftest.com%2Fsuccess-connection%3Faddress%3D%7Baddress%7D%26networkdId%3D%7BnetworkId%7D&x-cancel=https%3A%2F%2Ftest.com%2Ffail-connection | ||
``` | ||
|
||
|
||
## Sign a transaction | ||
|
||
```bash | ||
https://wallet.superhero.com/sign-transaction | ||
? transaction=<Encoding.Transaction> | ||
& networkId=<string> | ||
& broadcast=<boolean> | ||
& replace-caller=<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.| | ||
|`x-success` (required)| This is a callback URL in case user signs the transaction. If the `broadcast` flag is: <br> - `false/not set` callback **must** contain `{transaction}` parameter in order to get the signed transaction; <br> - `true` callback can have `{transaction-hash}` of the broadcasted transaction.| | ||
|`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%2Ftest.com%2Fsuccess-connection%3Ftransaction-hash%3D%7Btransaction-hash%7D&x-cancel=https%3A%2F%2Ftest.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 | ||
``` | ||
|
||
## 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)| This is a callback URL in case user signs the message. Callback **must** contain: <br> - `{signature}` parameter in order to get signed message; <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/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 | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.