global: snapshot

This commit is contained in:
nym21
2026-04-08 01:38:03 +02:00
parent 0c14dfe924
commit 4c4c6fc840
79 changed files with 2040 additions and 1408 deletions
@@ -3,6 +3,7 @@ use serde::Deserialize;
use brk_types::Addr;
/// Bitcoin address path parameter
#[derive(Deserialize, JsonSchema)]
pub struct AddrParam {
#[serde(rename = "address")]
@@ -1,6 +1,7 @@
use schemars::JsonSchema;
use serde::Deserialize;
/// Block count path parameter
#[derive(Deserialize, JsonSchema)]
pub struct BlockCountParam {
/// Number of recent blocks to include
@@ -3,6 +3,7 @@ use serde::Deserialize;
use brk_types::BlockHash;
/// Block hash path parameter
#[derive(Deserialize, JsonSchema)]
pub struct BlockHashParam {
pub hash: BlockHash,
@@ -3,6 +3,7 @@ use serde::Deserialize;
use brk_types::{BlockHash, TxIndex};
/// Block hash + starting transaction index path parameters
#[derive(Deserialize, JsonSchema)]
pub struct BlockHashStartIndex {
/// Bitcoin block hash
@@ -3,6 +3,7 @@ use serde::Deserialize;
use brk_types::{BlockHash, TxIndex};
/// Block hash + transaction index path parameters
#[derive(Deserialize, JsonSchema)]
pub struct BlockHashTxIndex {
/// Bitcoin block hash
@@ -3,6 +3,7 @@ use serde::Deserialize;
use brk_types::Height;
/// Block height path parameter
#[derive(Deserialize, JsonSchema)]
pub struct HeightParam {
pub height: Height,
@@ -3,11 +3,13 @@ use serde::Deserialize;
use brk_types::{Height, PoolSlug};
/// Mining pool slug path parameter
#[derive(Deserialize, JsonSchema)]
pub struct PoolSlugParam {
pub slug: PoolSlug,
}
/// Mining pool slug + block height path parameters
#[derive(Deserialize, JsonSchema)]
pub struct PoolSlugAndHeightParam {
pub slug: PoolSlug,
@@ -3,6 +3,7 @@ use serde::Deserialize;
use brk_types::TimePeriod;
/// Time period path parameter (24h, 3d, 1w, 1m, 3m, 6m, 1y, 2y, 3y)
#[derive(Deserialize, JsonSchema)]
pub struct TimePeriodParam {
#[schemars(example = &"24h")]
@@ -3,11 +3,13 @@ use serde::Deserialize;
use brk_types::Timestamp;
/// UNIX timestamp path parameter
#[derive(Deserialize, JsonSchema)]
pub struct TimestampParam {
pub timestamp: Timestamp,
}
/// Optional UNIX timestamp query parameter
#[derive(Deserialize, JsonSchema)]
pub struct OptionalTimestampParam {
pub timestamp: Option<Timestamp>,
@@ -3,6 +3,7 @@ use serde::Deserialize;
use brk_types::Txid;
/// Transaction ID path parameter
#[derive(Deserialize, JsonSchema)]
pub struct TxidParam {
pub txid: Txid,