@leather.io/models 0.24.3 → 0.25.0

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.24.3 build /home/runner/work/mono/mono/packages/models
2
+ > @leather.io/models@0.25.0 build /home/runner/work/mono/mono/packages/models
3
3
  > tsup
4
4
 
5
5
  CLI Building entry: src/index.ts
@@ -9,8 +9,8 @@ CLI Using tsup config: /home/runner/work/mono/mono/packages/models/tsup.config.t
9
9
  CLI Target: es2022
10
10
  ESM Build start
11
11
  ESM dist/index.js 11.88 KB
12
- ESM dist/index.js.map 24.95 KB
13
- ESM ⚡️ Build success in 33ms
12
+ ESM dist/index.js.map 25.30 KB
13
+ ESM ⚡️ Build success in 18ms
14
14
  DTS Build start
15
- DTS ⚡️ Build success in 1212ms
16
- DTS dist/index.d.ts 19.74 KB
15
+ DTS ⚡️ Build success in 1192ms
16
+ DTS dist/index.d.ts 20.41 KB
package/CHANGELOG.md CHANGED
@@ -24,6 +24,13 @@
24
24
  * devDependencies
25
25
  * @leather.io/eslint-config bumped to 0.7.0
26
26
 
27
+ ## [0.25.0](https://github.com/leather-io/mono/compare/@leather.io/models-v0.24.3...@leather.io/models-v0.25.0) (2025-01-15)
28
+
29
+
30
+ ### Features
31
+
32
+ * utxos service ([1216c4b](https://github.com/leather-io/mono/commit/1216c4bfd34bb50bac4287320a51005215c3dea4))
33
+
27
34
  ## [0.24.3](https://github.com/leather-io/mono/compare/@leather.io/models-v0.24.2...@leather.io/models-v0.24.3) (2025-01-07)
28
35
 
29
36
 
package/dist/index.d.ts CHANGED
@@ -67,6 +67,10 @@ interface BtcCryptoAssetBalance extends BaseCryptoAssetBalance {
67
67
  * Balance across UTXOs with need for larger fee than principal by UTXO given standard rate
68
68
  */
69
69
  readonly uneconomicalBalance: Money;
70
+ /**
71
+ * Balance of the union set of protected and uneconomical UTXOs
72
+ */
73
+ readonly unspendableBalance: Money;
70
74
  }
71
75
  interface StxCryptoAssetBalance extends BaseCryptoAssetBalance {
72
76
  /**
@@ -212,6 +216,17 @@ interface InscriptionCryptoAssetInfo extends BaseNonFungibleCryptoAssetInfo {
212
216
  readonly id: string;
213
217
  readonly mimeType: InscriptionMimeType;
214
218
  readonly number: number;
219
+ readonly preview: string;
220
+ readonly src: string;
221
+ readonly title: string;
222
+ readonly output: string;
223
+ readonly txid: string;
224
+ readonly offset: string;
225
+ readonly address: string;
226
+ readonly genesisBlockHash: string;
227
+ readonly genesisTimestamp: number;
228
+ readonly genesisBlockHeight: number;
229
+ readonly value: string;
215
230
  }
216
231
  interface StampCryptoAssetInfo extends BaseNonFungibleCryptoAssetInfo {
217
232
  readonly chain: 'bitcoin';
@@ -525,4 +540,16 @@ interface FtTransfer {
525
540
  recipient?: string;
526
541
  }
527
542
 
528
- 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 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 ValueOf, WalletDefaultNetworkConfigurationIds, bitcoinNetworkModesSchema, bitcoinNetworkSchema, bitcoinNetworkToNetworkMode, bitcoinNetworks, btcTxTimeMap, createInscription, createMarketData, createMarketPair, defaultCurrentNetwork, defaultNetworksKeyedById, emailAddressSchema, formatMarketPair, inscriptionMimeTypes, networkConfigurationSchema, networkModes, supportedBlockchains, testnetModes, whenInscriptionMimeType };
543
+ interface UtxoId {
544
+ txid: string;
545
+ vout: number;
546
+ }
547
+ interface Utxo extends UtxoId {
548
+ height?: number;
549
+ confirmations?: number;
550
+ address: string;
551
+ path: string;
552
+ value: string;
553
+ }
554
+
555
+ 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 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 };
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/crypto-assets/crypto-asset-info.model.ts","../src/network/network.model.ts","../src/crypto-assets/bitcoin/inscription.model.ts","../src/fees/bitcoin-fees.model.ts","../src/fees/fees.model.ts","../src/market.model.ts","../src/network/network.schema.ts","../src/settings.model.ts"],"sourcesContent":["import { InscriptionMimeType } from './bitcoin/inscription.model';\n\nexport const CryptoAssetChains = {\n bitcoin: 'bitcoin',\n stacks: 'stacks',\n} as const;\nexport const CryptoAssetCategories = {\n fungible: 'fungible',\n nft: 'nft',\n} as const;\nexport const CryptoAssetProtocols = {\n nativeBtc: 'nativeBtc',\n nativeStx: 'nativeStx',\n sip10: 'sip10',\n brc20: 'brc20',\n src20: 'src20',\n stx20: 'stx20',\n rune: 'rune',\n stamp: 'stamp',\n sip9: 'sip9',\n inscription: 'inscription',\n} as const;\n\nexport type CryptoAssetChain = keyof typeof CryptoAssetChains;\nexport type CryptoAssetCategory = keyof typeof CryptoAssetCategories;\nexport type CryptoAssetProtocol = keyof typeof CryptoAssetProtocols;\n\nexport interface BaseCryptoAssetInfo {\n readonly chain: CryptoAssetChain;\n readonly category: CryptoAssetCategory;\n readonly protocol: CryptoAssetProtocol;\n}\n\n// Fungible asset types\ninterface BaseFungibleCryptoAssetInfo extends BaseCryptoAssetInfo {\n readonly category: 'fungible';\n readonly symbol: string;\n readonly decimals: number;\n readonly hasMemo: boolean;\n}\nexport interface BtcCryptoAssetInfo extends BaseFungibleCryptoAssetInfo {\n readonly chain: 'bitcoin';\n readonly protocol: 'nativeBtc';\n readonly symbol: 'BTC';\n}\nexport interface StxCryptoAssetInfo extends BaseFungibleCryptoAssetInfo {\n readonly chain: 'stacks';\n readonly protocol: 'nativeStx';\n readonly symbol: 'STX';\n}\nexport interface Brc20CryptoAssetInfo extends BaseFungibleCryptoAssetInfo {\n readonly chain: 'bitcoin';\n readonly protocol: 'brc20';\n readonly symbol: string;\n}\nexport interface Src20CryptoAssetInfo extends BaseFungibleCryptoAssetInfo {\n readonly chain: 'bitcoin';\n readonly protocol: 'src20';\n readonly id: string;\n readonly symbol: string;\n readonly deploy_tx: string;\n readonly deploy_img: string;\n}\nexport interface RuneCryptoAssetInfo extends BaseFungibleCryptoAssetInfo {\n readonly chain: 'bitcoin';\n readonly protocol: 'rune';\n readonly spacedRuneName: string;\n readonly runeName: string;\n readonly symbol: string;\n}\nexport interface Sip10CryptoAssetInfo extends BaseFungibleCryptoAssetInfo {\n readonly chain: 'stacks';\n readonly protocol: 'sip10';\n readonly name: string;\n readonly canTransfer: boolean;\n readonly contractId: string;\n readonly imageCanonicalUri: string;\n readonly symbol: string;\n}\nexport interface Stx20CryptoAssetInfo extends BaseFungibleCryptoAssetInfo {\n readonly chain: 'stacks';\n readonly protocol: 'stx20';\n readonly symbol: string;\n}\nexport type NativeCryptoAssetInfo = BtcCryptoAssetInfo | StxCryptoAssetInfo;\nexport type FungibleCryptoAssetInfo =\n | NativeCryptoAssetInfo\n | Sip10CryptoAssetInfo\n | Brc20CryptoAssetInfo\n | Src20CryptoAssetInfo\n | Stx20CryptoAssetInfo\n | RuneCryptoAssetInfo;\n\n// NFT asset types\ninterface BaseNonFungibleCryptoAssetInfo extends BaseCryptoAssetInfo {\n readonly category: 'nft';\n}\nexport interface InscriptionCryptoAssetInfo extends BaseNonFungibleCryptoAssetInfo {\n readonly chain: 'bitcoin';\n readonly protocol: 'inscription';\n readonly id: string;\n readonly mimeType: InscriptionMimeType;\n readonly number: number;\n}\n\nexport interface StampCryptoAssetInfo extends BaseNonFungibleCryptoAssetInfo {\n readonly chain: 'bitcoin';\n readonly protocol: 'stamp';\n readonly stamp: number;\n readonly stampUrl: string;\n}\nexport interface Sip9CryptoAssetInfo extends BaseNonFungibleCryptoAssetInfo {\n readonly chain: 'stacks';\n readonly protocol: 'sip9';\n readonly name: string;\n readonly contractId: string;\n readonly imageCanonicalUri: string;\n}\nexport type NonFungibleCryptoAssetInfo =\n | InscriptionCryptoAssetInfo\n | StampCryptoAssetInfo\n | Sip9CryptoAssetInfo;\n\nexport type CryptoAssetInfo = FungibleCryptoAssetInfo | NonFungibleCryptoAssetInfo;\n","import { z } from 'zod';\n\nimport { Blockchain } from '../types';\nimport { networkConfigurationSchema } from './network.schema';\n\nexport const HIRO_API_BASE_URL_MAINNET = 'https://api.hiro.so';\nexport const HIRO_API_BASE_URL_TESTNET = 'https://api.testnet.hiro.so';\nexport const HIRO_INSCRIPTIONS_API_URL = 'https://api.hiro.so/ordinals/v1/inscriptions';\nexport const HIRO_API_BASE_URL_NAKAMOTO_TESTNET = 'https://api.nakamoto.testnet.hiro.so';\n\nexport const HIRO_API_BASE_URL_MAINNET_EXTENDED = 'https://api.hiro.so/extended/v1';\nexport const HIRO_API_BASE_URL_TESTNET_EXTENDED = 'https://api.testnet.hiro.so/extended';\n\nexport const BITCOIN_API_BASE_URL_MAINNET = 'https://leather.mempool.space/api';\nexport const BITCOIN_API_BASE_URL_TESTNET3 = 'https://leather.mempool.space/testnet/api';\nexport const BITCOIN_API_BASE_URL_TESTNET4 = 'https://leather.mempool.space/testnet4/api';\nexport const BITCOIN_API_BASE_URL_SIGNET = 'https://mempool.space/signet/api';\n\nexport const BESTINSLOT_API_BASE_URL_MAINNET = 'https://leatherapi.bestinslot.xyz/v3';\nexport const BESTINSLOT_API_BASE_URL_TESTNET = 'https://leatherapi_testnet.bestinslot.xyz/v3';\n\nexport const STX20_API_BASE_URL_MAINNET = 'https://api.stx20.com/api/v1';\n\nexport const BNS_V2_API_BASE_URL = 'https://api.bnsv2.com';\n\n// Copied from @stacks/transactions to avoid dependencies\nexport enum ChainID {\n Testnet = 2147483648,\n Mainnet = 1,\n}\n\nexport enum WalletDefaultNetworkConfigurationIds {\n mainnet = 'mainnet',\n testnet = 'testnet',\n testnet4 = 'testnet4',\n signet = 'signet',\n sbtcTestnet = 'sbtcTestnet',\n sbtcDevenv = 'sbtcDevenv',\n devnet = 'devnet',\n}\n\nexport type DefaultNetworkConfigurations = keyof typeof WalletDefaultNetworkConfigurationIds;\n\nexport const supportedBlockchains = ['stacks', 'bitcoin'] as const;\n\nexport type SupportedBlockchains = (typeof supportedBlockchains)[number];\n\nexport const networkModes = ['mainnet', 'testnet'] as const;\nexport const testnetModes = ['testnet', 'regtest', 'signet'] as const;\n\nexport const bitcoinNetworks = ['mainnet', 'testnet3', 'testnet4', 'regtest', 'signet'] as const;\nexport type BitcoinNetwork = (typeof bitcoinNetworks)[number];\n\nexport type NetworkModes = (typeof networkModes)[number];\ntype BitcoinTestnetModes = (typeof testnetModes)[number];\n\nexport function bitcoinNetworkToNetworkMode(network: BitcoinNetwork): BitcoinNetworkModes {\n switch (network) {\n case 'mainnet':\n return 'mainnet';\n case 'testnet3':\n return 'testnet';\n case 'testnet4':\n return 'testnet';\n case 'regtest':\n return 'regtest';\n case 'signet':\n return 'signet';\n default:\n // TODO: Needs exhaustive check. Cannot import 'assertUnreachable' since 'utils' package depends on 'models'.\n // Ideally this function should live in utils, but it's currently widely used in the extension.\n throw new Error(`Unhandled case: ${network}`);\n }\n}\n\nexport type BitcoinNetworkModes = NetworkModes | BitcoinTestnetModes;\n\ninterface BaseChainConfig {\n blockchain: Blockchain;\n}\n\nexport interface BitcoinChainConfig extends BaseChainConfig {\n blockchain: 'bitcoin';\n bitcoinUrl: string;\n bitcoinNetwork: BitcoinNetwork;\n mode: BitcoinNetworkModes;\n}\n\nexport interface StacksChainConfig extends BaseChainConfig {\n blockchain: 'stacks';\n url: string;\n /** The chainId of the network (or parent network if this is a subnet) */\n chainId: ChainID;\n /** An additional chainId for subnets. Indicated a subnet if defined and is mainly used for signing. */\n subnetChainId?: ChainID;\n}\n\nexport type NetworkConfiguration = z.infer<typeof networkConfigurationSchema>;\n\nconst networkMainnet: NetworkConfiguration = {\n id: WalletDefaultNetworkConfigurationIds.mainnet,\n name: 'Mainnet',\n chain: {\n stacks: {\n blockchain: 'stacks',\n chainId: ChainID.Mainnet,\n url: HIRO_API_BASE_URL_MAINNET,\n },\n bitcoin: {\n blockchain: 'bitcoin',\n bitcoinNetwork: 'mainnet',\n mode: 'mainnet',\n bitcoinUrl: BITCOIN_API_BASE_URL_MAINNET,\n },\n },\n};\n\nconst networkTestnet: NetworkConfiguration = {\n id: WalletDefaultNetworkConfigurationIds.testnet,\n name: 'Testnet3',\n chain: {\n stacks: {\n blockchain: 'stacks',\n chainId: ChainID.Testnet,\n url: HIRO_API_BASE_URL_TESTNET,\n },\n bitcoin: {\n blockchain: 'bitcoin',\n bitcoinNetwork: 'testnet3',\n mode: 'testnet',\n bitcoinUrl: BITCOIN_API_BASE_URL_TESTNET3,\n },\n },\n};\n\nconst networkTestnet4: NetworkConfiguration = {\n id: WalletDefaultNetworkConfigurationIds.testnet4,\n name: 'Testnet4',\n chain: {\n stacks: {\n blockchain: 'stacks',\n chainId: ChainID.Testnet,\n url: HIRO_API_BASE_URL_TESTNET,\n },\n bitcoin: {\n blockchain: 'bitcoin',\n bitcoinNetwork: 'testnet4',\n mode: 'testnet',\n bitcoinUrl: BITCOIN_API_BASE_URL_TESTNET4,\n },\n },\n};\n\nconst networkSignet: NetworkConfiguration = {\n id: WalletDefaultNetworkConfigurationIds.signet,\n name: 'Signet',\n chain: {\n stacks: {\n blockchain: 'stacks',\n chainId: ChainID.Testnet,\n url: HIRO_API_BASE_URL_TESTNET,\n },\n bitcoin: {\n blockchain: 'bitcoin',\n bitcoinNetwork: 'signet',\n mode: 'signet',\n bitcoinUrl: BITCOIN_API_BASE_URL_SIGNET,\n },\n },\n};\n\nconst networkSbtcTestnet: NetworkConfiguration = {\n id: WalletDefaultNetworkConfigurationIds.sbtcTestnet,\n name: 'sBTC Testnet',\n chain: {\n stacks: {\n blockchain: 'stacks',\n chainId: ChainID.Testnet,\n url: HIRO_API_BASE_URL_TESTNET,\n },\n bitcoin: {\n blockchain: 'bitcoin',\n bitcoinNetwork: 'regtest',\n mode: 'regtest',\n bitcoinUrl: 'https://beta.sbtc-mempool.tech/api/proxy',\n },\n },\n};\n\nconst networkSbtcDevenv: NetworkConfiguration = {\n id: WalletDefaultNetworkConfigurationIds.sbtcDevenv,\n name: 'sBTC Devenv',\n chain: {\n stacks: {\n blockchain: 'stacks',\n chainId: ChainID.Testnet,\n url: 'http://localhost:3999',\n },\n bitcoin: {\n blockchain: 'bitcoin',\n bitcoinNetwork: 'regtest',\n mode: 'regtest',\n bitcoinUrl: 'http://localhost:3000/api/proxy',\n },\n },\n};\n\nconst networkDevnet: NetworkConfiguration = {\n id: WalletDefaultNetworkConfigurationIds.devnet,\n name: 'Devnet',\n chain: {\n stacks: {\n blockchain: 'stacks',\n chainId: ChainID.Testnet,\n url: 'http://localhost:3999',\n },\n bitcoin: {\n blockchain: 'bitcoin',\n bitcoinNetwork: 'regtest',\n mode: 'regtest',\n bitcoinUrl: 'http://localhost:18443',\n },\n },\n};\n\nexport const defaultCurrentNetwork: NetworkConfiguration = networkMainnet;\n\nexport const defaultNetworksKeyedById: Record<\n WalletDefaultNetworkConfigurationIds,\n NetworkConfiguration\n> = {\n [WalletDefaultNetworkConfigurationIds.mainnet]: networkMainnet,\n [WalletDefaultNetworkConfigurationIds.testnet4]: networkTestnet4,\n [WalletDefaultNetworkConfigurationIds.testnet]: networkTestnet,\n [WalletDefaultNetworkConfigurationIds.signet]: networkSignet,\n [WalletDefaultNetworkConfigurationIds.sbtcTestnet]: networkSbtcTestnet,\n [WalletDefaultNetworkConfigurationIds.sbtcDevenv]: networkSbtcDevenv,\n [WalletDefaultNetworkConfigurationIds.devnet]: networkDevnet,\n};\n","import { HIRO_INSCRIPTIONS_API_URL } from '../../network/network.model';\nimport {\n CryptoAssetCategories,\n CryptoAssetChains,\n CryptoAssetProtocols,\n InscriptionCryptoAssetInfo,\n} from '../crypto-asset-info.model';\n\n/**\n * Inscriptions contain arbitrary data. When retrieving an inscription, it should be\n * classified into one of the types below, indicating that the app can handle it\n * appropriately and securely. Inscriptions of types not ready to be handled by the\n * app should be classified as \"other\".\n */\nexport const inscriptionMimeTypes = [\n 'audio',\n 'gltf',\n 'html',\n 'image',\n 'svg',\n 'text',\n 'video',\n 'other',\n] as const;\n\nexport type InscriptionMimeType = (typeof inscriptionMimeTypes)[number];\n\nexport function whenInscriptionMimeType<T>(\n mimeType: string,\n branches: { [k in InscriptionMimeType]?: () => T }\n) {\n if (mimeType.startsWith('audio/') && branches.audio) {\n return branches.audio();\n }\n\n if (mimeType.startsWith('text/html') && branches.html) {\n return branches.html();\n }\n\n if (mimeType.startsWith('image/svg') && branches.svg) {\n return branches.svg();\n }\n\n if (mimeType.startsWith('image/') && branches.image) {\n return branches.image();\n }\n\n if (mimeType.startsWith('text') && branches.text) {\n return branches.text();\n }\n\n if (mimeType.startsWith('video/') && branches.video) {\n return branches.video();\n }\n\n if (mimeType.startsWith('model/gltf') && branches.gltf) {\n return branches.gltf();\n }\n\n if (branches.other) return branches.other();\n\n throw new Error('Unhandled inscription type');\n}\nexport interface Inscription extends InscriptionCryptoAssetInfo {\n preview: string;\n src: string;\n title: string;\n output: string;\n txid: string;\n offset: string;\n address: string;\n genesisBlockHash: string;\n genesisTimestamp: number;\n genesisBlockHeight: number;\n value: string;\n}\n\ninterface RawInscription {\n id: string;\n number: number;\n output: string;\n contentType: string;\n txid: string;\n offset: string;\n address: string;\n genesisBlockHash: string;\n genesisTimestamp: number;\n genesisBlockHeight: number;\n value: string;\n}\n\nexport function createInscription(inscription: RawInscription): Inscription {\n const contentSrc = `${HIRO_INSCRIPTIONS_API_URL}/${inscription.id}/content`;\n const iframeSrc = `https://ordinals.com/preview/${inscription.id}`;\n const preview = `https://ordinals.hiro.so/inscription/${inscription.id}`;\n const title = `Inscription ${inscription.number}`;\n\n const sharedInfo = {\n chain: CryptoAssetChains.bitcoin,\n category: CryptoAssetCategories.nft,\n protocol: CryptoAssetProtocols.inscription,\n id: inscription.id,\n number: inscription.number,\n output: inscription.output,\n txid: inscription.txid,\n offset: inscription.offset,\n address: inscription.address,\n genesisBlockHash: inscription.genesisBlockHash,\n genesisTimestamp: inscription.genesisTimestamp,\n genesisBlockHeight: inscription.genesisBlockHeight,\n value: inscription.value,\n preview,\n title,\n };\n\n return whenInscriptionMimeType<Inscription>(inscription.contentType, {\n audio: () => ({\n ...sharedInfo,\n mimeType: 'audio',\n name: 'inscription',\n src: iframeSrc,\n }),\n gltf: () => ({\n ...sharedInfo,\n mimeType: 'gltf',\n name: 'inscription',\n src: iframeSrc,\n }),\n html: () => ({\n ...sharedInfo,\n mimeType: 'html',\n name: 'inscription',\n src: iframeSrc,\n }),\n image: () => ({\n ...sharedInfo,\n mimeType: 'image',\n name: 'inscription',\n src: contentSrc,\n }),\n svg: () => ({\n ...sharedInfo,\n mimeType: 'svg',\n name: 'inscription',\n src: iframeSrc,\n }),\n text: () => ({\n ...sharedInfo,\n mimeType: 'text',\n name: 'inscription',\n src: contentSrc,\n }),\n video: () => ({\n ...sharedInfo,\n mimeType: 'video',\n name: 'inscription',\n src: iframeSrc,\n }),\n other: () => ({\n ...sharedInfo,\n mimeType: 'other',\n name: 'inscription',\n src: '',\n }),\n });\n}\n","import type BigNumber from 'bignumber.js';\n\nexport interface AverageBitcoinFeeRates {\n fastestFee: BigNumber;\n halfHourFee: BigNumber;\n hourFee: BigNumber;\n}\n\nexport const btcTxTimeMap: Record<keyof AverageBitcoinFeeRates, string> = {\n fastestFee: '~10 – 20min',\n halfHourFee: '~30 min',\n hourFee: '~1 hour+',\n};\n\nexport enum BtcFeeType {\n High = 'High',\n Standard = 'Standard',\n Low = 'Low',\n}\n","import { Blockchain } from '../types';\nimport { StacksFeeEstimate } from './stacks-fees.model';\n\nexport enum FeeTypes {\n Low,\n Middle,\n High,\n Custom,\n Unknown,\n}\n\nexport enum FeeCalculationTypes {\n Api = 'api',\n Default = 'default',\n DefaultSimulated = 'default-simulated',\n FeesCapped = 'fees-capped',\n TokenTransferSpecific = 'token-transfer-specific',\n}\n\nexport interface Fees {\n blockchain: Blockchain;\n estimates: StacksFeeEstimate[];\n calculation: FeeCalculationTypes;\n}\n","import type { CryptoCurrency, FiatCurrency } from './currencies.model';\nimport type { Money } from './money.model';\n\ninterface MarketPair {\n readonly base: CryptoCurrency;\n readonly quote: FiatCurrency;\n}\n\nexport function createMarketPair(base: CryptoCurrency, quote: FiatCurrency): MarketPair {\n return Object.freeze({ base, quote });\n}\n\nexport function formatMarketPair({ base, quote }: MarketPair) {\n return `${base}/${quote}`;\n}\n\nexport interface MarketData {\n readonly pair: MarketPair;\n readonly price: Money;\n}\n\nexport function createMarketData(pair: MarketPair, price: Money): MarketData {\n if (pair.quote !== price.symbol)\n throw new Error('Cannot create market data when price does not match quote');\n return Object.freeze({ pair, price });\n}\n","import { z } from 'zod';\n\nimport { bitcoinNetworks, networkModes, testnetModes } from './network.model';\n\nexport const bitcoinNetworkModesSchema = z.enum([...networkModes, ...testnetModes]);\n\nexport const bitcoinNetworkSchema = z.enum([...bitcoinNetworks]);\n\nexport const networkConfigurationSchema = z.object({\n name: z.string(),\n id: z.string(),\n chain: z.object({\n bitcoin: z.object({\n blockchain: z.literal('bitcoin'),\n bitcoinUrl: z.string(),\n bitcoinNetwork: bitcoinNetworkSchema,\n mode: bitcoinNetworkModesSchema,\n }),\n stacks: z.object({\n blockchain: z.literal('stacks'),\n url: z.string(),\n chainId: z.number(),\n subnetChainId: z.number().optional(),\n }),\n }),\n});\n","import { z } from 'zod';\n\nimport { Blockchain } from './types';\n\nexport type AccountDisplayPreference = 'native-segwit' | 'taproot' | 'bns' | 'stacks';\nexport interface AccountDisplayPreferenceInfo {\n type: AccountDisplayPreference;\n blockchain: Blockchain;\n name: string;\n}\n\nexport type AnalyticsPreference = 'consent-given' | 'rejects-tracking';\n\nexport const emailAddressSchema = z.string().email({ message: 'Invalid email address' });\nexport type EmailAddress = z.infer<typeof emailAddressSchema>;\n"],"mappings":";AAEO,IAAM,oBAAoB;AAAA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,qBAAqBA,GAAE,OAAO,EAAE,MAAM,EAAE,SAAS,wBAAwB,CAAC;","names":["ChainID","WalletDefaultNetworkConfigurationIds","BtcFeeType","FeeTypes","FeeCalculationTypes","z"]}
1
+ {"version":3,"sources":["../src/crypto-assets/crypto-asset-info.model.ts","../src/network/network.model.ts","../src/crypto-assets/bitcoin/inscription.model.ts","../src/fees/bitcoin-fees.model.ts","../src/fees/fees.model.ts","../src/market.model.ts","../src/network/network.schema.ts","../src/settings.model.ts"],"sourcesContent":["import { InscriptionMimeType } from './bitcoin/inscription.model';\n\nexport const CryptoAssetChains = {\n bitcoin: 'bitcoin',\n stacks: 'stacks',\n} as const;\nexport const CryptoAssetCategories = {\n fungible: 'fungible',\n nft: 'nft',\n} as const;\nexport const CryptoAssetProtocols = {\n nativeBtc: 'nativeBtc',\n nativeStx: 'nativeStx',\n sip10: 'sip10',\n brc20: 'brc20',\n src20: 'src20',\n stx20: 'stx20',\n rune: 'rune',\n stamp: 'stamp',\n sip9: 'sip9',\n inscription: 'inscription',\n} as const;\n\nexport type CryptoAssetChain = keyof typeof CryptoAssetChains;\nexport type CryptoAssetCategory = keyof typeof CryptoAssetCategories;\nexport type CryptoAssetProtocol = keyof typeof CryptoAssetProtocols;\n\nexport interface BaseCryptoAssetInfo {\n readonly chain: CryptoAssetChain;\n readonly category: CryptoAssetCategory;\n readonly protocol: CryptoAssetProtocol;\n}\n\n// Fungible asset types\ninterface BaseFungibleCryptoAssetInfo extends BaseCryptoAssetInfo {\n readonly category: 'fungible';\n readonly symbol: string;\n readonly decimals: number;\n readonly hasMemo: boolean;\n}\nexport interface BtcCryptoAssetInfo extends BaseFungibleCryptoAssetInfo {\n readonly chain: 'bitcoin';\n readonly protocol: 'nativeBtc';\n readonly symbol: 'BTC';\n}\nexport interface StxCryptoAssetInfo extends BaseFungibleCryptoAssetInfo {\n readonly chain: 'stacks';\n readonly protocol: 'nativeStx';\n readonly symbol: 'STX';\n}\nexport interface Brc20CryptoAssetInfo extends BaseFungibleCryptoAssetInfo {\n readonly chain: 'bitcoin';\n readonly protocol: 'brc20';\n readonly symbol: string;\n}\nexport interface Src20CryptoAssetInfo extends BaseFungibleCryptoAssetInfo {\n readonly chain: 'bitcoin';\n readonly protocol: 'src20';\n readonly id: string;\n readonly symbol: string;\n readonly deploy_tx: string;\n readonly deploy_img: string;\n}\nexport interface RuneCryptoAssetInfo extends BaseFungibleCryptoAssetInfo {\n readonly chain: 'bitcoin';\n readonly protocol: 'rune';\n readonly spacedRuneName: string;\n readonly runeName: string;\n readonly symbol: string;\n}\nexport interface Sip10CryptoAssetInfo extends BaseFungibleCryptoAssetInfo {\n readonly chain: 'stacks';\n readonly protocol: 'sip10';\n readonly name: string;\n readonly canTransfer: boolean;\n readonly contractId: string;\n readonly imageCanonicalUri: string;\n readonly symbol: string;\n}\nexport interface Stx20CryptoAssetInfo extends BaseFungibleCryptoAssetInfo {\n readonly chain: 'stacks';\n readonly protocol: 'stx20';\n readonly symbol: string;\n}\nexport type NativeCryptoAssetInfo = BtcCryptoAssetInfo | StxCryptoAssetInfo;\nexport type FungibleCryptoAssetInfo =\n | NativeCryptoAssetInfo\n | Sip10CryptoAssetInfo\n | Brc20CryptoAssetInfo\n | Src20CryptoAssetInfo\n | Stx20CryptoAssetInfo\n | RuneCryptoAssetInfo;\n\n// NFT asset types\ninterface BaseNonFungibleCryptoAssetInfo extends BaseCryptoAssetInfo {\n readonly category: 'nft';\n}\nexport interface InscriptionCryptoAssetInfo extends BaseNonFungibleCryptoAssetInfo {\n readonly chain: 'bitcoin';\n readonly protocol: 'inscription';\n readonly id: string;\n readonly mimeType: InscriptionMimeType;\n readonly number: number;\n // via Inscription Model\n readonly preview: string;\n readonly src: string;\n readonly title: string;\n readonly output: string;\n readonly txid: string;\n readonly offset: string;\n readonly address: string;\n readonly genesisBlockHash: string;\n readonly genesisTimestamp: number;\n readonly genesisBlockHeight: number;\n readonly value: string;\n}\n\nexport interface StampCryptoAssetInfo extends BaseNonFungibleCryptoAssetInfo {\n readonly chain: 'bitcoin';\n readonly protocol: 'stamp';\n readonly stamp: number;\n readonly stampUrl: string;\n}\nexport interface Sip9CryptoAssetInfo extends BaseNonFungibleCryptoAssetInfo {\n readonly chain: 'stacks';\n readonly protocol: 'sip9';\n readonly name: string;\n readonly contractId: string;\n readonly imageCanonicalUri: string;\n}\nexport type NonFungibleCryptoAssetInfo =\n | InscriptionCryptoAssetInfo\n | StampCryptoAssetInfo\n | Sip9CryptoAssetInfo;\n\nexport type CryptoAssetInfo = FungibleCryptoAssetInfo | NonFungibleCryptoAssetInfo;\n","import { z } from 'zod';\n\nimport { Blockchain } from '../types';\nimport { networkConfigurationSchema } from './network.schema';\n\nexport const HIRO_API_BASE_URL_MAINNET = 'https://api.hiro.so';\nexport const HIRO_API_BASE_URL_TESTNET = 'https://api.testnet.hiro.so';\nexport const HIRO_INSCRIPTIONS_API_URL = 'https://api.hiro.so/ordinals/v1/inscriptions';\nexport const HIRO_API_BASE_URL_NAKAMOTO_TESTNET = 'https://api.nakamoto.testnet.hiro.so';\n\nexport const HIRO_API_BASE_URL_MAINNET_EXTENDED = 'https://api.hiro.so/extended/v1';\nexport const HIRO_API_BASE_URL_TESTNET_EXTENDED = 'https://api.testnet.hiro.so/extended';\n\nexport const BITCOIN_API_BASE_URL_MAINNET = 'https://leather.mempool.space/api';\nexport const BITCOIN_API_BASE_URL_TESTNET3 = 'https://leather.mempool.space/testnet/api';\nexport const BITCOIN_API_BASE_URL_TESTNET4 = 'https://leather.mempool.space/testnet4/api';\nexport const BITCOIN_API_BASE_URL_SIGNET = 'https://mempool.space/signet/api';\n\nexport const BESTINSLOT_API_BASE_URL_MAINNET = 'https://leatherapi.bestinslot.xyz/v3';\nexport const BESTINSLOT_API_BASE_URL_TESTNET = 'https://leatherapi_testnet.bestinslot.xyz/v3';\n\nexport const STX20_API_BASE_URL_MAINNET = 'https://api.stx20.com/api/v1';\n\nexport const BNS_V2_API_BASE_URL = 'https://api.bnsv2.com';\n\n// Copied from @stacks/transactions to avoid dependencies\nexport enum ChainID {\n Testnet = 2147483648,\n Mainnet = 1,\n}\n\nexport enum WalletDefaultNetworkConfigurationIds {\n mainnet = 'mainnet',\n testnet = 'testnet',\n testnet4 = 'testnet4',\n signet = 'signet',\n sbtcTestnet = 'sbtcTestnet',\n sbtcDevenv = 'sbtcDevenv',\n devnet = 'devnet',\n}\n\nexport type DefaultNetworkConfigurations = keyof typeof WalletDefaultNetworkConfigurationIds;\n\nexport const supportedBlockchains = ['stacks', 'bitcoin'] as const;\n\nexport type SupportedBlockchains = (typeof supportedBlockchains)[number];\n\nexport const networkModes = ['mainnet', 'testnet'] as const;\nexport const testnetModes = ['testnet', 'regtest', 'signet'] as const;\n\nexport const bitcoinNetworks = ['mainnet', 'testnet3', 'testnet4', 'regtest', 'signet'] as const;\nexport type BitcoinNetwork = (typeof bitcoinNetworks)[number];\n\nexport type NetworkModes = (typeof networkModes)[number];\ntype BitcoinTestnetModes = (typeof testnetModes)[number];\n\nexport function bitcoinNetworkToNetworkMode(network: BitcoinNetwork): BitcoinNetworkModes {\n switch (network) {\n case 'mainnet':\n return 'mainnet';\n case 'testnet3':\n return 'testnet';\n case 'testnet4':\n return 'testnet';\n case 'regtest':\n return 'regtest';\n case 'signet':\n return 'signet';\n default:\n // TODO: Needs exhaustive check. Cannot import 'assertUnreachable' since 'utils' package depends on 'models'.\n // Ideally this function should live in utils, but it's currently widely used in the extension.\n throw new Error(`Unhandled case: ${network}`);\n }\n}\n\nexport type BitcoinNetworkModes = NetworkModes | BitcoinTestnetModes;\n\ninterface BaseChainConfig {\n blockchain: Blockchain;\n}\n\nexport interface BitcoinChainConfig extends BaseChainConfig {\n blockchain: 'bitcoin';\n bitcoinUrl: string;\n bitcoinNetwork: BitcoinNetwork;\n mode: BitcoinNetworkModes;\n}\n\nexport interface StacksChainConfig extends BaseChainConfig {\n blockchain: 'stacks';\n url: string;\n /** The chainId of the network (or parent network if this is a subnet) */\n chainId: ChainID;\n /** An additional chainId for subnets. Indicated a subnet if defined and is mainly used for signing. */\n subnetChainId?: ChainID;\n}\n\nexport type NetworkConfiguration = z.infer<typeof networkConfigurationSchema>;\n\nconst networkMainnet: NetworkConfiguration = {\n id: WalletDefaultNetworkConfigurationIds.mainnet,\n name: 'Mainnet',\n chain: {\n stacks: {\n blockchain: 'stacks',\n chainId: ChainID.Mainnet,\n url: HIRO_API_BASE_URL_MAINNET,\n },\n bitcoin: {\n blockchain: 'bitcoin',\n bitcoinNetwork: 'mainnet',\n mode: 'mainnet',\n bitcoinUrl: BITCOIN_API_BASE_URL_MAINNET,\n },\n },\n};\n\nconst networkTestnet: NetworkConfiguration = {\n id: WalletDefaultNetworkConfigurationIds.testnet,\n name: 'Testnet3',\n chain: {\n stacks: {\n blockchain: 'stacks',\n chainId: ChainID.Testnet,\n url: HIRO_API_BASE_URL_TESTNET,\n },\n bitcoin: {\n blockchain: 'bitcoin',\n bitcoinNetwork: 'testnet3',\n mode: 'testnet',\n bitcoinUrl: BITCOIN_API_BASE_URL_TESTNET3,\n },\n },\n};\n\nconst networkTestnet4: NetworkConfiguration = {\n id: WalletDefaultNetworkConfigurationIds.testnet4,\n name: 'Testnet4',\n chain: {\n stacks: {\n blockchain: 'stacks',\n chainId: ChainID.Testnet,\n url: HIRO_API_BASE_URL_TESTNET,\n },\n bitcoin: {\n blockchain: 'bitcoin',\n bitcoinNetwork: 'testnet4',\n mode: 'testnet',\n bitcoinUrl: BITCOIN_API_BASE_URL_TESTNET4,\n },\n },\n};\n\nconst networkSignet: NetworkConfiguration = {\n id: WalletDefaultNetworkConfigurationIds.signet,\n name: 'Signet',\n chain: {\n stacks: {\n blockchain: 'stacks',\n chainId: ChainID.Testnet,\n url: HIRO_API_BASE_URL_TESTNET,\n },\n bitcoin: {\n blockchain: 'bitcoin',\n bitcoinNetwork: 'signet',\n mode: 'signet',\n bitcoinUrl: BITCOIN_API_BASE_URL_SIGNET,\n },\n },\n};\n\nconst networkSbtcTestnet: NetworkConfiguration = {\n id: WalletDefaultNetworkConfigurationIds.sbtcTestnet,\n name: 'sBTC Testnet',\n chain: {\n stacks: {\n blockchain: 'stacks',\n chainId: ChainID.Testnet,\n url: HIRO_API_BASE_URL_TESTNET,\n },\n bitcoin: {\n blockchain: 'bitcoin',\n bitcoinNetwork: 'regtest',\n mode: 'regtest',\n bitcoinUrl: 'https://beta.sbtc-mempool.tech/api/proxy',\n },\n },\n};\n\nconst networkSbtcDevenv: NetworkConfiguration = {\n id: WalletDefaultNetworkConfigurationIds.sbtcDevenv,\n name: 'sBTC Devenv',\n chain: {\n stacks: {\n blockchain: 'stacks',\n chainId: ChainID.Testnet,\n url: 'http://localhost:3999',\n },\n bitcoin: {\n blockchain: 'bitcoin',\n bitcoinNetwork: 'regtest',\n mode: 'regtest',\n bitcoinUrl: 'http://localhost:3000/api/proxy',\n },\n },\n};\n\nconst networkDevnet: NetworkConfiguration = {\n id: WalletDefaultNetworkConfigurationIds.devnet,\n name: 'Devnet',\n chain: {\n stacks: {\n blockchain: 'stacks',\n chainId: ChainID.Testnet,\n url: 'http://localhost:3999',\n },\n bitcoin: {\n blockchain: 'bitcoin',\n bitcoinNetwork: 'regtest',\n mode: 'regtest',\n bitcoinUrl: 'http://localhost:18443',\n },\n },\n};\n\nexport const defaultCurrentNetwork: NetworkConfiguration = networkMainnet;\n\nexport const defaultNetworksKeyedById: Record<\n WalletDefaultNetworkConfigurationIds,\n NetworkConfiguration\n> = {\n [WalletDefaultNetworkConfigurationIds.mainnet]: networkMainnet,\n [WalletDefaultNetworkConfigurationIds.testnet4]: networkTestnet4,\n [WalletDefaultNetworkConfigurationIds.testnet]: networkTestnet,\n [WalletDefaultNetworkConfigurationIds.signet]: networkSignet,\n [WalletDefaultNetworkConfigurationIds.sbtcTestnet]: networkSbtcTestnet,\n [WalletDefaultNetworkConfigurationIds.sbtcDevenv]: networkSbtcDevenv,\n [WalletDefaultNetworkConfigurationIds.devnet]: networkDevnet,\n};\n","import { HIRO_INSCRIPTIONS_API_URL } from '../../network/network.model';\nimport {\n CryptoAssetCategories,\n CryptoAssetChains,\n CryptoAssetProtocols,\n InscriptionCryptoAssetInfo,\n} from '../crypto-asset-info.model';\n\n/**\n * Inscriptions contain arbitrary data. When retrieving an inscription, it should be\n * classified into one of the types below, indicating that the app can handle it\n * appropriately and securely. Inscriptions of types not ready to be handled by the\n * app should be classified as \"other\".\n */\nexport const inscriptionMimeTypes = [\n 'audio',\n 'gltf',\n 'html',\n 'image',\n 'svg',\n 'text',\n 'video',\n 'other',\n] as const;\n\nexport type InscriptionMimeType = (typeof inscriptionMimeTypes)[number];\n\nexport function whenInscriptionMimeType<T>(\n mimeType: string,\n branches: { [k in InscriptionMimeType]?: () => T }\n) {\n if (mimeType.startsWith('audio/') && branches.audio) {\n return branches.audio();\n }\n\n if (mimeType.startsWith('text/html') && branches.html) {\n return branches.html();\n }\n\n if (mimeType.startsWith('image/svg') && branches.svg) {\n return branches.svg();\n }\n\n if (mimeType.startsWith('image/') && branches.image) {\n return branches.image();\n }\n\n if (mimeType.startsWith('text') && branches.text) {\n return branches.text();\n }\n\n if (mimeType.startsWith('video/') && branches.video) {\n return branches.video();\n }\n\n if (mimeType.startsWith('model/gltf') && branches.gltf) {\n return branches.gltf();\n }\n\n if (branches.other) return branches.other();\n\n throw new Error('Unhandled inscription type');\n}\nexport interface Inscription extends InscriptionCryptoAssetInfo {\n preview: string;\n src: string;\n title: string;\n output: string;\n txid: string;\n offset: string;\n address: string;\n genesisBlockHash: string;\n genesisTimestamp: number;\n genesisBlockHeight: number;\n value: string;\n}\n\ninterface RawInscription {\n id: string;\n number: number;\n output: string;\n contentType: string;\n txid: string;\n offset: string;\n address: string;\n genesisBlockHash: string;\n genesisTimestamp: number;\n genesisBlockHeight: number;\n value: string;\n}\n\nexport function createInscription(inscription: RawInscription): Inscription {\n const contentSrc = `${HIRO_INSCRIPTIONS_API_URL}/${inscription.id}/content`;\n const iframeSrc = `https://ordinals.com/preview/${inscription.id}`;\n const preview = `https://ordinals.hiro.so/inscription/${inscription.id}`;\n const title = `Inscription ${inscription.number}`;\n\n const sharedInfo = {\n chain: CryptoAssetChains.bitcoin,\n category: CryptoAssetCategories.nft,\n protocol: CryptoAssetProtocols.inscription,\n id: inscription.id,\n number: inscription.number,\n output: inscription.output,\n txid: inscription.txid,\n offset: inscription.offset,\n address: inscription.address,\n genesisBlockHash: inscription.genesisBlockHash,\n genesisTimestamp: inscription.genesisTimestamp,\n genesisBlockHeight: inscription.genesisBlockHeight,\n value: inscription.value,\n preview,\n title,\n };\n\n return whenInscriptionMimeType<Inscription>(inscription.contentType, {\n audio: () => ({\n ...sharedInfo,\n mimeType: 'audio',\n name: 'inscription',\n src: iframeSrc,\n }),\n gltf: () => ({\n ...sharedInfo,\n mimeType: 'gltf',\n name: 'inscription',\n src: iframeSrc,\n }),\n html: () => ({\n ...sharedInfo,\n mimeType: 'html',\n name: 'inscription',\n src: iframeSrc,\n }),\n image: () => ({\n ...sharedInfo,\n mimeType: 'image',\n name: 'inscription',\n src: contentSrc,\n }),\n svg: () => ({\n ...sharedInfo,\n mimeType: 'svg',\n name: 'inscription',\n src: iframeSrc,\n }),\n text: () => ({\n ...sharedInfo,\n mimeType: 'text',\n name: 'inscription',\n src: contentSrc,\n }),\n video: () => ({\n ...sharedInfo,\n mimeType: 'video',\n name: 'inscription',\n src: iframeSrc,\n }),\n other: () => ({\n ...sharedInfo,\n mimeType: 'other',\n name: 'inscription',\n src: '',\n }),\n });\n}\n","import type BigNumber from 'bignumber.js';\n\nexport interface AverageBitcoinFeeRates {\n fastestFee: BigNumber;\n halfHourFee: BigNumber;\n hourFee: BigNumber;\n}\n\nexport const btcTxTimeMap: Record<keyof AverageBitcoinFeeRates, string> = {\n fastestFee: '~10 – 20min',\n halfHourFee: '~30 min',\n hourFee: '~1 hour+',\n};\n\nexport enum BtcFeeType {\n High = 'High',\n Standard = 'Standard',\n Low = 'Low',\n}\n","import { Blockchain } from '../types';\nimport { StacksFeeEstimate } from './stacks-fees.model';\n\nexport enum FeeTypes {\n Low,\n Middle,\n High,\n Custom,\n Unknown,\n}\n\nexport enum FeeCalculationTypes {\n Api = 'api',\n Default = 'default',\n DefaultSimulated = 'default-simulated',\n FeesCapped = 'fees-capped',\n TokenTransferSpecific = 'token-transfer-specific',\n}\n\nexport interface Fees {\n blockchain: Blockchain;\n estimates: StacksFeeEstimate[];\n calculation: FeeCalculationTypes;\n}\n","import type { CryptoCurrency, FiatCurrency } from './currencies.model';\nimport type { Money } from './money.model';\n\ninterface MarketPair {\n readonly base: CryptoCurrency;\n readonly quote: FiatCurrency;\n}\n\nexport function createMarketPair(base: CryptoCurrency, quote: FiatCurrency): MarketPair {\n return Object.freeze({ base, quote });\n}\n\nexport function formatMarketPair({ base, quote }: MarketPair) {\n return `${base}/${quote}`;\n}\n\nexport interface MarketData {\n readonly pair: MarketPair;\n readonly price: Money;\n}\n\nexport function createMarketData(pair: MarketPair, price: Money): MarketData {\n if (pair.quote !== price.symbol)\n throw new Error('Cannot create market data when price does not match quote');\n return Object.freeze({ pair, price });\n}\n","import { z } from 'zod';\n\nimport { bitcoinNetworks, networkModes, testnetModes } from './network.model';\n\nexport const bitcoinNetworkModesSchema = z.enum([...networkModes, ...testnetModes]);\n\nexport const bitcoinNetworkSchema = z.enum([...bitcoinNetworks]);\n\nexport const networkConfigurationSchema = z.object({\n name: z.string(),\n id: z.string(),\n chain: z.object({\n bitcoin: z.object({\n blockchain: z.literal('bitcoin'),\n bitcoinUrl: z.string(),\n bitcoinNetwork: bitcoinNetworkSchema,\n mode: bitcoinNetworkModesSchema,\n }),\n stacks: z.object({\n blockchain: z.literal('stacks'),\n url: z.string(),\n chainId: z.number(),\n subnetChainId: z.number().optional(),\n }),\n }),\n});\n","import { z } from 'zod';\n\nimport { Blockchain } from './types';\n\nexport type AccountDisplayPreference = 'native-segwit' | 'taproot' | 'bns' | 'stacks';\nexport interface AccountDisplayPreferenceInfo {\n type: AccountDisplayPreference;\n blockchain: Blockchain;\n name: string;\n}\n\nexport type AnalyticsPreference = 'consent-given' | 'rejects-tracking';\n\nexport const emailAddressSchema = z.string().email({ message: 'Invalid email address' });\nexport type EmailAddress = z.infer<typeof emailAddressSchema>;\n"],"mappings":";AAEO,IAAM,oBAAoB;AAAA,EAC/B,SAAS;AAAA,EACT,QAAQ;AACV;AACO,IAAM,wBAAwB;AAAA,EACnC,UAAU;AAAA,EACV,KAAK;AACP;AACO,IAAM,uBAAuB;AAAA,EAClC,WAAW;AAAA,EACX,WAAW;AAAA,EACX,OAAO;AAAA,EACP,OAAO;AAAA,EACP,OAAO;AAAA,EACP,OAAO;AAAA,EACP,MAAM;AAAA,EACN,OAAO;AAAA,EACP,MAAM;AAAA,EACN,aAAa;AACf;;;AChBO,IAAM,4BAA4B;AAClC,IAAM,4BAA4B;AAClC,IAAM,4BAA4B;AAClC,IAAM,qCAAqC;AAE3C,IAAM,qCAAqC;AAC3C,IAAM,qCAAqC;AAE3C,IAAM,+BAA+B;AACrC,IAAM,gCAAgC;AACtC,IAAM,gCAAgC;AACtC,IAAM,8BAA8B;AAEpC,IAAM,kCAAkC;AACxC,IAAM,kCAAkC;AAExC,IAAM,6BAA6B;AAEnC,IAAM,sBAAsB;AAG5B,IAAK,UAAL,kBAAKA,aAAL;AACL,EAAAA,kBAAA,aAAU,cAAV;AACA,EAAAA,kBAAA,aAAU,KAAV;AAFU,SAAAA;AAAA,GAAA;AAKL,IAAK,uCAAL,kBAAKC,0CAAL;AACL,EAAAA,sCAAA,aAAU;AACV,EAAAA,sCAAA,aAAU;AACV,EAAAA,sCAAA,cAAW;AACX,EAAAA,sCAAA,YAAS;AACT,EAAAA,sCAAA,iBAAc;AACd,EAAAA,sCAAA,gBAAa;AACb,EAAAA,sCAAA,YAAS;AAPC,SAAAA;AAAA,GAAA;AAYL,IAAM,uBAAuB,CAAC,UAAU,SAAS;AAIjD,IAAM,eAAe,CAAC,WAAW,SAAS;AAC1C,IAAM,eAAe,CAAC,WAAW,WAAW,QAAQ;AAEpD,IAAM,kB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MACd,SAAS,EAAE,OAAO;AAAA,MAClB,eAAe,EAAE,OAAO,EAAE,SAAS;AAAA,IACrC,CAAC;AAAA,EACH,CAAC;AACH,CAAC;;;ACzBD,SAAS,KAAAC,UAAS;AAaX,IAAM,qBAAqBA,GAAE,OAAO,EAAE,MAAM,EAAE,SAAS,wBAAwB,CAAC;","names":["ChainID","WalletDefaultNetworkConfigurationIds","BtcFeeType","FeeTypes","FeeCalculationTypes","z"]}
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.24.3",
5
+ "version": "0.25.0",
6
6
  "license": "MIT",
7
7
  "homepage": "https://github.com/leather-io/mono/tree/dev/packages/models",
8
8
  "repository": {
@@ -32,6 +32,11 @@ export interface BtcCryptoAssetBalance extends BaseCryptoAssetBalance {
32
32
  * Balance across UTXOs with need for larger fee than principal by UTXO given standard rate
33
33
  */
34
34
  readonly uneconomicalBalance: Money;
35
+
36
+ /**
37
+ * Balance of the union set of protected and uneconomical UTXOs
38
+ */
39
+ readonly unspendableBalance: Money;
35
40
  }
36
41
 
37
42
  export interface StxCryptoAssetBalance extends BaseCryptoAssetBalance {
@@ -101,6 +101,18 @@ export interface InscriptionCryptoAssetInfo extends BaseNonFungibleCryptoAssetIn
101
101
  readonly id: string;
102
102
  readonly mimeType: InscriptionMimeType;
103
103
  readonly number: number;
104
+ // via Inscription Model
105
+ readonly preview: string;
106
+ readonly src: string;
107
+ readonly title: string;
108
+ readonly output: string;
109
+ readonly txid: string;
110
+ readonly offset: string;
111
+ readonly address: string;
112
+ readonly genesisBlockHash: string;
113
+ readonly genesisTimestamp: number;
114
+ readonly genesisBlockHeight: number;
115
+ readonly value: string;
104
116
  }
105
117
 
106
118
  export interface StampCryptoAssetInfo extends BaseNonFungibleCryptoAssetInfo {
package/src/index.ts CHANGED
@@ -15,3 +15,4 @@ 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 './utxo.model';
@@ -0,0 +1,12 @@
1
+ export interface UtxoId {
2
+ txid: string;
3
+ vout: number;
4
+ }
5
+
6
+ export interface Utxo extends UtxoId {
7
+ height?: number;
8
+ confirmations?: number;
9
+ address: string;
10
+ path: string;
11
+ value: string;
12
+ }