@pioneer-platform/utxo-network 8.12.10 → 8.12.13

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 CHANGED
@@ -1,5 +1,31 @@
1
1
  # @pioneer-platform/utxo-network
2
2
 
3
+ ## 8.12.13
4
+
5
+ ### Patch Changes
6
+
7
+ - chore: zcash working!
8
+ - Updated dependencies
9
+ - @pioneer-platform/blockbook@8.12.14
10
+ - @pioneer-platform/pioneer-caip@9.10.5
11
+ - @pioneer-platform/nodes@8.11.14
12
+
13
+ ## 8.12.12
14
+
15
+ ### Patch Changes
16
+
17
+ - chore: zcash working!
18
+ - Updated dependencies
19
+ - @pioneer-platform/blockbook@8.12.13
20
+ - @pioneer-platform/pioneer-caip@9.10.4
21
+ - @pioneer-platform/nodes@8.11.13
22
+
23
+ ## 8.12.11
24
+
25
+ ### Patch Changes
26
+
27
+ - chore: chore: update dependencies to fix DGB fees and node deactivation bug
28
+
3
29
  ## 8.12.10
4
30
 
5
31
  ### Patch Changes
package/lib/index.js CHANGED
@@ -298,7 +298,25 @@ let get_fees_with_rates = async function (coin, memo) {
298
298
  let tag = TAG + " | get_fees_with_rates | ";
299
299
  try {
300
300
  let output = {};
301
- let txFee = await sochain.getSuggestedTxFee(coin.toLowerCase());
301
+ const coinLower = coin.toLowerCase();
302
+ // HARDCODE DGB FEES - Minimum relay fee is 22,600 sats (~100 sat/byte for 226 byte tx)
303
+ // SoChain API returns unreliable fees for DGB
304
+ if (coinLower === 'dgb') {
305
+ console.log(`${tag} Using hardcoded fees for DigiByte (100-150 sat/byte - min relay: 22,600 sats)`);
306
+ const rates = {
307
+ fastest: 150,
308
+ fast: 120,
309
+ average: 100,
310
+ };
311
+ const fees = {
312
+ type: 'byte',
313
+ fast: Utils.calcFee(rates.fast, memo),
314
+ average: Utils.calcFee(rates.average, memo),
315
+ fastest: Utils.calcFee(rates.fastest, memo),
316
+ };
317
+ return { fees, rates };
318
+ }
319
+ let txFee = await sochain.getSuggestedTxFee(coinLower);
302
320
  console.log("txFee (raw): ", txFee);
303
321
  // Apply reasonable caps for specific coins to prevent absurdly high fees
304
322
  // BitGo API sometimes returns stale or incorrect data
@@ -307,9 +325,7 @@ let get_fees_with_rates = async function (coin, memo) {
307
325
  'ltc': 200, // LTC reasonable cap
308
326
  'bch': 10, // BCH typically has very low fees
309
327
  'dash': 10, // DASH typically has low fees
310
- 'dgb': 150, // DGB requires higher min relay fee (22,600 sats)
311
328
  };
312
- const coinLower = coin.toLowerCase();
313
329
  if (feeCapsBySatPerByte[coinLower] && txFee > feeCapsBySatPerByte[coinLower]) {
314
330
  console.warn(`${tag} Fee rate ${txFee} sat/byte for ${coin} exceeds reasonable cap of ${feeCapsBySatPerByte[coinLower]} sat/byte. Capping to reasonable value.`);
315
331
  txFee = feeCapsBySatPerByte[coinLower] / 2; // Use half the cap as a conservative default
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pioneer-platform/utxo-network",
3
- "version": "8.12.10",
3
+ "version": "8.12.13",
4
4
  "main": "./lib/index.js",
5
5
  "types": "./lib/index.d.ts",
6
6
  "scripts": {
@@ -11,10 +11,10 @@
11
11
  "build:live": "nodemon --watch 'src/**/*.ts' --exec 'ts-node' src/index.ts"
12
12
  },
13
13
  "dependencies": {
14
- "@pioneer-platform/blockbook": "^8.12.11",
14
+ "@pioneer-platform/blockbook": "^8.12.14",
15
15
  "@pioneer-platform/loggerdog": "^8.11.0",
16
- "@pioneer-platform/nodes": "^8.11.12",
17
- "@pioneer-platform/pioneer-caip": "^9.10.2",
16
+ "@pioneer-platform/nodes": "^8.11.14",
17
+ "@pioneer-platform/pioneer-caip": "^9.10.5",
18
18
  "@pioneer-platform/unchained": "^8.12.1",
19
19
  "@types/request-promise-native": "^1.0.17",
20
20
  "@xchainjs/xchain-client": "^0.7.0",