@waterx/sdk 3.0.1 → 3.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/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 +56 -0
- package/dist/cjs/src/prediction/client.js +128 -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 +242 -0
- package/dist/cjs/src/prediction/gift.js +490 -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/dist/src/prediction/client.d.ts +11 -0
- package/dist/src/prediction/client.js +16 -0
- package/dist/src/prediction/gift.d.ts +19 -0
- package/dist/src/prediction/gift.js +26 -1
- package/package.json +119 -31
|
@@ -0,0 +1,2945 @@
|
|
|
1
|
+
/**************************************************************
|
|
2
|
+
* THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
|
|
3
|
+
**************************************************************/
|
|
4
|
+
/**
|
|
5
|
+
* Core trading engine for WaterX Perp DEX.
|
|
6
|
+
*
|
|
7
|
+
* User-side path uses a hot-potato `TradingRequest<C_TOKEN>` (no abilities),
|
|
8
|
+
* consumed in the same PTB by `trading::execute`. `execute` does the work inline
|
|
9
|
+
* and returns droppable `TradingResponse` receipts — user payouts route through
|
|
10
|
+
* `wxa_account::put`, not back out as a `Coin<C_TOKEN>`.
|
|
11
|
+
*
|
|
12
|
+
* PTB flow:
|
|
13
|
+
*
|
|
14
|
+
* 1. let request = trading::place_order_request(...);
|
|
15
|
+
* 2. // External rules add witnesses: my_rule::check(&mut request, ...);
|
|
16
|
+
* 3. let responses = trading::execute(global_config, wxa_registry,
|
|
17
|
+
* market_registry, ticker, pool, request, oracle, clock, ctx);
|
|
18
|
+
*/
|
|
19
|
+
import { MoveStruct, type RawTransactionArgument } from '../utils/index.ts';
|
|
20
|
+
import { type Transaction, type TransactionArgument } from '@mysten/sui/transactions';
|
|
21
|
+
export declare const Market: MoveStruct<{
|
|
22
|
+
id: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
23
|
+
/** Per-market configuration and state. */
|
|
24
|
+
config: MoveStruct<{
|
|
25
|
+
id: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
26
|
+
symbol: import("@mysten/sui/bcs").BcsType<string, string, "string">;
|
|
27
|
+
is_paused: import("@mysten/sui/bcs").BcsType<boolean, boolean, "bool">;
|
|
28
|
+
max_leverage_bps: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
29
|
+
min_coll_value: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
30
|
+
trading_fee: MoveStruct<{
|
|
31
|
+
value: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u128">;
|
|
32
|
+
}, "bucket_v2_framework::float::Float">;
|
|
33
|
+
max_impact_fee: MoveStruct<{
|
|
34
|
+
value: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u128">;
|
|
35
|
+
}, "bucket_v2_framework::float::Float">;
|
|
36
|
+
allocated_lp_exposure_bps: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
37
|
+
impact_fee_curvature: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
38
|
+
impact_fee_scale: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
39
|
+
maintenance_margin: MoveStruct<{
|
|
40
|
+
value: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u128">;
|
|
41
|
+
}, "bucket_v2_framework::float::Float">;
|
|
42
|
+
max_long_oi: MoveStruct<{
|
|
43
|
+
value: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u128">;
|
|
44
|
+
}, "bucket_v2_framework::float::Float">;
|
|
45
|
+
max_short_oi: MoveStruct<{
|
|
46
|
+
value: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u128">;
|
|
47
|
+
}, "bucket_v2_framework::float::Float">;
|
|
48
|
+
cooldown_ms: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
49
|
+
order_price_tick: MoveStruct<{
|
|
50
|
+
value: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u128">;
|
|
51
|
+
}, "bucket_v2_framework::float::Float">;
|
|
52
|
+
max_pre_orders: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
53
|
+
basic_funding_rate: MoveStruct<{
|
|
54
|
+
value: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u128">;
|
|
55
|
+
}, "bucket_v2_framework::float::Float">;
|
|
56
|
+
funding_interval_ms: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
57
|
+
request_checklist: import("@mysten/sui/bcs").BcsType<{
|
|
58
|
+
name: string;
|
|
59
|
+
}[], Iterable<{
|
|
60
|
+
name: string;
|
|
61
|
+
}> & {
|
|
62
|
+
length: number;
|
|
63
|
+
}, string>;
|
|
64
|
+
position_locker: MoveStruct<any, any>;
|
|
65
|
+
long_oi: MoveStruct<{
|
|
66
|
+
value: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u128">;
|
|
67
|
+
}, "bucket_v2_framework::float::Float">;
|
|
68
|
+
short_oi: MoveStruct<{
|
|
69
|
+
value: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u128">;
|
|
70
|
+
}, "bucket_v2_framework::float::Float">;
|
|
71
|
+
long_avg_entry_price: MoveStruct<{
|
|
72
|
+
value: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u128">;
|
|
73
|
+
}, "bucket_v2_framework::float::Float">;
|
|
74
|
+
short_avg_entry_price: MoveStruct<{
|
|
75
|
+
value: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u128">;
|
|
76
|
+
}, "bucket_v2_framework::float::Float">;
|
|
77
|
+
next_position_id: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
78
|
+
next_order_id: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
79
|
+
last_funding_timestamp: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
80
|
+
cumulative_funding_sign: import("@mysten/sui/bcs").BcsType<boolean, boolean, "bool">;
|
|
81
|
+
cumulative_funding_index: MoveStruct<{
|
|
82
|
+
value: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u256">;
|
|
83
|
+
}, "bucket_v2_framework::double::Double">;
|
|
84
|
+
}, "@waterx/perp::market_config::MarketConfig">;
|
|
85
|
+
/** Positions indexed by position_id. */
|
|
86
|
+
positions: MoveStruct<{
|
|
87
|
+
id: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
88
|
+
key_type: MoveStruct<{
|
|
89
|
+
name: import("@mysten/sui/bcs").BcsType<string, string, "string">;
|
|
90
|
+
}, "std::type_name::TypeName">;
|
|
91
|
+
value_type: MoveStruct<{
|
|
92
|
+
name: import("@mysten/sui/bcs").BcsType<string, string, "string">;
|
|
93
|
+
}, "std::type_name::TypeName">;
|
|
94
|
+
slice_idx: import("@mysten/sui/bcs").BcsType<number, number, "u16">;
|
|
95
|
+
slice_size: import("@mysten/sui/bcs").BcsType<number, number, "u32">;
|
|
96
|
+
length: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
97
|
+
}, "@waterx/perp::keyed_big_vector::KeyedBigVector">;
|
|
98
|
+
/** Limit buy orders: price_key → vector<Order> */
|
|
99
|
+
limit_buys: MoveStruct<{
|
|
100
|
+
levels: MoveStruct<{
|
|
101
|
+
id: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
102
|
+
key_type: MoveStruct<{
|
|
103
|
+
name: import("@mysten/sui/bcs").BcsType<string, string, "string">;
|
|
104
|
+
}, "std::type_name::TypeName">;
|
|
105
|
+
value_type: MoveStruct<{
|
|
106
|
+
name: import("@mysten/sui/bcs").BcsType<string, string, "string">;
|
|
107
|
+
}, "std::type_name::TypeName">;
|
|
108
|
+
slice_idx: import("@mysten/sui/bcs").BcsType<number, number, "u16">;
|
|
109
|
+
slice_size: import("@mysten/sui/bcs").BcsType<number, number, "u32">;
|
|
110
|
+
length: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
111
|
+
}, "@waterx/perp::keyed_big_vector::KeyedBigVector">;
|
|
112
|
+
}, "@waterx/perp::order_book::OrderBook">;
|
|
113
|
+
/** Limit sell orders: price_key → vector<Order> */
|
|
114
|
+
limit_sells: MoveStruct<{
|
|
115
|
+
levels: MoveStruct<{
|
|
116
|
+
id: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
117
|
+
key_type: MoveStruct<{
|
|
118
|
+
name: import("@mysten/sui/bcs").BcsType<string, string, "string">;
|
|
119
|
+
}, "std::type_name::TypeName">;
|
|
120
|
+
value_type: MoveStruct<{
|
|
121
|
+
name: import("@mysten/sui/bcs").BcsType<string, string, "string">;
|
|
122
|
+
}, "std::type_name::TypeName">;
|
|
123
|
+
slice_idx: import("@mysten/sui/bcs").BcsType<number, number, "u16">;
|
|
124
|
+
slice_size: import("@mysten/sui/bcs").BcsType<number, number, "u32">;
|
|
125
|
+
length: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
126
|
+
}, "@waterx/perp::keyed_big_vector::KeyedBigVector">;
|
|
127
|
+
}, "@waterx/perp::order_book::OrderBook">;
|
|
128
|
+
/** Stop buy orders: price_key → vector<Order> */
|
|
129
|
+
stop_buys: MoveStruct<{
|
|
130
|
+
levels: MoveStruct<{
|
|
131
|
+
id: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
132
|
+
key_type: MoveStruct<{
|
|
133
|
+
name: import("@mysten/sui/bcs").BcsType<string, string, "string">;
|
|
134
|
+
}, "std::type_name::TypeName">;
|
|
135
|
+
value_type: MoveStruct<{
|
|
136
|
+
name: import("@mysten/sui/bcs").BcsType<string, string, "string">;
|
|
137
|
+
}, "std::type_name::TypeName">;
|
|
138
|
+
slice_idx: import("@mysten/sui/bcs").BcsType<number, number, "u16">;
|
|
139
|
+
slice_size: import("@mysten/sui/bcs").BcsType<number, number, "u32">;
|
|
140
|
+
length: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
141
|
+
}, "@waterx/perp::keyed_big_vector::KeyedBigVector">;
|
|
142
|
+
}, "@waterx/perp::order_book::OrderBook">;
|
|
143
|
+
/** Stop sell orders: price_key → vector<Order> */
|
|
144
|
+
stop_sells: MoveStruct<{
|
|
145
|
+
levels: MoveStruct<{
|
|
146
|
+
id: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
147
|
+
key_type: MoveStruct<{
|
|
148
|
+
name: import("@mysten/sui/bcs").BcsType<string, string, "string">;
|
|
149
|
+
}, "std::type_name::TypeName">;
|
|
150
|
+
value_type: MoveStruct<{
|
|
151
|
+
name: import("@mysten/sui/bcs").BcsType<string, string, "string">;
|
|
152
|
+
}, "std::type_name::TypeName">;
|
|
153
|
+
slice_idx: import("@mysten/sui/bcs").BcsType<number, number, "u16">;
|
|
154
|
+
slice_size: import("@mysten/sui/bcs").BcsType<number, number, "u32">;
|
|
155
|
+
length: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
156
|
+
}, "@waterx/perp::keyed_big_vector::KeyedBigVector">;
|
|
157
|
+
}, "@waterx/perp::order_book::OrderBook">;
|
|
158
|
+
/**
|
|
159
|
+
* Reserved TP / SL pre-orders, keyed by the **pre-order's own `order_id`** (not
|
|
160
|
+
* the main order's id). Each entry is a single fully-formed reduce-only `Order`
|
|
161
|
+
* with `linked_position_id = None`; on main fill `activate_pending_pre_orders`
|
|
162
|
+
* stamps in the new position id and moves the order onto the live book.
|
|
163
|
+
*/
|
|
164
|
+
pending_pre_orders: MoveStruct<{
|
|
165
|
+
id: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
166
|
+
key_type: MoveStruct<{
|
|
167
|
+
name: import("@mysten/sui/bcs").BcsType<string, string, "string">;
|
|
168
|
+
}, "std::type_name::TypeName">;
|
|
169
|
+
value_type: MoveStruct<{
|
|
170
|
+
name: import("@mysten/sui/bcs").BcsType<string, string, "string">;
|
|
171
|
+
}, "std::type_name::TypeName">;
|
|
172
|
+
slice_idx: import("@mysten/sui/bcs").BcsType<number, number, "u16">;
|
|
173
|
+
slice_size: import("@mysten/sui/bcs").BcsType<number, number, "u32">;
|
|
174
|
+
length: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
175
|
+
}, "@waterx/perp::keyed_big_vector::KeyedBigVector">;
|
|
176
|
+
/**
|
|
177
|
+
* Secondary index: `main_order_id → vector<pre_order_id>` listing the pre-orders
|
|
178
|
+
* reserved against each unfilled main. Used by activation / cancellation to
|
|
179
|
+
* enumerate the pre-orders that belong to a given main.
|
|
180
|
+
*/
|
|
181
|
+
pending_pre_order_index: MoveStruct<{
|
|
182
|
+
id: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
183
|
+
key_type: MoveStruct<{
|
|
184
|
+
name: import("@mysten/sui/bcs").BcsType<string, string, "string">;
|
|
185
|
+
}, "std::type_name::TypeName">;
|
|
186
|
+
value_type: MoveStruct<{
|
|
187
|
+
name: import("@mysten/sui/bcs").BcsType<string, string, "string">;
|
|
188
|
+
}, "std::type_name::TypeName">;
|
|
189
|
+
slice_idx: import("@mysten/sui/bcs").BcsType<number, number, "u16">;
|
|
190
|
+
slice_size: import("@mysten/sui/bcs").BcsType<number, number, "u32">;
|
|
191
|
+
length: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
192
|
+
}, "@waterx/perp::keyed_big_vector::KeyedBigVector">;
|
|
193
|
+
}, "@waterx/perp::trading::Market<phantom LP_TOKEN>">;
|
|
194
|
+
export declare const MarketRegistry: MoveStruct<{
|
|
195
|
+
id: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
196
|
+
/** Allowed protocol versions (admin-managed). */
|
|
197
|
+
allowed_versions: MoveStruct<any, any>;
|
|
198
|
+
/** Tickers of registered markets, mirrored from the DOF for cheap iteration. */
|
|
199
|
+
listed_tickers: import("@mysten/sui/bcs").BcsType<string[], Iterable<string> & {
|
|
200
|
+
length: number;
|
|
201
|
+
}, string>;
|
|
202
|
+
}, "@waterx/perp::trading::MarketRegistry<phantom LP_TOKEN>">;
|
|
203
|
+
export interface ActionOpenPositionOptions {
|
|
204
|
+
package?: string;
|
|
205
|
+
arguments?: [
|
|
206
|
+
];
|
|
207
|
+
}
|
|
208
|
+
export declare function actionOpenPosition(options?: ActionOpenPositionOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
209
|
+
export interface ActionClosePositionOptions {
|
|
210
|
+
package?: string;
|
|
211
|
+
arguments?: [
|
|
212
|
+
];
|
|
213
|
+
}
|
|
214
|
+
export declare function actionClosePosition(options?: ActionClosePositionOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
215
|
+
export interface ActionPlaceOrderOptions {
|
|
216
|
+
package?: string;
|
|
217
|
+
arguments?: [
|
|
218
|
+
];
|
|
219
|
+
}
|
|
220
|
+
export declare function actionPlaceOrder(options?: ActionPlaceOrderOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
221
|
+
export interface ActionCancelOrderOptions {
|
|
222
|
+
package?: string;
|
|
223
|
+
arguments?: [
|
|
224
|
+
];
|
|
225
|
+
}
|
|
226
|
+
export declare function actionCancelOrder(options?: ActionCancelOrderOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
227
|
+
export interface ActionDepositCollateralOptions {
|
|
228
|
+
package?: string;
|
|
229
|
+
arguments?: [
|
|
230
|
+
];
|
|
231
|
+
}
|
|
232
|
+
export declare function actionDepositCollateral(options?: ActionDepositCollateralOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
233
|
+
export interface ActionWithdrawCollateralOptions {
|
|
234
|
+
package?: string;
|
|
235
|
+
arguments?: [
|
|
236
|
+
];
|
|
237
|
+
}
|
|
238
|
+
export declare function actionWithdrawCollateral(options?: ActionWithdrawCollateralOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
239
|
+
export interface ActionLiquidateOptions {
|
|
240
|
+
package?: string;
|
|
241
|
+
arguments?: [
|
|
242
|
+
];
|
|
243
|
+
}
|
|
244
|
+
export declare function actionLiquidate(options?: ActionLiquidateOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
245
|
+
export interface ActionIncreasePositionOptions {
|
|
246
|
+
package?: string;
|
|
247
|
+
arguments?: [
|
|
248
|
+
];
|
|
249
|
+
}
|
|
250
|
+
export declare function actionIncreasePosition(options?: ActionIncreasePositionOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
251
|
+
export interface ActionDecreasePositionOptions {
|
|
252
|
+
package?: string;
|
|
253
|
+
arguments?: [
|
|
254
|
+
];
|
|
255
|
+
}
|
|
256
|
+
export declare function actionDecreasePosition(options?: ActionDecreasePositionOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
257
|
+
export interface ActionUpdateOrderOptions {
|
|
258
|
+
package?: string;
|
|
259
|
+
arguments?: [
|
|
260
|
+
];
|
|
261
|
+
}
|
|
262
|
+
export declare function actionUpdateOrder(options?: ActionUpdateOrderOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
263
|
+
export interface ActionCancelPreOrderOptions {
|
|
264
|
+
package?: string;
|
|
265
|
+
arguments?: [
|
|
266
|
+
];
|
|
267
|
+
}
|
|
268
|
+
export declare function actionCancelPreOrder(options?: ActionCancelPreOrderOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
269
|
+
export interface ActionAddPreOrderOptions {
|
|
270
|
+
package?: string;
|
|
271
|
+
arguments?: [
|
|
272
|
+
];
|
|
273
|
+
}
|
|
274
|
+
export declare function actionAddPreOrder(options?: ActionAddPreOrderOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
275
|
+
export interface CreateMarketArguments {
|
|
276
|
+
Cap: RawTransactionArgument<string>;
|
|
277
|
+
symbol: RawTransactionArgument<string>;
|
|
278
|
+
maxLeverageBps: RawTransactionArgument<number | bigint>;
|
|
279
|
+
minCollValue: RawTransactionArgument<number | bigint>;
|
|
280
|
+
tradingFee: RawTransactionArgument<number | bigint>;
|
|
281
|
+
maintenanceMargin: RawTransactionArgument<number | bigint>;
|
|
282
|
+
maxLongOi: RawTransactionArgument<number | bigint>;
|
|
283
|
+
maxShortOi: RawTransactionArgument<number | bigint>;
|
|
284
|
+
cooldownMs: RawTransactionArgument<number | bigint>;
|
|
285
|
+
basicFundingRate: RawTransactionArgument<number | bigint>;
|
|
286
|
+
fundingIntervalMs: RawTransactionArgument<number | bigint>;
|
|
287
|
+
}
|
|
288
|
+
export interface CreateMarketOptions {
|
|
289
|
+
package?: string;
|
|
290
|
+
arguments: CreateMarketArguments | [
|
|
291
|
+
Cap: RawTransactionArgument<string>,
|
|
292
|
+
symbol: RawTransactionArgument<string>,
|
|
293
|
+
maxLeverageBps: RawTransactionArgument<number | bigint>,
|
|
294
|
+
minCollValue: RawTransactionArgument<number | bigint>,
|
|
295
|
+
tradingFee: RawTransactionArgument<number | bigint>,
|
|
296
|
+
maintenanceMargin: RawTransactionArgument<number | bigint>,
|
|
297
|
+
maxLongOi: RawTransactionArgument<number | bigint>,
|
|
298
|
+
maxShortOi: RawTransactionArgument<number | bigint>,
|
|
299
|
+
cooldownMs: RawTransactionArgument<number | bigint>,
|
|
300
|
+
basicFundingRate: RawTransactionArgument<number | bigint>,
|
|
301
|
+
fundingIntervalMs: RawTransactionArgument<number | bigint>
|
|
302
|
+
];
|
|
303
|
+
typeArguments: [
|
|
304
|
+
string
|
|
305
|
+
];
|
|
306
|
+
}
|
|
307
|
+
/**
|
|
308
|
+
* Creates a trading market with full configuration. `trading_fee`,
|
|
309
|
+
* `maintenance_margin`, and `basic_funding_rate` are scaled Float values (1e9
|
|
310
|
+
* scale). For example, a 5 bps fee = `500_000`.
|
|
311
|
+
*/
|
|
312
|
+
export declare function createMarket(options: CreateMarketOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
313
|
+
export interface UpdateMarketConfigArguments {
|
|
314
|
+
marketRegistry: RawTransactionArgument<string>;
|
|
315
|
+
cap: RawTransactionArgument<string>;
|
|
316
|
+
ticker: RawTransactionArgument<string>;
|
|
317
|
+
maxLeverageBps: RawTransactionArgument<number | bigint | null>;
|
|
318
|
+
minCollValue: RawTransactionArgument<number | bigint | null>;
|
|
319
|
+
tradingFee: RawTransactionArgument<number | bigint | null>;
|
|
320
|
+
maxImpactFee: RawTransactionArgument<number | bigint | null>;
|
|
321
|
+
allocatedLpExposureBps: RawTransactionArgument<number | bigint | null>;
|
|
322
|
+
impactFeeCurvature: RawTransactionArgument<number | bigint | null>;
|
|
323
|
+
impactFeeScale: RawTransactionArgument<number | bigint | null>;
|
|
324
|
+
maintenanceMargin: RawTransactionArgument<number | bigint | null>;
|
|
325
|
+
maxLongOi: RawTransactionArgument<number | bigint | null>;
|
|
326
|
+
maxShortOi: RawTransactionArgument<number | bigint | null>;
|
|
327
|
+
cooldownMs: RawTransactionArgument<number | bigint | null>;
|
|
328
|
+
orderPriceTick: RawTransactionArgument<number | bigint | null>;
|
|
329
|
+
maxPreOrders: RawTransactionArgument<number | bigint | null>;
|
|
330
|
+
basicFundingRate: RawTransactionArgument<number | bigint | null>;
|
|
331
|
+
fundingIntervalMs: RawTransactionArgument<number | bigint | null>;
|
|
332
|
+
}
|
|
333
|
+
export interface UpdateMarketConfigOptions {
|
|
334
|
+
package?: string;
|
|
335
|
+
arguments: UpdateMarketConfigArguments | [
|
|
336
|
+
marketRegistry: RawTransactionArgument<string>,
|
|
337
|
+
cap: RawTransactionArgument<string>,
|
|
338
|
+
ticker: RawTransactionArgument<string>,
|
|
339
|
+
maxLeverageBps: RawTransactionArgument<number | bigint | null>,
|
|
340
|
+
minCollValue: RawTransactionArgument<number | bigint | null>,
|
|
341
|
+
tradingFee: RawTransactionArgument<number | bigint | null>,
|
|
342
|
+
maxImpactFee: RawTransactionArgument<number | bigint | null>,
|
|
343
|
+
allocatedLpExposureBps: RawTransactionArgument<number | bigint | null>,
|
|
344
|
+
impactFeeCurvature: RawTransactionArgument<number | bigint | null>,
|
|
345
|
+
impactFeeScale: RawTransactionArgument<number | bigint | null>,
|
|
346
|
+
maintenanceMargin: RawTransactionArgument<number | bigint | null>,
|
|
347
|
+
maxLongOi: RawTransactionArgument<number | bigint | null>,
|
|
348
|
+
maxShortOi: RawTransactionArgument<number | bigint | null>,
|
|
349
|
+
cooldownMs: RawTransactionArgument<number | bigint | null>,
|
|
350
|
+
orderPriceTick: RawTransactionArgument<number | bigint | null>,
|
|
351
|
+
maxPreOrders: RawTransactionArgument<number | bigint | null>,
|
|
352
|
+
basicFundingRate: RawTransactionArgument<number | bigint | null>,
|
|
353
|
+
fundingIntervalMs: RawTransactionArgument<number | bigint | null>
|
|
354
|
+
];
|
|
355
|
+
typeArguments: [
|
|
356
|
+
string
|
|
357
|
+
];
|
|
358
|
+
}
|
|
359
|
+
/**
|
|
360
|
+
* Admin: forwards to `market_config::update_market_config` through the shared
|
|
361
|
+
* `Market`. Needed because `MarketConfig` is embedded inside `Market` and can't be
|
|
362
|
+
* borrowed mutably from a PTB directly. Funding parameters must be updated with
|
|
363
|
+
* `update_market_funding_config` so accrued funding is settled under the old
|
|
364
|
+
* parameters before the new parameters take effect.
|
|
365
|
+
*/
|
|
366
|
+
export declare function updateMarketConfig(options: UpdateMarketConfigOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
367
|
+
export interface UpdateMarketFundingConfigArguments {
|
|
368
|
+
globalConfig: RawTransactionArgument<string>;
|
|
369
|
+
cap: RawTransactionArgument<string>;
|
|
370
|
+
marketRegistry: RawTransactionArgument<string>;
|
|
371
|
+
ticker: RawTransactionArgument<string>;
|
|
372
|
+
pool: RawTransactionArgument<string>;
|
|
373
|
+
oracle: RawTransactionArgument<string>;
|
|
374
|
+
basicFundingRate: RawTransactionArgument<number | bigint | null>;
|
|
375
|
+
fundingIntervalMs: RawTransactionArgument<number | bigint | null>;
|
|
376
|
+
}
|
|
377
|
+
export interface UpdateMarketFundingConfigOptions {
|
|
378
|
+
package?: string;
|
|
379
|
+
arguments: UpdateMarketFundingConfigArguments | [
|
|
380
|
+
globalConfig: RawTransactionArgument<string>,
|
|
381
|
+
cap: RawTransactionArgument<string>,
|
|
382
|
+
marketRegistry: RawTransactionArgument<string>,
|
|
383
|
+
ticker: RawTransactionArgument<string>,
|
|
384
|
+
pool: RawTransactionArgument<string>,
|
|
385
|
+
oracle: RawTransactionArgument<string>,
|
|
386
|
+
basicFundingRate: RawTransactionArgument<number | bigint | null>,
|
|
387
|
+
fundingIntervalMs: RawTransactionArgument<number | bigint | null>
|
|
388
|
+
];
|
|
389
|
+
typeArguments: [
|
|
390
|
+
string
|
|
391
|
+
];
|
|
392
|
+
}
|
|
393
|
+
/**
|
|
394
|
+
* Admin: settles accrued funding under the old funding parameters, then updates
|
|
395
|
+
* funding parameters for future intervals.
|
|
396
|
+
*/
|
|
397
|
+
export declare function updateMarketFundingConfig(options: UpdateMarketFundingConfigOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
398
|
+
export interface PauseMarketArguments {
|
|
399
|
+
marketRegistry: RawTransactionArgument<string>;
|
|
400
|
+
cap: RawTransactionArgument<string>;
|
|
401
|
+
ticker: RawTransactionArgument<string>;
|
|
402
|
+
}
|
|
403
|
+
export interface PauseMarketOptions {
|
|
404
|
+
package?: string;
|
|
405
|
+
arguments: PauseMarketArguments | [
|
|
406
|
+
marketRegistry: RawTransactionArgument<string>,
|
|
407
|
+
cap: RawTransactionArgument<string>,
|
|
408
|
+
ticker: RawTransactionArgument<string>
|
|
409
|
+
];
|
|
410
|
+
typeArguments: [
|
|
411
|
+
string
|
|
412
|
+
];
|
|
413
|
+
}
|
|
414
|
+
/** Admin: suspend the market (halts trading). */
|
|
415
|
+
export declare function pauseMarket(options: PauseMarketOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
416
|
+
export interface UnpauseMarketArguments {
|
|
417
|
+
marketRegistry: RawTransactionArgument<string>;
|
|
418
|
+
cap: RawTransactionArgument<string>;
|
|
419
|
+
ticker: RawTransactionArgument<string>;
|
|
420
|
+
}
|
|
421
|
+
export interface UnpauseMarketOptions {
|
|
422
|
+
package?: string;
|
|
423
|
+
arguments: UnpauseMarketArguments | [
|
|
424
|
+
marketRegistry: RawTransactionArgument<string>,
|
|
425
|
+
cap: RawTransactionArgument<string>,
|
|
426
|
+
ticker: RawTransactionArgument<string>
|
|
427
|
+
];
|
|
428
|
+
typeArguments: [
|
|
429
|
+
string
|
|
430
|
+
];
|
|
431
|
+
}
|
|
432
|
+
/** Admin: resume the market. */
|
|
433
|
+
export declare function unpauseMarket(options: UnpauseMarketOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
434
|
+
export interface AddRequestRuleArguments {
|
|
435
|
+
marketRegistry: RawTransactionArgument<string>;
|
|
436
|
+
cap: RawTransactionArgument<string>;
|
|
437
|
+
ticker: RawTransactionArgument<string>;
|
|
438
|
+
}
|
|
439
|
+
export interface AddRequestRuleOptions {
|
|
440
|
+
package?: string;
|
|
441
|
+
arguments: AddRequestRuleArguments | [
|
|
442
|
+
marketRegistry: RawTransactionArgument<string>,
|
|
443
|
+
cap: RawTransactionArgument<string>,
|
|
444
|
+
ticker: RawTransactionArgument<string>
|
|
445
|
+
];
|
|
446
|
+
typeArguments: [
|
|
447
|
+
string,
|
|
448
|
+
string
|
|
449
|
+
];
|
|
450
|
+
}
|
|
451
|
+
/** Admin: add witness type `W` to the request checklist. */
|
|
452
|
+
export declare function addRequestRule(options: AddRequestRuleOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
453
|
+
export interface RemoveRequestRuleArguments {
|
|
454
|
+
marketRegistry: RawTransactionArgument<string>;
|
|
455
|
+
cap: RawTransactionArgument<string>;
|
|
456
|
+
ticker: RawTransactionArgument<string>;
|
|
457
|
+
}
|
|
458
|
+
export interface RemoveRequestRuleOptions {
|
|
459
|
+
package?: string;
|
|
460
|
+
arguments: RemoveRequestRuleArguments | [
|
|
461
|
+
marketRegistry: RawTransactionArgument<string>,
|
|
462
|
+
cap: RawTransactionArgument<string>,
|
|
463
|
+
ticker: RawTransactionArgument<string>
|
|
464
|
+
];
|
|
465
|
+
typeArguments: [
|
|
466
|
+
string,
|
|
467
|
+
string
|
|
468
|
+
];
|
|
469
|
+
}
|
|
470
|
+
/** Admin: remove witness type `W` from the request checklist. */
|
|
471
|
+
export declare function removeRequestRule(options: RemoveRequestRuleOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
472
|
+
export interface RegisterMarketAumArguments {
|
|
473
|
+
marketRegistry: RawTransactionArgument<string>;
|
|
474
|
+
aum: RawTransactionArgument<string>;
|
|
475
|
+
cap: RawTransactionArgument<string>;
|
|
476
|
+
ticker: RawTransactionArgument<string>;
|
|
477
|
+
oracle: RawTransactionArgument<string>;
|
|
478
|
+
}
|
|
479
|
+
export interface RegisterMarketAumOptions {
|
|
480
|
+
package?: string;
|
|
481
|
+
arguments: RegisterMarketAumArguments | [
|
|
482
|
+
marketRegistry: RawTransactionArgument<string>,
|
|
483
|
+
aum: RawTransactionArgument<string>,
|
|
484
|
+
cap: RawTransactionArgument<string>,
|
|
485
|
+
ticker: RawTransactionArgument<string>,
|
|
486
|
+
oracle: RawTransactionArgument<string>
|
|
487
|
+
];
|
|
488
|
+
typeArguments: [
|
|
489
|
+
string
|
|
490
|
+
];
|
|
491
|
+
}
|
|
492
|
+
/** Registers a market in the pool-level WLP AUM object. */
|
|
493
|
+
export declare function registerMarketAum(options: RegisterMarketAumOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
494
|
+
export interface RefreshMarketAumArguments {
|
|
495
|
+
marketRegistry: RawTransactionArgument<string>;
|
|
496
|
+
aum: RawTransactionArgument<string>;
|
|
497
|
+
ticker: RawTransactionArgument<string>;
|
|
498
|
+
oracle: RawTransactionArgument<string>;
|
|
499
|
+
}
|
|
500
|
+
export interface RefreshMarketAumOptions {
|
|
501
|
+
package?: string;
|
|
502
|
+
arguments: RefreshMarketAumArguments | [
|
|
503
|
+
marketRegistry: RawTransactionArgument<string>,
|
|
504
|
+
aum: RawTransactionArgument<string>,
|
|
505
|
+
ticker: RawTransactionArgument<string>,
|
|
506
|
+
oracle: RawTransactionArgument<string>
|
|
507
|
+
];
|
|
508
|
+
typeArguments: [
|
|
509
|
+
string
|
|
510
|
+
];
|
|
511
|
+
}
|
|
512
|
+
/** Refreshes one registered market's contribution to pool-level WLP AUM. */
|
|
513
|
+
export declare function refreshMarketAum(options: RefreshMarketAumOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
514
|
+
export interface AssertProtocolPermArguments {
|
|
515
|
+
wxaRegistry: RawTransactionArgument<string>;
|
|
516
|
+
accountId: RawTransactionArgument<string>;
|
|
517
|
+
sender: RawTransactionArgument<string>;
|
|
518
|
+
permission: RawTransactionArgument<number>;
|
|
519
|
+
}
|
|
520
|
+
export interface AssertProtocolPermOptions {
|
|
521
|
+
package?: string;
|
|
522
|
+
arguments: AssertProtocolPermArguments | [
|
|
523
|
+
wxaRegistry: RawTransactionArgument<string>,
|
|
524
|
+
accountId: RawTransactionArgument<string>,
|
|
525
|
+
sender: RawTransactionArgument<string>,
|
|
526
|
+
permission: RawTransactionArgument<number>
|
|
527
|
+
];
|
|
528
|
+
typeArguments: [
|
|
529
|
+
string
|
|
530
|
+
];
|
|
531
|
+
}
|
|
532
|
+
/**
|
|
533
|
+
* Permission check on the wxa account for the trading entrypoints. Reads
|
|
534
|
+
* `effective_protocol_permissions<TradingRequest<C_TOKEN>>` so per-collateral
|
|
535
|
+
* granularity is preserved (`PERM_OPEN_POSITION` etc. are bits on that bitmap).
|
|
536
|
+
* Must be called _before_ any `wxa_account::take` so a failed auth doesn't leave
|
|
537
|
+
* the user drained.
|
|
538
|
+
*/
|
|
539
|
+
export declare function assertProtocolPerm(options: AssertProtocolPermOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
540
|
+
export interface ClosePositionRequestArguments {
|
|
541
|
+
globalConfig: RawTransactionArgument<string>;
|
|
542
|
+
wxaRegistry: RawTransactionArgument<string>;
|
|
543
|
+
marketRegistry: RawTransactionArgument<string>;
|
|
544
|
+
ticker: RawTransactionArgument<string>;
|
|
545
|
+
senderRequest: TransactionArgument;
|
|
546
|
+
accountId: RawTransactionArgument<string>;
|
|
547
|
+
positionId: RawTransactionArgument<number | bigint>;
|
|
548
|
+
acceptablePrice: RawTransactionArgument<number | bigint>;
|
|
549
|
+
}
|
|
550
|
+
export interface ClosePositionRequestOptions {
|
|
551
|
+
package?: string;
|
|
552
|
+
arguments: ClosePositionRequestArguments | [
|
|
553
|
+
globalConfig: RawTransactionArgument<string>,
|
|
554
|
+
wxaRegistry: RawTransactionArgument<string>,
|
|
555
|
+
marketRegistry: RawTransactionArgument<string>,
|
|
556
|
+
ticker: RawTransactionArgument<string>,
|
|
557
|
+
senderRequest: TransactionArgument,
|
|
558
|
+
accountId: RawTransactionArgument<string>,
|
|
559
|
+
positionId: RawTransactionArgument<number | bigint>,
|
|
560
|
+
acceptablePrice: RawTransactionArgument<number | bigint>
|
|
561
|
+
];
|
|
562
|
+
typeArguments: [
|
|
563
|
+
string,
|
|
564
|
+
string
|
|
565
|
+
];
|
|
566
|
+
}
|
|
567
|
+
/** Creates a request to close a position. */
|
|
568
|
+
export declare function closePositionRequest(options: ClosePositionRequestOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
569
|
+
export interface IncreasePositionRequestArguments {
|
|
570
|
+
globalConfig: RawTransactionArgument<string>;
|
|
571
|
+
wxaRegistry: RawTransactionArgument<string>;
|
|
572
|
+
marketRegistry: RawTransactionArgument<string>;
|
|
573
|
+
ticker: RawTransactionArgument<string>;
|
|
574
|
+
senderRequest: TransactionArgument;
|
|
575
|
+
accountId: RawTransactionArgument<string>;
|
|
576
|
+
orderId: RawTransactionArgument<number | bigint | null>;
|
|
577
|
+
positionId: RawTransactionArgument<number | bigint>;
|
|
578
|
+
collateralAmount: RawTransactionArgument<number | bigint>;
|
|
579
|
+
size: RawTransactionArgument<number | bigint>;
|
|
580
|
+
acceptablePrice: RawTransactionArgument<number | bigint>;
|
|
581
|
+
}
|
|
582
|
+
export interface IncreasePositionRequestOptions {
|
|
583
|
+
package?: string;
|
|
584
|
+
arguments: IncreasePositionRequestArguments | [
|
|
585
|
+
globalConfig: RawTransactionArgument<string>,
|
|
586
|
+
wxaRegistry: RawTransactionArgument<string>,
|
|
587
|
+
marketRegistry: RawTransactionArgument<string>,
|
|
588
|
+
ticker: RawTransactionArgument<string>,
|
|
589
|
+
senderRequest: TransactionArgument,
|
|
590
|
+
accountId: RawTransactionArgument<string>,
|
|
591
|
+
orderId: RawTransactionArgument<number | bigint | null>,
|
|
592
|
+
positionId: RawTransactionArgument<number | bigint>,
|
|
593
|
+
collateralAmount: RawTransactionArgument<number | bigint>,
|
|
594
|
+
size: RawTransactionArgument<number | bigint>,
|
|
595
|
+
acceptablePrice: RawTransactionArgument<number | bigint>
|
|
596
|
+
];
|
|
597
|
+
typeArguments: [
|
|
598
|
+
string,
|
|
599
|
+
string
|
|
600
|
+
];
|
|
601
|
+
}
|
|
602
|
+
/** Creates a request to increase an existing position at market. */
|
|
603
|
+
export declare function increasePositionRequest(options: IncreasePositionRequestOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
604
|
+
export interface DecreasePositionRequestArguments {
|
|
605
|
+
globalConfig: RawTransactionArgument<string>;
|
|
606
|
+
wxaRegistry: RawTransactionArgument<string>;
|
|
607
|
+
marketRegistry: RawTransactionArgument<string>;
|
|
608
|
+
ticker: RawTransactionArgument<string>;
|
|
609
|
+
senderRequest: TransactionArgument;
|
|
610
|
+
accountId: RawTransactionArgument<string>;
|
|
611
|
+
positionId: RawTransactionArgument<number | bigint>;
|
|
612
|
+
size: RawTransactionArgument<number | bigint>;
|
|
613
|
+
acceptablePrice: RawTransactionArgument<number | bigint>;
|
|
614
|
+
}
|
|
615
|
+
export interface DecreasePositionRequestOptions {
|
|
616
|
+
package?: string;
|
|
617
|
+
arguments: DecreasePositionRequestArguments | [
|
|
618
|
+
globalConfig: RawTransactionArgument<string>,
|
|
619
|
+
wxaRegistry: RawTransactionArgument<string>,
|
|
620
|
+
marketRegistry: RawTransactionArgument<string>,
|
|
621
|
+
ticker: RawTransactionArgument<string>,
|
|
622
|
+
senderRequest: TransactionArgument,
|
|
623
|
+
accountId: RawTransactionArgument<string>,
|
|
624
|
+
positionId: RawTransactionArgument<number | bigint>,
|
|
625
|
+
size: RawTransactionArgument<number | bigint>,
|
|
626
|
+
acceptablePrice: RawTransactionArgument<number | bigint>
|
|
627
|
+
];
|
|
628
|
+
typeArguments: [
|
|
629
|
+
string,
|
|
630
|
+
string
|
|
631
|
+
];
|
|
632
|
+
}
|
|
633
|
+
/** Creates a request to partially reduce an existing position at market. */
|
|
634
|
+
export declare function decreasePositionRequest(options: DecreasePositionRequestOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
635
|
+
export interface PlaceOrderRequestArguments {
|
|
636
|
+
globalConfig: RawTransactionArgument<string>;
|
|
637
|
+
wxaRegistry: RawTransactionArgument<string>;
|
|
638
|
+
marketRegistry: RawTransactionArgument<string>;
|
|
639
|
+
ticker: RawTransactionArgument<string>;
|
|
640
|
+
senderRequest: TransactionArgument;
|
|
641
|
+
accountId: RawTransactionArgument<string>;
|
|
642
|
+
main: TransactionArgument;
|
|
643
|
+
preOrder: TransactionArgument;
|
|
644
|
+
}
|
|
645
|
+
export interface PlaceOrderRequestOptions {
|
|
646
|
+
package?: string;
|
|
647
|
+
arguments: PlaceOrderRequestArguments | [
|
|
648
|
+
globalConfig: RawTransactionArgument<string>,
|
|
649
|
+
wxaRegistry: RawTransactionArgument<string>,
|
|
650
|
+
marketRegistry: RawTransactionArgument<string>,
|
|
651
|
+
ticker: RawTransactionArgument<string>,
|
|
652
|
+
senderRequest: TransactionArgument,
|
|
653
|
+
accountId: RawTransactionArgument<string>,
|
|
654
|
+
main: TransactionArgument,
|
|
655
|
+
preOrder: TransactionArgument
|
|
656
|
+
];
|
|
657
|
+
typeArguments: [
|
|
658
|
+
string,
|
|
659
|
+
string
|
|
660
|
+
];
|
|
661
|
+
}
|
|
662
|
+
/**
|
|
663
|
+
* Creates a request to place a limit, stop, or market order, optionally with TP/SL
|
|
664
|
+
* pre-orders reserved against the freshly opened position.
|
|
665
|
+
*
|
|
666
|
+
* `main: PlaceOrderArgument` describes the order that hits the book immediately.
|
|
667
|
+
* `pre_order: vector<PlaceOrderArgument>` (length 0..=2) describes reduce-only
|
|
668
|
+
* orders that will be promoted to real linked orders on the new position when the
|
|
669
|
+
* main fills via `match_orders`.
|
|
670
|
+
*
|
|
671
|
+
* `main.trigger_price = None` is the market form: the order is parked at tick 0 in
|
|
672
|
+
* the limit book and a keeper fills it via `match_orders` at the live oracle.
|
|
673
|
+
* `acceptable_price` is carried on the order and consulted at match time — if the
|
|
674
|
+
* oracle moves past it the order is cancelled and collateral refunded. Limit/stop
|
|
675
|
+
* orders ignore `acceptable_price`.
|
|
676
|
+
*
|
|
677
|
+
* Validation runs _before_ the wxa take so a malformed request never drains the
|
|
678
|
+
* user's balance.
|
|
679
|
+
*/
|
|
680
|
+
export declare function placeOrderRequest(options: PlaceOrderRequestOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
681
|
+
export interface ValidatePreOrdersArguments {
|
|
682
|
+
main: TransactionArgument;
|
|
683
|
+
preOrder: TransactionArgument;
|
|
684
|
+
maxPreOrders: RawTransactionArgument<number | bigint>;
|
|
685
|
+
}
|
|
686
|
+
export interface ValidatePreOrdersOptions {
|
|
687
|
+
package?: string;
|
|
688
|
+
arguments: ValidatePreOrdersArguments | [
|
|
689
|
+
main: TransactionArgument,
|
|
690
|
+
preOrder: TransactionArgument,
|
|
691
|
+
maxPreOrders: RawTransactionArgument<number | bigint>
|
|
692
|
+
];
|
|
693
|
+
}
|
|
694
|
+
/**
|
|
695
|
+
* Validates `(main, pre_order)` at place-order request creation. Combines the
|
|
696
|
+
* main-eligibility check (must be a fresh opening order), the count check against
|
|
697
|
+
* the market-level cap, and per-entry structural rules.
|
|
698
|
+
*/
|
|
699
|
+
export declare function validatePreOrders(options: ValidatePreOrdersOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
700
|
+
export interface ValidatePreOrderEntriesArguments {
|
|
701
|
+
mainIsLong: RawTransactionArgument<boolean>;
|
|
702
|
+
preOrder: TransactionArgument;
|
|
703
|
+
}
|
|
704
|
+
export interface ValidatePreOrderEntriesOptions {
|
|
705
|
+
package?: string;
|
|
706
|
+
arguments: ValidatePreOrderEntriesArguments | [
|
|
707
|
+
mainIsLong: RawTransactionArgument<boolean>,
|
|
708
|
+
preOrder: TransactionArgument
|
|
709
|
+
];
|
|
710
|
+
}
|
|
711
|
+
/**
|
|
712
|
+
* Per-entry structural validation only: reduce-only, real trigger, no collateral,
|
|
713
|
+
* no pre-picked link target, opposite side of main, non-zero size. The total-count
|
|
714
|
+
* check is the caller's responsibility (`assert_pre_order_count`) so this can be
|
|
715
|
+
* reused from per-leg add / cancel paths.
|
|
716
|
+
*/
|
|
717
|
+
export declare function validatePreOrderEntries(options: ValidatePreOrderEntriesOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
718
|
+
export interface AssertPreOrderCountArguments {
|
|
719
|
+
newTotal: RawTransactionArgument<number | bigint>;
|
|
720
|
+
maxPreOrders: RawTransactionArgument<number | bigint>;
|
|
721
|
+
}
|
|
722
|
+
export interface AssertPreOrderCountOptions {
|
|
723
|
+
package?: string;
|
|
724
|
+
arguments: AssertPreOrderCountArguments | [
|
|
725
|
+
newTotal: RawTransactionArgument<number | bigint>,
|
|
726
|
+
maxPreOrders: RawTransactionArgument<number | bigint>
|
|
727
|
+
];
|
|
728
|
+
}
|
|
729
|
+
/**
|
|
730
|
+
* Caps the **total** pre-orders reserved against a single main at the
|
|
731
|
+
* market-config `max_pre_orders`. Aborts with `ETooManyPreOrders`.
|
|
732
|
+
*/
|
|
733
|
+
export declare function assertPreOrderCount(options: AssertPreOrderCountOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
734
|
+
export interface CancelOrderRequestArguments {
|
|
735
|
+
globalConfig: RawTransactionArgument<string>;
|
|
736
|
+
wxaRegistry: RawTransactionArgument<string>;
|
|
737
|
+
marketRegistry: RawTransactionArgument<string>;
|
|
738
|
+
ticker: RawTransactionArgument<string>;
|
|
739
|
+
senderRequest: TransactionArgument;
|
|
740
|
+
accountId: RawTransactionArgument<string>;
|
|
741
|
+
orderId: RawTransactionArgument<number | bigint>;
|
|
742
|
+
triggerPrice: RawTransactionArgument<number | bigint>;
|
|
743
|
+
orderTypeTag: RawTransactionArgument<number>;
|
|
744
|
+
}
|
|
745
|
+
export interface CancelOrderRequestOptions {
|
|
746
|
+
package?: string;
|
|
747
|
+
arguments: CancelOrderRequestArguments | [
|
|
748
|
+
globalConfig: RawTransactionArgument<string>,
|
|
749
|
+
wxaRegistry: RawTransactionArgument<string>,
|
|
750
|
+
marketRegistry: RawTransactionArgument<string>,
|
|
751
|
+
ticker: RawTransactionArgument<string>,
|
|
752
|
+
senderRequest: TransactionArgument,
|
|
753
|
+
accountId: RawTransactionArgument<string>,
|
|
754
|
+
orderId: RawTransactionArgument<number | bigint>,
|
|
755
|
+
triggerPrice: RawTransactionArgument<number | bigint>,
|
|
756
|
+
orderTypeTag: RawTransactionArgument<number>
|
|
757
|
+
];
|
|
758
|
+
typeArguments: [
|
|
759
|
+
string,
|
|
760
|
+
string
|
|
761
|
+
];
|
|
762
|
+
}
|
|
763
|
+
/**
|
|
764
|
+
* Creates a request to cancel an order. `order_type_tag = 255` scans all 4 books
|
|
765
|
+
* for the matching `order_id`. `trigger_price` is the scaled `Float` value; `0`
|
|
766
|
+
* scans all trigger price buckets in the selected book(s).
|
|
767
|
+
*/
|
|
768
|
+
export declare function cancelOrderRequest(options: CancelOrderRequestOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
769
|
+
export interface UpdateOrderRequestArguments {
|
|
770
|
+
globalConfig: RawTransactionArgument<string>;
|
|
771
|
+
wxaRegistry: RawTransactionArgument<string>;
|
|
772
|
+
marketRegistry: RawTransactionArgument<string>;
|
|
773
|
+
ticker: RawTransactionArgument<string>;
|
|
774
|
+
senderRequest: TransactionArgument;
|
|
775
|
+
accountId: RawTransactionArgument<string>;
|
|
776
|
+
orderId: RawTransactionArgument<number | bigint>;
|
|
777
|
+
currentTriggerPrice: RawTransactionArgument<number | bigint>;
|
|
778
|
+
orderTypeTag: RawTransactionArgument<number>;
|
|
779
|
+
newSize: RawTransactionArgument<number | bigint>;
|
|
780
|
+
newTriggerPrice: RawTransactionArgument<number | bigint>;
|
|
781
|
+
}
|
|
782
|
+
export interface UpdateOrderRequestOptions {
|
|
783
|
+
package?: string;
|
|
784
|
+
arguments: UpdateOrderRequestArguments | [
|
|
785
|
+
globalConfig: RawTransactionArgument<string>,
|
|
786
|
+
wxaRegistry: RawTransactionArgument<string>,
|
|
787
|
+
marketRegistry: RawTransactionArgument<string>,
|
|
788
|
+
ticker: RawTransactionArgument<string>,
|
|
789
|
+
senderRequest: TransactionArgument,
|
|
790
|
+
accountId: RawTransactionArgument<string>,
|
|
791
|
+
orderId: RawTransactionArgument<number | bigint>,
|
|
792
|
+
currentTriggerPrice: RawTransactionArgument<number | bigint>,
|
|
793
|
+
orderTypeTag: RawTransactionArgument<number>,
|
|
794
|
+
newSize: RawTransactionArgument<number | bigint>,
|
|
795
|
+
newTriggerPrice: RawTransactionArgument<number | bigint>
|
|
796
|
+
];
|
|
797
|
+
typeArguments: [
|
|
798
|
+
string,
|
|
799
|
+
string
|
|
800
|
+
];
|
|
801
|
+
}
|
|
802
|
+
/**
|
|
803
|
+
* Creates a request to update a live order's size and trigger price. The order
|
|
804
|
+
* keeps its direction, reduce-only flag, linked position, collateral, and
|
|
805
|
+
* limit/stop book. `order_type_tag = 255` and `current_trigger_price = 0` scan for
|
|
806
|
+
* the current order location.
|
|
807
|
+
*/
|
|
808
|
+
export declare function updateOrderRequest(options: UpdateOrderRequestOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
809
|
+
export interface CancelPreOrderRequestArguments {
|
|
810
|
+
globalConfig: RawTransactionArgument<string>;
|
|
811
|
+
wxaRegistry: RawTransactionArgument<string>;
|
|
812
|
+
marketRegistry: RawTransactionArgument<string>;
|
|
813
|
+
ticker: RawTransactionArgument<string>;
|
|
814
|
+
senderRequest: TransactionArgument;
|
|
815
|
+
accountId: RawTransactionArgument<string>;
|
|
816
|
+
mainOrderId: RawTransactionArgument<number | bigint>;
|
|
817
|
+
preOrderId: RawTransactionArgument<number | bigint>;
|
|
818
|
+
}
|
|
819
|
+
export interface CancelPreOrderRequestOptions {
|
|
820
|
+
package?: string;
|
|
821
|
+
arguments: CancelPreOrderRequestArguments | [
|
|
822
|
+
globalConfig: RawTransactionArgument<string>,
|
|
823
|
+
wxaRegistry: RawTransactionArgument<string>,
|
|
824
|
+
marketRegistry: RawTransactionArgument<string>,
|
|
825
|
+
ticker: RawTransactionArgument<string>,
|
|
826
|
+
senderRequest: TransactionArgument,
|
|
827
|
+
accountId: RawTransactionArgument<string>,
|
|
828
|
+
mainOrderId: RawTransactionArgument<number | bigint>,
|
|
829
|
+
preOrderId: RawTransactionArgument<number | bigint>
|
|
830
|
+
];
|
|
831
|
+
typeArguments: [
|
|
832
|
+
string,
|
|
833
|
+
string
|
|
834
|
+
];
|
|
835
|
+
}
|
|
836
|
+
/**
|
|
837
|
+
* Cancels a single TP / SL pre-order reserved against an unfilled main.
|
|
838
|
+
* `pre_order_id` is the pre-order's own `order_id`, returned in the `OrderCreated`
|
|
839
|
+
* event when it activates (also enumerable from `pending_pre_order_index` keyed by
|
|
840
|
+
* `main_order_id`). The pair must be consistent — i.e. `pre_order_id` must appear
|
|
841
|
+
* in the index entry for `main_order_id`, otherwise the call aborts with
|
|
842
|
+
* `EOrderNotFound`. Pre-orders never hold collateral, so this only adjusts
|
|
843
|
+
* bookkeeping; no payout. Emits `PreOrderCancelled` with `pre_order_count = 1`.
|
|
844
|
+
*/
|
|
845
|
+
export declare function cancelPreOrderRequest(options: CancelPreOrderRequestOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
846
|
+
export interface AddPreOrderRequestArguments {
|
|
847
|
+
globalConfig: RawTransactionArgument<string>;
|
|
848
|
+
wxaRegistry: RawTransactionArgument<string>;
|
|
849
|
+
marketRegistry: RawTransactionArgument<string>;
|
|
850
|
+
ticker: RawTransactionArgument<string>;
|
|
851
|
+
senderRequest: TransactionArgument;
|
|
852
|
+
accountId: RawTransactionArgument<string>;
|
|
853
|
+
mainOrderId: RawTransactionArgument<number | bigint>;
|
|
854
|
+
preOrder: TransactionArgument;
|
|
855
|
+
}
|
|
856
|
+
export interface AddPreOrderRequestOptions {
|
|
857
|
+
package?: string;
|
|
858
|
+
arguments: AddPreOrderRequestArguments | [
|
|
859
|
+
globalConfig: RawTransactionArgument<string>,
|
|
860
|
+
wxaRegistry: RawTransactionArgument<string>,
|
|
861
|
+
marketRegistry: RawTransactionArgument<string>,
|
|
862
|
+
ticker: RawTransactionArgument<string>,
|
|
863
|
+
senderRequest: TransactionArgument,
|
|
864
|
+
accountId: RawTransactionArgument<string>,
|
|
865
|
+
mainOrderId: RawTransactionArgument<number | bigint>,
|
|
866
|
+
preOrder: TransactionArgument
|
|
867
|
+
];
|
|
868
|
+
typeArguments: [
|
|
869
|
+
string,
|
|
870
|
+
string
|
|
871
|
+
];
|
|
872
|
+
}
|
|
873
|
+
/**
|
|
874
|
+
* Adds one TP / SL pre-order to an unfilled main. The main must still be on the
|
|
875
|
+
* book, owned by `account_id`, of collateral type `C_TOKEN`, and a fresh opening
|
|
876
|
+
* order. The per-entry rules (`validate_pre_order_entries`) and the market-level
|
|
877
|
+
* total cap (`market.config.max_pre_orders()`) are enforced — existing reserved
|
|
878
|
+
*
|
|
879
|
+
* - 1 must stay within cap.
|
|
880
|
+
*/
|
|
881
|
+
export declare function addPreOrderRequest(options: AddPreOrderRequestOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
882
|
+
export interface DepositCollateralRequestArguments {
|
|
883
|
+
globalConfig: RawTransactionArgument<string>;
|
|
884
|
+
wxaRegistry: RawTransactionArgument<string>;
|
|
885
|
+
marketRegistry: RawTransactionArgument<string>;
|
|
886
|
+
ticker: RawTransactionArgument<string>;
|
|
887
|
+
senderRequest: TransactionArgument;
|
|
888
|
+
accountId: RawTransactionArgument<string>;
|
|
889
|
+
positionId: RawTransactionArgument<number | bigint>;
|
|
890
|
+
collateralAmount: RawTransactionArgument<number | bigint>;
|
|
891
|
+
}
|
|
892
|
+
export interface DepositCollateralRequestOptions {
|
|
893
|
+
package?: string;
|
|
894
|
+
arguments: DepositCollateralRequestArguments | [
|
|
895
|
+
globalConfig: RawTransactionArgument<string>,
|
|
896
|
+
wxaRegistry: RawTransactionArgument<string>,
|
|
897
|
+
marketRegistry: RawTransactionArgument<string>,
|
|
898
|
+
ticker: RawTransactionArgument<string>,
|
|
899
|
+
senderRequest: TransactionArgument,
|
|
900
|
+
accountId: RawTransactionArgument<string>,
|
|
901
|
+
positionId: RawTransactionArgument<number | bigint>,
|
|
902
|
+
collateralAmount: RawTransactionArgument<number | bigint>
|
|
903
|
+
];
|
|
904
|
+
typeArguments: [
|
|
905
|
+
string,
|
|
906
|
+
string
|
|
907
|
+
];
|
|
908
|
+
}
|
|
909
|
+
/** Creates a request to deposit collateral on a position. */
|
|
910
|
+
export declare function depositCollateralRequest(options: DepositCollateralRequestOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
911
|
+
export interface WithdrawCollateralRequestArguments {
|
|
912
|
+
globalConfig: RawTransactionArgument<string>;
|
|
913
|
+
wxaRegistry: RawTransactionArgument<string>;
|
|
914
|
+
marketRegistry: RawTransactionArgument<string>;
|
|
915
|
+
ticker: RawTransactionArgument<string>;
|
|
916
|
+
senderRequest: TransactionArgument;
|
|
917
|
+
accountId: RawTransactionArgument<string>;
|
|
918
|
+
positionId: RawTransactionArgument<number | bigint>;
|
|
919
|
+
amount: RawTransactionArgument<number | bigint>;
|
|
920
|
+
}
|
|
921
|
+
export interface WithdrawCollateralRequestOptions {
|
|
922
|
+
package?: string;
|
|
923
|
+
arguments: WithdrawCollateralRequestArguments | [
|
|
924
|
+
globalConfig: RawTransactionArgument<string>,
|
|
925
|
+
wxaRegistry: RawTransactionArgument<string>,
|
|
926
|
+
marketRegistry: RawTransactionArgument<string>,
|
|
927
|
+
ticker: RawTransactionArgument<string>,
|
|
928
|
+
senderRequest: TransactionArgument,
|
|
929
|
+
accountId: RawTransactionArgument<string>,
|
|
930
|
+
positionId: RawTransactionArgument<number | bigint>,
|
|
931
|
+
amount: RawTransactionArgument<number | bigint>
|
|
932
|
+
];
|
|
933
|
+
typeArguments: [
|
|
934
|
+
string,
|
|
935
|
+
string
|
|
936
|
+
];
|
|
937
|
+
}
|
|
938
|
+
/** Creates a request to withdraw collateral from a position. */
|
|
939
|
+
export declare function withdrawCollateralRequest(options: WithdrawCollateralRequestOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
940
|
+
export interface LiquidateArguments {
|
|
941
|
+
globalConfig: RawTransactionArgument<string>;
|
|
942
|
+
wxaRegistry: RawTransactionArgument<string>;
|
|
943
|
+
marketRegistry: RawTransactionArgument<string>;
|
|
944
|
+
ticker: RawTransactionArgument<string>;
|
|
945
|
+
pool: RawTransactionArgument<string>;
|
|
946
|
+
senderRequest: TransactionArgument;
|
|
947
|
+
positionId: RawTransactionArgument<number | bigint>;
|
|
948
|
+
oracle: RawTransactionArgument<string>;
|
|
949
|
+
}
|
|
950
|
+
export interface LiquidateOptions {
|
|
951
|
+
package?: string;
|
|
952
|
+
arguments: LiquidateArguments | [
|
|
953
|
+
globalConfig: RawTransactionArgument<string>,
|
|
954
|
+
wxaRegistry: RawTransactionArgument<string>,
|
|
955
|
+
marketRegistry: RawTransactionArgument<string>,
|
|
956
|
+
ticker: RawTransactionArgument<string>,
|
|
957
|
+
pool: RawTransactionArgument<string>,
|
|
958
|
+
senderRequest: TransactionArgument,
|
|
959
|
+
positionId: RawTransactionArgument<number | bigint>,
|
|
960
|
+
oracle: RawTransactionArgument<string>
|
|
961
|
+
];
|
|
962
|
+
typeArguments: [
|
|
963
|
+
string,
|
|
964
|
+
string
|
|
965
|
+
];
|
|
966
|
+
}
|
|
967
|
+
/**
|
|
968
|
+
* Creates a request to liquidate a position (keeper only). Reads
|
|
969
|
+
* account_object_address from the position directly. Keeper-only: liquidate an
|
|
970
|
+
* undercollateralized position. Single-call — no `TradingRequest` hot potato to
|
|
971
|
+
* manage. Returns a droppable receipt vector for PTB composition.
|
|
972
|
+
*/
|
|
973
|
+
export declare function liquidate(options: LiquidateOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
974
|
+
export interface BatchLiquidateArguments {
|
|
975
|
+
globalConfig: RawTransactionArgument<string>;
|
|
976
|
+
wxaRegistry: RawTransactionArgument<string>;
|
|
977
|
+
marketRegistry: RawTransactionArgument<string>;
|
|
978
|
+
ticker: RawTransactionArgument<string>;
|
|
979
|
+
pool: RawTransactionArgument<string>;
|
|
980
|
+
senderRequest: TransactionArgument;
|
|
981
|
+
oracle: RawTransactionArgument<string>;
|
|
982
|
+
pageSize: RawTransactionArgument<number | bigint>;
|
|
983
|
+
pageIndex: RawTransactionArgument<number | bigint>;
|
|
984
|
+
}
|
|
985
|
+
export interface BatchLiquidateOptions {
|
|
986
|
+
package?: string;
|
|
987
|
+
arguments: BatchLiquidateArguments | [
|
|
988
|
+
globalConfig: RawTransactionArgument<string>,
|
|
989
|
+
wxaRegistry: RawTransactionArgument<string>,
|
|
990
|
+
marketRegistry: RawTransactionArgument<string>,
|
|
991
|
+
ticker: RawTransactionArgument<string>,
|
|
992
|
+
pool: RawTransactionArgument<string>,
|
|
993
|
+
senderRequest: TransactionArgument,
|
|
994
|
+
oracle: RawTransactionArgument<string>,
|
|
995
|
+
pageSize: RawTransactionArgument<number | bigint>,
|
|
996
|
+
pageIndex: RawTransactionArgument<number | bigint>
|
|
997
|
+
];
|
|
998
|
+
typeArguments: [
|
|
999
|
+
string,
|
|
1000
|
+
string
|
|
1001
|
+
];
|
|
1002
|
+
}
|
|
1003
|
+
/**
|
|
1004
|
+
* Keeper-only: scans a page of positions and liquidates every liquidatable one.
|
|
1005
|
+
* Iterates positions by internal index `[page_index * page_size, ...)`. No-op if
|
|
1006
|
+
* the page is out of range or no positions qualify. Returns droppable receipts for
|
|
1007
|
+
* every liquidated position.
|
|
1008
|
+
*/
|
|
1009
|
+
export declare function batchLiquidate(options: BatchLiquidateOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
1010
|
+
export interface ExecuteArguments {
|
|
1011
|
+
globalConfig: RawTransactionArgument<string>;
|
|
1012
|
+
wxaRegistry: RawTransactionArgument<string>;
|
|
1013
|
+
marketRegistry: RawTransactionArgument<string>;
|
|
1014
|
+
ticker: RawTransactionArgument<string>;
|
|
1015
|
+
pool: RawTransactionArgument<string>;
|
|
1016
|
+
req: TransactionArgument;
|
|
1017
|
+
oracle: RawTransactionArgument<string>;
|
|
1018
|
+
}
|
|
1019
|
+
export interface ExecuteOptions {
|
|
1020
|
+
package?: string;
|
|
1021
|
+
arguments: ExecuteArguments | [
|
|
1022
|
+
globalConfig: RawTransactionArgument<string>,
|
|
1023
|
+
wxaRegistry: RawTransactionArgument<string>,
|
|
1024
|
+
marketRegistry: RawTransactionArgument<string>,
|
|
1025
|
+
ticker: RawTransactionArgument<string>,
|
|
1026
|
+
pool: RawTransactionArgument<string>,
|
|
1027
|
+
req: TransactionArgument,
|
|
1028
|
+
oracle: RawTransactionArgument<string>
|
|
1029
|
+
];
|
|
1030
|
+
typeArguments: [
|
|
1031
|
+
string,
|
|
1032
|
+
string
|
|
1033
|
+
];
|
|
1034
|
+
}
|
|
1035
|
+
/**
|
|
1036
|
+
* Executes a trading request. All `*_request` creators return raw
|
|
1037
|
+
* `TradingRequest<C>`; pass it straight to `execute` after attaching any witness
|
|
1038
|
+
* rules (e.g. `pyth_rule::feed(&mut req, ...)`). Used by both user happy paths and
|
|
1039
|
+
* keeper paths.
|
|
1040
|
+
*/
|
|
1041
|
+
export declare function execute(options: ExecuteOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
1042
|
+
export interface ExecuteOpenPositionArguments {
|
|
1043
|
+
globalConfig: RawTransactionArgument<string>;
|
|
1044
|
+
wxaRegistry: RawTransactionArgument<string>;
|
|
1045
|
+
market: RawTransactionArgument<string>;
|
|
1046
|
+
pool: RawTransactionArgument<string>;
|
|
1047
|
+
oracle: RawTransactionArgument<string>;
|
|
1048
|
+
marketId: RawTransactionArgument<string>;
|
|
1049
|
+
accountId: RawTransactionArgument<string>;
|
|
1050
|
+
orderId: RawTransactionArgument<number | bigint>;
|
|
1051
|
+
accountObjectAddress: RawTransactionArgument<string>;
|
|
1052
|
+
sender: RawTransactionArgument<string>;
|
|
1053
|
+
collateral: TransactionArgument;
|
|
1054
|
+
isLong: RawTransactionArgument<boolean>;
|
|
1055
|
+
size: TransactionArgument;
|
|
1056
|
+
acceptablePrice: RawTransactionArgument<number | bigint>;
|
|
1057
|
+
}
|
|
1058
|
+
export interface ExecuteOpenPositionOptions {
|
|
1059
|
+
package?: string;
|
|
1060
|
+
arguments: ExecuteOpenPositionArguments | [
|
|
1061
|
+
globalConfig: RawTransactionArgument<string>,
|
|
1062
|
+
wxaRegistry: RawTransactionArgument<string>,
|
|
1063
|
+
market: RawTransactionArgument<string>,
|
|
1064
|
+
pool: RawTransactionArgument<string>,
|
|
1065
|
+
oracle: RawTransactionArgument<string>,
|
|
1066
|
+
marketId: RawTransactionArgument<string>,
|
|
1067
|
+
accountId: RawTransactionArgument<string>,
|
|
1068
|
+
orderId: RawTransactionArgument<number | bigint>,
|
|
1069
|
+
accountObjectAddress: RawTransactionArgument<string>,
|
|
1070
|
+
sender: RawTransactionArgument<string>,
|
|
1071
|
+
collateral: TransactionArgument,
|
|
1072
|
+
isLong: RawTransactionArgument<boolean>,
|
|
1073
|
+
size: TransactionArgument,
|
|
1074
|
+
acceptablePrice: RawTransactionArgument<number | bigint>
|
|
1075
|
+
];
|
|
1076
|
+
typeArguments: [
|
|
1077
|
+
string,
|
|
1078
|
+
string
|
|
1079
|
+
];
|
|
1080
|
+
}
|
|
1081
|
+
export declare function executeOpenPosition(options: ExecuteOpenPositionOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
1082
|
+
export interface ExecuteIncreasePositionArguments {
|
|
1083
|
+
globalConfig: RawTransactionArgument<string>;
|
|
1084
|
+
market: RawTransactionArgument<string>;
|
|
1085
|
+
pool: RawTransactionArgument<string>;
|
|
1086
|
+
oracle: RawTransactionArgument<string>;
|
|
1087
|
+
marketId: RawTransactionArgument<string>;
|
|
1088
|
+
accountObjectAddress: RawTransactionArgument<string>;
|
|
1089
|
+
orderId: RawTransactionArgument<number | bigint>;
|
|
1090
|
+
positionId: RawTransactionArgument<number | bigint>;
|
|
1091
|
+
collateral: TransactionArgument;
|
|
1092
|
+
size: TransactionArgument;
|
|
1093
|
+
acceptablePrice: RawTransactionArgument<number | bigint>;
|
|
1094
|
+
}
|
|
1095
|
+
export interface ExecuteIncreasePositionOptions {
|
|
1096
|
+
package?: string;
|
|
1097
|
+
arguments: ExecuteIncreasePositionArguments | [
|
|
1098
|
+
globalConfig: RawTransactionArgument<string>,
|
|
1099
|
+
market: RawTransactionArgument<string>,
|
|
1100
|
+
pool: RawTransactionArgument<string>,
|
|
1101
|
+
oracle: RawTransactionArgument<string>,
|
|
1102
|
+
marketId: RawTransactionArgument<string>,
|
|
1103
|
+
accountObjectAddress: RawTransactionArgument<string>,
|
|
1104
|
+
orderId: RawTransactionArgument<number | bigint>,
|
|
1105
|
+
positionId: RawTransactionArgument<number | bigint>,
|
|
1106
|
+
collateral: TransactionArgument,
|
|
1107
|
+
size: TransactionArgument,
|
|
1108
|
+
acceptablePrice: RawTransactionArgument<number | bigint>
|
|
1109
|
+
];
|
|
1110
|
+
typeArguments: [
|
|
1111
|
+
string,
|
|
1112
|
+
string
|
|
1113
|
+
];
|
|
1114
|
+
}
|
|
1115
|
+
export declare function executeIncreasePosition(options: ExecuteIncreasePositionOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
1116
|
+
export interface ExecuteClosePositionArguments {
|
|
1117
|
+
globalConfig: RawTransactionArgument<string>;
|
|
1118
|
+
wxaRegistry: RawTransactionArgument<string>;
|
|
1119
|
+
market: RawTransactionArgument<string>;
|
|
1120
|
+
pool: RawTransactionArgument<string>;
|
|
1121
|
+
oracle: RawTransactionArgument<string>;
|
|
1122
|
+
marketId: RawTransactionArgument<string>;
|
|
1123
|
+
accountId: RawTransactionArgument<string>;
|
|
1124
|
+
accountObjId: RawTransactionArgument<string>;
|
|
1125
|
+
orderId: RawTransactionArgument<number | bigint>;
|
|
1126
|
+
positionId: RawTransactionArgument<number | bigint>;
|
|
1127
|
+
acceptablePrice: RawTransactionArgument<number | bigint>;
|
|
1128
|
+
}
|
|
1129
|
+
export interface ExecuteClosePositionOptions {
|
|
1130
|
+
package?: string;
|
|
1131
|
+
arguments: ExecuteClosePositionArguments | [
|
|
1132
|
+
globalConfig: RawTransactionArgument<string>,
|
|
1133
|
+
wxaRegistry: RawTransactionArgument<string>,
|
|
1134
|
+
market: RawTransactionArgument<string>,
|
|
1135
|
+
pool: RawTransactionArgument<string>,
|
|
1136
|
+
oracle: RawTransactionArgument<string>,
|
|
1137
|
+
marketId: RawTransactionArgument<string>,
|
|
1138
|
+
accountId: RawTransactionArgument<string>,
|
|
1139
|
+
accountObjId: RawTransactionArgument<string>,
|
|
1140
|
+
orderId: RawTransactionArgument<number | bigint>,
|
|
1141
|
+
positionId: RawTransactionArgument<number | bigint>,
|
|
1142
|
+
acceptablePrice: RawTransactionArgument<number | bigint>
|
|
1143
|
+
];
|
|
1144
|
+
typeArguments: [
|
|
1145
|
+
string,
|
|
1146
|
+
string
|
|
1147
|
+
];
|
|
1148
|
+
}
|
|
1149
|
+
export declare function executeClosePosition(options: ExecuteClosePositionOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
1150
|
+
export interface ExecuteDecreasePositionArguments {
|
|
1151
|
+
globalConfig: RawTransactionArgument<string>;
|
|
1152
|
+
wxaRegistry: RawTransactionArgument<string>;
|
|
1153
|
+
market: RawTransactionArgument<string>;
|
|
1154
|
+
pool: RawTransactionArgument<string>;
|
|
1155
|
+
oracle: RawTransactionArgument<string>;
|
|
1156
|
+
marketId: RawTransactionArgument<string>;
|
|
1157
|
+
accountId: RawTransactionArgument<string>;
|
|
1158
|
+
accountObjId: RawTransactionArgument<string>;
|
|
1159
|
+
orderId: RawTransactionArgument<number | bigint>;
|
|
1160
|
+
positionId: RawTransactionArgument<number | bigint>;
|
|
1161
|
+
requestedSize: TransactionArgument;
|
|
1162
|
+
acceptablePrice: RawTransactionArgument<number | bigint>;
|
|
1163
|
+
}
|
|
1164
|
+
export interface ExecuteDecreasePositionOptions {
|
|
1165
|
+
package?: string;
|
|
1166
|
+
arguments: ExecuteDecreasePositionArguments | [
|
|
1167
|
+
globalConfig: RawTransactionArgument<string>,
|
|
1168
|
+
wxaRegistry: RawTransactionArgument<string>,
|
|
1169
|
+
market: RawTransactionArgument<string>,
|
|
1170
|
+
pool: RawTransactionArgument<string>,
|
|
1171
|
+
oracle: RawTransactionArgument<string>,
|
|
1172
|
+
marketId: RawTransactionArgument<string>,
|
|
1173
|
+
accountId: RawTransactionArgument<string>,
|
|
1174
|
+
accountObjId: RawTransactionArgument<string>,
|
|
1175
|
+
orderId: RawTransactionArgument<number | bigint>,
|
|
1176
|
+
positionId: RawTransactionArgument<number | bigint>,
|
|
1177
|
+
requestedSize: TransactionArgument,
|
|
1178
|
+
acceptablePrice: RawTransactionArgument<number | bigint>
|
|
1179
|
+
];
|
|
1180
|
+
typeArguments: [
|
|
1181
|
+
string,
|
|
1182
|
+
string
|
|
1183
|
+
];
|
|
1184
|
+
}
|
|
1185
|
+
export declare function executeDecreasePosition(options: ExecuteDecreasePositionOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
1186
|
+
export interface ExecutePlaceOrderArguments {
|
|
1187
|
+
globalConfig: RawTransactionArgument<string>;
|
|
1188
|
+
wxaRegistry: RawTransactionArgument<string>;
|
|
1189
|
+
market: RawTransactionArgument<string>;
|
|
1190
|
+
pool: RawTransactionArgument<string>;
|
|
1191
|
+
oracle: RawTransactionArgument<string>;
|
|
1192
|
+
marketId: RawTransactionArgument<string>;
|
|
1193
|
+
accountId: RawTransactionArgument<string>;
|
|
1194
|
+
accountObjectAddress: RawTransactionArgument<string>;
|
|
1195
|
+
collateral: TransactionArgument;
|
|
1196
|
+
isLong: RawTransactionArgument<boolean>;
|
|
1197
|
+
isStopOrder: RawTransactionArgument<boolean>;
|
|
1198
|
+
reduceOnly: RawTransactionArgument<boolean>;
|
|
1199
|
+
size: TransactionArgument;
|
|
1200
|
+
triggerPrice: TransactionArgument;
|
|
1201
|
+
acceptablePrice: RawTransactionArgument<number | bigint>;
|
|
1202
|
+
linkedPositionId: RawTransactionArgument<number | bigint | null>;
|
|
1203
|
+
preOrders: TransactionArgument;
|
|
1204
|
+
}
|
|
1205
|
+
export interface ExecutePlaceOrderOptions {
|
|
1206
|
+
package?: string;
|
|
1207
|
+
arguments: ExecutePlaceOrderArguments | [
|
|
1208
|
+
globalConfig: RawTransactionArgument<string>,
|
|
1209
|
+
wxaRegistry: RawTransactionArgument<string>,
|
|
1210
|
+
market: RawTransactionArgument<string>,
|
|
1211
|
+
pool: RawTransactionArgument<string>,
|
|
1212
|
+
oracle: RawTransactionArgument<string>,
|
|
1213
|
+
marketId: RawTransactionArgument<string>,
|
|
1214
|
+
accountId: RawTransactionArgument<string>,
|
|
1215
|
+
accountObjectAddress: RawTransactionArgument<string>,
|
|
1216
|
+
collateral: TransactionArgument,
|
|
1217
|
+
isLong: RawTransactionArgument<boolean>,
|
|
1218
|
+
isStopOrder: RawTransactionArgument<boolean>,
|
|
1219
|
+
reduceOnly: RawTransactionArgument<boolean>,
|
|
1220
|
+
size: TransactionArgument,
|
|
1221
|
+
triggerPrice: TransactionArgument,
|
|
1222
|
+
acceptablePrice: RawTransactionArgument<number | bigint>,
|
|
1223
|
+
linkedPositionId: RawTransactionArgument<number | bigint | null>,
|
|
1224
|
+
preOrders: TransactionArgument
|
|
1225
|
+
];
|
|
1226
|
+
typeArguments: [
|
|
1227
|
+
string,
|
|
1228
|
+
string
|
|
1229
|
+
];
|
|
1230
|
+
}
|
|
1231
|
+
export declare function executePlaceOrder(options: ExecutePlaceOrderOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
1232
|
+
export interface ExecuteCancelOrderArguments {
|
|
1233
|
+
globalConfig: RawTransactionArgument<string>;
|
|
1234
|
+
wxaRegistry: RawTransactionArgument<string>;
|
|
1235
|
+
market: RawTransactionArgument<string>;
|
|
1236
|
+
marketId: RawTransactionArgument<string>;
|
|
1237
|
+
accountId: RawTransactionArgument<string>;
|
|
1238
|
+
accountObjId: RawTransactionArgument<string>;
|
|
1239
|
+
orderId: RawTransactionArgument<number | bigint>;
|
|
1240
|
+
triggerPriceKey: RawTransactionArgument<number | bigint>;
|
|
1241
|
+
orderTypeTag: RawTransactionArgument<number>;
|
|
1242
|
+
}
|
|
1243
|
+
export interface ExecuteCancelOrderOptions {
|
|
1244
|
+
package?: string;
|
|
1245
|
+
arguments: ExecuteCancelOrderArguments | [
|
|
1246
|
+
globalConfig: RawTransactionArgument<string>,
|
|
1247
|
+
wxaRegistry: RawTransactionArgument<string>,
|
|
1248
|
+
market: RawTransactionArgument<string>,
|
|
1249
|
+
marketId: RawTransactionArgument<string>,
|
|
1250
|
+
accountId: RawTransactionArgument<string>,
|
|
1251
|
+
accountObjId: RawTransactionArgument<string>,
|
|
1252
|
+
orderId: RawTransactionArgument<number | bigint>,
|
|
1253
|
+
triggerPriceKey: RawTransactionArgument<number | bigint>,
|
|
1254
|
+
orderTypeTag: RawTransactionArgument<number>
|
|
1255
|
+
];
|
|
1256
|
+
typeArguments: [
|
|
1257
|
+
string,
|
|
1258
|
+
string
|
|
1259
|
+
];
|
|
1260
|
+
}
|
|
1261
|
+
export declare function executeCancelOrder(options: ExecuteCancelOrderOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
1262
|
+
export interface ExecuteUpdateOrderArguments {
|
|
1263
|
+
globalConfig: RawTransactionArgument<string>;
|
|
1264
|
+
market: RawTransactionArgument<string>;
|
|
1265
|
+
pool: RawTransactionArgument<string>;
|
|
1266
|
+
oracle: RawTransactionArgument<string>;
|
|
1267
|
+
marketId: RawTransactionArgument<string>;
|
|
1268
|
+
accountObjectAddress: RawTransactionArgument<string>;
|
|
1269
|
+
orderId: RawTransactionArgument<number | bigint>;
|
|
1270
|
+
triggerPriceKey: RawTransactionArgument<number | bigint>;
|
|
1271
|
+
orderTypeTag: RawTransactionArgument<number>;
|
|
1272
|
+
newSize: TransactionArgument;
|
|
1273
|
+
newTriggerPrice: TransactionArgument;
|
|
1274
|
+
}
|
|
1275
|
+
export interface ExecuteUpdateOrderOptions {
|
|
1276
|
+
package?: string;
|
|
1277
|
+
arguments: ExecuteUpdateOrderArguments | [
|
|
1278
|
+
globalConfig: RawTransactionArgument<string>,
|
|
1279
|
+
market: RawTransactionArgument<string>,
|
|
1280
|
+
pool: RawTransactionArgument<string>,
|
|
1281
|
+
oracle: RawTransactionArgument<string>,
|
|
1282
|
+
marketId: RawTransactionArgument<string>,
|
|
1283
|
+
accountObjectAddress: RawTransactionArgument<string>,
|
|
1284
|
+
orderId: RawTransactionArgument<number | bigint>,
|
|
1285
|
+
triggerPriceKey: RawTransactionArgument<number | bigint>,
|
|
1286
|
+
orderTypeTag: RawTransactionArgument<number>,
|
|
1287
|
+
newSize: TransactionArgument,
|
|
1288
|
+
newTriggerPrice: TransactionArgument
|
|
1289
|
+
];
|
|
1290
|
+
typeArguments: [
|
|
1291
|
+
string,
|
|
1292
|
+
string
|
|
1293
|
+
];
|
|
1294
|
+
}
|
|
1295
|
+
export declare function executeUpdateOrder(options: ExecuteUpdateOrderOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
1296
|
+
export interface ExecuteCancelPreOrderArguments {
|
|
1297
|
+
globalConfig: RawTransactionArgument<string>;
|
|
1298
|
+
market: RawTransactionArgument<string>;
|
|
1299
|
+
marketId: RawTransactionArgument<string>;
|
|
1300
|
+
accountObjectAddress: RawTransactionArgument<string>;
|
|
1301
|
+
mainOrderId: RawTransactionArgument<number | bigint>;
|
|
1302
|
+
preOrderId: RawTransactionArgument<number | bigint>;
|
|
1303
|
+
}
|
|
1304
|
+
export interface ExecuteCancelPreOrderOptions {
|
|
1305
|
+
package?: string;
|
|
1306
|
+
arguments: ExecuteCancelPreOrderArguments | [
|
|
1307
|
+
globalConfig: RawTransactionArgument<string>,
|
|
1308
|
+
market: RawTransactionArgument<string>,
|
|
1309
|
+
marketId: RawTransactionArgument<string>,
|
|
1310
|
+
accountObjectAddress: RawTransactionArgument<string>,
|
|
1311
|
+
mainOrderId: RawTransactionArgument<number | bigint>,
|
|
1312
|
+
preOrderId: RawTransactionArgument<number | bigint>
|
|
1313
|
+
];
|
|
1314
|
+
typeArguments: [
|
|
1315
|
+
string,
|
|
1316
|
+
string
|
|
1317
|
+
];
|
|
1318
|
+
}
|
|
1319
|
+
/**
|
|
1320
|
+
* Cancels a single pre-order by id. Validates ownership / collateral type on the
|
|
1321
|
+
* reserved `Order`, then verifies `pre_order_id` actually belongs to
|
|
1322
|
+
* `main_order_id` via the index. Destroys the `Order` through
|
|
1323
|
+
* `position::remove_order<C_TOKEN>` and emits
|
|
1324
|
+
* `PreOrderCancelled { main_order_id, pre_order_count: 1 }`.
|
|
1325
|
+
*/
|
|
1326
|
+
export declare function executeCancelPreOrder(options: ExecuteCancelPreOrderOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
1327
|
+
export interface ExecuteAddPreOrderArguments {
|
|
1328
|
+
globalConfig: RawTransactionArgument<string>;
|
|
1329
|
+
market: RawTransactionArgument<string>;
|
|
1330
|
+
marketId: RawTransactionArgument<string>;
|
|
1331
|
+
accountObjectAddress: RawTransactionArgument<string>;
|
|
1332
|
+
mainOrderId: RawTransactionArgument<number | bigint>;
|
|
1333
|
+
newPreOrder: TransactionArgument;
|
|
1334
|
+
}
|
|
1335
|
+
export interface ExecuteAddPreOrderOptions {
|
|
1336
|
+
package?: string;
|
|
1337
|
+
arguments: ExecuteAddPreOrderArguments | [
|
|
1338
|
+
globalConfig: RawTransactionArgument<string>,
|
|
1339
|
+
market: RawTransactionArgument<string>,
|
|
1340
|
+
marketId: RawTransactionArgument<string>,
|
|
1341
|
+
accountObjectAddress: RawTransactionArgument<string>,
|
|
1342
|
+
mainOrderId: RawTransactionArgument<number | bigint>,
|
|
1343
|
+
newPreOrder: TransactionArgument
|
|
1344
|
+
];
|
|
1345
|
+
typeArguments: [
|
|
1346
|
+
string,
|
|
1347
|
+
string
|
|
1348
|
+
];
|
|
1349
|
+
}
|
|
1350
|
+
/**
|
|
1351
|
+
* Appends a single pre-order to an existing or empty reservation for
|
|
1352
|
+
* `main_order_id`. Locates the main on a book, verifies eligibility, then
|
|
1353
|
+
* `assert_pre_order_count(existing + 1, cap)` and per-entry validation before
|
|
1354
|
+
* delegating to `reserve_pre_orders`.
|
|
1355
|
+
*/
|
|
1356
|
+
export declare function executeAddPreOrder(options: ExecuteAddPreOrderOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
1357
|
+
export interface ExecuteDepositCollateralArguments {
|
|
1358
|
+
globalConfig: RawTransactionArgument<string>;
|
|
1359
|
+
market: RawTransactionArgument<string>;
|
|
1360
|
+
pool: RawTransactionArgument<string>;
|
|
1361
|
+
oracle: RawTransactionArgument<string>;
|
|
1362
|
+
marketId: RawTransactionArgument<string>;
|
|
1363
|
+
accountObjectAddress: RawTransactionArgument<string>;
|
|
1364
|
+
positionId: RawTransactionArgument<number | bigint>;
|
|
1365
|
+
collateral: TransactionArgument;
|
|
1366
|
+
}
|
|
1367
|
+
export interface ExecuteDepositCollateralOptions {
|
|
1368
|
+
package?: string;
|
|
1369
|
+
arguments: ExecuteDepositCollateralArguments | [
|
|
1370
|
+
globalConfig: RawTransactionArgument<string>,
|
|
1371
|
+
market: RawTransactionArgument<string>,
|
|
1372
|
+
pool: RawTransactionArgument<string>,
|
|
1373
|
+
oracle: RawTransactionArgument<string>,
|
|
1374
|
+
marketId: RawTransactionArgument<string>,
|
|
1375
|
+
accountObjectAddress: RawTransactionArgument<string>,
|
|
1376
|
+
positionId: RawTransactionArgument<number | bigint>,
|
|
1377
|
+
collateral: TransactionArgument
|
|
1378
|
+
];
|
|
1379
|
+
typeArguments: [
|
|
1380
|
+
string,
|
|
1381
|
+
string
|
|
1382
|
+
];
|
|
1383
|
+
}
|
|
1384
|
+
export declare function executeDepositCollateral(options: ExecuteDepositCollateralOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
1385
|
+
export interface ExecuteWithdrawCollateralArguments {
|
|
1386
|
+
globalConfig: RawTransactionArgument<string>;
|
|
1387
|
+
wxaRegistry: RawTransactionArgument<string>;
|
|
1388
|
+
market: RawTransactionArgument<string>;
|
|
1389
|
+
pool: RawTransactionArgument<string>;
|
|
1390
|
+
oracle: RawTransactionArgument<string>;
|
|
1391
|
+
marketId: RawTransactionArgument<string>;
|
|
1392
|
+
accountObjId: RawTransactionArgument<string>;
|
|
1393
|
+
positionId: RawTransactionArgument<number | bigint>;
|
|
1394
|
+
amount: RawTransactionArgument<number | bigint>;
|
|
1395
|
+
}
|
|
1396
|
+
export interface ExecuteWithdrawCollateralOptions {
|
|
1397
|
+
package?: string;
|
|
1398
|
+
arguments: ExecuteWithdrawCollateralArguments | [
|
|
1399
|
+
globalConfig: RawTransactionArgument<string>,
|
|
1400
|
+
wxaRegistry: RawTransactionArgument<string>,
|
|
1401
|
+
market: RawTransactionArgument<string>,
|
|
1402
|
+
pool: RawTransactionArgument<string>,
|
|
1403
|
+
oracle: RawTransactionArgument<string>,
|
|
1404
|
+
marketId: RawTransactionArgument<string>,
|
|
1405
|
+
accountObjId: RawTransactionArgument<string>,
|
|
1406
|
+
positionId: RawTransactionArgument<number | bigint>,
|
|
1407
|
+
amount: RawTransactionArgument<number | bigint>
|
|
1408
|
+
];
|
|
1409
|
+
typeArguments: [
|
|
1410
|
+
string,
|
|
1411
|
+
string
|
|
1412
|
+
];
|
|
1413
|
+
}
|
|
1414
|
+
/**
|
|
1415
|
+
* Returns `(returned_collateral_amount, position_collateral_amount)`: the first is
|
|
1416
|
+
* the amount actually credited back to the wxa account (read off the `Balance`
|
|
1417
|
+
* rather than echoing the requested `amount`, so the response field can't drift if
|
|
1418
|
+
* `pos.withdraw_collateral` ever gains clamping semantics); the second is the
|
|
1419
|
+
* post-action position collateral.
|
|
1420
|
+
*/
|
|
1421
|
+
export declare function executeWithdrawCollateral(options: ExecuteWithdrawCollateralOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
1422
|
+
export interface ExecuteLiquidateArguments {
|
|
1423
|
+
globalConfig: RawTransactionArgument<string>;
|
|
1424
|
+
wxaRegistry: RawTransactionArgument<string>;
|
|
1425
|
+
market: RawTransactionArgument<string>;
|
|
1426
|
+
pool: RawTransactionArgument<string>;
|
|
1427
|
+
oracle: RawTransactionArgument<string>;
|
|
1428
|
+
marketId: RawTransactionArgument<string>;
|
|
1429
|
+
accountId: RawTransactionArgument<string>;
|
|
1430
|
+
accountObjectAddress: RawTransactionArgument<string>;
|
|
1431
|
+
sender: RawTransactionArgument<string>;
|
|
1432
|
+
positionId: RawTransactionArgument<number | bigint>;
|
|
1433
|
+
}
|
|
1434
|
+
export interface ExecuteLiquidateOptions {
|
|
1435
|
+
package?: string;
|
|
1436
|
+
arguments: ExecuteLiquidateArguments | [
|
|
1437
|
+
globalConfig: RawTransactionArgument<string>,
|
|
1438
|
+
wxaRegistry: RawTransactionArgument<string>,
|
|
1439
|
+
market: RawTransactionArgument<string>,
|
|
1440
|
+
pool: RawTransactionArgument<string>,
|
|
1441
|
+
oracle: RawTransactionArgument<string>,
|
|
1442
|
+
marketId: RawTransactionArgument<string>,
|
|
1443
|
+
accountId: RawTransactionArgument<string>,
|
|
1444
|
+
accountObjectAddress: RawTransactionArgument<string>,
|
|
1445
|
+
sender: RawTransactionArgument<string>,
|
|
1446
|
+
positionId: RawTransactionArgument<number | bigint>
|
|
1447
|
+
];
|
|
1448
|
+
typeArguments: [
|
|
1449
|
+
string,
|
|
1450
|
+
string
|
|
1451
|
+
];
|
|
1452
|
+
}
|
|
1453
|
+
export declare function executeLiquidate(options: ExecuteLiquidateOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
1454
|
+
export interface MatchOrdersArguments {
|
|
1455
|
+
globalConfig: RawTransactionArgument<string>;
|
|
1456
|
+
wxaRegistry: RawTransactionArgument<string>;
|
|
1457
|
+
marketRegistry: RawTransactionArgument<string>;
|
|
1458
|
+
ticker: RawTransactionArgument<string>;
|
|
1459
|
+
pool: RawTransactionArgument<string>;
|
|
1460
|
+
senderRequest: TransactionArgument;
|
|
1461
|
+
oracle: RawTransactionArgument<string>;
|
|
1462
|
+
orderTypeTag: RawTransactionArgument<number>;
|
|
1463
|
+
triggerPrice: RawTransactionArgument<number | bigint>;
|
|
1464
|
+
maxFills: RawTransactionArgument<number | bigint>;
|
|
1465
|
+
}
|
|
1466
|
+
export interface MatchOrdersOptions {
|
|
1467
|
+
package?: string;
|
|
1468
|
+
arguments: MatchOrdersArguments | [
|
|
1469
|
+
globalConfig: RawTransactionArgument<string>,
|
|
1470
|
+
wxaRegistry: RawTransactionArgument<string>,
|
|
1471
|
+
marketRegistry: RawTransactionArgument<string>,
|
|
1472
|
+
ticker: RawTransactionArgument<string>,
|
|
1473
|
+
pool: RawTransactionArgument<string>,
|
|
1474
|
+
senderRequest: TransactionArgument,
|
|
1475
|
+
oracle: RawTransactionArgument<string>,
|
|
1476
|
+
orderTypeTag: RawTransactionArgument<number>,
|
|
1477
|
+
triggerPrice: RawTransactionArgument<number | bigint>,
|
|
1478
|
+
maxFills: RawTransactionArgument<number | bigint>
|
|
1479
|
+
];
|
|
1480
|
+
typeArguments: [
|
|
1481
|
+
string,
|
|
1482
|
+
string
|
|
1483
|
+
];
|
|
1484
|
+
}
|
|
1485
|
+
export declare function matchOrders(options: MatchOrdersOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
1486
|
+
export interface UpdateFundingRateArguments {
|
|
1487
|
+
globalConfig: RawTransactionArgument<string>;
|
|
1488
|
+
marketRegistry: RawTransactionArgument<string>;
|
|
1489
|
+
ticker: RawTransactionArgument<string>;
|
|
1490
|
+
pool: RawTransactionArgument<string>;
|
|
1491
|
+
oracle: RawTransactionArgument<string>;
|
|
1492
|
+
senderRequest: TransactionArgument;
|
|
1493
|
+
}
|
|
1494
|
+
export interface UpdateFundingRateOptions {
|
|
1495
|
+
package?: string;
|
|
1496
|
+
arguments: UpdateFundingRateArguments | [
|
|
1497
|
+
globalConfig: RawTransactionArgument<string>,
|
|
1498
|
+
marketRegistry: RawTransactionArgument<string>,
|
|
1499
|
+
ticker: RawTransactionArgument<string>,
|
|
1500
|
+
pool: RawTransactionArgument<string>,
|
|
1501
|
+
oracle: RawTransactionArgument<string>,
|
|
1502
|
+
senderRequest: TransactionArgument
|
|
1503
|
+
];
|
|
1504
|
+
typeArguments: [
|
|
1505
|
+
string
|
|
1506
|
+
];
|
|
1507
|
+
}
|
|
1508
|
+
/** Keeper: updates funding rate for a market. */
|
|
1509
|
+
export declare function updateFundingRate(options: UpdateFundingRateOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
1510
|
+
export interface SettleFundingRateArguments {
|
|
1511
|
+
globalConfig: RawTransactionArgument<string>;
|
|
1512
|
+
market: RawTransactionArgument<string>;
|
|
1513
|
+
pool: RawTransactionArgument<string>;
|
|
1514
|
+
oracle: RawTransactionArgument<string>;
|
|
1515
|
+
}
|
|
1516
|
+
export interface SettleFundingRateOptions {
|
|
1517
|
+
package?: string;
|
|
1518
|
+
arguments: SettleFundingRateArguments | [
|
|
1519
|
+
globalConfig: RawTransactionArgument<string>,
|
|
1520
|
+
market: RawTransactionArgument<string>,
|
|
1521
|
+
pool: RawTransactionArgument<string>,
|
|
1522
|
+
oracle: RawTransactionArgument<string>
|
|
1523
|
+
];
|
|
1524
|
+
typeArguments: [
|
|
1525
|
+
string
|
|
1526
|
+
];
|
|
1527
|
+
}
|
|
1528
|
+
export declare function settleFundingRate(options: SettleFundingRateOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
1529
|
+
export interface OpenPositionByKeeperArguments {
|
|
1530
|
+
globalConfig: RawTransactionArgument<string>;
|
|
1531
|
+
wxaRegistry: RawTransactionArgument<string>;
|
|
1532
|
+
marketRegistry: RawTransactionArgument<string>;
|
|
1533
|
+
ticker: RawTransactionArgument<string>;
|
|
1534
|
+
pool: RawTransactionArgument<string>;
|
|
1535
|
+
keeperRequest: TransactionArgument;
|
|
1536
|
+
accountObjectAddress: RawTransactionArgument<string>;
|
|
1537
|
+
collateralCoin: RawTransactionArgument<string>;
|
|
1538
|
+
isLong: RawTransactionArgument<boolean>;
|
|
1539
|
+
size: RawTransactionArgument<number | bigint>;
|
|
1540
|
+
acceptablePrice: RawTransactionArgument<number | bigint>;
|
|
1541
|
+
oracle: RawTransactionArgument<string>;
|
|
1542
|
+
}
|
|
1543
|
+
export interface OpenPositionByKeeperOptions {
|
|
1544
|
+
package?: string;
|
|
1545
|
+
arguments: OpenPositionByKeeperArguments | [
|
|
1546
|
+
globalConfig: RawTransactionArgument<string>,
|
|
1547
|
+
wxaRegistry: RawTransactionArgument<string>,
|
|
1548
|
+
marketRegistry: RawTransactionArgument<string>,
|
|
1549
|
+
ticker: RawTransactionArgument<string>,
|
|
1550
|
+
pool: RawTransactionArgument<string>,
|
|
1551
|
+
keeperRequest: TransactionArgument,
|
|
1552
|
+
accountObjectAddress: RawTransactionArgument<string>,
|
|
1553
|
+
collateralCoin: RawTransactionArgument<string>,
|
|
1554
|
+
isLong: RawTransactionArgument<boolean>,
|
|
1555
|
+
size: RawTransactionArgument<number | bigint>,
|
|
1556
|
+
acceptablePrice: RawTransactionArgument<number | bigint>,
|
|
1557
|
+
oracle: RawTransactionArgument<string>
|
|
1558
|
+
];
|
|
1559
|
+
typeArguments: [
|
|
1560
|
+
string,
|
|
1561
|
+
string
|
|
1562
|
+
];
|
|
1563
|
+
}
|
|
1564
|
+
/**
|
|
1565
|
+
* Keeper-only: open a new position for an account, funded by the keeper's own
|
|
1566
|
+
* `Coin<C_TOKEN>` (campaign / airdrop use case). The keeper bypasses
|
|
1567
|
+
* `min_coll_value` on this path — `increase_position` and `place_order` still
|
|
1568
|
+
* enforce it for all callers including keepers. Returns a droppable receipt vector
|
|
1569
|
+
* so the keeper or a composing protocol can reference the position in the same
|
|
1570
|
+
* PTB.
|
|
1571
|
+
*/
|
|
1572
|
+
export declare function openPositionByKeeper(options: OpenPositionByKeeperOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
1573
|
+
export interface ClosePositionByKeeperArguments {
|
|
1574
|
+
globalConfig: RawTransactionArgument<string>;
|
|
1575
|
+
wxaRegistry: RawTransactionArgument<string>;
|
|
1576
|
+
marketRegistry: RawTransactionArgument<string>;
|
|
1577
|
+
ticker: RawTransactionArgument<string>;
|
|
1578
|
+
pool: RawTransactionArgument<string>;
|
|
1579
|
+
keeperRequest: TransactionArgument;
|
|
1580
|
+
positionId: RawTransactionArgument<number | bigint>;
|
|
1581
|
+
acceptablePrice: RawTransactionArgument<number | bigint>;
|
|
1582
|
+
oracle: RawTransactionArgument<string>;
|
|
1583
|
+
}
|
|
1584
|
+
export interface ClosePositionByKeeperOptions {
|
|
1585
|
+
package?: string;
|
|
1586
|
+
arguments: ClosePositionByKeeperArguments | [
|
|
1587
|
+
globalConfig: RawTransactionArgument<string>,
|
|
1588
|
+
wxaRegistry: RawTransactionArgument<string>,
|
|
1589
|
+
marketRegistry: RawTransactionArgument<string>,
|
|
1590
|
+
ticker: RawTransactionArgument<string>,
|
|
1591
|
+
pool: RawTransactionArgument<string>,
|
|
1592
|
+
keeperRequest: TransactionArgument,
|
|
1593
|
+
positionId: RawTransactionArgument<number | bigint>,
|
|
1594
|
+
acceptablePrice: RawTransactionArgument<number | bigint>,
|
|
1595
|
+
oracle: RawTransactionArgument<string>
|
|
1596
|
+
];
|
|
1597
|
+
typeArguments: [
|
|
1598
|
+
string,
|
|
1599
|
+
string
|
|
1600
|
+
];
|
|
1601
|
+
}
|
|
1602
|
+
/**
|
|
1603
|
+
* Risk-manager-only: force-close a position (emergency use). Reads
|
|
1604
|
+
* `account_object_address` from the position directly, like `liquidate`. Returns a
|
|
1605
|
+
* droppable receipt vector for PTB composition.
|
|
1606
|
+
*/
|
|
1607
|
+
export declare function closePositionByKeeper(options: ClosePositionByKeeperOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
1608
|
+
export interface ResolveSizeArguments {
|
|
1609
|
+
market: RawTransactionArgument<string>;
|
|
1610
|
+
pool: RawTransactionArgument<string>;
|
|
1611
|
+
oracle: RawTransactionArgument<string>;
|
|
1612
|
+
collateralAmount: RawTransactionArgument<number | bigint>;
|
|
1613
|
+
leverageBps: RawTransactionArgument<number | bigint>;
|
|
1614
|
+
}
|
|
1615
|
+
export interface ResolveSizeOptions {
|
|
1616
|
+
package?: string;
|
|
1617
|
+
arguments: ResolveSizeArguments | [
|
|
1618
|
+
market: RawTransactionArgument<string>,
|
|
1619
|
+
pool: RawTransactionArgument<string>,
|
|
1620
|
+
oracle: RawTransactionArgument<string>,
|
|
1621
|
+
collateralAmount: RawTransactionArgument<number | bigint>,
|
|
1622
|
+
leverageBps: RawTransactionArgument<number | bigint>
|
|
1623
|
+
];
|
|
1624
|
+
typeArguments: [
|
|
1625
|
+
string,
|
|
1626
|
+
string
|
|
1627
|
+
];
|
|
1628
|
+
}
|
|
1629
|
+
/**
|
|
1630
|
+
* Computes the scaled size (u128, 9 decimals) for a given collateral amount,
|
|
1631
|
+
* leverage, and actual collateral price. Compatible with non-dollar-pegged
|
|
1632
|
+
* collateral. Base ticker comes from `market.symbol()`, collateral ticker from
|
|
1633
|
+
* `pool.token_ticker<LP, C>()` — callers cannot mis-price by lying about either.
|
|
1634
|
+
*/
|
|
1635
|
+
export declare function resolveSize(options: ResolveSizeOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
1636
|
+
export interface ResolveOrderSizeArguments {
|
|
1637
|
+
pool: RawTransactionArgument<string>;
|
|
1638
|
+
oracle: RawTransactionArgument<string>;
|
|
1639
|
+
triggerPrice: RawTransactionArgument<number | bigint>;
|
|
1640
|
+
collateralAmount: RawTransactionArgument<number | bigint>;
|
|
1641
|
+
leverageBps: RawTransactionArgument<number | bigint>;
|
|
1642
|
+
}
|
|
1643
|
+
export interface ResolveOrderSizeOptions {
|
|
1644
|
+
package?: string;
|
|
1645
|
+
arguments: ResolveOrderSizeArguments | [
|
|
1646
|
+
pool: RawTransactionArgument<string>,
|
|
1647
|
+
oracle: RawTransactionArgument<string>,
|
|
1648
|
+
triggerPrice: RawTransactionArgument<number | bigint>,
|
|
1649
|
+
collateralAmount: RawTransactionArgument<number | bigint>,
|
|
1650
|
+
leverageBps: RawTransactionArgument<number | bigint>
|
|
1651
|
+
];
|
|
1652
|
+
typeArguments: [
|
|
1653
|
+
string,
|
|
1654
|
+
string
|
|
1655
|
+
];
|
|
1656
|
+
}
|
|
1657
|
+
/**
|
|
1658
|
+
* Like `resolve_size` but uses a trigger price instead of the base oracle price.
|
|
1659
|
+
* Use this to compute the `size` parameter for `place_order_request`.
|
|
1660
|
+
* `trigger_price` is a scaled Float value (the same u128 you pass to
|
|
1661
|
+
* `place_order_request`).
|
|
1662
|
+
*/
|
|
1663
|
+
export declare function resolveOrderSize(options: ResolveOrderSizeOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
1664
|
+
export interface CheckOpenSlippageArguments {
|
|
1665
|
+
isLong: RawTransactionArgument<boolean>;
|
|
1666
|
+
price: TransactionArgument;
|
|
1667
|
+
acceptablePrice: RawTransactionArgument<number | bigint>;
|
|
1668
|
+
}
|
|
1669
|
+
export interface CheckOpenSlippageOptions {
|
|
1670
|
+
package?: string;
|
|
1671
|
+
arguments: CheckOpenSlippageArguments | [
|
|
1672
|
+
isLong: RawTransactionArgument<boolean>,
|
|
1673
|
+
price: TransactionArgument,
|
|
1674
|
+
acceptablePrice: RawTransactionArgument<number | bigint>
|
|
1675
|
+
];
|
|
1676
|
+
}
|
|
1677
|
+
export declare function checkOpenSlippage(options: CheckOpenSlippageOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
1678
|
+
export interface AssertOpenSlippageArguments {
|
|
1679
|
+
isLong: RawTransactionArgument<boolean>;
|
|
1680
|
+
price: TransactionArgument;
|
|
1681
|
+
acceptablePrice: RawTransactionArgument<number | bigint>;
|
|
1682
|
+
}
|
|
1683
|
+
export interface AssertOpenSlippageOptions {
|
|
1684
|
+
package?: string;
|
|
1685
|
+
arguments: AssertOpenSlippageArguments | [
|
|
1686
|
+
isLong: RawTransactionArgument<boolean>,
|
|
1687
|
+
price: TransactionArgument,
|
|
1688
|
+
acceptablePrice: RawTransactionArgument<number | bigint>
|
|
1689
|
+
];
|
|
1690
|
+
}
|
|
1691
|
+
export declare function assertOpenSlippage(options: AssertOpenSlippageOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
1692
|
+
export interface AssertCloseSlippageArguments {
|
|
1693
|
+
isLong: RawTransactionArgument<boolean>;
|
|
1694
|
+
price: TransactionArgument;
|
|
1695
|
+
acceptablePrice: RawTransactionArgument<number | bigint>;
|
|
1696
|
+
}
|
|
1697
|
+
export interface AssertCloseSlippageOptions {
|
|
1698
|
+
package?: string;
|
|
1699
|
+
arguments: AssertCloseSlippageArguments | [
|
|
1700
|
+
isLong: RawTransactionArgument<boolean>,
|
|
1701
|
+
price: TransactionArgument,
|
|
1702
|
+
acceptablePrice: RawTransactionArgument<number | bigint>
|
|
1703
|
+
];
|
|
1704
|
+
}
|
|
1705
|
+
export declare function assertCloseSlippage(options: AssertCloseSlippageOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
1706
|
+
export interface CalculateTotalTradingFeeArguments {
|
|
1707
|
+
marketConfig: RawTransactionArgument<string>;
|
|
1708
|
+
pool: RawTransactionArgument<string>;
|
|
1709
|
+
executionPrice: TransactionArgument;
|
|
1710
|
+
orderIsLong: RawTransactionArgument<boolean>;
|
|
1711
|
+
orderSize: TransactionArgument;
|
|
1712
|
+
}
|
|
1713
|
+
export interface CalculateTotalTradingFeeOptions {
|
|
1714
|
+
package?: string;
|
|
1715
|
+
arguments: CalculateTotalTradingFeeArguments | [
|
|
1716
|
+
marketConfig: RawTransactionArgument<string>,
|
|
1717
|
+
pool: RawTransactionArgument<string>,
|
|
1718
|
+
executionPrice: TransactionArgument,
|
|
1719
|
+
orderIsLong: RawTransactionArgument<boolean>,
|
|
1720
|
+
orderSize: TransactionArgument
|
|
1721
|
+
];
|
|
1722
|
+
typeArguments: [
|
|
1723
|
+
string
|
|
1724
|
+
];
|
|
1725
|
+
}
|
|
1726
|
+
export declare function calculateTotalTradingFee(options: CalculateTotalTradingFeeOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
1727
|
+
export interface EmitLpEquityArguments {
|
|
1728
|
+
market: RawTransactionArgument<string>;
|
|
1729
|
+
collateralToken: TransactionArgument;
|
|
1730
|
+
amount: RawTransactionArgument<number | bigint>;
|
|
1731
|
+
isProfit: RawTransactionArgument<boolean>;
|
|
1732
|
+
memo: RawTransactionArgument<string>;
|
|
1733
|
+
}
|
|
1734
|
+
export interface EmitLpEquityOptions {
|
|
1735
|
+
package?: string;
|
|
1736
|
+
arguments: EmitLpEquityArguments | [
|
|
1737
|
+
market: RawTransactionArgument<string>,
|
|
1738
|
+
collateralToken: TransactionArgument,
|
|
1739
|
+
amount: RawTransactionArgument<number | bigint>,
|
|
1740
|
+
isProfit: RawTransactionArgument<boolean>,
|
|
1741
|
+
memo: RawTransactionArgument<string>
|
|
1742
|
+
];
|
|
1743
|
+
typeArguments: [
|
|
1744
|
+
string
|
|
1745
|
+
];
|
|
1746
|
+
}
|
|
1747
|
+
/**
|
|
1748
|
+
* Emits a `WlpEquityChanged` event for a settlement that moves `amount` of
|
|
1749
|
+
* `collateral_token` to/from the LP pool. No-op when `amount == 0`. Centralizes
|
|
1750
|
+
* the `market.symbol()` / `with_defining_ids<LP_TOKEN>()` lookups so call sites
|
|
1751
|
+
* stay short.
|
|
1752
|
+
*/
|
|
1753
|
+
export declare function emitLpEquity(options: EmitLpEquityOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
1754
|
+
export interface DistributeTradingFeeArguments {
|
|
1755
|
+
globalConfig: RawTransactionArgument<string>;
|
|
1756
|
+
pool: RawTransactionArgument<string>;
|
|
1757
|
+
market: RawTransactionArgument<string>;
|
|
1758
|
+
feeBalance: TransactionArgument;
|
|
1759
|
+
protocolShareBps: RawTransactionArgument<number | bigint>;
|
|
1760
|
+
marketId: RawTransactionArgument<string>;
|
|
1761
|
+
collateralToken: TransactionArgument;
|
|
1762
|
+
collateralPrice: TransactionArgument;
|
|
1763
|
+
}
|
|
1764
|
+
export interface DistributeTradingFeeOptions {
|
|
1765
|
+
package?: string;
|
|
1766
|
+
arguments: DistributeTradingFeeArguments | [
|
|
1767
|
+
globalConfig: RawTransactionArgument<string>,
|
|
1768
|
+
pool: RawTransactionArgument<string>,
|
|
1769
|
+
market: RawTransactionArgument<string>,
|
|
1770
|
+
feeBalance: TransactionArgument,
|
|
1771
|
+
protocolShareBps: RawTransactionArgument<number | bigint>,
|
|
1772
|
+
marketId: RawTransactionArgument<string>,
|
|
1773
|
+
collateralToken: TransactionArgument,
|
|
1774
|
+
collateralPrice: TransactionArgument
|
|
1775
|
+
];
|
|
1776
|
+
typeArguments: [
|
|
1777
|
+
string,
|
|
1778
|
+
string
|
|
1779
|
+
];
|
|
1780
|
+
}
|
|
1781
|
+
/**
|
|
1782
|
+
* Splits an already-collected trading-fee balance into the protocol's cut (sent to
|
|
1783
|
+
* `GlobalVault.protocol_fee_balance`) and the LP pool's cut (joined into the pool,
|
|
1784
|
+
* emitted as a `WlpEquityChanged` "fee" event). Used by every closing/liquidation
|
|
1785
|
+
* path that realizes a fee.
|
|
1786
|
+
*/
|
|
1787
|
+
export declare function distributeTradingFee(options: DistributeTradingFeeOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
1788
|
+
export interface CalculateEffectiveCollateralAmountArguments {
|
|
1789
|
+
grossCollateralAmount: RawTransactionArgument<number | bigint>;
|
|
1790
|
+
borrowFee: RawTransactionArgument<number | bigint>;
|
|
1791
|
+
fundingSign: RawTransactionArgument<boolean>;
|
|
1792
|
+
fundingFee: RawTransactionArgument<number | bigint>;
|
|
1793
|
+
tradingFee: RawTransactionArgument<number | bigint>;
|
|
1794
|
+
projectedTradingFee: RawTransactionArgument<number | bigint>;
|
|
1795
|
+
}
|
|
1796
|
+
export interface CalculateEffectiveCollateralAmountOptions {
|
|
1797
|
+
package?: string;
|
|
1798
|
+
arguments: CalculateEffectiveCollateralAmountArguments | [
|
|
1799
|
+
grossCollateralAmount: RawTransactionArgument<number | bigint>,
|
|
1800
|
+
borrowFee: RawTransactionArgument<number | bigint>,
|
|
1801
|
+
fundingSign: RawTransactionArgument<boolean>,
|
|
1802
|
+
fundingFee: RawTransactionArgument<number | bigint>,
|
|
1803
|
+
tradingFee: RawTransactionArgument<number | bigint>,
|
|
1804
|
+
projectedTradingFee: RawTransactionArgument<number | bigint>
|
|
1805
|
+
];
|
|
1806
|
+
}
|
|
1807
|
+
export declare function calculateEffectiveCollateralAmount(options: CalculateEffectiveCollateralAmountOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
1808
|
+
export interface CalculateLossAdjustedEffectiveCollateralAmountArguments {
|
|
1809
|
+
position: RawTransactionArgument<string>;
|
|
1810
|
+
currentPrice: TransactionArgument;
|
|
1811
|
+
collateralPrice: TransactionArgument;
|
|
1812
|
+
grossCollateralAmount: RawTransactionArgument<number | bigint>;
|
|
1813
|
+
borrowFee: RawTransactionArgument<number | bigint>;
|
|
1814
|
+
fundingSign: RawTransactionArgument<boolean>;
|
|
1815
|
+
fundingFee: RawTransactionArgument<number | bigint>;
|
|
1816
|
+
tradingFee: RawTransactionArgument<number | bigint>;
|
|
1817
|
+
projectedTradingFee: RawTransactionArgument<number | bigint>;
|
|
1818
|
+
}
|
|
1819
|
+
export interface CalculateLossAdjustedEffectiveCollateralAmountOptions {
|
|
1820
|
+
package?: string;
|
|
1821
|
+
arguments: CalculateLossAdjustedEffectiveCollateralAmountArguments | [
|
|
1822
|
+
position: RawTransactionArgument<string>,
|
|
1823
|
+
currentPrice: TransactionArgument,
|
|
1824
|
+
collateralPrice: TransactionArgument,
|
|
1825
|
+
grossCollateralAmount: RawTransactionArgument<number | bigint>,
|
|
1826
|
+
borrowFee: RawTransactionArgument<number | bigint>,
|
|
1827
|
+
fundingSign: RawTransactionArgument<boolean>,
|
|
1828
|
+
fundingFee: RawTransactionArgument<number | bigint>,
|
|
1829
|
+
tradingFee: RawTransactionArgument<number | bigint>,
|
|
1830
|
+
projectedTradingFee: RawTransactionArgument<number | bigint>
|
|
1831
|
+
];
|
|
1832
|
+
}
|
|
1833
|
+
export declare function calculateLossAdjustedEffectiveCollateralAmount(options: CalculateLossAdjustedEffectiveCollateralAmountOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
1834
|
+
export interface SettleLossToBalanceArguments {
|
|
1835
|
+
globalConfig: RawTransactionArgument<string>;
|
|
1836
|
+
pool: RawTransactionArgument<string>;
|
|
1837
|
+
market: RawTransactionArgument<string>;
|
|
1838
|
+
collateral: TransactionArgument;
|
|
1839
|
+
collateralToken: TransactionArgument;
|
|
1840
|
+
lossAmount: RawTransactionArgument<number | bigint>;
|
|
1841
|
+
collateralPrice: TransactionArgument;
|
|
1842
|
+
deficit: RawTransactionArgument<number | bigint>;
|
|
1843
|
+
}
|
|
1844
|
+
export interface SettleLossToBalanceOptions {
|
|
1845
|
+
package?: string;
|
|
1846
|
+
arguments: SettleLossToBalanceArguments | [
|
|
1847
|
+
globalConfig: RawTransactionArgument<string>,
|
|
1848
|
+
pool: RawTransactionArgument<string>,
|
|
1849
|
+
market: RawTransactionArgument<string>,
|
|
1850
|
+
collateral: TransactionArgument,
|
|
1851
|
+
collateralToken: TransactionArgument,
|
|
1852
|
+
lossAmount: RawTransactionArgument<number | bigint>,
|
|
1853
|
+
collateralPrice: TransactionArgument,
|
|
1854
|
+
deficit: RawTransactionArgument<number | bigint>
|
|
1855
|
+
];
|
|
1856
|
+
typeArguments: [
|
|
1857
|
+
string,
|
|
1858
|
+
string
|
|
1859
|
+
];
|
|
1860
|
+
}
|
|
1861
|
+
export declare function settleLossToBalance(options: SettleLossToBalanceOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
1862
|
+
export interface SettleLossToPositionArguments {
|
|
1863
|
+
globalConfig: RawTransactionArgument<string>;
|
|
1864
|
+
pool: RawTransactionArgument<string>;
|
|
1865
|
+
market: RawTransactionArgument<string>;
|
|
1866
|
+
position: RawTransactionArgument<string>;
|
|
1867
|
+
collateralToken: TransactionArgument;
|
|
1868
|
+
lossAmount: RawTransactionArgument<number | bigint>;
|
|
1869
|
+
collateralPrice: TransactionArgument;
|
|
1870
|
+
deficit: RawTransactionArgument<number | bigint>;
|
|
1871
|
+
}
|
|
1872
|
+
export interface SettleLossToPositionOptions {
|
|
1873
|
+
package?: string;
|
|
1874
|
+
arguments: SettleLossToPositionArguments | [
|
|
1875
|
+
globalConfig: RawTransactionArgument<string>,
|
|
1876
|
+
pool: RawTransactionArgument<string>,
|
|
1877
|
+
market: RawTransactionArgument<string>,
|
|
1878
|
+
position: RawTransactionArgument<string>,
|
|
1879
|
+
collateralToken: TransactionArgument,
|
|
1880
|
+
lossAmount: RawTransactionArgument<number | bigint>,
|
|
1881
|
+
collateralPrice: TransactionArgument,
|
|
1882
|
+
deficit: RawTransactionArgument<number | bigint>
|
|
1883
|
+
];
|
|
1884
|
+
typeArguments: [
|
|
1885
|
+
string,
|
|
1886
|
+
string
|
|
1887
|
+
];
|
|
1888
|
+
}
|
|
1889
|
+
export declare function settleLossToPosition(options: SettleLossToPositionOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
1890
|
+
export interface SettleFeesToBalanceArguments {
|
|
1891
|
+
globalConfig: RawTransactionArgument<string>;
|
|
1892
|
+
pool: RawTransactionArgument<string>;
|
|
1893
|
+
market: RawTransactionArgument<string>;
|
|
1894
|
+
collateral: TransactionArgument;
|
|
1895
|
+
protocolShareBps: RawTransactionArgument<number | bigint>;
|
|
1896
|
+
marketId: RawTransactionArgument<string>;
|
|
1897
|
+
collateralToken: TransactionArgument;
|
|
1898
|
+
collateralPrice: TransactionArgument;
|
|
1899
|
+
feeAmount: RawTransactionArgument<number | bigint>;
|
|
1900
|
+
deficit: RawTransactionArgument<number | bigint>;
|
|
1901
|
+
}
|
|
1902
|
+
export interface SettleFeesToBalanceOptions {
|
|
1903
|
+
package?: string;
|
|
1904
|
+
arguments: SettleFeesToBalanceArguments | [
|
|
1905
|
+
globalConfig: RawTransactionArgument<string>,
|
|
1906
|
+
pool: RawTransactionArgument<string>,
|
|
1907
|
+
market: RawTransactionArgument<string>,
|
|
1908
|
+
collateral: TransactionArgument,
|
|
1909
|
+
protocolShareBps: RawTransactionArgument<number | bigint>,
|
|
1910
|
+
marketId: RawTransactionArgument<string>,
|
|
1911
|
+
collateralToken: TransactionArgument,
|
|
1912
|
+
collateralPrice: TransactionArgument,
|
|
1913
|
+
feeAmount: RawTransactionArgument<number | bigint>,
|
|
1914
|
+
deficit: RawTransactionArgument<number | bigint>
|
|
1915
|
+
];
|
|
1916
|
+
typeArguments: [
|
|
1917
|
+
string,
|
|
1918
|
+
string
|
|
1919
|
+
];
|
|
1920
|
+
}
|
|
1921
|
+
export declare function settleFeesToBalance(options: SettleFeesToBalanceOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
1922
|
+
export interface SettleFeesToPositionArguments {
|
|
1923
|
+
globalConfig: RawTransactionArgument<string>;
|
|
1924
|
+
pool: RawTransactionArgument<string>;
|
|
1925
|
+
market: RawTransactionArgument<string>;
|
|
1926
|
+
position: RawTransactionArgument<string>;
|
|
1927
|
+
protocolShareBps: RawTransactionArgument<number | bigint>;
|
|
1928
|
+
marketId: RawTransactionArgument<string>;
|
|
1929
|
+
collateralToken: TransactionArgument;
|
|
1930
|
+
collateralPrice: TransactionArgument;
|
|
1931
|
+
feeAmount: RawTransactionArgument<number | bigint>;
|
|
1932
|
+
deficit: RawTransactionArgument<number | bigint>;
|
|
1933
|
+
}
|
|
1934
|
+
export interface SettleFeesToPositionOptions {
|
|
1935
|
+
package?: string;
|
|
1936
|
+
arguments: SettleFeesToPositionArguments | [
|
|
1937
|
+
globalConfig: RawTransactionArgument<string>,
|
|
1938
|
+
pool: RawTransactionArgument<string>,
|
|
1939
|
+
market: RawTransactionArgument<string>,
|
|
1940
|
+
position: RawTransactionArgument<string>,
|
|
1941
|
+
protocolShareBps: RawTransactionArgument<number | bigint>,
|
|
1942
|
+
marketId: RawTransactionArgument<string>,
|
|
1943
|
+
collateralToken: TransactionArgument,
|
|
1944
|
+
collateralPrice: TransactionArgument,
|
|
1945
|
+
feeAmount: RawTransactionArgument<number | bigint>,
|
|
1946
|
+
deficit: RawTransactionArgument<number | bigint>
|
|
1947
|
+
];
|
|
1948
|
+
typeArguments: [
|
|
1949
|
+
string,
|
|
1950
|
+
string
|
|
1951
|
+
];
|
|
1952
|
+
}
|
|
1953
|
+
export declare function settleFeesToPosition(options: SettleFeesToPositionOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
1954
|
+
export interface SettleFundingToBalanceArguments {
|
|
1955
|
+
globalConfig: RawTransactionArgument<string>;
|
|
1956
|
+
pool: RawTransactionArgument<string>;
|
|
1957
|
+
collateral: TransactionArgument;
|
|
1958
|
+
fundingSign: RawTransactionArgument<boolean>;
|
|
1959
|
+
fundingFee: RawTransactionArgument<number | bigint>;
|
|
1960
|
+
collateralPrice: TransactionArgument;
|
|
1961
|
+
marketTicker: RawTransactionArgument<string>;
|
|
1962
|
+
deficit: RawTransactionArgument<number | bigint>;
|
|
1963
|
+
}
|
|
1964
|
+
export interface SettleFundingToBalanceOptions {
|
|
1965
|
+
package?: string;
|
|
1966
|
+
arguments: SettleFundingToBalanceArguments | [
|
|
1967
|
+
globalConfig: RawTransactionArgument<string>,
|
|
1968
|
+
pool: RawTransactionArgument<string>,
|
|
1969
|
+
collateral: TransactionArgument,
|
|
1970
|
+
fundingSign: RawTransactionArgument<boolean>,
|
|
1971
|
+
fundingFee: RawTransactionArgument<number | bigint>,
|
|
1972
|
+
collateralPrice: TransactionArgument,
|
|
1973
|
+
marketTicker: RawTransactionArgument<string>,
|
|
1974
|
+
deficit: RawTransactionArgument<number | bigint>
|
|
1975
|
+
];
|
|
1976
|
+
typeArguments: [
|
|
1977
|
+
string,
|
|
1978
|
+
string
|
|
1979
|
+
];
|
|
1980
|
+
}
|
|
1981
|
+
export declare function settleFundingToBalance(options: SettleFundingToBalanceOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
1982
|
+
export interface SettleFundingToPositionArguments {
|
|
1983
|
+
globalConfig: RawTransactionArgument<string>;
|
|
1984
|
+
pool: RawTransactionArgument<string>;
|
|
1985
|
+
position: RawTransactionArgument<string>;
|
|
1986
|
+
fundingSign: RawTransactionArgument<boolean>;
|
|
1987
|
+
fundingFee: RawTransactionArgument<number | bigint>;
|
|
1988
|
+
collateralPrice: TransactionArgument;
|
|
1989
|
+
marketTicker: RawTransactionArgument<string>;
|
|
1990
|
+
deficit: RawTransactionArgument<number | bigint>;
|
|
1991
|
+
}
|
|
1992
|
+
export interface SettleFundingToPositionOptions {
|
|
1993
|
+
package?: string;
|
|
1994
|
+
arguments: SettleFundingToPositionArguments | [
|
|
1995
|
+
globalConfig: RawTransactionArgument<string>,
|
|
1996
|
+
pool: RawTransactionArgument<string>,
|
|
1997
|
+
position: RawTransactionArgument<string>,
|
|
1998
|
+
fundingSign: RawTransactionArgument<boolean>,
|
|
1999
|
+
fundingFee: RawTransactionArgument<number | bigint>,
|
|
2000
|
+
collateralPrice: TransactionArgument,
|
|
2001
|
+
marketTicker: RawTransactionArgument<string>,
|
|
2002
|
+
deficit: RawTransactionArgument<number | bigint>
|
|
2003
|
+
];
|
|
2004
|
+
typeArguments: [
|
|
2005
|
+
string,
|
|
2006
|
+
string
|
|
2007
|
+
];
|
|
2008
|
+
}
|
|
2009
|
+
export declare function settleFundingToPosition(options: SettleFundingToPositionOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
2010
|
+
export interface CalculateImpactFeeArguments {
|
|
2011
|
+
marketConfig: RawTransactionArgument<string>;
|
|
2012
|
+
pool: RawTransactionArgument<string>;
|
|
2013
|
+
executionPrice: TransactionArgument;
|
|
2014
|
+
orderIsLong: RawTransactionArgument<boolean>;
|
|
2015
|
+
orderSize: TransactionArgument;
|
|
2016
|
+
}
|
|
2017
|
+
export interface CalculateImpactFeeOptions {
|
|
2018
|
+
package?: string;
|
|
2019
|
+
arguments: CalculateImpactFeeArguments | [
|
|
2020
|
+
marketConfig: RawTransactionArgument<string>,
|
|
2021
|
+
pool: RawTransactionArgument<string>,
|
|
2022
|
+
executionPrice: TransactionArgument,
|
|
2023
|
+
orderIsLong: RawTransactionArgument<boolean>,
|
|
2024
|
+
orderSize: TransactionArgument
|
|
2025
|
+
];
|
|
2026
|
+
typeArguments: [
|
|
2027
|
+
string
|
|
2028
|
+
];
|
|
2029
|
+
}
|
|
2030
|
+
export declare function calculateImpactFee(options: CalculateImpactFeeOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
2031
|
+
export interface ImpactFeeCostUsdArguments {
|
|
2032
|
+
maxImpactFee: TransactionArgument;
|
|
2033
|
+
allocatedExposureUsd: TransactionArgument;
|
|
2034
|
+
exposureUsd: TransactionArgument;
|
|
2035
|
+
impactFeeCurvature: RawTransactionArgument<number | bigint>;
|
|
2036
|
+
impactFeeScale: RawTransactionArgument<number | bigint>;
|
|
2037
|
+
}
|
|
2038
|
+
export interface ImpactFeeCostUsdOptions {
|
|
2039
|
+
package?: string;
|
|
2040
|
+
arguments: ImpactFeeCostUsdArguments | [
|
|
2041
|
+
maxImpactFee: TransactionArgument,
|
|
2042
|
+
allocatedExposureUsd: TransactionArgument,
|
|
2043
|
+
exposureUsd: TransactionArgument,
|
|
2044
|
+
impactFeeCurvature: RawTransactionArgument<number | bigint>,
|
|
2045
|
+
impactFeeScale: RawTransactionArgument<number | bigint>
|
|
2046
|
+
];
|
|
2047
|
+
}
|
|
2048
|
+
export declare function impactFeeCostUsd(options: ImpactFeeCostUsdOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
2049
|
+
export interface CalculatePositionLeverageBpsArguments {
|
|
2050
|
+
totalSize: TransactionArgument;
|
|
2051
|
+
totalCollateralAmount: RawTransactionArgument<number | bigint>;
|
|
2052
|
+
collateralDecimal: RawTransactionArgument<number>;
|
|
2053
|
+
executionPrice: TransactionArgument;
|
|
2054
|
+
collateralPrice: TransactionArgument;
|
|
2055
|
+
}
|
|
2056
|
+
export interface CalculatePositionLeverageBpsOptions {
|
|
2057
|
+
package?: string;
|
|
2058
|
+
arguments: CalculatePositionLeverageBpsArguments | [
|
|
2059
|
+
totalSize: TransactionArgument,
|
|
2060
|
+
totalCollateralAmount: RawTransactionArgument<number | bigint>,
|
|
2061
|
+
collateralDecimal: RawTransactionArgument<number>,
|
|
2062
|
+
executionPrice: TransactionArgument,
|
|
2063
|
+
collateralPrice: TransactionArgument
|
|
2064
|
+
];
|
|
2065
|
+
}
|
|
2066
|
+
export declare function calculatePositionLeverageBps(options: CalculatePositionLeverageBpsOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
2067
|
+
export interface HasMinPositionCollateralValueArguments {
|
|
2068
|
+
minCollateralValue: RawTransactionArgument<number | bigint>;
|
|
2069
|
+
collateralAmount: RawTransactionArgument<number | bigint>;
|
|
2070
|
+
collateralDecimal: RawTransactionArgument<number>;
|
|
2071
|
+
collateralPrice: TransactionArgument;
|
|
2072
|
+
}
|
|
2073
|
+
export interface HasMinPositionCollateralValueOptions {
|
|
2074
|
+
package?: string;
|
|
2075
|
+
arguments: HasMinPositionCollateralValueArguments | [
|
|
2076
|
+
minCollateralValue: RawTransactionArgument<number | bigint>,
|
|
2077
|
+
collateralAmount: RawTransactionArgument<number | bigint>,
|
|
2078
|
+
collateralDecimal: RawTransactionArgument<number>,
|
|
2079
|
+
collateralPrice: TransactionArgument
|
|
2080
|
+
];
|
|
2081
|
+
}
|
|
2082
|
+
export declare function hasMinPositionCollateralValue(options: HasMinPositionCollateralValueOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
2083
|
+
export interface AssertMinPositionCollateralValueArguments {
|
|
2084
|
+
minCollateralValue: RawTransactionArgument<number | bigint>;
|
|
2085
|
+
collateralAmount: RawTransactionArgument<number | bigint>;
|
|
2086
|
+
collateralDecimal: RawTransactionArgument<number>;
|
|
2087
|
+
collateralPrice: TransactionArgument;
|
|
2088
|
+
}
|
|
2089
|
+
export interface AssertMinPositionCollateralValueOptions {
|
|
2090
|
+
package?: string;
|
|
2091
|
+
arguments: AssertMinPositionCollateralValueArguments | [
|
|
2092
|
+
minCollateralValue: RawTransactionArgument<number | bigint>,
|
|
2093
|
+
collateralAmount: RawTransactionArgument<number | bigint>,
|
|
2094
|
+
collateralDecimal: RawTransactionArgument<number>,
|
|
2095
|
+
collateralPrice: TransactionArgument
|
|
2096
|
+
];
|
|
2097
|
+
}
|
|
2098
|
+
export declare function assertMinPositionCollateralValue(options: AssertMinPositionCollateralValueOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
2099
|
+
export interface ProportionalAmountArguments {
|
|
2100
|
+
total: RawTransactionArgument<number | bigint>;
|
|
2101
|
+
partial: TransactionArgument;
|
|
2102
|
+
base: TransactionArgument;
|
|
2103
|
+
}
|
|
2104
|
+
export interface ProportionalAmountOptions {
|
|
2105
|
+
package?: string;
|
|
2106
|
+
arguments: ProportionalAmountArguments | [
|
|
2107
|
+
total: RawTransactionArgument<number | bigint>,
|
|
2108
|
+
partial: TransactionArgument,
|
|
2109
|
+
base: TransactionArgument
|
|
2110
|
+
];
|
|
2111
|
+
}
|
|
2112
|
+
export declare function proportionalAmount(options: ProportionalAmountOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
2113
|
+
export interface DebitCollateralAmountArguments {
|
|
2114
|
+
remaining: RawTransactionArgument<number | bigint>;
|
|
2115
|
+
deficit: RawTransactionArgument<number | bigint>;
|
|
2116
|
+
amount: RawTransactionArgument<number | bigint>;
|
|
2117
|
+
}
|
|
2118
|
+
export interface DebitCollateralAmountOptions {
|
|
2119
|
+
package?: string;
|
|
2120
|
+
arguments: DebitCollateralAmountArguments | [
|
|
2121
|
+
remaining: RawTransactionArgument<number | bigint>,
|
|
2122
|
+
deficit: RawTransactionArgument<number | bigint>,
|
|
2123
|
+
amount: RawTransactionArgument<number | bigint>
|
|
2124
|
+
];
|
|
2125
|
+
}
|
|
2126
|
+
export declare function debitCollateralAmount(options: DebitCollateralAmountOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
2127
|
+
export interface CreditCollateralAmountArguments {
|
|
2128
|
+
remaining: RawTransactionArgument<number | bigint>;
|
|
2129
|
+
deficit: RawTransactionArgument<number | bigint>;
|
|
2130
|
+
amount: RawTransactionArgument<number | bigint>;
|
|
2131
|
+
}
|
|
2132
|
+
export interface CreditCollateralAmountOptions {
|
|
2133
|
+
package?: string;
|
|
2134
|
+
arguments: CreditCollateralAmountArguments | [
|
|
2135
|
+
remaining: RawTransactionArgument<number | bigint>,
|
|
2136
|
+
deficit: RawTransactionArgument<number | bigint>,
|
|
2137
|
+
amount: RawTransactionArgument<number | bigint>
|
|
2138
|
+
];
|
|
2139
|
+
}
|
|
2140
|
+
export declare function creditCollateralAmount(options: CreditCollateralAmountOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
2141
|
+
export interface CalculateRemainingCollateralAfterPartialReduceArguments {
|
|
2142
|
+
position: RawTransactionArgument<string>;
|
|
2143
|
+
reduceSize: TransactionArgument;
|
|
2144
|
+
closeFee: RawTransactionArgument<number | bigint>;
|
|
2145
|
+
currentPrice: TransactionArgument;
|
|
2146
|
+
collateralPrice: TransactionArgument;
|
|
2147
|
+
addedCollateralAmount: RawTransactionArgument<number | bigint>;
|
|
2148
|
+
}
|
|
2149
|
+
export interface CalculateRemainingCollateralAfterPartialReduceOptions {
|
|
2150
|
+
package?: string;
|
|
2151
|
+
arguments: CalculateRemainingCollateralAfterPartialReduceArguments | [
|
|
2152
|
+
position: RawTransactionArgument<string>,
|
|
2153
|
+
reduceSize: TransactionArgument,
|
|
2154
|
+
closeFee: RawTransactionArgument<number | bigint>,
|
|
2155
|
+
currentPrice: TransactionArgument,
|
|
2156
|
+
collateralPrice: TransactionArgument,
|
|
2157
|
+
addedCollateralAmount: RawTransactionArgument<number | bigint>
|
|
2158
|
+
];
|
|
2159
|
+
}
|
|
2160
|
+
export declare function calculateRemainingCollateralAfterPartialReduce(options: CalculateRemainingCollateralAfterPartialReduceOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
2161
|
+
export interface CanPositionGrowArguments {
|
|
2162
|
+
globalConfig: RawTransactionArgument<string>;
|
|
2163
|
+
marketConfig: RawTransactionArgument<string>;
|
|
2164
|
+
pool: RawTransactionArgument<string>;
|
|
2165
|
+
isLong: RawTransactionArgument<boolean>;
|
|
2166
|
+
currentSize: TransactionArgument;
|
|
2167
|
+
addedSize: TransactionArgument;
|
|
2168
|
+
effectiveCollateralAmount: RawTransactionArgument<number | bigint>;
|
|
2169
|
+
collateralDecimal: RawTransactionArgument<number>;
|
|
2170
|
+
collateralToken: TransactionArgument;
|
|
2171
|
+
executionPrice: TransactionArgument;
|
|
2172
|
+
collateralPrice: TransactionArgument;
|
|
2173
|
+
}
|
|
2174
|
+
export interface CanPositionGrowOptions {
|
|
2175
|
+
package?: string;
|
|
2176
|
+
arguments: CanPositionGrowArguments | [
|
|
2177
|
+
globalConfig: RawTransactionArgument<string>,
|
|
2178
|
+
marketConfig: RawTransactionArgument<string>,
|
|
2179
|
+
pool: RawTransactionArgument<string>,
|
|
2180
|
+
isLong: RawTransactionArgument<boolean>,
|
|
2181
|
+
currentSize: TransactionArgument,
|
|
2182
|
+
addedSize: TransactionArgument,
|
|
2183
|
+
effectiveCollateralAmount: RawTransactionArgument<number | bigint>,
|
|
2184
|
+
collateralDecimal: RawTransactionArgument<number>,
|
|
2185
|
+
collateralToken: TransactionArgument,
|
|
2186
|
+
executionPrice: TransactionArgument,
|
|
2187
|
+
collateralPrice: TransactionArgument
|
|
2188
|
+
];
|
|
2189
|
+
typeArguments: [
|
|
2190
|
+
string
|
|
2191
|
+
];
|
|
2192
|
+
}
|
|
2193
|
+
/**
|
|
2194
|
+
* Non-aborting growth check used by keeper order matching. Invalid standalone
|
|
2195
|
+
* orders are rotated behind valid orders at the same trigger price.
|
|
2196
|
+
*/
|
|
2197
|
+
export declare function canPositionGrow(options: CanPositionGrowOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
2198
|
+
export interface ValidatePositionGrowthArguments {
|
|
2199
|
+
globalConfig: RawTransactionArgument<string>;
|
|
2200
|
+
marketConfig: RawTransactionArgument<string>;
|
|
2201
|
+
pool: RawTransactionArgument<string>;
|
|
2202
|
+
isLong: RawTransactionArgument<boolean>;
|
|
2203
|
+
currentSize: TransactionArgument;
|
|
2204
|
+
addedSize: TransactionArgument;
|
|
2205
|
+
effectiveCollateralAmount: RawTransactionArgument<number | bigint>;
|
|
2206
|
+
collateralDecimal: RawTransactionArgument<number>;
|
|
2207
|
+
collateralToken: TransactionArgument;
|
|
2208
|
+
executionPrice: TransactionArgument;
|
|
2209
|
+
collateralPrice: TransactionArgument;
|
|
2210
|
+
}
|
|
2211
|
+
export interface ValidatePositionGrowthOptions {
|
|
2212
|
+
package?: string;
|
|
2213
|
+
arguments: ValidatePositionGrowthArguments | [
|
|
2214
|
+
globalConfig: RawTransactionArgument<string>,
|
|
2215
|
+
marketConfig: RawTransactionArgument<string>,
|
|
2216
|
+
pool: RawTransactionArgument<string>,
|
|
2217
|
+
isLong: RawTransactionArgument<boolean>,
|
|
2218
|
+
currentSize: TransactionArgument,
|
|
2219
|
+
addedSize: TransactionArgument,
|
|
2220
|
+
effectiveCollateralAmount: RawTransactionArgument<number | bigint>,
|
|
2221
|
+
collateralDecimal: RawTransactionArgument<number>,
|
|
2222
|
+
collateralToken: TransactionArgument,
|
|
2223
|
+
executionPrice: TransactionArgument,
|
|
2224
|
+
collateralPrice: TransactionArgument
|
|
2225
|
+
];
|
|
2226
|
+
typeArguments: [
|
|
2227
|
+
string
|
|
2228
|
+
];
|
|
2229
|
+
}
|
|
2230
|
+
export declare function validatePositionGrowth(options: ValidatePositionGrowthOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
2231
|
+
export interface WeightedAveragePriceArguments {
|
|
2232
|
+
currentSize: TransactionArgument;
|
|
2233
|
+
currentAveragePrice: TransactionArgument;
|
|
2234
|
+
addSize: TransactionArgument;
|
|
2235
|
+
fillPrice: TransactionArgument;
|
|
2236
|
+
}
|
|
2237
|
+
export interface WeightedAveragePriceOptions {
|
|
2238
|
+
package?: string;
|
|
2239
|
+
arguments: WeightedAveragePriceArguments | [
|
|
2240
|
+
currentSize: TransactionArgument,
|
|
2241
|
+
currentAveragePrice: TransactionArgument,
|
|
2242
|
+
addSize: TransactionArgument,
|
|
2243
|
+
fillPrice: TransactionArgument
|
|
2244
|
+
];
|
|
2245
|
+
}
|
|
2246
|
+
export declare function weightedAveragePrice(options: WeightedAveragePriceOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
2247
|
+
export interface NormalizeTriggerPriceArguments {
|
|
2248
|
+
triggerPrice: TransactionArgument;
|
|
2249
|
+
orderPriceTick: TransactionArgument;
|
|
2250
|
+
}
|
|
2251
|
+
export interface NormalizeTriggerPriceOptions {
|
|
2252
|
+
package?: string;
|
|
2253
|
+
arguments: NormalizeTriggerPriceArguments | [
|
|
2254
|
+
triggerPrice: TransactionArgument,
|
|
2255
|
+
orderPriceTick: TransactionArgument
|
|
2256
|
+
];
|
|
2257
|
+
}
|
|
2258
|
+
export declare function normalizeTriggerPrice(options: NormalizeTriggerPriceOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
2259
|
+
export interface HasPendingPreOrdersArguments {
|
|
2260
|
+
market: RawTransactionArgument<string>;
|
|
2261
|
+
mainOrderId: RawTransactionArgument<number | bigint>;
|
|
2262
|
+
}
|
|
2263
|
+
export interface HasPendingPreOrdersOptions {
|
|
2264
|
+
package?: string;
|
|
2265
|
+
arguments: HasPendingPreOrdersArguments | [
|
|
2266
|
+
market: RawTransactionArgument<string>,
|
|
2267
|
+
mainOrderId: RawTransactionArgument<number | bigint>
|
|
2268
|
+
];
|
|
2269
|
+
typeArguments: [
|
|
2270
|
+
string
|
|
2271
|
+
];
|
|
2272
|
+
}
|
|
2273
|
+
/** View: whether `main_order_id` has reserved pre-orders pending in `market`. */
|
|
2274
|
+
export declare function hasPendingPreOrders(options: HasPendingPreOrdersOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
2275
|
+
export interface PendingPreOrdersCountArguments {
|
|
2276
|
+
market: RawTransactionArgument<string>;
|
|
2277
|
+
mainOrderId: RawTransactionArgument<number | bigint>;
|
|
2278
|
+
}
|
|
2279
|
+
export interface PendingPreOrdersCountOptions {
|
|
2280
|
+
package?: string;
|
|
2281
|
+
arguments: PendingPreOrdersCountArguments | [
|
|
2282
|
+
market: RawTransactionArgument<string>,
|
|
2283
|
+
mainOrderId: RawTransactionArgument<number | bigint>
|
|
2284
|
+
];
|
|
2285
|
+
typeArguments: [
|
|
2286
|
+
string
|
|
2287
|
+
];
|
|
2288
|
+
}
|
|
2289
|
+
/**
|
|
2290
|
+
* View: how many pre-orders are reserved against `main_order_id`. `0` if no entry
|
|
2291
|
+
* exists.
|
|
2292
|
+
*/
|
|
2293
|
+
export declare function pendingPreOrdersCount(options: PendingPreOrdersCountOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
2294
|
+
export interface ReservePreOrdersArguments {
|
|
2295
|
+
globalConfig: RawTransactionArgument<string>;
|
|
2296
|
+
market: RawTransactionArgument<string>;
|
|
2297
|
+
mainOrderId: RawTransactionArgument<number | bigint>;
|
|
2298
|
+
accountObjectAddress: RawTransactionArgument<string>;
|
|
2299
|
+
marketId: RawTransactionArgument<string>;
|
|
2300
|
+
collateralDecimal: RawTransactionArgument<number>;
|
|
2301
|
+
preOrders: TransactionArgument;
|
|
2302
|
+
}
|
|
2303
|
+
export interface ReservePreOrdersOptions {
|
|
2304
|
+
package?: string;
|
|
2305
|
+
arguments: ReservePreOrdersArguments | [
|
|
2306
|
+
globalConfig: RawTransactionArgument<string>,
|
|
2307
|
+
market: RawTransactionArgument<string>,
|
|
2308
|
+
mainOrderId: RawTransactionArgument<number | bigint>,
|
|
2309
|
+
accountObjectAddress: RawTransactionArgument<string>,
|
|
2310
|
+
marketId: RawTransactionArgument<string>,
|
|
2311
|
+
collateralDecimal: RawTransactionArgument<number>,
|
|
2312
|
+
preOrders: TransactionArgument
|
|
2313
|
+
];
|
|
2314
|
+
typeArguments: [
|
|
2315
|
+
string,
|
|
2316
|
+
string
|
|
2317
|
+
];
|
|
2318
|
+
}
|
|
2319
|
+
/**
|
|
2320
|
+
* Mints fresh order ids for every `PlaceOrderArgument` in `pre_orders`, builds a
|
|
2321
|
+
* real `Order` per entry (reduce-only, zero-collateral,
|
|
2322
|
+
* `linked_position_id = None`), stashes each one in `pending_pre_orders` under its
|
|
2323
|
+
* own id, and records the id list in `pending_pre_order_index` under
|
|
2324
|
+
* `main_order_id` — appending to any existing entry so this helper also works for
|
|
2325
|
+
* the per-leg `add_pre_order` path. Emits one `PreOrderCreated` per reserved
|
|
2326
|
+
* pre-order. No-op when `pre_orders` is empty.
|
|
2327
|
+
*/
|
|
2328
|
+
export declare function reservePreOrders(options: ReservePreOrdersOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
2329
|
+
export interface DropPendingPreOrdersIfExistsArguments {
|
|
2330
|
+
globalConfig: RawTransactionArgument<string>;
|
|
2331
|
+
market: RawTransactionArgument<string>;
|
|
2332
|
+
marketId: RawTransactionArgument<string>;
|
|
2333
|
+
accountObjectAddress: RawTransactionArgument<string>;
|
|
2334
|
+
mainOrderId: RawTransactionArgument<number | bigint>;
|
|
2335
|
+
}
|
|
2336
|
+
export interface DropPendingPreOrdersIfExistsOptions {
|
|
2337
|
+
package?: string;
|
|
2338
|
+
arguments: DropPendingPreOrdersIfExistsArguments | [
|
|
2339
|
+
globalConfig: RawTransactionArgument<string>,
|
|
2340
|
+
market: RawTransactionArgument<string>,
|
|
2341
|
+
marketId: RawTransactionArgument<string>,
|
|
2342
|
+
accountObjectAddress: RawTransactionArgument<string>,
|
|
2343
|
+
mainOrderId: RawTransactionArgument<number | bigint>
|
|
2344
|
+
];
|
|
2345
|
+
typeArguments: [
|
|
2346
|
+
string,
|
|
2347
|
+
string
|
|
2348
|
+
];
|
|
2349
|
+
}
|
|
2350
|
+
/**
|
|
2351
|
+
* Drops every pre-order reserved against `main_order_id` (if any), destroying each
|
|
2352
|
+
* via `position::remove_order` (which splits the zero collateral back into the
|
|
2353
|
+
* vault and deletes the order UID) and emitting one `PreOrderCancelled` per
|
|
2354
|
+
* dropped pre-order.
|
|
2355
|
+
*/
|
|
2356
|
+
export declare function dropPendingPreOrdersIfExists(options: DropPendingPreOrdersIfExistsOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
2357
|
+
export interface ActivatePendingPreOrdersArguments {
|
|
2358
|
+
wxaRegistry: RawTransactionArgument<string>;
|
|
2359
|
+
market: RawTransactionArgument<string>;
|
|
2360
|
+
pos: RawTransactionArgument<string>;
|
|
2361
|
+
positionId: RawTransactionArgument<number | bigint>;
|
|
2362
|
+
mainOrderId: RawTransactionArgument<number | bigint>;
|
|
2363
|
+
accountObjectAddress: RawTransactionArgument<string>;
|
|
2364
|
+
marketId: RawTransactionArgument<string>;
|
|
2365
|
+
}
|
|
2366
|
+
export interface ActivatePendingPreOrdersOptions {
|
|
2367
|
+
package?: string;
|
|
2368
|
+
arguments: ActivatePendingPreOrdersArguments | [
|
|
2369
|
+
wxaRegistry: RawTransactionArgument<string>,
|
|
2370
|
+
market: RawTransactionArgument<string>,
|
|
2371
|
+
pos: RawTransactionArgument<string>,
|
|
2372
|
+
positionId: RawTransactionArgument<number | bigint>,
|
|
2373
|
+
mainOrderId: RawTransactionArgument<number | bigint>,
|
|
2374
|
+
accountObjectAddress: RawTransactionArgument<string>,
|
|
2375
|
+
marketId: RawTransactionArgument<string>
|
|
2376
|
+
];
|
|
2377
|
+
typeArguments: [
|
|
2378
|
+
string,
|
|
2379
|
+
string
|
|
2380
|
+
];
|
|
2381
|
+
}
|
|
2382
|
+
/**
|
|
2383
|
+
* Promotes reserved pre-orders to real reduce-only linked orders on the freshly
|
|
2384
|
+
* opened position. Called from the standalone-fill branch of `match_orders` right
|
|
2385
|
+
* before the new position is pushed to the market. Each reserved `Order` was
|
|
2386
|
+
* created at place time with `linked_position_id = None`; here we stamp in the new
|
|
2387
|
+
* `position_id` and move the order onto the live book.
|
|
2388
|
+
*/
|
|
2389
|
+
export declare function activatePendingPreOrders(options: ActivatePendingPreOrdersOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
2390
|
+
export interface AssertPositionOwnerArguments {
|
|
2391
|
+
position: RawTransactionArgument<string>;
|
|
2392
|
+
accountObjectAddress: RawTransactionArgument<string>;
|
|
2393
|
+
}
|
|
2394
|
+
export interface AssertPositionOwnerOptions {
|
|
2395
|
+
package?: string;
|
|
2396
|
+
arguments: AssertPositionOwnerArguments | [
|
|
2397
|
+
position: RawTransactionArgument<string>,
|
|
2398
|
+
accountObjectAddress: RawTransactionArgument<string>
|
|
2399
|
+
];
|
|
2400
|
+
}
|
|
2401
|
+
export declare function assertPositionOwner(options: AssertPositionOwnerOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
2402
|
+
export interface AssertPositionCollateralTypeArguments {
|
|
2403
|
+
position: RawTransactionArgument<string>;
|
|
2404
|
+
}
|
|
2405
|
+
export interface AssertPositionCollateralTypeOptions {
|
|
2406
|
+
package?: string;
|
|
2407
|
+
arguments: AssertPositionCollateralTypeArguments | [
|
|
2408
|
+
position: RawTransactionArgument<string>
|
|
2409
|
+
];
|
|
2410
|
+
typeArguments: [
|
|
2411
|
+
string
|
|
2412
|
+
];
|
|
2413
|
+
}
|
|
2414
|
+
export declare function assertPositionCollateralType(options: AssertPositionCollateralTypeOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
2415
|
+
export interface BorrowOwnedPositionArguments {
|
|
2416
|
+
market: RawTransactionArgument<string>;
|
|
2417
|
+
positionId: RawTransactionArgument<number | bigint>;
|
|
2418
|
+
accountObjectAddress: RawTransactionArgument<string>;
|
|
2419
|
+
}
|
|
2420
|
+
export interface BorrowOwnedPositionOptions {
|
|
2421
|
+
package?: string;
|
|
2422
|
+
arguments: BorrowOwnedPositionArguments | [
|
|
2423
|
+
market: RawTransactionArgument<string>,
|
|
2424
|
+
positionId: RawTransactionArgument<number | bigint>,
|
|
2425
|
+
accountObjectAddress: RawTransactionArgument<string>
|
|
2426
|
+
];
|
|
2427
|
+
typeArguments: [
|
|
2428
|
+
string,
|
|
2429
|
+
string
|
|
2430
|
+
];
|
|
2431
|
+
}
|
|
2432
|
+
export declare function borrowOwnedPosition(options: BorrowOwnedPositionOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
2433
|
+
export interface BorrowOwnedPositionMutArguments {
|
|
2434
|
+
market: RawTransactionArgument<string>;
|
|
2435
|
+
positionId: RawTransactionArgument<number | bigint>;
|
|
2436
|
+
accountObjectAddress: RawTransactionArgument<string>;
|
|
2437
|
+
}
|
|
2438
|
+
export interface BorrowOwnedPositionMutOptions {
|
|
2439
|
+
package?: string;
|
|
2440
|
+
arguments: BorrowOwnedPositionMutArguments | [
|
|
2441
|
+
market: RawTransactionArgument<string>,
|
|
2442
|
+
positionId: RawTransactionArgument<number | bigint>,
|
|
2443
|
+
accountObjectAddress: RawTransactionArgument<string>
|
|
2444
|
+
];
|
|
2445
|
+
typeArguments: [
|
|
2446
|
+
string,
|
|
2447
|
+
string
|
|
2448
|
+
];
|
|
2449
|
+
}
|
|
2450
|
+
export declare function borrowOwnedPositionMut(options: BorrowOwnedPositionMutOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
2451
|
+
export interface TakeOwnedPositionArguments {
|
|
2452
|
+
market: RawTransactionArgument<string>;
|
|
2453
|
+
positionId: RawTransactionArgument<number | bigint>;
|
|
2454
|
+
accountObjectAddress: RawTransactionArgument<string>;
|
|
2455
|
+
now: RawTransactionArgument<number | bigint>;
|
|
2456
|
+
requireCooldown: RawTransactionArgument<boolean>;
|
|
2457
|
+
}
|
|
2458
|
+
export interface TakeOwnedPositionOptions {
|
|
2459
|
+
package?: string;
|
|
2460
|
+
arguments: TakeOwnedPositionArguments | [
|
|
2461
|
+
market: RawTransactionArgument<string>,
|
|
2462
|
+
positionId: RawTransactionArgument<number | bigint>,
|
|
2463
|
+
accountObjectAddress: RawTransactionArgument<string>,
|
|
2464
|
+
now: RawTransactionArgument<number | bigint>,
|
|
2465
|
+
requireCooldown: RawTransactionArgument<boolean>
|
|
2466
|
+
];
|
|
2467
|
+
typeArguments: [
|
|
2468
|
+
string,
|
|
2469
|
+
string
|
|
2470
|
+
];
|
|
2471
|
+
}
|
|
2472
|
+
export declare function takeOwnedPosition(options: TakeOwnedPositionOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
2473
|
+
export interface FindOrderTypeTagArguments {
|
|
2474
|
+
market: RawTransactionArgument<string>;
|
|
2475
|
+
triggerPriceKey: RawTransactionArgument<number | bigint>;
|
|
2476
|
+
orderId: RawTransactionArgument<number | bigint>;
|
|
2477
|
+
}
|
|
2478
|
+
export interface FindOrderTypeTagOptions {
|
|
2479
|
+
package?: string;
|
|
2480
|
+
arguments: FindOrderTypeTagArguments | [
|
|
2481
|
+
market: RawTransactionArgument<string>,
|
|
2482
|
+
triggerPriceKey: RawTransactionArgument<number | bigint>,
|
|
2483
|
+
orderId: RawTransactionArgument<number | bigint>
|
|
2484
|
+
];
|
|
2485
|
+
typeArguments: [
|
|
2486
|
+
string
|
|
2487
|
+
];
|
|
2488
|
+
}
|
|
2489
|
+
export declare function findOrderTypeTag(options: FindOrderTypeTagOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
2490
|
+
export interface FindCancelOrderLocationArguments {
|
|
2491
|
+
market: RawTransactionArgument<string>;
|
|
2492
|
+
orderTypeTag: RawTransactionArgument<number>;
|
|
2493
|
+
triggerPrice: RawTransactionArgument<number | bigint>;
|
|
2494
|
+
orderId: RawTransactionArgument<number | bigint>;
|
|
2495
|
+
}
|
|
2496
|
+
export interface FindCancelOrderLocationOptions {
|
|
2497
|
+
package?: string;
|
|
2498
|
+
arguments: FindCancelOrderLocationArguments | [
|
|
2499
|
+
market: RawTransactionArgument<string>,
|
|
2500
|
+
orderTypeTag: RawTransactionArgument<number>,
|
|
2501
|
+
triggerPrice: RawTransactionArgument<number | bigint>,
|
|
2502
|
+
orderId: RawTransactionArgument<number | bigint>
|
|
2503
|
+
];
|
|
2504
|
+
typeArguments: [
|
|
2505
|
+
string
|
|
2506
|
+
];
|
|
2507
|
+
}
|
|
2508
|
+
export declare function findCancelOrderLocation(options: FindCancelOrderLocationOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
2509
|
+
export interface FindOrderLocationByIdArguments {
|
|
2510
|
+
market: RawTransactionArgument<string>;
|
|
2511
|
+
orderTypeTag: RawTransactionArgument<number>;
|
|
2512
|
+
orderId: RawTransactionArgument<number | bigint>;
|
|
2513
|
+
}
|
|
2514
|
+
export interface FindOrderLocationByIdOptions {
|
|
2515
|
+
package?: string;
|
|
2516
|
+
arguments: FindOrderLocationByIdArguments | [
|
|
2517
|
+
market: RawTransactionArgument<string>,
|
|
2518
|
+
orderTypeTag: RawTransactionArgument<number>,
|
|
2519
|
+
orderId: RawTransactionArgument<number | bigint>
|
|
2520
|
+
];
|
|
2521
|
+
typeArguments: [
|
|
2522
|
+
string
|
|
2523
|
+
];
|
|
2524
|
+
}
|
|
2525
|
+
export declare function findOrderLocationById(options: FindOrderLocationByIdOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
2526
|
+
export interface FindOrderPriceKeyInBookArguments {
|
|
2527
|
+
book: TransactionArgument;
|
|
2528
|
+
orderId: RawTransactionArgument<number | bigint>;
|
|
2529
|
+
}
|
|
2530
|
+
export interface FindOrderPriceKeyInBookOptions {
|
|
2531
|
+
package?: string;
|
|
2532
|
+
arguments: FindOrderPriceKeyInBookArguments | [
|
|
2533
|
+
book: TransactionArgument,
|
|
2534
|
+
orderId: RawTransactionArgument<number | bigint>
|
|
2535
|
+
];
|
|
2536
|
+
}
|
|
2537
|
+
export declare function findOrderPriceKeyInBook(options: FindOrderPriceKeyInBookOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
2538
|
+
export interface LevelContainsOrderArguments {
|
|
2539
|
+
level: TransactionArgument;
|
|
2540
|
+
orderId: RawTransactionArgument<number | bigint>;
|
|
2541
|
+
}
|
|
2542
|
+
export interface LevelContainsOrderOptions {
|
|
2543
|
+
package?: string;
|
|
2544
|
+
arguments: LevelContainsOrderArguments | [
|
|
2545
|
+
level: TransactionArgument,
|
|
2546
|
+
orderId: RawTransactionArgument<number | bigint>
|
|
2547
|
+
];
|
|
2548
|
+
}
|
|
2549
|
+
export declare function levelContainsOrder(options: LevelContainsOrderOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
2550
|
+
export interface HasOrderInBookArguments {
|
|
2551
|
+
book: TransactionArgument;
|
|
2552
|
+
priceKey: RawTransactionArgument<number | bigint>;
|
|
2553
|
+
orderId: RawTransactionArgument<number | bigint>;
|
|
2554
|
+
}
|
|
2555
|
+
export interface HasOrderInBookOptions {
|
|
2556
|
+
package?: string;
|
|
2557
|
+
arguments: HasOrderInBookArguments | [
|
|
2558
|
+
book: TransactionArgument,
|
|
2559
|
+
priceKey: RawTransactionArgument<number | bigint>,
|
|
2560
|
+
orderId: RawTransactionArgument<number | bigint>
|
|
2561
|
+
];
|
|
2562
|
+
}
|
|
2563
|
+
export declare function hasOrderInBook(options: HasOrderInBookOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
2564
|
+
export interface TakeLinkedOrderAtKeyArguments {
|
|
2565
|
+
market: RawTransactionArgument<string>;
|
|
2566
|
+
triggerPriceKey: RawTransactionArgument<number | bigint>;
|
|
2567
|
+
orderId: RawTransactionArgument<number | bigint>;
|
|
2568
|
+
}
|
|
2569
|
+
export interface TakeLinkedOrderAtKeyOptions {
|
|
2570
|
+
package?: string;
|
|
2571
|
+
arguments: TakeLinkedOrderAtKeyArguments | [
|
|
2572
|
+
market: RawTransactionArgument<string>,
|
|
2573
|
+
triggerPriceKey: RawTransactionArgument<number | bigint>,
|
|
2574
|
+
orderId: RawTransactionArgument<number | bigint>
|
|
2575
|
+
];
|
|
2576
|
+
typeArguments: [
|
|
2577
|
+
string
|
|
2578
|
+
];
|
|
2579
|
+
}
|
|
2580
|
+
export declare function takeLinkedOrderAtKey(options: TakeLinkedOrderAtKeyOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
2581
|
+
export interface CancelLinkedOrdersToBalanceArguments {
|
|
2582
|
+
globalConfig: RawTransactionArgument<string>;
|
|
2583
|
+
wxaRegistry: RawTransactionArgument<string>;
|
|
2584
|
+
market: RawTransactionArgument<string>;
|
|
2585
|
+
accountId: RawTransactionArgument<string>;
|
|
2586
|
+
linkedOrderIds: RawTransactionArgument<Array<number | bigint>>;
|
|
2587
|
+
linkedOrderPriceKeys: RawTransactionArgument<Array<number | bigint>>;
|
|
2588
|
+
memoCode: RawTransactionArgument<number>;
|
|
2589
|
+
}
|
|
2590
|
+
export interface CancelLinkedOrdersToBalanceOptions {
|
|
2591
|
+
package?: string;
|
|
2592
|
+
arguments: CancelLinkedOrdersToBalanceArguments | [
|
|
2593
|
+
globalConfig: RawTransactionArgument<string>,
|
|
2594
|
+
wxaRegistry: RawTransactionArgument<string>,
|
|
2595
|
+
market: RawTransactionArgument<string>,
|
|
2596
|
+
accountId: RawTransactionArgument<string>,
|
|
2597
|
+
linkedOrderIds: RawTransactionArgument<Array<number | bigint>>,
|
|
2598
|
+
linkedOrderPriceKeys: RawTransactionArgument<Array<number | bigint>>,
|
|
2599
|
+
memoCode: RawTransactionArgument<number>
|
|
2600
|
+
];
|
|
2601
|
+
typeArguments: [
|
|
2602
|
+
string,
|
|
2603
|
+
string
|
|
2604
|
+
];
|
|
2605
|
+
}
|
|
2606
|
+
export declare function cancelLinkedOrdersToBalance(options: CancelLinkedOrdersToBalanceOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
2607
|
+
export interface BorrowMutOrderBookArguments {
|
|
2608
|
+
market: RawTransactionArgument<string>;
|
|
2609
|
+
tag: RawTransactionArgument<number>;
|
|
2610
|
+
}
|
|
2611
|
+
export interface BorrowMutOrderBookOptions {
|
|
2612
|
+
package?: string;
|
|
2613
|
+
arguments: BorrowMutOrderBookArguments | [
|
|
2614
|
+
market: RawTransactionArgument<string>,
|
|
2615
|
+
tag: RawTransactionArgument<number>
|
|
2616
|
+
];
|
|
2617
|
+
typeArguments: [
|
|
2618
|
+
string
|
|
2619
|
+
];
|
|
2620
|
+
}
|
|
2621
|
+
export declare function borrowMutOrderBook(options: BorrowMutOrderBookOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
2622
|
+
export interface TakeOrderDirectArguments {
|
|
2623
|
+
market: RawTransactionArgument<string>;
|
|
2624
|
+
triggerPriceKey: RawTransactionArgument<number | bigint>;
|
|
2625
|
+
orderId: RawTransactionArgument<number | bigint>;
|
|
2626
|
+
user: RawTransactionArgument<string>;
|
|
2627
|
+
orderTypeTag: RawTransactionArgument<number>;
|
|
2628
|
+
}
|
|
2629
|
+
export interface TakeOrderDirectOptions {
|
|
2630
|
+
package?: string;
|
|
2631
|
+
arguments: TakeOrderDirectArguments | [
|
|
2632
|
+
market: RawTransactionArgument<string>,
|
|
2633
|
+
triggerPriceKey: RawTransactionArgument<number | bigint>,
|
|
2634
|
+
orderId: RawTransactionArgument<number | bigint>,
|
|
2635
|
+
user: RawTransactionArgument<string>,
|
|
2636
|
+
orderTypeTag: RawTransactionArgument<number>
|
|
2637
|
+
];
|
|
2638
|
+
typeArguments: [
|
|
2639
|
+
string
|
|
2640
|
+
];
|
|
2641
|
+
}
|
|
2642
|
+
export declare function takeOrderDirect(options: TakeOrderDirectOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
2643
|
+
export interface ReturnToUserArguments {
|
|
2644
|
+
wxaRegistry: RawTransactionArgument<string>;
|
|
2645
|
+
balance: TransactionArgument;
|
|
2646
|
+
accountObjAddr: RawTransactionArgument<string>;
|
|
2647
|
+
}
|
|
2648
|
+
export interface ReturnToUserOptions {
|
|
2649
|
+
package?: string;
|
|
2650
|
+
arguments: ReturnToUserArguments | [
|
|
2651
|
+
wxaRegistry: RawTransactionArgument<string>,
|
|
2652
|
+
balance: TransactionArgument,
|
|
2653
|
+
accountObjAddr: RawTransactionArgument<string>
|
|
2654
|
+
];
|
|
2655
|
+
typeArguments: [
|
|
2656
|
+
string
|
|
2657
|
+
];
|
|
2658
|
+
}
|
|
2659
|
+
/**
|
|
2660
|
+
* Returns `balance` to the user's wxa stored balance under the `WaterXPerp`
|
|
2661
|
+
* witness. `account_obj_addr` is the wxa account's UID address (i.e.
|
|
2662
|
+
* `account_id.to_address()`), so `.to_id()` recovers the account_id. Zero balances
|
|
2663
|
+
* are silently destroyed (no event).
|
|
2664
|
+
*/
|
|
2665
|
+
export declare function returnToUser(options: ReturnToUserOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
2666
|
+
export interface MarketIdArguments {
|
|
2667
|
+
market: RawTransactionArgument<string>;
|
|
2668
|
+
}
|
|
2669
|
+
export interface MarketIdOptions {
|
|
2670
|
+
package?: string;
|
|
2671
|
+
arguments: MarketIdArguments | [
|
|
2672
|
+
market: RawTransactionArgument<string>
|
|
2673
|
+
];
|
|
2674
|
+
typeArguments: [
|
|
2675
|
+
string
|
|
2676
|
+
];
|
|
2677
|
+
}
|
|
2678
|
+
/** Returns the object ID of this Market (trading vault). */
|
|
2679
|
+
export declare function marketId(options: MarketIdOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
2680
|
+
export interface BorrowPositionArguments {
|
|
2681
|
+
market: RawTransactionArgument<string>;
|
|
2682
|
+
positionId: RawTransactionArgument<number | bigint>;
|
|
2683
|
+
}
|
|
2684
|
+
export interface BorrowPositionOptions {
|
|
2685
|
+
package?: string;
|
|
2686
|
+
arguments: BorrowPositionArguments | [
|
|
2687
|
+
market: RawTransactionArgument<string>,
|
|
2688
|
+
positionId: RawTransactionArgument<number | bigint>
|
|
2689
|
+
];
|
|
2690
|
+
typeArguments: [
|
|
2691
|
+
string
|
|
2692
|
+
];
|
|
2693
|
+
}
|
|
2694
|
+
/** Borrows a position by ID. */
|
|
2695
|
+
export declare function borrowPosition(options: BorrowPositionOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
2696
|
+
export interface HasPositionArguments {
|
|
2697
|
+
market: RawTransactionArgument<string>;
|
|
2698
|
+
positionId: RawTransactionArgument<number | bigint>;
|
|
2699
|
+
}
|
|
2700
|
+
export interface HasPositionOptions {
|
|
2701
|
+
package?: string;
|
|
2702
|
+
arguments: HasPositionArguments | [
|
|
2703
|
+
market: RawTransactionArgument<string>,
|
|
2704
|
+
positionId: RawTransactionArgument<number | bigint>
|
|
2705
|
+
];
|
|
2706
|
+
typeArguments: [
|
|
2707
|
+
string
|
|
2708
|
+
];
|
|
2709
|
+
}
|
|
2710
|
+
/** Checks if a position exists. */
|
|
2711
|
+
export declare function hasPosition(options: HasPositionOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
2712
|
+
export interface BorrowOrderArguments {
|
|
2713
|
+
market: RawTransactionArgument<string>;
|
|
2714
|
+
orderTypeTag: RawTransactionArgument<number>;
|
|
2715
|
+
triggerPriceKey: RawTransactionArgument<number | bigint>;
|
|
2716
|
+
orderId: RawTransactionArgument<number | bigint>;
|
|
2717
|
+
}
|
|
2718
|
+
export interface BorrowOrderOptions {
|
|
2719
|
+
package?: string;
|
|
2720
|
+
arguments: BorrowOrderArguments | [
|
|
2721
|
+
market: RawTransactionArgument<string>,
|
|
2722
|
+
orderTypeTag: RawTransactionArgument<number>,
|
|
2723
|
+
triggerPriceKey: RawTransactionArgument<number | bigint>,
|
|
2724
|
+
orderId: RawTransactionArgument<number | bigint>
|
|
2725
|
+
];
|
|
2726
|
+
typeArguments: [
|
|
2727
|
+
string
|
|
2728
|
+
];
|
|
2729
|
+
}
|
|
2730
|
+
/** Borrows a single order by type, price key, and order id. */
|
|
2731
|
+
export declare function borrowOrder(options: BorrowOrderOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
2732
|
+
export interface BorrowPositionsArguments {
|
|
2733
|
+
market: RawTransactionArgument<string>;
|
|
2734
|
+
}
|
|
2735
|
+
export interface BorrowPositionsOptions {
|
|
2736
|
+
package?: string;
|
|
2737
|
+
arguments: BorrowPositionsArguments | [
|
|
2738
|
+
market: RawTransactionArgument<string>
|
|
2739
|
+
];
|
|
2740
|
+
typeArguments: [
|
|
2741
|
+
string
|
|
2742
|
+
];
|
|
2743
|
+
}
|
|
2744
|
+
/** Borrows the positions KeyedBigVector (for paginated iteration). */
|
|
2745
|
+
export declare function borrowPositions(options: BorrowPositionsOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
2746
|
+
export interface BorrowOrderBookArguments {
|
|
2747
|
+
market: RawTransactionArgument<string>;
|
|
2748
|
+
orderTypeTag: RawTransactionArgument<number>;
|
|
2749
|
+
}
|
|
2750
|
+
export interface BorrowOrderBookOptions {
|
|
2751
|
+
package?: string;
|
|
2752
|
+
arguments: BorrowOrderBookArguments | [
|
|
2753
|
+
market: RawTransactionArgument<string>,
|
|
2754
|
+
orderTypeTag: RawTransactionArgument<number>
|
|
2755
|
+
];
|
|
2756
|
+
typeArguments: [
|
|
2757
|
+
string
|
|
2758
|
+
];
|
|
2759
|
+
}
|
|
2760
|
+
/** Borrows an order book by type tag (0-3), read-only. */
|
|
2761
|
+
export declare function borrowOrderBook(options: BorrowOrderBookOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
2762
|
+
export interface BorrowConfigArguments {
|
|
2763
|
+
market: RawTransactionArgument<string>;
|
|
2764
|
+
}
|
|
2765
|
+
export interface BorrowConfigOptions {
|
|
2766
|
+
package?: string;
|
|
2767
|
+
arguments: BorrowConfigArguments | [
|
|
2768
|
+
market: RawTransactionArgument<string>
|
|
2769
|
+
];
|
|
2770
|
+
typeArguments: [
|
|
2771
|
+
string
|
|
2772
|
+
];
|
|
2773
|
+
}
|
|
2774
|
+
/** Borrows the market config (for view.move). */
|
|
2775
|
+
export declare function borrowConfig(options: BorrowConfigOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
2776
|
+
export interface MarketSymbolArguments {
|
|
2777
|
+
market: RawTransactionArgument<string>;
|
|
2778
|
+
}
|
|
2779
|
+
export interface MarketSymbolOptions {
|
|
2780
|
+
package?: string;
|
|
2781
|
+
arguments: MarketSymbolArguments | [
|
|
2782
|
+
market: RawTransactionArgument<string>
|
|
2783
|
+
];
|
|
2784
|
+
typeArguments: [
|
|
2785
|
+
string
|
|
2786
|
+
];
|
|
2787
|
+
}
|
|
2788
|
+
export declare function marketSymbol(options: MarketSymbolOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
2789
|
+
export interface CreateMarketRegistryArguments {
|
|
2790
|
+
Cap: RawTransactionArgument<string>;
|
|
2791
|
+
}
|
|
2792
|
+
export interface CreateMarketRegistryOptions {
|
|
2793
|
+
package?: string;
|
|
2794
|
+
arguments: CreateMarketRegistryArguments | [
|
|
2795
|
+
Cap: RawTransactionArgument<string>
|
|
2796
|
+
];
|
|
2797
|
+
typeArguments: [
|
|
2798
|
+
string
|
|
2799
|
+
];
|
|
2800
|
+
}
|
|
2801
|
+
/** Creates and shares a new `MarketRegistry`. Admin-gated. */
|
|
2802
|
+
export declare function createMarketRegistry(options: CreateMarketRegistryOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
2803
|
+
export interface RegistryAssertVersionArguments {
|
|
2804
|
+
registry: RawTransactionArgument<string>;
|
|
2805
|
+
}
|
|
2806
|
+
export interface RegistryAssertVersionOptions {
|
|
2807
|
+
package?: string;
|
|
2808
|
+
arguments: RegistryAssertVersionArguments | [
|
|
2809
|
+
registry: RawTransactionArgument<string>
|
|
2810
|
+
];
|
|
2811
|
+
typeArguments: [
|
|
2812
|
+
string
|
|
2813
|
+
];
|
|
2814
|
+
}
|
|
2815
|
+
export declare function registryAssertVersion(options: RegistryAssertVersionOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
2816
|
+
export interface RegistryAllowVersionArguments {
|
|
2817
|
+
registry: RawTransactionArgument<string>;
|
|
2818
|
+
_: RawTransactionArgument<string>;
|
|
2819
|
+
v: RawTransactionArgument<number>;
|
|
2820
|
+
}
|
|
2821
|
+
export interface RegistryAllowVersionOptions {
|
|
2822
|
+
package?: string;
|
|
2823
|
+
arguments: RegistryAllowVersionArguments | [
|
|
2824
|
+
registry: RawTransactionArgument<string>,
|
|
2825
|
+
_: RawTransactionArgument<string>,
|
|
2826
|
+
v: RawTransactionArgument<number>
|
|
2827
|
+
];
|
|
2828
|
+
typeArguments: [
|
|
2829
|
+
string
|
|
2830
|
+
];
|
|
2831
|
+
}
|
|
2832
|
+
export declare function registryAllowVersion(options: RegistryAllowVersionOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
2833
|
+
export interface RegistryDisallowVersionArguments {
|
|
2834
|
+
registry: RawTransactionArgument<string>;
|
|
2835
|
+
_: RawTransactionArgument<string>;
|
|
2836
|
+
v: RawTransactionArgument<number>;
|
|
2837
|
+
}
|
|
2838
|
+
export interface RegistryDisallowVersionOptions {
|
|
2839
|
+
package?: string;
|
|
2840
|
+
arguments: RegistryDisallowVersionArguments | [
|
|
2841
|
+
registry: RawTransactionArgument<string>,
|
|
2842
|
+
_: RawTransactionArgument<string>,
|
|
2843
|
+
v: RawTransactionArgument<number>
|
|
2844
|
+
];
|
|
2845
|
+
typeArguments: [
|
|
2846
|
+
string
|
|
2847
|
+
];
|
|
2848
|
+
}
|
|
2849
|
+
export declare function registryDisallowVersion(options: RegistryDisallowVersionOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
2850
|
+
export interface AddMarketArguments {
|
|
2851
|
+
registry: RawTransactionArgument<string>;
|
|
2852
|
+
Cap: RawTransactionArgument<string>;
|
|
2853
|
+
ticker: RawTransactionArgument<string>;
|
|
2854
|
+
market: RawTransactionArgument<string>;
|
|
2855
|
+
}
|
|
2856
|
+
export interface AddMarketOptions {
|
|
2857
|
+
package?: string;
|
|
2858
|
+
arguments: AddMarketArguments | [
|
|
2859
|
+
registry: RawTransactionArgument<string>,
|
|
2860
|
+
Cap: RawTransactionArgument<string>,
|
|
2861
|
+
ticker: RawTransactionArgument<string>,
|
|
2862
|
+
market: RawTransactionArgument<string>
|
|
2863
|
+
];
|
|
2864
|
+
typeArguments: [
|
|
2865
|
+
string
|
|
2866
|
+
];
|
|
2867
|
+
}
|
|
2868
|
+
/** Stores `market` in the registry under `ticker`. Aborts if already taken. */
|
|
2869
|
+
export declare function addMarket(options: AddMarketOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
2870
|
+
export interface RemoveMarketArguments {
|
|
2871
|
+
registry: RawTransactionArgument<string>;
|
|
2872
|
+
Cap: RawTransactionArgument<string>;
|
|
2873
|
+
ticker: RawTransactionArgument<string>;
|
|
2874
|
+
}
|
|
2875
|
+
export interface RemoveMarketOptions {
|
|
2876
|
+
package?: string;
|
|
2877
|
+
arguments: RemoveMarketArguments | [
|
|
2878
|
+
registry: RawTransactionArgument<string>,
|
|
2879
|
+
Cap: RawTransactionArgument<string>,
|
|
2880
|
+
ticker: RawTransactionArgument<string>
|
|
2881
|
+
];
|
|
2882
|
+
typeArguments: [
|
|
2883
|
+
string
|
|
2884
|
+
];
|
|
2885
|
+
}
|
|
2886
|
+
/** Removes a market from the registry and returns it. */
|
|
2887
|
+
export declare function removeMarket(options: RemoveMarketOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
2888
|
+
export interface HasMarketArguments {
|
|
2889
|
+
registry: RawTransactionArgument<string>;
|
|
2890
|
+
ticker: RawTransactionArgument<string>;
|
|
2891
|
+
}
|
|
2892
|
+
export interface HasMarketOptions {
|
|
2893
|
+
package?: string;
|
|
2894
|
+
arguments: HasMarketArguments | [
|
|
2895
|
+
registry: RawTransactionArgument<string>,
|
|
2896
|
+
ticker: RawTransactionArgument<string>
|
|
2897
|
+
];
|
|
2898
|
+
typeArguments: [
|
|
2899
|
+
string
|
|
2900
|
+
];
|
|
2901
|
+
}
|
|
2902
|
+
export declare function hasMarket(options: HasMarketOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
2903
|
+
export interface ListedTickersArguments {
|
|
2904
|
+
registry: RawTransactionArgument<string>;
|
|
2905
|
+
}
|
|
2906
|
+
export interface ListedTickersOptions {
|
|
2907
|
+
package?: string;
|
|
2908
|
+
arguments: ListedTickersArguments | [
|
|
2909
|
+
registry: RawTransactionArgument<string>
|
|
2910
|
+
];
|
|
2911
|
+
typeArguments: [
|
|
2912
|
+
string
|
|
2913
|
+
];
|
|
2914
|
+
}
|
|
2915
|
+
export declare function listedTickers(options: ListedTickersOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
2916
|
+
export interface BorrowMarketArguments {
|
|
2917
|
+
registry: RawTransactionArgument<string>;
|
|
2918
|
+
ticker: RawTransactionArgument<string>;
|
|
2919
|
+
}
|
|
2920
|
+
export interface BorrowMarketOptions {
|
|
2921
|
+
package?: string;
|
|
2922
|
+
arguments: BorrowMarketArguments | [
|
|
2923
|
+
registry: RawTransactionArgument<string>,
|
|
2924
|
+
ticker: RawTransactionArgument<string>
|
|
2925
|
+
];
|
|
2926
|
+
typeArguments: [
|
|
2927
|
+
string
|
|
2928
|
+
];
|
|
2929
|
+
}
|
|
2930
|
+
export declare function borrowMarket(options: BorrowMarketOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
2931
|
+
export interface BorrowMarketMutArguments {
|
|
2932
|
+
registry: RawTransactionArgument<string>;
|
|
2933
|
+
ticker: RawTransactionArgument<string>;
|
|
2934
|
+
}
|
|
2935
|
+
export interface BorrowMarketMutOptions {
|
|
2936
|
+
package?: string;
|
|
2937
|
+
arguments: BorrowMarketMutArguments | [
|
|
2938
|
+
registry: RawTransactionArgument<string>,
|
|
2939
|
+
ticker: RawTransactionArgument<string>
|
|
2940
|
+
];
|
|
2941
|
+
typeArguments: [
|
|
2942
|
+
string
|
|
2943
|
+
];
|
|
2944
|
+
}
|
|
2945
|
+
export declare function borrowMarketMut(options: BorrowMarketMutOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|