Implement functions to get address from Ethereum keys

This commit is contained in:
Fang 2018-09-27 15:38:52 -07:00
parent 6d89026468
commit 22e689adbe

View File

@ -7283,6 +7283,21 @@
=, mimes:html
=, ethe
|%
++ address-from-pub
=, keccak:crypto
|= pub=@
(end 3 20 (keccak-256 64 pub))
::
++ address-from-prv
(cork pub-from-prv address-from-pub)
::
++ pub-from-prv
=, secp256k1:secp:crypto
|= prv=@
%^ rev 3 64
%- serialize-point
(priv-to-pub prv)
::
++ sign-transaction
=, crypto
|= [tx=transaction pk=@]