@riocrypto/common 1.0.2623 → 1.0.2625
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/build/classes/CryptoAsset.d.ts +2 -2
- package/build/classes/CryptoAsset.js +7 -7
- package/build/helpers/format-transaction-hash.js +1 -1
- package/build/helpers/get-address-for-testing.js +1 -1
- package/build/helpers/validate-address.js +1 -1
- package/build/types/crypto.d.ts +1 -1
- package/build/types/crypto.js +1 -1
- package/build/types/currency-with-country.d.ts +1 -1
- package/build/types/currency-with-country.js +1 -1
- package/build/types/stablecoin-type.js +2 -2
- package/package.json +1 -1
|
@@ -4,8 +4,8 @@ export declare class CryptoAsset extends Asset {
|
|
|
4
4
|
rawSymbol: Crypto;
|
|
5
5
|
constructor(rawSymbol: Crypto);
|
|
6
6
|
getImageUri(): string;
|
|
7
|
-
getName(): Crypto.XLM | "Bitcoin" | "Ethereum" | "Ethereum (Base)" | "USDC (Ethereum)" | "USDC (Polygon)" | "USDC (Bridged to Polygon)" | "USDC (Solana)" | "USDC (Stellar)" | "USDC (Base)" | "EURC (Ethereum)" | "EURC (Solana)" | "EURC (Base)" | "USDT (Polygon)" | "USDT (Ethereum)" | "USDT (Tron)" | "USDT (
|
|
8
|
-
getSymbol(): Crypto.SOL | Crypto.TRON | Crypto.POL | Crypto.XLM | Crypto.BNB | "USDC (Ethereum)" | "USDC (Polygon)" | "USDC (Bridged to Polygon)" | "USDC (Solana)" | "USDC (Stellar)" | "USDC (Base)" | "EURC (Ethereum)" | "EURC (Solana)" | "EURC (Base)" | "USDT (Polygon)" | "USDT (Ethereum)" | "USDT (Tron)" | "USDT (
|
|
7
|
+
getName(): Crypto.XLM | "Bitcoin" | "Ethereum" | "Ethereum (Base)" | "USDC (Ethereum)" | "USDC (Polygon)" | "USDC (Bridged to Polygon)" | "USDC (Solana)" | "USDC (Stellar)" | "USDC (Base)" | "EURC (Ethereum)" | "EURC (Solana)" | "EURC (Base)" | "USDT (Polygon)" | "USDT (Ethereum)" | "USDT (Tron)" | "USDT (BSC)" | "Tron" | "Solana" | "Polygon" | "BNB";
|
|
8
|
+
getSymbol(): Crypto.SOL | Crypto.TRON | Crypto.POL | Crypto.XLM | Crypto.BNB | "USDC (Ethereum)" | "USDC (Polygon)" | "USDC (Bridged to Polygon)" | "USDC (Solana)" | "USDC (Stellar)" | "USDC (Base)" | "EURC (Ethereum)" | "EURC (Solana)" | "EURC (Base)" | "USDT (Polygon)" | "USDT (Ethereum)" | "USDT (Tron)" | "USDT (BSC)" | "BTC" | "ETH" | "ETH (Base)";
|
|
9
9
|
getGasSymbol(): Crypto.SOL | Crypto.TRON | Crypto.POL | Crypto.XLM | Crypto.BNB | "BTC" | "ETH" | "BASECHAIN_ETH" | "MATIC" | "TRX" | "BNB_BSC" | "SOL" | "XLM";
|
|
10
10
|
getDescription(): string;
|
|
11
11
|
}
|
|
@@ -95,8 +95,8 @@ class CryptoAsset extends Asset_1.Asset {
|
|
|
95
95
|
else if (this.rawSymbol === crypto_1.Crypto.USDTTron) {
|
|
96
96
|
return "USDT (Tron)";
|
|
97
97
|
}
|
|
98
|
-
else if (this.rawSymbol === crypto_1.Crypto.
|
|
99
|
-
return "USDT (
|
|
98
|
+
else if (this.rawSymbol === crypto_1.Crypto.USDTBSC) {
|
|
99
|
+
return "USDT (BSC)";
|
|
100
100
|
}
|
|
101
101
|
else if (this.rawSymbol === crypto_1.Crypto.TRON) {
|
|
102
102
|
return "Tron";
|
|
@@ -160,8 +160,8 @@ class CryptoAsset extends Asset_1.Asset {
|
|
|
160
160
|
else if (this.rawSymbol === crypto_1.Crypto.USDTTron) {
|
|
161
161
|
return "USDT (Tron)";
|
|
162
162
|
}
|
|
163
|
-
else if (this.rawSymbol === crypto_1.Crypto.
|
|
164
|
-
return "USDT (
|
|
163
|
+
else if (this.rawSymbol === crypto_1.Crypto.USDTBSC) {
|
|
164
|
+
return "USDT (BSC)";
|
|
165
165
|
}
|
|
166
166
|
else {
|
|
167
167
|
return this.rawSymbol;
|
|
@@ -186,7 +186,7 @@ class CryptoAsset extends Asset_1.Asset {
|
|
|
186
186
|
else if (this.rawSymbol === crypto_1.Crypto.USDTTron) {
|
|
187
187
|
return "TRX";
|
|
188
188
|
}
|
|
189
|
-
else if (this.rawSymbol === crypto_1.Crypto.
|
|
189
|
+
else if (this.rawSymbol === crypto_1.Crypto.USDTBSC) {
|
|
190
190
|
return "BNB_BSC";
|
|
191
191
|
}
|
|
192
192
|
else if (this.rawSymbol === crypto_1.Crypto.USDCSolana) {
|
|
@@ -276,8 +276,8 @@ class CryptoAsset extends Asset_1.Asset {
|
|
|
276
276
|
else if (this.rawSymbol === crypto_1.Crypto.USDTTron) {
|
|
277
277
|
return "USDT on the Tron chain.";
|
|
278
278
|
}
|
|
279
|
-
else if (this.rawSymbol === crypto_1.Crypto.
|
|
280
|
-
return "USDT on the BNB
|
|
279
|
+
else if (this.rawSymbol === crypto_1.Crypto.USDTBSC) {
|
|
280
|
+
return "USDT on the BNB Smart Chain.";
|
|
281
281
|
// } else if (this.symbol === Crypto.mUSDC) {
|
|
282
282
|
// return "USDC on the Polygon chain";
|
|
283
283
|
// } else if (this.symbol === Crypto.USDT) {
|
|
@@ -24,7 +24,7 @@ const formatTransactionHash = (hash, crypto) => {
|
|
|
24
24
|
else if ([crypto_1.Crypto.USDTTron].includes(crypto)) {
|
|
25
25
|
return `https://tronscan.org/#/transaction/${hash}`;
|
|
26
26
|
}
|
|
27
|
-
else if ([crypto_1.Crypto.
|
|
27
|
+
else if ([crypto_1.Crypto.USDTBSC].includes(crypto)) {
|
|
28
28
|
return `https://bscscan.com/tx/${hash}`;
|
|
29
29
|
}
|
|
30
30
|
else if ([crypto_1.Crypto.USDCStellar].includes(crypto)) {
|
|
@@ -24,7 +24,7 @@ const getAddressForTesting = (crypto) => {
|
|
|
24
24
|
return { address: "0xAf56edF88c429F1D6858f9E47731FF53F6d34D0C" };
|
|
25
25
|
case crypto_1.Crypto.USDTTron:
|
|
26
26
|
return { address: "TS9kzAVq4PR7xNoQDJXSP6Kgi8GFbwUbzg" };
|
|
27
|
-
case crypto_1.Crypto.
|
|
27
|
+
case crypto_1.Crypto.USDTBSC:
|
|
28
28
|
return { address: "0xAf56edF88c429F1D6858f9E47731FF53F6d34D0C" };
|
|
29
29
|
case crypto_1.Crypto.USDCStellar:
|
|
30
30
|
return {
|
|
@@ -22,7 +22,7 @@ const isValidCryptoAddress = (address, crypto) => {
|
|
|
22
22
|
crypto_1.Crypto.USDTTron ||
|
|
23
23
|
crypto_1.Crypto.USDTPolygon ||
|
|
24
24
|
crypto_1.Crypto.USDTEthereum ||
|
|
25
|
-
crypto_1.Crypto.
|
|
25
|
+
crypto_1.Crypto.USDTBSC:
|
|
26
26
|
return ethereumPattern.test(address);
|
|
27
27
|
default:
|
|
28
28
|
return false;
|
package/build/types/crypto.d.ts
CHANGED
package/build/types/crypto.js
CHANGED
|
@@ -18,7 +18,7 @@ var Crypto;
|
|
|
18
18
|
Crypto["USDTPolygon"] = "USDT_POLYGON";
|
|
19
19
|
Crypto["USDTEthereum"] = "USDT_ERC20";
|
|
20
20
|
Crypto["USDTTron"] = "TRX_USDT_S2UZ";
|
|
21
|
-
Crypto["
|
|
21
|
+
Crypto["USDTBSC"] = "USDT_BSC";
|
|
22
22
|
Crypto["SOL"] = "SOL";
|
|
23
23
|
Crypto["TRON"] = "TRX";
|
|
24
24
|
Crypto["POL"] = "MATIC_POLYGON";
|
|
@@ -13,7 +13,7 @@ var CurrencyWithCountry;
|
|
|
13
13
|
CurrencyWithCountry["USDTPolygon"] = "USDT_POLYGON";
|
|
14
14
|
CurrencyWithCountry["USDTEthereum"] = "USDT_ERC20";
|
|
15
15
|
CurrencyWithCountry["USDTTron"] = "TRX_USDT_S2UZ";
|
|
16
|
-
CurrencyWithCountry["
|
|
16
|
+
CurrencyWithCountry["USDTBSC"] = "USDT_BSC";
|
|
17
17
|
CurrencyWithCountry["MXN"] = "MXN-MX";
|
|
18
18
|
CurrencyWithCountry["USD"] = "USD-US";
|
|
19
19
|
CurrencyWithCountry["PEN"] = "PEN-PE";
|
|
@@ -17,7 +17,7 @@ exports.USD_BACKED_CRYPTOS = [
|
|
|
17
17
|
crypto_1.Crypto.USDTPolygon,
|
|
18
18
|
crypto_1.Crypto.USDTEthereum,
|
|
19
19
|
crypto_1.Crypto.USDTTron,
|
|
20
|
-
crypto_1.Crypto.
|
|
20
|
+
crypto_1.Crypto.USDTBSC,
|
|
21
21
|
];
|
|
22
22
|
exports.EUR_BACKED_CRYPTOS = [
|
|
23
23
|
crypto_1.Crypto.EURCEthereum,
|
|
@@ -36,7 +36,7 @@ exports.USDT_CRYPTOS = [
|
|
|
36
36
|
crypto_1.Crypto.USDTPolygon,
|
|
37
37
|
crypto_1.Crypto.USDTEthereum,
|
|
38
38
|
crypto_1.Crypto.USDTTron,
|
|
39
|
-
crypto_1.Crypto.
|
|
39
|
+
crypto_1.Crypto.USDTBSC,
|
|
40
40
|
];
|
|
41
41
|
exports.EURC_CRYPTOS = [
|
|
42
42
|
crypto_1.Crypto.EURCEthereum,
|