@mysten/deepbook-v3 1.5.7 → 1.5.8
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/CHANGELOG.md +2 -0
- package/dist/contracts/deepbook/account.d.mts +18 -18
- package/dist/contracts/deepbook/account.d.mts.map +1 -1
- package/dist/contracts/deepbook/balances.d.mts +4 -4
- package/dist/contracts/deepbook/deep_price.d.mts +3 -3
- package/dist/contracts/deepbook/deep_price.d.mts.map +1 -1
- package/dist/contracts/deepbook/order.d.mts +12 -12
- package/dist/transactions/marginAdmin.d.mts +7 -7
- package/dist/transactions/marginMaintainer.d.mts +5 -5
- package/dist/transactions/marginManager.d.mts +32 -32
- package/dist/transactions/marginPool.d.mts +18 -18
- package/dist/transactions/marginTPSL.d.mts +9 -9
- package/dist/transactions/poolProxy.d.mts +5 -5
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,35 +1,35 @@
|
|
|
1
1
|
import { MoveStruct } from "../utils/index.mjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as _mysten_sui_bcs44 from "@mysten/sui/bcs";
|
|
3
3
|
import { Transaction, TransactionArgument } from "@mysten/sui/transactions";
|
|
4
4
|
|
|
5
5
|
//#region src/contracts/deepbook/account.d.ts
|
|
6
6
|
declare const Account: MoveStruct<{
|
|
7
|
-
epoch:
|
|
7
|
+
epoch: _mysten_sui_bcs44.BcsType<string, string | number | bigint, "u64">;
|
|
8
8
|
open_orders: MoveStruct<{
|
|
9
|
-
contents:
|
|
9
|
+
contents: _mysten_sui_bcs44.BcsType<string[], Iterable<string | number | bigint> & {
|
|
10
10
|
length: number;
|
|
11
11
|
}, string>;
|
|
12
12
|
}, "0x2::vec_set::VecSet<u128>">;
|
|
13
|
-
taker_volume:
|
|
14
|
-
maker_volume:
|
|
15
|
-
active_stake:
|
|
16
|
-
inactive_stake:
|
|
17
|
-
created_proposal:
|
|
18
|
-
voted_proposal:
|
|
13
|
+
taker_volume: _mysten_sui_bcs44.BcsType<string, string | number | bigint, "u128">;
|
|
14
|
+
maker_volume: _mysten_sui_bcs44.BcsType<string, string | number | bigint, "u128">;
|
|
15
|
+
active_stake: _mysten_sui_bcs44.BcsType<string, string | number | bigint, "u64">;
|
|
16
|
+
inactive_stake: _mysten_sui_bcs44.BcsType<string, string | number | bigint, "u64">;
|
|
17
|
+
created_proposal: _mysten_sui_bcs44.BcsType<boolean, boolean, "bool">;
|
|
18
|
+
voted_proposal: _mysten_sui_bcs44.BcsType<string | null, string | Uint8Array<ArrayBufferLike> | null | undefined, "Option<bytes[32]>">;
|
|
19
19
|
unclaimed_rebates: MoveStruct<{
|
|
20
|
-
base:
|
|
21
|
-
quote:
|
|
22
|
-
deep:
|
|
20
|
+
base: _mysten_sui_bcs44.BcsType<string, string | number | bigint, "u64">;
|
|
21
|
+
quote: _mysten_sui_bcs44.BcsType<string, string | number | bigint, "u64">;
|
|
22
|
+
deep: _mysten_sui_bcs44.BcsType<string, string | number | bigint, "u64">;
|
|
23
23
|
}, "@deepbook/core::balances::Balances">;
|
|
24
24
|
settled_balances: MoveStruct<{
|
|
25
|
-
base:
|
|
26
|
-
quote:
|
|
27
|
-
deep:
|
|
25
|
+
base: _mysten_sui_bcs44.BcsType<string, string | number | bigint, "u64">;
|
|
26
|
+
quote: _mysten_sui_bcs44.BcsType<string, string | number | bigint, "u64">;
|
|
27
|
+
deep: _mysten_sui_bcs44.BcsType<string, string | number | bigint, "u64">;
|
|
28
28
|
}, "@deepbook/core::balances::Balances">;
|
|
29
29
|
owed_balances: MoveStruct<{
|
|
30
|
-
base:
|
|
31
|
-
quote:
|
|
32
|
-
deep:
|
|
30
|
+
base: _mysten_sui_bcs44.BcsType<string, string | number | bigint, "u64">;
|
|
31
|
+
quote: _mysten_sui_bcs44.BcsType<string, string | number | bigint, "u64">;
|
|
32
|
+
deep: _mysten_sui_bcs44.BcsType<string, string | number | bigint, "u64">;
|
|
33
33
|
}, "@deepbook/core::balances::Balances">;
|
|
34
34
|
}, "@deepbook/core::account::Account">;
|
|
35
35
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"account.d.mts","names":[],"sources":["../../../src/contracts/deepbook/account.ts"],"mappings":";;;;;cAYa,OAAA,EAAO,UAAA;SAelB,
|
|
1
|
+
{"version":3,"file":"account.d.mts","names":[],"sources":["../../../src/contracts/deepbook/account.ts"],"mappings":";;;;;cAYa,OAAA,EAAO,UAAA;SAelB,iBAAA,CAAA,OAAA"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { MoveStruct } from "../utils/index.mjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as _mysten_sui_bcs61 from "@mysten/sui/bcs";
|
|
3
3
|
|
|
4
4
|
//#region src/contracts/deepbook/balances.d.ts
|
|
5
5
|
declare const Balances: MoveStruct<{
|
|
6
|
-
base:
|
|
7
|
-
quote:
|
|
8
|
-
deep:
|
|
6
|
+
base: _mysten_sui_bcs61.BcsType<string, string | number | bigint, "u64">;
|
|
7
|
+
quote: _mysten_sui_bcs61.BcsType<string, string | number | bigint, "u64">;
|
|
8
|
+
deep: _mysten_sui_bcs61.BcsType<string, string | number | bigint, "u64">;
|
|
9
9
|
}, "@deepbook/core::balances::Balances">;
|
|
10
10
|
//#endregion
|
|
11
11
|
export { Balances };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { MoveStruct } from "../utils/index.mjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as _mysten_sui_bcs0 from "@mysten/sui/bcs";
|
|
3
3
|
import { Transaction, TransactionArgument } from "@mysten/sui/transactions";
|
|
4
4
|
|
|
5
5
|
//#region src/contracts/deepbook/deep_price.d.ts
|
|
6
6
|
declare const OrderDeepPrice: MoveStruct<{
|
|
7
|
-
asset_is_base:
|
|
8
|
-
deep_per_asset:
|
|
7
|
+
asset_is_base: _mysten_sui_bcs0.BcsType<boolean, boolean, "bool">;
|
|
8
|
+
deep_per_asset: _mysten_sui_bcs0.BcsType<string, string | number | bigint, "u64">;
|
|
9
9
|
}, "@deepbook/core::deep_price::OrderDeepPrice">;
|
|
10
10
|
//#endregion
|
|
11
11
|
export { OrderDeepPrice };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deep_price.d.mts","names":[],"sources":["../../../src/contracts/deepbook/deep_price.ts"],"mappings":";;;;;cAuCa,cAAA,EAAc,UAAA;iBAMzB,
|
|
1
|
+
{"version":3,"file":"deep_price.d.mts","names":[],"sources":["../../../src/contracts/deepbook/deep_price.ts"],"mappings":";;;;;cAuCa,cAAA,EAAc,UAAA;iBAMzB,gBAAA,CAAA,OAAA"}
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import { MoveStruct } from "../utils/index.mjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as _mysten_sui_bcs12 from "@mysten/sui/bcs";
|
|
3
3
|
import { Transaction, TransactionArgument } from "@mysten/sui/transactions";
|
|
4
4
|
|
|
5
5
|
//#region src/contracts/deepbook/order.d.ts
|
|
6
6
|
declare const Order: MoveStruct<{
|
|
7
|
-
balance_manager_id:
|
|
8
|
-
order_id:
|
|
9
|
-
client_order_id:
|
|
10
|
-
quantity:
|
|
11
|
-
filled_quantity:
|
|
12
|
-
fee_is_deep:
|
|
7
|
+
balance_manager_id: _mysten_sui_bcs12.BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
8
|
+
order_id: _mysten_sui_bcs12.BcsType<string, string | number | bigint, "u128">;
|
|
9
|
+
client_order_id: _mysten_sui_bcs12.BcsType<string, string | number | bigint, "u64">;
|
|
10
|
+
quantity: _mysten_sui_bcs12.BcsType<string, string | number | bigint, "u64">;
|
|
11
|
+
filled_quantity: _mysten_sui_bcs12.BcsType<string, string | number | bigint, "u64">;
|
|
12
|
+
fee_is_deep: _mysten_sui_bcs12.BcsType<boolean, boolean, "bool">;
|
|
13
13
|
order_deep_price: MoveStruct<{
|
|
14
|
-
asset_is_base:
|
|
15
|
-
deep_per_asset:
|
|
14
|
+
asset_is_base: _mysten_sui_bcs12.BcsType<boolean, boolean, "bool">;
|
|
15
|
+
deep_per_asset: _mysten_sui_bcs12.BcsType<string, string | number | bigint, "u64">;
|
|
16
16
|
}, "@deepbook/core::deep_price::OrderDeepPrice">;
|
|
17
|
-
epoch:
|
|
18
|
-
status:
|
|
19
|
-
expire_timestamp:
|
|
17
|
+
epoch: _mysten_sui_bcs12.BcsType<string, string | number | bigint, "u64">;
|
|
18
|
+
status: _mysten_sui_bcs12.BcsType<number, number, "u8">;
|
|
19
|
+
expire_timestamp: _mysten_sui_bcs12.BcsType<string, string | number | bigint, "u64">;
|
|
20
20
|
}, "@deepbook/core::order::Order">;
|
|
21
21
|
//#endregion
|
|
22
22
|
export { Order };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PoolConfigParams } from "../types/index.mjs";
|
|
2
2
|
import { DeepBookConfig } from "../utils/config.mjs";
|
|
3
|
-
import * as
|
|
3
|
+
import * as _mysten_sui_transactions40 from "@mysten/sui/transactions";
|
|
4
4
|
import { Transaction, TransactionArgument } from "@mysten/sui/transactions";
|
|
5
5
|
|
|
6
6
|
//#region src/transactions/marginAdmin.d.ts
|
|
@@ -17,7 +17,7 @@ declare class MarginAdminContract {
|
|
|
17
17
|
* @description Mint a maintainer cap
|
|
18
18
|
* @returns A function that takes a Transaction object
|
|
19
19
|
*/
|
|
20
|
-
mintMaintainerCap: () => (tx: Transaction) =>
|
|
20
|
+
mintMaintainerCap: () => (tx: Transaction) => _mysten_sui_transactions40.TransactionResult;
|
|
21
21
|
/**
|
|
22
22
|
* @description Revoke a maintainer cap
|
|
23
23
|
* @returns A function that takes a Transaction object
|
|
@@ -111,7 +111,7 @@ declare class MarginAdminContract {
|
|
|
111
111
|
* @param {PoolConfigParams} poolConfigParams The parameters for the pool config
|
|
112
112
|
* @returns A function that takes a Transaction object
|
|
113
113
|
*/
|
|
114
|
-
newPoolConfig: (poolKey: string, poolConfigParams: PoolConfigParams) => (tx: Transaction) =>
|
|
114
|
+
newPoolConfig: (poolKey: string, poolConfigParams: PoolConfigParams) => (tx: Transaction) => _mysten_sui_transactions40.TransactionResult;
|
|
115
115
|
/**
|
|
116
116
|
* @description Create a new pool config with leverage
|
|
117
117
|
* @param {string} poolKey The key to identify the pool
|
|
@@ -126,7 +126,7 @@ declare class MarginAdminContract {
|
|
|
126
126
|
* @param {number} maxEwmaDifferenceBps The maximum EWMA difference in basis points
|
|
127
127
|
* @returns A function that takes a Transaction object
|
|
128
128
|
*/
|
|
129
|
-
newCoinTypeData: (coinKey: string, maxConfBps: number, maxEwmaDifferenceBps: number) => (tx: Transaction) =>
|
|
129
|
+
newCoinTypeData: (coinKey: string, maxConfBps: number, maxEwmaDifferenceBps: number) => (tx: Transaction) => _mysten_sui_transactions40.TransactionResult;
|
|
130
130
|
/**
|
|
131
131
|
* @description Create a new Pyth config
|
|
132
132
|
* @param {Array<{coinKey: string, maxConfBps: number, maxEwmaDifferenceBps: number}>} coinSetups The coins with their oracle config to be added to the Pyth config
|
|
@@ -137,12 +137,12 @@ declare class MarginAdminContract {
|
|
|
137
137
|
coinKey: string;
|
|
138
138
|
maxConfBps: number;
|
|
139
139
|
maxEwmaDifferenceBps: number;
|
|
140
|
-
}>, maxAgeSeconds: number) => (tx: Transaction) =>
|
|
140
|
+
}>, maxAgeSeconds: number) => (tx: Transaction) => _mysten_sui_transactions40.TransactionResult;
|
|
141
141
|
/**
|
|
142
142
|
* @description Mint a pause cap
|
|
143
143
|
* @returns A function that takes a Transaction object
|
|
144
144
|
*/
|
|
145
|
-
mintPauseCap: () => (tx: Transaction) =>
|
|
145
|
+
mintPauseCap: () => (tx: Transaction) => _mysten_sui_transactions40.TransactionResult;
|
|
146
146
|
/**
|
|
147
147
|
* @description Revoke a pause cap
|
|
148
148
|
* @param {string} pauseCapId The ID of the pause cap to revoke
|
|
@@ -162,7 +162,7 @@ declare class MarginAdminContract {
|
|
|
162
162
|
* @param {string} coinKey The key to identify the margin pool
|
|
163
163
|
* @returns A function that takes a Transaction object and returns a Coin<Asset>
|
|
164
164
|
*/
|
|
165
|
-
adminWithdrawDefaultReferralFees: (coinKey: string) => (tx: Transaction) =>
|
|
165
|
+
adminWithdrawDefaultReferralFees: (coinKey: string) => (tx: Transaction) => _mysten_sui_transactions40.TransactionResult;
|
|
166
166
|
}
|
|
167
167
|
//#endregion
|
|
168
168
|
export { MarginAdminContract };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { InterestConfigParams, MarginPoolConfigParams } from "../types/index.mjs";
|
|
2
2
|
import { DeepBookConfig } from "../utils/config.mjs";
|
|
3
|
-
import * as
|
|
3
|
+
import * as _mysten_sui_transactions46 from "@mysten/sui/transactions";
|
|
4
4
|
import { Transaction, TransactionArgument, TransactionObjectArgument } from "@mysten/sui/transactions";
|
|
5
5
|
|
|
6
6
|
//#region src/transactions/marginMaintainer.d.ts
|
|
@@ -27,27 +27,27 @@ declare class MarginMaintainerContract {
|
|
|
27
27
|
* @param {InterestConfigParams} interestConfig The configuration for the interest
|
|
28
28
|
* @returns A function that takes a Transaction object
|
|
29
29
|
*/
|
|
30
|
-
newProtocolConfig: (coinKey: string, marginPoolConfig: MarginPoolConfigParams, interestConfig: InterestConfigParams) => (tx: Transaction) =>
|
|
30
|
+
newProtocolConfig: (coinKey: string, marginPoolConfig: MarginPoolConfigParams, interestConfig: InterestConfigParams) => (tx: Transaction) => _mysten_sui_transactions46.TransactionResult;
|
|
31
31
|
/**
|
|
32
32
|
* @description Create a new margin pool config
|
|
33
33
|
* @param {string} coinKey The key to identify the coin
|
|
34
34
|
* @param {MarginPoolConfigParams} marginPoolConfig The configuration for the margin pool
|
|
35
35
|
* @returns A function that takes a Transaction object
|
|
36
36
|
*/
|
|
37
|
-
newMarginPoolConfig: (coinKey: string, marginPoolConfig: MarginPoolConfigParams) => (tx: Transaction) =>
|
|
37
|
+
newMarginPoolConfig: (coinKey: string, marginPoolConfig: MarginPoolConfigParams) => (tx: Transaction) => _mysten_sui_transactions46.TransactionResult;
|
|
38
38
|
/**
|
|
39
39
|
* @description Create a new margin pool config with rate limit
|
|
40
40
|
* @param {string} coinKey The key to identify the coin
|
|
41
41
|
* @param {MarginPoolConfigParams} marginPoolConfig The configuration for the margin pool with rate limit
|
|
42
42
|
* @returns A function that takes a Transaction object
|
|
43
43
|
*/
|
|
44
|
-
newMarginPoolConfigWithRateLimit: (coinKey: string, marginPoolConfig: Required<Pick<MarginPoolConfigParams, "rateLimitCapacity" | "rateLimitRefillRatePerMs" | "rateLimitEnabled">> & MarginPoolConfigParams) => (tx: Transaction) =>
|
|
44
|
+
newMarginPoolConfigWithRateLimit: (coinKey: string, marginPoolConfig: Required<Pick<MarginPoolConfigParams, "rateLimitCapacity" | "rateLimitRefillRatePerMs" | "rateLimitEnabled">> & MarginPoolConfigParams) => (tx: Transaction) => _mysten_sui_transactions46.TransactionResult;
|
|
45
45
|
/**
|
|
46
46
|
* @description Create a new interest config
|
|
47
47
|
* @param {InterestConfigParams} interestConfig The configuration for the interest
|
|
48
48
|
* @returns A function that takes a Transaction object
|
|
49
49
|
*/
|
|
50
|
-
newInterestConfig: (interestConfig: InterestConfigParams) => (tx: Transaction) =>
|
|
50
|
+
newInterestConfig: (interestConfig: InterestConfigParams) => (tx: Transaction) => _mysten_sui_transactions46.TransactionResult;
|
|
51
51
|
/**
|
|
52
52
|
* @description Enable a deepbook pool for loan
|
|
53
53
|
* @param {string} deepbookPoolKey The key to identify the deepbook pool
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DepositDuringInitParams, DepositParams } from "../types/index.mjs";
|
|
2
2
|
import { DeepBookConfig } from "../utils/config.mjs";
|
|
3
|
-
import * as
|
|
3
|
+
import * as _mysten_sui_transactions50 from "@mysten/sui/transactions";
|
|
4
4
|
import { Transaction, TransactionArgument } from "@mysten/sui/transactions";
|
|
5
5
|
|
|
6
6
|
//#region src/transactions/marginManager.d.ts
|
|
@@ -88,49 +88,49 @@ declare class MarginManagerContract {
|
|
|
88
88
|
* @param {number} amount The amount to withdraw
|
|
89
89
|
* @returns A function that takes a Transaction object
|
|
90
90
|
*/
|
|
91
|
-
withdrawBase: (managerKey: string, amount: number) => (tx: Transaction) =>
|
|
91
|
+
withdrawBase: (managerKey: string, amount: number) => (tx: Transaction) => _mysten_sui_transactions50.TransactionResult;
|
|
92
92
|
/**
|
|
93
93
|
* @description Withdraw quote from a margin manager
|
|
94
94
|
* @param {string} managerKey The key to identify the manager
|
|
95
95
|
* @param {number} amount The amount to withdraw
|
|
96
96
|
* @returns A function that takes a Transaction object
|
|
97
97
|
*/
|
|
98
|
-
withdrawQuote: (managerKey: string, amount: number) => (tx: Transaction) =>
|
|
98
|
+
withdrawQuote: (managerKey: string, amount: number) => (tx: Transaction) => _mysten_sui_transactions50.TransactionResult;
|
|
99
99
|
/**
|
|
100
100
|
* @description Withdraw deep from a margin manager
|
|
101
101
|
* @param {string} managerKey The key to identify the manager
|
|
102
102
|
* @param {number} amount The amount to withdraw
|
|
103
103
|
* @returns A function that takes a Transaction object
|
|
104
104
|
*/
|
|
105
|
-
withdrawDeep: (managerKey: string, amount: number) => (tx: Transaction) =>
|
|
105
|
+
withdrawDeep: (managerKey: string, amount: number) => (tx: Transaction) => _mysten_sui_transactions50.TransactionResult;
|
|
106
106
|
/**
|
|
107
107
|
* @description Borrow base from a margin manager
|
|
108
108
|
* @param {string} managerKey The key to identify the manager
|
|
109
109
|
* @param {number} amount The amount to borrow
|
|
110
110
|
* @returns A function that takes a Transaction object
|
|
111
111
|
*/
|
|
112
|
-
borrowBase: (managerKey: string, amount: number) => (tx: Transaction) =>
|
|
112
|
+
borrowBase: (managerKey: string, amount: number) => (tx: Transaction) => _mysten_sui_transactions50.TransactionResult;
|
|
113
113
|
/**
|
|
114
114
|
* @description Borrow quote from a margin manager
|
|
115
115
|
* @param {string} managerKey The key to identify the manager
|
|
116
116
|
* @param {number} amount The amount to borrow
|
|
117
117
|
* @returns A function that takes a Transaction object
|
|
118
118
|
*/
|
|
119
|
-
borrowQuote: (managerKey: string, amount: number) => (tx: Transaction) =>
|
|
119
|
+
borrowQuote: (managerKey: string, amount: number) => (tx: Transaction) => _mysten_sui_transactions50.TransactionResult;
|
|
120
120
|
/**
|
|
121
121
|
* @description Repay base from a margin manager
|
|
122
122
|
* @param {string} managerKey The key to identify the manager
|
|
123
123
|
* @param {number} amount The amount to repay
|
|
124
124
|
* @returns A function that takes a Transaction object
|
|
125
125
|
*/
|
|
126
|
-
repayBase: (managerKey: string, amount?: number) => (tx: Transaction) =>
|
|
126
|
+
repayBase: (managerKey: string, amount?: number) => (tx: Transaction) => _mysten_sui_transactions50.TransactionResult;
|
|
127
127
|
/**
|
|
128
128
|
* @description Repay quote from a margin manager
|
|
129
129
|
* @param {string} managerKey The key to identify the manager
|
|
130
130
|
* @param {number} amount The amount to repay
|
|
131
131
|
* @returns A function that takes a Transaction object
|
|
132
132
|
*/
|
|
133
|
-
repayQuote: (managerKey: string, amount?: number) => (tx: Transaction) =>
|
|
133
|
+
repayQuote: (managerKey: string, amount?: number) => (tx: Transaction) => _mysten_sui_transactions50.TransactionResult;
|
|
134
134
|
/**
|
|
135
135
|
* @description Liquidate a margin manager
|
|
136
136
|
* @param {string} managerAddress The address of the manager to liquidate
|
|
@@ -139,7 +139,7 @@ declare class MarginManagerContract {
|
|
|
139
139
|
* @param {TransactionArgument} repayCoin The coin to repay
|
|
140
140
|
* @returns A function that takes a Transaction object
|
|
141
141
|
*/
|
|
142
|
-
liquidate: (managerAddress: string, poolKey: string, debtIsBase: boolean, repayCoin: TransactionArgument) => (tx: Transaction) =>
|
|
142
|
+
liquidate: (managerAddress: string, poolKey: string, debtIsBase: boolean, repayCoin: TransactionArgument) => (tx: Transaction) => _mysten_sui_transactions50.TransactionResult;
|
|
143
143
|
/**
|
|
144
144
|
* @description Set the referral for a margin manager (DeepBookPoolReferral)
|
|
145
145
|
* @param {string} managerKey The key to identify the margin manager
|
|
@@ -160,63 +160,63 @@ declare class MarginManagerContract {
|
|
|
160
160
|
* @param {string} marginManagerId The ID of the margin manager
|
|
161
161
|
* @returns A function that takes a Transaction object
|
|
162
162
|
*/
|
|
163
|
-
ownerByPoolKey: (poolKey: string, marginManagerId: string) => (tx: Transaction) =>
|
|
163
|
+
ownerByPoolKey: (poolKey: string, marginManagerId: string) => (tx: Transaction) => _mysten_sui_transactions50.TransactionResult;
|
|
164
164
|
/**
|
|
165
165
|
* @description Get the DeepBook pool ID associated with a margin manager
|
|
166
166
|
* @param {string} poolKey The key to identify the pool
|
|
167
167
|
* @param {string} marginManagerId The ID of the margin manager
|
|
168
168
|
* @returns A function that takes a Transaction object
|
|
169
169
|
*/
|
|
170
|
-
deepbookPool: (poolKey: string, marginManagerId: string) => (tx: Transaction) =>
|
|
170
|
+
deepbookPool: (poolKey: string, marginManagerId: string) => (tx: Transaction) => _mysten_sui_transactions50.TransactionResult;
|
|
171
171
|
/**
|
|
172
172
|
* @description Get the margin pool ID (if any) associated with a margin manager
|
|
173
173
|
* @param {string} poolKey The key to identify the pool
|
|
174
174
|
* @param {string} marginManagerId The ID of the margin manager
|
|
175
175
|
* @returns A function that takes a Transaction object
|
|
176
176
|
*/
|
|
177
|
-
marginPoolId: (poolKey: string, marginManagerId: string) => (tx: Transaction) =>
|
|
177
|
+
marginPoolId: (poolKey: string, marginManagerId: string) => (tx: Transaction) => _mysten_sui_transactions50.TransactionResult;
|
|
178
178
|
/**
|
|
179
179
|
* @description Get borrowed shares for both base and quote assets
|
|
180
180
|
* @param {string} poolKey The key to identify the pool
|
|
181
181
|
* @param {string} marginManagerId The ID of the margin manager
|
|
182
182
|
* @returns A function that takes a Transaction object
|
|
183
183
|
*/
|
|
184
|
-
borrowedShares: (poolKey: string, marginManagerId: string) => (tx: Transaction) =>
|
|
184
|
+
borrowedShares: (poolKey: string, marginManagerId: string) => (tx: Transaction) => _mysten_sui_transactions50.TransactionResult;
|
|
185
185
|
/**
|
|
186
186
|
* @description Get borrowed base shares
|
|
187
187
|
* @param {string} poolKey The key to identify the pool
|
|
188
188
|
* @param {string} marginManagerId The ID of the margin manager
|
|
189
189
|
* @returns A function that takes a Transaction object
|
|
190
190
|
*/
|
|
191
|
-
borrowedBaseShares: (poolKey: string, marginManagerId: string) => (tx: Transaction) =>
|
|
191
|
+
borrowedBaseShares: (poolKey: string, marginManagerId: string) => (tx: Transaction) => _mysten_sui_transactions50.TransactionResult;
|
|
192
192
|
/**
|
|
193
193
|
* @description Get borrowed quote shares
|
|
194
194
|
* @param {string} poolKey The key to identify the pool
|
|
195
195
|
* @param {string} marginManagerId The ID of the margin manager
|
|
196
196
|
* @returns A function that takes a Transaction object
|
|
197
197
|
*/
|
|
198
|
-
borrowedQuoteShares: (poolKey: string, marginManagerId: string) => (tx: Transaction) =>
|
|
198
|
+
borrowedQuoteShares: (poolKey: string, marginManagerId: string) => (tx: Transaction) => _mysten_sui_transactions50.TransactionResult;
|
|
199
199
|
/**
|
|
200
200
|
* @description Check if margin manager has base asset debt
|
|
201
201
|
* @param {string} poolKey The key to identify the pool
|
|
202
202
|
* @param {string} marginManagerId The ID of the margin manager
|
|
203
203
|
* @returns A function that takes a Transaction object
|
|
204
204
|
*/
|
|
205
|
-
hasBaseDebt: (poolKey: string, marginManagerId: string) => (tx: Transaction) =>
|
|
205
|
+
hasBaseDebt: (poolKey: string, marginManagerId: string) => (tx: Transaction) => _mysten_sui_transactions50.TransactionResult;
|
|
206
206
|
/**
|
|
207
207
|
* @description Get the balance manager ID for a margin manager
|
|
208
208
|
* @param {string} poolKey The key to identify the pool
|
|
209
209
|
* @param {string} marginManagerId The ID of the margin manager
|
|
210
210
|
* @returns A function that takes a Transaction object
|
|
211
211
|
*/
|
|
212
|
-
balanceManager: (poolKey: string, marginManagerId: string) => (tx: Transaction) =>
|
|
212
|
+
balanceManager: (poolKey: string, marginManagerId: string) => (tx: Transaction) => _mysten_sui_transactions50.TransactionResult;
|
|
213
213
|
/**
|
|
214
214
|
* @description Calculate assets (base and quote) for a margin manager
|
|
215
215
|
* @param {string} poolKey The key to identify the pool
|
|
216
216
|
* @param {string} marginManagerId The ID of the margin manager
|
|
217
217
|
* @returns A function that takes a Transaction object
|
|
218
218
|
*/
|
|
219
|
-
calculateAssets: (poolKey: string, marginManagerId: string) => (tx: Transaction) =>
|
|
219
|
+
calculateAssets: (poolKey: string, marginManagerId: string) => (tx: Transaction) => _mysten_sui_transactions50.TransactionResult;
|
|
220
220
|
/**
|
|
221
221
|
* @description Calculate debts (base and quote) for a margin manager
|
|
222
222
|
* @param {string} poolKey The key to identify the pool
|
|
@@ -224,7 +224,7 @@ declare class MarginManagerContract {
|
|
|
224
224
|
* @param {string} marginManagerId The ID of the margin manager
|
|
225
225
|
* @returns A function that takes a Transaction object
|
|
226
226
|
*/
|
|
227
|
-
calculateDebts: (poolKey: string, coinKey: string, marginManagerId: string) => (tx: Transaction) =>
|
|
227
|
+
calculateDebts: (poolKey: string, coinKey: string, marginManagerId: string) => (tx: Transaction) => _mysten_sui_transactions50.TransactionResult;
|
|
228
228
|
/**
|
|
229
229
|
* @description Get comprehensive state information for a margin manager
|
|
230
230
|
* @param {string} poolKey The key to identify the pool
|
|
@@ -234,28 +234,28 @@ declare class MarginManagerContract {
|
|
|
234
234
|
* base_debt, quote_debt, base_pyth_price, base_pyth_decimals,
|
|
235
235
|
* quote_pyth_price, quote_pyth_decimals)
|
|
236
236
|
*/
|
|
237
|
-
managerState: (poolKey: string, marginManagerId: string) => (tx: Transaction) =>
|
|
237
|
+
managerState: (poolKey: string, marginManagerId: string) => (tx: Transaction) => _mysten_sui_transactions50.TransactionResult;
|
|
238
238
|
/**
|
|
239
239
|
* @description Get the base asset balance of a margin manager
|
|
240
240
|
* @param {string} poolKey The key to identify the pool
|
|
241
241
|
* @param {string} marginManagerId The ID of the margin manager
|
|
242
242
|
* @returns A function that takes a Transaction object
|
|
243
243
|
*/
|
|
244
|
-
baseBalance: (poolKey: string, marginManagerId: string) => (tx: Transaction) =>
|
|
244
|
+
baseBalance: (poolKey: string, marginManagerId: string) => (tx: Transaction) => _mysten_sui_transactions50.TransactionResult;
|
|
245
245
|
/**
|
|
246
246
|
* @description Get the quote asset balance of a margin manager
|
|
247
247
|
* @param {string} poolKey The key to identify the pool
|
|
248
248
|
* @param {string} marginManagerId The ID of the margin manager
|
|
249
249
|
* @returns A function that takes a Transaction object
|
|
250
250
|
*/
|
|
251
|
-
quoteBalance: (poolKey: string, marginManagerId: string) => (tx: Transaction) =>
|
|
251
|
+
quoteBalance: (poolKey: string, marginManagerId: string) => (tx: Transaction) => _mysten_sui_transactions50.TransactionResult;
|
|
252
252
|
/**
|
|
253
253
|
* @description Get the DEEP token balance of a margin manager
|
|
254
254
|
* @param {string} poolKey The key to identify the pool
|
|
255
255
|
* @param {string} marginManagerId The ID of the margin manager
|
|
256
256
|
* @returns A function that takes a Transaction object
|
|
257
257
|
*/
|
|
258
|
-
deepBalance: (poolKey: string, marginManagerId: string) => (tx: Transaction) =>
|
|
258
|
+
deepBalance: (poolKey: string, marginManagerId: string) => (tx: Transaction) => _mysten_sui_transactions50.TransactionResult;
|
|
259
259
|
/**
|
|
260
260
|
* @description Get the underlying BalanceManager ID for a margin manager.
|
|
261
261
|
* Returns an ID (not a `&BalanceManager`), so it composes in PTBs unlike
|
|
@@ -264,28 +264,28 @@ declare class MarginManagerContract {
|
|
|
264
264
|
* @param {string} marginManagerId The ID of the margin manager
|
|
265
265
|
* @returns A function that takes a Transaction object
|
|
266
266
|
*/
|
|
267
|
-
balanceManagerId: (poolKey: string, marginManagerId: string) => (tx: Transaction) =>
|
|
267
|
+
balanceManagerId: (poolKey: string, marginManagerId: string) => (tx: Transaction) => _mysten_sui_transactions50.TransactionResult;
|
|
268
268
|
/**
|
|
269
269
|
* @description Get the BalanceManager referral ID for a pool (Option<ID>).
|
|
270
270
|
* @param {string} poolKey The key to identify the pool
|
|
271
271
|
* @param {string} marginManagerId The ID of the margin manager
|
|
272
272
|
* @returns A function that takes a Transaction object
|
|
273
273
|
*/
|
|
274
|
-
getBalanceManagerReferralId: (poolKey: string, marginManagerId: string) => (tx: Transaction) =>
|
|
274
|
+
getBalanceManagerReferralId: (poolKey: string, marginManagerId: string) => (tx: Transaction) => _mysten_sui_transactions50.TransactionResult;
|
|
275
275
|
/**
|
|
276
276
|
* @description Check if the margin manager's account exists in the pool.
|
|
277
277
|
* @param {string} poolKey The key to identify the pool
|
|
278
278
|
* @param {string} marginManagerId The ID of the margin manager
|
|
279
279
|
* @returns A function that takes a Transaction object
|
|
280
280
|
*/
|
|
281
|
-
accountExists: (poolKey: string, marginManagerId: string) => (tx: Transaction) =>
|
|
281
|
+
accountExists: (poolKey: string, marginManagerId: string) => (tx: Transaction) => _mysten_sui_transactions50.TransactionResult;
|
|
282
282
|
/**
|
|
283
283
|
* @description Get the pool account data for the margin manager.
|
|
284
284
|
* @param {string} poolKey The key to identify the pool
|
|
285
285
|
* @param {string} marginManagerId The ID of the margin manager
|
|
286
286
|
* @returns A function that takes a Transaction object
|
|
287
287
|
*/
|
|
288
|
-
account: (poolKey: string, marginManagerId: string) => (tx: Transaction) =>
|
|
288
|
+
account: (poolKey: string, marginManagerId: string) => (tx: Transaction) => _mysten_sui_transactions50.TransactionResult;
|
|
289
289
|
/**
|
|
290
290
|
* @description Get the open order IDs for the margin manager's account in
|
|
291
291
|
* the pool.
|
|
@@ -293,7 +293,7 @@ declare class MarginManagerContract {
|
|
|
293
293
|
* @param {string} marginManagerId The ID of the margin manager
|
|
294
294
|
* @returns A function that takes a Transaction object
|
|
295
295
|
*/
|
|
296
|
-
accountOpenOrders: (poolKey: string, marginManagerId: string) => (tx: Transaction) =>
|
|
296
|
+
accountOpenOrders: (poolKey: string, marginManagerId: string) => (tx: Transaction) => _mysten_sui_transactions50.TransactionResult;
|
|
297
297
|
/**
|
|
298
298
|
* @description Get full order details for the margin manager's account in
|
|
299
299
|
* the pool.
|
|
@@ -301,7 +301,7 @@ declare class MarginManagerContract {
|
|
|
301
301
|
* @param {string} marginManagerId The ID of the margin manager
|
|
302
302
|
* @returns A function that takes a Transaction object
|
|
303
303
|
*/
|
|
304
|
-
getAccountOrderDetails: (poolKey: string, marginManagerId: string) => (tx: Transaction) =>
|
|
304
|
+
getAccountOrderDetails: (poolKey: string, marginManagerId: string) => (tx: Transaction) => _mysten_sui_transactions50.TransactionResult;
|
|
305
305
|
/**
|
|
306
306
|
* @description Get locked balances (base, quote, deep) for the margin
|
|
307
307
|
* manager's account in the pool.
|
|
@@ -309,7 +309,7 @@ declare class MarginManagerContract {
|
|
|
309
309
|
* @param {string} marginManagerId The ID of the margin manager
|
|
310
310
|
* @returns A function that takes a Transaction object
|
|
311
311
|
*/
|
|
312
|
-
lockedBalance: (poolKey: string, marginManagerId: string) => (tx: Transaction) =>
|
|
312
|
+
lockedBalance: (poolKey: string, marginManagerId: string) => (tx: Transaction) => _mysten_sui_transactions50.TransactionResult;
|
|
313
313
|
/**
|
|
314
314
|
* @description Check whether a limit order can be placed given the
|
|
315
315
|
* manager's current state.
|
|
@@ -322,7 +322,7 @@ declare class MarginManagerContract {
|
|
|
322
322
|
* @param {number | bigint} expireTimestamp Order expiration timestamp (ms)
|
|
323
323
|
* @returns A function that takes a Transaction object
|
|
324
324
|
*/
|
|
325
|
-
canPlaceLimitOrder: (poolKey: string, marginManagerId: string, price: number | bigint, quantity: number | bigint, isBid: boolean, payWithDeep: boolean, expireTimestamp: number | bigint) => (tx: Transaction) =>
|
|
325
|
+
canPlaceLimitOrder: (poolKey: string, marginManagerId: string, price: number | bigint, quantity: number | bigint, isBid: boolean, payWithDeep: boolean, expireTimestamp: number | bigint) => (tx: Transaction) => _mysten_sui_transactions50.TransactionResult;
|
|
326
326
|
/**
|
|
327
327
|
* @description Check whether a market order can be placed given the
|
|
328
328
|
* manager's current state.
|
|
@@ -333,7 +333,7 @@ declare class MarginManagerContract {
|
|
|
333
333
|
* @param {boolean} payWithDeep Whether to pay fees in DEEP
|
|
334
334
|
* @returns A function that takes a Transaction object
|
|
335
335
|
*/
|
|
336
|
-
canPlaceMarketOrder: (poolKey: string, marginManagerId: string, quantity: number | bigint, isBid: boolean, payWithDeep: boolean) => (tx: Transaction) =>
|
|
336
|
+
canPlaceMarketOrder: (poolKey: string, marginManagerId: string, quantity: number | bigint, isBid: boolean, payWithDeep: boolean) => (tx: Transaction) => _mysten_sui_transactions50.TransactionResult;
|
|
337
337
|
}
|
|
338
338
|
//#endregion
|
|
339
339
|
export { MarginManagerContract };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DeepBookConfig } from "../utils/config.mjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as _mysten_sui_transactions81 from "@mysten/sui/transactions";
|
|
3
3
|
import { Transaction, TransactionObjectArgument } from "@mysten/sui/transactions";
|
|
4
4
|
|
|
5
5
|
//#region src/transactions/marginPool.d.ts
|
|
@@ -16,7 +16,7 @@ declare class MarginPoolContract {
|
|
|
16
16
|
* @description Mint a supplier cap for margin pool
|
|
17
17
|
* @returns A function that takes a Transaction object
|
|
18
18
|
*/
|
|
19
|
-
mintSupplierCap: () => (tx: Transaction) =>
|
|
19
|
+
mintSupplierCap: () => (tx: Transaction) => _mysten_sui_transactions81.TransactionResult;
|
|
20
20
|
/**
|
|
21
21
|
* @description Supply to a margin pool
|
|
22
22
|
* @param {string} coinKey The key to identify the pool
|
|
@@ -33,7 +33,7 @@ declare class MarginPoolContract {
|
|
|
33
33
|
* @param {number} [amountToWithdraw] The amount to withdraw. If omitted, withdraws all.
|
|
34
34
|
* @returns A function that takes a Transaction object
|
|
35
35
|
*/
|
|
36
|
-
withdrawFromMarginPool: (coinKey: string, supplierCap: TransactionObjectArgument, amountToWithdraw?: number) => (tx: Transaction) =>
|
|
36
|
+
withdrawFromMarginPool: (coinKey: string, supplierCap: TransactionObjectArgument, amountToWithdraw?: number) => (tx: Transaction) => _mysten_sui_transactions81.TransactionResult;
|
|
37
37
|
/**
|
|
38
38
|
* @description Mint a referral for a margin pool
|
|
39
39
|
* @param {string} coinKey The key to identify the pool
|
|
@@ -46,94 +46,94 @@ declare class MarginPoolContract {
|
|
|
46
46
|
* @param {string} referralId The ID of the referral
|
|
47
47
|
* @returns A function that takes a Transaction object
|
|
48
48
|
*/
|
|
49
|
-
withdrawReferralFees: (coinKey: string, referralId: string) => (tx: Transaction) =>
|
|
49
|
+
withdrawReferralFees: (coinKey: string, referralId: string) => (tx: Transaction) => _mysten_sui_transactions81.TransactionResult;
|
|
50
50
|
/**
|
|
51
51
|
* @description Get the margin pool ID
|
|
52
52
|
* @param {string} coinKey The key to identify the pool
|
|
53
53
|
* @returns A function that takes a Transaction object
|
|
54
54
|
*/
|
|
55
|
-
getId: (coinKey: string) => (tx: Transaction) =>
|
|
55
|
+
getId: (coinKey: string) => (tx: Transaction) => _mysten_sui_transactions81.TransactionResult;
|
|
56
56
|
/**
|
|
57
57
|
* @description Check if a deepbook pool is allowed for borrowing
|
|
58
58
|
* @param {string} coinKey The key to identify the margin pool
|
|
59
59
|
* @param {string} deepbookPoolId The ID of the deepbook pool
|
|
60
60
|
* @returns A function that takes a Transaction object
|
|
61
61
|
*/
|
|
62
|
-
deepbookPoolAllowed: (coinKey: string, deepbookPoolId: string) => (tx: Transaction) =>
|
|
62
|
+
deepbookPoolAllowed: (coinKey: string, deepbookPoolId: string) => (tx: Transaction) => _mysten_sui_transactions81.TransactionResult;
|
|
63
63
|
/**
|
|
64
64
|
* @description Get the total supply amount
|
|
65
65
|
* @param {string} coinKey The key to identify the pool
|
|
66
66
|
* @returns A function that takes a Transaction object
|
|
67
67
|
*/
|
|
68
|
-
totalSupply: (coinKey: string) => (tx: Transaction) =>
|
|
68
|
+
totalSupply: (coinKey: string) => (tx: Transaction) => _mysten_sui_transactions81.TransactionResult;
|
|
69
69
|
/**
|
|
70
70
|
* @description Get the total supply shares
|
|
71
71
|
* @param {string} coinKey The key to identify the pool
|
|
72
72
|
* @returns A function that takes a Transaction object
|
|
73
73
|
*/
|
|
74
|
-
supplyShares: (coinKey: string) => (tx: Transaction) =>
|
|
74
|
+
supplyShares: (coinKey: string) => (tx: Transaction) => _mysten_sui_transactions81.TransactionResult;
|
|
75
75
|
/**
|
|
76
76
|
* @description Get the total borrow amount
|
|
77
77
|
* @param {string} coinKey The key to identify the pool
|
|
78
78
|
* @returns A function that takes a Transaction object
|
|
79
79
|
*/
|
|
80
|
-
totalBorrow: (coinKey: string) => (tx: Transaction) =>
|
|
80
|
+
totalBorrow: (coinKey: string) => (tx: Transaction) => _mysten_sui_transactions81.TransactionResult;
|
|
81
81
|
/**
|
|
82
82
|
* @description Get the total borrow shares
|
|
83
83
|
* @param {string} coinKey The key to identify the pool
|
|
84
84
|
* @returns A function that takes a Transaction object
|
|
85
85
|
*/
|
|
86
|
-
borrowShares: (coinKey: string) => (tx: Transaction) =>
|
|
86
|
+
borrowShares: (coinKey: string) => (tx: Transaction) => _mysten_sui_transactions81.TransactionResult;
|
|
87
87
|
/**
|
|
88
88
|
* @description Get the last update timestamp
|
|
89
89
|
* @param {string} coinKey The key to identify the pool
|
|
90
90
|
* @returns A function that takes a Transaction object
|
|
91
91
|
*/
|
|
92
|
-
lastUpdateTimestamp: (coinKey: string) => (tx: Transaction) =>
|
|
92
|
+
lastUpdateTimestamp: (coinKey: string) => (tx: Transaction) => _mysten_sui_transactions81.TransactionResult;
|
|
93
93
|
/**
|
|
94
94
|
* @description Get the supply cap
|
|
95
95
|
* @param {string} coinKey The key to identify the pool
|
|
96
96
|
* @returns A function that takes a Transaction object
|
|
97
97
|
*/
|
|
98
|
-
supplyCap: (coinKey: string) => (tx: Transaction) =>
|
|
98
|
+
supplyCap: (coinKey: string) => (tx: Transaction) => _mysten_sui_transactions81.TransactionResult;
|
|
99
99
|
/**
|
|
100
100
|
* @description Get the max utilization rate
|
|
101
101
|
* @param {string} coinKey The key to identify the pool
|
|
102
102
|
* @returns A function that takes a Transaction object
|
|
103
103
|
*/
|
|
104
|
-
maxUtilizationRate: (coinKey: string) => (tx: Transaction) =>
|
|
104
|
+
maxUtilizationRate: (coinKey: string) => (tx: Transaction) => _mysten_sui_transactions81.TransactionResult;
|
|
105
105
|
/**
|
|
106
106
|
* @description Get the protocol spread
|
|
107
107
|
* @param {string} coinKey The key to identify the pool
|
|
108
108
|
* @returns A function that takes a Transaction object
|
|
109
109
|
*/
|
|
110
|
-
protocolSpread: (coinKey: string) => (tx: Transaction) =>
|
|
110
|
+
protocolSpread: (coinKey: string) => (tx: Transaction) => _mysten_sui_transactions81.TransactionResult;
|
|
111
111
|
/**
|
|
112
112
|
* @description Get the minimum borrow amount
|
|
113
113
|
* @param {string} coinKey The key to identify the pool
|
|
114
114
|
* @returns A function that takes a Transaction object
|
|
115
115
|
*/
|
|
116
|
-
minBorrow: (coinKey: string) => (tx: Transaction) =>
|
|
116
|
+
minBorrow: (coinKey: string) => (tx: Transaction) => _mysten_sui_transactions81.TransactionResult;
|
|
117
117
|
/**
|
|
118
118
|
* @description Get the current interest rate
|
|
119
119
|
* @param {string} coinKey The key to identify the pool
|
|
120
120
|
* @returns A function that takes a Transaction object
|
|
121
121
|
*/
|
|
122
|
-
interestRate: (coinKey: string) => (tx: Transaction) =>
|
|
122
|
+
interestRate: (coinKey: string) => (tx: Transaction) => _mysten_sui_transactions81.TransactionResult;
|
|
123
123
|
/**
|
|
124
124
|
* @description Get user supply shares for a supplier cap
|
|
125
125
|
* @param {string} coinKey The key to identify the pool
|
|
126
126
|
* @param {string} supplierCapId The ID of the supplier cap
|
|
127
127
|
* @returns A function that takes a Transaction object
|
|
128
128
|
*/
|
|
129
|
-
userSupplyShares: (coinKey: string, supplierCapId: string) => (tx: Transaction) =>
|
|
129
|
+
userSupplyShares: (coinKey: string, supplierCapId: string) => (tx: Transaction) => _mysten_sui_transactions81.TransactionResult;
|
|
130
130
|
/**
|
|
131
131
|
* @description Get user supply amount for a supplier cap
|
|
132
132
|
* @param {string} coinKey The key to identify the pool
|
|
133
133
|
* @param {string} supplierCapId The ID of the supplier cap
|
|
134
134
|
* @returns A function that takes a Transaction object
|
|
135
135
|
*/
|
|
136
|
-
userSupplyAmount: (coinKey: string, supplierCapId: string) => (tx: Transaction) =>
|
|
136
|
+
userSupplyAmount: (coinKey: string, supplierCapId: string) => (tx: Transaction) => _mysten_sui_transactions81.TransactionResult;
|
|
137
137
|
}
|
|
138
138
|
//#endregion
|
|
139
139
|
export { MarginPoolContract };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AddConditionalOrderParams, PendingLimitOrderParams, PendingMarketOrderParams } from "../types/index.mjs";
|
|
2
2
|
import { DeepBookConfig } from "../utils/config.mjs";
|
|
3
|
-
import * as
|
|
3
|
+
import * as _mysten_sui_transactions32 from "@mysten/sui/transactions";
|
|
4
4
|
import { Transaction } from "@mysten/sui/transactions";
|
|
5
5
|
|
|
6
6
|
//#region src/transactions/marginTPSL.d.ts
|
|
@@ -20,21 +20,21 @@ declare class MarginTPSLContract {
|
|
|
20
20
|
* @param {number} triggerPrice The price at which to trigger the order
|
|
21
21
|
* @returns A function that takes a Transaction object
|
|
22
22
|
*/
|
|
23
|
-
newCondition: (poolKey: string, triggerBelowPrice: boolean, triggerPrice: number | bigint) => (tx: Transaction) =>
|
|
23
|
+
newCondition: (poolKey: string, triggerBelowPrice: boolean, triggerPrice: number | bigint) => (tx: Transaction) => _mysten_sui_transactions32.TransactionResult;
|
|
24
24
|
/**
|
|
25
25
|
* @description Create a new pending limit order for use in conditional orders
|
|
26
26
|
* @param {string} poolKey The key to identify the pool
|
|
27
27
|
* @param {PendingLimitOrderParams} params Parameters for the pending limit order
|
|
28
28
|
* @returns A function that takes a Transaction object
|
|
29
29
|
*/
|
|
30
|
-
newPendingLimitOrder: (poolKey: string, params: PendingLimitOrderParams) => (tx: Transaction) =>
|
|
30
|
+
newPendingLimitOrder: (poolKey: string, params: PendingLimitOrderParams) => (tx: Transaction) => _mysten_sui_transactions32.TransactionResult;
|
|
31
31
|
/**
|
|
32
32
|
* @description Create a new pending market order for use in conditional orders
|
|
33
33
|
* @param {string} poolKey The key to identify the pool
|
|
34
34
|
* @param {PendingMarketOrderParams} params Parameters for the pending market order
|
|
35
35
|
* @returns A function that takes a Transaction object
|
|
36
36
|
*/
|
|
37
|
-
newPendingMarketOrder: (poolKey: string, params: PendingMarketOrderParams) => (tx: Transaction) =>
|
|
37
|
+
newPendingMarketOrder: (poolKey: string, params: PendingMarketOrderParams) => (tx: Transaction) => _mysten_sui_transactions32.TransactionResult;
|
|
38
38
|
/**
|
|
39
39
|
* @description Add a conditional order (take profit or stop loss)
|
|
40
40
|
* @param {AddConditionalOrderParams} params Parameters for adding the conditional order
|
|
@@ -65,14 +65,14 @@ declare class MarginTPSLContract {
|
|
|
65
65
|
* @param {number} maxOrdersToExecute Maximum number of orders to execute in this call
|
|
66
66
|
* @returns A function that takes a Transaction object
|
|
67
67
|
*/
|
|
68
|
-
executeConditionalOrders: (managerAddress: string, poolKey: string, maxOrdersToExecute: number) => (tx: Transaction) =>
|
|
68
|
+
executeConditionalOrders: (managerAddress: string, poolKey: string, maxOrdersToExecute: number) => (tx: Transaction) => _mysten_sui_transactions32.TransactionResult;
|
|
69
69
|
/**
|
|
70
70
|
* @description Get all conditional order IDs for a margin manager
|
|
71
71
|
* @param {string} poolKey The key to identify the pool
|
|
72
72
|
* @param {string} marginManagerId The ID of the margin manager
|
|
73
73
|
* @returns A function that takes a Transaction object
|
|
74
74
|
*/
|
|
75
|
-
conditionalOrderIds: (poolKey: string, marginManagerId: string) => (tx: Transaction) =>
|
|
75
|
+
conditionalOrderIds: (poolKey: string, marginManagerId: string) => (tx: Transaction) => _mysten_sui_transactions32.TransactionResult;
|
|
76
76
|
/**
|
|
77
77
|
* @description Get a specific conditional order by ID
|
|
78
78
|
* @param {string} poolKey The key to identify the pool
|
|
@@ -80,7 +80,7 @@ declare class MarginTPSLContract {
|
|
|
80
80
|
* @param {string} conditionalOrderId The ID of the conditional order
|
|
81
81
|
* @returns A function that takes a Transaction object
|
|
82
82
|
*/
|
|
83
|
-
conditionalOrder: (poolKey: string, marginManagerId: string, conditionalOrderId: string) => (tx: Transaction) =>
|
|
83
|
+
conditionalOrder: (poolKey: string, marginManagerId: string, conditionalOrderId: string) => (tx: Transaction) => _mysten_sui_transactions32.TransactionResult;
|
|
84
84
|
/**
|
|
85
85
|
* @description Get the lowest trigger price for trigger_above orders
|
|
86
86
|
* Returns constants::max_u64() if there are no trigger_above orders
|
|
@@ -88,7 +88,7 @@ declare class MarginTPSLContract {
|
|
|
88
88
|
* @param {string} marginManagerId The ID of the margin manager
|
|
89
89
|
* @returns A function that takes a Transaction object
|
|
90
90
|
*/
|
|
91
|
-
lowestTriggerAbovePrice: (poolKey: string, marginManagerId: string) => (tx: Transaction) =>
|
|
91
|
+
lowestTriggerAbovePrice: (poolKey: string, marginManagerId: string) => (tx: Transaction) => _mysten_sui_transactions32.TransactionResult;
|
|
92
92
|
/**
|
|
93
93
|
* @description Get the highest trigger price for trigger_below orders
|
|
94
94
|
* Returns 0 if there are no trigger_below orders
|
|
@@ -96,7 +96,7 @@ declare class MarginTPSLContract {
|
|
|
96
96
|
* @param {string} marginManagerId The ID of the margin manager
|
|
97
97
|
* @returns A function that takes a Transaction object
|
|
98
98
|
*/
|
|
99
|
-
highestTriggerBelowPrice: (poolKey: string, marginManagerId: string) => (tx: Transaction) =>
|
|
99
|
+
highestTriggerBelowPrice: (poolKey: string, marginManagerId: string) => (tx: Transaction) => _mysten_sui_transactions32.TransactionResult;
|
|
100
100
|
}
|
|
101
101
|
//#endregion
|
|
102
102
|
export { MarginTPSLContract };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { MarginProposalParams, PlaceMarginLimitOrderParams, PlaceMarginMarketOrderParams } from "../types/index.mjs";
|
|
2
2
|
import { DeepBookConfig } from "../utils/config.mjs";
|
|
3
|
-
import * as
|
|
3
|
+
import * as _mysten_sui_transactions98 from "@mysten/sui/transactions";
|
|
4
4
|
import { Transaction } from "@mysten/sui/transactions";
|
|
5
5
|
|
|
6
6
|
//#region src/transactions/poolProxy.d.ts
|
|
@@ -20,7 +20,7 @@ declare class PoolProxyContract {
|
|
|
20
20
|
* @param {PlaceMarginLimitOrderParams} params Parameters for placing a limit order
|
|
21
21
|
* @returns A function that takes a Transaction object
|
|
22
22
|
*/
|
|
23
|
-
placeLimitOrder: (params: PlaceMarginLimitOrderParams) => (tx: Transaction) =>
|
|
23
|
+
placeLimitOrder: (params: PlaceMarginLimitOrderParams) => (tx: Transaction) => _mysten_sui_transactions98.TransactionResult;
|
|
24
24
|
/**
|
|
25
25
|
* @description Place a market order. Enforces a post-trade `risk_ratio >=
|
|
26
26
|
* min_borrow_risk_ratio` invariant on the manager (skipped when the manager
|
|
@@ -28,7 +28,7 @@ declare class PoolProxyContract {
|
|
|
28
28
|
* @param {PlaceMarginMarketOrderParams} params Parameters for placing a market order
|
|
29
29
|
* @returns A function that takes a Transaction object
|
|
30
30
|
*/
|
|
31
|
-
placeMarketOrder: (params: PlaceMarginMarketOrderParams) => (tx: Transaction) =>
|
|
31
|
+
placeMarketOrder: (params: PlaceMarginMarketOrderParams) => (tx: Transaction) => _mysten_sui_transactions98.TransactionResult;
|
|
32
32
|
/**
|
|
33
33
|
* @description Place a reduce only limit order. Requires the manager to have
|
|
34
34
|
* debt on the relevant side; enforces a monotonic `risk_ratio_after >=
|
|
@@ -37,7 +37,7 @@ declare class PoolProxyContract {
|
|
|
37
37
|
* @param {PlaceMarginLimitOrderParams} params Parameters for placing a reduce only limit order
|
|
38
38
|
* @returns A function that takes a Transaction object
|
|
39
39
|
*/
|
|
40
|
-
placeReduceOnlyLimitOrder: (params: PlaceMarginLimitOrderParams) => (tx: Transaction) =>
|
|
40
|
+
placeReduceOnlyLimitOrder: (params: PlaceMarginLimitOrderParams) => (tx: Transaction) => _mysten_sui_transactions98.TransactionResult;
|
|
41
41
|
/**
|
|
42
42
|
* @description Place a reduce only market order. Requires the manager to
|
|
43
43
|
* have debt on the relevant side; enforces a monotonic `risk_ratio_after >=
|
|
@@ -46,7 +46,7 @@ declare class PoolProxyContract {
|
|
|
46
46
|
* @param {PlaceMarginMarketOrderParams} params Parameters for placing a reduce only market order
|
|
47
47
|
* @returns A function that takes a Transaction object
|
|
48
48
|
*/
|
|
49
|
-
placeReduceOnlyMarketOrder: (params: PlaceMarginMarketOrderParams) => (tx: Transaction) =>
|
|
49
|
+
placeReduceOnlyMarketOrder: (params: PlaceMarginMarketOrderParams) => (tx: Transaction) => _mysten_sui_transactions98.TransactionResult;
|
|
50
50
|
/**
|
|
51
51
|
* @description Modify an existing order
|
|
52
52
|
* @param {string} marginManagerKey The key to identify the MarginManager
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@mysten/deepbook-v3",
|
|
3
3
|
"author": "Mysten Labs <build@mystenlabs.com>",
|
|
4
4
|
"description": "Sui Deepbook SDK",
|
|
5
|
-
"version": "1.5.
|
|
5
|
+
"version": "1.5.8",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"main": "./dist/index.mjs",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"wait-on": "^9.0.10"
|
|
49
49
|
},
|
|
50
50
|
"peerDependencies": {
|
|
51
|
-
"@mysten/sui": "^2.
|
|
51
|
+
"@mysten/sui": "^2.22.0"
|
|
52
52
|
},
|
|
53
53
|
"scripts": {
|
|
54
54
|
"clean": "rm -rf tsconfig.tsbuildinfo ./dist",
|