mirror of
https://github.com/urbit/shrub.git
synced 2024-12-19 00:13:12 +03:00
Merge branch 'pr' into philip/tomb
This commit is contained in:
commit
98808a5f19
@ -948,6 +948,21 @@
|
||||
%- prefix-hex
|
||||
(render-hex-bytes 20 `@`a)
|
||||
::
|
||||
++ address-to-checksum
|
||||
|= =address
|
||||
^- tape
|
||||
=/ hexed (render-hex-bytes 20 `@`a)
|
||||
=/ hash (keccak-256:keccak:crypto (as-octs:mimes:html (crip hexed)))
|
||||
=| ret=tape
|
||||
=/ pos 63
|
||||
|-
|
||||
?~ hexed (prefix-hex (flop ret))
|
||||
=/ char i.hexed
|
||||
?: (lth char 58) $(pos (dec pos), ret [char ret], hexed t.hexed)
|
||||
=/ nib (cut 2 [pos 1] hash)
|
||||
?: (lth 7 nib) $(pos (dec pos), ret [(sub char 32) ret], hexed t.hexed)
|
||||
$(pos (dec pos), ret [char ret], hexed t.hexed)
|
||||
::
|
||||
++ transaction-to-hex
|
||||
|= h=@
|
||||
^- tape
|
||||
|
Loading…
Reference in New Issue
Block a user