@waterx/sdk 2.1.0 → 2.4.0
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/README.md +75 -169
- package/dist/src/client.d.ts +40 -2
- package/dist/src/client.js +55 -6
- package/dist/src/config.d.ts +66 -3
- package/dist/src/config.js +10 -4
- package/dist/src/constants.d.ts +6 -0
- package/dist/src/constants.js +6 -0
- package/dist/src/core/waterx-account.d.ts +31 -0
- package/dist/src/core/waterx-account.js +26 -0
- package/dist/src/fetch.d.ts +110 -0
- package/dist/src/fetch.js +149 -4
- package/dist/src/generated/bucket_v2_framework/account.d.ts +5 -5
- package/dist/src/generated/bucket_v2_framework/double.d.ts +77 -77
- package/dist/src/generated/bucket_v2_framework/float.d.ts +73 -73
- package/dist/src/generated/bucket_v2_framework/liability.d.ts +33 -33
- package/dist/src/generated/bucket_v2_framework/linked_table.d.ts +5 -5
- package/dist/src/generated/bucket_v2_framework/linked_table.js +2 -2
- package/dist/src/generated/bucket_v2_framework/sheet.d.ts +57 -57
- package/dist/src/generated/bucket_v2_framework/sheet.js +5 -11
- package/dist/src/generated/native_custody/custody_vault.d.ts +46 -32
- package/dist/src/generated/native_custody/custody_vault.js +19 -10
- package/dist/src/generated/native_custody/deps/bucket_v2_framework/sheet.js +1 -3
- package/dist/src/generated/native_custody/events.js +1 -2
- package/dist/src/generated/pyth_sponsor_rule/pyth_sponsor_rule.d.ts +7 -7
- package/dist/src/generated/pyth_sponsor_rule/pyth_sponsor_rule.js +1 -2
- package/dist/src/generated/utils/index.d.ts +7 -7
- package/dist/src/generated/utils/index.js +9 -6
- package/dist/src/generated/waterx_account/account.d.ts +124 -71
- package/dist/src/generated/waterx_account/account.js +64 -29
- package/dist/src/generated/waterx_account/deps/bucket_v2_framework/sheet.js +1 -3
- package/dist/src/generated/waterx_account/direct_rule.d.ts +5 -5
- package/dist/src/generated/waterx_account/events.d.ts +10 -0
- package/dist/src/generated/waterx_account/events.js +31 -50
- package/dist/src/generated/waterx_constant_rule/constant_rule.d.ts +68 -0
- package/dist/src/generated/waterx_constant_rule/constant_rule.js +59 -0
- package/dist/src/generated/waterx_constant_rule/deps/bucket_v2_framework/float.d.ts +8 -0
- package/dist/src/generated/waterx_constant_rule/deps/bucket_v2_framework/float.js +10 -0
- package/dist/src/generated/waterx_constant_rule/deps/sui/vec_map.d.ts +36 -0
- package/dist/src/generated/waterx_constant_rule/deps/sui/vec_map.js +27 -0
- package/dist/src/generated/waterx_credit/credit_registry.d.ts +9 -9
- package/dist/src/generated/waterx_credit/credit_registry.js +1 -2
- package/dist/src/generated/waterx_credit/limited_supply.d.ts +17 -17
- package/dist/src/generated/waterx_oracle/aggregator.js +1 -2
- package/dist/src/generated/waterx_oracle/collector.d.ts +17 -17
- package/dist/src/generated/waterx_oracle/collector.js +1 -1
- package/dist/src/generated/waterx_oracle/oracle.d.ts +5 -5
- package/dist/src/generated/waterx_perp/account_data.d.ts +5 -5
- package/dist/src/generated/waterx_perp/account_data.js +1 -2
- package/dist/src/generated/waterx_perp/deps/bucket_v2_framework/sheet.js +1 -3
- package/dist/src/generated/waterx_perp/events.d.ts +181 -181
- package/dist/src/generated/waterx_perp/events.js +87 -173
- package/dist/src/generated/waterx_perp/global_config.d.ts +3 -3
- package/dist/src/generated/waterx_perp/global_config.js +6 -12
- package/dist/src/generated/waterx_perp/keyed_big_vector.d.ts +9 -9
- package/dist/src/generated/waterx_perp/keyed_big_vector.js +1 -2
- package/dist/src/generated/waterx_perp/lp_pool.d.ts +115 -115
- package/dist/src/generated/waterx_perp/lp_pool.js +11 -22
- package/dist/src/generated/waterx_perp/market_config.d.ts +61 -43
- package/dist/src/generated/waterx_perp/market_config.js +29 -22
- package/dist/src/generated/waterx_perp/math.d.ts +7 -7
- package/dist/src/generated/waterx_perp/order_book.d.ts +47 -47
- package/dist/src/generated/waterx_perp/position.d.ts +99 -99
- package/dist/src/generated/waterx_perp/position.js +6 -12
- package/dist/src/generated/waterx_perp/request.d.ts +67 -67
- package/dist/src/generated/waterx_perp/request.js +2 -3
- package/dist/src/generated/waterx_perp/response.d.ts +35 -35
- package/dist/src/generated/waterx_perp/response.js +1 -2
- package/dist/src/generated/waterx_perp/trading.d.ts +303 -179
- package/dist/src/generated/waterx_perp/trading.js +99 -14
- package/dist/src/generated/waterx_perp_view/view.js +5 -10
- package/dist/src/generated/waterx_pyth_rule/pyth_rule.d.ts +5 -5
- package/dist/src/generated/waterx_pyth_rule/pyth_rule.js +1 -2
- package/dist/src/generated/waterx_referral/referral_table.d.ts +5 -5
- package/dist/src/generated/waterx_referral/referral_table.js +1 -2
- package/dist/src/generated/waterx_staking/waterx_staking.d.ts +19 -19
- package/dist/src/generated/waterx_staking/waterx_staking.js +10 -20
- package/dist/src/generated/waterx_supra_rule/deps/sui/vec_map.d.ts +36 -0
- package/dist/src/generated/waterx_supra_rule/deps/sui/vec_map.js +27 -0
- package/dist/src/generated/waterx_supra_rule/supra_rule.d.ts +158 -0
- package/dist/src/generated/waterx_supra_rule/supra_rule.js +148 -0
- package/dist/src/generated/withdrawal_queue/deps/bucket_v2_framework/float.d.ts +8 -0
- package/dist/src/generated/withdrawal_queue/deps/bucket_v2_framework/float.js +10 -0
- package/dist/src/generated/withdrawal_queue/deps/sui/vec_map.d.ts +36 -0
- package/dist/src/generated/withdrawal_queue/deps/sui/vec_map.js +27 -0
- package/dist/src/generated/withdrawal_queue/withdrawal_queue.d.ts +444 -4
- package/dist/src/generated/withdrawal_queue/withdrawal_queue.js +417 -4
- package/dist/src/generated/wormhole_bridge/wormhole_bridge.d.ts +214 -74
- package/dist/src/generated/wormhole_bridge/wormhole_bridge.js +158 -29
- package/dist/src/index.d.ts +4 -3
- package/dist/src/index.js +3 -2
- package/dist/src/prediction/account.d.ts +96 -0
- package/dist/src/prediction/account.js +230 -0
- package/dist/src/prediction/admin.d.ts +47 -0
- package/dist/src/prediction/admin.js +105 -0
- package/dist/src/prediction/bcs.d.ts +22 -0
- package/dist/src/prediction/bcs.js +240 -0
- package/dist/src/prediction/client.d.ts +75 -0
- package/dist/src/prediction/client.js +164 -0
- package/dist/src/prediction/config.d.ts +60 -0
- package/dist/src/prediction/config.js +75 -0
- package/dist/src/prediction/constants.d.ts +44 -0
- package/dist/src/prediction/constants.js +46 -0
- package/dist/src/prediction/fetch.d.ts +82 -0
- package/dist/src/prediction/fetch.js +270 -0
- package/dist/src/prediction/generated/bucket_v2_framework/account.d.ts +100 -0
- package/dist/src/prediction/generated/bucket_v2_framework/account.js +129 -0
- package/dist/src/prediction/generated/bucket_v2_framework/deps/std/type_name.d.ts +6 -0
- package/dist/src/prediction/generated/bucket_v2_framework/deps/std/type_name.js +19 -0
- package/dist/src/prediction/generated/bucket_v2_framework/deps/sui/balance.d.ts +10 -0
- package/dist/src/prediction/generated/bucket_v2_framework/deps/sui/balance.js +14 -0
- package/dist/src/prediction/generated/bucket_v2_framework/deps/sui/vec_map.d.ts +36 -0
- package/dist/src/prediction/generated/bucket_v2_framework/deps/sui/vec_map.js +27 -0
- package/dist/src/prediction/generated/bucket_v2_framework/deps/sui/vec_set.d.ts +16 -0
- package/dist/src/prediction/generated/bucket_v2_framework/deps/sui/vec_set.js +19 -0
- package/dist/src/prediction/generated/bucket_v2_framework/double.d.ts +382 -0
- package/dist/src/prediction/generated/bucket_v2_framework/double.js +466 -0
- package/dist/src/prediction/generated/bucket_v2_framework/float.d.ts +362 -0
- package/dist/src/prediction/generated/bucket_v2_framework/float.js +440 -0
- package/dist/src/prediction/generated/bucket_v2_framework/liability.d.ts +193 -0
- package/dist/src/prediction/generated/bucket_v2_framework/liability.js +205 -0
- package/dist/src/prediction/generated/bucket_v2_framework/linked_table.d.ts +384 -0
- package/dist/src/prediction/generated/bucket_v2_framework/linked_table.js +382 -0
- package/dist/src/prediction/generated/bucket_v2_framework/sheet.d.ts +344 -0
- package/dist/src/prediction/generated/bucket_v2_framework/sheet.js +338 -0
- package/dist/src/prediction/generated/utils/index.d.ts +30 -0
- package/dist/src/prediction/generated/utils/index.js +160 -0
- package/dist/src/prediction/generated/waterx_account/account.d.ts +1589 -0
- package/dist/src/prediction/generated/waterx_account/account.js +1758 -0
- package/dist/src/prediction/generated/waterx_account/deps/bucket_v2_framework/liability.d.ts +7 -0
- package/dist/src/prediction/generated/waterx_account/deps/bucket_v2_framework/liability.js +13 -0
- package/dist/src/prediction/generated/waterx_account/deps/bucket_v2_framework/sheet.d.ts +7 -0
- package/dist/src/prediction/generated/waterx_account/deps/bucket_v2_framework/sheet.js +16 -0
- package/dist/src/prediction/generated/waterx_account/deps/std/type_name.d.ts +6 -0
- package/dist/src/prediction/generated/waterx_account/deps/std/type_name.js +19 -0
- package/dist/src/prediction/generated/waterx_account/deps/sui/balance.d.ts +10 -0
- package/dist/src/prediction/generated/waterx_account/deps/sui/balance.js +14 -0
- package/dist/src/prediction/generated/waterx_account/deps/sui/object_table.d.ts +12 -0
- package/dist/src/prediction/generated/waterx_account/deps/sui/object_table.js +19 -0
- package/dist/src/prediction/generated/waterx_account/deps/sui/table.d.ts +24 -0
- package/dist/src/prediction/generated/waterx_account/deps/sui/table.js +31 -0
- package/dist/src/prediction/generated/waterx_account/deps/sui/vec_map.d.ts +36 -0
- package/dist/src/prediction/generated/waterx_account/deps/sui/vec_map.js +27 -0
- package/dist/src/prediction/generated/waterx_account/deps/sui/vec_set.d.ts +16 -0
- package/dist/src/prediction/generated/waterx_account/deps/sui/vec_set.js +19 -0
- package/dist/src/prediction/generated/waterx_account/direct_rule.d.ts +75 -0
- package/dist/src/prediction/generated/waterx_account/direct_rule.js +78 -0
- package/dist/src/prediction/generated/waterx_account/events.d.ts +33 -0
- package/dist/src/prediction/generated/waterx_account/events.js +137 -0
- package/dist/src/prediction/generated/waterx_account/version.d.ts +10 -0
- package/dist/src/prediction/generated/waterx_account/version.js +8 -0
- package/dist/src/prediction/generated/waterx_prediction/account_data.d.ts +327 -0
- package/dist/src/prediction/generated/waterx_prediction/account_data.js +405 -0
- package/dist/src/prediction/generated/waterx_prediction/admin.d.ts +5 -0
- package/dist/src/prediction/generated/waterx_prediction/admin.js +9 -0
- package/dist/src/prediction/generated/waterx_prediction/bet_sharing.d.ts +60 -0
- package/dist/src/prediction/generated/waterx_prediction/bet_sharing.js +83 -0
- package/dist/src/prediction/generated/waterx_prediction/deps/bucket_v2_framework/linked_table.d.ts +8 -0
- package/dist/src/prediction/generated/waterx_prediction/deps/bucket_v2_framework/linked_table.js +18 -0
- package/dist/src/prediction/generated/waterx_prediction/deps/sui/balance.d.ts +10 -0
- package/dist/src/prediction/generated/waterx_prediction/deps/sui/balance.js +14 -0
- package/dist/src/prediction/generated/waterx_prediction/deps/sui/table.d.ts +24 -0
- package/dist/src/prediction/generated/waterx_prediction/deps/sui/table.js +31 -0
- package/dist/src/prediction/generated/waterx_prediction/deps/sui/vec_set.d.ts +16 -0
- package/dist/src/prediction/generated/waterx_prediction/deps/sui/vec_set.js +19 -0
- package/dist/src/prediction/generated/waterx_prediction/events.d.ts +22 -0
- package/dist/src/prediction/generated/waterx_prediction/events.js +179 -0
- package/dist/src/prediction/generated/waterx_prediction/global_config.d.ts +116 -0
- package/dist/src/prediction/generated/waterx_prediction/global_config.js +141 -0
- package/dist/src/prediction/generated/waterx_prediction/order.d.ts +200 -0
- package/dist/src/prediction/generated/waterx_prediction/order.js +284 -0
- package/dist/src/prediction/generated/waterx_prediction/outcome.d.ts +58 -0
- package/dist/src/prediction/generated/waterx_prediction/outcome.js +73 -0
- package/dist/src/prediction/generated/waterx_prediction/position.d.ts +160 -0
- package/dist/src/prediction/generated/waterx_prediction/position.js +214 -0
- package/dist/src/prediction/generated/waterx_prediction/version.d.ts +10 -0
- package/dist/src/prediction/generated/waterx_prediction/version.js +8 -0
- package/dist/src/prediction/generated/waterx_prediction/view.d.ts +353 -0
- package/dist/src/prediction/generated/waterx_prediction/view.js +432 -0
- package/dist/src/prediction/generated/waterx_prediction/waterx_prediction.d.ts +1698 -0
- package/dist/src/prediction/generated/waterx_prediction/waterx_prediction.js +1733 -0
- package/dist/src/prediction/gift-link.d.ts +6 -0
- package/dist/src/prediction/gift-link.js +5 -0
- package/dist/src/prediction/gift.d.ts +223 -0
- package/dist/src/prediction/gift.js +451 -0
- package/dist/src/prediction/index.d.ts +29 -0
- package/dist/src/prediction/index.js +21 -0
- package/dist/src/prediction/prediction.d.ts +104 -0
- package/dist/src/prediction/prediction.js +317 -0
- package/dist/src/prediction/tx-builders.d.ts +44 -0
- package/dist/src/prediction/tx-builders.js +52 -0
- package/dist/src/prediction/types.d.ts +93 -0
- package/dist/src/prediction/types.js +1 -0
- package/dist/src/prediction/user/account.d.ts +2 -0
- package/dist/src/prediction/user/account.js +1 -0
- package/dist/src/prediction/user/admin.d.ts +6 -0
- package/dist/src/prediction/user/admin.js +3 -0
- package/dist/src/prediction/user/gift.d.ts +2 -0
- package/dist/src/prediction/user/gift.js +1 -0
- package/dist/src/prediction/user/index.d.ts +5 -0
- package/dist/src/prediction/user/index.js +3 -0
- package/dist/src/prediction/user/keeper.d.ts +2 -0
- package/dist/src/prediction/user/keeper.js +1 -0
- package/dist/src/prediction/user/order.d.ts +2 -0
- package/dist/src/prediction/user/order.js +1 -0
- package/dist/src/prediction/user/position.d.ts +2 -0
- package/dist/src/prediction/user/position.js +1 -0
- package/dist/src/prediction/utils/bcs.d.ts +1 -0
- package/dist/src/prediction/utils/bcs.js +1 -0
- package/dist/src/prediction/utils/index.d.ts +1 -0
- package/dist/src/prediction/utils/index.js +1 -0
- package/dist/src/prediction/utils.d.ts +30 -0
- package/dist/src/prediction/utils.js +177 -0
- package/dist/src/sdk.d.ts +18 -0
- package/dist/src/sdk.js +17 -0
- package/dist/src/tx-builders.d.ts +54 -0
- package/dist/src/tx-builders.js +141 -0
- package/dist/src/unified-client.d.ts +407 -0
- package/dist/src/unified-client.js +123 -0
- package/dist/src/user/account.d.ts +27 -0
- package/dist/src/user/account.js +34 -8
- package/dist/src/user/credit.d.ts +8 -14
- package/dist/src/user/credit.js +9 -23
- package/dist/src/user/custody.d.ts +4 -18
- package/dist/src/user/custody.js +14 -25
- package/dist/src/utils/consolidate-balance.d.ts +37 -0
- package/dist/src/utils/consolidate-balance.js +89 -0
- package/dist/src/utils/math.d.ts +86 -0
- package/dist/src/utils/math.js +100 -0
- package/dist/src/utils/pyth.d.ts +42 -7
- package/dist/src/utils/pyth.js +107 -31
- package/package.json +129 -34
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* GlobalVault (global_config.move), not in Position/Order.
|
|
8
8
|
*/
|
|
9
9
|
import { MoveStruct, type RawTransactionArgument } from '../utils/index.ts';
|
|
10
|
-
import { type Transaction } from '@mysten/sui/transactions';
|
|
10
|
+
import { type Transaction, type TransactionArgument } from '@mysten/sui/transactions';
|
|
11
11
|
export declare const Position: MoveStruct<{
|
|
12
12
|
id: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
13
13
|
/** Position ID (unique within market). */
|
|
@@ -128,17 +128,17 @@ export interface CreateOrderArguments {
|
|
|
128
128
|
accountObjectAddress: RawTransactionArgument<string>;
|
|
129
129
|
marketId: RawTransactionArgument<string>;
|
|
130
130
|
linkedPositionId: RawTransactionArgument<number | bigint | null>;
|
|
131
|
-
collateral:
|
|
132
|
-
vault:
|
|
131
|
+
collateral: TransactionArgument;
|
|
132
|
+
vault: TransactionArgument;
|
|
133
133
|
collateralDecimal: RawTransactionArgument<number>;
|
|
134
134
|
isLong: RawTransactionArgument<boolean>;
|
|
135
135
|
reduceOnly: RawTransactionArgument<boolean>;
|
|
136
136
|
isStopOrder: RawTransactionArgument<boolean>;
|
|
137
|
-
size:
|
|
138
|
-
triggerPrice:
|
|
137
|
+
size: TransactionArgument;
|
|
138
|
+
triggerPrice: TransactionArgument;
|
|
139
139
|
acceptablePrice: RawTransactionArgument<number | bigint>;
|
|
140
140
|
leverageBps: RawTransactionArgument<number | bigint>;
|
|
141
|
-
oraclePrice:
|
|
141
|
+
oraclePrice: TransactionArgument;
|
|
142
142
|
}
|
|
143
143
|
export interface CreateOrderOptions {
|
|
144
144
|
package?: string;
|
|
@@ -147,17 +147,17 @@ export interface CreateOrderOptions {
|
|
|
147
147
|
accountObjectAddress: RawTransactionArgument<string>,
|
|
148
148
|
marketId: RawTransactionArgument<string>,
|
|
149
149
|
linkedPositionId: RawTransactionArgument<number | bigint | null>,
|
|
150
|
-
collateral:
|
|
151
|
-
vault:
|
|
150
|
+
collateral: TransactionArgument,
|
|
151
|
+
vault: TransactionArgument,
|
|
152
152
|
collateralDecimal: RawTransactionArgument<number>,
|
|
153
153
|
isLong: RawTransactionArgument<boolean>,
|
|
154
154
|
reduceOnly: RawTransactionArgument<boolean>,
|
|
155
155
|
isStopOrder: RawTransactionArgument<boolean>,
|
|
156
|
-
size:
|
|
157
|
-
triggerPrice:
|
|
156
|
+
size: TransactionArgument,
|
|
157
|
+
triggerPrice: TransactionArgument,
|
|
158
158
|
acceptablePrice: RawTransactionArgument<number | bigint>,
|
|
159
159
|
leverageBps: RawTransactionArgument<number | bigint>,
|
|
160
|
-
oraclePrice:
|
|
160
|
+
oraclePrice: TransactionArgument
|
|
161
161
|
];
|
|
162
162
|
typeArguments: [
|
|
163
163
|
string
|
|
@@ -172,13 +172,13 @@ export interface CreateOrderOptions {
|
|
|
172
172
|
export declare function createOrder(options: CreateOrderOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
173
173
|
export interface RemoveOrderArguments {
|
|
174
174
|
order: RawTransactionArgument<string>;
|
|
175
|
-
vault:
|
|
175
|
+
vault: TransactionArgument;
|
|
176
176
|
}
|
|
177
177
|
export interface RemoveOrderOptions {
|
|
178
178
|
package?: string;
|
|
179
179
|
arguments: RemoveOrderArguments | [
|
|
180
180
|
order: RawTransactionArgument<string>,
|
|
181
|
-
vault:
|
|
181
|
+
vault: TransactionArgument
|
|
182
182
|
];
|
|
183
183
|
typeArguments: [
|
|
184
184
|
string
|
|
@@ -188,16 +188,16 @@ export interface RemoveOrderOptions {
|
|
|
188
188
|
export declare function removeOrder(options: RemoveOrderOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
189
189
|
export interface UpdateOrderArguments {
|
|
190
190
|
order: RawTransactionArgument<string>;
|
|
191
|
-
size:
|
|
192
|
-
triggerPrice:
|
|
191
|
+
size: TransactionArgument;
|
|
192
|
+
triggerPrice: TransactionArgument;
|
|
193
193
|
leverageBps: RawTransactionArgument<number | bigint>;
|
|
194
194
|
}
|
|
195
195
|
export interface UpdateOrderOptions {
|
|
196
196
|
package?: string;
|
|
197
197
|
arguments: UpdateOrderArguments | [
|
|
198
198
|
order: RawTransactionArgument<string>,
|
|
199
|
-
size:
|
|
200
|
-
triggerPrice:
|
|
199
|
+
size: TransactionArgument,
|
|
200
|
+
triggerPrice: TransactionArgument,
|
|
201
201
|
leverageBps: RawTransactionArgument<number | bigint>
|
|
202
202
|
];
|
|
203
203
|
}
|
|
@@ -225,15 +225,15 @@ export interface CreatePositionArguments {
|
|
|
225
225
|
accountObjectAddress: RawTransactionArgument<string>;
|
|
226
226
|
marketId: RawTransactionArgument<string>;
|
|
227
227
|
isLong: RawTransactionArgument<boolean>;
|
|
228
|
-
size:
|
|
229
|
-
collateral:
|
|
230
|
-
vault:
|
|
228
|
+
size: TransactionArgument;
|
|
229
|
+
collateral: TransactionArgument;
|
|
230
|
+
vault: TransactionArgument;
|
|
231
231
|
collateralDecimal: RawTransactionArgument<number>;
|
|
232
|
-
averagePrice:
|
|
233
|
-
collateralPrice:
|
|
234
|
-
entryBorrowIndex:
|
|
232
|
+
averagePrice: TransactionArgument;
|
|
233
|
+
collateralPrice: TransactionArgument;
|
|
234
|
+
entryBorrowIndex: TransactionArgument;
|
|
235
235
|
entryFundingSign: RawTransactionArgument<boolean>;
|
|
236
|
-
entryFundingIndex:
|
|
236
|
+
entryFundingIndex: TransactionArgument;
|
|
237
237
|
tradingFee: RawTransactionArgument<number | bigint>;
|
|
238
238
|
}
|
|
239
239
|
export interface CreatePositionOptions {
|
|
@@ -243,15 +243,15 @@ export interface CreatePositionOptions {
|
|
|
243
243
|
accountObjectAddress: RawTransactionArgument<string>,
|
|
244
244
|
marketId: RawTransactionArgument<string>,
|
|
245
245
|
isLong: RawTransactionArgument<boolean>,
|
|
246
|
-
size:
|
|
247
|
-
collateral:
|
|
248
|
-
vault:
|
|
246
|
+
size: TransactionArgument,
|
|
247
|
+
collateral: TransactionArgument,
|
|
248
|
+
vault: TransactionArgument,
|
|
249
249
|
collateralDecimal: RawTransactionArgument<number>,
|
|
250
|
-
averagePrice:
|
|
251
|
-
collateralPrice:
|
|
252
|
-
entryBorrowIndex:
|
|
250
|
+
averagePrice: TransactionArgument,
|
|
251
|
+
collateralPrice: TransactionArgument,
|
|
252
|
+
entryBorrowIndex: TransactionArgument,
|
|
253
253
|
entryFundingSign: RawTransactionArgument<boolean>,
|
|
254
|
-
entryFundingIndex:
|
|
254
|
+
entryFundingIndex: TransactionArgument,
|
|
255
255
|
tradingFee: RawTransactionArgument<number | bigint>
|
|
256
256
|
];
|
|
257
257
|
typeArguments: [
|
|
@@ -262,15 +262,15 @@ export interface CreatePositionOptions {
|
|
|
262
262
|
export declare function createPosition(options: CreatePositionOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
263
263
|
export interface DepositCollateralArguments {
|
|
264
264
|
position: RawTransactionArgument<string>;
|
|
265
|
-
vault:
|
|
266
|
-
collateral:
|
|
265
|
+
vault: TransactionArgument;
|
|
266
|
+
collateral: TransactionArgument;
|
|
267
267
|
}
|
|
268
268
|
export interface DepositCollateralOptions {
|
|
269
269
|
package?: string;
|
|
270
270
|
arguments: DepositCollateralArguments | [
|
|
271
271
|
position: RawTransactionArgument<string>,
|
|
272
|
-
vault:
|
|
273
|
-
collateral:
|
|
272
|
+
vault: TransactionArgument,
|
|
273
|
+
collateral: TransactionArgument
|
|
274
274
|
];
|
|
275
275
|
typeArguments: [
|
|
276
276
|
string
|
|
@@ -280,14 +280,14 @@ export interface DepositCollateralOptions {
|
|
|
280
280
|
export declare function depositCollateral(options: DepositCollateralOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
281
281
|
export interface WithdrawCollateralArguments {
|
|
282
282
|
position: RawTransactionArgument<string>;
|
|
283
|
-
vault:
|
|
283
|
+
vault: TransactionArgument;
|
|
284
284
|
amount: RawTransactionArgument<number | bigint>;
|
|
285
285
|
}
|
|
286
286
|
export interface WithdrawCollateralOptions {
|
|
287
287
|
package?: string;
|
|
288
288
|
arguments: WithdrawCollateralArguments | [
|
|
289
289
|
position: RawTransactionArgument<string>,
|
|
290
|
-
vault:
|
|
290
|
+
vault: TransactionArgument,
|
|
291
291
|
amount: RawTransactionArgument<number | bigint>
|
|
292
292
|
];
|
|
293
293
|
typeArguments: [
|
|
@@ -298,13 +298,13 @@ export interface WithdrawCollateralOptions {
|
|
|
298
298
|
export declare function withdrawCollateral(options: WithdrawCollateralOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
299
299
|
export interface RemovePositionArguments {
|
|
300
300
|
position: RawTransactionArgument<string>;
|
|
301
|
-
vault:
|
|
301
|
+
vault: TransactionArgument;
|
|
302
302
|
}
|
|
303
303
|
export interface RemovePositionOptions {
|
|
304
304
|
package?: string;
|
|
305
305
|
arguments: RemovePositionArguments | [
|
|
306
306
|
position: RawTransactionArgument<string>,
|
|
307
|
-
vault:
|
|
307
|
+
vault: TransactionArgument
|
|
308
308
|
];
|
|
309
309
|
typeArguments: [
|
|
310
310
|
string
|
|
@@ -342,64 +342,64 @@ export interface AssertOrderCollateralTypeOptions {
|
|
|
342
342
|
}
|
|
343
343
|
export declare function assertOrderCollateralType(options: AssertOrderCollateralTypeOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
344
344
|
export interface CalculatePoolReserveAmountFromValuesArguments {
|
|
345
|
-
size:
|
|
346
|
-
price:
|
|
345
|
+
size: TransactionArgument;
|
|
346
|
+
price: TransactionArgument;
|
|
347
347
|
collateralDecimal: RawTransactionArgument<number>;
|
|
348
|
-
collateralPrice:
|
|
348
|
+
collateralPrice: TransactionArgument;
|
|
349
349
|
}
|
|
350
350
|
export interface CalculatePoolReserveAmountFromValuesOptions {
|
|
351
351
|
package?: string;
|
|
352
352
|
arguments: CalculatePoolReserveAmountFromValuesArguments | [
|
|
353
|
-
size:
|
|
354
|
-
price:
|
|
353
|
+
size: TransactionArgument,
|
|
354
|
+
price: TransactionArgument,
|
|
355
355
|
collateralDecimal: RawTransactionArgument<number>,
|
|
356
|
-
collateralPrice:
|
|
356
|
+
collateralPrice: TransactionArgument
|
|
357
357
|
];
|
|
358
358
|
}
|
|
359
359
|
export declare function calculatePoolReserveAmountFromValues(options: CalculatePoolReserveAmountFromValuesOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
360
360
|
export interface CalculateReserveAmountArguments {
|
|
361
361
|
position: RawTransactionArgument<string>;
|
|
362
|
-
price:
|
|
363
|
-
collateralPrice:
|
|
362
|
+
price: TransactionArgument;
|
|
363
|
+
collateralPrice: TransactionArgument;
|
|
364
364
|
}
|
|
365
365
|
export interface CalculateReserveAmountOptions {
|
|
366
366
|
package?: string;
|
|
367
367
|
arguments: CalculateReserveAmountArguments | [
|
|
368
368
|
position: RawTransactionArgument<string>,
|
|
369
|
-
price:
|
|
370
|
-
collateralPrice:
|
|
369
|
+
price: TransactionArgument,
|
|
370
|
+
collateralPrice: TransactionArgument
|
|
371
371
|
];
|
|
372
372
|
}
|
|
373
373
|
export declare function calculateReserveAmount(options: CalculateReserveAmountOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
374
374
|
export interface CalculateReserveAmountFromValuesArguments {
|
|
375
|
-
size:
|
|
376
|
-
price:
|
|
375
|
+
size: TransactionArgument;
|
|
376
|
+
price: TransactionArgument;
|
|
377
377
|
collateralAmount: RawTransactionArgument<number | bigint>;
|
|
378
378
|
collateralDecimal: RawTransactionArgument<number>;
|
|
379
|
-
collateralPrice:
|
|
379
|
+
collateralPrice: TransactionArgument;
|
|
380
380
|
}
|
|
381
381
|
export interface CalculateReserveAmountFromValuesOptions {
|
|
382
382
|
package?: string;
|
|
383
383
|
arguments: CalculateReserveAmountFromValuesArguments | [
|
|
384
|
-
size:
|
|
385
|
-
price:
|
|
384
|
+
size: TransactionArgument,
|
|
385
|
+
price: TransactionArgument,
|
|
386
386
|
collateralAmount: RawTransactionArgument<number | bigint>,
|
|
387
387
|
collateralDecimal: RawTransactionArgument<number>,
|
|
388
|
-
collateralPrice:
|
|
388
|
+
collateralPrice: TransactionArgument
|
|
389
389
|
];
|
|
390
390
|
}
|
|
391
391
|
export declare function calculateReserveAmountFromValues(options: CalculateReserveAmountFromValuesOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
392
392
|
export interface RefreshBorrowReserveArguments {
|
|
393
393
|
position: RawTransactionArgument<string>;
|
|
394
|
-
price:
|
|
395
|
-
collateralPrice:
|
|
394
|
+
price: TransactionArgument;
|
|
395
|
+
collateralPrice: TransactionArgument;
|
|
396
396
|
}
|
|
397
397
|
export interface RefreshBorrowReserveOptions {
|
|
398
398
|
package?: string;
|
|
399
399
|
arguments: RefreshBorrowReserveArguments | [
|
|
400
400
|
position: RawTransactionArgument<string>,
|
|
401
|
-
price:
|
|
402
|
-
collateralPrice:
|
|
401
|
+
price: TransactionArgument,
|
|
402
|
+
collateralPrice: TransactionArgument
|
|
403
403
|
];
|
|
404
404
|
}
|
|
405
405
|
export declare function refreshBorrowReserve(options: RefreshBorrowReserveOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
@@ -417,30 +417,30 @@ export interface AddPoolReserveOptions {
|
|
|
417
417
|
export declare function addPoolReserve(options: AddPoolReserveOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
418
418
|
export interface RealizePoolReserveArguments {
|
|
419
419
|
position: RawTransactionArgument<string>;
|
|
420
|
-
reduceSize:
|
|
421
|
-
originalSize:
|
|
420
|
+
reduceSize: TransactionArgument;
|
|
421
|
+
originalSize: TransactionArgument;
|
|
422
422
|
}
|
|
423
423
|
export interface RealizePoolReserveOptions {
|
|
424
424
|
package?: string;
|
|
425
425
|
arguments: RealizePoolReserveArguments | [
|
|
426
426
|
position: RawTransactionArgument<string>,
|
|
427
|
-
reduceSize:
|
|
428
|
-
originalSize:
|
|
427
|
+
reduceSize: TransactionArgument,
|
|
428
|
+
originalSize: TransactionArgument
|
|
429
429
|
];
|
|
430
430
|
}
|
|
431
431
|
export declare function realizePoolReserve(options: RealizePoolReserveOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
432
432
|
export interface UpdatePositionSizeArguments {
|
|
433
433
|
position: RawTransactionArgument<string>;
|
|
434
|
-
newSize:
|
|
435
|
-
newAvgPrice:
|
|
434
|
+
newSize: TransactionArgument;
|
|
435
|
+
newAvgPrice: TransactionArgument;
|
|
436
436
|
newSide: RawTransactionArgument<boolean>;
|
|
437
437
|
}
|
|
438
438
|
export interface UpdatePositionSizeOptions {
|
|
439
439
|
package?: string;
|
|
440
440
|
arguments: UpdatePositionSizeArguments | [
|
|
441
441
|
position: RawTransactionArgument<string>,
|
|
442
|
-
newSize:
|
|
443
|
-
newAvgPrice:
|
|
442
|
+
newSize: TransactionArgument,
|
|
443
|
+
newAvgPrice: TransactionArgument,
|
|
444
444
|
newSide: RawTransactionArgument<boolean>
|
|
445
445
|
];
|
|
446
446
|
}
|
|
@@ -448,19 +448,19 @@ export interface UpdatePositionSizeOptions {
|
|
|
448
448
|
export declare function updatePositionSize(options: UpdatePositionSizeOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
449
449
|
export interface UpdateFeesArguments {
|
|
450
450
|
position: RawTransactionArgument<string>;
|
|
451
|
-
collateralPrice:
|
|
452
|
-
cumulativeBorrowRate:
|
|
451
|
+
collateralPrice: TransactionArgument;
|
|
452
|
+
cumulativeBorrowRate: TransactionArgument;
|
|
453
453
|
cumulativeFundingSign: RawTransactionArgument<boolean>;
|
|
454
|
-
cumulativeFundingIndex:
|
|
454
|
+
cumulativeFundingIndex: TransactionArgument;
|
|
455
455
|
}
|
|
456
456
|
export interface UpdateFeesOptions {
|
|
457
457
|
package?: string;
|
|
458
458
|
arguments: UpdateFeesArguments | [
|
|
459
459
|
position: RawTransactionArgument<string>,
|
|
460
|
-
collateralPrice:
|
|
461
|
-
cumulativeBorrowRate:
|
|
460
|
+
collateralPrice: TransactionArgument,
|
|
461
|
+
cumulativeBorrowRate: TransactionArgument,
|
|
462
462
|
cumulativeFundingSign: RawTransactionArgument<boolean>,
|
|
463
|
-
cumulativeFundingIndex:
|
|
463
|
+
cumulativeFundingIndex: TransactionArgument
|
|
464
464
|
];
|
|
465
465
|
}
|
|
466
466
|
/** Updates position borrow and funding fee state. */
|
|
@@ -480,15 +480,15 @@ export interface AddTradingFeeOptions {
|
|
|
480
480
|
export declare function addTradingFee(options: AddTradingFeeOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
481
481
|
export interface RealizePartialFeesArguments {
|
|
482
482
|
position: RawTransactionArgument<string>;
|
|
483
|
-
reduceSize:
|
|
484
|
-
originalSize:
|
|
483
|
+
reduceSize: TransactionArgument;
|
|
484
|
+
originalSize: TransactionArgument;
|
|
485
485
|
}
|
|
486
486
|
export interface RealizePartialFeesOptions {
|
|
487
487
|
package?: string;
|
|
488
488
|
arguments: RealizePartialFeesArguments | [
|
|
489
489
|
position: RawTransactionArgument<string>,
|
|
490
|
-
reduceSize:
|
|
491
|
-
originalSize:
|
|
490
|
+
reduceSize: TransactionArgument,
|
|
491
|
+
originalSize: TransactionArgument
|
|
492
492
|
];
|
|
493
493
|
}
|
|
494
494
|
/**
|
|
@@ -532,51 +532,51 @@ export interface RemoveLinkedOrderOptions {
|
|
|
532
532
|
export declare function removeLinkedOrder(options: RemoveLinkedOrderOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
533
533
|
export interface UnrealizedPnlArguments {
|
|
534
534
|
position: RawTransactionArgument<string>;
|
|
535
|
-
currentPrice:
|
|
535
|
+
currentPrice: TransactionArgument;
|
|
536
536
|
}
|
|
537
537
|
export interface UnrealizedPnlOptions {
|
|
538
538
|
package?: string;
|
|
539
539
|
arguments: UnrealizedPnlArguments | [
|
|
540
540
|
position: RawTransactionArgument<string>,
|
|
541
|
-
currentPrice:
|
|
541
|
+
currentPrice: TransactionArgument
|
|
542
542
|
];
|
|
543
543
|
}
|
|
544
544
|
/** Calculates unrealized PnL. Returns (is_profit, pnl as Float in USD). */
|
|
545
545
|
export declare function unrealizedPnl(options: UnrealizedPnlOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
546
546
|
export interface CheckOrderFillableArguments {
|
|
547
547
|
order: RawTransactionArgument<string>;
|
|
548
|
-
oraclePrice:
|
|
548
|
+
oraclePrice: TransactionArgument;
|
|
549
549
|
}
|
|
550
550
|
export interface CheckOrderFillableOptions {
|
|
551
551
|
package?: string;
|
|
552
552
|
arguments: CheckOrderFillableArguments | [
|
|
553
553
|
order: RawTransactionArgument<string>,
|
|
554
|
-
oraclePrice:
|
|
554
|
+
oraclePrice: TransactionArgument
|
|
555
555
|
];
|
|
556
556
|
}
|
|
557
557
|
/** Returns true if the order should be filled at the given oracle price. */
|
|
558
558
|
export declare function checkOrderFillable(options: CheckOrderFillableOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
559
559
|
export interface IsLiquidatableArguments {
|
|
560
560
|
position: RawTransactionArgument<string>;
|
|
561
|
-
currentPrice:
|
|
562
|
-
collateralPrice:
|
|
563
|
-
closingFee:
|
|
564
|
-
maintenanceMargin:
|
|
565
|
-
cumulativeBorrowRate:
|
|
561
|
+
currentPrice: TransactionArgument;
|
|
562
|
+
collateralPrice: TransactionArgument;
|
|
563
|
+
closingFee: TransactionArgument;
|
|
564
|
+
maintenanceMargin: TransactionArgument;
|
|
565
|
+
cumulativeBorrowRate: TransactionArgument;
|
|
566
566
|
cumulativeFundingSign: RawTransactionArgument<boolean>;
|
|
567
|
-
cumulativeFundingIndex:
|
|
567
|
+
cumulativeFundingIndex: TransactionArgument;
|
|
568
568
|
}
|
|
569
569
|
export interface IsLiquidatableOptions {
|
|
570
570
|
package?: string;
|
|
571
571
|
arguments: IsLiquidatableArguments | [
|
|
572
572
|
position: RawTransactionArgument<string>,
|
|
573
|
-
currentPrice:
|
|
574
|
-
collateralPrice:
|
|
575
|
-
closingFee:
|
|
576
|
-
maintenanceMargin:
|
|
577
|
-
cumulativeBorrowRate:
|
|
573
|
+
currentPrice: TransactionArgument,
|
|
574
|
+
collateralPrice: TransactionArgument,
|
|
575
|
+
closingFee: TransactionArgument,
|
|
576
|
+
maintenanceMargin: TransactionArgument,
|
|
577
|
+
cumulativeBorrowRate: TransactionArgument,
|
|
578
578
|
cumulativeFundingSign: RawTransactionArgument<boolean>,
|
|
579
|
-
cumulativeFundingIndex:
|
|
579
|
+
cumulativeFundingIndex: TransactionArgument
|
|
580
580
|
];
|
|
581
581
|
}
|
|
582
582
|
/**
|
|
@@ -586,29 +586,29 @@ export interface IsLiquidatableOptions {
|
|
|
586
586
|
export declare function isLiquidatable(options: IsLiquidatableOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
587
587
|
export interface CalculateBorrowFeeArguments {
|
|
588
588
|
position: RawTransactionArgument<string>;
|
|
589
|
-
cumulativeBorrowRate:
|
|
589
|
+
cumulativeBorrowRate: TransactionArgument;
|
|
590
590
|
}
|
|
591
591
|
export interface CalculateBorrowFeeOptions {
|
|
592
592
|
package?: string;
|
|
593
593
|
arguments: CalculateBorrowFeeArguments | [
|
|
594
594
|
position: RawTransactionArgument<string>,
|
|
595
|
-
cumulativeBorrowRate:
|
|
595
|
+
cumulativeBorrowRate: TransactionArgument
|
|
596
596
|
];
|
|
597
597
|
}
|
|
598
598
|
export declare function calculateBorrowFee(options: CalculateBorrowFeeOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
599
599
|
export interface CalculateFundingFeeArguments {
|
|
600
600
|
position: RawTransactionArgument<string>;
|
|
601
|
-
collateralPrice:
|
|
601
|
+
collateralPrice: TransactionArgument;
|
|
602
602
|
cumulativeFundingSign: RawTransactionArgument<boolean>;
|
|
603
|
-
cumulativeFundingIndex:
|
|
603
|
+
cumulativeFundingIndex: TransactionArgument;
|
|
604
604
|
}
|
|
605
605
|
export interface CalculateFundingFeeOptions {
|
|
606
606
|
package?: string;
|
|
607
607
|
arguments: CalculateFundingFeeArguments | [
|
|
608
608
|
position: RawTransactionArgument<string>,
|
|
609
|
-
collateralPrice:
|
|
609
|
+
collateralPrice: TransactionArgument,
|
|
610
610
|
cumulativeFundingSign: RawTransactionArgument<boolean>,
|
|
611
|
-
cumulativeFundingIndex:
|
|
611
|
+
cumulativeFundingIndex: TransactionArgument
|
|
612
612
|
];
|
|
613
613
|
}
|
|
614
614
|
export declare function calculateFundingFee(options: CalculateFundingFeeOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
@@ -10,13 +10,7 @@ import { MoveStruct, normalizeMoveArguments } from "../utils/index.js";
|
|
|
10
10
|
import { bcs } from '@mysten/sui/bcs';
|
|
11
11
|
import * as float from "./deps/bucket_v2_framework/float.js";
|
|
12
12
|
import * as type_name from "./deps/std/type_name.js";
|
|
13
|
-
import * as float_1 from "./deps/bucket_v2_framework/float.js";
|
|
14
|
-
import * as float_2 from "./deps/bucket_v2_framework/float.js";
|
|
15
13
|
import * as double from "./deps/bucket_v2_framework/double.js";
|
|
16
|
-
import * as type_name_1 from "./deps/std/type_name.js";
|
|
17
|
-
import * as float_3 from "./deps/bucket_v2_framework/float.js";
|
|
18
|
-
import * as float_4 from "./deps/bucket_v2_framework/float.js";
|
|
19
|
-
import * as float_5 from "./deps/bucket_v2_framework/float.js";
|
|
20
14
|
const $moduleName = '@waterx/perp::position';
|
|
21
15
|
export const Position = new MoveStruct({ name: `${$moduleName}::Position`, fields: {
|
|
22
16
|
id: bcs.Address,
|
|
@@ -37,9 +31,9 @@ export const Position = new MoveStruct({ name: `${$moduleName}::Position`, field
|
|
|
37
31
|
/** Collateral amount (tracked; actual balance in GlobalVault). */
|
|
38
32
|
collateral_amount: bcs.u64(),
|
|
39
33
|
/** Average entry price (Float). */
|
|
40
|
-
average_price:
|
|
34
|
+
average_price: float.Float,
|
|
41
35
|
/** Entry cumulative borrow rate index as Float. */
|
|
42
|
-
entry_borrow_index:
|
|
36
|
+
entry_borrow_index: float.Float,
|
|
43
37
|
/** Pool reserve snapshot in collateral token units. */
|
|
44
38
|
pool_reserve_amount: bcs.u64(),
|
|
45
39
|
/** Borrow reserve snapshot in collateral token units. */
|
|
@@ -79,7 +73,7 @@ export const Order = new MoveStruct({ name: `${$moduleName}::Order`, fields: {
|
|
|
79
73
|
/** Linked position ID (for reduce-only). */
|
|
80
74
|
linked_position_id: bcs.option(bcs.u64()),
|
|
81
75
|
/** Collateral token type. */
|
|
82
|
-
collateral_token:
|
|
76
|
+
collateral_token: type_name.TypeName,
|
|
83
77
|
/** Collateral token decimal. */
|
|
84
78
|
collateral_decimal: bcs.u8(),
|
|
85
79
|
/** Collateral amount (tracked; actual balance in GlobalVault). */
|
|
@@ -91,13 +85,13 @@ export const Order = new MoveStruct({ name: `${$moduleName}::Order`, fields: {
|
|
|
91
85
|
/** Whether this is a stop order (vs limit). */
|
|
92
86
|
is_stop_order: bcs.bool(),
|
|
93
87
|
/** Order size as Float (fixed 9 decimals). */
|
|
94
|
-
size:
|
|
88
|
+
size: float.Float,
|
|
95
89
|
/**
|
|
96
90
|
* Trigger price (Float). A value of zero marks the order as a market order: it
|
|
97
91
|
* sits at price tick 0 in the limit book and matches at any oracle price (see
|
|
98
92
|
* `check_order_fillable`).
|
|
99
93
|
*/
|
|
100
|
-
trigger_price:
|
|
94
|
+
trigger_price: float.Float,
|
|
101
95
|
/**
|
|
102
96
|
* Slippage limit (scaled `Float`) checked at match time. Zero disables the check.
|
|
103
97
|
* Only carries meaning on market orders — limit/stop orders always pass it through
|
|
@@ -107,7 +101,7 @@ export const Order = new MoveStruct({ name: `${$moduleName}::Order`, fields: {
|
|
|
107
101
|
/** Leverage in bps. */
|
|
108
102
|
leverage_bps: bcs.u64(),
|
|
109
103
|
/** Oracle price when order was placed. */
|
|
110
|
-
oracle_price_at_creation:
|
|
104
|
+
oracle_price_at_creation: float.Float,
|
|
111
105
|
/** Creation timestamp. */
|
|
112
106
|
create_timestamp: bcs.u64()
|
|
113
107
|
} });
|