Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

@leather.io/utils

Package Overview
Dependencies
Maintainers
1
Versions
121
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@leather.io/utils - npm Package Compare versions

Comparing version
0.45.0
to
0.46.0
+6
-6
.turbo/turbo-build.log
> @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 @@

ESM Build start
ESM dist/index.js 72.96 KB
ESM dist/index.js.map 138.38 KB
ESM ⚡️ Build success in 49ms
ESM dist/index.js 73.21 KB
ESM dist/index.js.map 138.83 KB
ESM ⚡️ Build success in 36ms
DTS Build start
DTS ⚡️ Build success in 2203ms
DTS dist/index.d.ts 14.69 KB
DTS ⚡️ Build success in 2399ms
DTS dist/index.d.ts 14.88 KB

@@ -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 @@

@@ -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 };

@@ -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