Skip to content

[proposal] Non-interactive session request protocol from wallet side #270

@pad01g

Description

@pad01g

Currently, walletconnect is expected to start from dApps side and user will select wallet, then wallet side would decide if it allows access.
However, there are use cases where wallet provider wants to open a specific dApps url link and directly connect to dApps without user's choice of wallet.

For example, I can open Web3Auth web wallet on browser, click a link from the page and connect to Uniswap directly with Web3Auth, without user interaction. User does not need to choose which wallet to use, if Web3Auth already started the wallet request.

This is possible with following steps:

  1. Wallet client generates nonce and unix timestamp.
  2. Wallet client signs json message {"url": "https://app.uniswap.org/#/", "timestamp":"1234567890", "nonce": "5f1be936-bd3e-11ef-8bd1-bf251b0600d0", "address": "0x4321...0987", ... } and generate a signature 0x1234...abcd.
  3. URI-encoded message %7B%22url%22%3A%20%22https%3A%2F%2Fapp.uniswap.org%2F%23%2F%22%2C%20%22timestamp%22%3A%221234567890%22%2C%20%22nonce%22%3A%20%225f1be936-bd3e-11ef-8bd1-bf251b0600d0%22%2C%20%22address%22%3A%20%220x4321...0987%22%20%7D' and signature 0x1234...abcd is set to some url #! fragment of uniswap url with wcurl: prefix: https://app.uniswap.org/#!wcurl:%7B%22url%22%3A%20%22https%3A%2F%2Fapp.uniswap.org%2F%23%2F%22%2C%20%22timestamp%22%3A%221234567890%22%2C%20%22nonce%22%3A%20%225f1be936-bd3e-11ef-8bd1-bf251b0600d0%22%2C%20%22address%22%3A%20%220x4321...0987%22%20%7D+0x1234...abcd
  4. Now uniswap.org can use given message to start session with walletconnect server.
  5. Wallet client can also start session with walletconnect server.
  6. dApps and Wallet can connect via walletconnect protocol.

json message can directly contain walletconnect url or permission information etc.

Thus, I think it is possible to connect with dApps from wallet side using only url like above.
If such specs exist outside of walletconnect, I'd want to know. If it does not exist yet, I think it's best to integrate in walletconnect, as there are no good alternatives as widely used as walletconnect.

Some notes:

  • It should be supported by both wallet and dApps.
  • dApps needs to parse URI in some way or walletconnect library can automatically read URI

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions