brk-client 0.3.0-beta.4 → 0.3.0-beta.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.
Files changed (2) hide show
  1. package/index.js +253 -50
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -845,6 +845,31 @@ Matches mempool.space/bitcoin-cli behavior.
845
845
  *
846
846
  * @typedef {number} RawLockTime
847
847
  */
848
+ /**
849
+ * Response body for `GET /api/v1/tx/:txid/rbf`. Both fields are null
850
+ * when the tx has no known RBF history within the mempool monitor's
851
+ * graveyard retention window.
852
+ *
853
+ * @typedef {Object} RbfResponse
854
+ * @property {(ReplacementNode|null)=} replacements
855
+ * @property {?Txid[]=} replaces
856
+ */
857
+ /**
858
+ * Transaction summary carried inside an RBF replacement node. Shape
859
+ * matches mempool.space's `/api/v1/tx/:txid/rbf` and
860
+ * `/api/v1/replacements` responses.
861
+ *
862
+ * @typedef {Object} RbfTx
863
+ * @property {Txid} txid
864
+ * @property {Sats} fee
865
+ * @property {VSize} vsize
866
+ * @property {Sats} value - Sum of output amounts.
867
+ * @property {FeeRate} rate
868
+ * @property {Timestamp} time
869
+ * @property {boolean} rbf - BIP-125 signaling: at least one input has sequence < 0xffffffff-1.
870
+ * @property {?boolean=} fullRbf - Only populated on the root `tx` of an RBF response. `true` iff
871
+ this tx displaced at least one non-signaling predecessor.
872
+ */
848
873
  /**
849
874
  * Recommended fee rates in sat/vB
850
875
  *
@@ -855,6 +880,19 @@ Matches mempool.space/bitcoin-cli behavior.
855
880
  * @property {FeeRate} economyFee - Fee rate for economical confirmation
856
881
  * @property {FeeRate} minimumFee - Minimum relay fee rate
857
882
  */
883
+ /**
884
+ * One node in an RBF replacement tree. The node's `tx` replaced each
885
+ * entry in `replaces`, recursively.
886
+ *
887
+ * @typedef {Object} ReplacementNode
888
+ * @property {RbfTx} tx
889
+ * @property {Timestamp} time - First-seen timestamp, duplicated here to match mempool.space's
890
+ on-the-wire shape.
891
+ * @property {boolean} fullRbf - Any predecessor in this subtree was non-signaling.
892
+ * @property {?number=} interval - Seconds between this node's `time` and the successor that
893
+ replaced it. Omitted on the root of an RBF response.
894
+ * @property {ReplacementNode[]} replaces
895
+ */
858
896
  /**
859
897
  * Block reward statistics over a range of blocks
860
898
  *
@@ -1060,7 +1098,7 @@ Matches mempool.space/bitcoin-cli behavior.
1060
1098
  * @property {(TxOut|null)=} prevout - Information about the previous output being spent
1061
1099
  * @property {string} scriptsig - Signature script (hex, for non-SegWit inputs)
1062
1100
  * @property {string} scriptsigAsm - Signature script in assembly format
1063
- * @property {string[]} witness - Witness data (hex-encoded stack items, present for SegWit inputs)
1101
+ * @property {Witness} witness - Witness data (stack items, present for SegWit inputs; hex-encoded on the wire)
1064
1102
  * @property {boolean} isCoinbase - Whether this input is a coinbase (block reward) input
1065
1103
  * @property {number} sequence - Input sequence number
1066
1104
  * @property {string} innerRedeemscriptAsm - Inner redeemscript in assembly (for P2SH-wrapped SegWit: scriptsig + witness both present)
@@ -1240,6 +1278,17 @@ Matches mempool.space/bitcoin-cli behavior.
1240
1278
  *
1241
1279
  * @typedef {number} Weight
1242
1280
  */
1281
+ /**
1282
+ * Transaction witness: a stack of byte arrays, one per witness item.
1283
+ *
1284
+ * Wraps `bitcoin::Witness` (single-buffer layout with offsets, much
1285
+ * more compact than `Vec<Vec<u8>>`). Serializes as a JSON array of
1286
+ * hex strings - the format used by Bitcoin Core REST and mempool.space
1287
+ * and matching brk's `script_sig: ScriptBuf` (bytes internally, hex
1288
+ * on the wire).
1289
+ *
1290
+ * @typedef {string[]} Witness
1291
+ */
1243
1292
  /** @typedef {number} Year1 */
1244
1293
  /** @typedef {number} Year10 */
1245
1294
 
@@ -2303,6 +2352,20 @@ function createAverageBaseCumulativeMaxMedianMinPct10Pct25Pct75Pct90SumPattern(c
2303
2352
  };
2304
2353
  }
2305
2354
 
2355
+ /**
2356
+ * @typedef {Object} AllP2aP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshSharePattern
2357
+ * @property {BtcCentsSatsUsdPattern} all
2358
+ * @property {BtcCentsSatsUsdPattern} p2a
2359
+ * @property {BtcCentsSatsUsdPattern} p2pk33
2360
+ * @property {BtcCentsSatsUsdPattern} p2pk65
2361
+ * @property {BtcCentsSatsUsdPattern} p2pkh
2362
+ * @property {BtcCentsSatsUsdPattern} p2sh
2363
+ * @property {BtcCentsSatsUsdPattern} p2tr
2364
+ * @property {BtcCentsSatsUsdPattern} p2wpkh
2365
+ * @property {BtcCentsSatsUsdPattern} p2wsh
2366
+ * @property {AllP2aP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshPattern5} share
2367
+ */
2368
+
2306
2369
  /**
2307
2370
  * @typedef {Object} IndexPct0Pct1Pct2Pct5Pct95Pct98Pct99ScorePattern
2308
2371
  * @property {SeriesPattern1<StoredI8>} index
@@ -2371,6 +2434,39 @@ function createAllP2aP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshPattern6(client, acc) {
2371
2434
  };
2372
2435
  }
2373
2436
 
2437
+ /**
2438
+ * @typedef {Object} AllP2aP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshPattern5
2439
+ * @property {BpsPercentRatioPattern2} all
2440
+ * @property {BpsPercentRatioPattern2} p2a
2441
+ * @property {BpsPercentRatioPattern2} p2pk33
2442
+ * @property {BpsPercentRatioPattern2} p2pk65
2443
+ * @property {BpsPercentRatioPattern2} p2pkh
2444
+ * @property {BpsPercentRatioPattern2} p2sh
2445
+ * @property {BpsPercentRatioPattern2} p2tr
2446
+ * @property {BpsPercentRatioPattern2} p2wpkh
2447
+ * @property {BpsPercentRatioPattern2} p2wsh
2448
+ */
2449
+
2450
+ /**
2451
+ * Create a AllP2aP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshPattern5 pattern node
2452
+ * @param {BrkClientBase} client
2453
+ * @param {string} acc - Accumulated series name
2454
+ * @returns {AllP2aP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshPattern5}
2455
+ */
2456
+ function createAllP2aP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshPattern5(client, acc) {
2457
+ return {
2458
+ all: createBpsPercentRatioPattern2(client, acc),
2459
+ p2a: createBpsPercentRatioPattern2(client, _p('p2a', acc)),
2460
+ p2pk33: createBpsPercentRatioPattern2(client, _p('p2pk33', acc)),
2461
+ p2pk65: createBpsPercentRatioPattern2(client, _p('p2pk65', acc)),
2462
+ p2pkh: createBpsPercentRatioPattern2(client, _p('p2pkh', acc)),
2463
+ p2sh: createBpsPercentRatioPattern2(client, _p('p2sh', acc)),
2464
+ p2tr: createBpsPercentRatioPattern2(client, _p('p2tr', acc)),
2465
+ p2wpkh: createBpsPercentRatioPattern2(client, _p('p2wpkh', acc)),
2466
+ p2wsh: createBpsPercentRatioPattern2(client, _p('p2wsh', acc)),
2467
+ };
2468
+ }
2469
+
2374
2470
  /**
2375
2471
  * @typedef {Object} AllP2aP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshPattern4
2376
2472
  * @property {SeriesPattern1<StoredU64>} all
@@ -2604,6 +2700,17 @@ function create_1m1w1y24hBpsPercentRatioPattern(client, acc) {
2604
2700
  };
2605
2701
  }
2606
2702
 
2703
+ /**
2704
+ * @typedef {Object} ActiveInputOutputSpendablePattern
2705
+ * @property {_1m1w1y24hBlockPattern} activeReusedAddrCount
2706
+ * @property {_1m1w1y24hBlockPattern2} activeReusedAddrShare
2707
+ * @property {AllP2aP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshPattern6} inputFromReusedAddrCount
2708
+ * @property {AllP2aP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshPattern7} inputFromReusedAddrShare
2709
+ * @property {AllP2aP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshPattern6} outputToReusedAddrCount
2710
+ * @property {AllP2aP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshPattern7} outputToReusedAddrShare
2711
+ * @property {_1m1w1y24hBpsPercentRatioPattern} spendableOutputToReusedAddrShare
2712
+ */
2713
+
2607
2714
  /**
2608
2715
  * @typedef {Object} CapLossMvrvNetPriceProfitSoprPattern
2609
2716
  * @property {CentsDeltaUsdPattern} cap
@@ -2911,6 +3018,31 @@ function createDeltaDominanceHalfInTotalPattern(client, acc) {
2911
3018
  };
2912
3019
  }
2913
3020
 
3021
+ /**
3022
+ * @typedef {Object} _1m1w1y24hBlockPattern2
3023
+ * @property {SeriesPattern1<StoredF32>} _1m
3024
+ * @property {SeriesPattern1<StoredF32>} _1w
3025
+ * @property {SeriesPattern1<StoredF32>} _1y
3026
+ * @property {SeriesPattern1<StoredF32>} _24h
3027
+ * @property {SeriesPattern18<StoredF32>} block
3028
+ */
3029
+
3030
+ /**
3031
+ * Create a _1m1w1y24hBlockPattern2 pattern node
3032
+ * @param {BrkClientBase} client
3033
+ * @param {string} acc - Accumulated series name
3034
+ * @returns {_1m1w1y24hBlockPattern2}
3035
+ */
3036
+ function create_1m1w1y24hBlockPattern2(client, acc) {
3037
+ return {
3038
+ _1m: createSeriesPattern1(client, _m(acc, 'average_1m')),
3039
+ _1w: createSeriesPattern1(client, _m(acc, 'average_1w')),
3040
+ _1y: createSeriesPattern1(client, _m(acc, 'average_1y')),
3041
+ _24h: createSeriesPattern1(client, _m(acc, 'average_24h')),
3042
+ block: createSeriesPattern18(client, acc),
3043
+ };
3044
+ }
3045
+
2914
3046
  /**
2915
3047
  * @typedef {Object} _1m1w1y24hBlockPattern
2916
3048
  * @property {SeriesPattern1<StoredF32>} _1m
@@ -3991,6 +4123,13 @@ function createCentsSatsUsdPattern(client, acc) {
3991
4123
  };
3992
4124
  }
3993
4125
 
4126
+ /**
4127
+ * @typedef {Object} CountEventsSupplyPattern
4128
+ * @property {FundedTotalPattern} count
4129
+ * @property {ActiveInputOutputSpendablePattern} events
4130
+ * @property {AllP2aP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshSharePattern} supply
4131
+ */
4132
+
3994
4133
  /**
3995
4134
  * @typedef {Object} CumulativeRollingSumPattern
3996
4135
  * @property {SeriesPattern1<StoredU64>} cumulative
@@ -5113,6 +5252,7 @@ function createTransferPattern(client, acc) {
5113
5252
  * @property {AllP2aP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshPattern4} total
5114
5253
  * @property {AllP2aP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshPattern6} new
5115
5254
  * @property {SeriesTree_Addrs_Reused} reused
5255
+ * @property {SeriesTree_Addrs_Respent} respent
5116
5256
  * @property {SeriesTree_Addrs_Exposed} exposed
5117
5257
  * @property {SeriesTree_Addrs_Delta} delta
5118
5258
  * @property {SeriesTree_Addrs_AvgAmount} avgAmount
@@ -5224,6 +5364,7 @@ function createTransferPattern(client, acc) {
5224
5364
  * @typedef {Object} SeriesTree_Addrs_Reused
5225
5365
  * @property {FundedTotalPattern} count
5226
5366
  * @property {SeriesTree_Addrs_Reused_Events} events
5367
+ * @property {SeriesTree_Addrs_Reused_Supply} supply
5227
5368
  */
5228
5369
 
5229
5370
  /**
@@ -5234,26 +5375,43 @@ function createTransferPattern(client, acc) {
5234
5375
  * @property {AllP2aP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshPattern6} inputFromReusedAddrCount
5235
5376
  * @property {AllP2aP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshPattern7} inputFromReusedAddrShare
5236
5377
  * @property {_1m1w1y24hBlockPattern} activeReusedAddrCount
5237
- * @property {SeriesTree_Addrs_Reused_Events_ActiveReusedAddrShare} activeReusedAddrShare
5378
+ * @property {_1m1w1y24hBlockPattern2} activeReusedAddrShare
5238
5379
  */
5239
5380
 
5240
5381
  /**
5241
- * @typedef {Object} SeriesTree_Addrs_Reused_Events_ActiveReusedAddrShare
5242
- * @property {SeriesPattern18<StoredF32>} block
5243
- * @property {SeriesPattern1<StoredF32>} _24h
5244
- * @property {SeriesPattern1<StoredF32>} _1w
5245
- * @property {SeriesPattern1<StoredF32>} _1m
5246
- * @property {SeriesPattern1<StoredF32>} _1y
5382
+ * @typedef {Object} SeriesTree_Addrs_Reused_Supply
5383
+ * @property {BtcCentsSatsUsdPattern} all
5384
+ * @property {BtcCentsSatsUsdPattern} p2pk65
5385
+ * @property {BtcCentsSatsUsdPattern} p2pk33
5386
+ * @property {BtcCentsSatsUsdPattern} p2pkh
5387
+ * @property {BtcCentsSatsUsdPattern} p2sh
5388
+ * @property {BtcCentsSatsUsdPattern} p2wpkh
5389
+ * @property {BtcCentsSatsUsdPattern} p2wsh
5390
+ * @property {BtcCentsSatsUsdPattern} p2tr
5391
+ * @property {BtcCentsSatsUsdPattern} p2a
5392
+ * @property {AllP2aP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshPattern5} share
5247
5393
  */
5248
5394
 
5249
5395
  /**
5250
- * @typedef {Object} SeriesTree_Addrs_Exposed
5396
+ * @typedef {Object} SeriesTree_Addrs_Respent
5251
5397
  * @property {FundedTotalPattern} count
5252
- * @property {SeriesTree_Addrs_Exposed_Supply} supply
5398
+ * @property {SeriesTree_Addrs_Respent_Events} events
5399
+ * @property {SeriesTree_Addrs_Respent_Supply} supply
5253
5400
  */
5254
5401
 
5255
5402
  /**
5256
- * @typedef {Object} SeriesTree_Addrs_Exposed_Supply
5403
+ * @typedef {Object} SeriesTree_Addrs_Respent_Events
5404
+ * @property {AllP2aP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshPattern6} outputToReusedAddrCount
5405
+ * @property {AllP2aP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshPattern7} outputToReusedAddrShare
5406
+ * @property {_1m1w1y24hBpsPercentRatioPattern} spendableOutputToReusedAddrShare
5407
+ * @property {AllP2aP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshPattern6} inputFromReusedAddrCount
5408
+ * @property {AllP2aP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshPattern7} inputFromReusedAddrShare
5409
+ * @property {_1m1w1y24hBlockPattern} activeReusedAddrCount
5410
+ * @property {_1m1w1y24hBlockPattern2} activeReusedAddrShare
5411
+ */
5412
+
5413
+ /**
5414
+ * @typedef {Object} SeriesTree_Addrs_Respent_Supply
5257
5415
  * @property {BtcCentsSatsUsdPattern} all
5258
5416
  * @property {BtcCentsSatsUsdPattern} p2pk65
5259
5417
  * @property {BtcCentsSatsUsdPattern} p2pk33
@@ -5263,20 +5421,27 @@ function createTransferPattern(client, acc) {
5263
5421
  * @property {BtcCentsSatsUsdPattern} p2wsh
5264
5422
  * @property {BtcCentsSatsUsdPattern} p2tr
5265
5423
  * @property {BtcCentsSatsUsdPattern} p2a
5266
- * @property {SeriesTree_Addrs_Exposed_Supply_Share} share
5424
+ * @property {AllP2aP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshPattern5} share
5267
5425
  */
5268
5426
 
5269
5427
  /**
5270
- * @typedef {Object} SeriesTree_Addrs_Exposed_Supply_Share
5271
- * @property {BpsPercentRatioPattern2} all
5272
- * @property {BpsPercentRatioPattern2} p2pk65
5273
- * @property {BpsPercentRatioPattern2} p2pk33
5274
- * @property {BpsPercentRatioPattern2} p2pkh
5275
- * @property {BpsPercentRatioPattern2} p2sh
5276
- * @property {BpsPercentRatioPattern2} p2wpkh
5277
- * @property {BpsPercentRatioPattern2} p2wsh
5278
- * @property {BpsPercentRatioPattern2} p2tr
5279
- * @property {BpsPercentRatioPattern2} p2a
5428
+ * @typedef {Object} SeriesTree_Addrs_Exposed
5429
+ * @property {FundedTotalPattern} count
5430
+ * @property {SeriesTree_Addrs_Exposed_Supply} supply
5431
+ */
5432
+
5433
+ /**
5434
+ * @typedef {Object} SeriesTree_Addrs_Exposed_Supply
5435
+ * @property {BtcCentsSatsUsdPattern} all
5436
+ * @property {BtcCentsSatsUsdPattern} p2pk65
5437
+ * @property {BtcCentsSatsUsdPattern} p2pk33
5438
+ * @property {BtcCentsSatsUsdPattern} p2pkh
5439
+ * @property {BtcCentsSatsUsdPattern} p2sh
5440
+ * @property {BtcCentsSatsUsdPattern} p2wpkh
5441
+ * @property {BtcCentsSatsUsdPattern} p2wsh
5442
+ * @property {BtcCentsSatsUsdPattern} p2tr
5443
+ * @property {BtcCentsSatsUsdPattern} p2a
5444
+ * @property {AllP2aP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshPattern5} share
5280
5445
  */
5281
5446
 
5282
5447
  /**
@@ -7106,7 +7271,7 @@ function createTransferPattern(client, acc) {
7106
7271
  * @extends BrkClientBase
7107
7272
  */
7108
7273
  class BrkClient extends BrkClientBase {
7109
- VERSION = "v0.3.0-beta.4";
7274
+ VERSION = "v0.3.0-beta.6";
7110
7275
 
7111
7276
  INDEXES = /** @type {const} */ ([
7112
7277
  "minute10",
@@ -8631,38 +8796,58 @@ class BrkClient extends BrkClientBase {
8631
8796
  inputFromReusedAddrCount: createAllP2aP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshPattern6(this, 'input_from_reused_addr_count'),
8632
8797
  inputFromReusedAddrShare: createAllP2aP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshPattern7(this, 'input_from_reused_addr_share'),
8633
8798
  activeReusedAddrCount: create_1m1w1y24hBlockPattern(this, 'active_reused_addr_count'),
8634
- activeReusedAddrShare: {
8635
- block: createSeriesPattern18(this, 'active_reused_addr_share'),
8636
- _24h: createSeriesPattern1(this, 'active_reused_addr_share_average_24h'),
8637
- _1w: createSeriesPattern1(this, 'active_reused_addr_share_average_1w'),
8638
- _1m: createSeriesPattern1(this, 'active_reused_addr_share_average_1m'),
8639
- _1y: createSeriesPattern1(this, 'active_reused_addr_share_average_1y'),
8640
- },
8799
+ activeReusedAddrShare: create_1m1w1y24hBlockPattern2(this, 'active_reused_addr_share'),
8800
+ },
8801
+ supply: {
8802
+ all: createBtcCentsSatsUsdPattern(this, 'reused_addr_supply'),
8803
+ p2pk65: createBtcCentsSatsUsdPattern(this, 'p2pk65_reused_addr_supply'),
8804
+ p2pk33: createBtcCentsSatsUsdPattern(this, 'p2pk33_reused_addr_supply'),
8805
+ p2pkh: createBtcCentsSatsUsdPattern(this, 'p2pkh_reused_addr_supply'),
8806
+ p2sh: createBtcCentsSatsUsdPattern(this, 'p2sh_reused_addr_supply'),
8807
+ p2wpkh: createBtcCentsSatsUsdPattern(this, 'p2wpkh_reused_addr_supply'),
8808
+ p2wsh: createBtcCentsSatsUsdPattern(this, 'p2wsh_reused_addr_supply'),
8809
+ p2tr: createBtcCentsSatsUsdPattern(this, 'p2tr_reused_addr_supply'),
8810
+ p2a: createBtcCentsSatsUsdPattern(this, 'p2a_reused_addr_supply'),
8811
+ share: createAllP2aP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshPattern5(this, 'reused_addr_supply_share'),
8812
+ },
8813
+ },
8814
+ respent: {
8815
+ count: createFundedTotalPattern(this, 'respent_addr_count'),
8816
+ events: {
8817
+ outputToReusedAddrCount: createAllP2aP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshPattern6(this, 'output_to_respent_addr_count'),
8818
+ outputToReusedAddrShare: createAllP2aP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshPattern7(this, 'output_to_respent_addr_share'),
8819
+ spendableOutputToReusedAddrShare: create_1m1w1y24hBpsPercentRatioPattern(this, 'spendable_output_to_respent_addr_share'),
8820
+ inputFromReusedAddrCount: createAllP2aP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshPattern6(this, 'input_from_respent_addr_count'),
8821
+ inputFromReusedAddrShare: createAllP2aP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshPattern7(this, 'input_from_respent_addr_share'),
8822
+ activeReusedAddrCount: create_1m1w1y24hBlockPattern(this, 'active_respent_addr_count'),
8823
+ activeReusedAddrShare: create_1m1w1y24hBlockPattern2(this, 'active_respent_addr_share'),
8824
+ },
8825
+ supply: {
8826
+ all: createBtcCentsSatsUsdPattern(this, 'respent_addr_supply'),
8827
+ p2pk65: createBtcCentsSatsUsdPattern(this, 'p2pk65_respent_addr_supply'),
8828
+ p2pk33: createBtcCentsSatsUsdPattern(this, 'p2pk33_respent_addr_supply'),
8829
+ p2pkh: createBtcCentsSatsUsdPattern(this, 'p2pkh_respent_addr_supply'),
8830
+ p2sh: createBtcCentsSatsUsdPattern(this, 'p2sh_respent_addr_supply'),
8831
+ p2wpkh: createBtcCentsSatsUsdPattern(this, 'p2wpkh_respent_addr_supply'),
8832
+ p2wsh: createBtcCentsSatsUsdPattern(this, 'p2wsh_respent_addr_supply'),
8833
+ p2tr: createBtcCentsSatsUsdPattern(this, 'p2tr_respent_addr_supply'),
8834
+ p2a: createBtcCentsSatsUsdPattern(this, 'p2a_respent_addr_supply'),
8835
+ share: createAllP2aP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshPattern5(this, 'respent_addr_supply_share'),
8641
8836
  },
8642
8837
  },
8643
8838
  exposed: {
8644
8839
  count: createFundedTotalPattern(this, 'exposed_addr_count'),
8645
8840
  supply: {
8646
- all: createBtcCentsSatsUsdPattern(this, 'exposed_supply'),
8647
- p2pk65: createBtcCentsSatsUsdPattern(this, 'p2pk65_exposed_supply'),
8648
- p2pk33: createBtcCentsSatsUsdPattern(this, 'p2pk33_exposed_supply'),
8649
- p2pkh: createBtcCentsSatsUsdPattern(this, 'p2pkh_exposed_supply'),
8650
- p2sh: createBtcCentsSatsUsdPattern(this, 'p2sh_exposed_supply'),
8651
- p2wpkh: createBtcCentsSatsUsdPattern(this, 'p2wpkh_exposed_supply'),
8652
- p2wsh: createBtcCentsSatsUsdPattern(this, 'p2wsh_exposed_supply'),
8653
- p2tr: createBtcCentsSatsUsdPattern(this, 'p2tr_exposed_supply'),
8654
- p2a: createBtcCentsSatsUsdPattern(this, 'p2a_exposed_supply'),
8655
- share: {
8656
- all: createBpsPercentRatioPattern2(this, 'exposed_supply_share'),
8657
- p2pk65: createBpsPercentRatioPattern2(this, 'p2pk65_exposed_supply_share'),
8658
- p2pk33: createBpsPercentRatioPattern2(this, 'p2pk33_exposed_supply_share'),
8659
- p2pkh: createBpsPercentRatioPattern2(this, 'p2pkh_exposed_supply_share'),
8660
- p2sh: createBpsPercentRatioPattern2(this, 'p2sh_exposed_supply_share'),
8661
- p2wpkh: createBpsPercentRatioPattern2(this, 'p2wpkh_exposed_supply_share'),
8662
- p2wsh: createBpsPercentRatioPattern2(this, 'p2wsh_exposed_supply_share'),
8663
- p2tr: createBpsPercentRatioPattern2(this, 'p2tr_exposed_supply_share'),
8664
- p2a: createBpsPercentRatioPattern2(this, 'p2a_exposed_supply_share'),
8665
- },
8841
+ all: createBtcCentsSatsUsdPattern(this, 'exposed_addr_supply'),
8842
+ p2pk65: createBtcCentsSatsUsdPattern(this, 'p2pk65_exposed_addr_supply'),
8843
+ p2pk33: createBtcCentsSatsUsdPattern(this, 'p2pk33_exposed_addr_supply'),
8844
+ p2pkh: createBtcCentsSatsUsdPattern(this, 'p2pkh_exposed_addr_supply'),
8845
+ p2sh: createBtcCentsSatsUsdPattern(this, 'p2sh_exposed_addr_supply'),
8846
+ p2wpkh: createBtcCentsSatsUsdPattern(this, 'p2wpkh_exposed_addr_supply'),
8847
+ p2wsh: createBtcCentsSatsUsdPattern(this, 'p2wsh_exposed_addr_supply'),
8848
+ p2tr: createBtcCentsSatsUsdPattern(this, 'p2tr_exposed_addr_supply'),
8849
+ p2a: createBtcCentsSatsUsdPattern(this, 'p2a_exposed_addr_supply'),
8850
+ share: createAllP2aP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshPattern5(this, 'exposed_addr_supply_share'),
8666
8851
  },
8667
8852
  },
8668
8853
  delta: {
@@ -11463,6 +11648,24 @@ class BrkClient extends BrkClientBase {
11463
11648
  return this.getJson(path, { signal, onUpdate });
11464
11649
  }
11465
11650
 
11651
+ /**
11652
+ * RBF replacement history
11653
+ *
11654
+ * Returns the RBF replacement tree for a transaction, if any. Both `replacements` and `replaces` are null when the tx has no known RBF history within the mempool monitor's retention window.
11655
+ *
11656
+ * *[Mempool.space docs](https://mempool.space/docs/api/rest#get-transaction-rbf-history)*
11657
+ *
11658
+ * Endpoint: `GET /api/v1/tx/{txid}/rbf`
11659
+ *
11660
+ * @param {Txid} txid
11661
+ * @param {{ signal?: AbortSignal, onUpdate?: (value: RbfResponse) => void }} [options]
11662
+ * @returns {Promise<RbfResponse>}
11663
+ */
11664
+ async getTxRbf(txid, { signal, onUpdate } = {}) {
11665
+ const path = `/api/v1/tx/${txid}/rbf`;
11666
+ return this.getJson(path, { signal, onUpdate });
11667
+ }
11668
+
11466
11669
  /**
11467
11670
  * Validate address
11468
11671
  *
package/package.json CHANGED
@@ -40,5 +40,5 @@
40
40
  "url": "git+https://github.com/bitcoinresearchkit/brk.git"
41
41
  },
42
42
  "type": "module",
43
- "version": "0.3.0-beta.4"
43
+ "version": "0.3.0-beta.6"
44
44
  }