@node-dlc/bitcoin
Advanced tools
Comparing version 0.22.6 to 0.23.0
@@ -78,2 +78,8 @@ import { ICloneable } from './ICloneable'; | ||
/** | ||
* Converts the value to a standard JavaScript number. This is safe | ||
* for values that are within the Number.MAX_SAFE_INTEGER range. | ||
* @returns {number} The value as a number. | ||
*/ | ||
toNumber(): number; | ||
/** | ||
* Returns true if the current value is equal to the other value | ||
@@ -80,0 +86,0 @@ * @param other |
@@ -108,2 +108,10 @@ "use strict"; | ||
/** | ||
* Converts the value to a standard JavaScript number. This is safe | ||
* for values that are within the Number.MAX_SAFE_INTEGER range. | ||
* @returns {number} The value as a number. | ||
*/ | ||
toNumber() { | ||
return Number(this._picoSats / BigInt(1e12)); // Convert picosatoshis to satoshis and then to a number | ||
} | ||
/** | ||
* Returns true if the current value is equal to the other value | ||
@@ -110,0 +118,0 @@ * @param other |
@@ -123,2 +123,11 @@ import { BitcoinError, BitcoinErrorCode } from '.'; | ||
/** | ||
* Converts the value to a standard JavaScript number. This is safe | ||
* for values that are within the Number.MAX_SAFE_INTEGER range. | ||
* @returns {number} The value as a number. | ||
*/ | ||
public toNumber(): number { | ||
return Number(this._picoSats / BigInt(1e12)); // Convert picosatoshis to satoshis and then to a number | ||
} | ||
/** | ||
* Returns true if the current value is equal to the other value | ||
@@ -125,0 +134,0 @@ * @param other |
{ | ||
"name": "@node-dlc/bitcoin", | ||
"version": "0.22.6", | ||
"version": "0.23.0", | ||
"description": "DLC bitcoin", | ||
@@ -27,3 +27,3 @@ "scripts": { | ||
}, | ||
"gitHead": "c8a078f5cfa19025b1f99d4f30d81b958362c5ae" | ||
"gitHead": "896e77ea5caca60c20f2d9b40c10b1cfdda4f2be" | ||
} |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
214844
1920