@riocrypto/common 1.0.576 → 1.0.578

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(): "Ethereum" | "USDC (Ethereum)" | "USDC (Polygon)";
8
- getSymbol(): "USDC (Ethereum)" | "USDC (Polygon)" | "ETH";
9
- getGasSymbol(): "ETH" | "MATIC";
7
+ getName(): Crypto.SOL | "Ethereum" | "USDC (Ethereum)" | "USDC (Polygon)" | "USDC (Solana)";
8
+ getSymbol(): Crypto.SOL | "USDC (Ethereum)" | "USDC (Polygon)" | "USDC (Solana)" | "ETH";
9
+ getGasSymbol(): Crypto.SOL | "ETH" | "MATIC" | "SOL";
10
10
  getDescription(): string;
11
11
  }
@@ -67,6 +67,9 @@ class CryptoAsset extends Asset_1.Asset {
67
67
  }
68
68
  else if (this.rawSymbol === crypto_1.Crypto.USDCPolygon) {
69
69
  return "USDC (Polygon)";
70
+ }
71
+ else if (this.rawSymbol === crypto_1.Crypto.USDCSolana) {
72
+ return "USDC (Solana)";
70
73
  // } else if (this.symbol === Crypto.mUSDC) {
71
74
  // return "Matic USDC";
72
75
  // } else if (this.symbol === Crypto["L-BTC"]) {
@@ -143,6 +146,9 @@ class CryptoAsset extends Asset_1.Asset {
143
146
  else if (this.rawSymbol === crypto_1.Crypto.USDCPolygon) {
144
147
  return "USDC (Polygon)";
145
148
  }
149
+ else if (this.rawSymbol === crypto_1.Crypto.USDCSolana) {
150
+ return "USDC (Solana)";
151
+ }
146
152
  else {
147
153
  return this.rawSymbol;
148
154
  }
@@ -157,6 +163,9 @@ class CryptoAsset extends Asset_1.Asset {
157
163
  else if (this.rawSymbol === crypto_1.Crypto.USDCPolygon) {
158
164
  return "MATIC";
159
165
  }
166
+ else if (this.rawSymbol === crypto_1.Crypto.USDCSolana) {
167
+ return "SOL";
168
+ }
160
169
  else if (this.rawSymbol === crypto_1.Crypto.USDC) {
161
170
  return "ETH";
162
171
  }
@@ -186,6 +195,9 @@ class CryptoAsset extends Asset_1.Asset {
186
195
  }
187
196
  else if (this.rawSymbol === crypto_1.Crypto.USDCPolygon) {
188
197
  return "USDC on the Polygon chain.";
198
+ }
199
+ else if (this.rawSymbol === crypto_1.Crypto.USDCSolana) {
200
+ return "USDC on the Solana chain.";
189
201
  // } else if (this.symbol === Crypto.mUSDC) {
190
202
  // return "USDC on the Polygon chain";
191
203
  // } else if (this.symbol === Crypto.USDT) {
@@ -8,7 +8,7 @@ const isValidCryptoAddress = (address, crypto) => {
8
8
  switch (crypto) {
9
9
  // case Crypto.BTC:
10
10
  // return bitcoinPattern.test(address);
11
- case crypto_1.Crypto.ETH || crypto_1.Crypto.USDC || crypto_1.Crypto.USDCPolygon:
11
+ case crypto_1.Crypto.ETH || crypto_1.Crypto.USDC || crypto_1.Crypto.USDCPolygon || crypto_1.Crypto.USDCSolana:
12
12
  return ethereumPattern.test(address);
13
13
  default:
14
14
  return false;
@@ -1,5 +1,7 @@
1
1
  export declare enum Crypto {
2
2
  ETH = "ETH",
3
3
  USDC = "USDC",
4
- USDCPolygon = "USDC_POLYGON"
4
+ USDCPolygon = "USDC_POLYGON",
5
+ USDCSolana = "USDC_SOLANA",
6
+ SOL = "SOL"
5
7
  }
@@ -9,6 +9,8 @@ var Crypto;
9
9
  Crypto["ETH"] = "ETH";
10
10
  Crypto["USDC"] = "USDC";
11
11
  Crypto["USDCPolygon"] = "USDC_POLYGON";
12
+ Crypto["USDCSolana"] = "USDC_SOLANA";
13
+ Crypto["SOL"] = "SOL";
12
14
  // XLM = "XLM",
13
15
  // sUSDC = "sUSDC",
14
16
  // AVAX = "AVAX",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riocrypto/common",
3
- "version": "1.0.576",
3
+ "version": "1.0.578",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",