@riocrypto/common 1.0.2477 → 1.0.2479

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" | "USDC (Ethereum)" | "USDC (Polygon)" | "USDC (Bridged to Polygon)" | "USDC (Solana)" | "USDC (Stellar)" | "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)" | "USDT (Polygon)" | "USDT (Ethereum)" | "USDT (Tron)" | "BTC" | "ETH";
7
+ getName(): Crypto.XLM | "Bitcoin" | "Ethereum" | "USDC (Ethereum)" | "USDC (Polygon)" | "USDC (Bridged to Polygon)" | "USDC (Solana)" | "USDC (Stellar)" | "USDC (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)" | "USDT (Polygon)" | "USDT (Ethereum)" | "USDT (Tron)" | "BTC" | "ETH";
9
9
  getGasSymbol(): Crypto.SOL | Crypto.TRON | Crypto.POL | Crypto.XLM | "BTC" | "ETH" | "MATIC" | "TRX" | "SOL" | "XLM";
10
10
  getDescription(): string;
11
11
  }
@@ -68,6 +68,9 @@ class CryptoAsset extends Asset_1.Asset {
68
68
  else if (this.rawSymbol === crypto_1.Crypto.USDCStellar) {
69
69
  return "USDC (Stellar)";
70
70
  }
71
+ else if (this.rawSymbol === crypto_1.Crypto.USDCBase) {
72
+ return "USDC (Base)";
73
+ }
71
74
  else if (this.rawSymbol === crypto_1.Crypto.USDTPolygon) {
72
75
  return "USDT (Polygon)";
73
76
  }
@@ -112,6 +115,9 @@ class CryptoAsset extends Asset_1.Asset {
112
115
  else if (this.rawSymbol === crypto_1.Crypto.USDCStellar) {
113
116
  return "USDC (Stellar)";
114
117
  }
118
+ else if (this.rawSymbol === crypto_1.Crypto.USDCBase) {
119
+ return "USDC (Base)";
120
+ }
115
121
  else if (this.rawSymbol === crypto_1.Crypto.USDTPolygon) {
116
122
  return "USDT (Polygon)";
117
123
  }
@@ -147,6 +153,9 @@ class CryptoAsset extends Asset_1.Asset {
147
153
  else if (this.rawSymbol === crypto_1.Crypto.USDCStellar) {
148
154
  return "XLM";
149
155
  }
156
+ else if (this.rawSymbol === crypto_1.Crypto.USDCBase) {
157
+ return "ETH";
158
+ }
150
159
  else if (this.rawSymbol === crypto_1.Crypto.USDC) {
151
160
  return "ETH";
152
161
  }
@@ -192,6 +201,9 @@ class CryptoAsset extends Asset_1.Asset {
192
201
  else if (this.rawSymbol === crypto_1.Crypto.USDCStellar) {
193
202
  return "USDC on the Stellar chain.";
194
203
  }
204
+ else if (this.rawSymbol === crypto_1.Crypto.USDCBase) {
205
+ return "USDC on the Base chain.";
206
+ }
195
207
  else if (this.rawSymbol === crypto_1.Crypto.USDTPolygon) {
196
208
  return "USDT on the Polygon chain.";
197
209
  }
@@ -6,7 +6,7 @@ export interface BridgeTransferRoutingSuccessEvent {
6
6
  orderId: string;
7
7
  side: Side;
8
8
  sourceDepositInstructions: {
9
- paymentRail: "ach_push" | "wire" | "avalanche_c_chain" | "ethereum" | "polygon" | "stellar";
9
+ paymentRail: "ach_push" | "wire" | "avalanche_c_chain" | "ethereum" | "polygon" | "stellar" | "base";
10
10
  amount: string;
11
11
  currency: "usd" | "usdc";
12
12
  fromAddress?: string;
@@ -18,6 +18,9 @@ const formatTransactionHash = (hash, crypto) => {
18
18
  else if ([crypto_1.Crypto.USDCStellar].includes(crypto)) {
19
19
  return `https://stellar.expert/explorer/public/tx/${hash}`;
20
20
  }
21
+ else if ([crypto_1.Crypto.USDCBase].includes(crypto)) {
22
+ return `https://basescan.org/tx/${hash}`;
23
+ }
21
24
  else {
22
25
  return "N/A";
23
26
  }
@@ -23,6 +23,8 @@ const getAddressForTesting = (crypto) => {
23
23
  address: "GAFLAAPPSSN2HT2IMK2WFGPFIXQMUUKIFECJEGP373WJQST432CPXKFD",
24
24
  memo: "304894830",
25
25
  };
26
+ case crypto_1.Crypto.USDCBase:
27
+ return { address: "0xAf56edF88c429F1D6858f9E47731FF53F6d34D0C" };
26
28
  default:
27
29
  throw new Error(`Unsupported crypto: ${crypto}`);
28
30
  }
@@ -17,6 +17,7 @@ const isValidCryptoAddress = (address, crypto) => {
17
17
  case crypto_1.Crypto.ETH ||
18
18
  crypto_1.Crypto.USDC ||
19
19
  crypto_1.Crypto.USDCPolygon ||
20
+ crypto_1.Crypto.USDCBase ||
20
21
  crypto_1.Crypto.USDTTron ||
21
22
  crypto_1.Crypto.USDTPolygon ||
22
23
  crypto_1.Crypto.USDTEthereum:
@@ -3,5 +3,6 @@ export declare enum Blockchain {
3
3
  Ethereum = "ethereum",
4
4
  Solana = "solana",
5
5
  Stellar = "stellar",
6
- Tron = "tron"
6
+ Tron = "tron",
7
+ Base = "base"
7
8
  }
@@ -8,4 +8,5 @@ var Blockchain;
8
8
  Blockchain["Solana"] = "solana";
9
9
  Blockchain["Stellar"] = "stellar";
10
10
  Blockchain["Tron"] = "tron";
11
+ Blockchain["Base"] = "base";
11
12
  })(Blockchain = exports.Blockchain || (exports.Blockchain = {}));
@@ -6,6 +6,7 @@ export declare enum Crypto {
6
6
  USDCPolygon = "USDC_POLYGON_NXTB",
7
7
  USDCSolana = "SOL_USDC_PTHX",
8
8
  USDCStellar = "XLM_USDC_5F3T",
9
+ USDCBase = "USDC_BASECHAIN_ETH_5I5C",
9
10
  USDTPolygon = "USDT_POLYGON",
10
11
  USDTEthereum = "USDT_ERC20",
11
12
  USDTTron = "TRX_USDT_S2UZ",
@@ -10,6 +10,7 @@ var Crypto;
10
10
  Crypto["USDCPolygon"] = "USDC_POLYGON_NXTB";
11
11
  Crypto["USDCSolana"] = "SOL_USDC_PTHX";
12
12
  Crypto["USDCStellar"] = "XLM_USDC_5F3T";
13
+ Crypto["USDCBase"] = "USDC_BASECHAIN_ETH_5I5C";
13
14
  Crypto["USDTPolygon"] = "USDT_POLYGON";
14
15
  Crypto["USDTEthereum"] = "USDT_ERC20";
15
16
  Crypto["USDTTron"] = "TRX_USDT_S2UZ";
@@ -2,6 +2,7 @@ export declare enum CurrencyWithCountry {
2
2
  USDCPolygon = "USDC_POLYGON_NXTB",
3
3
  USDCSolana = "SOL_USDC_PTHX",
4
4
  USDCStellar = "XLM_USDC_5F3T",
5
+ USDCBase = "USDC_BASECHAIN_ETH_5I5C",
5
6
  USDTPolygon = "USDT_POLYGON",
6
7
  USDTEthereum = "USDT_ERC20",
7
8
  USDTTron = "TRX_USDT_S2UZ",
@@ -6,6 +6,7 @@ var CurrencyWithCountry;
6
6
  CurrencyWithCountry["USDCPolygon"] = "USDC_POLYGON_NXTB";
7
7
  CurrencyWithCountry["USDCSolana"] = "SOL_USDC_PTHX";
8
8
  CurrencyWithCountry["USDCStellar"] = "XLM_USDC_5F3T";
9
+ CurrencyWithCountry["USDCBase"] = "USDC_BASECHAIN_ETH_5I5C";
9
10
  CurrencyWithCountry["USDTPolygon"] = "USDT_POLYGON";
10
11
  CurrencyWithCountry["USDTEthereum"] = "USDT_ERC20";
11
12
  CurrencyWithCountry["USDTTron"] = "TRX_USDT_S2UZ";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riocrypto/common",
3
- "version": "1.0.2477",
3
+ "version": "1.0.2479",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",