add marks

This commit is contained in:
timlucmiptev 2020-11-24 21:30:41 +02:00 committed by ixv
parent 0a51cd34d2
commit f5960c656c
9 changed files with 76 additions and 22 deletions

View File

@ -99,6 +99,18 @@ Above tests w 2 outputs, total fees with 2 inputs of 27.500. Gives:
1. 500.000 input
2. Inputs 0 and 3
## Make a full TXBU
Provider is `~zod`, `~dopzod` is a client.
On `~zod`:
```
:btc-provider|command [%set-credentials api-url='http://localhost:50002']
:btc-provider|command [%whitelist-clients `(set ship)`(sy ~[~dopzod])]
```
on `~dopzod`:
```
:btc-wallet-hook|action [%set-provider ~zod]
```
## scrys
```
@ -107,22 +119,3 @@ Above tests w 2 outputs, total fees with 2 inputs of 27.500. Gives:
.^(@ud %gx /=btc-wallet-store=/balance/[xpub]/noun)
```
## Algos
### Monitor addresses
- nixt also stores next 50 addresses for each account.
- every update-address call also checks those
### make a payment
* make payment
- get address
- on-agent gets return value, construct tx
- store tx (view or other command can get it)
::
++ send-address-update
|= [xpub=tape =walt a=address:btc us=(set utxo)]
^- (quip card _state)
:_ state(walts (~(put by walts.state) xpub walt))
~[[%give %fact ~[/wallets] %btc-wallet-store-update !>([%address a us])]]
::

View File

@ -114,7 +114,7 @@
==
[cards this]
==
++ on-arvo on-arvo:def
++ on-arvo on-arvo:def
++ on-fail on-fail:def
--
|_ =bowl:gall

View File

@ -19,7 +19,7 @@ while getopts "w" opt; do
done
if [ -z "$WATCH_MODE" ]; then
echo "Installed %bippy"
echo "Installed btc-agents"
rsync -r --exclude-from=$EXCLUDE_FILE * $PIER/
else
echo "Watching for changes to copy to ${PIER}..."

View File

@ -12,7 +12,19 @@
++ txbu
|= =^txbu
^- json
[%s 'txbu placeholder']
%- pairs
:~ [%inputs ~]
['associatedKeysets' s+'hi']
['changePath' s+'hi']
['outputScriptHex' s+'hi']
['lockTime' s+'hi']
['sigHashType' s+'hi']
[%segwit s+'hi']
['initialTimestamp' s+'hi']
==
:: TODO inputs, keysets, changeppath, outputscripthex, locktime, sigHashType, segwit, initialTimestamp
:: , additionals ("bech32")
:: TODO: use 'pairs' at the top level
--
::
++ defaults

View File

@ -0,0 +1,12 @@
/- *btc-provider
|_ act=action
++ grad %noun
++ grow
|%
++ noun act
--
++ grab
|%
++ noun action
--
--

View File

@ -0,0 +1,12 @@
/- *btc-provider
|_ sta=status
++ grad %noun
++ grow
|%
++ noun sta
--
++ grab
|%
++ noun status
--
--

View File

@ -0,0 +1,12 @@
/- *btc-provider
|_ upd=update
++ grad %noun
++ grow
|%
++ noun upd
--
++ grab
|%
++ noun update
--
--

View File

@ -0,0 +1,12 @@
/- *btc-wallet-hook
|_ act=action
++ grad %noun
++ grow
|%
++ noun act
--
++ grab
|%
++ noun action
--
--

View File

@ -44,6 +44,7 @@
[%get-raw-tx =txid =rawtx]
[%get-block-count blockcount=@ud]
[%get-block-and-fee blockcount=@ud fee=sats]
==
--
--