Skip to content

Commit

Permalink
chore: update deep link wallet context documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
nicole-obrien committed Dec 27, 2023
1 parent 80a7235 commit 0a1cb72
Show file tree
Hide file tree
Showing 9 changed files with 161 additions and 209 deletions.
8 changes: 0 additions & 8 deletions developer-guide/deep-links/api-reference.md

This file was deleted.

54 changes: 54 additions & 0 deletions developer-guide/deep-links/governance.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
---
icon: diamond
order: 998
---

# Governance

`bloom://governance`

## Add Proposal

`bloom://governance/addProposal`

This operation brings the user to the add proposal popup:

:::image
![](../../static/add-proposal-popup.png "Add proposal popup")
:::

The deep link structure is as follows:

```
bloom://governance/addProposal?eventId=<eventId>&nodeUrl=<nodeUrl>
```

The following parameters are **required**:

- `eventId` - the event ID of the proposal's corresponding participation event in the network

The following parameter(s) are **optional**:

- `nodeUrl` - the specific node that is tracking the proposal's corresponding participation event

:::info
If the node requires authentication (e.g. username and password, JWT), the user will be required
to manually enter the information.
:::

Example:

[!button Click me!](bloom://governance/addProposal?eventId=0x6d27606a773a3c87c151af09ad58ddc831864e2141ef598075dc24be5668ca7f7f&nodeUrl=https://api.testnet.shimmer.network)

Source:

```
bloom://governance/addProposal?eventId=0x6d27606a773a3c87c151af09ad58ddc831864e2141ef598075dc24be5668ca7f7f&nodeUrl=https://api.testnet.shimmer.network
```

<style>
.image {
margin: auto;
max-width: 420px;
}
</style>
8 changes: 0 additions & 8 deletions developer-guide/deep-links/guide.md

This file was deleted.

47 changes: 42 additions & 5 deletions developer-guide/deep-links/index.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,48 @@
---
icon: link
expanded: true
expanded: false
order: 998
---

# Deep Links
# Deep Linking

[Guide](guide.md)
[API Reference](api-reference.md)
[Specification](specification.md)
Deep links are special URLs that, when navigated to, open
applications rather than a website.
In our case we are interested in the user experiences that they enable
between websites, applications, platforms, etc. by providing more interoperability.

Bloom has its own deep link scheme, exposing (limited) functionality that is required in
some type of user flow. A trivial example would be a user who buys native tokens on Soonaverse and
must make a payment transaction to execute the buy order. Clicking on a deep link embedded inside the
Soonaverse platform triggers Bloom to open and auto-fill the transaction data as necessary, making it
a simple confirm and click job for the user.

:::caution
Bloom **will NEVER** automatically execute actions initiated by a deep link; they should **ALWAYS** require manual
confirmation on behalf of the user.
:::

## Scheme

The Bloom deep link scheme can be broken down to the following (simple) syntax:

```
bloom[-<stage>]://<context>/<operation>[?param=<param>]
```

The parameters are as follows:

- `stage` - indicates a specific stage of the app to target, options are:
- `alpha` - the first available version of Bloom containing brand new features
- `beta` - the next available version of Bloom containing new but slightly tested features
- `laters` - the Bloom Shimmer version, containing new and well-tested features
- `context` - the part of Bloom that contains the operation, options are:
- `wallet` - managing coins and tokens
- `collectibles` - managing NFTs
- `governance` - managing voting events and proposals
- `operation` - an operation within a specific context (see below for more detail)
- `param` - query parameter(s) relevant for the specified operation

If you wish to target the production version, simply omit this from the prefix:

`bloom://`
184 changes: 0 additions & 184 deletions developer-guide/deep-links/specification.md

This file was deleted.

61 changes: 61 additions & 0 deletions developer-guide/deep-links/wallet.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
---
icon: diamond
order: 999
---

# Wallet

`bloom://wallet`

## Send Transaction

`bloom://wallet/sendTransaction`

This operation brings the user to the send confirmation popup:

:::image
!["Send confirmation popup"](../../static/send-confirmation-popup.png)
:::

### Parameters

| Parameter | Description | Type | Required |
| ------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | ---------------- | --------------------------------------------- |
| `address` | A layer 1 address to send an asset to | Bech32Address | True |
| `baseCoinAmount` | The amount of the base coin to be sent | Integer | Required if `tokenAmount` is NOT specified |
| `tokenAmount` | The amount of a specific token to be sent | Integer | Required if `baseCoinAmount` is NOT specified |
| `tokenId` | ID of the token to be sent | HexEncodedString | Required if `tokenAmount` is specified |
| `tag` | An optional data field to tag outputs with an index | HexEncodedString | False |
| `metadata` | An optional field that is interpreted by higher layer applications | HexEncodedString | False |
| `giftStorageDeposit` | An optional field to remove the Storage Deposit Return unlock condition (which may be added by Bloom for dust and native token transactions) | Boolean | False |
| `disableToggleGift` | A flag to prevent users changing the gift storage deposit field manually | Boolean | False |
| `disableChangeExpiration` | A flag to prevent users changing the expiration unlock field manually | Boolean | False |
| `disableChangeTimelock` | A flag to prevent users changing the timelock unlock field manually | Boolean | False |

### Link

The deep link structure is as follows:

```
bloom://wallet/sendTransaction?address=<Bech32Address>[&baseCoinAmount=<Integer>][&tokenId=<HexEncodedString>&tokenAmount=<Integer>][&tag=<HexEncodedString>][&metadata=<HexEncodedString>][&giftStorageDeposit=<Boolean>][&disableToggleGift=<Boolean>][&disableChangeExpiration=<Boolean>][&disableChangeTimelock=<Boolean>]
```

Example: Send 1 SMR to

```
bloom://wallet/sendTransaction?address=rms1qqu5pw3t73j3d774ss7dvg6s7jk349xn7u7q48z5mkja3942uwewqkt9mg9&baseCoinAmount=1000000
```

Test:

[!button Bloom - Alpha](bloom://wallet/sendTransaction?address=rms1qqu5pw3t73j3d774ss7dvg6s7jk349xn7u7q48z5mkja3942uwewqkt9mg9&baseCoinAmount=1000000) [!button Bloom - Beta](bloom-beta://wallet/sendTransaction?address=rms1qqu5pw3t73j3d774ss7dvg6s7jk349xn7u7q48z5mkja3942uwewqkt9mg9&baseCoinAmount=1000000) [!button Bloom](bloom://wallet/sendTransaction?address=rms1qqu5pw3t73j3d774ss7dvg6s7jk349xn7u7q48z5mkja3942uwewqkt9mg9&baseCoinAmount=1000000)

<style>
.image {
margin: auto;
}
</style>

```
```
6 changes: 3 additions & 3 deletions developer-guide/wallet-connect/index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
icon: link
expanded: true
icon: apps
expanded: false
order: 998
---

Expand All @@ -10,7 +10,7 @@ To be able to connect with the IOTA / Shimmer ecosystem, Bloom implements `Walle

If you're a dApp developer and plan to implement `WalletConnect` into your dApp, checkout https://docs.walletconnect.com/web3modal/about.

**Bloom projectId**: `652df0cee82d5cd3cadfd57829c5578a`
**Bloom projectId**: `652df0cee82d5cd3cadfd57829c5578a`

[Include Bloom](guide.md)
[Supported Networks and Methods](supported.md)
Loading

0 comments on commit 0a1cb72

Please sign in to comment.