brk-client 0.3.0-alpha.5 → 0.3.0-alpha.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +27 -10
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -135,14 +135,30 @@
|
|
|
135
135
|
* @property {number} segwitTotalSize - Total size of segwit transactions in bytes
|
|
136
136
|
* @property {Weight} segwitTotalWeight - Total weight of segwit transactions
|
|
137
137
|
* @property {string} header - Raw 80-byte block header as hex
|
|
138
|
-
* @property {number} utxoSetChange - UTXO set change (outputs
|
|
139
|
-
|
|
138
|
+
* @property {number} utxoSetChange - UTXO set change (total outputs - total inputs, includes unspendable like OP_RETURN).
|
|
139
|
+
Note: intentionally differs from utxo_set_size diff which excludes unspendable outputs.
|
|
140
|
+
Matches mempool.space/bitcoin-cli behavior.
|
|
141
|
+
* @property {number} utxoSetSize - Total spendable UTXO set size at this height (excludes OP_RETURN and other unspendable outputs)
|
|
140
142
|
* @property {Sats} totalInputAmt - Total input amount in satoshis
|
|
141
143
|
* @property {number} virtualSize - Virtual size in vbytes
|
|
142
144
|
* @property {?number=} firstSeen - Timestamp when the block was first seen (always null, not yet supported)
|
|
143
145
|
* @property {string[]} orphans - Orphaned blocks (always empty)
|
|
144
146
|
* @property {Dollars} price - USD price at block height
|
|
145
147
|
*/
|
|
148
|
+
/**
|
|
149
|
+
* A single block fee rates data point with percentiles.
|
|
150
|
+
*
|
|
151
|
+
* @typedef {Object} BlockFeeRatesEntry
|
|
152
|
+
* @property {Height} avgHeight - Average block height in this window
|
|
153
|
+
* @property {Timestamp} timestamp - Unix timestamp at the window midpoint
|
|
154
|
+
* @property {FeeRate} avgFee0
|
|
155
|
+
* @property {FeeRate} avgFee10
|
|
156
|
+
* @property {FeeRate} avgFee25
|
|
157
|
+
* @property {FeeRate} avgFee50
|
|
158
|
+
* @property {FeeRate} avgFee75
|
|
159
|
+
* @property {FeeRate} avgFee90
|
|
160
|
+
* @property {FeeRate} avgFee100
|
|
161
|
+
*/
|
|
146
162
|
/**
|
|
147
163
|
* A single block fees data point.
|
|
148
164
|
*
|
|
@@ -359,9 +375,9 @@
|
|
|
359
375
|
* @property {CpfpEntry[]} ancestors - Ancestor transactions in the CPFP chain
|
|
360
376
|
* @property {(CpfpEntry|null)=} bestDescendant - Best (highest fee rate) descendant, if any
|
|
361
377
|
* @property {CpfpEntry[]} descendants - Descendant transactions in the CPFP chain
|
|
362
|
-
* @property {FeeRate} effectiveFeePerVsize - Effective fee rate considering CPFP relationships (sat/vB)
|
|
363
|
-
* @property {Sats} fee - Transaction fee (sats)
|
|
364
|
-
* @property {VSize} adjustedVsize - Adjusted virtual size (accounting for sigops)
|
|
378
|
+
* @property {(FeeRate|null)=} effectiveFeePerVsize - Effective fee rate considering CPFP relationships (sat/vB)
|
|
379
|
+
* @property {(Sats|null)=} fee - Transaction fee (sats)
|
|
380
|
+
* @property {(VSize|null)=} adjustedVsize - Adjusted virtual size (accounting for sigops)
|
|
365
381
|
*/
|
|
366
382
|
/**
|
|
367
383
|
* Data range with output format for API query parameters
|
|
@@ -736,6 +752,7 @@
|
|
|
736
752
|
* @property {PoolBlockShares} blockShare - Pool's share of total blocks for different time periods
|
|
737
753
|
* @property {number} estimatedHashrate - Estimated hashrate based on blocks mined
|
|
738
754
|
* @property {?number=} reportedHashrate - Self-reported hashrate (if available)
|
|
755
|
+
* @property {(Sats|null)=} totalReward - Total reward earned by this pool (sats, all time; None for minor pools)
|
|
739
756
|
*/
|
|
740
757
|
/**
|
|
741
758
|
* Pool information for detail view
|
|
@@ -983,7 +1000,7 @@
|
|
|
983
1000
|
* Used to specify the lookback window for pool statistics, hashrate calculations,
|
|
984
1001
|
* and other time-based mining series.
|
|
985
1002
|
*
|
|
986
|
-
* @typedef {("24h"|"3d"|"1w"|"1m"|"3m"|"6m"|"1y"|"2y"|"3y")} TimePeriod
|
|
1003
|
+
* @typedef {("24h"|"3d"|"1w"|"1m"|"3m"|"6m"|"1y"|"2y"|"3y"|"all")} TimePeriod
|
|
987
1004
|
*/
|
|
988
1005
|
/**
|
|
989
1006
|
* @typedef {Object} TimePeriodParam
|
|
@@ -6573,7 +6590,7 @@ function createTransferPattern(client, acc) {
|
|
|
6573
6590
|
* @extends BrkClientBase
|
|
6574
6591
|
*/
|
|
6575
6592
|
class BrkClient extends BrkClientBase {
|
|
6576
|
-
VERSION = "v0.3.0-alpha.
|
|
6593
|
+
VERSION = "v0.3.0-alpha.6";
|
|
6577
6594
|
|
|
6578
6595
|
INDEXES = /** @type {const} */ ([
|
|
6579
6596
|
"minute10",
|
|
@@ -10363,16 +10380,16 @@ class BrkClient extends BrkClientBase {
|
|
|
10363
10380
|
}
|
|
10364
10381
|
|
|
10365
10382
|
/**
|
|
10366
|
-
* Block fee rates
|
|
10383
|
+
* Block fee rates
|
|
10367
10384
|
*
|
|
10368
|
-
*
|
|
10385
|
+
* Get block fee rate percentiles (min, 10th, 25th, median, 75th, 90th, max) for a time period. Valid periods: 24h, 3d, 1w, 1m, 3m, 6m, 1y, 2y, 3y
|
|
10369
10386
|
*
|
|
10370
10387
|
* *[Mempool.space docs](https://mempool.space/docs/api/rest#get-block-feerates)*
|
|
10371
10388
|
*
|
|
10372
10389
|
* Endpoint: `GET /api/v1/mining/blocks/fee-rates/{time_period}`
|
|
10373
10390
|
*
|
|
10374
10391
|
* @param {TimePeriod} time_period
|
|
10375
|
-
* @returns {Promise
|
|
10392
|
+
* @returns {Promise<BlockFeeRatesEntry[]>}
|
|
10376
10393
|
*/
|
|
10377
10394
|
async getBlockFeeRates(time_period) {
|
|
10378
10395
|
return this.getJson(`/api/v1/mining/blocks/fee-rates/${time_period}`);
|
package/package.json
CHANGED