Add new function to decode a Transparent Address in HRF #59

Merged
pitmutt merged 4 commits from rvv040 into dev040 2024-04-14 14:27:19 +00:00
Showing only changes of commit 15b2f98f1d - Show all commits

View file

@ -125,20 +125,20 @@ decodeTransparentAddress taddress = do
189 ->
Just $
TransparentAddress MainNet $
TransparentReceiver P2SH (fromRawBytes digest)
TransparentReceiver P2SH (fromRawBytes transparentReceiver)
186 ->
Just $
TransparentAddress TestNet $
TransparentReceiver P2SH (fromRawBytes digest)
TransparentReceiver P2SH (fromRawBytes transparentReceiver)
184 ->
Just $
TransparentAddress MainNet $
TransparentReceiver P2PKH (fromRawBytes digest)
TransparentReceiver P2PKH (fromRawBytes transparentReceiver)
_ -> Nothing
29 ->
if sb == 37
then Just $
TransparentAddress TestNet $
TransparentReceiver P2PKH (fromRawBytes digest)
TransparentReceiver P2PKH (fromRawBytes transparentReceiver)
else Nothing
_ -> Nothing