API needs an endpoint to submit a package of txs

Open
#532 1 comment 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
javascript
Domain
api, backend

Research direction

Start at the existing POST /tx entry point and trace how a single transaction is accepted and relayed. Compare the proposed multi-line or JSON-array body with a new /txs endpoint, using Bitcoin Core's package relay behavior as context; done means the API accepts and relays a package of two transactions when either transaction alone would fail.

Written by the indexing model from the issue text.

Description

Currently there is the POST /tx endpoint where you can submit a tx. With Bitcoin Core 28 releasing package relay in a limited form, it is possible using Core to submit and relay packages of transactions. More specifically, it is possible to relay a pair of txs of which either of them would not be accepted into the mempool alone.

This means that submitting the txs one by one into the /tx endpoint does not work and the API needs to be able to accept packages of multiple (currently just 2) transactions.

Maybe POST /tx can support a body of multiple lines, or of a JSON array, or a new endpoint /txs can be added.

Dominant language
JavaScript
Stars
1.3k
Forks
527
Avg merge
2d 5h
Merged PRs (30d)
4

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Blockstream/esplora

All issues in Blockstream/esplora

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.