diff --git a/Cargo.lock b/Cargo.lock index 49695b2..84d1793 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -69,14 +69,14 @@ dependencies = [ [[package]] name = "async_usage" -version = "0.0.33" +version = "0.0.34" dependencies = [ "mempool_space", ] [[package]] name = "async_usage_custom_target" -version = "0.0.33" +version = "0.0.34" dependencies = [ "mempool_space", ] @@ -817,7 +817,7 @@ dependencies = [ [[package]] name = "lightning-search" -version = "0.0.33" +version = "0.0.34" dependencies = [ "mempool_space", ] @@ -861,7 +861,7 @@ checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" [[package]] name = "mempool_space" -version = "0.0.33" +version = "0.0.34" dependencies = [ "anyhow", "ascii", @@ -1963,7 +1963,7 @@ dependencies = [ [[package]] name = "usage" -version = "0.0.33" +version = "0.0.34" dependencies = [ "mempool_space", ] diff --git a/Cargo.toml b/Cargo.toml index d94e3aa..5f8bbfc 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,5 +1,5 @@ [workspace.package] -version = "0.0.33" +version = "0.0.34" [package] name = "mempool_space" diff --git a/README.md b/README.md index 600e5f5..9cedd35 100755 --- a/README.md +++ b/README.md @@ -1,4 +1,3 @@ -# [mempool-space](https:github.com/RandyMcMillan/mempool_space) cargo install --git diff --git a/src/args.rs b/src/args.rs index 7d72ce0..9029e07 100644 --- a/src/args.rs +++ b/src/args.rs @@ -84,111 +84,200 @@ pub fn mining_pool_blocks(slug: &str, blockheight: &str) { )); } +/// USAGE: +/// +/// ``mempool-space --difficulty_adjustment (flagged)`` +/// +/// ``mempool-space_difficulty_adjustment (executable)`` +/// +/// - Flags follow the [mempool.space api/rest](https://mempool.space/docs/api/rest) (replace dashes with underscores) +/// +/// - Flags invoke the installed executable +/// +/// /// /// - [API/REST](https://mempool.space/docs/api/rest) /// - [GENERAL](https://mempool.space/docs/api/rest#get-difficulty-adjustment) -/// - GET /api/v1/difficulty-adjustment \<\> -/// - GET /api/v1/prices \<\> -/// - GET /api/v1/historical-price?currency=EUR×tamp=1500000000 \<\> +/// - GET /api/v1/difficulty-adjustment +/// - +/// - GET /api/v1/prices +/// - +/// - GET /api/v1/historical-price?currency=EUR×tamp=1500000000 +/// - /// - [ADDRESSES](https://mempool.space/docs/api/rest#get-address) -/// - GET /api/address/:address \<\> -/// - GET /api/address/:address/txs \<\> -/// - GET /api/address/:address/txs/chain \<\> -/// - GET /api/address/:address/txs/mempool \<\> -/// - GET /api/address/:address/utxo \<\> -/// - GET /api/v1/validate-address/:address \<\> +/// - GET /api/address/:address +/// - +/// - GET /api/address/:address/txs +/// - +/// - GET /api/address/:address/txs/chain +/// - +/// - GET /api/address/:address/txs/mempool +/// - +/// - GET /api/address/:address/utxo +/// - +/// - GET /api/v1/validate-address/:address +/// - /// - [BLOCKS](https://mempool.space/docs/api/rest#get-block) -/// - GET /api/block/:hash \<\> -/// - GET /api/block/:hash/header \<\> -/// - GET /api/block-height/:height \<\> -/// - GET /api/v1/mining/blocks/timestamp/:timestamp \<\> -/// - GET /api/block/:hash/raw \<\> -/// - GET /api/block/:hash/status \<\> -/// - GET /api/blocks/tip/height \<\> -/// - GET /api/blocks/tip/hash \<\> -/// - GET /api/block/:hash/txid/:index \<\> -/// - GET /api/block/:hash/txids \<\> -/// - GET /api/block/:hash/txs[/:start_index] \<\> -/// - GET /api/v1/blocks[/:startHeight] \<\> -/// - GET /api/v1/blocks-bulk/:minHeight[/:maxHeight] \<\> (Enterprise) +/// - GET /api/block/:hash +/// - +/// - GET /api/block/:hash/header +/// - +/// - GET /api/block-height/:height +/// - +/// - GET /api/v1/mining/blocks/timestamp/:timestamp +/// - +/// - GET /api/block/:hash/raw +/// - +/// - GET /api/block/:hash/status +/// - +/// - GET /api/blocks/tip/height +/// - +/// - GET /api/blocks/tip/hash +/// - +/// - GET /api/block/:hash/txid/:index +/// - +/// - GET /api/block/:hash/txids +/// - +/// - GET /api/block/:hash/txs[/:start_index] +/// - +/// - GET /api/v1/blocks[/:startHeight] +/// - +/// - GET /api/v1/blocks-bulk/:minHeight[/:maxHeight] +/// - (Enterprise) /// - [MINING](https://mempool.space/docs/api/rest#get-mining-pools) -/// - GET /api/v1/mining/pools[/:timePeriod] \<\> -/// - GET /api/v1/mining/pool/:slug \<\> -/// - GET /api/v1/mining/hashrate/pools/[\:timePeriod] \<\> -/// - GET /api/v1/mining/pool/:slug/hashrate \<\> -/// - GET /api/v1/mining/pool/:slug/blocks/[\:blockHeight] \<\> -/// - GET /api/v1/mining/hashrate/[\:timePeriod] \<\> -/// - GET /api/v1/mining/pool/:slug/blocks/[\:blockHeight] \<\> -/// - GET /api/v1/mining/difficulty-adjustments/[\:interval] \<\> -/// - GET /api/v1/mining/reward-stats/:blockCount \<\> -/// - GET /api/v1/mining/blocks/fees/:timePeriod \<\> -/// - GET /api/v1/mining/blocks/rewards/:timePeriod \<\> -/// - GET /api/v1/mining/blocks/fee-rates/:timePeriod \<\> -/// - GET /api/v1/mining/blocks/sizes-weights/:timePeriod \<\> -/// - GET /api/v1/mining/blocks/predictions/:timePeriod \<\> -/// - GET /api/v1/mining/blocks/audit/score/:blockHash \<\> -/// - GET /api/v1/mining/blocks/audit/scores/:startHeight \<\> -/// - GET /api/v1/block/:blockHash/audit-summary \<\> +/// - GET /api/v1/mining/pools[/:timePeriod] +/// - +/// - GET /api/v1/mining/pool/:slug +/// - +/// - GET /api/v1/mining/hashrate/pools/[\:timePeriod] +/// - +/// - GET /api/v1/mining/pool/:slug/hashrate +/// - +/// - GET /api/v1/mining/pool/:slug/blocks/[\:blockHeight] +/// - +/// - GET /api/v1/mining/hashrate/[\:timePeriod] +/// - +/// - GET /api/v1/mining/pool/:slug/blocks/[\:blockHeight] +/// - +/// - GET /api/v1/mining/difficulty-adjustments/[\:interval] +/// - +/// - GET /api/v1/mining/reward-stats/:blockCount +/// - +/// - GET /api/v1/mining/blocks/fees/:timePeriod +/// - +/// - GET /api/v1/mining/blocks/rewards/:timePeriod +/// - +/// - GET /api/v1/mining/blocks/fee-rates/:timePeriod +/// - +/// - GET /api/v1/mining/blocks/sizes-weights/:timePeriod +/// - +/// - GET /api/v1/mining/blocks/predictions/:timePeriod +/// - +/// - GET /api/v1/mining/blocks/audit/score/:blockHash +/// - +/// - GET /api/v1/mining/blocks/audit/scores/:startHeight +/// - +/// - GET /api/v1/block/:blockHash/audit-summary +/// - /// - [FEES](https://mempool.space/docs/api/rest#get-mempool-blocks-fees) -/// - GET /api/v1/fees/mempool-blocks \<\> -/// - GET /api/v1/fees/recommended \<\> +/// - GET /api/v1/fees/mempool-blocks +/// - +/// - GET /api/v1/fees/recommended +/// - /// - [MEMPOOL](https://mempool.space/docs/api/rest#get-mempool) -/// - GET \<< >\> -/// - GET \<< >\> -/// - GET \<< >\> -/// - GET \<< >\> -/// - GET \<< >\> +/// - GET /api/mempool +/// - +/// - GET /api/mempool/txids +/// - +/// - GET GET /api/mempool/recent +/// - +/// - GET /api/v1/replacements +/// - +/// - GET /api/v1/fullrbf/replacements +/// - /// - [TRANSACTIONS](https://mempool.space/docs/api/rest#get-cpfp) -/// - GET \<< >\> -/// - GET \<< >\> -/// - GET \<< >\> -/// - GET \<< >\> -/// - GET \<< >\> -/// - GET \<< >\> -/// - GET \<< >\> -/// - GET \<< >\> -/// - GET \<< >\> -/// - GET \<< >\> -/// - GET \<< >\> -/// - GET \<< >\> +/// - GET /api/v1/cpfp +/// - +/// - GET /api/tx/:txid +/// - +/// - GET /api/tx/:txid/hex +/// - +/// - GET /api/tx/:txid/merkleblock-proof +/// - +/// - GET /api/tx/:txid/merkle-proof +/// - +/// - GET /api/tx/:txid/outspend/:vout +/// - +/// - GET /api/tx/:txid/outspends +/// - +/// - GET /api/tx/:txid/raw +/// - +/// - GET /apiv1/tx/:txId/rbf +/// - +/// - GET /api/tx/:txid/status +/// - +/// - GET /api/v1/transaction-times +/// - +/// - POST /api/tx +/// - \ /// - [LIGHTNING](https://mempool.space/docs/api/rest#get-lightning-network-stats) -/// - GET \<< >\> -/// - GET \<< >\> -/// - GET \<< >\> -/// - GET \<< >\> -/// - GET \<< >\> -/// - GET \<< >\> -/// - GET \<< >\> -/// - GET \<< >\> -/// - GET \<< >\> -/// - GET \<< >\> -/// - GET \<< >\> -/// - GET \<< >\> -/// - GET \<< >\> -/// - GET \<< >\> -/// - GET \<< >\> -/// - GET \<< >\> -/// - GET \<< >\> -/// - GET \<< >\> +/// - GET /api/v1/lightning/statistics/:interval +/// - +/// - GET /api/v1/lightning/search?searchText=:query +/// - +/// - GET /api/v1/lightning/nodes/country/:country +/// - +/// - GET /api/v1/lightning/nodes/countries +/// - +/// - GET /api/v1/lightning/nodes/isp/:isp +/// - +/// - GET /api/v1/lightning/nodes/isp-ranking +/// - +/// - GET /api/v1/lightning/nodes/rankings +/// - +/// - GET /api/v1/lightning/nodes/rankings/liquidity +/// - +/// - GET /api/v1/lightning/nodes/rankings/connectivity +/// - +/// - GET /api/v1/lightning/nodes/rankings/age +/// - +/// - GET /api/v1/lightning/nodes/:pubKey +/// - +/// - GET /api/v1/lightning/nodes/:pubKey/statistics +/// - +/// - GET /api/v1/lightning/channels/:channelId +/// - +/// - GET /api/v1/lightning/channels/txids?txId[]=:txid +/// - +/// - GET /api/v1/lightning/channels?public_key=:pubKey&status=:channelStatus +/// - +/// - GET /api/v1/lightning/channels-geo +/// - +/// - GET /api/v1/lightning/channels-geo/:pubKey +/// - /// - [ACCELERATOR (Public)](https://mempool.space/docs/api/rest#accelerator-estimate) -/// - GET \<< >\> -/// - GET \<< >\> -/// - GET \<< >\> -/// - GET \<< >\> -/// - [ACCELERATOR (Authenticated)](https://mempool.space/docs/api/rest#accelerator-top-up-history) -/// - GET \<< >\> -/// - GET \<< >\> -/// - GET \<< >\> -/// - GET \<< >\> -/// -/// USAGE: -/// - mempool-space \--difficulty_adjustment (flagged) -/// - mempool-space_difficulty_adjustment (executable) -/// 1. Flags follow the mempool.space api/rest (replace dashes with underscores) -/// 2. Flags invoke the executable +/// - POST /v1/services/accelerator/estimate +/// - `curl -H "X-Mempool-Auth: stacksats" -X POST -sSLd "txInput=ee13ebb99632377c15c94980357f674d285ac413452050031ea6dcd3e9b2dc29" "https://mempool.space/api/v1/services/accelerator/estimate"` +/// POST /v1/services/payments/bitcoin +/// - `curl -X POST -sSLd "product=ee13ebb99632377c15c94980357f674d285ac413452050031ea6dcd3e9b2dc29&amount=12500" "https://mempool.space/api/v1/services/payments/bitcoin"` +/// - GET /api/v1/services/accelerator/accelerations +/// - +/// - GET /api/v1/services/accelerator/accelerations/history +/// - +/// - `curl https://raw.githubusercontent.com/mempool/mining-pools/master/pools-v2.json` +/// - [ACCELERATOR (Authenticated) TODO](https://mempool.space/docs/api/rest#accelerator-top-up-history) +/// - GET /api/v1/services/accelerator/top-up-history +/// - +/// - GET /api/v1/services/accelerator/balance +/// - +/// - POST /v1/services/accelerator/accelerate +/// - `curl -H "X-Mempool-Auth: stacksats" -X POST -sSLd "txInput=ee13ebb99632377c15c94980357f674d285ac413452050031ea6dcd3e9b2dc29&userBid=21000000" "https://mempool.space/api/v1/services/accelerator/accelerate"` +/// - GET /api/v1/services/accelerator/history?status=:status&details=:details +/// - /// #[derive(Debug, Default)] pub struct Args { + // VERSION // pub version: Option, /// `https://mempool.space/api/v1/difficulty-adjustment` @@ -239,15 +328,15 @@ pub struct Args { /// - BLOCKS TIP HASH /// `https://mempool.space/api/blocks/tip/hash` pub blocks_tip_hash: Option, + /// - BLOCK TXID + /// `https://mempool.space/api/blocks/tip/hash` + + + + - /// `https://mempool.space/api/block//` - /// - /// mempool-space --block_txid \ --block_txindex \ - /// - /// mempool-space_block_txid \ \ - /// pub block_txid: Option, - /// + /// - BLOCK TXINDEX pub block_txindex: Option, /// - BLOCK \ \ /// `https://mempool.space/api/block/` diff --git a/src/lib.rs b/src/lib.rs index ec7c61e..cd59104 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,4 +1,3 @@ -//! # [mempool-space](https://github.com/RandyMcMillan/mempool_space) //! //! cargo install \--git //!