From 22e689adbe02c02f67a735f37cce914913bc5033 Mon Sep 17 00:00:00 2001 From: Fang Date: Thu, 27 Sep 2018 15:38:52 -0700 Subject: [PATCH] Implement functions to get address from Ethereum keys --- sys/zuse.hoon | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/sys/zuse.hoon b/sys/zuse.hoon index 541e3e02a1..e9c0c452ed 100644 --- a/sys/zuse.hoon +++ b/sys/zuse.hoon @@ -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=@]