@waterx/sdk 2.1.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/LICENSE +21 -0
- package/README.md +204 -0
- package/dist/src/client.d.ts +109 -0
- package/dist/src/client.js +197 -0
- package/dist/src/config.d.ts +229 -0
- package/dist/src/config.js +107 -0
- package/dist/src/constants.d.ts +64 -0
- package/dist/src/constants.js +71 -0
- package/dist/src/fetch.d.ts +144 -0
- package/dist/src/fetch.js +419 -0
- package/dist/src/generated/bucket_v2_framework/account.d.ts +107 -0
- package/dist/src/generated/bucket_v2_framework/account.js +129 -0
- package/dist/src/generated/bucket_v2_framework/deps/std/type_name.d.ts +17 -0
- package/dist/src/generated/bucket_v2_framework/deps/std/type_name.js +19 -0
- package/dist/src/generated/bucket_v2_framework/deps/sui/balance.d.ts +12 -0
- package/dist/src/generated/bucket_v2_framework/deps/sui/balance.js +14 -0
- package/dist/src/generated/bucket_v2_framework/deps/sui/vec_map.d.ts +36 -0
- package/dist/src/generated/bucket_v2_framework/deps/sui/vec_map.js +27 -0
- package/dist/src/generated/bucket_v2_framework/deps/sui/vec_set.d.ts +16 -0
- package/dist/src/generated/bucket_v2_framework/deps/sui/vec_set.js +19 -0
- package/dist/src/generated/bucket_v2_framework/double.d.ts +384 -0
- package/dist/src/generated/bucket_v2_framework/double.js +466 -0
- package/dist/src/generated/bucket_v2_framework/float.d.ts +364 -0
- package/dist/src/generated/bucket_v2_framework/float.js +440 -0
- package/dist/src/generated/bucket_v2_framework/liability.d.ts +197 -0
- package/dist/src/generated/bucket_v2_framework/liability.js +205 -0
- package/dist/src/generated/bucket_v2_framework/linked_table.d.ts +384 -0
- package/dist/src/generated/bucket_v2_framework/linked_table.js +382 -0
- package/dist/src/generated/bucket_v2_framework/sheet.d.ts +424 -0
- package/dist/src/generated/bucket_v2_framework/sheet.js +344 -0
- package/dist/src/generated/native_custody/custody_vault.d.ts +572 -0
- package/dist/src/generated/native_custody/custody_vault.js +483 -0
- package/dist/src/generated/native_custody/deps/bucket_v2_framework/float.d.ts +8 -0
- package/dist/src/generated/native_custody/deps/bucket_v2_framework/float.js +10 -0
- package/dist/src/generated/native_custody/deps/bucket_v2_framework/liability.d.ts +11 -0
- package/dist/src/generated/native_custody/deps/bucket_v2_framework/liability.js +13 -0
- package/dist/src/generated/native_custody/deps/bucket_v2_framework/sheet.d.ts +49 -0
- package/dist/src/generated/native_custody/deps/bucket_v2_framework/sheet.js +18 -0
- package/dist/src/generated/native_custody/deps/std/type_name.d.ts +17 -0
- package/dist/src/generated/native_custody/deps/std/type_name.js +19 -0
- package/dist/src/generated/native_custody/deps/sui/balance.d.ts +12 -0
- package/dist/src/generated/native_custody/deps/sui/balance.js +14 -0
- package/dist/src/generated/native_custody/deps/sui/vec_map.d.ts +36 -0
- package/dist/src/generated/native_custody/deps/sui/vec_map.js +27 -0
- package/dist/src/generated/native_custody/deps/sui/vec_set.d.ts +16 -0
- package/dist/src/generated/native_custody/deps/sui/vec_set.js +19 -0
- package/dist/src/generated/native_custody/events.d.ts +36 -0
- package/dist/src/generated/native_custody/events.js +36 -0
- package/dist/src/generated/pyth_sponsor_rule/deps/sui/balance.d.ts +12 -0
- package/dist/src/generated/pyth_sponsor_rule/deps/sui/balance.js +14 -0
- package/dist/src/generated/pyth_sponsor_rule/pyth_sponsor_rule.d.ts +68 -0
- package/dist/src/generated/pyth_sponsor_rule/pyth_sponsor_rule.js +74 -0
- package/dist/src/generated/utils/index.d.ts +30 -0
- package/dist/src/generated/utils/index.js +157 -0
- package/dist/src/generated/waterx_account/account.d.ts +1818 -0
- package/dist/src/generated/waterx_account/account.js +1723 -0
- package/dist/src/generated/waterx_account/deps/bucket_v2_framework/liability.d.ts +11 -0
- package/dist/src/generated/waterx_account/deps/bucket_v2_framework/liability.js +13 -0
- package/dist/src/generated/waterx_account/deps/bucket_v2_framework/sheet.d.ts +49 -0
- package/dist/src/generated/waterx_account/deps/bucket_v2_framework/sheet.js +18 -0
- package/dist/src/generated/waterx_account/deps/std/type_name.d.ts +17 -0
- package/dist/src/generated/waterx_account/deps/std/type_name.js +19 -0
- package/dist/src/generated/waterx_account/deps/sui/balance.d.ts +12 -0
- package/dist/src/generated/waterx_account/deps/sui/balance.js +14 -0
- package/dist/src/generated/waterx_account/deps/sui/object_table.d.ts +17 -0
- package/dist/src/generated/waterx_account/deps/sui/object_table.js +19 -0
- package/dist/src/generated/waterx_account/deps/sui/table.d.ts +29 -0
- package/dist/src/generated/waterx_account/deps/sui/table.js +31 -0
- package/dist/src/generated/waterx_account/deps/sui/vec_map.d.ts +36 -0
- package/dist/src/generated/waterx_account/deps/sui/vec_map.js +27 -0
- package/dist/src/generated/waterx_account/deps/sui/vec_set.d.ts +16 -0
- package/dist/src/generated/waterx_account/deps/sui/vec_set.js +19 -0
- package/dist/src/generated/waterx_account/direct_rule.d.ts +77 -0
- package/dist/src/generated/waterx_account/direct_rule.js +78 -0
- package/dist/src/generated/waterx_account/events.d.ts +180 -0
- package/dist/src/generated/waterx_account/events.js +156 -0
- package/dist/src/generated/waterx_account/version.d.ts +10 -0
- package/dist/src/generated/waterx_account/version.js +8 -0
- package/dist/src/generated/waterx_credit/credit_registry.d.ts +708 -0
- package/dist/src/generated/waterx_credit/credit_registry.js +658 -0
- package/dist/src/generated/waterx_credit/deps/std/type_name.d.ts +17 -0
- package/dist/src/generated/waterx_credit/deps/std/type_name.js +19 -0
- package/dist/src/generated/waterx_credit/deps/sui/table.d.ts +29 -0
- package/dist/src/generated/waterx_credit/deps/sui/table.js +31 -0
- package/dist/src/generated/waterx_credit/deps/sui/vec_map.d.ts +36 -0
- package/dist/src/generated/waterx_credit/deps/sui/vec_map.js +27 -0
- package/dist/src/generated/waterx_credit/deps/sui/vec_set.d.ts +16 -0
- package/dist/src/generated/waterx_credit/deps/sui/vec_set.js +19 -0
- package/dist/src/generated/waterx_credit/limited_supply.d.ts +107 -0
- package/dist/src/generated/waterx_credit/limited_supply.js +131 -0
- package/dist/src/generated/waterx_oracle/aggregator.d.ts +211 -0
- package/dist/src/generated/waterx_oracle/aggregator.js +213 -0
- package/dist/src/generated/waterx_oracle/collector.d.ts +119 -0
- package/dist/src/generated/waterx_oracle/collector.js +105 -0
- package/dist/src/generated/waterx_oracle/deps/bucket_v2_framework/float.d.ts +8 -0
- package/dist/src/generated/waterx_oracle/deps/bucket_v2_framework/float.js +10 -0
- package/dist/src/generated/waterx_oracle/deps/std/type_name.d.ts +17 -0
- package/dist/src/generated/waterx_oracle/deps/std/type_name.js +19 -0
- package/dist/src/generated/waterx_oracle/deps/sui/vec_map.d.ts +36 -0
- package/dist/src/generated/waterx_oracle/deps/sui/vec_map.js +27 -0
- package/dist/src/generated/waterx_oracle/deps/sui/vec_set.d.ts +16 -0
- package/dist/src/generated/waterx_oracle/deps/sui/vec_set.js +19 -0
- package/dist/src/generated/waterx_oracle/oracle.d.ts +298 -0
- package/dist/src/generated/waterx_oracle/oracle.js +323 -0
- package/dist/src/generated/waterx_oracle/version.d.ts +10 -0
- package/dist/src/generated/waterx_oracle/version.js +8 -0
- package/dist/src/generated/waterx_perp/account_data.d.ts +269 -0
- package/dist/src/generated/waterx_perp/account_data.js +284 -0
- package/dist/src/generated/waterx_perp/admin.d.ts +19 -0
- package/dist/src/generated/waterx_perp/admin.js +22 -0
- package/dist/src/generated/waterx_perp/deps/bucket_v2_framework/double.d.ts +8 -0
- package/dist/src/generated/waterx_perp/deps/bucket_v2_framework/double.js +10 -0
- package/dist/src/generated/waterx_perp/deps/bucket_v2_framework/float.d.ts +8 -0
- package/dist/src/generated/waterx_perp/deps/bucket_v2_framework/float.js +10 -0
- package/dist/src/generated/waterx_perp/deps/bucket_v2_framework/liability.d.ts +11 -0
- package/dist/src/generated/waterx_perp/deps/bucket_v2_framework/liability.js +13 -0
- package/dist/src/generated/waterx_perp/deps/bucket_v2_framework/linked_table.d.ts +8 -0
- package/dist/src/generated/waterx_perp/deps/bucket_v2_framework/linked_table.js +18 -0
- package/dist/src/generated/waterx_perp/deps/bucket_v2_framework/sheet.d.ts +49 -0
- package/dist/src/generated/waterx_perp/deps/bucket_v2_framework/sheet.js +18 -0
- package/dist/src/generated/waterx_perp/deps/std/type_name.d.ts +17 -0
- package/dist/src/generated/waterx_perp/deps/std/type_name.js +19 -0
- package/dist/src/generated/waterx_perp/deps/sui/balance.d.ts +15 -0
- package/dist/src/generated/waterx_perp/deps/sui/balance.js +17 -0
- package/dist/src/generated/waterx_perp/deps/sui/coin.d.ts +14 -0
- package/dist/src/generated/waterx_perp/deps/sui/coin.js +15 -0
- package/dist/src/generated/waterx_perp/deps/sui/vec_map.d.ts +36 -0
- package/dist/src/generated/waterx_perp/deps/sui/vec_map.js +27 -0
- package/dist/src/generated/waterx_perp/deps/sui/vec_set.d.ts +16 -0
- package/dist/src/generated/waterx_perp/deps/sui/vec_set.js +19 -0
- package/dist/src/generated/waterx_perp/events.d.ts +1283 -0
- package/dist/src/generated/waterx_perp/events.js +1018 -0
- package/dist/src/generated/waterx_perp/global_config.d.ts +775 -0
- package/dist/src/generated/waterx_perp/global_config.js +836 -0
- package/dist/src/generated/waterx_perp/keyed_big_vector.d.ts +553 -0
- package/dist/src/generated/waterx_perp/keyed_big_vector.js +554 -0
- package/dist/src/generated/waterx_perp/lp_pool.d.ts +1648 -0
- package/dist/src/generated/waterx_perp/lp_pool.js +1521 -0
- package/dist/src/generated/waterx_perp/market_config.d.ts +715 -0
- package/dist/src/generated/waterx_perp/market_config.js +780 -0
- package/dist/src/generated/waterx_perp/math.d.ts +63 -0
- package/dist/src/generated/waterx_perp/math.js +64 -0
- package/dist/src/generated/waterx_perp/memo.d.ts +251 -0
- package/dist/src/generated/waterx_perp/memo.js +323 -0
- package/dist/src/generated/waterx_perp/order_book.d.ts +290 -0
- package/dist/src/generated/waterx_perp/order_book.js +329 -0
- package/dist/src/generated/waterx_perp/position.d.ts +1005 -0
- package/dist/src/generated/waterx_perp/position.js +1103 -0
- package/dist/src/generated/waterx_perp/request.d.ts +544 -0
- package/dist/src/generated/waterx_perp/request.js +541 -0
- package/dist/src/generated/waterx_perp/response.d.ts +247 -0
- package/dist/src/generated/waterx_perp/response.js +280 -0
- package/dist/src/generated/waterx_perp/trading.d.ts +2821 -0
- package/dist/src/generated/waterx_perp/trading.js +2372 -0
- package/dist/src/generated/waterx_perp/version.d.ts +10 -0
- package/dist/src/generated/waterx_perp/version.js +8 -0
- package/dist/src/generated/waterx_perp/witness.d.ts +18 -0
- package/dist/src/generated/waterx_perp/witness.js +21 -0
- package/dist/src/generated/waterx_perp_view/deps/std/type_name.d.ts +17 -0
- package/dist/src/generated/waterx_perp_view/deps/std/type_name.js +19 -0
- package/dist/src/generated/waterx_perp_view/view.d.ts +447 -0
- package/dist/src/generated/waterx_perp_view/view.js +414 -0
- package/dist/src/generated/waterx_pyth_rule/deps/sui/vec_map.d.ts +36 -0
- package/dist/src/generated/waterx_pyth_rule/deps/sui/vec_map.js +27 -0
- package/dist/src/generated/waterx_pyth_rule/pyth_rule.d.ts +90 -0
- package/dist/src/generated/waterx_pyth_rule/pyth_rule.js +72 -0
- package/dist/src/generated/waterx_referral/deps/sui/table.d.ts +29 -0
- package/dist/src/generated/waterx_referral/deps/sui/table.js +31 -0
- package/dist/src/generated/waterx_referral/deps/sui/vec_set.d.ts +16 -0
- package/dist/src/generated/waterx_referral/deps/sui/vec_set.js +19 -0
- package/dist/src/generated/waterx_referral/referral_table.d.ts +171 -0
- package/dist/src/generated/waterx_referral/referral_table.js +192 -0
- package/dist/src/generated/waterx_staking/deps/bucket_v2_framework/double.d.ts +8 -0
- package/dist/src/generated/waterx_staking/deps/bucket_v2_framework/double.js +10 -0
- package/dist/src/generated/waterx_staking/deps/sui/balance.d.ts +12 -0
- package/dist/src/generated/waterx_staking/deps/sui/balance.js +14 -0
- package/dist/src/generated/waterx_staking/deps/sui/table.d.ts +29 -0
- package/dist/src/generated/waterx_staking/deps/sui/table.js +31 -0
- package/dist/src/generated/waterx_staking/deps/sui/vec_set.d.ts +16 -0
- package/dist/src/generated/waterx_staking/deps/sui/vec_set.js +19 -0
- package/dist/src/generated/waterx_staking/waterx_staking.d.ts +746 -0
- package/dist/src/generated/waterx_staking/waterx_staking.js +731 -0
- package/dist/src/generated/waterx_staking/witness.d.ts +16 -0
- package/dist/src/generated/waterx_staking/witness.js +18 -0
- package/dist/src/generated/withdrawal_queue/deps/bucket_v2_framework/linked_table.d.ts +8 -0
- package/dist/src/generated/withdrawal_queue/deps/bucket_v2_framework/linked_table.js +18 -0
- package/dist/src/generated/withdrawal_queue/deps/std/type_name.d.ts +17 -0
- package/dist/src/generated/withdrawal_queue/deps/std/type_name.js +19 -0
- package/dist/src/generated/withdrawal_queue/deps/sui/balance.d.ts +12 -0
- package/dist/src/generated/withdrawal_queue/deps/sui/balance.js +14 -0
- package/dist/src/generated/withdrawal_queue/deps/sui/vec_set.d.ts +16 -0
- package/dist/src/generated/withdrawal_queue/deps/sui/vec_set.js +19 -0
- package/dist/src/generated/withdrawal_queue/withdrawal_queue.d.ts +483 -0
- package/dist/src/generated/withdrawal_queue/withdrawal_queue.js +480 -0
- package/dist/src/generated/wlp/wlp.d.ts +28 -0
- package/dist/src/generated/wlp/wlp.js +32 -0
- package/dist/src/generated/wormhole_bridge/deps/sui/table.d.ts +29 -0
- package/dist/src/generated/wormhole_bridge/deps/sui/table.js +31 -0
- package/dist/src/generated/wormhole_bridge/deps/sui/vec_map.d.ts +36 -0
- package/dist/src/generated/wormhole_bridge/deps/sui/vec_map.js +27 -0
- package/dist/src/generated/wormhole_bridge/deps/sui/vec_set.d.ts +16 -0
- package/dist/src/generated/wormhole_bridge/deps/sui/vec_set.js +19 -0
- package/dist/src/generated/wormhole_bridge/deps/wormhole_sdk/consumed_vaas.d.ts +12 -0
- package/dist/src/generated/wormhole_bridge/deps/wormhole_sdk/consumed_vaas.js +9 -0
- package/dist/src/generated/wormhole_bridge/deps/wormhole_sdk/emitter.d.ts +14 -0
- package/dist/src/generated/wormhole_bridge/deps/wormhole_sdk/emitter.js +16 -0
- package/dist/src/generated/wormhole_bridge/deps/wormhole_sdk/set.d.ts +16 -0
- package/dist/src/generated/wormhole_bridge/deps/wormhole_sdk/set.js +15 -0
- package/dist/src/generated/wormhole_bridge/events.d.ts +32 -0
- package/dist/src/generated/wormhole_bridge/events.js +28 -0
- package/dist/src/generated/wormhole_bridge/wormhole_bridge.d.ts +498 -0
- package/dist/src/generated/wormhole_bridge/wormhole_bridge.js +494 -0
- package/dist/src/index.d.ts +28 -0
- package/dist/src/index.js +34 -0
- package/dist/src/tx-builders.d.ts +242 -0
- package/dist/src/tx-builders.js +320 -0
- package/dist/src/user/account.d.ts +129 -0
- package/dist/src/user/account.js +166 -0
- package/dist/src/user/credit.d.ts +135 -0
- package/dist/src/user/credit.js +255 -0
- package/dist/src/user/custody.d.ts +71 -0
- package/dist/src/user/custody.js +112 -0
- package/dist/src/user/index.d.ts +8 -0
- package/dist/src/user/index.js +8 -0
- package/dist/src/user/order.d.ts +89 -0
- package/dist/src/user/order.js +134 -0
- package/dist/src/user/referral.d.ts +21 -0
- package/dist/src/user/referral.js +41 -0
- package/dist/src/user/staking.d.ts +54 -0
- package/dist/src/user/staking.js +109 -0
- package/dist/src/user/trading.d.ts +119 -0
- package/dist/src/user/trading.js +262 -0
- package/dist/src/user/wlp.d.ts +58 -0
- package/dist/src/user/wlp.js +99 -0
- package/dist/src/utils/account-request.d.ts +9 -0
- package/dist/src/utils/account-request.js +17 -0
- package/dist/src/utils/config.d.ts +11 -0
- package/dist/src/utils/config.js +15 -0
- package/dist/src/utils/math.d.ts +201 -0
- package/dist/src/utils/math.js +343 -0
- package/dist/src/utils/pyth.d.ts +89 -0
- package/dist/src/utils/pyth.js +316 -0
- package/dist/src/utils/wormhole.d.ts +86 -0
- package/dist/src/utils/wormhole.js +154 -0
- package/package.json +66 -0
|
@@ -0,0 +1,731 @@
|
|
|
1
|
+
/**************************************************************
|
|
2
|
+
* THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
|
|
3
|
+
**************************************************************/
|
|
4
|
+
import { MoveStruct, normalizeMoveArguments } from "../utils/index.js";
|
|
5
|
+
import { bcs } from '@mysten/sui/bcs';
|
|
6
|
+
import * as double from "./deps/bucket_v2_framework/double.js";
|
|
7
|
+
import * as balance from "./deps/sui/balance.js";
|
|
8
|
+
import * as balance_1 from "./deps/sui/balance.js";
|
|
9
|
+
import * as balance_2 from "./deps/sui/balance.js";
|
|
10
|
+
import * as double_1 from "./deps/bucket_v2_framework/double.js";
|
|
11
|
+
import * as double_2 from "./deps/bucket_v2_framework/double.js";
|
|
12
|
+
import * as table from "./deps/sui/table.js";
|
|
13
|
+
import * as vec_set from "./deps/sui/vec_set.js";
|
|
14
|
+
import * as vec_set_1 from "./deps/sui/vec_set.js";
|
|
15
|
+
import * as vec_set_2 from "./deps/sui/vec_set.js";
|
|
16
|
+
import * as balance_3 from "./deps/sui/balance.js";
|
|
17
|
+
import * as table_1 from "./deps/sui/table.js";
|
|
18
|
+
import * as vec_set_3 from "./deps/sui/vec_set.js";
|
|
19
|
+
import * as vec_set_4 from "./deps/sui/vec_set.js";
|
|
20
|
+
const $moduleName = '@waterx/staking::waterx_staking';
|
|
21
|
+
export const Create = new MoveStruct({ name: `${$moduleName}::Create`, fields: {
|
|
22
|
+
vault_id: bcs.Address,
|
|
23
|
+
asset_type: bcs.string()
|
|
24
|
+
} });
|
|
25
|
+
export const AddRewarder = new MoveStruct({ name: `${$moduleName}::AddRewarder`, fields: {
|
|
26
|
+
vault_id: bcs.Address,
|
|
27
|
+
rewarder_id: bcs.Address,
|
|
28
|
+
asset_type: bcs.string(),
|
|
29
|
+
reward_type: bcs.string()
|
|
30
|
+
} });
|
|
31
|
+
export const UpdateFlowRate = new MoveStruct({ name: `${$moduleName}::UpdateFlowRate`, fields: {
|
|
32
|
+
vault_id: bcs.Address,
|
|
33
|
+
rewarder_id: bcs.Address,
|
|
34
|
+
asset_type: bcs.string(),
|
|
35
|
+
reward_type: bcs.string(),
|
|
36
|
+
flow_rate: bcs.u256()
|
|
37
|
+
} });
|
|
38
|
+
export const RewardEarned = new MoveStruct({ name: `${$moduleName}::RewardEarned`, fields: {
|
|
39
|
+
vault_id: bcs.Address,
|
|
40
|
+
rewarder_id: bcs.Address,
|
|
41
|
+
asset_type: bcs.string(),
|
|
42
|
+
reward_type: bcs.string(),
|
|
43
|
+
reward_amount: bcs.u64()
|
|
44
|
+
} });
|
|
45
|
+
export const Deposit = new MoveStruct({ name: `${$moduleName}::Deposit`, fields: {
|
|
46
|
+
vault_id: bcs.Address,
|
|
47
|
+
asset_type: bcs.string(),
|
|
48
|
+
account_address: bcs.Address,
|
|
49
|
+
stake_amount: bcs.u64()
|
|
50
|
+
} });
|
|
51
|
+
export const Redeem = new MoveStruct({ name: `${$moduleName}::Redeem`, fields: {
|
|
52
|
+
vault_id: bcs.Address,
|
|
53
|
+
asset_type: bcs.string(),
|
|
54
|
+
account_address: bcs.Address,
|
|
55
|
+
withdrawal_amount: bcs.u64()
|
|
56
|
+
} });
|
|
57
|
+
export const ClaimReward = new MoveStruct({ name: `${$moduleName}::ClaimReward`, fields: {
|
|
58
|
+
vault_id: bcs.Address,
|
|
59
|
+
rewarder_id: bcs.Address,
|
|
60
|
+
asset_type: bcs.string(),
|
|
61
|
+
reward_type: bcs.string(),
|
|
62
|
+
account_address: bcs.Address,
|
|
63
|
+
reward_amount: bcs.u64(),
|
|
64
|
+
cumulative_reward_amount: bcs.u64()
|
|
65
|
+
} });
|
|
66
|
+
export const StakePosition = new MoveStruct({ name: `${$moduleName}::StakePosition`, fields: {
|
|
67
|
+
stake_amount: bcs.u64(),
|
|
68
|
+
pending_rewarder_sync: bcs.bool()
|
|
69
|
+
} });
|
|
70
|
+
export const RewarderKey = new MoveStruct({ name: `${$moduleName}::RewarderKey<phantom R>`, fields: {
|
|
71
|
+
dummy_field: bcs.bool()
|
|
72
|
+
} });
|
|
73
|
+
export const RewardData = new MoveStruct({ name: `${$moduleName}::RewardData<phantom R>`, fields: {
|
|
74
|
+
unit: double.Double,
|
|
75
|
+
reward: balance.Balance,
|
|
76
|
+
cumulative_reward_amount: bcs.u64()
|
|
77
|
+
} });
|
|
78
|
+
export const Rewarder = new MoveStruct({ name: `${$moduleName}::Rewarder<phantom STAKE, phantom R>`, fields: {
|
|
79
|
+
id: bcs.Address,
|
|
80
|
+
source: balance_1.Balance,
|
|
81
|
+
pool: balance_2.Balance,
|
|
82
|
+
flow_rate: double_1.Double,
|
|
83
|
+
unit: double_2.Double,
|
|
84
|
+
timestamp: bcs.u64(),
|
|
85
|
+
total_stake_snapshot: bcs.u64(),
|
|
86
|
+
reward_table: table.Table
|
|
87
|
+
} });
|
|
88
|
+
export const StakeDataDisplay = new MoveStruct({ name: `${$moduleName}::StakeDataDisplay`, fields: {
|
|
89
|
+
stake_coin_type: bcs.string(),
|
|
90
|
+
reward_coin_type: bcs.string(),
|
|
91
|
+
stake_amount: bcs.u64(),
|
|
92
|
+
claimable_reward_amount: bcs.u64(),
|
|
93
|
+
cumulative_reward_amount: bcs.u64()
|
|
94
|
+
} });
|
|
95
|
+
export const DepositChecker = new MoveStruct({ name: `${$moduleName}::DepositChecker<phantom STAKE>`, fields: {
|
|
96
|
+
account: bcs.Address,
|
|
97
|
+
prev_stake_amount: bcs.u64(),
|
|
98
|
+
rewarder_ids: vec_set.VecSet(bcs.Address)
|
|
99
|
+
} });
|
|
100
|
+
export const WithdrawChecker = new MoveStruct({ name: `${$moduleName}::WithdrawChecker<phantom STAKE>`, fields: {
|
|
101
|
+
account: bcs.Address,
|
|
102
|
+
prev_stake_amount: bcs.u64(),
|
|
103
|
+
rewarder_ids: vec_set_1.VecSet(bcs.Address)
|
|
104
|
+
} });
|
|
105
|
+
export const AdminCap = new MoveStruct({ name: `${$moduleName}::AdminCap`, fields: {
|
|
106
|
+
id: bcs.Address
|
|
107
|
+
} });
|
|
108
|
+
export const StakingPool = new MoveStruct({ name: `${$moduleName}::StakingPool<phantom STAKE>`, fields: {
|
|
109
|
+
id: bcs.Address,
|
|
110
|
+
versions: vec_set_2.VecSet(bcs.u16()),
|
|
111
|
+
stake: balance_3.Balance,
|
|
112
|
+
stake_table: table_1.Table,
|
|
113
|
+
managers: vec_set_3.VecSet(bcs.Address),
|
|
114
|
+
stake_cap: bcs.u64(),
|
|
115
|
+
rewarder_ids: vec_set_4.VecSet(bcs.Address)
|
|
116
|
+
} });
|
|
117
|
+
export function packageVersion(options = {}) {
|
|
118
|
+
const packageAddress = options.package ?? '@waterx/staking';
|
|
119
|
+
return (tx) => tx.moveCall({
|
|
120
|
+
package: packageAddress,
|
|
121
|
+
module: 'waterx_staking',
|
|
122
|
+
function: 'package_version',
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
export function permDepositStake(options = {}) {
|
|
126
|
+
const packageAddress = options.package ?? '@waterx/staking';
|
|
127
|
+
return (tx) => tx.moveCall({
|
|
128
|
+
package: packageAddress,
|
|
129
|
+
module: 'waterx_staking',
|
|
130
|
+
function: 'perm_deposit_stake',
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
export function permRedeemStake(options = {}) {
|
|
134
|
+
const packageAddress = options.package ?? '@waterx/staking';
|
|
135
|
+
return (tx) => tx.moveCall({
|
|
136
|
+
package: packageAddress,
|
|
137
|
+
module: 'waterx_staking',
|
|
138
|
+
function: 'perm_redeem_stake',
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
export function permClaimReward(options = {}) {
|
|
142
|
+
const packageAddress = options.package ?? '@waterx/staking';
|
|
143
|
+
return (tx) => tx.moveCall({
|
|
144
|
+
package: packageAddress,
|
|
145
|
+
module: 'waterx_staking',
|
|
146
|
+
function: 'perm_claim_reward',
|
|
147
|
+
});
|
|
148
|
+
}
|
|
149
|
+
/** === Admin Functions === */
|
|
150
|
+
export function _new(options) {
|
|
151
|
+
const packageAddress = options.package ?? '@waterx/staking';
|
|
152
|
+
const argumentsTypes = [
|
|
153
|
+
null,
|
|
154
|
+
'u64'
|
|
155
|
+
];
|
|
156
|
+
const parameterNames = ["AdminCap", "stakeCap"];
|
|
157
|
+
return (tx) => tx.moveCall({
|
|
158
|
+
package: packageAddress,
|
|
159
|
+
module: 'waterx_staking',
|
|
160
|
+
function: 'new',
|
|
161
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
162
|
+
typeArguments: options.typeArguments
|
|
163
|
+
});
|
|
164
|
+
}
|
|
165
|
+
export function _default(options) {
|
|
166
|
+
const packageAddress = options.package ?? '@waterx/staking';
|
|
167
|
+
const argumentsTypes = [
|
|
168
|
+
null,
|
|
169
|
+
'u64'
|
|
170
|
+
];
|
|
171
|
+
const parameterNames = ["adminCap", "stakeCap"];
|
|
172
|
+
return (tx) => tx.moveCall({
|
|
173
|
+
package: packageAddress,
|
|
174
|
+
module: 'waterx_staking',
|
|
175
|
+
function: 'default',
|
|
176
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
177
|
+
typeArguments: options.typeArguments
|
|
178
|
+
});
|
|
179
|
+
}
|
|
180
|
+
export function addRewarder(options) {
|
|
181
|
+
const packageAddress = options.package ?? '@waterx/staking';
|
|
182
|
+
const argumentsTypes = [
|
|
183
|
+
null,
|
|
184
|
+
null,
|
|
185
|
+
'u64',
|
|
186
|
+
'u64',
|
|
187
|
+
'u64'
|
|
188
|
+
];
|
|
189
|
+
const parameterNames = ["self", "Cap", "flowAmount", "flowInterval", "startTime"];
|
|
190
|
+
return (tx) => tx.moveCall({
|
|
191
|
+
package: packageAddress,
|
|
192
|
+
module: 'waterx_staking',
|
|
193
|
+
function: 'add_rewarder',
|
|
194
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
195
|
+
typeArguments: options.typeArguments
|
|
196
|
+
});
|
|
197
|
+
}
|
|
198
|
+
export function withdrawFromSource(options) {
|
|
199
|
+
const packageAddress = options.package ?? '@waterx/staking';
|
|
200
|
+
const argumentsTypes = [
|
|
201
|
+
null,
|
|
202
|
+
null,
|
|
203
|
+
'0x2::clock::Clock',
|
|
204
|
+
'u64'
|
|
205
|
+
];
|
|
206
|
+
const parameterNames = ["self", "Cap", "amount"];
|
|
207
|
+
return (tx) => tx.moveCall({
|
|
208
|
+
package: packageAddress,
|
|
209
|
+
module: 'waterx_staking',
|
|
210
|
+
function: 'withdraw_from_source',
|
|
211
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
212
|
+
typeArguments: options.typeArguments
|
|
213
|
+
});
|
|
214
|
+
}
|
|
215
|
+
export function setStakeCap(options) {
|
|
216
|
+
const packageAddress = options.package ?? '@waterx/staking';
|
|
217
|
+
const argumentsTypes = [
|
|
218
|
+
null,
|
|
219
|
+
null,
|
|
220
|
+
'u64'
|
|
221
|
+
];
|
|
222
|
+
const parameterNames = ["self", "Cap", "stakeCap"];
|
|
223
|
+
return (tx) => tx.moveCall({
|
|
224
|
+
package: packageAddress,
|
|
225
|
+
module: 'waterx_staking',
|
|
226
|
+
function: 'set_stake_cap',
|
|
227
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
228
|
+
typeArguments: options.typeArguments
|
|
229
|
+
});
|
|
230
|
+
}
|
|
231
|
+
export function addManager(options) {
|
|
232
|
+
const packageAddress = options.package ?? '@waterx/staking';
|
|
233
|
+
const argumentsTypes = [
|
|
234
|
+
null,
|
|
235
|
+
null,
|
|
236
|
+
'address'
|
|
237
|
+
];
|
|
238
|
+
const parameterNames = ["self", "Cap", "manager"];
|
|
239
|
+
return (tx) => tx.moveCall({
|
|
240
|
+
package: packageAddress,
|
|
241
|
+
module: 'waterx_staking',
|
|
242
|
+
function: 'add_manager',
|
|
243
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
244
|
+
typeArguments: options.typeArguments
|
|
245
|
+
});
|
|
246
|
+
}
|
|
247
|
+
export function removeManager(options) {
|
|
248
|
+
const packageAddress = options.package ?? '@waterx/staking';
|
|
249
|
+
const argumentsTypes = [
|
|
250
|
+
null,
|
|
251
|
+
null,
|
|
252
|
+
'address'
|
|
253
|
+
];
|
|
254
|
+
const parameterNames = ["self", "Cap", "manager"];
|
|
255
|
+
return (tx) => tx.moveCall({
|
|
256
|
+
package: packageAddress,
|
|
257
|
+
module: 'waterx_staking',
|
|
258
|
+
function: 'remove_manager',
|
|
259
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
260
|
+
typeArguments: options.typeArguments
|
|
261
|
+
});
|
|
262
|
+
}
|
|
263
|
+
export function addVersion(options) {
|
|
264
|
+
const packageAddress = options.package ?? '@waterx/staking';
|
|
265
|
+
const argumentsTypes = [
|
|
266
|
+
null,
|
|
267
|
+
null,
|
|
268
|
+
'u16'
|
|
269
|
+
];
|
|
270
|
+
const parameterNames = ["self", "Cap", "version"];
|
|
271
|
+
return (tx) => tx.moveCall({
|
|
272
|
+
package: packageAddress,
|
|
273
|
+
module: 'waterx_staking',
|
|
274
|
+
function: 'add_version',
|
|
275
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
276
|
+
typeArguments: options.typeArguments
|
|
277
|
+
});
|
|
278
|
+
}
|
|
279
|
+
export function removeVersion(options) {
|
|
280
|
+
const packageAddress = options.package ?? '@waterx/staking';
|
|
281
|
+
const argumentsTypes = [
|
|
282
|
+
null,
|
|
283
|
+
null,
|
|
284
|
+
'u16'
|
|
285
|
+
];
|
|
286
|
+
const parameterNames = ["self", "Cap", "version"];
|
|
287
|
+
return (tx) => tx.moveCall({
|
|
288
|
+
package: packageAddress,
|
|
289
|
+
module: 'waterx_staking',
|
|
290
|
+
function: 'remove_version',
|
|
291
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
292
|
+
typeArguments: options.typeArguments
|
|
293
|
+
});
|
|
294
|
+
}
|
|
295
|
+
/** === Manager Functions === */
|
|
296
|
+
export function updateFlowRate(options) {
|
|
297
|
+
const packageAddress = options.package ?? '@waterx/staking';
|
|
298
|
+
const argumentsTypes = [
|
|
299
|
+
null,
|
|
300
|
+
'0x2::clock::Clock',
|
|
301
|
+
'u64',
|
|
302
|
+
'u64',
|
|
303
|
+
null
|
|
304
|
+
];
|
|
305
|
+
const parameterNames = ["self", "flowAmount", "flowInterval", "request"];
|
|
306
|
+
return (tx) => tx.moveCall({
|
|
307
|
+
package: packageAddress,
|
|
308
|
+
module: 'waterx_staking',
|
|
309
|
+
function: 'update_flow_rate',
|
|
310
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
311
|
+
typeArguments: options.typeArguments
|
|
312
|
+
});
|
|
313
|
+
}
|
|
314
|
+
export function depositToSourceByManager(options) {
|
|
315
|
+
const packageAddress = options.package ?? '@waterx/staking';
|
|
316
|
+
const argumentsTypes = [
|
|
317
|
+
null,
|
|
318
|
+
'0x2::clock::Clock',
|
|
319
|
+
null,
|
|
320
|
+
'u64',
|
|
321
|
+
null
|
|
322
|
+
];
|
|
323
|
+
const parameterNames = ["self", "coin", "flowInterval", "managerReq"];
|
|
324
|
+
return (tx) => tx.moveCall({
|
|
325
|
+
package: packageAddress,
|
|
326
|
+
module: 'waterx_staking',
|
|
327
|
+
function: 'deposit_to_source_by_manager',
|
|
328
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
329
|
+
typeArguments: options.typeArguments
|
|
330
|
+
});
|
|
331
|
+
}
|
|
332
|
+
/** === Public Functions === */
|
|
333
|
+
export function depositToSource(options) {
|
|
334
|
+
const packageAddress = options.package ?? '@waterx/staking';
|
|
335
|
+
const argumentsTypes = [
|
|
336
|
+
null,
|
|
337
|
+
null
|
|
338
|
+
];
|
|
339
|
+
const parameterNames = ["self", "coin"];
|
|
340
|
+
return (tx) => tx.moveCall({
|
|
341
|
+
package: packageAddress,
|
|
342
|
+
module: 'waterx_staking',
|
|
343
|
+
function: 'deposit_to_source',
|
|
344
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
345
|
+
typeArguments: options.typeArguments
|
|
346
|
+
});
|
|
347
|
+
}
|
|
348
|
+
export function supply(options) {
|
|
349
|
+
const packageAddress = options.package ?? '@waterx/staking';
|
|
350
|
+
const argumentsTypes = [
|
|
351
|
+
null,
|
|
352
|
+
null
|
|
353
|
+
];
|
|
354
|
+
const parameterNames = ["self", "coin"];
|
|
355
|
+
return (tx) => tx.moveCall({
|
|
356
|
+
package: packageAddress,
|
|
357
|
+
module: 'waterx_staking',
|
|
358
|
+
function: 'supply',
|
|
359
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
360
|
+
typeArguments: options.typeArguments
|
|
361
|
+
});
|
|
362
|
+
}
|
|
363
|
+
export function depositToPool(options) {
|
|
364
|
+
const packageAddress = options.package ?? '@waterx/staking';
|
|
365
|
+
const argumentsTypes = [
|
|
366
|
+
null,
|
|
367
|
+
null
|
|
368
|
+
];
|
|
369
|
+
const parameterNames = ["self", "coin"];
|
|
370
|
+
return (tx) => tx.moveCall({
|
|
371
|
+
package: packageAddress,
|
|
372
|
+
module: 'waterx_staking',
|
|
373
|
+
function: 'deposit_to_pool',
|
|
374
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
375
|
+
typeArguments: options.typeArguments
|
|
376
|
+
});
|
|
377
|
+
}
|
|
378
|
+
/**
|
|
379
|
+
* Stakes `stake_amount` of `STAKE` drawn from the caller's wxa account into this
|
|
380
|
+
* distributor. Auth: `acc_req.address()` must hold `PERM_DEPOSIT_STAKE` on
|
|
381
|
+
* `account_id` (owner has all bits). The stake position is keyed by the wxa
|
|
382
|
+
* account's UID-derived address, so delegate-driven deposits credit the same
|
|
383
|
+
* position as the owner.
|
|
384
|
+
*/
|
|
385
|
+
export function deposit(options) {
|
|
386
|
+
const packageAddress = options.package ?? '@waterx/staking';
|
|
387
|
+
const argumentsTypes = [
|
|
388
|
+
null,
|
|
389
|
+
null,
|
|
390
|
+
'0x2::object::ID',
|
|
391
|
+
null,
|
|
392
|
+
'u64',
|
|
393
|
+
'0x2::clock::Clock'
|
|
394
|
+
];
|
|
395
|
+
const parameterNames = ["self", "wxaRegistry", "accountId", "accReq", "stakeAmount"];
|
|
396
|
+
return (tx) => tx.moveCall({
|
|
397
|
+
package: packageAddress,
|
|
398
|
+
module: 'waterx_staking',
|
|
399
|
+
function: 'deposit',
|
|
400
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
401
|
+
typeArguments: options.typeArguments
|
|
402
|
+
});
|
|
403
|
+
}
|
|
404
|
+
export function settleRewarderOnDeposit(options) {
|
|
405
|
+
const packageAddress = options.package ?? '@waterx/staking';
|
|
406
|
+
const argumentsTypes = [
|
|
407
|
+
null,
|
|
408
|
+
null,
|
|
409
|
+
'0x2::clock::Clock'
|
|
410
|
+
];
|
|
411
|
+
const parameterNames = ["checker", "self"];
|
|
412
|
+
return (tx) => tx.moveCall({
|
|
413
|
+
package: packageAddress,
|
|
414
|
+
module: 'waterx_staking',
|
|
415
|
+
function: 'settle_rewarder_on_deposit',
|
|
416
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
417
|
+
typeArguments: options.typeArguments
|
|
418
|
+
});
|
|
419
|
+
}
|
|
420
|
+
export function destroyDepositChecker(options) {
|
|
421
|
+
const packageAddress = options.package ?? '@waterx/staking';
|
|
422
|
+
const argumentsTypes = [
|
|
423
|
+
null
|
|
424
|
+
];
|
|
425
|
+
const parameterNames = ["checker"];
|
|
426
|
+
return (tx) => tx.moveCall({
|
|
427
|
+
package: packageAddress,
|
|
428
|
+
module: 'waterx_staking',
|
|
429
|
+
function: 'destroy_deposit_checker',
|
|
430
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
431
|
+
typeArguments: options.typeArguments
|
|
432
|
+
});
|
|
433
|
+
}
|
|
434
|
+
/**
|
|
435
|
+
* Redeems `withdrawal_amount` of `STAKE` from the caller's stake position back
|
|
436
|
+
* into their wxa account's stored `Balance<STAKE>`. Auth: `acc_req.address()` must
|
|
437
|
+
* hold `PERM_REDEEM_STAKE` on `account_id`. The stake position is keyed by the wxa
|
|
438
|
+
* account's UID-derived address.
|
|
439
|
+
*/
|
|
440
|
+
export function redeem(options) {
|
|
441
|
+
const packageAddress = options.package ?? '@waterx/staking';
|
|
442
|
+
const argumentsTypes = [
|
|
443
|
+
null,
|
|
444
|
+
null,
|
|
445
|
+
'0x2::object::ID',
|
|
446
|
+
null,
|
|
447
|
+
'u64',
|
|
448
|
+
'0x2::clock::Clock'
|
|
449
|
+
];
|
|
450
|
+
const parameterNames = ["self", "wxaRegistry", "accountId", "accReq", "withdrawalAmount"];
|
|
451
|
+
return (tx) => tx.moveCall({
|
|
452
|
+
package: packageAddress,
|
|
453
|
+
module: 'waterx_staking',
|
|
454
|
+
function: 'redeem',
|
|
455
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
456
|
+
typeArguments: options.typeArguments
|
|
457
|
+
});
|
|
458
|
+
}
|
|
459
|
+
export function settleRewarderOnWithdraw(options) {
|
|
460
|
+
const packageAddress = options.package ?? '@waterx/staking';
|
|
461
|
+
const argumentsTypes = [
|
|
462
|
+
null,
|
|
463
|
+
null,
|
|
464
|
+
'0x2::clock::Clock'
|
|
465
|
+
];
|
|
466
|
+
const parameterNames = ["checker", "self"];
|
|
467
|
+
return (tx) => tx.moveCall({
|
|
468
|
+
package: packageAddress,
|
|
469
|
+
module: 'waterx_staking',
|
|
470
|
+
function: 'settle_rewarder_on_withdraw',
|
|
471
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
472
|
+
typeArguments: options.typeArguments
|
|
473
|
+
});
|
|
474
|
+
}
|
|
475
|
+
export function destroyWithdrawChecker(options) {
|
|
476
|
+
const packageAddress = options.package ?? '@waterx/staking';
|
|
477
|
+
const argumentsTypes = [
|
|
478
|
+
null
|
|
479
|
+
];
|
|
480
|
+
const parameterNames = ["checker"];
|
|
481
|
+
return (tx) => tx.moveCall({
|
|
482
|
+
package: packageAddress,
|
|
483
|
+
module: 'waterx_staking',
|
|
484
|
+
function: 'destroy_withdraw_checker',
|
|
485
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
486
|
+
typeArguments: options.typeArguments
|
|
487
|
+
});
|
|
488
|
+
}
|
|
489
|
+
/**
|
|
490
|
+
* Claims any accrued reward `R` for `account_id`'s stake position and credits the
|
|
491
|
+
* resulting `Balance<R>` directly into the wxa account's stored balance via
|
|
492
|
+
* `put<R, WaterXStaking>`. The user can later extract it via the normal
|
|
493
|
+
* `request_withdraw<R>` flow (or restake / reuse it from stored balance). Auth:
|
|
494
|
+
* `request.address()` must hold `PERM_CLAIM_REWARD` on `account_id`. Zero-amount
|
|
495
|
+
* claims are a no-op.
|
|
496
|
+
*/
|
|
497
|
+
export function claim(options) {
|
|
498
|
+
const packageAddress = options.package ?? '@waterx/staking';
|
|
499
|
+
const argumentsTypes = [
|
|
500
|
+
null,
|
|
501
|
+
null,
|
|
502
|
+
'0x2::object::ID',
|
|
503
|
+
null,
|
|
504
|
+
'0x2::clock::Clock'
|
|
505
|
+
];
|
|
506
|
+
const parameterNames = ["self", "wxaRegistry", "accountId", "request"];
|
|
507
|
+
return (tx) => tx.moveCall({
|
|
508
|
+
package: packageAddress,
|
|
509
|
+
module: 'waterx_staking',
|
|
510
|
+
function: 'claim',
|
|
511
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
512
|
+
typeArguments: options.typeArguments
|
|
513
|
+
});
|
|
514
|
+
}
|
|
515
|
+
/** === View Functions === */
|
|
516
|
+
export function id(options) {
|
|
517
|
+
const packageAddress = options.package ?? '@waterx/staking';
|
|
518
|
+
const argumentsTypes = [
|
|
519
|
+
null
|
|
520
|
+
];
|
|
521
|
+
const parameterNames = ["self"];
|
|
522
|
+
return (tx) => tx.moveCall({
|
|
523
|
+
package: packageAddress,
|
|
524
|
+
module: 'waterx_staking',
|
|
525
|
+
function: 'id',
|
|
526
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
527
|
+
typeArguments: options.typeArguments
|
|
528
|
+
});
|
|
529
|
+
}
|
|
530
|
+
export function rewarderIds(options) {
|
|
531
|
+
const packageAddress = options.package ?? '@waterx/staking';
|
|
532
|
+
const argumentsTypes = [
|
|
533
|
+
null
|
|
534
|
+
];
|
|
535
|
+
const parameterNames = ["self"];
|
|
536
|
+
return (tx) => tx.moveCall({
|
|
537
|
+
package: packageAddress,
|
|
538
|
+
module: 'waterx_staking',
|
|
539
|
+
function: 'rewarder_ids',
|
|
540
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
541
|
+
typeArguments: options.typeArguments
|
|
542
|
+
});
|
|
543
|
+
}
|
|
544
|
+
export function rewarderExists(options) {
|
|
545
|
+
const packageAddress = options.package ?? '@waterx/staking';
|
|
546
|
+
const argumentsTypes = [
|
|
547
|
+
null
|
|
548
|
+
];
|
|
549
|
+
const parameterNames = ["self"];
|
|
550
|
+
return (tx) => tx.moveCall({
|
|
551
|
+
package: packageAddress,
|
|
552
|
+
module: 'waterx_staking',
|
|
553
|
+
function: 'rewarder_exists',
|
|
554
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
555
|
+
typeArguments: options.typeArguments
|
|
556
|
+
});
|
|
557
|
+
}
|
|
558
|
+
export function getRewarder(options) {
|
|
559
|
+
const packageAddress = options.package ?? '@waterx/staking';
|
|
560
|
+
const argumentsTypes = [
|
|
561
|
+
null
|
|
562
|
+
];
|
|
563
|
+
const parameterNames = ["self"];
|
|
564
|
+
return (tx) => tx.moveCall({
|
|
565
|
+
package: packageAddress,
|
|
566
|
+
module: 'waterx_staking',
|
|
567
|
+
function: 'get_rewarder',
|
|
568
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
569
|
+
typeArguments: options.typeArguments
|
|
570
|
+
});
|
|
571
|
+
}
|
|
572
|
+
export function rewarderId(options) {
|
|
573
|
+
const packageAddress = options.package ?? '@waterx/staking';
|
|
574
|
+
const argumentsTypes = [
|
|
575
|
+
null
|
|
576
|
+
];
|
|
577
|
+
const parameterNames = ["self"];
|
|
578
|
+
return (tx) => tx.moveCall({
|
|
579
|
+
package: packageAddress,
|
|
580
|
+
module: 'waterx_staking',
|
|
581
|
+
function: 'rewarder_id',
|
|
582
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
583
|
+
typeArguments: options.typeArguments
|
|
584
|
+
});
|
|
585
|
+
}
|
|
586
|
+
export function rewarderSourceAmount(options) {
|
|
587
|
+
const packageAddress = options.package ?? '@waterx/staking';
|
|
588
|
+
const argumentsTypes = [
|
|
589
|
+
null
|
|
590
|
+
];
|
|
591
|
+
const parameterNames = ["self"];
|
|
592
|
+
return (tx) => tx.moveCall({
|
|
593
|
+
package: packageAddress,
|
|
594
|
+
module: 'waterx_staking',
|
|
595
|
+
function: 'rewarder_source_amount',
|
|
596
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
597
|
+
typeArguments: options.typeArguments
|
|
598
|
+
});
|
|
599
|
+
}
|
|
600
|
+
export function rewarderPoolAmount(options) {
|
|
601
|
+
const packageAddress = options.package ?? '@waterx/staking';
|
|
602
|
+
const argumentsTypes = [
|
|
603
|
+
null
|
|
604
|
+
];
|
|
605
|
+
const parameterNames = ["self"];
|
|
606
|
+
return (tx) => tx.moveCall({
|
|
607
|
+
package: packageAddress,
|
|
608
|
+
module: 'waterx_staking',
|
|
609
|
+
function: 'rewarder_pool_amount',
|
|
610
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
611
|
+
typeArguments: options.typeArguments
|
|
612
|
+
});
|
|
613
|
+
}
|
|
614
|
+
export function rewarderFlowRate(options) {
|
|
615
|
+
const packageAddress = options.package ?? '@waterx/staking';
|
|
616
|
+
const argumentsTypes = [
|
|
617
|
+
null
|
|
618
|
+
];
|
|
619
|
+
const parameterNames = ["self"];
|
|
620
|
+
return (tx) => tx.moveCall({
|
|
621
|
+
package: packageAddress,
|
|
622
|
+
module: 'waterx_staking',
|
|
623
|
+
function: 'rewarder_flow_rate',
|
|
624
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
625
|
+
typeArguments: options.typeArguments
|
|
626
|
+
});
|
|
627
|
+
}
|
|
628
|
+
export function rewarderTimestamp(options) {
|
|
629
|
+
const packageAddress = options.package ?? '@waterx/staking';
|
|
630
|
+
const argumentsTypes = [
|
|
631
|
+
null
|
|
632
|
+
];
|
|
633
|
+
const parameterNames = ["self"];
|
|
634
|
+
return (tx) => tx.moveCall({
|
|
635
|
+
package: packageAddress,
|
|
636
|
+
module: 'waterx_staking',
|
|
637
|
+
function: 'rewarder_timestamp',
|
|
638
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
639
|
+
typeArguments: options.typeArguments
|
|
640
|
+
});
|
|
641
|
+
}
|
|
642
|
+
export function rewarderTotalStakeSnapshot(options) {
|
|
643
|
+
const packageAddress = options.package ?? '@waterx/staking';
|
|
644
|
+
const argumentsTypes = [
|
|
645
|
+
null
|
|
646
|
+
];
|
|
647
|
+
const parameterNames = ["self"];
|
|
648
|
+
return (tx) => tx.moveCall({
|
|
649
|
+
package: packageAddress,
|
|
650
|
+
module: 'waterx_staking',
|
|
651
|
+
function: 'rewarder_total_stake_snapshot',
|
|
652
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
653
|
+
typeArguments: options.typeArguments
|
|
654
|
+
});
|
|
655
|
+
}
|
|
656
|
+
export function stakeExists(options) {
|
|
657
|
+
const packageAddress = options.package ?? '@waterx/staking';
|
|
658
|
+
const argumentsTypes = [
|
|
659
|
+
null,
|
|
660
|
+
'address'
|
|
661
|
+
];
|
|
662
|
+
const parameterNames = ["self", "account"];
|
|
663
|
+
return (tx) => tx.moveCall({
|
|
664
|
+
package: packageAddress,
|
|
665
|
+
module: 'waterx_staking',
|
|
666
|
+
function: 'stake_exists',
|
|
667
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
668
|
+
typeArguments: options.typeArguments
|
|
669
|
+
});
|
|
670
|
+
}
|
|
671
|
+
export function totalStakeAmount(options) {
|
|
672
|
+
const packageAddress = options.package ?? '@waterx/staking';
|
|
673
|
+
const argumentsTypes = [
|
|
674
|
+
null
|
|
675
|
+
];
|
|
676
|
+
const parameterNames = ["self"];
|
|
677
|
+
return (tx) => tx.moveCall({
|
|
678
|
+
package: packageAddress,
|
|
679
|
+
module: 'waterx_staking',
|
|
680
|
+
function: 'total_stake_amount',
|
|
681
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
682
|
+
typeArguments: options.typeArguments
|
|
683
|
+
});
|
|
684
|
+
}
|
|
685
|
+
export function realtimeRewardAmount(options) {
|
|
686
|
+
const packageAddress = options.package ?? '@waterx/staking';
|
|
687
|
+
const argumentsTypes = [
|
|
688
|
+
null,
|
|
689
|
+
'address',
|
|
690
|
+
'0x2::clock::Clock'
|
|
691
|
+
];
|
|
692
|
+
const parameterNames = ["self", "account"];
|
|
693
|
+
return (tx) => tx.moveCall({
|
|
694
|
+
package: packageAddress,
|
|
695
|
+
module: 'waterx_staking',
|
|
696
|
+
function: 'realtime_reward_amount',
|
|
697
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
698
|
+
typeArguments: options.typeArguments
|
|
699
|
+
});
|
|
700
|
+
}
|
|
701
|
+
export function withdrawableAmount(options) {
|
|
702
|
+
const packageAddress = options.package ?? '@waterx/staking';
|
|
703
|
+
const argumentsTypes = [
|
|
704
|
+
null,
|
|
705
|
+
'address'
|
|
706
|
+
];
|
|
707
|
+
const parameterNames = ["self", "account"];
|
|
708
|
+
return (tx) => tx.moveCall({
|
|
709
|
+
package: packageAddress,
|
|
710
|
+
module: 'waterx_staking',
|
|
711
|
+
function: 'withdrawable_amount',
|
|
712
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
713
|
+
typeArguments: options.typeArguments
|
|
714
|
+
});
|
|
715
|
+
}
|
|
716
|
+
export function getStakeData(options) {
|
|
717
|
+
const packageAddress = options.package ?? '@waterx/staking';
|
|
718
|
+
const argumentsTypes = [
|
|
719
|
+
null,
|
|
720
|
+
'address',
|
|
721
|
+
'0x2::clock::Clock'
|
|
722
|
+
];
|
|
723
|
+
const parameterNames = ["self", "account"];
|
|
724
|
+
return (tx) => tx.moveCall({
|
|
725
|
+
package: packageAddress,
|
|
726
|
+
module: 'waterx_staking',
|
|
727
|
+
function: 'get_stake_data',
|
|
728
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
729
|
+
typeArguments: options.typeArguments
|
|
730
|
+
});
|
|
731
|
+
}
|