16 个版本
新版本 0.0.26 | 2024 年 8 月 18 日 |
---|---|
0.0.25 | 2024 年 8 月 16 日 |
0.0.3 | 2024 年 7 月 29 日 |
670 在 网络编程 中排名
1,466 每月下载量
170KB
3K SLoC
mempool_space
安装
cargo安装 mempool_space
cargo-binstall mempool_space
从源码编译和安装
git clone https://github.com/RandyMcMillan/mempool_space.git
cdmempool_space && cargo安装 --path .
或
make cargo-i
mempool_space::args::Args
用法(示例)
$mempool-space --address
<地址>
$mempool-space_address
<地址>
$mempool-space --address 1wiz18xYmhRX6xStj2b9t1rwWX4GKUgpv
$mempool-space_address 1wiz18xYmhRX6xStj2b9t1rwWX4GKUgpv
-
标志遵循 mempool.space/api/rest(用下划线替换连字符)
-
标志通过参数调用可执行文件
Shell 命令示例
$mempool-space --block $(mempool-space --block_height 856379)
$ mempool-space --block_header $(mempool-space --block_height 856379)
lib.rs
:
mempool-space (命令行工具)
cargo install --git https://github.com/RandyMcMillan/mempool_space.git
cargo add --git https://github.com/RandyMcMillan/mempool_space.git
CLI: mempool-space --option arg1 ... --option argn
mempool-space \--option
mempool-space \--option arg
mempool-space \--option arg --option arg
BIN: mempool-space_option arg1 ... argn
mempool-space_option
mempool-space_option arg
mempool-space_option arg arg
通用
GET /api/v1/difficulty-adjustment
mempool-space \--difficulty_adjustment
mempool-space_difficulty_adjustment
GET /api/v1/prices
mempool-space \--prices
mempool-space_prices
GET /api/v1/historical-price?currency=EUR×tamp=1500000000
mempool-space \--historical_price \--currency [USD, CAD, GBP, CHF, AUD, JPY] \--timestamp utc_sec
mempool-space \--historical_price \--currency EUR \--timestamp 1500000000
mempool-space \--historical_price \--currency USD \--timestamp $(date +%s)
地址
GET /api/address:address
mempool-space \--address 1wiz18xYmhRX6xStj2b9t1rwWX4GKUgpv
mempool-space_address 1wiz18xYmhRX6xStj2b9t1rwWX4GKUgpv
GET /api/address:address/txs
mempool-space \--address_txs 1wiz18xYmhRX6xStj2b9t1rwWX4GKUgpv
mempool-space_address_txs 1wiz18xYmhRX6xStj2b9t1rwWX4GKUgpv
GET /api/address:address/txs/chain
mempool-space \--address_txs_chain 1wiz18xYmhRX6xStj2b9t1rwWX4GKUgpv
mempool-space_address_txs_chain 1wiz18xYmhRX6xStj2b9t1rwWX4GKUgpv
GET /api/address:address/txs/mempool (可能为测试地址为空)
mempool-space \--address_txs_mempool 1wiz18xYmhRX6xStj2b9t1rwWX4GKUgpv
mempool-space_address_txs_mempool 1wiz18xYmhRX6xStj2b9t1rwWX4GKUgpv
GET /api/address:address/utxo
mempool-space \--address_utxo 1wiz18xYmhRX6xStj2b9t1rwWX4GKUgpv
mempool-space_address_utxo 1wiz18xYmhRX6xStj2b9t1rwWX4GKUgpv
GET /api/v1/validate-address/:address
mempool-space \--validate_address 1KFHE7w8BhaENAswwryaoccDb6qcT6DbYY
mempool-space_validate_address 1KFHE7w8BhaENAswwryaoccDb6qcT6DbYY
区块
GET /api/block/:hash
mempool-space \--block 000000000000000015dc777b3ff2611091336355d3f0ee9766a2cf3be8e4b1ce
mempool-space_block 000000000000000015dc777b3ff2611091336355d3f0ee9766a2cf3be8e4b1ce
GET /api/block/:hash/header
mempool-space \--block_header 0000000000000000000065bda8f8a88f2e1e00d9a6887a43d640e52a4c7660f2
mempool-space_block_header 0000000000000000000065bda8f8a88f2e1e00d9a6887a43d640e52a4c7660f2
GET /api/block-height:height
mempool-space \--block_height 615615
mempool-space_block_height 615615
GET /api/v1/mining/blocks/timestamp/:timestamp
mempool-space \--blocks_timestamp 1672531200
mempool-space_blocks_timestamp 1672531200
GET /api/block/:hash/raw
mempool-space \--block_raw 0000000000000000000065bda8f8a88f2e1e00d9a6887a43d640e52a4c7660f2
mempool-space_block_raw 0000000000000000000065bda8f8a88f2e1e00d9a6887a43d640e52a4c7660f2
GET /api/block/:hash/status
mempool-space \--block_status 0000000000000000000065bda8f8a88f2e1e00d9a6887a43d640e52a4c7660f2
mempool-space_block_status 0000000000000000000065bda8f8a88f2e1e00d9a6887a43d640e52a4c7660f2
GET /api/blocks/tip/height
mempool-space \--blocks_tip_height
mempool-space_blocks_tip_height
GET /api/blocks/tip/hash
mempool-space \--blocks_tip_hash
mempool-space_blocks_tip_hash
GET /api/block/:hash/txid/:index
mempool-space --block_txid 000000000000000015dc777b3ff2611091336355d3f0ee9766a2cf3be8e4b1ce --block_txindex 218
mempool-space_block_txid 000000000000000015dc777b3ff2611091336355d3f0ee9766a2cf3be8e4b1ce 218
GET /api/block/:hash/txids
mempool-space --block_txids 000000000000000015dc777b3ff2611091336355d3f0ee9766a2cf3be8e4b1ce
mempool-space_block_txids 000000000000000015dc777b3ff2611091336355d3f0ee9766a2cf3be8e4b1ce
GET /api/block/:hash/txs/:start_index (start_index % 25 == 0)
mempool-space --block_txs 000000000000000015dc777b3ff2611091336355d3f0ee9766a2cf3be8e4b1ce --start_index 0
mempool-space --block_txs 000000000000000015dc777b3ff2611091336355d3f0ee9766a2cf3be8e4b1ce --start_index 25
mempool-space_block_txs 000000000000000015dc777b3ff2611091336355d3f0ee9766a2cf3be8e4b1ce 0
mempool-space_block_txs 000000000000000015dc777b3ff2611091336355d3f0ee9766a2cf3be8e4b1ce 25
[GET /api/v1/blocks/:startHeight](https://mempool.space/api/v1/blocks/730000)
mempool-space --blocks 730000
mempool-space_blocks 730000
[GET /api/v1/blocks-bulk/:minHeight/:maxHeight](https://mempool.space/api/v1/blocks-bulk/100000/100000)
mempool-space --blocks_bulk --min_height 730000 --max_height 840000
mempool-space_blocks_bulk 730000 840000
依赖
~16–31MB
~522K SLoC