Skip to content

Commit

Permalink
Details to manifest page (#196)
Browse files Browse the repository at this point in the history
* feat: add details to manifest page
  • Loading branch information
RamyEB authored Jun 28, 2023
1 parent 6837c6d commit b23f8ef
Show file tree
Hide file tree
Showing 6 changed files with 155 additions and 219 deletions.
155 changes: 155 additions & 0 deletions apps/docs/pages/appendix/manifest.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,155 @@
# Manifest

_If you want to know more about the Discover tab and the Live Apps in general, you can read this page : [Start here](https://developers.ledger.com/docs/live-app/start-here/)_

### What is a manifest ?

A Manifest is a config file that allows external applications and decentralized applications (dApps) to be integrated inside the Ledger Live software as a Live app and interact with all provided features.

If you have followed instructions on the [How to create a Live app(comming soon)](/) page, you should now be ready to interact with the Dapp directly from Ledger Live interface to make sure all the basic features work as expected.

### Ethereum Dapp Browser

Your DApp will be ran inside the Ethereum Dapp Browser, which is a separate application loaded inside Ledger Live to handle interactions between a Dapp and the Ledger Live application. Don’t hesitate to have a look at this project’s Readme to have more information on how to use it and what are the currently supported RPC calls.

### Manifest properties

To test and integrate your application, you first need to write your application Manifest file. This file must contain some mandatory information, such as the app package names, the components, the permissions needed, the hardware and software features, etc.

You don't have to fill in all the fields; we'll fill them in once your integration has been confirmed.

However, here are a few elements you'll need to fill in yourself and their descriptions :

_To be filled in by you_

| Properties | Descripton | Type | Requirements |
|------------------|-----------------|------------------|-----------------------------|
| id | uniq id of your app | string | a-z | 0-9 | |
| _author_ | Name of your organisation | string | optional | * |
| _name_ | Name of your live app (will be displayed and used to search your app inside the Discover section) | string | * |
| _url_ | Url of the live app homepage (users will be redirected to this link once they open your app) | string (URL) | * |
| _homepageUrl_ | Url of your organisation | string (URL) | optional | * |
| _supportUrl_ | Your support url | string (URL) | optional | * |
| _icon_ | Icon URL (will be displayed inside the Discover section) | string (URL) | optional | * |
| platforms | Platform compatibility | Array(enum) | "ios", "android", "desktop" |
| apiVersion | Specific manifest schema version (leave it as [default](#default-values)) | string | * |
| manifestVersion | Version supported by the app that the wallet needs to implement in order to support (leave it as [default](#default-values)) | enum | 2 |
| categories | List of category related to your Live App ([example](#default-values)) | Array(string) | items: min 1 → * |
| currencies | currencies supported by your Live App | Array(string) | items: min 1 → * |
| _content_ | Descripton of your Live App (will be displayed inside the Discover section) | Object | \{shortDescription: string, description: string\} | |
| [permissions](#permissions) | List of permissions you will need in order to interact with wallet-api | enum | |
| _domains_ | ___ | Array(string) | optional | * |
| [type](#params) | Type of you Live app | enum | "dapp", "walletApp", "webBrowser" |
| [params](#params) | ___| Object | depend on the type |
| visibility | Visibility of your live app inside Ledger Live. (Leave it as [default](#default-values)) | string | "complete", "searchable", "deep" |

### Params

#### params when `type = "dapp"`

_Your app uses the [ETH DApp Browser](https://github.com/LedgerHQ/eth-dapp-browser)_

| Params | Type | Requirements |
|-----------|-----------------|-------------------------------------------|
| dappUrl | string (URL) | * |
| nanoApp | string | * |
| dappName | string | * |
| networks | Array (unique Object) | (chainID: number, nodeURL: string, currency: enum) |


#### params when `type = "walletApp"`

_Your app uses the [Wallet API](https://github.com/LedgerHQ/wallet-api)_

| Params | Type | Requirements |
|-----------|-----------|--------------------|
| any param | any | optional | * |



#### params when `type = "webBrowser"`

_Your app uses the [Platform App Web Browser](https://github.com/LedgerHQ/platform-app-web-browser)_


| Params | Type | Requirements |
|-------------|-----------------|-----------------|
| webUrl | string (URL) | * |
| webAppName | string | * |
| currencies | Array (enum) | "ethereum", "bitcoin", ... |


#### Permissions

Permissions that allow your app to interact with methods :

```javascript
"permissions": [

// Account and currencies
"account.list",
"account.receive",
"account.request",
"currency.list",

// Device permissions
"device.close",
"device.exchange",
"device.transport",

// Transaction
"message.sign",
"transaction.sign",
"transaction.signAndBroadcast",

// Wallet Info
"wallet.capabilities",
"wallet.info",
"wallet.userId"

],

```


#### Default values

_Complete manifest.json file with default or examples values :_

```json
{
"id": "ReplaceAppName",
"name": "ReplaceAppName",
"url": "http://localhost:3000/",
"params": {
"dappUrl": "http://localhost:3000/",
"nanoApp": "ReplaceAppName",
"dappName": "ReplaceAppName",
"networks": [
{
"currency": "ethereum",
"chainID": 1,
"nodeURL": "..."
}
]
},
"homepageUrl": "http://localhost:3000/",
"platform": ["ios","android","desktop"],
"apiVersion": "^1.0.0",
"manifestVersion": "2",
"branch": "stable",
"categories": ["NFT", "Swap", "YourAppCategory"],
"currencies": "*",
"content": {
"shortDescription": {
"en": "Desc"
},
"description": {
"en": "Desc"
}
},
"permissions": [],
"domains": ["http://*"],
"visibility": "complete"
}
```
27 changes: 0 additions & 27 deletions apps/docs/pages/appendix/manifest/_meta.json

This file was deleted.

16 changes: 0 additions & 16 deletions apps/docs/pages/appendix/manifest/index.mdx

This file was deleted.

57 changes: 0 additions & 57 deletions apps/docs/pages/appendix/manifest/manifestV1.mdx

This file was deleted.

89 changes: 0 additions & 89 deletions apps/docs/pages/appendix/manifest/manifestV2.mdx

This file was deleted.

30 changes: 0 additions & 30 deletions apps/docs/pages/appendix/manifest/permissions.mdx

This file was deleted.

2 comments on commit b23f8ef

@vercel
Copy link

@vercel vercel bot commented on b23f8ef Jun 28, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

wallet-api – ./apps/docs

wallet-api-git-main-ledgerhq.vercel.app
wallet.api.live.ledger.com
wallet-api-ledgerhq.vercel.app

@vercel
Copy link

@vercel vercel bot commented on b23f8ef Jun 28, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

wallet-api-wallet-api-tools – ./apps/wallet-api-tools

wallet-api-wallet-api-tools.vercel.app
wallet-api-wallet-api-tools-git-main-ledgerhq.vercel.app
wallet-api-wallet-api-tools-ledgerhq.vercel.app

Please sign in to comment.