rpcclient: support listtransactions RPC with watchonly argument
Co-authored-by: Gert-Jaap Glasbergen <gertjaap@decoscrypto.com>
This commit is contained in:
parent
7cbf95675a
commit
ba3fe57507
1 changed files with 19 additions and 0 deletions
|
@ -164,6 +164,25 @@ func (c *Client) ListTransactionsCountFrom(account string, count, from int) ([]b
|
|||
return c.ListTransactionsCountFromAsync(account, count, from).Receive()
|
||||
}
|
||||
|
||||
// ListTransactionsCountFromWatchOnlyAsync returns an instance of a type that can be used
|
||||
// to get the result of the RPC at some future time by invoking the Receive
|
||||
// function on the returned instance.
|
||||
//
|
||||
// See ListTransactionsCountFromWatchOnly for the blocking version and more details.
|
||||
func (c *Client) ListTransactionsCountFromWatchOnlyAsync(account string, count, from int, watchOnly bool) FutureListTransactionsResult {
|
||||
cmd := btcjson.NewListTransactionsCmd(&account, &count, &from, &watchOnly)
|
||||
return c.sendCmd(cmd)
|
||||
}
|
||||
|
||||
// ListTransactionsCountFromWatchOnly returns a list of the most recent transactions up
|
||||
// to the passed count while skipping the first 'from' transactions. It will include or
|
||||
// exclude transactions from watch-only addresses based on the passed value for the watchOnly parameter
|
||||
//
|
||||
// See the ListTransactions and ListTransactionsCount functions to use defaults.
|
||||
func (c *Client) ListTransactionsCountFromWatchOnly(account string, count, from int, watchOnly bool) ([]btcjson.ListTransactionsResult, error) {
|
||||
return c.ListTransactionsCountFromWatchOnlyAsync(account, count, from, watchOnly).Receive()
|
||||
}
|
||||
|
||||
// FutureListUnspentResult is a future promise to deliver the result of a
|
||||
// ListUnspentAsync, ListUnspentMinAsync, ListUnspentMinMaxAsync, or
|
||||
// ListUnspentMinMaxAddressesAsync RPC invocation (or an applicable error).
|
||||
|
|
Loading…
Reference in a new issue