@waterx/sdk 2.1.0 → 2.3.1-dev.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/README.md +75 -169
- package/dist/src/client.d.ts +52 -2
- package/dist/src/client.js +76 -6
- package/dist/src/config.d.ts +57 -3
- package/dist/src/config.js +10 -4
- package/dist/src/constants.d.ts +6 -0
- package/dist/src/constants.js +6 -0
- package/dist/src/core/waterx-account.d.ts +31 -0
- package/dist/src/core/waterx-account.js +26 -0
- package/dist/src/fetch.d.ts +110 -0
- package/dist/src/fetch.js +149 -4
- package/dist/src/generated/bucket_v2_framework/account.d.ts +5 -5
- package/dist/src/generated/bucket_v2_framework/double.d.ts +77 -77
- package/dist/src/generated/bucket_v2_framework/float.d.ts +73 -73
- package/dist/src/generated/bucket_v2_framework/liability.d.ts +33 -33
- package/dist/src/generated/bucket_v2_framework/linked_table.d.ts +5 -5
- package/dist/src/generated/bucket_v2_framework/linked_table.js +2 -2
- package/dist/src/generated/bucket_v2_framework/sheet.d.ts +57 -57
- package/dist/src/generated/bucket_v2_framework/sheet.js +5 -11
- package/dist/src/generated/native_custody/custody_vault.d.ts +46 -32
- package/dist/src/generated/native_custody/custody_vault.js +19 -10
- package/dist/src/generated/native_custody/deps/bucket_v2_framework/sheet.js +1 -3
- package/dist/src/generated/native_custody/events.js +1 -2
- package/dist/src/generated/pyth_sponsor_rule/pyth_sponsor_rule.d.ts +7 -7
- package/dist/src/generated/pyth_sponsor_rule/pyth_sponsor_rule.js +1 -2
- package/dist/src/generated/utils/index.d.ts +7 -7
- package/dist/src/generated/utils/index.js +9 -6
- package/dist/src/generated/waterx_account/account.d.ts +124 -71
- package/dist/src/generated/waterx_account/account.js +64 -29
- package/dist/src/generated/waterx_account/deps/bucket_v2_framework/sheet.js +1 -3
- package/dist/src/generated/waterx_account/direct_rule.d.ts +5 -5
- package/dist/src/generated/waterx_account/events.d.ts +10 -0
- package/dist/src/generated/waterx_account/events.js +31 -50
- package/dist/src/generated/waterx_constant_rule/constant_rule.d.ts +68 -0
- package/dist/src/generated/waterx_constant_rule/constant_rule.js +59 -0
- package/dist/src/generated/waterx_constant_rule/deps/bucket_v2_framework/float.d.ts +8 -0
- package/dist/src/generated/waterx_constant_rule/deps/bucket_v2_framework/float.js +10 -0
- package/dist/src/generated/waterx_constant_rule/deps/sui/vec_map.d.ts +36 -0
- package/dist/src/generated/waterx_constant_rule/deps/sui/vec_map.js +27 -0
- package/dist/src/generated/waterx_credit/credit_registry.d.ts +9 -9
- package/dist/src/generated/waterx_credit/credit_registry.js +1 -2
- package/dist/src/generated/waterx_credit/limited_supply.d.ts +17 -17
- package/dist/src/generated/waterx_oracle/aggregator.js +1 -2
- package/dist/src/generated/waterx_oracle/collector.d.ts +17 -17
- package/dist/src/generated/waterx_oracle/collector.js +1 -1
- package/dist/src/generated/waterx_oracle/oracle.d.ts +5 -5
- package/dist/src/generated/waterx_perp/account_data.d.ts +5 -5
- package/dist/src/generated/waterx_perp/account_data.js +1 -2
- package/dist/src/generated/waterx_perp/deps/bucket_v2_framework/sheet.js +1 -3
- package/dist/src/generated/waterx_perp/events.d.ts +181 -181
- package/dist/src/generated/waterx_perp/events.js +87 -173
- package/dist/src/generated/waterx_perp/global_config.d.ts +3 -3
- package/dist/src/generated/waterx_perp/global_config.js +6 -12
- package/dist/src/generated/waterx_perp/keyed_big_vector.d.ts +9 -9
- package/dist/src/generated/waterx_perp/keyed_big_vector.js +1 -2
- package/dist/src/generated/waterx_perp/lp_pool.d.ts +115 -115
- package/dist/src/generated/waterx_perp/lp_pool.js +11 -22
- package/dist/src/generated/waterx_perp/market_config.d.ts +61 -43
- package/dist/src/generated/waterx_perp/market_config.js +29 -22
- package/dist/src/generated/waterx_perp/math.d.ts +7 -7
- package/dist/src/generated/waterx_perp/order_book.d.ts +47 -47
- package/dist/src/generated/waterx_perp/position.d.ts +99 -99
- package/dist/src/generated/waterx_perp/position.js +6 -12
- package/dist/src/generated/waterx_perp/request.d.ts +67 -67
- package/dist/src/generated/waterx_perp/request.js +2 -3
- package/dist/src/generated/waterx_perp/response.d.ts +35 -35
- package/dist/src/generated/waterx_perp/response.js +1 -2
- package/dist/src/generated/waterx_perp/trading.d.ts +303 -179
- package/dist/src/generated/waterx_perp/trading.js +99 -14
- package/dist/src/generated/waterx_perp_view/view.js +5 -10
- package/dist/src/generated/waterx_pyth_rule/pyth_rule.d.ts +5 -5
- package/dist/src/generated/waterx_pyth_rule/pyth_rule.js +1 -2
- package/dist/src/generated/waterx_referral/referral_table.d.ts +5 -5
- package/dist/src/generated/waterx_referral/referral_table.js +1 -2
- package/dist/src/generated/waterx_staking/waterx_staking.d.ts +19 -19
- package/dist/src/generated/waterx_staking/waterx_staking.js +10 -20
- package/dist/src/generated/waterx_supra_rule/deps/sui/vec_map.d.ts +36 -0
- package/dist/src/generated/waterx_supra_rule/deps/sui/vec_map.js +27 -0
- package/dist/src/generated/waterx_supra_rule/supra_rule.d.ts +158 -0
- package/dist/src/generated/waterx_supra_rule/supra_rule.js +148 -0
- package/dist/src/generated/withdrawal_queue/deps/bucket_v2_framework/float.d.ts +8 -0
- package/dist/src/generated/withdrawal_queue/deps/bucket_v2_framework/float.js +10 -0
- package/dist/src/generated/withdrawal_queue/deps/sui/vec_map.d.ts +36 -0
- package/dist/src/generated/withdrawal_queue/deps/sui/vec_map.js +27 -0
- package/dist/src/generated/withdrawal_queue/withdrawal_queue.d.ts +444 -4
- package/dist/src/generated/withdrawal_queue/withdrawal_queue.js +417 -4
- package/dist/src/generated/wormhole_bridge/wormhole_bridge.d.ts +214 -74
- package/dist/src/generated/wormhole_bridge/wormhole_bridge.js +158 -29
- package/dist/src/index.d.ts +4 -3
- package/dist/src/index.js +3 -2
- package/dist/src/prediction/account.d.ts +96 -0
- package/dist/src/prediction/account.js +230 -0
- package/dist/src/prediction/admin.d.ts +47 -0
- package/dist/src/prediction/admin.js +105 -0
- package/dist/src/prediction/bcs.d.ts +22 -0
- package/dist/src/prediction/bcs.js +240 -0
- package/dist/src/prediction/client.d.ts +75 -0
- package/dist/src/prediction/client.js +164 -0
- package/dist/src/prediction/config.d.ts +60 -0
- package/dist/src/prediction/config.js +75 -0
- package/dist/src/prediction/constants.d.ts +44 -0
- package/dist/src/prediction/constants.js +46 -0
- package/dist/src/prediction/fetch.d.ts +82 -0
- package/dist/src/prediction/fetch.js +270 -0
- package/dist/src/prediction/generated/bucket_v2_framework/account.d.ts +100 -0
- package/dist/src/prediction/generated/bucket_v2_framework/account.js +129 -0
- package/dist/src/prediction/generated/bucket_v2_framework/deps/std/type_name.d.ts +6 -0
- package/dist/src/prediction/generated/bucket_v2_framework/deps/std/type_name.js +19 -0
- package/dist/src/prediction/generated/bucket_v2_framework/deps/sui/balance.d.ts +10 -0
- package/dist/src/prediction/generated/bucket_v2_framework/deps/sui/balance.js +14 -0
- package/dist/src/prediction/generated/bucket_v2_framework/deps/sui/vec_map.d.ts +36 -0
- package/dist/src/prediction/generated/bucket_v2_framework/deps/sui/vec_map.js +27 -0
- package/dist/src/prediction/generated/bucket_v2_framework/deps/sui/vec_set.d.ts +16 -0
- package/dist/src/prediction/generated/bucket_v2_framework/deps/sui/vec_set.js +19 -0
- package/dist/src/prediction/generated/bucket_v2_framework/double.d.ts +382 -0
- package/dist/src/prediction/generated/bucket_v2_framework/double.js +466 -0
- package/dist/src/prediction/generated/bucket_v2_framework/float.d.ts +362 -0
- package/dist/src/prediction/generated/bucket_v2_framework/float.js +440 -0
- package/dist/src/prediction/generated/bucket_v2_framework/liability.d.ts +193 -0
- package/dist/src/prediction/generated/bucket_v2_framework/liability.js +205 -0
- package/dist/src/prediction/generated/bucket_v2_framework/linked_table.d.ts +384 -0
- package/dist/src/prediction/generated/bucket_v2_framework/linked_table.js +382 -0
- package/dist/src/prediction/generated/bucket_v2_framework/sheet.d.ts +344 -0
- package/dist/src/prediction/generated/bucket_v2_framework/sheet.js +338 -0
- package/dist/src/prediction/generated/utils/index.d.ts +30 -0
- package/dist/src/prediction/generated/utils/index.js +160 -0
- package/dist/src/prediction/generated/waterx_account/account.d.ts +1589 -0
- package/dist/src/prediction/generated/waterx_account/account.js +1758 -0
- package/dist/src/prediction/generated/waterx_account/deps/bucket_v2_framework/liability.d.ts +7 -0
- package/dist/src/prediction/generated/waterx_account/deps/bucket_v2_framework/liability.js +13 -0
- package/dist/src/prediction/generated/waterx_account/deps/bucket_v2_framework/sheet.d.ts +7 -0
- package/dist/src/prediction/generated/waterx_account/deps/bucket_v2_framework/sheet.js +16 -0
- package/dist/src/prediction/generated/waterx_account/deps/std/type_name.d.ts +6 -0
- package/dist/src/prediction/generated/waterx_account/deps/std/type_name.js +19 -0
- package/dist/src/prediction/generated/waterx_account/deps/sui/balance.d.ts +10 -0
- package/dist/src/prediction/generated/waterx_account/deps/sui/balance.js +14 -0
- package/dist/src/prediction/generated/waterx_account/deps/sui/object_table.d.ts +12 -0
- package/dist/src/prediction/generated/waterx_account/deps/sui/object_table.js +19 -0
- package/dist/src/prediction/generated/waterx_account/deps/sui/table.d.ts +24 -0
- package/dist/src/prediction/generated/waterx_account/deps/sui/table.js +31 -0
- package/dist/src/prediction/generated/waterx_account/deps/sui/vec_map.d.ts +36 -0
- package/dist/src/prediction/generated/waterx_account/deps/sui/vec_map.js +27 -0
- package/dist/src/prediction/generated/waterx_account/deps/sui/vec_set.d.ts +16 -0
- package/dist/src/prediction/generated/waterx_account/deps/sui/vec_set.js +19 -0
- package/dist/src/prediction/generated/waterx_account/direct_rule.d.ts +75 -0
- package/dist/src/prediction/generated/waterx_account/direct_rule.js +78 -0
- package/dist/src/prediction/generated/waterx_account/events.d.ts +33 -0
- package/dist/src/prediction/generated/waterx_account/events.js +137 -0
- package/dist/src/prediction/generated/waterx_account/version.d.ts +10 -0
- package/dist/src/prediction/generated/waterx_account/version.js +8 -0
- package/dist/src/prediction/generated/waterx_prediction/account_data.d.ts +327 -0
- package/dist/src/prediction/generated/waterx_prediction/account_data.js +405 -0
- package/dist/src/prediction/generated/waterx_prediction/admin.d.ts +5 -0
- package/dist/src/prediction/generated/waterx_prediction/admin.js +9 -0
- package/dist/src/prediction/generated/waterx_prediction/bet_sharing.d.ts +60 -0
- package/dist/src/prediction/generated/waterx_prediction/bet_sharing.js +83 -0
- package/dist/src/prediction/generated/waterx_prediction/deps/bucket_v2_framework/linked_table.d.ts +8 -0
- package/dist/src/prediction/generated/waterx_prediction/deps/bucket_v2_framework/linked_table.js +18 -0
- package/dist/src/prediction/generated/waterx_prediction/deps/sui/balance.d.ts +10 -0
- package/dist/src/prediction/generated/waterx_prediction/deps/sui/balance.js +14 -0
- package/dist/src/prediction/generated/waterx_prediction/deps/sui/table.d.ts +24 -0
- package/dist/src/prediction/generated/waterx_prediction/deps/sui/table.js +31 -0
- package/dist/src/prediction/generated/waterx_prediction/deps/sui/vec_set.d.ts +16 -0
- package/dist/src/prediction/generated/waterx_prediction/deps/sui/vec_set.js +19 -0
- package/dist/src/prediction/generated/waterx_prediction/events.d.ts +22 -0
- package/dist/src/prediction/generated/waterx_prediction/events.js +179 -0
- package/dist/src/prediction/generated/waterx_prediction/global_config.d.ts +116 -0
- package/dist/src/prediction/generated/waterx_prediction/global_config.js +141 -0
- package/dist/src/prediction/generated/waterx_prediction/order.d.ts +200 -0
- package/dist/src/prediction/generated/waterx_prediction/order.js +284 -0
- package/dist/src/prediction/generated/waterx_prediction/outcome.d.ts +58 -0
- package/dist/src/prediction/generated/waterx_prediction/outcome.js +73 -0
- package/dist/src/prediction/generated/waterx_prediction/position.d.ts +160 -0
- package/dist/src/prediction/generated/waterx_prediction/position.js +214 -0
- package/dist/src/prediction/generated/waterx_prediction/version.d.ts +10 -0
- package/dist/src/prediction/generated/waterx_prediction/version.js +8 -0
- package/dist/src/prediction/generated/waterx_prediction/view.d.ts +353 -0
- package/dist/src/prediction/generated/waterx_prediction/view.js +432 -0
- package/dist/src/prediction/generated/waterx_prediction/waterx_prediction.d.ts +1698 -0
- package/dist/src/prediction/generated/waterx_prediction/waterx_prediction.js +1733 -0
- package/dist/src/prediction/gift-link.d.ts +6 -0
- package/dist/src/prediction/gift-link.js +5 -0
- package/dist/src/prediction/gift.d.ts +223 -0
- package/dist/src/prediction/gift.js +451 -0
- package/dist/src/prediction/index.d.ts +29 -0
- package/dist/src/prediction/index.js +21 -0
- package/dist/src/prediction/prediction.d.ts +104 -0
- package/dist/src/prediction/prediction.js +317 -0
- package/dist/src/prediction/tx-builders.d.ts +44 -0
- package/dist/src/prediction/tx-builders.js +52 -0
- package/dist/src/prediction/types.d.ts +93 -0
- package/dist/src/prediction/types.js +1 -0
- package/dist/src/prediction/user/account.d.ts +2 -0
- package/dist/src/prediction/user/account.js +1 -0
- package/dist/src/prediction/user/admin.d.ts +6 -0
- package/dist/src/prediction/user/admin.js +3 -0
- package/dist/src/prediction/user/gift.d.ts +2 -0
- package/dist/src/prediction/user/gift.js +1 -0
- package/dist/src/prediction/user/index.d.ts +5 -0
- package/dist/src/prediction/user/index.js +3 -0
- package/dist/src/prediction/user/keeper.d.ts +2 -0
- package/dist/src/prediction/user/keeper.js +1 -0
- package/dist/src/prediction/user/order.d.ts +2 -0
- package/dist/src/prediction/user/order.js +1 -0
- package/dist/src/prediction/user/position.d.ts +2 -0
- package/dist/src/prediction/user/position.js +1 -0
- package/dist/src/prediction/utils/bcs.d.ts +1 -0
- package/dist/src/prediction/utils/bcs.js +1 -0
- package/dist/src/prediction/utils/index.d.ts +1 -0
- package/dist/src/prediction/utils/index.js +1 -0
- package/dist/src/prediction/utils.d.ts +30 -0
- package/dist/src/prediction/utils.js +177 -0
- package/dist/src/sdk.d.ts +18 -0
- package/dist/src/sdk.js +17 -0
- package/dist/src/tx-builders.d.ts +54 -0
- package/dist/src/tx-builders.js +141 -0
- package/dist/src/unified-client.d.ts +407 -0
- package/dist/src/unified-client.js +123 -0
- package/dist/src/user/account.d.ts +27 -0
- package/dist/src/user/account.js +34 -8
- package/dist/src/user/credit.d.ts +8 -14
- package/dist/src/user/credit.js +9 -23
- package/dist/src/user/custody.d.ts +4 -18
- package/dist/src/user/custody.js +14 -25
- package/dist/src/utils/consolidate-balance.d.ts +37 -0
- package/dist/src/utils/consolidate-balance.js +89 -0
- package/dist/src/utils/math.d.ts +86 -0
- package/dist/src/utils/math.js +100 -0
- package/dist/src/utils/pyth.d.ts +35 -3
- package/dist/src/utils/pyth.js +145 -14
- package/package.json +129 -34
|
@@ -19,6 +19,13 @@ export declare const NativeRoute: MoveStruct<{
|
|
|
19
19
|
asset_type: MoveStruct<{
|
|
20
20
|
name: import("@mysten/sui/bcs").BcsType<string, string, "string">;
|
|
21
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">;
|
|
22
29
|
}, "@waterx/withdrawal-queue::withdrawal_queue::NativeRoute">;
|
|
23
30
|
export declare const Entry: MoveStruct<{
|
|
24
31
|
balance: MoveStruct<{
|
|
@@ -58,6 +65,63 @@ export declare const Queue: MoveStruct<{
|
|
|
58
65
|
*/
|
|
59
66
|
allowed_versions: MoveStruct<any, any>;
|
|
60
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>">;
|
|
61
125
|
export declare const Enqueued: MoveStruct<{
|
|
62
126
|
key: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
63
127
|
account_id: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
@@ -70,6 +134,12 @@ export declare const ExecutedWormhole: MoveStruct<{
|
|
|
70
134
|
evm_destination_chain: import("@mysten/sui/bcs").BcsType<number, number, "u16">;
|
|
71
135
|
amount: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
72
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>">;
|
|
73
143
|
export declare const ExecutedNative: MoveStruct<{
|
|
74
144
|
key: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
75
145
|
recipient: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
@@ -106,9 +176,13 @@ export interface RouteWormholeOptions {
|
|
|
106
176
|
}
|
|
107
177
|
/** User helper: encode a Wormhole-bound route as `extra_data` bytes. */
|
|
108
178
|
export declare function routeWormhole(options: RouteWormholeOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
179
|
+
export interface RouteNativeArguments {
|
|
180
|
+
minOutput: RawTransactionArgument<number | bigint>;
|
|
181
|
+
}
|
|
109
182
|
export interface RouteNativeOptions {
|
|
110
183
|
package?: string;
|
|
111
|
-
arguments
|
|
184
|
+
arguments: RouteNativeArguments | [
|
|
185
|
+
minOutput: RawTransactionArgument<number | bigint>
|
|
112
186
|
];
|
|
113
187
|
typeArguments: [
|
|
114
188
|
string
|
|
@@ -116,7 +190,10 @@ export interface RouteNativeOptions {
|
|
|
116
190
|
}
|
|
117
191
|
/**
|
|
118
192
|
* User helper: encode a Native-bound route as `extra_data` bytes. `T` is the
|
|
119
|
-
* backing asset of the destination `SingleVault<T>`.
|
|
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.
|
|
120
197
|
*/
|
|
121
198
|
export declare function routeNative(options: RouteNativeOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
122
199
|
export interface CreateQueueArguments {
|
|
@@ -226,6 +303,166 @@ export interface RemoveVersionOptions {
|
|
|
226
303
|
* from a stuck state.
|
|
227
304
|
*/
|
|
228
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;
|
|
229
466
|
export interface CancelEntryArguments {
|
|
230
467
|
queue: RawTransactionArgument<string>;
|
|
231
468
|
accountRegistry: RawTransactionArgument<string>;
|
|
@@ -341,8 +578,8 @@ export interface ExecuteNativeOptions {
|
|
|
341
578
|
];
|
|
342
579
|
}
|
|
343
580
|
/**
|
|
344
|
-
* Execute a queued entry via `native_custody::custody_vault::burn<T>`.
|
|
345
|
-
*
|
|
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
|
|
346
583
|
* asset_type the user specified, aborts with `ERouteMismatch`.
|
|
347
584
|
*/
|
|
348
585
|
export declare function executeNative(options: ExecuteNativeOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
@@ -481,3 +718,206 @@ export interface RouteTagOptions {
|
|
|
481
718
|
* an unknown tag.
|
|
482
719
|
*/
|
|
483
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;
|