@leather.io/constants 0.28.0 → 0.28.2
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.
- package/.turbo/turbo-build.log +13 -14
- package/CHANGELOG.md +25 -0
- package/dist/index.d.ts +19 -17
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +121 -162
- package/dist/index.js.map +1 -1
- package/package.json +8 -8
- package/src/index.ts +3 -3
- package/tsconfig.json +4 -3
- package/tsdown.config.ts +9 -0
- package/tsup.config.ts +0 -9
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
|
|
2
|
-
> @leather.io/constants@0.28.
|
|
3
|
-
>
|
|
2
|
+
> @leather.io/constants@0.28.2 build /home/runner/work/mono/mono/packages/constants
|
|
3
|
+
> tsdown
|
|
4
4
|
|
|
5
|
-
[
|
|
6
|
-
[
|
|
7
|
-
[
|
|
8
|
-
[
|
|
9
|
-
[
|
|
10
|
-
[
|
|
11
|
-
[
|
|
12
|
-
[
|
|
13
|
-
[
|
|
14
|
-
[
|
|
15
|
-
[
|
|
16
|
-
[32mDTS[39m [1mdist/index.d.ts [22m[32m3.81 KB[39m
|
|
5
|
+
[34mℹ[39m tsdown [2mv0.16.5[22m powered by rolldown [2mv1.0.0-beta.50[22m
|
|
6
|
+
[34mℹ[39m Using tsdown config: [4m/home/runner/work/mono/mono/packages/constants/tsdown.config.ts[24m
|
|
7
|
+
[34mℹ[39m entry: [34msrc/index.ts[39m
|
|
8
|
+
[34mℹ[39m tsconfig: [34mtsconfig.json[39m
|
|
9
|
+
[34mℹ[39m Build start
|
|
10
|
+
[34mℹ[39m [2mdist/[22m[1mindex.js[22m [2m4.55 kB[22m [2m│ gzip: 1.66 kB[22m
|
|
11
|
+
[34mℹ[39m [2mdist/[22mindex.js.map [2m6.65 kB[22m [2m│ gzip: 2.23 kB[22m
|
|
12
|
+
[34mℹ[39m [2mdist/[22mindex.d.ts.map [2m2.02 kB[22m [2m│ gzip: 0.90 kB[22m
|
|
13
|
+
[34mℹ[39m [2mdist/[22m[32m[1mindex.d.ts[22m[39m [2m3.90 kB[22m [2m│ gzip: 1.33 kB[22m
|
|
14
|
+
[34mℹ[39m 4 files, total: 17.13 kB
|
|
15
|
+
[32m✔[39m Build complete in [32m266ms[39m
|
package/CHANGELOG.md
CHANGED
|
@@ -215,6 +215,31 @@
|
|
|
215
215
|
* devDependencies
|
|
216
216
|
* @leather.io/prettier-config bumped to 0.9.0
|
|
217
217
|
|
|
218
|
+
## [0.28.2](https://github.com/leather-io/mono/compare/@leather.io/constants-v0.28.1...@leather.io/constants-v0.28.2) (2025-12-02)
|
|
219
|
+
|
|
220
|
+
|
|
221
|
+
### Bug Fixes
|
|
222
|
+
|
|
223
|
+
* tsdown upgrade ([9bd347b](https://github.com/leather-io/mono/commit/9bd347b62e2deb9f7b65fa462b5fa281f4d106aa))
|
|
224
|
+
|
|
225
|
+
|
|
226
|
+
### Dependencies
|
|
227
|
+
|
|
228
|
+
* The following workspace dependencies were updated
|
|
229
|
+
* dependencies
|
|
230
|
+
* @leather.io/models bumped to 0.50.1
|
|
231
|
+
* devDependencies
|
|
232
|
+
* @leather.io/tsconfig-config bumped to 0.11.1
|
|
233
|
+
|
|
234
|
+
## [0.28.1](https://github.com/leather-io/mono/compare/@leather.io/constants-v0.28.0...@leather.io/constants-v0.28.1) (2025-11-26)
|
|
235
|
+
|
|
236
|
+
|
|
237
|
+
### Dependencies
|
|
238
|
+
|
|
239
|
+
* The following workspace dependencies were updated
|
|
240
|
+
* dependencies
|
|
241
|
+
* @leather.io/models bumped to 0.50.0
|
|
242
|
+
|
|
218
243
|
## [0.28.0](https://github.com/leather-io/mono/compare/@leather.io/constants-v0.27.5...@leather.io/constants-v0.28.0) (2025-11-19)
|
|
219
244
|
|
|
220
245
|
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AccountDisplayPreference, AccountDisplayPreferenceInfo, BitcoinUnit, BitcoinUnitInfo, BtcAsset, CryptoCurrency, Currency, StxAsset } from "@leather.io/models";
|
|
2
2
|
|
|
3
|
+
//#region src/index.d.ts
|
|
3
4
|
declare const gaiaUrl = "https://hub.blockstack.org";
|
|
4
5
|
declare const ZERO_INDEX = 0;
|
|
5
6
|
declare const HIRO_EXPLORER_URL = "https://explorer.hiro.so";
|
|
@@ -11,19 +12,19 @@ declare const DEFAULT_FEE_RATE = 400;
|
|
|
11
12
|
declare const PERSISTENCE_CACHE_TIME: number;
|
|
12
13
|
declare const BTC_DECIMALS = 8;
|
|
13
14
|
declare const STX_DECIMALS = 6;
|
|
14
|
-
declare const SATS_IN_BTC =
|
|
15
|
+
declare const SATS_IN_BTC = 1e8;
|
|
15
16
|
declare const BITCOIN_MINIMUM_SPEND_IN_SATS = 546;
|
|
16
17
|
declare const currencyDecimalsMap: Record<Currency, number>;
|
|
17
18
|
declare const currencyNameMap: {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
19
|
+
readonly USD: "United States Dollar";
|
|
20
|
+
readonly EUR: "Euro";
|
|
21
|
+
readonly GBP: "British Pound";
|
|
22
|
+
readonly AUD: "Australian Dollar";
|
|
23
|
+
readonly CAD: "Canadian Dollar";
|
|
24
|
+
readonly CNY: "Chinese Yuan";
|
|
25
|
+
readonly JPY: "Japanese Yen";
|
|
26
|
+
readonly KRW: "South Korean Won";
|
|
27
|
+
readonly BTC: "Bitcoin";
|
|
27
28
|
};
|
|
28
29
|
declare const BTC_P2WPKH_DUST_AMOUNT = 294;
|
|
29
30
|
declare const KEBAB_REGEX: RegExp;
|
|
@@ -31,7 +32,7 @@ declare const DEFAULT_LIST_LIMIT = 50;
|
|
|
31
32
|
declare const TOKEN_NAME_LENGTH = 4;
|
|
32
33
|
declare const LEATHER_SUPPORT_URL = "https://leather.io/contact";
|
|
33
34
|
declare const LEATHER_GUIDES_URL = "https://leather.io/guides";
|
|
34
|
-
declare const LEATHER_GUIDES_CONNECT_DAPPS
|
|
35
|
+
declare const LEATHER_GUIDES_CONNECT_DAPPS: string;
|
|
35
36
|
declare const LEATHER_LEARN_URL = "https://leather.io/learn";
|
|
36
37
|
declare const LEATHER_EARN_URL = "https://earn.leather.io";
|
|
37
38
|
declare const LEATHER_EARN_STACKING_URL = "https://app.leather.io/stacking";
|
|
@@ -41,10 +42,10 @@ declare const LEATHER_API_URL_STAGING = "https://staging.api.leather.io";
|
|
|
41
42
|
declare const LEATHER_API_URL_PRODUCTION = "https://api.leather.io";
|
|
42
43
|
declare const bitcoinUnitsKeyedByName: Record<BitcoinUnit, BitcoinUnitInfo>;
|
|
43
44
|
declare enum AccountDisplayPreferenceType {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
45
|
+
NativeSegwit = "native-segwit",
|
|
46
|
+
Taproot = "taproot",
|
|
47
|
+
Bns = "bns",
|
|
48
|
+
Stacks = "stacks",
|
|
48
49
|
}
|
|
49
50
|
declare const accountDisplayPreferencesKeyedByType: Record<AccountDisplayPreference, AccountDisplayPreferenceInfo>;
|
|
50
51
|
declare const btcAsset: BtcAsset;
|
|
@@ -57,5 +58,6 @@ declare const GRANITE_LINK = "https://www.granite.world/";
|
|
|
57
58
|
declare const HERMETICA_LINK = "https://www.hermetica.fi/";
|
|
58
59
|
declare const BITFLOW_LINK = "https://app.bitflow.finance/";
|
|
59
60
|
declare const VELAR_LINK = "https://www.velar.co/";
|
|
60
|
-
|
|
61
|
+
//#endregion
|
|
61
62
|
export { ALEX_LINK, ARKADIKO_LINK, AccountDisplayPreferenceType, BITCOIN_MINIMUM_SPEND_IN_SATS, BITFLOW_LINK, BTC_DECIMALS, BTC_P2WPKH_DUST_AMOUNT, DEFAULT_FEE_RATE, DEFAULT_LIST_LIMIT, GRANITE_LINK, HERMETICA_LINK, 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_EARN_SBTC_URL, LEATHER_EARN_STACKING_URL, LEATHER_EARN_URL, 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, VELAR_LINK, ZERO_INDEX, ZEST_LINK, accountDisplayPreferencesKeyedByType, bitcoinUnitsKeyedByName, btcAsset, cryptoAssetColors, currencyDecimalsMap, currencyNameMap, gaiaUrl, stxAsset };
|
|
63
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":["PERSISTENCE_CACHE_TIME: number","currencyDecimalsMap: Record<Currency, number>","KEBAB_REGEX: RegExp","LEATHER_GUIDES_CONNECT_DAPPS: string","bitcoinUnitsKeyedByName: Record<BitcoinUnit, BitcoinUnitInfo>","accountDisplayPreferencesKeyedByType: Record<\n AccountDisplayPreference,\n AccountDisplayPreferenceInfo\n>","btcAsset: BtcAsset","stxAsset: StxAsset","cryptoAssetColors: Record<CryptoCurrency, string>"],"sources":["../src/index.ts"],"sourcesContent":[],"mappings":";;;cAWa,OAAA;cAEA,UAAA;AAFA,cAIA,iBAAA,GAJA,0BAAA;AAEA,cAGA,UAAA,GAHA,gBAAA;AAEA,cAGA,mBAAA,GAHA,CAAA;AACA,cAGA,mCAAA,GAHA,+BAAA;AAEA,cAEA,mCAAA,GAFA,qDAAA;AACA,cAIA,gBAAA,GAJA,GAAA;AACA,cAKAA,sBALA,EAAA,MAAA;AAGA,cAIA,YAAA,GAJA,CAAA;AAEAA,cAGA,YAAA,GAHAA,CAAAA;AAEA,cAEA,WAAA,GAFA,GAAA;AACA,cAEA,6BAAA,GAFA,GAAA;AACA,cAKAC,mBALA,EAKqB,MALrB,CAK4B,QAL5B,EAAA,MAAA,CAAA;AACA,cAiBA,eAjBA,EAAA;EAIb,SAAaA,GAAAA,EAAAA,sBAA4B;EAazC,SAAa,GAAA,EAAA,MAAA;EAab,SAAa,GAAA,EAAA,eAAA;EAEb,SAAaC,GAAAA,EAAAA,mBAAa;EAE1B,SAAa,GAAA,EAAA,iBAAA;EAEb,SAAa,GAAA,EAAA,cAAA;EAEb,SAAa,GAAA,EAAA,cAAA;EAEb,SAAa,GAAA,EAAA,kBAAA;EAEb,SAAaC,GAAAA,EAAAA,SAAAA;AAEb,CAAA;AAEa,cAhBA,sBAAA,GAgBA,GAAA;AAEA,cAhBAD,WAgBA,EAhBa,MAgBb;AACA,cAfA,kBAAA,GAeA,EAAA;AAEA,cAfA,iBAAA,GAeA,CAAA;AAGA,cAhBA,mBAAA,GAgBA,4BAAA;AACA,cAfA,kBAAA,GAeA,2BAAA;AAEAE,cAfAD,4BAe6C,EAAA,MAAA;AAAb,cAbhC,iBAAA,GAagC,0BAAA;AAAa,cAX7C,gBAAA,GAW6C,yBAAA;AAApB,cATzB,yBAAA,GASyB,iCAAA;AAAA,cARzB,qBAAA,GAQyB,6BAAA;AAa1B,cAnBC,kCAAA,GAmBD,yFAAA;AAOCE,cAvBA,uBAAA,GAyBX,gCAAA;AADA,cAvBW,0BAAA,GAuBX,wBAAA;AACA,cAtBWD,uBAsBX,EAtBoC,MAsBpC,CAtB2C,WAsB3C,EAtBwD,eAsBxD,CAAA;AAFiD,aAPvC,4BAAA;EAOuC,YAAA,GAAA,eAAA;EA0BnD,OAAaE,GAAAA,SAAU;EAUvB,GAAaC,GAAAA,KAAAA;EAUb,MAAaC,GAAAA,QAAAA;AASb;AACa,cAxDAH,oCAwDA,EAxDsC,MAwDtC,CAvDX,wBAuDW,EAtDX,4BAsDW,CAAA;AACA,cA/BAC,QA+BA,EA/BU,QA+BV;AACA,cAtBAC,QAsBA,EAtBU,QAsBV;AACA,cAbAC,iBAaA,EAbmB,MAanB,CAb0B,cAa1B,EAAA,MAAA,CAAA;AACA,cALA,SAAA,GAKA,oBAAA;AACA,cALA,SAAA,GAKA,+BAAA;cAJA,aAAA;cACA,YAAA;cACA,cAAA;cACA,YAAA;cACA,UAAA"}
|
package/dist/index.js
CHANGED
|
@@ -1,170 +1,129 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
1
|
+
//#region src/index.ts
|
|
2
|
+
const gaiaUrl = "https://hub.blockstack.org";
|
|
3
|
+
const ZERO_INDEX = 0;
|
|
4
|
+
const HIRO_EXPLORER_URL = "https://explorer.hiro.so";
|
|
5
|
+
const ORD_IO_URL = "https://ord.io";
|
|
6
|
+
const HIGH_FEE_AMOUNT_STX = 5;
|
|
7
|
+
const HIGH_FEE_WARNING_LEARN_MORE_URL_BTC = "https://bitcoinfees.earn.com/";
|
|
8
|
+
const HIGH_FEE_WARNING_LEARN_MORE_URL_STX = "https://leather.gitbook.io/guides/transactions/fees";
|
|
9
|
+
const DEFAULT_FEE_RATE = 400;
|
|
10
|
+
const PERSISTENCE_CACHE_TIME = 1e3 * 60 * 60 * 12;
|
|
11
|
+
const BTC_DECIMALS = 8;
|
|
12
|
+
const STX_DECIMALS = 6;
|
|
13
|
+
const SATS_IN_BTC = 1e8;
|
|
14
|
+
const BITCOIN_MINIMUM_SPEND_IN_SATS = 546;
|
|
15
|
+
const currencyDecimalsMap = {
|
|
16
|
+
BTC: BTC_DECIMALS,
|
|
17
|
+
STX: STX_DECIMALS,
|
|
18
|
+
USD: 2,
|
|
19
|
+
EUR: 2,
|
|
20
|
+
GBP: 2,
|
|
21
|
+
AUD: 2,
|
|
22
|
+
CAD: 2,
|
|
23
|
+
CNY: 2,
|
|
24
|
+
JPY: 0,
|
|
25
|
+
KRW: 0
|
|
26
26
|
};
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
27
|
+
const currencyNameMap = {
|
|
28
|
+
USD: "United States Dollar",
|
|
29
|
+
EUR: "Euro",
|
|
30
|
+
GBP: "British Pound",
|
|
31
|
+
AUD: "Australian Dollar",
|
|
32
|
+
CAD: "Canadian Dollar",
|
|
33
|
+
CNY: "Chinese Yuan",
|
|
34
|
+
JPY: "Japanese Yen",
|
|
35
|
+
KRW: "South Korean Won",
|
|
36
|
+
BTC: "Bitcoin"
|
|
37
37
|
};
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
38
|
+
const BTC_P2WPKH_DUST_AMOUNT = 294;
|
|
39
|
+
const KEBAB_REGEX = /[A-Z\u00C0-\u00D6\u00D8-\u00DE]/g;
|
|
40
|
+
const DEFAULT_LIST_LIMIT = 50;
|
|
41
|
+
const TOKEN_NAME_LENGTH = 4;
|
|
42
|
+
const LEATHER_SUPPORT_URL = "https://leather.io/contact";
|
|
43
|
+
const LEATHER_GUIDES_URL = "https://leather.io/guides";
|
|
44
|
+
const LEATHER_GUIDES_CONNECT_DAPPS = `${LEATHER_GUIDES_URL}/connect-dapps`;
|
|
45
|
+
const LEATHER_LEARN_URL = "https://leather.io/learn";
|
|
46
|
+
const LEATHER_EARN_URL = "https://earn.leather.io";
|
|
47
|
+
const LEATHER_EARN_STACKING_URL = "https://app.leather.io/stacking";
|
|
48
|
+
const LEATHER_EARN_SBTC_URL = "https://app.leather.io/sbtc";
|
|
49
|
+
const LEATHER_EXTENSION_CHROME_STORE_URL = "https://chromewebstore.google.com/detail/leather/ldinpeekobnhjjdofggfgjlcehhmanlj?hl=en";
|
|
50
|
+
const LEATHER_API_URL_STAGING = "https://staging.api.leather.io";
|
|
51
|
+
const LEATHER_API_URL_PRODUCTION = "https://api.leather.io";
|
|
52
|
+
const bitcoinUnitsKeyedByName = {
|
|
53
|
+
bitcoin: {
|
|
54
|
+
name: "bitcoin",
|
|
55
|
+
symbol: "BTC",
|
|
56
|
+
decimal: "1"
|
|
57
|
+
},
|
|
58
|
+
satoshi: {
|
|
59
|
+
name: "satoshi",
|
|
60
|
+
symbol: "sat",
|
|
61
|
+
decimal: "0.00000001"
|
|
62
|
+
}
|
|
63
63
|
};
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
64
|
+
let AccountDisplayPreferenceType = /* @__PURE__ */ function(AccountDisplayPreferenceType$1) {
|
|
65
|
+
AccountDisplayPreferenceType$1["NativeSegwit"] = "native-segwit";
|
|
66
|
+
AccountDisplayPreferenceType$1["Taproot"] = "taproot";
|
|
67
|
+
AccountDisplayPreferenceType$1["Bns"] = "bns";
|
|
68
|
+
AccountDisplayPreferenceType$1["Stacks"] = "stacks";
|
|
69
|
+
return AccountDisplayPreferenceType$1;
|
|
70
|
+
}({});
|
|
71
|
+
const accountDisplayPreferencesKeyedByType = {
|
|
72
|
+
[AccountDisplayPreferenceType.NativeSegwit]: {
|
|
73
|
+
type: "native-segwit",
|
|
74
|
+
blockchain: "bitcoin",
|
|
75
|
+
name: "Native Segwit address"
|
|
76
|
+
},
|
|
77
|
+
[AccountDisplayPreferenceType.Taproot]: {
|
|
78
|
+
type: "taproot",
|
|
79
|
+
blockchain: "bitcoin",
|
|
80
|
+
name: "Taproot address"
|
|
81
|
+
},
|
|
82
|
+
[AccountDisplayPreferenceType.Bns]: {
|
|
83
|
+
type: "bns",
|
|
84
|
+
blockchain: "stacks",
|
|
85
|
+
name: "BNS name"
|
|
86
|
+
},
|
|
87
|
+
[AccountDisplayPreferenceType.Stacks]: {
|
|
88
|
+
type: "stacks",
|
|
89
|
+
blockchain: "stacks",
|
|
90
|
+
name: "Stacks address"
|
|
91
|
+
}
|
|
92
92
|
};
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
93
|
+
const btcAsset = {
|
|
94
|
+
chain: "bitcoin",
|
|
95
|
+
protocol: "nativeBtc",
|
|
96
|
+
symbol: "BTC",
|
|
97
|
+
category: "fungible",
|
|
98
|
+
name: "Bitcoin",
|
|
99
|
+
decimals: 8,
|
|
100
|
+
hasMemo: false
|
|
101
101
|
};
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
102
|
+
const stxAsset = {
|
|
103
|
+
chain: "stacks",
|
|
104
|
+
protocol: "nativeStx",
|
|
105
|
+
symbol: "STX",
|
|
106
|
+
category: "fungible",
|
|
107
|
+
name: "Stacks",
|
|
108
|
+
decimals: 6,
|
|
109
|
+
hasMemo: false
|
|
110
110
|
};
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
};
|
|
119
|
-
var ALEX_LINK = "https://alexgo.io/";
|
|
120
|
-
var ZEST_LINK = "https://www.zestprotocol.com/";
|
|
121
|
-
var ARKADIKO_LINK = "https://app.arkadiko.finance/";
|
|
122
|
-
var GRANITE_LINK = "https://www.granite.world/";
|
|
123
|
-
var HERMETICA_LINK = "https://www.hermetica.fi/";
|
|
124
|
-
var BITFLOW_LINK = "https://app.bitflow.finance/";
|
|
125
|
-
var VELAR_LINK = "https://www.velar.co/";
|
|
126
|
-
export {
|
|
127
|
-
ALEX_LINK,
|
|
128
|
-
ARKADIKO_LINK,
|
|
129
|
-
AccountDisplayPreferenceType,
|
|
130
|
-
BITCOIN_MINIMUM_SPEND_IN_SATS,
|
|
131
|
-
BITFLOW_LINK,
|
|
132
|
-
BTC_DECIMALS,
|
|
133
|
-
BTC_P2WPKH_DUST_AMOUNT,
|
|
134
|
-
DEFAULT_FEE_RATE,
|
|
135
|
-
DEFAULT_LIST_LIMIT,
|
|
136
|
-
GRANITE_LINK,
|
|
137
|
-
HERMETICA_LINK,
|
|
138
|
-
HIGH_FEE_AMOUNT_STX,
|
|
139
|
-
HIGH_FEE_WARNING_LEARN_MORE_URL_BTC,
|
|
140
|
-
HIGH_FEE_WARNING_LEARN_MORE_URL_STX,
|
|
141
|
-
HIRO_EXPLORER_URL,
|
|
142
|
-
KEBAB_REGEX,
|
|
143
|
-
LEATHER_API_URL_PRODUCTION,
|
|
144
|
-
LEATHER_API_URL_STAGING,
|
|
145
|
-
LEATHER_EARN_SBTC_URL,
|
|
146
|
-
LEATHER_EARN_STACKING_URL,
|
|
147
|
-
LEATHER_EARN_URL,
|
|
148
|
-
LEATHER_EXTENSION_CHROME_STORE_URL,
|
|
149
|
-
LEATHER_GUIDES_CONNECT_DAPPS,
|
|
150
|
-
LEATHER_GUIDES_URL,
|
|
151
|
-
LEATHER_LEARN_URL,
|
|
152
|
-
LEATHER_SUPPORT_URL,
|
|
153
|
-
ORD_IO_URL,
|
|
154
|
-
PERSISTENCE_CACHE_TIME,
|
|
155
|
-
SATS_IN_BTC,
|
|
156
|
-
STX_DECIMALS,
|
|
157
|
-
TOKEN_NAME_LENGTH,
|
|
158
|
-
VELAR_LINK,
|
|
159
|
-
ZERO_INDEX,
|
|
160
|
-
ZEST_LINK,
|
|
161
|
-
accountDisplayPreferencesKeyedByType,
|
|
162
|
-
bitcoinUnitsKeyedByName,
|
|
163
|
-
btcAsset,
|
|
164
|
-
cryptoAssetColors,
|
|
165
|
-
currencyDecimalsMap,
|
|
166
|
-
currencyNameMap,
|
|
167
|
-
gaiaUrl,
|
|
168
|
-
stxAsset
|
|
111
|
+
const cryptoAssetColors = {
|
|
112
|
+
BTC: "#F59300",
|
|
113
|
+
STX: "#FC6432",
|
|
114
|
+
sBTC: "#DC7045",
|
|
115
|
+
VELAR: "#966D3D",
|
|
116
|
+
aeUSDC: "#4A73BE",
|
|
117
|
+
USDh: "#E39B53"
|
|
169
118
|
};
|
|
119
|
+
const ALEX_LINK = "https://alexgo.io/";
|
|
120
|
+
const ZEST_LINK = "https://www.zestprotocol.com/";
|
|
121
|
+
const ARKADIKO_LINK = "https://app.arkadiko.finance/";
|
|
122
|
+
const GRANITE_LINK = "https://www.granite.world/";
|
|
123
|
+
const HERMETICA_LINK = "https://www.hermetica.fi/";
|
|
124
|
+
const BITFLOW_LINK = "https://app.bitflow.finance/";
|
|
125
|
+
const VELAR_LINK = "https://www.velar.co/";
|
|
126
|
+
|
|
127
|
+
//#endregion
|
|
128
|
+
export { ALEX_LINK, ARKADIKO_LINK, AccountDisplayPreferenceType, BITCOIN_MINIMUM_SPEND_IN_SATS, BITFLOW_LINK, BTC_DECIMALS, BTC_P2WPKH_DUST_AMOUNT, DEFAULT_FEE_RATE, DEFAULT_LIST_LIMIT, GRANITE_LINK, HERMETICA_LINK, 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_EARN_SBTC_URL, LEATHER_EARN_STACKING_URL, LEATHER_EARN_URL, 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, VELAR_LINK, ZERO_INDEX, ZEST_LINK, accountDisplayPreferencesKeyedByType, bitcoinUnitsKeyedByName, btcAsset, cryptoAssetColors, currencyDecimalsMap, currencyNameMap, gaiaUrl, stxAsset };
|
|
170
129
|
//# sourceMappingURL=index.js.map
|
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 BtcAsset,\n CryptoCurrency,\n Currency,\n StxAsset,\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;\nexport const BITCOIN_MINIMUM_SPEND_IN_SATS = 546;\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 BTC: 'Bitcoin',\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_EARN_URL = 'https://earn.leather.io';\n\nexport const LEATHER_EARN_STACKING_URL = 'https://app.leather.io/stacking';\nexport const LEATHER_EARN_SBTC_URL = 'https://app.leather.io/sbtc';\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 btcAsset: BtcAsset = {\n chain: 'bitcoin',\n protocol: 'nativeBtc',\n symbol: 'BTC',\n category: 'fungible',\n name: 'Bitcoin',\n decimals: 8,\n hasMemo: false,\n};\n\nexport const stxAsset: StxAsset = {\n chain: 'stacks',\n protocol: 'nativeStx',\n symbol: 'STX',\n category: 'fungible',\n name: 'Stacks',\n decimals: 6,\n hasMemo: false,\n};\n\nexport const cryptoAssetColors: Record<CryptoCurrency, string> = {\n BTC: '#F59300',\n STX: '#FC6432',\n sBTC: '#DC7045',\n VELAR: '#966D3D',\n aeUSDC: '#4A73BE',\n USDh: '#E39B53',\n};\n\nexport const ALEX_LINK = 'https://alexgo.io/';\nexport const ZEST_LINK = 'https://www.zestprotocol.com/';\nexport const ARKADIKO_LINK = 'https://app.arkadiko.finance/';\nexport const GRANITE_LINK = 'https://www.granite.world/';\nexport const HERMETICA_LINK = 'https://www.hermetica.fi/';\nexport const BITFLOW_LINK = 'https://app.bitflow.finance/';\nexport const VELAR_LINK = 'https://www.velar.co/';\n"],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.js","names":["PERSISTENCE_CACHE_TIME: number","currencyDecimalsMap: Record<Currency, number>","KEBAB_REGEX: RegExp","LEATHER_GUIDES_CONNECT_DAPPS: string","bitcoinUnitsKeyedByName: Record<BitcoinUnit, BitcoinUnitInfo>","accountDisplayPreferencesKeyedByType: Record<\n AccountDisplayPreference,\n AccountDisplayPreferenceInfo\n>","btcAsset: BtcAsset","stxAsset: StxAsset","cryptoAssetColors: Record<CryptoCurrency, string>"],"sources":["../src/index.ts"],"sourcesContent":["import type {\n AccountDisplayPreference,\n AccountDisplayPreferenceInfo,\n BitcoinUnit,\n BitcoinUnitInfo,\n BtcAsset,\n CryptoCurrency,\n Currency,\n StxAsset,\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: number = 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;\nexport const BITCOIN_MINIMUM_SPEND_IN_SATS = 546;\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 BTC: 'Bitcoin',\n} as const;\n\n// https://bitcoin.stackexchange.com/a/41082/139277\nexport const BTC_P2WPKH_DUST_AMOUNT = 294;\n\nexport const KEBAB_REGEX: RegExp = /[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: string = `${LEATHER_GUIDES_URL}/connect-dapps`;\n\nexport const LEATHER_LEARN_URL = 'https://leather.io/learn';\n\nexport const LEATHER_EARN_URL = 'https://earn.leather.io';\n\nexport const LEATHER_EARN_STACKING_URL = 'https://app.leather.io/stacking';\nexport const LEATHER_EARN_SBTC_URL = 'https://app.leather.io/sbtc';\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 btcAsset: BtcAsset = {\n chain: 'bitcoin',\n protocol: 'nativeBtc',\n symbol: 'BTC',\n category: 'fungible',\n name: 'Bitcoin',\n decimals: 8,\n hasMemo: false,\n};\n\nexport const stxAsset: StxAsset = {\n chain: 'stacks',\n protocol: 'nativeStx',\n symbol: 'STX',\n category: 'fungible',\n name: 'Stacks',\n decimals: 6,\n hasMemo: false,\n};\n\nexport const cryptoAssetColors: Record<CryptoCurrency, string> = {\n BTC: '#F59300',\n STX: '#FC6432',\n sBTC: '#DC7045',\n VELAR: '#966D3D',\n aeUSDC: '#4A73BE',\n USDh: '#E39B53',\n};\n\nexport const ALEX_LINK = 'https://alexgo.io/';\nexport const ZEST_LINK = 'https://www.zestprotocol.com/';\nexport const ARKADIKO_LINK = 'https://app.arkadiko.finance/';\nexport const GRANITE_LINK = 'https://www.granite.world/';\nexport const HERMETICA_LINK = 'https://www.hermetica.fi/';\nexport const BITFLOW_LINK = 'https://app.bitflow.finance/';\nexport const VELAR_LINK = 'https://www.velar.co/';\n"],"mappings":";AAWA,MAAa,UAAU;AAEvB,MAAa,aAAa;AAE1B,MAAa,oBAAoB;AACjC,MAAa,aAAa;AAE1B,MAAa,sBAAsB;AACnC,MAAa,sCAAsC;AACnD,MAAa,sCACX;AAEF,MAAa,mBAAmB;AAEhC,MAAaA,yBAAiC,MAAO,KAAK,KAAK;AAE/D,MAAa,eAAe;AAC5B,MAAa,eAAe;AAC5B,MAAa,cAAc;AAC3B,MAAa,gCAAgC;AAI7C,MAAaC,sBAAgD;CAC3D,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACN;AAED,MAAa,kBAAkB;CAC7B,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACN;AAGD,MAAa,yBAAyB;AAEtC,MAAaC,cAAsB;AAEnC,MAAa,qBAAqB;AAElC,MAAa,oBAAoB;AAEjC,MAAa,sBAAsB;AAEnC,MAAa,qBAAqB;AAElC,MAAaC,+BAAuC,GAAG,mBAAmB;AAE1E,MAAa,oBAAoB;AAEjC,MAAa,mBAAmB;AAEhC,MAAa,4BAA4B;AACzC,MAAa,wBAAwB;AAErC,MAAa,qCACX;AAEF,MAAa,0BAA0B;AACvC,MAAa,6BAA6B;AAE1C,MAAaC,0BAAgE;CAC3E,SAAS;EACP,MAAM;EACN,QAAQ;EACR,SAAS;EACV;CACD,SAAS;EACP,MAAM;EACN,QAAQ;EACR,SAAS;EACV;CACF;AAED,IAAY,wFAAL;AACL;AACA;AACA;AACA;;;AAGF,MAAaC,uCAGT;EACD,6BAA6B,eAAe;EAC3C,MAAM;EACN,YAAY;EACZ,MAAM;EACP;EACA,6BAA6B,UAAU;EACtC,MAAM;EACN,YAAY;EACZ,MAAM;EACP;EACA,6BAA6B,MAAM;EAClC,MAAM;EACN,YAAY;EACZ,MAAM;EACP;EACA,6BAA6B,SAAS;EACrC,MAAM;EACN,YAAY;EACZ,MAAM;EACP;CACF;AAED,MAAaC,WAAqB;CAChC,OAAO;CACP,UAAU;CACV,QAAQ;CACR,UAAU;CACV,MAAM;CACN,UAAU;CACV,SAAS;CACV;AAED,MAAaC,WAAqB;CAChC,OAAO;CACP,UAAU;CACV,QAAQ;CACR,UAAU;CACV,MAAM;CACN,UAAU;CACV,SAAS;CACV;AAED,MAAaC,oBAAoD;CAC/D,KAAK;CACL,KAAK;CACL,MAAM;CACN,OAAO;CACP,QAAQ;CACR,MAAM;CACP;AAED,MAAa,YAAY;AACzB,MAAa,YAAY;AACzB,MAAa,gBAAgB;AAC7B,MAAa,eAAe;AAC5B,MAAa,iBAAiB;AAC9B,MAAa,eAAe;AAC5B,MAAa,aAAa"}
|
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.28.
|
|
5
|
+
"version": "0.28.2",
|
|
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.
|
|
19
|
+
"@leather.io/models": "0.50.1"
|
|
20
20
|
},
|
|
21
21
|
"devDependencies": {
|
|
22
22
|
"concurrently": "8.2.2",
|
|
23
23
|
"prettier": "3.5.1",
|
|
24
|
-
"
|
|
25
|
-
"typescript": "5.
|
|
26
|
-
"@leather.io/
|
|
27
|
-
"@leather.io/
|
|
24
|
+
"tsdown": "0.16.5",
|
|
25
|
+
"typescript": "5.9.3",
|
|
26
|
+
"@leather.io/prettier-config": "0.9.0",
|
|
27
|
+
"@leather.io/tsconfig-config": "0.11.1"
|
|
28
28
|
},
|
|
29
29
|
"keywords": [
|
|
30
30
|
"constants",
|
|
@@ -36,8 +36,8 @@
|
|
|
36
36
|
"access": "public"
|
|
37
37
|
},
|
|
38
38
|
"scripts": {
|
|
39
|
-
"build": "
|
|
40
|
-
"build:watch": "
|
|
39
|
+
"build": "tsdown",
|
|
40
|
+
"build:watch": "tsdown --watch",
|
|
41
41
|
"format": "prettier . --write --ignore-path ../../.prettierignore",
|
|
42
42
|
"format:check": "prettier . --check --ignore-path ../../.prettierignore",
|
|
43
43
|
"typecheck": "tsc --noEmit"
|
package/src/index.ts
CHANGED
|
@@ -23,7 +23,7 @@ export const HIGH_FEE_WARNING_LEARN_MORE_URL_STX =
|
|
|
23
23
|
|
|
24
24
|
export const DEFAULT_FEE_RATE = 400;
|
|
25
25
|
|
|
26
|
-
export const PERSISTENCE_CACHE_TIME = 1000 * 60 * 60 * 12; // 12 hours
|
|
26
|
+
export const PERSISTENCE_CACHE_TIME: number = 1000 * 60 * 60 * 12; // 12 hours
|
|
27
27
|
|
|
28
28
|
export const BTC_DECIMALS = 8;
|
|
29
29
|
export const STX_DECIMALS = 6;
|
|
@@ -60,7 +60,7 @@ export const currencyNameMap = {
|
|
|
60
60
|
// https://bitcoin.stackexchange.com/a/41082/139277
|
|
61
61
|
export const BTC_P2WPKH_DUST_AMOUNT = 294;
|
|
62
62
|
|
|
63
|
-
export const KEBAB_REGEX = /[A-Z\u00C0-\u00D6\u00D8-\u00DE]/g;
|
|
63
|
+
export const KEBAB_REGEX: RegExp = /[A-Z\u00C0-\u00D6\u00D8-\u00DE]/g;
|
|
64
64
|
|
|
65
65
|
export const DEFAULT_LIST_LIMIT = 50;
|
|
66
66
|
|
|
@@ -70,7 +70,7 @@ export const LEATHER_SUPPORT_URL = 'https://leather.io/contact';
|
|
|
70
70
|
|
|
71
71
|
export const LEATHER_GUIDES_URL = 'https://leather.io/guides';
|
|
72
72
|
|
|
73
|
-
export const LEATHER_GUIDES_CONNECT_DAPPS = `${LEATHER_GUIDES_URL}/connect-dapps`;
|
|
73
|
+
export const LEATHER_GUIDES_CONNECT_DAPPS: string = `${LEATHER_GUIDES_URL}/connect-dapps`;
|
|
74
74
|
|
|
75
75
|
export const LEATHER_LEARN_URL = 'https://leather.io/learn';
|
|
76
76
|
|
package/tsconfig.json
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"extends": ["@leather.io/tsconfig-config/tsconfig.base.json"],
|
|
3
|
-
"include": ["
|
|
4
|
-
"exclude": ["./dist/"],
|
|
3
|
+
"include": ["src/**/*"],
|
|
5
4
|
"compilerOptions": {
|
|
6
|
-
"outDir": "./dist"
|
|
5
|
+
"outDir": "./dist",
|
|
6
|
+
"isolatedDeclarations": true,
|
|
7
|
+
"rootDir": "./src"
|
|
7
8
|
}
|
|
8
9
|
}
|
package/tsdown.config.ts
ADDED