@waterx/sdk 2.4.1 → 3.0.1
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 +25 -21
- package/dist/src/{utils → account}/account-request.d.ts +2 -2
- package/dist/src/{user → account}/account.d.ts +23 -21
- package/dist/src/{user → account}/account.js +5 -5
- package/dist/src/account/client.d.ts +42 -0
- package/dist/src/account/client.js +17 -0
- package/dist/src/account/config.d.ts +151 -0
- package/dist/src/account/config.js +8 -0
- package/dist/src/account/constants.d.ts +5 -0
- package/dist/src/account/constants.js +5 -0
- package/dist/src/account/fetch/referral.d.ts +15 -0
- package/dist/src/account/fetch/referral.js +51 -0
- package/dist/src/account/fetch/simulate.d.ts +34 -0
- package/dist/src/account/fetch/simulate.js +43 -0
- package/dist/src/{utils/consolidate-balance.d.ts → account/funding/balance.d.ts} +3 -8
- package/dist/src/{utils/consolidate-balance.js → account/funding/balance.js} +6 -1
- package/dist/src/account/funding/consolidate.d.ts +46 -0
- package/dist/src/account/funding/consolidate.js +137 -0
- package/dist/src/{user → account/funding}/credit.d.ts +10 -10
- package/dist/src/{user → account/funding}/credit.js +6 -6
- package/dist/src/{user → account/funding}/custody.d.ts +4 -4
- package/dist/src/{user → account/funding}/custody.js +2 -2
- package/dist/src/{utils → account/funding}/wormhole.d.ts +4 -4
- package/dist/src/{utils → account/funding}/wormhole.js +1 -1
- package/dist/src/account/index.d.ts +29 -0
- package/dist/src/account/index.js +29 -0
- package/dist/src/{user → account}/referral.d.ts +3 -3
- package/dist/src/{user → account}/referral.js +1 -1
- package/dist/src/base-client.d.ts +74 -0
- package/dist/src/base-client.js +97 -0
- package/dist/src/constants.d.ts +4 -46
- package/dist/src/constants.js +8 -52
- package/dist/src/generated/bucket_v2_framework/liability.d.ts +0 -26
- package/dist/src/generated/bucket_v2_framework/liability.js +0 -28
- package/dist/src/generated/waterx_account/account.d.ts +50 -15
- package/dist/src/generated/waterx_account/account.js +51 -15
- package/dist/src/generated/waterx_oracle/oracle.d.ts +7 -1
- package/dist/src/generated/waterx_oracle/oracle.js +7 -2
- package/dist/src/{prediction/generated → generated}/waterx_prediction/account_data.d.ts +19 -2
- package/dist/src/{prediction/generated → generated}/waterx_prediction/admin.d.ts +3 -1
- package/dist/src/{prediction/generated → generated}/waterx_prediction/deps/sui/balance.d.ts +3 -1
- package/dist/src/{prediction/generated/waterx_account → generated/waterx_prediction}/deps/sui/table.d.ts +6 -1
- package/dist/src/generated/waterx_prediction/events.d.ts +288 -0
- package/dist/src/{prediction/generated → generated}/waterx_prediction/events.js +39 -0
- package/dist/src/{prediction/generated → generated}/waterx_prediction/global_config.d.ts +6 -1
- package/dist/src/{prediction/generated → generated}/waterx_prediction/order.d.ts +34 -1
- package/dist/src/{prediction/generated → generated}/waterx_prediction/position.d.ts +16 -1
- package/dist/src/{prediction/generated → generated}/waterx_prediction/view.d.ts +69 -4
- package/dist/src/{prediction/generated → generated}/waterx_prediction/waterx_prediction.d.ts +162 -2
- package/dist/src/{prediction/generated → generated}/waterx_prediction/waterx_prediction.js +99 -0
- package/dist/src/generated/waterx_pyth_rule/pyth_rule.d.ts +102 -0
- package/dist/src/generated/waterx_pyth_rule/pyth_rule.js +99 -0
- package/dist/src/generated/waterx_supra_rule/supra_rule.d.ts +5 -5
- package/dist/src/generated/waterx_supra_rule/supra_rule.js +1 -2
- package/dist/src/generated/withdrawal_queue/withdrawal_queue.d.ts +23 -23
- package/dist/src/generated/withdrawal_queue/withdrawal_queue.js +3 -6
- package/dist/src/oracle/aggregate.d.ts +74 -0
- package/dist/src/oracle/aggregate.js +112 -0
- package/dist/src/oracle/config.d.ts +99 -0
- package/dist/src/oracle/config.js +23 -0
- package/dist/src/oracle/host.d.ts +32 -0
- package/dist/src/oracle/host.js +10 -0
- package/dist/src/oracle/index.d.ts +16 -0
- package/dist/src/oracle/index.js +18 -0
- package/dist/src/oracle/pyth.d.ts +52 -0
- package/dist/src/oracle/pyth.js +220 -0
- package/dist/src/oracle/rules/constant-rule.d.ts +9 -0
- package/dist/src/oracle/rules/constant-rule.js +14 -0
- package/dist/src/oracle/rules/pyth-rule.d.ts +11 -0
- package/dist/src/oracle/rules/pyth-rule.js +20 -0
- package/dist/src/oracle/rules/sponsor.d.ts +28 -0
- package/dist/src/oracle/rules/sponsor.js +48 -0
- package/dist/src/oracle/rules/supra-rule.d.ts +11 -0
- package/dist/src/oracle/rules/supra-rule.js +22 -0
- package/dist/src/perp/client.d.ts +78 -0
- package/dist/src/perp/client.js +108 -0
- package/dist/src/{client.d.ts → perp/config-view.d.ts} +15 -60
- package/dist/src/{client.js → perp/config-view.js} +23 -95
- package/dist/src/perp/config.d.ts +126 -0
- package/dist/src/{config.js → perp/config.js} +11 -12
- package/dist/src/perp/constants.d.ts +49 -0
- package/dist/src/perp/constants.js +61 -0
- package/dist/src/perp/fetch/account.d.ts +43 -0
- package/dist/src/perp/fetch/account.js +64 -0
- package/dist/src/perp/fetch/bridge.d.ts +90 -0
- package/dist/src/perp/fetch/bridge.js +127 -0
- package/dist/src/perp/fetch/custody.d.ts +32 -0
- package/dist/src/perp/fetch/custody.js +62 -0
- package/dist/src/perp/fetch/market.d.ts +30 -0
- package/dist/src/perp/fetch/market.js +68 -0
- package/dist/src/perp/fetch/positions.d.ts +70 -0
- package/dist/src/perp/fetch/positions.js +185 -0
- package/dist/src/perp/fetch/simulate.d.ts +12 -0
- package/dist/src/perp/fetch/simulate.js +13 -0
- package/dist/src/perp/fetch.d.ts +23 -0
- package/dist/src/perp/fetch.js +23 -0
- package/dist/src/{index.d.ts → perp/index.d.ts} +21 -21
- package/dist/src/{index.js → perp/index.js} +21 -21
- package/dist/src/perp/tx-builders/common.d.ts +83 -0
- package/dist/src/perp/tx-builders/common.js +70 -0
- package/dist/src/perp/tx-builders/credit.d.ts +65 -0
- package/dist/src/perp/tx-builders/credit.js +62 -0
- package/dist/src/perp/tx-builders/rewards.d.ts +30 -0
- package/dist/src/perp/tx-builders/rewards.js +34 -0
- package/dist/src/perp/tx-builders/trading.d.ts +51 -0
- package/dist/src/perp/tx-builders/trading.js +59 -0
- package/dist/src/perp/tx-builders/wlp.d.ts +90 -0
- package/dist/src/perp/tx-builders/wlp.js +120 -0
- package/dist/src/perp/tx-builders.d.ts +23 -0
- package/dist/src/perp/tx-builders.js +23 -0
- package/dist/src/perp/user/index.d.ts +8 -0
- package/dist/src/perp/user/index.js +8 -0
- package/dist/src/{user → perp/user}/order.d.ts +7 -7
- package/dist/src/{user → perp/user}/order.js +3 -3
- package/dist/src/{user → perp/user}/staking.d.ts +4 -4
- package/dist/src/{user → perp/user}/staking.js +2 -2
- package/dist/src/{user → perp/user}/trading.d.ts +13 -13
- package/dist/src/{user → perp/user}/trading.js +2 -2
- package/dist/src/{user → perp/user}/wlp.d.ts +7 -7
- package/dist/src/{user → perp/user}/wlp.js +3 -3
- package/dist/src/prediction/account.js +40 -76
- package/dist/src/prediction/bcs.d.ts +15 -9
- package/dist/src/prediction/bcs.js +17 -81
- package/dist/src/prediction/client.d.ts +8 -38
- package/dist/src/prediction/client.js +11 -67
- package/dist/src/prediction/config.d.ts +16 -2
- package/dist/src/prediction/config.js +10 -4
- package/dist/src/prediction/gift.js +2 -10
- package/dist/src/prediction/index.d.ts +11 -11
- package/dist/src/prediction/index.js +10 -10
- package/dist/src/prediction/prediction.d.ts +45 -0
- package/dist/src/prediction/prediction.js +71 -0
- package/dist/src/prediction/tx-builders.d.ts +4 -4
- package/dist/src/prediction/tx-builders.js +2 -2
- package/dist/src/prediction/types.d.ts +2 -0
- package/dist/src/prediction/user/index.d.ts +2 -2
- package/dist/src/prediction/user/index.js +1 -1
- package/dist/src/prediction/user/position.d.ts +2 -2
- package/dist/src/prediction/user/position.js +1 -1
- package/dist/src/prediction/utils/bcs.d.ts +5 -0
- package/dist/src/prediction/utils/bcs.js +5 -0
- package/dist/src/prediction/utils/index.d.ts +7 -0
- package/dist/src/prediction/utils/index.js +7 -0
- package/dist/src/sdk.d.ts +10 -6
- package/dist/src/sdk.js +9 -5
- package/dist/src/unified-client.d.ts +140 -145
- package/dist/src/unified-client.js +98 -40
- package/dist/src/utils/config.d.ts +1 -1
- package/package.json +22 -5
- package/dist/src/config.d.ts +0 -292
- package/dist/src/fetch.d.ts +0 -254
- package/dist/src/fetch.js +0 -564
- package/dist/src/prediction/generated/bucket_v2_framework/account.d.ts +0 -100
- package/dist/src/prediction/generated/bucket_v2_framework/account.js +0 -129
- package/dist/src/prediction/generated/bucket_v2_framework/deps/std/type_name.d.ts +0 -6
- package/dist/src/prediction/generated/bucket_v2_framework/deps/std/type_name.js +0 -19
- package/dist/src/prediction/generated/bucket_v2_framework/deps/sui/balance.d.ts +0 -10
- package/dist/src/prediction/generated/bucket_v2_framework/deps/sui/vec_map.d.ts +0 -36
- package/dist/src/prediction/generated/bucket_v2_framework/deps/sui/vec_map.js +0 -27
- package/dist/src/prediction/generated/bucket_v2_framework/double.d.ts +0 -382
- package/dist/src/prediction/generated/bucket_v2_framework/double.js +0 -466
- package/dist/src/prediction/generated/bucket_v2_framework/float.d.ts +0 -362
- package/dist/src/prediction/generated/bucket_v2_framework/float.js +0 -440
- package/dist/src/prediction/generated/bucket_v2_framework/liability.d.ts +0 -193
- package/dist/src/prediction/generated/bucket_v2_framework/liability.js +0 -205
- package/dist/src/prediction/generated/bucket_v2_framework/linked_table.d.ts +0 -384
- package/dist/src/prediction/generated/bucket_v2_framework/linked_table.js +0 -382
- package/dist/src/prediction/generated/bucket_v2_framework/sheet.d.ts +0 -344
- package/dist/src/prediction/generated/bucket_v2_framework/sheet.js +0 -338
- package/dist/src/prediction/generated/utils/index.d.ts +0 -30
- package/dist/src/prediction/generated/utils/index.js +0 -160
- package/dist/src/prediction/generated/waterx_account/account.d.ts +0 -1589
- package/dist/src/prediction/generated/waterx_account/account.js +0 -1758
- package/dist/src/prediction/generated/waterx_account/deps/bucket_v2_framework/liability.d.ts +0 -7
- package/dist/src/prediction/generated/waterx_account/deps/bucket_v2_framework/liability.js +0 -13
- package/dist/src/prediction/generated/waterx_account/deps/bucket_v2_framework/sheet.d.ts +0 -7
- package/dist/src/prediction/generated/waterx_account/deps/bucket_v2_framework/sheet.js +0 -16
- package/dist/src/prediction/generated/waterx_account/deps/std/type_name.d.ts +0 -6
- package/dist/src/prediction/generated/waterx_account/deps/std/type_name.js +0 -19
- package/dist/src/prediction/generated/waterx_account/deps/sui/balance.d.ts +0 -10
- package/dist/src/prediction/generated/waterx_account/deps/sui/balance.js +0 -14
- package/dist/src/prediction/generated/waterx_account/deps/sui/object_table.d.ts +0 -12
- package/dist/src/prediction/generated/waterx_account/deps/sui/object_table.js +0 -19
- package/dist/src/prediction/generated/waterx_account/deps/sui/vec_map.d.ts +0 -36
- package/dist/src/prediction/generated/waterx_account/deps/sui/vec_map.js +0 -27
- package/dist/src/prediction/generated/waterx_account/deps/sui/vec_set.d.ts +0 -16
- package/dist/src/prediction/generated/waterx_account/deps/sui/vec_set.js +0 -19
- package/dist/src/prediction/generated/waterx_account/direct_rule.d.ts +0 -75
- package/dist/src/prediction/generated/waterx_account/direct_rule.js +0 -78
- package/dist/src/prediction/generated/waterx_account/events.d.ts +0 -33
- package/dist/src/prediction/generated/waterx_account/events.js +0 -137
- package/dist/src/prediction/generated/waterx_account/version.js +0 -8
- package/dist/src/prediction/generated/waterx_prediction/bet_sharing.d.ts +0 -60
- package/dist/src/prediction/generated/waterx_prediction/bet_sharing.js +0 -83
- package/dist/src/prediction/generated/waterx_prediction/deps/sui/balance.js +0 -14
- package/dist/src/prediction/generated/waterx_prediction/deps/sui/table.d.ts +0 -24
- package/dist/src/prediction/generated/waterx_prediction/deps/sui/table.js +0 -31
- package/dist/src/prediction/generated/waterx_prediction/deps/sui/vec_set.d.ts +0 -16
- package/dist/src/prediction/generated/waterx_prediction/deps/sui/vec_set.js +0 -19
- package/dist/src/prediction/generated/waterx_prediction/events.d.ts +0 -22
- package/dist/src/prediction/generated/waterx_prediction/version.d.ts +0 -10
- package/dist/src/tx-builders.d.ts +0 -296
- package/dist/src/tx-builders.js +0 -461
- package/dist/src/user/index.d.ts +0 -8
- package/dist/src/user/index.js +0 -8
- package/dist/src/utils/pyth.d.ts +0 -124
- package/dist/src/utils/pyth.js +0 -392
- /package/dist/src/{utils → account}/account-request.js +0 -0
- /package/dist/src/{core → account}/waterx-account.d.ts +0 -0
- /package/dist/src/{core → account}/waterx-account.js +0 -0
- /package/dist/src/{prediction/generated → generated}/waterx_prediction/account_data.js +0 -0
- /package/dist/src/{prediction/generated → generated}/waterx_prediction/admin.js +0 -0
- /package/dist/src/{prediction/generated → generated}/waterx_prediction/deps/bucket_v2_framework/linked_table.d.ts +0 -0
- /package/dist/src/{prediction/generated → generated}/waterx_prediction/deps/bucket_v2_framework/linked_table.js +0 -0
- /package/dist/src/{prediction/generated/bucket_v2_framework → generated/waterx_prediction}/deps/sui/balance.js +0 -0
- /package/dist/src/{prediction/generated/waterx_account → generated/waterx_prediction}/deps/sui/table.js +0 -0
- /package/dist/src/{prediction/generated/bucket_v2_framework → generated/waterx_prediction}/deps/sui/vec_set.d.ts +0 -0
- /package/dist/src/{prediction/generated/bucket_v2_framework → generated/waterx_prediction}/deps/sui/vec_set.js +0 -0
- /package/dist/src/{prediction/generated → generated}/waterx_prediction/global_config.js +0 -0
- /package/dist/src/{prediction/generated → generated}/waterx_prediction/order.js +0 -0
- /package/dist/src/{prediction/generated → generated}/waterx_prediction/outcome.d.ts +0 -0
- /package/dist/src/{prediction/generated → generated}/waterx_prediction/outcome.js +0 -0
- /package/dist/src/{prediction/generated → generated}/waterx_prediction/position.js +0 -0
- /package/dist/src/{prediction/generated/waterx_account → generated/waterx_prediction}/version.d.ts +0 -0
- /package/dist/src/{prediction/generated → generated}/waterx_prediction/version.js +0 -0
- /package/dist/src/{prediction/generated → generated}/waterx_prediction/view.js +0 -0
|
@@ -0,0 +1,288 @@
|
|
|
1
|
+
/**************************************************************
|
|
2
|
+
* THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
|
|
3
|
+
**************************************************************/
|
|
4
|
+
import { MoveStruct } from '../utils/index.ts';
|
|
5
|
+
export declare const KeeperAdded: MoveStruct<{
|
|
6
|
+
global_config_id: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
7
|
+
keeper: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
8
|
+
}, "@waterx/prediction::events::KeeperAdded">;
|
|
9
|
+
export declare const KeeperRemoved: MoveStruct<{
|
|
10
|
+
global_config_id: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
11
|
+
keeper: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
12
|
+
}, "@waterx/prediction::events::KeeperRemoved">;
|
|
13
|
+
export declare const MarketCreated: MoveStruct<{
|
|
14
|
+
market_registry_id: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
15
|
+
market_key: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
16
|
+
market_id: import("@mysten/sui/bcs").BcsType<number[], Iterable<number> & {
|
|
17
|
+
length: number;
|
|
18
|
+
}, string>;
|
|
19
|
+
by_admin: import("@mysten/sui/bcs").BcsType<boolean, boolean, "bool">;
|
|
20
|
+
event_ts: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
21
|
+
}, "@waterx/prediction::events::MarketCreated">;
|
|
22
|
+
export declare const OrderPlaced: MoveStruct<{
|
|
23
|
+
market_registry_id: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
24
|
+
order_id: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
25
|
+
/** Funding/refund account for the pending order. */
|
|
26
|
+
account_id: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
27
|
+
/** Account that receives the position after fill. */
|
|
28
|
+
receiver_account_id: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
29
|
+
market_key: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
30
|
+
market_id: import("@mysten/sui/bcs").BcsType<number[], Iterable<number> & {
|
|
31
|
+
length: number;
|
|
32
|
+
}, string>;
|
|
33
|
+
selection: import("../utils/index.ts").MoveEnum<{
|
|
34
|
+
No: null;
|
|
35
|
+
Yes: null;
|
|
36
|
+
}, "@waterx/prediction::position::Selection">;
|
|
37
|
+
max_spend: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
38
|
+
min_shares: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
39
|
+
price_cap: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
40
|
+
expiry_ts: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
41
|
+
self_cancel_after_ts: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
42
|
+
created_ts: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
43
|
+
/** True if this order was placed by an admin (Track A campaign etc.). */
|
|
44
|
+
by_admin: import("@mysten/sui/bcs").BcsType<boolean, boolean, "bool">;
|
|
45
|
+
event_ts: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
46
|
+
}, "@waterx/prediction::events::OrderPlaced">;
|
|
47
|
+
export declare const OrderFilled: MoveStruct<{
|
|
48
|
+
market_registry_id: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
49
|
+
order_id: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
50
|
+
account_id: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
51
|
+
position_id: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
52
|
+
market_key: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
53
|
+
market_id: import("@mysten/sui/bcs").BcsType<number[], Iterable<number> & {
|
|
54
|
+
length: number;
|
|
55
|
+
}, string>;
|
|
56
|
+
selection: import("../utils/index.ts").MoveEnum<{
|
|
57
|
+
No: null;
|
|
58
|
+
Yes: null;
|
|
59
|
+
}, "@waterx/prediction::position::Selection">;
|
|
60
|
+
filled_shares: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
61
|
+
filled_cost: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
62
|
+
event_ts: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
63
|
+
}, "@waterx/prediction::events::OrderFilled">;
|
|
64
|
+
export declare const OrderCancelled: MoveStruct<{
|
|
65
|
+
market_registry_id: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
66
|
+
order_id: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
67
|
+
account_id: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
68
|
+
market_key: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
69
|
+
market_id: import("@mysten/sui/bcs").BcsType<number[], Iterable<number> & {
|
|
70
|
+
length: number;
|
|
71
|
+
}, string>;
|
|
72
|
+
selection: import("../utils/index.ts").MoveEnum<{
|
|
73
|
+
No: null;
|
|
74
|
+
Yes: null;
|
|
75
|
+
}, "@waterx/prediction::position::Selection">;
|
|
76
|
+
refund_amount: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
77
|
+
by_self: import("@mysten/sui/bcs").BcsType<boolean, boolean, "bool">;
|
|
78
|
+
event_ts: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
79
|
+
}, "@waterx/prediction::events::OrderCancelled">;
|
|
80
|
+
export declare const MarketResolved: MoveStruct<{
|
|
81
|
+
market_registry_id: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
82
|
+
market_key: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
83
|
+
market_id: import("@mysten/sui/bcs").BcsType<number[], Iterable<number> & {
|
|
84
|
+
length: number;
|
|
85
|
+
}, string>;
|
|
86
|
+
outcome: import("../utils/index.ts").MoveEnum<{
|
|
87
|
+
No: null;
|
|
88
|
+
Yes: null;
|
|
89
|
+
Invalid: null;
|
|
90
|
+
}, "@waterx/prediction::outcome::Outcome">;
|
|
91
|
+
unclaimed_count: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
92
|
+
event_ts: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
93
|
+
}, "@waterx/prediction::events::MarketResolved">;
|
|
94
|
+
export declare const MarketResolvedByOracle: MoveStruct<{
|
|
95
|
+
market_registry_id: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
96
|
+
market_key: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
97
|
+
market_id: import("@mysten/sui/bcs").BcsType<number[], Iterable<number> & {
|
|
98
|
+
length: number;
|
|
99
|
+
}, string>;
|
|
100
|
+
outcome: import("../utils/index.ts").MoveEnum<{
|
|
101
|
+
No: null;
|
|
102
|
+
Yes: null;
|
|
103
|
+
Invalid: null;
|
|
104
|
+
}, "@waterx/prediction::outcome::Outcome">;
|
|
105
|
+
settle_ticker: import("@mysten/sui/bcs").BcsType<string, string, "string">;
|
|
106
|
+
settle_timestamp_ms: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
107
|
+
price: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u128">;
|
|
108
|
+
threshold: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u128">;
|
|
109
|
+
comparison: import("@mysten/sui/bcs").BcsType<number, number, "u8">;
|
|
110
|
+
unclaimed_count: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
111
|
+
event_ts: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
112
|
+
}, "@waterx/prediction::events::MarketResolvedByOracle">;
|
|
113
|
+
export declare const PriceSettlementSet: MoveStruct<{
|
|
114
|
+
market_registry_id: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
115
|
+
market_id: import("@mysten/sui/bcs").BcsType<number[], Iterable<number> & {
|
|
116
|
+
length: number;
|
|
117
|
+
}, string>;
|
|
118
|
+
settle_ticker: import("@mysten/sui/bcs").BcsType<string, string, "string">;
|
|
119
|
+
settle_timestamp_ms: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
120
|
+
threshold: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u128">;
|
|
121
|
+
comparison: import("@mysten/sui/bcs").BcsType<number, number, "u8">;
|
|
122
|
+
event_ts: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
123
|
+
}, "@waterx/prediction::events::PriceSettlementSet">;
|
|
124
|
+
export declare const PositionClaimed: MoveStruct<{
|
|
125
|
+
market_registry_id: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
126
|
+
account_id: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
127
|
+
position_id: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
128
|
+
market_key: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
129
|
+
market_id: import("@mysten/sui/bcs").BcsType<number[], Iterable<number> & {
|
|
130
|
+
length: number;
|
|
131
|
+
}, string>;
|
|
132
|
+
selection: import("../utils/index.ts").MoveEnum<{
|
|
133
|
+
No: null;
|
|
134
|
+
Yes: null;
|
|
135
|
+
}, "@waterx/prediction::position::Selection">;
|
|
136
|
+
outcome: import("../utils/index.ts").MoveEnum<{
|
|
137
|
+
No: null;
|
|
138
|
+
Yes: null;
|
|
139
|
+
Invalid: null;
|
|
140
|
+
}, "@waterx/prediction::outcome::Outcome">;
|
|
141
|
+
filled_shares: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
142
|
+
filled_cost: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
143
|
+
payout: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
144
|
+
event_ts: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
145
|
+
}, "@waterx/prediction::events::PositionClaimed">;
|
|
146
|
+
export declare const PositionTransferred: MoveStruct<{
|
|
147
|
+
market_registry_id: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
148
|
+
position_id: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
149
|
+
from_account_id: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
150
|
+
to_account_id: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
151
|
+
market_key: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
152
|
+
market_id: import("@mysten/sui/bcs").BcsType<number[], Iterable<number> & {
|
|
153
|
+
length: number;
|
|
154
|
+
}, string>;
|
|
155
|
+
selection: import("../utils/index.ts").MoveEnum<{
|
|
156
|
+
No: null;
|
|
157
|
+
Yes: null;
|
|
158
|
+
}, "@waterx/prediction::position::Selection">;
|
|
159
|
+
filled_shares: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
160
|
+
filled_cost: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
161
|
+
event_ts: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
162
|
+
}, "@waterx/prediction::events::PositionTransferred">;
|
|
163
|
+
export declare const PositionSplit: MoveStruct<{
|
|
164
|
+
market_registry_id: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
165
|
+
source_position_id: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
166
|
+
split_position_id: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
167
|
+
from_account_id: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
168
|
+
to_account_id: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
169
|
+
market_key: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
170
|
+
market_id: import("@mysten/sui/bcs").BcsType<number[], Iterable<number> & {
|
|
171
|
+
length: number;
|
|
172
|
+
}, string>;
|
|
173
|
+
selection: import("../utils/index.ts").MoveEnum<{
|
|
174
|
+
No: null;
|
|
175
|
+
Yes: null;
|
|
176
|
+
}, "@waterx/prediction::position::Selection">;
|
|
177
|
+
split_shares: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
178
|
+
split_cost: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
179
|
+
remaining_shares: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
180
|
+
remaining_cost: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
181
|
+
event_ts: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
182
|
+
}, "@waterx/prediction::events::PositionSplit">;
|
|
183
|
+
export declare const CloseRequested: MoveStruct<{
|
|
184
|
+
market_registry_id: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
185
|
+
order_id: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
186
|
+
account_id: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
187
|
+
position_id: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
188
|
+
market_key: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
189
|
+
market_id: import("@mysten/sui/bcs").BcsType<number[], Iterable<number> & {
|
|
190
|
+
length: number;
|
|
191
|
+
}, string>;
|
|
192
|
+
selection: import("../utils/index.ts").MoveEnum<{
|
|
193
|
+
No: null;
|
|
194
|
+
Yes: null;
|
|
195
|
+
}, "@waterx/prediction::position::Selection">;
|
|
196
|
+
min_proceeds: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
197
|
+
expiry_ts: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
198
|
+
self_cancel_after_ts: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
199
|
+
created_ts: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
200
|
+
event_ts: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
201
|
+
}, "@waterx/prediction::events::CloseRequested">;
|
|
202
|
+
export declare const PartialCloseRequested: MoveStruct<{
|
|
203
|
+
market_registry_id: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
204
|
+
source_position_id: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
205
|
+
new_position_id: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
206
|
+
close_order_id: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
207
|
+
account_id: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
208
|
+
market_key: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
209
|
+
market_id: import("@mysten/sui/bcs").BcsType<number[], Iterable<number> & {
|
|
210
|
+
length: number;
|
|
211
|
+
}, string>;
|
|
212
|
+
selection: import("../utils/index.ts").MoveEnum<{
|
|
213
|
+
No: null;
|
|
214
|
+
Yes: null;
|
|
215
|
+
}, "@waterx/prediction::position::Selection">;
|
|
216
|
+
close_shares: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
217
|
+
close_cost: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
218
|
+
remaining_shares: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
219
|
+
remaining_cost: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
220
|
+
min_proceeds: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
221
|
+
expiry_ts: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
222
|
+
event_ts: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
223
|
+
}, "@waterx/prediction::events::PartialCloseRequested">;
|
|
224
|
+
export declare const CloseConfirmed: MoveStruct<{
|
|
225
|
+
market_registry_id: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
226
|
+
order_id: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
227
|
+
account_id: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
228
|
+
position_id: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
229
|
+
market_key: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
230
|
+
market_id: import("@mysten/sui/bcs").BcsType<number[], Iterable<number> & {
|
|
231
|
+
length: number;
|
|
232
|
+
}, string>;
|
|
233
|
+
selection: import("../utils/index.ts").MoveEnum<{
|
|
234
|
+
No: null;
|
|
235
|
+
Yes: null;
|
|
236
|
+
}, "@waterx/prediction::position::Selection">;
|
|
237
|
+
filled_shares: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
238
|
+
filled_cost: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
239
|
+
proceeds: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
240
|
+
event_ts: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
241
|
+
}, "@waterx/prediction::events::CloseConfirmed">;
|
|
242
|
+
export declare const CloseCancelled: MoveStruct<{
|
|
243
|
+
market_registry_id: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
244
|
+
order_id: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
245
|
+
account_id: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
246
|
+
position_id: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
247
|
+
market_key: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
248
|
+
market_id: import("@mysten/sui/bcs").BcsType<number[], Iterable<number> & {
|
|
249
|
+
length: number;
|
|
250
|
+
}, string>;
|
|
251
|
+
selection: import("../utils/index.ts").MoveEnum<{
|
|
252
|
+
No: null;
|
|
253
|
+
Yes: null;
|
|
254
|
+
}, "@waterx/prediction::position::Selection">;
|
|
255
|
+
/** True if the user initiated the cancel via self_cancel_close. */
|
|
256
|
+
by_self: import("@mysten/sui/bcs").BcsType<boolean, boolean, "bool">;
|
|
257
|
+
event_ts: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
258
|
+
}, "@waterx/prediction::events::CloseCancelled">;
|
|
259
|
+
export declare const MarketPaused: MoveStruct<{
|
|
260
|
+
market_registry_id: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
261
|
+
market_key: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
262
|
+
market_id: import("@mysten/sui/bcs").BcsType<number[], Iterable<number> & {
|
|
263
|
+
length: number;
|
|
264
|
+
}, string>;
|
|
265
|
+
}, "@waterx/prediction::events::MarketPaused">;
|
|
266
|
+
export declare const MarketUnpaused: MoveStruct<{
|
|
267
|
+
market_registry_id: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
268
|
+
market_key: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
269
|
+
market_id: import("@mysten/sui/bcs").BcsType<number[], Iterable<number> & {
|
|
270
|
+
length: number;
|
|
271
|
+
}, string>;
|
|
272
|
+
}, "@waterx/prediction::events::MarketUnpaused">;
|
|
273
|
+
export declare const MarketRegistryWithdrawn: MoveStruct<{
|
|
274
|
+
market_registry_id: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
275
|
+
amount: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
276
|
+
recipient: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
277
|
+
new_balance: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
278
|
+
}, "@waterx/prediction::events::MarketRegistryWithdrawn">;
|
|
279
|
+
export declare const MinReserveUpdated: MoveStruct<{
|
|
280
|
+
market_registry_id: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
281
|
+
old_reserve: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
282
|
+
new_reserve: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
283
|
+
}, "@waterx/prediction::events::MinReserveUpdated">;
|
|
284
|
+
export declare const OrderCancelCooldownUpdated: MoveStruct<{
|
|
285
|
+
market_registry_id: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
286
|
+
old_cooldown_ms: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
287
|
+
new_cooldown_ms: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
288
|
+
}, "@waterx/prediction::events::OrderCancelCooldownUpdated">;
|
|
@@ -72,6 +72,28 @@ export const MarketResolved = new MoveStruct({ name: `${$moduleName}::MarketReso
|
|
|
72
72
|
unclaimed_count: bcs.u64(),
|
|
73
73
|
event_ts: bcs.u64()
|
|
74
74
|
} });
|
|
75
|
+
export const MarketResolvedByOracle = new MoveStruct({ name: `${$moduleName}::MarketResolvedByOracle`, fields: {
|
|
76
|
+
market_registry_id: bcs.Address,
|
|
77
|
+
market_key: bcs.u64(),
|
|
78
|
+
market_id: bcs.vector(bcs.u8()),
|
|
79
|
+
outcome: outcome.Outcome,
|
|
80
|
+
settle_ticker: bcs.string(),
|
|
81
|
+
settle_timestamp_ms: bcs.u64(),
|
|
82
|
+
price: bcs.u128(),
|
|
83
|
+
threshold: bcs.u128(),
|
|
84
|
+
comparison: bcs.u8(),
|
|
85
|
+
unclaimed_count: bcs.u64(),
|
|
86
|
+
event_ts: bcs.u64()
|
|
87
|
+
} });
|
|
88
|
+
export const PriceSettlementSet = new MoveStruct({ name: `${$moduleName}::PriceSettlementSet`, fields: {
|
|
89
|
+
market_registry_id: bcs.Address,
|
|
90
|
+
market_id: bcs.vector(bcs.u8()),
|
|
91
|
+
settle_ticker: bcs.string(),
|
|
92
|
+
settle_timestamp_ms: bcs.u64(),
|
|
93
|
+
threshold: bcs.u128(),
|
|
94
|
+
comparison: bcs.u8(),
|
|
95
|
+
event_ts: bcs.u64()
|
|
96
|
+
} });
|
|
75
97
|
export const PositionClaimed = new MoveStruct({ name: `${$moduleName}::PositionClaimed`, fields: {
|
|
76
98
|
market_registry_id: bcs.Address,
|
|
77
99
|
account_id: bcs.Address,
|
|
@@ -126,6 +148,23 @@ export const CloseRequested = new MoveStruct({ name: `${$moduleName}::CloseReque
|
|
|
126
148
|
created_ts: bcs.u64(),
|
|
127
149
|
event_ts: bcs.u64()
|
|
128
150
|
} });
|
|
151
|
+
export const PartialCloseRequested = new MoveStruct({ name: `${$moduleName}::PartialCloseRequested`, fields: {
|
|
152
|
+
market_registry_id: bcs.Address,
|
|
153
|
+
source_position_id: bcs.u64(),
|
|
154
|
+
new_position_id: bcs.u64(),
|
|
155
|
+
close_order_id: bcs.u64(),
|
|
156
|
+
account_id: bcs.Address,
|
|
157
|
+
market_key: bcs.u64(),
|
|
158
|
+
market_id: bcs.vector(bcs.u8()),
|
|
159
|
+
selection: position.Selection,
|
|
160
|
+
close_shares: bcs.u64(),
|
|
161
|
+
close_cost: bcs.u64(),
|
|
162
|
+
remaining_shares: bcs.u64(),
|
|
163
|
+
remaining_cost: bcs.u64(),
|
|
164
|
+
min_proceeds: bcs.u64(),
|
|
165
|
+
expiry_ts: bcs.u64(),
|
|
166
|
+
event_ts: bcs.u64()
|
|
167
|
+
} });
|
|
129
168
|
export const CloseConfirmed = new MoveStruct({ name: `${$moduleName}::CloseConfirmed`, fields: {
|
|
130
169
|
market_registry_id: bcs.Address,
|
|
131
170
|
order_id: bcs.u64(),
|
|
@@ -3,7 +3,12 @@
|
|
|
3
3
|
**************************************************************/
|
|
4
4
|
import { MoveStruct, type RawTransactionArgument } from '../utils/index.ts';
|
|
5
5
|
import { type Transaction } from '@mysten/sui/transactions';
|
|
6
|
-
export declare const GlobalConfig: MoveStruct<
|
|
6
|
+
export declare const GlobalConfig: MoveStruct<{
|
|
7
|
+
id: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
8
|
+
/** Allowed package versions for keeper-gated operations. */
|
|
9
|
+
allowed_versions: MoveStruct<any, any>;
|
|
10
|
+
keepers: MoveStruct<any, any>;
|
|
11
|
+
}, "@waterx/prediction::global_config::GlobalConfig">;
|
|
7
12
|
export interface AssertVersionArguments {
|
|
8
13
|
globalConfig: RawTransactionArgument<string>;
|
|
9
14
|
}
|
|
@@ -7,7 +7,40 @@ export declare const OrderKind: MoveEnum<{
|
|
|
7
7
|
Open: null;
|
|
8
8
|
Close: null;
|
|
9
9
|
}, "@waterx/prediction::order::OrderKind">;
|
|
10
|
-
export declare const Order: MoveStruct<
|
|
10
|
+
export declare const Order: MoveStruct<{
|
|
11
|
+
order_id: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
12
|
+
kind: MoveEnum<{
|
|
13
|
+
Open: null;
|
|
14
|
+
Close: null;
|
|
15
|
+
}, "@waterx/prediction::order::OrderKind">;
|
|
16
|
+
/**
|
|
17
|
+
* Account that funded the order and owns pending-order cancellation / refund
|
|
18
|
+
* rights.
|
|
19
|
+
*/
|
|
20
|
+
account_id: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
21
|
+
/** Account that receives the position after an open order is filled. */
|
|
22
|
+
receiver_account_id: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
23
|
+
market_id: import("@mysten/sui/bcs").BcsType<number[], Iterable<number> & {
|
|
24
|
+
length: number;
|
|
25
|
+
}, string>;
|
|
26
|
+
selection: MoveEnum<{
|
|
27
|
+
No: null;
|
|
28
|
+
Yes: null;
|
|
29
|
+
}, "@waterx/prediction::position::Selection">;
|
|
30
|
+
/** `Some(position_id)` only for close orders. */
|
|
31
|
+
position_id: import("@mysten/sui/bcs").BcsType<string | null, string | number | bigint | null | undefined, "Option<u64>">;
|
|
32
|
+
/** Open-order spend escrowed in `MarketRegistry.balance`. */
|
|
33
|
+
max_spend: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
34
|
+
min_shares: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
35
|
+
price_cap: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
36
|
+
/** Close-order slippage floor. */
|
|
37
|
+
min_proceeds: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
38
|
+
expiry_ts: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
39
|
+
/** Earliest timestamp at which the account owner may self-cancel. */
|
|
40
|
+
self_cancel_after_ts: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
41
|
+
created_ts: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
42
|
+
by_admin: import("@mysten/sui/bcs").BcsType<boolean, boolean, "bool">;
|
|
43
|
+
}, "@waterx/prediction::order::Order">;
|
|
11
44
|
export interface OrderIdArguments {
|
|
12
45
|
order: TransactionArgument;
|
|
13
46
|
}
|
|
@@ -11,7 +11,22 @@ export declare const Selection: MoveEnum<{
|
|
|
11
11
|
No: null;
|
|
12
12
|
Yes: null;
|
|
13
13
|
}, "@waterx/prediction::position::Selection">;
|
|
14
|
-
export declare const Position: MoveStruct<
|
|
14
|
+
export declare const Position: MoveStruct<{
|
|
15
|
+
/** Canonical waterx_account that owns this broker position. */
|
|
16
|
+
account_id: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
17
|
+
market_id: import("@mysten/sui/bcs").BcsType<number[], Iterable<number> & {
|
|
18
|
+
length: number;
|
|
19
|
+
}, string>;
|
|
20
|
+
selection: MoveEnum<{
|
|
21
|
+
No: null;
|
|
22
|
+
Yes: null;
|
|
23
|
+
}, "@waterx/prediction::position::Selection">;
|
|
24
|
+
filled_shares: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
25
|
+
filled_cost: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
26
|
+
opened_ts: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
27
|
+
/** Set only while a close order is waiting for keeper execution. */
|
|
28
|
+
close_order_id: import("@mysten/sui/bcs").BcsType<string | null, string | number | bigint | null | undefined, "Option<u64>">;
|
|
29
|
+
}, "@waterx/prediction::position::Position">;
|
|
15
30
|
export declare const Status: MoveEnum<{
|
|
16
31
|
Open: null;
|
|
17
32
|
PendingClose: null;
|
|
@@ -3,11 +3,76 @@
|
|
|
3
3
|
**************************************************************/
|
|
4
4
|
import { MoveStruct, type RawTransactionArgument } from '../utils/index.ts';
|
|
5
5
|
import { type Transaction } from '@mysten/sui/transactions';
|
|
6
|
-
export declare const RegistryView: MoveStruct<
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
export declare const RegistryView: MoveStruct<{
|
|
7
|
+
balance: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
8
|
+
min_reserve: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
9
|
+
order_cancel_cooldown_ms: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
10
|
+
next_order_id: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
11
|
+
next_position_id: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
12
|
+
order_count: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
13
|
+
position_count: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
14
|
+
unresolved_market_count: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
15
|
+
resolved_market_count: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
16
|
+
}, "@waterx/prediction::view::RegistryView">;
|
|
17
|
+
export declare const OrderView: MoveStruct<{
|
|
18
|
+
order_id: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
19
|
+
kind: import("../utils/index.ts").MoveEnum<{
|
|
20
|
+
Open: null;
|
|
21
|
+
Close: null;
|
|
22
|
+
}, "@waterx/prediction::order::OrderKind">;
|
|
23
|
+
account_id: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
24
|
+
receiver_account_id: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
25
|
+
market_id: import("@mysten/sui/bcs").BcsType<number[], Iterable<number> & {
|
|
26
|
+
length: number;
|
|
27
|
+
}, string>;
|
|
28
|
+
selection: import("../utils/index.ts").MoveEnum<{
|
|
29
|
+
No: null;
|
|
30
|
+
Yes: null;
|
|
31
|
+
}, "@waterx/prediction::position::Selection">;
|
|
32
|
+
position_id: import("@mysten/sui/bcs").BcsType<string | null, string | number | bigint | null | undefined, "Option<u64>">;
|
|
33
|
+
max_spend: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
34
|
+
min_shares: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
35
|
+
price_cap: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
36
|
+
min_proceeds: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
37
|
+
expiry_ts: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
38
|
+
self_cancel_after_ts: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
39
|
+
created_ts: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
40
|
+
by_admin: import("@mysten/sui/bcs").BcsType<boolean, boolean, "bool">;
|
|
41
|
+
}, "@waterx/prediction::view::OrderView">;
|
|
42
|
+
export declare const PositionView: MoveStruct<{
|
|
43
|
+
position_id: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
44
|
+
account_id: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
45
|
+
market_id: import("@mysten/sui/bcs").BcsType<number[], Iterable<number> & {
|
|
46
|
+
length: number;
|
|
47
|
+
}, string>;
|
|
48
|
+
selection: import("../utils/index.ts").MoveEnum<{
|
|
49
|
+
No: null;
|
|
50
|
+
Yes: null;
|
|
51
|
+
}, "@waterx/prediction::position::Selection">;
|
|
52
|
+
status: import("../utils/index.ts").MoveEnum<{
|
|
53
|
+
Open: null;
|
|
54
|
+
PendingClose: null;
|
|
55
|
+
}, "@waterx/prediction::position::Status">;
|
|
56
|
+
filled_shares: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
57
|
+
filled_cost: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
58
|
+
opened_ts: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
59
|
+
payout: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
60
|
+
close_order_id: import("@mysten/sui/bcs").BcsType<string | null, string | number | bigint | null | undefined, "Option<u64>">;
|
|
61
|
+
close_min_proceeds: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
62
|
+
close_expiry_ts: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
63
|
+
close_self_cancel_after_ts: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
64
|
+
}, "@waterx/prediction::view::PositionView">;
|
|
9
65
|
export declare const MarketView: MoveStruct<any, any>;
|
|
10
|
-
export declare const AccountDataView: MoveStruct<
|
|
66
|
+
export declare const AccountDataView: MoveStruct<{
|
|
67
|
+
account_id: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
68
|
+
has_data: import("@mysten/sui/bcs").BcsType<boolean, boolean, "bool">;
|
|
69
|
+
order_count: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
70
|
+
position_count: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
71
|
+
order_front: import("@mysten/sui/bcs").BcsType<string | null, string | number | bigint | null | undefined, "Option<u64>">;
|
|
72
|
+
order_back: import("@mysten/sui/bcs").BcsType<string | null, string | number | bigint | null | undefined, "Option<u64>">;
|
|
73
|
+
position_front: import("@mysten/sui/bcs").BcsType<string | null, string | number | bigint | null | undefined, "Option<u64>">;
|
|
74
|
+
position_back: import("@mysten/sui/bcs").BcsType<string | null, string | number | bigint | null | undefined, "Option<u64>">;
|
|
75
|
+
}, "@waterx/prediction::view::AccountDataView">;
|
|
11
76
|
export interface RegistryArguments {
|
|
12
77
|
marketRegistry: RawTransactionArgument<string>;
|
|
13
78
|
}
|