@layerzerolabs/lz-solana-sdk-v2 3.0.104 → 3.0.105
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 +13 -0
- package/dist/index.cjs +0 -73
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +0 -15
- package/dist/index.d.ts +0 -15
- package/dist/index.mjs +0 -73
- package/dist/index.mjs.map +1 -1
- package/dist/umi.cjs +703 -291
- package/dist/umi.cjs.map +1 -1
- package/dist/umi.d.mts +234 -102
- package/dist/umi.d.ts +234 -102
- package/dist/umi.mjs +695 -292
- package/dist/umi.mjs.map +1 -1
- package/package.json +10 -9
- package/src/executor.ts +35 -59
- package/src/generated/kinobi/executor/accounts/executionContextV1.ts +173 -0
- package/src/generated/kinobi/executor/accounts/index.ts +1 -0
- package/src/generated/kinobi/executor/errors/executor.ts +32 -0
- package/src/generated/kinobi/executor/instructions/index.ts +2 -1
- package/src/generated/kinobi/executor/instructions/postExecute.ts +141 -0
- package/src/generated/kinobi/executor/instructions/preExecute.ts +164 -0
- package/src/generated/kinobi/executor/types/index.ts +0 -1
- package/src/index.ts +2 -0
- package/src/pda.ts +10 -1
- package/src/receive-types-v1.ts +85 -0
- package/src/receive-types-v2.ts +217 -0
- package/src/receive.ts +66 -111
- package/src/solita/executor.ts +1 -88
- package/src/types.ts +140 -0
- package/src/generated/kinobi/executor/instructions/execute.ts +0 -159
- package/src/generated/kinobi/executor/types/lzReceiveParams.ts +0 -50
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# @layerzerolabs/lz-solana-sdk-v2
|
|
2
2
|
|
|
3
|
+
## 3.0.105
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 4622e07: Switch merkle-patricia-tree package version to 3.0.0 in @layerzerolabs/lz-proof-utility
|
|
8
|
+
- Updated dependencies [4622e07]
|
|
9
|
+
- @layerzerolabs/lz-corekit-solana@3.0.105
|
|
10
|
+
- @layerzerolabs/lz-definitions@3.0.105
|
|
11
|
+
- @layerzerolabs/lz-foundation@3.0.105
|
|
12
|
+
- @layerzerolabs/lz-serdes@3.0.105
|
|
13
|
+
- @layerzerolabs/lz-utilities@3.0.105
|
|
14
|
+
- @layerzerolabs/lz-v2-utilities@3.0.105
|
|
15
|
+
|
|
3
16
|
## 3.0.104
|
|
4
17
|
|
|
5
18
|
### Patch Changes
|
package/dist/index.cjs
CHANGED
|
@@ -14243,79 +14243,6 @@ var Executor = class {
|
|
|
14243
14243
|
}
|
|
14244
14244
|
].concat(ixAccounts);
|
|
14245
14245
|
}
|
|
14246
|
-
/**
|
|
14247
|
-
* Executes a transaction.
|
|
14248
|
-
*
|
|
14249
|
-
* @param {Connection} connection - The connection.
|
|
14250
|
-
* @param {PublicKey} executor - The executor public key.
|
|
14251
|
-
* @param {PublicKey} endpointProgram - The endpoint program public key.
|
|
14252
|
-
* @param {Packet} packet - The packet.
|
|
14253
|
-
* @param {Uint8Array} extraData - The extra data.
|
|
14254
|
-
* @param {BN} [value] - The value.
|
|
14255
|
-
* @param {number} [computeUnits] - The compute units.
|
|
14256
|
-
* @param {Commitment} [commitmentOrConfig] - The commitment or configuration.
|
|
14257
|
-
*
|
|
14258
|
-
* @returns {Promise<TransactionInstruction>} A promise that resolves to the transaction instruction.
|
|
14259
|
-
*/
|
|
14260
|
-
async execute(connection, executor, endpointProgram, packet, extraData, value = new BN__default.default(0), computeUnits = 2e5, commitmentOrConfig) {
|
|
14261
|
-
const [config] = this.deriver.config();
|
|
14262
|
-
const endpointEventDeriver = new EventPDADeriver(endpointProgram);
|
|
14263
|
-
const executorEventDeriver = new EventPDADeriver(this.program);
|
|
14264
|
-
const { message: message_, sender, srcEid, guid, receiver: receiver_, nonce } = packet;
|
|
14265
|
-
const receiver = new web314.PublicKey(lzV2Utilities.addressToBytes32(receiver_));
|
|
14266
|
-
const receiverInfo = await connection.getParsedAccountInfo(receiver, commitmentOrConfig);
|
|
14267
|
-
const receiverProgram = new web314.PublicKey(receiverInfo.value.owner);
|
|
14268
|
-
const message = lzUtilities.arrayify(message_);
|
|
14269
|
-
const accounts = await getLzReceiveAccounts(
|
|
14270
|
-
connection,
|
|
14271
|
-
executor,
|
|
14272
|
-
receiver,
|
|
14273
|
-
receiverProgram,
|
|
14274
|
-
{
|
|
14275
|
-
srcEid,
|
|
14276
|
-
sender: Array.from(lzUtilities.arrayify(sender)),
|
|
14277
|
-
guid: Array.from(lzUtilities.arrayify(guid)),
|
|
14278
|
-
message,
|
|
14279
|
-
callerParams: extraData,
|
|
14280
|
-
nonce: parseInt(packet.nonce)
|
|
14281
|
-
},
|
|
14282
|
-
commitmentOrConfig
|
|
14283
|
-
);
|
|
14284
|
-
return createExecuteInstruction(
|
|
14285
|
-
{
|
|
14286
|
-
executor,
|
|
14287
|
-
config,
|
|
14288
|
-
endpointProgram,
|
|
14289
|
-
endpointEventAuthority: endpointEventDeriver.eventAuthority()[0],
|
|
14290
|
-
program: this.program,
|
|
14291
|
-
eventAuthority: executorEventDeriver.eventAuthority()[0],
|
|
14292
|
-
anchorRemainingAccounts: [
|
|
14293
|
-
{
|
|
14294
|
-
pubkey: receiverProgram,
|
|
14295
|
-
isWritable: false,
|
|
14296
|
-
isSigner: false
|
|
14297
|
-
},
|
|
14298
|
-
...accounts
|
|
14299
|
-
]
|
|
14300
|
-
},
|
|
14301
|
-
{
|
|
14302
|
-
params: {
|
|
14303
|
-
receiver,
|
|
14304
|
-
lzReceive: {
|
|
14305
|
-
srcEid,
|
|
14306
|
-
sender: Array.from(lzUtilities.arrayify(sender)),
|
|
14307
|
-
nonce: parseInt(nonce),
|
|
14308
|
-
guid: Array.from(lzUtilities.arrayify(guid)),
|
|
14309
|
-
message,
|
|
14310
|
-
extraData
|
|
14311
|
-
},
|
|
14312
|
-
value,
|
|
14313
|
-
computeUnits
|
|
14314
|
-
}
|
|
14315
|
-
},
|
|
14316
|
-
this.program
|
|
14317
|
-
);
|
|
14318
|
-
}
|
|
14319
14246
|
/**
|
|
14320
14247
|
* Composes a transaction.
|
|
14321
14248
|
*
|