{"eip":4527,"title":"QR Code transmission protocol for wallets","description":"QR Code data transmission protocol between wallets and offline signers.","authors":["Aaron Chen (@aaronisme)","Sora Lee (@soralit)","ligi (@ligi)","Dan Miller (@danjm)","AndreasGassmann (@andreasgassmann)","xardass (@xardass)","Lixin Liu (@BitcoinLixin)"],"status":"Stagnant","type":"Standards Track","category":"ERC","created":"2021-12-07","discussionsTo":"https://ethereum-magicians.org/t/add-qr-code-scanning-between-software-wallet-cold-signer-hardware-wallet/6568","repo":"ERCs","label":"ERC-4527","officialUrl":"https://eips.ethereum.org/EIPS/eip-4527","sourceUrl":"https://github.com/ethereum/ERCs/blob/master/ERCS/erc-4527.md","url":"https://eips.huatuo.xyz/eip-4527/","tldr":{"en":"A standard way for watch-only wallets and air-gapped signers to exchange public keys, signing requests and signatures through (animated) QR codes using Blockchain Commons UR encoding.","ja":"ウォッチオンリーウォレットとエアギャップ署名デバイスが、Blockchain Commons の UR エンコードを使い、（アニメーション）QR コードで公開鍵・署名リクエスト・署名をやり取りするための標準的な方法。","ko":"조회 전용 지갑과 에어갭 서명기가 Blockchain Commons의 UR 인코딩을 사용해 (애니메이션) QR 코드로 공개 키, 서명 요청, 서명을 주고받는 표준 방식.","zh":"为仅观察钱包和气隙签名器提供的标准方式，使用 Blockchain Commons 的 UR 编码，通过（动态）二维码交换公钥、签名请求和签名。"},"tags":["wallet","qr-code","air-gapped","hardware-wallet","signing"],"explainers":{"en":{"lang":"en","tldr":"A standard way for watch-only wallets and air-gapped signers to exchange public keys, signing requests and signatures through (animated) QR codes using Blockchain Commons UR encoding.","tags":["wallet","qr-code","air-gapped","hardware-wallet","signing"],"related":[712,191,2718,155],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/eip-4527/","markdown":"## What problem does it solve?\n\nMany users keep their private keys on a device that never touches the network: a hardware wallet with a camera and screen, or an old phone in airplane mode. That *offline signer* still needs an online *watch-only wallet* to show balances, build transactions and broadcast them. The two must exchange data somehow: USB, Bluetooth, files or QR codes.\n\nQR codes have a small attack surface, work across browsers and operating systems without drivers, and users can inspect what is being transferred. But before this proposal every vendor encoded Ethereum data in its own QR format, so a given wallet only worked with specific signers. ERC-4527 defines one flow and one encoding so any compliant wallet can pair with any compliant signer.\n\n## How it works\n\nThe flow has four steps:\n\n1. **Pairing.** The signer shows a QR with its extended public key and derivation path (`crypto-hdkey` with a `crypto-keypath`). The watch-only wallet derives addresses and tracks balances.\n2. **Request.** The wallet builds unsigned data and shows it as an `eth-sign-request` QR.\n3. **Sign.** The signer decodes it, shows the details to the user, signs, and displays an `eth-signature` QR.\n4. **Broadcast.** The wallet scans the signature, assembles the signed transaction and sends it.\n\nData is CBOR-encoded and wrapped in Blockchain Commons **Uniform Resources (UR)**. Large payloads are split across an animated sequence of QR frames using fountain codes, with a CRC32 checksum so the receiver knows the message is complete.\n\n`eth-sign-request` is a CBOR map with integer keys:\n\n| Key | Field | Notes |\n| --- | --- | --- |\n| 1 | `request-id` | optional UUID |\n| 2 | `sign-data` | the bytes to sign |\n| 3 | `data-type` | 1 legacy tx RLP, 2 [EIP-712](/eip-712/) typed data, 3 raw bytes (e.g. [EIP-191](/eip-191/) personal_sign), 4 [EIP-2718](/eip-2718/) typed tx |\n| 4 | `chain-id` | defaults to 1 |\n| 5 | `derivation-path` | which key to use |\n| 6 | `address` | optional, lets the signer double-check the key |\n| 7 | `origin` | optional, e.g. wallet name |\n\n`eth-signature` returns the same `request-id`, a 65-byte `(r, s, v)` signature and an optional device `origin`.\n\n## Sample code\n\nAn `eth-sign-request` in CBOR diagnostic notation (placeholders, not real data):\n\n```text\n{\n  1: 37(h'\u003c16-byte uuid\u003e'),          / request-id /\n  2: h'\u003cunsigned EIP-1559 tx bytes\u003e', / sign-data /\n  3: 4,                               / data-type: EIP-2718 typed transaction /\n  4: 1,                               / chain-id: Ethereum Mainnet /\n  5: 304({ 1: [44, true, 60, true, 0, true, 0, false, 0, false] }),\n                                      / derivation-path m/44'/60'/0'/0/0 /\n  6: h'\u003c20-byte address\u003e',            / address for verification /\n  7: \"my-wallet\"                      / origin /\n}\n```\n\nThe CBOR bytes are then UR-encoded into one or more QR frames that start with `ur:eth-sign-request/`.\n\n## Things to know\n\n- Status is **Stagnant**: the ERC has not advanced to Final and may change or be abandoned. Check what a given wallet or signer actually supports before relying on it.\n- The spec points to the `ur-registry-eth` package by the Keystone team as its reference implementation and test vectors.\n- Security relies on the signer decoding and showing the full request before signing, and on checking the optional `address` against its own key. A signer that blind-signs undoes the benefit.\n- For legacy transactions, include the chain ID so the signature gets [EIP-155](/eip-155/) replay protection.\n"},"ja":{"lang":"ja","tldr":"ウォッチオンリーウォレットとエアギャップ署名デバイスが、Blockchain Commons の UR エンコードを使い、（アニメーション）QR コードで公開鍵・署名リクエスト・署名をやり取りするための標準的な方法。","tags":["wallet","qr-code","air-gapped","hardware-wallet","signing"],"related":[712,191,2718,155],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ja/eip-4527/","markdown":"## 何を解決するのか\n\n多くのユーザーは、ネットワークに一切接続しないデバイスに秘密鍵を保管しています。カメラと画面を備えたハードウェアウォレットや、機内モードの古いスマートフォンなどです。この*オフライン署名デバイス*にも、残高の表示、トランザクションの作成、ブロードキャストを行うオンラインの*ウォッチオンリーウォレット*が必要です。両者は何らかの方法でデータをやり取りしなければなりません。USB、Bluetooth、ファイル、QR コードなどです。\n\nQR コードは攻撃対象領域が小さく、ドライバーなしでブラウザや OS をまたいで動作し、ユーザーが転送内容を確認できます。しかしこの提案以前は、ベンダーごとに独自の QR 形式で Ethereum のデータをエンコードしていたため、特定のウォレットは特定の署名デバイスとしか動作しませんでした。ERC-4527 は 1 つのフローと 1 つのエンコーディングを定義し、準拠するウォレットと準拠する署名デバイスをどれでも組み合わせられるようにします。\n\n## 仕組み\n\nフローは 4 つのステップです。\n\n1. **ペアリング。** 署名デバイスが拡張公開鍵と導出パスを含む QR（`crypto-keypath` を持つ `crypto-hdkey`）を表示します。ウォッチオンリーウォレットはアドレスを導出し、残高を追跡します。\n2. **リクエスト。** ウォレットが未署名のデータを作り、`eth-sign-request` QR として表示します。\n3. **署名。** 署名デバイスがそれをデコードし、内容をユーザーに見せ、署名して `eth-signature` QR を表示します。\n4. **ブロードキャスト。** ウォレットが署名をスキャンし、署名済みトランザクションを組み立てて送信します。\n\nデータは CBOR でエンコードされ、Blockchain Commons の **Uniform Resources（UR）** に包まれます。大きなペイロードは、ファウンテン コードを使ってアニメーションする複数の QR フレームに分割され、受信側がメッセージの完全性を判断できるよう CRC32 チェックサムが付きます。\n\n`eth-sign-request` は整数キーを持つ CBOR マップです。\n\n| キー | フィールド | 備考 |\n| --- | --- | --- |\n| 1 | `request-id` | 任意の UUID |\n| 2 | `sign-data` | 署名対象のバイト列 |\n| 3 | `data-type` | 1 はレガシートランザクションの RLP、2 は [EIP-712](/eip-712/) の型付きデータ、3 は生のバイト列（例: [EIP-191](/eip-191/) の personal_sign）、4 は [EIP-2718](/eip-2718/) の型付きトランザクション |\n| 4 | `chain-id` | デフォルトは 1 |\n| 5 | `derivation-path` | 使用する鍵 |\n| 6 | `address` | 任意。署名デバイスが鍵を再確認できる |\n| 7 | `origin` | 任意。例: ウォレット名 |\n\n`eth-signature` は同じ `request-id`、65 バイトの `(r, s, v)` 署名、任意のデバイス `origin` を返します。\n\n## サンプルコード\n\nCBOR 診断表記による `eth-sign-request`（プレースホルダーであり、実データではありません）:\n\n```text\n{\n  1: 37(h'\u003c16-byte uuid\u003e'),          / request-id /\n  2: h'\u003cunsigned EIP-1559 tx bytes\u003e', / sign-data /\n  3: 4,                               / data-type: EIP-2718 typed transaction /\n  4: 1,                               / chain-id: Ethereum Mainnet /\n  5: 304({ 1: [44, true, 60, true, 0, true, 0, false, 0, false] }),\n                                      / derivation-path m/44'/60'/0'/0/0 /\n  6: h'\u003c20-byte address\u003e',            / address for verification /\n  7: \"my-wallet\"                      / origin /\n}\n```\n\nこの CBOR バイト列は UR エンコードされ、`ur:eth-sign-request/` で始まる 1 つ以上の QR フレームになります。\n\n## 知っておくべきこと\n\n- ステータスは **Stagnant** です。この ERC は Final に進んでおらず、変更または放棄される可能性があります。頼る前に、使用するウォレットや署名デバイスが実際に何に対応しているかを確認してください。\n- 仕様は、リファレンス実装とテストベクターとして Keystone チームの `ur-registry-eth` パッケージを挙げています。\n- セキュリティは、署名デバイスが署名前にリクエスト全体をデコードして表示すること、および任意の `address` を自身の鍵と照合することに依存します。ブラインド署名をする署名デバイスでは、この利点が失われます。\n- レガシートランザクションでは、署名に [EIP-155](/eip-155/) のリプレイ保護が付くよう、チェーン ID を含めてください。\n"},"ko":{"lang":"ko","tldr":"조회 전용 지갑과 에어갭 서명기가 Blockchain Commons의 UR 인코딩을 사용해 (애니메이션) QR 코드로 공개 키, 서명 요청, 서명을 주고받는 표준 방식.","tags":["wallet","qr-code","air-gapped","hardware-wallet","signing"],"related":[712,191,2718,155],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ko/eip-4527/","markdown":"## 어떤 문제를 해결하나요?\n\n많은 사용자가 네트워크에 절대 연결되지 않는 기기에 개인 키를 보관합니다. 카메라와 화면이 있는 하드웨어 지갑이나 비행기 모드로 둔 오래된 휴대폰 같은 것입니다. 이 *오프라인 서명기*에도 잔액을 보여 주고, 트랜잭션을 만들고, 브로드캐스트해 줄 온라인 *조회 전용 지갑*이 필요합니다. 둘은 USB, 블루투스, 파일, QR 코드 등 어떤 방식으로든 데이터를 주고받아야 합니다.\n\nQR 코드는 공격 표면이 작고, 드라이버 없이 브라우저와 운영체제를 가리지 않고 동작하며, 사용자가 전송되는 내용을 직접 확인할 수 있습니다. 하지만 이 제안 이전에는 벤더마다 자기만의 QR 형식으로 이더리움 데이터를 인코딩했기 때문에 특정 지갑은 특정 서명기에서만 동작했습니다. ERC-4527은 하나의 흐름과 하나의 인코딩을 정의하여 규격을 따르는 지갑이면 어떤 서명기와도 페어링되도록 합니다.\n\n## 어떻게 동작하나요?\n\n흐름은 네 단계입니다.\n\n1. **페어링.** 서명기가 확장 공개 키와 파생 경로가 담긴 QR(`crypto-keypath`가 있는 `crypto-hdkey`)을 보여 줍니다. 조회 전용 지갑은 주소를 파생하고 잔액을 추적합니다.\n2. **요청.** 지갑이 서명되지 않은 데이터를 만들어 `eth-sign-request` QR로 보여 줍니다.\n3. **서명.** 서명기가 이를 디코딩해 사용자에게 내용을 보여 주고, 서명한 뒤 `eth-signature` QR을 표시합니다.\n4. **브로드캐스트.** 지갑이 서명을 스캔해 서명된 트랜잭션을 조립하고 전송합니다.\n\n데이터는 CBOR로 인코딩되어 Blockchain Commons의 **Uniform Resources(UR)**로 감싸집니다. 큰 페이로드는 파운틴 코드를 이용해 애니메이션되는 여러 QR 프레임으로 나뉘며, 수신 측이 메시지가 완성되었음을 알 수 있도록 CRC32 체크섬이 함께 들어갑니다.\n\n`eth-sign-request`는 정수 키를 쓰는 CBOR 맵입니다.\n\n| 키 | 필드 | 비고 |\n| --- | --- | --- |\n| 1 | `request-id` | 선택 사항인 UUID |\n| 2 | `sign-data` | 서명할 바이트 |\n| 3 | `data-type` | 1은 레거시 트랜잭션 RLP, 2는 [EIP-712](/eip-712/) 타입 데이터, 3은 원시 바이트(예: [EIP-191](/eip-191/) personal_sign), 4는 [EIP-2718](/eip-2718/) 타입 트랜잭션 |\n| 4 | `chain-id` | 기본값은 1 |\n| 5 | `derivation-path` | 사용할 키 |\n| 6 | `address` | 선택 사항이며, 서명기가 키를 다시 확인할 수 있게 함 |\n| 7 | `origin` | 선택 사항, 예: 지갑 이름 |\n\n`eth-signature`는 같은 `request-id`, 65바이트 `(r, s, v)` 서명, 선택 사항인 기기 `origin`을 반환합니다.\n\n## 샘플 코드\n\nCBOR 진단 표기법으로 나타낸 `eth-sign-request`(자리표시자이며 실제 데이터가 아닙니다):\n\n```text\n{\n  1: 37(h'\u003c16-byte uuid\u003e'),          / request-id /\n  2: h'\u003cunsigned EIP-1559 tx bytes\u003e', / sign-data /\n  3: 4,                               / data-type: EIP-2718 typed transaction /\n  4: 1,                               / chain-id: Ethereum Mainnet /\n  5: 304({ 1: [44, true, 60, true, 0, true, 0, false, 0, false] }),\n                                      / derivation-path m/44'/60'/0'/0/0 /\n  6: h'\u003c20-byte address\u003e',            / address for verification /\n  7: \"my-wallet\"                      / origin /\n}\n```\n\n이 CBOR 바이트는 이후 `ur:eth-sign-request/`로 시작하는 하나 이상의 QR 프레임으로 UR 인코딩됩니다.\n\n## 알아둘 점\n\n- 상태는 **Stagnant**입니다. 이 ERC는 Final로 진행되지 않았으며 변경되거나 폐기될 수 있습니다. 의존하기 전에 사용하는 지갑이나 서명기가 실제로 무엇을 지원하는지 확인하세요.\n- 스펙은 참조 구현과 테스트 벡터로 Keystone 팀의 `ur-registry-eth` 패키지를 가리킵니다.\n- 보안은 서명기가 서명 전에 전체 요청을 디코딩해 보여 주는 것, 그리고 선택 사항인 `address`를 자신의 키와 대조하는 것에 달려 있습니다. 블라인드 서명을 하는 서명기는 이 이점을 무효로 만듭니다.\n- 레거시 트랜잭션에는 서명에 [EIP-155](/eip-155/) 리플레이 보호가 적용되도록 체인 ID를 포함하세요.\n"},"zh":{"lang":"zh","tldr":"为仅观察钱包和气隙签名器提供的标准方式，使用 Blockchain Commons 的 UR 编码，通过（动态）二维码交换公钥、签名请求和签名。","tags":["wallet","qr-code","air-gapped","hardware-wallet","signing"],"related":[712,191,2718,155],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/zh/eip-4527/","markdown":"## 它解决什么问题？\n\n许多用户把私钥保存在一台从不联网的设备上：带摄像头和屏幕的硬件钱包，或一部开着飞行模式的旧手机。这个*离线签名器*仍然需要一个在线的*仅观察钱包*来显示余额、构建交易并广播。两者必须以某种方式交换数据：USB、蓝牙、文件或二维码。\n\n二维码的攻击面很小，无需驱动即可跨浏览器和操作系统使用，用户也可以检查传输的内容。但在这一提案之前，每个厂商都用自己的二维码格式编码以太坊数据，所以某个钱包只能配合特定的签名器使用。ERC-4527 定义了一套流程和一种编码，让任何合规的钱包都能与任何合规的签名器配对。\n\n## 它如何运作\n\n流程分四步：\n\n1. **配对。** 签名器显示一个包含其扩展公钥和派生路径的二维码（带 `crypto-keypath` 的 `crypto-hdkey`）。仅观察钱包据此派生地址并跟踪余额。\n2. **请求。** 钱包构建未签名的数据，并以 `eth-sign-request` 二维码显示。\n3. **签名。** 签名器解码后向用户展示详情，完成签名，并显示 `eth-signature` 二维码。\n4. **广播。** 钱包扫描签名，组装出已签名的交易并发送。\n\n数据采用 CBOR 编码，并封装在 Blockchain Commons 的 **Uniform Resources（UR）** 中。较大的载荷通过喷泉码拆分成动态的二维码帧序列，并附带 CRC32 校验和，让接收方知道消息已完整接收。\n\n`eth-sign-request` 是一个使用整数键的 CBOR map：\n\n| 键 | 字段 | 说明 |\n| --- | --- | --- |\n| 1 | `request-id` | 可选的 UUID |\n| 2 | `sign-data` | 要签名的字节 |\n| 3 | `data-type` | 1 为传统交易的 RLP，2 为 [EIP-712](/eip-712/) 类型化数据，3 为原始字节（例如 [EIP-191](/eip-191/) 的 personal_sign），4 为 [EIP-2718](/eip-2718/) 类型化交易 |\n| 4 | `chain-id` | 默认为 1 |\n| 5 | `derivation-path` | 使用哪把密钥 |\n| 6 | `address` | 可选，让签名器可以再次核对密钥 |\n| 7 | `origin` | 可选，例如钱包名称 |\n\n`eth-signature` 返回相同的 `request-id`、一个 65 字节的 `(r, s, v)` 签名以及可选的设备 `origin`。\n\n## 示例代码\n\nCBOR 诊断记法表示的 `eth-sign-request`（占位符，并非真实数据）：\n\n```text\n{\n  1: 37(h'\u003c16-byte uuid\u003e'),          / request-id /\n  2: h'\u003cunsigned EIP-1559 tx bytes\u003e', / sign-data /\n  3: 4,                               / data-type: EIP-2718 typed transaction /\n  4: 1,                               / chain-id: Ethereum Mainnet /\n  5: 304({ 1: [44, true, 60, true, 0, true, 0, false, 0, false] }),\n                                      / derivation-path m/44'/60'/0'/0/0 /\n  6: h'\u003c20-byte address\u003e',            / address for verification /\n  7: \"my-wallet\"                      / origin /\n}\n```\n\n随后这些 CBOR 字节会被 UR 编码为一个或多个以 `ur:eth-sign-request/` 开头的二维码帧。\n\n## 需要注意\n\n- 状态为 **Stagnant**：该 ERC 尚未进入 Final，可能会变更或被放弃。在依赖它之前，请确认具体的钱包或签名器实际支持什么。\n- 规范将 Keystone 团队的 `ur-registry-eth` 包作为其参考实现和测试向量。\n- 安全性依赖于签名器在签名前解码并展示完整请求，并用自己的密钥核对可选的 `address`。盲签的签名器会抵消这一好处。\n- 对于传统交易，请包含链 ID，使签名获得 [EIP-155](/eip-155/) 的重放保护。\n"}}}
