@pioneer-platform/utxo-network 8.11.10 → 8.11.12
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/CHANGELOG.md +18 -0
- package/lib/index.js +17 -0
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @pioneer-platform/utxo-network
|
|
2
2
|
|
|
3
|
+
## 8.11.12
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- cache work
|
|
8
|
+
- Updated dependencies
|
|
9
|
+
- @pioneer-platform/blockbook@8.11.2
|
|
10
|
+
- @pioneer-platform/unchained@8.11.3
|
|
11
|
+
|
|
12
|
+
## 8.11.11
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- cache work
|
|
17
|
+
- Updated dependencies
|
|
18
|
+
- @pioneer-platform/blockbook@8.11.1
|
|
19
|
+
- @pioneer-platform/unchained@8.11.2
|
|
20
|
+
|
|
3
21
|
## 8.11.10
|
|
4
22
|
|
|
5
23
|
### Patch Changes
|
package/lib/index.js
CHANGED
|
@@ -505,7 +505,22 @@ let get_utxos_by_xpub = async function (coin, xpub) {
|
|
|
505
505
|
let get_balance_by_xpub = async function (coin, xpub) {
|
|
506
506
|
let tag = TAG + " | get_balance_by_xpub | ";
|
|
507
507
|
try {
|
|
508
|
+
const isBitcoin = coin === 'BTC';
|
|
509
|
+
if (isBitcoin)
|
|
510
|
+
log.info(tag, '🔍 [BITCOIN] Calling blockbook.utxosByXpub with:', {
|
|
511
|
+
coin,
|
|
512
|
+
xpub: xpub.substring(0, 20) + '...'
|
|
513
|
+
});
|
|
508
514
|
let output = await blockbook.utxosByXpub(coin, xpub);
|
|
515
|
+
if (isBitcoin)
|
|
516
|
+
log.info(tag, '🔍 [BITCOIN] Blockbook response:', {
|
|
517
|
+
utxoCount: output.length,
|
|
518
|
+
utxos: output.map((u) => ({
|
|
519
|
+
value: u.value,
|
|
520
|
+
confirmations: u.confirmations,
|
|
521
|
+
txid: u.txid?.substring(0, 16) + '...'
|
|
522
|
+
}))
|
|
523
|
+
});
|
|
509
524
|
log.info(tag, "output: ", output);
|
|
510
525
|
let balance = 0;
|
|
511
526
|
//tally
|
|
@@ -513,6 +528,8 @@ let get_balance_by_xpub = async function (coin, xpub) {
|
|
|
513
528
|
let uxto = output[i];
|
|
514
529
|
balance = balance + parseInt(uxto.value);
|
|
515
530
|
}
|
|
531
|
+
if (isBitcoin)
|
|
532
|
+
log.info(tag, '🔍 [BITCOIN] Total balance (satoshis):', balance);
|
|
516
533
|
return balance;
|
|
517
534
|
}
|
|
518
535
|
catch (e) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pioneer-platform/utxo-network",
|
|
3
|
-
"version": "8.11.
|
|
3
|
+
"version": "8.11.12",
|
|
4
4
|
"main": "./lib/index.js",
|
|
5
5
|
"types": "./lib/index.d.ts",
|
|
6
6
|
"scripts": {
|
|
@@ -11,11 +11,11 @@
|
|
|
11
11
|
"build:live": "nodemon --watch 'src/**/*.ts' --exec 'ts-node' src/index.ts"
|
|
12
12
|
},
|
|
13
13
|
"dependencies": {
|
|
14
|
-
"@pioneer-platform/blockbook": "^8.11.
|
|
14
|
+
"@pioneer-platform/blockbook": "^8.11.2",
|
|
15
15
|
"@pioneer-platform/loggerdog": "^8.11.0",
|
|
16
|
-
"@pioneer-platform/nodes": "8.11.10",
|
|
16
|
+
"@pioneer-platform/nodes": "^8.11.10",
|
|
17
17
|
"@pioneer-platform/pioneer-caip": "^9.10.0",
|
|
18
|
-
"@pioneer-platform/unchained": "^8.11.
|
|
18
|
+
"@pioneer-platform/unchained": "^8.11.3",
|
|
19
19
|
"@types/request-promise-native": "^1.0.17",
|
|
20
20
|
"@xchainjs/xchain-client": "^0.7.0",
|
|
21
21
|
"@xchainjs/xchain-util": "^0.2.6",
|
|
@@ -34,4 +34,4 @@
|
|
|
34
34
|
"typescript": "^5.0.4"
|
|
35
35
|
},
|
|
36
36
|
"gitHead": "a76012f6693a12181c4744e53e977a9eaeef0ed3"
|
|
37
|
-
}
|
|
37
|
+
}
|