@waterx/sdk 3.0.1 → 3.0.3
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/dist/cjs/package.json +3 -0
- package/dist/cjs/src/account/account-request.d.ts +9 -0
- package/dist/cjs/src/account/account-request.js +20 -0
- package/dist/cjs/src/account/account.d.ts +158 -0
- package/dist/cjs/src/account/account.js +238 -0
- package/dist/cjs/src/account/client.d.ts +42 -0
- package/dist/cjs/src/account/client.js +18 -0
- package/dist/cjs/src/account/config.d.ts +151 -0
- package/dist/cjs/src/account/config.js +9 -0
- package/dist/cjs/src/account/constants.d.ts +5 -0
- package/dist/cjs/src/account/constants.js +8 -0
- package/dist/cjs/src/account/fetch/referral.d.ts +15 -0
- package/dist/cjs/src/account/fetch/referral.js +56 -0
- package/dist/cjs/src/account/fetch/simulate.d.ts +34 -0
- package/dist/cjs/src/account/fetch/simulate.js +49 -0
- package/dist/cjs/src/account/funding/balance.d.ts +32 -0
- package/dist/cjs/src/account/funding/balance.js +100 -0
- package/dist/cjs/src/account/funding/consolidate.d.ts +46 -0
- package/dist/cjs/src/account/funding/consolidate.js +143 -0
- package/dist/cjs/src/account/funding/credit.d.ts +129 -0
- package/dist/cjs/src/account/funding/credit.js +252 -0
- package/dist/cjs/src/account/funding/custody.d.ts +57 -0
- package/dist/cjs/src/account/funding/custody.js +139 -0
- package/dist/cjs/src/account/funding/wormhole.d.ts +86 -0
- package/dist/cjs/src/account/funding/wormhole.js +166 -0
- package/dist/cjs/src/account/index.d.ts +29 -0
- package/dist/cjs/src/account/index.js +45 -0
- package/dist/cjs/src/account/referral.d.ts +21 -0
- package/dist/cjs/src/account/referral.js +78 -0
- package/dist/cjs/src/account/waterx-account.d.ts +31 -0
- package/dist/cjs/src/account/waterx-account.js +29 -0
- package/dist/cjs/src/base-client.d.ts +74 -0
- package/dist/cjs/src/base-client.js +101 -0
- package/dist/cjs/src/constants.d.ts +32 -0
- package/dist/cjs/src/constants.js +41 -0
- package/dist/cjs/src/generated/bucket_v2_framework/account.d.ts +107 -0
- package/dist/cjs/src/generated/bucket_v2_framework/account.js +141 -0
- package/dist/cjs/src/generated/bucket_v2_framework/deps/std/type_name.d.ts +17 -0
- package/dist/cjs/src/generated/bucket_v2_framework/deps/std/type_name.js +22 -0
- package/dist/cjs/src/generated/bucket_v2_framework/deps/sui/balance.d.ts +12 -0
- package/dist/cjs/src/generated/bucket_v2_framework/deps/sui/balance.js +17 -0
- package/dist/cjs/src/generated/bucket_v2_framework/deps/sui/vec_map.d.ts +36 -0
- package/dist/cjs/src/generated/bucket_v2_framework/deps/sui/vec_map.js +31 -0
- package/dist/cjs/src/generated/bucket_v2_framework/deps/sui/vec_set.d.ts +16 -0
- package/dist/cjs/src/generated/bucket_v2_framework/deps/sui/vec_set.js +22 -0
- package/dist/cjs/src/generated/bucket_v2_framework/double.d.ts +384 -0
- package/dist/cjs/src/generated/bucket_v2_framework/double.js +504 -0
- package/dist/cjs/src/generated/bucket_v2_framework/float.d.ts +364 -0
- package/dist/cjs/src/generated/bucket_v2_framework/float.js +476 -0
- package/dist/cjs/src/generated/bucket_v2_framework/liability.d.ts +171 -0
- package/dist/cjs/src/generated/bucket_v2_framework/liability.js +192 -0
- package/dist/cjs/src/generated/bucket_v2_framework/linked_table.d.ts +384 -0
- package/dist/cjs/src/generated/bucket_v2_framework/linked_table.js +405 -0
- package/dist/cjs/src/generated/bucket_v2_framework/sheet.d.ts +424 -0
- package/dist/cjs/src/generated/bucket_v2_framework/sheet.js +395 -0
- package/dist/cjs/src/generated/native_custody/custody_vault.d.ts +586 -0
- package/dist/cjs/src/generated/native_custody/custody_vault.js +555 -0
- package/dist/cjs/src/generated/native_custody/deps/bucket_v2_framework/float.d.ts +8 -0
- package/dist/cjs/src/generated/native_custody/deps/bucket_v2_framework/float.js +13 -0
- package/dist/cjs/src/generated/native_custody/deps/bucket_v2_framework/liability.d.ts +11 -0
- package/dist/cjs/src/generated/native_custody/deps/bucket_v2_framework/liability.js +16 -0
- package/dist/cjs/src/generated/native_custody/deps/bucket_v2_framework/sheet.d.ts +49 -0
- package/dist/cjs/src/generated/native_custody/deps/bucket_v2_framework/sheet.js +52 -0
- package/dist/cjs/src/generated/native_custody/deps/std/type_name.d.ts +17 -0
- package/dist/cjs/src/generated/native_custody/deps/std/type_name.js +22 -0
- package/dist/cjs/src/generated/native_custody/deps/sui/balance.d.ts +12 -0
- package/dist/cjs/src/generated/native_custody/deps/sui/balance.js +17 -0
- package/dist/cjs/src/generated/native_custody/deps/sui/vec_map.d.ts +36 -0
- package/dist/cjs/src/generated/native_custody/deps/sui/vec_map.js +31 -0
- package/dist/cjs/src/generated/native_custody/deps/sui/vec_set.d.ts +16 -0
- package/dist/cjs/src/generated/native_custody/deps/sui/vec_set.js +22 -0
- package/dist/cjs/src/generated/native_custody/events.d.ts +36 -0
- package/dist/cjs/src/generated/native_custody/events.js +71 -0
- package/dist/cjs/src/generated/pyth_sponsor_rule/deps/sui/balance.d.ts +12 -0
- package/dist/cjs/src/generated/pyth_sponsor_rule/deps/sui/balance.js +17 -0
- package/dist/cjs/src/generated/pyth_sponsor_rule/pyth_sponsor_rule.d.ts +68 -0
- package/dist/cjs/src/generated/pyth_sponsor_rule/pyth_sponsor_rule.js +113 -0
- package/dist/cjs/src/generated/utils/index.d.ts +30 -0
- package/dist/cjs/src/generated/utils/index.js +168 -0
- package/dist/cjs/src/generated/waterx_account/account.d.ts +1906 -0
- package/dist/cjs/src/generated/waterx_account/account.js +1929 -0
- package/dist/cjs/src/generated/waterx_account/deps/bucket_v2_framework/liability.d.ts +11 -0
- package/dist/cjs/src/generated/waterx_account/deps/bucket_v2_framework/liability.js +16 -0
- package/dist/cjs/src/generated/waterx_account/deps/bucket_v2_framework/sheet.d.ts +49 -0
- package/dist/cjs/src/generated/waterx_account/deps/bucket_v2_framework/sheet.js +52 -0
- package/dist/cjs/src/generated/waterx_account/deps/std/type_name.d.ts +17 -0
- package/dist/cjs/src/generated/waterx_account/deps/std/type_name.js +22 -0
- package/dist/cjs/src/generated/waterx_account/deps/sui/balance.d.ts +12 -0
- package/dist/cjs/src/generated/waterx_account/deps/sui/balance.js +17 -0
- package/dist/cjs/src/generated/waterx_account/deps/sui/object_table.d.ts +17 -0
- package/dist/cjs/src/generated/waterx_account/deps/sui/object_table.js +22 -0
- package/dist/cjs/src/generated/waterx_account/deps/sui/table.d.ts +29 -0
- package/dist/cjs/src/generated/waterx_account/deps/sui/table.js +34 -0
- package/dist/cjs/src/generated/waterx_account/deps/sui/vec_map.d.ts +36 -0
- package/dist/cjs/src/generated/waterx_account/deps/sui/vec_map.js +31 -0
- package/dist/cjs/src/generated/waterx_account/deps/sui/vec_set.d.ts +16 -0
- package/dist/cjs/src/generated/waterx_account/deps/sui/vec_set.js +22 -0
- package/dist/cjs/src/generated/waterx_account/direct_rule.d.ts +77 -0
- package/dist/cjs/src/generated/waterx_account/direct_rule.js +83 -0
- package/dist/cjs/src/generated/waterx_account/events.d.ts +190 -0
- package/dist/cjs/src/generated/waterx_account/events.js +173 -0
- package/dist/cjs/src/generated/waterx_account/version.d.ts +10 -0
- package/dist/cjs/src/generated/waterx_account/version.js +11 -0
- package/dist/cjs/src/generated/waterx_constant_rule/constant_rule.d.ts +68 -0
- package/dist/cjs/src/generated/waterx_constant_rule/constant_rule.js +97 -0
- package/dist/cjs/src/generated/waterx_constant_rule/deps/bucket_v2_framework/float.d.ts +8 -0
- package/dist/cjs/src/generated/waterx_constant_rule/deps/bucket_v2_framework/float.js +13 -0
- package/dist/cjs/src/generated/waterx_constant_rule/deps/sui/vec_map.d.ts +36 -0
- package/dist/cjs/src/generated/waterx_constant_rule/deps/sui/vec_map.js +31 -0
- package/dist/cjs/src/generated/waterx_credit/credit_registry.d.ts +708 -0
- package/dist/cjs/src/generated/waterx_credit/credit_registry.js +728 -0
- package/dist/cjs/src/generated/waterx_credit/deps/std/type_name.d.ts +17 -0
- package/dist/cjs/src/generated/waterx_credit/deps/std/type_name.js +22 -0
- package/dist/cjs/src/generated/waterx_credit/deps/sui/table.d.ts +29 -0
- package/dist/cjs/src/generated/waterx_credit/deps/sui/table.js +34 -0
- package/dist/cjs/src/generated/waterx_credit/deps/sui/vec_map.d.ts +36 -0
- package/dist/cjs/src/generated/waterx_credit/deps/sui/vec_map.js +31 -0
- package/dist/cjs/src/generated/waterx_credit/deps/sui/vec_set.d.ts +16 -0
- package/dist/cjs/src/generated/waterx_credit/deps/sui/vec_set.js +22 -0
- package/dist/cjs/src/generated/waterx_credit/limited_supply.d.ts +107 -0
- package/dist/cjs/src/generated/waterx_credit/limited_supply.js +143 -0
- package/dist/cjs/src/generated/waterx_oracle/aggregator.d.ts +211 -0
- package/dist/cjs/src/generated/waterx_oracle/aggregator.js +258 -0
- package/dist/cjs/src/generated/waterx_oracle/collector.d.ts +119 -0
- package/dist/cjs/src/generated/waterx_oracle/collector.js +147 -0
- package/dist/cjs/src/generated/waterx_oracle/deps/bucket_v2_framework/float.d.ts +8 -0
- package/dist/cjs/src/generated/waterx_oracle/deps/bucket_v2_framework/float.js +13 -0
- package/dist/cjs/src/generated/waterx_oracle/deps/std/type_name.d.ts +17 -0
- package/dist/cjs/src/generated/waterx_oracle/deps/std/type_name.js +22 -0
- package/dist/cjs/src/generated/waterx_oracle/deps/sui/vec_map.d.ts +36 -0
- package/dist/cjs/src/generated/waterx_oracle/deps/sui/vec_map.js +31 -0
- package/dist/cjs/src/generated/waterx_oracle/deps/sui/vec_set.d.ts +16 -0
- package/dist/cjs/src/generated/waterx_oracle/deps/sui/vec_set.js +22 -0
- package/dist/cjs/src/generated/waterx_oracle/oracle.d.ts +304 -0
- package/dist/cjs/src/generated/waterx_oracle/oracle.js +381 -0
- package/dist/cjs/src/generated/waterx_oracle/version.d.ts +10 -0
- package/dist/cjs/src/generated/waterx_oracle/version.js +11 -0
- package/dist/cjs/src/generated/waterx_perp/account_data.d.ts +269 -0
- package/dist/cjs/src/generated/waterx_perp/account_data.js +340 -0
- package/dist/cjs/src/generated/waterx_perp/admin.d.ts +19 -0
- package/dist/cjs/src/generated/waterx_perp/admin.js +26 -0
- package/dist/cjs/src/generated/waterx_perp/deps/bucket_v2_framework/double.d.ts +8 -0
- package/dist/cjs/src/generated/waterx_perp/deps/bucket_v2_framework/double.js +13 -0
- package/dist/cjs/src/generated/waterx_perp/deps/bucket_v2_framework/float.d.ts +8 -0
- package/dist/cjs/src/generated/waterx_perp/deps/bucket_v2_framework/float.js +13 -0
- package/dist/cjs/src/generated/waterx_perp/deps/bucket_v2_framework/liability.d.ts +11 -0
- package/dist/cjs/src/generated/waterx_perp/deps/bucket_v2_framework/liability.js +16 -0
- package/dist/cjs/src/generated/waterx_perp/deps/bucket_v2_framework/linked_table.d.ts +8 -0
- package/dist/cjs/src/generated/waterx_perp/deps/bucket_v2_framework/linked_table.js +21 -0
- package/dist/cjs/src/generated/waterx_perp/deps/bucket_v2_framework/sheet.d.ts +49 -0
- package/dist/cjs/src/generated/waterx_perp/deps/bucket_v2_framework/sheet.js +52 -0
- package/dist/cjs/src/generated/waterx_perp/deps/std/type_name.d.ts +17 -0
- package/dist/cjs/src/generated/waterx_perp/deps/std/type_name.js +22 -0
- package/dist/cjs/src/generated/waterx_perp/deps/sui/balance.d.ts +15 -0
- package/dist/cjs/src/generated/waterx_perp/deps/sui/balance.js +20 -0
- package/dist/cjs/src/generated/waterx_perp/deps/sui/coin.d.ts +14 -0
- package/dist/cjs/src/generated/waterx_perp/deps/sui/coin.js +51 -0
- package/dist/cjs/src/generated/waterx_perp/deps/sui/vec_map.d.ts +36 -0
- package/dist/cjs/src/generated/waterx_perp/deps/sui/vec_map.js +31 -0
- package/dist/cjs/src/generated/waterx_perp/deps/sui/vec_set.d.ts +16 -0
- package/dist/cjs/src/generated/waterx_perp/deps/sui/vec_set.js +22 -0
- package/dist/cjs/src/generated/waterx_perp/events.d.ts +1283 -0
- package/dist/cjs/src/generated/waterx_perp/events.js +990 -0
- package/dist/cjs/src/generated/waterx_perp/global_config.d.ts +775 -0
- package/dist/cjs/src/generated/waterx_perp/global_config.js +918 -0
- package/dist/cjs/src/generated/waterx_perp/keyed_big_vector.d.ts +553 -0
- package/dist/cjs/src/generated/waterx_perp/keyed_big_vector.js +626 -0
- package/dist/cjs/src/generated/waterx_perp/lp_pool.d.ts +1648 -0
- package/dist/cjs/src/generated/waterx_perp/lp_pool.js +1630 -0
- package/dist/cjs/src/generated/waterx_perp/market_config.d.ts +733 -0
- package/dist/cjs/src/generated/waterx_perp/market_config.js +871 -0
- package/dist/cjs/src/generated/waterx_perp/math.d.ts +63 -0
- package/dist/cjs/src/generated/waterx_perp/math.js +70 -0
- package/dist/cjs/src/generated/waterx_perp/memo.d.ts +251 -0
- package/dist/cjs/src/generated/waterx_perp/memo.js +360 -0
- package/dist/cjs/src/generated/waterx_perp/order_book.d.ts +290 -0
- package/dist/cjs/src/generated/waterx_perp/order_book.js +388 -0
- package/dist/cjs/src/generated/waterx_perp/position.d.ts +1005 -0
- package/dist/cjs/src/generated/waterx_perp/position.js +1200 -0
- package/dist/cjs/src/generated/waterx_perp/request.d.ts +544 -0
- package/dist/cjs/src/generated/waterx_perp/request.js +609 -0
- package/dist/cjs/src/generated/waterx_perp/response.d.ts +247 -0
- package/dist/cjs/src/generated/waterx_perp/response.js +331 -0
- package/dist/cjs/src/generated/waterx_perp/trading.d.ts +2945 -0
- package/dist/cjs/src/generated/waterx_perp/trading.js +2616 -0
- package/dist/cjs/src/generated/waterx_perp/version.d.ts +10 -0
- package/dist/cjs/src/generated/waterx_perp/version.js +11 -0
- package/dist/cjs/src/generated/waterx_perp/witness.d.ts +18 -0
- package/dist/cjs/src/generated/waterx_perp/witness.js +25 -0
- package/dist/cjs/src/generated/waterx_perp_view/deps/std/type_name.d.ts +17 -0
- package/dist/cjs/src/generated/waterx_perp_view/deps/std/type_name.js +22 -0
- package/dist/cjs/src/generated/waterx_perp_view/view.d.ts +447 -0
- package/dist/cjs/src/generated/waterx_perp_view/view.js +459 -0
- package/dist/cjs/src/generated/waterx_prediction/account_data.d.ts +344 -0
- package/dist/cjs/src/generated/waterx_prediction/account_data.js +470 -0
- package/dist/cjs/src/generated/waterx_prediction/admin.d.ts +7 -0
- package/dist/cjs/src/generated/waterx_prediction/admin.js +12 -0
- package/dist/cjs/src/generated/waterx_prediction/deps/bucket_v2_framework/linked_table.d.ts +8 -0
- package/dist/cjs/src/generated/waterx_prediction/deps/bucket_v2_framework/linked_table.js +21 -0
- package/dist/cjs/src/generated/waterx_prediction/deps/sui/balance.d.ts +12 -0
- package/dist/cjs/src/generated/waterx_prediction/deps/sui/balance.js +17 -0
- package/dist/cjs/src/generated/waterx_prediction/deps/sui/table.d.ts +29 -0
- package/dist/cjs/src/generated/waterx_prediction/deps/sui/table.js +34 -0
- package/dist/cjs/src/generated/waterx_prediction/deps/sui/vec_set.d.ts +16 -0
- package/dist/cjs/src/generated/waterx_prediction/deps/sui/vec_set.js +22 -0
- package/dist/cjs/src/generated/waterx_prediction/events.d.ts +288 -0
- package/dist/cjs/src/generated/waterx_prediction/events.js +254 -0
- package/dist/cjs/src/generated/waterx_prediction/global_config.d.ts +121 -0
- package/dist/cjs/src/generated/waterx_prediction/global_config.js +186 -0
- package/dist/cjs/src/generated/waterx_prediction/order.d.ts +233 -0
- package/dist/cjs/src/generated/waterx_prediction/order.js +339 -0
- package/dist/cjs/src/generated/waterx_prediction/outcome.d.ts +58 -0
- package/dist/cjs/src/generated/waterx_prediction/outcome.js +82 -0
- package/dist/cjs/src/generated/waterx_prediction/position.d.ts +175 -0
- package/dist/cjs/src/generated/waterx_prediction/position.js +232 -0
- package/dist/cjs/src/generated/waterx_prediction/version.d.ts +10 -0
- package/dist/cjs/src/generated/waterx_prediction/version.js +11 -0
- package/dist/cjs/src/generated/waterx_prediction/view.d.ts +418 -0
- package/dist/cjs/src/generated/waterx_prediction/view.js +492 -0
- package/dist/cjs/src/generated/waterx_prediction/waterx_prediction.d.ts +1858 -0
- package/dist/cjs/src/generated/waterx_prediction/waterx_prediction.js +1972 -0
- package/dist/cjs/src/generated/waterx_pyth_rule/deps/sui/vec_map.d.ts +36 -0
- package/dist/cjs/src/generated/waterx_pyth_rule/deps/sui/vec_map.js +31 -0
- package/dist/cjs/src/generated/waterx_pyth_rule/pyth_rule.d.ts +192 -0
- package/dist/cjs/src/generated/waterx_pyth_rule/pyth_rule.js +214 -0
- package/dist/cjs/src/generated/waterx_referral/deps/sui/table.d.ts +29 -0
- package/dist/cjs/src/generated/waterx_referral/deps/sui/table.js +34 -0
- package/dist/cjs/src/generated/waterx_referral/deps/sui/vec_set.d.ts +16 -0
- package/dist/cjs/src/generated/waterx_referral/deps/sui/vec_set.js +22 -0
- package/dist/cjs/src/generated/waterx_referral/referral_table.d.ts +171 -0
- package/dist/cjs/src/generated/waterx_referral/referral_table.js +239 -0
- package/dist/cjs/src/generated/waterx_staking/deps/bucket_v2_framework/double.d.ts +8 -0
- package/dist/cjs/src/generated/waterx_staking/deps/bucket_v2_framework/double.js +13 -0
- package/dist/cjs/src/generated/waterx_staking/deps/sui/balance.d.ts +12 -0
- package/dist/cjs/src/generated/waterx_staking/deps/sui/balance.js +17 -0
- package/dist/cjs/src/generated/waterx_staking/deps/sui/table.d.ts +29 -0
- package/dist/cjs/src/generated/waterx_staking/deps/sui/table.js +34 -0
- package/dist/cjs/src/generated/waterx_staking/deps/sui/vec_set.d.ts +16 -0
- package/dist/cjs/src/generated/waterx_staking/deps/sui/vec_set.js +22 -0
- package/dist/cjs/src/generated/waterx_staking/waterx_staking.d.ts +746 -0
- package/dist/cjs/src/generated/waterx_staking/waterx_staking.js +797 -0
- package/dist/cjs/src/generated/waterx_staking/witness.d.ts +16 -0
- package/dist/cjs/src/generated/waterx_staking/witness.js +21 -0
- package/dist/cjs/src/generated/waterx_supra_rule/deps/sui/vec_map.d.ts +36 -0
- package/dist/cjs/src/generated/waterx_supra_rule/deps/sui/vec_map.js +31 -0
- package/dist/cjs/src/generated/waterx_supra_rule/supra_rule.d.ts +158 -0
- package/dist/cjs/src/generated/waterx_supra_rule/supra_rule.js +189 -0
- package/dist/cjs/src/generated/withdrawal_queue/deps/bucket_v2_framework/float.d.ts +8 -0
- package/dist/cjs/src/generated/withdrawal_queue/deps/bucket_v2_framework/float.js +13 -0
- package/dist/cjs/src/generated/withdrawal_queue/deps/bucket_v2_framework/linked_table.d.ts +8 -0
- package/dist/cjs/src/generated/withdrawal_queue/deps/bucket_v2_framework/linked_table.js +21 -0
- package/dist/cjs/src/generated/withdrawal_queue/deps/std/type_name.d.ts +17 -0
- package/dist/cjs/src/generated/withdrawal_queue/deps/std/type_name.js +22 -0
- package/dist/cjs/src/generated/withdrawal_queue/deps/sui/balance.d.ts +12 -0
- package/dist/cjs/src/generated/withdrawal_queue/deps/sui/balance.js +17 -0
- package/dist/cjs/src/generated/withdrawal_queue/deps/sui/vec_map.d.ts +36 -0
- package/dist/cjs/src/generated/withdrawal_queue/deps/sui/vec_map.js +31 -0
- package/dist/cjs/src/generated/withdrawal_queue/deps/sui/vec_set.d.ts +16 -0
- package/dist/cjs/src/generated/withdrawal_queue/deps/sui/vec_set.js +22 -0
- package/dist/cjs/src/generated/withdrawal_queue/withdrawal_queue.d.ts +923 -0
- package/dist/cjs/src/generated/withdrawal_queue/withdrawal_queue.js +965 -0
- package/dist/cjs/src/generated/wlp/wlp.d.ts +28 -0
- package/dist/cjs/src/generated/wlp/wlp.js +37 -0
- package/dist/cjs/src/generated/wormhole_bridge/deps/sui/table.d.ts +29 -0
- package/dist/cjs/src/generated/wormhole_bridge/deps/sui/table.js +34 -0
- package/dist/cjs/src/generated/wormhole_bridge/deps/sui/vec_map.d.ts +36 -0
- package/dist/cjs/src/generated/wormhole_bridge/deps/sui/vec_map.js +31 -0
- package/dist/cjs/src/generated/wormhole_bridge/deps/sui/vec_set.d.ts +16 -0
- package/dist/cjs/src/generated/wormhole_bridge/deps/sui/vec_set.js +22 -0
- package/dist/cjs/src/generated/wormhole_bridge/deps/wormhole_sdk/consumed_vaas.d.ts +12 -0
- package/dist/cjs/src/generated/wormhole_bridge/deps/wormhole_sdk/consumed_vaas.js +45 -0
- package/dist/cjs/src/generated/wormhole_bridge/deps/wormhole_sdk/emitter.d.ts +14 -0
- package/dist/cjs/src/generated/wormhole_bridge/deps/wormhole_sdk/emitter.js +19 -0
- package/dist/cjs/src/generated/wormhole_bridge/deps/wormhole_sdk/set.d.ts +16 -0
- package/dist/cjs/src/generated/wormhole_bridge/deps/wormhole_sdk/set.js +51 -0
- package/dist/cjs/src/generated/wormhole_bridge/events.d.ts +32 -0
- package/dist/cjs/src/generated/wormhole_bridge/events.js +31 -0
- package/dist/cjs/src/generated/wormhole_bridge/wormhole_bridge.d.ts +638 -0
- package/dist/cjs/src/generated/wormhole_bridge/wormhole_bridge.js +692 -0
- package/dist/cjs/src/oracle/aggregate.d.ts +74 -0
- package/dist/cjs/src/oracle/aggregate.js +118 -0
- package/dist/cjs/src/oracle/config.d.ts +99 -0
- package/dist/cjs/src/oracle/config.js +26 -0
- package/dist/cjs/src/oracle/host.d.ts +32 -0
- package/dist/cjs/src/oracle/host.js +11 -0
- package/dist/cjs/src/oracle/index.d.ts +16 -0
- package/dist/cjs/src/oracle/index.js +31 -0
- package/dist/cjs/src/oracle/pyth.d.ts +52 -0
- package/dist/cjs/src/oracle/pyth.js +227 -0
- package/dist/cjs/src/oracle/rules/constant-rule.d.ts +9 -0
- package/dist/cjs/src/oracle/rules/constant-rule.js +17 -0
- package/dist/cjs/src/oracle/rules/pyth-rule.d.ts +11 -0
- package/dist/cjs/src/oracle/rules/pyth-rule.js +23 -0
- package/dist/cjs/src/oracle/rules/sponsor.d.ts +28 -0
- package/dist/cjs/src/oracle/rules/sponsor.js +52 -0
- package/dist/cjs/src/oracle/rules/supra-rule.d.ts +11 -0
- package/dist/cjs/src/oracle/rules/supra-rule.js +25 -0
- package/dist/cjs/src/perp/client.d.ts +78 -0
- package/dist/cjs/src/perp/client.js +112 -0
- package/dist/cjs/src/perp/config-view.d.ts +102 -0
- package/dist/cjs/src/perp/config-view.js +178 -0
- package/dist/cjs/src/perp/config.d.ts +126 -0
- package/dist/cjs/src/perp/config.js +119 -0
- package/dist/cjs/src/perp/constants.d.ts +49 -0
- package/dist/cjs/src/perp/constants.js +79 -0
- package/dist/cjs/src/perp/fetch/account.d.ts +43 -0
- package/dist/cjs/src/perp/fetch/account.js +69 -0
- package/dist/cjs/src/perp/fetch/bridge.d.ts +90 -0
- package/dist/cjs/src/perp/fetch/bridge.js +131 -0
- package/dist/cjs/src/perp/fetch/custody.d.ts +32 -0
- package/dist/cjs/src/perp/fetch/custody.js +66 -0
- package/dist/cjs/src/perp/fetch/market.d.ts +30 -0
- package/dist/cjs/src/perp/fetch/market.js +75 -0
- package/dist/cjs/src/perp/fetch/positions.d.ts +70 -0
- package/dist/cjs/src/perp/fetch/positions.js +195 -0
- package/dist/cjs/src/perp/fetch/simulate.d.ts +12 -0
- package/dist/cjs/src/perp/fetch/simulate.js +21 -0
- package/dist/cjs/src/perp/fetch.d.ts +23 -0
- package/dist/cjs/src/perp/fetch.js +39 -0
- package/dist/cjs/src/perp/index.d.ts +29 -0
- package/dist/cjs/src/perp/index.js +183 -0
- package/dist/cjs/src/perp/tx-builders/common.d.ts +83 -0
- package/dist/cjs/src/perp/tx-builders/common.js +76 -0
- package/dist/cjs/src/perp/tx-builders/credit.d.ts +65 -0
- package/dist/cjs/src/perp/tx-builders/credit.js +67 -0
- package/dist/cjs/src/perp/tx-builders/rewards.d.ts +30 -0
- package/dist/cjs/src/perp/tx-builders/rewards.js +37 -0
- package/dist/cjs/src/perp/tx-builders/trading.d.ts +51 -0
- package/dist/cjs/src/perp/tx-builders/trading.js +71 -0
- package/dist/cjs/src/perp/tx-builders/wlp.d.ts +90 -0
- package/dist/cjs/src/perp/tx-builders/wlp.js +126 -0
- package/dist/cjs/src/perp/tx-builders.d.ts +23 -0
- package/dist/cjs/src/perp/tx-builders.js +45 -0
- package/dist/cjs/src/perp/user/index.d.ts +8 -0
- package/dist/cjs/src/perp/user/index.js +24 -0
- package/dist/cjs/src/perp/user/order.d.ts +89 -0
- package/dist/cjs/src/perp/user/order.js +175 -0
- package/dist/cjs/src/perp/user/staking.d.ts +54 -0
- package/dist/cjs/src/perp/user/staking.js +147 -0
- package/dist/cjs/src/perp/user/trading.d.ts +119 -0
- package/dist/cjs/src/perp/user/trading.js +310 -0
- package/dist/cjs/src/perp/user/wlp.d.ts +58 -0
- package/dist/cjs/src/perp/user/wlp.js +139 -0
- package/dist/cjs/src/prediction/account.d.ts +96 -0
- package/dist/cjs/src/prediction/account.js +212 -0
- package/dist/cjs/src/prediction/admin.d.ts +47 -0
- package/dist/cjs/src/prediction/admin.js +116 -0
- package/dist/cjs/src/prediction/bcs.d.ts +28 -0
- package/dist/cjs/src/prediction/bcs.js +189 -0
- package/dist/cjs/src/prediction/client.d.ts +45 -0
- package/dist/cjs/src/prediction/client.js +112 -0
- package/dist/cjs/src/prediction/config.d.ts +74 -0
- package/dist/cjs/src/prediction/config.js +86 -0
- package/dist/cjs/src/prediction/constants.d.ts +44 -0
- package/dist/cjs/src/prediction/constants.js +49 -0
- package/dist/cjs/src/prediction/fetch.d.ts +82 -0
- package/dist/cjs/src/prediction/fetch.js +294 -0
- package/dist/cjs/src/prediction/gift-link.d.ts +6 -0
- package/dist/cjs/src/prediction/gift-link.js +16 -0
- package/dist/cjs/src/prediction/gift.d.ts +223 -0
- package/dist/cjs/src/prediction/gift.js +465 -0
- package/dist/cjs/src/prediction/index.d.ts +29 -0
- package/dist/cjs/src/prediction/index.js +154 -0
- package/dist/cjs/src/prediction/prediction.d.ts +149 -0
- package/dist/cjs/src/prediction/prediction.js +410 -0
- package/dist/cjs/src/prediction/tx-builders.d.ts +44 -0
- package/dist/cjs/src/prediction/tx-builders.js +56 -0
- package/dist/cjs/src/prediction/types.d.ts +95 -0
- package/dist/cjs/src/prediction/types.js +2 -0
- package/dist/cjs/src/prediction/user/account.d.ts +2 -0
- package/dist/cjs/src/prediction/user/account.js +17 -0
- package/dist/cjs/src/prediction/user/admin.d.ts +6 -0
- package/dist/cjs/src/prediction/user/admin.js +19 -0
- package/dist/cjs/src/prediction/user/gift.d.ts +2 -0
- package/dist/cjs/src/prediction/user/gift.js +24 -0
- package/dist/cjs/src/prediction/user/index.d.ts +5 -0
- package/dist/cjs/src/prediction/user/index.js +60 -0
- package/dist/cjs/src/prediction/user/keeper.d.ts +2 -0
- package/dist/cjs/src/prediction/user/keeper.js +13 -0
- package/dist/cjs/src/prediction/user/order.d.ts +2 -0
- package/dist/cjs/src/prediction/user/order.js +6 -0
- package/dist/cjs/src/prediction/user/position.d.ts +2 -0
- package/dist/cjs/src/prediction/user/position.js +11 -0
- package/dist/cjs/src/prediction/utils/bcs.d.ts +6 -0
- package/dist/cjs/src/prediction/utils/bcs.js +29 -0
- package/dist/cjs/src/prediction/utils/index.d.ts +8 -0
- package/dist/cjs/src/prediction/utils/index.js +31 -0
- package/dist/cjs/src/prediction/utils.d.ts +30 -0
- package/dist/cjs/src/prediction/utils.js +200 -0
- package/dist/cjs/src/sdk.d.ts +22 -0
- package/dist/cjs/src/sdk.js +62 -0
- package/dist/cjs/src/unified-client.d.ts +402 -0
- package/dist/cjs/src/unified-client.js +218 -0
- package/dist/cjs/src/utils/config.d.ts +11 -0
- package/dist/cjs/src/utils/config.js +19 -0
- package/dist/cjs/src/utils/math.d.ts +287 -0
- package/dist/cjs/src/utils/math.js +469 -0
- package/package.json +119 -31
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
/**************************************************************
|
|
2
|
+
* THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
|
|
3
|
+
**************************************************************/
|
|
4
|
+
import { MoveStruct, type RawTransactionArgument } from '../utils/index.ts';
|
|
5
|
+
import { type Transaction } from '@mysten/sui/transactions';
|
|
6
|
+
export declare const GlobalConfig: MoveStruct<{
|
|
7
|
+
id: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
8
|
+
/** Allowed package versions for keeper-gated operations. */
|
|
9
|
+
allowed_versions: MoveStruct<any, any>;
|
|
10
|
+
keepers: MoveStruct<any, any>;
|
|
11
|
+
}, "@waterx/prediction::global_config::GlobalConfig">;
|
|
12
|
+
export interface AssertVersionArguments {
|
|
13
|
+
globalConfig: RawTransactionArgument<string>;
|
|
14
|
+
}
|
|
15
|
+
export interface AssertVersionOptions {
|
|
16
|
+
package?: string;
|
|
17
|
+
arguments: AssertVersionArguments | [
|
|
18
|
+
globalConfig: RawTransactionArgument<string>
|
|
19
|
+
];
|
|
20
|
+
}
|
|
21
|
+
export declare function assertVersion(options: AssertVersionOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
22
|
+
export interface AllowVersionArguments {
|
|
23
|
+
globalConfig: RawTransactionArgument<string>;
|
|
24
|
+
_: RawTransactionArgument<string>;
|
|
25
|
+
v: RawTransactionArgument<number>;
|
|
26
|
+
}
|
|
27
|
+
export interface AllowVersionOptions {
|
|
28
|
+
package?: string;
|
|
29
|
+
arguments: AllowVersionArguments | [
|
|
30
|
+
globalConfig: RawTransactionArgument<string>,
|
|
31
|
+
_: RawTransactionArgument<string>,
|
|
32
|
+
v: RawTransactionArgument<number>
|
|
33
|
+
];
|
|
34
|
+
}
|
|
35
|
+
export declare function allowVersion(options: AllowVersionOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
36
|
+
export interface DisallowVersionArguments {
|
|
37
|
+
globalConfig: RawTransactionArgument<string>;
|
|
38
|
+
_: RawTransactionArgument<string>;
|
|
39
|
+
v: RawTransactionArgument<number>;
|
|
40
|
+
}
|
|
41
|
+
export interface DisallowVersionOptions {
|
|
42
|
+
package?: string;
|
|
43
|
+
arguments: DisallowVersionArguments | [
|
|
44
|
+
globalConfig: RawTransactionArgument<string>,
|
|
45
|
+
_: RawTransactionArgument<string>,
|
|
46
|
+
v: RawTransactionArgument<number>
|
|
47
|
+
];
|
|
48
|
+
}
|
|
49
|
+
export declare function disallowVersion(options: DisallowVersionOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
50
|
+
export interface AllowedVersionsArguments {
|
|
51
|
+
globalConfig: RawTransactionArgument<string>;
|
|
52
|
+
}
|
|
53
|
+
export interface AllowedVersionsOptions {
|
|
54
|
+
package?: string;
|
|
55
|
+
arguments: AllowedVersionsArguments | [
|
|
56
|
+
globalConfig: RawTransactionArgument<string>
|
|
57
|
+
];
|
|
58
|
+
}
|
|
59
|
+
export declare function allowedVersions(options: AllowedVersionsOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
60
|
+
export interface AddKeeperArguments {
|
|
61
|
+
globalConfig: RawTransactionArgument<string>;
|
|
62
|
+
_: RawTransactionArgument<string>;
|
|
63
|
+
keeper: RawTransactionArgument<string>;
|
|
64
|
+
}
|
|
65
|
+
export interface AddKeeperOptions {
|
|
66
|
+
package?: string;
|
|
67
|
+
arguments: AddKeeperArguments | [
|
|
68
|
+
globalConfig: RawTransactionArgument<string>,
|
|
69
|
+
_: RawTransactionArgument<string>,
|
|
70
|
+
keeper: RawTransactionArgument<string>
|
|
71
|
+
];
|
|
72
|
+
}
|
|
73
|
+
/** Admin configures which backend addresses may settle external order work. */
|
|
74
|
+
export declare function addKeeper(options: AddKeeperOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
75
|
+
export interface RemoveKeeperArguments {
|
|
76
|
+
globalConfig: RawTransactionArgument<string>;
|
|
77
|
+
_: RawTransactionArgument<string>;
|
|
78
|
+
keeper: RawTransactionArgument<string>;
|
|
79
|
+
}
|
|
80
|
+
export interface RemoveKeeperOptions {
|
|
81
|
+
package?: string;
|
|
82
|
+
arguments: RemoveKeeperArguments | [
|
|
83
|
+
globalConfig: RawTransactionArgument<string>,
|
|
84
|
+
_: RawTransactionArgument<string>,
|
|
85
|
+
keeper: RawTransactionArgument<string>
|
|
86
|
+
];
|
|
87
|
+
}
|
|
88
|
+
/** Admin removes a backend keeper. */
|
|
89
|
+
export declare function removeKeeper(options: RemoveKeeperOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
90
|
+
export interface IsKeeperArguments {
|
|
91
|
+
globalConfig: RawTransactionArgument<string>;
|
|
92
|
+
keeper: RawTransactionArgument<string>;
|
|
93
|
+
}
|
|
94
|
+
export interface IsKeeperOptions {
|
|
95
|
+
package?: string;
|
|
96
|
+
arguments: IsKeeperArguments | [
|
|
97
|
+
globalConfig: RawTransactionArgument<string>,
|
|
98
|
+
keeper: RawTransactionArgument<string>
|
|
99
|
+
];
|
|
100
|
+
}
|
|
101
|
+
export declare function isKeeper(options: IsKeeperOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
102
|
+
export interface KeeperCountArguments {
|
|
103
|
+
globalConfig: RawTransactionArgument<string>;
|
|
104
|
+
}
|
|
105
|
+
export interface KeeperCountOptions {
|
|
106
|
+
package?: string;
|
|
107
|
+
arguments: KeeperCountArguments | [
|
|
108
|
+
globalConfig: RawTransactionArgument<string>
|
|
109
|
+
];
|
|
110
|
+
}
|
|
111
|
+
export declare function keeperCount(options: KeeperCountOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
112
|
+
export interface KeeperAddressesArguments {
|
|
113
|
+
globalConfig: RawTransactionArgument<string>;
|
|
114
|
+
}
|
|
115
|
+
export interface KeeperAddressesOptions {
|
|
116
|
+
package?: string;
|
|
117
|
+
arguments: KeeperAddressesArguments | [
|
|
118
|
+
globalConfig: RawTransactionArgument<string>
|
|
119
|
+
];
|
|
120
|
+
}
|
|
121
|
+
export declare function keeperAddresses(options: KeeperAddressesOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.GlobalConfig = void 0;
|
|
37
|
+
exports.assertVersion = assertVersion;
|
|
38
|
+
exports.allowVersion = allowVersion;
|
|
39
|
+
exports.disallowVersion = disallowVersion;
|
|
40
|
+
exports.allowedVersions = allowedVersions;
|
|
41
|
+
exports.addKeeper = addKeeper;
|
|
42
|
+
exports.removeKeeper = removeKeeper;
|
|
43
|
+
exports.isKeeper = isKeeper;
|
|
44
|
+
exports.keeperCount = keeperCount;
|
|
45
|
+
exports.keeperAddresses = keeperAddresses;
|
|
46
|
+
/**************************************************************
|
|
47
|
+
* THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
|
|
48
|
+
**************************************************************/
|
|
49
|
+
const index_ts_1 = require("../utils/index.js");
|
|
50
|
+
const bcs_1 = require("@mysten/sui/bcs");
|
|
51
|
+
const vec_set = __importStar(require("./deps/sui/vec_set.js"));
|
|
52
|
+
const $moduleName = '@waterx/prediction::global_config';
|
|
53
|
+
exports.GlobalConfig = new index_ts_1.MoveStruct({ name: `${$moduleName}::GlobalConfig`, fields: {
|
|
54
|
+
id: bcs_1.bcs.Address,
|
|
55
|
+
/** Allowed package versions for keeper-gated operations. */
|
|
56
|
+
allowed_versions: vec_set.VecSet(bcs_1.bcs.u16()),
|
|
57
|
+
keepers: vec_set.VecSet(bcs_1.bcs.Address)
|
|
58
|
+
} });
|
|
59
|
+
function assertVersion(options) {
|
|
60
|
+
const packageAddress = options.package ?? '@waterx/prediction';
|
|
61
|
+
const argumentsTypes = [
|
|
62
|
+
null
|
|
63
|
+
];
|
|
64
|
+
const parameterNames = ["globalConfig"];
|
|
65
|
+
return (tx) => tx.moveCall({
|
|
66
|
+
package: packageAddress,
|
|
67
|
+
module: 'global_config',
|
|
68
|
+
function: 'assert_version',
|
|
69
|
+
arguments: (0, index_ts_1.normalizeMoveArguments)(options.arguments, argumentsTypes, parameterNames),
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
function allowVersion(options) {
|
|
73
|
+
const packageAddress = options.package ?? '@waterx/prediction';
|
|
74
|
+
const argumentsTypes = [
|
|
75
|
+
null,
|
|
76
|
+
null,
|
|
77
|
+
'u16'
|
|
78
|
+
];
|
|
79
|
+
const parameterNames = ["globalConfig", "_", "v"];
|
|
80
|
+
return (tx) => tx.moveCall({
|
|
81
|
+
package: packageAddress,
|
|
82
|
+
module: 'global_config',
|
|
83
|
+
function: 'allow_version',
|
|
84
|
+
arguments: (0, index_ts_1.normalizeMoveArguments)(options.arguments, argumentsTypes, parameterNames),
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
function disallowVersion(options) {
|
|
88
|
+
const packageAddress = options.package ?? '@waterx/prediction';
|
|
89
|
+
const argumentsTypes = [
|
|
90
|
+
null,
|
|
91
|
+
null,
|
|
92
|
+
'u16'
|
|
93
|
+
];
|
|
94
|
+
const parameterNames = ["globalConfig", "_", "v"];
|
|
95
|
+
return (tx) => tx.moveCall({
|
|
96
|
+
package: packageAddress,
|
|
97
|
+
module: 'global_config',
|
|
98
|
+
function: 'disallow_version',
|
|
99
|
+
arguments: (0, index_ts_1.normalizeMoveArguments)(options.arguments, argumentsTypes, parameterNames),
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
function allowedVersions(options) {
|
|
103
|
+
const packageAddress = options.package ?? '@waterx/prediction';
|
|
104
|
+
const argumentsTypes = [
|
|
105
|
+
null
|
|
106
|
+
];
|
|
107
|
+
const parameterNames = ["globalConfig"];
|
|
108
|
+
return (tx) => tx.moveCall({
|
|
109
|
+
package: packageAddress,
|
|
110
|
+
module: 'global_config',
|
|
111
|
+
function: 'allowed_versions',
|
|
112
|
+
arguments: (0, index_ts_1.normalizeMoveArguments)(options.arguments, argumentsTypes, parameterNames),
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
/** Admin configures which backend addresses may settle external order work. */
|
|
116
|
+
function addKeeper(options) {
|
|
117
|
+
const packageAddress = options.package ?? '@waterx/prediction';
|
|
118
|
+
const argumentsTypes = [
|
|
119
|
+
null,
|
|
120
|
+
null,
|
|
121
|
+
'address'
|
|
122
|
+
];
|
|
123
|
+
const parameterNames = ["globalConfig", "_", "keeper"];
|
|
124
|
+
return (tx) => tx.moveCall({
|
|
125
|
+
package: packageAddress,
|
|
126
|
+
module: 'global_config',
|
|
127
|
+
function: 'add_keeper',
|
|
128
|
+
arguments: (0, index_ts_1.normalizeMoveArguments)(options.arguments, argumentsTypes, parameterNames),
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
/** Admin removes a backend keeper. */
|
|
132
|
+
function removeKeeper(options) {
|
|
133
|
+
const packageAddress = options.package ?? '@waterx/prediction';
|
|
134
|
+
const argumentsTypes = [
|
|
135
|
+
null,
|
|
136
|
+
null,
|
|
137
|
+
'address'
|
|
138
|
+
];
|
|
139
|
+
const parameterNames = ["globalConfig", "_", "keeper"];
|
|
140
|
+
return (tx) => tx.moveCall({
|
|
141
|
+
package: packageAddress,
|
|
142
|
+
module: 'global_config',
|
|
143
|
+
function: 'remove_keeper',
|
|
144
|
+
arguments: (0, index_ts_1.normalizeMoveArguments)(options.arguments, argumentsTypes, parameterNames),
|
|
145
|
+
});
|
|
146
|
+
}
|
|
147
|
+
function isKeeper(options) {
|
|
148
|
+
const packageAddress = options.package ?? '@waterx/prediction';
|
|
149
|
+
const argumentsTypes = [
|
|
150
|
+
null,
|
|
151
|
+
'address'
|
|
152
|
+
];
|
|
153
|
+
const parameterNames = ["globalConfig", "keeper"];
|
|
154
|
+
return (tx) => tx.moveCall({
|
|
155
|
+
package: packageAddress,
|
|
156
|
+
module: 'global_config',
|
|
157
|
+
function: 'is_keeper',
|
|
158
|
+
arguments: (0, index_ts_1.normalizeMoveArguments)(options.arguments, argumentsTypes, parameterNames),
|
|
159
|
+
});
|
|
160
|
+
}
|
|
161
|
+
function keeperCount(options) {
|
|
162
|
+
const packageAddress = options.package ?? '@waterx/prediction';
|
|
163
|
+
const argumentsTypes = [
|
|
164
|
+
null
|
|
165
|
+
];
|
|
166
|
+
const parameterNames = ["globalConfig"];
|
|
167
|
+
return (tx) => tx.moveCall({
|
|
168
|
+
package: packageAddress,
|
|
169
|
+
module: 'global_config',
|
|
170
|
+
function: 'keeper_count',
|
|
171
|
+
arguments: (0, index_ts_1.normalizeMoveArguments)(options.arguments, argumentsTypes, parameterNames),
|
|
172
|
+
});
|
|
173
|
+
}
|
|
174
|
+
function keeperAddresses(options) {
|
|
175
|
+
const packageAddress = options.package ?? '@waterx/prediction';
|
|
176
|
+
const argumentsTypes = [
|
|
177
|
+
null
|
|
178
|
+
];
|
|
179
|
+
const parameterNames = ["globalConfig"];
|
|
180
|
+
return (tx) => tx.moveCall({
|
|
181
|
+
package: packageAddress,
|
|
182
|
+
module: 'global_config',
|
|
183
|
+
function: 'keeper_addresses',
|
|
184
|
+
arguments: (0, index_ts_1.normalizeMoveArguments)(options.arguments, argumentsTypes, parameterNames),
|
|
185
|
+
});
|
|
186
|
+
}
|
|
@@ -0,0 +1,233 @@
|
|
|
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<{
|
|
11
|
+
order_id: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
12
|
+
kind: MoveEnum<{
|
|
13
|
+
Open: null;
|
|
14
|
+
Close: null;
|
|
15
|
+
}, "@waterx/prediction::order::OrderKind">;
|
|
16
|
+
/**
|
|
17
|
+
* Account that funded the order and owns pending-order cancellation / refund
|
|
18
|
+
* rights.
|
|
19
|
+
*/
|
|
20
|
+
account_id: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
21
|
+
/** Account that receives the position after an open order is filled. */
|
|
22
|
+
receiver_account_id: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
23
|
+
market_id: import("@mysten/sui/bcs").BcsType<number[], Iterable<number> & {
|
|
24
|
+
length: number;
|
|
25
|
+
}, string>;
|
|
26
|
+
selection: MoveEnum<{
|
|
27
|
+
No: null;
|
|
28
|
+
Yes: null;
|
|
29
|
+
}, "@waterx/prediction::position::Selection">;
|
|
30
|
+
/** `Some(position_id)` only for close orders. */
|
|
31
|
+
position_id: import("@mysten/sui/bcs").BcsType<string | null, string | number | bigint | null | undefined, "Option<u64>">;
|
|
32
|
+
/** Open-order spend escrowed in `MarketRegistry.balance`. */
|
|
33
|
+
max_spend: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
34
|
+
min_shares: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
35
|
+
price_cap: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
36
|
+
/** Close-order slippage floor. */
|
|
37
|
+
min_proceeds: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
38
|
+
expiry_ts: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
39
|
+
/** Earliest timestamp at which the account owner may self-cancel. */
|
|
40
|
+
self_cancel_after_ts: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
41
|
+
created_ts: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
42
|
+
by_admin: import("@mysten/sui/bcs").BcsType<boolean, boolean, "bool">;
|
|
43
|
+
}, "@waterx/prediction::order::Order">;
|
|
44
|
+
export interface OrderIdArguments {
|
|
45
|
+
order: TransactionArgument;
|
|
46
|
+
}
|
|
47
|
+
export interface OrderIdOptions {
|
|
48
|
+
package?: string;
|
|
49
|
+
arguments: OrderIdArguments | [
|
|
50
|
+
order: TransactionArgument
|
|
51
|
+
];
|
|
52
|
+
}
|
|
53
|
+
export declare function orderId(options: OrderIdOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
54
|
+
export interface KindArguments {
|
|
55
|
+
order: TransactionArgument;
|
|
56
|
+
}
|
|
57
|
+
export interface KindOptions {
|
|
58
|
+
package?: string;
|
|
59
|
+
arguments: KindArguments | [
|
|
60
|
+
order: TransactionArgument
|
|
61
|
+
];
|
|
62
|
+
}
|
|
63
|
+
export declare function kind(options: KindOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
64
|
+
export interface AccountIdArguments {
|
|
65
|
+
order: TransactionArgument;
|
|
66
|
+
}
|
|
67
|
+
export interface AccountIdOptions {
|
|
68
|
+
package?: string;
|
|
69
|
+
arguments: AccountIdArguments | [
|
|
70
|
+
order: TransactionArgument
|
|
71
|
+
];
|
|
72
|
+
}
|
|
73
|
+
export declare function accountId(options: AccountIdOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
74
|
+
export interface ReceiverAccountIdArguments {
|
|
75
|
+
order: TransactionArgument;
|
|
76
|
+
}
|
|
77
|
+
export interface ReceiverAccountIdOptions {
|
|
78
|
+
package?: string;
|
|
79
|
+
arguments: ReceiverAccountIdArguments | [
|
|
80
|
+
order: TransactionArgument
|
|
81
|
+
];
|
|
82
|
+
}
|
|
83
|
+
export declare function receiverAccountId(options: ReceiverAccountIdOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
84
|
+
export interface MarketIdArguments {
|
|
85
|
+
order: TransactionArgument;
|
|
86
|
+
}
|
|
87
|
+
export interface MarketIdOptions {
|
|
88
|
+
package?: string;
|
|
89
|
+
arguments: MarketIdArguments | [
|
|
90
|
+
order: TransactionArgument
|
|
91
|
+
];
|
|
92
|
+
}
|
|
93
|
+
export declare function marketId(options: MarketIdOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
94
|
+
export interface SelectionArguments {
|
|
95
|
+
order: TransactionArgument;
|
|
96
|
+
}
|
|
97
|
+
export interface SelectionOptions {
|
|
98
|
+
package?: string;
|
|
99
|
+
arguments: SelectionArguments | [
|
|
100
|
+
order: TransactionArgument
|
|
101
|
+
];
|
|
102
|
+
}
|
|
103
|
+
export declare function selection(options: SelectionOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
104
|
+
export interface PositionIdArguments {
|
|
105
|
+
order: TransactionArgument;
|
|
106
|
+
}
|
|
107
|
+
export interface PositionIdOptions {
|
|
108
|
+
package?: string;
|
|
109
|
+
arguments: PositionIdArguments | [
|
|
110
|
+
order: TransactionArgument
|
|
111
|
+
];
|
|
112
|
+
}
|
|
113
|
+
export declare function positionId(options: PositionIdOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
114
|
+
export interface MaxSpendArguments {
|
|
115
|
+
order: TransactionArgument;
|
|
116
|
+
}
|
|
117
|
+
export interface MaxSpendOptions {
|
|
118
|
+
package?: string;
|
|
119
|
+
arguments: MaxSpendArguments | [
|
|
120
|
+
order: TransactionArgument
|
|
121
|
+
];
|
|
122
|
+
}
|
|
123
|
+
export declare function maxSpend(options: MaxSpendOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
124
|
+
export interface MinSharesArguments {
|
|
125
|
+
order: TransactionArgument;
|
|
126
|
+
}
|
|
127
|
+
export interface MinSharesOptions {
|
|
128
|
+
package?: string;
|
|
129
|
+
arguments: MinSharesArguments | [
|
|
130
|
+
order: TransactionArgument
|
|
131
|
+
];
|
|
132
|
+
}
|
|
133
|
+
export declare function minShares(options: MinSharesOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
134
|
+
export interface PriceCapArguments {
|
|
135
|
+
order: TransactionArgument;
|
|
136
|
+
}
|
|
137
|
+
export interface PriceCapOptions {
|
|
138
|
+
package?: string;
|
|
139
|
+
arguments: PriceCapArguments | [
|
|
140
|
+
order: TransactionArgument
|
|
141
|
+
];
|
|
142
|
+
}
|
|
143
|
+
export declare function priceCap(options: PriceCapOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
144
|
+
export interface MinProceedsArguments {
|
|
145
|
+
order: TransactionArgument;
|
|
146
|
+
}
|
|
147
|
+
export interface MinProceedsOptions {
|
|
148
|
+
package?: string;
|
|
149
|
+
arguments: MinProceedsArguments | [
|
|
150
|
+
order: TransactionArgument
|
|
151
|
+
];
|
|
152
|
+
}
|
|
153
|
+
export declare function minProceeds(options: MinProceedsOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
154
|
+
export interface ExpiryTsArguments {
|
|
155
|
+
order: TransactionArgument;
|
|
156
|
+
}
|
|
157
|
+
export interface ExpiryTsOptions {
|
|
158
|
+
package?: string;
|
|
159
|
+
arguments: ExpiryTsArguments | [
|
|
160
|
+
order: TransactionArgument
|
|
161
|
+
];
|
|
162
|
+
}
|
|
163
|
+
export declare function expiryTs(options: ExpiryTsOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
164
|
+
export interface SelfCancelAfterTsArguments {
|
|
165
|
+
order: TransactionArgument;
|
|
166
|
+
}
|
|
167
|
+
export interface SelfCancelAfterTsOptions {
|
|
168
|
+
package?: string;
|
|
169
|
+
arguments: SelfCancelAfterTsArguments | [
|
|
170
|
+
order: TransactionArgument
|
|
171
|
+
];
|
|
172
|
+
}
|
|
173
|
+
export declare function selfCancelAfterTs(options: SelfCancelAfterTsOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
174
|
+
export interface CreatedTsArguments {
|
|
175
|
+
order: TransactionArgument;
|
|
176
|
+
}
|
|
177
|
+
export interface CreatedTsOptions {
|
|
178
|
+
package?: string;
|
|
179
|
+
arguments: CreatedTsArguments | [
|
|
180
|
+
order: TransactionArgument
|
|
181
|
+
];
|
|
182
|
+
}
|
|
183
|
+
export declare function createdTs(options: CreatedTsOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
184
|
+
export interface ByAdminArguments {
|
|
185
|
+
order: TransactionArgument;
|
|
186
|
+
}
|
|
187
|
+
export interface ByAdminOptions {
|
|
188
|
+
package?: string;
|
|
189
|
+
arguments: ByAdminArguments | [
|
|
190
|
+
order: TransactionArgument
|
|
191
|
+
];
|
|
192
|
+
}
|
|
193
|
+
export declare function byAdmin(options: ByAdminOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
194
|
+
export interface IsOpenArguments {
|
|
195
|
+
order: TransactionArgument;
|
|
196
|
+
}
|
|
197
|
+
export interface IsOpenOptions {
|
|
198
|
+
package?: string;
|
|
199
|
+
arguments: IsOpenArguments | [
|
|
200
|
+
order: TransactionArgument
|
|
201
|
+
];
|
|
202
|
+
}
|
|
203
|
+
export declare function isOpen(options: IsOpenOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
204
|
+
export interface IsCloseArguments {
|
|
205
|
+
order: TransactionArgument;
|
|
206
|
+
}
|
|
207
|
+
export interface IsCloseOptions {
|
|
208
|
+
package?: string;
|
|
209
|
+
arguments: IsCloseArguments | [
|
|
210
|
+
order: TransactionArgument
|
|
211
|
+
];
|
|
212
|
+
}
|
|
213
|
+
export declare function isClose(options: IsCloseOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
214
|
+
export interface KindIsOpenArguments {
|
|
215
|
+
kind: TransactionArgument;
|
|
216
|
+
}
|
|
217
|
+
export interface KindIsOpenOptions {
|
|
218
|
+
package?: string;
|
|
219
|
+
arguments: KindIsOpenArguments | [
|
|
220
|
+
kind: TransactionArgument
|
|
221
|
+
];
|
|
222
|
+
}
|
|
223
|
+
export declare function kindIsOpen(options: KindIsOpenOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
224
|
+
export interface KindIsCloseArguments {
|
|
225
|
+
kind: TransactionArgument;
|
|
226
|
+
}
|
|
227
|
+
export interface KindIsCloseOptions {
|
|
228
|
+
package?: string;
|
|
229
|
+
arguments: KindIsCloseArguments | [
|
|
230
|
+
kind: TransactionArgument
|
|
231
|
+
];
|
|
232
|
+
}
|
|
233
|
+
export declare function kindIsClose(options: KindIsCloseOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|