@layerzerolabs/lz-movevm-sdk-v2 3.0.27 → 3.0.28

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/dist/index.d.mts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { EndpointId } from '@layerzerolabs/lz-definitions';
2
2
  import { MoveFunction, EntryFunctionArgumentTypes, MoveValue, PrivateKey, MnemonicAndPath, ByteCode, GasOptions, TransactionResponse, MoveStructId, TableItemRequest, InputEntryFunctionData } from '@layerzerolabs/move-definitions';
3
- import { Packet } from '@layerzerolabs/lz-v2-utilities';
3
+ import { Packet, PacketV1Codec } from '@layerzerolabs/lz-v2-utilities';
4
4
 
5
5
  /**
6
6
  * Interface representing the DVN destination configuration.
@@ -695,6 +695,18 @@ declare class DvnWorker<AccountType> {
695
695
  * @returns {InputEntryFunctionData} The input entry function data, used to build the transaction.
696
696
  */
697
697
  createSetPriceFeedPayload(priceFeed: string, feedAddress: string): InputEntryFunctionData;
698
+ /**
699
+ * Creates a payload for verifying a packet.
700
+ *
701
+ * @param {Date} date - The date of the transaction.
702
+ * @param {PacketV1Codec} codec - The codec for the packet.
703
+ * @param {string} receiveMessageLibAddress - The address of the receive message library.
704
+ * @param {number} inboundConfirmation - The number of inbound confirmations.
705
+ * @param {number} expiration - The expiration time.
706
+ * @param {string} signatures - The signatures for the transaction.
707
+ * @returns {InputEntryFunctionData} The input entry function data, used to build the transaction.
708
+ */
709
+ createVerifyPayload(date: Date, codec: PacketV1Codec, receiveMessageLibAddress: string, inboundConfirmation: number, expiration: number, signatures: string): InputEntryFunctionData;
698
710
  }
699
711
 
700
712
  /**
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { EndpointId } from '@layerzerolabs/lz-definitions';
2
2
  import { MoveFunction, EntryFunctionArgumentTypes, MoveValue, PrivateKey, MnemonicAndPath, ByteCode, GasOptions, TransactionResponse, MoveStructId, TableItemRequest, InputEntryFunctionData } from '@layerzerolabs/move-definitions';
3
- import { Packet } from '@layerzerolabs/lz-v2-utilities';
3
+ import { Packet, PacketV1Codec } from '@layerzerolabs/lz-v2-utilities';
4
4
 
5
5
  /**
6
6
  * Interface representing the DVN destination configuration.
@@ -695,6 +695,18 @@ declare class DvnWorker<AccountType> {
695
695
  * @returns {InputEntryFunctionData} The input entry function data, used to build the transaction.
696
696
  */
697
697
  createSetPriceFeedPayload(priceFeed: string, feedAddress: string): InputEntryFunctionData;
698
+ /**
699
+ * Creates a payload for verifying a packet.
700
+ *
701
+ * @param {Date} date - The date of the transaction.
702
+ * @param {PacketV1Codec} codec - The codec for the packet.
703
+ * @param {string} receiveMessageLibAddress - The address of the receive message library.
704
+ * @param {number} inboundConfirmation - The number of inbound confirmations.
705
+ * @param {number} expiration - The expiration time.
706
+ * @param {string} signatures - The signatures for the transaction.
707
+ * @returns {InputEntryFunctionData} The input entry function data, used to build the transaction.
708
+ */
709
+ createVerifyPayload(date: Date, codec: PacketV1Codec, receiveMessageLibAddress: string, inboundConfirmation: number, expiration: number, signatures: string): InputEntryFunctionData;
698
710
  }
699
711
 
700
712
  /**
package/dist/index.mjs CHANGED
@@ -563,6 +563,32 @@ var DvnWorker = class {
563
563
  functionArgumentTypes: ["address", "address"]
564
564
  };
565
565
  }
566
+ /**
567
+ * Creates a payload for verifying a packet.
568
+ *
569
+ * @param {Date} date - The date of the transaction.
570
+ * @param {PacketV1Codec} codec - The codec for the packet.
571
+ * @param {string} receiveMessageLibAddress - The address of the receive message library.
572
+ * @param {number} inboundConfirmation - The number of inbound confirmations.
573
+ * @param {number} expiration - The expiration time.
574
+ * @param {string} signatures - The signatures for the transaction.
575
+ * @returns {InputEntryFunctionData} The input entry function data, used to build the transaction.
576
+ */
577
+ createVerifyPayload(date, codec, receiveMessageLibAddress, inboundConfirmation, expiration, signatures) {
578
+ const payload = {
579
+ function: `${this.module[0]}::${this.module[1]}::verify`,
580
+ functionArguments: [
581
+ arrayify(codec.header()),
582
+ arrayify(codec.payloadHash()),
583
+ BigInt(inboundConfirmation),
584
+ receiveMessageLibAddress,
585
+ BigInt(expiration) + BigInt(date.getTime()),
586
+ arrayify(signatures)
587
+ ],
588
+ functionArgumentTypes: ["vector<u8>", "vector<u8>", "u64", "address", "u64", "vector<u8>"]
589
+ };
590
+ return payload;
591
+ }
566
592
  };
567
593
  var initializeDvnScriptHex = (deployerAddressHex, dvnAddressHex, uln302AddressHex) => {
568
594
  const stdAddressHex = "0000000000000000000000000000000000000000000000000000000000000001";