pokt-network / wallet

A simple web wallet to handle your Pocket Network accounts.
wallet-three-orpin.vercel.app
MIT License
8 stars 14 forks source link

Creating a standard for QR Codes #334

Open nodiesBlade opened 2 years ago

nodiesBlade commented 2 years ago

Is your feature request related to a problem? Please describe. My team is currently creating a mobile wallet that will send/receive transactions through QR code scanning. Given that there are very few wallets to use right now, I couldn't find a standard that was adopted yet in Pocket.

Describe the solution you'd like The goal of the feature request is to define a standard that will be adopted across multiple wallets as Pocket continues to grow. I would like to aim for this standard to be cross compatible with v1.0

Instead of reinventing the wheel, I propose we define a format derived from BIP-0021 and ERC-67

Optional Parameters:

Examples

Address
pocket:<address>

Address with Memo
pocket:<address>?memo=<value>

Address with Address, Memo, and Amount
pocket:<address>?memo=<value>&amount=<value2>

Address with Address, Memo, Amount, Fee
pocket:<address>?memo=<value>&amount=<value2>&fee=<value3>

Describe alternatives you've considered Open to ideas

Additional context There's been QR code mishaps in other platforms (wallets and crypto exchanges) that has resulted in users losing funds. This all stems back from standard inconsistencies and different formats that apps adopt. The sooner we define this, the better.

nodiesBlade commented 2 years ago

Once a standard is defined, I'll create a PR to add QR code functionality to pocketjs/web wallet. (Could be useful for users who are using using the web wallet on mobile)