zo-sdk 0.1.90 → 0.1.92
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.
- package/.prettierrc.js +2 -2
- package/README.md +76 -58
- package/dist/abstract/BaseAPI.cjs +77 -4
- package/dist/abstract/BaseAPI.cjs.map +1 -1
- package/dist/abstract/BaseAPI.d.cts +32 -2
- package/dist/abstract/BaseAPI.d.cts.map +1 -1
- package/dist/abstract/BaseAPI.d.mts +32 -2
- package/dist/abstract/BaseAPI.d.mts.map +1 -1
- package/dist/abstract/BaseAPI.mjs +77 -4
- package/dist/abstract/BaseAPI.mjs.map +1 -1
- package/dist/abstract/BaseDataAPI.cjs +1 -0
- package/dist/abstract/BaseDataAPI.cjs.map +1 -1
- package/dist/abstract/BaseDataAPI.d.cts.map +1 -1
- package/dist/abstract/BaseDataAPI.d.mts.map +1 -1
- package/dist/abstract/BaseDataAPI.mjs +1 -0
- package/dist/abstract/BaseDataAPI.mjs.map +1 -1
- package/dist/consts/deployments-slp-mainnet.json +2 -2
- package/dist/data.cjs +10 -3
- package/dist/data.cjs.map +1 -1
- package/dist/data.d.cts.map +1 -1
- package/dist/data.d.mts.map +1 -1
- package/dist/data.mjs +10 -3
- package/dist/data.mjs.map +1 -1
- package/dist/implementations/SLPAPI.cjs +2 -70
- package/dist/implementations/SLPAPI.cjs.map +1 -1
- package/dist/implementations/SLPAPI.d.cts +1 -26
- package/dist/implementations/SLPAPI.d.cts.map +1 -1
- package/dist/implementations/SLPAPI.d.mts +1 -26
- package/dist/implementations/SLPAPI.d.mts.map +1 -1
- package/dist/implementations/SLPAPI.mjs +2 -70
- package/dist/implementations/SLPAPI.mjs.map +1 -1
- package/dist/implementations/USDZAPI.cjs +0 -69
- package/dist/implementations/USDZAPI.cjs.map +1 -1
- package/dist/implementations/USDZAPI.d.cts +1 -27
- package/dist/implementations/USDZAPI.d.cts.map +1 -1
- package/dist/implementations/USDZAPI.d.mts +1 -27
- package/dist/implementations/USDZAPI.d.mts.map +1 -1
- package/dist/implementations/USDZAPI.mjs +0 -69
- package/dist/implementations/USDZAPI.mjs.map +1 -1
- package/dist/implementations/ZBTCVCAPI.cjs +0 -69
- package/dist/implementations/ZBTCVCAPI.cjs.map +1 -1
- package/dist/implementations/ZBTCVCAPI.d.cts +1 -27
- package/dist/implementations/ZBTCVCAPI.d.cts.map +1 -1
- package/dist/implementations/ZBTCVCAPI.d.mts +1 -27
- package/dist/implementations/ZBTCVCAPI.d.mts.map +1 -1
- package/dist/implementations/ZBTCVCAPI.mjs +0 -69
- package/dist/implementations/ZBTCVCAPI.mjs.map +1 -1
- package/dist/implementations/ZLPAPI.cjs +0 -69
- package/dist/implementations/ZLPAPI.cjs.map +1 -1
- package/dist/implementations/ZLPAPI.d.cts +1 -27
- package/dist/implementations/ZLPAPI.d.cts.map +1 -1
- package/dist/implementations/ZLPAPI.d.mts +1 -27
- package/dist/implementations/ZLPAPI.d.mts.map +1 -1
- package/dist/implementations/ZLPAPI.mjs +0 -69
- package/dist/implementations/ZLPAPI.mjs.map +1 -1
- package/dist/interfaces/base.d.cts +1 -0
- package/dist/interfaces/base.d.cts.map +1 -1
- package/dist/interfaces/base.d.mts +1 -0
- package/dist/interfaces/base.d.mts.map +1 -1
- package/package.json +1 -1
- package/src/abstract/BaseAPI.ts +126 -12
- package/src/abstract/BaseDataAPI.ts +1 -0
- package/src/consts/deployments-shared-testnet.json +1 -1
- package/src/consts/deployments-slp-mainnet.json +2 -2
- package/src/consts/deployments-slp-testnet.json +1 -1
- package/src/consts/deployments-usdz-testnet.json +1 -1
- package/src/data.ts +8 -2
- package/src/implementations/SLPAPI.ts +2 -104
- package/src/implementations/USDZAPI.ts +0 -104
- package/src/implementations/ZBTCVCAPI.ts +0 -104
- package/src/implementations/ZLPAPI.ts +0 -104
- package/src/interfaces/base.ts +1 -0
- package/tsconfig.json +1 -1
|
@@ -14,19 +14,7 @@ import { BaseAPI } from '../abstract'
|
|
|
14
14
|
import type { Network } from '../consts'
|
|
15
15
|
import { ALLOW_TRADE_CAN_TRADE, ALLOW_TRADE_MUST_TRADE, ALLOW_TRADE_NO_TRADE, LPToken } from '../consts'
|
|
16
16
|
import type {
|
|
17
|
-
IBaseHistoryResponse,
|
|
18
|
-
IBaseMarketInfo,
|
|
19
|
-
IBaseMarketValuationInfo,
|
|
20
|
-
IBaseOrderCapInfo,
|
|
21
|
-
IBaseOrderInfo,
|
|
22
|
-
IBasePositionCapInfo,
|
|
23
|
-
IBasePositionConfig,
|
|
24
17
|
IBasePositionInfo,
|
|
25
|
-
IBaseRebaseFeeModel,
|
|
26
|
-
IBaseStaked,
|
|
27
|
-
IBaseStakePool,
|
|
28
|
-
IBaseSymbolInfo,
|
|
29
|
-
IBaseVaultInfo,
|
|
30
18
|
IUSDZAPI,
|
|
31
19
|
IUSDZCredential,
|
|
32
20
|
} from '../interfaces'
|
|
@@ -46,38 +34,6 @@ export class USDZAPI extends BaseAPI implements IUSDZAPI {
|
|
|
46
34
|
this.dataAPI = new USDZDataAPI(network, provider, apiEndpoint, connectionURL)
|
|
47
35
|
}
|
|
48
36
|
|
|
49
|
-
public claimTokenFromSCard(_token: string, _coinObjects: string[], _kioskClient: KioskClient, _kioskCap: KioskOwnerCap, _scard: string): Transaction {
|
|
50
|
-
throw new Error(`Method not implemented in ${this.constructor.name}.`)
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
public valuateVaults(_tx: Transaction) {
|
|
54
|
-
throw new Error(`Method not implemented in ${this.constructor.name}.`)
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
public valuateSymbols(_tx: Transaction) {
|
|
58
|
-
throw new Error(`Method not implemented in ${this.constructor.name}.`)
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
public valuate(_tx: Transaction): { vaultsValuation: any, symbolsValuation: any } {
|
|
62
|
-
throw new Error(`Method not implemented in ${this.constructor.name}.`)
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
public valuateMarket(): Promise<IBaseMarketValuationInfo> {
|
|
66
|
-
throw new Error(`Method not implemented in ${this.constructor.name}.`)
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
public fundingFeeRate(_indexToken: string, _long: boolean): Promise<number> {
|
|
70
|
-
throw new Error(`Method not implemented in ${this.constructor.name}.`)
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
public rebaseFeeRate(_collateralToken: string, _increase: boolean, _amount: number): Promise<number> {
|
|
74
|
-
throw new Error(`Method not implemented in ${this.constructor.name}.`)
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
public reservingFeeRate(_collateralToken: string, _amount: number): Promise<number> {
|
|
78
|
-
throw new Error(`Method not implemented in ${this.constructor.name}.`)
|
|
79
|
-
}
|
|
80
|
-
|
|
81
37
|
public calcPositionReserveFeeAmount(_position: IBasePositionInfo): Promise<number> {
|
|
82
38
|
throw new Error(`Method not implemented in ${this.constructor.name}.`)
|
|
83
39
|
}
|
|
@@ -86,66 +42,6 @@ export class USDZAPI extends BaseAPI implements IUSDZAPI {
|
|
|
86
42
|
throw new Error(`Method not implemented in ${this.constructor.name}.`)
|
|
87
43
|
}
|
|
88
44
|
|
|
89
|
-
public getMarketInfo(): Promise<IBaseMarketInfo> {
|
|
90
|
-
throw new Error(`Method not implemented in ${this.constructor.name}.`)
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
public getVaultInfo(_vault: string): Promise<IBaseVaultInfo> {
|
|
94
|
-
throw new Error(`Method not implemented in ${this.constructor.name}.`)
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
public getSymbolInfo(_tokenId: string, _long: boolean): Promise<IBaseSymbolInfo> {
|
|
98
|
-
throw new Error(`Method not implemented in ${this.constructor.name}.`)
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
public getPositionConfig(_indexToken: string, _long: boolean): Promise<IBasePositionConfig> {
|
|
102
|
-
throw new Error(`Method not implemented in ${this.constructor.name}.`)
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
public getRebaseFeeModel(): Promise<IBaseRebaseFeeModel> {
|
|
106
|
-
throw new Error(`Method not implemented in ${this.constructor.name}.`)
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
public getOpenPositions(): Promise<IBasePositionInfo[]> {
|
|
110
|
-
throw new Error(`Method not implemented in ${this.constructor.name}.`)
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
public getPositionCapInfoList(_owner: string): Promise<IBasePositionCapInfo[]> {
|
|
114
|
-
throw new Error(`Method not implemented in ${this.constructor.name}.`)
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
public getPositionInfoList(_positionCapInfoList: IBasePositionCapInfo[], _owner: string, _batchSize?: number): Promise<IBasePositionInfo[]> {
|
|
118
|
-
throw new Error(`Method not implemented in ${this.constructor.name}.`)
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
public getOrderCapInfoList(_owner: string): Promise<IBaseOrderCapInfo[]> {
|
|
122
|
-
throw new Error(`Method not implemented in ${this.constructor.name}.`)
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
public getOrderInfoList(_orderCapInfoList: IBaseOrderCapInfo[], _owner: string): Promise<IBaseOrderInfo[]> {
|
|
126
|
-
throw new Error(`Method not implemented in ${this.constructor.name}.`)
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
public getHistory(_trader: string, _page: number, _limit: number, _orderType?: string, _symbol?: string): Promise<IBaseHistoryResponse> {
|
|
130
|
-
throw new Error(`Method not implemented in ${this.constructor.name}.`)
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
public getStaked(_owner: string): Promise<IBaseStaked> {
|
|
134
|
-
throw new Error(`Method not implemented in ${this.constructor.name}.`)
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
public getStakePool(): Promise<IBaseStakePool> {
|
|
138
|
-
throw new Error(`Method not implemented in ${this.constructor.name}.`)
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
public hasReferral(_referree: string): Promise<boolean> {
|
|
142
|
-
throw new Error(`Method not implemented in ${this.constructor.name}.`)
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
public getReferralData(_referree: string): Promise<any> {
|
|
146
|
-
throw new Error(`Method not implemented in ${this.constructor.name}.`)
|
|
147
|
-
}
|
|
148
|
-
|
|
149
45
|
public clearClosedPosition(pcpId: string, collateralToken: string, indexToken: string, long: boolean, tx: Transaction): void {
|
|
150
46
|
tx.moveCall({
|
|
151
47
|
target: `${this.consts.zoCore.upgradedPackage}::market::clear_closed_position`,
|
|
@@ -13,19 +13,7 @@ import { BaseAPI } from '../abstract'
|
|
|
13
13
|
import type { Network } from '../consts'
|
|
14
14
|
import { ALLOW_TRADE_CAN_TRADE, ALLOW_TRADE_MUST_TRADE, ALLOW_TRADE_NO_TRADE, LPToken } from '../consts'
|
|
15
15
|
import type {
|
|
16
|
-
IBaseHistoryResponse,
|
|
17
|
-
IBaseMarketInfo,
|
|
18
|
-
IBaseMarketValuationInfo,
|
|
19
|
-
IBaseOrderCapInfo,
|
|
20
|
-
IBaseOrderInfo,
|
|
21
|
-
IBasePositionCapInfo,
|
|
22
|
-
IBasePositionConfig,
|
|
23
16
|
IBasePositionInfo,
|
|
24
|
-
IBaseRebaseFeeModel,
|
|
25
|
-
IBaseStaked,
|
|
26
|
-
IBaseStakePool,
|
|
27
|
-
IBaseSymbolInfo,
|
|
28
|
-
IBaseVaultInfo,
|
|
29
17
|
IZBTCVCAPI,
|
|
30
18
|
IZBTCVCCredential,
|
|
31
19
|
} from '../interfaces'
|
|
@@ -45,38 +33,6 @@ export class ZBTCVCAPI extends BaseAPI implements IZBTCVCAPI {
|
|
|
45
33
|
this.dataAPI = new ZBTCVCDataAPI(network, provider, apiEndpoint, connectionURL)
|
|
46
34
|
}
|
|
47
35
|
|
|
48
|
-
public claimTokenFromSCard(_token: string, _coinObjects: string[], _kioskClient: KioskClient, _kioskCap: KioskOwnerCap, _scard: string): Transaction {
|
|
49
|
-
throw new Error(`Method not implemented in ${this.constructor.name}.`)
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
public valuateVaults(_tx: Transaction) {
|
|
53
|
-
throw new Error(`Method not implemented in ${this.constructor.name}.`)
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
public valuateSymbols(_tx: Transaction) {
|
|
57
|
-
throw new Error(`Method not implemented in ${this.constructor.name}.`)
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
public valuate(_tx: Transaction): { vaultsValuation: any, symbolsValuation: any } {
|
|
61
|
-
throw new Error(`Method not implemented in ${this.constructor.name}.`)
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
public valuateMarket(): Promise<IBaseMarketValuationInfo> {
|
|
65
|
-
throw new Error(`Method not implemented in ${this.constructor.name}.`)
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
public fundingFeeRate(_indexToken: string, _long: boolean): Promise<number> {
|
|
69
|
-
throw new Error(`Method not implemented in ${this.constructor.name}.`)
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
public rebaseFeeRate(_collateralToken: string, _increase: boolean, _amount: number): Promise<number> {
|
|
73
|
-
throw new Error(`Method not implemented in ${this.constructor.name}.`)
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
public reservingFeeRate(_collateralToken: string, _amount: number): Promise<number> {
|
|
77
|
-
throw new Error(`Method not implemented in ${this.constructor.name}.`)
|
|
78
|
-
}
|
|
79
|
-
|
|
80
36
|
public calcPositionReserveFeeAmount(_position: IBasePositionInfo): Promise<number> {
|
|
81
37
|
throw new Error(`Method not implemented in ${this.constructor.name}.`)
|
|
82
38
|
}
|
|
@@ -85,66 +41,6 @@ export class ZBTCVCAPI extends BaseAPI implements IZBTCVCAPI {
|
|
|
85
41
|
throw new Error(`Method not implemented in ${this.constructor.name}.`)
|
|
86
42
|
}
|
|
87
43
|
|
|
88
|
-
public getMarketInfo(): Promise<IBaseMarketInfo> {
|
|
89
|
-
throw new Error(`Method not implemented in ${this.constructor.name}.`)
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
public getVaultInfo(_vault: string): Promise<IBaseVaultInfo> {
|
|
93
|
-
throw new Error(`Method not implemented in ${this.constructor.name}.`)
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
public getSymbolInfo(_tokenId: string, _long: boolean): Promise<IBaseSymbolInfo> {
|
|
97
|
-
throw new Error(`Method not implemented in ${this.constructor.name}.`)
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
public getPositionConfig(_indexToken: string, _long: boolean): Promise<IBasePositionConfig> {
|
|
101
|
-
throw new Error(`Method not implemented in ${this.constructor.name}.`)
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
public getRebaseFeeModel(): Promise<IBaseRebaseFeeModel> {
|
|
105
|
-
throw new Error(`Method not implemented in ${this.constructor.name}.`)
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
public getOpenPositions(): Promise<IBasePositionInfo[]> {
|
|
109
|
-
throw new Error(`Method not implemented in ${this.constructor.name}.`)
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
public getPositionCapInfoList(_owner: string): Promise<IBasePositionCapInfo[]> {
|
|
113
|
-
throw new Error(`Method not implemented in ${this.constructor.name}.`)
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
public getPositionInfoList(_positionCapInfoList: IBasePositionCapInfo[], _owner: string, _batchSize?: number): Promise<IBasePositionInfo[]> {
|
|
117
|
-
throw new Error(`Method not implemented in ${this.constructor.name}.`)
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
public getOrderCapInfoList(_owner: string): Promise<IBaseOrderCapInfo[]> {
|
|
121
|
-
throw new Error(`Method not implemented in ${this.constructor.name}.`)
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
public getOrderInfoList(_orderCapInfoList: IBaseOrderCapInfo[], _owner: string): Promise<IBaseOrderInfo[]> {
|
|
125
|
-
throw new Error(`Method not implemented in ${this.constructor.name}.`)
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
public getHistory(_trader: string, _page: number, _limit: number, _orderType?: string, _symbol?: string): Promise<IBaseHistoryResponse> {
|
|
129
|
-
throw new Error(`Method not implemented in ${this.constructor.name}.`)
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
public getStaked(_owner: string): Promise<IBaseStaked> {
|
|
133
|
-
throw new Error(`Method not implemented in ${this.constructor.name}.`)
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
public getStakePool(): Promise<IBaseStakePool> {
|
|
137
|
-
throw new Error(`Method not implemented in ${this.constructor.name}.`)
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
public hasReferral(_referree: string): Promise<boolean> {
|
|
141
|
-
throw new Error(`Method not implemented in ${this.constructor.name}.`)
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
public getReferralData(_referree: string): Promise<any> {
|
|
145
|
-
throw new Error(`Method not implemented in ${this.constructor.name}.`)
|
|
146
|
-
}
|
|
147
|
-
|
|
148
44
|
public clearClosedPosition(pcpId: string, collateralToken: string, indexToken: string, long: boolean, tx: Transaction): void {
|
|
149
45
|
tx.moveCall({
|
|
150
46
|
target: `${this.consts.zoCore.upgradedPackage}::market::clear_closed_position`,
|
|
@@ -14,19 +14,7 @@ import { BaseAPI } from '../abstract'
|
|
|
14
14
|
import type { Network } from '../consts'
|
|
15
15
|
import { ALLOW_TRADE_CAN_TRADE, ALLOW_TRADE_MUST_TRADE, ALLOW_TRADE_NO_TRADE, LPToken } from '../consts'
|
|
16
16
|
import type {
|
|
17
|
-
IBaseHistoryResponse,
|
|
18
|
-
IBaseMarketInfo,
|
|
19
|
-
IBaseMarketValuationInfo,
|
|
20
|
-
IBaseOrderCapInfo,
|
|
21
|
-
IBaseOrderInfo,
|
|
22
|
-
IBasePositionCapInfo,
|
|
23
|
-
IBasePositionConfig,
|
|
24
17
|
IBasePositionInfo,
|
|
25
|
-
IBaseRebaseFeeModel,
|
|
26
|
-
IBaseStaked,
|
|
27
|
-
IBaseStakePool,
|
|
28
|
-
IBaseSymbolInfo,
|
|
29
|
-
IBaseVaultInfo,
|
|
30
18
|
IZLPAPI,
|
|
31
19
|
IZLPCredential,
|
|
32
20
|
} from '../interfaces'
|
|
@@ -46,38 +34,6 @@ export class ZLPAPI extends BaseAPI implements IZLPAPI {
|
|
|
46
34
|
this.dataAPI = new ZLPDataAPI(network, provider, apiEndpoint, connectionURL)
|
|
47
35
|
}
|
|
48
36
|
|
|
49
|
-
public claimTokenFromSCard(_token: string, _coinObjects: string[], _kioskClient: KioskClient, _kioskCap: KioskOwnerCap, _scard: string): Transaction {
|
|
50
|
-
throw new Error(`Method not implemented in ${this.constructor.name}.`)
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
public valuateVaults(_tx: Transaction) {
|
|
54
|
-
throw new Error(`Method not implemented in ${this.constructor.name}.`)
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
public valuateSymbols(_tx: Transaction) {
|
|
58
|
-
throw new Error(`Method not implemented in ${this.constructor.name}.`)
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
public valuate(_tx: Transaction): { vaultsValuation: any, symbolsValuation: any } {
|
|
62
|
-
throw new Error(`Method not implemented in ${this.constructor.name}.`)
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
public valuateMarket(): Promise<IBaseMarketValuationInfo> {
|
|
66
|
-
throw new Error(`Method not implemented in ${this.constructor.name}.`)
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
public fundingFeeRate(_indexToken: string, _long: boolean): Promise<number> {
|
|
70
|
-
throw new Error(`Method not implemented in ${this.constructor.name}.`)
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
public rebaseFeeRate(_collateralToken: string, _increase: boolean, _amount: number): Promise<number> {
|
|
74
|
-
throw new Error(`Method not implemented in ${this.constructor.name}.`)
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
public reservingFeeRate(_collateralToken: string, _amount: number): Promise<number> {
|
|
78
|
-
throw new Error(`Method not implemented in ${this.constructor.name}.`)
|
|
79
|
-
}
|
|
80
|
-
|
|
81
37
|
public calcPositionReserveFeeAmount(_position: IBasePositionInfo): Promise<number> {
|
|
82
38
|
throw new Error(`Method not implemented in ${this.constructor.name}.`)
|
|
83
39
|
}
|
|
@@ -86,66 +42,6 @@ export class ZLPAPI extends BaseAPI implements IZLPAPI {
|
|
|
86
42
|
throw new Error(`Method not implemented in ${this.constructor.name}.`)
|
|
87
43
|
}
|
|
88
44
|
|
|
89
|
-
public getMarketInfo(): Promise<IBaseMarketInfo> {
|
|
90
|
-
throw new Error(`Method not implemented in ${this.constructor.name}.`)
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
public getVaultInfo(_vault: string): Promise<IBaseVaultInfo> {
|
|
94
|
-
throw new Error(`Method not implemented in ${this.constructor.name}.`)
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
public getSymbolInfo(_tokenId: string, _long: boolean): Promise<IBaseSymbolInfo> {
|
|
98
|
-
throw new Error(`Method not implemented in ${this.constructor.name}.`)
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
public getPositionConfig(_indexToken: string, _long: boolean): Promise<IBasePositionConfig> {
|
|
102
|
-
throw new Error(`Method not implemented in ${this.constructor.name}.`)
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
public getRebaseFeeModel(): Promise<IBaseRebaseFeeModel> {
|
|
106
|
-
throw new Error(`Method not implemented in ${this.constructor.name}.`)
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
public getOpenPositions(): Promise<IBasePositionInfo[]> {
|
|
110
|
-
throw new Error(`Method not implemented in ${this.constructor.name}.`)
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
public getPositionCapInfoList(_owner: string): Promise<IBasePositionCapInfo[]> {
|
|
114
|
-
throw new Error(`Method not implemented in ${this.constructor.name}.`)
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
public getPositionInfoList(_positionCapInfoList: IBasePositionCapInfo[], _owner: string): Promise<IBasePositionInfo[]> {
|
|
118
|
-
throw new Error(`Method not implemented in ${this.constructor.name}.`)
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
public getOrderCapInfoList(_owner: string): Promise<IBaseOrderCapInfo[]> {
|
|
122
|
-
throw new Error(`Method not implemented in ${this.constructor.name}.`)
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
public getOrderInfoList(_orderCapInfoList: IBaseOrderCapInfo[], _owner: string): Promise<IBaseOrderInfo[]> {
|
|
126
|
-
throw new Error(`Method not implemented in ${this.constructor.name}.`)
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
public getHistory(_trader: string, _page: number, _limit: number, _orderType?: string, _symbol?: string): Promise<IBaseHistoryResponse> {
|
|
130
|
-
throw new Error(`Method not implemented in ${this.constructor.name}.`)
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
public getStaked(_owner: string): Promise<IBaseStaked> {
|
|
134
|
-
throw new Error(`Method not implemented in ${this.constructor.name}.`)
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
public getStakePool(): Promise<IBaseStakePool> {
|
|
138
|
-
throw new Error(`Method not implemented in ${this.constructor.name}.`)
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
public hasReferral(_referree: string): Promise<boolean> {
|
|
142
|
-
throw new Error(`Method not implemented in ${this.constructor.name}.`)
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
public getReferralData(_referree: string): Promise<any> {
|
|
146
|
-
throw new Error(`Method not implemented in ${this.constructor.name}.`)
|
|
147
|
-
}
|
|
148
|
-
|
|
149
45
|
/**
|
|
150
46
|
* Deposits collateral into ZLP vault
|
|
151
47
|
*/
|
package/src/interfaces/base.ts
CHANGED
|
@@ -245,6 +245,7 @@ export interface IBaseDataAPI {
|
|
|
245
245
|
getVaultInfo: (vault: string) => Promise<IBaseVaultInfo>
|
|
246
246
|
getSymbolInfo: (tokenId: string, long: boolean) => Promise<IBaseSymbolInfo>
|
|
247
247
|
getPositionConfig: (indexToken: string, long: boolean) => Promise<IBasePositionConfig>
|
|
248
|
+
getRebaseFeeModel: () => Promise<IBaseRebaseFeeModel>
|
|
248
249
|
getOpenPositions: (batchSize: number, symbol: string) => Promise<IBasePositionInfo[]>
|
|
249
250
|
|
|
250
251
|
// User data methods
|
package/tsconfig.json
CHANGED