@leather.io/constants 0.18.0 → 0.19.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,16 +1,16 @@
1
1
 
2
- > @leather.io/constants@0.18.0 build /home/runner/work/mono/mono/packages/constants
2
+ > @leather.io/constants@0.19.0 build /home/runner/work/mono/mono/packages/constants
3
3
  > tsup
4
4
 
5
- CLI Building entry: src/index.ts
6
- CLI Using tsconfig: tsconfig.json
7
- CLI tsup v8.1.0
8
- CLI Using tsup config: /home/runner/work/mono/mono/packages/constants/tsup.config.ts
9
- CLI Target: es2022
10
- ESM Build start
11
- ESM dist/index.js 3.31 KB
12
- ESM dist/index.js.map 5.06 KB
13
- ESM ⚡️ Build success in 13ms
14
- DTS Build start
15
- DTS ⚡️ Build success in 1188ms
16
- DTS dist/index.d.ts 2.83 KB
5
+ CLI Building entry: src/index.ts
6
+ CLI Using tsconfig: tsconfig.json
7
+ CLI tsup v8.4.0
8
+ CLI Using tsup config: /home/runner/work/mono/mono/packages/constants/tsup.config.ts
9
+ CLI Target: es2022
10
+ ESM Build start
11
+ ESM dist/index.js 3.56 KB
12
+ ESM dist/index.js.map 5.32 KB
13
+ ESM ⚡️ Build success in 22ms
14
+ DTS Build start
15
+ DTS ⚡️ Build success in 1128ms
16
+ DTS dist/index.d.ts 2.91 KB
package/CHANGELOG.md CHANGED
@@ -145,6 +145,20 @@
145
145
  * dependencies
146
146
  * @leather.io/models bumped to 0.28.0
147
147
 
148
+ ### Dependencies
149
+
150
+ * The following workspace dependencies were updated
151
+ * dependencies
152
+ * @leather.io/models bumped to 0.30.0
153
+
154
+ ## [0.19.0](https://github.com/leather-io/mono/compare/@leather.io/constants-v0.18.1...@leather.io/constants-v0.19.0) (2025-03-27)
155
+
156
+
157
+ ### Features
158
+
159
+ * integrate leather api types into client ([c6ea29b](https://github.com/leather-io/mono/commit/c6ea29b3bc472f7fdfe9d5ab2880bbffa6a68cf4))
160
+ * **web:** table improvements ([e625b84](https://github.com/leather-io/mono/commit/e625b847f2e1cf46a93a0e046bb8c55b73ed5d34))
161
+
148
162
  ## [0.18.0](https://github.com/leather-io/mono/compare/@leather.io/constants-v0.17.5...@leather.io/constants-v0.18.0) (2025-03-11)
149
163
 
150
164
 
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { BitcoinUnit, BitcoinUnitInfo, AccountDisplayPreference, AccountDisplayPreferenceInfo, BtcCryptoAssetInfo, StxCryptoAssetInfo } from '@leather.io/models';
1
+ import { Currency, BitcoinUnit, BitcoinUnitInfo, AccountDisplayPreference, AccountDisplayPreferenceInfo, BtcCryptoAssetInfo, StxCryptoAssetInfo } from '@leather.io/models';
2
2
 
3
3
  declare const gaiaUrl = "https://hub.blockstack.org";
4
4
  declare const ZERO_INDEX = 0;
@@ -12,18 +12,7 @@ declare const PERSISTENCE_CACHE_TIME: number;
12
12
  declare const BTC_DECIMALS = 8;
13
13
  declare const STX_DECIMALS = 6;
14
14
  declare const SATS_IN_BTC = 100000000;
15
- declare const currencyDecimalsMap: {
16
- readonly BTC: 8;
17
- readonly STX: 6;
18
- readonly USD: 2;
19
- readonly EUR: 2;
20
- readonly GBP: 2;
21
- readonly AUD: 2;
22
- readonly CAD: 2;
23
- readonly CNY: 2;
24
- readonly JPY: 0;
25
- readonly KRW: 0;
26
- };
15
+ declare const currencyDecimalsMap: Record<Currency, number>;
27
16
  declare const currencyNameMap: {
28
17
  readonly USD: "United States Dollar";
29
18
  readonly EUR: "Euro";
@@ -42,7 +31,9 @@ declare const LEATHER_SUPPORT_URL = "https://leather.io/contact";
42
31
  declare const LEATHER_GUIDES_URL = "https://leather.io/guides";
43
32
  declare const LEATHER_GUIDES_CONNECT_DAPPS = "https://leather.io/guides/connect-dapps";
44
33
  declare const LEATHER_LEARN_URL = "https://leather.io/learn";
45
- declare const LEATHER_API_URL = "https://leather-api-gateway-staging.wallet-6d1.workers.dev";
34
+ declare const LEATHER_EXTENSION_CHROME_STORE_URL = "https://chromewebstore.google.com/detail/leather/ldinpeekobnhjjdofggfgjlcehhmanlj?hl=en";
35
+ declare const LEATHER_API_URL_STAGING = "https://staging.api.leather.io";
36
+ declare const LEATHER_API_URL_PRODUCTION = "https://api.leather.io";
46
37
  declare const bitcoinUnitsKeyedByName: Record<BitcoinUnit, BitcoinUnitInfo>;
47
38
  declare enum AccountDisplayPreferenceType {
48
39
  NativeSegwit = "native-segwit",
@@ -54,4 +45,4 @@ declare const accountDisplayPreferencesKeyedByType: Record<AccountDisplayPrefere
54
45
  declare const btcCryptoAsset: BtcCryptoAssetInfo;
55
46
  declare const stxCryptoAsset: StxCryptoAssetInfo;
56
47
 
57
- export { AccountDisplayPreferenceType, BTC_DECIMALS, BTC_P2WPKH_DUST_AMOUNT, DEFAULT_FEE_RATE, DEFAULT_LIST_LIMIT, HIGH_FEE_AMOUNT_STX, HIGH_FEE_WARNING_LEARN_MORE_URL_BTC, HIGH_FEE_WARNING_LEARN_MORE_URL_STX, HIRO_EXPLORER_URL, KEBAB_REGEX, LEATHER_API_URL, LEATHER_GUIDES_CONNECT_DAPPS, LEATHER_GUIDES_URL, LEATHER_LEARN_URL, LEATHER_SUPPORT_URL, ORD_IO_URL, PERSISTENCE_CACHE_TIME, SATS_IN_BTC, STX_DECIMALS, TOKEN_NAME_LENGTH, ZERO_INDEX, accountDisplayPreferencesKeyedByType, bitcoinUnitsKeyedByName, btcCryptoAsset, currencyDecimalsMap, currencyNameMap, gaiaUrl, stxCryptoAsset };
48
+ export { AccountDisplayPreferenceType, BTC_DECIMALS, BTC_P2WPKH_DUST_AMOUNT, DEFAULT_FEE_RATE, DEFAULT_LIST_LIMIT, HIGH_FEE_AMOUNT_STX, HIGH_FEE_WARNING_LEARN_MORE_URL_BTC, HIGH_FEE_WARNING_LEARN_MORE_URL_STX, HIRO_EXPLORER_URL, KEBAB_REGEX, LEATHER_API_URL_PRODUCTION, LEATHER_API_URL_STAGING, LEATHER_EXTENSION_CHROME_STORE_URL, LEATHER_GUIDES_CONNECT_DAPPS, LEATHER_GUIDES_URL, LEATHER_LEARN_URL, LEATHER_SUPPORT_URL, ORD_IO_URL, PERSISTENCE_CACHE_TIME, SATS_IN_BTC, STX_DECIMALS, TOKEN_NAME_LENGTH, ZERO_INDEX, accountDisplayPreferencesKeyedByType, bitcoinUnitsKeyedByName, btcCryptoAsset, currencyDecimalsMap, currencyNameMap, gaiaUrl, stxCryptoAsset };
package/dist/index.js CHANGED
@@ -41,7 +41,9 @@ var LEATHER_SUPPORT_URL = "https://leather.io/contact";
41
41
  var LEATHER_GUIDES_URL = "https://leather.io/guides";
42
42
  var LEATHER_GUIDES_CONNECT_DAPPS = `${LEATHER_GUIDES_URL}/connect-dapps`;
43
43
  var LEATHER_LEARN_URL = "https://leather.io/learn";
44
- var LEATHER_API_URL = "https://leather-api-gateway-staging.wallet-6d1.workers.dev";
44
+ var LEATHER_EXTENSION_CHROME_STORE_URL = "https://chromewebstore.google.com/detail/leather/ldinpeekobnhjjdofggfgjlcehhmanlj?hl=en";
45
+ var LEATHER_API_URL_STAGING = "https://staging.api.leather.io";
46
+ var LEATHER_API_URL_PRODUCTION = "https://api.leather.io";
45
47
  var bitcoinUnitsKeyedByName = {
46
48
  bitcoin: {
47
49
  name: "bitcoin",
@@ -110,7 +112,9 @@ export {
110
112
  HIGH_FEE_WARNING_LEARN_MORE_URL_STX,
111
113
  HIRO_EXPLORER_URL,
112
114
  KEBAB_REGEX,
113
- LEATHER_API_URL,
115
+ LEATHER_API_URL_PRODUCTION,
116
+ LEATHER_API_URL_STAGING,
117
+ LEATHER_EXTENSION_CHROME_STORE_URL,
114
118
  LEATHER_GUIDES_CONNECT_DAPPS,
115
119
  LEATHER_GUIDES_URL,
116
120
  LEATHER_LEARN_URL,
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts"],"sourcesContent":["import type {\n AccountDisplayPreference,\n AccountDisplayPreferenceInfo,\n BitcoinUnit,\n BitcoinUnitInfo,\n BtcCryptoAssetInfo,\n StxCryptoAssetInfo,\n} from '@leather.io/models';\n\nexport const gaiaUrl = 'https://hub.blockstack.org';\n\nexport const ZERO_INDEX = 0;\n\nexport const HIRO_EXPLORER_URL = 'https://explorer.hiro.so';\nexport const ORD_IO_URL = 'https://ord.io';\n\nexport const HIGH_FEE_AMOUNT_STX = 5;\nexport const HIGH_FEE_WARNING_LEARN_MORE_URL_BTC = 'https://bitcoinfees.earn.com/';\nexport const HIGH_FEE_WARNING_LEARN_MORE_URL_STX =\n 'https://leather.gitbook.io/guides/transactions/fees';\n\nexport const DEFAULT_FEE_RATE = 400;\n\nexport const PERSISTENCE_CACHE_TIME = 1000 * 60 * 60 * 12; // 12 hours\n\nexport const BTC_DECIMALS = 8;\nexport const STX_DECIMALS = 6;\nexport const SATS_IN_BTC = 100_000_000;\n\n// Units of `Money` should be declared in their smallest unit. Similar to\n// Rosetta, we model currencies with their respective resolution\nexport const currencyDecimalsMap = {\n BTC: BTC_DECIMALS,\n STX: STX_DECIMALS,\n USD: 2,\n EUR: 2,\n GBP: 2,\n AUD: 2,\n CAD: 2,\n CNY: 2,\n JPY: 0,\n KRW: 0,\n} as const;\n\nexport const currencyNameMap = {\n USD: 'United States Dollar',\n EUR: 'Euro',\n GBP: 'British Pound',\n AUD: 'Australian Dollar',\n CAD: 'Canadian Dollar',\n CNY: 'Chinese Yuan',\n JPY: 'Japanese Yen',\n KRW: 'South Korean Won',\n} as const;\n\n// https://bitcoin.stackexchange.com/a/41082/139277\nexport const BTC_P2WPKH_DUST_AMOUNT = 294;\n\nexport const KEBAB_REGEX = /[A-Z\\u00C0-\\u00D6\\u00D8-\\u00DE]/g;\n\nexport const DEFAULT_LIST_LIMIT = 50;\n\nexport const TOKEN_NAME_LENGTH = 4;\n\nexport const LEATHER_SUPPORT_URL = 'https://leather.io/contact';\n\nexport const LEATHER_GUIDES_URL = 'https://leather.io/guides';\n\nexport const LEATHER_GUIDES_CONNECT_DAPPS = `${LEATHER_GUIDES_URL}/connect-dapps`;\n\nexport const LEATHER_LEARN_URL = 'https://leather.io/learn';\n\nexport const LEATHER_API_URL = 'https://leather-api-gateway-staging.wallet-6d1.workers.dev';\n\nexport const bitcoinUnitsKeyedByName: Record<BitcoinUnit, BitcoinUnitInfo> = {\n bitcoin: {\n name: 'bitcoin',\n symbol: 'BTC',\n decimal: '1',\n },\n satoshi: {\n name: 'satoshi',\n symbol: 'sat',\n decimal: '0.00000001',\n },\n};\n\nexport enum AccountDisplayPreferenceType {\n NativeSegwit = 'native-segwit',\n Taproot = 'taproot',\n Bns = 'bns',\n Stacks = 'stacks',\n}\n\nexport const accountDisplayPreferencesKeyedByType: Record<\n AccountDisplayPreference,\n AccountDisplayPreferenceInfo\n> = {\n [AccountDisplayPreferenceType.NativeSegwit]: {\n type: 'native-segwit',\n blockchain: 'bitcoin',\n name: 'Native Segwit address',\n },\n [AccountDisplayPreferenceType.Taproot]: {\n type: 'taproot',\n blockchain: 'bitcoin',\n name: 'Taproot address',\n },\n [AccountDisplayPreferenceType.Bns]: {\n type: 'bns',\n blockchain: 'stacks',\n name: 'BNS name',\n },\n [AccountDisplayPreferenceType.Stacks]: {\n type: 'stacks',\n blockchain: 'stacks',\n name: 'Stacks address',\n },\n};\n\nexport const btcCryptoAsset: BtcCryptoAssetInfo = {\n chain: 'bitcoin',\n protocol: 'nativeBtc',\n symbol: 'BTC',\n category: 'fungible',\n decimals: 8,\n hasMemo: false,\n};\n\nexport const stxCryptoAsset: StxCryptoAssetInfo = {\n chain: 'stacks',\n protocol: 'nativeStx',\n symbol: 'STX',\n category: 'fungible',\n decimals: 6,\n hasMemo: false,\n};\n"],"mappings":";AASO,IAAM,UAAU;AAEhB,IAAM,aAAa;AAEnB,IAAM,oBAAoB;AAC1B,IAAM,aAAa;AAEnB,IAAM,sBAAsB;AAC5B,IAAM,sCAAsC;AAC5C,IAAM,sCACX;AAEK,IAAM,mBAAmB;AAEzB,IAAM,yBAAyB,MAAO,KAAK,KAAK;AAEhD,IAAM,eAAe;AACrB,IAAM,eAAe;AACrB,IAAM,cAAc;AAIpB,IAAM,sBAAsB;AAAA,EACjC,KAAK;AAAA,EACL,KAAK;AAAA,EACL,KAAK;AAAA,EACL,KAAK;AAAA,EACL,KAAK;AAAA,EACL,KAAK;AAAA,EACL,KAAK;AAAA,EACL,KAAK;AAAA,EACL,KAAK;AAAA,EACL,KAAK;AACP;AAEO,IAAM,kBAAkB;AAAA,EAC7B,KAAK;AAAA,EACL,KAAK;AAAA,EACL,KAAK;AAAA,EACL,KAAK;AAAA,EACL,KAAK;AAAA,EACL,KAAK;AAAA,EACL,KAAK;AAAA,EACL,KAAK;AACP;AAGO,IAAM,yBAAyB;AAE/B,IAAM,cAAc;AAEpB,IAAM,qBAAqB;AAE3B,IAAM,oBAAoB;AAE1B,IAAM,sBAAsB;AAE5B,IAAM,qBAAqB;AAE3B,IAAM,+BAA+B,GAAG,kBAAkB;AAE1D,IAAM,oBAAoB;AAE1B,IAAM,kBAAkB;AAExB,IAAM,0BAAgE;AAAA,EAC3E,SAAS;AAAA,IACP,MAAM;AAAA,IACN,QAAQ;AAAA,IACR,SAAS;AAAA,EACX;AAAA,EACA,SAAS;AAAA,IACP,MAAM;AAAA,IACN,QAAQ;AAAA,IACR,SAAS;AAAA,EACX;AACF;AAEO,IAAK,+BAAL,kBAAKA,kCAAL;AACL,EAAAA,8BAAA,kBAAe;AACf,EAAAA,8BAAA,aAAU;AACV,EAAAA,8BAAA,SAAM;AACN,EAAAA,8BAAA,YAAS;AAJC,SAAAA;AAAA,GAAA;AAOL,IAAM,uCAGT;AAAA,EACF,CAAC,kCAAyC,GAAG;AAAA,IAC3C,MAAM;AAAA,IACN,YAAY;AAAA,IACZ,MAAM;AAAA,EACR;AAAA,EACA,CAAC,uBAAoC,GAAG;AAAA,IACtC,MAAM;AAAA,IACN,YAAY;AAAA,IACZ,MAAM;AAAA,EACR;AAAA,EACA,CAAC,eAAgC,GAAG;AAAA,IAClC,MAAM;AAAA,IACN,YAAY;AAAA,IACZ,MAAM;AAAA,EACR;AAAA,EACA,CAAC,qBAAmC,GAAG;AAAA,IACrC,MAAM;AAAA,IACN,YAAY;AAAA,IACZ,MAAM;AAAA,EACR;AACF;AAEO,IAAM,iBAAqC;AAAA,EAChD,OAAO;AAAA,EACP,UAAU;AAAA,EACV,QAAQ;AAAA,EACR,UAAU;AAAA,EACV,UAAU;AAAA,EACV,SAAS;AACX;AAEO,IAAM,iBAAqC;AAAA,EAChD,OAAO;AAAA,EACP,UAAU;AAAA,EACV,QAAQ;AAAA,EACR,UAAU;AAAA,EACV,UAAU;AAAA,EACV,SAAS;AACX;","names":["AccountDisplayPreferenceType"]}
1
+ {"version":3,"sources":["../src/index.ts"],"sourcesContent":["import type {\n AccountDisplayPreference,\n AccountDisplayPreferenceInfo,\n BitcoinUnit,\n BitcoinUnitInfo,\n BtcCryptoAssetInfo,\n Currency,\n StxCryptoAssetInfo,\n} from '@leather.io/models';\n\nexport const gaiaUrl = 'https://hub.blockstack.org';\n\nexport const ZERO_INDEX = 0;\n\nexport const HIRO_EXPLORER_URL = 'https://explorer.hiro.so';\nexport const ORD_IO_URL = 'https://ord.io';\n\nexport const HIGH_FEE_AMOUNT_STX = 5;\nexport const HIGH_FEE_WARNING_LEARN_MORE_URL_BTC = 'https://bitcoinfees.earn.com/';\nexport const HIGH_FEE_WARNING_LEARN_MORE_URL_STX =\n 'https://leather.gitbook.io/guides/transactions/fees';\n\nexport const DEFAULT_FEE_RATE = 400;\n\nexport const PERSISTENCE_CACHE_TIME = 1000 * 60 * 60 * 12; // 12 hours\n\nexport const BTC_DECIMALS = 8;\nexport const STX_DECIMALS = 6;\nexport const SATS_IN_BTC = 100_000_000;\n\n// Units of `Money` should be declared in their smallest unit. Similar to\n// Rosetta, we model currencies with their respective resolution\nexport const currencyDecimalsMap: Record<Currency, number> = {\n BTC: BTC_DECIMALS,\n STX: STX_DECIMALS,\n USD: 2,\n EUR: 2,\n GBP: 2,\n AUD: 2,\n CAD: 2,\n CNY: 2,\n JPY: 0,\n KRW: 0,\n} as const;\n\nexport const currencyNameMap = {\n USD: 'United States Dollar',\n EUR: 'Euro',\n GBP: 'British Pound',\n AUD: 'Australian Dollar',\n CAD: 'Canadian Dollar',\n CNY: 'Chinese Yuan',\n JPY: 'Japanese Yen',\n KRW: 'South Korean Won',\n} as const;\n\n// https://bitcoin.stackexchange.com/a/41082/139277\nexport const BTC_P2WPKH_DUST_AMOUNT = 294;\n\nexport const KEBAB_REGEX = /[A-Z\\u00C0-\\u00D6\\u00D8-\\u00DE]/g;\n\nexport const DEFAULT_LIST_LIMIT = 50;\n\nexport const TOKEN_NAME_LENGTH = 4;\n\nexport const LEATHER_SUPPORT_URL = 'https://leather.io/contact';\n\nexport const LEATHER_GUIDES_URL = 'https://leather.io/guides';\n\nexport const LEATHER_GUIDES_CONNECT_DAPPS = `${LEATHER_GUIDES_URL}/connect-dapps`;\n\nexport const LEATHER_LEARN_URL = 'https://leather.io/learn';\n\nexport const LEATHER_EXTENSION_CHROME_STORE_URL =\n 'https://chromewebstore.google.com/detail/leather/ldinpeekobnhjjdofggfgjlcehhmanlj?hl=en';\n\nexport const LEATHER_API_URL_STAGING = 'https://staging.api.leather.io';\nexport const LEATHER_API_URL_PRODUCTION = 'https://api.leather.io';\n\nexport const bitcoinUnitsKeyedByName: Record<BitcoinUnit, BitcoinUnitInfo> = {\n bitcoin: {\n name: 'bitcoin',\n symbol: 'BTC',\n decimal: '1',\n },\n satoshi: {\n name: 'satoshi',\n symbol: 'sat',\n decimal: '0.00000001',\n },\n};\n\nexport enum AccountDisplayPreferenceType {\n NativeSegwit = 'native-segwit',\n Taproot = 'taproot',\n Bns = 'bns',\n Stacks = 'stacks',\n}\n\nexport const accountDisplayPreferencesKeyedByType: Record<\n AccountDisplayPreference,\n AccountDisplayPreferenceInfo\n> = {\n [AccountDisplayPreferenceType.NativeSegwit]: {\n type: 'native-segwit',\n blockchain: 'bitcoin',\n name: 'Native Segwit address',\n },\n [AccountDisplayPreferenceType.Taproot]: {\n type: 'taproot',\n blockchain: 'bitcoin',\n name: 'Taproot address',\n },\n [AccountDisplayPreferenceType.Bns]: {\n type: 'bns',\n blockchain: 'stacks',\n name: 'BNS name',\n },\n [AccountDisplayPreferenceType.Stacks]: {\n type: 'stacks',\n blockchain: 'stacks',\n name: 'Stacks address',\n },\n};\n\nexport const btcCryptoAsset: BtcCryptoAssetInfo = {\n chain: 'bitcoin',\n protocol: 'nativeBtc',\n symbol: 'BTC',\n category: 'fungible',\n decimals: 8,\n hasMemo: false,\n};\n\nexport const stxCryptoAsset: StxCryptoAssetInfo = {\n chain: 'stacks',\n protocol: 'nativeStx',\n symbol: 'STX',\n category: 'fungible',\n decimals: 6,\n hasMemo: false,\n};\n"],"mappings":";AAUO,IAAM,UAAU;AAEhB,IAAM,aAAa;AAEnB,IAAM,oBAAoB;AAC1B,IAAM,aAAa;AAEnB,IAAM,sBAAsB;AAC5B,IAAM,sCAAsC;AAC5C,IAAM,sCACX;AAEK,IAAM,mBAAmB;AAEzB,IAAM,yBAAyB,MAAO,KAAK,KAAK;AAEhD,IAAM,eAAe;AACrB,IAAM,eAAe;AACrB,IAAM,cAAc;AAIpB,IAAM,sBAAgD;AAAA,EAC3D,KAAK;AAAA,EACL,KAAK;AAAA,EACL,KAAK;AAAA,EACL,KAAK;AAAA,EACL,KAAK;AAAA,EACL,KAAK;AAAA,EACL,KAAK;AAAA,EACL,KAAK;AAAA,EACL,KAAK;AAAA,EACL,KAAK;AACP;AAEO,IAAM,kBAAkB;AAAA,EAC7B,KAAK;AAAA,EACL,KAAK;AAAA,EACL,KAAK;AAAA,EACL,KAAK;AAAA,EACL,KAAK;AAAA,EACL,KAAK;AAAA,EACL,KAAK;AAAA,EACL,KAAK;AACP;AAGO,IAAM,yBAAyB;AAE/B,IAAM,cAAc;AAEpB,IAAM,qBAAqB;AAE3B,IAAM,oBAAoB;AAE1B,IAAM,sBAAsB;AAE5B,IAAM,qBAAqB;AAE3B,IAAM,+BAA+B,GAAG,kBAAkB;AAE1D,IAAM,oBAAoB;AAE1B,IAAM,qCACX;AAEK,IAAM,0BAA0B;AAChC,IAAM,6BAA6B;AAEnC,IAAM,0BAAgE;AAAA,EAC3E,SAAS;AAAA,IACP,MAAM;AAAA,IACN,QAAQ;AAAA,IACR,SAAS;AAAA,EACX;AAAA,EACA,SAAS;AAAA,IACP,MAAM;AAAA,IACN,QAAQ;AAAA,IACR,SAAS;AAAA,EACX;AACF;AAEO,IAAK,+BAAL,kBAAKA,kCAAL;AACL,EAAAA,8BAAA,kBAAe;AACf,EAAAA,8BAAA,aAAU;AACV,EAAAA,8BAAA,SAAM;AACN,EAAAA,8BAAA,YAAS;AAJC,SAAAA;AAAA,GAAA;AAOL,IAAM,uCAGT;AAAA,EACF,CAAC,kCAAyC,GAAG;AAAA,IAC3C,MAAM;AAAA,IACN,YAAY;AAAA,IACZ,MAAM;AAAA,EACR;AAAA,EACA,CAAC,uBAAoC,GAAG;AAAA,IACtC,MAAM;AAAA,IACN,YAAY;AAAA,IACZ,MAAM;AAAA,EACR;AAAA,EACA,CAAC,eAAgC,GAAG;AAAA,IAClC,MAAM;AAAA,IACN,YAAY;AAAA,IACZ,MAAM;AAAA,EACR;AAAA,EACA,CAAC,qBAAmC,GAAG;AAAA,IACrC,MAAM;AAAA,IACN,YAAY;AAAA,IACZ,MAAM;AAAA,EACR;AACF;AAEO,IAAM,iBAAqC;AAAA,EAChD,OAAO;AAAA,EACP,UAAU;AAAA,EACV,QAAQ;AAAA,EACR,UAAU;AAAA,EACV,UAAU;AAAA,EACV,SAAS;AACX;AAEO,IAAM,iBAAqC;AAAA,EAChD,OAAO;AAAA,EACP,UAAU;AAAA,EACV,QAAQ;AAAA,EACR,UAAU;AAAA,EACV,UAAU;AAAA,EACV,SAAS;AACX;","names":["AccountDisplayPreferenceType"]}
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@leather.io/constants",
3
3
  "author": "Leather.io contact@leather.io",
4
4
  "description": "Shared bitcoin utilities",
5
- "version": "0.18.0",
5
+ "version": "0.19.0",
6
6
  "license": "MIT",
7
7
  "homepage": "https://github.com/leather-io/mono/tree/dev/packages/constants",
8
8
  "repository": {
@@ -16,15 +16,15 @@
16
16
  },
17
17
  "bugs": "https://github.com/leather-io/mono/issues",
18
18
  "dependencies": {
19
- "@leather.io/models": "0.29.0"
19
+ "@leather.io/models": "0.30.0"
20
20
  },
21
21
  "devDependencies": {
22
22
  "concurrently": "8.2.2",
23
23
  "prettier": "3.5.1",
24
- "tsup": "8.1.0",
24
+ "tsup": "8.4.0",
25
25
  "typescript": "5.7.3",
26
- "@leather.io/tsconfig-config": "0.6.1",
27
- "@leather.io/prettier-config": "0.6.1"
26
+ "@leather.io/prettier-config": "0.6.1",
27
+ "@leather.io/tsconfig-config": "0.6.1"
28
28
  },
29
29
  "keywords": [
30
30
  "constants",
package/src/index.ts CHANGED
@@ -4,6 +4,7 @@ import type {
4
4
  BitcoinUnit,
5
5
  BitcoinUnitInfo,
6
6
  BtcCryptoAssetInfo,
7
+ Currency,
7
8
  StxCryptoAssetInfo,
8
9
  } from '@leather.io/models';
9
10
 
@@ -29,7 +30,7 @@ export const SATS_IN_BTC = 100_000_000;
29
30
 
30
31
  // Units of `Money` should be declared in their smallest unit. Similar to
31
32
  // Rosetta, we model currencies with their respective resolution
32
- export const currencyDecimalsMap = {
33
+ export const currencyDecimalsMap: Record<Currency, number> = {
33
34
  BTC: BTC_DECIMALS,
34
35
  STX: STX_DECIMALS,
35
36
  USD: 2,
@@ -70,7 +71,11 @@ export const LEATHER_GUIDES_CONNECT_DAPPS = `${LEATHER_GUIDES_URL}/connect-dapps
70
71
 
71
72
  export const LEATHER_LEARN_URL = 'https://leather.io/learn';
72
73
 
73
- export const LEATHER_API_URL = 'https://leather-api-gateway-staging.wallet-6d1.workers.dev';
74
+ export const LEATHER_EXTENSION_CHROME_STORE_URL =
75
+ 'https://chromewebstore.google.com/detail/leather/ldinpeekobnhjjdofggfgjlcehhmanlj?hl=en';
76
+
77
+ export const LEATHER_API_URL_STAGING = 'https://staging.api.leather.io';
78
+ export const LEATHER_API_URL_PRODUCTION = 'https://api.leather.io';
74
79
 
75
80
  export const bitcoinUnitsKeyedByName: Record<BitcoinUnit, BitcoinUnitInfo> = {
76
81
  bitcoin: {