Skip to content

LLM:DeepLinking

Martin CAYUELAS edited this page Dec 15, 2023 · 12 revisions

Deep Linking Ledger Live Mobile 🔗

Full documentation is available here


It is possible to launch Ledger Live Mobile and open a specific section or modal by using a deep link.

All Ledger Live deep links start with the ledgerlive:// URI.

Routing

Every route is preceded by the protocol ledgerlive://.

Some routes allow you to use query params to pass additional context.

⚠️ You should not use anchor tag inside your deeplink ⚠️

This is especially true for discover related deeplinks.

Keep in mind that everything after an anchor tag is client side (in this case Ledger Live) and will then not be forwarded to the liveApp (even query params). Have a look at this resource for more context.

portfolio - Portfolio Page (default landing)

Query String Parameters: None

Examples:

  • ledgerlive:// or ledgerlive://portfolio

accounts - Accounts and Account Page

Examples:

  • ledgerlive://accounts will redirect to accounts page
  • ledgerlive://accounts?currency=btc will open the first bitcoin account found
  • ledgerlive://accounts?currency={{currency}}&address={{my_address}} should redirect to the corresponding account page if address matching an account is found, if not it falls back to the {{currency}} account page

add-account - Add Account Modal

Query String Parameters:

  • currency (optional): the ticker or name of the currency

Examples:

  • ledgerlive://add-account Opens Add Account Modal
  • ledgerlive://add-account?currency=bitcoin Opens Add Account Modal with Bitcoin pre-filled

nftgallery - NFT Gallery Tab

Examples:

  • ledgerlive://nftgallery will redirect to NFT Gallery Tab page

send - Send Flow

Examples:

  • ledgerlive://send will redirect to send page
  • ledgerlive://send?currency=ethereum will redirect to send page with ethereum accounts search pre-filled

receive - Receive Flow

Examples:

  • ledgerlive://receive will redirect to receive page
  • ledgerlive://receive?currency=ethereum will redirect to receive page with ethereum accounts search pre-filled

buy - Buy Crypto Flow

ledgerlive://buy will redirect to buy page

ledgerlive://buy/bitcoin will redirect to buy page with bitcoin accounts search prefilled

sell - Sell Crypto Flow

ledgerlive://sell will redirect to sell page

ledgerlive://sell/bitcoin will redirect to sell page with bitcoin accounts search prefilled

myledger - Device Management Flow

Query String Parameters: None

  • installApp: the search query to be pre-filled when MyLedger opens

Examples:

  • ledgerlive://myledger will redirect to MyLedger page
  • ledgerlive://myledger?installApp=bitcoin will redirect to MyLedger page with a pre-filled search for bitcoin

swap - Swap Crypto Flow

ledgerlive://swap will redirect to swap page

discover/:liveAppId/ - Live Discover Catalog

Url Parameter:

  • liveAppId (optional): the liveApp id

Query String Parameters:

  • &{params}: the url query params that will be transmitted to the liveApp (please refer to each apps documentation in order to use them).

Examples:

  • ledgerlive://discover will redirect to discover page
  • ledgerlive://discover/paraswap will redirect to the discover catalog page of Paraswap
  • ledgerlive://discover/paraswap?accountId=1 will redirect to the discover catalog page of Paraswap with a pre-selected first account

Testing on android in order to test in debug your link run using adb

  adb shell am start -W -a android.intent.action.VIEW -d "ledgerlive://{{YOUR_URL}}" com.ledger.live.debug

Beware of escaping the query parameters starting with "&", otherwise you will lose them :)

Testing on ios in order to test your link run using xcrun

  xcrun simctl openurl booted ledgerlive://{{YOUR_URL}}

Testing through browser

run

pnpm mobile test-deep-links

Then go to the provided link in order to see a test web page. For this either

  • redirect the :8000 port on your chrome remote device settings
  • use adb reverse tcp:8000 tcp:8000
  • use the network link provided by the command.
Clone this wiki locally