@layerzerolabs/lz-solana-sdk-v2 3.0.104 → 3.0.105-mpt.0
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 +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/dist/index.d.mts
CHANGED
|
@@ -10943,21 +10943,6 @@ declare class Executor {
|
|
|
10943
10943
|
* @returns {AccountMeta[]} The account meta array.
|
|
10944
10944
|
*/
|
|
10945
10945
|
getQuoteIXAccountMetaForCPI(priceFeedConfig: PublicKey, priceFeedProgram: PublicKey, payment: boolean): AccountMeta[];
|
|
10946
|
-
/**
|
|
10947
|
-
* Executes a transaction.
|
|
10948
|
-
*
|
|
10949
|
-
* @param {Connection} connection - The connection.
|
|
10950
|
-
* @param {PublicKey} executor - The executor public key.
|
|
10951
|
-
* @param {PublicKey} endpointProgram - The endpoint program public key.
|
|
10952
|
-
* @param {Packet} packet - The packet.
|
|
10953
|
-
* @param {Uint8Array} extraData - The extra data.
|
|
10954
|
-
* @param {BN} [value] - The value.
|
|
10955
|
-
* @param {number} [computeUnits] - The compute units.
|
|
10956
|
-
* @param {Commitment} [commitmentOrConfig] - The commitment or configuration.
|
|
10957
|
-
*
|
|
10958
|
-
* @returns {Promise<TransactionInstruction>} A promise that resolves to the transaction instruction.
|
|
10959
|
-
*/
|
|
10960
|
-
execute(connection: Connection, executor: PublicKey, endpointProgram: PublicKey, packet: Packet$2, extraData: Uint8Array, value?: BN, computeUnits?: number, commitmentOrConfig?: Commitment): Promise<TransactionInstruction>;
|
|
10961
10946
|
/**
|
|
10962
10947
|
* Composes a transaction.
|
|
10963
10948
|
*
|
package/dist/index.d.ts
CHANGED
|
@@ -10943,21 +10943,6 @@ declare class Executor {
|
|
|
10943
10943
|
* @returns {AccountMeta[]} The account meta array.
|
|
10944
10944
|
*/
|
|
10945
10945
|
getQuoteIXAccountMetaForCPI(priceFeedConfig: PublicKey, priceFeedProgram: PublicKey, payment: boolean): AccountMeta[];
|
|
10946
|
-
/**
|
|
10947
|
-
* Executes a transaction.
|
|
10948
|
-
*
|
|
10949
|
-
* @param {Connection} connection - The connection.
|
|
10950
|
-
* @param {PublicKey} executor - The executor public key.
|
|
10951
|
-
* @param {PublicKey} endpointProgram - The endpoint program public key.
|
|
10952
|
-
* @param {Packet} packet - The packet.
|
|
10953
|
-
* @param {Uint8Array} extraData - The extra data.
|
|
10954
|
-
* @param {BN} [value] - The value.
|
|
10955
|
-
* @param {number} [computeUnits] - The compute units.
|
|
10956
|
-
* @param {Commitment} [commitmentOrConfig] - The commitment or configuration.
|
|
10957
|
-
*
|
|
10958
|
-
* @returns {Promise<TransactionInstruction>} A promise that resolves to the transaction instruction.
|
|
10959
|
-
*/
|
|
10960
|
-
execute(connection: Connection, executor: PublicKey, endpointProgram: PublicKey, packet: Packet$2, extraData: Uint8Array, value?: BN, computeUnits?: number, commitmentOrConfig?: Commitment): Promise<TransactionInstruction>;
|
|
10961
10946
|
/**
|
|
10962
10947
|
* Composes a transaction.
|
|
10963
10948
|
*
|
package/dist/index.mjs
CHANGED
|
@@ -14215,79 +14215,6 @@ var Executor = class {
|
|
|
14215
14215
|
}
|
|
14216
14216
|
].concat(ixAccounts);
|
|
14217
14217
|
}
|
|
14218
|
-
/**
|
|
14219
|
-
* Executes a transaction.
|
|
14220
|
-
*
|
|
14221
|
-
* @param {Connection} connection - The connection.
|
|
14222
|
-
* @param {PublicKey} executor - The executor public key.
|
|
14223
|
-
* @param {PublicKey} endpointProgram - The endpoint program public key.
|
|
14224
|
-
* @param {Packet} packet - The packet.
|
|
14225
|
-
* @param {Uint8Array} extraData - The extra data.
|
|
14226
|
-
* @param {BN} [value] - The value.
|
|
14227
|
-
* @param {number} [computeUnits] - The compute units.
|
|
14228
|
-
* @param {Commitment} [commitmentOrConfig] - The commitment or configuration.
|
|
14229
|
-
*
|
|
14230
|
-
* @returns {Promise<TransactionInstruction>} A promise that resolves to the transaction instruction.
|
|
14231
|
-
*/
|
|
14232
|
-
async execute(connection, executor, endpointProgram, packet, extraData, value = new BN(0), computeUnits = 2e5, commitmentOrConfig) {
|
|
14233
|
-
const [config] = this.deriver.config();
|
|
14234
|
-
const endpointEventDeriver = new EventPDADeriver(endpointProgram);
|
|
14235
|
-
const executorEventDeriver = new EventPDADeriver(this.program);
|
|
14236
|
-
const { message: message_, sender, srcEid, guid, receiver: receiver_, nonce } = packet;
|
|
14237
|
-
const receiver = new PublicKey(addressToBytes32(receiver_));
|
|
14238
|
-
const receiverInfo = await connection.getParsedAccountInfo(receiver, commitmentOrConfig);
|
|
14239
|
-
const receiverProgram = new PublicKey(receiverInfo.value.owner);
|
|
14240
|
-
const message = arrayify(message_);
|
|
14241
|
-
const accounts = await getLzReceiveAccounts(
|
|
14242
|
-
connection,
|
|
14243
|
-
executor,
|
|
14244
|
-
receiver,
|
|
14245
|
-
receiverProgram,
|
|
14246
|
-
{
|
|
14247
|
-
srcEid,
|
|
14248
|
-
sender: Array.from(arrayify(sender)),
|
|
14249
|
-
guid: Array.from(arrayify(guid)),
|
|
14250
|
-
message,
|
|
14251
|
-
callerParams: extraData,
|
|
14252
|
-
nonce: parseInt(packet.nonce)
|
|
14253
|
-
},
|
|
14254
|
-
commitmentOrConfig
|
|
14255
|
-
);
|
|
14256
|
-
return createExecuteInstruction(
|
|
14257
|
-
{
|
|
14258
|
-
executor,
|
|
14259
|
-
config,
|
|
14260
|
-
endpointProgram,
|
|
14261
|
-
endpointEventAuthority: endpointEventDeriver.eventAuthority()[0],
|
|
14262
|
-
program: this.program,
|
|
14263
|
-
eventAuthority: executorEventDeriver.eventAuthority()[0],
|
|
14264
|
-
anchorRemainingAccounts: [
|
|
14265
|
-
{
|
|
14266
|
-
pubkey: receiverProgram,
|
|
14267
|
-
isWritable: false,
|
|
14268
|
-
isSigner: false
|
|
14269
|
-
},
|
|
14270
|
-
...accounts
|
|
14271
|
-
]
|
|
14272
|
-
},
|
|
14273
|
-
{
|
|
14274
|
-
params: {
|
|
14275
|
-
receiver,
|
|
14276
|
-
lzReceive: {
|
|
14277
|
-
srcEid,
|
|
14278
|
-
sender: Array.from(arrayify(sender)),
|
|
14279
|
-
nonce: parseInt(nonce),
|
|
14280
|
-
guid: Array.from(arrayify(guid)),
|
|
14281
|
-
message,
|
|
14282
|
-
extraData
|
|
14283
|
-
},
|
|
14284
|
-
value,
|
|
14285
|
-
computeUnits
|
|
14286
|
-
}
|
|
14287
|
-
},
|
|
14288
|
-
this.program
|
|
14289
|
-
);
|
|
14290
|
-
}
|
|
14291
14218
|
/**
|
|
14292
14219
|
* Composes a transaction.
|
|
14293
14220
|
*
|