@riocrypto/common 1.0.1451 → 1.0.1453
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.
|
@@ -46,6 +46,7 @@ import { AdminAuthInput } from "../types/admin-auth-input";
|
|
|
46
46
|
import { BidInput } from "../types/bid-input";
|
|
47
47
|
import { RioBankAccount } from "../types/rio-bank-account";
|
|
48
48
|
import { SwapProvider } from "../types/swap-provider";
|
|
49
|
+
import { SwapOrigin } from "../types/swap-origin";
|
|
49
50
|
export declare class RioAdminClient {
|
|
50
51
|
private axios;
|
|
51
52
|
constructor(axios: AxiosStatic | AxiosInstance);
|
|
@@ -165,7 +166,8 @@ export declare class RioAdminClient {
|
|
|
165
166
|
cancelChainedOrder(id?: string): Promise<void>;
|
|
166
167
|
getOrder(id: string): Promise<Order>;
|
|
167
168
|
createBankPayout(oid: string, bankAccountId: string): Promise<BankPayout>;
|
|
168
|
-
createInternalSwap(originCrypto: Crypto, destinationCrypto: Crypto, amount: number, provider: SwapProvider): Promise<void>;
|
|
169
|
+
createInternalSwap(originCrypto: Crypto, destinationCrypto: Crypto, amount: number, origin: SwapOrigin, provider: SwapProvider): Promise<void>;
|
|
170
|
+
expediteInternalSwap(id: string): Promise<void>;
|
|
169
171
|
getInternalSwaps(page: number, limit?: number): Promise<InternalSwap[]>;
|
|
170
172
|
getBankPayout(orderId: string): Promise<BankPayout>;
|
|
171
173
|
startAddressVerification(addressId: string): Promise<void>;
|
|
@@ -568,16 +568,22 @@ class RioAdminClient {
|
|
|
568
568
|
return response.data;
|
|
569
569
|
});
|
|
570
570
|
}
|
|
571
|
-
createInternalSwap(originCrypto, destinationCrypto, amount, provider) {
|
|
571
|
+
createInternalSwap(originCrypto, destinationCrypto, amount, origin, provider) {
|
|
572
572
|
return __awaiter(this, void 0, void 0, function* () {
|
|
573
573
|
yield this.axios.post(`/api/liquidity/swaps`, {
|
|
574
574
|
originCrypto,
|
|
575
575
|
destinationCrypto,
|
|
576
576
|
amount,
|
|
577
|
+
origin,
|
|
577
578
|
provider,
|
|
578
579
|
});
|
|
579
580
|
});
|
|
580
581
|
}
|
|
582
|
+
expediteInternalSwap(id) {
|
|
583
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
584
|
+
yield this.axios.post(`/api/liquidity/swaps/${id}/expedite`);
|
|
585
|
+
});
|
|
586
|
+
}
|
|
581
587
|
getInternalSwaps(page, limit) {
|
|
582
588
|
return __awaiter(this, void 0, void 0, function* () {
|
|
583
589
|
const { data } = yield this.axios.get(`/api/liquidity/swaps`, {
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { Crypto } from "./crypto";
|
|
2
|
+
import { SwapOrigin } from "./swap-origin";
|
|
3
|
+
import { SwapProvider } from "./swap-provider";
|
|
2
4
|
export interface InternalSwap {
|
|
3
5
|
id: string;
|
|
4
6
|
createdAt: Date;
|
|
@@ -6,6 +8,9 @@ export interface InternalSwap {
|
|
|
6
8
|
originCrypto: Crypto;
|
|
7
9
|
destinationCrypto: Crypto;
|
|
8
10
|
amount: number;
|
|
9
|
-
|
|
11
|
+
originFee: number;
|
|
12
|
+
providerFee: number;
|
|
13
|
+
provider: SwapProvider;
|
|
14
|
+
origin: SwapOrigin;
|
|
10
15
|
status: "created" | "processing" | "firstLegComplete" | "complete" | "failed";
|
|
11
16
|
}
|