ETHPay : Apple pay for ETH

in #android6 years ago
---
eip: <to be assigned>
title: Standardized AppLink for signing ETH Transactions using an installed wallet on mobile
author: Madhavan Malolan (@madhavanmalolan)
status: Draft
type: Interface
created: 2018-08-29
---

Simple Summary

Proposing standardizing the ethpay:// URI (AppLink) so that native app developers can invoke user's wallets to sign transactions.

Abstract

Proposing a simple mechanism that will allow developers to build DApps as native apps without having to maintain the users' wallets/private keys. DApps today are built primarily on the web because of the access to Web3 injections, but the user experience is lacking. Native apps provide a much richer experience. A MetaMask equivalent for native apps will help the developer community a long way.

Motivation

App developers today need to maintain the private keys and keep pace with the changes happening on the Web3 libraries. A large majority of people have some ethereum Wallet installed on their phone which already maintains their keys and accounts. Why should every app developer have to re-invent the wheel by building the entire wallet stack into their app? By having a standardised AppLink app developers can leverage the existance of other ethereum wallets on the user's phone to sign and send transactions.

Specification

The AppLink will be an URI of scheme ethpay://

Possible actions

  • sign : The wallet signs the data sent to it and redirects to a URI also specified in the request with the signature as a query parameter
  • sendSignedTransaction : The wallet signs a transaction and sends it to an Ethereum Node

Allowed parameters

  • action : may be one of sign or sendSignedTransaction
  • to : An Ethereum Address to which the transaction is to be sent. Required if action is sendSignedTransaction
  • value : Integral value of number of Wei to include in the transaction. Optional.
  • data : Data that needs to be signed. If action is sendSignedTransaction this should be hex encoded. Required if type is sign
  • gas : Amount of gas to be used in the transaction. Required if action is sendSignedTransaction
  • gasPrice : Gas price for the transaction. Optional. If not provided for action sendSignedTransaction, current gas price will be used.
  • redirectUri : The URI to which the wallet should redirect with signature after signing. Used only for action sign.

Rationale

The URI based AppLinks will allow app developers to request signing of transactions without needing to use any external library.
The users will not have to trust the app developer with their private keys, since it is maintained by a separate wallet app they already use.

Implementation

A rough implementation of this protocol has been done using Web3 1.0.0-beta on a React Native app. It uses Infura as an Ethereum node.

The implementation handles App Links and a basic implementation of an ETH wallet.

You can find the app's implementation here

Join the discussion

Join the discussion on GitHub

Copyright

Copyright and related rights waived via CC0.

Sort:  

You have a minor misspelling in the following sentence:

By having a standardised AppLink app developers can leverage the existance of other ethereum wallets on the user's phone to sign and send transactions.
It should be existence instead of existance.

Congratulations @madhavanmalolan! You have completed the following achievement on Steemit and have been rewarded with new badge(s) :

You made your First Vote

Click on the badge to view your Board of Honor.
If you no longer want to receive notifications, reply to this comment with the word STOP

Do you like SteemitBoard's project? Then Vote for its witness and get one more award!

Congratulations @madhavanmalolan! You received a personal award!

Happy Birthday! - You are on the Steem blockchain for 1 year!

You can view your badges on your Steem Board and compare to others on the Steem Ranking

Do not miss the last post from @steemitboard:

New japanese speaking community Steem Meetup badge
Vote for @Steemitboard as a witness to get one more award and increased upvotes!

Coin Marketplace

STEEM 0.19
TRX 0.15
JST 0.029
BTC 63592.23
ETH 2551.58
USDT 1.00
SBD 2.75