@layerzerolabs/lz-aptos-sdk-v1 3.0.112 → 3.0.113-aptos.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.
Files changed (32) hide show
  1. package/deployments/aptos-sandbox-local/Common.json +1 -1
  2. package/deployments/aptos-sandbox-local/Endpoint.json +1 -1
  3. package/deployments/aptos-sandbox-local/ExecutorAuth.json +1 -1
  4. package/deployments/aptos-sandbox-local/ExecutorExt.json +1 -1
  5. package/deployments/aptos-sandbox-local/ExecutorV2.json +2 -2
  6. package/deployments/aptos-sandbox-local/MsgLibV1.json +1 -1
  7. package/deployments/aptos-sandbox-local/MsgLibV2.json +1 -1
  8. package/deployments/aptos-sandbox-local/MsgLibV21.json +1 -1
  9. package/deployments/aptos-sandbox-local/MsgLibV3.json +1 -1
  10. package/deployments/aptos-sandbox-local/MsglibAuth.json +1 -1
  11. package/deployments/aptos-sandbox-local/Zro.json +1 -1
  12. package/deployments/aptos-sandbox-local/airdrop_wrapper.json +1 -1
  13. package/deployments/aptos-sandbox-local/executor_fee_lib_router_v1.json +1 -1
  14. package/deployments/aptos-sandbox-local/executor_fee_lib_router_v2.json +2 -2
  15. package/deployments/aptos-sandbox-local/executor_fee_lib_router_v3.json +12 -0
  16. package/deployments/aptos-sandbox-local/executor_fee_lib_v1.json +12 -0
  17. package/deployments/aptos-sandbox-local/executor_v2_fee_lib_router_v1.json +12 -0
  18. package/deployments/aptos-sandbox-local/executor_v2_fee_lib_router_v2.json +12 -0
  19. package/deployments/aptos-sandbox-local/fa_converter.json +1 -1
  20. package/deployments/aptos-sandbox-local/layerzero_view.json +1 -1
  21. package/deployments/aptos-sandbox-local/layerzero_view_uln301.json +1 -1
  22. package/deployments/aptos-sandbox-local/msglib_routing_helper.json +1 -1
  23. package/deployments/aptos-sandbox-local/packet_converter.json +1 -1
  24. package/deployments/aptos-sandbox-local/uln_301.json +1 -1
  25. package/deployments/aptos-sandbox-local/uln_301_receive_helper.json +1 -1
  26. package/dist/index.cjs +50 -6
  27. package/dist/index.cjs.map +1 -1
  28. package/dist/index.d.cts +32 -4
  29. package/dist/index.d.ts +32 -4
  30. package/dist/index.mjs +50 -6
  31. package/dist/index.mjs.map +1 -1
  32. package/package.json +8 -8
package/dist/index.d.cts CHANGED
@@ -797,6 +797,22 @@ declare class ExecutorConfig {
797
797
  setDefaultExecutorPayload(remoteChainId: aptos.BCS.Uint16, version: aptos.BCS.Uint8, executor: aptos.MaybeHexString): aptos.Types.EntryFunctionPayload;
798
798
  }
799
799
 
800
+ declare class ExecutorV2 {
801
+ private sdk;
802
+ /**
803
+ * The module name.
804
+ */
805
+ readonly module: string;
806
+ readonly type: string;
807
+ /**
808
+ * Creates an instance of the UlnReceive class.
809
+ *
810
+ * @param {SDK} sdk - The SDK instance.
811
+ */
812
+ constructor(sdk: SDK);
813
+ quoteFee(uaAddress: string, executorAddress: string, dstChainId: bigint, adapterParams: Uint8Array): Promise<aptos.BCS.Uint64>;
814
+ }
815
+
800
816
  declare class MsgLib {
801
817
  private sdk;
802
818
  /**
@@ -1902,6 +1918,11 @@ declare class Layerzero {
1902
1918
  * @see {@link Executor}
1903
1919
  */
1904
1920
  Executor: Executor;
1921
+ /**
1922
+ * The ExecutorV2 instance.
1923
+ * @see {@link ExecutorV2}
1924
+ */
1925
+ ExecutorV2: ExecutorV2;
1905
1926
  /**
1906
1927
  * The Endpoint instance.
1907
1928
  * @see {@link Endpoint}
@@ -2019,6 +2040,9 @@ declare const EXECUTOR_EXT_ADDRESS: {
2019
2040
  declare const EXECUTOR_V2_ADDRESS: {
2020
2041
  [stage in Stage]?: string;
2021
2042
  };
2043
+ declare const EXECUTOR_FEE_LIB_V1_ADDRESS: {
2044
+ [stage in Stage]?: string;
2045
+ };
2022
2046
  /**
2023
2047
  * Layerzero apps public keys for different stages.
2024
2048
  */
@@ -2065,6 +2089,7 @@ declare const constants_AIRDROP_WRAPPER_ADDRESS: typeof AIRDROP_WRAPPER_ADDRESS;
2065
2089
  declare const constants_COUNTER_ADDRESS: typeof COUNTER_ADDRESS;
2066
2090
  declare const constants_EXECUTOR_ADDRESS: typeof EXECUTOR_ADDRESS;
2067
2091
  declare const constants_EXECUTOR_EXT_ADDRESS: typeof EXECUTOR_EXT_ADDRESS;
2092
+ declare const constants_EXECUTOR_FEE_LIB_V1_ADDRESS: typeof EXECUTOR_FEE_LIB_V1_ADDRESS;
2068
2093
  declare const constants_EXECUTOR_V2_ADDRESS: typeof EXECUTOR_V2_ADDRESS;
2069
2094
  declare const constants_FAUCET_URL: typeof FAUCET_URL;
2070
2095
  declare const constants_LAYERZERO_ADDRESS: typeof LAYERZERO_ADDRESS;
@@ -2081,7 +2106,7 @@ declare const constants_AIRDROP_WRAPPER_ADDRESS: typeof AIRDROP_WRAPPER_ADDRESS;
2081
2106
  declare const constants_ULN_301_ADDRESS: typeof ULN_301_ADDRESS;
2082
2107
  declare const constants_ULN_301_RECEIVE_HELPER_ADDRESS: typeof ULN_301_RECEIVE_HELPER_ADDRESS;
2083
2108
  declare namespace constants {
2084
- export { constants_AIRDROP_WRAPPER_ADDRESS as AIRDROP_WRAPPER_ADDRESS, constants_BRIDGE_ADDRESS as BRIDGE_ADDRESS, constants_BRIDGE_PRECRIME_ADDRESS as BRIDGE_PRECRIME_ADDRESS, constants_COUNTER_ADDRESS as COUNTER_ADDRESS, constants_EXECUTOR_ADDRESS as EXECUTOR_ADDRESS, constants_EXECUTOR_EXT_ADDRESS as EXECUTOR_EXT_ADDRESS, constants_EXECUTOR_V2_ADDRESS as EXECUTOR_V2_ADDRESS, constants_FAUCET_URL as FAUCET_URL, constants_LAYERZERO_ADDRESS as LAYERZERO_ADDRESS, constants_LAYERZERO_APPS_ADDRESS as LAYERZERO_APPS_ADDRESS, constants_LAYERZERO_APPS_PUBKEY as LAYERZERO_APPS_PUBKEY, constants_LAYERZERO_VIEW_ADDRESS as LAYERZERO_VIEW_ADDRESS, constants_LAYERZERO_VIEW_ULN301_ADDRESS as LAYERZERO_VIEW_ULN301_ADDRESS, constants_MSGLIB_ROUTING_HELPER_ADDRESS as MSGLIB_ROUTING_HELPER_ADDRESS, constants_NODE_URL as NODE_URL, constants_OFT_PRECRIME_ADDRESS as OFT_PRECRIME_ADDRESS, constants_ORACLE_ADDRESS as ORACLE_ADDRESS, constants_ORACLE_SIGNER_ADDRESS as ORACLE_SIGNER_ADDRESS, constants_RELAYER_SIGNER_ADDRESS as RELAYER_SIGNER_ADDRESS, constants_ULN_301_ADDRESS as ULN_301_ADDRESS, constants_ULN_301_RECEIVE_HELPER_ADDRESS as ULN_301_RECEIVE_HELPER_ADDRESS };
2109
+ export { constants_AIRDROP_WRAPPER_ADDRESS as AIRDROP_WRAPPER_ADDRESS, constants_BRIDGE_ADDRESS as BRIDGE_ADDRESS, constants_BRIDGE_PRECRIME_ADDRESS as BRIDGE_PRECRIME_ADDRESS, constants_COUNTER_ADDRESS as COUNTER_ADDRESS, constants_EXECUTOR_ADDRESS as EXECUTOR_ADDRESS, constants_EXECUTOR_EXT_ADDRESS as EXECUTOR_EXT_ADDRESS, constants_EXECUTOR_FEE_LIB_V1_ADDRESS as EXECUTOR_FEE_LIB_V1_ADDRESS, constants_EXECUTOR_V2_ADDRESS as EXECUTOR_V2_ADDRESS, constants_FAUCET_URL as FAUCET_URL, constants_LAYERZERO_ADDRESS as LAYERZERO_ADDRESS, constants_LAYERZERO_APPS_ADDRESS as LAYERZERO_APPS_ADDRESS, constants_LAYERZERO_APPS_PUBKEY as LAYERZERO_APPS_PUBKEY, constants_LAYERZERO_VIEW_ADDRESS as LAYERZERO_VIEW_ADDRESS, constants_LAYERZERO_VIEW_ULN301_ADDRESS as LAYERZERO_VIEW_ULN301_ADDRESS, constants_MSGLIB_ROUTING_HELPER_ADDRESS as MSGLIB_ROUTING_HELPER_ADDRESS, constants_NODE_URL as NODE_URL, constants_OFT_PRECRIME_ADDRESS as OFT_PRECRIME_ADDRESS, constants_ORACLE_ADDRESS as ORACLE_ADDRESS, constants_ORACLE_SIGNER_ADDRESS as ORACLE_SIGNER_ADDRESS, constants_RELAYER_SIGNER_ADDRESS as RELAYER_SIGNER_ADDRESS, constants_ULN_301_ADDRESS as ULN_301_ADDRESS, constants_ULN_301_RECEIVE_HELPER_ADDRESS as ULN_301_RECEIVE_HELPER_ADDRESS };
2085
2110
  }
2086
2111
 
2087
2112
  /**
@@ -2761,9 +2786,10 @@ declare class Counter {
2761
2786
  * @param {aptos.BCS.Uint16} remoteChainId - The remote chain ID.
2762
2787
  * @param {aptos.BCS.Uint64 | aptos.BCS.Uint32} fee - The fee amount.
2763
2788
  * @param {Uint8Array} adapterParams - The adapter parameters.
2789
+ * @param {Uint8Array} msglibParams - The msglib parameters.
2764
2790
  * @returns {aptos.Types.EntryFunctionPayload} The entry function payload.
2765
2791
  */
2766
- sendToRemotePayload(remoteChainId: aptos.BCS.Uint16, fee: aptos.BCS.Uint64 | aptos.BCS.Uint32, adapterParams: Uint8Array): aptos.Types.EntryFunctionPayload;
2792
+ sendToRemotePayload(remoteChainId: aptos.BCS.Uint16, fee: aptos.BCS.Uint64 | aptos.BCS.Uint32, adapterParams: Uint8Array, msglibParams: Uint8Array): aptos.Types.EntryFunctionPayload;
2767
2793
  /**
2768
2794
  * Sends data to a remote chain.
2769
2795
  *
@@ -2771,9 +2797,10 @@ declare class Counter {
2771
2797
  * @param {aptos.BCS.Uint16} remoteChainId - The remote chain ID.
2772
2798
  * @param {aptos.BCS.Uint64 | aptos.BCS.Uint32} fee - The fee amount.
2773
2799
  * @param {Uint8Array} adapterParams - The adapter parameters.
2800
+ * @param {Uint8Array} msglibParams - The msglib parameters.
2774
2801
  * @returns {Promise<aptos.Types.Transaction>} The transaction result.
2775
2802
  */
2776
- sendToRemote(signer: aptos.AptosAccount, remoteChainId: aptos.BCS.Uint16, fee: aptos.BCS.Uint64 | aptos.BCS.Uint32, adapterParams: Uint8Array): Promise<aptos.Types.Transaction>;
2803
+ sendToRemote(signer: aptos.AptosAccount, remoteChainId: aptos.BCS.Uint16, fee: aptos.BCS.Uint64 | aptos.BCS.Uint32, adapterParams: Uint8Array, msglibParams: Uint8Array): Promise<aptos.Types.Transaction>;
2777
2804
  /**
2778
2805
  * Receives data from a remote chain.
2779
2806
  *
@@ -2796,10 +2823,11 @@ declare class Counter {
2796
2823
  *
2797
2824
  * @param {aptos.BCS.Uint16} remoteChainId - The remote chain ID.
2798
2825
  * @param {string} adapterParams - The adapter parameters.
2826
+ * @param {string} msglibParams - The msglib parameters.
2799
2827
  * @param {boolean} payInZro - Whether to pay the fee in ZRO tokens.
2800
2828
  * @returns {Promise<[aptos.BCS.Uint64, aptos.BCS.Uint64]>} A tuple containing the native fee and ZRO fee.
2801
2829
  */
2802
- quoteFee(remoteChainId: aptos.BCS.Uint16, adapterParams: string, payInZro: boolean): Promise<[aptos.BCS.Uint64, aptos.BCS.Uint64]>;
2830
+ quoteFee(remoteChainId: aptos.BCS.Uint16, adapterParams: string, msglibParams: string, payInZro: boolean): Promise<[aptos.BCS.Uint64, aptos.BCS.Uint64]>;
2803
2831
  }
2804
2832
 
2805
2833
  /**
package/dist/index.d.ts CHANGED
@@ -797,6 +797,22 @@ declare class ExecutorConfig {
797
797
  setDefaultExecutorPayload(remoteChainId: aptos.BCS.Uint16, version: aptos.BCS.Uint8, executor: aptos.MaybeHexString): aptos.Types.EntryFunctionPayload;
798
798
  }
799
799
 
800
+ declare class ExecutorV2 {
801
+ private sdk;
802
+ /**
803
+ * The module name.
804
+ */
805
+ readonly module: string;
806
+ readonly type: string;
807
+ /**
808
+ * Creates an instance of the UlnReceive class.
809
+ *
810
+ * @param {SDK} sdk - The SDK instance.
811
+ */
812
+ constructor(sdk: SDK);
813
+ quoteFee(uaAddress: string, executorAddress: string, dstChainId: bigint, adapterParams: Uint8Array): Promise<aptos.BCS.Uint64>;
814
+ }
815
+
800
816
  declare class MsgLib {
801
817
  private sdk;
802
818
  /**
@@ -1902,6 +1918,11 @@ declare class Layerzero {
1902
1918
  * @see {@link Executor}
1903
1919
  */
1904
1920
  Executor: Executor;
1921
+ /**
1922
+ * The ExecutorV2 instance.
1923
+ * @see {@link ExecutorV2}
1924
+ */
1925
+ ExecutorV2: ExecutorV2;
1905
1926
  /**
1906
1927
  * The Endpoint instance.
1907
1928
  * @see {@link Endpoint}
@@ -2019,6 +2040,9 @@ declare const EXECUTOR_EXT_ADDRESS: {
2019
2040
  declare const EXECUTOR_V2_ADDRESS: {
2020
2041
  [stage in Stage]?: string;
2021
2042
  };
2043
+ declare const EXECUTOR_FEE_LIB_V1_ADDRESS: {
2044
+ [stage in Stage]?: string;
2045
+ };
2022
2046
  /**
2023
2047
  * Layerzero apps public keys for different stages.
2024
2048
  */
@@ -2065,6 +2089,7 @@ declare const constants_AIRDROP_WRAPPER_ADDRESS: typeof AIRDROP_WRAPPER_ADDRESS;
2065
2089
  declare const constants_COUNTER_ADDRESS: typeof COUNTER_ADDRESS;
2066
2090
  declare const constants_EXECUTOR_ADDRESS: typeof EXECUTOR_ADDRESS;
2067
2091
  declare const constants_EXECUTOR_EXT_ADDRESS: typeof EXECUTOR_EXT_ADDRESS;
2092
+ declare const constants_EXECUTOR_FEE_LIB_V1_ADDRESS: typeof EXECUTOR_FEE_LIB_V1_ADDRESS;
2068
2093
  declare const constants_EXECUTOR_V2_ADDRESS: typeof EXECUTOR_V2_ADDRESS;
2069
2094
  declare const constants_FAUCET_URL: typeof FAUCET_URL;
2070
2095
  declare const constants_LAYERZERO_ADDRESS: typeof LAYERZERO_ADDRESS;
@@ -2081,7 +2106,7 @@ declare const constants_AIRDROP_WRAPPER_ADDRESS: typeof AIRDROP_WRAPPER_ADDRESS;
2081
2106
  declare const constants_ULN_301_ADDRESS: typeof ULN_301_ADDRESS;
2082
2107
  declare const constants_ULN_301_RECEIVE_HELPER_ADDRESS: typeof ULN_301_RECEIVE_HELPER_ADDRESS;
2083
2108
  declare namespace constants {
2084
- export { constants_AIRDROP_WRAPPER_ADDRESS as AIRDROP_WRAPPER_ADDRESS, constants_BRIDGE_ADDRESS as BRIDGE_ADDRESS, constants_BRIDGE_PRECRIME_ADDRESS as BRIDGE_PRECRIME_ADDRESS, constants_COUNTER_ADDRESS as COUNTER_ADDRESS, constants_EXECUTOR_ADDRESS as EXECUTOR_ADDRESS, constants_EXECUTOR_EXT_ADDRESS as EXECUTOR_EXT_ADDRESS, constants_EXECUTOR_V2_ADDRESS as EXECUTOR_V2_ADDRESS, constants_FAUCET_URL as FAUCET_URL, constants_LAYERZERO_ADDRESS as LAYERZERO_ADDRESS, constants_LAYERZERO_APPS_ADDRESS as LAYERZERO_APPS_ADDRESS, constants_LAYERZERO_APPS_PUBKEY as LAYERZERO_APPS_PUBKEY, constants_LAYERZERO_VIEW_ADDRESS as LAYERZERO_VIEW_ADDRESS, constants_LAYERZERO_VIEW_ULN301_ADDRESS as LAYERZERO_VIEW_ULN301_ADDRESS, constants_MSGLIB_ROUTING_HELPER_ADDRESS as MSGLIB_ROUTING_HELPER_ADDRESS, constants_NODE_URL as NODE_URL, constants_OFT_PRECRIME_ADDRESS as OFT_PRECRIME_ADDRESS, constants_ORACLE_ADDRESS as ORACLE_ADDRESS, constants_ORACLE_SIGNER_ADDRESS as ORACLE_SIGNER_ADDRESS, constants_RELAYER_SIGNER_ADDRESS as RELAYER_SIGNER_ADDRESS, constants_ULN_301_ADDRESS as ULN_301_ADDRESS, constants_ULN_301_RECEIVE_HELPER_ADDRESS as ULN_301_RECEIVE_HELPER_ADDRESS };
2109
+ export { constants_AIRDROP_WRAPPER_ADDRESS as AIRDROP_WRAPPER_ADDRESS, constants_BRIDGE_ADDRESS as BRIDGE_ADDRESS, constants_BRIDGE_PRECRIME_ADDRESS as BRIDGE_PRECRIME_ADDRESS, constants_COUNTER_ADDRESS as COUNTER_ADDRESS, constants_EXECUTOR_ADDRESS as EXECUTOR_ADDRESS, constants_EXECUTOR_EXT_ADDRESS as EXECUTOR_EXT_ADDRESS, constants_EXECUTOR_FEE_LIB_V1_ADDRESS as EXECUTOR_FEE_LIB_V1_ADDRESS, constants_EXECUTOR_V2_ADDRESS as EXECUTOR_V2_ADDRESS, constants_FAUCET_URL as FAUCET_URL, constants_LAYERZERO_ADDRESS as LAYERZERO_ADDRESS, constants_LAYERZERO_APPS_ADDRESS as LAYERZERO_APPS_ADDRESS, constants_LAYERZERO_APPS_PUBKEY as LAYERZERO_APPS_PUBKEY, constants_LAYERZERO_VIEW_ADDRESS as LAYERZERO_VIEW_ADDRESS, constants_LAYERZERO_VIEW_ULN301_ADDRESS as LAYERZERO_VIEW_ULN301_ADDRESS, constants_MSGLIB_ROUTING_HELPER_ADDRESS as MSGLIB_ROUTING_HELPER_ADDRESS, constants_NODE_URL as NODE_URL, constants_OFT_PRECRIME_ADDRESS as OFT_PRECRIME_ADDRESS, constants_ORACLE_ADDRESS as ORACLE_ADDRESS, constants_ORACLE_SIGNER_ADDRESS as ORACLE_SIGNER_ADDRESS, constants_RELAYER_SIGNER_ADDRESS as RELAYER_SIGNER_ADDRESS, constants_ULN_301_ADDRESS as ULN_301_ADDRESS, constants_ULN_301_RECEIVE_HELPER_ADDRESS as ULN_301_RECEIVE_HELPER_ADDRESS };
2085
2110
  }
2086
2111
 
2087
2112
  /**
@@ -2761,9 +2786,10 @@ declare class Counter {
2761
2786
  * @param {aptos.BCS.Uint16} remoteChainId - The remote chain ID.
2762
2787
  * @param {aptos.BCS.Uint64 | aptos.BCS.Uint32} fee - The fee amount.
2763
2788
  * @param {Uint8Array} adapterParams - The adapter parameters.
2789
+ * @param {Uint8Array} msglibParams - The msglib parameters.
2764
2790
  * @returns {aptos.Types.EntryFunctionPayload} The entry function payload.
2765
2791
  */
2766
- sendToRemotePayload(remoteChainId: aptos.BCS.Uint16, fee: aptos.BCS.Uint64 | aptos.BCS.Uint32, adapterParams: Uint8Array): aptos.Types.EntryFunctionPayload;
2792
+ sendToRemotePayload(remoteChainId: aptos.BCS.Uint16, fee: aptos.BCS.Uint64 | aptos.BCS.Uint32, adapterParams: Uint8Array, msglibParams: Uint8Array): aptos.Types.EntryFunctionPayload;
2767
2793
  /**
2768
2794
  * Sends data to a remote chain.
2769
2795
  *
@@ -2771,9 +2797,10 @@ declare class Counter {
2771
2797
  * @param {aptos.BCS.Uint16} remoteChainId - The remote chain ID.
2772
2798
  * @param {aptos.BCS.Uint64 | aptos.BCS.Uint32} fee - The fee amount.
2773
2799
  * @param {Uint8Array} adapterParams - The adapter parameters.
2800
+ * @param {Uint8Array} msglibParams - The msglib parameters.
2774
2801
  * @returns {Promise<aptos.Types.Transaction>} The transaction result.
2775
2802
  */
2776
- sendToRemote(signer: aptos.AptosAccount, remoteChainId: aptos.BCS.Uint16, fee: aptos.BCS.Uint64 | aptos.BCS.Uint32, adapterParams: Uint8Array): Promise<aptos.Types.Transaction>;
2803
+ sendToRemote(signer: aptos.AptosAccount, remoteChainId: aptos.BCS.Uint16, fee: aptos.BCS.Uint64 | aptos.BCS.Uint32, adapterParams: Uint8Array, msglibParams: Uint8Array): Promise<aptos.Types.Transaction>;
2777
2804
  /**
2778
2805
  * Receives data from a remote chain.
2779
2806
  *
@@ -2796,10 +2823,11 @@ declare class Counter {
2796
2823
  *
2797
2824
  * @param {aptos.BCS.Uint16} remoteChainId - The remote chain ID.
2798
2825
  * @param {string} adapterParams - The adapter parameters.
2826
+ * @param {string} msglibParams - The msglib parameters.
2799
2827
  * @param {boolean} payInZro - Whether to pay the fee in ZRO tokens.
2800
2828
  * @returns {Promise<[aptos.BCS.Uint64, aptos.BCS.Uint64]>} A tuple containing the native fee and ZRO fee.
2801
2829
  */
2802
- quoteFee(remoteChainId: aptos.BCS.Uint16, adapterParams: string, payInZro: boolean): Promise<[aptos.BCS.Uint64, aptos.BCS.Uint64]>;
2830
+ quoteFee(remoteChainId: aptos.BCS.Uint16, adapterParams: string, msglibParams: string, payInZro: boolean): Promise<[aptos.BCS.Uint64, aptos.BCS.Uint64]>;
2803
2831
  }
2804
2832
 
2805
2833
  /**
package/dist/index.mjs CHANGED
@@ -25,6 +25,7 @@ __export(constants_exports, {
25
25
  COUNTER_ADDRESS: () => COUNTER_ADDRESS,
26
26
  EXECUTOR_ADDRESS: () => EXECUTOR_ADDRESS,
27
27
  EXECUTOR_EXT_ADDRESS: () => EXECUTOR_EXT_ADDRESS,
28
+ EXECUTOR_FEE_LIB_V1_ADDRESS: () => EXECUTOR_FEE_LIB_V1_ADDRESS,
28
29
  EXECUTOR_V2_ADDRESS: () => EXECUTOR_V2_ADDRESS,
29
30
  FAUCET_URL: () => FAUCET_URL,
30
31
  LAYERZERO_ADDRESS: () => LAYERZERO_ADDRESS,
@@ -124,6 +125,12 @@ var EXECUTOR_V2_ADDRESS = {
124
125
  [Stage.TESTNET]: "0x1759cc0d3161f1eb79f65847d4feb9d1f74fb79014698a23b16b28b9cd4c37e3",
125
126
  [Stage.SANDBOX]: "0xf2e1e034475dc0439487dd09dfc3950c462f731599e53a6b015dd85502352e68"
126
127
  };
128
+ var EXECUTOR_FEE_LIB_V1_ADDRESS = {
129
+ [Stage.MAINNET]: "",
130
+ // MAINNET
131
+ [Stage.TESTNET]: "",
132
+ [Stage.SANDBOX]: "0x53268a3c075dbe2518b60b5e6f9f8a4df7433f48cd350375538c5f5205d7b6b3"
133
+ };
127
134
  var LAYERZERO_APPS_PUBKEY = {
128
135
  [Stage.MAINNET]: "0xf57e5a95ae0e2b5f999ac14abd0ff73daf64e6e7e2a1fad024f2e44422e88d76",
129
136
  // MAINNET
@@ -3110,6 +3117,34 @@ var ExecutorConfig = class {
3110
3117
  };
3111
3118
  }
3112
3119
  };
3120
+
3121
+ // src/modules/executor_v2.ts
3122
+ var ExecutorV2 = class {
3123
+ /**
3124
+ * Creates an instance of the UlnReceive class.
3125
+ *
3126
+ * @param {SDK} sdk - The SDK instance.
3127
+ */
3128
+ constructor(sdk) {
3129
+ this.sdk = sdk;
3130
+ this.module = `${sdk.accounts.executor_v2}::executor_v2`;
3131
+ this.type = `${this.module}::Executor`;
3132
+ }
3133
+ /**
3134
+ * The module name.
3135
+ */
3136
+ module;
3137
+ type;
3138
+ async quoteFee(uaAddress, executorAddress, dstChainId, adapterParams) {
3139
+ const payload = {
3140
+ function: `${this.module}::quote_fee`,
3141
+ type_arguments: [],
3142
+ arguments: [uaAddress, executorAddress, dstChainId, adapterParams]
3143
+ };
3144
+ const ret = await this.sdk.client.view(payload);
3145
+ return ret[0];
3146
+ }
3147
+ };
3113
3148
  var MsgLib = class {
3114
3149
  /**
3115
3150
  * Creates an instance of the MsgLib class.
@@ -4660,6 +4695,11 @@ var Layerzero = class {
4660
4695
  * @see {@link Executor}
4661
4696
  */
4662
4697
  Executor;
4698
+ /**
4699
+ * The ExecutorV2 instance.
4700
+ * @see {@link ExecutorV2}
4701
+ */
4702
+ ExecutorV2;
4663
4703
  /**
4664
4704
  * The Endpoint instance.
4665
4705
  * @see {@link Endpoint}
@@ -4708,6 +4748,7 @@ var Layerzero = class {
4708
4748
  constructor(sdk) {
4709
4749
  this.Channel = new Channel(sdk);
4710
4750
  this.Executor = new Executor(sdk);
4751
+ this.ExecutorV2 = new ExecutorV2(sdk);
4711
4752
  this.Endpoint = new Endpoint(sdk);
4712
4753
  this.MsgLibConfig = new MsgLibConfig(sdk);
4713
4754
  this.MsgLibAuth = new MsgLibAuth(sdk);
@@ -6108,13 +6149,14 @@ var Counter = class {
6108
6149
  * @param {aptos.BCS.Uint16} remoteChainId - The remote chain ID.
6109
6150
  * @param {aptos.BCS.Uint64 | aptos.BCS.Uint32} fee - The fee amount.
6110
6151
  * @param {Uint8Array} adapterParams - The adapter parameters.
6152
+ * @param {Uint8Array} msglibParams - The msglib parameters.
6111
6153
  * @returns {aptos.Types.EntryFunctionPayload} The entry function payload.
6112
6154
  */
6113
- sendToRemotePayload(remoteChainId, fee, adapterParams) {
6155
+ sendToRemotePayload(remoteChainId, fee, adapterParams, msglibParams) {
6114
6156
  const result = {
6115
6157
  function: `${this.address}::counter::send_to_remote`,
6116
6158
  type_arguments: [],
6117
- arguments: [remoteChainId, fee, Array.from(adapterParams)]
6159
+ arguments: [remoteChainId, fee, Array.from(adapterParams), Array.from(msglibParams)]
6118
6160
  };
6119
6161
  return result;
6120
6162
  }
@@ -6125,13 +6167,14 @@ var Counter = class {
6125
6167
  * @param {aptos.BCS.Uint16} remoteChainId - The remote chain ID.
6126
6168
  * @param {aptos.BCS.Uint64 | aptos.BCS.Uint32} fee - The fee amount.
6127
6169
  * @param {Uint8Array} adapterParams - The adapter parameters.
6170
+ * @param {Uint8Array} msglibParams - The msglib parameters.
6128
6171
  * @returns {Promise<aptos.Types.Transaction>} The transaction result.
6129
6172
  */
6130
- async sendToRemote(signer, remoteChainId, fee, adapterParams) {
6173
+ async sendToRemote(signer, remoteChainId, fee, adapterParams, msglibParams) {
6131
6174
  const transaction = {
6132
6175
  function: `${this.address}::counter::send_to_remote`,
6133
6176
  type_arguments: [],
6134
- arguments: [remoteChainId, fee, Array.from(adapterParams)]
6177
+ arguments: [remoteChainId, fee, Array.from(adapterParams), Array.from(msglibParams)]
6135
6178
  };
6136
6179
  return this.sdk.sendAndConfirmTransaction(signer, transaction);
6137
6180
  }
@@ -6175,14 +6218,15 @@ var Counter = class {
6175
6218
  *
6176
6219
  * @param {aptos.BCS.Uint16} remoteChainId - The remote chain ID.
6177
6220
  * @param {string} adapterParams - The adapter parameters.
6221
+ * @param {string} msglibParams - The msglib parameters.
6178
6222
  * @param {boolean} payInZro - Whether to pay the fee in ZRO tokens.
6179
6223
  * @returns {Promise<[aptos.BCS.Uint64, aptos.BCS.Uint64]>} A tuple containing the native fee and ZRO fee.
6180
6224
  */
6181
- async quoteFee(remoteChainId, adapterParams, payInZro) {
6225
+ async quoteFee(remoteChainId, adapterParams, msglibParams, payInZro) {
6182
6226
  const payload = {
6183
6227
  function: `${this.address}::counter::quote_fee`,
6184
6228
  type_arguments: [],
6185
- arguments: [remoteChainId.toString(), adapterParams, payInZro]
6229
+ arguments: [remoteChainId.toString(), adapterParams, msglibParams, payInZro]
6186
6230
  };
6187
6231
  const view = await this.sdk.viewFunction(payload);
6188
6232
  return view[0];