psbt almost there

This commit is contained in:
timlucmiptev 2020-12-10 18:15:25 +02:00 committed by ixv
parent 83167a93d1
commit d62dfcd34f
2 changed files with 6 additions and 4 deletions

View File

@ -57,8 +57,7 @@
:: - all inputs have an associated rawtx
::
++ to-psbt
^- (unit (list bytc))
:: ^- (unit base64:psbt:btc)
^- (unit base64:psbt:btc)
?~ txinfo.t ~
=/ ins=(list in:psbt:btc)
%+ murn txis.t

View File

@ -133,8 +133,8 @@
::
++ encode
|= [=rawtx =txid inputs=(list in:psbt) outputs=(list out:psbt)]
:: ^- cord
^- (list bytc)
^- base64:psbt
:: TODO: make sure the base64 is in the right order
=/ final=(list (unit bytc))
%+ join `(unit bytc)`[~ 1^0x0]
%+ turn
@ -144,6 +144,9 @@
(turn outputs output:en)
==
map-byts:en
%- en:base64:mimes:html
%- cat:byt
%+ weld ~[[5 0x70.7362.74ff]]
(murn final same)
::
++ parse