rchain-community / rchain-api

An API for rchain dapps to communicate with the blockchain
Other
22 stars 12 forks source link

Ethereum-compatible wallet (WIP) #56

Closed dckc closed 5 years ago

dckc commented 5 years ago

We can use metamask in place of RSign if we make an analog to BasicWallet that uses RLP (recursive length prefix) in place of protobuf to serialize the signed parameters.

I think I have the tedious details prototyped:

https://github.com/dckc/RChain-API/blob/ethWallet/src/rlp.rho

https://github.com/dckc/RChain-API/blob/ethWallet/src/ethSig.rho

ethSig includes findOrCreateWallet, a sort of "hitching post".

cc @JoshOrndorff @cboscolo @edeykholt

depends on some ByteArray methods that didn't quite get into 0.8: https://github.com/rchain/rchain/pull/1968

dckc commented 5 years ago

@edeykholt, @cboscolo and I went over this tonight: wallet Zoom meeting recording

Of note:

metamask doesn't do offline transactions after all: https://github.com/MetaMask/metamask-extension/issues/3475

maybe the thing to build is a proxy that speaks the web3 HTTP/JSON interface (e.g. eth_sendrawtransaction), takes the transactions from metamask and forwards them to RChain.

See also: https://medium.com/metamask/eip712-is-coming-what-to-expect-and-how-to-use-it-bb92fd1a7a26

dckc commented 5 years ago

subsumed by #57