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

@leather-wallet/models

Package Overview
Dependencies
Maintainers
3
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@leather-wallet/models - npm Package Compare versions

Comparing version
0.6.6
to
0.6.7
+17
.turbo/turbo-build.log
> @leather-wallet/models@0.6.7 build /home/runner/work/mono/mono/packages/models
> tsup
CLI Building entry: src/index.ts
CLI Using tsconfig: tsconfig.json
CLI tsup v8.1.0
CLI Using tsup config: /home/runner/work/mono/mono/packages/models/tsup.config.ts
CLI Target: es2022
CLI Cleaning output folder
ESM Build start
ESM dist/index.js 8.03 KB
ESM dist/index.js.map 16.56 KB
ESM ⚡️ Build success in 34ms
DTS Build start
DTS ⚡️ Build success in 2468ms
DTS dist/index.d.ts 11.37 KB
{"version":3,"sources":["../src/crypto-assets/crypto-asset-balance.model.ts","../src/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"],"sourcesContent":["import { Money } from '../money.model';\n\nexport interface BaseCryptoAssetBalance {\n /**\n * totalBalance after filtering out outboundBalance, protectedBalance, and uneconomicalBalance\n */\n readonly availableBalance: Money;\n}\n\nexport interface BtcCryptoAssetBalance extends BaseCryptoAssetBalance {\n /**\n * Balance of UTXOs with collectibles\n */\n readonly protectedBalance: Money;\n /**\n * Balance across UTXOs with need for larger fee than principal by UTXO given standard rate\n */\n readonly uneconomicalBalance: Money;\n}\n\nexport interface StxCryptoAssetBalance extends BaseCryptoAssetBalance {\n /**\n * availableBalance minus lockedBalance\n */\n readonly availableUnlockedBalance: Money;\n /**\n * Balance of pending receipt into account given pending transactions\n */\n readonly inboundBalance: Money;\n /**\n * totalBalance minus total amount locked by contracts\n */\n readonly lockedBalance: Money;\n /**\n * Balance of pending delivery from account given pending transactions\n */\n readonly outboundBalance: Money;\n /**\n * totalBalance plus inboundBalance minus outboundBalance\n */\n readonly pendingBalance: Money;\n /**\n * Balance as confirmed on chain\n */\n readonly totalBalance: Money;\n /**\n * totalBalance minus lockedBalance\n */\n readonly unlockedBalance: Money;\n}\n\nexport type CryptoAssetBalance =\n | BaseCryptoAssetBalance\n | BtcCryptoAssetBalance\n | StxCryptoAssetBalance;\n\nexport function createCryptoAssetBalance(balance: Money): BaseCryptoAssetBalance {\n return { availableBalance: balance };\n}\n","import { Blockchains } from './types';\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 BITCOIN_API_BASE_URL_MAINNET = 'https://blockstream.info/api';\nexport const BITCOIN_API_BASE_URL_TESTNET = 'https://blockstream.info/testnet/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\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 signet = 'signet',\n sbtcDevenv = 'sbtcDevenv',\n devnet = 'devnet',\n}\n\nexport type DefaultNetworkConfigurations = keyof typeof WalletDefaultNetworkConfigurationIds;\n\nconst supportedBlockchains = ['stacks', 'bitcoin'] as const;\n\nexport type SupportedBlockchains = (typeof supportedBlockchains)[number];\n\nconst networkModes = ['mainnet', 'testnet'] as const;\n\nexport type NetworkModes = (typeof networkModes)[number];\n\ntype BitcoinTestnetModes = 'testnet' | 'regtest' | 'signet';\n\nexport type BitcoinNetworkModes = NetworkModes | BitcoinTestnetModes;\n\ninterface BaseChainConfig {\n blockchain: Blockchains;\n}\n\nexport interface BitcoinChainConfig extends BaseChainConfig {\n blockchain: 'bitcoin';\n bitcoinUrl: string;\n bitcoinNetwork: 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 interface NetworkConfiguration {\n name: string;\n id: DefaultNetworkConfigurations;\n chain: {\n bitcoin: BitcoinChainConfig;\n stacks: StacksChainConfig;\n };\n}\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 bitcoinUrl: BITCOIN_API_BASE_URL_MAINNET,\n },\n },\n};\n\nconst networkTestnet: NetworkConfiguration = {\n id: WalletDefaultNetworkConfigurationIds.testnet,\n name: '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: 'testnet',\n bitcoinUrl: BITCOIN_API_BASE_URL_TESTNET,\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 bitcoinUrl: BITCOIN_API_BASE_URL_SIGNET,\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 bitcoinUrl: 'http://localhost:8999/api',\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 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.testnet]: networkTestnet,\n [WalletDefaultNetworkConfigurationIds.signet]: networkSignet,\n [WalletDefaultNetworkConfigurationIds.sbtcDevenv]: networkSbtcDevenv,\n [WalletDefaultNetworkConfigurationIds.devnet]: networkDevnet,\n};\n","import { HIRO_INSCRIPTIONS_API_URL } from '../../network.model';\nimport { InscriptionCryptoAssetInfo } 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 */\nconst 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 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 { Blockchains } 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}\n\nexport interface Fees {\n blockchain: Blockchains;\n estimates: StacksFeeEstimate[];\n calculation: FeeCalculationTypes;\n}\n","import type { CryptoCurrencies, FiatCurrencies } from './currencies.model';\nimport type { Money } from './money.model';\n\ninterface MarketPair {\n readonly base: CryptoCurrencies;\n readonly quote: FiatCurrencies;\n}\n\nexport function createMarketPair(base: CryptoCurrencies, quote: FiatCurrencies): 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"],"mappings":";AAwDO,SAAS,yBAAyB,SAAwC;AAC/E,SAAO,EAAE,kBAAkB,QAAQ;AACrC;;;ACxDO,IAAM,4BAA4B;AAClC,IAAM,4BAA4B;AAClC,IAAM,4BAA4B;AAClC,IAAM,qCAAqC;AAE3C,IAAM,+BAA+B;AACrC,IAAM,+BAA+B;AACrC,IAAM,8BAA8B;AAEpC,IAAM,kCAAkC;AACxC,IAAM,kCAAkC;AAGxC,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,YAAS;AACT,EAAAA,sCAAA,gBAAa;AACb,EAAAA,sCAAA,YAAS;AALC,SAAAA;AAAA,GAAA;AAkDZ,IAAM,iBAAuC;AAAA,EAC3C,IAAI;AAAA,EACJ,MAAM;AAAA,EACN,OAAO;AAAA,IACL,QAAQ;AAAA,MACN,YAAY;AAAA,MACZ,SAAS;AAAA,MACT,KAAK;AAAA,IACP;AAAA,IACA,SAAS;AAAA,MACP,YAAY;AAAA,MACZ,gBAAgB;AAAA,MAChB,YAAY;AAAA,IACd;AAAA,EACF;AACF;AAEA,IAAM,iBAAuC;AAAA,EAC3C,IAAI;AAAA,EACJ,MAAM;AAAA,EACN,OAAO;AAAA,IACL,QAAQ;AAAA,MACN,YAAY;AAAA,MACZ,SAAS;AAAA,MACT,KAAK;AAAA,IACP;AAAA,IACA,SAAS;AAAA,MACP,YAAY;AAAA,MACZ,gBAAgB;AAAA,MAChB,YAAY;AAAA,IACd;AAAA,EACF;AACF;AAEA,IAAM,gB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GAAe;AAC5D,SAAO,GAAG,IAAI,IAAI,KAAK;AACzB;AAOO,SAAS,iBAAiB,MAAkB,OAA0B;AAC3E,MAAI,KAAK,UAAU,MAAM;AACvB,UAAM,IAAI,MAAM,2DAA2D;AAC7E,SAAO,OAAO,OAAO,EAAE,MAAM,MAAM,CAAC;AACtC;","names":["ChainID","WalletDefaultNetworkConfigurationIds","BtcFeeType","FeeTypes","FeeCalculationTypes"]}
export * from './crypto-assets/crypto-asset-balance.model';
export * from './crypto-assets/crypto-asset-info.model';
export * from './crypto-assets/bitcoin/inscription.model';
export * from './currencies.model';
export * from './fees/bitcoin-fees.model';
export * from './fees/fees.model';
export * from './fees/stacks-fees.model';
export * from './market.model';
export * from './types';
export * from './types.utils';
export * from './money.model';
export * from './network.model';
export * from './transactions/bitcoin-transaction.model';
export * from './transactions/stacks-transaction.model';
export * from './utxo.model';
import { defineConfig } from 'tsup';
export default defineConfig({
entry: ['src/index.ts'],
sourcemap: true,
clean: true,
dts: true,
format: 'esm',
});
+15
-0
# Changelog
## [0.6.7](https://github.com/leather-wallet/mono/compare/models-v0.6.6...models-v0.6.7) (2024-06-05)
### Bug Fixes
* [@leather-wallet](https://github.com/leather-wallet) sorting in prettier ([a44b063](https://github.com/leather-wallet/mono/commit/a44b0631b745c0ca4abe4d36eb5dfc34a33afce8))
* react.JSX deprecated ([845efe1](https://github.com/leather-wallet/mono/commit/845efe1cfaf36e83fef5202b2d86aa03dbe0a70a))
### Dependencies
* The following workspace dependencies were updated
* devDependencies
* @leather-wallet/prettier-config bumped to 0.4.1
## [0.6.6](https://github.com/leather-wallet/mono/compare/models-v0.6.5...models-v0.6.6) (2024-05-30)

@@ -4,0 +19,0 @@

+338
-16

@@ -1,16 +0,338 @@

export * from './src/crypto-assets/crypto-asset-balance.model';
export * from './src/crypto-assets/crypto-asset-info.model';
export * from './src/crypto-assets/bitcoin/inscription.model';
export * from './src/currencies.model';
export * from './src/fees/bitcoin-fees.model';
export * from './src/fees/fees.model';
export * from './src/fees/stacks-fees.model';
export * from './src/market.model';
export * from './src/types';
export * from './src/types.utils';
export * from './src/money.model';
export * from './src/network.model';
export * from './src/transactions/bitcoin-transaction.model';
export * from './src/transactions/stacks-transaction.model';
export * from './src/utxo.model';
//# sourceMappingURL=index.d.ts.map
import BigNumber from 'bignumber.js';
import React from 'react';
type ValueOf<T> = T[keyof T];
interface AllowAdditionalProperties {
[x: string | number | symbol]: unknown;
}
type Primitive = null | undefined | string | number | boolean | symbol | bigint;
type LiteralUnion<LiteralType, BaseType extends Primitive> = LiteralType | (BaseType & Record<never, never>);
type Entries<T> = {
[K in keyof T]: [K, T[K]];
}[keyof T][];
type CryptoCurrencies = LiteralUnion<'BTC' | 'STX', string>;
type FiatCurrencies = 'USD' | string;
type Currencies = CryptoCurrencies | FiatCurrencies;
type NumType = BigNumber | bigint | number;
interface Money {
readonly amount: BigNumber;
readonly symbol: Currencies;
readonly decimals: number;
}
interface BaseCryptoAssetBalance {
readonly availableBalance: Money;
}
interface BtcCryptoAssetBalance extends BaseCryptoAssetBalance {
readonly protectedBalance: Money;
readonly uneconomicalBalance: Money;
}
interface StxCryptoAssetBalance extends BaseCryptoAssetBalance {
readonly availableUnlockedBalance: Money;
readonly inboundBalance: Money;
readonly lockedBalance: Money;
readonly outboundBalance: Money;
readonly pendingBalance: Money;
readonly totalBalance: Money;
readonly unlockedBalance: Money;
}
type CryptoAssetBalance = BaseCryptoAssetBalance | BtcCryptoAssetBalance | StxCryptoAssetBalance;
declare function createCryptoAssetBalance(balance: Money): BaseCryptoAssetBalance;
declare const inscriptionMimeTypes: readonly ["audio", "gltf", "html", "image", "svg", "text", "video", "other"];
type InscriptionMimeType = (typeof inscriptionMimeTypes)[number];
declare function whenInscriptionMimeType<T>(mimeType: string, branches: {
[k in InscriptionMimeType]?: () => T;
}): T;
interface Inscription extends InscriptionCryptoAssetInfo {
preview: string;
src: string;
title: string;
output: string;
txid: string;
offset: string;
address: string;
genesisBlockHash: string;
genesisTimestamp: number;
genesisBlockHeight: number;
value: string;
}
interface RawInscription {
id: string;
number: number;
output: string;
contentType: string;
txid: string;
offset: string;
address: string;
genesisBlockHash: string;
genesisTimestamp: number;
genesisBlockHeight: number;
value: string;
}
declare function createInscription(inscription: RawInscription): Inscription;
interface BaseCryptoAssetInfo {
readonly decimals: number;
readonly hasMemo: boolean;
}
interface BtcCryptoAssetInfo extends BaseCryptoAssetInfo {
readonly name: 'bitcoin';
readonly symbol: 'BTC';
}
interface StxCryptoAssetInfo extends BaseCryptoAssetInfo {
readonly name: 'stacks';
readonly symbol: 'STX';
}
interface Brc20CryptoAssetInfo extends BaseCryptoAssetInfo {
readonly name: 'brc-20';
readonly symbol: string;
}
interface InscriptionCryptoAssetInfo {
readonly id: string;
readonly mimeType: InscriptionMimeType;
readonly name: 'inscription';
readonly number: number;
}
interface RuneCryptoAssetInfo extends BaseCryptoAssetInfo {
readonly name: 'rune';
readonly spacedRuneName: string;
readonly runeName: string;
readonly symbol: string;
}
interface StampCryptoAssetInfo {
readonly name: 'stamp';
readonly stamp: number;
readonly stampUrl: string;
}
interface Src20CryptoAssetInfo extends BaseCryptoAssetInfo {
readonly id: string;
readonly name: 'src-20';
readonly symbol: string;
}
interface Sip9CryptoAssetInfo {
readonly contractId: string;
readonly imageCanonicalUri: string;
readonly name: string;
}
interface Sip10CryptoAssetInfo extends BaseCryptoAssetInfo {
readonly canTransfer: boolean;
readonly contractId: string;
readonly imageCanonicalUri: string;
readonly name: string;
readonly symbol: string;
}
interface Stx20CryptoAssetInfo {
readonly name: 'stx-20';
readonly symbol: string;
}
interface AverageBitcoinFeeRates {
fastestFee: BigNumber;
halfHourFee: BigNumber;
hourFee: BigNumber;
}
declare const btcTxTimeMap: Record<keyof AverageBitcoinFeeRates, string>;
declare enum BtcFeeType {
High = "High",
Standard = "Standard",
Low = "Low"
}
type Blockchains = LiteralUnion<'bitcoin' | 'stacks', string>;
type CryptoAssetType = 'btc' | 'stx' | 'brc-20' | 'inscription' | 'rune' | 'sip-9' | 'sip-10' | 'src-20' | 'stamp' | 'stx-20';
interface StacksFeeEstimate {
fee: Money;
feeRate: number;
}
interface ApiFeeEstimation {
fee: number;
fee_rate: number;
}
interface StacksTxFeeEstimation {
cost_scalar_change_by_byte: number;
estimated_cost: object;
estimated_cost_scalar: number;
estimations: ApiFeeEstimation[];
error?: string;
}
declare enum FeeTypes {
Low = 0,
Middle = 1,
High = 2,
Custom = 3,
Unknown = 4
}
declare enum FeeCalculationTypes {
Api = "api",
Default = "default",
DefaultSimulated = "default-simulated",
FeesCapped = "fees-capped"
}
interface Fees {
blockchain: Blockchains;
estimates: StacksFeeEstimate[];
calculation: FeeCalculationTypes;
}
interface MarketPair {
readonly base: CryptoCurrencies;
readonly quote: FiatCurrencies;
}
declare function createMarketPair(base: CryptoCurrencies, quote: FiatCurrencies): MarketPair;
declare function formatMarketPair({ base, quote }: MarketPair): string;
interface MarketData {
readonly pair: MarketPair;
readonly price: Money;
}
declare function createMarketData(pair: MarketPair, price: Money): MarketData;
declare const HIRO_API_BASE_URL_MAINNET = "https://api.hiro.so";
declare const HIRO_API_BASE_URL_TESTNET = "https://api.testnet.hiro.so";
declare const HIRO_INSCRIPTIONS_API_URL = "https://api.hiro.so/ordinals/v1/inscriptions";
declare const HIRO_API_BASE_URL_NAKAMOTO_TESTNET = "https://api.nakamoto.testnet.hiro.so";
declare const BITCOIN_API_BASE_URL_MAINNET = "https://blockstream.info/api";
declare const BITCOIN_API_BASE_URL_TESTNET = "https://blockstream.info/testnet/api";
declare const BITCOIN_API_BASE_URL_SIGNET = "https://mempool.space/signet/api";
declare const BESTINSLOT_API_BASE_URL_MAINNET = "https://leatherapi.bestinslot.xyz/v3";
declare const BESTINSLOT_API_BASE_URL_TESTNET = "https://leatherapi_testnet.bestinslot.xyz/v3";
declare enum ChainID {
Testnet = 2147483648,
Mainnet = 1
}
declare enum WalletDefaultNetworkConfigurationIds {
mainnet = "mainnet",
testnet = "testnet",
signet = "signet",
sbtcDevenv = "sbtcDevenv",
devnet = "devnet"
}
type DefaultNetworkConfigurations = keyof typeof WalletDefaultNetworkConfigurationIds;
declare const supportedBlockchains: readonly ["stacks", "bitcoin"];
type SupportedBlockchains = (typeof supportedBlockchains)[number];
declare const networkModes: readonly ["mainnet", "testnet"];
type NetworkModes = (typeof networkModes)[number];
type BitcoinTestnetModes = 'testnet' | 'regtest' | 'signet';
type BitcoinNetworkModes = NetworkModes | BitcoinTestnetModes;
interface BaseChainConfig {
blockchain: Blockchains;
}
interface BitcoinChainConfig extends BaseChainConfig {
blockchain: 'bitcoin';
bitcoinUrl: string;
bitcoinNetwork: BitcoinNetworkModes;
}
interface StacksChainConfig extends BaseChainConfig {
blockchain: 'stacks';
url: string;
chainId: ChainID;
subnetChainId?: ChainID;
}
interface NetworkConfiguration {
name: string;
id: DefaultNetworkConfigurations;
chain: {
bitcoin: BitcoinChainConfig;
stacks: StacksChainConfig;
};
}
declare const defaultCurrentNetwork: NetworkConfiguration;
declare const defaultNetworksKeyedById: Record<WalletDefaultNetworkConfigurationIds, NetworkConfiguration>;
interface BitcoinTransactionIssuance {
asset_id: string;
is_reissuance: boolean;
asset_blinding_nonce: number;
asset_entropy: number;
contract_hash: string;
assetamount?: number;
assetamountcommitment?: number;
tokenamount?: number;
tokenamountcommitment?: number;
}
interface BitcoinTransactionPegOut {
genesis_hash: string;
scriptpubkey: string;
scriptpubkey_asm: string;
scriptpubkey_address: string;
}
interface BitcoinTransactionStatus {
confirmed: boolean;
block_height?: number | null;
block_hash?: string | null;
block_time?: number | null;
}
interface BitcoinTransactionVectorOutput {
scriptpubkey: string;
scriptpubkey_asm: string;
scriptpubkey_type: string;
scriptpubkey_address: string;
value: number;
valuecommitment?: number;
asset?: string;
assetcommitment?: number;
pegout?: BitcoinTransactionPegOut | null;
}
interface BitcoinTransactionVectorInput {
inner_redeemscript_asm?: string;
inner_witnessscript_asm?: string;
is_coinbase: boolean;
is_pegin?: boolean;
issuance?: BitcoinTransactionIssuance | null;
prevout: BitcoinTransactionVectorOutput;
scriptsig: string;
scriptsig_asm: string;
sequence: number;
txid: string;
vout: number;
witness: string[];
}
interface BitcoinTx {
fee: number;
locktime: number;
size: number;
status: BitcoinTransactionStatus;
tx_type?: string;
txid: string;
version: number;
vin: BitcoinTransactionVectorInput[];
vout: BitcoinTransactionVectorOutput[];
weight: number;
}
interface StxTransfer {
amount: string;
sender?: string;
recipient?: string;
}
interface FtTransfer {
asset_identifier: string;
amount: string;
sender?: string;
recipient?: string;
}
interface TxTransferDetails {
caption: string;
icon: React.ReactNode;
link: string;
title: string;
value: number | string | null;
}
interface UtxoItem {
txid: string;
vout: number;
status: {
confirmed: boolean;
block_height: number;
block_hash: string;
block_time: number;
};
value: number;
}
export { type AllowAdditionalProperties, type ApiFeeEstimation, 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_TESTNET, type BaseCryptoAssetBalance, type BaseCryptoAssetInfo, type BitcoinChainConfig, type BitcoinNetworkModes, type BitcoinTransactionVectorInput, type BitcoinTransactionVectorOutput, type BitcoinTx, type Blockchains, type Brc20CryptoAssetInfo, type BtcCryptoAssetBalance, type BtcCryptoAssetInfo, BtcFeeType, ChainID, type CryptoAssetBalance, type CryptoAssetType, type CryptoCurrencies, type Currencies, type DefaultNetworkConfigurations, type Entries, FeeCalculationTypes, FeeTypes, type Fees, type FiatCurrencies, type FtTransfer, HIRO_API_BASE_URL_MAINNET, HIRO_API_BASE_URL_NAKAMOTO_TESTNET, HIRO_API_BASE_URL_TESTNET, HIRO_INSCRIPTIONS_API_URL, type Inscription, type InscriptionCryptoAssetInfo, type InscriptionMimeType, type LiteralUnion, type MarketData, type Money, type NetworkConfiguration, type NetworkModes, type NumType, type RuneCryptoAssetInfo, type Sip10CryptoAssetInfo, type Sip9CryptoAssetInfo, type Src20CryptoAssetInfo, type StacksChainConfig, type StacksFeeEstimate, type StacksTxFeeEstimation, type StampCryptoAssetInfo, type Stx20CryptoAssetInfo, type StxCryptoAssetBalance, type StxCryptoAssetInfo, type StxTransfer, type SupportedBlockchains, type TxTransferDetails, type UtxoItem, type ValueOf, WalletDefaultNetworkConfigurationIds, btcTxTimeMap, createCryptoAssetBalance, createInscription, createMarketData, createMarketPair, defaultCurrentNetwork, defaultNetworksKeyedById, formatMarketPair, whenInscriptionMimeType };
+2
-2

@@ -141,4 +141,3 @@ // src/crypto-assets/crypto-asset-balance.model.ts

}
if (branches.other)
return branches.other();
if (branches.other) return branches.other();
throw new Error("Unhandled inscription type");

@@ -284,1 +283,2 @@ }

};
//# sourceMappingURL=index.js.map
{
"name": "@leather-wallet/models",
"author": "Leather.io contact@leather.io",
"description": "Leather models and types",
"version": "0.6.6",
"version": "0.6.7",
"license": "MIT",
"type": "module",
"author": "Leather.io contact@leather.io",
"homepage": "https://github.com/leather-wallet/mono/tree/dev/packages/models",

@@ -14,2 +13,6 @@ "repository": {

},
"type": "module",
"exports": {
".": "./dist/index.js"
},
"bugs": "https://github.com/leather-wallet/mono/issues",

@@ -23,16 +26,9 @@ "dependencies": {

"eslint": "8.53.0",
"prettier": "3.2.5",
"tsup": "8.0.1",
"prettier": "3.3.0",
"tsup": "8.1.0",
"typescript": "5.3.3",
"@leather-wallet/eslint-config": "0.4.0",
"@leather-wallet/tsconfig-config": "0.4.0",
"@leather-wallet/prettier-config": "0.4.0"
"@leather-wallet/prettier-config": "0.4.1",
"@leather-wallet/tsconfig-config": "0.4.0"
},
"exports": {
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.js",
"require": "./dist/index.js"
}
},
"keywords": [

@@ -48,9 +44,10 @@ "leather",

"scripts": {
"build": "tsup",
"build:watch": "tsup --watch",
"format": "prettier . --write --ignore-path ../../.prettierignore",
"format:check": "prettier . --check --ignore-path ../../.prettierignore",
"lint": "eslint . --ignore-path ../../.eslintignore",
"lint:fix": "eslint . --fix --ignore-path ../../.eslintignore",
"ts:build": "tsup index.ts --format esm && tsc --emitDeclarationOnly",
"ts:build:watch": "concurrently \"tsc --build --watch --preserveWatchOutput --emitDeclarationOnly\" \"tsup index.ts --format esm --watch \" ",
"typecheck": "tsc --noEmit -p ./tsconfig.json"
}
}

@@ -18,3 +18,3 @@ import type React from 'react';

caption: string;
icon: React.JSX.Element;
icon: React.ReactNode;
link: string;

@@ -21,0 +21,0 @@ title: string;

> @leather-wallet/models@0.6.6 ts:build /home/runner/work/mono/mono/packages/models
> tsup index.ts --format esm && tsc --emitDeclarationOnly
CLI Building entry: index.ts
CLI Using tsconfig: tsconfig.json
CLI tsup v8.0.1
CLI Target: es2022
ESM Build start
ESM dist/index.js 8.00 KB
ESM ⚡️ Build success in 38ms
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,cAAc,gDAAgD,CAAC;AAC/D,cAAc,6CAA6C,CAAC;AAC5D,cAAc,+CAA+C,CAAC;AAC9D,cAAc,wBAAwB,CAAC;AACvC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,uBAAuB,CAAC;AACtC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,oBAAoB,CAAC;AACnC,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,8CAA8C,CAAC;AAC7D,cAAc,6CAA6C,CAAC;AAC5D,cAAc,kBAAkB,CAAC"}
import { InscriptionCryptoAssetInfo } from '../crypto-asset-info.model';
declare const inscriptionMimeTypes: readonly ["audio", "gltf", "html", "image", "svg", "text", "video", "other"];
export type InscriptionMimeType = (typeof inscriptionMimeTypes)[number];
export declare function whenInscriptionMimeType<T>(mimeType: string, branches: {
[k in InscriptionMimeType]?: () => T;
}): T;
export interface Inscription extends InscriptionCryptoAssetInfo {
preview: string;
src: string;
title: string;
output: string;
txid: string;
offset: string;
address: string;
genesisBlockHash: string;
genesisTimestamp: number;
genesisBlockHeight: number;
value: string;
}
interface RawInscription {
id: string;
number: number;
output: string;
contentType: string;
txid: string;
offset: string;
address: string;
genesisBlockHash: string;
genesisTimestamp: number;
genesisBlockHeight: number;
value: string;
}
export declare function createInscription(inscription: RawInscription): Inscription;
export {};
//# sourceMappingURL=inscription.model.d.ts.map
{"version":3,"file":"inscription.model.d.ts","sourceRoot":"","sources":["../../../../src/crypto-assets/bitcoin/inscription.model.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,0BAA0B,EAAE,MAAM,4BAA4B,CAAC;AAQxE,QAAA,MAAM,oBAAoB,8EAShB,CAAC;AAEX,MAAM,MAAM,mBAAmB,GAAG,CAAC,OAAO,oBAAoB,CAAC,CAAC,MAAM,CAAC,CAAC;AAExE,wBAAgB,uBAAuB,CAAC,CAAC,EACvC,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE;KAAG,CAAC,IAAI,mBAAmB,CAAC,CAAC,EAAE,MAAM,CAAC;CAAE,KAiCnD;AACD,MAAM,WAAW,WAAY,SAAQ,0BAA0B;IAC7D,OAAO,EAAE,MAAM,CAAC;IAChB,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,gBAAgB,EAAE,MAAM,CAAC;IACzB,gBAAgB,EAAE,MAAM,CAAC;IACzB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,KAAK,EAAE,MAAM,CAAC;CACf;AAED,UAAU,cAAc;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,gBAAgB,EAAE,MAAM,CAAC;IACzB,gBAAgB,EAAE,MAAM,CAAC;IACzB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,KAAK,EAAE,MAAM,CAAC;CACf;AAED,wBAAgB,iBAAiB,CAAC,WAAW,EAAE,cAAc,GAAG,WAAW,CAuE1E"}
import { Money } from '../money.model';
export interface BaseCryptoAssetBalance {
readonly availableBalance: Money;
}
export interface BtcCryptoAssetBalance extends BaseCryptoAssetBalance {
readonly protectedBalance: Money;
readonly uneconomicalBalance: Money;
}
export interface StxCryptoAssetBalance extends BaseCryptoAssetBalance {
readonly availableUnlockedBalance: Money;
readonly inboundBalance: Money;
readonly lockedBalance: Money;
readonly outboundBalance: Money;
readonly pendingBalance: Money;
readonly totalBalance: Money;
readonly unlockedBalance: Money;
}
export type CryptoAssetBalance = BaseCryptoAssetBalance | BtcCryptoAssetBalance | StxCryptoAssetBalance;
export declare function createCryptoAssetBalance(balance: Money): BaseCryptoAssetBalance;
//# sourceMappingURL=crypto-asset-balance.model.d.ts.map
{"version":3,"file":"crypto-asset-balance.model.d.ts","sourceRoot":"","sources":["../../../src/crypto-assets/crypto-asset-balance.model.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAEvC,MAAM,WAAW,sBAAsB;IAIrC,QAAQ,CAAC,gBAAgB,EAAE,KAAK,CAAC;CAClC;AAED,MAAM,WAAW,qBAAsB,SAAQ,sBAAsB;IAInE,QAAQ,CAAC,gBAAgB,EAAE,KAAK,CAAC;IAIjC,QAAQ,CAAC,mBAAmB,EAAE,KAAK,CAAC;CACrC;AAED,MAAM,WAAW,qBAAsB,SAAQ,sBAAsB;IAInE,QAAQ,CAAC,wBAAwB,EAAE,KAAK,CAAC;IAIzC,QAAQ,CAAC,cAAc,EAAE,KAAK,CAAC;IAI/B,QAAQ,CAAC,aAAa,EAAE,KAAK,CAAC;IAI9B,QAAQ,CAAC,eAAe,EAAE,KAAK,CAAC;IAIhC,QAAQ,CAAC,cAAc,EAAE,KAAK,CAAC;IAI/B,QAAQ,CAAC,YAAY,EAAE,KAAK,CAAC;IAI7B,QAAQ,CAAC,eAAe,EAAE,KAAK,CAAC;CACjC;AAED,MAAM,MAAM,kBAAkB,GAC1B,sBAAsB,GACtB,qBAAqB,GACrB,qBAAqB,CAAC;AAE1B,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,KAAK,GAAG,sBAAsB,CAE/E"}
import { InscriptionMimeType } from './bitcoin/inscription.model';
export interface BaseCryptoAssetInfo {
readonly decimals: number;
readonly hasMemo: boolean;
}
export interface BtcCryptoAssetInfo extends BaseCryptoAssetInfo {
readonly name: 'bitcoin';
readonly symbol: 'BTC';
}
export interface StxCryptoAssetInfo extends BaseCryptoAssetInfo {
readonly name: 'stacks';
readonly symbol: 'STX';
}
export interface Brc20CryptoAssetInfo extends BaseCryptoAssetInfo {
readonly name: 'brc-20';
readonly symbol: string;
}
export interface InscriptionCryptoAssetInfo {
readonly id: string;
readonly mimeType: InscriptionMimeType;
readonly name: 'inscription';
readonly number: number;
}
export interface RuneCryptoAssetInfo extends BaseCryptoAssetInfo {
readonly name: 'rune';
readonly spacedRuneName: string;
readonly runeName: string;
readonly symbol: string;
}
export interface StampCryptoAssetInfo {
readonly name: 'stamp';
readonly stamp: number;
readonly stampUrl: string;
}
export interface Src20CryptoAssetInfo extends BaseCryptoAssetInfo {
readonly id: string;
readonly name: 'src-20';
readonly symbol: string;
}
export interface Sip9CryptoAssetInfo {
readonly contractId: string;
readonly imageCanonicalUri: string;
readonly name: string;
}
export interface Sip10CryptoAssetInfo extends BaseCryptoAssetInfo {
readonly canTransfer: boolean;
readonly contractId: string;
readonly imageCanonicalUri: string;
readonly name: string;
readonly symbol: string;
}
export interface Stx20CryptoAssetInfo {
readonly name: 'stx-20';
readonly symbol: string;
}
//# sourceMappingURL=crypto-asset-info.model.d.ts.map
{"version":3,"file":"crypto-asset-info.model.d.ts","sourceRoot":"","sources":["../../../src/crypto-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oBAAqB,SAAQ,mBAAmB;IAC/D,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC;IACxB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB;AAGD,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,iBAAiB,EAAE,MAAM,CAAC;IACnC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,oBAAqB,SAAQ,mBAAmB;IAC/D,QAAQ,CAAC,WAAW,EAAE,OAAO,CAAC;IAC9B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,iBAAiB,EAAE,MAAM,CAAC;IACnC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC;IACxB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB"}
import { LiteralUnion } from './types.utils';
export type CryptoCurrencies = LiteralUnion<'BTC' | 'STX', string>;
export type FiatCurrencies = 'USD' | string;
export type Currencies = CryptoCurrencies | FiatCurrencies;
//# sourceMappingURL=currencies.model.d.ts.map
{"version":3,"file":"currencies.model.d.ts","sourceRoot":"","sources":["../../src/currencies.model.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAE7C,MAAM,MAAM,gBAAgB,GAAG,YAAY,CAAC,KAAK,GAAG,KAAK,EAAE,MAAM,CAAC,CAAC;AAEnE,MAAM,MAAM,cAAc,GAAG,KAAK,GAAG,MAAM,CAAC;AAE5C,MAAM,MAAM,UAAU,GAAG,gBAAgB,GAAG,cAAc,CAAC"}
import type BigNumber from 'bignumber.js';
export interface AverageBitcoinFeeRates {
fastestFee: BigNumber;
halfHourFee: BigNumber;
hourFee: BigNumber;
}
export declare const btcTxTimeMap: Record<keyof AverageBitcoinFeeRates, string>;
export declare enum BtcFeeType {
High = "High",
Standard = "Standard",
Low = "Low"
}
//# sourceMappingURL=bitcoin-fees.model.d.ts.map
{"version":3,"file":"bitcoin-fees.model.d.ts","sourceRoot":"","sources":["../../../src/fees/bitcoin-fees.model.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,SAAS,MAAM,cAAc,CAAC;AAE1C,MAAM,WAAW,sBAAsB;IACrC,UAAU,EAAE,SAAS,CAAC;IACtB,WAAW,EAAE,SAAS,CAAC;IACvB,OAAO,EAAE,SAAS,CAAC;CACpB;AAED,eAAO,MAAM,YAAY,EAAE,MAAM,CAAC,MAAM,sBAAsB,EAAE,MAAM,CAIrE,CAAC;AAEF,oBAAY,UAAU;IACpB,IAAI,SAAS;IACb,QAAQ,aAAa;IACrB,GAAG,QAAQ;CACZ"}
import { Blockchains } from '../types';
import { StacksFeeEstimate } from './stacks-fees.model';
export declare enum FeeTypes {
Low = 0,
Middle = 1,
High = 2,
Custom = 3,
Unknown = 4
}
export declare enum FeeCalculationTypes {
Api = "api",
Default = "default",
DefaultSimulated = "default-simulated",
FeesCapped = "fees-capped"
}
export interface Fees {
blockchain: Blockchains;
estimates: StacksFeeEstimate[];
calculation: FeeCalculationTypes;
}
//# sourceMappingURL=fees.model.d.ts.map
{"version":3,"file":"fees.model.d.ts","sourceRoot":"","sources":["../../../src/fees/fees.model.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACvC,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAExD,oBAAY,QAAQ;IAClB,GAAG,IAAA;IACH,MAAM,IAAA;IACN,IAAI,IAAA;IACJ,MAAM,IAAA;IACN,OAAO,IAAA;CACR;AAED,oBAAY,mBAAmB;IAC7B,GAAG,QAAQ;IACX,OAAO,YAAY;IACnB,gBAAgB,sBAAsB;IACtC,UAAU,gBAAgB;CAC3B;AAED,MAAM,WAAW,IAAI;IACnB,UAAU,EAAE,WAAW,CAAC;IACxB,SAAS,EAAE,iBAAiB,EAAE,CAAC;IAC/B,WAAW,EAAE,mBAAmB,CAAC;CAClC"}
import { Money } from '../money.model';
export interface StacksFeeEstimate {
fee: Money;
feeRate: number;
}
export interface ApiFeeEstimation {
fee: number;
fee_rate: number;
}
export interface StacksTxFeeEstimation {
cost_scalar_change_by_byte: number;
estimated_cost: object;
estimated_cost_scalar: number;
estimations: ApiFeeEstimation[];
error?: string;
}
//# sourceMappingURL=stacks-fees.model.d.ts.map
{"version":3,"file":"stacks-fees.model.d.ts","sourceRoot":"","sources":["../../../src/fees/stacks-fees.model.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAEvC,MAAM,WAAW,iBAAiB;IAChC,GAAG,EAAE,KAAK,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,gBAAgB;IAC/B,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,qBAAqB;IACpC,0BAA0B,EAAE,MAAM,CAAC;IACnC,cAAc,EAAE,MAAM,CAAC;IACvB,qBAAqB,EAAE,MAAM,CAAC;IAC9B,WAAW,EAAE,gBAAgB,EAAE,CAAC;IAChC,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB"}
import type { CryptoCurrencies, FiatCurrencies } from './currencies.model';
import type { Money } from './money.model';
interface MarketPair {
readonly base: CryptoCurrencies;
readonly quote: FiatCurrencies;
}
export declare function createMarketPair(base: CryptoCurrencies, quote: FiatCurrencies): MarketPair;
export declare function formatMarketPair({ base, quote }: MarketPair): string;
export interface MarketData {
readonly pair: MarketPair;
readonly price: Money;
}
export declare function createMarketData(pair: MarketPair, price: Money): MarketData;
export {};
//# sourceMappingURL=market.model.d.ts.map
{"version":3,"file":"market.model.d.ts","sourceRoot":"","sources":["../../src/market.model.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAC3E,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAE3C,UAAU,UAAU;IAClB,QAAQ,CAAC,IAAI,EAAE,gBAAgB,CAAC;IAChC,QAAQ,CAAC,KAAK,EAAE,cAAc,CAAC;CAChC;AAED,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,gBAAgB,EAAE,KAAK,EAAE,cAAc,GAAG,UAAU,CAE1F;AAED,wBAAgB,gBAAgB,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,UAAU,UAE3D;AAED,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAC;IAC1B,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC;CACvB;AAED,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,KAAK,GAAG,UAAU,CAI3E"}
import type BigNumber from 'bignumber.js';
import type { Currencies } from './currencies.model';
export type NumType = BigNumber | bigint | number;
export interface Money {
readonly amount: BigNumber;
readonly symbol: Currencies;
readonly decimals: number;
}
//# sourceMappingURL=money.model.d.ts.map
{"version":3,"file":"money.model.d.ts","sourceRoot":"","sources":["../../src/money.model.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,SAAS,MAAM,cAAc,CAAC;AAE1C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAErD,MAAM,MAAM,OAAO,GAAG,SAAS,GAAG,MAAM,GAAG,MAAM,CAAC;AAElD,MAAM,WAAW,KAAK;IACpB,QAAQ,CAAC,MAAM,EAAE,SAAS,CAAC;IAC3B,QAAQ,CAAC,MAAM,EAAE,UAAU,CAAC;IAC5B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;CAC3B"}
import { Blockchains } from './types';
export declare const HIRO_API_BASE_URL_MAINNET = "https://api.hiro.so";
export declare const HIRO_API_BASE_URL_TESTNET = "https://api.testnet.hiro.so";
export declare const HIRO_INSCRIPTIONS_API_URL = "https://api.hiro.so/ordinals/v1/inscriptions";
export declare const HIRO_API_BASE_URL_NAKAMOTO_TESTNET = "https://api.nakamoto.testnet.hiro.so";
export declare const BITCOIN_API_BASE_URL_MAINNET = "https://blockstream.info/api";
export declare const BITCOIN_API_BASE_URL_TESTNET = "https://blockstream.info/testnet/api";
export declare const BITCOIN_API_BASE_URL_SIGNET = "https://mempool.space/signet/api";
export declare const BESTINSLOT_API_BASE_URL_MAINNET = "https://leatherapi.bestinslot.xyz/v3";
export declare const BESTINSLOT_API_BASE_URL_TESTNET = "https://leatherapi_testnet.bestinslot.xyz/v3";
export declare enum ChainID {
Testnet = 2147483648,
Mainnet = 1
}
export declare enum WalletDefaultNetworkConfigurationIds {
mainnet = "mainnet",
testnet = "testnet",
signet = "signet",
sbtcDevenv = "sbtcDevenv",
devnet = "devnet"
}
export type DefaultNetworkConfigurations = keyof typeof WalletDefaultNetworkConfigurationIds;
declare const supportedBlockchains: readonly ["stacks", "bitcoin"];
export type SupportedBlockchains = (typeof supportedBlockchains)[number];
declare const networkModes: readonly ["mainnet", "testnet"];
export type NetworkModes = (typeof networkModes)[number];
type BitcoinTestnetModes = 'testnet' | 'regtest' | 'signet';
export type BitcoinNetworkModes = NetworkModes | BitcoinTestnetModes;
interface BaseChainConfig {
blockchain: Blockchains;
}
export interface BitcoinChainConfig extends BaseChainConfig {
blockchain: 'bitcoin';
bitcoinUrl: string;
bitcoinNetwork: BitcoinNetworkModes;
}
export interface StacksChainConfig extends BaseChainConfig {
blockchain: 'stacks';
url: string;
chainId: ChainID;
subnetChainId?: ChainID;
}
export interface NetworkConfiguration {
name: string;
id: DefaultNetworkConfigurations;
chain: {
bitcoin: BitcoinChainConfig;
stacks: StacksChainConfig;
};
}
export declare const defaultCurrentNetwork: NetworkConfiguration;
export declare const defaultNetworksKeyedById: Record<WalletDefaultNetworkConfigurationIds, NetworkConfiguration>;
export {};
//# sourceMappingURL=network.model.d.ts.map
{"version":3,"file":"network.model.d.ts","sourceRoot":"","sources":["../../src/network.model.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAEtC,eAAO,MAAM,yBAAyB,wBAAwB,CAAC;AAC/D,eAAO,MAAM,yBAAyB,gCAAgC,CAAC;AACvE,eAAO,MAAM,yBAAyB,iDAAiD,CAAC;AACxF,eAAO,MAAM,kCAAkC,yCAAyC,CAAC;AAEzF,eAAO,MAAM,4BAA4B,iCAAiC,CAAC;AAC3E,eAAO,MAAM,4BAA4B,yCAAyC,CAAC;AACnF,eAAO,MAAM,2BAA2B,qCAAqC,CAAC;AAE9E,eAAO,MAAM,+BAA+B,yCAAyC,CAAC;AACtF,eAAO,MAAM,+BAA+B,iDAAiD,CAAC;AAG9F,oBAAY,OAAO;IACjB,OAAO,aAAa;IACpB,OAAO,IAAI;CACZ;AAED,oBAAY,oCAAoC;IAC9C,OAAO,YAAY;IACnB,OAAO,YAAY;IACnB,MAAM,WAAW;IACjB,UAAU,eAAe;IACzB,MAAM,WAAW;CAClB;AAED,MAAM,MAAM,4BAA4B,GAAG,MAAM,OAAO,oCAAoC,CAAC;AAE7F,QAAA,MAAM,oBAAoB,gCAAiC,CAAC;AAE5D,MAAM,MAAM,oBAAoB,GAAG,CAAC,OAAO,oBAAoB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEzE,QAAA,MAAM,YAAY,iCAAkC,CAAC;AAErD,MAAM,MAAM,YAAY,GAAG,CAAC,OAAO,YAAY,CAAC,CAAC,MAAM,CAAC,CAAC;AAEzD,KAAK,mBAAmB,GAAG,SAAS,GAAG,SAAS,GAAG,QAAQ,CAAC;AAE5D,MAAM,MAAM,mBAAmB,GAAG,YAAY,GAAG,mBAAmB,CAAC;AAErE,UAAU,eAAe;IACvB,UAAU,EAAE,WAAW,CAAC;CACzB;AAED,MAAM,WAAW,kBAAmB,SAAQ,eAAe;IACzD,UAAU,EAAE,SAAS,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;IACnB,cAAc,EAAE,mBAAmB,CAAC;CACrC;AAED,MAAM,WAAW,iBAAkB,SAAQ,eAAe;IACxD,UAAU,EAAE,QAAQ,CAAC;IACrB,GAAG,EAAE,MAAM,CAAC;IAEZ,OAAO,EAAE,OAAO,CAAC;IAEjB,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAED,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,4BAA4B,CAAC;IACjC,KAAK,EAAE;QACL,OAAO,EAAE,kBAAkB,CAAC;QAC5B,MAAM,EAAE,iBAAiB,CAAC;KAC3B,CAAC;CACH;AAuFD,eAAO,MAAM,qBAAqB,EAAE,oBAAqC,CAAC;AAE1E,eAAO,MAAM,wBAAwB,EAAE,MAAM,CAC3C,oCAAoC,EACpC,oBAAoB,CAOrB,CAAC"}
interface BitcoinTransactionIssuance {
asset_id: string;
is_reissuance: boolean;
asset_blinding_nonce: number;
asset_entropy: number;
contract_hash: string;
assetamount?: number;
assetamountcommitment?: number;
tokenamount?: number;
tokenamountcommitment?: number;
}
interface BitcoinTransactionPegOut {
genesis_hash: string;
scriptpubkey: string;
scriptpubkey_asm: string;
scriptpubkey_address: string;
}
interface BitcoinTransactionStatus {
confirmed: boolean;
block_height?: number | null;
block_hash?: string | null;
block_time?: number | null;
}
export interface BitcoinTransactionVectorOutput {
scriptpubkey: string;
scriptpubkey_asm: string;
scriptpubkey_type: string;
scriptpubkey_address: string;
value: number;
valuecommitment?: number;
asset?: string;
assetcommitment?: number;
pegout?: BitcoinTransactionPegOut | null;
}
export interface BitcoinTransactionVectorInput {
inner_redeemscript_asm?: string;
inner_witnessscript_asm?: string;
is_coinbase: boolean;
is_pegin?: boolean;
issuance?: BitcoinTransactionIssuance | null;
prevout: BitcoinTransactionVectorOutput;
scriptsig: string;
scriptsig_asm: string;
sequence: number;
txid: string;
vout: number;
witness: string[];
}
export interface BitcoinTx {
fee: number;
locktime: number;
size: number;
status: BitcoinTransactionStatus;
tx_type?: string;
txid: string;
version: number;
vin: BitcoinTransactionVectorInput[];
vout: BitcoinTransactionVectorOutput[];
weight: number;
}
export {};
//# sourceMappingURL=bitcoin-transaction.model.d.ts.map
{"version":3,"file":"bitcoin-transaction.model.d.ts","sourceRoot":"","sources":["../../../src/transactions/bitcoin-transaction.model.ts"],"names":[],"mappings":"AACA,UAAU,0BAA0B;IAClC,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,EAAE,OAAO,CAAC;IACvB,oBAAoB,EAAE,MAAM,CAAC;IAC7B,aAAa,EAAE,MAAM,CAAC;IACtB,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,qBAAqB,CAAC,EAAE,MAAM,CAAC;CAChC;AAED,UAAU,wBAAwB;IAChC,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,gBAAgB,EAAE,MAAM,CAAC;IACzB,oBAAoB,EAAE,MAAM,CAAC;CAC9B;AAED,UAAU,wBAAwB;IAChC,SAAS,EAAE,OAAO,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC5B;AAED,MAAM,WAAW,8BAA8B;IAC7C,YAAY,EAAE,MAAM,CAAC;IACrB,gBAAgB,EAAE,MAAM,CAAC;IACzB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,oBAAoB,EAAE,MAAM,CAAC;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,MAAM,CAAC,EAAE,wBAAwB,GAAG,IAAI,CAAC;CAC1C;AAED,MAAM,WAAW,6BAA6B;IAC5C,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC,WAAW,EAAE,OAAO,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,0BAA0B,GAAG,IAAI,CAAC;IAC7C,OAAO,EAAE,8BAA8B,CAAC;IACxC,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,MAAM,CAAC;IACtB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB;AAED,MAAM,WAAW,SAAS;IACxB,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,wBAAwB,CAAC;IACjC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,GAAG,EAAE,6BAA6B,EAAE,CAAC;IACrC,IAAI,EAAE,8BAA8B,EAAE,CAAC;IACvC,MAAM,EAAE,MAAM,CAAC;CAChB"}
import type React from 'react';
export interface StxTransfer {
amount: string;
sender?: string;
recipient?: string;
}
export interface FtTransfer {
asset_identifier: string;
amount: string;
sender?: string;
recipient?: string;
}
export interface TxTransferDetails {
caption: string;
icon: React.JSX.Element;
link: string;
title: string;
value: number | string | null;
}
//# sourceMappingURL=stacks-transaction.model.d.ts.map
{"version":3,"file":"stacks-transaction.model.d.ts","sourceRoot":"","sources":["../../../src/transactions/stacks-transaction.model.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,MAAM,WAAW,WAAW;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,UAAU;IACzB,gBAAgB,EAAE,MAAM,CAAC;IACzB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;CAC/B"}
import { LiteralUnion } from './types.utils';
export type Blockchains = LiteralUnion<'bitcoin' | 'stacks', string>;
export type CryptoAssetType = 'btc' | 'stx' | 'brc-20' | 'inscription' | 'rune' | 'sip-9' | 'sip-10' | 'src-20' | 'stamp' | 'stx-20';
//# sourceMappingURL=types.d.ts.map
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAE7C,MAAM,MAAM,WAAW,GAAG,YAAY,CAAC,SAAS,GAAG,QAAQ,EAAE,MAAM,CAAC,CAAC;AAErE,MAAM,MAAM,eAAe,GACvB,KAAK,GACL,KAAK,GACL,QAAQ,GACR,aAAa,GACb,MAAM,GACN,OAAO,GACP,QAAQ,GACR,QAAQ,GACR,OAAO,GACP,QAAQ,CAAC"}
export type ValueOf<T> = T[keyof T];
export interface AllowAdditionalProperties {
[x: string | number | symbol]: unknown;
}
type Primitive = null | undefined | string | number | boolean | symbol | bigint;
export type LiteralUnion<LiteralType, BaseType extends Primitive> = LiteralType | (BaseType & Record<never, never>);
export type Entries<T> = {
[K in keyof T]: [K, T[K]];
}[keyof T][];
export {};
//# sourceMappingURL=types.utils.d.ts.map
{"version":3,"file":"types.utils.d.ts","sourceRoot":"","sources":["../../src/types.utils.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;AAEpC,MAAM,WAAW,yBAAyB;IACxC,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;CACxC;AAED,KAAK,SAAS,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,CAAC;AAEhF,MAAM,MAAM,YAAY,CAAC,WAAW,EAAE,QAAQ,SAAS,SAAS,IAC5D,WAAW,GACX,CAAC,QAAQ,GAAG,MAAM,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC;AAEtC,MAAM,MAAM,OAAO,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;CAAE,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC"}
export interface UtxoItem {
txid: string;
vout: number;
status: {
confirmed: boolean;
block_height: number;
block_hash: string;
block_time: number;
};
value: number;
}
//# sourceMappingURL=utxo.model.d.ts.map
{"version":3,"file":"utxo.model.d.ts","sourceRoot":"","sources":["../../src/utxo.model.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE;QACN,SAAS,EAAE,OAAO,CAAC;QACnB,YAAY,EAAE,MAAM,CAAC;QACrB,UAAU,EAAE,MAAM,CAAC;QACnB,UAAU,EAAE,MAAM,CAAC;KACpB,CAAC;IACF,KAAK,EAAE,MAAM,CAAC;CACf"}

Sorry, the diff of this file is not supported yet

export * from './src/crypto-assets/crypto-asset-balance.model';
export * from './src/crypto-assets/crypto-asset-info.model';
export * from './src/crypto-assets/bitcoin/inscription.model';
export * from './src/currencies.model';
export * from './src/fees/bitcoin-fees.model';
export * from './src/fees/fees.model';
export * from './src/fees/stacks-fees.model';
export * from './src/market.model';
export * from './src/types';
export * from './src/types.utils';
export * from './src/money.model';
export * from './src/network.model';
export * from './src/transactions/bitcoin-transaction.model';
export * from './src/transactions/stacks-transaction.model';
export * from './src/utxo.model';