MetaMask / MetaMask/metamask-deeplinks

Add Custom hexData Field to Payment Deep Linking Scheme

Open
#27 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
34
Forks
16
PR merge metrics
No merged PRs in 30d

Description

Hello MetaMask Team,

I would like to suggest an enhancement to the current deep linking functionality for payment links. Currently, the deep link supports parameters for network, recipient address, and value, as shown in the example below:

_https://metamask.app.link/send/pay-${address}@97?value=${amount}e18_

This functionality is excellent and great for simple payment use cases, but it lacks the ability to include custom hexData. Adding a hexData parameter to the URL would enable use cases such as:

**Interactions with smart contracts.**
**Encoding metadata or additional instructions alongside the payment.**
**If the sender is 'buying' a product, he or she may specify at least the name of the product/item.**

Proposed Enhancement:
Allow a hexData parameter to be appended to the payment URL. Example:

https://metamask.app.link/send/pay-${address}@97?value=${amount}e18&hexData=0x50726f64756374
In this scenario, `hexData=0x50726f64756374` represents the text "Product" encoded in hexadecimal.

hexData would populate the data field of the transaction.
This would not affect users who do not utilize the parameter, ensuring backward compatibility.

Benefits:
Enables more advanced use cases directly from deep links.
Simplifies the integration process for developers.
Enhances user experience by reducing dependency on custom dApps for basic interactions with contracts or metadata.

I believe this feature would provide significant value to the developer community and expand the range of use cases for MetaMask's deep linking functionality.

Thank you for considering this suggestion! Please let me know if I can provide additional details or examples to support this request.

Best regards,
Mayckon

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the payment deep-link parameter handling in this repository and inspect how generated URLs become transaction requests. Confirm how an optional hexData value should be parsed and passed through, then verify that existing links remain unchanged and that the example value populates the transaction data field.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
mobile-dev
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
32/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.