@riocrypto/common 1.0.1057 → 1.0.1059

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.
@@ -88,6 +88,7 @@ export declare class RioClient {
88
88
  getCryptoAddresses(page: number, limit?: number, query?: CryptoAddressQuery): Promise<CryptoAddress[]>;
89
89
  createCryptoAddress(address: string, crypto: Crypto, userId?: string, label?: string): Promise<CryptoAddress>;
90
90
  createBridgePlaidLink(userId: string): Promise<string>;
91
+ createBridgeExternalAccount(userId: string, bankName: string, accountNumber: string, routingNumber: string, accountOwnerName: string, streetLine1: string, streetLine2: string, city: string, state: string, postalCode: string): Promise<string>;
91
92
  createBankAccount(userId: string, country: Country, fiat: Fiat, bankName: string, accountHolderName: string, accountNumber: string, swiftCode?: string, CCI?: string, notes?: string): Promise<BankAccount>;
92
93
  updateBankAccount(id: string, userId?: string, country?: Country, fiat?: Fiat, accountNumber?: string, swiftCode?: string, notes?: string, approved?: boolean): Promise<BankAccount>;
93
94
  getFeesByVolume(): Promise<{
@@ -10,6 +10,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.RioClient = void 0;
13
+ const country_1 = require("../types/country");
13
14
  class RioClient {
14
15
  constructor(axios) {
15
16
  this.axios = axios;
@@ -293,6 +294,24 @@ class RioClient {
293
294
  return response.data.url;
294
295
  });
295
296
  }
297
+ createBridgeExternalAccount(userId, bankName, accountNumber, routingNumber, accountOwnerName, streetLine1, streetLine2, city, state, postalCode) {
298
+ return __awaiter(this, void 0, void 0, function* () {
299
+ const response = yield this.axios.post("/api/bank/us/accounts", {
300
+ userId,
301
+ bankName,
302
+ accountNumber,
303
+ routingNumber,
304
+ accountOwnerName,
305
+ streetLine1,
306
+ streetLine2,
307
+ city,
308
+ state,
309
+ postalCode,
310
+ country: country_1.Country.UnitedStates,
311
+ });
312
+ return response.data.id;
313
+ });
314
+ }
296
315
  createBankAccount(userId, country, fiat, bankName, accountHolderName, accountNumber, swiftCode, CCI, notes) {
297
316
  return __awaiter(this, void 0, void 0, function* () {
298
317
  const response = yield this.axios.post(`/api/bank/accounts`, {
package/build/index.d.ts CHANGED
@@ -173,6 +173,7 @@ export * from "./types/bitso-receiving-account";
173
173
  export * from "./types/exchange-rate-order";
174
174
  export * from "./types/order-substatus";
175
175
  export * from "./types/chained-order-query";
176
+ export * from "./types/internal-swap";
176
177
  export * from "./classes/Asset";
177
178
  export * from "./classes/CountryAsset";
178
179
  export * from "./classes/CryptoAsset";
package/build/index.js CHANGED
@@ -189,6 +189,7 @@ __exportStar(require("./types/bitso-receiving-account"), exports);
189
189
  __exportStar(require("./types/exchange-rate-order"), exports);
190
190
  __exportStar(require("./types/order-substatus"), exports);
191
191
  __exportStar(require("./types/chained-order-query"), exports);
192
+ __exportStar(require("./types/internal-swap"), exports);
192
193
  __exportStar(require("./classes/Asset"), exports);
193
194
  __exportStar(require("./classes/CountryAsset"), exports);
194
195
  __exportStar(require("./classes/CryptoAsset"), exports);
@@ -0,0 +1,9 @@
1
+ export interface InternalSwap {
2
+ createdAt: Date;
3
+ adminId: string;
4
+ originCrypto: Crypto;
5
+ destinationCrypto: Crypto;
6
+ amount: number;
7
+ exchange: "coinbase";
8
+ status: "processing" | "complete" | "failed";
9
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riocrypto/common",
3
- "version": "1.0.1057",
3
+ "version": "1.0.1059",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",