mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-12 15:01:38 +03:00
psbt skeleton
This commit is contained in:
parent
8340905b30
commit
f8eaa347c5
28
lib/btc.hoon
28
lib/btc.hoon
@ -67,6 +67,34 @@
|
||||
::
|
||||
++ psbt
|
||||
|%
|
||||
++ en
|
||||
|%
|
||||
++ globals
|
||||
|= =rawtx
|
||||
^- map:^psbt
|
||||
*map:^psbt
|
||||
++ inputs
|
||||
|= (list in:^psbt)
|
||||
^- map:^psbt
|
||||
*map:^psbt
|
||||
++ outputs
|
||||
|= (list out:^psbt)
|
||||
^- map:^psbt
|
||||
*map:^psbt
|
||||
--
|
||||
:: +encode: make base64 cord of PSBT
|
||||
::
|
||||
++ encode
|
||||
|= [=rawtx =txid inputs=(list in:^psbt) outputs=(list out:^psbt)]
|
||||
^- cord
|
||||
:: TODO
|
||||
:: make global map
|
||||
:: raw tx hex
|
||||
:: turn each input and output into a map (or ~)
|
||||
:: put the 0x0 separator between all
|
||||
:: parse to hex
|
||||
:: encode as base64!
|
||||
*cord
|
||||
:: +create: make base64 cord of PSBT
|
||||
::
|
||||
++ create
|
||||
|
Loading…
Reference in New Issue
Block a user