Skip to content

Commit

Permalink
commands: add rbfpsbt command
Browse files Browse the repository at this point in the history
  • Loading branch information
jp1ac4 committed Nov 17, 2023
1 parent 4c273df commit b3e143d
Show file tree
Hide file tree
Showing 4 changed files with 451 additions and 1 deletion.
17 changes: 17 additions & 0 deletions doc/API.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ Commands must be sent as valid JSONRPC 2.0 requests, ending with a `\n`.
| [`listspendtxs`](#listspendtxs) | List all stored Spend transactions |
| [`delspendtx`](#delspendtx) | Delete a stored Spend transaction |
| [`broadcastspend`](#broadcastspend) | Finalize a stored Spend PSBT, and broadcast it |
| [`rbfpsbt`](#rbfpsbt) | Create a new RBF Spend transaction |
| [`startrescan`](#startrescan) | Start rescanning the block chain from a given date |
| [`listconfirmed`](#listconfirmed) | List of confirmed transactions of incoming and outgoing funds |
| [`listtransactions`](#listtransactions) | List of transactions with the given txids |
Expand Down Expand Up @@ -248,6 +249,22 @@ This command does not return anything for now.
| Field | Type | Description |
| -------------- | --------- | ---------------------------------------------------- |

### `rbfpsbt`

#### Request

| Field | Type | Description |
| -------- | ------ | ---------------------------------------------------------------------------------------- |
| `txid` | string | Hex encoded txid of the Spend transaction to be replaced. |
| `feerate` | integer | Target feerate for the transaction, in satoshis per virtual byte. |
| `is_cancel` | bool | If `false`, the non-change outputs of the transaction to be replaced will be preserved. If `true`, non-change outputs will be removed and the only output of the replacement transaction will be change. |

#### Response

| Field | Type | Description |
| -------------- | --------- | ---------------------------------------------------- |
| `psbt` | string | PSBT of the spending transaction, encoded as base64. |

### `startrescan`

#### Request
Expand Down
Loading

0 comments on commit b3e143d

Please sign in to comment.