@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,923 @@
|
|
|
1
|
+
/**************************************************************
|
|
2
|
+
* THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
|
|
3
|
+
**************************************************************/
|
|
4
|
+
import { MoveStruct, type RawTransactionArgument } from '../utils/index.ts';
|
|
5
|
+
import { type Transaction, type TransactionArgument } from '@mysten/sui/transactions';
|
|
6
|
+
export declare const WithdrawQueue: MoveStruct<{
|
|
7
|
+
dummy_field: import("@mysten/sui/bcs").BcsType<boolean, boolean, "bool">;
|
|
8
|
+
}, "@waterx/withdrawal-queue::withdrawal_queue::WithdrawQueue">;
|
|
9
|
+
export declare const WormholeRoute: MoveStruct<{
|
|
10
|
+
evm_destination_chain: import("@mysten/sui/bcs").BcsType<number, number, "u16">;
|
|
11
|
+
evm_recipient: import("@mysten/sui/bcs").BcsType<number[], Iterable<number> & {
|
|
12
|
+
length: number;
|
|
13
|
+
}, string>;
|
|
14
|
+
evm_token: import("@mysten/sui/bcs").BcsType<number[], Iterable<number> & {
|
|
15
|
+
length: number;
|
|
16
|
+
}, string>;
|
|
17
|
+
}, "@waterx/withdrawal-queue::withdrawal_queue::WormholeRoute">;
|
|
18
|
+
export declare const NativeRoute: MoveStruct<{
|
|
19
|
+
asset_type: MoveStruct<{
|
|
20
|
+
name: import("@mysten/sui/bcs").BcsType<string, string, "string">;
|
|
21
|
+
}, "std::type_name::TypeName">;
|
|
22
|
+
/**
|
|
23
|
+
* User-supplied minimum acceptable `Coin<T>` output (after the burn fee).
|
|
24
|
+
* Snapshotted into `extra_data` at withdraw time and enforced in `execute_native`,
|
|
25
|
+
* so an admin burn-fee change between enqueue and execute cannot silently reprice
|
|
26
|
+
* an already-debited withdrawal (audit M15).
|
|
27
|
+
*/
|
|
28
|
+
min_output: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
29
|
+
}, "@waterx/withdrawal-queue::withdrawal_queue::NativeRoute">;
|
|
30
|
+
export declare const Entry: MoveStruct<{
|
|
31
|
+
balance: MoveStruct<{
|
|
32
|
+
value: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
33
|
+
}, "0x2::balance::Balance<phantom T>">;
|
|
34
|
+
/**
|
|
35
|
+
* Originating wxa Account whose stored `Balance<CREDIT>` produced this entry.
|
|
36
|
+
* Threaded into `vault.burn` / `bridge.burn_for_withdrawal` so the burner identity
|
|
37
|
+
* on the credit registry's personal cap, the EVM-side withdrawal id, and the
|
|
38
|
+
* partner-fee lookup all bind to the source account — not whoever calls
|
|
39
|
+
* `execute_*` (audit finding #3).
|
|
40
|
+
*/
|
|
41
|
+
account_id: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
42
|
+
/**
|
|
43
|
+
* Sui-side recipient from `WithdrawRequest`. Honored for Native payouts; ignored
|
|
44
|
+
* for Wormhole (EVM recipient lives in extra_data).
|
|
45
|
+
*/
|
|
46
|
+
recipient: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
47
|
+
extra_data: import("@mysten/sui/bcs").BcsType<number[], Iterable<number> & {
|
|
48
|
+
length: number;
|
|
49
|
+
}, string>;
|
|
50
|
+
}, "@waterx/withdrawal-queue::withdrawal_queue::Entry<phantom CREDIT>">;
|
|
51
|
+
export declare const Queue: MoveStruct<{
|
|
52
|
+
id: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
53
|
+
next_key: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
54
|
+
entries: MoveStruct<any, any>;
|
|
55
|
+
/**
|
|
56
|
+
* Admin-managed allowlist of addresses authorized to call `execute_wormhole` /
|
|
57
|
+
* `execute_native`. Without this gate any caller could route any user's queue
|
|
58
|
+
* entry through the burn path (audit finding #3).
|
|
59
|
+
*/
|
|
60
|
+
executors: MoveStruct<any, any>;
|
|
61
|
+
/**
|
|
62
|
+
* Admin-managed package-version allowlist. Every mutating public entry asserts
|
|
63
|
+
* `PACKAGE_VERSION ∈ allowed_versions`; admin uses `add_version` /
|
|
64
|
+
* `remove_version` to kill-switch a deprecated package after a contract upgrade.
|
|
65
|
+
*/
|
|
66
|
+
allowed_versions: MoveStruct<any, any>;
|
|
67
|
+
}, "@waterx/withdrawal-queue::withdrawal_queue::Queue<phantom CREDIT>">;
|
|
68
|
+
export declare const BridgeFeeKey: MoveStruct<{
|
|
69
|
+
dummy_field: import("@mysten/sui/bcs").BcsType<boolean, boolean, "bool">;
|
|
70
|
+
}, "@waterx/withdrawal-queue::withdrawal_queue::BridgeFeeKey">;
|
|
71
|
+
export declare const BridgeFeeConfig: MoveStruct<{
|
|
72
|
+
default_rate: MoveStruct<{
|
|
73
|
+
value: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u128">;
|
|
74
|
+
}, "bucket_v2_framework::float::Float">;
|
|
75
|
+
chain_rates: MoveStruct<{
|
|
76
|
+
contents: import("@mysten/sui/bcs").BcsType<{
|
|
77
|
+
key: number;
|
|
78
|
+
value: {
|
|
79
|
+
value: string;
|
|
80
|
+
};
|
|
81
|
+
}[], Iterable<{
|
|
82
|
+
key: number;
|
|
83
|
+
value: {
|
|
84
|
+
value: string | number | bigint;
|
|
85
|
+
};
|
|
86
|
+
}> & {
|
|
87
|
+
length: number;
|
|
88
|
+
}, string>;
|
|
89
|
+
}, "0x2::vec_map::VecMap<u16, bucket_v2_framework::float::Float>">;
|
|
90
|
+
}, "@waterx/withdrawal-queue::withdrawal_queue::BridgeFeeConfig">;
|
|
91
|
+
export declare const BridgeMinFeeKey: MoveStruct<{
|
|
92
|
+
dummy_field: import("@mysten/sui/bcs").BcsType<boolean, boolean, "bool">;
|
|
93
|
+
}, "@waterx/withdrawal-queue::withdrawal_queue::BridgeMinFeeKey">;
|
|
94
|
+
export declare const BridgeMinFeeConfig: MoveStruct<{
|
|
95
|
+
default_min_fee: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
96
|
+
chain_min_fees: MoveStruct<{
|
|
97
|
+
contents: import("@mysten/sui/bcs").BcsType<{
|
|
98
|
+
key: number;
|
|
99
|
+
value: string;
|
|
100
|
+
}[], Iterable<{
|
|
101
|
+
key: number;
|
|
102
|
+
value: string | number | bigint;
|
|
103
|
+
}> & {
|
|
104
|
+
length: number;
|
|
105
|
+
}, string>;
|
|
106
|
+
}, "0x2::vec_map::VecMap<u16, u64>">;
|
|
107
|
+
}, "@waterx/withdrawal-queue::withdrawal_queue::BridgeMinFeeConfig">;
|
|
108
|
+
export declare const BridgeFeeUpdated: MoveStruct<{
|
|
109
|
+
/** 1e9-scaled default fee rate now in effect. */
|
|
110
|
+
fee_rate: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u128">;
|
|
111
|
+
}, "@waterx/withdrawal-queue::withdrawal_queue::BridgeFeeUpdated<phantom CREDIT>">;
|
|
112
|
+
export declare const ChainBridgeFeeUpdated: MoveStruct<{
|
|
113
|
+
evm_destination_chain: import("@mysten/sui/bcs").BcsType<number, number, "u16">;
|
|
114
|
+
fee_rate: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u128">;
|
|
115
|
+
removed: import("@mysten/sui/bcs").BcsType<boolean, boolean, "bool">;
|
|
116
|
+
}, "@waterx/withdrawal-queue::withdrawal_queue::ChainBridgeFeeUpdated<phantom CREDIT>">;
|
|
117
|
+
export declare const BridgeMinFeeUpdated: MoveStruct<{
|
|
118
|
+
min_fee: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
119
|
+
}, "@waterx/withdrawal-queue::withdrawal_queue::BridgeMinFeeUpdated<phantom CREDIT>">;
|
|
120
|
+
export declare const ChainBridgeMinFeeUpdated: MoveStruct<{
|
|
121
|
+
evm_destination_chain: import("@mysten/sui/bcs").BcsType<number, number, "u16">;
|
|
122
|
+
min_fee: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
123
|
+
removed: import("@mysten/sui/bcs").BcsType<boolean, boolean, "bool">;
|
|
124
|
+
}, "@waterx/withdrawal-queue::withdrawal_queue::ChainBridgeMinFeeUpdated<phantom CREDIT>">;
|
|
125
|
+
export declare const Enqueued: MoveStruct<{
|
|
126
|
+
key: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
127
|
+
account_id: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
128
|
+
recipient: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
129
|
+
amount: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
130
|
+
route_tag: import("@mysten/sui/bcs").BcsType<number, number, "u8">;
|
|
131
|
+
}, "@waterx/withdrawal-queue::withdrawal_queue::Enqueued<phantom CREDIT>">;
|
|
132
|
+
export declare const ExecutedWormhole: MoveStruct<{
|
|
133
|
+
key: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
134
|
+
evm_destination_chain: import("@mysten/sui/bcs").BcsType<number, number, "u16">;
|
|
135
|
+
amount: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
136
|
+
}, "@waterx/withdrawal-queue::withdrawal_queue::ExecutedWormhole<phantom CREDIT>">;
|
|
137
|
+
export declare const BridgeFeeCharged: MoveStruct<{
|
|
138
|
+
key: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
139
|
+
evm_destination_chain: import("@mysten/sui/bcs").BcsType<number, number, "u16">;
|
|
140
|
+
amount: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
141
|
+
fee_amount: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
142
|
+
}, "@waterx/withdrawal-queue::withdrawal_queue::BridgeFeeCharged<phantom CREDIT>">;
|
|
143
|
+
export declare const ExecutedNative: MoveStruct<{
|
|
144
|
+
key: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
145
|
+
recipient: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
146
|
+
amount: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
147
|
+
}, "@waterx/withdrawal-queue::withdrawal_queue::ExecutedNative<phantom CREDIT, phantom T>">;
|
|
148
|
+
export declare const EntryCancelled: MoveStruct<{
|
|
149
|
+
key: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
150
|
+
account_id: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
151
|
+
amount: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
152
|
+
route_tag: import("@mysten/sui/bcs").BcsType<number, number, "u8">;
|
|
153
|
+
}, "@waterx/withdrawal-queue::withdrawal_queue::EntryCancelled<phantom CREDIT>">;
|
|
154
|
+
export declare const ExecutorUpdated: MoveStruct<{
|
|
155
|
+
executor: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
156
|
+
added: import("@mysten/sui/bcs").BcsType<boolean, boolean, "bool">;
|
|
157
|
+
}, "@waterx/withdrawal-queue::withdrawal_queue::ExecutorUpdated<phantom CREDIT>">;
|
|
158
|
+
export interface PackageVersionOptions {
|
|
159
|
+
package?: string;
|
|
160
|
+
arguments?: [
|
|
161
|
+
];
|
|
162
|
+
}
|
|
163
|
+
export declare function packageVersion(options?: PackageVersionOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
164
|
+
export interface RouteWormholeArguments {
|
|
165
|
+
evmDestinationChain: RawTransactionArgument<number>;
|
|
166
|
+
evmRecipient: RawTransactionArgument<Array<number>>;
|
|
167
|
+
evmToken: RawTransactionArgument<Array<number>>;
|
|
168
|
+
}
|
|
169
|
+
export interface RouteWormholeOptions {
|
|
170
|
+
package?: string;
|
|
171
|
+
arguments: RouteWormholeArguments | [
|
|
172
|
+
evmDestinationChain: RawTransactionArgument<number>,
|
|
173
|
+
evmRecipient: RawTransactionArgument<Array<number>>,
|
|
174
|
+
evmToken: RawTransactionArgument<Array<number>>
|
|
175
|
+
];
|
|
176
|
+
}
|
|
177
|
+
/** User helper: encode a Wormhole-bound route as `extra_data` bytes. */
|
|
178
|
+
export declare function routeWormhole(options: RouteWormholeOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
179
|
+
export interface RouteNativeArguments {
|
|
180
|
+
minOutput: RawTransactionArgument<number | bigint>;
|
|
181
|
+
}
|
|
182
|
+
export interface RouteNativeOptions {
|
|
183
|
+
package?: string;
|
|
184
|
+
arguments: RouteNativeArguments | [
|
|
185
|
+
minOutput: RawTransactionArgument<number | bigint>
|
|
186
|
+
];
|
|
187
|
+
typeArguments: [
|
|
188
|
+
string
|
|
189
|
+
];
|
|
190
|
+
}
|
|
191
|
+
/**
|
|
192
|
+
* User helper: encode a Native-bound route as `extra_data` bytes. `T` is the
|
|
193
|
+
* backing asset of the destination `SingleVault<T>`. `min_output` is the minimum
|
|
194
|
+
* `Coin<T>` the user will accept after the native burn fee; `execute_native`
|
|
195
|
+
* aborts `EOutputBelowMin` if a later fee change would deliver less (audit M15).
|
|
196
|
+
* Pass 0 to opt out.
|
|
197
|
+
*/
|
|
198
|
+
export declare function routeNative(options: RouteNativeOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
199
|
+
export interface CreateQueueArguments {
|
|
200
|
+
_: RawTransactionArgument<string>;
|
|
201
|
+
}
|
|
202
|
+
export interface CreateQueueOptions {
|
|
203
|
+
package?: string;
|
|
204
|
+
arguments: CreateQueueArguments | [
|
|
205
|
+
_: RawTransactionArgument<string>
|
|
206
|
+
];
|
|
207
|
+
typeArguments: [
|
|
208
|
+
string
|
|
209
|
+
];
|
|
210
|
+
}
|
|
211
|
+
/** Create + share a `Queue<CREDIT>`. Call once per credit type. */
|
|
212
|
+
export declare function createQueue(options: CreateQueueOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
213
|
+
export interface AddExecutorArguments {
|
|
214
|
+
queue: RawTransactionArgument<string>;
|
|
215
|
+
_: RawTransactionArgument<string>;
|
|
216
|
+
executor: RawTransactionArgument<string>;
|
|
217
|
+
}
|
|
218
|
+
export interface AddExecutorOptions {
|
|
219
|
+
package?: string;
|
|
220
|
+
arguments: AddExecutorArguments | [
|
|
221
|
+
queue: RawTransactionArgument<string>,
|
|
222
|
+
_: RawTransactionArgument<string>,
|
|
223
|
+
executor: RawTransactionArgument<string>
|
|
224
|
+
];
|
|
225
|
+
typeArguments: [
|
|
226
|
+
string
|
|
227
|
+
];
|
|
228
|
+
}
|
|
229
|
+
export declare function addExecutor(options: AddExecutorOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
230
|
+
export interface RemoveExecutorArguments {
|
|
231
|
+
queue: RawTransactionArgument<string>;
|
|
232
|
+
_: RawTransactionArgument<string>;
|
|
233
|
+
executor: RawTransactionArgument<string>;
|
|
234
|
+
}
|
|
235
|
+
export interface RemoveExecutorOptions {
|
|
236
|
+
package?: string;
|
|
237
|
+
arguments: RemoveExecutorArguments | [
|
|
238
|
+
queue: RawTransactionArgument<string>,
|
|
239
|
+
_: RawTransactionArgument<string>,
|
|
240
|
+
executor: RawTransactionArgument<string>
|
|
241
|
+
];
|
|
242
|
+
typeArguments: [
|
|
243
|
+
string
|
|
244
|
+
];
|
|
245
|
+
}
|
|
246
|
+
export declare function removeExecutor(options: RemoveExecutorOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
247
|
+
export interface IsExecutorArguments {
|
|
248
|
+
queue: RawTransactionArgument<string>;
|
|
249
|
+
executor: RawTransactionArgument<string>;
|
|
250
|
+
}
|
|
251
|
+
export interface IsExecutorOptions {
|
|
252
|
+
package?: string;
|
|
253
|
+
arguments: IsExecutorArguments | [
|
|
254
|
+
queue: RawTransactionArgument<string>,
|
|
255
|
+
executor: RawTransactionArgument<string>
|
|
256
|
+
];
|
|
257
|
+
typeArguments: [
|
|
258
|
+
string
|
|
259
|
+
];
|
|
260
|
+
}
|
|
261
|
+
export declare function isExecutor(options: IsExecutorOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
262
|
+
export interface AddVersionArguments {
|
|
263
|
+
queue: RawTransactionArgument<string>;
|
|
264
|
+
_: RawTransactionArgument<string>;
|
|
265
|
+
version: RawTransactionArgument<number>;
|
|
266
|
+
}
|
|
267
|
+
export interface AddVersionOptions {
|
|
268
|
+
package?: string;
|
|
269
|
+
arguments: AddVersionArguments | [
|
|
270
|
+
queue: RawTransactionArgument<string>,
|
|
271
|
+
_: RawTransactionArgument<string>,
|
|
272
|
+
version: RawTransactionArgument<number>
|
|
273
|
+
];
|
|
274
|
+
typeArguments: [
|
|
275
|
+
string
|
|
276
|
+
];
|
|
277
|
+
}
|
|
278
|
+
/**
|
|
279
|
+
* Admin: whitelist a package version. New deployments add their own version here
|
|
280
|
+
* before the upgrade so in-flight calls don't abort during the rollover window.
|
|
281
|
+
* Skips the version check itself so admin can recover from a stuck state.
|
|
282
|
+
*/
|
|
283
|
+
export declare function addVersion(options: AddVersionOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
284
|
+
export interface RemoveVersionArguments {
|
|
285
|
+
queue: RawTransactionArgument<string>;
|
|
286
|
+
_: RawTransactionArgument<string>;
|
|
287
|
+
version: RawTransactionArgument<number>;
|
|
288
|
+
}
|
|
289
|
+
export interface RemoveVersionOptions {
|
|
290
|
+
package?: string;
|
|
291
|
+
arguments: RemoveVersionArguments | [
|
|
292
|
+
queue: RawTransactionArgument<string>,
|
|
293
|
+
_: RawTransactionArgument<string>,
|
|
294
|
+
version: RawTransactionArgument<number>
|
|
295
|
+
];
|
|
296
|
+
typeArguments: [
|
|
297
|
+
string
|
|
298
|
+
];
|
|
299
|
+
}
|
|
300
|
+
/**
|
|
301
|
+
* Admin: remove a package version from the allowlist. Kill-switches the prior
|
|
302
|
+
* version after an upgrade. Skips the version check itself so admin can recover
|
|
303
|
+
* from a stuck state.
|
|
304
|
+
*/
|
|
305
|
+
export declare function removeVersion(options: RemoveVersionOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
306
|
+
export interface SetBridgeFeeArguments {
|
|
307
|
+
queue: RawTransactionArgument<string>;
|
|
308
|
+
_: RawTransactionArgument<string>;
|
|
309
|
+
feeRate: RawTransactionArgument<number | bigint>;
|
|
310
|
+
}
|
|
311
|
+
export interface SetBridgeFeeOptions {
|
|
312
|
+
package?: string;
|
|
313
|
+
arguments: SetBridgeFeeArguments | [
|
|
314
|
+
queue: RawTransactionArgument<string>,
|
|
315
|
+
_: RawTransactionArgument<string>,
|
|
316
|
+
feeRate: RawTransactionArgument<number | bigint>
|
|
317
|
+
];
|
|
318
|
+
typeArguments: [
|
|
319
|
+
string
|
|
320
|
+
];
|
|
321
|
+
}
|
|
322
|
+
/**
|
|
323
|
+
* Admin: set the **default** bridge-withdrawal fee charged on the
|
|
324
|
+
* `execute_wormhole` exit for every destination chain that has no explicit
|
|
325
|
+
* per-chain override. `fee_rate` is the 1e9-scaled `Float` value (`0` disables;
|
|
326
|
+
* capped at 10% = `MAX_BRIDGE_FEE_RATE_SCALED`, rejected with `EFeeRateAboveCap`
|
|
327
|
+
* above that — audit L4). Stored in a dynamic field on `Queue.id` so it could be
|
|
328
|
+
* introduced as a package upgrade without touching the published `Queue<CREDIT>`
|
|
329
|
+
* layout. Idempotent. Mirrors the `Float`-as-`u128` public-ABI convention used by
|
|
330
|
+
* `native_custody::custody_vault::set_fee_config`.
|
|
331
|
+
*/
|
|
332
|
+
export declare function setBridgeFee(options: SetBridgeFeeOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
333
|
+
export interface SetChainBridgeFeeArguments {
|
|
334
|
+
queue: RawTransactionArgument<string>;
|
|
335
|
+
_: RawTransactionArgument<string>;
|
|
336
|
+
evmDestinationChain: RawTransactionArgument<number>;
|
|
337
|
+
feeRate: RawTransactionArgument<number | bigint>;
|
|
338
|
+
}
|
|
339
|
+
export interface SetChainBridgeFeeOptions {
|
|
340
|
+
package?: string;
|
|
341
|
+
arguments: SetChainBridgeFeeArguments | [
|
|
342
|
+
queue: RawTransactionArgument<string>,
|
|
343
|
+
_: RawTransactionArgument<string>,
|
|
344
|
+
evmDestinationChain: RawTransactionArgument<number>,
|
|
345
|
+
feeRate: RawTransactionArgument<number | bigint>
|
|
346
|
+
];
|
|
347
|
+
typeArguments: [
|
|
348
|
+
string
|
|
349
|
+
];
|
|
350
|
+
}
|
|
351
|
+
/**
|
|
352
|
+
* Admin: set (or overwrite) a per-chain bridge-fee override for
|
|
353
|
+
* `evm_destination_chain`. Takes precedence over `default_rate` for wormhole exits
|
|
354
|
+
* to that chain. Same `Float`-as-`u128` rate convention and 10% `EFeeRateAboveCap`
|
|
355
|
+
* ceiling as `set_bridge_fee`. To make a chain fee-free while the default is
|
|
356
|
+
* non-zero, set its override to `0` (an override of `0` is distinct from "no
|
|
357
|
+
* override" — the latter falls back to the default). Use `unset_chain_bridge_fee`
|
|
358
|
+
* to drop back to default.
|
|
359
|
+
*/
|
|
360
|
+
export declare function setChainBridgeFee(options: SetChainBridgeFeeOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
361
|
+
export interface UnsetChainBridgeFeeArguments {
|
|
362
|
+
queue: RawTransactionArgument<string>;
|
|
363
|
+
_: RawTransactionArgument<string>;
|
|
364
|
+
evmDestinationChain: RawTransactionArgument<number>;
|
|
365
|
+
}
|
|
366
|
+
export interface UnsetChainBridgeFeeOptions {
|
|
367
|
+
package?: string;
|
|
368
|
+
arguments: UnsetChainBridgeFeeArguments | [
|
|
369
|
+
queue: RawTransactionArgument<string>,
|
|
370
|
+
_: RawTransactionArgument<string>,
|
|
371
|
+
evmDestinationChain: RawTransactionArgument<number>
|
|
372
|
+
];
|
|
373
|
+
typeArguments: [
|
|
374
|
+
string
|
|
375
|
+
];
|
|
376
|
+
}
|
|
377
|
+
/**
|
|
378
|
+
* Admin: drop a per-chain override so `evm_destination_chain` falls back to
|
|
379
|
+
* `default_rate`. Always emits `ChainBridgeFeeUpdated` (audit L3) with `removed`
|
|
380
|
+
* reflecting whether an override was actually present and `fee_rate` set to the
|
|
381
|
+
* resulting **effective** rate for the chain (audit L2) — i.e. the default after a
|
|
382
|
+
* real removal, so indexers don't have to cross-reference
|
|
383
|
+
* `bridge_default_fee_rate`. Functionally a no-op when no override existed.
|
|
384
|
+
*/
|
|
385
|
+
export declare function unsetChainBridgeFee(options: UnsetChainBridgeFeeOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
386
|
+
export interface SetBridgeMinFeeArguments {
|
|
387
|
+
queue: RawTransactionArgument<string>;
|
|
388
|
+
_: RawTransactionArgument<string>;
|
|
389
|
+
minFee: RawTransactionArgument<number | bigint>;
|
|
390
|
+
}
|
|
391
|
+
export interface SetBridgeMinFeeOptions {
|
|
392
|
+
package?: string;
|
|
393
|
+
arguments: SetBridgeMinFeeArguments | [
|
|
394
|
+
queue: RawTransactionArgument<string>,
|
|
395
|
+
_: RawTransactionArgument<string>,
|
|
396
|
+
minFee: RawTransactionArgument<number | bigint>
|
|
397
|
+
];
|
|
398
|
+
typeArguments: [
|
|
399
|
+
string
|
|
400
|
+
];
|
|
401
|
+
}
|
|
402
|
+
/**
|
|
403
|
+
* Admin: set the **default** minimum-fee floor (absolute CREDIT units) charged on
|
|
404
|
+
* the `execute_wormhole` exit for every destination chain that has no explicit
|
|
405
|
+
* per-chain min-fee override. The charged fee is
|
|
406
|
+
* `max(ceil(rate * amount), min_fee)`, so a non-zero floor with a zero rate is a
|
|
407
|
+
* flat per-exit fee. `0` disables the floor. **No cap** (unlike the rate's 10%
|
|
408
|
+
* `MAX_BRIDGE_FEE_RATE_SCALED`): the floor is an absolute amount, so on small
|
|
409
|
+
* withdrawals it can exceed 10% of the amount by design — and if it meets/exceeds
|
|
410
|
+
* the entry amount, `execute_wormhole`'s net-zero guard aborts
|
|
411
|
+
* `EFeeConsumesEntireAmount` (recoverable via `cancel_entry`). Idempotent.
|
|
412
|
+
*/
|
|
413
|
+
export declare function setBridgeMinFee(options: SetBridgeMinFeeOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
414
|
+
export interface SetChainBridgeMinFeeArguments {
|
|
415
|
+
queue: RawTransactionArgument<string>;
|
|
416
|
+
_: RawTransactionArgument<string>;
|
|
417
|
+
evmDestinationChain: RawTransactionArgument<number>;
|
|
418
|
+
minFee: RawTransactionArgument<number | bigint>;
|
|
419
|
+
}
|
|
420
|
+
export interface SetChainBridgeMinFeeOptions {
|
|
421
|
+
package?: string;
|
|
422
|
+
arguments: SetChainBridgeMinFeeArguments | [
|
|
423
|
+
queue: RawTransactionArgument<string>,
|
|
424
|
+
_: RawTransactionArgument<string>,
|
|
425
|
+
evmDestinationChain: RawTransactionArgument<number>,
|
|
426
|
+
minFee: RawTransactionArgument<number | bigint>
|
|
427
|
+
];
|
|
428
|
+
typeArguments: [
|
|
429
|
+
string
|
|
430
|
+
];
|
|
431
|
+
}
|
|
432
|
+
/**
|
|
433
|
+
* Admin: set (or overwrite) a per-chain minimum-fee-floor override for
|
|
434
|
+
* `evm_destination_chain`. Takes precedence over `default_min_fee` for wormhole
|
|
435
|
+
* exits to that chain — on an axis independent of the rate override. Set its
|
|
436
|
+
* override to `0` to exempt a chain from the floor while `default_min_fee` still
|
|
437
|
+
* floors others (distinct from "no override", which falls back to the default).
|
|
438
|
+
* Use `unset_chain_bridge_min_fee` to drop back to the default. Same no-cap
|
|
439
|
+
* semantics as `set_bridge_min_fee`.
|
|
440
|
+
*/
|
|
441
|
+
export declare function setChainBridgeMinFee(options: SetChainBridgeMinFeeOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
442
|
+
export interface UnsetChainBridgeMinFeeArguments {
|
|
443
|
+
queue: RawTransactionArgument<string>;
|
|
444
|
+
_: RawTransactionArgument<string>;
|
|
445
|
+
evmDestinationChain: RawTransactionArgument<number>;
|
|
446
|
+
}
|
|
447
|
+
export interface UnsetChainBridgeMinFeeOptions {
|
|
448
|
+
package?: string;
|
|
449
|
+
arguments: UnsetChainBridgeMinFeeArguments | [
|
|
450
|
+
queue: RawTransactionArgument<string>,
|
|
451
|
+
_: RawTransactionArgument<string>,
|
|
452
|
+
evmDestinationChain: RawTransactionArgument<number>
|
|
453
|
+
];
|
|
454
|
+
typeArguments: [
|
|
455
|
+
string
|
|
456
|
+
];
|
|
457
|
+
}
|
|
458
|
+
/**
|
|
459
|
+
* Admin: drop a per-chain min-fee override so `evm_destination_chain` falls back
|
|
460
|
+
* to `default_min_fee`. Always emits `ChainBridgeMinFeeUpdated` with `removed`
|
|
461
|
+
* reflecting whether an override was actually present and `min_fee` set to the
|
|
462
|
+
* resulting **effective** floor for the chain (the default after a real removal).
|
|
463
|
+
* Functionally a no-op when no override existed.
|
|
464
|
+
*/
|
|
465
|
+
export declare function unsetChainBridgeMinFee(options: UnsetChainBridgeMinFeeOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
466
|
+
export interface CancelEntryArguments {
|
|
467
|
+
queue: RawTransactionArgument<string>;
|
|
468
|
+
accountRegistry: RawTransactionArgument<string>;
|
|
469
|
+
request: TransactionArgument;
|
|
470
|
+
key: RawTransactionArgument<number | bigint>;
|
|
471
|
+
}
|
|
472
|
+
export interface CancelEntryOptions {
|
|
473
|
+
package?: string;
|
|
474
|
+
arguments: CancelEntryArguments | [
|
|
475
|
+
queue: RawTransactionArgument<string>,
|
|
476
|
+
accountRegistry: RawTransactionArgument<string>,
|
|
477
|
+
request: TransactionArgument,
|
|
478
|
+
key: RawTransactionArgument<number | bigint>
|
|
479
|
+
];
|
|
480
|
+
typeArguments: [
|
|
481
|
+
string
|
|
482
|
+
];
|
|
483
|
+
}
|
|
484
|
+
/**
|
|
485
|
+
* Refund a parked entry's `Balance<CREDIT>` back to the **originating wxa
|
|
486
|
+
* account** when the entry can no longer be executed — e.g. the `extra_data` body
|
|
487
|
+
* is malformed (handcrafted by the caller instead of via `route_*`), or admin has
|
|
488
|
+
* since `remove_trusted_emitter`'d the destination chain or
|
|
489
|
+
* `set_asset_deprecated`'d the native asset. Without this, such entries
|
|
490
|
+
* permanently lock both the balance and the queue slot (audit finding #5).
|
|
491
|
+
*
|
|
492
|
+
* Auth: either a registered queue keeper (`request.address() ∈ queue.executors`)
|
|
493
|
+
* OR an address authorized on the originating wxa account
|
|
494
|
+
* (`account_registry.is_account_authorized(entry.account_id, caller, now)` —
|
|
495
|
+
* owner or non-expired delegate). The user can self-cancel without waiting for the
|
|
496
|
+
* keeper, and the keeper can clean up stale entries proactively.
|
|
497
|
+
*
|
|
498
|
+
* The refund goes to `Entry.account_id` (the originating wxa account), not
|
|
499
|
+
* `Entry.recipient` (the external destination the user picked) —
|
|
500
|
+
* `request_withdraw<CREDIT>` debited the user's account on enqueue, so the
|
|
501
|
+
* symmetric cancel re-credits that same account. The user can re-issue
|
|
502
|
+
* `request_withdraw` from the restored stored balance once the route is fixed.
|
|
503
|
+
*/
|
|
504
|
+
export declare function cancelEntry(options: CancelEntryOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
505
|
+
export interface EnqueueArguments {
|
|
506
|
+
queue: RawTransactionArgument<string>;
|
|
507
|
+
registry: RawTransactionArgument<string>;
|
|
508
|
+
req: TransactionArgument;
|
|
509
|
+
}
|
|
510
|
+
export interface EnqueueOptions {
|
|
511
|
+
package?: string;
|
|
512
|
+
arguments: EnqueueArguments | [
|
|
513
|
+
queue: RawTransactionArgument<string>,
|
|
514
|
+
registry: RawTransactionArgument<string>,
|
|
515
|
+
req: TransactionArgument
|
|
516
|
+
];
|
|
517
|
+
typeArguments: [
|
|
518
|
+
string
|
|
519
|
+
];
|
|
520
|
+
}
|
|
521
|
+
/**
|
|
522
|
+
* Consume a `WithdrawRequest<CREDIT>` registered to `WithdrawQueue` and park its
|
|
523
|
+
* balance + extra_data. Returns the assigned key. Aborts with `EUnknownRoute` if
|
|
524
|
+
* `extra_data`'s leading tag byte is not a known route.
|
|
525
|
+
*/
|
|
526
|
+
export declare function enqueue(options: EnqueueOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
527
|
+
export interface ExecuteWormholeArguments {
|
|
528
|
+
queue: RawTransactionArgument<string>;
|
|
529
|
+
key: RawTransactionArgument<number | bigint>;
|
|
530
|
+
request: TransactionArgument;
|
|
531
|
+
bridge: RawTransactionArgument<string>;
|
|
532
|
+
creditRegistry: RawTransactionArgument<string>;
|
|
533
|
+
wormholeState: RawTransactionArgument<string>;
|
|
534
|
+
wormholeFee: RawTransactionArgument<string>;
|
|
535
|
+
}
|
|
536
|
+
export interface ExecuteWormholeOptions {
|
|
537
|
+
package?: string;
|
|
538
|
+
arguments: ExecuteWormholeArguments | [
|
|
539
|
+
queue: RawTransactionArgument<string>,
|
|
540
|
+
key: RawTransactionArgument<number | bigint>,
|
|
541
|
+
request: TransactionArgument,
|
|
542
|
+
bridge: RawTransactionArgument<string>,
|
|
543
|
+
creditRegistry: RawTransactionArgument<string>,
|
|
544
|
+
wormholeState: RawTransactionArgument<string>,
|
|
545
|
+
wormholeFee: RawTransactionArgument<string>
|
|
546
|
+
];
|
|
547
|
+
typeArguments: [
|
|
548
|
+
string
|
|
549
|
+
];
|
|
550
|
+
}
|
|
551
|
+
/**
|
|
552
|
+
* Execute a queued entry via `wormhole_bridge::burn_for_withdrawal`. Peels the
|
|
553
|
+
* Wormhole route fields out of `extra_data`. Aborts with `ERouteMismatch` if the
|
|
554
|
+
* entry was not Wormhole-routed. `request.address()` must be on the queue's
|
|
555
|
+
* executor allowlist (audit finding #3); the originating `Entry.account_id` is
|
|
556
|
+
* what the burn path uses for cap accounting / withdrawal id.
|
|
557
|
+
*/
|
|
558
|
+
export declare function executeWormhole(options: ExecuteWormholeOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
559
|
+
export interface ExecuteNativeArguments {
|
|
560
|
+
queue: RawTransactionArgument<string>;
|
|
561
|
+
key: RawTransactionArgument<number | bigint>;
|
|
562
|
+
request: TransactionArgument;
|
|
563
|
+
vault: RawTransactionArgument<string>;
|
|
564
|
+
creditRegistry: RawTransactionArgument<string>;
|
|
565
|
+
}
|
|
566
|
+
export interface ExecuteNativeOptions {
|
|
567
|
+
package?: string;
|
|
568
|
+
arguments: ExecuteNativeArguments | [
|
|
569
|
+
queue: RawTransactionArgument<string>,
|
|
570
|
+
key: RawTransactionArgument<number | bigint>,
|
|
571
|
+
request: TransactionArgument,
|
|
572
|
+
vault: RawTransactionArgument<string>,
|
|
573
|
+
creditRegistry: RawTransactionArgument<string>
|
|
574
|
+
];
|
|
575
|
+
typeArguments: [
|
|
576
|
+
string,
|
|
577
|
+
string
|
|
578
|
+
];
|
|
579
|
+
}
|
|
580
|
+
/**
|
|
581
|
+
* Execute a queued entry via `native_custody::custody_vault::burn<T>`. Decodes the
|
|
582
|
+
* native route, verifying its `asset_type` matches `T` — if `T` was not the
|
|
583
|
+
* asset_type the user specified, aborts with `ERouteMismatch`.
|
|
584
|
+
*/
|
|
585
|
+
export declare function executeNative(options: ExecuteNativeOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
586
|
+
export interface LengthArguments {
|
|
587
|
+
queue: RawTransactionArgument<string>;
|
|
588
|
+
}
|
|
589
|
+
export interface LengthOptions {
|
|
590
|
+
package?: string;
|
|
591
|
+
arguments: LengthArguments | [
|
|
592
|
+
queue: RawTransactionArgument<string>
|
|
593
|
+
];
|
|
594
|
+
typeArguments: [
|
|
595
|
+
string
|
|
596
|
+
];
|
|
597
|
+
}
|
|
598
|
+
export declare function length(options: LengthOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
599
|
+
export interface IsEmptyArguments {
|
|
600
|
+
queue: RawTransactionArgument<string>;
|
|
601
|
+
}
|
|
602
|
+
export interface IsEmptyOptions {
|
|
603
|
+
package?: string;
|
|
604
|
+
arguments: IsEmptyArguments | [
|
|
605
|
+
queue: RawTransactionArgument<string>
|
|
606
|
+
];
|
|
607
|
+
typeArguments: [
|
|
608
|
+
string
|
|
609
|
+
];
|
|
610
|
+
}
|
|
611
|
+
export declare function isEmpty(options: IsEmptyOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
612
|
+
export interface FrontArguments {
|
|
613
|
+
queue: RawTransactionArgument<string>;
|
|
614
|
+
}
|
|
615
|
+
export interface FrontOptions {
|
|
616
|
+
package?: string;
|
|
617
|
+
arguments: FrontArguments | [
|
|
618
|
+
queue: RawTransactionArgument<string>
|
|
619
|
+
];
|
|
620
|
+
typeArguments: [
|
|
621
|
+
string
|
|
622
|
+
];
|
|
623
|
+
}
|
|
624
|
+
export declare function front(options: FrontOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
625
|
+
export interface ContainsArguments {
|
|
626
|
+
queue: RawTransactionArgument<string>;
|
|
627
|
+
key: RawTransactionArgument<number | bigint>;
|
|
628
|
+
}
|
|
629
|
+
export interface ContainsOptions {
|
|
630
|
+
package?: string;
|
|
631
|
+
arguments: ContainsArguments | [
|
|
632
|
+
queue: RawTransactionArgument<string>,
|
|
633
|
+
key: RawTransactionArgument<number | bigint>
|
|
634
|
+
];
|
|
635
|
+
typeArguments: [
|
|
636
|
+
string
|
|
637
|
+
];
|
|
638
|
+
}
|
|
639
|
+
export declare function contains(options: ContainsOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
640
|
+
export interface EntryArguments {
|
|
641
|
+
queue: RawTransactionArgument<string>;
|
|
642
|
+
key: RawTransactionArgument<number | bigint>;
|
|
643
|
+
}
|
|
644
|
+
export interface EntryOptions {
|
|
645
|
+
package?: string;
|
|
646
|
+
arguments: EntryArguments | [
|
|
647
|
+
queue: RawTransactionArgument<string>,
|
|
648
|
+
key: RawTransactionArgument<number | bigint>
|
|
649
|
+
];
|
|
650
|
+
typeArguments: [
|
|
651
|
+
string
|
|
652
|
+
];
|
|
653
|
+
}
|
|
654
|
+
export declare function entry(options: EntryOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
655
|
+
export interface EntryAmountArguments {
|
|
656
|
+
entry: TransactionArgument;
|
|
657
|
+
}
|
|
658
|
+
export interface EntryAmountOptions {
|
|
659
|
+
package?: string;
|
|
660
|
+
arguments: EntryAmountArguments | [
|
|
661
|
+
entry: TransactionArgument
|
|
662
|
+
];
|
|
663
|
+
typeArguments: [
|
|
664
|
+
string
|
|
665
|
+
];
|
|
666
|
+
}
|
|
667
|
+
export declare function entryAmount(options: EntryAmountOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
668
|
+
export interface EntryAccountIdArguments {
|
|
669
|
+
entry: TransactionArgument;
|
|
670
|
+
}
|
|
671
|
+
export interface EntryAccountIdOptions {
|
|
672
|
+
package?: string;
|
|
673
|
+
arguments: EntryAccountIdArguments | [
|
|
674
|
+
entry: TransactionArgument
|
|
675
|
+
];
|
|
676
|
+
typeArguments: [
|
|
677
|
+
string
|
|
678
|
+
];
|
|
679
|
+
}
|
|
680
|
+
export declare function entryAccountId(options: EntryAccountIdOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
681
|
+
export interface EntryRecipientArguments {
|
|
682
|
+
entry: TransactionArgument;
|
|
683
|
+
}
|
|
684
|
+
export interface EntryRecipientOptions {
|
|
685
|
+
package?: string;
|
|
686
|
+
arguments: EntryRecipientArguments | [
|
|
687
|
+
entry: TransactionArgument
|
|
688
|
+
];
|
|
689
|
+
typeArguments: [
|
|
690
|
+
string
|
|
691
|
+
];
|
|
692
|
+
}
|
|
693
|
+
export declare function entryRecipient(options: EntryRecipientOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
694
|
+
export interface EntryExtraDataArguments {
|
|
695
|
+
entry: TransactionArgument;
|
|
696
|
+
}
|
|
697
|
+
export interface EntryExtraDataOptions {
|
|
698
|
+
package?: string;
|
|
699
|
+
arguments: EntryExtraDataArguments | [
|
|
700
|
+
entry: TransactionArgument
|
|
701
|
+
];
|
|
702
|
+
typeArguments: [
|
|
703
|
+
string
|
|
704
|
+
];
|
|
705
|
+
}
|
|
706
|
+
export declare function entryExtraData(options: EntryExtraDataOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
707
|
+
export interface RouteTagArguments {
|
|
708
|
+
extraData: RawTransactionArgument<Array<number>>;
|
|
709
|
+
}
|
|
710
|
+
export interface RouteTagOptions {
|
|
711
|
+
package?: string;
|
|
712
|
+
arguments: RouteTagArguments | [
|
|
713
|
+
extraData: RawTransactionArgument<Array<number>>
|
|
714
|
+
];
|
|
715
|
+
}
|
|
716
|
+
/**
|
|
717
|
+
* Returns the leading route tag byte; aborts if `extra_data` is empty or carries
|
|
718
|
+
* an unknown tag.
|
|
719
|
+
*/
|
|
720
|
+
export declare function routeTag(options: RouteTagOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
721
|
+
export interface BridgeFeeRateArguments {
|
|
722
|
+
queue: RawTransactionArgument<string>;
|
|
723
|
+
evmDestinationChain: RawTransactionArgument<number>;
|
|
724
|
+
}
|
|
725
|
+
export interface BridgeFeeRateOptions {
|
|
726
|
+
package?: string;
|
|
727
|
+
arguments: BridgeFeeRateArguments | [
|
|
728
|
+
queue: RawTransactionArgument<string>,
|
|
729
|
+
evmDestinationChain: RawTransactionArgument<number>
|
|
730
|
+
];
|
|
731
|
+
typeArguments: [
|
|
732
|
+
string
|
|
733
|
+
];
|
|
734
|
+
}
|
|
735
|
+
/**
|
|
736
|
+
* The **effective** bridge-fee rate for `evm_destination_chain` as a 1e9-scaled
|
|
737
|
+
* `u128`: the per-chain override if one is set, else the default rate, else `0`
|
|
738
|
+
* when no fee config exists. Mirrors the `Float`-as-`u128` ABI convention.
|
|
739
|
+
*/
|
|
740
|
+
export declare function bridgeFeeRate(options: BridgeFeeRateOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
741
|
+
export interface BridgeDefaultFeeRateArguments {
|
|
742
|
+
queue: RawTransactionArgument<string>;
|
|
743
|
+
}
|
|
744
|
+
export interface BridgeDefaultFeeRateOptions {
|
|
745
|
+
package?: string;
|
|
746
|
+
arguments: BridgeDefaultFeeRateArguments | [
|
|
747
|
+
queue: RawTransactionArgument<string>
|
|
748
|
+
];
|
|
749
|
+
typeArguments: [
|
|
750
|
+
string
|
|
751
|
+
];
|
|
752
|
+
}
|
|
753
|
+
/**
|
|
754
|
+
* The configured **default** rate (all-chains-without-override) as a 1e9-scaled
|
|
755
|
+
* `u128`; `0` when no fee config exists.
|
|
756
|
+
*/
|
|
757
|
+
export declare function bridgeDefaultFeeRate(options: BridgeDefaultFeeRateOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
758
|
+
export interface HasChainBridgeFeeArguments {
|
|
759
|
+
queue: RawTransactionArgument<string>;
|
|
760
|
+
evmDestinationChain: RawTransactionArgument<number>;
|
|
761
|
+
}
|
|
762
|
+
export interface HasChainBridgeFeeOptions {
|
|
763
|
+
package?: string;
|
|
764
|
+
arguments: HasChainBridgeFeeArguments | [
|
|
765
|
+
queue: RawTransactionArgument<string>,
|
|
766
|
+
evmDestinationChain: RawTransactionArgument<number>
|
|
767
|
+
];
|
|
768
|
+
typeArguments: [
|
|
769
|
+
string
|
|
770
|
+
];
|
|
771
|
+
}
|
|
772
|
+
/**
|
|
773
|
+
* Whether `evm_destination_chain` has an explicit per-chain override (distinct
|
|
774
|
+
* from falling back to the default).
|
|
775
|
+
*/
|
|
776
|
+
export declare function hasChainBridgeFee(options: HasChainBridgeFeeOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
777
|
+
export interface BridgeFeeAmountArguments {
|
|
778
|
+
queue: RawTransactionArgument<string>;
|
|
779
|
+
evmDestinationChain: RawTransactionArgument<number>;
|
|
780
|
+
amount: RawTransactionArgument<number | bigint>;
|
|
781
|
+
}
|
|
782
|
+
export interface BridgeFeeAmountOptions {
|
|
783
|
+
package?: string;
|
|
784
|
+
arguments: BridgeFeeAmountArguments | [
|
|
785
|
+
queue: RawTransactionArgument<string>,
|
|
786
|
+
evmDestinationChain: RawTransactionArgument<number>,
|
|
787
|
+
amount: RawTransactionArgument<number | bigint>
|
|
788
|
+
];
|
|
789
|
+
typeArguments: [
|
|
790
|
+
string
|
|
791
|
+
];
|
|
792
|
+
}
|
|
793
|
+
/**
|
|
794
|
+
* The bridge fee that would be charged on a wormhole exit of `amount` CREDIT to
|
|
795
|
+
* `evm_destination_chain` —
|
|
796
|
+
* `max(ceil(effective_rate * amount), effective_min_fee)`, or `0` when both the
|
|
797
|
+
* effective rate and floor are zero (and always `0` on `amount == 0`). NOTE: this
|
|
798
|
+
* is the _raw_ fee; it can equal or exceed `amount` (`ceil` rounding on a 1-unit
|
|
799
|
+
* dust entry, or a min-fee floor larger than the entry), in which case
|
|
800
|
+
* `execute_wormhole` would abort the net-zero guard. SDKs surfacing an "estimated
|
|
801
|
+
* fee" should gate on `would_execute_wormhole` (audit L1).
|
|
802
|
+
*/
|
|
803
|
+
export declare function bridgeFeeAmount(options: BridgeFeeAmountOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
804
|
+
export interface WouldExecuteWormholeArguments {
|
|
805
|
+
queue: RawTransactionArgument<string>;
|
|
806
|
+
evmDestinationChain: RawTransactionArgument<number>;
|
|
807
|
+
amount: RawTransactionArgument<number | bigint>;
|
|
808
|
+
}
|
|
809
|
+
export interface WouldExecuteWormholeOptions {
|
|
810
|
+
package?: string;
|
|
811
|
+
arguments: WouldExecuteWormholeArguments | [
|
|
812
|
+
queue: RawTransactionArgument<string>,
|
|
813
|
+
evmDestinationChain: RawTransactionArgument<number>,
|
|
814
|
+
amount: RawTransactionArgument<number | bigint>
|
|
815
|
+
];
|
|
816
|
+
typeArguments: [
|
|
817
|
+
string
|
|
818
|
+
];
|
|
819
|
+
}
|
|
820
|
+
/**
|
|
821
|
+
* Whether `execute_wormhole` would clear the net-zero guard for an exit of
|
|
822
|
+
* `amount` to `evm_destination_chain` — i.e. a strictly positive amount remains
|
|
823
|
+
* after the fee. `false` ⇒ `execute_wormhole` would abort
|
|
824
|
+
* `EFeeConsumesEntireAmount` (and `amount == 0` is also `false`). SDKs should gate
|
|
825
|
+
* "estimated fee" UI on this rather than `bridge_fee_amount` alone (audit L1).
|
|
826
|
+
*/
|
|
827
|
+
export declare function wouldExecuteWormhole(options: WouldExecuteWormholeOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
828
|
+
export interface BridgeChainRatesArguments {
|
|
829
|
+
queue: RawTransactionArgument<string>;
|
|
830
|
+
}
|
|
831
|
+
export interface BridgeChainRatesOptions {
|
|
832
|
+
package?: string;
|
|
833
|
+
arguments: BridgeChainRatesArguments | [
|
|
834
|
+
queue: RawTransactionArgument<string>
|
|
835
|
+
];
|
|
836
|
+
typeArguments: [
|
|
837
|
+
string
|
|
838
|
+
];
|
|
839
|
+
}
|
|
840
|
+
/**
|
|
841
|
+
* Enumerate the per-chain overrides as parallel vectors of
|
|
842
|
+
* `(evm_destination_chain, 1e9-scaled rate)`, in insertion order. Empty when no
|
|
843
|
+
* overrides are set (or no fee config exists). The default rate is separate — see
|
|
844
|
+
* `bridge_default_fee_rate` (audit N1). Lets off-chain config tooling discover
|
|
845
|
+
* which chains carry overrides without probing every chain id.
|
|
846
|
+
*/
|
|
847
|
+
export declare function bridgeChainRates(options: BridgeChainRatesOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
848
|
+
export interface BridgeMinFeeArguments {
|
|
849
|
+
queue: RawTransactionArgument<string>;
|
|
850
|
+
evmDestinationChain: RawTransactionArgument<number>;
|
|
851
|
+
}
|
|
852
|
+
export interface BridgeMinFeeOptions {
|
|
853
|
+
package?: string;
|
|
854
|
+
arguments: BridgeMinFeeArguments | [
|
|
855
|
+
queue: RawTransactionArgument<string>,
|
|
856
|
+
evmDestinationChain: RawTransactionArgument<number>
|
|
857
|
+
];
|
|
858
|
+
typeArguments: [
|
|
859
|
+
string
|
|
860
|
+
];
|
|
861
|
+
}
|
|
862
|
+
/**
|
|
863
|
+
* The **effective** minimum-fee floor (absolute CREDIT units) for
|
|
864
|
+
* `evm_destination_chain`: the per-chain override if one is set, else the default
|
|
865
|
+
* floor, else `0` when no fee config exists.
|
|
866
|
+
*/
|
|
867
|
+
export declare function bridgeMinFee(options: BridgeMinFeeOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
868
|
+
export interface BridgeDefaultMinFeeArguments {
|
|
869
|
+
queue: RawTransactionArgument<string>;
|
|
870
|
+
}
|
|
871
|
+
export interface BridgeDefaultMinFeeOptions {
|
|
872
|
+
package?: string;
|
|
873
|
+
arguments: BridgeDefaultMinFeeArguments | [
|
|
874
|
+
queue: RawTransactionArgument<string>
|
|
875
|
+
];
|
|
876
|
+
typeArguments: [
|
|
877
|
+
string
|
|
878
|
+
];
|
|
879
|
+
}
|
|
880
|
+
/**
|
|
881
|
+
* The configured **default** minimum-fee floor (all-chains-without-override) in
|
|
882
|
+
* CREDIT units; `0` when no fee config exists.
|
|
883
|
+
*/
|
|
884
|
+
export declare function bridgeDefaultMinFee(options: BridgeDefaultMinFeeOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
885
|
+
export interface HasChainBridgeMinFeeArguments {
|
|
886
|
+
queue: RawTransactionArgument<string>;
|
|
887
|
+
evmDestinationChain: RawTransactionArgument<number>;
|
|
888
|
+
}
|
|
889
|
+
export interface HasChainBridgeMinFeeOptions {
|
|
890
|
+
package?: string;
|
|
891
|
+
arguments: HasChainBridgeMinFeeArguments | [
|
|
892
|
+
queue: RawTransactionArgument<string>,
|
|
893
|
+
evmDestinationChain: RawTransactionArgument<number>
|
|
894
|
+
];
|
|
895
|
+
typeArguments: [
|
|
896
|
+
string
|
|
897
|
+
];
|
|
898
|
+
}
|
|
899
|
+
/**
|
|
900
|
+
* Whether `evm_destination_chain` has an explicit per-chain min-fee override
|
|
901
|
+
* (distinct from falling back to the default floor).
|
|
902
|
+
*/
|
|
903
|
+
export declare function hasChainBridgeMinFee(options: HasChainBridgeMinFeeOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
904
|
+
export interface BridgeChainMinFeesArguments {
|
|
905
|
+
queue: RawTransactionArgument<string>;
|
|
906
|
+
}
|
|
907
|
+
export interface BridgeChainMinFeesOptions {
|
|
908
|
+
package?: string;
|
|
909
|
+
arguments: BridgeChainMinFeesArguments | [
|
|
910
|
+
queue: RawTransactionArgument<string>
|
|
911
|
+
];
|
|
912
|
+
typeArguments: [
|
|
913
|
+
string
|
|
914
|
+
];
|
|
915
|
+
}
|
|
916
|
+
/**
|
|
917
|
+
* Enumerate the per-chain min-fee overrides as parallel vectors of
|
|
918
|
+
* `(evm_destination_chain, min_fee)`, in insertion order. Empty when none are set
|
|
919
|
+
* (or no fee config exists). The default floor is separate — see
|
|
920
|
+
* `bridge_default_min_fee`. Lets off-chain config tooling discover which chains
|
|
921
|
+
* carry min-fee overrides without probing every chain id.
|
|
922
|
+
*/
|
|
923
|
+
export declare function bridgeChainMinFees(options: BridgeChainMinFeesOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|