@riocrypto/common 1.0.2417 → 1.0.2418

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(): "Bitcoin" | "Ethereum" | "USDC (Ethereum)" | "USDC (Polygon)" | "USDC (Bridged to Polygon)" | "USDC (Solana)" | "USDT (Polygon)" | "USDT (Ethereum)" | "USDT (Tron)" | "Tron" | "Solana" | "Polygon";
8
- getSymbol(): Crypto.SOL | Crypto.TRON | Crypto.POL | "USDC (Ethereum)" | "USDC (Polygon)" | "USDC (Bridged to Polygon)" | "USDC (Solana)" | "USDT (Polygon)" | "USDT (Ethereum)" | "USDT (Tron)" | "BTC" | "ETH";
9
- getGasSymbol(): Crypto.SOL | Crypto.TRON | Crypto.POL | "BTC" | "ETH" | "MATIC" | "TRX" | "SOL";
7
+ getName(): "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.USDCStellar | Crypto.SOL | Crypto.TRON | Crypto.POL | "USDC (Ethereum)" | "USDC (Polygon)" | "USDC (Bridged to Polygon)" | "USDC (Solana)" | "USDT (Polygon)" | "USDT (Ethereum)" | "USDT (Tron)" | "BTC" | "ETH";
9
+ getGasSymbol(): Crypto.USDCStellar | Crypto.SOL | Crypto.TRON | Crypto.POL | "BTC" | "ETH" | "MATIC" | "TRX" | "SOL";
10
10
  getDescription(): string;
11
11
  }
@@ -65,6 +65,9 @@ class CryptoAsset extends Asset_1.Asset {
65
65
  else if (this.rawSymbol === crypto_1.Crypto.USDCSolana) {
66
66
  return "USDC (Solana)";
67
67
  }
68
+ else if (this.rawSymbol === crypto_1.Crypto.USDCStellar) {
69
+ return "USDC (Stellar)";
70
+ }
68
71
  else if (this.rawSymbol === crypto_1.Crypto.USDTPolygon) {
69
72
  return "USDT (Polygon)";
70
73
  }
@@ -4,5 +4,6 @@ export interface DepositAddressCreatedEvent {
4
4
  data: {
5
5
  orderId: string;
6
6
  depositAddress: string;
7
+ memo?: string;
7
8
  };
8
9
  }
@@ -15,6 +15,9 @@ const formatTransactionHash = (hash, crypto) => {
15
15
  else if ([crypto_1.Crypto.USDTTron].includes(crypto)) {
16
16
  return `https://tronscan.org/#/transaction/${hash}`;
17
17
  }
18
+ else if ([crypto_1.Crypto.USDCStellar].includes(crypto)) {
19
+ return `https://stellar.expert/explorer/public/tx/${hash}`;
20
+ }
18
21
  else {
19
22
  return "N/A";
20
23
  }
@@ -18,6 +18,8 @@ const getAddressForTesting = (crypto) => {
18
18
  return "5BZDQjWad45rT1vYT5KdJHgSU4rWXL1Y5nDoTwSrT8Pr";
19
19
  case crypto_1.Crypto.USDTTron:
20
20
  return "TS9kzAVq4PR7xNoQDJXSP6Kgi8GFbwUbzg";
21
+ case crypto_1.Crypto.USDCStellar:
22
+ return "GAFLAAPPSSN2HT2IMK2WFGPFIXQMUUKIFECJEGP373WJQST432CPXKFD";
21
23
  default:
22
24
  return "Err";
23
25
  }
@@ -6,11 +6,14 @@ const isValidCryptoAddress = (address, crypto) => {
6
6
  const bitcoinPattern = /^[13][a-km-zA-HJ-NP-Z1-9]{25,34}$/;
7
7
  const ethereumPattern = /^0x[a-fA-F0-9]{40}$/;
8
8
  const solanaPattern = /^([1-9A-HJ-NP-Za-km-z]{32,44})$/;
9
+ const stellarPattern = /^G[A-Za-z0-9]{55}$/;
9
10
  switch (crypto) {
10
11
  case crypto_1.Crypto.BTC:
11
12
  return bitcoinPattern.test(address);
12
13
  case crypto_1.Crypto.SOL:
13
14
  return solanaPattern.test(address);
15
+ case crypto_1.Crypto.USDCStellar:
16
+ return stellarPattern.test(address);
14
17
  case crypto_1.Crypto.ETH ||
15
18
  crypto_1.Crypto.USDC ||
16
19
  crypto_1.Crypto.USDCPolygon ||
@@ -14,6 +14,7 @@ export interface BulkCryptoPayment {
14
14
  amountPaid?: number;
15
15
  orderIdsPaid?: string[];
16
16
  depositAddress?: string;
17
+ memo?: string;
17
18
  status: BulkCryptoPaymentStatus;
18
19
  paymentsReceived?: {
19
20
  amount: number;
@@ -5,6 +5,7 @@ export declare enum Crypto {
5
5
  USDCPolygonBridged = "USDC_POLYGON",
6
6
  USDCPolygon = "USDC_POLYGON_NXTB",
7
7
  USDCSolana = "SOL_USDC_PTHX",
8
+ USDCStellar = "XLM_USDC_5F3T",
8
9
  USDTPolygon = "USDT_POLYGON",
9
10
  USDTEthereum = "USDT_ERC20",
10
11
  USDTTron = "TRX_USDT_S2UZ",
@@ -9,6 +9,7 @@ var Crypto;
9
9
  Crypto["USDCPolygonBridged"] = "USDC_POLYGON";
10
10
  Crypto["USDCPolygon"] = "USDC_POLYGON_NXTB";
11
11
  Crypto["USDCSolana"] = "SOL_USDC_PTHX";
12
+ Crypto["USDCStellar"] = "XLM_USDC_5F3T";
12
13
  Crypto["USDTPolygon"] = "USDT_POLYGON";
13
14
  Crypto["USDTEthereum"] = "USDT_ERC20";
14
15
  Crypto["USDTTron"] = "TRX_USDT_S2UZ";
@@ -1,6 +1,7 @@
1
1
  export declare enum CurrencyWithCountry {
2
2
  USDCPolygon = "USDC_POLYGON_NXTB",
3
3
  USDCSolana = "SOL_USDC_PTHX",
4
+ USDCStellar = "XLM_USDC_5F3T",
4
5
  USDTPolygon = "USDT_POLYGON",
5
6
  USDTEthereum = "USDT_ERC20",
6
7
  USDTTron = "TRX_USDT_S2UZ",
@@ -5,6 +5,7 @@ var CurrencyWithCountry;
5
5
  (function (CurrencyWithCountry) {
6
6
  CurrencyWithCountry["USDCPolygon"] = "USDC_POLYGON_NXTB";
7
7
  CurrencyWithCountry["USDCSolana"] = "SOL_USDC_PTHX";
8
+ CurrencyWithCountry["USDCStellar"] = "XLM_USDC_5F3T";
8
9
  CurrencyWithCountry["USDTPolygon"] = "USDT_POLYGON";
9
10
  CurrencyWithCountry["USDTEthereum"] = "USDT_ERC20";
10
11
  CurrencyWithCountry["USDTTron"] = "TRX_USDT_S2UZ";
@@ -6,4 +6,7 @@ export interface FireblocksVault {
6
6
  depositAddresses?: {
7
7
  [key: string]: string;
8
8
  };
9
+ depositMemos?: {
10
+ [key: string]: string;
11
+ };
9
12
  }
@@ -90,6 +90,7 @@ export interface Order {
90
90
  paymentInstructions?: {
91
91
  dueDate?: Date;
92
92
  blockchainAddress?: string;
93
+ blockchainMemo?: string;
93
94
  USBankTransferMethod?: "wire" | "ach_push";
94
95
  bankName?: string;
95
96
  companyName?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riocrypto/common",
3
- "version": "1.0.2417",
3
+ "version": "1.0.2418",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",