@riocrypto/common 1.0.2667 → 1.0.2670

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 | Crypto.Other | "Bitcoin" | "Ethereum" | "Ethereum (Base)" | "USDC (Ethereum)" | "USDC (Polygon)" | "USDC (Bridged to Polygon)" | "USDC (Solana)" | "USDC (Stellar)" | "USDC (Base)" | "USDC.e (Tempo)" | "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 | Crypto.Other | "USDC (Ethereum)" | "USDC (Polygon)" | "USDC (Bridged to Polygon)" | "USDC (Solana)" | "USDC (Stellar)" | "USDC (Base)" | "USDC.e (Tempo)" | "EURC (Ethereum)" | "EURC (Solana)" | "EURC (Base)" | "USDT (Polygon)" | "USDT (Ethereum)" | "USDT (Tron)" | "USDT (BSC)" | "BTC" | "ETH" | "ETH (Base)";
7
+ getName(): Crypto.XLM | Crypto.Other | "Bitcoin" | "Ethereum" | "Ethereum (Base)" | "USDC (Ethereum)" | "USDC (Polygon)" | "USDC (Bridged to Polygon)" | "USDC (Solana)" | "USDC (Stellar)" | "USDC (Base)" | "USDC.e (Tempo)" | "EURC (Ethereum)" | "EURC (Solana)" | "EURC (Base)" | "USDT (Polygon)" | "USDT (Ethereum)" | "USDT (Tron)" | "USDT (BSC)" | "USDT (Solana)" | "Tron" | "Solana" | "Polygon" | "BNB";
8
+ getSymbol(): Crypto.SOL | Crypto.TRON | Crypto.POL | Crypto.XLM | Crypto.BNB | Crypto.Other | "USDC (Ethereum)" | "USDC (Polygon)" | "USDC (Bridged to Polygon)" | "USDC (Solana)" | "USDC (Stellar)" | "USDC (Base)" | "USDC.e (Tempo)" | "EURC (Ethereum)" | "EURC (Solana)" | "EURC (Base)" | "USDT (Polygon)" | "USDT (Ethereum)" | "USDT (Tron)" | "USDT (BSC)" | "USDT (Solana)" | "BTC" | "ETH" | "ETH (Base)";
9
9
  getGasSymbol(): Crypto.SOL | Crypto.TRON | Crypto.POL | Crypto.XLM | Crypto.BNB | Crypto.Other | "BTC" | "ETH" | "BASECHAIN_ETH" | "MATIC" | "TRX" | "BNB_BSC" | "SOL" | "XLM" | "TEMPO";
10
10
  getDescription(): string;
11
11
  }
@@ -101,6 +101,9 @@ class CryptoAsset extends Asset_1.Asset {
101
101
  else if (this.rawSymbol === crypto_1.Crypto.USDTBSC) {
102
102
  return "USDT (BSC)";
103
103
  }
104
+ else if (this.rawSymbol === crypto_1.Crypto.USDTSolana) {
105
+ return "USDT (Solana)";
106
+ }
104
107
  else if (this.rawSymbol === crypto_1.Crypto.TRON) {
105
108
  return "Tron";
106
109
  }
@@ -169,6 +172,9 @@ class CryptoAsset extends Asset_1.Asset {
169
172
  else if (this.rawSymbol === crypto_1.Crypto.USDTBSC) {
170
173
  return "USDT (BSC)";
171
174
  }
175
+ else if (this.rawSymbol === crypto_1.Crypto.USDTSolana) {
176
+ return "USDT (Solana)";
177
+ }
172
178
  else {
173
179
  return this.rawSymbol;
174
180
  }
@@ -195,6 +201,9 @@ class CryptoAsset extends Asset_1.Asset {
195
201
  else if (this.rawSymbol === crypto_1.Crypto.USDTBSC) {
196
202
  return "BNB_BSC";
197
203
  }
204
+ else if (this.rawSymbol === crypto_1.Crypto.USDTSolana) {
205
+ return "SOL";
206
+ }
198
207
  else if (this.rawSymbol === crypto_1.Crypto.USDCSolana) {
199
208
  return "SOL";
200
209
  }
@@ -290,6 +299,9 @@ class CryptoAsset extends Asset_1.Asset {
290
299
  }
291
300
  else if (this.rawSymbol === crypto_1.Crypto.USDTBSC) {
292
301
  return "USDT on the BNB Smart Chain.";
302
+ }
303
+ else if (this.rawSymbol === crypto_1.Crypto.USDTSolana) {
304
+ return "USDT on the Solana chain.";
293
305
  // } else if (this.symbol === Crypto.mUSDC) {
294
306
  // return "USDC on the Polygon chain";
295
307
  // } else if (this.symbol === Crypto.USDT) {
@@ -9,15 +9,12 @@ const formatTransactionHash = (hash, crypto) => {
9
9
  else if ([crypto_1.Crypto.USDCPolygon, crypto_1.Crypto.USDTPolygon].includes(crypto)) {
10
10
  return `https://polygonscan.com/tx/${hash}`;
11
11
  }
12
- else if ([crypto_1.Crypto.USDCSolana].includes(crypto)) {
12
+ else if ([crypto_1.Crypto.USDCSolana, crypto_1.Crypto.USDTSolana, crypto_1.Crypto.EURCSolana].includes(crypto)) {
13
13
  return `https://explorer.solana.com/tx/${hash}`;
14
14
  }
15
15
  else if ([crypto_1.Crypto.EURCEthereum].includes(crypto)) {
16
16
  return `https://etherscan.io/tx/${hash}`;
17
17
  }
18
- else if ([crypto_1.Crypto.EURCSolana].includes(crypto)) {
19
- return `https://explorer.solana.com/tx/${hash}`;
20
- }
21
18
  else if ([crypto_1.Crypto.EURCBase].includes(crypto)) {
22
19
  return `https://basescan.org/tx/${hash}`;
23
20
  }
@@ -16,6 +16,8 @@ const getAddressForTesting = (crypto) => {
16
16
  return { address: "0xAf56edF88c429F1D6858f9E47731FF53F6d34D0C" };
17
17
  case crypto_1.Crypto.USDCSolana:
18
18
  return { address: "5BZDQjWad45rT1vYT5KdJHgSU4rWXL1Y5nDoTwSrT8Pr" };
19
+ case crypto_1.Crypto.USDTSolana:
20
+ return { address: "5BZDQjWad45rT1vYT5KdJHgSU4rWXL1Y5nDoTwSrT8Pr" };
19
21
  case crypto_1.Crypto.EURCEthereum:
20
22
  return { address: "0xAf56edF88c429F1D6858f9E47731FF53F6d34D0C" };
21
23
  case crypto_1.Crypto.EURCSolana:
@@ -11,6 +11,7 @@ const isValidCryptoAddress = (address, crypto) => {
11
11
  case crypto_1.Crypto.BTC:
12
12
  return bitcoinPattern.test(address);
13
13
  case crypto_1.Crypto.SOL:
14
+ case crypto_1.Crypto.USDTSolana:
14
15
  return solanaPattern.test(address);
15
16
  case crypto_1.Crypto.USDCStellar:
16
17
  return stellarPattern.test(address);
@@ -16,6 +16,7 @@ export declare enum Crypto {
16
16
  USDTEthereum = "USDT_ERC20",
17
17
  USDTTron = "TRX_USDT_S2UZ",
18
18
  USDTBSC = "USDT_BSC",
19
+ USDTSolana = "SOL_USDT_EWAY",
19
20
  SOL = "SOL",
20
21
  TRON = "TRX",
21
22
  POL = "MATIC_POLYGON",
@@ -20,6 +20,7 @@ var Crypto;
20
20
  Crypto["USDTEthereum"] = "USDT_ERC20";
21
21
  Crypto["USDTTron"] = "TRX_USDT_S2UZ";
22
22
  Crypto["USDTBSC"] = "USDT_BSC";
23
+ Crypto["USDTSolana"] = "SOL_USDT_EWAY";
23
24
  Crypto["SOL"] = "SOL";
24
25
  Crypto["TRON"] = "TRX";
25
26
  Crypto["POL"] = "MATIC_POLYGON";
@@ -11,6 +11,7 @@ export declare enum CurrencyWithCountry {
11
11
  USDTEthereum = "USDT_ERC20",
12
12
  USDTTron = "TRX_USDT_S2UZ",
13
13
  USDTBSC = "USDT_BSC",
14
+ USDTSolana = "SOL_USDT_EWAY",
14
15
  MXN = "MXN-MX",
15
16
  USD = "USD-US",
16
17
  PEN = "PEN-PE",
@@ -15,6 +15,7 @@ var CurrencyWithCountry;
15
15
  CurrencyWithCountry["USDTEthereum"] = "USDT_ERC20";
16
16
  CurrencyWithCountry["USDTTron"] = "TRX_USDT_S2UZ";
17
17
  CurrencyWithCountry["USDTBSC"] = "USDT_BSC";
18
+ CurrencyWithCountry["USDTSolana"] = "SOL_USDT_EWAY";
18
19
  CurrencyWithCountry["MXN"] = "MXN-MX";
19
20
  CurrencyWithCountry["USD"] = "USD-US";
20
21
  CurrencyWithCountry["PEN"] = "PEN-PE";
@@ -4,6 +4,7 @@ export declare enum ExternalTradeStatus {
4
4
  AwaitingQuote = "awaitingQuote",
5
5
  QuoteReceived = "quoteReceived",
6
6
  Complete = "complete",
7
+ PendingSettlement = "pendingSettlement",
7
8
  PartiallyFilled = "partiallyFilled",
8
9
  Failed = "failed",
9
10
  Filling = "filling",
@@ -8,6 +8,7 @@ var ExternalTradeStatus;
8
8
  ExternalTradeStatus["AwaitingQuote"] = "awaitingQuote";
9
9
  ExternalTradeStatus["QuoteReceived"] = "quoteReceived";
10
10
  ExternalTradeStatus["Complete"] = "complete";
11
+ ExternalTradeStatus["PendingSettlement"] = "pendingSettlement";
11
12
  ExternalTradeStatus["PartiallyFilled"] = "partiallyFilled";
12
13
  ExternalTradeStatus["Failed"] = "failed";
13
14
  ExternalTradeStatus["Filling"] = "filling";
@@ -19,6 +19,7 @@ exports.USD_BACKED_CRYPTOS = [
19
19
  crypto_1.Crypto.USDTEthereum,
20
20
  crypto_1.Crypto.USDTTron,
21
21
  crypto_1.Crypto.USDTBSC,
22
+ crypto_1.Crypto.USDTSolana,
22
23
  ];
23
24
  exports.EUR_BACKED_CRYPTOS = [
24
25
  crypto_1.Crypto.EURCEthereum,
@@ -39,6 +40,7 @@ exports.USDT_CRYPTOS = [
39
40
  crypto_1.Crypto.USDTEthereum,
40
41
  crypto_1.Crypto.USDTTron,
41
42
  crypto_1.Crypto.USDTBSC,
43
+ crypto_1.Crypto.USDTSolana,
42
44
  ];
43
45
  exports.EURC_CRYPTOS = [
44
46
  crypto_1.Crypto.EURCEthereum,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riocrypto/common",
3
- "version": "1.0.2667",
3
+ "version": "1.0.2670",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",