Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resurrect EIP-1328 #4416

Merged
merged 16 commits into from
Jul 18, 2022
36 changes: 25 additions & 11 deletions EIPS/eip-1328.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,18 @@
---
eip: 1328
title: WalletConnect Standard URI Format
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
title: WalletConnect Standard URI Format
title: WalletConnect URI Format

author: ligi <ligi@ligi.de>, Pedro Gomes <pedrouid@protonmail.com>
author: ligi <@ligi>, Pedro Gomes <@pedrouid>
type: Standards Track
category: ERC
status: Stagnant
status: Draft
created: 2018-08-15
discussions-to: https://ethereum-magicians.org/t/wallet-connect-eip/850
description: Standard for WalletConnect URIs
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
eip: 1328
title: WalletConnect Standard URI Format
author: ligi <ligi@ligi.de>, Pedro Gomes <pedrouid@protonmail.com>
author: ligi <@ligi>, Pedro Gomes <@pedrouid>
type: Standards Track
category: ERC
status: Stagnant
status: Draft
created: 2018-08-15
discussions-to: https://ethereum-magicians.org/t/wallet-connect-eip/850
description: Standard for WalletConnect URIs
eip: 1328
title: WalletConnect Standard URI Format
description: Standard for WalletConnect URIs
author: ligi (@ligi), Pedro Gomes (@pedrouid)
discussions-to: https://ethereum-magicians.org/t/wallet-connect-eip/850
status: Draft
type: Standards Track
category: ERC
created: 2018-08-15

Fixes field ordering to align with https://raw.githubusercontent.com/ethereum/EIPs/master/eip-template.md.

Also fixes () for GitHub username, <> is for email.

---

## Simple Summary

A standard to create WalletConnect URIs to initiate connections between applications and wallets.

## Abstract

This standard defines how the data to connect some application and a wallet can be encoded with a URI. This URI can then be shown either as a QR code or for mobile to mobile as a link.
This standard defines how the data to connect some application and a wallet can be encoded with a URI. This URI can then be shown either as a QR code or as a link.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pedrouid do we perhaps want to remove "This URI can then be shown either as a QR code or as a link." - think it adds no value and restricts us without a need. e.g. how does the "copy" fall in place there.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel like this is already addressed when "link" is mentioned since it's a common pattern to include copy to clipboard for website links as well


## Specification

Expand All @@ -28,26 +25,43 @@ WalletConnect request URI with the following parameters:
version = 1*DIGIT
parameters = parameter *( "&" parameter )
parameter = key "=" value
key = "bridge" / "key"
key = STRING
value = STRING

### Semantics

Required parameters are dependent on the Walletconnect protocol version which currently includes the `key`, hex string of symmetric key, and `bridge`, encoded url of the bridge used for establishing the connection.
Required parameters are dependent on the Walletconnect protocol version:

For WalletConnect v1.0 protocol (`version`=`1`) the required parameters are:
- `key` - symmetric key used for encryption
- `bridge` - url of the bridge server for relaying messages

For WalletConnect v2.0 protocol (`version`=`2`) the required parameters are:
- `publicKey` - public key used for DH key exchange
- `relay` - transport protocol data for relaying messages


### Example

```
# 1.0
wc:8a5e5bdc-a0e4-4702-ba63-8f1a5655744f@1?bridge=https%3A%2F%2Fbridge.walletconnect.org&key=41791102999c339c844880b23950704cc43aa840f3739e365323cda4dfa89e7a

# 2.0
wc:7f6e504bfad60b485450578e05678ed3e8e8c4751d3c6160be17160d63ec90f9@2?publicKey=587d5484ce2a2a6ee3ba1962fdd7e8588e06200c46823bd18fbd67def96ad303&relay=%7B%22protocol%22%3A%22waku%22%7D
```

## Rationale

The need for this ERC stems from the discussion to move away from JSON format used in the alpha version of the WalletConnect protocol which makes for very inneficient parsing of the intent of the QR code, making it easier to create better QR code parsers APIs for Wallets to implement. Also by using a URI instead of a JSON inside the QR-Code the Android Intent system can be leveraged.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This "Rationale" section reads more like it should belong in the "Motivation" section.

"Motivation" explains why the EIP as a whole needs to exist, while "Rationale" should explain individual choices made in the EIP itself.


## References
## Backwards Compatibility

Versioning is required as part of the syntax for this URI specification to allow the WalletConnect protocol to evolve and allow backwards-compatibility whenever a new version is introduced.

## Security Considerations

1. WalletConnect Technical Specification, https://docs.walletconnect.org/tech-spec
URIs should be shared between user devices or applications and no sensitive data is shared within the URI that could compromise the communication or would allow control of the user's private keys.

## Copyright

Expand Down