@riocrypto/common 1.0.2620 → 1.0.2621

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.
@@ -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)" | "Tron" | "Solana" | "Polygon";
8
- getSymbol(): Crypto.SOL | Crypto.TRON | Crypto.POL | Crypto.XLM | "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)" | "BTC" | "ETH" | "ETH (Base)";
9
- getGasSymbol(): Crypto.SOL | Crypto.TRON | Crypto.POL | Crypto.XLM | "BTC" | "ETH" | "BASECHAIN_ETH" | "MATIC" | "TRX" | "SOL" | "XLM";
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 (BNB)" | "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 (BNB)" | "BTC" | "ETH" | "ETH (Base)";
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,6 +95,9 @@ 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.USDTBNB) {
99
+ return "USDT (BNB)";
100
+ }
98
101
  else if (this.rawSymbol === crypto_1.Crypto.TRON) {
99
102
  return "Tron";
100
103
  }
@@ -104,6 +107,9 @@ class CryptoAsset extends Asset_1.Asset {
104
107
  else if (this.rawSymbol === crypto_1.Crypto.POL) {
105
108
  return "Polygon";
106
109
  }
110
+ else if (this.rawSymbol === crypto_1.Crypto.BNB) {
111
+ return "BNB";
112
+ }
107
113
  else {
108
114
  return this.rawSymbol;
109
115
  }
@@ -154,6 +160,9 @@ class CryptoAsset extends Asset_1.Asset {
154
160
  else if (this.rawSymbol === crypto_1.Crypto.USDTTron) {
155
161
  return "USDT (Tron)";
156
162
  }
163
+ else if (this.rawSymbol === crypto_1.Crypto.USDTBNB) {
164
+ return "USDT (BNB)";
165
+ }
157
166
  else {
158
167
  return this.rawSymbol;
159
168
  }
@@ -177,6 +186,9 @@ class CryptoAsset extends Asset_1.Asset {
177
186
  else if (this.rawSymbol === crypto_1.Crypto.USDTTron) {
178
187
  return "TRX";
179
188
  }
189
+ else if (this.rawSymbol === crypto_1.Crypto.USDTBNB) {
190
+ return "BNB_BSC";
191
+ }
180
192
  else if (this.rawSymbol === crypto_1.Crypto.USDCSolana) {
181
193
  return "SOL";
182
194
  }
@@ -263,6 +275,9 @@ class CryptoAsset extends Asset_1.Asset {
263
275
  }
264
276
  else if (this.rawSymbol === crypto_1.Crypto.USDTTron) {
265
277
  return "USDT on the Tron chain.";
278
+ }
279
+ else if (this.rawSymbol === crypto_1.Crypto.USDTBNB) {
280
+ return "USDT on the BNB chain.";
266
281
  // } else if (this.symbol === Crypto.mUSDC) {
267
282
  // return "USDC on the Polygon chain";
268
283
  // } else if (this.symbol === Crypto.USDT) {
@@ -24,6 +24,9 @@ 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.USDTBNB].includes(crypto)) {
28
+ return `https://bscscan.com/tx/${hash}`;
29
+ }
27
30
  else if ([crypto_1.Crypto.USDCStellar].includes(crypto)) {
28
31
  return `https://stellar.expert/explorer/public/tx/${hash}`;
29
32
  }
@@ -24,6 +24,8 @@ 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.USDTBNB:
28
+ return { address: "0xAf56edF88c429F1D6858f9E47731FF53F6d34D0C" };
27
29
  case crypto_1.Crypto.USDCStellar:
28
30
  return {
29
31
  address: "GAFLAAPPSSN2HT2IMK2WFGPFIXQMUUKIFECJEGP373WJQST432CPXKFD",
@@ -21,7 +21,8 @@ const isValidCryptoAddress = (address, crypto) => {
21
21
  crypto_1.Crypto.USDCBase ||
22
22
  crypto_1.Crypto.USDTTron ||
23
23
  crypto_1.Crypto.USDTPolygon ||
24
- crypto_1.Crypto.USDTEthereum:
24
+ crypto_1.Crypto.USDTEthereum ||
25
+ crypto_1.Crypto.USDTBNB:
25
26
  return ethereumPattern.test(address);
26
27
  default:
27
28
  return false;
@@ -4,5 +4,6 @@ export declare enum Blockchain {
4
4
  Solana = "solana",
5
5
  Stellar = "stellar",
6
6
  Tron = "tron",
7
+ BNB = "bnb",
7
8
  Base = "base"
8
9
  }
@@ -8,5 +8,6 @@ var Blockchain;
8
8
  Blockchain["Solana"] = "solana";
9
9
  Blockchain["Stellar"] = "stellar";
10
10
  Blockchain["Tron"] = "tron";
11
+ Blockchain["BNB"] = "bnb";
11
12
  Blockchain["Base"] = "base";
12
13
  })(Blockchain = exports.Blockchain || (exports.Blockchain = {}));
@@ -14,8 +14,10 @@ export declare enum Crypto {
14
14
  USDTPolygon = "USDT_POLYGON",
15
15
  USDTEthereum = "USDT_ERC20",
16
16
  USDTTron = "TRX_USDT_S2UZ",
17
+ USDTBNB = "USDT_BSC",
17
18
  SOL = "SOL",
18
19
  TRON = "TRX",
19
20
  POL = "MATIC_POLYGON",
20
- XLM = "XLM"
21
+ XLM = "XLM",
22
+ BNB = "BNB_BSC"
21
23
  }
@@ -18,8 +18,10 @@ var Crypto;
18
18
  Crypto["USDTPolygon"] = "USDT_POLYGON";
19
19
  Crypto["USDTEthereum"] = "USDT_ERC20";
20
20
  Crypto["USDTTron"] = "TRX_USDT_S2UZ";
21
+ Crypto["USDTBNB"] = "USDT_BSC";
21
22
  Crypto["SOL"] = "SOL";
22
23
  Crypto["TRON"] = "TRX";
23
24
  Crypto["POL"] = "MATIC_POLYGON";
24
25
  Crypto["XLM"] = "XLM";
26
+ Crypto["BNB"] = "BNB_BSC";
25
27
  })(Crypto = exports.Crypto || (exports.Crypto = {}));
@@ -9,6 +9,7 @@ export declare enum CurrencyWithCountry {
9
9
  USDTPolygon = "USDT_POLYGON",
10
10
  USDTEthereum = "USDT_ERC20",
11
11
  USDTTron = "TRX_USDT_S2UZ",
12
+ USDTBNB = "USDT_BSC",
12
13
  MXN = "MXN-MX",
13
14
  USD = "USD-US",
14
15
  PEN = "PEN-PE",
@@ -13,6 +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["USDTBNB"] = "USDT_BSC";
16
17
  CurrencyWithCountry["MXN"] = "MXN-MX";
17
18
  CurrencyWithCountry["USD"] = "USD-US";
18
19
  CurrencyWithCountry["PEN"] = "PEN-PE";
@@ -17,6 +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.USDTBNB,
20
21
  ];
21
22
  exports.EUR_BACKED_CRYPTOS = [
22
23
  crypto_1.Crypto.EURCEthereum,
@@ -35,6 +36,7 @@ exports.USDT_CRYPTOS = [
35
36
  crypto_1.Crypto.USDTPolygon,
36
37
  crypto_1.Crypto.USDTEthereum,
37
38
  crypto_1.Crypto.USDTTron,
39
+ crypto_1.Crypto.USDTBNB,
38
40
  ];
39
41
  exports.EURC_CRYPTOS = [
40
42
  crypto_1.Crypto.EURCEthereum,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riocrypto/common",
3
- "version": "1.0.2620",
3
+ "version": "1.0.2621",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",