diff --git a/API.md b/API.md index cfc15b17..5aa09187 100644 --- a/API.md +++ b/API.md @@ -66,6 +66,23 @@ Broadcast a raw transaction to the network. The transaction should be provided as hex in the request body. The `txid` will be returned on success. +### `POST /txs/package` + +Broadcast a package of raw transactions to the network. + +A transaction package is a group of related transactions that may depend on each other (e.g., a child transaction spending outputs from an unconfirmed parent transaction). This is useful for CPFP (Child Pays For Parent) and other scenarios where transactions need to be evaluated together. + +The request body should contain a JSON array of transaction hex strings. + +Example request body: +```json +["02000000...", "02000000..."] +``` + +Returns a JSON object containing the package acceptance result. On success, returns information about each transaction in the package. + +*Note:* This endpoint requires Bitcoin Core 28.0 or later. + ## Addresses ### `GET /address/:address` @@ -144,6 +161,8 @@ Available fields: `in_best_chain` (boolean, false for orphaned blocks), `next_be Returns a list of transactions in the block (up to 25 transactions beginning at `start_index`). +*Note:* The `start_index` value must be a multiple of 25. + The response from this endpoint can be cached indefinitely. ### `GET /block/:hash/txids`