@layerzerolabs/lz-movevm-sdk-v2 3.0.113 → 3.0.115

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/CHANGELOG.md CHANGED
@@ -1,5 +1,29 @@
1
1
  # @layerzerolabs/lz-movevm-sdk-v2
2
2
 
3
+ ## 3.0.115
4
+
5
+ ### Patch Changes
6
+
7
+ - 4e463b5: humanity endpoint
8
+ - Updated dependencies [4e463b5]
9
+ - @layerzerolabs/lz-definitions@3.0.115
10
+ - @layerzerolabs/lz-serdes@3.0.115
11
+ - @layerzerolabs/lz-utilities@3.0.115
12
+ - @layerzerolabs/lz-v2-utilities@3.0.115
13
+ - @layerzerolabs/move-definitions@3.0.115
14
+
15
+ ## 3.0.114
16
+
17
+ ### Patch Changes
18
+
19
+ - 327bf23: Publish new official packages at 18 July 2025 by yadong
20
+ - Updated dependencies [327bf23]
21
+ - @layerzerolabs/lz-definitions@3.0.114
22
+ - @layerzerolabs/lz-serdes@3.0.114
23
+ - @layerzerolabs/lz-utilities@3.0.114
24
+ - @layerzerolabs/lz-v2-utilities@3.0.114
25
+ - @layerzerolabs/move-definitions@3.0.114
26
+
3
27
  ## 3.0.113
4
28
 
5
29
  ### Patch Changes
package/dist/index.cjs CHANGED
@@ -1615,6 +1615,7 @@ var EndpointCommon = class {
1615
1615
  return view[0];
1616
1616
  }
1617
1617
  };
1618
+ var EAPTOS_V1_EXECUTOR_V2_FEE_LIB_NOT_FOUND = 1;
1618
1619
  var EEXECUTOR_DST_EID_NOT_CONFIGURED2 = 5;
1619
1620
  var EWORKER_NOT_REGISTERED2 = 16;
1620
1621
  var Executor = class {
@@ -1783,6 +1784,22 @@ var Executor = class {
1783
1784
  }
1784
1785
  throw new Error("Only supported object deployment");
1785
1786
  }
1787
+ async createRegisterAptosV1ExecutorV2Payload(aptosV1ExecutorV2Address, aptosV1ExecutorFeeLibAddress) {
1788
+ if (await this.sdk.isObjectAddress(this.module[0])) {
1789
+ const functionIdOrBytecode = registerAptosV1ExecutorV2ScriptHex(
1790
+ this.sdk.accounts.deploy_to_object,
1791
+ aptosV1ExecutorV2Address
1792
+ );
1793
+ const functionArguments = [this.module[0], aptosV1ExecutorFeeLibAddress];
1794
+ const functionArgumentTypes = ["address", "address"];
1795
+ return {
1796
+ function: functionIdOrBytecode,
1797
+ functionArguments,
1798
+ functionArgumentTypes
1799
+ };
1800
+ }
1801
+ throw new Error("Only supported object deployment");
1802
+ }
1786
1803
  /**
1787
1804
  * Gets the opt in/out status of a worker
1788
1805
  * @param uln301Address - The ULN 301 address
@@ -1796,6 +1813,21 @@ var Executor = class {
1796
1813
  });
1797
1814
  return view[0];
1798
1815
  }
1816
+ async getAptosV1ExecutorV2FeeLibrary(aptosV1ExecutorV2Address) {
1817
+ try {
1818
+ const view = await this.sdk.viewFunction({
1819
+ functionName: `${aptosV1ExecutorV2Address}::executor_fee_lib_config::get_executor_fee_lib`,
1820
+ functionArgs: [this.module[0]],
1821
+ functionArgTypes: ["address"]
1822
+ });
1823
+ return view[0];
1824
+ } catch (e) {
1825
+ if (e instanceof moveDefinitions.MoveAbortError && e.abortCode === EAPTOS_V1_EXECUTOR_V2_FEE_LIB_NOT_FOUND) {
1826
+ return "";
1827
+ }
1828
+ throw e;
1829
+ }
1830
+ }
1799
1831
  /**
1800
1832
  * Gets the destination configuration for the specified endpoint.
1801
1833
  *
@@ -2244,6 +2276,11 @@ var setWorkerConfigForFeeLibRoutingOptInForUln301ScriptHex2 = (deployerAddressHe
2244
2276
  uln301AddressHex = lzV2Utilities.trim0x(lzUtilities.padify(uln301AddressHex));
2245
2277
  return `a11ceb0b060000000501000403040a050e0b071962087b40000001010102000100000303020002060c05010c0002060c01066d73676c6962166f626a6563745f636f64655f6465706c6f796d656e74166765745f636f64655f6f626a6563745f7369676e65722c7365745f776f726b65725f636f6e6669675f666f725f6665655f6c69625f726f7574696e675f6f70745f696e${uln301AddressHex}${deployerAddressHex}000001080b000b0111000c020e0208110102`;
2246
2278
  };
2279
+ var registerAptosV1ExecutorV2ScriptHex = (deployerAddressHex, aptosV1ExecutorV2AddressHex) => {
2280
+ aptosV1ExecutorV2AddressHex = lzV2Utilities.trim0x(lzUtilities.padify(aptosV1ExecutorV2AddressHex));
2281
+ deployerAddressHex = lzV2Utilities.trim0x(lzUtilities.padify(deployerAddressHex));
2282
+ return `a11ceb0b060000000501000403040a050e0c071a5b087540000001010102030100000303020003060c0505010c0002060c05176578656375746f725f6665655f6c69625f636f6e666967166f626a6563745f636f64655f6465706c6f796d656e74166765745f636f64655f6f626a6563745f7369676e6572147365745f6578656375746f725f6665655f6c6962${aptosV1ExecutorV2AddressHex}${deployerAddressHex}000001080b000b0111000c030e030b02110102`;
2283
+ };
2247
2284
  function asciiToHex(str) {
2248
2285
  let hex = "";
2249
2286
  for (let i = 0; i < str.length; i++) {