@leather.io/utils
Advanced tools
| > @leather.io/utils@0.45.0 build /home/runner/work/mono/mono/packages/utils | ||
| > @leather.io/utils@0.46.0 build /home/runner/work/mono/mono/packages/utils | ||
| > tsup | ||
@@ -11,7 +11,7 @@ | ||
| [34mESM[39m Build start | ||
| [32mESM[39m [1mdist/index.js [22m[32m72.96 KB[39m | ||
| [32mESM[39m [1mdist/index.js.map [22m[32m138.38 KB[39m | ||
| [32mESM[39m ⚡️ Build success in 49ms | ||
| [32mESM[39m [1mdist/index.js [22m[32m73.21 KB[39m | ||
| [32mESM[39m [1mdist/index.js.map [22m[32m138.83 KB[39m | ||
| [32mESM[39m ⚡️ Build success in 36ms | ||
| [34mDTS[39m Build start | ||
| [32mDTS[39m ⚡️ Build success in 2203ms | ||
| [32mDTS[39m [1mdist/index.d.ts [22m[32m14.69 KB[39m | ||
| [32mDTS[39m ⚡️ Build success in 2399ms | ||
| [32mDTS[39m [1mdist/index.d.ts [22m[32m14.88 KB[39m |
+15
-0
@@ -342,2 +342,17 @@ # Changelog | ||
| ## [0.46.0](https://github.com/leather-io/mono/compare/@leather.io/utils-v0.45.0...@leather.io/utils-v0.46.0) (2025-09-26) | ||
| ### Features | ||
| * create swap service ([168dcbf](https://github.com/leather-io/mono/commit/168dcbfde42ceda8ffd8982d1191d7ce6de70b2f)) | ||
| ### Dependencies | ||
| * The following workspace dependencies were updated | ||
| * dependencies | ||
| * @leather.io/constants bumped to 0.25.4 | ||
| * @leather.io/models bumped to 0.42.0 | ||
| ## [0.45.0](https://github.com/leather-io/mono/compare/@leather.io/utils-v0.44.1...@leather.io/utils-v0.45.0) (2025-09-10) | ||
@@ -344,0 +359,0 @@ |
+3
-1
@@ -102,2 +102,4 @@ import BigNumber, { BigNumber as BigNumber$1 } from 'bignumber.js'; | ||
| declare function matchesAssetId(asset: CryptoAsset, assetId: CryptoAssetId): boolean; | ||
| declare function isSameAssetId(assetId1: CryptoAssetId, assetId2: CryptoAssetId): boolean; | ||
| declare function isSameAsset(asset1: CryptoAsset, asset2: CryptoAsset): boolean; | ||
| declare function getAssetId(asset: CryptoAsset): CryptoAssetId; | ||
@@ -287,2 +289,2 @@ type SerializedCryptoAssetId = `${string}|${string}`; | ||
| export { type CreateInscriptionData, type FormatAmountOptions, type SerializedCryptoAssetId, aggregateBaseCryptoAssetBalances, aggregateBtcBalances, aggregateStxBalances, assertExistence, assertIsTruthy, assertUnreachable, baseCurrencyAmountInQuote, baseCurrencyAmountInQuoteWithFallback, btcToSat, calculateMeanAverage, capitalize, convertAmountToBaseUnit, convertAmountToFractionalUnit, convertToMoneyTypeWithDefaultOfZero, countDecimals, createAccountAddresses, createBaseCryptoAssetBalance, createBtcBalance, createCounter, createCurrencyFormatter, createInscriptionAsset, createMoney, createMoneyFromDecimal, createNullArrayOfLength, createNumArrayOfRange, createStxBalance, dateToUnixTimestamp, daysInMs, daysInSec, defaultWalletKeyId, delay, deserializeAssetId, ensureArray, extractPhraseFromString, fibonacciGenerator, fiveMinInMs, flattenObject, getAssetDisplayName, getAssetId, getTicker, hasBitcoinAddress, hasStacksAddress, hexToNumber, hoursInMs, hoursInSec, increaseValueByOneMicroStx, initBigNumber, invertExchangeRate, isBigInt, isBoolean, isDefined, isEmpty, isEmptyArray, isEmptyString, isError, isEven, isFiatCurrencyCode, isFulfilled, isFunction, isHexString, isMoney, isMoneyGreaterThanZero, isNumber, isNumberOrNumberList, isObject, isRejected, isString, isTypedArray, isUndefined, isValidPrecision, makeNumberRange, makeStacksTxExplorerLink, mapObject, match, matchesAssetId, maxMoney, microStxToStx, migratePositiveAssetBalancesToTop, minMoney, minutesInMs, minutesInSec, moneyToBaseUnit, noop, oneDayInMs, oneMinInMs, oneWeekInMs, propIfDefined, pxStringToNumber, quoteCurrencyAmountToBase, rebaseMarketData, removeTrailingNullCharacters, reverseBytes, safelyFormatHexTxid, sanitizeContent, satToBtc, scaleValue, secondsInMs, serializeAssetId, sortAssetsByName, spamFilter, stxToMicroStx, subtractMoney, sumMoney, sumNumbers, toHexString, truncateMiddle, undefinedIfLengthZero, uniqueArray, unitToFractionalUnit, weeksInMs, weeksInSec, whenInscriptionMimeType, whenNetwork }; | ||
| export { type CreateInscriptionData, type FormatAmountOptions, type SerializedCryptoAssetId, aggregateBaseCryptoAssetBalances, aggregateBtcBalances, aggregateStxBalances, assertExistence, assertIsTruthy, assertUnreachable, baseCurrencyAmountInQuote, baseCurrencyAmountInQuoteWithFallback, btcToSat, calculateMeanAverage, capitalize, convertAmountToBaseUnit, convertAmountToFractionalUnit, convertToMoneyTypeWithDefaultOfZero, countDecimals, createAccountAddresses, createBaseCryptoAssetBalance, createBtcBalance, createCounter, createCurrencyFormatter, createInscriptionAsset, createMoney, createMoneyFromDecimal, createNullArrayOfLength, createNumArrayOfRange, createStxBalance, dateToUnixTimestamp, daysInMs, daysInSec, defaultWalletKeyId, delay, deserializeAssetId, ensureArray, extractPhraseFromString, fibonacciGenerator, fiveMinInMs, flattenObject, getAssetDisplayName, getAssetId, getTicker, hasBitcoinAddress, hasStacksAddress, hexToNumber, hoursInMs, hoursInSec, increaseValueByOneMicroStx, initBigNumber, invertExchangeRate, isBigInt, isBoolean, isDefined, isEmpty, isEmptyArray, isEmptyString, isError, isEven, isFiatCurrencyCode, isFulfilled, isFunction, isHexString, isMoney, isMoneyGreaterThanZero, isNumber, isNumberOrNumberList, isObject, isRejected, isSameAsset, isSameAssetId, isString, isTypedArray, isUndefined, isValidPrecision, makeNumberRange, makeStacksTxExplorerLink, mapObject, match, matchesAssetId, maxMoney, microStxToStx, migratePositiveAssetBalancesToTop, minMoney, minutesInMs, minutesInSec, moneyToBaseUnit, noop, oneDayInMs, oneMinInMs, oneWeekInMs, propIfDefined, pxStringToNumber, quoteCurrencyAmountToBase, rebaseMarketData, removeTrailingNullCharacters, reverseBytes, safelyFormatHexTxid, sanitizeContent, satToBtc, scaleValue, secondsInMs, serializeAssetId, sortAssetsByName, spamFilter, stxToMicroStx, subtractMoney, sumMoney, sumNumbers, toHexString, truncateMiddle, undefinedIfLengthZero, uniqueArray, unitToFractionalUnit, weeksInMs, weeksInSec, whenInscriptionMimeType, whenNetwork }; |
+3
-3
@@ -5,3 +5,3 @@ { | ||
| "description": "Shared bitcoin utilities", | ||
| "version": "0.45.0", | ||
| "version": "0.46.0", | ||
| "license": "MIT", | ||
@@ -23,4 +23,4 @@ "homepage": "https://github.com/leather-io/mono/tree/dev/packages/utils", | ||
| "dompurify": "3.2.4", | ||
| "@leather.io/constants": "0.25.3", | ||
| "@leather.io/models": "0.41.0" | ||
| "@leather.io/constants": "0.25.4", | ||
| "@leather.io/models": "0.42.0" | ||
| }, | ||
@@ -27,0 +27,0 @@ "devDependencies": { |
@@ -15,2 +15,10 @@ import { | ||
| export function isSameAssetId(assetId1: CryptoAssetId, assetId2: CryptoAssetId) { | ||
| return assetId1.protocol === assetId2.protocol && assetId1.id === assetId2.id; | ||
| } | ||
| export function isSameAsset(asset1: CryptoAsset, asset2: CryptoAsset) { | ||
| return isSameAssetId(getAssetId(asset1), getAssetId(asset2)); | ||
| } | ||
| export function getAssetId(asset: CryptoAsset): CryptoAssetId { | ||
@@ -17,0 +25,0 @@ switch (asset.protocol) { |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
417998
0.4%9204
0.17%+ Added
+ Added
- Removed
- Removed
Updated
Updated