confidential-assets-demo icon indicating copy to clipboard operation
confidential-assets-demo copied to clipboard

listunspent should pass JSON param to filter

Open RdeWilde opened this issue 4 years ago • 0 comments

The last parameter for listunspent should be a json object/string

Here and several other places: https://github.com/ElementsProject/confidential-assets-demo/blob/bd23dc90b62572f7c4c24f11c7505f646fd1a365/src/rpc/helper.go#L146

elements-cli -datadir=demo/data/alice help listunspent
listunspent ( minconf maxconf ["address",...] include_unsafe query_options )

Returns array of unspent transaction outputs
with between minconf and maxconf (inclusive) confirmations.
Optionally filter to only include txouts paid to specified addresses.

Arguments:
1. minconf                            (numeric, optional, default=1) The minimum confirmations to filter
2. maxconf                            (numeric, optional, default=9999999) The maximum confirmations to filter
3. addresses                          (json array, optional, default=empty array) A json array of addresses to filter
     [
       "address",                     (string) address
       ...
     ]
4. include_unsafe                     (boolean, optional, default=true) Include outputs that are not safe to spend
                                      See description of "safe" attribute below.
5. query_options                      (json object, optional) JSON with query options
     {
       "minimumAmount": amount,       (numeric or string, optional, default=0) Minimum value of each UTXO in BTC
       "maximumAmount": amount,       (numeric or string, optional, default=unlimited) Maximum value of each UTXO in BTC
       "maximumCount": n,             (numeric, optional, default=unlimited) Maximum number of UTXOs
       "minimumSumAmount": amount,    (numeric or string, optional, default=unlimited) Minimum sum value of all UTXOs in BTC
       "asset": "str",                (string, optional, default=) Asset to filter outputs for.
     }

RdeWilde avatar May 22 '20 22:05 RdeWilde