[bitcoin/bitcoin] Add scantxoutset RPC method (#12196)

promag commented on this pull request.

> @@ -2012,6 +2032,12 @@ UniValue scantxoutset(const JSONRPCRequest& request)
” }n”
” },n”
” ]n”
+ “3. “options” (object, optional)n”
+ ” “rawsweep”: { (object, optional) Optionally creates a raw sweep transactionn”

From https://github.com/bitcoin/bitcoin/pull/12196#issuecomment-393057791

> > tx = scantxoutset(“start”, { “sweep_to”: address })[“sweep_tx”]
> > fundrawtransaction(tx, { “subtractFeeFromOutputs”: [0] })
>
> @promag: would that also work without the wallet? My idea was to make `scantxoutset` work without a wallet.

@sipa not sure if you are suggesting something similar to:
“`
unspents = scantxoutset(“start”, …)
tx = createrawtransaction unspents …
tx = fundrawtransaction …
“`
And how could it work without the wallet?

This post was last modified on July 11, 2018, 2:32 am