new wallet-hook types

This commit is contained in:
timlucmiptev 2020-11-16 19:47:00 +02:00 committed by ixv
parent 752d014ed2
commit ecd1dcb7a4
3 changed files with 18 additions and 3 deletions

View File

@ -109,6 +109,9 @@
:~ [%pass /set-provider %agent [host.u.provider %btc-provider] %leave ~] :~ [%pass /set-provider %agent [host.u.provider %btc-provider] %leave ~]
sub-card sub-card
== ==
::
%pay
`state
:: ::
%force-retry %force-retry
[(retry pend) state] [(retry pend) state]

View File

@ -2,11 +2,25 @@
|% |%
:: req-id: hash of [xpub chyg idx] :: req-id: hash of [xpub chyg idx]
:: back: lookup table of req-id -> requests from wallet-store :: back: lookup table of req-id -> requests from wallet-store
:: piym: incoming payments
:: poym: outgoing payments
:: piym-watch/poym-watch:
:: let us link an address back to its incoming/outgoing payment
:: ::
+$ back (map req-id:bp request:bws)
+$ btc-state [blockcount=@ud fee=sats t=@da] +$ btc-state [blockcount=@ud fee=sats t=@da]
+$ back (map req-id:bp request:bws)
+$ payment [=address payer=ship amount=sats]
+$ key [=bipt =chyg:bws =idx:bws]
+$ txin [=utxo raw-tx=byts =key]
::
+$ piym (jar ship payment)
+$ poym (jar ship txin)
+$ piym-watch (map address ship)
+$ poym-watch (map address ship)
::
+$ action +$ action
$% [%set-provider provider=ship] $% [%set-provider provider=ship]
[%pay payee=ship amount=sats]
[%force-retry ~] [%force-retry ~]
== ==
-- --

View File

@ -2,8 +2,6 @@
:: m / purpose' / coin_type' / account' / change / address_index :: m / purpose' / coin_type' / account' / change / address_index
:: change can be 0 or 1 :: change can be 0 or 1
:: ::
:: TODO: explain state tracking (used maps, next unused idx)
::
/- *btc /- *btc
/+ bip32 /+ bip32
|% |%