@leather.io/models 0.26.1 → 0.26.3

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.
@@ -1,5 +1,5 @@
1
1
 
2
- > @leather.io/models@0.26.1 build /home/runner/work/mono/mono/packages/models
2
+ > @leather.io/models@0.26.3 build /home/runner/work/mono/mono/packages/models
3
3
  > tsup
4
4
 
5
5
  CLI Building entry: src/index.ts
@@ -10,7 +10,7 @@ CLI Target: es2022
10
10
  ESM Build start
11
11
  ESM dist/index.js 11.88 KB
12
12
  ESM dist/index.js.map 25.30 KB
13
- ESM ⚡️ Build success in 18ms
13
+ ESM ⚡️ Build success in 17ms
14
14
  DTS Build start
15
- DTS ⚡️ Build success in 1227ms
16
- DTS dist/index.d.ts 20.45 KB
15
+ DTS ⚡️ Build success in 1261ms
16
+ DTS dist/index.d.ts 20.68 KB
package/CHANGELOG.md CHANGED
@@ -24,6 +24,29 @@
24
24
  * devDependencies
25
25
  * @leather.io/eslint-config bumped to 0.7.0
26
26
 
27
+ ## [0.26.3](https://github.com/leather-io/mono/compare/@leather.io/models-v0.26.2...@leather.io/models-v0.26.3) (2025-02-25)
28
+
29
+
30
+ ### Bug Fixes
31
+
32
+ * fix error asserting minimum spend amount ([2c3700f](https://github.com/leather-io/mono/commit/2c3700fd50ba4fa57d84d73f9de3598cfb0e28bc))
33
+
34
+ ## [0.26.2](https://github.com/leather-io/mono/compare/@leather.io/models-v0.26.1...@leather.io/models-v0.26.2) (2025-02-21)
35
+
36
+
37
+ ### Bug Fixes
38
+
39
+ * upgrade prettier ([5a1577c](https://github.com/leather-io/mono/commit/5a1577cc382b4399d427dbf049d1f1d08d984f33))
40
+ * upgrade typescript ([14b91ee](https://github.com/leather-io/mono/commit/14b91ee484d89d25399af7b3e9144e1b4e6a48a7))
41
+
42
+
43
+ ### Dependencies
44
+
45
+ * The following workspace dependencies were updated
46
+ * devDependencies
47
+ * @leather.io/prettier-config bumped to 0.6.1
48
+ * @leather.io/tsconfig-config bumped to 0.6.1
49
+
27
50
  ## [0.26.1](https://github.com/leather-io/mono/compare/@leather.io/models-v0.26.0...@leather.io/models-v0.26.1) (2025-02-21)
28
51
 
29
52
 
package/dist/index.d.ts CHANGED
@@ -2,6 +2,9 @@ import BigNumber from 'bignumber.js';
2
2
  import { z } from 'zod';
3
3
  import { MempoolTransaction, Transaction } from '@stacks/stacks-blockchain-api-types';
4
4
 
5
+ type BitcoinAddress = string & {
6
+ readonly __brand: unique symbol;
7
+ };
5
8
  type BitcoinUnit = 'bitcoin' | 'satoshi';
6
9
  type BitcoinUnitSymbol = 'BTC' | 'sat';
7
10
  interface BitcoinUnitInfo {
@@ -543,6 +546,8 @@ interface FtTransfer {
543
546
  recipient?: string;
544
547
  }
545
548
 
549
+ type TransactionErrorKey = 'InvalidAddress' | 'InsufficientFunds' | 'InvalidNetworkAddress' | 'InvalidPrecision';
550
+
546
551
  interface UtxoId {
547
552
  txid: string;
548
553
  vout: number;
@@ -554,4 +559,4 @@ interface Utxo extends UtxoId {
554
559
  value: string;
555
560
  }
556
561
 
557
- export { type AccountDisplayPreference, type AccountDisplayPreferenceInfo, type AllowAdditionalProperties, type AnalyticsPreference, type AverageBitcoinFeeRates, BESTINSLOT_API_BASE_URL_MAINNET, BESTINSLOT_API_BASE_URL_TESTNET, BITCOIN_API_BASE_URL_MAINNET, BITCOIN_API_BASE_URL_SIGNET, BITCOIN_API_BASE_URL_TESTNET3, BITCOIN_API_BASE_URL_TESTNET4, BNS_V2_API_BASE_URL, type BaseCryptoAssetBalance, type BaseCryptoAssetInfo, type BitcoinChainConfig, type BitcoinNetwork, type BitcoinNetworkModes, type BitcoinTransactionVectorInput, type BitcoinTransactionVectorOutput, type BitcoinTx, type BitcoinUnit, type BitcoinUnitInfo, type BitcoinUnitSymbol, type Blockchain, type Brc20CryptoAssetInfo, type BtcCryptoAssetBalance, type BtcCryptoAssetInfo, BtcFeeType, ChainId, type CryptoAssetBalance, CryptoAssetCategories, type CryptoAssetCategory, type CryptoAssetChain, CryptoAssetChains, type CryptoAssetInfo, type CryptoAssetProtocol, CryptoAssetProtocols, type CryptoCurrency, type Currency, type DefaultNetworkConfigurations, type EmailAddress, type Entries, FeeCalculationTypes, FeeTypes, type Fees, type FiatCurrency, type FtTransfer, type FungibleCryptoAssetInfo, HIRO_API_BASE_URL_MAINNET, HIRO_API_BASE_URL_MAINNET_EXTENDED, HIRO_API_BASE_URL_NAKAMOTO_TESTNET, HIRO_API_BASE_URL_TESTNET, HIRO_API_BASE_URL_TESTNET_EXTENDED, HIRO_INSCRIPTIONS_API_URL, type Inscription, type InscriptionCryptoAssetInfo, type InscriptionMimeType, type LiteralUnion, type MarketData, type Money, type NativeCryptoAssetInfo, type NetworkConfiguration, type NetworkModes, type NonFungibleCryptoAssetInfo, type NumType, type Prettify, type ReplaceTypes, type RuneCryptoAssetInfo, STX20_API_BASE_URL_MAINNET, type Sip10CryptoAssetInfo, type Sip9CryptoAssetInfo, type Src20CryptoAssetInfo, type StacksChainConfig, type StacksFeeEstimate, type StacksTx, type StacksTxStatus, type StampCryptoAssetInfo, type Stx20CryptoAssetInfo, type StxCryptoAssetBalance, type StxCryptoAssetInfo, type StxTransfer, type SupportedBlockchains, type Utxo, type UtxoId, type ValueOf, WalletDefaultNetworkConfigurationIds, bitcoinNetworkModesSchema, bitcoinNetworkSchema, bitcoinNetworkToNetworkMode, bitcoinNetworks, btcTxTimeMap, createInscription, createMarketData, createMarketPair, defaultCurrentNetwork, defaultNetworksKeyedById, emailAddressSchema, formatMarketPair, inscriptionMimeTypes, networkConfigurationSchema, networkModes, supportedBlockchains, testnetModes, whenInscriptionMimeType };
562
+ export { type AccountDisplayPreference, type AccountDisplayPreferenceInfo, type AllowAdditionalProperties, type AnalyticsPreference, type AverageBitcoinFeeRates, BESTINSLOT_API_BASE_URL_MAINNET, BESTINSLOT_API_BASE_URL_TESTNET, BITCOIN_API_BASE_URL_MAINNET, BITCOIN_API_BASE_URL_SIGNET, BITCOIN_API_BASE_URL_TESTNET3, BITCOIN_API_BASE_URL_TESTNET4, BNS_V2_API_BASE_URL, type BaseCryptoAssetBalance, type BaseCryptoAssetInfo, type BitcoinAddress, type BitcoinChainConfig, type BitcoinNetwork, type BitcoinNetworkModes, type BitcoinTransactionVectorInput, type BitcoinTransactionVectorOutput, type BitcoinTx, type BitcoinUnit, type BitcoinUnitInfo, type BitcoinUnitSymbol, type Blockchain, type Brc20CryptoAssetInfo, type BtcCryptoAssetBalance, type BtcCryptoAssetInfo, BtcFeeType, ChainId, type CryptoAssetBalance, CryptoAssetCategories, type CryptoAssetCategory, type CryptoAssetChain, CryptoAssetChains, type CryptoAssetInfo, type CryptoAssetProtocol, CryptoAssetProtocols, type CryptoCurrency, type Currency, type DefaultNetworkConfigurations, type EmailAddress, type Entries, FeeCalculationTypes, FeeTypes, type Fees, type FiatCurrency, type FtTransfer, type FungibleCryptoAssetInfo, HIRO_API_BASE_URL_MAINNET, HIRO_API_BASE_URL_MAINNET_EXTENDED, HIRO_API_BASE_URL_NAKAMOTO_TESTNET, HIRO_API_BASE_URL_TESTNET, HIRO_API_BASE_URL_TESTNET_EXTENDED, HIRO_INSCRIPTIONS_API_URL, type Inscription, type InscriptionCryptoAssetInfo, type InscriptionMimeType, type LiteralUnion, type MarketData, type Money, type NativeCryptoAssetInfo, type NetworkConfiguration, type NetworkModes, type NonFungibleCryptoAssetInfo, type NumType, type Prettify, type ReplaceTypes, type RuneCryptoAssetInfo, STX20_API_BASE_URL_MAINNET, type Sip10CryptoAssetInfo, type Sip9CryptoAssetInfo, type Src20CryptoAssetInfo, type StacksChainConfig, type StacksFeeEstimate, type StacksTx, type StacksTxStatus, type StampCryptoAssetInfo, type Stx20CryptoAssetInfo, type StxCryptoAssetBalance, type StxCryptoAssetInfo, type StxTransfer, type SupportedBlockchains, type TransactionErrorKey, type Utxo, type UtxoId, type ValueOf, WalletDefaultNetworkConfigurationIds, bitcoinNetworkModesSchema, bitcoinNetworkSchema, bitcoinNetworkToNetworkMode, bitcoinNetworks, btcTxTimeMap, createInscription, createMarketData, createMarketPair, defaultCurrentNetwork, defaultNetworksKeyedById, emailAddressSchema, formatMarketPair, inscriptionMimeTypes, networkConfigurationSchema, networkModes, supportedBlockchains, testnetModes, whenInscriptionMimeType };
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@leather.io/models",
3
3
  "author": "Leather.io contact@leather.io",
4
4
  "description": "Leather models and types",
5
- "version": "0.26.1",
5
+ "version": "0.26.3",
6
6
  "license": "MIT",
7
7
  "homepage": "https://github.com/leather-io/mono/tree/dev/packages/models",
8
8
  "repository": {
@@ -21,11 +21,11 @@
21
21
  "zod": "3.24.1"
22
22
  },
23
23
  "devDependencies": {
24
- "prettier": "3.3.3",
24
+ "prettier": "3.5.1",
25
25
  "tsup": "8.1.0",
26
- "typescript": "5.5.4",
27
- "@leather.io/prettier-config": "0.6.0",
28
- "@leather.io/tsconfig-config": "0.6.0"
26
+ "typescript": "5.7.3",
27
+ "@leather.io/prettier-config": "0.6.1",
28
+ "@leather.io/tsconfig-config": "0.6.1"
29
29
  },
30
30
  "keywords": [
31
31
  "leather",
@@ -1,3 +1,6 @@
1
+ // Branded type for Bitcoin addresses
2
+ export type BitcoinAddress = string & { readonly __brand: unique symbol };
3
+
1
4
  export type BitcoinUnit = 'bitcoin' | 'satoshi';
2
5
 
3
6
  export type BitcoinUnitSymbol = 'BTC' | 'sat';
package/src/index.ts CHANGED
@@ -1,4 +1,4 @@
1
- export * from './bitcoin-unit.model';
1
+ export * from './crypto-assets/bitcoin/bitcoin.model';
2
2
  export * from './crypto-assets/crypto-asset-balance.model';
3
3
  export * from './crypto-assets/crypto-asset-info.model';
4
4
  export * from './crypto-assets/bitcoin/inscription.model';
@@ -15,4 +15,5 @@ export * from './network/network.schema';
15
15
  export * from './settings.model';
16
16
  export * from './transactions/bitcoin-transaction.model';
17
17
  export * from './transactions/stacks-transaction.model';
18
+ export * from './transactions/transaction-error.model';
18
19
  export * from './utxo.model';
@@ -0,0 +1,5 @@
1
+ export type TransactionErrorKey =
2
+ | 'InvalidAddress'
3
+ | 'InsufficientFunds'
4
+ | 'InvalidNetworkAddress'
5
+ | 'InvalidPrecision';