oracle: snap pre 340k patch

This commit is contained in:
nym21
2026-05-24 00:07:25 +02:00
parent 0aaffc6c43
commit 6219d2301d
11 changed files with 472 additions and 38069 deletions
+5 -5
View File
@@ -8663,7 +8663,7 @@ class BrkClient(BrkClientBase):
def get_oracle_price(self) -> Dollars:
"""Live BTC/USD price.
Current BTC/USD price in dollars, derived purely from on-chain round-dollar output patterns over the last 12 blocks plus the forming mempool block. Same value as `/api/mempool/price`. Confirmed per-height history is available at `/api/vecs/height-to-price`.
Current BTC/USD price in dollars. Same value as `/api/mempool/price`. Confirmed per-height history is available at `/api/vecs/height-to-price`.
Endpoint: `GET /api/oracle/price`"""
return self.get_json('/api/oracle/price')
@@ -8671,7 +8671,7 @@ class BrkClient(BrkClientBase):
def get_oracle_histogram_ema_live(self) -> Histogram_uint16:
"""Live EMA histogram.
Smoothed round-dollar payment histogram at the live tip: the committed 12-block EMA with the forming mempool block blended in as a final slot. A flat array of 2400 log-scale bins, quantized to `u16` for the wire. This is the heatmap column you render.
Smoothed round-dollar payment histogram at the live tip: the committed EMA with the forming mempool block blended in. A flat array of log-scale bins.
Endpoint: `GET /api/oracle/histogram/ema/live`"""
return self.get_json('/api/oracle/histogram/ema/live')
@@ -8679,7 +8679,7 @@ class BrkClient(BrkClientBase):
def get_oracle_histogram_ema(self, height: Height) -> Histogram_uint16:
"""EMA histogram at height.
Smoothed round-dollar payment histogram for a confirmed height, deterministically reconstructed by replaying the 12-block window ending at that height. Immutable once buried, so repeated requests return byte-identical results. A flat array of 2400 log-scale bins, quantized to `u16`.
Smoothed round-dollar payment histogram for a confirmed height. A flat array of log-scale bins.
Endpoint: `GET /api/oracle/histogram/ema/{height}`"""
return self.get_json(f'/api/oracle/histogram/ema/{height}')
@@ -8687,7 +8687,7 @@ class BrkClient(BrkClientBase):
def get_oracle_histogram_raw_live(self) -> Histogram_uint32:
"""Live raw histogram.
Un-smoothed per-block round-dollar counts for the forming mempool block: the spiky primitive the EMA smooths over. A flat array of 2400 log-scale bins (`u32` counts), all zero when no mempool is configured.
Un-smoothed per-block round-dollar counts for the forming mempool block. A flat array of log-scale bins, all zero when no mempool is configured.
Endpoint: `GET /api/oracle/histogram/raw/live`"""
return self.get_json('/api/oracle/histogram/raw/live')
@@ -8695,7 +8695,7 @@ class BrkClient(BrkClientBase):
def get_oracle_histogram_raw(self, height: Height) -> Histogram_uint32:
"""Raw histogram at height.
Un-smoothed round-dollar counts for a single confirmed block. A flat array of 2400 log-scale bins (`u32` counts).
Un-smoothed round-dollar counts for a single confirmed block. A flat array of log-scale bins.
Endpoint: `GET /api/oracle/histogram/raw/{height}`"""
return self.get_json(f'/api/oracle/histogram/raw/{height}')