@waterx/sdk 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +204 -0
- package/dist/src/client.d.ts +109 -0
- package/dist/src/client.js +197 -0
- package/dist/src/config.d.ts +229 -0
- package/dist/src/config.js +107 -0
- package/dist/src/constants.d.ts +64 -0
- package/dist/src/constants.js +71 -0
- package/dist/src/fetch.d.ts +144 -0
- package/dist/src/fetch.js +419 -0
- package/dist/src/generated/bucket_v2_framework/account.d.ts +107 -0
- package/dist/src/generated/bucket_v2_framework/account.js +129 -0
- package/dist/src/generated/bucket_v2_framework/deps/std/type_name.d.ts +17 -0
- package/dist/src/generated/bucket_v2_framework/deps/std/type_name.js +19 -0
- package/dist/src/generated/bucket_v2_framework/deps/sui/balance.d.ts +12 -0
- package/dist/src/generated/bucket_v2_framework/deps/sui/balance.js +14 -0
- package/dist/src/generated/bucket_v2_framework/deps/sui/vec_map.d.ts +36 -0
- package/dist/src/generated/bucket_v2_framework/deps/sui/vec_map.js +27 -0
- package/dist/src/generated/bucket_v2_framework/deps/sui/vec_set.d.ts +16 -0
- package/dist/src/generated/bucket_v2_framework/deps/sui/vec_set.js +19 -0
- package/dist/src/generated/bucket_v2_framework/double.d.ts +384 -0
- package/dist/src/generated/bucket_v2_framework/double.js +466 -0
- package/dist/src/generated/bucket_v2_framework/float.d.ts +364 -0
- package/dist/src/generated/bucket_v2_framework/float.js +440 -0
- package/dist/src/generated/bucket_v2_framework/liability.d.ts +197 -0
- package/dist/src/generated/bucket_v2_framework/liability.js +205 -0
- package/dist/src/generated/bucket_v2_framework/linked_table.d.ts +384 -0
- package/dist/src/generated/bucket_v2_framework/linked_table.js +382 -0
- package/dist/src/generated/bucket_v2_framework/sheet.d.ts +424 -0
- package/dist/src/generated/bucket_v2_framework/sheet.js +344 -0
- package/dist/src/generated/native_custody/custody_vault.d.ts +572 -0
- package/dist/src/generated/native_custody/custody_vault.js +483 -0
- package/dist/src/generated/native_custody/deps/bucket_v2_framework/float.d.ts +8 -0
- package/dist/src/generated/native_custody/deps/bucket_v2_framework/float.js +10 -0
- package/dist/src/generated/native_custody/deps/bucket_v2_framework/liability.d.ts +11 -0
- package/dist/src/generated/native_custody/deps/bucket_v2_framework/liability.js +13 -0
- package/dist/src/generated/native_custody/deps/bucket_v2_framework/sheet.d.ts +49 -0
- package/dist/src/generated/native_custody/deps/bucket_v2_framework/sheet.js +18 -0
- package/dist/src/generated/native_custody/deps/std/type_name.d.ts +17 -0
- package/dist/src/generated/native_custody/deps/std/type_name.js +19 -0
- package/dist/src/generated/native_custody/deps/sui/balance.d.ts +12 -0
- package/dist/src/generated/native_custody/deps/sui/balance.js +14 -0
- package/dist/src/generated/native_custody/deps/sui/vec_map.d.ts +36 -0
- package/dist/src/generated/native_custody/deps/sui/vec_map.js +27 -0
- package/dist/src/generated/native_custody/deps/sui/vec_set.d.ts +16 -0
- package/dist/src/generated/native_custody/deps/sui/vec_set.js +19 -0
- package/dist/src/generated/native_custody/events.d.ts +36 -0
- package/dist/src/generated/native_custody/events.js +36 -0
- package/dist/src/generated/pyth_sponsor_rule/deps/sui/balance.d.ts +12 -0
- package/dist/src/generated/pyth_sponsor_rule/deps/sui/balance.js +14 -0
- package/dist/src/generated/pyth_sponsor_rule/pyth_sponsor_rule.d.ts +68 -0
- package/dist/src/generated/pyth_sponsor_rule/pyth_sponsor_rule.js +74 -0
- package/dist/src/generated/utils/index.d.ts +30 -0
- package/dist/src/generated/utils/index.js +157 -0
- package/dist/src/generated/waterx_account/account.d.ts +1818 -0
- package/dist/src/generated/waterx_account/account.js +1723 -0
- package/dist/src/generated/waterx_account/deps/bucket_v2_framework/liability.d.ts +11 -0
- package/dist/src/generated/waterx_account/deps/bucket_v2_framework/liability.js +13 -0
- package/dist/src/generated/waterx_account/deps/bucket_v2_framework/sheet.d.ts +49 -0
- package/dist/src/generated/waterx_account/deps/bucket_v2_framework/sheet.js +18 -0
- package/dist/src/generated/waterx_account/deps/std/type_name.d.ts +17 -0
- package/dist/src/generated/waterx_account/deps/std/type_name.js +19 -0
- package/dist/src/generated/waterx_account/deps/sui/balance.d.ts +12 -0
- package/dist/src/generated/waterx_account/deps/sui/balance.js +14 -0
- package/dist/src/generated/waterx_account/deps/sui/object_table.d.ts +17 -0
- package/dist/src/generated/waterx_account/deps/sui/object_table.js +19 -0
- package/dist/src/generated/waterx_account/deps/sui/table.d.ts +29 -0
- package/dist/src/generated/waterx_account/deps/sui/table.js +31 -0
- package/dist/src/generated/waterx_account/deps/sui/vec_map.d.ts +36 -0
- package/dist/src/generated/waterx_account/deps/sui/vec_map.js +27 -0
- package/dist/src/generated/waterx_account/deps/sui/vec_set.d.ts +16 -0
- package/dist/src/generated/waterx_account/deps/sui/vec_set.js +19 -0
- package/dist/src/generated/waterx_account/direct_rule.d.ts +77 -0
- package/dist/src/generated/waterx_account/direct_rule.js +78 -0
- package/dist/src/generated/waterx_account/events.d.ts +180 -0
- package/dist/src/generated/waterx_account/events.js +156 -0
- package/dist/src/generated/waterx_account/version.d.ts +10 -0
- package/dist/src/generated/waterx_account/version.js +8 -0
- package/dist/src/generated/waterx_credit/credit_registry.d.ts +708 -0
- package/dist/src/generated/waterx_credit/credit_registry.js +658 -0
- package/dist/src/generated/waterx_credit/deps/std/type_name.d.ts +17 -0
- package/dist/src/generated/waterx_credit/deps/std/type_name.js +19 -0
- package/dist/src/generated/waterx_credit/deps/sui/table.d.ts +29 -0
- package/dist/src/generated/waterx_credit/deps/sui/table.js +31 -0
- package/dist/src/generated/waterx_credit/deps/sui/vec_map.d.ts +36 -0
- package/dist/src/generated/waterx_credit/deps/sui/vec_map.js +27 -0
- package/dist/src/generated/waterx_credit/deps/sui/vec_set.d.ts +16 -0
- package/dist/src/generated/waterx_credit/deps/sui/vec_set.js +19 -0
- package/dist/src/generated/waterx_credit/limited_supply.d.ts +107 -0
- package/dist/src/generated/waterx_credit/limited_supply.js +131 -0
- package/dist/src/generated/waterx_oracle/aggregator.d.ts +211 -0
- package/dist/src/generated/waterx_oracle/aggregator.js +213 -0
- package/dist/src/generated/waterx_oracle/collector.d.ts +119 -0
- package/dist/src/generated/waterx_oracle/collector.js +105 -0
- package/dist/src/generated/waterx_oracle/deps/bucket_v2_framework/float.d.ts +8 -0
- package/dist/src/generated/waterx_oracle/deps/bucket_v2_framework/float.js +10 -0
- package/dist/src/generated/waterx_oracle/deps/std/type_name.d.ts +17 -0
- package/dist/src/generated/waterx_oracle/deps/std/type_name.js +19 -0
- package/dist/src/generated/waterx_oracle/deps/sui/vec_map.d.ts +36 -0
- package/dist/src/generated/waterx_oracle/deps/sui/vec_map.js +27 -0
- package/dist/src/generated/waterx_oracle/deps/sui/vec_set.d.ts +16 -0
- package/dist/src/generated/waterx_oracle/deps/sui/vec_set.js +19 -0
- package/dist/src/generated/waterx_oracle/oracle.d.ts +298 -0
- package/dist/src/generated/waterx_oracle/oracle.js +323 -0
- package/dist/src/generated/waterx_oracle/version.d.ts +10 -0
- package/dist/src/generated/waterx_oracle/version.js +8 -0
- package/dist/src/generated/waterx_perp/account_data.d.ts +269 -0
- package/dist/src/generated/waterx_perp/account_data.js +284 -0
- package/dist/src/generated/waterx_perp/admin.d.ts +19 -0
- package/dist/src/generated/waterx_perp/admin.js +22 -0
- package/dist/src/generated/waterx_perp/deps/bucket_v2_framework/double.d.ts +8 -0
- package/dist/src/generated/waterx_perp/deps/bucket_v2_framework/double.js +10 -0
- package/dist/src/generated/waterx_perp/deps/bucket_v2_framework/float.d.ts +8 -0
- package/dist/src/generated/waterx_perp/deps/bucket_v2_framework/float.js +10 -0
- package/dist/src/generated/waterx_perp/deps/bucket_v2_framework/liability.d.ts +11 -0
- package/dist/src/generated/waterx_perp/deps/bucket_v2_framework/liability.js +13 -0
- package/dist/src/generated/waterx_perp/deps/bucket_v2_framework/linked_table.d.ts +8 -0
- package/dist/src/generated/waterx_perp/deps/bucket_v2_framework/linked_table.js +18 -0
- package/dist/src/generated/waterx_perp/deps/bucket_v2_framework/sheet.d.ts +49 -0
- package/dist/src/generated/waterx_perp/deps/bucket_v2_framework/sheet.js +18 -0
- package/dist/src/generated/waterx_perp/deps/std/type_name.d.ts +17 -0
- package/dist/src/generated/waterx_perp/deps/std/type_name.js +19 -0
- package/dist/src/generated/waterx_perp/deps/sui/balance.d.ts +15 -0
- package/dist/src/generated/waterx_perp/deps/sui/balance.js +17 -0
- package/dist/src/generated/waterx_perp/deps/sui/coin.d.ts +14 -0
- package/dist/src/generated/waterx_perp/deps/sui/coin.js +15 -0
- package/dist/src/generated/waterx_perp/deps/sui/vec_map.d.ts +36 -0
- package/dist/src/generated/waterx_perp/deps/sui/vec_map.js +27 -0
- package/dist/src/generated/waterx_perp/deps/sui/vec_set.d.ts +16 -0
- package/dist/src/generated/waterx_perp/deps/sui/vec_set.js +19 -0
- package/dist/src/generated/waterx_perp/events.d.ts +1283 -0
- package/dist/src/generated/waterx_perp/events.js +1018 -0
- package/dist/src/generated/waterx_perp/global_config.d.ts +775 -0
- package/dist/src/generated/waterx_perp/global_config.js +836 -0
- package/dist/src/generated/waterx_perp/keyed_big_vector.d.ts +553 -0
- package/dist/src/generated/waterx_perp/keyed_big_vector.js +554 -0
- package/dist/src/generated/waterx_perp/lp_pool.d.ts +1648 -0
- package/dist/src/generated/waterx_perp/lp_pool.js +1521 -0
- package/dist/src/generated/waterx_perp/market_config.d.ts +715 -0
- package/dist/src/generated/waterx_perp/market_config.js +780 -0
- package/dist/src/generated/waterx_perp/math.d.ts +63 -0
- package/dist/src/generated/waterx_perp/math.js +64 -0
- package/dist/src/generated/waterx_perp/memo.d.ts +251 -0
- package/dist/src/generated/waterx_perp/memo.js +323 -0
- package/dist/src/generated/waterx_perp/order_book.d.ts +290 -0
- package/dist/src/generated/waterx_perp/order_book.js +329 -0
- package/dist/src/generated/waterx_perp/position.d.ts +1005 -0
- package/dist/src/generated/waterx_perp/position.js +1103 -0
- package/dist/src/generated/waterx_perp/request.d.ts +544 -0
- package/dist/src/generated/waterx_perp/request.js +541 -0
- package/dist/src/generated/waterx_perp/response.d.ts +247 -0
- package/dist/src/generated/waterx_perp/response.js +280 -0
- package/dist/src/generated/waterx_perp/trading.d.ts +2821 -0
- package/dist/src/generated/waterx_perp/trading.js +2372 -0
- package/dist/src/generated/waterx_perp/version.d.ts +10 -0
- package/dist/src/generated/waterx_perp/version.js +8 -0
- package/dist/src/generated/waterx_perp/witness.d.ts +18 -0
- package/dist/src/generated/waterx_perp/witness.js +21 -0
- package/dist/src/generated/waterx_perp_view/deps/std/type_name.d.ts +17 -0
- package/dist/src/generated/waterx_perp_view/deps/std/type_name.js +19 -0
- package/dist/src/generated/waterx_perp_view/view.d.ts +447 -0
- package/dist/src/generated/waterx_perp_view/view.js +414 -0
- package/dist/src/generated/waterx_pyth_rule/deps/sui/vec_map.d.ts +36 -0
- package/dist/src/generated/waterx_pyth_rule/deps/sui/vec_map.js +27 -0
- package/dist/src/generated/waterx_pyth_rule/pyth_rule.d.ts +90 -0
- package/dist/src/generated/waterx_pyth_rule/pyth_rule.js +72 -0
- package/dist/src/generated/waterx_referral/deps/sui/table.d.ts +29 -0
- package/dist/src/generated/waterx_referral/deps/sui/table.js +31 -0
- package/dist/src/generated/waterx_referral/deps/sui/vec_set.d.ts +16 -0
- package/dist/src/generated/waterx_referral/deps/sui/vec_set.js +19 -0
- package/dist/src/generated/waterx_referral/referral_table.d.ts +171 -0
- package/dist/src/generated/waterx_referral/referral_table.js +192 -0
- package/dist/src/generated/waterx_staking/deps/bucket_v2_framework/double.d.ts +8 -0
- package/dist/src/generated/waterx_staking/deps/bucket_v2_framework/double.js +10 -0
- package/dist/src/generated/waterx_staking/deps/sui/balance.d.ts +12 -0
- package/dist/src/generated/waterx_staking/deps/sui/balance.js +14 -0
- package/dist/src/generated/waterx_staking/deps/sui/table.d.ts +29 -0
- package/dist/src/generated/waterx_staking/deps/sui/table.js +31 -0
- package/dist/src/generated/waterx_staking/deps/sui/vec_set.d.ts +16 -0
- package/dist/src/generated/waterx_staking/deps/sui/vec_set.js +19 -0
- package/dist/src/generated/waterx_staking/waterx_staking.d.ts +746 -0
- package/dist/src/generated/waterx_staking/waterx_staking.js +731 -0
- package/dist/src/generated/waterx_staking/witness.d.ts +16 -0
- package/dist/src/generated/waterx_staking/witness.js +18 -0
- package/dist/src/generated/withdrawal_queue/deps/bucket_v2_framework/linked_table.d.ts +8 -0
- package/dist/src/generated/withdrawal_queue/deps/bucket_v2_framework/linked_table.js +18 -0
- package/dist/src/generated/withdrawal_queue/deps/std/type_name.d.ts +17 -0
- package/dist/src/generated/withdrawal_queue/deps/std/type_name.js +19 -0
- package/dist/src/generated/withdrawal_queue/deps/sui/balance.d.ts +12 -0
- package/dist/src/generated/withdrawal_queue/deps/sui/balance.js +14 -0
- package/dist/src/generated/withdrawal_queue/deps/sui/vec_set.d.ts +16 -0
- package/dist/src/generated/withdrawal_queue/deps/sui/vec_set.js +19 -0
- package/dist/src/generated/withdrawal_queue/withdrawal_queue.d.ts +483 -0
- package/dist/src/generated/withdrawal_queue/withdrawal_queue.js +480 -0
- package/dist/src/generated/wlp/wlp.d.ts +28 -0
- package/dist/src/generated/wlp/wlp.js +32 -0
- package/dist/src/generated/wormhole_bridge/deps/sui/table.d.ts +29 -0
- package/dist/src/generated/wormhole_bridge/deps/sui/table.js +31 -0
- package/dist/src/generated/wormhole_bridge/deps/sui/vec_map.d.ts +36 -0
- package/dist/src/generated/wormhole_bridge/deps/sui/vec_map.js +27 -0
- package/dist/src/generated/wormhole_bridge/deps/sui/vec_set.d.ts +16 -0
- package/dist/src/generated/wormhole_bridge/deps/sui/vec_set.js +19 -0
- package/dist/src/generated/wormhole_bridge/deps/wormhole_sdk/consumed_vaas.d.ts +12 -0
- package/dist/src/generated/wormhole_bridge/deps/wormhole_sdk/consumed_vaas.js +9 -0
- package/dist/src/generated/wormhole_bridge/deps/wormhole_sdk/emitter.d.ts +14 -0
- package/dist/src/generated/wormhole_bridge/deps/wormhole_sdk/emitter.js +16 -0
- package/dist/src/generated/wormhole_bridge/deps/wormhole_sdk/set.d.ts +16 -0
- package/dist/src/generated/wormhole_bridge/deps/wormhole_sdk/set.js +15 -0
- package/dist/src/generated/wormhole_bridge/events.d.ts +32 -0
- package/dist/src/generated/wormhole_bridge/events.js +28 -0
- package/dist/src/generated/wormhole_bridge/wormhole_bridge.d.ts +498 -0
- package/dist/src/generated/wormhole_bridge/wormhole_bridge.js +494 -0
- package/dist/src/index.d.ts +28 -0
- package/dist/src/index.js +34 -0
- package/dist/src/tx-builders.d.ts +242 -0
- package/dist/src/tx-builders.js +320 -0
- package/dist/src/user/account.d.ts +129 -0
- package/dist/src/user/account.js +166 -0
- package/dist/src/user/credit.d.ts +135 -0
- package/dist/src/user/credit.js +255 -0
- package/dist/src/user/custody.d.ts +71 -0
- package/dist/src/user/custody.js +112 -0
- package/dist/src/user/index.d.ts +8 -0
- package/dist/src/user/index.js +8 -0
- package/dist/src/user/order.d.ts +89 -0
- package/dist/src/user/order.js +134 -0
- package/dist/src/user/referral.d.ts +21 -0
- package/dist/src/user/referral.js +41 -0
- package/dist/src/user/staking.d.ts +54 -0
- package/dist/src/user/staking.js +109 -0
- package/dist/src/user/trading.d.ts +119 -0
- package/dist/src/user/trading.js +262 -0
- package/dist/src/user/wlp.d.ts +58 -0
- package/dist/src/user/wlp.js +99 -0
- package/dist/src/utils/account-request.d.ts +9 -0
- package/dist/src/utils/account-request.js +17 -0
- package/dist/src/utils/config.d.ts +11 -0
- package/dist/src/utils/config.js +15 -0
- package/dist/src/utils/math.d.ts +201 -0
- package/dist/src/utils/math.js +343 -0
- package/dist/src/utils/pyth.d.ts +89 -0
- package/dist/src/utils/pyth.js +316 -0
- package/dist/src/utils/wormhole.d.ts +86 -0
- package/dist/src/utils/wormhole.js +154 -0
- package/package.json +66 -0
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**************************************************************
|
|
2
|
+
* THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
|
|
3
|
+
**************************************************************/
|
|
4
|
+
/**
|
|
5
|
+
* Protocol witness for `waterx_staking`.
|
|
6
|
+
*
|
|
7
|
+
* Lives in its own module so the witness type name `WaterXStaking` stays distinct
|
|
8
|
+
* from the vault struct `StakingPool<STAKE>` in `waterx_staking::waterx_staking` —
|
|
9
|
+
* same package, different modules → distinct TypeNames. Used to gate
|
|
10
|
+
* `wxa_account::take<STAKE, _>` / `put<STAKE, _>` and to key delegate per-protocol
|
|
11
|
+
* permissions.
|
|
12
|
+
*/
|
|
13
|
+
import { MoveStruct } from '../utils/index.ts';
|
|
14
|
+
export declare const WaterXStaking: MoveStruct<{
|
|
15
|
+
dummy_field: import("@mysten/sui/bcs").BcsType<boolean, boolean, "bool">;
|
|
16
|
+
}, "@waterx/staking::witness::WaterXStaking">;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**************************************************************
|
|
2
|
+
* THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
|
|
3
|
+
**************************************************************/
|
|
4
|
+
/**
|
|
5
|
+
* Protocol witness for `waterx_staking`.
|
|
6
|
+
*
|
|
7
|
+
* Lives in its own module so the witness type name `WaterXStaking` stays distinct
|
|
8
|
+
* from the vault struct `StakingPool<STAKE>` in `waterx_staking::waterx_staking` —
|
|
9
|
+
* same package, different modules → distinct TypeNames. Used to gate
|
|
10
|
+
* `wxa_account::take<STAKE, _>` / `put<STAKE, _>` and to key delegate per-protocol
|
|
11
|
+
* permissions.
|
|
12
|
+
*/
|
|
13
|
+
import { MoveStruct } from "../utils/index.js";
|
|
14
|
+
import { bcs } from '@mysten/sui/bcs';
|
|
15
|
+
const $moduleName = '@waterx/staking::witness';
|
|
16
|
+
export const WaterXStaking = new MoveStruct({ name: `${$moduleName}::WaterXStaking`, fields: {
|
|
17
|
+
dummy_field: bcs.bool()
|
|
18
|
+
} });
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**************************************************************
|
|
2
|
+
* THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
|
|
3
|
+
**************************************************************/
|
|
4
|
+
import { type BcsType } from '@mysten/sui/bcs';
|
|
5
|
+
import { MoveStruct } from '../../../utils/index.ts';
|
|
6
|
+
export declare function LinkedTable<K extends BcsType<any>>(...typeParameters: [
|
|
7
|
+
K
|
|
8
|
+
]): MoveStruct<any, any>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**************************************************************
|
|
2
|
+
* THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
|
|
3
|
+
**************************************************************/
|
|
4
|
+
import { bcs } from '@mysten/sui/bcs';
|
|
5
|
+
import { MoveStruct } from "../../../utils/index.js";
|
|
6
|
+
const $moduleName = 'bucket_v2_framework::linked_table';
|
|
7
|
+
export function LinkedTable(...typeParameters) {
|
|
8
|
+
return new MoveStruct({ name: `${$moduleName}::LinkedTable<${typeParameters[0].name}, phantom V>`, fields: {
|
|
9
|
+
/** the ID of this table */
|
|
10
|
+
id: bcs.Address,
|
|
11
|
+
/** the number of key-value pairs in the table */
|
|
12
|
+
size: bcs.u64(),
|
|
13
|
+
/** the front of the table, i.e. the key of the first entry */
|
|
14
|
+
head: bcs.option(typeParameters[0]),
|
|
15
|
+
/** the back of the table, i.e. the key of the last entry */
|
|
16
|
+
tail: bcs.option(typeParameters[0])
|
|
17
|
+
} });
|
|
18
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**************************************************************
|
|
2
|
+
* THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
|
|
3
|
+
**************************************************************/
|
|
4
|
+
/** Functionality for converting Move types into values. Use with care! */
|
|
5
|
+
import { MoveStruct } from '../../../utils/index.ts';
|
|
6
|
+
export declare const TypeName: MoveStruct<{
|
|
7
|
+
/**
|
|
8
|
+
* String representation of the type. All types are represented using their source
|
|
9
|
+
* syntax: "u8", "u64", "bool", "address", "vector", and so on for primitive types.
|
|
10
|
+
* Struct types are represented as fully qualified type names; e.g.
|
|
11
|
+
* `00000000000000000000000000000001::string::String` or
|
|
12
|
+
* `0000000000000000000000000000000a::module_name1::type_name1<0000000000000000000000000000000a::module_name2::type_name2<u64>>`
|
|
13
|
+
* Addresses are hex-encoded lowercase values of length ADDRESS_LENGTH (16, 20, or
|
|
14
|
+
* 32 depending on the Move platform)
|
|
15
|
+
*/
|
|
16
|
+
name: import("@mysten/sui/bcs").BcsType<string, string, "string">;
|
|
17
|
+
}, "std::type_name::TypeName">;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**************************************************************
|
|
2
|
+
* THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
|
|
3
|
+
**************************************************************/
|
|
4
|
+
/** Functionality for converting Move types into values. Use with care! */
|
|
5
|
+
import { MoveStruct } from "../../../utils/index.js";
|
|
6
|
+
import { bcs } from '@mysten/sui/bcs';
|
|
7
|
+
const $moduleName = 'std::type_name';
|
|
8
|
+
export const TypeName = new MoveStruct({ name: `${$moduleName}::TypeName`, fields: {
|
|
9
|
+
/**
|
|
10
|
+
* String representation of the type. All types are represented using their source
|
|
11
|
+
* syntax: "u8", "u64", "bool", "address", "vector", and so on for primitive types.
|
|
12
|
+
* Struct types are represented as fully qualified type names; e.g.
|
|
13
|
+
* `00000000000000000000000000000001::string::String` or
|
|
14
|
+
* `0000000000000000000000000000000a::module_name1::type_name1<0000000000000000000000000000000a::module_name2::type_name2<u64>>`
|
|
15
|
+
* Addresses are hex-encoded lowercase values of length ADDRESS_LENGTH (16, 20, or
|
|
16
|
+
* 32 depending on the Move platform)
|
|
17
|
+
*/
|
|
18
|
+
name: bcs.string()
|
|
19
|
+
} });
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**************************************************************
|
|
2
|
+
* THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
|
|
3
|
+
**************************************************************/
|
|
4
|
+
/**
|
|
5
|
+
* A storable handler for Balances in general. Is used in the `Coin` module to
|
|
6
|
+
* allow balance operations and can be used to implement custom coins with `Supply`
|
|
7
|
+
* and `Balance`s.
|
|
8
|
+
*/
|
|
9
|
+
import { MoveStruct } from '../../../utils/index.ts';
|
|
10
|
+
export declare const Balance: MoveStruct<{
|
|
11
|
+
value: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
12
|
+
}, "0x2::balance::Balance<phantom T>">;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**************************************************************
|
|
2
|
+
* THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
|
|
3
|
+
**************************************************************/
|
|
4
|
+
/**
|
|
5
|
+
* A storable handler for Balances in general. Is used in the `Coin` module to
|
|
6
|
+
* allow balance operations and can be used to implement custom coins with `Supply`
|
|
7
|
+
* and `Balance`s.
|
|
8
|
+
*/
|
|
9
|
+
import { MoveStruct } from "../../../utils/index.js";
|
|
10
|
+
import { bcs } from '@mysten/sui/bcs';
|
|
11
|
+
const $moduleName = '0x2::balance';
|
|
12
|
+
export const Balance = new MoveStruct({ name: `${$moduleName}::Balance<phantom T>`, fields: {
|
|
13
|
+
value: bcs.u64()
|
|
14
|
+
} });
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**************************************************************
|
|
2
|
+
* THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
|
|
3
|
+
**************************************************************/
|
|
4
|
+
import { type BcsType } from '@mysten/sui/bcs';
|
|
5
|
+
import { MoveStruct } from '../../../utils/index.ts';
|
|
6
|
+
/**
|
|
7
|
+
* A set data structure backed by a vector. The set is guaranteed not to contain
|
|
8
|
+
* duplicate keys. All operations are O(N) in the size of the set
|
|
9
|
+
*
|
|
10
|
+
* - the intention of this data structure is only to provide the convenience of
|
|
11
|
+
* programming against a set API. Sets that need sorted iteration rather than
|
|
12
|
+
* insertion order iteration should be handwritten.
|
|
13
|
+
*/
|
|
14
|
+
export declare function VecSet<K extends BcsType<any>>(...typeParameters: [
|
|
15
|
+
K
|
|
16
|
+
]): MoveStruct<any, any>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**************************************************************
|
|
2
|
+
* THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
|
|
3
|
+
**************************************************************/
|
|
4
|
+
import { bcs } from '@mysten/sui/bcs';
|
|
5
|
+
import { MoveStruct } from "../../../utils/index.js";
|
|
6
|
+
const $moduleName = '0x2::vec_set';
|
|
7
|
+
/**
|
|
8
|
+
* A set data structure backed by a vector. The set is guaranteed not to contain
|
|
9
|
+
* duplicate keys. All operations are O(N) in the size of the set
|
|
10
|
+
*
|
|
11
|
+
* - the intention of this data structure is only to provide the convenience of
|
|
12
|
+
* programming against a set API. Sets that need sorted iteration rather than
|
|
13
|
+
* insertion order iteration should be handwritten.
|
|
14
|
+
*/
|
|
15
|
+
export function VecSet(...typeParameters) {
|
|
16
|
+
return new MoveStruct({ name: `${$moduleName}::VecSet<${typeParameters[0].name}>`, fields: {
|
|
17
|
+
contents: bcs.vector(typeParameters[0])
|
|
18
|
+
} });
|
|
19
|
+
}
|
|
@@ -0,0 +1,483 @@
|
|
|
1
|
+
/**************************************************************
|
|
2
|
+
* THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
|
|
3
|
+
**************************************************************/
|
|
4
|
+
import { MoveStruct, type RawTransactionArgument } from '../utils/index.ts';
|
|
5
|
+
import { type Transaction } from '@mysten/sui/transactions';
|
|
6
|
+
export declare const 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
|
+
}, "@waterx/withdrawal-queue::withdrawal_queue::NativeRoute">;
|
|
23
|
+
export declare const Entry: MoveStruct<{
|
|
24
|
+
balance: MoveStruct<{
|
|
25
|
+
value: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
26
|
+
}, "0x2::balance::Balance<phantom T>">;
|
|
27
|
+
/**
|
|
28
|
+
* Originating wxa Account whose stored `Balance<CREDIT>` produced this entry.
|
|
29
|
+
* Threaded into `vault.burn` / `bridge.burn_for_withdrawal` so the burner identity
|
|
30
|
+
* on the credit registry's personal cap, the EVM-side withdrawal id, and the
|
|
31
|
+
* partner-fee lookup all bind to the source account — not whoever calls
|
|
32
|
+
* `execute_*` (audit finding #3).
|
|
33
|
+
*/
|
|
34
|
+
account_id: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
35
|
+
/**
|
|
36
|
+
* Sui-side recipient from `WithdrawRequest`. Honored for Native payouts; ignored
|
|
37
|
+
* for Wormhole (EVM recipient lives in extra_data).
|
|
38
|
+
*/
|
|
39
|
+
recipient: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
40
|
+
extra_data: import("@mysten/sui/bcs").BcsType<number[], Iterable<number> & {
|
|
41
|
+
length: number;
|
|
42
|
+
}, string>;
|
|
43
|
+
}, "@waterx/withdrawal-queue::withdrawal_queue::Entry<phantom CREDIT>">;
|
|
44
|
+
export declare const Queue: MoveStruct<{
|
|
45
|
+
id: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
46
|
+
next_key: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
47
|
+
entries: MoveStruct<any, any>;
|
|
48
|
+
/**
|
|
49
|
+
* Admin-managed allowlist of addresses authorized to call `execute_wormhole` /
|
|
50
|
+
* `execute_native`. Without this gate any caller could route any user's queue
|
|
51
|
+
* entry through the burn path (audit finding #3).
|
|
52
|
+
*/
|
|
53
|
+
executors: MoveStruct<any, any>;
|
|
54
|
+
/**
|
|
55
|
+
* Admin-managed package-version allowlist. Every mutating public entry asserts
|
|
56
|
+
* `PACKAGE_VERSION ∈ allowed_versions`; admin uses `add_version` /
|
|
57
|
+
* `remove_version` to kill-switch a deprecated package after a contract upgrade.
|
|
58
|
+
*/
|
|
59
|
+
allowed_versions: MoveStruct<any, any>;
|
|
60
|
+
}, "@waterx/withdrawal-queue::withdrawal_queue::Queue<phantom CREDIT>">;
|
|
61
|
+
export declare const Enqueued: MoveStruct<{
|
|
62
|
+
key: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
63
|
+
account_id: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
64
|
+
recipient: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
65
|
+
amount: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
66
|
+
route_tag: import("@mysten/sui/bcs").BcsType<number, number, "u8">;
|
|
67
|
+
}, "@waterx/withdrawal-queue::withdrawal_queue::Enqueued<phantom CREDIT>">;
|
|
68
|
+
export declare const ExecutedWormhole: MoveStruct<{
|
|
69
|
+
key: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
70
|
+
evm_destination_chain: import("@mysten/sui/bcs").BcsType<number, number, "u16">;
|
|
71
|
+
amount: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
72
|
+
}, "@waterx/withdrawal-queue::withdrawal_queue::ExecutedWormhole<phantom CREDIT>">;
|
|
73
|
+
export declare const ExecutedNative: MoveStruct<{
|
|
74
|
+
key: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
75
|
+
recipient: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
76
|
+
amount: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
77
|
+
}, "@waterx/withdrawal-queue::withdrawal_queue::ExecutedNative<phantom CREDIT, phantom T>">;
|
|
78
|
+
export declare const EntryCancelled: MoveStruct<{
|
|
79
|
+
key: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
80
|
+
account_id: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
81
|
+
amount: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
82
|
+
route_tag: import("@mysten/sui/bcs").BcsType<number, number, "u8">;
|
|
83
|
+
}, "@waterx/withdrawal-queue::withdrawal_queue::EntryCancelled<phantom CREDIT>">;
|
|
84
|
+
export declare const ExecutorUpdated: MoveStruct<{
|
|
85
|
+
executor: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
86
|
+
added: import("@mysten/sui/bcs").BcsType<boolean, boolean, "bool">;
|
|
87
|
+
}, "@waterx/withdrawal-queue::withdrawal_queue::ExecutorUpdated<phantom CREDIT>">;
|
|
88
|
+
export interface PackageVersionOptions {
|
|
89
|
+
package?: string;
|
|
90
|
+
arguments?: [
|
|
91
|
+
];
|
|
92
|
+
}
|
|
93
|
+
export declare function packageVersion(options?: PackageVersionOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
94
|
+
export interface RouteWormholeArguments {
|
|
95
|
+
evmDestinationChain: RawTransactionArgument<number>;
|
|
96
|
+
evmRecipient: RawTransactionArgument<number[]>;
|
|
97
|
+
evmToken: RawTransactionArgument<number[]>;
|
|
98
|
+
}
|
|
99
|
+
export interface RouteWormholeOptions {
|
|
100
|
+
package?: string;
|
|
101
|
+
arguments: RouteWormholeArguments | [
|
|
102
|
+
evmDestinationChain: RawTransactionArgument<number>,
|
|
103
|
+
evmRecipient: RawTransactionArgument<number[]>,
|
|
104
|
+
evmToken: RawTransactionArgument<number[]>
|
|
105
|
+
];
|
|
106
|
+
}
|
|
107
|
+
/** User helper: encode a Wormhole-bound route as `extra_data` bytes. */
|
|
108
|
+
export declare function routeWormhole(options: RouteWormholeOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
109
|
+
export interface RouteNativeOptions {
|
|
110
|
+
package?: string;
|
|
111
|
+
arguments?: [
|
|
112
|
+
];
|
|
113
|
+
typeArguments: [
|
|
114
|
+
string
|
|
115
|
+
];
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* User helper: encode a Native-bound route as `extra_data` bytes. `T` is the
|
|
119
|
+
* backing asset of the destination `SingleVault<T>`.
|
|
120
|
+
*/
|
|
121
|
+
export declare function routeNative(options: RouteNativeOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
122
|
+
export interface CreateQueueArguments {
|
|
123
|
+
_: RawTransactionArgument<string>;
|
|
124
|
+
}
|
|
125
|
+
export interface CreateQueueOptions {
|
|
126
|
+
package?: string;
|
|
127
|
+
arguments: CreateQueueArguments | [
|
|
128
|
+
_: RawTransactionArgument<string>
|
|
129
|
+
];
|
|
130
|
+
typeArguments: [
|
|
131
|
+
string
|
|
132
|
+
];
|
|
133
|
+
}
|
|
134
|
+
/** Create + share a `Queue<CREDIT>`. Call once per credit type. */
|
|
135
|
+
export declare function createQueue(options: CreateQueueOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
136
|
+
export interface AddExecutorArguments {
|
|
137
|
+
queue: RawTransactionArgument<string>;
|
|
138
|
+
_: RawTransactionArgument<string>;
|
|
139
|
+
executor: RawTransactionArgument<string>;
|
|
140
|
+
}
|
|
141
|
+
export interface AddExecutorOptions {
|
|
142
|
+
package?: string;
|
|
143
|
+
arguments: AddExecutorArguments | [
|
|
144
|
+
queue: RawTransactionArgument<string>,
|
|
145
|
+
_: RawTransactionArgument<string>,
|
|
146
|
+
executor: RawTransactionArgument<string>
|
|
147
|
+
];
|
|
148
|
+
typeArguments: [
|
|
149
|
+
string
|
|
150
|
+
];
|
|
151
|
+
}
|
|
152
|
+
export declare function addExecutor(options: AddExecutorOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
153
|
+
export interface RemoveExecutorArguments {
|
|
154
|
+
queue: RawTransactionArgument<string>;
|
|
155
|
+
_: RawTransactionArgument<string>;
|
|
156
|
+
executor: RawTransactionArgument<string>;
|
|
157
|
+
}
|
|
158
|
+
export interface RemoveExecutorOptions {
|
|
159
|
+
package?: string;
|
|
160
|
+
arguments: RemoveExecutorArguments | [
|
|
161
|
+
queue: RawTransactionArgument<string>,
|
|
162
|
+
_: RawTransactionArgument<string>,
|
|
163
|
+
executor: RawTransactionArgument<string>
|
|
164
|
+
];
|
|
165
|
+
typeArguments: [
|
|
166
|
+
string
|
|
167
|
+
];
|
|
168
|
+
}
|
|
169
|
+
export declare function removeExecutor(options: RemoveExecutorOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
170
|
+
export interface IsExecutorArguments {
|
|
171
|
+
queue: RawTransactionArgument<string>;
|
|
172
|
+
executor: RawTransactionArgument<string>;
|
|
173
|
+
}
|
|
174
|
+
export interface IsExecutorOptions {
|
|
175
|
+
package?: string;
|
|
176
|
+
arguments: IsExecutorArguments | [
|
|
177
|
+
queue: RawTransactionArgument<string>,
|
|
178
|
+
executor: RawTransactionArgument<string>
|
|
179
|
+
];
|
|
180
|
+
typeArguments: [
|
|
181
|
+
string
|
|
182
|
+
];
|
|
183
|
+
}
|
|
184
|
+
export declare function isExecutor(options: IsExecutorOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
185
|
+
export interface AddVersionArguments {
|
|
186
|
+
queue: RawTransactionArgument<string>;
|
|
187
|
+
_: RawTransactionArgument<string>;
|
|
188
|
+
version: RawTransactionArgument<number>;
|
|
189
|
+
}
|
|
190
|
+
export interface AddVersionOptions {
|
|
191
|
+
package?: string;
|
|
192
|
+
arguments: AddVersionArguments | [
|
|
193
|
+
queue: RawTransactionArgument<string>,
|
|
194
|
+
_: RawTransactionArgument<string>,
|
|
195
|
+
version: RawTransactionArgument<number>
|
|
196
|
+
];
|
|
197
|
+
typeArguments: [
|
|
198
|
+
string
|
|
199
|
+
];
|
|
200
|
+
}
|
|
201
|
+
/**
|
|
202
|
+
* Admin: whitelist a package version. New deployments add their own version here
|
|
203
|
+
* before the upgrade so in-flight calls don't abort during the rollover window.
|
|
204
|
+
* Skips the version check itself so admin can recover from a stuck state.
|
|
205
|
+
*/
|
|
206
|
+
export declare function addVersion(options: AddVersionOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
207
|
+
export interface RemoveVersionArguments {
|
|
208
|
+
queue: RawTransactionArgument<string>;
|
|
209
|
+
_: RawTransactionArgument<string>;
|
|
210
|
+
version: RawTransactionArgument<number>;
|
|
211
|
+
}
|
|
212
|
+
export interface RemoveVersionOptions {
|
|
213
|
+
package?: string;
|
|
214
|
+
arguments: RemoveVersionArguments | [
|
|
215
|
+
queue: RawTransactionArgument<string>,
|
|
216
|
+
_: RawTransactionArgument<string>,
|
|
217
|
+
version: RawTransactionArgument<number>
|
|
218
|
+
];
|
|
219
|
+
typeArguments: [
|
|
220
|
+
string
|
|
221
|
+
];
|
|
222
|
+
}
|
|
223
|
+
/**
|
|
224
|
+
* Admin: remove a package version from the allowlist. Kill-switches the prior
|
|
225
|
+
* version after an upgrade. Skips the version check itself so admin can recover
|
|
226
|
+
* from a stuck state.
|
|
227
|
+
*/
|
|
228
|
+
export declare function removeVersion(options: RemoveVersionOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
229
|
+
export interface CancelEntryArguments {
|
|
230
|
+
queue: RawTransactionArgument<string>;
|
|
231
|
+
accountRegistry: RawTransactionArgument<string>;
|
|
232
|
+
request: RawTransactionArgument<string>;
|
|
233
|
+
key: RawTransactionArgument<number | bigint>;
|
|
234
|
+
}
|
|
235
|
+
export interface CancelEntryOptions {
|
|
236
|
+
package?: string;
|
|
237
|
+
arguments: CancelEntryArguments | [
|
|
238
|
+
queue: RawTransactionArgument<string>,
|
|
239
|
+
accountRegistry: RawTransactionArgument<string>,
|
|
240
|
+
request: RawTransactionArgument<string>,
|
|
241
|
+
key: RawTransactionArgument<number | bigint>
|
|
242
|
+
];
|
|
243
|
+
typeArguments: [
|
|
244
|
+
string
|
|
245
|
+
];
|
|
246
|
+
}
|
|
247
|
+
/**
|
|
248
|
+
* Refund a parked entry's `Balance<CREDIT>` back to the **originating wxa
|
|
249
|
+
* account** when the entry can no longer be executed — e.g. the `extra_data` body
|
|
250
|
+
* is malformed (handcrafted by the caller instead of via `route_*`), or admin has
|
|
251
|
+
* since `remove_trusted_emitter`'d the destination chain or
|
|
252
|
+
* `set_asset_deprecated`'d the native asset. Without this, such entries
|
|
253
|
+
* permanently lock both the balance and the queue slot (audit finding #5).
|
|
254
|
+
*
|
|
255
|
+
* Auth: either a registered queue keeper (`request.address() ∈ queue.executors`)
|
|
256
|
+
* OR an address authorized on the originating wxa account
|
|
257
|
+
* (`account_registry.is_account_authorized(entry.account_id, caller, now)` —
|
|
258
|
+
* owner or non-expired delegate). The user can self-cancel without waiting for the
|
|
259
|
+
* keeper, and the keeper can clean up stale entries proactively.
|
|
260
|
+
*
|
|
261
|
+
* The refund goes to `Entry.account_id` (the originating wxa account), not
|
|
262
|
+
* `Entry.recipient` (the external destination the user picked) —
|
|
263
|
+
* `request_withdraw<CREDIT>` debited the user's account on enqueue, so the
|
|
264
|
+
* symmetric cancel re-credits that same account. The user can re-issue
|
|
265
|
+
* `request_withdraw` from the restored stored balance once the route is fixed.
|
|
266
|
+
*/
|
|
267
|
+
export declare function cancelEntry(options: CancelEntryOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
268
|
+
export interface EnqueueArguments {
|
|
269
|
+
queue: RawTransactionArgument<string>;
|
|
270
|
+
registry: RawTransactionArgument<string>;
|
|
271
|
+
req: RawTransactionArgument<string>;
|
|
272
|
+
}
|
|
273
|
+
export interface EnqueueOptions {
|
|
274
|
+
package?: string;
|
|
275
|
+
arguments: EnqueueArguments | [
|
|
276
|
+
queue: RawTransactionArgument<string>,
|
|
277
|
+
registry: RawTransactionArgument<string>,
|
|
278
|
+
req: RawTransactionArgument<string>
|
|
279
|
+
];
|
|
280
|
+
typeArguments: [
|
|
281
|
+
string
|
|
282
|
+
];
|
|
283
|
+
}
|
|
284
|
+
/**
|
|
285
|
+
* Consume a `WithdrawRequest<CREDIT>` registered to `WithdrawQueue` and park its
|
|
286
|
+
* balance + extra_data. Returns the assigned key. Aborts with `EUnknownRoute` if
|
|
287
|
+
* `extra_data`'s leading tag byte is not a known route.
|
|
288
|
+
*/
|
|
289
|
+
export declare function enqueue(options: EnqueueOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
290
|
+
export interface ExecuteWormholeArguments {
|
|
291
|
+
queue: RawTransactionArgument<string>;
|
|
292
|
+
key: RawTransactionArgument<number | bigint>;
|
|
293
|
+
request: RawTransactionArgument<string>;
|
|
294
|
+
bridge: RawTransactionArgument<string>;
|
|
295
|
+
creditRegistry: RawTransactionArgument<string>;
|
|
296
|
+
wormholeState: RawTransactionArgument<string>;
|
|
297
|
+
wormholeFee: RawTransactionArgument<string>;
|
|
298
|
+
}
|
|
299
|
+
export interface ExecuteWormholeOptions {
|
|
300
|
+
package?: string;
|
|
301
|
+
arguments: ExecuteWormholeArguments | [
|
|
302
|
+
queue: RawTransactionArgument<string>,
|
|
303
|
+
key: RawTransactionArgument<number | bigint>,
|
|
304
|
+
request: RawTransactionArgument<string>,
|
|
305
|
+
bridge: RawTransactionArgument<string>,
|
|
306
|
+
creditRegistry: RawTransactionArgument<string>,
|
|
307
|
+
wormholeState: RawTransactionArgument<string>,
|
|
308
|
+
wormholeFee: RawTransactionArgument<string>
|
|
309
|
+
];
|
|
310
|
+
typeArguments: [
|
|
311
|
+
string
|
|
312
|
+
];
|
|
313
|
+
}
|
|
314
|
+
/**
|
|
315
|
+
* Execute a queued entry via `wormhole_bridge::burn_for_withdrawal`. Peels the
|
|
316
|
+
* Wormhole route fields out of `extra_data`. Aborts with `ERouteMismatch` if the
|
|
317
|
+
* entry was not Wormhole-routed. `request.address()` must be on the queue's
|
|
318
|
+
* executor allowlist (audit finding #3); the originating `Entry.account_id` is
|
|
319
|
+
* what the burn path uses for cap accounting / withdrawal id.
|
|
320
|
+
*/
|
|
321
|
+
export declare function executeWormhole(options: ExecuteWormholeOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
322
|
+
export interface ExecuteNativeArguments {
|
|
323
|
+
queue: RawTransactionArgument<string>;
|
|
324
|
+
key: RawTransactionArgument<number | bigint>;
|
|
325
|
+
request: RawTransactionArgument<string>;
|
|
326
|
+
vault: RawTransactionArgument<string>;
|
|
327
|
+
creditRegistry: RawTransactionArgument<string>;
|
|
328
|
+
}
|
|
329
|
+
export interface ExecuteNativeOptions {
|
|
330
|
+
package?: string;
|
|
331
|
+
arguments: ExecuteNativeArguments | [
|
|
332
|
+
queue: RawTransactionArgument<string>,
|
|
333
|
+
key: RawTransactionArgument<number | bigint>,
|
|
334
|
+
request: RawTransactionArgument<string>,
|
|
335
|
+
vault: RawTransactionArgument<string>,
|
|
336
|
+
creditRegistry: RawTransactionArgument<string>
|
|
337
|
+
];
|
|
338
|
+
typeArguments: [
|
|
339
|
+
string,
|
|
340
|
+
string
|
|
341
|
+
];
|
|
342
|
+
}
|
|
343
|
+
/**
|
|
344
|
+
* Execute a queued entry via `native_custody::custody_vault::burn<T>`. Verifies
|
|
345
|
+
* that `extra_data` byte-equals `route_native<T>()` — if `T` was not the
|
|
346
|
+
* asset_type the user specified, aborts with `ERouteMismatch`.
|
|
347
|
+
*/
|
|
348
|
+
export declare function executeNative(options: ExecuteNativeOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
349
|
+
export interface LengthArguments {
|
|
350
|
+
queue: RawTransactionArgument<string>;
|
|
351
|
+
}
|
|
352
|
+
export interface LengthOptions {
|
|
353
|
+
package?: string;
|
|
354
|
+
arguments: LengthArguments | [
|
|
355
|
+
queue: RawTransactionArgument<string>
|
|
356
|
+
];
|
|
357
|
+
typeArguments: [
|
|
358
|
+
string
|
|
359
|
+
];
|
|
360
|
+
}
|
|
361
|
+
export declare function length(options: LengthOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
362
|
+
export interface IsEmptyArguments {
|
|
363
|
+
queue: RawTransactionArgument<string>;
|
|
364
|
+
}
|
|
365
|
+
export interface IsEmptyOptions {
|
|
366
|
+
package?: string;
|
|
367
|
+
arguments: IsEmptyArguments | [
|
|
368
|
+
queue: RawTransactionArgument<string>
|
|
369
|
+
];
|
|
370
|
+
typeArguments: [
|
|
371
|
+
string
|
|
372
|
+
];
|
|
373
|
+
}
|
|
374
|
+
export declare function isEmpty(options: IsEmptyOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
375
|
+
export interface FrontArguments {
|
|
376
|
+
queue: RawTransactionArgument<string>;
|
|
377
|
+
}
|
|
378
|
+
export interface FrontOptions {
|
|
379
|
+
package?: string;
|
|
380
|
+
arguments: FrontArguments | [
|
|
381
|
+
queue: RawTransactionArgument<string>
|
|
382
|
+
];
|
|
383
|
+
typeArguments: [
|
|
384
|
+
string
|
|
385
|
+
];
|
|
386
|
+
}
|
|
387
|
+
export declare function front(options: FrontOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
388
|
+
export interface ContainsArguments {
|
|
389
|
+
queue: RawTransactionArgument<string>;
|
|
390
|
+
key: RawTransactionArgument<number | bigint>;
|
|
391
|
+
}
|
|
392
|
+
export interface ContainsOptions {
|
|
393
|
+
package?: string;
|
|
394
|
+
arguments: ContainsArguments | [
|
|
395
|
+
queue: RawTransactionArgument<string>,
|
|
396
|
+
key: RawTransactionArgument<number | bigint>
|
|
397
|
+
];
|
|
398
|
+
typeArguments: [
|
|
399
|
+
string
|
|
400
|
+
];
|
|
401
|
+
}
|
|
402
|
+
export declare function contains(options: ContainsOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
403
|
+
export interface EntryArguments {
|
|
404
|
+
queue: RawTransactionArgument<string>;
|
|
405
|
+
key: RawTransactionArgument<number | bigint>;
|
|
406
|
+
}
|
|
407
|
+
export interface EntryOptions {
|
|
408
|
+
package?: string;
|
|
409
|
+
arguments: EntryArguments | [
|
|
410
|
+
queue: RawTransactionArgument<string>,
|
|
411
|
+
key: RawTransactionArgument<number | bigint>
|
|
412
|
+
];
|
|
413
|
+
typeArguments: [
|
|
414
|
+
string
|
|
415
|
+
];
|
|
416
|
+
}
|
|
417
|
+
export declare function entry(options: EntryOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
418
|
+
export interface EntryAmountArguments {
|
|
419
|
+
entry: RawTransactionArgument<string>;
|
|
420
|
+
}
|
|
421
|
+
export interface EntryAmountOptions {
|
|
422
|
+
package?: string;
|
|
423
|
+
arguments: EntryAmountArguments | [
|
|
424
|
+
entry: RawTransactionArgument<string>
|
|
425
|
+
];
|
|
426
|
+
typeArguments: [
|
|
427
|
+
string
|
|
428
|
+
];
|
|
429
|
+
}
|
|
430
|
+
export declare function entryAmount(options: EntryAmountOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
431
|
+
export interface EntryAccountIdArguments {
|
|
432
|
+
entry: RawTransactionArgument<string>;
|
|
433
|
+
}
|
|
434
|
+
export interface EntryAccountIdOptions {
|
|
435
|
+
package?: string;
|
|
436
|
+
arguments: EntryAccountIdArguments | [
|
|
437
|
+
entry: RawTransactionArgument<string>
|
|
438
|
+
];
|
|
439
|
+
typeArguments: [
|
|
440
|
+
string
|
|
441
|
+
];
|
|
442
|
+
}
|
|
443
|
+
export declare function entryAccountId(options: EntryAccountIdOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
444
|
+
export interface EntryRecipientArguments {
|
|
445
|
+
entry: RawTransactionArgument<string>;
|
|
446
|
+
}
|
|
447
|
+
export interface EntryRecipientOptions {
|
|
448
|
+
package?: string;
|
|
449
|
+
arguments: EntryRecipientArguments | [
|
|
450
|
+
entry: RawTransactionArgument<string>
|
|
451
|
+
];
|
|
452
|
+
typeArguments: [
|
|
453
|
+
string
|
|
454
|
+
];
|
|
455
|
+
}
|
|
456
|
+
export declare function entryRecipient(options: EntryRecipientOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
457
|
+
export interface EntryExtraDataArguments {
|
|
458
|
+
entry: RawTransactionArgument<string>;
|
|
459
|
+
}
|
|
460
|
+
export interface EntryExtraDataOptions {
|
|
461
|
+
package?: string;
|
|
462
|
+
arguments: EntryExtraDataArguments | [
|
|
463
|
+
entry: RawTransactionArgument<string>
|
|
464
|
+
];
|
|
465
|
+
typeArguments: [
|
|
466
|
+
string
|
|
467
|
+
];
|
|
468
|
+
}
|
|
469
|
+
export declare function entryExtraData(options: EntryExtraDataOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
470
|
+
export interface RouteTagArguments {
|
|
471
|
+
extraData: RawTransactionArgument<number[]>;
|
|
472
|
+
}
|
|
473
|
+
export interface RouteTagOptions {
|
|
474
|
+
package?: string;
|
|
475
|
+
arguments: RouteTagArguments | [
|
|
476
|
+
extraData: RawTransactionArgument<number[]>
|
|
477
|
+
];
|
|
478
|
+
}
|
|
479
|
+
/**
|
|
480
|
+
* Returns the leading route tag byte; aborts if `extra_data` is empty or carries
|
|
481
|
+
* an unknown tag.
|
|
482
|
+
*/
|
|
483
|
+
export declare function routeTag(options: RouteTagOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|