Skip to content

feat: wire missing mempool.space API calls into main CLI binary - #2

Draft
RandyMcMillan with Copilot wants to merge 1 commit into
mainfrom
copilot/add-missing-mempool-api-calls
Draft

RandyMcMillan with Copilot wants to merge 1 commit into
mainfrom
copilot/add-missing-mempool-api-calls

Conversation

Copilot AI commented Aug 14, 2026

Copy link
Copy Markdown

49 API endpoints had standalone src/bin/mempool-space_*.rs binaries but no --flag support in the main mempool-space CLI, making them unreachable via the primary entry point.

Added --flag wiring in args.rs

Each entry gets an opts definition, opt_present() dispatch block, struct field, and initializer.

Blocks: --block_feerates, --block_predictions, --block_rewards, --block_sizes_and_weights

Fees: --fees_mempool_blocks, --fees_recommended

Mempool: --mempool, --mempool_txids, --mempool_full_rbf_transactions, --mempool_rbf_transactions, --mempool_recent

Transactions: --children_pay_for_parent, --transaction, --transaction_hex, --transaction_merkle_block_proof, --transaction_merkle_proof, --transaction_outspend (+--outspend_index), --transaction_outspends, --transaction_raw, --transaction_rbf_timeline, --transaction_status, --transaction_times

Lightning (22): --lightning_channels, --lightning_channels_from_node_pubkey, --lightning_channels_from_txid, --lightning_channels_geo, --lightning_channels_geodata, --lightning_node_stats, --lightning_node_stats_per_country, --lightning_nodes, --lightning_nodes_channels, --lightning_nodes_in_country, --lightning_nodes_isp_ranking, --lightning_nodes_ranking, --lightning_nodes_ranking_age, --lightning_nodes_ranking_connectivity, --lightning_nodes_ranking_liquidity, --lightning_nodes_statistics, --lightning_nodes_stats_per_isp, --lightning_search, --lightning_statistics, --lightning_top_nodes_by_connectivity, --lightning_top_nodes_by_liquidity, --lightning_top_oldests_nodes

Mining: --mining_hashrate <TIMEPERIOD>, --mining_reward_stats <COUNT>, --mining_blocks_timestamp <UTC_SECS>

New binary

  • mempool-space_mempool_txids.rsGET /api/mempool/txids, referenced in docs/tests but file was absent.

Bug fixes in existing binaries

  • transaction_outspend.rs: was calling /address/:address; corrected to tx/:txid/outspend/:index, now accepts txid + optional index (default 0).
  • transaction_outspends.rs: stripped spurious api/ prefix (api/tx/…tx/…).

- Add --flag support in args.rs for all API calls that had standalone
  binaries but were not accessible via the main mempool-space binary:
  - Blocks: --block_feerates, --block_predictions, --block_rewards,
    --block_sizes_and_weights
  - Fees: --fees_mempool_blocks, --fees_recommended
  - Mempool: --mempool, --mempool_txids, --mempool_full_rbf_transactions,
    --mempool_rbf_transactions, --mempool_recent
  - Transactions: --children_pay_for_parent, --transaction,
    --transaction_hex, --transaction_merkle_block_proof,
    --transaction_merkle_proof, --transaction_outspend (+ --outspend_index),
    --transaction_outspends, --transaction_raw, --transaction_rbf_timeline,
    --transaction_status, --transaction_times
  - Lightning: all 22 lightning API endpoints
  - Mining: --mining_hashrate, --mining_reward_stats,
    --mining_blocks_timestamp
- Create missing src/bin/mempool-space_mempool_txids.rs binary
- Fix transaction_outspend.rs: wrong URL (/address/:address -> tx/:txid/outspend/:index)
- Fix transaction_outspends.rs: remove spurious api/ URL prefix

Co-authored-by: RandyMcMillan <152159+RandyMcMillan@users.noreply.github.com>
Copilot AI changed the title feat: add missing mempool.space API call wiring feat: wire missing mempool.space API calls into main CLI binary Aug 14, 2026
Copilot AI requested a review from RandyMcMillan August 14, 2026 10:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants