fix txinfo return

This commit is contained in:
timlucmiptev 2020-12-21 11:50:33 +02:00 committed by ixv
parent 6ad4a0bcf4
commit 17ea091741
6 changed files with 35 additions and 10 deletions

View File

@ -21,6 +21,13 @@
:: 4 inputs, one output
```
## TX Info for Non-Existent TX
```
:btc-provider|action ['reqid' %tx-info [%32 0x63a.bc87.c9e6.9f8f.4a76.d838.abc0.fd77.082f.9716.09a0.0b18.b45b.d3ab.793c.82df]]
:: should be %.n for included
```
## Generate a Raw TX from Inputs/Outputs
```
:btc-provider|command [%set-credentials api-url='http://localhost:50002']

View File

@ -288,6 +288,7 @@
==
::
:: %txinfo
:: - TODO: handle case where tx is blank
:: - insert into wallet-store history if pend-piym or poym matches txid
:: - forward tx to wallet-store regardless
::

View File

@ -102,7 +102,7 @@
::
%get-raw-tx
[id.res (raw-tx res.res)]
::
::
%broadcast-tx
[%broadcast-tx (broadcast-tx res.res)]
::
@ -126,9 +126,10 @@
[%value ni:dejs:format]
[%recvd (cu:dejs:format from-epoch ni:dejs:format)]
==
++ tx-vals
++ tx-vals
%- ot:dejs:format
:~ [%txid (cu:dejs:format to-hash256 so:dejs:format)]
:~ [%included bo:dejs:format]
[%txid (cu:dejs:format to-hash256 so:dejs:format)]
[%confs ni:dejs:format]
[%recvd (cu:dejs:format from-epoch ni:dejs:format)]
[%inputs (ar:dejs:format tx-val)]

View File

@ -32,7 +32,7 @@
$% [%connected block=@ud fee=@ud]
[%disconnected ~]
==
::
::
++ rpc-types
|%
+$ action

View File

@ -29,16 +29,29 @@
:: - vout-n is the index of the output that has value
::
+$ action
$% settings
local
peer
==
+$ settings
$% [%set-provider provider=ship]
[%set-default-wallet ~]
[%req-pay-address payee=ship value=sats feyb=(unit sats)]
[%gen-pay-address value=sats]
[%ret-pay-address =address payer=ship value=sats]
[%broadcast-tx signed=rawtx]
[%expect-payment =txid value=sats]
[%clear-poym ~]
[%force-retry ~]
==
+$ local
$% [%req-pay-address payee=ship value=sats feyb=(unit sats)]
[%broadcast-tx signed=rawtx]
[%poym-add-txi]
[%poym-to-history]
==
+$ peer
$% [%gen-pay-address value=sats]
[%ret-pay-address =address payer=ship value=sats]
[%expect-payment =txid value=sats]
==
::
::
+$ update
$% request
error

View File

@ -42,8 +42,11 @@
=address
value=sats
==
:: included: whether tx is in the mempool or blockchain
::
+$ info
$: =txid
$: included=?
=txid
confs=@ud
recvd=(unit @da)
inputs=(list val)