clean up pokes to wallet-hook

This commit is contained in:
timlucmiptev 2021-02-09 14:25:38 +04:00 committed by ixv
parent 55473c7e18
commit 394e1a2845
3 changed files with 13 additions and 8 deletions

View File

@ -106,7 +106,7 @@
(get-id:txu:btc tx-data)
::
++ get-rawtx
(encode:txu:btc tx-data)
(basic-encode:txu:btc tx-data)
:: +add-output: append output (usually change) to txos
::
++ add-output

View File

@ -110,7 +110,7 @@
:_ (drop:byt (add 1 len) h)
%- flip:byt
(take:byt (bex len) (drop:byt 1 h))
:: +dea: return atom instead of hexb for parsed CompactSize
:: +dea: atom instead of hexb for parsed CompactSize
::
++ dea
|= h=hexb

View File

@ -30,26 +30,31 @@
:: - vout-n is the index of the output that has value
::
+$ action
$% settings
$% api
local
peer
==
+$ settings
+$ api
$% [%set-provider provider=ship =network]
[%set-default-wallet ~]
[%clear-poym ~]
[%force-retry ~]
==
+$ local
$% [%req-pay-address payee=ship value=sats feyb=(unit sats)]
[%req-pay-address payee=ship value=sats feyb=(unit sats)]
[%broadcast-tx txhex=cord]
[%add-piym =xpub =address payer=ship value=sats]
==
:: local and peer pokes are initiated by the agent itself
:: they exist to make the state machine explicit
:: they are not part of the API
::
+$ local
$% [%add-piym =xpub =address payer=ship value=sats]
[%add-poym =txbu:bws]
[%add-poym-txi txid=hexb rawtx=hexb]
[%close-pym ti=info:tx]
[%fail-broadcast-tx txid=hexb]
[%succeed-broadcast-tx txid=hexb]
==
::
+$ peer
$% [%gen-pay-address value=sats]
[%ret-pay-address =address payer=ship value=sats]