-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.ts
95 lines (91 loc) · 2.84 KB
/
index.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
import {FinalExecutionOutcome} from 'near-api-js/lib/providers';
/**
* Spin
*/
import {CoreParams} from '../../../types/selector';
/**
* Contract
*/
import type {BatchOpsRequest, BatchOpsConfig} from '../../contract/batchOps';
import type {CancelOrderRequest, CancelOrderConfig} from '../../contract/cancelOrder';
import type {CancelOrdersRequest, CancelOrdersConfig} from '../../contract/cancelOrders';
import type {DepositRequest, DepositConfig} from '../../contract/deposit';
import type {DepositNearRequest, DepositNearConfig} from '../../contract/depositNear';
import type {PlaceAskRequest, PlaceAskConfig} from '../../contract/placeAsk';
import type {PlaceBidRequest, PlaceBidConfig} from '../../contract/placeBid';
import type {SwapRequest, SwapConfig} from '../../contract/swap';
import type {SwapFtRequest, SwapFtConfig} from '../../contract/swapFt';
import type {SwapNearRequest, SwapNearConfig} from '../../contract/swapNear';
import type {WithdrawRequest, WithdrawConfig} from '../../contract/withdraw';
/**
* Native
*/
import {TransferFtRequest, TransferFtConfig} from '../../../native/transferFt';
import {DepositStorageRequest, DepositStorageConfig} from '../../../native/depositStorage';
export type SpotBundlerUnit = () => Promise<CoreParams | undefined>;
export type CustomCreator = () => SpotBundlerUnit;
export interface SpotBundler {
/**
* TODO
*/
call: () => Promise<FinalExecutionOutcome[] | void>;
custom: (creator: CustomCreator) => SpotBundler;
/**
* Contract
*/
/**
* TODO
*/
batchOps: (request: BatchOpsRequest, config?: BatchOpsConfig) => SpotBundler;
/**
* TODO
*/
cancelOrder: (request: CancelOrderRequest, config?: CancelOrderConfig) => SpotBundler;
/**
* TODO
*/
cancelOrders: (request: CancelOrdersRequest, config?: CancelOrdersConfig) => SpotBundler;
/**
* TODO
*/
deposit: (request: DepositRequest, config?: DepositConfig) => SpotBundler;
/**
* TODO
*/
depositNear: (request: DepositNearRequest, config?: DepositNearConfig) => SpotBundler;
/**
* TODO
*/
placeAsk: (request: PlaceAskRequest, config?: PlaceAskConfig) => SpotBundler;
/**
* TODO
*/
placeBid: (request: PlaceBidRequest, config?: PlaceBidConfig) => SpotBundler;
/**
* TODO
*/
swap: (request: SwapRequest, config?: SwapConfig) => SpotBundler;
/**
* TODO
*/
swapFt: (request: SwapFtRequest, config?: SwapFtConfig) => SpotBundler;
/**
* TODO
*/
swapNear: (request: SwapNearRequest, config?: SwapNearConfig) => SpotBundler;
/**
* TODO
*/
withdraw: (request: WithdrawRequest, config?: WithdrawConfig) => SpotBundler;
/**
* Native
*/
/**
* TODO
*/
transferFt: (request: TransferFtRequest, config?: TransferFtConfig) => SpotBundler;
/**
* TODO
*/
depositStorage: (request: DepositStorageRequest, config?: DepositStorageConfig) => SpotBundler;
}