mirror of
https://github.com/urbit/shrub.git
synced 2024-12-23 19:05:48 +03:00
support unit for meta payment info
This commit is contained in:
parent
663aacbc23
commit
df5107a4a8
@ -182,6 +182,7 @@
|
|||||||
++ send-status
|
++ send-status
|
||||||
|= =status ^- card
|
|= =status ^- card
|
||||||
[%give %fact ~[/clients] %btc-provider-status !>(status)]
|
[%give %fact ~[/clients] %btc-provider-status !>(status)]
|
||||||
|
::
|
||||||
++ send-update
|
++ send-update
|
||||||
|= =update
|
|= =update
|
||||||
^- card
|
^- card
|
||||||
|
@ -136,14 +136,12 @@
|
|||||||
?. =(payee.act our.bowl)
|
?. =(payee.act our.bowl)
|
||||||
~[(poke-wallet-hook payee.act act)]
|
~[(poke-wallet-hook payee.act act)]
|
||||||
?~ def-wallet ~|("btc-wallet-hook: no def-wallet set" !!)
|
?~ def-wallet ~|("btc-wallet-hook: no def-wallet set" !!)
|
||||||
:~ %+ poke-wallet-store /[(scot %p src.bowl)]/[(scot %ud value.act)]
|
~[(poke-wallet-store / [%generate-address u.def-wallet %0 `[src.bowl value.act]])]
|
||||||
[%generate-address u.def-wallet %0]
|
|
||||||
==
|
|
||||||
::
|
::
|
||||||
%pay-address
|
%pay-address
|
||||||
:: TODO: update poym
|
:: TODO: update poym
|
||||||
:: send tx request out for poym
|
:: send tx request out for poym
|
||||||
:: TODO: ask wallet to generate tbxu for poym
|
:: TODO: ask wallet to generate txbu for poym
|
||||||
`state
|
`state
|
||||||
::
|
::
|
||||||
%force-retry
|
%force-retry
|
||||||
@ -203,12 +201,14 @@
|
|||||||
^- (quip card _state)
|
^- (quip card _state)
|
||||||
?- -.upd
|
?- -.upd
|
||||||
%generate-address
|
%generate-address
|
||||||
?> ?=([@ @ @ *] wire)
|
:: TODO if there's meta, add to piym
|
||||||
=/ value=sats (slav %ud +<.wire)
|
|
||||||
=/ payer=ship (slav %p -.wire)
|
|
||||||
:: moons go in a jar with parent as the key
|
:: moons go in a jar with parent as the key
|
||||||
:: this will let me implement moon rate-limiting
|
:: this will let me implement moon rate-limiting
|
||||||
::
|
::
|
||||||
|
?~ meta.upd
|
||||||
|
~& > address.upd
|
||||||
|
`state
|
||||||
|
=/ [payer=ship value=sats] u.meta.upd
|
||||||
=/ fam=ship
|
=/ fam=ship
|
||||||
?: =(%earl (clan:title payer))
|
?: =(%earl (clan:title payer))
|
||||||
(sein:title our.bowl now.bowl payer)
|
(sein:title our.bowl now.bowl payer)
|
||||||
|
@ -119,7 +119,7 @@
|
|||||||
=/ [a=address:btc w=walt]
|
=/ [a=address:btc w=walt]
|
||||||
~(gen-address wad u.uw chyg.act)
|
~(gen-address wad u.uw chyg.act)
|
||||||
:_ state(walts (~(put by walts) xpub.act w))
|
:_ state(walts (~(put by walts) xpub.act w))
|
||||||
~[[%give %fact ~[/updates] %btc-wallet-store-update !>([%generate-address a])]]
|
~[(send-update [%generate-address a meta.act])]
|
||||||
==
|
==
|
||||||
:: wallet scan algorithm:
|
:: wallet scan algorithm:
|
||||||
:: Initiate a batch for each chyg, with max-gap idxs in it
|
:: Initiate a batch for each chyg, with max-gap idxs in it
|
||||||
@ -258,4 +258,8 @@
|
|||||||
|=(=utxo:btc value.utxo)
|
|=(=utxo:btc value.utxo)
|
||||||
add
|
add
|
||||||
(roll values add)
|
(roll values add)
|
||||||
|
::
|
||||||
|
++ send-update
|
||||||
|
|= upd=update ^- card
|
||||||
|
[%give %fact ~[/updates] %btc-wallet-store-update !>(upd)]
|
||||||
--
|
--
|
||||||
|
@ -57,11 +57,11 @@
|
|||||||
+$ action
|
+$ action
|
||||||
$% [%add-wallet =xpub scan-to=(unit scon) max-gap=(unit @ud) confs=(unit @ud)]
|
$% [%add-wallet =xpub scan-to=(unit scon) max-gap=(unit @ud) confs=(unit @ud)]
|
||||||
[%address-info =xpub =chyg =idx utxos=(set utxo) used=? blockcount=@ud]
|
[%address-info =xpub =chyg =idx utxos=(set utxo) used=? blockcount=@ud]
|
||||||
[%generate-address =xpub =chyg]
|
[%generate-address =xpub =chyg meta=(unit [payer=ship value=sats])]
|
||||||
==
|
==
|
||||||
::
|
::
|
||||||
+$ update
|
+$ update
|
||||||
$% [%generate-address =address]
|
$% [%generate-address =address meta=(unit [payer=ship value=sats])]
|
||||||
[%scan-done =xpub]
|
[%scan-done =xpub]
|
||||||
==
|
==
|
||||||
::
|
::
|
||||||
|
Loading…
Reference in New Issue
Block a user