mirror of
https://github.com/urbit/shrub.git
synced 2024-12-19 16:51:42 +03:00
get recvd time for each utxo
This commit is contained in:
parent
b4214870db
commit
109d0a38fa
@ -6,7 +6,7 @@ The below requires norsyr's fix to `decompress-point` in order to work.
|
||||
:btc-provider|command [%set-credentials api-url='http://localhost:50002']
|
||||
:btc-provider|action ['blockfee' %ping ~]
|
||||
|
||||
:btc-provider|action ['addr0' %address-info [%bech32 'bc1q59u5epktervh6fxqay2dlph0wxu9hjnx6v8n66']]
|
||||
:btc-provider|action ['addr0' %address-info [%bech32 'bc1qm7cegwfd0pvv9ypvz5nhstage00xkxevtrpshc']]
|
||||
:btc-provider|action ['addr1' %address-info [%bech32 'bc1qlwd7mw33uea5m8r2lsnsrkc7gp2qynrxsfxpfm']]
|
||||
:btc-provider|action ['addr2' %address-info [%bech32 'bc1qglkc9zfcn04vcc88nn0ljtxcpu5uxfznc3829k']]
|
||||
:: first is an address w balance
|
||||
|
@ -163,6 +163,7 @@
|
||||
::
|
||||
[%raw-tx @ *]
|
||||
?> ?=([%get-raw-tx *] resp)
|
||||
|
||||
:_ state
|
||||
~[(send-update [%.y (get-req-id wire) %raw-tx +.resp])]
|
||||
::
|
||||
|
@ -29,6 +29,7 @@
|
||||
^- (unit @da)
|
||||
?: =(0 secs) ~
|
||||
[~ (add ~1970.1.1 `@dr`(mul secs ~s1))]
|
||||
|
||||
::
|
||||
++ to-hex
|
||||
|= h=@t
|
||||
@ -93,7 +94,6 @@
|
||||
:~ [%utxos (as:dejs:format utxo)]
|
||||
[%used bo:dejs:format]
|
||||
[%block ni:dejs:format]
|
||||
[%time (cu:dejs:format from-epoch ni:dejs:format)]
|
||||
==
|
||||
++ utxo
|
||||
%- ot:dejs:format
|
||||
@ -101,6 +101,7 @@
|
||||
['tx_hash' (cu:dejs:format to-hash256 so:dejs:format)]
|
||||
[%height ni:dejs:format]
|
||||
[%value ni:dejs:format]
|
||||
[%recvd (cu:dejs:format from-epoch ni:dejs:format)]
|
||||
==
|
||||
++ raw-tx
|
||||
%- ot:dejs:format
|
||||
|
@ -14,7 +14,7 @@
|
||||
==
|
||||
+$ result [=req-id body=result-body]
|
||||
+$ result-body
|
||||
$% [%address-info utxos=(set utxo) used=? block=@ud time=(unit @da)]
|
||||
$% [%address-info utxos=(set utxo) used=? block=@ud]
|
||||
[%raw-tx =txid =rawtx]
|
||||
==
|
||||
+$ error
|
||||
@ -41,7 +41,7 @@
|
||||
==
|
||||
::
|
||||
+$ response
|
||||
$% [%get-address-info utxos=(set utxo) used=? block=@ud time=(unit @da)]
|
||||
$% [%get-address-info utxos=(set utxo) used=? block=@ud]
|
||||
[%get-raw-tx =txid =rawtx]
|
||||
[%get-block-count block=@ud]
|
||||
[%get-block-and-fee block=@ud fee=sats]
|
||||
|
@ -14,7 +14,7 @@
|
||||
+$ txid hash256
|
||||
+$ rawtx btc-byts
|
||||
+$ buffer (list @ux)
|
||||
+$ utxo [pos=@ =txid height=@ value=sats]
|
||||
+$ utxo [pos=@ =txid height=@ value=sats recvd=(unit @da)]
|
||||
++ address-info
|
||||
$: =address
|
||||
confirmed-value=sats
|
||||
|
Loading…
Reference in New Issue
Block a user