Skip to content

LLM:DeepLinking

Alexandrine Boissiere edited this page Oct 22, 2024 · 17 revisions

Deep Linking Ledger Live Mobile 🔗


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

wc - Wallet Connect

Query String Parameters:

  • uri : uri to be passed

Example:

  • ledgerlive://wc?uri=${encodeURIComponent(url)}

settings - Settings

  • ledgerlive://settings/
  • ledgerlive://settings/general
  • ledgerlive://settings/accounts
  • ledgerlive://settings/about
  • ledgerlive://settings/help
  • ledgerlive://settings/developer
  • ledgerlive://settings/notifications
  • ledgerlive://settings/experimental

sync-onboarding - Onboarding

ledgerlive://sync-onboarding

post-onboarding - Post Onboarding

Query String Parameters:

  • device : type of device

Example:

  • ledgerlive://post-onboarding?device=stax

Misc - List to be cleaned later

Landing Pages ledgerlive://landing-page Example: ledgerlive://landing-page?useCase=LP_Generic

ledgerlive://ledgersync

ledgerlive://hw-purchase-success

  • ledgerlive://custom-image
  • ledgerlive://scan-accounts

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