@waterx/sdk 3.0.1 → 3.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/package.json +3 -0
- package/dist/cjs/src/account/account-request.d.ts +9 -0
- package/dist/cjs/src/account/account-request.js +20 -0
- package/dist/cjs/src/account/account.d.ts +158 -0
- package/dist/cjs/src/account/account.js +238 -0
- package/dist/cjs/src/account/client.d.ts +42 -0
- package/dist/cjs/src/account/client.js +18 -0
- package/dist/cjs/src/account/config.d.ts +151 -0
- package/dist/cjs/src/account/config.js +9 -0
- package/dist/cjs/src/account/constants.d.ts +5 -0
- package/dist/cjs/src/account/constants.js +8 -0
- package/dist/cjs/src/account/fetch/referral.d.ts +15 -0
- package/dist/cjs/src/account/fetch/referral.js +56 -0
- package/dist/cjs/src/account/fetch/simulate.d.ts +34 -0
- package/dist/cjs/src/account/fetch/simulate.js +49 -0
- package/dist/cjs/src/account/funding/balance.d.ts +32 -0
- package/dist/cjs/src/account/funding/balance.js +100 -0
- package/dist/cjs/src/account/funding/consolidate.d.ts +46 -0
- package/dist/cjs/src/account/funding/consolidate.js +143 -0
- package/dist/cjs/src/account/funding/credit.d.ts +129 -0
- package/dist/cjs/src/account/funding/credit.js +252 -0
- package/dist/cjs/src/account/funding/custody.d.ts +57 -0
- package/dist/cjs/src/account/funding/custody.js +139 -0
- package/dist/cjs/src/account/funding/wormhole.d.ts +86 -0
- package/dist/cjs/src/account/funding/wormhole.js +166 -0
- package/dist/cjs/src/account/index.d.ts +29 -0
- package/dist/cjs/src/account/index.js +45 -0
- package/dist/cjs/src/account/referral.d.ts +21 -0
- package/dist/cjs/src/account/referral.js +78 -0
- package/dist/cjs/src/account/waterx-account.d.ts +31 -0
- package/dist/cjs/src/account/waterx-account.js +29 -0
- package/dist/cjs/src/base-client.d.ts +74 -0
- package/dist/cjs/src/base-client.js +101 -0
- package/dist/cjs/src/constants.d.ts +32 -0
- package/dist/cjs/src/constants.js +41 -0
- package/dist/cjs/src/generated/bucket_v2_framework/account.d.ts +107 -0
- package/dist/cjs/src/generated/bucket_v2_framework/account.js +141 -0
- package/dist/cjs/src/generated/bucket_v2_framework/deps/std/type_name.d.ts +17 -0
- package/dist/cjs/src/generated/bucket_v2_framework/deps/std/type_name.js +22 -0
- package/dist/cjs/src/generated/bucket_v2_framework/deps/sui/balance.d.ts +12 -0
- package/dist/cjs/src/generated/bucket_v2_framework/deps/sui/balance.js +17 -0
- package/dist/cjs/src/generated/bucket_v2_framework/deps/sui/vec_map.d.ts +36 -0
- package/dist/cjs/src/generated/bucket_v2_framework/deps/sui/vec_map.js +31 -0
- package/dist/cjs/src/generated/bucket_v2_framework/deps/sui/vec_set.d.ts +16 -0
- package/dist/cjs/src/generated/bucket_v2_framework/deps/sui/vec_set.js +22 -0
- package/dist/cjs/src/generated/bucket_v2_framework/double.d.ts +384 -0
- package/dist/cjs/src/generated/bucket_v2_framework/double.js +504 -0
- package/dist/cjs/src/generated/bucket_v2_framework/float.d.ts +364 -0
- package/dist/cjs/src/generated/bucket_v2_framework/float.js +476 -0
- package/dist/cjs/src/generated/bucket_v2_framework/liability.d.ts +171 -0
- package/dist/cjs/src/generated/bucket_v2_framework/liability.js +192 -0
- package/dist/cjs/src/generated/bucket_v2_framework/linked_table.d.ts +384 -0
- package/dist/cjs/src/generated/bucket_v2_framework/linked_table.js +405 -0
- package/dist/cjs/src/generated/bucket_v2_framework/sheet.d.ts +424 -0
- package/dist/cjs/src/generated/bucket_v2_framework/sheet.js +395 -0
- package/dist/cjs/src/generated/native_custody/custody_vault.d.ts +586 -0
- package/dist/cjs/src/generated/native_custody/custody_vault.js +555 -0
- package/dist/cjs/src/generated/native_custody/deps/bucket_v2_framework/float.d.ts +8 -0
- package/dist/cjs/src/generated/native_custody/deps/bucket_v2_framework/float.js +13 -0
- package/dist/cjs/src/generated/native_custody/deps/bucket_v2_framework/liability.d.ts +11 -0
- package/dist/cjs/src/generated/native_custody/deps/bucket_v2_framework/liability.js +16 -0
- package/dist/cjs/src/generated/native_custody/deps/bucket_v2_framework/sheet.d.ts +49 -0
- package/dist/cjs/src/generated/native_custody/deps/bucket_v2_framework/sheet.js +52 -0
- package/dist/cjs/src/generated/native_custody/deps/std/type_name.d.ts +17 -0
- package/dist/cjs/src/generated/native_custody/deps/std/type_name.js +22 -0
- package/dist/cjs/src/generated/native_custody/deps/sui/balance.d.ts +12 -0
- package/dist/cjs/src/generated/native_custody/deps/sui/balance.js +17 -0
- package/dist/cjs/src/generated/native_custody/deps/sui/vec_map.d.ts +36 -0
- package/dist/cjs/src/generated/native_custody/deps/sui/vec_map.js +31 -0
- package/dist/cjs/src/generated/native_custody/deps/sui/vec_set.d.ts +16 -0
- package/dist/cjs/src/generated/native_custody/deps/sui/vec_set.js +22 -0
- package/dist/cjs/src/generated/native_custody/events.d.ts +36 -0
- package/dist/cjs/src/generated/native_custody/events.js +71 -0
- package/dist/cjs/src/generated/pyth_sponsor_rule/deps/sui/balance.d.ts +12 -0
- package/dist/cjs/src/generated/pyth_sponsor_rule/deps/sui/balance.js +17 -0
- package/dist/cjs/src/generated/pyth_sponsor_rule/pyth_sponsor_rule.d.ts +68 -0
- package/dist/cjs/src/generated/pyth_sponsor_rule/pyth_sponsor_rule.js +113 -0
- package/dist/cjs/src/generated/utils/index.d.ts +30 -0
- package/dist/cjs/src/generated/utils/index.js +168 -0
- package/dist/cjs/src/generated/waterx_account/account.d.ts +1906 -0
- package/dist/cjs/src/generated/waterx_account/account.js +1929 -0
- package/dist/cjs/src/generated/waterx_account/deps/bucket_v2_framework/liability.d.ts +11 -0
- package/dist/cjs/src/generated/waterx_account/deps/bucket_v2_framework/liability.js +16 -0
- package/dist/cjs/src/generated/waterx_account/deps/bucket_v2_framework/sheet.d.ts +49 -0
- package/dist/cjs/src/generated/waterx_account/deps/bucket_v2_framework/sheet.js +52 -0
- package/dist/cjs/src/generated/waterx_account/deps/std/type_name.d.ts +17 -0
- package/dist/cjs/src/generated/waterx_account/deps/std/type_name.js +22 -0
- package/dist/cjs/src/generated/waterx_account/deps/sui/balance.d.ts +12 -0
- package/dist/cjs/src/generated/waterx_account/deps/sui/balance.js +17 -0
- package/dist/cjs/src/generated/waterx_account/deps/sui/object_table.d.ts +17 -0
- package/dist/cjs/src/generated/waterx_account/deps/sui/object_table.js +22 -0
- package/dist/cjs/src/generated/waterx_account/deps/sui/table.d.ts +29 -0
- package/dist/cjs/src/generated/waterx_account/deps/sui/table.js +34 -0
- package/dist/cjs/src/generated/waterx_account/deps/sui/vec_map.d.ts +36 -0
- package/dist/cjs/src/generated/waterx_account/deps/sui/vec_map.js +31 -0
- package/dist/cjs/src/generated/waterx_account/deps/sui/vec_set.d.ts +16 -0
- package/dist/cjs/src/generated/waterx_account/deps/sui/vec_set.js +22 -0
- package/dist/cjs/src/generated/waterx_account/direct_rule.d.ts +77 -0
- package/dist/cjs/src/generated/waterx_account/direct_rule.js +83 -0
- package/dist/cjs/src/generated/waterx_account/events.d.ts +190 -0
- package/dist/cjs/src/generated/waterx_account/events.js +173 -0
- package/dist/cjs/src/generated/waterx_account/version.d.ts +10 -0
- package/dist/cjs/src/generated/waterx_account/version.js +11 -0
- package/dist/cjs/src/generated/waterx_constant_rule/constant_rule.d.ts +68 -0
- package/dist/cjs/src/generated/waterx_constant_rule/constant_rule.js +97 -0
- package/dist/cjs/src/generated/waterx_constant_rule/deps/bucket_v2_framework/float.d.ts +8 -0
- package/dist/cjs/src/generated/waterx_constant_rule/deps/bucket_v2_framework/float.js +13 -0
- package/dist/cjs/src/generated/waterx_constant_rule/deps/sui/vec_map.d.ts +36 -0
- package/dist/cjs/src/generated/waterx_constant_rule/deps/sui/vec_map.js +31 -0
- package/dist/cjs/src/generated/waterx_credit/credit_registry.d.ts +708 -0
- package/dist/cjs/src/generated/waterx_credit/credit_registry.js +728 -0
- package/dist/cjs/src/generated/waterx_credit/deps/std/type_name.d.ts +17 -0
- package/dist/cjs/src/generated/waterx_credit/deps/std/type_name.js +22 -0
- package/dist/cjs/src/generated/waterx_credit/deps/sui/table.d.ts +29 -0
- package/dist/cjs/src/generated/waterx_credit/deps/sui/table.js +34 -0
- package/dist/cjs/src/generated/waterx_credit/deps/sui/vec_map.d.ts +36 -0
- package/dist/cjs/src/generated/waterx_credit/deps/sui/vec_map.js +31 -0
- package/dist/cjs/src/generated/waterx_credit/deps/sui/vec_set.d.ts +16 -0
- package/dist/cjs/src/generated/waterx_credit/deps/sui/vec_set.js +22 -0
- package/dist/cjs/src/generated/waterx_credit/limited_supply.d.ts +107 -0
- package/dist/cjs/src/generated/waterx_credit/limited_supply.js +143 -0
- package/dist/cjs/src/generated/waterx_oracle/aggregator.d.ts +211 -0
- package/dist/cjs/src/generated/waterx_oracle/aggregator.js +258 -0
- package/dist/cjs/src/generated/waterx_oracle/collector.d.ts +119 -0
- package/dist/cjs/src/generated/waterx_oracle/collector.js +147 -0
- package/dist/cjs/src/generated/waterx_oracle/deps/bucket_v2_framework/float.d.ts +8 -0
- package/dist/cjs/src/generated/waterx_oracle/deps/bucket_v2_framework/float.js +13 -0
- package/dist/cjs/src/generated/waterx_oracle/deps/std/type_name.d.ts +17 -0
- package/dist/cjs/src/generated/waterx_oracle/deps/std/type_name.js +22 -0
- package/dist/cjs/src/generated/waterx_oracle/deps/sui/vec_map.d.ts +36 -0
- package/dist/cjs/src/generated/waterx_oracle/deps/sui/vec_map.js +31 -0
- package/dist/cjs/src/generated/waterx_oracle/deps/sui/vec_set.d.ts +16 -0
- package/dist/cjs/src/generated/waterx_oracle/deps/sui/vec_set.js +22 -0
- package/dist/cjs/src/generated/waterx_oracle/oracle.d.ts +304 -0
- package/dist/cjs/src/generated/waterx_oracle/oracle.js +381 -0
- package/dist/cjs/src/generated/waterx_oracle/version.d.ts +10 -0
- package/dist/cjs/src/generated/waterx_oracle/version.js +11 -0
- package/dist/cjs/src/generated/waterx_perp/account_data.d.ts +269 -0
- package/dist/cjs/src/generated/waterx_perp/account_data.js +340 -0
- package/dist/cjs/src/generated/waterx_perp/admin.d.ts +19 -0
- package/dist/cjs/src/generated/waterx_perp/admin.js +26 -0
- package/dist/cjs/src/generated/waterx_perp/deps/bucket_v2_framework/double.d.ts +8 -0
- package/dist/cjs/src/generated/waterx_perp/deps/bucket_v2_framework/double.js +13 -0
- package/dist/cjs/src/generated/waterx_perp/deps/bucket_v2_framework/float.d.ts +8 -0
- package/dist/cjs/src/generated/waterx_perp/deps/bucket_v2_framework/float.js +13 -0
- package/dist/cjs/src/generated/waterx_perp/deps/bucket_v2_framework/liability.d.ts +11 -0
- package/dist/cjs/src/generated/waterx_perp/deps/bucket_v2_framework/liability.js +16 -0
- package/dist/cjs/src/generated/waterx_perp/deps/bucket_v2_framework/linked_table.d.ts +8 -0
- package/dist/cjs/src/generated/waterx_perp/deps/bucket_v2_framework/linked_table.js +21 -0
- package/dist/cjs/src/generated/waterx_perp/deps/bucket_v2_framework/sheet.d.ts +49 -0
- package/dist/cjs/src/generated/waterx_perp/deps/bucket_v2_framework/sheet.js +52 -0
- package/dist/cjs/src/generated/waterx_perp/deps/std/type_name.d.ts +17 -0
- package/dist/cjs/src/generated/waterx_perp/deps/std/type_name.js +22 -0
- package/dist/cjs/src/generated/waterx_perp/deps/sui/balance.d.ts +15 -0
- package/dist/cjs/src/generated/waterx_perp/deps/sui/balance.js +20 -0
- package/dist/cjs/src/generated/waterx_perp/deps/sui/coin.d.ts +14 -0
- package/dist/cjs/src/generated/waterx_perp/deps/sui/coin.js +51 -0
- package/dist/cjs/src/generated/waterx_perp/deps/sui/vec_map.d.ts +36 -0
- package/dist/cjs/src/generated/waterx_perp/deps/sui/vec_map.js +31 -0
- package/dist/cjs/src/generated/waterx_perp/deps/sui/vec_set.d.ts +16 -0
- package/dist/cjs/src/generated/waterx_perp/deps/sui/vec_set.js +22 -0
- package/dist/cjs/src/generated/waterx_perp/events.d.ts +1283 -0
- package/dist/cjs/src/generated/waterx_perp/events.js +990 -0
- package/dist/cjs/src/generated/waterx_perp/global_config.d.ts +775 -0
- package/dist/cjs/src/generated/waterx_perp/global_config.js +918 -0
- package/dist/cjs/src/generated/waterx_perp/keyed_big_vector.d.ts +553 -0
- package/dist/cjs/src/generated/waterx_perp/keyed_big_vector.js +626 -0
- package/dist/cjs/src/generated/waterx_perp/lp_pool.d.ts +1648 -0
- package/dist/cjs/src/generated/waterx_perp/lp_pool.js +1630 -0
- package/dist/cjs/src/generated/waterx_perp/market_config.d.ts +733 -0
- package/dist/cjs/src/generated/waterx_perp/market_config.js +871 -0
- package/dist/cjs/src/generated/waterx_perp/math.d.ts +63 -0
- package/dist/cjs/src/generated/waterx_perp/math.js +70 -0
- package/dist/cjs/src/generated/waterx_perp/memo.d.ts +251 -0
- package/dist/cjs/src/generated/waterx_perp/memo.js +360 -0
- package/dist/cjs/src/generated/waterx_perp/order_book.d.ts +290 -0
- package/dist/cjs/src/generated/waterx_perp/order_book.js +388 -0
- package/dist/cjs/src/generated/waterx_perp/position.d.ts +1005 -0
- package/dist/cjs/src/generated/waterx_perp/position.js +1200 -0
- package/dist/cjs/src/generated/waterx_perp/request.d.ts +544 -0
- package/dist/cjs/src/generated/waterx_perp/request.js +609 -0
- package/dist/cjs/src/generated/waterx_perp/response.d.ts +247 -0
- package/dist/cjs/src/generated/waterx_perp/response.js +331 -0
- package/dist/cjs/src/generated/waterx_perp/trading.d.ts +2945 -0
- package/dist/cjs/src/generated/waterx_perp/trading.js +2616 -0
- package/dist/cjs/src/generated/waterx_perp/version.d.ts +10 -0
- package/dist/cjs/src/generated/waterx_perp/version.js +11 -0
- package/dist/cjs/src/generated/waterx_perp/witness.d.ts +18 -0
- package/dist/cjs/src/generated/waterx_perp/witness.js +25 -0
- package/dist/cjs/src/generated/waterx_perp_view/deps/std/type_name.d.ts +17 -0
- package/dist/cjs/src/generated/waterx_perp_view/deps/std/type_name.js +22 -0
- package/dist/cjs/src/generated/waterx_perp_view/view.d.ts +447 -0
- package/dist/cjs/src/generated/waterx_perp_view/view.js +459 -0
- package/dist/cjs/src/generated/waterx_prediction/account_data.d.ts +344 -0
- package/dist/cjs/src/generated/waterx_prediction/account_data.js +470 -0
- package/dist/cjs/src/generated/waterx_prediction/admin.d.ts +7 -0
- package/dist/cjs/src/generated/waterx_prediction/admin.js +12 -0
- package/dist/cjs/src/generated/waterx_prediction/deps/bucket_v2_framework/linked_table.d.ts +8 -0
- package/dist/cjs/src/generated/waterx_prediction/deps/bucket_v2_framework/linked_table.js +21 -0
- package/dist/cjs/src/generated/waterx_prediction/deps/sui/balance.d.ts +12 -0
- package/dist/cjs/src/generated/waterx_prediction/deps/sui/balance.js +17 -0
- package/dist/cjs/src/generated/waterx_prediction/deps/sui/table.d.ts +29 -0
- package/dist/cjs/src/generated/waterx_prediction/deps/sui/table.js +34 -0
- package/dist/cjs/src/generated/waterx_prediction/deps/sui/vec_set.d.ts +16 -0
- package/dist/cjs/src/generated/waterx_prediction/deps/sui/vec_set.js +22 -0
- package/dist/cjs/src/generated/waterx_prediction/events.d.ts +288 -0
- package/dist/cjs/src/generated/waterx_prediction/events.js +254 -0
- package/dist/cjs/src/generated/waterx_prediction/global_config.d.ts +121 -0
- package/dist/cjs/src/generated/waterx_prediction/global_config.js +186 -0
- package/dist/cjs/src/generated/waterx_prediction/order.d.ts +233 -0
- package/dist/cjs/src/generated/waterx_prediction/order.js +339 -0
- package/dist/cjs/src/generated/waterx_prediction/outcome.d.ts +58 -0
- package/dist/cjs/src/generated/waterx_prediction/outcome.js +82 -0
- package/dist/cjs/src/generated/waterx_prediction/position.d.ts +175 -0
- package/dist/cjs/src/generated/waterx_prediction/position.js +232 -0
- package/dist/cjs/src/generated/waterx_prediction/version.d.ts +10 -0
- package/dist/cjs/src/generated/waterx_prediction/version.js +11 -0
- package/dist/cjs/src/generated/waterx_prediction/view.d.ts +418 -0
- package/dist/cjs/src/generated/waterx_prediction/view.js +492 -0
- package/dist/cjs/src/generated/waterx_prediction/waterx_prediction.d.ts +1858 -0
- package/dist/cjs/src/generated/waterx_prediction/waterx_prediction.js +1972 -0
- package/dist/cjs/src/generated/waterx_pyth_rule/deps/sui/vec_map.d.ts +36 -0
- package/dist/cjs/src/generated/waterx_pyth_rule/deps/sui/vec_map.js +31 -0
- package/dist/cjs/src/generated/waterx_pyth_rule/pyth_rule.d.ts +192 -0
- package/dist/cjs/src/generated/waterx_pyth_rule/pyth_rule.js +214 -0
- package/dist/cjs/src/generated/waterx_referral/deps/sui/table.d.ts +29 -0
- package/dist/cjs/src/generated/waterx_referral/deps/sui/table.js +34 -0
- package/dist/cjs/src/generated/waterx_referral/deps/sui/vec_set.d.ts +16 -0
- package/dist/cjs/src/generated/waterx_referral/deps/sui/vec_set.js +22 -0
- package/dist/cjs/src/generated/waterx_referral/referral_table.d.ts +171 -0
- package/dist/cjs/src/generated/waterx_referral/referral_table.js +239 -0
- package/dist/cjs/src/generated/waterx_staking/deps/bucket_v2_framework/double.d.ts +8 -0
- package/dist/cjs/src/generated/waterx_staking/deps/bucket_v2_framework/double.js +13 -0
- package/dist/cjs/src/generated/waterx_staking/deps/sui/balance.d.ts +12 -0
- package/dist/cjs/src/generated/waterx_staking/deps/sui/balance.js +17 -0
- package/dist/cjs/src/generated/waterx_staking/deps/sui/table.d.ts +29 -0
- package/dist/cjs/src/generated/waterx_staking/deps/sui/table.js +34 -0
- package/dist/cjs/src/generated/waterx_staking/deps/sui/vec_set.d.ts +16 -0
- package/dist/cjs/src/generated/waterx_staking/deps/sui/vec_set.js +22 -0
- package/dist/cjs/src/generated/waterx_staking/waterx_staking.d.ts +746 -0
- package/dist/cjs/src/generated/waterx_staking/waterx_staking.js +797 -0
- package/dist/cjs/src/generated/waterx_staking/witness.d.ts +16 -0
- package/dist/cjs/src/generated/waterx_staking/witness.js +21 -0
- package/dist/cjs/src/generated/waterx_supra_rule/deps/sui/vec_map.d.ts +36 -0
- package/dist/cjs/src/generated/waterx_supra_rule/deps/sui/vec_map.js +31 -0
- package/dist/cjs/src/generated/waterx_supra_rule/supra_rule.d.ts +158 -0
- package/dist/cjs/src/generated/waterx_supra_rule/supra_rule.js +189 -0
- package/dist/cjs/src/generated/withdrawal_queue/deps/bucket_v2_framework/float.d.ts +8 -0
- package/dist/cjs/src/generated/withdrawal_queue/deps/bucket_v2_framework/float.js +13 -0
- package/dist/cjs/src/generated/withdrawal_queue/deps/bucket_v2_framework/linked_table.d.ts +8 -0
- package/dist/cjs/src/generated/withdrawal_queue/deps/bucket_v2_framework/linked_table.js +21 -0
- package/dist/cjs/src/generated/withdrawal_queue/deps/std/type_name.d.ts +17 -0
- package/dist/cjs/src/generated/withdrawal_queue/deps/std/type_name.js +22 -0
- package/dist/cjs/src/generated/withdrawal_queue/deps/sui/balance.d.ts +12 -0
- package/dist/cjs/src/generated/withdrawal_queue/deps/sui/balance.js +17 -0
- package/dist/cjs/src/generated/withdrawal_queue/deps/sui/vec_map.d.ts +36 -0
- package/dist/cjs/src/generated/withdrawal_queue/deps/sui/vec_map.js +31 -0
- package/dist/cjs/src/generated/withdrawal_queue/deps/sui/vec_set.d.ts +16 -0
- package/dist/cjs/src/generated/withdrawal_queue/deps/sui/vec_set.js +22 -0
- package/dist/cjs/src/generated/withdrawal_queue/withdrawal_queue.d.ts +923 -0
- package/dist/cjs/src/generated/withdrawal_queue/withdrawal_queue.js +965 -0
- package/dist/cjs/src/generated/wlp/wlp.d.ts +28 -0
- package/dist/cjs/src/generated/wlp/wlp.js +37 -0
- package/dist/cjs/src/generated/wormhole_bridge/deps/sui/table.d.ts +29 -0
- package/dist/cjs/src/generated/wormhole_bridge/deps/sui/table.js +34 -0
- package/dist/cjs/src/generated/wormhole_bridge/deps/sui/vec_map.d.ts +36 -0
- package/dist/cjs/src/generated/wormhole_bridge/deps/sui/vec_map.js +31 -0
- package/dist/cjs/src/generated/wormhole_bridge/deps/sui/vec_set.d.ts +16 -0
- package/dist/cjs/src/generated/wormhole_bridge/deps/sui/vec_set.js +22 -0
- package/dist/cjs/src/generated/wormhole_bridge/deps/wormhole_sdk/consumed_vaas.d.ts +12 -0
- package/dist/cjs/src/generated/wormhole_bridge/deps/wormhole_sdk/consumed_vaas.js +45 -0
- package/dist/cjs/src/generated/wormhole_bridge/deps/wormhole_sdk/emitter.d.ts +14 -0
- package/dist/cjs/src/generated/wormhole_bridge/deps/wormhole_sdk/emitter.js +19 -0
- package/dist/cjs/src/generated/wormhole_bridge/deps/wormhole_sdk/set.d.ts +16 -0
- package/dist/cjs/src/generated/wormhole_bridge/deps/wormhole_sdk/set.js +51 -0
- package/dist/cjs/src/generated/wormhole_bridge/events.d.ts +32 -0
- package/dist/cjs/src/generated/wormhole_bridge/events.js +31 -0
- package/dist/cjs/src/generated/wormhole_bridge/wormhole_bridge.d.ts +638 -0
- package/dist/cjs/src/generated/wormhole_bridge/wormhole_bridge.js +692 -0
- package/dist/cjs/src/oracle/aggregate.d.ts +74 -0
- package/dist/cjs/src/oracle/aggregate.js +118 -0
- package/dist/cjs/src/oracle/config.d.ts +99 -0
- package/dist/cjs/src/oracle/config.js +26 -0
- package/dist/cjs/src/oracle/host.d.ts +32 -0
- package/dist/cjs/src/oracle/host.js +11 -0
- package/dist/cjs/src/oracle/index.d.ts +16 -0
- package/dist/cjs/src/oracle/index.js +31 -0
- package/dist/cjs/src/oracle/pyth.d.ts +52 -0
- package/dist/cjs/src/oracle/pyth.js +227 -0
- package/dist/cjs/src/oracle/rules/constant-rule.d.ts +9 -0
- package/dist/cjs/src/oracle/rules/constant-rule.js +17 -0
- package/dist/cjs/src/oracle/rules/pyth-rule.d.ts +11 -0
- package/dist/cjs/src/oracle/rules/pyth-rule.js +23 -0
- package/dist/cjs/src/oracle/rules/sponsor.d.ts +28 -0
- package/dist/cjs/src/oracle/rules/sponsor.js +52 -0
- package/dist/cjs/src/oracle/rules/supra-rule.d.ts +11 -0
- package/dist/cjs/src/oracle/rules/supra-rule.js +25 -0
- package/dist/cjs/src/perp/client.d.ts +78 -0
- package/dist/cjs/src/perp/client.js +112 -0
- package/dist/cjs/src/perp/config-view.d.ts +102 -0
- package/dist/cjs/src/perp/config-view.js +178 -0
- package/dist/cjs/src/perp/config.d.ts +126 -0
- package/dist/cjs/src/perp/config.js +119 -0
- package/dist/cjs/src/perp/constants.d.ts +49 -0
- package/dist/cjs/src/perp/constants.js +79 -0
- package/dist/cjs/src/perp/fetch/account.d.ts +43 -0
- package/dist/cjs/src/perp/fetch/account.js +69 -0
- package/dist/cjs/src/perp/fetch/bridge.d.ts +90 -0
- package/dist/cjs/src/perp/fetch/bridge.js +131 -0
- package/dist/cjs/src/perp/fetch/custody.d.ts +32 -0
- package/dist/cjs/src/perp/fetch/custody.js +66 -0
- package/dist/cjs/src/perp/fetch/market.d.ts +30 -0
- package/dist/cjs/src/perp/fetch/market.js +75 -0
- package/dist/cjs/src/perp/fetch/positions.d.ts +70 -0
- package/dist/cjs/src/perp/fetch/positions.js +195 -0
- package/dist/cjs/src/perp/fetch/simulate.d.ts +12 -0
- package/dist/cjs/src/perp/fetch/simulate.js +21 -0
- package/dist/cjs/src/perp/fetch.d.ts +23 -0
- package/dist/cjs/src/perp/fetch.js +39 -0
- package/dist/cjs/src/perp/index.d.ts +29 -0
- package/dist/cjs/src/perp/index.js +183 -0
- package/dist/cjs/src/perp/tx-builders/common.d.ts +83 -0
- package/dist/cjs/src/perp/tx-builders/common.js +76 -0
- package/dist/cjs/src/perp/tx-builders/credit.d.ts +65 -0
- package/dist/cjs/src/perp/tx-builders/credit.js +67 -0
- package/dist/cjs/src/perp/tx-builders/rewards.d.ts +30 -0
- package/dist/cjs/src/perp/tx-builders/rewards.js +37 -0
- package/dist/cjs/src/perp/tx-builders/trading.d.ts +51 -0
- package/dist/cjs/src/perp/tx-builders/trading.js +71 -0
- package/dist/cjs/src/perp/tx-builders/wlp.d.ts +90 -0
- package/dist/cjs/src/perp/tx-builders/wlp.js +126 -0
- package/dist/cjs/src/perp/tx-builders.d.ts +23 -0
- package/dist/cjs/src/perp/tx-builders.js +45 -0
- package/dist/cjs/src/perp/user/index.d.ts +8 -0
- package/dist/cjs/src/perp/user/index.js +24 -0
- package/dist/cjs/src/perp/user/order.d.ts +89 -0
- package/dist/cjs/src/perp/user/order.js +175 -0
- package/dist/cjs/src/perp/user/staking.d.ts +54 -0
- package/dist/cjs/src/perp/user/staking.js +147 -0
- package/dist/cjs/src/perp/user/trading.d.ts +119 -0
- package/dist/cjs/src/perp/user/trading.js +310 -0
- package/dist/cjs/src/perp/user/wlp.d.ts +58 -0
- package/dist/cjs/src/perp/user/wlp.js +139 -0
- package/dist/cjs/src/prediction/account.d.ts +96 -0
- package/dist/cjs/src/prediction/account.js +212 -0
- package/dist/cjs/src/prediction/admin.d.ts +47 -0
- package/dist/cjs/src/prediction/admin.js +116 -0
- package/dist/cjs/src/prediction/bcs.d.ts +28 -0
- package/dist/cjs/src/prediction/bcs.js +189 -0
- package/dist/cjs/src/prediction/client.d.ts +45 -0
- package/dist/cjs/src/prediction/client.js +112 -0
- package/dist/cjs/src/prediction/config.d.ts +74 -0
- package/dist/cjs/src/prediction/config.js +86 -0
- package/dist/cjs/src/prediction/constants.d.ts +44 -0
- package/dist/cjs/src/prediction/constants.js +49 -0
- package/dist/cjs/src/prediction/fetch.d.ts +82 -0
- package/dist/cjs/src/prediction/fetch.js +294 -0
- package/dist/cjs/src/prediction/gift-link.d.ts +6 -0
- package/dist/cjs/src/prediction/gift-link.js +16 -0
- package/dist/cjs/src/prediction/gift.d.ts +223 -0
- package/dist/cjs/src/prediction/gift.js +465 -0
- package/dist/cjs/src/prediction/index.d.ts +29 -0
- package/dist/cjs/src/prediction/index.js +154 -0
- package/dist/cjs/src/prediction/prediction.d.ts +149 -0
- package/dist/cjs/src/prediction/prediction.js +410 -0
- package/dist/cjs/src/prediction/tx-builders.d.ts +44 -0
- package/dist/cjs/src/prediction/tx-builders.js +56 -0
- package/dist/cjs/src/prediction/types.d.ts +95 -0
- package/dist/cjs/src/prediction/types.js +2 -0
- package/dist/cjs/src/prediction/user/account.d.ts +2 -0
- package/dist/cjs/src/prediction/user/account.js +17 -0
- package/dist/cjs/src/prediction/user/admin.d.ts +6 -0
- package/dist/cjs/src/prediction/user/admin.js +19 -0
- package/dist/cjs/src/prediction/user/gift.d.ts +2 -0
- package/dist/cjs/src/prediction/user/gift.js +24 -0
- package/dist/cjs/src/prediction/user/index.d.ts +5 -0
- package/dist/cjs/src/prediction/user/index.js +60 -0
- package/dist/cjs/src/prediction/user/keeper.d.ts +2 -0
- package/dist/cjs/src/prediction/user/keeper.js +13 -0
- package/dist/cjs/src/prediction/user/order.d.ts +2 -0
- package/dist/cjs/src/prediction/user/order.js +6 -0
- package/dist/cjs/src/prediction/user/position.d.ts +2 -0
- package/dist/cjs/src/prediction/user/position.js +11 -0
- package/dist/cjs/src/prediction/utils/bcs.d.ts +6 -0
- package/dist/cjs/src/prediction/utils/bcs.js +29 -0
- package/dist/cjs/src/prediction/utils/index.d.ts +8 -0
- package/dist/cjs/src/prediction/utils/index.js +31 -0
- package/dist/cjs/src/prediction/utils.d.ts +30 -0
- package/dist/cjs/src/prediction/utils.js +200 -0
- package/dist/cjs/src/sdk.d.ts +22 -0
- package/dist/cjs/src/sdk.js +62 -0
- package/dist/cjs/src/unified-client.d.ts +402 -0
- package/dist/cjs/src/unified-client.js +218 -0
- package/dist/cjs/src/utils/config.d.ts +11 -0
- package/dist/cjs/src/utils/config.js +19 -0
- package/dist/cjs/src/utils/math.d.ts +287 -0
- package/dist/cjs/src/utils/math.js +469 -0
- package/package.json +119 -31
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Package root for `@waterx/sdk` (`.` export).
|
|
3
|
+
*
|
|
4
|
+
* - `WaterXClient` — the umbrella entry point
|
|
5
|
+
* (`client.account.*` / `client.perp.*` / `client.predict.*`).
|
|
6
|
+
* - `perp` / `prediction` — namespaces exposing each line's full API; use these
|
|
7
|
+
* to disambiguate the builder names that collide across the two lines. The perp
|
|
8
|
+
* sub-client itself is exported (flat + `perp.PerpClient`) as `PerpClient`.
|
|
9
|
+
* - The flat re-export below preserves the legacy `@waterx/perp-sdk` surface at
|
|
10
|
+
* the package root for one major cycle (DEPRECATED — removed next major).
|
|
11
|
+
*
|
|
12
|
+
* Prediction is reachable only via the `prediction` namespace / `@waterx/sdk/prediction`
|
|
13
|
+
* (never flat at the root) because its builder names collide with perp's.
|
|
14
|
+
*/
|
|
15
|
+
export { WaterXClient } from "./unified-client.ts";
|
|
16
|
+
/** @deprecated Renamed to `WaterXClient` (the umbrella). Removed next major. */
|
|
17
|
+
export { WaterXClient as Client } from "./unified-client.ts";
|
|
18
|
+
export type { AccountModule, ClientCreateOptions, PerpModule, PredictModule, } from "./unified-client.ts";
|
|
19
|
+
export type { BuildBatchClaimTxParams as BuildPredictBatchClaimTxParams, BuildPlaceOrderTxParams as BuildPredictPlaceOrderTxParams, } from "./prediction/tx-builders.ts";
|
|
20
|
+
export * as perp from "./perp/index.ts";
|
|
21
|
+
export * as prediction from "./prediction/index.ts";
|
|
22
|
+
export * from "./perp/index.ts";
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Package root for `@waterx/sdk` (`.` export).
|
|
4
|
+
*
|
|
5
|
+
* - `WaterXClient` — the umbrella entry point
|
|
6
|
+
* (`client.account.*` / `client.perp.*` / `client.predict.*`).
|
|
7
|
+
* - `perp` / `prediction` — namespaces exposing each line's full API; use these
|
|
8
|
+
* to disambiguate the builder names that collide across the two lines. The perp
|
|
9
|
+
* sub-client itself is exported (flat + `perp.PerpClient`) as `PerpClient`.
|
|
10
|
+
* - The flat re-export below preserves the legacy `@waterx/perp-sdk` surface at
|
|
11
|
+
* the package root for one major cycle (DEPRECATED — removed next major).
|
|
12
|
+
*
|
|
13
|
+
* Prediction is reachable only via the `prediction` namespace / `@waterx/sdk/prediction`
|
|
14
|
+
* (never flat at the root) because its builder names collide with perp's.
|
|
15
|
+
*/
|
|
16
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
17
|
+
if (k2 === undefined) k2 = k;
|
|
18
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
19
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
20
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
21
|
+
}
|
|
22
|
+
Object.defineProperty(o, k2, desc);
|
|
23
|
+
}) : (function(o, m, k, k2) {
|
|
24
|
+
if (k2 === undefined) k2 = k;
|
|
25
|
+
o[k2] = m[k];
|
|
26
|
+
}));
|
|
27
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
28
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
29
|
+
}) : function(o, v) {
|
|
30
|
+
o["default"] = v;
|
|
31
|
+
});
|
|
32
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
33
|
+
var ownKeys = function(o) {
|
|
34
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
35
|
+
var ar = [];
|
|
36
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
37
|
+
return ar;
|
|
38
|
+
};
|
|
39
|
+
return ownKeys(o);
|
|
40
|
+
};
|
|
41
|
+
return function (mod) {
|
|
42
|
+
if (mod && mod.__esModule) return mod;
|
|
43
|
+
var result = {};
|
|
44
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
45
|
+
__setModuleDefault(result, mod);
|
|
46
|
+
return result;
|
|
47
|
+
};
|
|
48
|
+
})();
|
|
49
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
50
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
51
|
+
};
|
|
52
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
53
|
+
exports.prediction = exports.perp = exports.Client = exports.WaterXClient = void 0;
|
|
54
|
+
var unified_client_ts_1 = require("./unified-client.js");
|
|
55
|
+
Object.defineProperty(exports, "WaterXClient", { enumerable: true, get: function () { return unified_client_ts_1.WaterXClient; } });
|
|
56
|
+
/** @deprecated Renamed to `WaterXClient` (the umbrella). Removed next major. */
|
|
57
|
+
var unified_client_ts_2 = require("./unified-client.js");
|
|
58
|
+
Object.defineProperty(exports, "Client", { enumerable: true, get: function () { return unified_client_ts_2.WaterXClient; } });
|
|
59
|
+
exports.perp = __importStar(require("./perp/index.js"));
|
|
60
|
+
exports.prediction = __importStar(require("./prediction/index.js"));
|
|
61
|
+
// DEPRECATED flat perp surface (migration aid from `@waterx/perp-sdk`).
|
|
62
|
+
__exportStar(require("./perp/index.js"), exports);
|
|
@@ -0,0 +1,402 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Umbrella WaterX SDK client — the main entry point.
|
|
3
|
+
*
|
|
4
|
+
* Exposes three namespaces over the two product-line sub-clients:
|
|
5
|
+
*
|
|
6
|
+
* const client = await WaterXClient.create({ network: "TESTNET" });
|
|
7
|
+
* client.account.createAccount(tx, { alias }); // -> shared waterx_account + funding
|
|
8
|
+
* client.perp.placeOrderRequest(tx, params); // -> perp builder
|
|
9
|
+
* client.predict.placeOrder(tx, params); // -> prediction builder
|
|
10
|
+
*
|
|
11
|
+
* `client.perp` **is** the `PerpClient` instance with the perp builder/view
|
|
12
|
+
* methods grafted on, and `client.predict` **is** the `PredictClient` instance
|
|
13
|
+
* likewise — so signing & execution live on the same object
|
|
14
|
+
* (`client.perp.signAndExecuteTransaction(...)`) right next to the builders.
|
|
15
|
+
* There are no separate `.perpClient` / `.predictClient` accessors.
|
|
16
|
+
*
|
|
17
|
+
* `client.account` is a thin namespace (no own client) bound to the perp
|
|
18
|
+
* sub-client: the perp config carries the shared `waterx_account` registry plus
|
|
19
|
+
* the bridge / native_custody / withdrawal_queue / credit_registry that the
|
|
20
|
+
* credit & custody builders read. `waterx_account` is one shared on-chain object,
|
|
21
|
+
* so an account created here serves both lines — except when the two lines target
|
|
22
|
+
* different networks (`opts.perp.network !== opts.predict.network`), where
|
|
23
|
+
* `client.account` follows the perp line; split-network callers should reach the
|
|
24
|
+
* predict line's generic account builders via the `prediction` namespace directly.
|
|
25
|
+
*
|
|
26
|
+
* Each namespace method forwards to the existing free-function builder with the
|
|
27
|
+
* line's client pre-bound as the first argument; builders are build-only (they
|
|
28
|
+
* return / mutate a `Transaction`), so frontend wallet flows and multi-step Pyth
|
|
29
|
+
* injection keep working.
|
|
30
|
+
*/
|
|
31
|
+
import { Transaction } from "@mysten/sui/transactions";
|
|
32
|
+
import * as accountOps from "./account/index.ts";
|
|
33
|
+
import * as perpReferral from "./account/referral.ts";
|
|
34
|
+
import type { Network } from "./constants.ts";
|
|
35
|
+
import { PerpClient, type CreateClientOptions as PerpCreateOptions } from "./perp/client.ts";
|
|
36
|
+
import * as perpFetch from "./perp/fetch.ts";
|
|
37
|
+
import * as perpTx from "./perp/tx-builders.ts";
|
|
38
|
+
import * as perpOrder from "./perp/user/order.ts";
|
|
39
|
+
import * as perpStaking from "./perp/user/staking.ts";
|
|
40
|
+
import * as perpTrading from "./perp/user/trading.ts";
|
|
41
|
+
import * as perpWlp from "./perp/user/wlp.ts";
|
|
42
|
+
import { allowPredictionProtocolAsset, disallowPredictionProtocolAsset, setDelegatePredictionPermission, whitelistPredictionProtocol } from "./prediction/account.ts";
|
|
43
|
+
import * as predAdmin from "./prediction/admin.ts";
|
|
44
|
+
import { PredictClient, type CreateClientOptions as PredictCreateOptions } from "./prediction/client.ts";
|
|
45
|
+
import * as predFetch from "./prediction/fetch.ts";
|
|
46
|
+
import * as predGift from "./prediction/gift.ts";
|
|
47
|
+
import * as predOps from "./prediction/prediction.ts";
|
|
48
|
+
import { type BuildBatchClaimTxParams, type BuildPlaceOrderTxParams } from "./prediction/tx-builders.ts";
|
|
49
|
+
/**
|
|
50
|
+
* Exports from the spread builder/view modules that are NOT client-first — their
|
|
51
|
+
* first argument is not the line client, so they must not become bound facade
|
|
52
|
+
* methods (binding would pass the client where a value is expected). This is the
|
|
53
|
+
* single source of truth shared by the runtime (skip) and the type (`Omit`).
|
|
54
|
+
* Keep in sync by auditing `export function` first-params across the spread modules.
|
|
55
|
+
*/
|
|
56
|
+
declare const NON_CLIENT_FIRST: readonly ["extractReturnBytes", "base64UrlNoPadEncode", "base64UrlNoPadDecode", "generateGiftSeed", "encodeGiftUrl", "parseGiftUrl", "deriveGiftKeypair", "buildGiftClaimMessage", "signGiftClaim"];
|
|
57
|
+
type NonClientFirstKey = (typeof NON_CLIENT_FIRST)[number];
|
|
58
|
+
/**
|
|
59
|
+
* Map a namespace of `(client, ...args) => R` free functions to the same surface
|
|
60
|
+
* with the client pre-bound: `(...args) => R`. Non-client-first helpers (see
|
|
61
|
+
* `NON_CLIENT_FIRST`) are dropped, so the static type and the runtime agree.
|
|
62
|
+
*/
|
|
63
|
+
type ClientBound<NS, C> = {
|
|
64
|
+
[K in keyof Omit<NS, NonClientFirstKey>]: NS[K] extends (client: C, ...args: infer A) => infer R ? (...args: A) => R : NS[K];
|
|
65
|
+
};
|
|
66
|
+
declare const perpOps: {
|
|
67
|
+
getRefererFor(client: import("./account/client.ts").WxaClientLike, referee: string): Promise<string | undefined>;
|
|
68
|
+
isValidReferralCode(client: import("./account/client.ts").WxaClientLike, code: string): Promise<boolean>;
|
|
69
|
+
referralCodeExists(client: import("./account/client.ts").WxaClientLike, code: string): Promise<boolean>;
|
|
70
|
+
getAccountData(client: PerpClient, accountId: string): Promise<perpFetch.AccountDataView | undefined>;
|
|
71
|
+
getMarketData(client: PerpClient, args: {
|
|
72
|
+
ticker: string;
|
|
73
|
+
lpType?: string;
|
|
74
|
+
}): Promise<perpFetch.MarketDataView>;
|
|
75
|
+
getPoolData(client: PerpClient, args?: {
|
|
76
|
+
lpType?: string;
|
|
77
|
+
}): Promise<perpFetch.PoolDataView>;
|
|
78
|
+
getTokenPoolData(client: PerpClient, args: {
|
|
79
|
+
tokenIndex: bigint | number;
|
|
80
|
+
lpType?: string;
|
|
81
|
+
}): Promise<perpFetch.TokenPoolDataView>;
|
|
82
|
+
getGlobalConfigData(client: PerpClient): Promise<perpFetch.GlobalConfigDataView>;
|
|
83
|
+
positionExists(client: PerpClient, args: {
|
|
84
|
+
ticker: string;
|
|
85
|
+
positionId: bigint | number;
|
|
86
|
+
lpType?: string;
|
|
87
|
+
}): Promise<boolean>;
|
|
88
|
+
getPosition(client: PerpClient, args: {
|
|
89
|
+
ticker: string;
|
|
90
|
+
positionId: bigint | number;
|
|
91
|
+
basePriceUsd: bigint | number;
|
|
92
|
+
collateralPriceUsd: bigint | number;
|
|
93
|
+
lpType?: string;
|
|
94
|
+
}): Promise<perpFetch.PositionDataView>;
|
|
95
|
+
getOrder(client: PerpClient, args: {
|
|
96
|
+
ticker: string;
|
|
97
|
+
orderId: bigint | number;
|
|
98
|
+
orderTypeTag: number;
|
|
99
|
+
triggerPrice: bigint | number;
|
|
100
|
+
basePriceUsd: bigint | number;
|
|
101
|
+
lpType?: string;
|
|
102
|
+
}): Promise<perpFetch.OrderDataView>;
|
|
103
|
+
getMarketOrders(client: PerpClient, args: {
|
|
104
|
+
ticker: string;
|
|
105
|
+
basePriceUsd?: bigint | number;
|
|
106
|
+
lpType?: string;
|
|
107
|
+
} & perpFetch.PageOpts): Promise<{
|
|
108
|
+
orders: perpFetch.OrderDataView[];
|
|
109
|
+
nextCursor?: bigint;
|
|
110
|
+
}>;
|
|
111
|
+
getMarketPositions(client: PerpClient, args: {
|
|
112
|
+
ticker: string;
|
|
113
|
+
basePriceUsd: bigint | number;
|
|
114
|
+
collateralPriceUsd?: bigint | number;
|
|
115
|
+
lpType?: string;
|
|
116
|
+
} & perpFetch.PageOpts): Promise<{
|
|
117
|
+
positions: perpFetch.PositionDataView[];
|
|
118
|
+
nextCursor?: bigint;
|
|
119
|
+
}>;
|
|
120
|
+
getAccountPositions(client: PerpClient, args: {
|
|
121
|
+
ticker: string;
|
|
122
|
+
accountObjectAddress: string;
|
|
123
|
+
basePriceUsd: bigint | number;
|
|
124
|
+
collateralPriceUsd?: bigint | number;
|
|
125
|
+
lpType?: string;
|
|
126
|
+
}): Promise<perpFetch.PositionDataView[]>;
|
|
127
|
+
getAccountOrders(client: PerpClient, args: {
|
|
128
|
+
ticker: string;
|
|
129
|
+
accountObjectAddress: string;
|
|
130
|
+
basePriceUsd?: bigint | number;
|
|
131
|
+
lpType?: string;
|
|
132
|
+
}): Promise<perpFetch.OrderDataView[]>;
|
|
133
|
+
getRedeemRequests(client: PerpClient, args?: {
|
|
134
|
+
lpType?: string;
|
|
135
|
+
} & perpFetch.PageOpts): Promise<{
|
|
136
|
+
requests: perpFetch.RedeemRequestDataView[];
|
|
137
|
+
nextCursor?: bigint;
|
|
138
|
+
}>;
|
|
139
|
+
getAccountsByOwner(client: PerpClient, owner: string): Promise<string[]>;
|
|
140
|
+
getAccountBalance(client: PerpClient, accountId: string, coinType?: string): Promise<bigint>;
|
|
141
|
+
getSpendableCreditBalance(client: PerpClient, accountId: string): Promise<perpFetch.SpendableCreditBalance>;
|
|
142
|
+
getCustodyVaultData(client: PerpClient): Promise<perpFetch.CustodyVaultData>;
|
|
143
|
+
getCustodyAssetData(client: PerpClient, assetType: string): Promise<perpFetch.CustodyAssetData>;
|
|
144
|
+
getBridgeLimits(client: PerpClient, args?: perpFetch.BridgeLimitsArgs): Promise<perpFetch.BridgeLimitsView>;
|
|
145
|
+
getBridgeFee(client: PerpClient, args: {
|
|
146
|
+
evmDestinationChain: number;
|
|
147
|
+
amount: bigint | number;
|
|
148
|
+
creditType?: string;
|
|
149
|
+
}): Promise<perpFetch.BridgeFeeView>;
|
|
150
|
+
openPythSponsorFund: typeof perpTx.openPythSponsorFund;
|
|
151
|
+
PythCache: typeof perpTx.PythCache;
|
|
152
|
+
refreshOraclePrices: typeof perpTx.refreshOraclePrices;
|
|
153
|
+
reimbursePythSponsor: typeof perpTx.reimbursePythSponsor;
|
|
154
|
+
updatePythPrices: typeof perpTx.updatePythPrices;
|
|
155
|
+
appendConsolidateToUsd(client: import("./account/client.ts").AccountClientLike, tx: Transaction, accountId: string): Promise<number>;
|
|
156
|
+
appendConsolidateAddressCredit(client: import("./account/client.ts").AccountClientLike, tx: Transaction, accountId: string): Promise<number>;
|
|
157
|
+
appendConsolidateForSpend(client: import("./account/client.ts").AccountClientLike, tx: Transaction, accountId: string): Promise<number>;
|
|
158
|
+
buildConsolidateToUsdTx(client: import("./account/client.ts").AccountClientLike, accountId: string, tx?: Transaction): Promise<Transaction>;
|
|
159
|
+
buildClosePositionTx(client: PerpClient, params: perpTx.BuildClosePositionParams): Promise<Transaction>;
|
|
160
|
+
buildIncreasePositionTx(client: PerpClient, params: perpTx.BuildIncreasePositionParams): Promise<Transaction>;
|
|
161
|
+
buildDecreasePositionTx(client: PerpClient, params: perpTx.BuildDecreasePositionParams): Promise<Transaction>;
|
|
162
|
+
buildDepositCollateralTx(client: PerpClient, params: perpTx.BuildDepositCollateralParams): Promise<Transaction>;
|
|
163
|
+
buildWithdrawCollateralTx(client: PerpClient, params: perpTx.BuildWithdrawCollateralParams): Promise<Transaction>;
|
|
164
|
+
buildPlaceOrderTx(client: PerpClient, params: perpTx.BuildPlaceOrderParams): Promise<Transaction>;
|
|
165
|
+
buildCancelOrderTx(client: PerpClient, params: perpTx.BuildCancelOrderParams): Promise<Transaction>;
|
|
166
|
+
buildUpdateOrderTx(client: PerpClient, params: perpTx.BuildUpdateOrderParams): Promise<Transaction>;
|
|
167
|
+
buildCancelPreOrderTx(client: PerpClient, params: perpTx.BuildCancelPreOrderParams): Promise<Transaction>;
|
|
168
|
+
buildAddPreOrderTx(client: PerpClient, params: perpTx.BuildAddPreOrderParams): Promise<Transaction>;
|
|
169
|
+
buildMintWlpTx(client: PerpClient, params: perpTx.BuildMintWlpParams): Promise<Transaction>;
|
|
170
|
+
buildMintAndStakeWlpTx(client: PerpClient, params: perpTx.BuildMintAndStakeWlpParams): Promise<Transaction>;
|
|
171
|
+
buildUnstakeAndRequestRedeemWlpTx(client: PerpClient, params: perpTx.BuildUnstakeAndRequestRedeemWlpParams): Promise<Transaction>;
|
|
172
|
+
buildCancelRedeemAndStakeWlpTx(client: PerpClient, params: perpTx.BuildCancelRedeemAndStakeWlpParams): Transaction;
|
|
173
|
+
buildClaimRewardsToAccountTx(client: PerpClient, params: perpTx.BuildClaimRewardsToAccountParams): Transaction;
|
|
174
|
+
buildRedeemVaaTx(client: PerpClient, params: perpTx.BuildRedeemVaaParams): Transaction;
|
|
175
|
+
buildRequestCreditWithdrawTx(client: PerpClient, params: perpTx.BuildRequestCreditWithdrawParams): Transaction;
|
|
176
|
+
buildExecuteWithdrawalTx(client: PerpClient, params: perpTx.BuildExecuteWithdrawalParams): Transaction;
|
|
177
|
+
setReferralCode(client: import("./account/client.ts").WxaClientLike, tx: Transaction, params: perpReferral.SetReferralCodeParams): void;
|
|
178
|
+
useReferralCode(client: import("./account/client.ts").WxaClientLike, tx: Transaction, params: perpReferral.UseReferralCodeParams): void;
|
|
179
|
+
stake(client: PerpClient, tx: Transaction, params: perpStaking.StakeParams): void;
|
|
180
|
+
unstake(client: PerpClient, tx: Transaction, params: perpStaking.UnstakeParams): void;
|
|
181
|
+
claimReward(client: PerpClient, tx: Transaction, params: perpStaking.ClaimRewardParams): void;
|
|
182
|
+
mintWlp(client: PerpClient, tx: Transaction, params: perpWlp.MintWlpParams): import("@mysten/sui/transactions").TransactionArgument;
|
|
183
|
+
requestRedeemWlp(client: PerpClient, tx: Transaction, params: perpWlp.RequestRedeemWlpParams): void;
|
|
184
|
+
cancelRedeemWlp(client: PerpClient, tx: Transaction, params: perpWlp.CancelRedeemWlpParams): void;
|
|
185
|
+
settleRedeemWlp(client: PerpClient, tx: Transaction, params: perpWlp.SettleRedeemWlpParams): void;
|
|
186
|
+
updateTokenValue(client: PerpClient, tx: Transaction, args: {
|
|
187
|
+
tokenType: string;
|
|
188
|
+
lpType?: string;
|
|
189
|
+
}): void;
|
|
190
|
+
buildPlaceOrderArgument(client: PerpClient, tx: Transaction, p: perpOrder.PlaceOrderArgumentParams): import("@mysten/sui/transactions").TransactionArgument;
|
|
191
|
+
placeOrderRequest(client: PerpClient, tx: Transaction, params: perpOrder.PlaceOrderRequestParams): import("@mysten/sui/transactions").TransactionArgument;
|
|
192
|
+
cancelOrderRequest(client: PerpClient, tx: Transaction, params: perpOrder.CancelOrderRequestParams): import("@mysten/sui/transactions").TransactionArgument;
|
|
193
|
+
updateOrderRequest(client: PerpClient, tx: Transaction, params: perpOrder.UpdateOrderRequestParams): import("@mysten/sui/transactions").TransactionArgument;
|
|
194
|
+
cancelPreOrderRequest(client: PerpClient, tx: Transaction, params: perpOrder.CancelPreOrderRequestParams): import("@mysten/sui/transactions").TransactionArgument;
|
|
195
|
+
addPreOrderRequest(client: PerpClient, tx: Transaction, params: perpOrder.AddPreOrderRequestParams): import("@mysten/sui/transactions").TransactionArgument;
|
|
196
|
+
closePositionRequest(client: PerpClient, tx: Transaction, params: perpTrading.ClosePositionRequestParams): import("@mysten/sui/transactions").TransactionArgument;
|
|
197
|
+
increasePositionRequest(client: PerpClient, tx: Transaction, params: perpTrading.IncreasePositionRequestParams): import("@mysten/sui/transactions").TransactionArgument;
|
|
198
|
+
decreasePositionRequest(client: PerpClient, tx: Transaction, params: perpTrading.DecreasePositionRequestParams): import("@mysten/sui/transactions").TransactionArgument;
|
|
199
|
+
depositCollateralRequest(client: PerpClient, tx: Transaction, params: perpTrading.DepositCollateralRequestParams): import("@mysten/sui/transactions").TransactionArgument;
|
|
200
|
+
withdrawCollateralRequest(client: PerpClient, tx: Transaction, params: perpTrading.WithdrawCollateralRequestParams): import("@mysten/sui/transactions").TransactionArgument;
|
|
201
|
+
executeTrading(client: PerpClient, tx: Transaction, params: perpTrading.ExecuteTradingParams): void;
|
|
202
|
+
liquidate(client: PerpClient, tx: Transaction, params: perpTrading.LiquidateParams): void;
|
|
203
|
+
batchLiquidate(client: PerpClient, tx: Transaction, params: perpTrading.BatchLiquidateParams): void;
|
|
204
|
+
matchOrders(client: PerpClient, tx: Transaction, params: perpTrading.MatchOrdersParams): void;
|
|
205
|
+
updateFundingRate(client: PerpClient, tx: Transaction, params: perpTrading.UpdateFundingRateParams): void;
|
|
206
|
+
openPositionByKeeper(client: PerpClient, tx: Transaction, params: perpTrading.OpenPositionByKeeperParams): void;
|
|
207
|
+
closePositionByKeeper(client: PerpClient, tx: Transaction, params: perpTrading.ClosePositionByKeeperParams): void;
|
|
208
|
+
ORDER_TAG_WILDCARD_VALUE: 255;
|
|
209
|
+
};
|
|
210
|
+
declare const predictOps: {
|
|
211
|
+
base64UrlNoPadEncode(bytes: Uint8Array): string;
|
|
212
|
+
base64UrlNoPadDecode(value: string): Uint8Array;
|
|
213
|
+
generateGiftSeed(): Uint8Array;
|
|
214
|
+
encodeGiftUrl(seed: Uint8Array, parts?: predGift.GiftUrlParts): string;
|
|
215
|
+
parseGiftUrl(url: string): {
|
|
216
|
+
seed: Uint8Array;
|
|
217
|
+
};
|
|
218
|
+
deriveGiftKeypair(seed: Uint8Array): import("@mysten/sui/keypairs/ed25519").Ed25519Keypair;
|
|
219
|
+
buildGiftClaimMessage(giftId: string, sender: string): Uint8Array;
|
|
220
|
+
signGiftClaim(giftKeypair: import("@mysten/sui/keypairs/ed25519").Ed25519Keypair, giftId: string, sender: string): Promise<Uint8Array>;
|
|
221
|
+
deriveGiftAddress(client: PredictClient, pubkey: Uint8Array, params?: predGift.GiftBaseParams): string;
|
|
222
|
+
createGift(client: PredictClient, tx: Transaction, params: predGift.CreateGiftParams): Transaction;
|
|
223
|
+
claimShare(client: PredictClient, tx: Transaction, params: predGift.ClaimShareParams): Transaction;
|
|
224
|
+
deleteGift(client: PredictClient, tx: Transaction, params: predGift.DeleteGiftParams): Transaction;
|
|
225
|
+
getGift(client: PredictClient, params: predGift.GiftBaseParams & {
|
|
226
|
+
giftId: string;
|
|
227
|
+
}): Promise<predGift.GiftView>;
|
|
228
|
+
getCreatorGiftIds(client: PredictClient, params: predGift.GiftBaseParams & {
|
|
229
|
+
creator: string;
|
|
230
|
+
}): Promise<string[]>;
|
|
231
|
+
getCreatorGiftCount(client: PredictClient, params: predGift.GiftBaseParams & {
|
|
232
|
+
creator: string;
|
|
233
|
+
}): Promise<bigint>;
|
|
234
|
+
getGiftControllerAddress(client: PredictClient, params?: predGift.GiftBaseParams): Promise<string>;
|
|
235
|
+
getGiftConfigPaused(client: PredictClient, params?: predGift.GiftBaseParams): Promise<boolean>;
|
|
236
|
+
getGiftHasClaimed(client: PredictClient, params: predGift.GiftBaseParams & {
|
|
237
|
+
giftId: string;
|
|
238
|
+
addr: string;
|
|
239
|
+
}): Promise<boolean>;
|
|
240
|
+
buildCreateGiftFlow(client: PredictClient, tx: Transaction, params: Omit<predGift.CreateGiftParams, "pubkey">): predGift.BuildCreateGiftFlowResult;
|
|
241
|
+
buildClaimShareFlow(client: PredictClient, tx: Transaction, params: predGift.BuildClaimShareFlowParams): Promise<predGift.BuildClaimShareFlowResult>;
|
|
242
|
+
extractReturnBytes(result: any, commandIndex?: number, returnIndex?: number): Uint8Array;
|
|
243
|
+
getRegistry(client: PredictClient, params?: predFetch.ViewBaseParams): Promise<import("./prediction/types.ts").RegistryView>;
|
|
244
|
+
getOrder(client: PredictClient, params: predFetch.ViewBaseParams & {
|
|
245
|
+
orderId: bigint | number | string;
|
|
246
|
+
}): Promise<import("./prediction/types.ts").OrderView>;
|
|
247
|
+
getPosition(client: PredictClient, params: predFetch.ViewBaseParams & {
|
|
248
|
+
positionId: bigint | number | string;
|
|
249
|
+
}): Promise<import("./prediction/types.ts").PositionView>;
|
|
250
|
+
getMarketById(client: PredictClient, params: predFetch.ViewBaseParams & {
|
|
251
|
+
marketId: import("./prediction/types.ts").MarketIdInput;
|
|
252
|
+
}): Promise<import("./prediction/types.ts").MarketView>;
|
|
253
|
+
getMarketByKey(client: PredictClient, params: predFetch.ViewBaseParams & {
|
|
254
|
+
marketKey: bigint | number | string;
|
|
255
|
+
}): Promise<import("./prediction/types.ts").MarketView>;
|
|
256
|
+
getMarketExposure(client: PredictClient, params: predFetch.ViewBaseParams & {
|
|
257
|
+
marketId: import("./prediction/types.ts").MarketIdInput;
|
|
258
|
+
}): Promise<import("./prediction/types.ts").MarketExposure>;
|
|
259
|
+
getMarketExposureByKey(client: PredictClient, params: predFetch.ViewBaseParams & {
|
|
260
|
+
marketKey: bigint | number | string;
|
|
261
|
+
}): Promise<import("./prediction/types.ts").MarketExposure>;
|
|
262
|
+
getOrderCursor(client: PredictClient, params?: predFetch.ViewBaseParams): Promise<import("./prediction/types.ts").CursorView>;
|
|
263
|
+
getPositionCursor(client: PredictClient, params?: predFetch.ViewBaseParams): Promise<import("./prediction/types.ts").CursorView>;
|
|
264
|
+
getUnresolvedMarketCursor(client: PredictClient, params?: predFetch.ViewBaseParams): Promise<import("./prediction/types.ts").CursorView>;
|
|
265
|
+
getResolvedMarketCursor(client: PredictClient, params?: predFetch.ViewBaseParams): Promise<import("./prediction/types.ts").CursorView>;
|
|
266
|
+
getAccountIds(client: PredictClient, params: predFetch.GetAccountIdsParams): Promise<string[]>;
|
|
267
|
+
getAccountData(client: PredictClient, params: predFetch.ViewBaseParams & {
|
|
268
|
+
accountId: string;
|
|
269
|
+
}): Promise<import("./prediction/types.ts").AccountDataView>;
|
|
270
|
+
getAccountOrderIds(client: PredictClient, params: predFetch.ViewBaseParams & {
|
|
271
|
+
accountId: string;
|
|
272
|
+
marketKey: bigint | number | string;
|
|
273
|
+
}): Promise<bigint[]>;
|
|
274
|
+
getAccountPositionIds(client: PredictClient, params: predFetch.ViewBaseParams & {
|
|
275
|
+
accountId: string;
|
|
276
|
+
marketKey: bigint | number | string;
|
|
277
|
+
}): Promise<bigint[]>;
|
|
278
|
+
getAccountOrderIdsByMarketId(client: PredictClient, params: predFetch.ViewBaseParams & {
|
|
279
|
+
accountId: string;
|
|
280
|
+
marketId: import("./prediction/types.ts").MarketIdInput;
|
|
281
|
+
}): Promise<bigint[]>;
|
|
282
|
+
getAccountPositionIdsByMarketId(client: PredictClient, params: predFetch.ViewBaseParams & {
|
|
283
|
+
accountId: string;
|
|
284
|
+
marketId: import("./prediction/types.ts").MarketIdInput;
|
|
285
|
+
}): Promise<bigint[]>;
|
|
286
|
+
isKeeper(client: PredictClient, params: {
|
|
287
|
+
packageId?: string;
|
|
288
|
+
globalConfig?: string;
|
|
289
|
+
keeper: string;
|
|
290
|
+
}): Promise<boolean>;
|
|
291
|
+
getKeeperAddresses(client: PredictClient, params?: {
|
|
292
|
+
packageId?: string;
|
|
293
|
+
globalConfig?: string;
|
|
294
|
+
}): Promise<string[]>;
|
|
295
|
+
getAllowedVersions(client: PredictClient, params?: {
|
|
296
|
+
packageId?: string;
|
|
297
|
+
globalConfig?: string;
|
|
298
|
+
}): Promise<number[]>;
|
|
299
|
+
isPredictionProtocolAssetAllowed(client: PredictClient, params?: {
|
|
300
|
+
accountPackageId?: string;
|
|
301
|
+
accountRegistry?: string;
|
|
302
|
+
predictionPackageId?: string;
|
|
303
|
+
coinType?: string;
|
|
304
|
+
}): Promise<boolean>;
|
|
305
|
+
selectionArg(client: PredictClient, tx: Transaction, selection: import("./prediction/types.ts").Selection | import("@mysten/sui/transactions").TransactionArgument, packageId?: string): import("@mysten/sui/transactions").TransactionArgument;
|
|
306
|
+
outcomeArg(client: PredictClient, tx: Transaction, outcome: import("./prediction/types.ts").Outcome | import("@mysten/sui/transactions").TransactionArgument, packageId?: string): import("@mysten/sui/transactions").TransactionArgument;
|
|
307
|
+
placeOrder(client: PredictClient, tx: Transaction, params: predOps.PlaceOrderParams): Transaction;
|
|
308
|
+
selfCancelOrder(client: PredictClient, tx: Transaction, params: predOps.SelfCancelOrderParams): Transaction;
|
|
309
|
+
claim(client: PredictClient, tx: Transaction, params: predOps.ClaimParams): Transaction;
|
|
310
|
+
batchClaim(client: PredictClient, tx: Transaction, params: predOps.BatchClaimParams): Transaction;
|
|
311
|
+
requestClose(client: PredictClient, tx: Transaction, params: predOps.RequestCloseParams): Transaction;
|
|
312
|
+
requestPartialClose(client: PredictClient, tx: Transaction, params: predOps.RequestPartialCloseParams): Transaction;
|
|
313
|
+
selfCancelClose(client: PredictClient, tx: Transaction, params: predOps.SelfCancelCloseParams): Transaction;
|
|
314
|
+
transferPosition(client: PredictClient, tx: Transaction, params: predOps.TransferPositionParams): Transaction;
|
|
315
|
+
splitPosition(client: PredictClient, tx: Transaction, params: predOps.SplitPositionParams): Transaction;
|
|
316
|
+
fillOrder(client: PredictClient, tx: Transaction, params: predOps.FillOrderParams): Transaction;
|
|
317
|
+
cancelOrder(client: PredictClient, tx: Transaction, params: predOps.CancelOrderParams): Transaction;
|
|
318
|
+
confirmClose(client: PredictClient, tx: Transaction, params: predOps.ConfirmCloseParams): Transaction;
|
|
319
|
+
cancelClose(client: PredictClient, tx: Transaction, params: predOps.CancelCloseParams): Transaction;
|
|
320
|
+
forceClaim(client: PredictClient, tx: Transaction, params: predOps.ForceClaimParams): Transaction;
|
|
321
|
+
batchForceClaim(client: PredictClient, tx: Transaction, params: predOps.BatchForceClaimParams): Transaction;
|
|
322
|
+
buildBatchForceClaimTransactions(client: PredictClient, params: predOps.BuildBatchForceClaimTransactionsParams): Transaction[];
|
|
323
|
+
resolveMarket(client: PredictClient, tx: Transaction, params: predOps.ResolveMarketParams): Transaction;
|
|
324
|
+
adminPlaceOrderFor(client: PredictClient, tx: Transaction, params: predOps.AdminPlaceOrderForParams): Transaction;
|
|
325
|
+
createMarketRegistry(client: PredictClient, tx: Transaction, params: predAdmin.CreateMarketRegistryParams): Transaction;
|
|
326
|
+
depositSettlement(client: PredictClient, tx: Transaction, params: predAdmin.DepositSettlementParams): Transaction;
|
|
327
|
+
adminWithdraw(client: PredictClient, tx: Transaction, params: predAdmin.AdminWithdrawParams): Transaction;
|
|
328
|
+
setMinReserve(client: PredictClient, tx: Transaction, params: predAdmin.SetMinReserveParams): Transaction;
|
|
329
|
+
setOrderCancelCooldownMs(client: PredictClient, tx: Transaction, params: predAdmin.SetOrderCancelCooldownParams): Transaction;
|
|
330
|
+
pauseMarket(client: PredictClient, tx: Transaction, params: predAdmin.MarketPauseParams): Transaction;
|
|
331
|
+
unpauseMarket(client: PredictClient, tx: Transaction, params: predAdmin.MarketPauseParams): Transaction;
|
|
332
|
+
addKeeper(client: PredictClient, tx: Transaction, params: predAdmin.KeeperAdminParams): Transaction;
|
|
333
|
+
removeKeeper(client: PredictClient, tx: Transaction, params: predAdmin.KeeperAdminParams): Transaction;
|
|
334
|
+
setDelegatePredictionPermission: typeof setDelegatePredictionPermission;
|
|
335
|
+
whitelistPredictionProtocol: typeof whitelistPredictionProtocol;
|
|
336
|
+
allowPredictionProtocolAsset: typeof allowPredictionProtocolAsset;
|
|
337
|
+
disallowPredictionProtocolAsset: typeof disallowPredictionProtocolAsset;
|
|
338
|
+
};
|
|
339
|
+
/** Account namespace exposed as `client.account` — generic wxa + credit + custody, perp-backed. */
|
|
340
|
+
export type AccountModule = ClientBound<typeof accountOps, PerpClient>;
|
|
341
|
+
/** Perp namespace exposed as `client.perp` — builder/view methods, client pre-bound. */
|
|
342
|
+
export type PerpModule = ClientBound<typeof perpOps, PerpClient>;
|
|
343
|
+
/** Prediction namespace exposed as `client.predict` — builder/view methods, client pre-bound. */
|
|
344
|
+
export type PredictModule = ClientBound<typeof predictOps, PredictClient>;
|
|
345
|
+
/** Per-line network/config override. Falls back to the shared top-level options. */
|
|
346
|
+
type PerpLineOptions = Partial<PerpCreateOptions> & {
|
|
347
|
+
network?: Network;
|
|
348
|
+
};
|
|
349
|
+
type PredictLineOptions = Partial<PredictCreateOptions> & {
|
|
350
|
+
network?: Network;
|
|
351
|
+
};
|
|
352
|
+
export interface ClientCreateOptions {
|
|
353
|
+
/** Default network for both lines (per-line `network` overrides). Default: `"TESTNET"`. */
|
|
354
|
+
network?: Network;
|
|
355
|
+
/** Default gRPC URL for both lines. */
|
|
356
|
+
grpcUrl?: string;
|
|
357
|
+
/** Default `waterx-config` JSON URL for both lines. */
|
|
358
|
+
configUrl?: string;
|
|
359
|
+
/** Memoize the fetched config JSON. */
|
|
360
|
+
cache?: boolean;
|
|
361
|
+
/** Perp-line overrides (network, grpcUrl, configUrl, cache, …). */
|
|
362
|
+
perp?: PerpLineOptions;
|
|
363
|
+
/** Prediction-line overrides (network, grpcUrl, configUrl, cache, settlement, …). */
|
|
364
|
+
predict?: PredictLineOptions;
|
|
365
|
+
}
|
|
366
|
+
export declare class WaterXClient {
|
|
367
|
+
/** Shared account namespace (`client.account.createAccount(tx, params)`) — perp-backed. */
|
|
368
|
+
readonly account: AccountModule;
|
|
369
|
+
/**
|
|
370
|
+
* Perp sub-client **with** the perp builders/views grafted on
|
|
371
|
+
* (`client.perp.placeOrderRequest(...)`, `client.perp.signAndExecuteTransaction(...)`).
|
|
372
|
+
*/
|
|
373
|
+
readonly perp: PerpClient & PerpModule;
|
|
374
|
+
/**
|
|
375
|
+
* Prediction sub-client **with** the prediction builders/views grafted on
|
|
376
|
+
* (`client.predict.placeOrder(...)`, `client.predict.signAndExecuteTransaction(...)`).
|
|
377
|
+
*/
|
|
378
|
+
readonly predict: PredictClient & PredictModule;
|
|
379
|
+
/**
|
|
380
|
+
* Async prediction builder: optional consolidate + `placeOrder`.
|
|
381
|
+
* Uses the perp client for the sweep and the predict client for the bet leg.
|
|
382
|
+
*/
|
|
383
|
+
buildPredictPlaceOrderTx(params: BuildPlaceOrderTxParams): Promise<Transaction>;
|
|
384
|
+
/**
|
|
385
|
+
* Async prediction builder: optional consolidate + `batchClaim`.
|
|
386
|
+
*/
|
|
387
|
+
buildPredictBatchClaimTx(params: BuildBatchClaimTxParams): Promise<Transaction>;
|
|
388
|
+
private constructor();
|
|
389
|
+
/**
|
|
390
|
+
* Combine two pre-built line clients (advanced — full control over each).
|
|
391
|
+
* Note: this grafts the bound builder methods onto the provided client
|
|
392
|
+
* instances in place.
|
|
393
|
+
*/
|
|
394
|
+
static fromClients(perpClient: PerpClient, predictClient: PredictClient): WaterXClient;
|
|
395
|
+
/**
|
|
396
|
+
* Async factory — loads each line's deployment config (from the canonical
|
|
397
|
+
* `waterx-config` JSON) and returns a ready client. Each line can target a
|
|
398
|
+
* different network via `opts.perp.network` / `opts.predict.network`.
|
|
399
|
+
*/
|
|
400
|
+
static create(opts?: ClientCreateOptions): Promise<WaterXClient>;
|
|
401
|
+
}
|
|
402
|
+
export {};
|