@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/umi.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as _metaplex_foundation_umi from '@metaplex-foundation/umi';
|
|
2
|
-
import { PublicKey, Pda, Account, RpcAccount, Context, RpcGetAccountOptions, RpcGetAccountsOptions, Option, OptionOrNullable, ProgramError, Program, Signer, TransactionBuilder, ProgramRepositoryInterface, RpcInterface, ClusterFilter, WrappedInstruction, Commitment, AccountMeta, Instruction } from '@metaplex-foundation/umi';
|
|
2
|
+
import { PublicKey, Pda, Account, RpcAccount, Context, RpcGetAccountOptions, RpcGetAccountsOptions, Option, OptionOrNullable, ProgramError, Program, Signer, TransactionBuilder, ProgramRepositoryInterface, RpcInterface, ClusterFilter, WrappedInstruction, Commitment, AccountMeta, Instruction as Instruction$1, KeypairSigner } from '@metaplex-foundation/umi';
|
|
3
3
|
import { PacketV1Codec, Packet as Packet$2 } from '@layerzerolabs/lz-v2-utilities';
|
|
4
4
|
import { Serializer, GetDataEnumKindContent, GetDataEnumKind } from '@metaplex-foundation/umi/serializers';
|
|
5
5
|
import { HashSigner } from '@layerzerolabs/lz-foundation';
|
|
@@ -115,8 +115,10 @@ declare class EventPDA {
|
|
|
115
115
|
declare class ExecutorPDA {
|
|
116
116
|
program: PublicKey;
|
|
117
117
|
static EXECUTOR_CONFIG_SEED: string;
|
|
118
|
+
static EXECUTION_CONTEXT_SEED: string;
|
|
118
119
|
constructor(program: PublicKey);
|
|
119
120
|
config(): Pda;
|
|
121
|
+
context(executor: PublicKey, version: number): Pda;
|
|
120
122
|
}
|
|
121
123
|
declare class PriceFeedPDA {
|
|
122
124
|
program: PublicKey;
|
|
@@ -4825,12 +4827,12 @@ declare class DVN {
|
|
|
4825
4827
|
constructor(programId: PublicKey, rpc?: RpcInterface);
|
|
4826
4828
|
getProgram(clusterFilter?: ClusterFilter): Program;
|
|
4827
4829
|
initDVN(rpc: RpcInterface, payer: Signer, params: InitDvnInstructionArgs): Promise<WrappedInstruction>;
|
|
4828
|
-
getDigest(vid: number, instruction: Instruction, expiration: bigint): ExecuteTransactionDigest;
|
|
4830
|
+
getDigest(vid: number, instruction: Instruction$1, expiration: bigint): ExecuteTransactionDigest;
|
|
4829
4831
|
getExecuteHash(hashBytes: Buffer): PublicKey;
|
|
4830
4832
|
getHashBytes(digest: ExecuteTransactionDigest): Buffer;
|
|
4831
4833
|
invoke(rpc: RpcInterface, payer: Signer, params: {
|
|
4832
4834
|
vid: number;
|
|
4833
|
-
instruction: Instruction;
|
|
4835
|
+
instruction: Instruction$1;
|
|
4834
4836
|
expiration: bigint;
|
|
4835
4837
|
}, sign: SignFunc): Promise<WrappedInstruction>;
|
|
4836
4838
|
setMultisigConfig(rpc: RpcInterface, payer: Signer, params: {
|
|
@@ -4871,6 +4873,37 @@ type dvn_DVN = DVN;
|
|
|
4871
4873
|
export { dvn_DVN as DVN, dvn_DVN_PROGRAM_ID as DVN_PROGRAM_ID, type dvn_SignFunc as SignFunc, dvn_SolanaSignerExt as SolanaSignerExt, index$j as accounts, index$i as errors, index$h as events, index$g as instructions, index$k as types };
|
|
4872
4874
|
}
|
|
4873
4875
|
|
|
4876
|
+
type ExecutionContextV1 = Account<ExecutionContextV1AccountData>;
|
|
4877
|
+
type ExecutionContextV1AccountData = {
|
|
4878
|
+
discriminator: Uint8Array;
|
|
4879
|
+
initialPayerBalance: bigint;
|
|
4880
|
+
/**
|
|
4881
|
+
* The maximum total lamports allowed to be used by all instructions in this execution.
|
|
4882
|
+
* This is a hard cap for the sum of lamports consumed by all instructions in the execution batch.
|
|
4883
|
+
*/
|
|
4884
|
+
feeLimit: bigint;
|
|
4885
|
+
};
|
|
4886
|
+
type ExecutionContextV1AccountDataArgs = {
|
|
4887
|
+
initialPayerBalance: number | bigint;
|
|
4888
|
+
/**
|
|
4889
|
+
* The maximum total lamports allowed to be used by all instructions in this execution.
|
|
4890
|
+
* This is a hard cap for the sum of lamports consumed by all instructions in the execution batch.
|
|
4891
|
+
*/
|
|
4892
|
+
feeLimit: number | bigint;
|
|
4893
|
+
};
|
|
4894
|
+
declare function getExecutionContextV1AccountDataSerializer(): Serializer<ExecutionContextV1AccountDataArgs, ExecutionContextV1AccountData>;
|
|
4895
|
+
declare function deserializeExecutionContextV1(rawAccount: RpcAccount): ExecutionContextV1;
|
|
4896
|
+
declare function fetchExecutionContextV1(context: Pick<Context, 'rpc'>, publicKey: PublicKey | Pda, options?: RpcGetAccountOptions): Promise<ExecutionContextV1>;
|
|
4897
|
+
declare function safeFetchExecutionContextV1(context: Pick<Context, 'rpc'>, publicKey: PublicKey | Pda, options?: RpcGetAccountOptions): Promise<ExecutionContextV1 | null>;
|
|
4898
|
+
declare function fetchAllExecutionContextV1(context: Pick<Context, 'rpc'>, publicKeys: Array<PublicKey | Pda>, options?: RpcGetAccountsOptions): Promise<ExecutionContextV1[]>;
|
|
4899
|
+
declare function safeFetchAllExecutionContextV1(context: Pick<Context, 'rpc'>, publicKeys: Array<PublicKey | Pda>, options?: RpcGetAccountsOptions): Promise<ExecutionContextV1[]>;
|
|
4900
|
+
declare function getExecutionContextV1GpaBuilder(context: Pick<Context, 'rpc' | 'programs'>): _metaplex_foundation_umi.GpaBuilder<ExecutionContextV1, {
|
|
4901
|
+
discriminator: Uint8Array;
|
|
4902
|
+
initialPayerBalance: number | bigint;
|
|
4903
|
+
feeLimit: number | bigint;
|
|
4904
|
+
}>;
|
|
4905
|
+
declare function getExecutionContextV1Size(): number;
|
|
4906
|
+
|
|
4874
4907
|
/**
|
|
4875
4908
|
* This code was AUTOGENERATED using the kinobi library.
|
|
4876
4909
|
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
@@ -4999,32 +5032,6 @@ type LzOption = {
|
|
|
4999
5032
|
type LzOptionArgs = LzOption;
|
|
5000
5033
|
declare function getLzOptionSerializer(): Serializer<LzOptionArgs, LzOption>;
|
|
5001
5034
|
|
|
5002
|
-
/**
|
|
5003
|
-
* This code was AUTOGENERATED using the kinobi library.
|
|
5004
|
-
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
5005
|
-
* to add features, then rerun kinobi to update it.
|
|
5006
|
-
*
|
|
5007
|
-
* @see https://github.com/kinobi-so/kinobi
|
|
5008
|
-
*/
|
|
5009
|
-
|
|
5010
|
-
type LzReceiveParams$1 = {
|
|
5011
|
-
srcEid: number;
|
|
5012
|
-
sender: Uint8Array;
|
|
5013
|
-
nonce: bigint;
|
|
5014
|
-
guid: Uint8Array;
|
|
5015
|
-
message: Uint8Array;
|
|
5016
|
-
extraData: Uint8Array;
|
|
5017
|
-
};
|
|
5018
|
-
type LzReceiveParamsArgs$1 = {
|
|
5019
|
-
srcEid: number;
|
|
5020
|
-
sender: Uint8Array;
|
|
5021
|
-
nonce: number | bigint;
|
|
5022
|
-
guid: Uint8Array;
|
|
5023
|
-
message: Uint8Array;
|
|
5024
|
-
extraData: Uint8Array;
|
|
5025
|
-
};
|
|
5026
|
-
declare function getLzReceiveParamsSerializer$1(): Serializer<LzReceiveParamsArgs$1, LzReceiveParams$1>;
|
|
5027
|
-
|
|
5028
5035
|
/**
|
|
5029
5036
|
* This code was AUTOGENERATED using the kinobi library.
|
|
5030
5037
|
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
@@ -5122,7 +5129,7 @@ type index$e_Acl = Acl;
|
|
|
5122
5129
|
declare const index$e_isOwnerSetConfigParams: typeof isOwnerSetConfigParams;
|
|
5123
5130
|
declare const index$e_ownerSetConfigParams: typeof ownerSetConfigParams;
|
|
5124
5131
|
declare namespace index$e {
|
|
5125
|
-
export { type index$e_Acl as Acl, type index$e_AclArgs as AclArgs, type index$e_AdminSetConfigParams as AdminSetConfigParams, type index$e_AdminSetConfigParamsArgs as AdminSetConfigParamsArgs, type index$e_DstConfig as DstConfig, type index$e_DstConfigArgs as DstConfigArgs, index$e_ExecutionState as ExecutionState, type index$e_ExecutionStateArgs as ExecutionStateArgs, type LzComposeParams$1 as LzComposeParams, type index$e_LzComposeParamsArgs as LzComposeParamsArgs, type index$e_LzOption as LzOption, type index$e_LzOptionArgs as LzOptionArgs, type
|
|
5132
|
+
export { type index$e_Acl as Acl, type index$e_AclArgs as AclArgs, type index$e_AdminSetConfigParams as AdminSetConfigParams, type index$e_AdminSetConfigParamsArgs as AdminSetConfigParamsArgs, type index$e_DstConfig as DstConfig, type index$e_DstConfigArgs as DstConfigArgs, index$e_ExecutionState as ExecutionState, type index$e_ExecutionStateArgs as ExecutionStateArgs, type LzComposeParams$1 as LzComposeParams, type index$e_LzComposeParamsArgs as LzComposeParamsArgs, type index$e_LzOption as LzOption, type index$e_LzOptionArgs as LzOptionArgs, type index$e_NativeDropRequest as NativeDropRequest, type index$e_NativeDropRequestArgs as NativeDropRequestArgs, type index$e_OwnerSetConfigParams as OwnerSetConfigParams, type index$e_OwnerSetConfigParamsArgs as OwnerSetConfigParamsArgs, index$e_adminSetConfigParams as adminSetConfigParams, index$e_getAclSerializer as getAclSerializer, index$e_getAdminSetConfigParamsSerializer as getAdminSetConfigParamsSerializer, index$e_getDstConfigSerializer as getDstConfigSerializer, index$e_getExecutionStateSerializer as getExecutionStateSerializer, getLzComposeParamsSerializer$1 as getLzComposeParamsSerializer, index$e_getLzOptionSerializer as getLzOptionSerializer, index$e_getNativeDropRequestSerializer as getNativeDropRequestSerializer, index$e_getOwnerSetConfigParamsSerializer as getOwnerSetConfigParamsSerializer, index$e_isAdminSetConfigParams as isAdminSetConfigParams, index$e_isOwnerSetConfigParams as isOwnerSetConfigParams, index$e_ownerSetConfigParams as ownerSetConfigParams };
|
|
5126
5133
|
}
|
|
5127
5134
|
|
|
5128
5135
|
type ExecutorConfig$1 = Account<ExecutorConfigAccountData>;
|
|
@@ -5205,28 +5212,39 @@ declare function getNonceSize(): number;
|
|
|
5205
5212
|
* @see https://github.com/kinobi-so/kinobi
|
|
5206
5213
|
*/
|
|
5207
5214
|
|
|
5208
|
-
type index$
|
|
5215
|
+
type index$d_ExecutionContextV1 = ExecutionContextV1;
|
|
5216
|
+
type index$d_ExecutionContextV1AccountData = ExecutionContextV1AccountData;
|
|
5217
|
+
type index$d_ExecutionContextV1AccountDataArgs = ExecutionContextV1AccountDataArgs;
|
|
5218
|
+
type index$d_ExecutorConfigAccountData = ExecutorConfigAccountData;
|
|
5209
5219
|
type index$d_ExecutorConfigAccountDataArgs = ExecutorConfigAccountDataArgs;
|
|
5210
5220
|
type index$d_Nonce = Nonce;
|
|
5211
5221
|
type index$d_NonceAccountData = NonceAccountData;
|
|
5212
5222
|
type index$d_NonceAccountDataArgs = NonceAccountDataArgs;
|
|
5223
|
+
declare const index$d_deserializeExecutionContextV1: typeof deserializeExecutionContextV1;
|
|
5213
5224
|
declare const index$d_deserializeExecutorConfig: typeof deserializeExecutorConfig;
|
|
5214
5225
|
declare const index$d_deserializeNonce: typeof deserializeNonce;
|
|
5226
|
+
declare const index$d_fetchAllExecutionContextV1: typeof fetchAllExecutionContextV1;
|
|
5215
5227
|
declare const index$d_fetchAllExecutorConfig: typeof fetchAllExecutorConfig;
|
|
5216
5228
|
declare const index$d_fetchAllNonce: typeof fetchAllNonce;
|
|
5229
|
+
declare const index$d_fetchExecutionContextV1: typeof fetchExecutionContextV1;
|
|
5217
5230
|
declare const index$d_fetchExecutorConfig: typeof fetchExecutorConfig;
|
|
5218
5231
|
declare const index$d_fetchNonce: typeof fetchNonce;
|
|
5232
|
+
declare const index$d_getExecutionContextV1AccountDataSerializer: typeof getExecutionContextV1AccountDataSerializer;
|
|
5233
|
+
declare const index$d_getExecutionContextV1GpaBuilder: typeof getExecutionContextV1GpaBuilder;
|
|
5234
|
+
declare const index$d_getExecutionContextV1Size: typeof getExecutionContextV1Size;
|
|
5219
5235
|
declare const index$d_getExecutorConfigAccountDataSerializer: typeof getExecutorConfigAccountDataSerializer;
|
|
5220
5236
|
declare const index$d_getExecutorConfigGpaBuilder: typeof getExecutorConfigGpaBuilder;
|
|
5221
5237
|
declare const index$d_getNonceAccountDataSerializer: typeof getNonceAccountDataSerializer;
|
|
5222
5238
|
declare const index$d_getNonceGpaBuilder: typeof getNonceGpaBuilder;
|
|
5223
5239
|
declare const index$d_getNonceSize: typeof getNonceSize;
|
|
5240
|
+
declare const index$d_safeFetchAllExecutionContextV1: typeof safeFetchAllExecutionContextV1;
|
|
5224
5241
|
declare const index$d_safeFetchAllExecutorConfig: typeof safeFetchAllExecutorConfig;
|
|
5225
5242
|
declare const index$d_safeFetchAllNonce: typeof safeFetchAllNonce;
|
|
5243
|
+
declare const index$d_safeFetchExecutionContextV1: typeof safeFetchExecutionContextV1;
|
|
5226
5244
|
declare const index$d_safeFetchExecutorConfig: typeof safeFetchExecutorConfig;
|
|
5227
5245
|
declare const index$d_safeFetchNonce: typeof safeFetchNonce;
|
|
5228
5246
|
declare namespace index$d {
|
|
5229
|
-
export { type ExecutorConfig$1 as ExecutorConfig, type index$d_ExecutorConfigAccountData as ExecutorConfigAccountData, type index$d_ExecutorConfigAccountDataArgs as ExecutorConfigAccountDataArgs, type index$d_Nonce as Nonce, type index$d_NonceAccountData as NonceAccountData, type index$d_NonceAccountDataArgs as NonceAccountDataArgs, index$d_deserializeExecutorConfig as deserializeExecutorConfig, index$d_deserializeNonce as deserializeNonce, index$d_fetchAllExecutorConfig as fetchAllExecutorConfig, index$d_fetchAllNonce as fetchAllNonce, index$d_fetchExecutorConfig as fetchExecutorConfig, index$d_fetchNonce as fetchNonce, index$d_getExecutorConfigAccountDataSerializer as getExecutorConfigAccountDataSerializer, index$d_getExecutorConfigGpaBuilder as getExecutorConfigGpaBuilder, index$d_getNonceAccountDataSerializer as getNonceAccountDataSerializer, index$d_getNonceGpaBuilder as getNonceGpaBuilder, index$d_getNonceSize as getNonceSize, index$d_safeFetchAllExecutorConfig as safeFetchAllExecutorConfig, index$d_safeFetchAllNonce as safeFetchAllNonce, index$d_safeFetchExecutorConfig as safeFetchExecutorConfig, index$d_safeFetchNonce as safeFetchNonce };
|
|
5247
|
+
export { type index$d_ExecutionContextV1 as ExecutionContextV1, type index$d_ExecutionContextV1AccountData as ExecutionContextV1AccountData, type index$d_ExecutionContextV1AccountDataArgs as ExecutionContextV1AccountDataArgs, type ExecutorConfig$1 as ExecutorConfig, type index$d_ExecutorConfigAccountData as ExecutorConfigAccountData, type index$d_ExecutorConfigAccountDataArgs as ExecutorConfigAccountDataArgs, type index$d_Nonce as Nonce, type index$d_NonceAccountData as NonceAccountData, type index$d_NonceAccountDataArgs as NonceAccountDataArgs, index$d_deserializeExecutionContextV1 as deserializeExecutionContextV1, index$d_deserializeExecutorConfig as deserializeExecutorConfig, index$d_deserializeNonce as deserializeNonce, index$d_fetchAllExecutionContextV1 as fetchAllExecutionContextV1, index$d_fetchAllExecutorConfig as fetchAllExecutorConfig, index$d_fetchAllNonce as fetchAllNonce, index$d_fetchExecutionContextV1 as fetchExecutionContextV1, index$d_fetchExecutorConfig as fetchExecutorConfig, index$d_fetchNonce as fetchNonce, index$d_getExecutionContextV1AccountDataSerializer as getExecutionContextV1AccountDataSerializer, index$d_getExecutionContextV1GpaBuilder as getExecutionContextV1GpaBuilder, index$d_getExecutionContextV1Size as getExecutionContextV1Size, index$d_getExecutorConfigAccountDataSerializer as getExecutorConfigAccountDataSerializer, index$d_getExecutorConfigGpaBuilder as getExecutorConfigGpaBuilder, index$d_getNonceAccountDataSerializer as getNonceAccountDataSerializer, index$d_getNonceGpaBuilder as getNonceGpaBuilder, index$d_getNonceSize as getNonceSize, index$d_safeFetchAllExecutionContextV1 as safeFetchAllExecutionContextV1, index$d_safeFetchAllExecutorConfig as safeFetchAllExecutorConfig, index$d_safeFetchAllNonce as safeFetchAllNonce, index$d_safeFetchExecutionContextV1 as safeFetchExecutionContextV1, index$d_safeFetchExecutorConfig as safeFetchExecutorConfig, index$d_safeFetchNonce as safeFetchNonce };
|
|
5230
5248
|
}
|
|
5231
5249
|
|
|
5232
5250
|
/**
|
|
@@ -5345,6 +5363,18 @@ declare class InvalidOwnerError extends ProgramError {
|
|
|
5345
5363
|
readonly code: number;
|
|
5346
5364
|
constructor(program: Program, cause?: Error);
|
|
5347
5365
|
}
|
|
5366
|
+
/** InvalidInstructionSequence */
|
|
5367
|
+
declare class InvalidInstructionSequenceError extends ProgramError {
|
|
5368
|
+
readonly name: string;
|
|
5369
|
+
readonly code: number;
|
|
5370
|
+
constructor(program: Program, cause?: Error);
|
|
5371
|
+
}
|
|
5372
|
+
/** ContextAccountAlreadyInitialized */
|
|
5373
|
+
declare class ContextAccountAlreadyInitializedError extends ProgramError {
|
|
5374
|
+
readonly name: string;
|
|
5375
|
+
readonly code: number;
|
|
5376
|
+
constructor(program: Program, cause?: Error);
|
|
5377
|
+
}
|
|
5348
5378
|
/**
|
|
5349
5379
|
* Attempts to resolve a custom program error from the provided error code.
|
|
5350
5380
|
* @category Errors
|
|
@@ -5364,12 +5394,16 @@ declare function getExecutorErrorFromName(name: string, program: Program, cause?
|
|
|
5364
5394
|
* @see https://github.com/kinobi-so/kinobi
|
|
5365
5395
|
*/
|
|
5366
5396
|
|
|
5367
|
-
type index$
|
|
5397
|
+
type index$c_ContextAccountAlreadyInitializedError = ContextAccountAlreadyInitializedError;
|
|
5398
|
+
declare const index$c_ContextAccountAlreadyInitializedError: typeof ContextAccountAlreadyInitializedError;
|
|
5399
|
+
type index$c_EidNotSupportedError = EidNotSupportedError;
|
|
5368
5400
|
declare const index$c_EidNotSupportedError: typeof EidNotSupportedError;
|
|
5369
5401
|
type index$c_ExecutorIsAdminError = ExecutorIsAdminError;
|
|
5370
5402
|
declare const index$c_ExecutorIsAdminError: typeof ExecutorIsAdminError;
|
|
5371
5403
|
type index$c_InsufficientBalanceError = InsufficientBalanceError;
|
|
5372
5404
|
declare const index$c_InsufficientBalanceError: typeof InsufficientBalanceError;
|
|
5405
|
+
type index$c_InvalidInstructionSequenceError = InvalidInstructionSequenceError;
|
|
5406
|
+
declare const index$c_InvalidInstructionSequenceError: typeof InvalidInstructionSequenceError;
|
|
5373
5407
|
type index$c_InvalidNativeDropReceiverError = InvalidNativeDropReceiverError;
|
|
5374
5408
|
declare const index$c_InvalidNativeDropReceiverError: typeof InvalidNativeDropReceiverError;
|
|
5375
5409
|
type index$c_InvalidNativeDropRequestsLengthError = InvalidNativeDropRequestsLengthError;
|
|
@@ -5401,7 +5435,7 @@ type index$c_EidNotSupportedError = EidNotSupportedError;
|
|
|
5401
5435
|
declare const index$c_getExecutorErrorFromCode: typeof getExecutorErrorFromCode;
|
|
5402
5436
|
declare const index$c_getExecutorErrorFromName: typeof getExecutorErrorFromName;
|
|
5403
5437
|
declare namespace index$c {
|
|
5404
|
-
export { index$c_EidNotSupportedError as EidNotSupportedError, index$c_ExecutorIsAdminError as ExecutorIsAdminError, index$c_InsufficientBalanceError as InsufficientBalanceError, index$c_InvalidNativeDropReceiverError as InvalidNativeDropReceiverError, index$c_InvalidNativeDropRequestsLengthError as InvalidNativeDropRequestsLengthError, index$c_InvalidOwnerError as InvalidOwnerError, InvalidSizeError$1 as InvalidSizeError, index$c_MsgLibNotAllowedError as MsgLibNotAllowedError, index$c_NativeAmountExceedsCapError as NativeAmountExceedsCapError, index$c_NotAdminError as NotAdminError, index$c_NotExecutorError as NotExecutorError, index$c_PausedError as PausedError, index$c_TooManyAdminsError as TooManyAdminsError, index$c_TooManyExecutorsError as TooManyExecutorsError, index$c_TooManyOptionTypesError as TooManyOptionTypesError, index$c_UnsupportedOptionTypeError as UnsupportedOptionTypeError, index$c_ZeroLzComposeGasProvidedError as ZeroLzComposeGasProvidedError, index$c_ZeroLzReceiveGasProvidedError as ZeroLzReceiveGasProvidedError, index$c_getExecutorErrorFromCode as getExecutorErrorFromCode, index$c_getExecutorErrorFromName as getExecutorErrorFromName };
|
|
5438
|
+
export { index$c_ContextAccountAlreadyInitializedError as ContextAccountAlreadyInitializedError, index$c_EidNotSupportedError as EidNotSupportedError, index$c_ExecutorIsAdminError as ExecutorIsAdminError, index$c_InsufficientBalanceError as InsufficientBalanceError, index$c_InvalidInstructionSequenceError as InvalidInstructionSequenceError, index$c_InvalidNativeDropReceiverError as InvalidNativeDropReceiverError, index$c_InvalidNativeDropRequestsLengthError as InvalidNativeDropRequestsLengthError, index$c_InvalidOwnerError as InvalidOwnerError, InvalidSizeError$1 as InvalidSizeError, index$c_MsgLibNotAllowedError as MsgLibNotAllowedError, index$c_NativeAmountExceedsCapError as NativeAmountExceedsCapError, index$c_NotAdminError as NotAdminError, index$c_NotExecutorError as NotExecutorError, index$c_PausedError as PausedError, index$c_TooManyAdminsError as TooManyAdminsError, index$c_TooManyExecutorsError as TooManyExecutorsError, index$c_TooManyOptionTypesError as TooManyOptionTypesError, index$c_UnsupportedOptionTypeError as UnsupportedOptionTypeError, index$c_ZeroLzComposeGasProvidedError as ZeroLzComposeGasProvidedError, index$c_ZeroLzReceiveGasProvidedError as ZeroLzReceiveGasProvidedError, index$c_getExecutorErrorFromCode as getExecutorErrorFromCode, index$c_getExecutorErrorFromName as getExecutorErrorFromName };
|
|
5405
5439
|
}
|
|
5406
5440
|
|
|
5407
5441
|
/**
|
|
@@ -5523,40 +5557,6 @@ declare function getExecutableInstructionDataSerializer(): Serializer<Executable
|
|
|
5523
5557
|
type ExecutableInstructionArgs = ExecutableInstructionDataArgs;
|
|
5524
5558
|
declare function executable(context: Pick<Context, 'programs'>, accounts: ExecutableInstructionAccounts, args: ExecutableInstructionArgs): TransactionBuilder;
|
|
5525
5559
|
|
|
5526
|
-
/**
|
|
5527
|
-
* This code was AUTOGENERATED using the kinobi library.
|
|
5528
|
-
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
5529
|
-
* to add features, then rerun kinobi to update it.
|
|
5530
|
-
*
|
|
5531
|
-
* @see https://github.com/kinobi-so/kinobi
|
|
5532
|
-
*/
|
|
5533
|
-
|
|
5534
|
-
type ExecuteInstructionAccounts = {
|
|
5535
|
-
executor: Signer;
|
|
5536
|
-
config: PublicKey | Pda;
|
|
5537
|
-
endpointProgram: PublicKey | Pda;
|
|
5538
|
-
/** The authority for the endpoint program to emit events */
|
|
5539
|
-
endpointEventAuthority: PublicKey | Pda;
|
|
5540
|
-
eventAuthority: PublicKey | Pda;
|
|
5541
|
-
program: PublicKey | Pda;
|
|
5542
|
-
};
|
|
5543
|
-
type ExecuteInstructionData = {
|
|
5544
|
-
discriminator: Uint8Array;
|
|
5545
|
-
receiver: PublicKey;
|
|
5546
|
-
lzReceive: LzReceiveParams$1;
|
|
5547
|
-
value: bigint;
|
|
5548
|
-
computeUnits: bigint;
|
|
5549
|
-
};
|
|
5550
|
-
type ExecuteInstructionDataArgs = {
|
|
5551
|
-
receiver: PublicKey;
|
|
5552
|
-
lzReceive: LzReceiveParamsArgs$1;
|
|
5553
|
-
value: number | bigint;
|
|
5554
|
-
computeUnits: number | bigint;
|
|
5555
|
-
};
|
|
5556
|
-
declare function getExecuteInstructionDataSerializer(): Serializer<ExecuteInstructionDataArgs, ExecuteInstructionData>;
|
|
5557
|
-
type ExecuteInstructionArgs = ExecuteInstructionDataArgs;
|
|
5558
|
-
declare function execute(context: Pick<Context, 'programs'>, input: ExecuteInstructionAccounts & ExecuteInstructionArgs): TransactionBuilder;
|
|
5559
|
-
|
|
5560
5560
|
/**
|
|
5561
5561
|
* This code was AUTOGENERATED using the kinobi library.
|
|
5562
5562
|
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
@@ -5669,6 +5669,70 @@ declare function getOwnerSetConfigInstructionDataSerializer(): Serializer<OwnerS
|
|
|
5669
5669
|
type OwnerSetConfigInstructionArgs = OwnerSetConfigInstructionDataArgs;
|
|
5670
5670
|
declare function ownerSetConfig(context: Pick<Context, 'programs'>, input: OwnerSetConfigInstructionAccounts & OwnerSetConfigInstructionArgs): TransactionBuilder;
|
|
5671
5671
|
|
|
5672
|
+
/**
|
|
5673
|
+
* This code was AUTOGENERATED using the kinobi library.
|
|
5674
|
+
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
5675
|
+
* to add features, then rerun kinobi to update it.
|
|
5676
|
+
*
|
|
5677
|
+
* @see https://github.com/kinobi-so/kinobi
|
|
5678
|
+
*/
|
|
5679
|
+
|
|
5680
|
+
type PostExecuteInstructionAccounts = {
|
|
5681
|
+
executor: Signer;
|
|
5682
|
+
/** Execution context account containing state from pre-execution */
|
|
5683
|
+
context: PublicKey | Pda;
|
|
5684
|
+
/** Instruction sysvar account for introspection */
|
|
5685
|
+
instructionSysvar?: PublicKey | Pda;
|
|
5686
|
+
};
|
|
5687
|
+
type PostExecuteInstructionData = {
|
|
5688
|
+
discriminator: Uint8Array;
|
|
5689
|
+
/** Version of the execution context to use */
|
|
5690
|
+
contextVersion: number;
|
|
5691
|
+
};
|
|
5692
|
+
type PostExecuteInstructionDataArgs = {
|
|
5693
|
+
/** Version of the execution context to use */
|
|
5694
|
+
contextVersion: number;
|
|
5695
|
+
};
|
|
5696
|
+
declare function getPostExecuteInstructionDataSerializer(): Serializer<PostExecuteInstructionDataArgs, PostExecuteInstructionData>;
|
|
5697
|
+
type PostExecuteInstructionArgs = PostExecuteInstructionDataArgs;
|
|
5698
|
+
declare function postExecute(context: Pick<Context, 'programs'>, input: PostExecuteInstructionAccounts & PostExecuteInstructionArgs): TransactionBuilder;
|
|
5699
|
+
|
|
5700
|
+
/**
|
|
5701
|
+
* This code was AUTOGENERATED using the kinobi library.
|
|
5702
|
+
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
5703
|
+
* to add features, then rerun kinobi to update it.
|
|
5704
|
+
*
|
|
5705
|
+
* @see https://github.com/kinobi-so/kinobi
|
|
5706
|
+
*/
|
|
5707
|
+
|
|
5708
|
+
type PreExecuteInstructionAccounts = {
|
|
5709
|
+
executor: Signer;
|
|
5710
|
+
/**
|
|
5711
|
+
* Execution context account that stores state between pre and post execution.
|
|
5712
|
+
* This account is versioned to support future protocol upgrades.
|
|
5713
|
+
*/
|
|
5714
|
+
context: PublicKey | Pda;
|
|
5715
|
+
systemProgram?: PublicKey | Pda;
|
|
5716
|
+
/** Instruction sysvar account for introspection */
|
|
5717
|
+
instructionSysvar?: PublicKey | Pda;
|
|
5718
|
+
};
|
|
5719
|
+
type PreExecuteInstructionData = {
|
|
5720
|
+
discriminator: Uint8Array;
|
|
5721
|
+
/** Version of the execution context to use */
|
|
5722
|
+
contextVersion: number;
|
|
5723
|
+
/** Maximum fee that can be charged for execution */
|
|
5724
|
+
feeLimit: bigint;
|
|
5725
|
+
};
|
|
5726
|
+
type PreExecuteInstructionDataArgs = {
|
|
5727
|
+
/** Version of the execution context to use */
|
|
5728
|
+
contextVersion: number;
|
|
5729
|
+
/** Maximum fee that can be charged for execution */
|
|
5730
|
+
feeLimit: number | bigint;
|
|
5731
|
+
};
|
|
5732
|
+
declare function getPreExecuteInstructionDataSerializer(): Serializer<PreExecuteInstructionDataArgs, PreExecuteInstructionData>;
|
|
5733
|
+
type PreExecuteInstructionArgs = PreExecuteInstructionDataArgs;
|
|
5734
|
+
declare function preExecute(context: Pick<Context, 'programs'>, input: PreExecuteInstructionAccounts & PreExecuteInstructionArgs): TransactionBuilder;
|
|
5735
|
+
|
|
5672
5736
|
/**
|
|
5673
5737
|
* This code was AUTOGENERATED using the kinobi library.
|
|
5674
5738
|
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
@@ -5721,10 +5785,6 @@ type index$a_AdminSetConfigInstructionAccounts = AdminSetConfigInstructionAccoun
|
|
|
5721
5785
|
type index$a_ExecutableInstructionArgs = ExecutableInstructionArgs;
|
|
5722
5786
|
type index$a_ExecutableInstructionData = ExecutableInstructionData;
|
|
5723
5787
|
type index$a_ExecutableInstructionDataArgs = ExecutableInstructionDataArgs;
|
|
5724
|
-
type index$a_ExecuteInstructionAccounts = ExecuteInstructionAccounts;
|
|
5725
|
-
type index$a_ExecuteInstructionArgs = ExecuteInstructionArgs;
|
|
5726
|
-
type index$a_ExecuteInstructionData = ExecuteInstructionData;
|
|
5727
|
-
type index$a_ExecuteInstructionDataArgs = ExecuteInstructionDataArgs;
|
|
5728
5788
|
type index$a_ExtendExecutorConfigInstructionAccounts = ExtendExecutorConfigInstructionAccounts;
|
|
5729
5789
|
type index$a_ExtendExecutorConfigInstructionData = ExtendExecutorConfigInstructionData;
|
|
5730
5790
|
type index$a_ExtendExecutorConfigInstructionDataArgs = ExtendExecutorConfigInstructionDataArgs;
|
|
@@ -5740,6 +5800,14 @@ type index$a_AdminSetConfigInstructionAccounts = AdminSetConfigInstructionAccoun
|
|
|
5740
5800
|
type index$a_OwnerSetConfigInstructionArgs = OwnerSetConfigInstructionArgs;
|
|
5741
5801
|
type index$a_OwnerSetConfigInstructionData = OwnerSetConfigInstructionData;
|
|
5742
5802
|
type index$a_OwnerSetConfigInstructionDataArgs = OwnerSetConfigInstructionDataArgs;
|
|
5803
|
+
type index$a_PostExecuteInstructionAccounts = PostExecuteInstructionAccounts;
|
|
5804
|
+
type index$a_PostExecuteInstructionArgs = PostExecuteInstructionArgs;
|
|
5805
|
+
type index$a_PostExecuteInstructionData = PostExecuteInstructionData;
|
|
5806
|
+
type index$a_PostExecuteInstructionDataArgs = PostExecuteInstructionDataArgs;
|
|
5807
|
+
type index$a_PreExecuteInstructionAccounts = PreExecuteInstructionAccounts;
|
|
5808
|
+
type index$a_PreExecuteInstructionArgs = PreExecuteInstructionArgs;
|
|
5809
|
+
type index$a_PreExecuteInstructionData = PreExecuteInstructionData;
|
|
5810
|
+
type index$a_PreExecuteInstructionDataArgs = PreExecuteInstructionDataArgs;
|
|
5743
5811
|
type index$a_QuoteExecutorInstructionAccounts = QuoteExecutorInstructionAccounts;
|
|
5744
5812
|
type index$a_QuoteExecutorInstructionArgs = QuoteExecutorInstructionArgs;
|
|
5745
5813
|
type index$a_QuoteExecutorInstructionData = QuoteExecutorInstructionData;
|
|
@@ -5747,23 +5815,25 @@ type index$a_AdminSetConfigInstructionAccounts = AdminSetConfigInstructionAccoun
|
|
|
5747
5815
|
declare const index$a_adminSetConfig: typeof adminSetConfig;
|
|
5748
5816
|
declare const index$a_compose: typeof compose;
|
|
5749
5817
|
declare const index$a_executable: typeof executable;
|
|
5750
|
-
declare const index$a_execute: typeof execute;
|
|
5751
5818
|
declare const index$a_extendExecutorConfig: typeof extendExecutorConfig;
|
|
5752
5819
|
declare const index$a_getAdminSetConfigInstructionDataSerializer: typeof getAdminSetConfigInstructionDataSerializer;
|
|
5753
5820
|
declare const index$a_getComposeInstructionDataSerializer: typeof getComposeInstructionDataSerializer;
|
|
5754
5821
|
declare const index$a_getExecutableInstructionDataSerializer: typeof getExecutableInstructionDataSerializer;
|
|
5755
|
-
declare const index$a_getExecuteInstructionDataSerializer: typeof getExecuteInstructionDataSerializer;
|
|
5756
5822
|
declare const index$a_getExtendExecutorConfigInstructionDataSerializer: typeof getExtendExecutorConfigInstructionDataSerializer;
|
|
5757
5823
|
declare const index$a_getInitExecutorInstructionDataSerializer: typeof getInitExecutorInstructionDataSerializer;
|
|
5758
5824
|
declare const index$a_getNativeDropInstructionDataSerializer: typeof getNativeDropInstructionDataSerializer;
|
|
5759
5825
|
declare const index$a_getOwnerSetConfigInstructionDataSerializer: typeof getOwnerSetConfigInstructionDataSerializer;
|
|
5826
|
+
declare const index$a_getPostExecuteInstructionDataSerializer: typeof getPostExecuteInstructionDataSerializer;
|
|
5827
|
+
declare const index$a_getPreExecuteInstructionDataSerializer: typeof getPreExecuteInstructionDataSerializer;
|
|
5760
5828
|
declare const index$a_getQuoteExecutorInstructionDataSerializer: typeof getQuoteExecutorInstructionDataSerializer;
|
|
5761
5829
|
declare const index$a_initExecutor: typeof initExecutor;
|
|
5762
5830
|
declare const index$a_nativeDrop: typeof nativeDrop;
|
|
5763
5831
|
declare const index$a_ownerSetConfig: typeof ownerSetConfig;
|
|
5832
|
+
declare const index$a_postExecute: typeof postExecute;
|
|
5833
|
+
declare const index$a_preExecute: typeof preExecute;
|
|
5764
5834
|
declare const index$a_quoteExecutor: typeof quoteExecutor;
|
|
5765
5835
|
declare namespace index$a {
|
|
5766
|
-
export { type index$a_AdminSetConfigInstructionAccounts as AdminSetConfigInstructionAccounts, type index$a_AdminSetConfigInstructionArgs as AdminSetConfigInstructionArgs, type index$a_AdminSetConfigInstructionData as AdminSetConfigInstructionData, type index$a_AdminSetConfigInstructionDataArgs as AdminSetConfigInstructionDataArgs, type index$a_ComposeInstructionAccounts as ComposeInstructionAccounts, type index$a_ComposeInstructionArgs as ComposeInstructionArgs, type index$a_ComposeInstructionData as ComposeInstructionData, type index$a_ComposeInstructionDataArgs as ComposeInstructionDataArgs, type index$a_ExecutableInstructionAccounts as ExecutableInstructionAccounts, type index$a_ExecutableInstructionArgs as ExecutableInstructionArgs, type index$a_ExecutableInstructionData as ExecutableInstructionData, type index$a_ExecutableInstructionDataArgs as ExecutableInstructionDataArgs, type index$
|
|
5836
|
+
export { type index$a_AdminSetConfigInstructionAccounts as AdminSetConfigInstructionAccounts, type index$a_AdminSetConfigInstructionArgs as AdminSetConfigInstructionArgs, type index$a_AdminSetConfigInstructionData as AdminSetConfigInstructionData, type index$a_AdminSetConfigInstructionDataArgs as AdminSetConfigInstructionDataArgs, type index$a_ComposeInstructionAccounts as ComposeInstructionAccounts, type index$a_ComposeInstructionArgs as ComposeInstructionArgs, type index$a_ComposeInstructionData as ComposeInstructionData, type index$a_ComposeInstructionDataArgs as ComposeInstructionDataArgs, type index$a_ExecutableInstructionAccounts as ExecutableInstructionAccounts, type index$a_ExecutableInstructionArgs as ExecutableInstructionArgs, type index$a_ExecutableInstructionData as ExecutableInstructionData, type index$a_ExecutableInstructionDataArgs as ExecutableInstructionDataArgs, type index$a_ExtendExecutorConfigInstructionAccounts as ExtendExecutorConfigInstructionAccounts, type index$a_ExtendExecutorConfigInstructionData as ExtendExecutorConfigInstructionData, type index$a_ExtendExecutorConfigInstructionDataArgs as ExtendExecutorConfigInstructionDataArgs, type index$a_InitExecutorInstructionAccounts as InitExecutorInstructionAccounts, type index$a_InitExecutorInstructionArgs as InitExecutorInstructionArgs, type index$a_InitExecutorInstructionData as InitExecutorInstructionData, type index$a_InitExecutorInstructionDataArgs as InitExecutorInstructionDataArgs, type index$a_NativeDropInstructionAccounts as NativeDropInstructionAccounts, type index$a_NativeDropInstructionArgs as NativeDropInstructionArgs, type index$a_NativeDropInstructionData as NativeDropInstructionData, type index$a_NativeDropInstructionDataArgs as NativeDropInstructionDataArgs, type index$a_OwnerSetConfigInstructionAccounts as OwnerSetConfigInstructionAccounts, type index$a_OwnerSetConfigInstructionArgs as OwnerSetConfigInstructionArgs, type index$a_OwnerSetConfigInstructionData as OwnerSetConfigInstructionData, type index$a_OwnerSetConfigInstructionDataArgs as OwnerSetConfigInstructionDataArgs, type index$a_PostExecuteInstructionAccounts as PostExecuteInstructionAccounts, type index$a_PostExecuteInstructionArgs as PostExecuteInstructionArgs, type index$a_PostExecuteInstructionData as PostExecuteInstructionData, type index$a_PostExecuteInstructionDataArgs as PostExecuteInstructionDataArgs, type index$a_PreExecuteInstructionAccounts as PreExecuteInstructionAccounts, type index$a_PreExecuteInstructionArgs as PreExecuteInstructionArgs, type index$a_PreExecuteInstructionData as PreExecuteInstructionData, type index$a_PreExecuteInstructionDataArgs as PreExecuteInstructionDataArgs, type index$a_QuoteExecutorInstructionAccounts as QuoteExecutorInstructionAccounts, type index$a_QuoteExecutorInstructionArgs as QuoteExecutorInstructionArgs, type index$a_QuoteExecutorInstructionData as QuoteExecutorInstructionData, type index$a_QuoteExecutorInstructionDataArgs as QuoteExecutorInstructionDataArgs, index$a_adminSetConfig as adminSetConfig, index$a_compose as compose, index$a_executable as executable, index$a_extendExecutorConfig as extendExecutorConfig, index$a_getAdminSetConfigInstructionDataSerializer as getAdminSetConfigInstructionDataSerializer, index$a_getComposeInstructionDataSerializer as getComposeInstructionDataSerializer, index$a_getExecutableInstructionDataSerializer as getExecutableInstructionDataSerializer, index$a_getExtendExecutorConfigInstructionDataSerializer as getExtendExecutorConfigInstructionDataSerializer, index$a_getInitExecutorInstructionDataSerializer as getInitExecutorInstructionDataSerializer, index$a_getNativeDropInstructionDataSerializer as getNativeDropInstructionDataSerializer, index$a_getOwnerSetConfigInstructionDataSerializer as getOwnerSetConfigInstructionDataSerializer, index$a_getPostExecuteInstructionDataSerializer as getPostExecuteInstructionDataSerializer, index$a_getPreExecuteInstructionDataSerializer as getPreExecuteInstructionDataSerializer, index$a_getQuoteExecutorInstructionDataSerializer as getQuoteExecutorInstructionDataSerializer, index$a_initExecutor as initExecutor, index$a_nativeDrop as nativeDrop, index$a_ownerSetConfig as ownerSetConfig, index$a_postExecute as postExecute, index$a_preExecute as preExecute, index$a_quoteExecutor as quoteExecutor };
|
|
5767
5837
|
}
|
|
5768
5838
|
|
|
5769
5839
|
/**
|
|
@@ -5807,7 +5877,10 @@ declare class Executor {
|
|
|
5807
5877
|
value?: bigint;
|
|
5808
5878
|
computeUnits?: number;
|
|
5809
5879
|
endpointProgram?: PublicKey;
|
|
5810
|
-
}, commitment?: Commitment): Promise<
|
|
5880
|
+
}, commitment?: Commitment): Promise<{
|
|
5881
|
+
signers: Signer[];
|
|
5882
|
+
instructions: Instruction$1[];
|
|
5883
|
+
}>;
|
|
5811
5884
|
compose(rpc: RpcInterface, executor: Signer, param: {
|
|
5812
5885
|
event: ComposeSentEvent;
|
|
5813
5886
|
extraData: Uint8Array;
|
|
@@ -5815,6 +5888,8 @@ declare class Executor {
|
|
|
5815
5888
|
computeUnits?: number;
|
|
5816
5889
|
endpointProgram?: PublicKey;
|
|
5817
5890
|
}, commitment?: Commitment): Promise<WrappedInstruction>;
|
|
5891
|
+
preExecute(executor: Signer, version: number, feeLimit: bigint): WrappedInstruction;
|
|
5892
|
+
postExecute(executor: Signer, version: number): WrappedInstruction;
|
|
5818
5893
|
}
|
|
5819
5894
|
|
|
5820
5895
|
declare const executor_EXECUTOR_PROGRAM_ID: typeof EXECUTOR_PROGRAM_ID;
|
|
@@ -8309,7 +8384,7 @@ declare function instructionDiscriminator(method: string): Buffer;
|
|
|
8309
8384
|
* @returns {Promise<Buffer>} A promise that resolves to the simulation result.
|
|
8310
8385
|
* @throws {Error} If the simulation fails.
|
|
8311
8386
|
*/
|
|
8312
|
-
declare function simulateWeb3JsTransaction<From, To extends From = From>(_connection: string | web3.Connection | RpcInterface, _instructions: web3.TransactionInstruction[] | WrappedInstruction[] | Instruction[], _programId: web3.PublicKey | PublicKey, _payer: web3.PublicKey | PublicKey, serializer: Serializer<From, To>, commitment?: web3.Commitment, blockhash?: web3.Blockhash, _lookupTableAddress?: web3.PublicKey | PublicKey): Promise<To>;
|
|
8387
|
+
declare function simulateWeb3JsTransaction<From, To extends From = From>(_connection: string | web3.Connection | RpcInterface, _instructions: web3.TransactionInstruction[] | WrappedInstruction[] | Instruction$1[], _programId: web3.PublicKey | PublicKey, _payer: web3.PublicKey | PublicKey, serializer: Serializer<From, To>, commitment?: web3.Commitment, blockhash?: web3.Blockhash, _lookupTableAddress?: web3.PublicKey | PublicKey): Promise<To>;
|
|
8313
8388
|
declare function toWeb3Connection(rpc: RpcInterface | web3.Connection): web3.Connection;
|
|
8314
8389
|
|
|
8315
8390
|
/**
|
|
@@ -8342,7 +8417,11 @@ declare enum MessageType {
|
|
|
8342
8417
|
/**
|
|
8343
8418
|
* Composed message type.
|
|
8344
8419
|
*/
|
|
8345
|
-
COMPOSED_TYPE = 2
|
|
8420
|
+
COMPOSED_TYPE = 2,
|
|
8421
|
+
/**
|
|
8422
|
+
* ABA message type.
|
|
8423
|
+
*/
|
|
8424
|
+
ABA = 3
|
|
8346
8425
|
}
|
|
8347
8426
|
/**
|
|
8348
8427
|
* Interface representing the parameters for LzReceive.
|
|
@@ -8465,19 +8544,80 @@ declare enum ExecutorOptionType {
|
|
|
8465
8544
|
* Maximum length for executor option types.
|
|
8466
8545
|
*/
|
|
8467
8546
|
declare const MaxExecutorOptionTypeLength = 10;
|
|
8547
|
+
interface LzReceiveTypesV2Accounts {
|
|
8548
|
+
accounts: PublicKey[];
|
|
8549
|
+
}
|
|
8550
|
+
type AddressLocator = {
|
|
8551
|
+
__kind: 'Address';
|
|
8552
|
+
fields: [PublicKey];
|
|
8553
|
+
} | {
|
|
8554
|
+
__kind: 'AltIndex';
|
|
8555
|
+
fields: [number, number];
|
|
8556
|
+
} | {
|
|
8557
|
+
__kind: 'Payer';
|
|
8558
|
+
} | {
|
|
8559
|
+
__kind: 'Signer';
|
|
8560
|
+
fields: [number];
|
|
8561
|
+
} | {
|
|
8562
|
+
__kind: 'Context';
|
|
8563
|
+
};
|
|
8564
|
+
interface AccountMetaRef {
|
|
8565
|
+
pubkey: AddressLocator;
|
|
8566
|
+
isWritable: boolean;
|
|
8567
|
+
}
|
|
8568
|
+
type Instruction = {
|
|
8569
|
+
__kind: 'LzReceive';
|
|
8570
|
+
accounts: AccountMetaRef[];
|
|
8571
|
+
} | {
|
|
8572
|
+
__kind: 'Standard';
|
|
8573
|
+
programId: PublicKey;
|
|
8574
|
+
accounts: AccountMetaRef[];
|
|
8575
|
+
data: Uint8Array;
|
|
8576
|
+
};
|
|
8577
|
+
interface LzReceiveTypesV2Result {
|
|
8578
|
+
contextVersion: number;
|
|
8579
|
+
alts: PublicKey[];
|
|
8580
|
+
instructions: Instruction[];
|
|
8581
|
+
}
|
|
8582
|
+
declare function getAddressLocatorSerializer(): Serializer<AddressLocator, AddressLocator>;
|
|
8583
|
+
declare function getLzReceiveTypesV2AccountsSerializer(): Serializer<LzReceiveTypesV2Accounts, LzReceiveTypesV2Accounts>;
|
|
8584
|
+
declare function getAccountMetaRefSerializer(): Serializer<AccountMetaRef, AccountMetaRef>;
|
|
8585
|
+
declare function getInstructionSerializer(): Serializer<Instruction, Instruction>;
|
|
8586
|
+
declare function getLzReceiveTypesV2ResultSerializer(): Serializer<LzReceiveTypesV2Result, LzReceiveTypesV2Result>;
|
|
8587
|
+
declare function addressLocator(kind: 'Payer'): GetDataEnumKind<AddressLocator, 'Payer'>;
|
|
8588
|
+
declare function addressLocator(kind: 'Signer', data: GetDataEnumKindContent<AddressLocator, 'Signer'>['fields']): GetDataEnumKind<AddressLocator, 'Signer'>;
|
|
8589
|
+
declare function addressLocator(kind: 'Address', data: GetDataEnumKindContent<AddressLocator, 'Address'>['fields']): GetDataEnumKind<AddressLocator, 'Address'>;
|
|
8590
|
+
declare function addressLocator(kind: 'AltIndex', data: GetDataEnumKindContent<AddressLocator, 'AltIndex'>['fields']): GetDataEnumKind<AddressLocator, 'AltIndex'>;
|
|
8591
|
+
declare function isAddressLocator<K extends AddressLocator['__kind']>(kind: K, value: AddressLocator): value is AddressLocator & {
|
|
8592
|
+
__kind: K;
|
|
8593
|
+
};
|
|
8468
8594
|
|
|
8469
8595
|
/**
|
|
8470
|
-
*
|
|
8471
|
-
*
|
|
8472
|
-
|
|
8473
|
-
|
|
8474
|
-
|
|
8475
|
-
|
|
8476
|
-
|
|
8596
|
+
* Retrieves the instructions and signers required for the LzReceive instruction (V2).
|
|
8597
|
+
* This is used for lz_receive_types version 2.
|
|
8598
|
+
*/
|
|
8599
|
+
declare function buildLzReceiveExecutionPlan(rpc: RpcInterface, executorProgram: PublicKey, payer: PublicKey, receiver: PublicKey, receiverProgram: PublicKey, params: LzReceiveParams, receiveTypesAccounts?: LzReceiveTypesV2Accounts, commitment?: Commitment): Promise<{
|
|
8600
|
+
contextVersion: number;
|
|
8601
|
+
signers: KeypairSigner[];
|
|
8602
|
+
instructions: Instruction$1[];
|
|
8603
|
+
}>;
|
|
8604
|
+
/**
|
|
8605
|
+
* Fetches the metadata for lz_receive_types (versioned, V2).
|
|
8606
|
+
* This reads the PDA account and deserializes the version, alts, and accounts.
|
|
8607
|
+
*/
|
|
8608
|
+
declare function getLzReceiveTypesInfo(rpc: RpcInterface, payer: PublicKey, receiver: PublicKey, receiverProgram: PublicKey, params: LzReceiveParams, commitment?: Commitment): Promise<LzReceiveTypesV2Accounts>;
|
|
8609
|
+
|
|
8610
|
+
/**
|
|
8611
|
+
* Unified entry point for receiving a LayerZero message on Solana.
|
|
8612
|
+
* This function automatically detects the lz_receive_types version and dispatches to the correct logic.
|
|
8477
8613
|
*
|
|
8478
|
-
*
|
|
8614
|
+
* For V1: returns a single Instruction (legacy behavior).
|
|
8615
|
+
* For V2: returns { signers, instructions } for multi-instruction atomic execution.
|
|
8479
8616
|
*/
|
|
8480
|
-
declare function lzReceive(rpc: RpcInterface, payer: PublicKey, packet: Pick<Packet$2, 'message' | 'sender' | 'srcEid' | 'guid' | 'receiver' | 'nonce'>, callerParams?: Uint8Array, commitment?: Commitment): Promise<
|
|
8617
|
+
declare function lzReceive(rpc: RpcInterface, payer: PublicKey, packet: Pick<Packet$2, 'message' | 'sender' | 'srcEid' | 'guid' | 'receiver' | 'nonce'>, callerParams?: Uint8Array, executorProgram?: PublicKey, commitment?: Commitment): Promise<{
|
|
8618
|
+
instruction: Instruction$1;
|
|
8619
|
+
contextVersion: number;
|
|
8620
|
+
} | ReturnType<typeof buildLzReceiveExecutionPlan>>;
|
|
8481
8621
|
/**
|
|
8482
8622
|
* Composes a LayerZero message.
|
|
8483
8623
|
*
|
|
@@ -8489,20 +8629,7 @@ declare function lzReceive(rpc: RpcInterface, payer: PublicKey, packet: Pick<Pac
|
|
|
8489
8629
|
*
|
|
8490
8630
|
* @returns {Promise<TransactionInstruction>} The transaction instruction.
|
|
8491
8631
|
*/
|
|
8492
|
-
declare function lzCompose(rpc: RpcInterface, payer: PublicKey, event: ComposeSentEvent, extraData?: Uint8Array, commitment?: Commitment): Promise<Instruction>;
|
|
8493
|
-
/**
|
|
8494
|
-
* Retrieves the accounts required for the LzReceive instruction.
|
|
8495
|
-
*
|
|
8496
|
-
* @param {Connection} connection - The Solana connection object.
|
|
8497
|
-
* @param {PublicKey} payer - The public key of the payer.
|
|
8498
|
-
* @param {PublicKey} receiver - The public key of the receiver.
|
|
8499
|
-
* @param {PublicKey} receiverProgram - The public key of the receiver program.
|
|
8500
|
-
* @param {LzReceiveParams} params - The parameters for the LzReceive instruction.
|
|
8501
|
-
* @param {Commitment | GetAccountInfoConfig} [commitmentOrConfig] - Optional commitment or configuration.
|
|
8502
|
-
*
|
|
8503
|
-
* @returns {Promise<AccountMeta[]>} The list of account metadata.
|
|
8504
|
-
*/
|
|
8505
|
-
declare function getLzReceiveAccounts(rpc: RpcInterface, payer: PublicKey, receiver: PublicKey, receiverProgram: PublicKey, params: LzReceiveParams, commitment?: Commitment): Promise<AccountMeta[]>;
|
|
8632
|
+
declare function lzCompose(rpc: RpcInterface, payer: PublicKey, event: ComposeSentEvent, extraData?: Uint8Array, commitment?: Commitment): Promise<Instruction$1>;
|
|
8506
8633
|
/**
|
|
8507
8634
|
* Retrieves the accounts required for the LzCompose instruction.
|
|
8508
8635
|
*
|
|
@@ -8517,6 +8644,11 @@ declare function getLzReceiveAccounts(rpc: RpcInterface, payer: PublicKey, recei
|
|
|
8517
8644
|
*/
|
|
8518
8645
|
declare function getLzComposeAccountMeta(rpc: RpcInterface, payer: PublicKey, to: PublicKey, composerProgram: PublicKey, params: LzComposeParams, commitment?: Commitment): Promise<AccountMeta[]>;
|
|
8519
8646
|
|
|
8647
|
+
/**
|
|
8648
|
+
* Get the accounts required for lz_receive by querying lz_receive_types_v1.
|
|
8649
|
+
*/
|
|
8650
|
+
declare function getLzReceiveAccountsFromTypesV1(rpc: RpcInterface, payer: PublicKey, receiver: PublicKey, receiverProgram: PublicKey, params: LzReceiveParams, commitment?: Commitment): Promise<AccountMeta[]>;
|
|
8651
|
+
|
|
8520
8652
|
/**
|
|
8521
8653
|
* Supported programs.
|
|
8522
8654
|
*/
|
|
@@ -8899,4 +9031,4 @@ interface MessageLibInterface {
|
|
|
8899
9031
|
getSetConfigIXAccountMetaForCPI(oapp: PublicKey, eid: number, endpointProgram?: PublicKey): AccountMeta[];
|
|
8900
9032
|
}
|
|
8901
9033
|
|
|
8902
|
-
export { index as BlockedMessageLibProgram, dvn as DVNProgram, type Deployment, DvnPDA, index$f as DvnProgram, EDDSA, ENFORCED_OPTIONS_SEED, EndpointPDA, endpoint as EndpointProgram, EventPDA, ExecutorOptionType, ExecutorPDA, executor as ExecutorProgram, FAUCET_URL, type LzComposeParams, type LzReceiveAccount, type LzReceiveParams, type LzReceiveParamsArgs, MINT_SEED, MSG_TYPE_OFFSET, MaxExecutorOptionTypeLength, type MessageLibInterface, MessageLibPDA, MessageType, type NextNonceInstructionData, type NextNonceInstructionDataArgs, OmniAppPDA, PEER_SEED, PriceFeedPDA, pricefeed as PriceFeedProgram, SendHelper, SetConfigType, simpleMessageLib as SimpleMessageLibProgram, type SolanaPacketPath, type SupportedPrograms, UlnPDA, uln as UlnProgram, buildMessageV0, buildVersionedTransaction, closeLookupTable, createNonceAccountTX, deactivateLookupTable, extractComposeDeliveredEventByTxHash, extractComposeSentEventByTxHash, extractEventFromTransactionSignature, extractPacketSentEventByTxHash, extractReceivedPacketEventByTxHash, extractVerifiedPacketEventByTxHash, extractWorkerFeePaidEventByTxHash, generateAddressLookupTable, getBlockedMessageLibProgramId, getDVNProgramId, getEndpointProgramId, getExecutorProgramId, getLzComposeAccountMeta, getLzComposeParamsSerializer, getLzReceiveAccountSerializer,
|
|
9034
|
+
export { type AccountMetaRef, type AddressLocator, index as BlockedMessageLibProgram, dvn as DVNProgram, type Deployment, DvnPDA, index$f as DvnProgram, EDDSA, ENFORCED_OPTIONS_SEED, EndpointPDA, endpoint as EndpointProgram, EventPDA, ExecutorOptionType, ExecutorPDA, executor as ExecutorProgram, FAUCET_URL, type Instruction, type LzComposeParams, type LzReceiveAccount, type LzReceiveParams, type LzReceiveParamsArgs, type LzReceiveTypesV2Accounts, type LzReceiveTypesV2Result, MINT_SEED, MSG_TYPE_OFFSET, MaxExecutorOptionTypeLength, type MessageLibInterface, MessageLibPDA, MessageType, type NextNonceInstructionData, type NextNonceInstructionDataArgs, OmniAppPDA, PEER_SEED, PriceFeedPDA, pricefeed as PriceFeedProgram, SendHelper, SetConfigType, simpleMessageLib as SimpleMessageLibProgram, type SolanaPacketPath, type SupportedPrograms, UlnPDA, uln as UlnProgram, addressLocator, buildLzReceiveExecutionPlan, buildMessageV0, buildVersionedTransaction, closeLookupTable, createNonceAccountTX, deactivateLookupTable, extractComposeDeliveredEventByTxHash, extractComposeSentEventByTxHash, extractEventFromTransactionSignature, extractPacketSentEventByTxHash, extractReceivedPacketEventByTxHash, extractVerifiedPacketEventByTxHash, extractWorkerFeePaidEventByTxHash, generateAddressLookupTable, getAccountMetaRefSerializer, getAddressLocatorSerializer, getBlockedMessageLibProgramId, getDVNProgramId, getEndpointProgramId, getExecutorProgramId, getInstructionSerializer, getLzComposeAccountMeta, getLzComposeParamsSerializer, getLzReceiveAccountSerializer, getLzReceiveAccountsFromTypesV1, getLzReceiveParamsSerializer, getLzReceiveTypesInfo, getLzReceiveTypesV2AccountsSerializer, getLzReceiveTypesV2ResultSerializer, getNextNonceInstructionDataSerializer, getPricefeedProgramId, getProgramKeypair, getSimpleMessageLibProgramId, getULNProgramId, idlTypes, instructionDiscriminator, isAccountInitialized, isAddressLocator, lzCompose, lzReceive, messageLibs, nextNonce, simulateWeb3JsTransaction, toWeb3Connection, txWithAddressLookupTable, txWithNonce };
|