Skip to content

Commit

Permalink
wallet-rpc: add new methods for listing history.
Browse files Browse the repository at this point in the history
wallet-rpc: The following new methods have been added:
  - `listhistory` - List history with a limit and in reverse order.
  - `listhistoryafter` - List history after a txid _(subsequent pages)_.
  - `listhistorybytime` - List history by giving a timestamp in epoch seconds
    _(block median time past)_.
  - `listunconfirmed` - List unconfirmed transactions with a limit and in
    reverse order.
  - `listunconfirmedafter` - List unconfirmed transactions after a txid
    _(subsequent pages)_.
  - `listunconfirmedbytime` - List unconfirmed transactions by time they
    where added.

wallet-rpc: The following methods have been deprecated:
  - `listtransactions` - Use `listhistory` and the related methods and the
    `after` argument for results that do not shift when new blocks arrive.

wallet: Remove getHistory and related methods form wallet and txdb.
  • Loading branch information
nodech committed Mar 30, 2024
1 parent 42221c4 commit 6fa2013
Show file tree
Hide file tree
Showing 9 changed files with 843 additions and 221 deletions.
29 changes: 24 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,11 +99,6 @@ These endpoints have been deprecated:
- `GET /wallet/:id/tx/last` - Instead use `reverse` param for the history and
unconfirmed endpoints.

##### Wallet CLI (hsw-cli)
- `history` now accepts new args on top of `--account`: `--reverse`,
`--limit`, `--after`, `--after`.
- `pending` now accepts new args, same as above.

##### Examples

```
Expand Down Expand Up @@ -133,6 +128,30 @@ GET /wallet/:id/tx/unconfirmed?time=<time-received>&limit=50&reverse=false
The same will apply to unconfirmed transactions. The `time` is in epoch
seconds and indexed based on when the transaction was added to the wallet.

##### Wallet RPC

The following new methods have been added:
- `listhistory` - List history with a limit and in reverse order.
- `listhistoryafter` - List history after a txid _(subsequent pages)_.
- `listhistorybytime` - List history by giving a timestamp in epoch seconds
_(block median time past)_.
- `listunconfirmed` - List unconfirmed transactions with a limit and in
reverse order.
- `listunconfirmedafter` - List unconfirmed transactions after a txid
_(subsequent pages)_.
- `listunconfirmedbytime` - List unconfirmed transactions by time they
where added.

The following methods have been deprecated:

- `listtransactions` - Use `listhistory` and the related methods and the
`after` argument for results that do not shift when new blocks arrive.

##### Wallet CLI (hsw-cli)
- `history` now accepts new args on top of `--account`: `--reverse`,
`--limit`, `--after`, `--after`.
- `pending` now accepts new args, same as above.


### Client changes
#### Wallet HTTP Client
Expand Down
Loading

0 comments on commit 6fa2013

Please sign in to comment.