@riocrypto/common 1.0.1060 → 1.0.1062
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.
|
@@ -33,6 +33,7 @@ import { ChainedOrder } from "../types/chained-order";
|
|
|
33
33
|
import { ChainedQuoteInput } from "../types/chained-quote-input";
|
|
34
34
|
import { ChainedQuote } from "../types/chained-quote";
|
|
35
35
|
import { ChainedOrderInput } from "../types/chained-order-input";
|
|
36
|
+
import { InternalSwap } from "../types/internal-swap";
|
|
36
37
|
export declare class RioAdminClient {
|
|
37
38
|
private axios;
|
|
38
39
|
constructor(axios: AxiosStatic | AxiosInstance);
|
|
@@ -112,6 +113,8 @@ export declare class RioAdminClient {
|
|
|
112
113
|
cancelChainedOrder(id?: string): Promise<void>;
|
|
113
114
|
getOrder(id: string): Promise<Order>;
|
|
114
115
|
createBankPayout(oid: string, bankAccountId: string): Promise<BankPayout>;
|
|
116
|
+
createInternalSwap(originCrypto: Crypto, destinationCrypto: Crypto, amount: number): Promise<void>;
|
|
117
|
+
getInternalSwaps(page: number, limit?: number): Promise<InternalSwap[]>;
|
|
115
118
|
getBankPayout(orderId: string): Promise<BankPayout>;
|
|
116
119
|
getCryptoAddresses(page: number, limit?: number, query?: CryptoAddressQuery): Promise<CryptoAddress[]>;
|
|
117
120
|
createChainedOrder(order: ChainedOrderInput): Promise<ChainedOrder>;
|
|
@@ -398,6 +398,26 @@ class RioAdminClient {
|
|
|
398
398
|
return response.data;
|
|
399
399
|
});
|
|
400
400
|
}
|
|
401
|
+
createInternalSwap(originCrypto, destinationCrypto, amount) {
|
|
402
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
403
|
+
const response = yield this.axios.post(`/api/liquidity/swaps`, {
|
|
404
|
+
originCrypto,
|
|
405
|
+
destinationCrypto,
|
|
406
|
+
amount,
|
|
407
|
+
});
|
|
408
|
+
});
|
|
409
|
+
}
|
|
410
|
+
getInternalSwaps(page, limit) {
|
|
411
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
412
|
+
const { data } = yield this.axios.get(`/api/liquidity/swaps`, {
|
|
413
|
+
params: {
|
|
414
|
+
page,
|
|
415
|
+
limit,
|
|
416
|
+
},
|
|
417
|
+
});
|
|
418
|
+
return data;
|
|
419
|
+
});
|
|
420
|
+
}
|
|
401
421
|
getBankPayout(orderId) {
|
|
402
422
|
return __awaiter(this, void 0, void 0, function* () {
|
|
403
423
|
const response = yield this.axios.get(`/api/payouts/bank?orderId=${orderId}`);
|