rchain-community / rchain-api

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

toward payment transaction support (WIP) #51

Closed dckc closed 5 years ago

dckc commented 5 years ago

testPay.js seems to work in the one case now (rev 8758357 ).

It's not pretty; I don't yet count it as an example for documentation purposes.

The biggest wart: I don't see how Alice can look up Bob's wallet from his public key (let alone his address, which is a hash of it). The way I got this working is: Alice creates an empty wallet for Bob using his public key and registers the wallet and, presumably, communicates the URI to Bob.

I tripped over lots of smaller issues; for example, if you pass the signature as bytes rather than hex, you don't get a "signature failed" diagnostic; you just get no reply.

See also https://rchain.atlassian.net/browse/CORE-1466

dckc commented 5 years ago

The code is better organized now; I might not be embarrassed to use this as documentation.

example log output: https://gist.github.com/dckc/11e3c33fe01192d3b11b0519d38da18f

dckc commented 5 years ago

We had a good review a couple nights ago:

@JoshOrndorff showed it to a wider audience:

dckc commented 5 years ago

oops; I should start a separate branch for this rlp and ethSig stuff

dckc commented 5 years ago

subsumed by #57