@layerzerolabs/lz-aptos-sdk-v1 3.0.85 → 3.0.87

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 (40) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/deployments/aptos-mainnet/Common.json +9 -0
  3. package/deployments/aptos-mainnet/Endpoint.json +9 -0
  4. package/deployments/aptos-mainnet/ExecutorExt.json +9 -0
  5. package/deployments/aptos-mainnet/ExecutorV2.json +9 -0
  6. package/deployments/aptos-mainnet/MsgLibV1.json +9 -0
  7. package/deployments/aptos-mainnet/MsgLibV2.json +9 -0
  8. package/deployments/aptos-mainnet/Zro.json +9 -0
  9. package/deployments/aptos-sandbox-local/Common.json +12 -0
  10. package/deployments/aptos-sandbox-local/Endpoint.json +12 -0
  11. package/deployments/aptos-sandbox-local/ExecutorAuth.json +12 -0
  12. package/deployments/aptos-sandbox-local/ExecutorExt.json +12 -0
  13. package/deployments/aptos-sandbox-local/ExecutorV2.json +12 -0
  14. package/deployments/aptos-sandbox-local/MsgLibV1.json +12 -0
  15. package/deployments/aptos-sandbox-local/MsgLibV2.json +12 -0
  16. package/deployments/aptos-sandbox-local/MsgLibV21.json +12 -0
  17. package/deployments/aptos-sandbox-local/MsgLibV3.json +12 -0
  18. package/deployments/aptos-sandbox-local/MsglibAuth.json +12 -0
  19. package/deployments/aptos-sandbox-local/Zro.json +12 -0
  20. package/deployments/aptos-sandbox-local/executor_v2_register.json +12 -0
  21. package/deployments/aptos-sandbox-local/fa_converter.json +12 -0
  22. package/deployments/aptos-sandbox-local/layerzero_view.json +12 -0
  23. package/deployments/aptos-sandbox-local/msglib_routing_helper.json +12 -0
  24. package/deployments/aptos-sandbox-local/packet_converter.json +12 -0
  25. package/deployments/aptos-sandbox-local/uln_301.json +12 -0
  26. package/deployments/aptos-sandbox-local/uln_301_receive_helper.json +12 -0
  27. package/deployments/aptos-testnet/Common.json +9 -0
  28. package/deployments/aptos-testnet/Endpoint.json +9 -0
  29. package/deployments/aptos-testnet/ExecutorExt.json +9 -0
  30. package/deployments/aptos-testnet/ExecutorV2.json +9 -0
  31. package/deployments/aptos-testnet/MsgLibV1.json +9 -0
  32. package/deployments/aptos-testnet/MsgLibV2.json +9 -0
  33. package/deployments/aptos-testnet/Zro.json +9 -0
  34. package/dist/index.cjs +648 -48
  35. package/dist/index.cjs.map +1 -1
  36. package/dist/index.d.cts +290 -17
  37. package/dist/index.d.ts +290 -17
  38. package/dist/index.mjs +648 -48
  39. package/dist/index.mjs.map +1 -1
  40. package/package.json +9 -4
package/dist/index.d.ts CHANGED
@@ -2,6 +2,7 @@ import * as aptos from 'aptos';
2
2
  import { HexString } from 'aptos';
3
3
  import { Environment, Stage } from '@layerzerolabs/lz-definitions';
4
4
  import BN from 'bn.js';
5
+ import { types } from '@layerzerolabs/lz-movevm-sdk-v2';
5
6
 
6
7
  /**
7
8
  * Interface representing the channel type.
@@ -287,17 +288,86 @@ interface UlnSignerFee {
287
288
  */
288
289
  fee_per_byte: aptos.BCS.Uint64;
289
290
  }
291
+ /**
292
+ * Interface representing the ULN configuration.
293
+ */
294
+ interface UlnConfig$1 {
295
+ /**
296
+ * The number of confirmations.
297
+ */
298
+ confirmations: aptos.BCS.Uint64;
299
+ /**
300
+ * The optional DVN threshold.
301
+ */
302
+ optionalDVNThreshold: aptos.BCS.Uint32;
303
+ /**
304
+ * The required DVNs.
305
+ */
306
+ requiredDVNs: string[];
307
+ /**
308
+ * The optional DVNs.
309
+ */
310
+ optionalDVNs: string[];
311
+ /**
312
+ * Whether to use the default for confirmations.
313
+ */
314
+ useDefaultForConfirmations: boolean;
315
+ /**
316
+ * Whether to use the default for required DVNs.
317
+ */
318
+ useDefaultForRequiredDVNs: boolean;
319
+ /**
320
+ * Whether to use the default for optional DVNs.
321
+ */
322
+ useDefaultForOptionalDVNs: boolean;
323
+ }
324
+ /**
325
+ * Use to parse the ULN configuration response from the contract method,
326
+ * Everyone who needs to use the ULN configuration should use @see UlnConfig instead of this.
327
+ */
328
+ interface UlnConfigResponse {
329
+ confirmations: bigint;
330
+ optional_dvn_threshold: number;
331
+ required_dvns: string[];
332
+ optional_dvns: string[];
333
+ use_default_for_confirmations: boolean;
334
+ use_default_for_required_dvns: boolean;
335
+ use_default_for_optional_dvns: boolean;
336
+ }
337
+ /**
338
+ * Interface representing the executor configuration.
339
+ */
340
+ interface ExecutorConfig$1 {
341
+ /**
342
+ * The maximum message size.
343
+ */
344
+ maxMessageSize: aptos.BCS.Uint32;
345
+ /**
346
+ * The executor address.
347
+ */
348
+ executorAddress: string;
349
+ }
350
+ /**
351
+ * Use to parse the Executor configuration response from the contract method,
352
+ * Everyone who needs to use the Executor configuration should use @see ExecutorConfig instead of this.
353
+ */
354
+ interface ExecutorConfigResponse {
355
+ max_message_size: number;
356
+ executor_address: string;
357
+ }
290
358
 
291
359
  type index$3_CoinInfo = CoinInfo;
292
360
  type index$3_CoinInfoEx = CoinInfoEx;
293
361
  type index$3_CoinInfoResource = CoinInfoResource;
362
+ type index$3_ExecutorConfigResponse = ExecutorConfigResponse;
294
363
  type index$3_Packet = Packet;
295
364
  type index$3_TypeInfo = TypeInfo;
296
365
  type index$3_TypeInfoEx = TypeInfoEx;
366
+ type index$3_UlnConfigResponse = UlnConfigResponse;
297
367
  type index$3_UlnConfigType = UlnConfigType;
298
368
  type index$3_UlnSignerFee = UlnSignerFee;
299
369
  declare namespace index$3 {
300
- export type { index$3_CoinInfo as CoinInfo, index$3_CoinInfoEx as CoinInfoEx, index$3_CoinInfoResource as CoinInfoResource, index$3_Packet as Packet, index$3_TypeInfo as TypeInfo, index$3_TypeInfoEx as TypeInfoEx, index$3_UlnConfigType as UlnConfigType, index$3_UlnSignerFee as UlnSignerFee };
370
+ export type { index$3_CoinInfo as CoinInfo, index$3_CoinInfoEx as CoinInfoEx, index$3_CoinInfoResource as CoinInfoResource, ExecutorConfig$1 as ExecutorConfig, index$3_ExecutorConfigResponse as ExecutorConfigResponse, index$3_Packet as Packet, index$3_TypeInfo as TypeInfo, index$3_TypeInfoEx as TypeInfoEx, UlnConfig$1 as UlnConfig, index$3_UlnConfigResponse as UlnConfigResponse, index$3_UlnConfigType as UlnConfigType, index$3_UlnSignerFee as UlnSignerFee };
301
371
  }
302
372
 
303
373
  /**
@@ -313,6 +383,10 @@ declare class Endpoint {
313
383
  * The module name with namespace.
314
384
  */
315
385
  readonly moduleName: string;
386
+ /**
387
+ * The view module name.
388
+ */
389
+ readonly viewModule: string;
316
390
  /**
317
391
  * Creates an instance of the Endpoint class.
318
392
  *
@@ -365,11 +439,15 @@ declare class Endpoint {
365
439
  * @param {number} payloadSize - The payload size.
366
440
  * @param {Object} [query] - The query parameters.
367
441
  * @param {bigint | number} [query.ledgerVersion] - The ledger version.
368
- * @returns {Promise<aptos.BCS.Uint64>} A promise that resolves to the quoted fee.
442
+ * @param {aptos.BCS.Bytes} [msglibParams] - The msglib parameters.
443
+ * @returns {Promise<{ nativeFee: aptos.BCS.Uint64; zroFee: aptos.BCS.Uint64 }>} A promise that resolves to the quoted fee.
369
444
  */
370
- quoteFee(uaAddress: aptos.MaybeHexString, dstChainId: aptos.BCS.Uint16, adapterParams: aptos.BCS.Bytes, payloadSize: number, query?: {
445
+ quoteFee(uaAddress: aptos.MaybeHexString, dstChainId: aptos.BCS.Uint16, adapterParams: aptos.BCS.Bytes, payloadSize: number, msglibParams?: aptos.BCS.Bytes, payInZro?: boolean, query?: {
371
446
  ledgerVersion?: bigint | number;
372
- }): Promise<aptos.BCS.Uint64>;
447
+ }): Promise<{
448
+ nativeFee: aptos.BCS.Uint64;
449
+ zroFee: aptos.BCS.Uint64;
450
+ }>;
373
451
  /**
374
452
  * Creates a payload for registering an executor.
375
453
  *
@@ -681,6 +759,32 @@ declare class ExecutorConfig {
681
759
  setDefaultExecutorPayload(remoteChainId: aptos.BCS.Uint16, version: aptos.BCS.Uint8, executor: aptos.MaybeHexString): aptos.Types.EntryFunctionPayload;
682
760
  }
683
761
 
762
+ declare class MsgLib {
763
+ private sdk;
764
+ /**
765
+ * The module name.
766
+ */
767
+ readonly module: string;
768
+ readonly routingModule: string;
769
+ /**
770
+ * Creates an instance of the MsgLib class.
771
+ *
772
+ * @param {SDK} sdk - The SDK instance.
773
+ */
774
+ constructor(sdk: SDK);
775
+ createInitPayload(): Promise<aptos.Types.EntryFunctionPayload>;
776
+ init(signer: aptos.AptosAccount): Promise<aptos.Types.Transaction>;
777
+ createSyncVersionPayload(uaAddress: string, chainId: aptos.BCS.Uint64): Promise<aptos.Types.EntryFunctionPayload>;
778
+ syncVersion(signer: aptos.AptosAccount, uaAddress: string, chainId: aptos.BCS.Uint64): Promise<aptos.Types.Transaction>;
779
+ /**
780
+ * Checks if the module is initialized.
781
+ *
782
+ * @returns {Promise<boolean>} A promise that resolves to true if the module is initialized, false otherwise.
783
+ */
784
+ isInitialize(): Promise<boolean>;
785
+ isVersionSynced(uaAddress: string, chainId: aptos.BCS.Uint64): Promise<boolean>;
786
+ }
787
+
684
788
  /**
685
789
  * Class representing message library authorization.
686
790
  */
@@ -1667,6 +1771,85 @@ type index$2_MsgLibV1_0 = MsgLibV1_0;
1667
1771
  export { index$2_MsgLibV1_0 as MsgLibV1_0, index$2_PacketEvent as PacketEvent, index$2_Uln as Uln, index$2_UlnConfig as UlnConfig, index$2_UlnReceive as UlnReceive, index$2_UlnSigner as UlnSigner };
1668
1772
  }
1669
1773
 
1774
+ declare class Uln301 {
1775
+ private sdk;
1776
+ /**
1777
+ * The module name.
1778
+ */
1779
+ readonly module: string;
1780
+ readonly adminModule: string;
1781
+ readonly routerModule: string;
1782
+ /**
1783
+ * Creates an instance of the UlnReceive class.
1784
+ *
1785
+ * @param {SDK} sdk - The SDK instance.
1786
+ */
1787
+ constructor(sdk: SDK);
1788
+ private emptyUlnConfig;
1789
+ private emptyExecutorConfig;
1790
+ createInitializePayload(eid: aptos.BCS.Uint32): Promise<aptos.Types.EntryFunctionPayload>;
1791
+ isInitialized(): Promise<boolean>;
1792
+ createSetDefaultUlnSendConfigPayload(dstEid: aptos.BCS.Uint32, ulnConfig: types.UlnConfig): Promise<aptos.Types.EntryFunctionPayload>;
1793
+ setDefaultUlnSendConfig(signer: aptos.AptosAccount, dstEid: aptos.BCS.Uint32, ulnConfig: types.UlnConfig): Promise<aptos.Types.Transaction>;
1794
+ createSetDefaultUlnReceiveConfigPayload(srcEid: aptos.BCS.Uint32, ulnConfig: types.UlnConfig): Promise<aptos.Types.EntryFunctionPayload>;
1795
+ setDefaultUlnReceiveConfig(signer: aptos.AptosAccount, srcEid: aptos.BCS.Uint32, ulnConfig: types.UlnConfig): Promise<aptos.Types.Transaction>;
1796
+ createSetDefaultExecutorConfigPayload(eid: aptos.BCS.Uint32, executorConfig: types.ExecutorConfig): Promise<aptos.Types.EntryFunctionPayload>;
1797
+ setDefaultExecutorConfig(signer: aptos.AptosAccount, eid: aptos.BCS.Uint32, executorConfig: types.ExecutorConfig): Promise<aptos.Types.Transaction>;
1798
+ createSetWorkerConfigForFeeLibRoutingOptInPayload(optIn: boolean): Promise<aptos.Types.EntryFunctionPayload>;
1799
+ setWorkerConfigForFeeLibRoutingOptIn(signer: aptos.AptosAccount, optIn: boolean): Promise<aptos.Types.Transaction>;
1800
+ getTreasury(): Promise<aptos.MaybeHexString>;
1801
+ getDefaultUlnSendConfig(dstEid: aptos.BCS.Uint32): Promise<types.UlnConfig>;
1802
+ getDefaultUlnReceiveConfig(srcEid: aptos.BCS.Uint32): Promise<types.UlnConfig>;
1803
+ getDefaultExecutorConfig(eid: aptos.BCS.Uint32): Promise<types.ExecutorConfig>;
1804
+ getAppSendConfig(oappAddress: string, dstEid: aptos.BCS.Uint32): Promise<types.UlnConfig>;
1805
+ getAppReceiveConfig(oappAddress: string, srcEid: aptos.BCS.Uint32): Promise<types.UlnConfig>;
1806
+ getAppExecutorConfig(oappAddress: string, eid: aptos.BCS.Uint32): Promise<types.ExecutorConfig>;
1807
+ workerConfigForFeeLibRoutingOptIn(): Promise<boolean>;
1808
+ verifiable(packetHeader: string, payloadHash: string): Promise<boolean>;
1809
+ getVerificationConfirmations(packetHeaderHash: string, payloadHash: string, dvnAddress: string): Promise<aptos.BCS.Uint64>;
1810
+ version(): Promise<[aptos.BCS.Uint64, aptos.BCS.Uint64, aptos.BCS.Uint64]>;
1811
+ getUaConfig(uaAddress: string, chainId: aptos.BCS.Uint64, configType: types.ConfigType): Promise<types.UlnConfig>;
1812
+ /**
1813
+ * Parses the ULN configuration response.
1814
+ *
1815
+ * @param {UlnConfigResponse} ulnConfigResponse - The ULN configuration response.
1816
+ * @returns {UlnConfig} The parsed ULN configuration.
1817
+ */
1818
+ private parseUlnConfig;
1819
+ /**
1820
+ * Parses the executor configuration response.
1821
+ *
1822
+ * @param {ExecutorConfigResponse} executorConfigResponse - The executor configuration response.
1823
+ * @returns {ExecutorConfig} The parsed executor configuration.
1824
+ */
1825
+ private parseExecutorConfig;
1826
+ }
1827
+
1828
+ declare class Uln301Receiver {
1829
+ private sdk;
1830
+ /**
1831
+ * The module name.
1832
+ */
1833
+ readonly module: string;
1834
+ /**
1835
+ * Creates an instance of the UlnReceive class.
1836
+ *
1837
+ * @param {SDK} sdk - The SDK instance.
1838
+ */
1839
+ constructor(sdk: SDK);
1840
+ createSetChainAddressSizePayload(eid: aptos.BCS.Uint32, size: aptos.BCS.Uint64): Promise<aptos.Types.EntryFunctionPayload>;
1841
+ setChainAddressSize(signer: aptos.AptosAccount, eid: aptos.BCS.Uint32, size: aptos.BCS.Uint64): Promise<aptos.Types.Transaction>;
1842
+ createCommitVerificationPayload(uaType: string, rawPacketBytes: Uint8Array): Promise<aptos.Types.EntryFunctionPayload>;
1843
+ commitVerification(signer: aptos.AptosAccount, uaType: string, rawPacketBytes: Uint8Array): Promise<aptos.Types.Transaction>;
1844
+ /**
1845
+ * Checks if the module is initialized.
1846
+ *
1847
+ * @returns {Promise<boolean>} A promise that resolves to true if the module is initialized, false otherwise.
1848
+ */
1849
+ isInitialize(): Promise<boolean>;
1850
+ getAddressSize(chainId: aptos.BCS.Uint32): Promise<aptos.BCS.Uint64>;
1851
+ }
1852
+
1670
1853
  /**
1671
1854
  * Class representing the Layerzero module.
1672
1855
  */
@@ -1691,6 +1874,16 @@ declare class Layerzero {
1691
1874
  * @see {@link Uln}
1692
1875
  */
1693
1876
  Uln: Uln;
1877
+ /**
1878
+ * The Uln301 instance.
1879
+ * @see {@link Uln301}
1880
+ */
1881
+ Uln301: Uln301;
1882
+ /**
1883
+ * The Uln301Receiver instance.
1884
+ * @see {@link Uln301Receiver}
1885
+ */
1886
+ Uln301Receiver: Uln301Receiver;
1694
1887
  /**
1695
1888
  * The MsgLibConfig instance.
1696
1889
  * @see {@link MsgLibConfig}
@@ -1706,6 +1899,11 @@ declare class Layerzero {
1706
1899
  * @see {@link ExecutorConfig}
1707
1900
  */
1708
1901
  ExecutorConfig: ExecutorConfig;
1902
+ /**
1903
+ * The MsgLib instance.
1904
+ * @see {@link MsgLib}
1905
+ */
1906
+ MsgLib: MsgLib;
1709
1907
  /**
1710
1908
  * Creates an instance of the Layerzero class.
1711
1909
  *
@@ -1732,6 +1930,15 @@ declare const FAUCET_URL: {
1732
1930
  declare const LAYERZERO_ADDRESS: {
1733
1931
  [stage in Stage]?: string;
1734
1932
  };
1933
+ declare const ULN_301_ADDRESS: {
1934
+ [stage in Stage]?: string;
1935
+ };
1936
+ declare const ULN_301_RECEIVE_HELPER_ADDRESS: {
1937
+ [stage in Stage]?: string;
1938
+ };
1939
+ declare const MSGLIB_ROUTING_HELPER_ADDRESS: {
1940
+ [stage in Stage]?: string;
1941
+ };
1735
1942
  /**
1736
1943
  * Layerzero apps addresses for different stages.
1737
1944
  */
@@ -1768,6 +1975,12 @@ declare const EXECUTOR_ADDRESS: {
1768
1975
  declare const EXECUTOR_EXT_ADDRESS: {
1769
1976
  [stage in Stage]?: string;
1770
1977
  };
1978
+ /**
1979
+ * Executor v2 addresses for different stages.
1980
+ */
1981
+ declare const EXECUTOR_V2_ADDRESS: {
1982
+ [stage in Stage]?: string;
1983
+ };
1771
1984
  /**
1772
1985
  * Layerzero apps public keys for different stages.
1773
1986
  */
@@ -1798,23 +2011,31 @@ declare const OFT_PRECRIME_ADDRESS: {
1798
2011
  declare const COUNTER_ADDRESS: {
1799
2012
  [stage in Stage]?: string;
1800
2013
  };
2014
+ declare const LAYERZERO_VIEW_ADDRESS: {
2015
+ [stage in Stage]?: string;
2016
+ };
1801
2017
 
1802
2018
  declare const constants_BRIDGE_ADDRESS: typeof BRIDGE_ADDRESS;
1803
2019
  declare const constants_BRIDGE_PRECRIME_ADDRESS: typeof BRIDGE_PRECRIME_ADDRESS;
1804
2020
  declare const constants_COUNTER_ADDRESS: typeof COUNTER_ADDRESS;
1805
2021
  declare const constants_EXECUTOR_ADDRESS: typeof EXECUTOR_ADDRESS;
1806
2022
  declare const constants_EXECUTOR_EXT_ADDRESS: typeof EXECUTOR_EXT_ADDRESS;
2023
+ declare const constants_EXECUTOR_V2_ADDRESS: typeof EXECUTOR_V2_ADDRESS;
1807
2024
  declare const constants_FAUCET_URL: typeof FAUCET_URL;
1808
2025
  declare const constants_LAYERZERO_ADDRESS: typeof LAYERZERO_ADDRESS;
1809
2026
  declare const constants_LAYERZERO_APPS_ADDRESS: typeof LAYERZERO_APPS_ADDRESS;
1810
2027
  declare const constants_LAYERZERO_APPS_PUBKEY: typeof LAYERZERO_APPS_PUBKEY;
2028
+ declare const constants_LAYERZERO_VIEW_ADDRESS: typeof LAYERZERO_VIEW_ADDRESS;
2029
+ declare const constants_MSGLIB_ROUTING_HELPER_ADDRESS: typeof MSGLIB_ROUTING_HELPER_ADDRESS;
1811
2030
  declare const constants_NODE_URL: typeof NODE_URL;
1812
2031
  declare const constants_OFT_PRECRIME_ADDRESS: typeof OFT_PRECRIME_ADDRESS;
1813
2032
  declare const constants_ORACLE_ADDRESS: typeof ORACLE_ADDRESS;
1814
2033
  declare const constants_ORACLE_SIGNER_ADDRESS: typeof ORACLE_SIGNER_ADDRESS;
1815
2034
  declare const constants_RELAYER_SIGNER_ADDRESS: typeof RELAYER_SIGNER_ADDRESS;
2035
+ declare const constants_ULN_301_ADDRESS: typeof ULN_301_ADDRESS;
2036
+ declare const constants_ULN_301_RECEIVE_HELPER_ADDRESS: typeof ULN_301_RECEIVE_HELPER_ADDRESS;
1816
2037
  declare namespace constants {
1817
- export { 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_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_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 };
2038
+ export { 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_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 };
1818
2039
  }
1819
2040
 
1820
2041
  /**
@@ -2399,37 +2620,43 @@ declare class Counter {
2399
2620
  */
2400
2621
  getCount(): Promise<aptos.BCS.Uint64>;
2401
2622
  /**
2402
- * Creates a payload for creating a counter.
2623
+ * Creates a payload for setting a remote address.
2403
2624
  *
2404
- * @param {aptos.BCS.Uint64 | aptos.BCS.Uint32} i - The initial count value.
2625
+ * @param {aptos.BCS.Uint16} remoteChainId - The remote chain ID.
2626
+ * @param {aptos.BCS.Bytes} remoteAddress - The remote address.
2405
2627
  * @returns {aptos.Types.EntryFunctionPayload} The entry function payload.
2406
2628
  */
2407
- createCounterPayload(i: aptos.BCS.Uint64 | aptos.BCS.Uint32): aptos.Types.EntryFunctionPayload;
2629
+ setRemotePayload(remoteChainId: aptos.BCS.Uint16, remoteAddress: aptos.BCS.Bytes): aptos.Types.EntryFunctionPayload;
2408
2630
  /**
2409
- * Creates a counter.
2631
+ * Sets a remote address.
2410
2632
  *
2411
2633
  * @param {aptos.AptosAccount} signer - The signer account.
2412
- * @param {aptos.BCS.Uint64 | aptos.BCS.Uint32} i - The initial count value.
2634
+ * @param {aptos.BCS.Uint16} remoteChainId - The remote chain ID.
2635
+ * @param {aptos.BCS.Bytes} remoteAddress - The remote address.
2413
2636
  * @returns {Promise<aptos.Types.Transaction>} The transaction result.
2414
2637
  */
2415
- createCounter(signer: aptos.AptosAccount, i: aptos.BCS.Uint64 | aptos.BCS.Uint32): Promise<aptos.Types.Transaction>;
2638
+ setRemote(signer: aptos.AptosAccount, remoteChainId: aptos.BCS.Uint16, remoteAddress: aptos.BCS.Bytes): Promise<aptos.Types.Transaction>;
2416
2639
  /**
2417
- * Creates a payload for setting a remote address.
2640
+ * Creates a payload for setting the executor version and address.
2418
2641
  *
2642
+ * @param {string} uaType - The user application type.
2419
2643
  * @param {aptos.BCS.Uint16} remoteChainId - The remote chain ID.
2420
- * @param {aptos.BCS.Bytes} remoteAddress - The remote address.
2644
+ * @param {aptos.BCS.Uint8} executorVersion - The executor version.
2645
+ * @param {string} executorAddress - The executor address.
2421
2646
  * @returns {aptos.Types.EntryFunctionPayload} The entry function payload.
2422
2647
  */
2423
- setRemotePayload(remoteChainId: aptos.BCS.Uint16, remoteAddress: aptos.BCS.Bytes): aptos.Types.EntryFunctionPayload;
2648
+ setExecutorPayload(uaType: string, remoteChainId: aptos.BCS.Uint16, executorVersion: aptos.BCS.Uint8, executorAddress: string): aptos.Types.EntryFunctionPayload;
2424
2649
  /**
2425
- * Sets a remote address.
2650
+ * Sets the executor version and address.
2426
2651
  *
2427
2652
  * @param {aptos.AptosAccount} signer - The signer account.
2653
+ * @param {string} uaType - The user application type.
2428
2654
  * @param {aptos.BCS.Uint16} remoteChainId - The remote chain ID.
2429
- * @param {aptos.BCS.Bytes} remoteAddress - The remote address.
2655
+ * @param {aptos.BCS.Uint8} executorVersion - The executor version.
2656
+ * @param {string} executorAddress - The executor address.
2430
2657
  * @returns {Promise<aptos.Types.Transaction>} The transaction result.
2431
2658
  */
2432
- setRemote(signer: aptos.AptosAccount, remoteChainId: aptos.BCS.Uint16, remoteAddress: aptos.BCS.Bytes): Promise<aptos.Types.Transaction>;
2659
+ setExecutor(signer: aptos.AptosAccount, uaType: string, remoteChainId: aptos.BCS.Uint16, executorVersion: aptos.BCS.Uint8, executorAddress: string): Promise<aptos.Types.Transaction>;
2433
2660
  /**
2434
2661
  * Creates a payload for setting the application configuration.
2435
2662
  *
@@ -2500,6 +2727,15 @@ declare class Counter {
2500
2727
  * @returns {Promise<boolean>} True if the counter is created, false otherwise.
2501
2728
  */
2502
2729
  isCounterCreated(address: aptos.MaybeHexString): Promise<boolean>;
2730
+ /**
2731
+ * Gets the fee quote for sending a message to a remote chain.
2732
+ *
2733
+ * @param {aptos.BCS.Uint16} remoteChainId - The remote chain ID.
2734
+ * @param {string} adapterParams - The adapter parameters.
2735
+ * @param {boolean} payInZro - Whether to pay the fee in ZRO tokens.
2736
+ * @returns {Promise<[aptos.BCS.Uint64, aptos.BCS.Uint64]>} A tuple containing the native fee and ZRO fee.
2737
+ */
2738
+ quoteFee(remoteChainId: aptos.BCS.Uint16, adapterParams: string, payInZro: boolean): Promise<[aptos.BCS.Uint64, aptos.BCS.Uint64]>;
2503
2739
  }
2504
2740
 
2505
2741
  /**
@@ -3560,6 +3796,27 @@ declare class LzApp {
3560
3796
  * @returns {Promise<aptos.Types.Transaction>} A promise that resolves to the transaction.
3561
3797
  */
3562
3798
  setRemote(signer: aptos.AptosAccount, remoteChainId: aptos.BCS.Uint16, remoteAddress: aptos.BCS.Bytes): Promise<aptos.Types.Transaction>;
3799
+ /**
3800
+ * Creates a payload for setting the executor version and address.
3801
+ *
3802
+ * @param {string} uaType - The user application type.
3803
+ * @param {aptos.BCS.Uint16} remoteChainId - The remote chain ID.
3804
+ * @param {aptos.BCS.Uint8} executorVersion - The executor version.
3805
+ * @param {string} executorAddress - The executor address.
3806
+ * @returns {aptos.Types.EntryFunctionPayload} The entry function payload.
3807
+ */
3808
+ setExecutorPayload(uaType: string, remoteChainId: aptos.BCS.Uint16, executorVersion: aptos.BCS.Uint8, executorAddress: string): aptos.Types.EntryFunctionPayload;
3809
+ /**
3810
+ * Sets the executor version and address.
3811
+ *
3812
+ * @param {aptos.AptosAccount} signer - The signer account.
3813
+ * @param {string} uaType - The user application type.
3814
+ * @param {aptos.BCS.Uint16} remoteChainId - The remote chain ID.
3815
+ * @param {aptos.BCS.Uint8} executorVersion - The executor version.
3816
+ * @param {string} executorAddress - The executor address.
3817
+ * @returns {Promise<aptos.Types.Transaction>} The transaction result.
3818
+ */
3819
+ setExecutor(signer: aptos.AptosAccount, uaType: string, remoteChainId: aptos.BCS.Uint16, executorVersion: aptos.BCS.Uint8, executorAddress: string): Promise<aptos.Types.Transaction>;
3563
3820
  /**
3564
3821
  * Creates a payload for setting the configuration.
3565
3822
  *
@@ -3752,9 +4009,15 @@ declare const index_rebuildCompileScriptBytecode: typeof rebuildCompileScriptByt
3752
4009
  */
3753
4010
  type AccountsOption = {
3754
4011
  layerzero?: aptos.MaybeHexString;
4012
+ layerzero_common?: aptos.MaybeHexString;
3755
4013
  msglib_auth?: aptos.MaybeHexString;
3756
4014
  msglib_v1_1?: aptos.MaybeHexString;
3757
4015
  msglib_v2?: aptos.MaybeHexString;
4016
+ msglib_v2_1?: aptos.MaybeHexString;
4017
+ msglib_v3?: aptos.MaybeHexString;
4018
+ msglib_routing_helper?: aptos.MaybeHexString;
4019
+ uln_301?: aptos.MaybeHexString;
4020
+ uln_301_receiver?: aptos.MaybeHexString;
3758
4021
  zro?: aptos.MaybeHexString;
3759
4022
  executor_auth?: aptos.MaybeHexString;
3760
4023
  executor_ext?: aptos.MaybeHexString;
@@ -3807,6 +4070,7 @@ declare class SDK {
3807
4070
  * @param {SdkOptions} options - The SDK options.
3808
4071
  */
3809
4072
  constructor(options: SdkOptions);
4073
+ viewFunction(payload: aptos.Types.ViewRequest): Promise<aptos.Types.MoveValue[]>;
3810
4074
  /**
3811
4075
  * Sends and confirms a BCS transaction.
3812
4076
  *
@@ -3822,6 +4086,7 @@ declare class SDK {
3822
4086
  * @returns {Promise<aptos.Types.Transaction>} The confirmed transaction.
3823
4087
  */
3824
4088
  sendAndConfirmTransaction(signer: aptos.AptosAccount, payload: aptos.Types.EntryFunctionPayload): Promise<aptos.Types.Transaction>;
4089
+ sendAndConfirmScriptTransaction(signer: aptos.AptosAccount, payload: aptos.TxnBuilderTypes.Script): Promise<aptos.Types.Transaction>;
3825
4090
  /**
3826
4091
  * Estimates the gas for a transaction.
3827
4092
  *
@@ -3833,6 +4098,14 @@ declare class SDK {
3833
4098
  max_gas_amount: string;
3834
4099
  gas_unit_price: string;
3835
4100
  }>;
4101
+ estimateScriptTxGas(signer: aptos.AptosAccount, payload: aptos.TxnBuilderTypes.TransactionPayloadScript): Promise<{
4102
+ max_gas_amount: string;
4103
+ gas_unit_price: string;
4104
+ }>;
4105
+ innerEstimateGas(signer: aptos.AptosAccount, txnRequest: aptos.TxnBuilderTypes.RawTransaction): Promise<{
4106
+ max_gas_amount: string;
4107
+ gas_unit_price: string;
4108
+ }>;
3836
4109
  /**
3837
4110
  * Sends and confirms a multi-signature transaction.
3838
4111
  *