{"eip":831,"title":"URI Format for Ethereum","description":"A way of creating Ethereum URIs for various use-cases.","authors":["ligi (@ligi)"],"status":"Stagnant","type":"Standards Track","category":"ERC","created":"2018-01-15","requires":[67,681],"discussionsTo":"https://ethereum-magicians.org/t/eip-831-uri-format-for-ethereum/10105","repo":"ERCs","label":"ERC-831","officialUrl":"https://eips.ethereum.org/EIPS/eip-831","sourceUrl":"https://github.com/ethereum/ERCs/blob/master/ERCS/erc-831.md","url":"https://eips.huatuo.xyz/eip-831/","tldr":{"en":"Defines the general ethereum: URI container, with an optional use-case prefix such as pay-, so QR codes and links can open the user's wallet; specific formats like ERC-681 plug into it.","ja":"汎用の ethereum: URI コンテナを定義する。pay- のような用途別プレフィックスを任意で付けられ、QR コードやリンクからユーザーのウォレットを開ける。ERC-681 などの具体的な形式はこの上に載る。","ko":"일반적인 ethereum: URI 컨테이너를 정의한다. pay- 같은 용도별 접두사를 선택적으로 붙일 수 있어 QR 코드와 링크로 사용자의 지갑을 열 수 있으며, ERC-681 같은 구체적인 형식이 그 위에 얹힌다.","zh":"定义通用的 ethereum: URI 容器，可带有 pay- 之类的可选用途前缀，使二维码和链接可以唤起用户的钱包；ERC-681 等具体格式在其基础上接入。"},"tags":["uri","qr-code","wallet","interoperability","stagnant"],"explainers":{"en":{"lang":"en","tldr":"Defines the general ethereum: URI container, with an optional use-case prefix such as pay-, so QR codes and links can open the user's wallet; specific formats like ERC-681 plug into it.","tags":["uri","qr-code","wallet","interoperability","stagnant"],"related":[67,681],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/eip-831/","markdown":"## What problem does it solve?\n\nURIs in QR codes, web pages, emails and chat messages are a simple way for unrelated apps to hand work to a user's wallet. [EIP-67](/eip-67/) introduced `ethereum:` links, but it tied the whole scheme to a single use case: sending a transaction.\n\nWhile [ERC-681](/eip-681/) was refining payment requests, its authors needed a lighter **container** that would not lock `ethereum:` into one purpose. EIP-831 defines that container. Each use case gets its own prefix and its own ERC for the payload, and existing EIP-67 links keep working.\n\n## How it works\n\nThe grammar is short:\n\n```\nrequest = \"eth\" [ \"ereum\" ] \":\" [ prefix \"-\" ] payload\nprefix  = STRING\npayload = STRING\n```\n\n- The scheme may be `ethereum:` or the short form `eth:`.\n- `prefix` names the use case, for example `pay`. It is optional.\n- **If there is no prefix, `pay-` is assumed.** In that case the payload must start with `0x`, and no prefix may start with `0x`. So a URI that begins with `0x` clearly has no prefix, which keeps EIP-67 style URIs valid.\n- `payload` is required. Its structure is defined by the ERC for that prefix, not by EIP-831. [ERC-681](/eip-681/) defines the `pay-` payload: a target address or ENS name, an optional chain ID, an optional function name and its parameters.\n\nThe open-ended prefix lets the scheme grow to new use cases without reserving `ethereum:` for the few that existed in 2018.\n\n## Sample code\n\nValid URIs under this container:\n\n```text\nethereum:0xfb6916095ca1df60bb79Ce92ce3ea74c37c5d359?value=2.014e18\nethereum:pay-0xfb6916095ca1df60bb79Ce92ce3ea74c37c5d359?value=2.014e18\nethereum:pay-0xfb6916095ca1df60bb79Ce92ce3ea74c37c5d359@1?value=1e16\n```\n\nThe first two mean the same thing, because `pay-` is the default.\n\nA small parser that splits a URI into prefix and payload (TypeScript):\n\n```ts\nfunction parseEthereumUri(uri: string) {\n  const m = /^eth(?:ereum)?:(.+)$/i.exec(uri);\n  if (!m) throw new Error(\"not an ethereum URI\");\n  const rest = m[1];\n  if (rest.startsWith(\"0x\")) return { prefix: \"pay\", payload: rest };\n  const dash = rest.indexOf(\"-\");\n  if (dash \u003c 1) throw new Error(\"missing prefix or payload\");\n  return { prefix: rest.slice(0, dash), payload: rest.slice(dash + 1) };\n}\n\nparseEthereumUri(\"ethereum:pay-0xfb6916095ca1df60bb79Ce92ce3ea74c37c5d359?value=1e18\");\n// { prefix: \"pay\", payload: \"0xfb6916095ca1df60bb79Ce92ce3ea74c37c5d359?value=1e18\" }\n```\n\n## Things to know\n\n- **This proposal is Stagnant.** The `pay-` payload format it points to, [ERC-681](/eip-681/), is Final and uses the same `ethereum:` / `pay-` scheme.\n- Older EIP-67 parsers may fail on URIs that use a prefix. The spec accepts this as the cost of extensibility.\n- The spec does not register any prefixes other than `pay`. A new use case needs its own ERC.\n- URIs come from untrusted sources. A wallet should decode the request and show it clearly before the user signs.\n"},"ja":{"lang":"ja","tldr":"汎用の ethereum: URI コンテナを定義する。pay- のような用途別プレフィックスを任意で付けられ、QR コードやリンクからユーザーのウォレットを開ける。ERC-681 などの具体的な形式はこの上に載る。","tags":["uri","qr-code","wallet","interoperability","stagnant"],"related":[67,681],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ja/eip-831/","markdown":"## 何を解決するのか\n\nQR コード、Web ページ、メール、チャットメッセージに含まれる URI は、無関係なアプリ同士がユーザーのウォレットに作業を引き渡すための簡単な手段です。[EIP-67](/eip-67/) は `ethereum:` リンクを導入しましたが、このスキーム全体をトランザクションの送信という 1 つの用途に結び付けていました。\n\n[ERC-681](/eip-681/) が支払いリクエストを洗練させていく中で、その著者たちは、`ethereum:` を 1 つの目的に固定しない、より軽量な**コンテナ**を必要としました。EIP-831 がそのコンテナを定義します。各ユースケースには独自のプレフィックスとペイロード用の ERC が与えられ、既存の EIP-67 リンクもそのまま動作します。\n\n## 仕組み\n\n文法は短いものです。\n\n```\nrequest = \"eth\" [ \"ereum\" ] \":\" [ prefix \"-\" ] payload\nprefix  = STRING\npayload = STRING\n```\n\n- スキームは `ethereum:` か、短縮形の `eth:` を使えます。\n- `prefix` はユースケースを表す名前で、たとえば `pay` です。省略可能です。\n- **プレフィックスがない場合は `pay-` とみなされます。** その場合、ペイロードは `0x` で始まらなければならず、どのプレフィックスも `0x` で始まってはいけません。そのため `0x` で始まる URI は明らかにプレフィックスなしであり、EIP-67 形式の URI も有効なままです。\n- `payload` は必須です。その構造は EIP-831 ではなく、そのプレフィックス用の ERC が定義します。[ERC-681](/eip-681/) は `pay-` のペイロードを定義しており、対象のアドレスまたは ENS 名、任意のチェーン ID、任意の関数名とそのパラメーターから成ります。\n\nプレフィックスを自由に決められるため、2018 年時点で存在した少数の用途のために `ethereum:` を占有することなく、新しいユースケースへスキームを拡張できます。\n\n## サンプルコード\n\nこのコンテナで有効な URI:\n\n```text\nethereum:0xfb6916095ca1df60bb79Ce92ce3ea74c37c5d359?value=2.014e18\nethereum:pay-0xfb6916095ca1df60bb79Ce92ce3ea74c37c5d359?value=2.014e18\nethereum:pay-0xfb6916095ca1df60bb79Ce92ce3ea74c37c5d359@1?value=1e16\n```\n\n`pay-` がデフォルトなので、最初の 2 つは同じ意味です。\n\nURI をプレフィックスとペイロードに分割する小さなパーサー（TypeScript）:\n\n```ts\nfunction parseEthereumUri(uri: string) {\n  const m = /^eth(?:ereum)?:(.+)$/i.exec(uri);\n  if (!m) throw new Error(\"not an ethereum URI\");\n  const rest = m[1];\n  if (rest.startsWith(\"0x\")) return { prefix: \"pay\", payload: rest };\n  const dash = rest.indexOf(\"-\");\n  if (dash \u003c 1) throw new Error(\"missing prefix or payload\");\n  return { prefix: rest.slice(0, dash), payload: rest.slice(dash + 1) };\n}\n\nparseEthereumUri(\"ethereum:pay-0xfb6916095ca1df60bb79Ce92ce3ea74c37c5d359?value=1e18\");\n// { prefix: \"pay\", payload: \"0xfb6916095ca1df60bb79Ce92ce3ea74c37c5d359?value=1e18\" }\n```\n\n## 知っておくべきこと\n\n- **この提案は Stagnant（停滞）です。** 参照先の `pay-` ペイロード形式である [ERC-681](/eip-681/) は Final で、同じ `ethereum:` / `pay-` スキームを使います。\n- 古い EIP-67 のパーサーは、プレフィックスを使う URI で失敗する可能性があります。仕様は、これを拡張性の代償として受け入れています。\n- 仕様は `pay` 以外のプレフィックスを登録していません。新しいユースケースには、それぞれ独自の ERC が必要です。\n- URI は信頼できない発信元から届きます。ウォレットは、ユーザーが署名する前にリクエストをデコードして分かりやすく表示すべきです。\n"},"ko":{"lang":"ko","tldr":"일반적인 ethereum: URI 컨테이너를 정의한다. pay- 같은 용도별 접두사를 선택적으로 붙일 수 있어 QR 코드와 링크로 사용자의 지갑을 열 수 있으며, ERC-681 같은 구체적인 형식이 그 위에 얹힌다.","tags":["uri","qr-code","wallet","interoperability","stagnant"],"related":[67,681],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ko/eip-831/","markdown":"## 어떤 문제를 해결하나요?\n\nQR 코드, 웹 페이지, 이메일, 채팅 메시지 속의 URI는 서로 관련 없는 앱들이 사용자의 지갑에 작업을 넘기는 간단한 방법입니다. [EIP-67](/eip-67/)은 `ethereum:` 링크를 도입했지만 이 방식 전체를 트랜잭션 전송이라는 단일 용도에 묶어 버렸습니다.\n\n[ERC-681](/eip-681/)이 결제 요청을 다듬는 동안 저자들은 `ethereum:`을 하나의 목적에 가두지 않는 더 가벼운 **컨테이너**가 필요했습니다. EIP-831이 그 컨테이너를 정의합니다. 각 사용 사례는 자체 접두사와 페이로드를 정의하는 ERC를 갖고, 기존 EIP-67 링크도 계속 동작합니다.\n\n## 어떻게 동작하나요?\n\n문법은 짧습니다.\n\n```\nrequest = \"eth\" [ \"ereum\" ] \":\" [ prefix \"-\" ] payload\nprefix  = STRING\npayload = STRING\n```\n\n- 스킴은 `ethereum:` 또는 짧은 형태인 `eth:`를 쓸 수 있습니다.\n- `prefix`는 사용 사례를 가리키는 이름으로, 예를 들어 `pay`입니다. 생략할 수 있습니다.\n- **접두사가 없으면 `pay-`로 간주합니다.** 이 경우 페이로드는 `0x`로 시작해야 하고, 어떤 접두사도 `0x`로 시작해서는 안 됩니다. 따라서 `0x`로 시작하는 URI는 분명히 접두사가 없는 것이며, EIP-67 방식의 URI도 계속 유효합니다.\n- `payload`는 필수입니다. 그 구조는 EIP-831이 아니라 해당 접두사의 ERC가 정의합니다. [ERC-681](/eip-681/)은 `pay-` 페이로드를 정의하며, 대상 주소 또는 ENS 이름, 선택적 체인 ID, 선택적 함수 이름과 그 매개변수로 이루어집니다.\n\n접두사를 열어 두었기 때문에, 2018년에 존재하던 소수의 용도를 위해 `ethereum:`을 따로 잡아 두지 않고도 새로운 사용 사례로 확장할 수 있습니다.\n\n## 샘플 코드\n\n이 컨테이너에서 유효한 URI:\n\n```text\nethereum:0xfb6916095ca1df60bb79Ce92ce3ea74c37c5d359?value=2.014e18\nethereum:pay-0xfb6916095ca1df60bb79Ce92ce3ea74c37c5d359?value=2.014e18\nethereum:pay-0xfb6916095ca1df60bb79Ce92ce3ea74c37c5d359@1?value=1e16\n```\n\n`pay-`가 기본값이므로 처음 두 개는 같은 뜻입니다.\n\nURI를 접두사와 페이로드로 나누는 작은 파서(TypeScript):\n\n```ts\nfunction parseEthereumUri(uri: string) {\n  const m = /^eth(?:ereum)?:(.+)$/i.exec(uri);\n  if (!m) throw new Error(\"not an ethereum URI\");\n  const rest = m[1];\n  if (rest.startsWith(\"0x\")) return { prefix: \"pay\", payload: rest };\n  const dash = rest.indexOf(\"-\");\n  if (dash \u003c 1) throw new Error(\"missing prefix or payload\");\n  return { prefix: rest.slice(0, dash), payload: rest.slice(dash + 1) };\n}\n\nparseEthereumUri(\"ethereum:pay-0xfb6916095ca1df60bb79Ce92ce3ea74c37c5d359?value=1e18\");\n// { prefix: \"pay\", payload: \"0xfb6916095ca1df60bb79Ce92ce3ea74c37c5d359?value=1e18\" }\n```\n\n## 알아둘 점\n\n- **이 제안은 Stagnant(정체) 상태입니다.** 이 제안이 가리키는 `pay-` 페이로드 형식인 [ERC-681](/eip-681/)은 Final이며 같은 `ethereum:` / `pay-` 방식을 사용합니다.\n- 오래된 EIP-67 파서는 접두사를 쓰는 URI에서 실패할 수 있습니다. 명세는 이를 확장성의 대가로 받아들입니다.\n- 명세는 `pay` 외의 접두사를 등록하지 않습니다. 새로운 사용 사례에는 자체 ERC가 필요합니다.\n- URI는 신뢰할 수 없는 출처에서 옵니다. 지갑은 사용자가 서명하기 전에 요청을 디코딩해 명확하게 보여 줘야 합니다.\n"},"zh":{"lang":"zh","tldr":"定义通用的 ethereum: URI 容器，可带有 pay- 之类的可选用途前缀，使二维码和链接可以唤起用户的钱包；ERC-681 等具体格式在其基础上接入。","tags":["uri","qr-code","wallet","interoperability","stagnant"],"related":[67,681],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/zh/eip-831/","markdown":"## 它解决什么问题？\n\n二维码、网页、电子邮件和聊天消息中的 URI，是让互不相关的应用把任务交给用户钱包的简单方式。[EIP-67](/eip-67/) 引入了 `ethereum:` 链接，但把整个方案绑定在了单一用途上：发送交易。\n\n在 [ERC-681](/eip-681/) 完善支付请求的过程中，它的作者需要一个更轻量的**容器**，不把 `ethereum:` 锁死在某一种用途上。EIP-831 定义的就是这个容器。每种用例都有自己的前缀，以及负责定义载荷的 ERC，已有的 EIP-67 链接仍然可用。\n\n## 它如何运作\n\n语法很简短：\n\n```\nrequest = \"eth\" [ \"ereum\" ] \":\" [ prefix \"-\" ] payload\nprefix  = STRING\npayload = STRING\n```\n\n- scheme 可以是 `ethereum:`，也可以是简写 `eth:`。\n- `prefix` 为用例命名，例如 `pay`，是可选的。\n- **如果没有前缀，则默认为 `pay-`。** 此时载荷必须以 `0x` 开头，而且任何前缀都不得以 `0x` 开头。因此以 `0x` 开头的 URI 显然没有前缀，这使 EIP-67 风格的 URI 依然有效。\n- `payload` 是必需的。它的结构由该前缀对应的 ERC 定义，而不是由 EIP-831 定义。[ERC-681](/eip-681/) 定义了 `pay-` 的载荷：目标地址或 ENS 名称、可选的链 ID、可选的函数名及其参数。\n\n这种开放式的前缀让方案可以扩展到新的用例，而不必把 `ethereum:` 预留给 2018 年存在的少数几种用途。\n\n## 示例代码\n\n此容器下的有效 URI：\n\n```text\nethereum:0xfb6916095ca1df60bb79Ce92ce3ea74c37c5d359?value=2.014e18\nethereum:pay-0xfb6916095ca1df60bb79Ce92ce3ea74c37c5d359?value=2.014e18\nethereum:pay-0xfb6916095ca1df60bb79Ce92ce3ea74c37c5d359@1?value=1e16\n```\n\n前两个含义相同，因为 `pay-` 是默认值。\n\n一个把 URI 拆成前缀和载荷的小解析器（TypeScript）：\n\n```ts\nfunction parseEthereumUri(uri: string) {\n  const m = /^eth(?:ereum)?:(.+)$/i.exec(uri);\n  if (!m) throw new Error(\"not an ethereum URI\");\n  const rest = m[1];\n  if (rest.startsWith(\"0x\")) return { prefix: \"pay\", payload: rest };\n  const dash = rest.indexOf(\"-\");\n  if (dash \u003c 1) throw new Error(\"missing prefix or payload\");\n  return { prefix: rest.slice(0, dash), payload: rest.slice(dash + 1) };\n}\n\nparseEthereumUri(\"ethereum:pay-0xfb6916095ca1df60bb79Ce92ce3ea74c37c5d359?value=1e18\");\n// { prefix: \"pay\", payload: \"0xfb6916095ca1df60bb79Ce92ce3ea74c37c5d359?value=1e18\" }\n```\n\n## 需要注意\n\n- **该提案状态为 Stagnant（停滞）。** 它所指向的 `pay-` 载荷格式 [ERC-681](/eip-681/) 是 Final，并使用同样的 `ethereum:` / `pay-` 方案。\n- 较旧的 EIP-67 解析器遇到带前缀的 URI 可能会失败。规范把这当作可扩展性的代价而接受。\n- 规范除 `pay` 外没有注册任何前缀。新的用例需要有自己的 ERC。\n- URI 来自不可信的来源。钱包应在用户签名之前解码请求并清楚地展示。\n"}},"requiredBy":[5094]}
