@riocrypto/common 1.0.805 → 1.0.808

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.SOL | "Bitcoin" | "Ethereum" | "USDC (Ethereum)" | "USDC (Polygon)" | "USDC (Solana)" | "USDT (Polygon)" | "USDT (Ethereum)";
8
- getSymbol(): Crypto.SOL | "USDC (Ethereum)" | "USDC (Polygon)" | "USDC (Solana)" | "USDT (Polygon)" | "USDT (Ethereum)" | "BTC" | "ETH";
9
- getGasSymbol(): Crypto.SOL | "BTC" | "ETH" | "MATIC" | "SOL";
7
+ getName(): Crypto.USDTTron | Crypto.SOL | "Bitcoin" | "Ethereum" | "USDC (Ethereum)" | "USDC (Polygon)" | "USDC (Solana)" | "USDT (Polygon)" | "USDT (Ethereum)";
8
+ getSymbol(): Crypto.USDTTron | Crypto.SOL | "USDC (Ethereum)" | "USDC (Polygon)" | "USDC (Solana)" | "USDT (Polygon)" | "USDT (Ethereum)" | "BTC" | "ETH";
9
+ getGasSymbol(): Crypto.SOL | "BTC" | "ETH" | "MATIC" | "TRX" | "SOL";
10
10
  getDescription(): string;
11
11
  }
@@ -105,6 +105,9 @@ class CryptoAsset extends Asset_1.Asset {
105
105
  else if (this.rawSymbol === crypto_1.Crypto.USDCPolygon) {
106
106
  return "MATIC";
107
107
  }
108
+ else if (this.rawSymbol === crypto_1.Crypto.USDTTron) {
109
+ return "TRX";
110
+ }
108
111
  else if (this.rawSymbol === crypto_1.Crypto.USDCSolana) {
109
112
  return "SOL";
110
113
  }
@@ -152,6 +155,9 @@ class CryptoAsset extends Asset_1.Asset {
152
155
  }
153
156
  else if (this.rawSymbol === crypto_1.Crypto.USDTEthereum) {
154
157
  return "USDT on the Ethereum chain.";
158
+ }
159
+ else if (this.rawSymbol === crypto_1.Crypto.USDTTron) {
160
+ return "USDT on the Tron chain.";
155
161
  // } else if (this.symbol === Crypto.mUSDC) {
156
162
  // return "USDC on the Polygon chain";
157
163
  // } else if (this.symbol === Crypto.USDT) {
@@ -24,6 +24,7 @@ import { OrderUpdate } from "../types/order-update";
24
24
  import { QuoteInput } from "../types/quote-input";
25
25
  import { OrderQuery } from "../types/order-query";
26
26
  import { UserQuery } from "../types/user-query";
27
+ import { BankAccountQuery } from "../types/bank-account-query";
27
28
  export declare class RioAdminClient {
28
29
  private axios;
29
30
  constructor(axios: AxiosStatic | AxiosInstance);
@@ -103,7 +104,7 @@ export declare class RioAdminClient {
103
104
  x: number;
104
105
  }>;
105
106
  getPaymentMethods(fiat: Fiat, country: Country): Promise<PaymentMethod[]>;
106
- getBankAccounts(page: number, limit: number): Promise<BankAccount[]>;
107
+ getBankAccounts(page: number, limit: number, query?: BankAccountQuery): Promise<BankAccount[]>;
107
108
  getBankAccount(id: string): Promise<BankAccount>;
108
109
  getSupportedPayoutMethods(fiat: Fiat, country: Country): Promise<PayoutMethod[]>;
109
110
  getPartner(partnerId: string): Promise<Partner>;
@@ -354,10 +354,11 @@ class RioAdminClient {
354
354
  return response.data;
355
355
  });
356
356
  }
357
- getBankAccounts(page, limit) {
357
+ getBankAccounts(page, limit, query) {
358
358
  return __awaiter(this, void 0, void 0, function* () {
359
359
  const response = yield this.axios.get(`/api/bank/accounts`, {
360
- params: { page, limit },
360
+ params: Object.assign({ page,
361
+ limit }, query),
361
362
  });
362
363
  return response.data;
363
364
  });
@@ -11,7 +11,12 @@ const isValidCryptoAddress = (address, crypto) => {
11
11
  return bitcoinPattern.test(address);
12
12
  case crypto_1.Crypto.SOL:
13
13
  return solanaPattern.test(address);
14
- case crypto_1.Crypto.ETH || crypto_1.Crypto.USDC || crypto_1.Crypto.USDCPolygon:
14
+ case crypto_1.Crypto.ETH ||
15
+ crypto_1.Crypto.USDC ||
16
+ crypto_1.Crypto.USDCPolygon ||
17
+ crypto_1.Crypto.USDTTron ||
18
+ crypto_1.Crypto.USDTPolygon ||
19
+ crypto_1.Crypto.USDTEthereum:
15
20
  return ethereumPattern.test(address);
16
21
  default:
17
22
  return false;
@@ -6,5 +6,6 @@ export declare enum Crypto {
6
6
  USDCSolana = "SOL_USDC_PTHX",
7
7
  USDTPolygon = "USDT_POLYGON",
8
8
  USDTEthereum = "USDT_ERC20",
9
+ USDTTron = "TRX_USDT_S2UZ",
9
10
  SOL = "SOL"
10
11
  }
@@ -12,6 +12,7 @@ var Crypto;
12
12
  Crypto["USDCSolana"] = "SOL_USDC_PTHX";
13
13
  Crypto["USDTPolygon"] = "USDT_POLYGON";
14
14
  Crypto["USDTEthereum"] = "USDT_ERC20";
15
+ Crypto["USDTTron"] = "TRX_USDT_S2UZ";
15
16
  Crypto["SOL"] = "SOL";
16
17
  // XLM = "XLM",
17
18
  // sUSDC = "sUSDC",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riocrypto/common",
3
- "version": "1.0.805",
3
+ "version": "1.0.808",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",