mirror of
https://github.com/urbit/shrub.git
synced 2024-12-24 20:47:27 +03:00
generate address action
This commit is contained in:
parent
6678f31beb
commit
98f5701ccc
@ -85,17 +85,24 @@
|
|||||||
%add-wallet
|
%add-wallet
|
||||||
=/ w=_walt (from-xpub:walt +.act)
|
=/ w=_walt (from-xpub:walt +.act)
|
||||||
=. walts (~(put by walts) xpub.act w)
|
=. walts (~(put by walts) xpub.act w)
|
||||||
=^ cards state
|
(init-batches xpub.act (dec max-gap.st.w))
|
||||||
(init-batches xpub.act (dec max-gap.st.w))
|
|
||||||
[cards state]
|
|
||||||
::
|
::
|
||||||
%watch-address
|
%watch-address
|
||||||
(watch-address +.act)
|
(watch-address +.act)
|
||||||
::
|
::
|
||||||
%update-address
|
%update-address
|
||||||
`state
|
`state
|
||||||
|
::
|
||||||
|
%generate-address
|
||||||
|
=/ uw=(unit _walt) (~(get by walts) xpub.act)
|
||||||
|
?~ uw
|
||||||
|
~|("btc-wallet-store, %generate-address: non-existent wallet" !!)
|
||||||
|
=/ [a=address:btc w=_walt]
|
||||||
|
~(gen-address u.uw chyg.act)
|
||||||
|
:_ state(walts (~(put by walts) xpub.act w))
|
||||||
|
~[[%give %fact ~[/updates] %btc-wallet-store-update !>([%generate-address a])]]
|
||||||
==
|
==
|
||||||
:: 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
|
||||||
:: Send that to /requests subscribers to call out to providers and get the info
|
:: Send that to /requests subscribers to call out to providers and get the info
|
||||||
:: Whenever a %watch-address result comes back
|
:: Whenever a %watch-address result comes back
|
||||||
|
@ -42,6 +42,11 @@
|
|||||||
$% [%add-wallet =xpub scan-to=(unit scon) max-gap=(unit @)]
|
$% [%add-wallet =xpub scan-to=(unit scon) max-gap=(unit @)]
|
||||||
[%watch-address =xpub =chyg =idx utxos=(set utxo) used=?]
|
[%watch-address =xpub =chyg =idx utxos=(set utxo) used=?]
|
||||||
[%update-address a=address utxos=(set utxo)]
|
[%update-address a=address utxos=(set utxo)]
|
||||||
|
[%generate-address =xpub =chyg]
|
||||||
|
==
|
||||||
|
::
|
||||||
|
+$ update
|
||||||
|
$% [%generate-address =address]
|
||||||
==
|
==
|
||||||
::
|
::
|
||||||
+$ req-method
|
+$ req-method
|
||||||
|
Loading…
Reference in New Issue
Block a user