<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Ledger | 进击之路 - Alan的个人博客</title><link>https://1991421.cn/tag/ledger/</link><atom:link href="https://1991421.cn/tag/ledger/index.xml" rel="self" type="application/rss+xml"/><description>Ledger</description><generator>Hugo Blox Builder (https://hugoblox.com)</generator><language>zh-CN</language><lastBuildDate>Wed, 15 Apr 2026 10:54:59 +0800</lastBuildDate><image><url>https://1991421.cn/media/sharing.png</url><title>Ledger</title><link>https://1991421.cn/tag/ledger/</link></image><item><title>Ledger Device App在模拟器及真机侧载时遇到的问题</title><link>https://1991421.cn/2026/04/15/ledger-device-app-issues-in-emulator-and-real-device-sideloading/</link><pubDate>Wed, 15 Apr 2026 10:54:59 +0800</pubDate><guid>https://1991421.cn/2026/04/15/ledger-device-app-issues-in-emulator-and-real-device-sideloading/</guid><description>&lt;blockquote>
&lt;p>ledger算是硬件钱包这个细分领域的No1了，但实际的使用中仍然遇到了很多问题，discord官方频道，推特，邮件，官方文档，具体交流等等。我踩了很多坑，这里总结下，给后续的开发者一些借鉴。&lt;/p>
&lt;/blockquote>
&lt;h2 id="说明">
&lt;a class="heading-anchor-link" href="#%e8%af%b4%e6%98%8e">说明&lt;/a>
&lt;button
class="heading-anchor"
type="button"
data-anchor="说明"
aria-label="复制锚点链接"
title="复制锚点链接"
>
&lt;span class="heading-anchor-wrap" aria-hidden="true">
&lt;svg class="heading-anchor-icon heading-anchor-icon-default" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512" fill="currentColor">
&lt;path d="M0 256C0 167.6 71.6 96 160 96h72c13.3 0 24 10.7 24 24s-10.7 24-24 24H160C98.1 144 48 194.1 48 256s50.1 112 112 112h72c13.3 0 24 10.7 24 24s-10.7 24-24 24H160C71.6 416 0 344.4 0 256zm576 0c0 88.4-71.6 160-160 160H344c-13.3 0-24-10.7-24-24s10.7-24 24-24h72c61.9 0 112-50.1 112-112s-50.1-112-112-112H344c-13.3 0-24-10.7-24-24s10.7-24 24-24h72c88.4 0 160 71.6 160 160zM184 232H392c13.3 0 24 10.7 24 24s-10.7 24-24 24H184c-13.3 0-24-10.7-24-24s10.7-24 24-24z">&lt;/path>
&lt;/svg>
&lt;svg class="heading-anchor-icon heading-anchor-icon-copied" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" fill="currentColor">
&lt;path d="M256 48C141.1 48 48 141.1 48 256s93.1 208 208 208 208-93.1 208-208S370.9 48 256 48zm107.1 145.1L230.6 325.6c-6.2 6.2-16.4 6.2-22.6 0l-59-59c-6.2-6.2-6.2-16.4 0-22.6s16.4-6.2 22.6 0l47.7 47.7 121.1-121.1c6.2-6.2 16.4-6.2 22.6 0s6.3 16.4.1 22.5z">&lt;/path>
&lt;/svg>
&lt;/span>
&lt;/button>
&lt;/h2>&lt;ol>
&lt;li>我自己在实际使用中用到的机型&lt;code>Nano S Plus&lt;/code>和&lt;code>Nano X&lt;/code>，当然&lt;code>Nano X&lt;/code>是不支持侧载的。&lt;/li>
&lt;li>关于Ledger的完整介绍文章，可以查看&lt;a href="https://1991421.cn/2026/03/20/understanding-ledger-hardware-wallet/">Ledger Device App开发指南&lt;/a>，这里不再赘述了。&lt;/li>
&lt;/ol>
&lt;h2 id="真机侧载">
&lt;a class="heading-anchor-link" href="#%e7%9c%9f%e6%9c%ba%e4%be%a7%e8%bd%bd">真机侧载&lt;/a>
&lt;button
class="heading-anchor"
type="button"
data-anchor="真机侧载"
aria-label="复制锚点链接"
title="复制锚点链接"
>
&lt;span class="heading-anchor-wrap" aria-hidden="true">
&lt;svg class="heading-anchor-icon heading-anchor-icon-default" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512" fill="currentColor">
&lt;path d="M0 256C0 167.6 71.6 96 160 96h72c13.3 0 24 10.7 24 24s-10.7 24-24 24H160C98.1 144 48 194.1 48 256s50.1 112 112 112h72c13.3 0 24 10.7 24 24s-10.7 24-24 24H160C71.6 416 0 344.4 0 256zm576 0c0 88.4-71.6 160-160 160H344c-13.3 0-24-10.7-24-24s10.7-24 24-24h72c61.9 0 112-50.1 112-112s-50.1-112-112-112H344c-13.3 0-24-10.7-24-24s10.7-24 24-24h72c88.4 0 160 71.6 160 160zM184 232H392c13.3 0 24 10.7 24 24s-10.7 24-24 24H184c-13.3 0-24-10.7-24-24s10.7-24 24-24z">&lt;/path>
&lt;/svg>
&lt;svg class="heading-anchor-icon heading-anchor-icon-copied" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" fill="currentColor">
&lt;path d="M256 48C141.1 48 48 141.1 48 256s93.1 208 208 208 208-93.1 208-208S370.9 48 256 48zm107.1 145.1L230.6 325.6c-6.2 6.2-16.4 6.2-22.6 0l-59-59c-6.2-6.2-6.2-16.4 0-22.6s16.4-6.2 22.6 0l47.7 47.7 121.1-121.1c6.2-6.2 16.4-6.2 22.6 0s6.3 16.4.1 22.5z">&lt;/path>
&lt;/svg>
&lt;/span>
&lt;/button>
&lt;/h2>&lt;h3 id="侧载机型支持情况">
&lt;a class="heading-anchor-link" href="#%e4%be%a7%e8%bd%bd%e6%9c%ba%e5%9e%8b%e6%94%af%e6%8c%81%e6%83%85%e5%86%b5">侧载机型支持情况&lt;/a>
&lt;button
class="heading-anchor"
type="button"
data-anchor="侧载机型支持情况"
aria-label="复制锚点链接"
title="复制锚点链接"
>
&lt;span class="heading-anchor-wrap" aria-hidden="true">
&lt;svg class="heading-anchor-icon heading-anchor-icon-default" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512" fill="currentColor">
&lt;path d="M0 256C0 167.6 71.6 96 160 96h72c13.3 0 24 10.7 24 24s-10.7 24-24 24H160C98.1 144 48 194.1 48 256s50.1 112 112 112h72c13.3 0 24 10.7 24 24s-10.7 24-24 24H160C71.6 416 0 344.4 0 256zm576 0c0 88.4-71.6 160-160 160H344c-13.3 0-24-10.7-24-24s10.7-24 24-24h72c61.9 0 112-50.1 112-112s-50.1-112-112-112H344c-13.3 0-24-10.7-24-24s10.7-24 24-24h72c88.4 0 160 71.6 160 160zM184 232H392c13.3 0 24 10.7 24 24s-10.7 24-24 24H184c-13.3 0-24-10.7-24-24s10.7-24 24-24z">&lt;/path>
&lt;/svg>
&lt;svg class="heading-anchor-icon heading-anchor-icon-copied" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" fill="currentColor">
&lt;path d="M256 48C141.1 48 48 141.1 48 256s93.1 208 208 208 208-93.1 208-208S370.9 48 256 48zm107.1 145.1L230.6 325.6c-6.2 6.2-16.4 6.2-22.6 0l-59-59c-6.2-6.2-6.2-16.4 0-22.6s16.4-6.2 22.6 0l47.7 47.7 121.1-121.1c6.2-6.2 16.4-6.2 22.6 0s6.3 16.4.1 22.5z">&lt;/path>
&lt;/svg>
&lt;/span>
&lt;/button>
&lt;/h3>&lt;p>Ledger Device App的真机侧载并非所有机型都支持，正如上面所提到的。具体支持机型如何查看呢。&lt;/p>
&lt;ol>
&lt;li>
&lt;p>查&lt;a href="https://developers.ledger.com/docs/device-app/beginner/vscode-extension" target="_blank" rel="noopener">官网&lt;/a>，有相关说明如下：&lt;/p>
&lt;blockquote>
&lt;p>To load your app onto a Ledger device (also known as “sideloading”) and conduct real-world testing, select Load app on device. Bear in mind that sideloading is not possible on Nano X.&lt;/p>
&lt;/blockquote>
&lt;/li>
&lt;li>
&lt;p>通过VSC下&lt;a href="https://marketplace.visualstudio.com/items?itemName=LedgerHQ.ledger-dev-tools" target="_blank" rel="noopener">官方插件-Ledger Dev Tools&lt;/a>，如果是选中了具体设备，侧载的按钮禁用还是启用其实就能看出来了.
&lt;figure class="image-figure">
&lt;img
src="https://static.1991421.cn/2026/04/2026-04-15-151432.jpeg"
alt="https://static.1991421.cn/2026/04/2026-04-15-151432.jpeg"
loading="lazy"
decoding="async"
class="rounded-lg"
/>
&lt;/figure>&lt;/p>
&lt;/li>
&lt;/ol>
&lt;h2 id="侧载运行环境">
&lt;a class="heading-anchor-link" href="#%e4%be%a7%e8%bd%bd%e8%bf%90%e8%a1%8c%e7%8e%af%e5%a2%83">侧载运行环境&lt;/a>
&lt;button
class="heading-anchor"
type="button"
data-anchor="侧载运行环境"
aria-label="复制锚点链接"
title="复制锚点链接"
>
&lt;span class="heading-anchor-wrap" aria-hidden="true">
&lt;svg class="heading-anchor-icon heading-anchor-icon-default" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512" fill="currentColor">
&lt;path d="M0 256C0 167.6 71.6 96 160 96h72c13.3 0 24 10.7 24 24s-10.7 24-24 24H160C98.1 144 48 194.1 48 256s50.1 112 112 112h72c13.3 0 24 10.7 24 24s-10.7 24-24 24H160C71.6 416 0 344.4 0 256zm576 0c0 88.4-71.6 160-160 160H344c-13.3 0-24-10.7-24-24s10.7-24 24-24h72c61.9 0 112-50.1 112-112s-50.1-112-112-112H344c-13.3 0-24-10.7-24-24s10.7-24 24-24h72c88.4 0 160 71.6 160 160zM184 232H392c13.3 0 24 10.7 24 24s-10.7 24-24 24H184c-13.3 0-24-10.7-24-24s10.7-24 24-24z">&lt;/path>
&lt;/svg>
&lt;svg class="heading-anchor-icon heading-anchor-icon-copied" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" fill="currentColor">
&lt;path d="M256 48C141.1 48 48 141.1 48 256s93.1 208 208 208 208-93.1 208-208S370.9 48 256 48zm107.1 145.1L230.6 325.6c-6.2 6.2-16.4 6.2-22.6 0l-59-59c-6.2-6.2-6.2-16.4 0-22.6s16.4-6.2 22.6 0l47.7 47.7 121.1-121.1c6.2-6.2 16.4-6.2 22.6 0s6.3 16.4.1 22.5z">&lt;/path>
&lt;/svg>
&lt;/span>
&lt;/button>
&lt;/h2>&lt;ol>
&lt;li>
&lt;p>官方VSC插件-Ledger Dev Tools&lt;/p>
&lt;ul>
&lt;li>ledger关键词插件很多，注意不要下载错误。&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>
&lt;p>Docker，需要启动保持&lt;code>运行中&lt;/code>&lt;/p>
&lt;ul>
&lt;li>Docker安装跟着官网指南即可，Mac下推荐走App安装方案。&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>
&lt;p>点击插件，首次加载，会拉取ledger-app-dev-tools镜像并启动容易，该镜像大小大概为&lt;code>8.51GB&lt;/code>&lt;/p>
&lt;blockquote>
&lt;p>docker pull ghcr.io/ledgerhq/ledger-app-builder/ledger-app-dev-tools&lt;/p>
&lt;/blockquote>
&lt;p>中国大陆网络环境下如果拉取GitHub官方容器镜像比较慢，可以考虑使用国内的镜像源，比如ghcr.nju.edu.cn。如果本身电脑就是down不下来，可以考虑其它设备传输过去，不过目前看最终插件都会去下载最新版的也就是tag是latest的镜像。&lt;/p>
&lt;/li>
&lt;/ol>
&lt;h2 id="侧载测试操作os">
&lt;a class="heading-anchor-link" href="#%e4%be%a7%e8%bd%bd%e6%b5%8b%e8%af%95%e6%93%8d%e4%bd%9cos">侧载测试操作OS&lt;/a>
&lt;button
class="heading-anchor"
type="button"
data-anchor="侧载测试操作os"
aria-label="复制锚点链接"
title="复制锚点链接"
>
&lt;span class="heading-anchor-wrap" aria-hidden="true">
&lt;svg class="heading-anchor-icon heading-anchor-icon-default" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512" fill="currentColor">
&lt;path d="M0 256C0 167.6 71.6 96 160 96h72c13.3 0 24 10.7 24 24s-10.7 24-24 24H160C98.1 144 48 194.1 48 256s50.1 112 112 112h72c13.3 0 24 10.7 24 24s-10.7 24-24 24H160C71.6 416 0 344.4 0 256zm576 0c0 88.4-71.6 160-160 160H344c-13.3 0-24-10.7-24-24s10.7-24 24-24h72c61.9 0 112-50.1 112-112s-50.1-112-112-112H344c-13.3 0-24-10.7-24-24s10.7-24 24-24h72c88.4 0 160 71.6 160 160zM184 232H392c13.3 0 24 10.7 24 24s-10.7 24-24 24H184c-13.3 0-24-10.7-24-24s10.7-24 24-24z">&lt;/path>
&lt;/svg>
&lt;svg class="heading-anchor-icon heading-anchor-icon-copied" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" fill="currentColor">
&lt;path d="M256 48C141.1 48 48 141.1 48 256s93.1 208 208 208 208-93.1 208-208S370.9 48 256 48zm107.1 145.1L230.6 325.6c-6.2 6.2-16.4 6.2-22.6 0l-59-59c-6.2-6.2-6.2-16.4 0-22.6s16.4-6.2 22.6 0l47.7 47.7 121.1-121.1c6.2-6.2 16.4-6.2 22.6 0s6.3 16.4.1 22.5z">&lt;/path>
&lt;/svg>
&lt;/span>
&lt;/button>
&lt;/h2>&lt;ol>
&lt;li>Ubuntu等Linux发行版系统&lt;/li>
&lt;li>MacOS&lt;/li>
&lt;li>Windows,应该是最难的。&lt;/li>
&lt;/ol>
&lt;h3 id="ubuntu">
&lt;a class="heading-anchor-link" href="#ubuntu">Ubuntu&lt;/a>
&lt;button
class="heading-anchor"
type="button"
data-anchor="ubuntu"
aria-label="复制锚点链接"
title="复制锚点链接"
>
&lt;span class="heading-anchor-wrap" aria-hidden="true">
&lt;svg class="heading-anchor-icon heading-anchor-icon-default" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512" fill="currentColor">
&lt;path d="M0 256C0 167.6 71.6 96 160 96h72c13.3 0 24 10.7 24 24s-10.7 24-24 24H160C98.1 144 48 194.1 48 256s50.1 112 112 112h72c13.3 0 24 10.7 24 24s-10.7 24-24 24H160C71.6 416 0 344.4 0 256zm576 0c0 88.4-71.6 160-160 160H344c-13.3 0-24-10.7-24-24s10.7-24 24-24h72c61.9 0 112-50.1 112-112s-50.1-112-112-112H344c-13.3 0-24-10.7-24-24s10.7-24 24-24h72c88.4 0 160 71.6 160 160zM184 232H392c13.3 0 24 10.7 24 24s-10.7 24-24 24H184c-13.3 0-24-10.7-24-24s10.7-24 24-24z">&lt;/path>
&lt;/svg>
&lt;svg class="heading-anchor-icon heading-anchor-icon-copied" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" fill="currentColor">
&lt;path d="M256 48C141.1 48 48 141.1 48 256s93.1 208 208 208 208-93.1 208-208S370.9 48 256 48zm107.1 145.1L230.6 325.6c-6.2 6.2-16.4 6.2-22.6 0l-59-59c-6.2-6.2-6.2-16.4 0-22.6s16.4-6.2 22.6 0l47.7 47.7 121.1-121.1c6.2-6.2 16.4-6.2 22.6 0s6.3 16.4.1 22.5z">&lt;/path>
&lt;/svg>
&lt;/span>
&lt;/button>
&lt;/h3>&lt;p>Ubuntu下Docker不要使用&lt;a href="https://github.com/canonical/docker-snap" target="_blank" rel="noopener">snap安装的版本&lt;/a>，直接从官网下载安装包安装即可，否则会遇到权限问题，导致侧载无法正常运行。&lt;/p>
&lt;h3 id="macos">
&lt;a class="heading-anchor-link" href="#macos">MacOS&lt;/a>
&lt;button
class="heading-anchor"
type="button"
data-anchor="macos"
aria-label="复制锚点链接"
title="复制锚点链接"
>
&lt;span class="heading-anchor-wrap" aria-hidden="true">
&lt;svg class="heading-anchor-icon heading-anchor-icon-default" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512" fill="currentColor">
&lt;path d="M0 256C0 167.6 71.6 96 160 96h72c13.3 0 24 10.7 24 24s-10.7 24-24 24H160C98.1 144 48 194.1 48 256s50.1 112 112 112h72c13.3 0 24 10.7 24 24s-10.7 24-24 24H160C71.6 416 0 344.4 0 256zm576 0c0 88.4-71.6 160-160 160H344c-13.3 0-24-10.7-24-24s10.7-24 24-24h72c61.9 0 112-50.1 112-112s-50.1-112-112-112H344c-13.3 0-24-10.7-24-24s10.7-24 24-24h72c88.4 0 160 71.6 160 160zM184 232H392c13.3 0 24 10.7 24 24s-10.7 24-24 24H184c-13.3 0-24-10.7-24-24s10.7-24 24-24z">&lt;/path>
&lt;/svg>
&lt;svg class="heading-anchor-icon heading-anchor-icon-copied" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" fill="currentColor">
&lt;path d="M256 48C141.1 48 48 141.1 48 256s93.1 208 208 208 208-93.1 208-208S370.9 48 256 48zm107.1 145.1L230.6 325.6c-6.2 6.2-16.4 6.2-22.6 0l-59-59c-6.2-6.2-6.2-16.4 0-22.6s16.4-6.2 22.6 0l47.7 47.7 121.1-121.1c6.2-6.2 16.4-6.2 22.6 0s6.3 16.4.1 22.5z">&lt;/path>
&lt;/svg>
&lt;/span>
&lt;/button>
&lt;/h3>&lt;p>如果仅仅只是为了检测联通性，执行如下脚本&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-shell" data-lang="shell">&lt;span class="line">&lt;span class="cl">pip install ledgerblue
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-shell" data-lang="shell">&lt;span class="line">&lt;span class="cl">
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">from ledgerblue.comm import getDongle
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">from ledgerblue.commException import CommException
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">try:
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="nv">dongle&lt;/span> &lt;span class="o">=&lt;/span> getDongle&lt;span class="o">(&lt;/span>&lt;span class="nv">debug&lt;/span>&lt;span class="o">=&lt;/span>True&lt;span class="o">)&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="c1"># GET VERSION APDU on the dashboard&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="nv">result&lt;/span> &lt;span class="o">=&lt;/span> dongle.exchange&lt;span class="o">(&lt;/span>bytes.fromhex&lt;span class="o">(&lt;/span>&lt;span class="s2">&amp;#34;e001000000&amp;#34;&lt;/span>&lt;span class="o">))&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> print&lt;span class="o">(&lt;/span>&lt;span class="s2">&amp;#34;Connected! Response:&amp;#34;&lt;/span>, result.hex&lt;span class="o">())&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> dongle.close&lt;span class="o">()&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">except CommException as e:
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> print&lt;span class="o">(&lt;/span>f&lt;span class="s2">&amp;#34;APDU error (SW=0x{e.sw:04X}): {e.message}&amp;#34;&lt;/span>&lt;span class="o">)&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">except Exception as e:
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> print&lt;span class="o">(&lt;/span>f&lt;span class="s2">&amp;#34;Unable to connect: {e}&amp;#34;&lt;/span>&lt;span class="o">)&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>我自己实际去跑侧载，S Plus在Sequoia 15.5及以上版本的MacOS都不可以，都会出现不识别。结论&lt;/p>
&lt;h2 id="写在最后">
&lt;a class="heading-anchor-link" href="#%e5%86%99%e5%9c%a8%e6%9c%80%e5%90%8e">写在最后&lt;/a>
&lt;button
class="heading-anchor"
type="button"
data-anchor="写在最后"
aria-label="复制锚点链接"
title="复制锚点链接"
>
&lt;span class="heading-anchor-wrap" aria-hidden="true">
&lt;svg class="heading-anchor-icon heading-anchor-icon-default" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512" fill="currentColor">
&lt;path d="M0 256C0 167.6 71.6 96 160 96h72c13.3 0 24 10.7 24 24s-10.7 24-24 24H160C98.1 144 48 194.1 48 256s50.1 112 112 112h72c13.3 0 24 10.7 24 24s-10.7 24-24 24H160C71.6 416 0 344.4 0 256zm576 0c0 88.4-71.6 160-160 160H344c-13.3 0-24-10.7-24-24s10.7-24 24-24h72c61.9 0 112-50.1 112-112s-50.1-112-112-112H344c-13.3 0-24-10.7-24-24s10.7-24 24-24h72c88.4 0 160 71.6 160 160zM184 232H392c13.3 0 24 10.7 24 24s-10.7 24-24 24H184c-13.3 0-24-10.7-24-24s10.7-24 24-24z">&lt;/path>
&lt;/svg>
&lt;svg class="heading-anchor-icon heading-anchor-icon-copied" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" fill="currentColor">
&lt;path d="M256 48C141.1 48 48 141.1 48 256s93.1 208 208 208 208-93.1 208-208S370.9 48 256 48zm107.1 145.1L230.6 325.6c-6.2 6.2-16.4 6.2-22.6 0l-59-59c-6.2-6.2-6.2-16.4 0-22.6s16.4-6.2 22.6 0l47.7 47.7 121.1-121.1c6.2-6.2 16.4-6.2 22.6 0s6.3 16.4.1 22.5z">&lt;/path>
&lt;/svg>
&lt;/span>
&lt;/button>
&lt;/h2>&lt;p>总的来说，Ledger Device App的侧载虽然提供了一个很好的测试环境，但在实际使用中仍然存在一些问题和限制。希望通过这篇文章能够帮助开发者更好地理解和解决这些问题，提高开发效率和用户体验。&lt;/p></description></item><item><title>了解Ledger硬件钱包</title><link>https://1991421.cn/2026/03/20/understanding-ledger-hardware-wallet/</link><pubDate>Fri, 20 Mar 2026 09:42:15 +0800</pubDate><guid>https://1991421.cn/2026/03/20/understanding-ledger-hardware-wallet/</guid><description>&lt;blockquote>
&lt;p>Ledger&lt;code>/'ledʒər/&lt;/code> 是硬件钱包品牌。最近项目需要验证一条新链上的硬件钱包签名方案，我拿到了 Ledger Nano X 设备进行验证。&lt;/p>
&lt;p>本文记录整个工作过程和相关技术要点。&lt;/p>
&lt;/blockquote>
&lt;h2 id="ledger钱包购买">
&lt;a class="heading-anchor-link" href="#ledger%e9%92%b1%e5%8c%85%e8%b4%ad%e4%b9%b0">ledger钱包购买&lt;/a>
&lt;button
class="heading-anchor"
type="button"
data-anchor="ledger钱包购买"
aria-label="复制锚点链接"
title="复制锚点链接"
>
&lt;span class="heading-anchor-wrap" aria-hidden="true">
&lt;svg class="heading-anchor-icon heading-anchor-icon-default" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512" fill="currentColor">
&lt;path d="M0 256C0 167.6 71.6 96 160 96h72c13.3 0 24 10.7 24 24s-10.7 24-24 24H160C98.1 144 48 194.1 48 256s50.1 112 112 112h72c13.3 0 24 10.7 24 24s-10.7 24-24 24H160C71.6 416 0 344.4 0 256zm576 0c0 88.4-71.6 160-160 160H344c-13.3 0-24-10.7-24-24s10.7-24 24-24h72c61.9 0 112-50.1 112-112s-50.1-112-112-112H344c-13.3 0-24-10.7-24-24s10.7-24 24-24h72c88.4 0 160 71.6 160 160zM184 232H392c13.3 0 24 10.7 24 24s-10.7 24-24 24H184c-13.3 0-24-10.7-24-24s10.7-24 24-24z">&lt;/path>
&lt;/svg>
&lt;svg class="heading-anchor-icon heading-anchor-icon-copied" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" fill="currentColor">
&lt;path d="M256 48C141.1 48 48 141.1 48 256s93.1 208 208 208 208-93.1 208-208S370.9 48 256 48zm107.1 145.1L230.6 325.6c-6.2 6.2-16.4 6.2-22.6 0l-59-59c-6.2-6.2-6.2-16.4 0-22.6s16.4-6.2 22.6 0l47.7 47.7 121.1-121.1c6.2-6.2 16.4-6.2 22.6 0s6.3 16.4.1 22.5z">&lt;/path>
&lt;/svg>
&lt;/span>
&lt;/button>
&lt;/h2>&lt;p>我目前手里的是公司给采购的，感兴趣想买的，直接官网即可，👉 &lt;a href="https://shop.ledger.com/?r=aadf58e8f8b8" target="_blank" rel="noopener">戳这里&lt;/a>&lt;/p>
&lt;h2 id="概念">
&lt;a class="heading-anchor-link" href="#%e6%a6%82%e5%bf%b5">概念&lt;/a>
&lt;button
class="heading-anchor"
type="button"
data-anchor="概念"
aria-label="复制锚点链接"
title="复制锚点链接"
>
&lt;span class="heading-anchor-wrap" aria-hidden="true">
&lt;svg class="heading-anchor-icon heading-anchor-icon-default" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512" fill="currentColor">
&lt;path d="M0 256C0 167.6 71.6 96 160 96h72c13.3 0 24 10.7 24 24s-10.7 24-24 24H160C98.1 144 48 194.1 48 256s50.1 112 112 112h72c13.3 0 24 10.7 24 24s-10.7 24-24 24H160C71.6 416 0 344.4 0 256zm576 0c0 88.4-71.6 160-160 160H344c-13.3 0-24-10.7-24-24s10.7-24 24-24h72c61.9 0 112-50.1 112-112s-50.1-112-112-112H344c-13.3 0-24-10.7-24-24s10.7-24 24-24h72c88.4 0 160 71.6 160 160zM184 232H392c13.3 0 24 10.7 24 24s-10.7 24-24 24H184c-13.3 0-24-10.7-24-24s10.7-24 24-24z">&lt;/path>
&lt;/svg>
&lt;svg class="heading-anchor-icon heading-anchor-icon-copied" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" fill="currentColor">
&lt;path d="M256 48C141.1 48 48 141.1 48 256s93.1 208 208 208 208-93.1 208-208S370.9 48 256 48zm107.1 145.1L230.6 325.6c-6.2 6.2-16.4 6.2-22.6 0l-59-59c-6.2-6.2-6.2-16.4 0-22.6s16.4-6.2 22.6 0l47.7 47.7 121.1-121.1c6.2-6.2 16.4-6.2 22.6 0s6.3 16.4.1 22.5z">&lt;/path>
&lt;/svg>
&lt;/span>
&lt;/button>
&lt;/h2>&lt;p>通过物理隔离技术和安全元件芯片实现加密资产私钥的安全存储。&lt;/p>
&lt;h2 id="做什么">
&lt;a class="heading-anchor-link" href="#%e5%81%9a%e4%bb%80%e4%b9%88">做什么&lt;/a>
&lt;button
class="heading-anchor"
type="button"
data-anchor="做什么"
aria-label="复制锚点链接"
title="复制锚点链接"
>
&lt;span class="heading-anchor-wrap" aria-hidden="true">
&lt;svg class="heading-anchor-icon heading-anchor-icon-default" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512" fill="currentColor">
&lt;path d="M0 256C0 167.6 71.6 96 160 96h72c13.3 0 24 10.7 24 24s-10.7 24-24 24H160C98.1 144 48 194.1 48 256s50.1 112 112 112h72c13.3 0 24 10.7 24 24s-10.7 24-24 24H160C71.6 416 0 344.4 0 256zm576 0c0 88.4-71.6 160-160 160H344c-13.3 0-24-10.7-24-24s10.7-24 24-24h72c61.9 0 112-50.1 112-112s-50.1-112-112-112H344c-13.3 0-24-10.7-24-24s10.7-24 24-24h72c88.4 0 160 71.6 160 160zM184 232H392c13.3 0 24 10.7 24 24s-10.7 24-24 24H184c-13.3 0-24-10.7-24-24s10.7-24 24-24z">&lt;/path>
&lt;/svg>
&lt;svg class="heading-anchor-icon heading-anchor-icon-copied" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" fill="currentColor">
&lt;path d="M256 48C141.1 48 48 141.1 48 256s93.1 208 208 208 208-93.1 208-208S370.9 48 256 48zm107.1 145.1L230.6 325.6c-6.2 6.2-16.4 6.2-22.6 0l-59-59c-6.2-6.2-6.2-16.4 0-22.6s16.4-6.2 22.6 0l47.7 47.7 121.1-121.1c6.2-6.2 16.4-6.2 22.6 0s6.3 16.4.1 22.5z">&lt;/path>
&lt;/svg>
&lt;/span>
&lt;/button>
&lt;/h2>&lt;ol>
&lt;li>
&lt;p>私钥存储(不暴露给电脑或手机)&lt;/p>
&lt;/li>
&lt;li>
&lt;p>交易签名(签名动作在设备内完成)&lt;/p>
&lt;/li>
&lt;/ol>
&lt;p>&lt;figure class="image-figure">
&lt;img
src="https://www.cashbackisl.com/wp-content/uploads/2026/02/copertina-27426-1.webp"
alt="ledger 硬件钱包"
loading="lazy"
decoding="async"
class="rounded-lg"
/>
&lt;/figure>&lt;/p>
&lt;h2 id="eth交易签名流程例子">
&lt;a class="heading-anchor-link" href="#eth%e4%ba%a4%e6%98%93%e7%ad%be%e5%90%8d%e6%b5%81%e7%a8%8b%e4%be%8b%e5%ad%90">eth交易签名流程（例子）&lt;/a>
&lt;button
class="heading-anchor"
type="button"
data-anchor="eth交易签名流程例子"
aria-label="复制锚点链接"
title="复制锚点链接"
>
&lt;span class="heading-anchor-wrap" aria-hidden="true">
&lt;svg class="heading-anchor-icon heading-anchor-icon-default" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512" fill="currentColor">
&lt;path d="M0 256C0 167.6 71.6 96 160 96h72c13.3 0 24 10.7 24 24s-10.7 24-24 24H160C98.1 144 48 194.1 48 256s50.1 112 112 112h72c13.3 0 24 10.7 24 24s-10.7 24-24 24H160C71.6 416 0 344.4 0 256zm576 0c0 88.4-71.6 160-160 160H344c-13.3 0-24-10.7-24-24s10.7-24 24-24h72c61.9 0 112-50.1 112-112s-50.1-112-112-112H344c-13.3 0-24-10.7-24-24s10.7-24 24-24h72c88.4 0 160 71.6 160 160zM184 232H392c13.3 0 24 10.7 24 24s-10.7 24-24 24H184c-13.3 0-24-10.7-24-24s10.7-24 24-24z">&lt;/path>
&lt;/svg>
&lt;svg class="heading-anchor-icon heading-anchor-icon-copied" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" fill="currentColor">
&lt;path d="M256 48C141.1 48 48 141.1 48 256s93.1 208 208 208 208-93.1 208-208S370.9 48 256 48zm107.1 145.1L230.6 325.6c-6.2 6.2-16.4 6.2-22.6 0l-59-59c-6.2-6.2-6.2-16.4 0-22.6s16.4-6.2 22.6 0l47.7 47.7 121.1-121.1c6.2-6.2 16.4-6.2 22.6 0s6.3 16.4.1 22.5z">&lt;/path>
&lt;/svg>
&lt;/span>
&lt;/button>
&lt;/h2>&lt;div class="mermaid">
sequenceDiagram
box 客户端
participant U as 用户
participant D as dApp
participant M as MetaMask
end
box 外部签名设备
participant L as Ledger Device (Ethereum App)
end
box 区块链基础设施
participant R as RPC / Ethereum Network
end
U->>D: 发起转账 / Approve / Swap
D->>M: 请求钱包发起交易
M->>R: 获取 nonce / gas / fee / chainId
R-->>M: 返回链上参数
M->>U: 展示交易确认信息
U->>M: 在 MetaMask 点击确认
M->>L: 发送未签名交易数据
L->>U: 设备屏幕展示关键信息
U->>L: 按键确认/拒绝
alt 用户确认
L-->>M: 返回签名结果
M->>R: 广播已签名交易
R-->>M: 返回 tx hash / pending / confirmed
M-->>U: 展示交易状态
else 用户拒绝
L-->>M: 拒绝签名
M-->>U: 交易取消/失败
end
&lt;/div>
&lt;h2 id="自定义区块链网络新链的支持">
&lt;a class="heading-anchor-link" href="#%e8%87%aa%e5%ae%9a%e4%b9%89%e5%8c%ba%e5%9d%97%e9%93%be%e7%bd%91%e7%bb%9c%e6%96%b0%e9%93%be%e7%9a%84%e6%94%af%e6%8c%81">自定义区块链网络/新链的支持&lt;/a>
&lt;button
class="heading-anchor"
type="button"
data-anchor="自定义区块链网络新链的支持"
aria-label="复制锚点链接"
title="复制锚点链接"
>
&lt;span class="heading-anchor-wrap" aria-hidden="true">
&lt;svg class="heading-anchor-icon heading-anchor-icon-default" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512" fill="currentColor">
&lt;path d="M0 256C0 167.6 71.6 96 160 96h72c13.3 0 24 10.7 24 24s-10.7 24-24 24H160C98.1 144 48 194.1 48 256s50.1 112 112 112h72c13.3 0 24 10.7 24 24s-10.7 24-24 24H160C71.6 416 0 344.4 0 256zm576 0c0 88.4-71.6 160-160 160H344c-13.3 0-24-10.7-24-24s10.7-24 24-24h72c61.9 0 112-50.1 112-112s-50.1-112-112-112H344c-13.3 0-24-10.7-24-24s10.7-24 24-24h72c88.4 0 160 71.6 160 160zM184 232H392c13.3 0 24 10.7 24 24s-10.7 24-24 24H184c-13.3 0-24-10.7-24-24s10.7-24 24-24z">&lt;/path>
&lt;/svg>
&lt;svg class="heading-anchor-icon heading-anchor-icon-copied" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" fill="currentColor">
&lt;path d="M256 48C141.1 48 48 141.1 48 256s93.1 208 208 208 208-93.1 208-208S370.9 48 256 48zm107.1 145.1L230.6 325.6c-6.2 6.2-16.4 6.2-22.6 0l-59-59c-6.2-6.2-6.2-16.4 0-22.6s16.4-6.2 22.6 0l47.7 47.7 121.1-121.1c6.2-6.2 16.4-6.2 22.6 0s6.3 16.4.1 22.5z">&lt;/path>
&lt;/svg>
&lt;/span>
&lt;/button>
&lt;/h2>&lt;p>对于一个自定义的区块链网络/新链，想要利用ledger的安全存储和签名功能。&lt;/p>
&lt;ol>
&lt;li>开发一个&lt;code>Ledger Device App&lt;/code>，安装在设备上，提供特定区块链的交易签名功能。&lt;/li>
&lt;li>开发一个&lt;code>连接Ledger Device App的插件&lt;/code>，安装在MetaMask等钱包中，提供与新链交互的功能.
&lt;ul>
&lt;li>如果是使用web3js等库，就需要修改库，从而支持通过Ledger Device App进行交易签名。&lt;/li>
&lt;/ul>
&lt;/li>
&lt;/ol>
&lt;h3 id="调用链--数据流图">
&lt;a class="heading-anchor-link" href="#%e8%b0%83%e7%94%a8%e9%93%be--%e6%95%b0%e6%8d%ae%e6%b5%81%e5%9b%be">调用链 / 数据流图&lt;/a>
&lt;button
class="heading-anchor"
type="button"
data-anchor="调用链--数据流图"
aria-label="复制锚点链接"
title="复制锚点链接"
>
&lt;span class="heading-anchor-wrap" aria-hidden="true">
&lt;svg class="heading-anchor-icon heading-anchor-icon-default" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512" fill="currentColor">
&lt;path d="M0 256C0 167.6 71.6 96 160 96h72c13.3 0 24 10.7 24 24s-10.7 24-24 24H160C98.1 144 48 194.1 48 256s50.1 112 112 112h72c13.3 0 24 10.7 24 24s-10.7 24-24 24H160C71.6 416 0 344.4 0 256zm576 0c0 88.4-71.6 160-160 160H344c-13.3 0-24-10.7-24-24s10.7-24 24-24h72c61.9 0 112-50.1 112-112s-50.1-112-112-112H344c-13.3 0-24-10.7-24-24s10.7-24 24-24h72c88.4 0 160 71.6 160 160zM184 232H392c13.3 0 24 10.7 24 24s-10.7 24-24 24H184c-13.3 0-24-10.7-24-24s10.7-24 24-24z">&lt;/path>
&lt;/svg>
&lt;svg class="heading-anchor-icon heading-anchor-icon-copied" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" fill="currentColor">
&lt;path d="M256 48C141.1 48 48 141.1 48 256s93.1 208 208 208 208-93.1 208-208S370.9 48 256 48zm107.1 145.1L230.6 325.6c-6.2 6.2-16.4 6.2-22.6 0l-59-59c-6.2-6.2-6.2-16.4 0-22.6s16.4-6.2 22.6 0l47.7 47.7 121.1-121.1c6.2-6.2 16.4-6.2 22.6 0s6.3 16.4.1 22.5z">&lt;/path>
&lt;/svg>
&lt;/span>
&lt;/button>
&lt;/h3>&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-fallback" data-lang="fallback">&lt;span class="line">&lt;span class="cl">你的代码
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> ↓
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">Ledger SDK（封装 APDU）
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> ↓
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">WebHID（传输）
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> ↓
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">Ledger 设备
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> ↓
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">你的 ChainMaker App（解析 APDU）
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>说明：HID即 &lt;code>human interface device&lt;/code>，APDU即 &lt;code>application protocol data unit&lt;/code>。&lt;/p>
&lt;h3 id="ledger-device-app">
&lt;a class="heading-anchor-link" href="#ledger-device-app">Ledger Device App&lt;/a>
&lt;button
class="heading-anchor"
type="button"
data-anchor="ledger-device-app"
aria-label="复制锚点链接"
title="复制锚点链接"
>
&lt;span class="heading-anchor-wrap" aria-hidden="true">
&lt;svg class="heading-anchor-icon heading-anchor-icon-default" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512" fill="currentColor">
&lt;path d="M0 256C0 167.6 71.6 96 160 96h72c13.3 0 24 10.7 24 24s-10.7 24-24 24H160C98.1 144 48 194.1 48 256s50.1 112 112 112h72c13.3 0 24 10.7 24 24s-10.7 24-24 24H160C71.6 416 0 344.4 0 256zm576 0c0 88.4-71.6 160-160 160H344c-13.3 0-24-10.7-24-24s10.7-24 24-24h72c61.9 0 112-50.1 112-112s-50.1-112-112-112H344c-13.3 0-24-10.7-24-24s10.7-24 24-24h72c88.4 0 160 71.6 160 160zM184 232H392c13.3 0 24 10.7 24 24s-10.7 24-24 24H184c-13.3 0-24-10.7-24-24s10.7-24 24-24z">&lt;/path>
&lt;/svg>
&lt;svg class="heading-anchor-icon heading-anchor-icon-copied" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" fill="currentColor">
&lt;path d="M256 48C141.1 48 48 141.1 48 256s93.1 208 208 208 208-93.1 208-208S370.9 48 256 48zm107.1 145.1L230.6 325.6c-6.2 6.2-16.4 6.2-22.6 0l-59-59c-6.2-6.2-6.2-16.4 0-22.6s16.4-6.2 22.6 0l47.7 47.7 121.1-121.1c6.2-6.2 16.4-6.2 22.6 0s6.3 16.4.1 22.5z">&lt;/path>
&lt;/svg>
&lt;/span>
&lt;/button>
&lt;/h3>&lt;p>Ledger Device App会安装在设备上，提供特定区块链的交易签名功能。&lt;/p>
&lt;h3 id="要求">
&lt;a class="heading-anchor-link" href="#%e8%a6%81%e6%b1%82">要求&lt;/a>
&lt;button
class="heading-anchor"
type="button"
data-anchor="要求"
aria-label="复制锚点链接"
title="复制锚点链接"
>
&lt;span class="heading-anchor-wrap" aria-hidden="true">
&lt;svg class="heading-anchor-icon heading-anchor-icon-default" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512" fill="currentColor">
&lt;path d="M0 256C0 167.6 71.6 96 160 96h72c13.3 0 24 10.7 24 24s-10.7 24-24 24H160C98.1 144 48 194.1 48 256s50.1 112 112 112h72c13.3 0 24 10.7 24 24s-10.7 24-24 24H160C71.6 416 0 344.4 0 256zm576 0c0 88.4-71.6 160-160 160H344c-13.3 0-24-10.7-24-24s10.7-24 24-24h72c61.9 0 112-50.1 112-112s-50.1-112-112-112H344c-13.3 0-24-10.7-24-24s10.7-24 24-24h72c88.4 0 160 71.6 160 160zM184 232H392c13.3 0 24 10.7 24 24s-10.7 24-24 24H184c-13.3 0-24-10.7-24-24s10.7-24 24-24z">&lt;/path>
&lt;/svg>
&lt;svg class="heading-anchor-icon heading-anchor-icon-copied" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" fill="currentColor">
&lt;path d="M256 48C141.1 48 48 141.1 48 256s93.1 208 208 208 208-93.1 208-208S370.9 48 256 48zm107.1 145.1L230.6 325.6c-6.2 6.2-16.4 6.2-22.6 0l-59-59c-6.2-6.2-6.2-16.4 0-22.6s16.4-6.2 22.6 0l47.7 47.7 121.1-121.1c6.2-6.2 16.4-6.2 22.6 0s6.3 16.4.1 22.5z">&lt;/path>
&lt;/svg>
&lt;/span>
&lt;/button>
&lt;/h3>&lt;ol>
&lt;li>开发语言只能是&lt;code>C/Rust&lt;/code>，因为设备资源有限，比如我手里的Nano X，内存只有MB级别。
&lt;ul>
&lt;li>官方提供了Rust&lt;a href="https://github.com/LedgerHQ/app-boilerplate-rust" target="_blank" rel="noopener">脚手架模版&lt;/a>&lt;/li>
&lt;li>官方提供了C语言&lt;a href="https://github.com/LedgerHQ/app-boilerplate" target="_blank" rel="noopener">脚手架模版&lt;/a>&lt;/li>
&lt;li>推荐走官方脚手架，避免无法被插件正常识别。我个人目前选的走Rust，更好维护些。&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>安装官方的&lt;a href="https://marketplace.visualstudio.com/items?itemName=LedgerHQ.ledger-dev-tools" target="_blank" rel="noopener">VSCode插件&lt;/a>，提供了开发环境和调试工具。&lt;/li>
&lt;li>构建打包device app的话，需要&lt;code>Docker环境&lt;/code>，官方提供了Docker镜像，里面包含了构建和打包所需的工具链和依赖。&lt;/li>
&lt;li>模拟器进行测试的话，本地还需安装&lt;a href="https://github.com/LedgerHQ/speculos" target="_blank" rel="noopener">Speculos模拟器&lt;/a>，提供设备的模拟环境.&lt;/li>
&lt;/ol>
&lt;h3 id="vscode插件">
&lt;a class="heading-anchor-link" href="#vscode%e6%8f%92%e4%bb%b6">VSCode插件&lt;/a>
&lt;button
class="heading-anchor"
type="button"
data-anchor="vscode插件"
aria-label="复制锚点链接"
title="复制锚点链接"
>
&lt;span class="heading-anchor-wrap" aria-hidden="true">
&lt;svg class="heading-anchor-icon heading-anchor-icon-default" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512" fill="currentColor">
&lt;path d="M0 256C0 167.6 71.6 96 160 96h72c13.3 0 24 10.7 24 24s-10.7 24-24 24H160C98.1 144 48 194.1 48 256s50.1 112 112 112h72c13.3 0 24 10.7 24 24s-10.7 24-24 24H160C71.6 416 0 344.4 0 256zm576 0c0 88.4-71.6 160-160 160H344c-13.3 0-24-10.7-24-24s10.7-24 24-24h72c61.9 0 112-50.1 112-112s-50.1-112-112-112H344c-13.3 0-24-10.7-24-24s10.7-24 24-24h72c88.4 0 160 71.6 160 160zM184 232H392c13.3 0 24 10.7 24 24s-10.7 24-24 24H184c-13.3 0-24-10.7-24-24s10.7-24 24-24z">&lt;/path>
&lt;/svg>
&lt;svg class="heading-anchor-icon heading-anchor-icon-copied" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" fill="currentColor">
&lt;path d="M256 48C141.1 48 48 141.1 48 256s93.1 208 208 208 208-93.1 208-208S370.9 48 256 48zm107.1 145.1L230.6 325.6c-6.2 6.2-16.4 6.2-22.6 0l-59-59c-6.2-6.2-6.2-16.4 0-22.6s16.4-6.2 22.6 0l47.7 47.7 121.1-121.1c6.2-6.2 16.4-6.2 22.6 0s6.3 16.4.1 22.5z">&lt;/path>
&lt;/svg>
&lt;/span>
&lt;/button>
&lt;/h3>&lt;p>如图，可以看到&lt;a href="https://marketplace.visualstudio.com/items?itemName=LedgerHQ.ledger-dev-tools" target="_blank" rel="noopener">插件&lt;/a>提供了完善的开发/构建/调试功能，极大提升了开发效率。
&lt;figure class="image-figure">
&lt;img
src="https://static.1991421.cn/2026/03/2026-03-24-144706.jpeg"
alt="https://static.1991421.cn/2026/03/2026-03-24-144706.jpeg"
loading="lazy"
decoding="async"
class="rounded-lg"
/>
&lt;/figure>&lt;/p>
&lt;h3 id="真机-vs-模拟器">
&lt;a class="heading-anchor-link" href="#%e7%9c%9f%e6%9c%ba-vs-%e6%a8%a1%e6%8b%9f%e5%99%a8">真机 vs 模拟器&lt;/a>
&lt;button
class="heading-anchor"
type="button"
data-anchor="真机-vs-模拟器"
aria-label="复制锚点链接"
title="复制锚点链接"
>
&lt;span class="heading-anchor-wrap" aria-hidden="true">
&lt;svg class="heading-anchor-icon heading-anchor-icon-default" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512" fill="currentColor">
&lt;path d="M0 256C0 167.6 71.6 96 160 96h72c13.3 0 24 10.7 24 24s-10.7 24-24 24H160C98.1 144 48 194.1 48 256s50.1 112 112 112h72c13.3 0 24 10.7 24 24s-10.7 24-24 24H160C71.6 416 0 344.4 0 256zm576 0c0 88.4-71.6 160-160 160H344c-13.3 0-24-10.7-24-24s10.7-24 24-24h72c61.9 0 112-50.1 112-112s-50.1-112-112-112H344c-13.3 0-24-10.7-24-24s10.7-24 24-24h72c88.4 0 160 71.6 160 160zM184 232H392c13.3 0 24 10.7 24 24s-10.7 24-24 24H184c-13.3 0-24-10.7-24-24s10.7-24 24-24z">&lt;/path>
&lt;/svg>
&lt;svg class="heading-anchor-icon heading-anchor-icon-copied" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" fill="currentColor">
&lt;path d="M256 48C141.1 48 48 141.1 48 256s93.1 208 208 208 208-93.1 208-208S370.9 48 256 48zm107.1 145.1L230.6 325.6c-6.2 6.2-16.4 6.2-22.6 0l-59-59c-6.2-6.2-6.2-16.4 0-22.6s16.4-6.2 22.6 0l47.7 47.7 121.1-121.1c6.2-6.2 16.4-6.2 22.6 0s6.3 16.4.1 22.5z">&lt;/path>
&lt;/svg>
&lt;/span>
&lt;/button>
&lt;/h3>&lt;table>
&lt;thead>
&lt;tr>
&lt;th style="text-align: left">对比项&lt;/th>
&lt;th style="text-align: left">真机 (WebHID)&lt;/th>
&lt;th style="text-align: left">模拟器 (Speculos)&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td style="text-align: left">连接方式&lt;/td>
&lt;td style="text-align: left">&lt;code>TransportWebHID.create()&lt;/code> — 浏览器弹出 HID 设备选择器，用户手动选择 USB 设备&lt;/td>
&lt;td style="text-align: left">&lt;code>SpeculosHttpTransport.open(url)&lt;/code> — 直接 HTTP 连到 &lt;code>localhost:5001&lt;/code>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td style="text-align: left">通信协议&lt;/td>
&lt;td style="text-align: left">USB HID 帧协议（浏览器 WebHID API → USB → 设备固件）&lt;/td>
&lt;td style="text-align: left">HTTP POST JSON &lt;code>{ data: &amp;quot;hex...&amp;quot; }&lt;/code> → Speculos HTTP API → 模拟固件&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td style="text-align: left">用户确认&lt;/td>
&lt;td style="text-align: left">签名时需要在真机物理按键确认&lt;/td>
&lt;td style="text-align: left">Speculos 手动确认&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td style="text-align: left">LedgerSigner 创建&lt;/td>
&lt;td style="text-align: left">显式传 &lt;code>signDigest&lt;/code> 和 &lt;code>fetchPublicKey&lt;/code>（第 1043-1044 行）&lt;/td>
&lt;td style="text-align: left">用默认值（构造函数里默认就是 &lt;code>rawApduSignDigest&lt;/code> / &lt;code>rawApduFetchPublicKey&lt;/code>）&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td style="text-align: left">后续流程&lt;/td>
&lt;td style="text-align: left">&lt;code>isReady()&lt;/code> → &lt;code>fetchPublicKey()&lt;/code> → &lt;code>signMessage()&lt;/code> → 上链&lt;/td>
&lt;td style="text-align: left">完全一样&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;h3 id="发布上线流程">
&lt;a class="heading-anchor-link" href="#%e5%8f%91%e5%b8%83%e4%b8%8a%e7%ba%bf%e6%b5%81%e7%a8%8b">发布上线流程&lt;/a>
&lt;button
class="heading-anchor"
type="button"
data-anchor="发布上线流程"
aria-label="复制锚点链接"
title="复制锚点链接"
>
&lt;span class="heading-anchor-wrap" aria-hidden="true">
&lt;svg class="heading-anchor-icon heading-anchor-icon-default" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512" fill="currentColor">
&lt;path d="M0 256C0 167.6 71.6 96 160 96h72c13.3 0 24 10.7 24 24s-10.7 24-24 24H160C98.1 144 48 194.1 48 256s50.1 112 112 112h72c13.3 0 24 10.7 24 24s-10.7 24-24 24H160C71.6 416 0 344.4 0 256zm576 0c0 88.4-71.6 160-160 160H344c-13.3 0-24-10.7-24-24s10.7-24 24-24h72c61.9 0 112-50.1 112-112s-50.1-112-112-112H344c-13.3 0-24-10.7-24-24s10.7-24 24-24h72c88.4 0 160 71.6 160 160zM184 232H392c13.3 0 24 10.7 24 24s-10.7 24-24 24H184c-13.3 0-24-10.7-24-24s10.7-24 24-24z">&lt;/path>
&lt;/svg>
&lt;svg class="heading-anchor-icon heading-anchor-icon-copied" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" fill="currentColor">
&lt;path d="M256 48C141.1 48 48 141.1 48 256s93.1 208 208 208 208-93.1 208-208S370.9 48 256 48zm107.1 145.1L230.6 325.6c-6.2 6.2-16.4 6.2-22.6 0l-59-59c-6.2-6.2-6.2-16.4 0-22.6s16.4-6.2 22.6 0l47.7 47.7 121.1-121.1c6.2-6.2 16.4-6.2 22.6 0s6.3 16.4.1 22.5z">&lt;/path>
&lt;/svg>
&lt;/span>
&lt;/button>
&lt;/h3>&lt;p>你需要提交的是：App 的源码仓库 + 一系列交付物（deliverables），Ledger 会 fork 你的 App 仓库，在他们自己的 Git flow 中管理部署代码。所以不是你自己打包一个二进制文件，而是提交源码让 Ledger 来构建和签名。&lt;/p>
&lt;p>&lt;figure class="image-figure">
&lt;img
src="https://static.1991421.cn/2026/03/2026-03-30-161301.jpeg"
alt="https://static.1991421.cn/2026/03/2026-03-30-161301.jpeg"
loading="lazy"
decoding="async"
class="rounded-lg"
/>
&lt;/figure>&lt;/p>
&lt;p>具体步骤：&lt;/p>
&lt;ol>
&lt;li>先联系 Ledger 团队 — 填写表单介绍你的项目，达成合作意向（分为 Ledger&lt;/li>
&lt;/ol>
&lt;pre>&lt;code>开发 或 自主开发两条路径），表单提交地址见[这里](https://developers.ledger.com/docs/device-app/submission-process/submission-form)
&lt;/code>&lt;/pre>
&lt;ol start="2">
&lt;li>确保代码符合要求 — 满足安全、密码学和开发规范&lt;/li>
&lt;li>准备交付物（Deliverables）：&lt;/li>
&lt;/ol>
&lt;pre>&lt;code>- App 源码仓库（含 docs/apdu.md 文档，描述 APDU 命令和状态字）
- 用户文档（Google Doc 格式或已发布的文档 URL）
- App 兼容性信息（需支持 Nano S Plus、Nano X、Stax、Flex 所有设备）
- 法律实体信息、邮箱、地址等
&lt;/code>&lt;/pre>
&lt;ol start="4">
&lt;li>填写提交表单 — 官方有专门的 device app 提交表单和 plugin 提交表单&lt;/li>
&lt;li>安全审计 — Ledger 的&lt;a href="https://developers.ledger.com/docs/device-app/getting-started#:~:text=including%20potential%20vulnerabilities.-,Audit%20partners,-When%20your%20device" target="_blank" rel="noopener">合作审计方&lt;/a>会对你的 App 进行安全审查，审计通过后Ledger 才会发布
&lt;ul>
&lt;li>要求走官方提供的合作审计方进行审计。&lt;/li>
&lt;li>费用问题自负。&lt;/li>
&lt;/ul>
&lt;/li>
&lt;/ol>
&lt;p>说明：提交审核需要很多信息，且审核包含安全审计因此上架的周期很长(几周到几个月，无确定时间周期)。&lt;/p>
&lt;h2 id="用户如何用">
&lt;a class="heading-anchor-link" href="#%e7%94%a8%e6%88%b7%e5%a6%82%e4%bd%95%e7%94%a8">用户如何用&lt;/a>
&lt;button
class="heading-anchor"
type="button"
data-anchor="用户如何用"
aria-label="复制锚点链接"
title="复制锚点链接"
>
&lt;span class="heading-anchor-wrap" aria-hidden="true">
&lt;svg class="heading-anchor-icon heading-anchor-icon-default" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512" fill="currentColor">
&lt;path d="M0 256C0 167.6 71.6 96 160 96h72c13.3 0 24 10.7 24 24s-10.7 24-24 24H160C98.1 144 48 194.1 48 256s50.1 112 112 112h72c13.3 0 24 10.7 24 24s-10.7 24-24 24H160C71.6 416 0 344.4 0 256zm576 0c0 88.4-71.6 160-160 160H344c-13.3 0-24-10.7-24-24s10.7-24 24-24h72c61.9 0 112-50.1 112-112s-50.1-112-112-112H344c-13.3 0-24-10.7-24-24s10.7-24 24-24h72c88.4 0 160 71.6 160 160zM184 232H392c13.3 0 24 10.7 24 24s-10.7 24-24 24H184c-13.3 0-24-10.7-24-24s10.7-24 24-24z">&lt;/path>
&lt;/svg>
&lt;svg class="heading-anchor-icon heading-anchor-icon-copied" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" fill="currentColor">
&lt;path d="M256 48C141.1 48 48 141.1 48 256s93.1 208 208 208 208-93.1 208-208S370.9 48 256 48zm107.1 145.1L230.6 325.6c-6.2 6.2-16.4 6.2-22.6 0l-59-59c-6.2-6.2-6.2-16.4 0-22.6s16.4-6.2 22.6 0l47.7 47.7 121.1-121.1c6.2-6.2 16.4-6.2 22.6 0s6.3 16.4.1 22.5z">&lt;/path>
&lt;/svg>
&lt;/span>
&lt;/button>
&lt;/h2>&lt;ol>
&lt;li>用户需要安装 Ledger Wallet 应用，连接并设置好 Ledger 设备。&lt;/li>
&lt;li>用户需要在 Ledger Wallet 中安装目标App。
&lt;ul>
&lt;li>&lt;code>未上线App&lt;/code>，需要走官方VSC插件进行&lt;code>侧载安装&lt;/code>。&lt;/li>
&lt;/ul>
&lt;/li>
&lt;/ol>
&lt;p>&lt;figure class="image-figure">
&lt;img
src="https://static.1991421.cn/2026/03/2026-03-24-171254.jpeg"
alt="https://static.1991421.cn/2026/03/2026-03-24-171254.jpeg"
loading="lazy"
decoding="async"
class="rounded-lg"
/>
&lt;/figure>&lt;/p>
&lt;h2 id="侧载测试">
&lt;a class="heading-anchor-link" href="#%e4%be%a7%e8%bd%bd%e6%b5%8b%e8%af%95">侧载测试&lt;/a>
&lt;button
class="heading-anchor"
type="button"
data-anchor="侧载测试"
aria-label="复制锚点链接"
title="复制锚点链接"
>
&lt;span class="heading-anchor-wrap" aria-hidden="true">
&lt;svg class="heading-anchor-icon heading-anchor-icon-default" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512" fill="currentColor">
&lt;path d="M0 256C0 167.6 71.6 96 160 96h72c13.3 0 24 10.7 24 24s-10.7 24-24 24H160C98.1 144 48 194.1 48 256s50.1 112 112 112h72c13.3 0 24 10.7 24 24s-10.7 24-24 24H160C71.6 416 0 344.4 0 256zm576 0c0 88.4-71.6 160-160 160H344c-13.3 0-24-10.7-24-24s10.7-24 24-24h72c61.9 0 112-50.1 112-112s-50.1-112-112-112H344c-13.3 0-24-10.7-24-24s10.7-24 24-24h72c88.4 0 160 71.6 160 160zM184 232H392c13.3 0 24 10.7 24 24s-10.7 24-24 24H184c-13.3 0-24-10.7-24-24s10.7-24 24-24z">&lt;/path>
&lt;/svg>
&lt;svg class="heading-anchor-icon heading-anchor-icon-copied" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" fill="currentColor">
&lt;path d="M256 48C141.1 48 48 141.1 48 256s93.1 208 208 208 208-93.1 208-208S370.9 48 256 48zm107.1 145.1L230.6 325.6c-6.2 6.2-16.4 6.2-22.6 0l-59-59c-6.2-6.2-6.2-16.4 0-22.6s16.4-6.2 22.6 0l47.7 47.7 121.1-121.1c6.2-6.2 16.4-6.2 22.6 0s6.3 16.4.1 22.5z">&lt;/path>
&lt;/svg>
&lt;/span>
&lt;/button>
&lt;/h2>&lt;ol>
&lt;li>连接设备，VSC下打开ledger app，利用插件进行测试。&lt;/li>
&lt;li>除了自己开发的app外，单纯想体验下侧载的话，可以走官方已上架app测试，比如&lt;a href="https://github.com/LedgerHQ/app-ethereum/tree/master" target="_blank" rel="noopener">eth app&lt;/a>&lt;/li>
&lt;/ol>
&lt;h2 id="其它问题">
&lt;a class="heading-anchor-link" href="#%e5%85%b6%e5%ae%83%e9%97%ae%e9%a2%98">其它问题&lt;/a>
&lt;button
class="heading-anchor"
type="button"
data-anchor="其它问题"
aria-label="复制锚点链接"
title="复制锚点链接"
>
&lt;span class="heading-anchor-wrap" aria-hidden="true">
&lt;svg class="heading-anchor-icon heading-anchor-icon-default" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512" fill="currentColor">
&lt;path d="M0 256C0 167.6 71.6 96 160 96h72c13.3 0 24 10.7 24 24s-10.7 24-24 24H160C98.1 144 48 194.1 48 256s50.1 112 112 112h72c13.3 0 24 10.7 24 24s-10.7 24-24 24H160C71.6 416 0 344.4 0 256zm576 0c0 88.4-71.6 160-160 160H344c-13.3 0-24-10.7-24-24s10.7-24 24-24h72c61.9 0 112-50.1 112-112s-50.1-112-112-112H344c-13.3 0-24-10.7-24-24s10.7-24 24-24h72c88.4 0 160 71.6 160 160zM184 232H392c13.3 0 24 10.7 24 24s-10.7 24-24 24H184c-13.3 0-24-10.7-24-24s10.7-24 24-24z">&lt;/path>
&lt;/svg>
&lt;svg class="heading-anchor-icon heading-anchor-icon-copied" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" fill="currentColor">
&lt;path d="M256 48C141.1 48 48 141.1 48 256s93.1 208 208 208 208-93.1 208-208S370.9 48 256 48zm107.1 145.1L230.6 325.6c-6.2 6.2-16.4 6.2-22.6 0l-59-59c-6.2-6.2-6.2-16.4 0-22.6s16.4-6.2 22.6 0l47.7 47.7 121.1-121.1c6.2-6.2 16.4-6.2 22.6 0s6.3 16.4.1 22.5z">&lt;/path>
&lt;/svg>
&lt;/span>
&lt;/button>
&lt;/h2>&lt;h3 id="硬件钱包为什么那么多型号那么贵">
&lt;a class="heading-anchor-link" href="#%e7%a1%ac%e4%bb%b6%e9%92%b1%e5%8c%85%e4%b8%ba%e4%bb%80%e4%b9%88%e9%82%a3%e4%b9%88%e5%a4%9a%e5%9e%8b%e5%8f%b7%e9%82%a3%e4%b9%88%e8%b4%b5">硬件钱包为什么那么多型号，那么贵？&lt;/a>
&lt;button
class="heading-anchor"
type="button"
data-anchor="硬件钱包为什么那么多型号那么贵"
aria-label="复制锚点链接"
title="复制锚点链接"
>
&lt;span class="heading-anchor-wrap" aria-hidden="true">
&lt;svg class="heading-anchor-icon heading-anchor-icon-default" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512" fill="currentColor">
&lt;path d="M0 256C0 167.6 71.6 96 160 96h72c13.3 0 24 10.7 24 24s-10.7 24-24 24H160C98.1 144 48 194.1 48 256s50.1 112 112 112h72c13.3 0 24 10.7 24 24s-10.7 24-24 24H160C71.6 416 0 344.4 0 256zm576 0c0 88.4-71.6 160-160 160H344c-13.3 0-24-10.7-24-24s10.7-24 24-24h72c61.9 0 112-50.1 112-112s-50.1-112-112-112H344c-13.3 0-24-10.7-24-24s10.7-24 24-24h72c88.4 0 160 71.6 160 160zM184 232H392c13.3 0 24 10.7 24 24s-10.7 24-24 24H184c-13.3 0-24-10.7-24-24s10.7-24 24-24z">&lt;/path>
&lt;/svg>
&lt;svg class="heading-anchor-icon heading-anchor-icon-copied" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" fill="currentColor">
&lt;path d="M256 48C141.1 48 48 141.1 48 256s93.1 208 208 208 208-93.1 208-208S370.9 48 256 48zm107.1 145.1L230.6 325.6c-6.2 6.2-16.4 6.2-22.6 0l-59-59c-6.2-6.2-6.2-16.4 0-22.6s16.4-6.2 22.6 0l47.7 47.7 121.1-121.1c6.2-6.2 16.4-6.2 22.6 0s6.3 16.4.1 22.5z">&lt;/path>
&lt;/svg>
&lt;/span>
&lt;/button>
&lt;/h3>&lt;ol>
&lt;li>硬件钱包，比如 Ledger ≠ 只是安全芯片&lt;/li>
&lt;li>型号不同，安全级别 × 交互体验 × 使用场景 的取舍不同，另外存储空间也不同，价格自然不同。&lt;/li>
&lt;/ol>
&lt;h3 id="navigatorhid">
&lt;a class="heading-anchor-link" href="#navigatorhid">navigator.hid&lt;/a>
&lt;button
class="heading-anchor"
type="button"
data-anchor="navigatorhid"
aria-label="复制锚点链接"
title="复制锚点链接"
>
&lt;span class="heading-anchor-wrap" aria-hidden="true">
&lt;svg class="heading-anchor-icon heading-anchor-icon-default" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512" fill="currentColor">
&lt;path d="M0 256C0 167.6 71.6 96 160 96h72c13.3 0 24 10.7 24 24s-10.7 24-24 24H160C98.1 144 48 194.1 48 256s50.1 112 112 112h72c13.3 0 24 10.7 24 24s-10.7 24-24 24H160C71.6 416 0 344.4 0 256zm576 0c0 88.4-71.6 160-160 160H344c-13.3 0-24-10.7-24-24s10.7-24 24-24h72c61.9 0 112-50.1 112-112s-50.1-112-112-112H344c-13.3 0-24-10.7-24-24s10.7-24 24-24h72c88.4 0 160 71.6 160 160zM184 232H392c13.3 0 24 10.7 24 24s-10.7 24-24 24H184c-13.3 0-24-10.7-24-24s10.7-24 24-24z">&lt;/path>
&lt;/svg>
&lt;svg class="heading-anchor-icon heading-anchor-icon-copied" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" fill="currentColor">
&lt;path d="M256 48C141.1 48 48 141.1 48 256s93.1 208 208 208 208-93.1 208-208S370.9 48 256 48zm107.1 145.1L230.6 325.6c-6.2 6.2-16.4 6.2-22.6 0l-59-59c-6.2-6.2-6.2-16.4 0-22.6s16.4-6.2 22.6 0l47.7 47.7 121.1-121.1c6.2-6.2 16.4-6.2 22.6 0s6.3 16.4.1 22.5z">&lt;/path>
&lt;/svg>
&lt;/span>
&lt;/button>
&lt;/h3>&lt;p>navigator.hid（WebHID）是连接物理 USB HID 设备的，而 Speculos &lt;br>
是模拟器，它只暴露 TCP socket（端口 9999） 和 HTTP API（端口 5000），不是真实 USB
设备，所以浏览器扫描不到任何 HID 设备。&lt;/p>
&lt;h2 id="联系官方">
&lt;a class="heading-anchor-link" href="#%e8%81%94%e7%b3%bb%e5%ae%98%e6%96%b9">联系官方&lt;/a>
&lt;button
class="heading-anchor"
type="button"
data-anchor="联系官方"
aria-label="复制锚点链接"
title="复制锚点链接"
>
&lt;span class="heading-anchor-wrap" aria-hidden="true">
&lt;svg class="heading-anchor-icon heading-anchor-icon-default" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512" fill="currentColor">
&lt;path d="M0 256C0 167.6 71.6 96 160 96h72c13.3 0 24 10.7 24 24s-10.7 24-24 24H160C98.1 144 48 194.1 48 256s50.1 112 112 112h72c13.3 0 24 10.7 24 24s-10.7 24-24 24H160C71.6 416 0 344.4 0 256zm576 0c0 88.4-71.6 160-160 160H344c-13.3 0-24-10.7-24-24s10.7-24 24-24h72c61.9 0 112-50.1 112-112s-50.1-112-112-112H344c-13.3 0-24-10.7-24-24s10.7-24 24-24h72c88.4 0 160 71.6 160 160zM184 232H392c13.3 0 24 10.7 24 24s-10.7 24-24 24H184c-13.3 0-24-10.7-24-24s10.7-24 24-24z">&lt;/path>
&lt;/svg>
&lt;svg class="heading-anchor-icon heading-anchor-icon-copied" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" fill="currentColor">
&lt;path d="M256 48C141.1 48 48 141.1 48 256s93.1 208 208 208 208-93.1 208-208S370.9 48 256 48zm107.1 145.1L230.6 325.6c-6.2 6.2-16.4 6.2-22.6 0l-59-59c-6.2-6.2-6.2-16.4 0-22.6s16.4-6.2 22.6 0l47.7 47.7 121.1-121.1c6.2-6.2 16.4-6.2 22.6 0s6.3 16.4.1 22.5z">&lt;/path>
&lt;/svg>
&lt;/span>
&lt;/button>
&lt;/h2>&lt;ol>
&lt;li>&lt;a href="https://discord.com/invite/ledger" target="_blank" rel="noopener">discord&lt;/a>&lt;/li>
&lt;li>邮件 &lt;a href="mailto:hello@ledger.fr">hello@ledger.fr&lt;/a>&lt;/li>
&lt;/ol>
&lt;h2 id="相关文档">
&lt;a class="heading-anchor-link" href="#%e7%9b%b8%e5%85%b3%e6%96%87%e6%a1%a3">相关文档&lt;/a>
&lt;button
class="heading-anchor"
type="button"
data-anchor="相关文档"
aria-label="复制锚点链接"
title="复制锚点链接"
>
&lt;span class="heading-anchor-wrap" aria-hidden="true">
&lt;svg class="heading-anchor-icon heading-anchor-icon-default" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512" fill="currentColor">
&lt;path d="M0 256C0 167.6 71.6 96 160 96h72c13.3 0 24 10.7 24 24s-10.7 24-24 24H160C98.1 144 48 194.1 48 256s50.1 112 112 112h72c13.3 0 24 10.7 24 24s-10.7 24-24 24H160C71.6 416 0 344.4 0 256zm576 0c0 88.4-71.6 160-160 160H344c-13.3 0-24-10.7-24-24s10.7-24 24-24h72c61.9 0 112-50.1 112-112s-50.1-112-112-112H344c-13.3 0-24-10.7-24-24s10.7-24 24-24h72c88.4 0 160 71.6 160 160zM184 232H392c13.3 0 24 10.7 24 24s-10.7 24-24 24H184c-13.3 0-24-10.7-24-24s10.7-24 24-24z">&lt;/path>
&lt;/svg>
&lt;svg class="heading-anchor-icon heading-anchor-icon-copied" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" fill="currentColor">
&lt;path d="M256 48C141.1 48 48 141.1 48 256s93.1 208 208 208 208-93.1 208-208S370.9 48 256 48zm107.1 145.1L230.6 325.6c-6.2 6.2-16.4 6.2-22.6 0l-59-59c-6.2-6.2-6.2-16.4 0-22.6s16.4-6.2 22.6 0l47.7 47.7 121.1-121.1c6.2-6.2 16.4-6.2 22.6 0s6.3 16.4.1 22.5z">&lt;/path>
&lt;/svg>
&lt;/span>
&lt;/button>
&lt;/h2>&lt;ul>
&lt;li>&lt;a href="https://developers.ledger.com/docs/device-app/integration/how-to/app-boilerplate" target="_blank" rel="noopener">https://developers.ledger.com/docs/device-app/integration/how-to/app-boilerplate&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://developers.ledger.com/docs/device-app/beginner/vscode-extension" target="_blank" rel="noopener">https://developers.ledger.com/docs/device-app/beginner/vscode-extension&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://developers.ledger.com/docs/device-app/submission-process/submission-form" target="_blank" rel="noopener">https://developers.ledger.com/docs/device-app/submission-process/submission-form&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://developers.ledger.com/docs/device-interaction/integration/how_to/transports" target="_blank" rel="noopener">https://developers.ledger.com/docs/device-interaction/integration/how_to/transports&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://www.cashbackisl.com/ledger-cold-wallet-guide-hk/" target="_blank" rel="noopener">https://www.cashbackisl.com/ledger-cold-wallet-guide-hk/&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://en.wikipedia.org/wiki/Smart_card_application_protocol_data_unit" target="_blank" rel="noopener">https://en.wikipedia.org/wiki/Smart_card_application_protocol_data_unit&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://ledger-app-guide.com/desktop/index.html" target="_blank" rel="noopener">https://ledger-app-guide.com/desktop/index.html&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://shop.ledger.com/pages/ledger-wallet" target="_blank" rel="noopener">https://shop.ledger.com/pages/ledger-wallet&lt;/a>&lt;/li>
&lt;/ul></description></item></channel></rss>