{"eip":1328,"title":"WalletConnect URI Format","description":"Define URI format for initiating connections between applications and wallets","authors":["ligi (@ligi)","Pedro Gomes (@pedrouid)"],"status":"Final","type":"Standards Track","category":"ERC","created":"2018-08-15","discussionsTo":"https://ethereum-magicians.org/t/wallet-connect-eip/850","repo":"ERCs","label":"ERC-1328","officialUrl":"https://eips.ethereum.org/EIPS/eip-1328","sourceUrl":"https://github.com/ethereum/ERCs/blob/master/ERCS/erc-1328.md","url":"https://eips.huatuo.xyz/eip-1328/","tldr":{"en":"Defines the wc: URI that a dapp shows as a QR code or link so a wallet can open an encrypted WalletConnect session with it.","ja":"dapp が QR コードやリンクとして表示し、ウォレットがそれを開いて暗号化された WalletConnect セッションを確立できるようにする wc: URI を定義する。","ko":"dapp이 QR 코드나 링크로 보여 주면, 지갑이 그것을 열어 암호화된 WalletConnect 세션을 맺을 수 있게 하는 wc: URI를 정의한다.","zh":"定义 wc: URI，dapp 将其显示为二维码或链接，钱包即可据此与它建立加密的 WalletConnect 会话。"},"tags":["walletconnect","uri","wallet","qr-code","connection"],"explainers":{"en":{"lang":"en","tldr":"Defines the wc: URI that a dapp shows as a QR code or link so a wallet can open an encrypted WalletConnect session with it.","tags":["walletconnect","uri","wallet","qr-code","connection"],"related":[681,831,1193],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/eip-1328/","markdown":"## What problem does it solve?\n\nA dapp running in a desktop browser often needs to talk to a wallet on a phone, or to a separate wallet app on the same device. The two sides need a way to find each other and agree on an encryption key before any requests can flow.\n\nWalletConnect solves this by having the dapp display a short URI, usually as a QR code or a deep link. The wallet scans or opens it, joins the same channel, and from then on both sides exchange encrypted messages. ERC-1328 standardizes the format of that URI so any wallet can parse it.\n\nAn earlier alpha version of WalletConnect put JSON in the QR code. Moving to a URI made parsing simpler and lets mobile operating systems route the link to the right app (for example via Android intents).\n\n## How it works\n\nThe syntax is:\n\n```\nwc:\u003ctopic\u003e[@\u003cversion\u003e][?\u003ckey\u003e=\u003cvalue\u003e\u0026...]\n```\n\n- `topic`: identifies the channel both sides will use.\n- `version`: the WalletConnect protocol version. Versioning is part of the format so the protocol can evolve.\n- Parameters depend on the version.\n\n**Version 1:**\n\n| Parameter | Meaning |\n| --- | --- |\n| `key` | Symmetric key used for encryption |\n| `bridge` | URL of the bridge server that relays messages |\n\n**Version 2:**\n\n| Parameter | Meaning |\n| --- | --- |\n| `symKey` | Symmetric key for encrypting messages over the relay |\n| `methods` | JSON-RPC methods supported for the pairing topic |\n| `relay-protocol` | Transport protocol for relaying messages |\n| `relay-data` | Optional transport data |\n| `expiryTimestamp` | Optional Unix time (seconds) when the pairing expires |\n\n## Sample code\n\nShape of a v2 URI (placeholder values):\n\n```\nwc:\u003c64-hex-topic\u003e@2?relay-protocol=irn\u0026symKey=\u003c64-hex-key\u003e\u0026expiryTimestamp=1705934757\n```\n\nParsing one in TypeScript:\n\n```ts\nfunction parseWcUri(uri: string) {\n  const m = uri.match(/^wc:([^@?]+)(?:@(\\d+))?(?:\\?(.*))?$/);\n  if (!m) throw new Error(\"not a WalletConnect URI\");\n  const [, topic, version, query = \"\"] = m;\n  const params = Object.fromEntries(new URLSearchParams(query));\n  return { topic, version: version ? Number(version) : undefined, params };\n}\n\nconst { topic, version, params } = parseWcUri(scannedText);\nif (version === 2) {\n  console.log(topic, params[\"relay-protocol\"], params.expiryTimestamp);\n}\n```\n\nIn real apps you would not parse this yourself: the WalletConnect SDKs generate the URI on the dapp side and consume it on the wallet side.\n\n## Things to know\n\n- **Status: Final.** The URI format itself is stable; the meaning of parameters is tied to the protocol version.\n- The URI carries a symmetric session key, so treat it as short-lived and only show it to the user who is connecting. It does not contain or expose the user's private keys.\n- Version 1 relied on bridge servers and has been retired by WalletConnect; current integrations use version 2.\n- For payment requests rather than session pairing, see the `ethereum:` URI formats in [ERC-681](/eip-681/) and [ERC-831](/eip-831/). Once connected, dapps typically talk to the wallet through an [EIP-1193](/eip-1193/)-style provider.\n"},"ja":{"lang":"ja","tldr":"dapp が QR コードやリンクとして表示し、ウォレットがそれを開いて暗号化された WalletConnect セッションを確立できるようにする wc: URI を定義する。","tags":["walletconnect","uri","wallet","qr-code","connection"],"related":[681,831,1193],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ja/eip-1328/","markdown":"## 何を解決するのか\n\nデスクトップブラウザで動く dapp は、スマートフォン上のウォレットや、同じデバイス上の別のウォレットアプリと通信する必要がよくあります。リクエストをやり取りする前に、双方が互いを見つけ、暗号鍵について合意する方法が必要です。\n\nWalletConnect は、dapp に短い URI を表示させることでこれを解決します。通常は QR コードかディープリンクです。ウォレットがそれをスキャンまたは開いて同じチャネルに参加し、以降は双方が暗号化されたメッセージをやり取りします。ERC-1328 はその URI の形式を標準化し、どのウォレットでも解析できるようにします。\n\nWalletConnect の初期のアルファ版では、QR コードに JSON が入っていました。URI に移行したことで解析が簡単になり、モバイル OS がリンクを適切なアプリに振り分けられるようになりました（たとえば Android のインテント経由）。\n\n## 仕組み\n\n構文は次のとおりです。\n\n```\nwc:\u003ctopic\u003e[@\u003cversion\u003e][?\u003ckey\u003e=\u003cvalue\u003e\u0026...]\n```\n\n- `topic`: 双方が使うチャネルを識別します。\n- `version`: WalletConnect プロトコルのバージョン。プロトコルを進化させられるよう、バージョニングは形式の一部になっています。\n- パラメータはバージョンによって異なります。\n\n**バージョン 1:**\n\n| パラメータ | 意味 |\n| --- | --- |\n| `key` | 暗号化に使う共通鍵 |\n| `bridge` | メッセージを中継するブリッジサーバーの URL |\n\n**バージョン 2:**\n\n| パラメータ | 意味 |\n| --- | --- |\n| `symKey` | リレー経由のメッセージを暗号化するための共通鍵 |\n| `methods` | ペアリングトピックでサポートされる JSON-RPC メソッド |\n| `relay-protocol` | メッセージを中継するトランスポートプロトコル |\n| `relay-data` | 任意のトランスポートデータ |\n| `expiryTimestamp` | ペアリングが失効する Unix 時間（秒）。任意 |\n\n## サンプルコード\n\nv2 URI の形（プレースホルダーの値）:\n\n```\nwc:\u003c64-hex-topic\u003e@2?relay-protocol=irn\u0026symKey=\u003c64-hex-key\u003e\u0026expiryTimestamp=1705934757\n```\n\nTypeScript で解析する例:\n\n```ts\nfunction parseWcUri(uri: string) {\n  const m = uri.match(/^wc:([^@?]+)(?:@(\\d+))?(?:\\?(.*))?$/);\n  if (!m) throw new Error(\"not a WalletConnect URI\");\n  const [, topic, version, query = \"\"] = m;\n  const params = Object.fromEntries(new URLSearchParams(query));\n  return { topic, version: version ? Number(version) : undefined, params };\n}\n\nconst { topic, version, params } = parseWcUri(scannedText);\nif (version === 2) {\n  console.log(topic, params[\"relay-protocol\"], params.expiryTimestamp);\n}\n```\n\n実際のアプリでは、自分でこれを解析することはありません。WalletConnect の SDK が、dapp 側で URI を生成し、ウォレット側でそれを処理します。\n\n## 知っておくべきこと\n\n- **ステータス: Final。** URI 形式自体は安定しています。パラメータの意味はプロトコルのバージョンに結び付いています。\n- URI にはセッションの共通鍵が含まれているため、短命のものとして扱い、接続しようとしているユーザーにだけ表示してください。ユーザーの秘密鍵が含まれたり、露出したりすることはありません。\n- バージョン 1 はブリッジサーバーに依存しており、WalletConnect によって廃止されました。現在の連携はバージョン 2 を使っています。\n- セッションのペアリングではなく支払いリクエストについては、[ERC-681](/eip-681/) と [ERC-831](/eip-831/) の `ethereum:` URI 形式を参照してください。接続後、dapp は通常、[EIP-1193](/eip-1193/) 形式のプロバイダー経由でウォレットと通信します。\n"},"ko":{"lang":"ko","tldr":"dapp이 QR 코드나 링크로 보여 주면, 지갑이 그것을 열어 암호화된 WalletConnect 세션을 맺을 수 있게 하는 wc: URI를 정의한다.","tags":["walletconnect","uri","wallet","qr-code","connection"],"related":[681,831,1193],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ko/eip-1328/","markdown":"## 어떤 문제를 해결하나요?\n\n데스크톱 브라우저에서 실행되는 dapp은 스마트폰의 지갑이나 같은 기기의 별도 지갑 앱과 통신해야 하는 경우가 많습니다. 요청이 오가기 전에 양쪽이 서로를 찾고 암호화 키에 합의할 방법이 필요합니다.\n\nWalletConnect는 dapp이 짧은 URI를 보여 주도록 해서 이 문제를 해결합니다. 보통은 QR 코드나 딥 링크입니다. 지갑이 이를 스캔하거나 열어 같은 채널에 참여하고, 그 이후로 양쪽이 암호화된 메시지를 주고받습니다. ERC-1328은 그 URI의 형식을 표준화해서 어떤 지갑이든 파싱할 수 있게 합니다.\n\nWalletConnect의 초기 알파 버전은 QR 코드에 JSON을 넣었습니다. URI로 옮겨 가면서 파싱이 더 간단해졌고, 모바일 운영체제가 링크를 올바른 앱으로 연결해 줄 수 있게 되었습니다(예: Android 인텐트를 통해).\n\n## 어떻게 동작하나요?\n\n구문은 다음과 같습니다.\n\n```\nwc:\u003ctopic\u003e[@\u003cversion\u003e][?\u003ckey\u003e=\u003cvalue\u003e\u0026...]\n```\n\n- `topic`: 양쪽이 사용할 채널을 식별합니다.\n- `version`: WalletConnect 프로토콜 버전. 프로토콜이 발전할 수 있도록 버전 관리가 형식의 일부입니다.\n- 파라미터는 버전에 따라 다릅니다.\n\n**버전 1:**\n\n| 파라미터 | 의미 |\n| --- | --- |\n| `key` | 암호화에 사용하는 대칭 키 |\n| `bridge` | 메시지를 중계하는 브리지 서버의 URL |\n\n**버전 2:**\n\n| 파라미터 | 의미 |\n| --- | --- |\n| `symKey` | 릴레이를 통한 메시지를 암호화하기 위한 대칭 키 |\n| `methods` | 페어링 토픽에서 지원하는 JSON-RPC 메서드 |\n| `relay-protocol` | 메시지를 중계하는 전송 프로토콜 |\n| `relay-data` | 선택적 전송 데이터 |\n| `expiryTimestamp` | 페어링이 만료되는 Unix 시간(초), 선택 사항 |\n\n## 샘플 코드\n\nv2 URI의 형태(자리 표시자 값):\n\n```\nwc:\u003c64-hex-topic\u003e@2?relay-protocol=irn\u0026symKey=\u003c64-hex-key\u003e\u0026expiryTimestamp=1705934757\n```\n\nTypeScript로 파싱하는 예:\n\n```ts\nfunction parseWcUri(uri: string) {\n  const m = uri.match(/^wc:([^@?]+)(?:@(\\d+))?(?:\\?(.*))?$/);\n  if (!m) throw new Error(\"not a WalletConnect URI\");\n  const [, topic, version, query = \"\"] = m;\n  const params = Object.fromEntries(new URLSearchParams(query));\n  return { topic, version: version ? Number(version) : undefined, params };\n}\n\nconst { topic, version, params } = parseWcUri(scannedText);\nif (version === 2) {\n  console.log(topic, params[\"relay-protocol\"], params.expiryTimestamp);\n}\n```\n\n실제 앱에서는 이것을 직접 파싱하지 않습니다. WalletConnect SDK가 dapp 쪽에서 URI를 생성하고 지갑 쪽에서 이를 처리합니다.\n\n## 알아둘 점\n\n- **상태: Final.** URI 형식 자체는 안정적이며, 파라미터의 의미는 프로토콜 버전에 묶여 있습니다.\n- URI에는 대칭 세션 키가 담겨 있으므로 수명이 짧은 것으로 취급하고, 연결하려는 사용자에게만 보여 주세요. 사용자의 개인 키를 포함하거나 노출하지는 않습니다.\n- 버전 1은 브리지 서버에 의존했으며 WalletConnect에 의해 폐기되었습니다. 현재의 연동은 버전 2를 사용합니다.\n- 세션 페어링이 아니라 결제 요청에 대해서는 [ERC-681](/eip-681/)과 [ERC-831](/eip-831/)의 `ethereum:` URI 형식을 참고하세요. 연결된 후 dapp은 보통 [EIP-1193](/eip-1193/) 스타일의 프로바이더를 통해 지갑과 통신합니다.\n"},"zh":{"lang":"zh","tldr":"定义 wc: URI，dapp 将其显示为二维码或链接，钱包即可据此与它建立加密的 WalletConnect 会话。","tags":["walletconnect","uri","wallet","qr-code","connection"],"related":[681,831,1193],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/zh/eip-1328/","markdown":"## 它解决什么问题？\n\n运行在桌面浏览器中的 dapp 常常需要与手机上的钱包，或同一设备上的另一个钱包应用通信。在任何请求能够传递之前，双方需要一种方式来找到彼此并就加密密钥达成一致。\n\nWalletConnect 通过让 dapp 显示一个简短的 URI 来解决这个问题，通常是二维码或深度链接。钱包扫描或打开它，加入同一个通道，此后双方交换加密消息。ERC-1328 标准化了该 URI 的格式，使任何钱包都能解析它。\n\nWalletConnect 早期的 alpha 版本把 JSON 放进二维码。改用 URI 使解析更简单，也让移动操作系统可以把链接路由到正确的应用（例如通过 Android intent）。\n\n## 它如何运作\n\n语法为：\n\n```\nwc:\u003ctopic\u003e[@\u003cversion\u003e][?\u003ckey\u003e=\u003cvalue\u003e\u0026...]\n```\n\n- `topic`：标识双方将使用的通道。\n- `version`：WalletConnect 协议版本。版本号是格式的一部分，以便协议可以演进。\n- 参数取决于版本。\n\n**版本 1：**\n\n| 参数 | 含义 |\n| --- | --- |\n| `key` | 用于加密的对称密钥 |\n| `bridge` | 中继消息的桥接服务器 URL |\n\n**版本 2：**\n\n| 参数 | 含义 |\n| --- | --- |\n| `symKey` | 用于加密经中继传输的消息的对称密钥 |\n| `methods` | 配对主题所支持的 JSON-RPC 方法 |\n| `relay-protocol` | 用于中继消息的传输协议 |\n| `relay-data` | 可选的传输数据 |\n| `expiryTimestamp` | 可选的配对过期 Unix 时间（秒） |\n\n## 示例代码\n\nv2 URI 的形式（占位值）：\n\n```\nwc:\u003c64-hex-topic\u003e@2?relay-protocol=irn\u0026symKey=\u003c64-hex-key\u003e\u0026expiryTimestamp=1705934757\n```\n\n用 TypeScript 解析：\n\n```ts\nfunction parseWcUri(uri: string) {\n  const m = uri.match(/^wc:([^@?]+)(?:@(\\d+))?(?:\\?(.*))?$/);\n  if (!m) throw new Error(\"not a WalletConnect URI\");\n  const [, topic, version, query = \"\"] = m;\n  const params = Object.fromEntries(new URLSearchParams(query));\n  return { topic, version: version ? Number(version) : undefined, params };\n}\n\nconst { topic, version, params } = parseWcUri(scannedText);\nif (version === 2) {\n  console.log(topic, params[\"relay-protocol\"], params.expiryTimestamp);\n}\n```\n\n在实际应用中你不会自己解析它：WalletConnect SDK 在 dapp 端生成该 URI，并在钱包端处理它。\n\n## 需要注意\n\n- **状态：Final。** URI 格式本身是稳定的；参数的含义与协议版本绑定。\n- URI 中携带对称会话密钥，因此应将其视为短期有效，并且只向正在连接的用户显示。它不包含也不会暴露用户的私钥。\n- 版本 1 依赖桥接服务器，已被 WalletConnect 淘汰；当前的集成使用版本 2。\n- 对于支付请求而不是会话配对，请参阅 [ERC-681](/eip-681/) 和 [ERC-831](/eip-831/) 中的 `ethereum:` URI 格式。连接之后，dapp 通常通过 [EIP-1193](/eip-1193/) 风格的提供者与钱包通信。\n"}},"requiredBy":[4361]}
