brk-client 0.3.0-beta.5 → 0.3.0-beta.7
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 +75 -5
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -379,7 +379,7 @@ Matches mempool.space/bitcoin-cli behavior.
|
|
|
379
379
|
* @property {(VSize|null)=} adjustedVsize - Adjusted virtual size (accounting for sigops)
|
|
380
380
|
*/
|
|
381
381
|
/**
|
|
382
|
-
*
|
|
382
|
+
* Range parameters with output format for API query parameters.
|
|
383
383
|
*
|
|
384
384
|
* @typedef {Object} DataRangeFormat
|
|
385
385
|
* @property {(RangeIndex|null)=} start - Inclusive start: integer index, date (YYYY-MM-DD), or timestamp (ISO 8601). Negative integers count from end. Aliases: `from`, `f`, `s`
|
|
@@ -789,7 +789,7 @@ Matches mempool.space/bitcoin-cli behavior.
|
|
|
789
789
|
/**
|
|
790
790
|
* URL-friendly mining pool identifier
|
|
791
791
|
*
|
|
792
|
-
* @typedef {("unknown"|"blockfills"|"ultimuspool"|"terrapool"|"luxor"|"onethash"|"btccom"|"bitfarms"|"huobipool"|"wayicn"|"canoepool"|"btctop"|"bitcoincom"|"pool175btc"|"gbminers"|"axbt"|"asicminer"|"bitminter"|"bitcoinrussia"|"btcserv"|"simplecoinus"|"btcguild"|"eligius"|"ozcoin"|"eclipsemc"|"maxbtc"|"triplemining"|"coinlab"|"pool50btc"|"ghashio"|"stminingcorp"|"bitparking"|"mmpool"|"polmine"|"kncminer"|"bitalo"|"f2pool"|"hhtt"|"megabigpower"|"mtred"|"nmcbit"|"yourbtcnet"|"givemecoins"|"braiinspool"|"antpool"|"multicoinco"|"bcpoolio"|"cointerra"|"kanopool"|"solock"|"ckpool"|"nicehash"|"bitclub"|"bitcoinaffiliatenetwork"|"btcc"|"bwpool"|"exxbw"|"bitsolo"|"bitfury"|"twentyoneinc"|"digitalbtc"|"eightbaochi"|"mybtccoinpool"|"tbdice"|"hashpool"|"nexious"|"bravomining"|"hotpool"|"okexpool"|"bcmonster"|"onehash"|"bixin"|"tatmaspool"|"viabtc"|"connectbtc"|"batpool"|"waterhole"|"dcexploration"|"dcex"|"btpool"|"fiftyeightcoin"|"bitcoinindia"|"shawnp0wers"|"phashio"|"rigpool"|"haozhuzhu"|"sevenpool"|"miningkings"|"hashbx"|"dpool"|"rawpool"|"haominer"|"helix"|"bitcoinukraine"|"poolin"|"secretsuperstar"|"tigerpoolnet"|"sigmapoolcom"|"okpooltop"|"hummerpool"|"tangpool"|"bytepool"|"spiderpool"|"novablock"|"miningcity"|"binancepool"|"minerium"|"lubiancom"|"okkong"|"aaopool"|"emcdpool"|"foundryusa"|"sbicrypto"|"arkpool"|"purebtccom"|"marapool"|"kucoinpool"|"entrustcharitypool"|"okminer"|"titan"|"pegapool"|"btcnuggets"|"cloudhashing"|"digitalxmintsy"|"telco214"|"btcpoolparty"|"multipool"|"transactioncoinmining"|"btcdig"|"trickysbtcpool"|"btcmp"|"eobot"|"unomp"|"patels"|"gogreenlight"|"bitcoinindiapool"|"ekanembtc"|"canoe"|"tiger"|"onem1x"|"zulupool"|"secpool"|"ocean"|"whitepool"|"wiz"|"wk057"|"futurebitapollosolo"|"carbonnegative"|"portlandhodl"|"phoenix"|"neopool"|"maxipool"|"bitfufupool"|"gdpool"|"miningdutch"|"publicpool"|"miningsquared"|"innopolistech"|"btclab"|"parasite"|"redrockpool"|"est3lar"|"braiinssolo"|"solopool")} PoolSlug
|
|
792
|
+
* @typedef {("unknown"|"blockfills"|"ultimuspool"|"terrapool"|"luxor"|"onethash"|"btccom"|"bitfarms"|"huobipool"|"wayicn"|"canoepool"|"btctop"|"bitcoincom"|"pool175btc"|"gbminers"|"axbt"|"asicminer"|"bitminter"|"bitcoinrussia"|"btcserv"|"simplecoinus"|"btcguild"|"eligius"|"ozcoin"|"eclipsemc"|"maxbtc"|"triplemining"|"coinlab"|"pool50btc"|"ghashio"|"stminingcorp"|"bitparking"|"mmpool"|"polmine"|"kncminer"|"bitalo"|"f2pool"|"hhtt"|"megabigpower"|"mtred"|"nmcbit"|"yourbtcnet"|"givemecoins"|"braiinspool"|"antpool"|"multicoinco"|"bcpoolio"|"cointerra"|"kanopool"|"solock"|"ckpool"|"nicehash"|"bitclub"|"bitcoinaffiliatenetwork"|"btcc"|"bwpool"|"exxbw"|"bitsolo"|"bitfury"|"twentyoneinc"|"digitalbtc"|"eightbaochi"|"mybtccoinpool"|"tbdice"|"hashpool"|"nexious"|"bravomining"|"hotpool"|"okexpool"|"bcmonster"|"onehash"|"bixin"|"tatmaspool"|"viabtc"|"connectbtc"|"batpool"|"waterhole"|"dcexploration"|"dcex"|"btpool"|"fiftyeightcoin"|"bitcoinindia"|"shawnp0wers"|"phashio"|"rigpool"|"haozhuzhu"|"sevenpool"|"miningkings"|"hashbx"|"dpool"|"rawpool"|"haominer"|"helix"|"bitcoinukraine"|"poolin"|"secretsuperstar"|"tigerpoolnet"|"sigmapoolcom"|"okpooltop"|"hummerpool"|"tangpool"|"bytepool"|"spiderpool"|"novablock"|"miningcity"|"binancepool"|"minerium"|"lubiancom"|"okkong"|"aaopool"|"emcdpool"|"foundryusa"|"sbicrypto"|"arkpool"|"purebtccom"|"marapool"|"kucoinpool"|"entrustcharitypool"|"okminer"|"titan"|"pegapool"|"btcnuggets"|"cloudhashing"|"digitalxmintsy"|"telco214"|"btcpoolparty"|"multipool"|"transactioncoinmining"|"btcdig"|"trickysbtcpool"|"btcmp"|"eobot"|"unomp"|"patels"|"gogreenlight"|"bitcoinindiapool"|"ekanembtc"|"canoe"|"tiger"|"onem1x"|"zulupool"|"secpool"|"ocean"|"whitepool"|"wiz"|"wk057"|"futurebitapollosolo"|"carbonnegative"|"portlandhodl"|"phoenix"|"neopool"|"maxipool"|"bitfufupool"|"gdpool"|"miningdutch"|"publicpool"|"miningsquared"|"innopolistech"|"btclab"|"parasite"|"redrockpool"|"est3lar"|"braiinssolo"|"solopool"|"noderunners")} PoolSlug
|
|
793
793
|
*/
|
|
794
794
|
/**
|
|
795
795
|
* Mining pool slug + block height path parameters
|
|
@@ -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 {
|
|
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
|
|
|
@@ -6365,6 +6414,7 @@ function createTransferPattern(client, acc) {
|
|
|
6365
6414
|
* @property {BlocksDominancePattern} est3lar
|
|
6366
6415
|
* @property {BlocksDominancePattern} braiinssolo
|
|
6367
6416
|
* @property {BlocksDominancePattern} solopool
|
|
6417
|
+
* @property {BlocksDominancePattern} noderunners
|
|
6368
6418
|
*/
|
|
6369
6419
|
|
|
6370
6420
|
/**
|
|
@@ -7222,7 +7272,7 @@ function createTransferPattern(client, acc) {
|
|
|
7222
7272
|
* @extends BrkClientBase
|
|
7223
7273
|
*/
|
|
7224
7274
|
class BrkClient extends BrkClientBase {
|
|
7225
|
-
VERSION = "v0.3.0-beta.
|
|
7275
|
+
VERSION = "v0.3.0-beta.7";
|
|
7226
7276
|
|
|
7227
7277
|
INDEXES = /** @type {const} */ ([
|
|
7228
7278
|
"minute10",
|
|
@@ -7424,7 +7474,8 @@ class BrkClient extends BrkClientBase {
|
|
|
7424
7474
|
"redrockpool": "RedRock Pool",
|
|
7425
7475
|
"est3lar": "Est3lar",
|
|
7426
7476
|
"braiinssolo": "Braiins Solo",
|
|
7427
|
-
"solopool": "SoloPool.com"
|
|
7477
|
+
"solopool": "SoloPool.com",
|
|
7478
|
+
"noderunners": "Noderunners"
|
|
7428
7479
|
});
|
|
7429
7480
|
|
|
7430
7481
|
TERM_NAMES = /** @type {const} */ ({
|
|
@@ -9501,6 +9552,7 @@ class BrkClient extends BrkClientBase {
|
|
|
9501
9552
|
est3lar: createBlocksDominancePattern(this, 'est3lar'),
|
|
9502
9553
|
braiinssolo: createBlocksDominancePattern(this, 'braiinssolo'),
|
|
9503
9554
|
solopool: createBlocksDominancePattern(this, 'solopool'),
|
|
9555
|
+
noderunners: createBlocksDominancePattern(this, 'noderunners'),
|
|
9504
9556
|
},
|
|
9505
9557
|
},
|
|
9506
9558
|
prices: {
|
|
@@ -11599,6 +11651,24 @@ class BrkClient extends BrkClientBase {
|
|
|
11599
11651
|
return this.getJson(path, { signal, onUpdate });
|
|
11600
11652
|
}
|
|
11601
11653
|
|
|
11654
|
+
/**
|
|
11655
|
+
* RBF replacement history
|
|
11656
|
+
*
|
|
11657
|
+
* 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.
|
|
11658
|
+
*
|
|
11659
|
+
* *[Mempool.space docs](https://mempool.space/docs/api/rest#get-transaction-rbf-history)*
|
|
11660
|
+
*
|
|
11661
|
+
* Endpoint: `GET /api/v1/tx/{txid}/rbf`
|
|
11662
|
+
*
|
|
11663
|
+
* @param {Txid} txid
|
|
11664
|
+
* @param {{ signal?: AbortSignal, onUpdate?: (value: RbfResponse) => void }} [options]
|
|
11665
|
+
* @returns {Promise<RbfResponse>}
|
|
11666
|
+
*/
|
|
11667
|
+
async getTxRbf(txid, { signal, onUpdate } = {}) {
|
|
11668
|
+
const path = `/api/v1/tx/${txid}/rbf`;
|
|
11669
|
+
return this.getJson(path, { signal, onUpdate });
|
|
11670
|
+
}
|
|
11671
|
+
|
|
11602
11672
|
/**
|
|
11603
11673
|
* Validate address
|
|
11604
11674
|
*
|
package/package.json
CHANGED