@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
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
/**************************************************************
|
|
2
|
+
* THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
|
|
3
|
+
**************************************************************/
|
|
4
|
+
import { MoveEnum, MoveStruct } from '../utils/index.ts';
|
|
5
|
+
import { type Transaction, type TransactionArgument } from '@mysten/sui/transactions';
|
|
6
|
+
export declare const OrderKind: MoveEnum<{
|
|
7
|
+
Open: null;
|
|
8
|
+
Close: null;
|
|
9
|
+
}, "@waterx/prediction::order::OrderKind">;
|
|
10
|
+
export declare const Order: MoveStruct<any, any>;
|
|
11
|
+
export interface OrderIdArguments {
|
|
12
|
+
order: TransactionArgument;
|
|
13
|
+
}
|
|
14
|
+
export interface OrderIdOptions {
|
|
15
|
+
package?: string;
|
|
16
|
+
arguments: OrderIdArguments | [
|
|
17
|
+
order: TransactionArgument
|
|
18
|
+
];
|
|
19
|
+
}
|
|
20
|
+
export declare function orderId(options: OrderIdOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
21
|
+
export interface KindArguments {
|
|
22
|
+
order: TransactionArgument;
|
|
23
|
+
}
|
|
24
|
+
export interface KindOptions {
|
|
25
|
+
package?: string;
|
|
26
|
+
arguments: KindArguments | [
|
|
27
|
+
order: TransactionArgument
|
|
28
|
+
];
|
|
29
|
+
}
|
|
30
|
+
export declare function kind(options: KindOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
31
|
+
export interface AccountIdArguments {
|
|
32
|
+
order: TransactionArgument;
|
|
33
|
+
}
|
|
34
|
+
export interface AccountIdOptions {
|
|
35
|
+
package?: string;
|
|
36
|
+
arguments: AccountIdArguments | [
|
|
37
|
+
order: TransactionArgument
|
|
38
|
+
];
|
|
39
|
+
}
|
|
40
|
+
export declare function accountId(options: AccountIdOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
41
|
+
export interface ReceiverAccountIdArguments {
|
|
42
|
+
order: TransactionArgument;
|
|
43
|
+
}
|
|
44
|
+
export interface ReceiverAccountIdOptions {
|
|
45
|
+
package?: string;
|
|
46
|
+
arguments: ReceiverAccountIdArguments | [
|
|
47
|
+
order: TransactionArgument
|
|
48
|
+
];
|
|
49
|
+
}
|
|
50
|
+
export declare function receiverAccountId(options: ReceiverAccountIdOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
51
|
+
export interface MarketIdArguments {
|
|
52
|
+
order: TransactionArgument;
|
|
53
|
+
}
|
|
54
|
+
export interface MarketIdOptions {
|
|
55
|
+
package?: string;
|
|
56
|
+
arguments: MarketIdArguments | [
|
|
57
|
+
order: TransactionArgument
|
|
58
|
+
];
|
|
59
|
+
}
|
|
60
|
+
export declare function marketId(options: MarketIdOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
61
|
+
export interface SelectionArguments {
|
|
62
|
+
order: TransactionArgument;
|
|
63
|
+
}
|
|
64
|
+
export interface SelectionOptions {
|
|
65
|
+
package?: string;
|
|
66
|
+
arguments: SelectionArguments | [
|
|
67
|
+
order: TransactionArgument
|
|
68
|
+
];
|
|
69
|
+
}
|
|
70
|
+
export declare function selection(options: SelectionOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
71
|
+
export interface PositionIdArguments {
|
|
72
|
+
order: TransactionArgument;
|
|
73
|
+
}
|
|
74
|
+
export interface PositionIdOptions {
|
|
75
|
+
package?: string;
|
|
76
|
+
arguments: PositionIdArguments | [
|
|
77
|
+
order: TransactionArgument
|
|
78
|
+
];
|
|
79
|
+
}
|
|
80
|
+
export declare function positionId(options: PositionIdOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
81
|
+
export interface MaxSpendArguments {
|
|
82
|
+
order: TransactionArgument;
|
|
83
|
+
}
|
|
84
|
+
export interface MaxSpendOptions {
|
|
85
|
+
package?: string;
|
|
86
|
+
arguments: MaxSpendArguments | [
|
|
87
|
+
order: TransactionArgument
|
|
88
|
+
];
|
|
89
|
+
}
|
|
90
|
+
export declare function maxSpend(options: MaxSpendOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
91
|
+
export interface MinSharesArguments {
|
|
92
|
+
order: TransactionArgument;
|
|
93
|
+
}
|
|
94
|
+
export interface MinSharesOptions {
|
|
95
|
+
package?: string;
|
|
96
|
+
arguments: MinSharesArguments | [
|
|
97
|
+
order: TransactionArgument
|
|
98
|
+
];
|
|
99
|
+
}
|
|
100
|
+
export declare function minShares(options: MinSharesOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
101
|
+
export interface PriceCapArguments {
|
|
102
|
+
order: TransactionArgument;
|
|
103
|
+
}
|
|
104
|
+
export interface PriceCapOptions {
|
|
105
|
+
package?: string;
|
|
106
|
+
arguments: PriceCapArguments | [
|
|
107
|
+
order: TransactionArgument
|
|
108
|
+
];
|
|
109
|
+
}
|
|
110
|
+
export declare function priceCap(options: PriceCapOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
111
|
+
export interface MinProceedsArguments {
|
|
112
|
+
order: TransactionArgument;
|
|
113
|
+
}
|
|
114
|
+
export interface MinProceedsOptions {
|
|
115
|
+
package?: string;
|
|
116
|
+
arguments: MinProceedsArguments | [
|
|
117
|
+
order: TransactionArgument
|
|
118
|
+
];
|
|
119
|
+
}
|
|
120
|
+
export declare function minProceeds(options: MinProceedsOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
121
|
+
export interface ExpiryTsArguments {
|
|
122
|
+
order: TransactionArgument;
|
|
123
|
+
}
|
|
124
|
+
export interface ExpiryTsOptions {
|
|
125
|
+
package?: string;
|
|
126
|
+
arguments: ExpiryTsArguments | [
|
|
127
|
+
order: TransactionArgument
|
|
128
|
+
];
|
|
129
|
+
}
|
|
130
|
+
export declare function expiryTs(options: ExpiryTsOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
131
|
+
export interface SelfCancelAfterTsArguments {
|
|
132
|
+
order: TransactionArgument;
|
|
133
|
+
}
|
|
134
|
+
export interface SelfCancelAfterTsOptions {
|
|
135
|
+
package?: string;
|
|
136
|
+
arguments: SelfCancelAfterTsArguments | [
|
|
137
|
+
order: TransactionArgument
|
|
138
|
+
];
|
|
139
|
+
}
|
|
140
|
+
export declare function selfCancelAfterTs(options: SelfCancelAfterTsOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
141
|
+
export interface CreatedTsArguments {
|
|
142
|
+
order: TransactionArgument;
|
|
143
|
+
}
|
|
144
|
+
export interface CreatedTsOptions {
|
|
145
|
+
package?: string;
|
|
146
|
+
arguments: CreatedTsArguments | [
|
|
147
|
+
order: TransactionArgument
|
|
148
|
+
];
|
|
149
|
+
}
|
|
150
|
+
export declare function createdTs(options: CreatedTsOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
151
|
+
export interface ByAdminArguments {
|
|
152
|
+
order: TransactionArgument;
|
|
153
|
+
}
|
|
154
|
+
export interface ByAdminOptions {
|
|
155
|
+
package?: string;
|
|
156
|
+
arguments: ByAdminArguments | [
|
|
157
|
+
order: TransactionArgument
|
|
158
|
+
];
|
|
159
|
+
}
|
|
160
|
+
export declare function byAdmin(options: ByAdminOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
161
|
+
export interface IsOpenArguments {
|
|
162
|
+
order: TransactionArgument;
|
|
163
|
+
}
|
|
164
|
+
export interface IsOpenOptions {
|
|
165
|
+
package?: string;
|
|
166
|
+
arguments: IsOpenArguments | [
|
|
167
|
+
order: TransactionArgument
|
|
168
|
+
];
|
|
169
|
+
}
|
|
170
|
+
export declare function isOpen(options: IsOpenOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
171
|
+
export interface IsCloseArguments {
|
|
172
|
+
order: TransactionArgument;
|
|
173
|
+
}
|
|
174
|
+
export interface IsCloseOptions {
|
|
175
|
+
package?: string;
|
|
176
|
+
arguments: IsCloseArguments | [
|
|
177
|
+
order: TransactionArgument
|
|
178
|
+
];
|
|
179
|
+
}
|
|
180
|
+
export declare function isClose(options: IsCloseOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
181
|
+
export interface KindIsOpenArguments {
|
|
182
|
+
kind: TransactionArgument;
|
|
183
|
+
}
|
|
184
|
+
export interface KindIsOpenOptions {
|
|
185
|
+
package?: string;
|
|
186
|
+
arguments: KindIsOpenArguments | [
|
|
187
|
+
kind: TransactionArgument
|
|
188
|
+
];
|
|
189
|
+
}
|
|
190
|
+
export declare function kindIsOpen(options: KindIsOpenOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
191
|
+
export interface KindIsCloseArguments {
|
|
192
|
+
kind: TransactionArgument;
|
|
193
|
+
}
|
|
194
|
+
export interface KindIsCloseOptions {
|
|
195
|
+
package?: string;
|
|
196
|
+
arguments: KindIsCloseArguments | [
|
|
197
|
+
kind: TransactionArgument
|
|
198
|
+
];
|
|
199
|
+
}
|
|
200
|
+
export declare function kindIsClose(options: KindIsCloseOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
@@ -0,0 +1,284 @@
|
|
|
1
|
+
/**************************************************************
|
|
2
|
+
* THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
|
|
3
|
+
**************************************************************/
|
|
4
|
+
import { MoveEnum, MoveStruct, normalizeMoveArguments } from "../utils/index.js";
|
|
5
|
+
import { bcs } from '@mysten/sui/bcs';
|
|
6
|
+
import * as position from "./position.js";
|
|
7
|
+
const $moduleName = '@waterx/prediction::order';
|
|
8
|
+
export const OrderKind = new MoveEnum({ name: `${$moduleName}::OrderKind`, fields: {
|
|
9
|
+
Open: null,
|
|
10
|
+
Close: null
|
|
11
|
+
} });
|
|
12
|
+
export const Order = new MoveStruct({ name: `${$moduleName}::Order`, fields: {
|
|
13
|
+
order_id: bcs.u64(),
|
|
14
|
+
kind: OrderKind,
|
|
15
|
+
/**
|
|
16
|
+
* Account that funded the order and owns pending-order cancellation / refund
|
|
17
|
+
* rights.
|
|
18
|
+
*/
|
|
19
|
+
account_id: bcs.Address,
|
|
20
|
+
/** Account that receives the position after an open order is filled. */
|
|
21
|
+
receiver_account_id: bcs.Address,
|
|
22
|
+
market_id: bcs.vector(bcs.u8()),
|
|
23
|
+
selection: position.Selection,
|
|
24
|
+
/** `Some(position_id)` only for close orders. */
|
|
25
|
+
position_id: bcs.option(bcs.u64()),
|
|
26
|
+
/** Open-order spend escrowed in `MarketRegistry.balance`. */
|
|
27
|
+
max_spend: bcs.u64(),
|
|
28
|
+
min_shares: bcs.u64(),
|
|
29
|
+
price_cap: bcs.u64(),
|
|
30
|
+
/** Close-order slippage floor. */
|
|
31
|
+
min_proceeds: bcs.u64(),
|
|
32
|
+
expiry_ts: bcs.u64(),
|
|
33
|
+
/** Earliest timestamp at which the account owner may self-cancel. */
|
|
34
|
+
self_cancel_after_ts: bcs.u64(),
|
|
35
|
+
created_ts: bcs.u64(),
|
|
36
|
+
by_admin: bcs.bool()
|
|
37
|
+
} });
|
|
38
|
+
export function orderId(options) {
|
|
39
|
+
const packageAddress = options.package ?? '@waterx/prediction';
|
|
40
|
+
const argumentsTypes = [
|
|
41
|
+
null
|
|
42
|
+
];
|
|
43
|
+
const parameterNames = ["order"];
|
|
44
|
+
return (tx) => tx.moveCall({
|
|
45
|
+
package: packageAddress,
|
|
46
|
+
module: 'order',
|
|
47
|
+
function: 'order_id',
|
|
48
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
export function kind(options) {
|
|
52
|
+
const packageAddress = options.package ?? '@waterx/prediction';
|
|
53
|
+
const argumentsTypes = [
|
|
54
|
+
null
|
|
55
|
+
];
|
|
56
|
+
const parameterNames = ["order"];
|
|
57
|
+
return (tx) => tx.moveCall({
|
|
58
|
+
package: packageAddress,
|
|
59
|
+
module: 'order',
|
|
60
|
+
function: 'kind',
|
|
61
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
export function accountId(options) {
|
|
65
|
+
const packageAddress = options.package ?? '@waterx/prediction';
|
|
66
|
+
const argumentsTypes = [
|
|
67
|
+
null
|
|
68
|
+
];
|
|
69
|
+
const parameterNames = ["order"];
|
|
70
|
+
return (tx) => tx.moveCall({
|
|
71
|
+
package: packageAddress,
|
|
72
|
+
module: 'order',
|
|
73
|
+
function: 'account_id',
|
|
74
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
export function receiverAccountId(options) {
|
|
78
|
+
const packageAddress = options.package ?? '@waterx/prediction';
|
|
79
|
+
const argumentsTypes = [
|
|
80
|
+
null
|
|
81
|
+
];
|
|
82
|
+
const parameterNames = ["order"];
|
|
83
|
+
return (tx) => tx.moveCall({
|
|
84
|
+
package: packageAddress,
|
|
85
|
+
module: 'order',
|
|
86
|
+
function: 'receiver_account_id',
|
|
87
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
export function marketId(options) {
|
|
91
|
+
const packageAddress = options.package ?? '@waterx/prediction';
|
|
92
|
+
const argumentsTypes = [
|
|
93
|
+
null
|
|
94
|
+
];
|
|
95
|
+
const parameterNames = ["order"];
|
|
96
|
+
return (tx) => tx.moveCall({
|
|
97
|
+
package: packageAddress,
|
|
98
|
+
module: 'order',
|
|
99
|
+
function: 'market_id',
|
|
100
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
export function selection(options) {
|
|
104
|
+
const packageAddress = options.package ?? '@waterx/prediction';
|
|
105
|
+
const argumentsTypes = [
|
|
106
|
+
null
|
|
107
|
+
];
|
|
108
|
+
const parameterNames = ["order"];
|
|
109
|
+
return (tx) => tx.moveCall({
|
|
110
|
+
package: packageAddress,
|
|
111
|
+
module: 'order',
|
|
112
|
+
function: 'selection',
|
|
113
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
export function positionId(options) {
|
|
117
|
+
const packageAddress = options.package ?? '@waterx/prediction';
|
|
118
|
+
const argumentsTypes = [
|
|
119
|
+
null
|
|
120
|
+
];
|
|
121
|
+
const parameterNames = ["order"];
|
|
122
|
+
return (tx) => tx.moveCall({
|
|
123
|
+
package: packageAddress,
|
|
124
|
+
module: 'order',
|
|
125
|
+
function: 'position_id',
|
|
126
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
export function maxSpend(options) {
|
|
130
|
+
const packageAddress = options.package ?? '@waterx/prediction';
|
|
131
|
+
const argumentsTypes = [
|
|
132
|
+
null
|
|
133
|
+
];
|
|
134
|
+
const parameterNames = ["order"];
|
|
135
|
+
return (tx) => tx.moveCall({
|
|
136
|
+
package: packageAddress,
|
|
137
|
+
module: 'order',
|
|
138
|
+
function: 'max_spend',
|
|
139
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
140
|
+
});
|
|
141
|
+
}
|
|
142
|
+
export function minShares(options) {
|
|
143
|
+
const packageAddress = options.package ?? '@waterx/prediction';
|
|
144
|
+
const argumentsTypes = [
|
|
145
|
+
null
|
|
146
|
+
];
|
|
147
|
+
const parameterNames = ["order"];
|
|
148
|
+
return (tx) => tx.moveCall({
|
|
149
|
+
package: packageAddress,
|
|
150
|
+
module: 'order',
|
|
151
|
+
function: 'min_shares',
|
|
152
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
153
|
+
});
|
|
154
|
+
}
|
|
155
|
+
export function priceCap(options) {
|
|
156
|
+
const packageAddress = options.package ?? '@waterx/prediction';
|
|
157
|
+
const argumentsTypes = [
|
|
158
|
+
null
|
|
159
|
+
];
|
|
160
|
+
const parameterNames = ["order"];
|
|
161
|
+
return (tx) => tx.moveCall({
|
|
162
|
+
package: packageAddress,
|
|
163
|
+
module: 'order',
|
|
164
|
+
function: 'price_cap',
|
|
165
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
166
|
+
});
|
|
167
|
+
}
|
|
168
|
+
export function minProceeds(options) {
|
|
169
|
+
const packageAddress = options.package ?? '@waterx/prediction';
|
|
170
|
+
const argumentsTypes = [
|
|
171
|
+
null
|
|
172
|
+
];
|
|
173
|
+
const parameterNames = ["order"];
|
|
174
|
+
return (tx) => tx.moveCall({
|
|
175
|
+
package: packageAddress,
|
|
176
|
+
module: 'order',
|
|
177
|
+
function: 'min_proceeds',
|
|
178
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
179
|
+
});
|
|
180
|
+
}
|
|
181
|
+
export function expiryTs(options) {
|
|
182
|
+
const packageAddress = options.package ?? '@waterx/prediction';
|
|
183
|
+
const argumentsTypes = [
|
|
184
|
+
null
|
|
185
|
+
];
|
|
186
|
+
const parameterNames = ["order"];
|
|
187
|
+
return (tx) => tx.moveCall({
|
|
188
|
+
package: packageAddress,
|
|
189
|
+
module: 'order',
|
|
190
|
+
function: 'expiry_ts',
|
|
191
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
192
|
+
});
|
|
193
|
+
}
|
|
194
|
+
export function selfCancelAfterTs(options) {
|
|
195
|
+
const packageAddress = options.package ?? '@waterx/prediction';
|
|
196
|
+
const argumentsTypes = [
|
|
197
|
+
null
|
|
198
|
+
];
|
|
199
|
+
const parameterNames = ["order"];
|
|
200
|
+
return (tx) => tx.moveCall({
|
|
201
|
+
package: packageAddress,
|
|
202
|
+
module: 'order',
|
|
203
|
+
function: 'self_cancel_after_ts',
|
|
204
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
205
|
+
});
|
|
206
|
+
}
|
|
207
|
+
export function createdTs(options) {
|
|
208
|
+
const packageAddress = options.package ?? '@waterx/prediction';
|
|
209
|
+
const argumentsTypes = [
|
|
210
|
+
null
|
|
211
|
+
];
|
|
212
|
+
const parameterNames = ["order"];
|
|
213
|
+
return (tx) => tx.moveCall({
|
|
214
|
+
package: packageAddress,
|
|
215
|
+
module: 'order',
|
|
216
|
+
function: 'created_ts',
|
|
217
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
218
|
+
});
|
|
219
|
+
}
|
|
220
|
+
export function byAdmin(options) {
|
|
221
|
+
const packageAddress = options.package ?? '@waterx/prediction';
|
|
222
|
+
const argumentsTypes = [
|
|
223
|
+
null
|
|
224
|
+
];
|
|
225
|
+
const parameterNames = ["order"];
|
|
226
|
+
return (tx) => tx.moveCall({
|
|
227
|
+
package: packageAddress,
|
|
228
|
+
module: 'order',
|
|
229
|
+
function: 'by_admin',
|
|
230
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
231
|
+
});
|
|
232
|
+
}
|
|
233
|
+
export function isOpen(options) {
|
|
234
|
+
const packageAddress = options.package ?? '@waterx/prediction';
|
|
235
|
+
const argumentsTypes = [
|
|
236
|
+
null
|
|
237
|
+
];
|
|
238
|
+
const parameterNames = ["order"];
|
|
239
|
+
return (tx) => tx.moveCall({
|
|
240
|
+
package: packageAddress,
|
|
241
|
+
module: 'order',
|
|
242
|
+
function: 'is_open',
|
|
243
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
244
|
+
});
|
|
245
|
+
}
|
|
246
|
+
export function isClose(options) {
|
|
247
|
+
const packageAddress = options.package ?? '@waterx/prediction';
|
|
248
|
+
const argumentsTypes = [
|
|
249
|
+
null
|
|
250
|
+
];
|
|
251
|
+
const parameterNames = ["order"];
|
|
252
|
+
return (tx) => tx.moveCall({
|
|
253
|
+
package: packageAddress,
|
|
254
|
+
module: 'order',
|
|
255
|
+
function: 'is_close',
|
|
256
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
257
|
+
});
|
|
258
|
+
}
|
|
259
|
+
export function kindIsOpen(options) {
|
|
260
|
+
const packageAddress = options.package ?? '@waterx/prediction';
|
|
261
|
+
const argumentsTypes = [
|
|
262
|
+
null
|
|
263
|
+
];
|
|
264
|
+
const parameterNames = ["kind"];
|
|
265
|
+
return (tx) => tx.moveCall({
|
|
266
|
+
package: packageAddress,
|
|
267
|
+
module: 'order',
|
|
268
|
+
function: 'kind_is_open',
|
|
269
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
270
|
+
});
|
|
271
|
+
}
|
|
272
|
+
export function kindIsClose(options) {
|
|
273
|
+
const packageAddress = options.package ?? '@waterx/prediction';
|
|
274
|
+
const argumentsTypes = [
|
|
275
|
+
null
|
|
276
|
+
];
|
|
277
|
+
const parameterNames = ["kind"];
|
|
278
|
+
return (tx) => tx.moveCall({
|
|
279
|
+
package: packageAddress,
|
|
280
|
+
module: 'order',
|
|
281
|
+
function: 'kind_is_close',
|
|
282
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
283
|
+
});
|
|
284
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**************************************************************
|
|
2
|
+
* THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
|
|
3
|
+
**************************************************************/
|
|
4
|
+
import { MoveEnum } from '../utils/index.ts';
|
|
5
|
+
import { type Transaction, type TransactionArgument } from '@mysten/sui/transactions';
|
|
6
|
+
export declare const Outcome: MoveEnum<{
|
|
7
|
+
No: null;
|
|
8
|
+
Yes: null;
|
|
9
|
+
Invalid: null;
|
|
10
|
+
}, "@waterx/prediction::outcome::Outcome">;
|
|
11
|
+
export interface NoOptions {
|
|
12
|
+
package?: string;
|
|
13
|
+
arguments?: [
|
|
14
|
+
];
|
|
15
|
+
}
|
|
16
|
+
export declare function no(options?: NoOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
17
|
+
export interface YesOptions {
|
|
18
|
+
package?: string;
|
|
19
|
+
arguments?: [
|
|
20
|
+
];
|
|
21
|
+
}
|
|
22
|
+
export declare function yes(options?: YesOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
23
|
+
export interface InvalidOptions {
|
|
24
|
+
package?: string;
|
|
25
|
+
arguments?: [
|
|
26
|
+
];
|
|
27
|
+
}
|
|
28
|
+
export declare function invalid(options?: InvalidOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
29
|
+
export interface IsNoArguments {
|
|
30
|
+
outcome: TransactionArgument;
|
|
31
|
+
}
|
|
32
|
+
export interface IsNoOptions {
|
|
33
|
+
package?: string;
|
|
34
|
+
arguments: IsNoArguments | [
|
|
35
|
+
outcome: TransactionArgument
|
|
36
|
+
];
|
|
37
|
+
}
|
|
38
|
+
export declare function isNo(options: IsNoOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
39
|
+
export interface IsYesArguments {
|
|
40
|
+
outcome: TransactionArgument;
|
|
41
|
+
}
|
|
42
|
+
export interface IsYesOptions {
|
|
43
|
+
package?: string;
|
|
44
|
+
arguments: IsYesArguments | [
|
|
45
|
+
outcome: TransactionArgument
|
|
46
|
+
];
|
|
47
|
+
}
|
|
48
|
+
export declare function isYes(options: IsYesOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
49
|
+
export interface IsInvalidArguments {
|
|
50
|
+
outcome: TransactionArgument;
|
|
51
|
+
}
|
|
52
|
+
export interface IsInvalidOptions {
|
|
53
|
+
package?: string;
|
|
54
|
+
arguments: IsInvalidArguments | [
|
|
55
|
+
outcome: TransactionArgument
|
|
56
|
+
];
|
|
57
|
+
}
|
|
58
|
+
export declare function isInvalid(options: IsInvalidOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/**************************************************************
|
|
2
|
+
* THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
|
|
3
|
+
**************************************************************/
|
|
4
|
+
import { MoveEnum, normalizeMoveArguments } from "../utils/index.js";
|
|
5
|
+
const $moduleName = '@waterx/prediction::outcome';
|
|
6
|
+
export const Outcome = new MoveEnum({ name: `${$moduleName}::Outcome`, fields: {
|
|
7
|
+
No: null,
|
|
8
|
+
Yes: null,
|
|
9
|
+
Invalid: null
|
|
10
|
+
} });
|
|
11
|
+
export function no(options = {}) {
|
|
12
|
+
const packageAddress = options.package ?? '@waterx/prediction';
|
|
13
|
+
return (tx) => tx.moveCall({
|
|
14
|
+
package: packageAddress,
|
|
15
|
+
module: 'outcome',
|
|
16
|
+
function: 'no',
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
export function yes(options = {}) {
|
|
20
|
+
const packageAddress = options.package ?? '@waterx/prediction';
|
|
21
|
+
return (tx) => tx.moveCall({
|
|
22
|
+
package: packageAddress,
|
|
23
|
+
module: 'outcome',
|
|
24
|
+
function: 'yes',
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
export function invalid(options = {}) {
|
|
28
|
+
const packageAddress = options.package ?? '@waterx/prediction';
|
|
29
|
+
return (tx) => tx.moveCall({
|
|
30
|
+
package: packageAddress,
|
|
31
|
+
module: 'outcome',
|
|
32
|
+
function: 'invalid',
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
export function isNo(options) {
|
|
36
|
+
const packageAddress = options.package ?? '@waterx/prediction';
|
|
37
|
+
const argumentsTypes = [
|
|
38
|
+
null
|
|
39
|
+
];
|
|
40
|
+
const parameterNames = ["outcome"];
|
|
41
|
+
return (tx) => tx.moveCall({
|
|
42
|
+
package: packageAddress,
|
|
43
|
+
module: 'outcome',
|
|
44
|
+
function: 'is_no',
|
|
45
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
export function isYes(options) {
|
|
49
|
+
const packageAddress = options.package ?? '@waterx/prediction';
|
|
50
|
+
const argumentsTypes = [
|
|
51
|
+
null
|
|
52
|
+
];
|
|
53
|
+
const parameterNames = ["outcome"];
|
|
54
|
+
return (tx) => tx.moveCall({
|
|
55
|
+
package: packageAddress,
|
|
56
|
+
module: 'outcome',
|
|
57
|
+
function: 'is_yes',
|
|
58
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
export function isInvalid(options) {
|
|
62
|
+
const packageAddress = options.package ?? '@waterx/prediction';
|
|
63
|
+
const argumentsTypes = [
|
|
64
|
+
null
|
|
65
|
+
];
|
|
66
|
+
const parameterNames = ["outcome"];
|
|
67
|
+
return (tx) => tx.moveCall({
|
|
68
|
+
package: packageAddress,
|
|
69
|
+
module: 'outcome',
|
|
70
|
+
function: 'is_invalid',
|
|
71
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
72
|
+
});
|
|
73
|
+
}
|