@layerzerolabs/lz-solana-sdk-v2 2.0.10-tron → 2.0.12-tron-rc.2
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.cjs +8 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +5 -5
package/dist/index.cjs
CHANGED
|
@@ -5,7 +5,7 @@ var web310 = require('@solana/web3.js');
|
|
|
5
5
|
var beet31 = require('@metaplex-foundation/beet');
|
|
6
6
|
var beetSolana19 = require('@metaplex-foundation/beet-solana');
|
|
7
7
|
var utils = require('ethers/lib/utils');
|
|
8
|
-
var
|
|
8
|
+
var lzV2Utilities = require('@layerzerolabs/lz-v2-utilities');
|
|
9
9
|
var assert = require('assert');
|
|
10
10
|
var splToken = require('@solana/spl-token');
|
|
11
11
|
var base58 = require('bs58');
|
|
@@ -3620,7 +3620,7 @@ var Endpoint = class {
|
|
|
3620
3620
|
async getDeliverIXAccountMetaForCPI(connection, payer, packet, receiveLibrary) {
|
|
3621
3621
|
const receiver = new web310.PublicKey(Buffer.from(packet.receiver().slice(2), "hex"));
|
|
3622
3622
|
const srcEid = packet.srcEid();
|
|
3623
|
-
const sender =
|
|
3623
|
+
const sender = lzV2Utilities.addressToBytes32(packet.sender());
|
|
3624
3624
|
const payloadHashBytes = Uint8Array.from(Buffer.from(packet.payloadHash().slice(2), "hex"));
|
|
3625
3625
|
const [payloadHash] = this.endpointDeriver.payloadHash(
|
|
3626
3626
|
receiver,
|
|
@@ -3651,10 +3651,10 @@ var Endpoint = class {
|
|
|
3651
3651
|
{
|
|
3652
3652
|
params: {
|
|
3653
3653
|
srcEid,
|
|
3654
|
-
sender: Array.from(
|
|
3654
|
+
sender: Array.from(lzV2Utilities.addressToBytes32(packet.sender())),
|
|
3655
3655
|
receiver,
|
|
3656
3656
|
nonce: 1,
|
|
3657
|
-
payloadHash: Array.from(
|
|
3657
|
+
payloadHash: Array.from(lzV2Utilities.addressToBytes32(packet.sender()))
|
|
3658
3658
|
}
|
|
3659
3659
|
}
|
|
3660
3660
|
);
|
|
@@ -5442,7 +5442,7 @@ var SimpleMessageLib = class {
|
|
|
5442
5442
|
return messageLibInfo.wlCaller;
|
|
5443
5443
|
}
|
|
5444
5444
|
async validatePacket(connection, endpointProgram, payer, encodedPacket) {
|
|
5445
|
-
const packet =
|
|
5445
|
+
const packet = lzV2Utilities.PacketV1Codec.fromBytes(encodedPacket);
|
|
5446
5446
|
const [receiveLibrary] = this.messageLibDeriver.messageLib();
|
|
5447
5447
|
const endpoint = new endpoint_exports.Endpoint(endpointProgram);
|
|
5448
5448
|
return createValidatePacketInstruction(
|
|
@@ -8604,7 +8604,7 @@ var Uln = class {
|
|
|
8604
8604
|
);
|
|
8605
8605
|
}
|
|
8606
8606
|
async oracleSignPacket(oracle, packetBytes, confirmations) {
|
|
8607
|
-
const packet =
|
|
8607
|
+
const packet = lzV2Utilities.PacketV1Codec.fromBytes(packetBytes);
|
|
8608
8608
|
const headerHash = packet.headerHash();
|
|
8609
8609
|
const headerHashBytes = Uint8Array.from(Buffer.from(headerHash.slice(2), "hex"));
|
|
8610
8610
|
const payloadHash = packet.payloadHash();
|
|
@@ -8626,7 +8626,7 @@ var Uln = class {
|
|
|
8626
8626
|
);
|
|
8627
8627
|
}
|
|
8628
8628
|
async deliverPacket(connection, payer, endpointProgram, packetBytes, optionalOraclesIndexes, commitmentOrConfig) {
|
|
8629
|
-
const packet =
|
|
8629
|
+
const packet = lzV2Utilities.PacketV1Codec.fromBytes(packetBytes);
|
|
8630
8630
|
const receiver = new web310.PublicKey(Buffer.from(packet.receiver().slice(2), "hex"));
|
|
8631
8631
|
const srcEid = packet.srcEid();
|
|
8632
8632
|
if (!await this.getSetting(connection)) {
|
|
@@ -9089,7 +9089,7 @@ var Uln = class {
|
|
|
9089
9089
|
].concat(ix.keys);
|
|
9090
9090
|
}
|
|
9091
9091
|
async packetDeliverable(connection, packetBytes, commitment) {
|
|
9092
|
-
const packet =
|
|
9092
|
+
const packet = lzV2Utilities.PacketV1Codec.fromBytes(packetBytes);
|
|
9093
9093
|
const receiver = new web310.PublicKey(Buffer.from(packet.receiver().slice(2), "hex"));
|
|
9094
9094
|
const srcEid = packet.srcEid();
|
|
9095
9095
|
const defaultConfigState = await this.getConfig(connection, srcEid, commitment);
|