@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
|
@@ -8,7 +8,6 @@ import * as limited_supply from "./limited_supply.js";
|
|
|
8
8
|
import * as table from "./deps/sui/table.js";
|
|
9
9
|
import * as vec_map from "./deps/sui/vec_map.js";
|
|
10
10
|
import * as type_name from "./deps/std/type_name.js";
|
|
11
|
-
import * as vec_set_1 from "./deps/sui/vec_set.js";
|
|
12
11
|
const $moduleName = '@waterx/credit::credit_registry';
|
|
13
12
|
export const CapKey = new MoveTuple({ name: `${$moduleName}::CapKey`, fields: [bcs.bool()] });
|
|
14
13
|
export const Mint = new MoveStruct({ name: `${$moduleName}::Mint<phantom CREDIT, phantom M>`, fields: {
|
|
@@ -68,7 +67,7 @@ export const CreditRegistry = new MoveStruct({ name: `${$moduleName}::CreditRegi
|
|
|
68
67
|
* `PACKAGE_VERSION ∈ allowed_versions`; admin uses `add_package_version` /
|
|
69
68
|
* `remove_package_version` to kill-switch a deprecated package after upgrade.
|
|
70
69
|
*/
|
|
71
|
-
allowed_versions:
|
|
70
|
+
allowed_versions: vec_set.VecSet(bcs.u16())
|
|
72
71
|
} });
|
|
73
72
|
export function packageVersion(options = {}) {
|
|
74
73
|
const packageAddress = options.package ?? '@waterx/credit';
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
|
|
3
3
|
**************************************************************/
|
|
4
4
|
import { MoveStruct, type RawTransactionArgument } from '../utils/index.ts';
|
|
5
|
-
import { type Transaction } from '@mysten/sui/transactions';
|
|
5
|
+
import { type Transaction, type TransactionArgument } from '@mysten/sui/transactions';
|
|
6
6
|
export declare const LimitedSupply: MoveStruct<{
|
|
7
7
|
limit: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
8
8
|
supply: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
@@ -18,89 +18,89 @@ export interface NewOptions {
|
|
|
18
18
|
}
|
|
19
19
|
export declare function _new(options: NewOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
20
20
|
export interface DestroyArguments {
|
|
21
|
-
self:
|
|
21
|
+
self: TransactionArgument;
|
|
22
22
|
}
|
|
23
23
|
export interface DestroyOptions {
|
|
24
24
|
package?: string;
|
|
25
25
|
arguments: DestroyArguments | [
|
|
26
|
-
self:
|
|
26
|
+
self: TransactionArgument
|
|
27
27
|
];
|
|
28
28
|
}
|
|
29
29
|
export declare function destroy(options: DestroyOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
30
30
|
export interface IncreaseArguments {
|
|
31
|
-
self:
|
|
31
|
+
self: TransactionArgument;
|
|
32
32
|
amount: RawTransactionArgument<number | bigint>;
|
|
33
33
|
}
|
|
34
34
|
export interface IncreaseOptions {
|
|
35
35
|
package?: string;
|
|
36
36
|
arguments: IncreaseArguments | [
|
|
37
|
-
self:
|
|
37
|
+
self: TransactionArgument,
|
|
38
38
|
amount: RawTransactionArgument<number | bigint>
|
|
39
39
|
];
|
|
40
40
|
}
|
|
41
41
|
export declare function increase(options: IncreaseOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
42
42
|
export interface DecreaseArguments {
|
|
43
|
-
self:
|
|
43
|
+
self: TransactionArgument;
|
|
44
44
|
amount: RawTransactionArgument<number | bigint>;
|
|
45
45
|
}
|
|
46
46
|
export interface DecreaseOptions {
|
|
47
47
|
package?: string;
|
|
48
48
|
arguments: DecreaseArguments | [
|
|
49
|
-
self:
|
|
49
|
+
self: TransactionArgument,
|
|
50
50
|
amount: RawTransactionArgument<number | bigint>
|
|
51
51
|
];
|
|
52
52
|
}
|
|
53
53
|
export declare function decrease(options: DecreaseOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
54
54
|
export interface SetLimitArguments {
|
|
55
|
-
self:
|
|
55
|
+
self: TransactionArgument;
|
|
56
56
|
limit: RawTransactionArgument<number | bigint>;
|
|
57
57
|
}
|
|
58
58
|
export interface SetLimitOptions {
|
|
59
59
|
package?: string;
|
|
60
60
|
arguments: SetLimitArguments | [
|
|
61
|
-
self:
|
|
61
|
+
self: TransactionArgument,
|
|
62
62
|
limit: RawTransactionArgument<number | bigint>
|
|
63
63
|
];
|
|
64
64
|
}
|
|
65
65
|
export declare function setLimit(options: SetLimitOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
66
66
|
export interface LimitArguments {
|
|
67
|
-
self:
|
|
67
|
+
self: TransactionArgument;
|
|
68
68
|
}
|
|
69
69
|
export interface LimitOptions {
|
|
70
70
|
package?: string;
|
|
71
71
|
arguments: LimitArguments | [
|
|
72
|
-
self:
|
|
72
|
+
self: TransactionArgument
|
|
73
73
|
];
|
|
74
74
|
}
|
|
75
75
|
export declare function limit(options: LimitOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
76
76
|
export interface SupplyArguments {
|
|
77
|
-
self:
|
|
77
|
+
self: TransactionArgument;
|
|
78
78
|
}
|
|
79
79
|
export interface SupplyOptions {
|
|
80
80
|
package?: string;
|
|
81
81
|
arguments: SupplyArguments | [
|
|
82
|
-
self:
|
|
82
|
+
self: TransactionArgument
|
|
83
83
|
];
|
|
84
84
|
}
|
|
85
85
|
export declare function supply(options: SupplyOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
86
86
|
export interface IncreasableAmountArguments {
|
|
87
|
-
self:
|
|
87
|
+
self: TransactionArgument;
|
|
88
88
|
}
|
|
89
89
|
export interface IncreasableAmountOptions {
|
|
90
90
|
package?: string;
|
|
91
91
|
arguments: IncreasableAmountArguments | [
|
|
92
|
-
self:
|
|
92
|
+
self: TransactionArgument
|
|
93
93
|
];
|
|
94
94
|
}
|
|
95
95
|
export declare function increasableAmount(options: IncreasableAmountOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
96
96
|
export interface IsIncreasableArguments {
|
|
97
|
-
self:
|
|
97
|
+
self: TransactionArgument;
|
|
98
98
|
amount: RawTransactionArgument<number | bigint>;
|
|
99
99
|
}
|
|
100
100
|
export interface IsIncreasableOptions {
|
|
101
101
|
package?: string;
|
|
102
102
|
arguments: IsIncreasableArguments | [
|
|
103
|
-
self:
|
|
103
|
+
self: TransactionArgument,
|
|
104
104
|
amount: RawTransactionArgument<number | bigint>
|
|
105
105
|
];
|
|
106
106
|
}
|
|
@@ -7,7 +7,6 @@ import { bcs } from '@mysten/sui/bcs';
|
|
|
7
7
|
import * as vec_map from "./deps/sui/vec_map.js";
|
|
8
8
|
import * as type_name from "./deps/std/type_name.js";
|
|
9
9
|
import * as float from "./deps/bucket_v2_framework/float.js";
|
|
10
|
-
import * as float_1 from "./deps/bucket_v2_framework/float.js";
|
|
11
10
|
const $moduleName = '@waterx/oracle::aggregator';
|
|
12
11
|
export const NewPriceAggregator = new MoveStruct({ name: `${$moduleName}::NewPriceAggregator`, fields: {
|
|
13
12
|
aggregator_id: bcs.Address,
|
|
@@ -62,7 +61,7 @@ export const PriceAggregator = new MoveStruct({ name: `${$moduleName}::PriceAggr
|
|
|
62
61
|
/** Maximum allowed deviation from the weighted-average price. */
|
|
63
62
|
outlier_tolerance: float.Float,
|
|
64
63
|
/** Latest aggregated price. */
|
|
65
|
-
latest_price:
|
|
64
|
+
latest_price: float.Float,
|
|
66
65
|
/** `clock.timestamp_ms()` at the time `aggregate` ran. */
|
|
67
66
|
last_update_ms: bcs.u64(),
|
|
68
67
|
/** Number of exact timestamp snapshots stored as dynamic fields on this aggregator. */
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
/** Hot-potato collector for oracle rules feeding prices for a single ticker. */
|
|
5
5
|
import { MoveStruct, type RawTransactionArgument } from '../utils/index.ts';
|
|
6
6
|
import { type BcsType } from '@mysten/sui/bcs';
|
|
7
|
-
import { type Transaction } from '@mysten/sui/transactions';
|
|
7
|
+
import { type Transaction, type TransactionArgument } from '@mysten/sui/transactions';
|
|
8
8
|
export declare const PriceObservation: MoveStruct<{
|
|
9
9
|
price: MoveStruct<{
|
|
10
10
|
value: BcsType<string, string | number | bigint, "u128">;
|
|
@@ -40,36 +40,36 @@ export declare const PriceCollector: MoveStruct<{
|
|
|
40
40
|
}, "0x2::vec_map::VecMap<std::type_name::TypeName, Option<@waterx/oracle::collector::PriceObservation>>">;
|
|
41
41
|
}, "@waterx/oracle::collector::PriceCollector">;
|
|
42
42
|
export interface SymbolArguments {
|
|
43
|
-
c:
|
|
43
|
+
c: TransactionArgument;
|
|
44
44
|
}
|
|
45
45
|
export interface SymbolOptions {
|
|
46
46
|
package?: string;
|
|
47
47
|
arguments: SymbolArguments | [
|
|
48
|
-
c:
|
|
48
|
+
c: TransactionArgument
|
|
49
49
|
];
|
|
50
50
|
}
|
|
51
51
|
export declare function symbol(options: SymbolOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
52
52
|
export interface ContentsArguments {
|
|
53
|
-
c:
|
|
53
|
+
c: TransactionArgument;
|
|
54
54
|
}
|
|
55
55
|
export interface ContentsOptions {
|
|
56
56
|
package?: string;
|
|
57
57
|
arguments: ContentsArguments | [
|
|
58
|
-
c:
|
|
58
|
+
c: TransactionArgument
|
|
59
59
|
];
|
|
60
60
|
}
|
|
61
61
|
export declare function contents(options: ContentsOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
62
62
|
export interface CollectArguments<R extends BcsType<any>> {
|
|
63
|
-
c:
|
|
63
|
+
c: TransactionArgument;
|
|
64
64
|
W: RawTransactionArgument<R>;
|
|
65
|
-
price:
|
|
65
|
+
price: TransactionArgument;
|
|
66
66
|
}
|
|
67
67
|
export interface CollectOptions<R extends BcsType<any>> {
|
|
68
68
|
package?: string;
|
|
69
69
|
arguments: CollectArguments<R> | [
|
|
70
|
-
c:
|
|
70
|
+
c: TransactionArgument,
|
|
71
71
|
W: RawTransactionArgument<R>,
|
|
72
|
-
price:
|
|
72
|
+
price: TransactionArgument
|
|
73
73
|
];
|
|
74
74
|
typeArguments: [
|
|
75
75
|
string
|
|
@@ -78,17 +78,17 @@ export interface CollectOptions<R extends BcsType<any>> {
|
|
|
78
78
|
/** A rule reports its observed price (or `none` if stale / unavailable). */
|
|
79
79
|
export declare function collect<R extends BcsType<any>>(options: CollectOptions<R>): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
80
80
|
export interface CollectAtArguments<R extends BcsType<any>> {
|
|
81
|
-
c:
|
|
81
|
+
c: TransactionArgument;
|
|
82
82
|
W: RawTransactionArgument<R>;
|
|
83
|
-
price:
|
|
83
|
+
price: TransactionArgument;
|
|
84
84
|
timestampMs: RawTransactionArgument<number | bigint>;
|
|
85
85
|
}
|
|
86
86
|
export interface CollectAtOptions<R extends BcsType<any>> {
|
|
87
87
|
package?: string;
|
|
88
88
|
arguments: CollectAtArguments<R> | [
|
|
89
|
-
c:
|
|
89
|
+
c: TransactionArgument,
|
|
90
90
|
W: RawTransactionArgument<R>,
|
|
91
|
-
price:
|
|
91
|
+
price: TransactionArgument,
|
|
92
92
|
timestampMs: RawTransactionArgument<number | bigint>
|
|
93
93
|
];
|
|
94
94
|
typeArguments: [
|
|
@@ -98,22 +98,22 @@ export interface CollectAtOptions<R extends BcsType<any>> {
|
|
|
98
98
|
/** A rule reports a price that is bound to an exact source timestamp. */
|
|
99
99
|
export declare function collectAt<R extends BcsType<any>>(options: CollectAtOptions<R>): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
100
100
|
export interface ObservationPriceArguments {
|
|
101
|
-
o:
|
|
101
|
+
o: TransactionArgument;
|
|
102
102
|
}
|
|
103
103
|
export interface ObservationPriceOptions {
|
|
104
104
|
package?: string;
|
|
105
105
|
arguments: ObservationPriceArguments | [
|
|
106
|
-
o:
|
|
106
|
+
o: TransactionArgument
|
|
107
107
|
];
|
|
108
108
|
}
|
|
109
109
|
export declare function observationPrice(options: ObservationPriceOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
110
110
|
export interface ObservationTimestampMsArguments {
|
|
111
|
-
o:
|
|
111
|
+
o: TransactionArgument;
|
|
112
112
|
}
|
|
113
113
|
export interface ObservationTimestampMsOptions {
|
|
114
114
|
package?: string;
|
|
115
115
|
arguments: ObservationTimestampMsArguments | [
|
|
116
|
-
o:
|
|
116
|
+
o: TransactionArgument
|
|
117
117
|
];
|
|
118
118
|
}
|
|
119
119
|
export declare function observationTimestampMs(options: ObservationTimestampMsOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
* ```
|
|
17
17
|
*/
|
|
18
18
|
import { MoveStruct, type RawTransactionArgument } from '../utils/index.ts';
|
|
19
|
-
import { type Transaction } from '@mysten/sui/transactions';
|
|
19
|
+
import { type Transaction, type TransactionArgument } from '@mysten/sui/transactions';
|
|
20
20
|
export declare const VersionAllowed: MoveStruct<{
|
|
21
21
|
version: import("@mysten/sui/bcs").BcsType<number, number, "u16">;
|
|
22
22
|
}, "@waterx/oracle::oracle::VersionAllowed">;
|
|
@@ -170,13 +170,13 @@ export interface NewCollectorOptions {
|
|
|
170
170
|
export declare function newCollector(options: NewCollectorOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
171
171
|
export interface AggregateArguments {
|
|
172
172
|
oracle: RawTransactionArgument<string>;
|
|
173
|
-
collector:
|
|
173
|
+
collector: TransactionArgument;
|
|
174
174
|
}
|
|
175
175
|
export interface AggregateOptions {
|
|
176
176
|
package?: string;
|
|
177
177
|
arguments: AggregateArguments | [
|
|
178
178
|
oracle: RawTransactionArgument<string>,
|
|
179
|
-
collector:
|
|
179
|
+
collector: TransactionArgument
|
|
180
180
|
];
|
|
181
181
|
}
|
|
182
182
|
/**
|
|
@@ -186,13 +186,13 @@ export interface AggregateOptions {
|
|
|
186
186
|
export declare function aggregate(options: AggregateOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
187
187
|
export interface RegisterPriceAtTimestampArguments {
|
|
188
188
|
oracle: RawTransactionArgument<string>;
|
|
189
|
-
collector:
|
|
189
|
+
collector: TransactionArgument;
|
|
190
190
|
}
|
|
191
191
|
export interface RegisterPriceAtTimestampOptions {
|
|
192
192
|
package?: string;
|
|
193
193
|
arguments: RegisterPriceAtTimestampArguments | [
|
|
194
194
|
oracle: RawTransactionArgument<string>,
|
|
195
|
-
collector:
|
|
195
|
+
collector: TransactionArgument
|
|
196
196
|
];
|
|
197
197
|
}
|
|
198
198
|
/**
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
* `trading.move`; payback paths repay via `wxa_account::put`.
|
|
21
21
|
*/
|
|
22
22
|
import { MoveStruct, type RawTransactionArgument } from '../utils/index.ts';
|
|
23
|
-
import { type Transaction } from '@mysten/sui/transactions';
|
|
23
|
+
import { type Transaction, type TransactionArgument } from '@mysten/sui/transactions';
|
|
24
24
|
export declare const WaterXPerp: MoveStruct<{
|
|
25
25
|
dummy_field: import("@mysten/sui/bcs").BcsType<boolean, boolean, "bool">;
|
|
26
26
|
}, "@waterx/perp::account_data::WaterXPerp">;
|
|
@@ -121,22 +121,22 @@ export interface WitnessOptions {
|
|
|
121
121
|
}
|
|
122
122
|
export declare function witness(options?: WitnessOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
123
123
|
export interface AccountPositionsArguments {
|
|
124
|
-
data:
|
|
124
|
+
data: TransactionArgument;
|
|
125
125
|
}
|
|
126
126
|
export interface AccountPositionsOptions {
|
|
127
127
|
package?: string;
|
|
128
128
|
arguments: AccountPositionsArguments | [
|
|
129
|
-
data:
|
|
129
|
+
data: TransactionArgument
|
|
130
130
|
];
|
|
131
131
|
}
|
|
132
132
|
export declare function accountPositions(options: AccountPositionsOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
133
133
|
export interface AccountOrdersArguments {
|
|
134
|
-
data:
|
|
134
|
+
data: TransactionArgument;
|
|
135
135
|
}
|
|
136
136
|
export interface AccountOrdersOptions {
|
|
137
137
|
package?: string;
|
|
138
138
|
arguments: AccountOrdersArguments | [
|
|
139
|
-
data:
|
|
139
|
+
data: TransactionArgument
|
|
140
140
|
];
|
|
141
141
|
}
|
|
142
142
|
export declare function accountOrders(options: AccountOrdersOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
@@ -22,7 +22,6 @@
|
|
|
22
22
|
import { MoveStruct, normalizeMoveArguments } from "../utils/index.js";
|
|
23
23
|
import { bcs } from '@mysten/sui/bcs';
|
|
24
24
|
import * as vec_map from "./deps/sui/vec_map.js";
|
|
25
|
-
import * as vec_map_1 from "./deps/sui/vec_map.js";
|
|
26
25
|
const $moduleName = '@waterx/perp::account_data';
|
|
27
26
|
export const WaterXPerp = new MoveStruct({ name: `${$moduleName}::WaterXPerp`, fields: {
|
|
28
27
|
dummy_field: bcs.bool()
|
|
@@ -31,7 +30,7 @@ export const WaterXPerpData = new MoveStruct({ name: `${$moduleName}::WaterXPerp
|
|
|
31
30
|
/** Position IDs keyed by Market ID. */
|
|
32
31
|
positions: vec_map.VecMap(bcs.Address, bcs.vector(bcs.u64())),
|
|
33
32
|
/** Order IDs keyed by Market ID. */
|
|
34
|
-
orders:
|
|
33
|
+
orders: vec_map.VecMap(bcs.Address, bcs.vector(bcs.u64()))
|
|
35
34
|
} });
|
|
36
35
|
export function permOpenPosition(options = {}) {
|
|
37
36
|
const packageAddress = options.package ?? '@waterx/perp';
|
|
@@ -6,13 +6,11 @@ import { MoveTuple, MoveStruct } from "../../../utils/index.js";
|
|
|
6
6
|
import * as type_name from "../std/type_name.js";
|
|
7
7
|
import * as vec_map from "../sui/vec_map.js";
|
|
8
8
|
import * as liability from "./liability.js";
|
|
9
|
-
import * as vec_map_1 from "../sui/vec_map.js";
|
|
10
|
-
import * as liability_1 from "./liability.js";
|
|
11
9
|
import * as vec_set from "../sui/vec_set.js";
|
|
12
10
|
const $moduleName = 'bucket_v2_framework::sheet';
|
|
13
11
|
export const Entity = new MoveTuple({ name: `${$moduleName}::Entity`, fields: [type_name.TypeName] });
|
|
14
12
|
export const Sheet = new MoveStruct({ name: `${$moduleName}::Sheet<phantom CoinType, phantom SelfEntity>`, fields: {
|
|
15
13
|
credits: vec_map.VecMap(Entity, liability.Credit),
|
|
16
|
-
debts:
|
|
14
|
+
debts: vec_map.VecMap(Entity, liability.Debt),
|
|
17
15
|
blacklist: vec_set.VecSet(Entity)
|
|
18
16
|
} });
|