@layerzerolabs/lz-solana-sdk-v2 3.0.47 → 3.0.48
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/package.json +11 -10
- package/src/base-oapp.ts +159 -0
- package/src/config.ts +32 -0
- package/src/deployment.test.ts +11 -0
- package/src/deployment.ts +128 -0
- package/src/dvn.ts +606 -0
- package/src/endpoint.ts +1518 -0
- package/src/executor.ts +577 -0
- package/src/generated/blocked_messagelib/index.ts +18 -0
- package/src/generated/blocked_messagelib/instructions/index.ts +1 -0
- package/src/generated/blocked_messagelib/instructions/version.ts +59 -0
- package/src/generated/dvn/accounts/DvnConfig.ts +217 -0
- package/src/generated/dvn/accounts/ExecuteHash.ts +179 -0
- package/src/generated/dvn/accounts/ReceiveConfig.ts +169 -0
- package/src/generated/dvn/accounts/index.ts +9 -0
- package/src/generated/dvn/errors/index.ts +396 -0
- package/src/generated/dvn/events/AdminConfigSetEvent.ts +22 -0
- package/src/generated/dvn/events/FeeWithdrawnEvent.ts +26 -0
- package/src/generated/dvn/events/MultisigConfigSetEvent.ts +22 -0
- package/src/generated/dvn/events/index.ts +3 -0
- package/src/generated/dvn/index.ts +21 -0
- package/src/generated/dvn/instructions/closeExecute.ts +148 -0
- package/src/generated/dvn/instructions/index.ts +7 -0
- package/src/generated/dvn/instructions/initDvn.ts +144 -0
- package/src/generated/dvn/instructions/invoke.ts +178 -0
- package/src/generated/dvn/instructions/quoteDvn.ts +145 -0
- package/src/generated/dvn/instructions/setConfig.ts +157 -0
- package/src/generated/dvn/instructions/verifiable.ts +160 -0
- package/src/generated/dvn/instructions/withdrawFee.ts +172 -0
- package/src/generated/dvn/types/Acl.ts +26 -0
- package/src/generated/dvn/types/AdminConfig.ts +100 -0
- package/src/generated/dvn/types/CloseExecuteParams.ts +21 -0
- package/src/generated/dvn/types/DstConfig.ts +28 -0
- package/src/generated/dvn/types/ExecuteTransactionDigest.ts +37 -0
- package/src/generated/dvn/types/InitDvnParams.ts +34 -0
- package/src/generated/dvn/types/InvokeParams.ts +28 -0
- package/src/generated/dvn/types/LzOption.ts +24 -0
- package/src/generated/dvn/types/Multisig.ts +24 -0
- package/src/generated/dvn/types/MultisigConfig.ts +124 -0
- package/src/generated/dvn/types/QuoteDvnParams.ts +38 -0
- package/src/generated/dvn/types/SetConfigParams.ts +22 -0
- package/src/generated/dvn/types/TransactionAccount.ts +29 -0
- package/src/generated/dvn/types/UlnConfig.ts +34 -0
- package/src/generated/dvn/types/VerifiableParams.ts +24 -0
- package/src/generated/dvn/types/VerificationState.ts +27 -0
- package/src/generated/dvn/types/WithdrawFeeParams.ts +20 -0
- package/src/generated/dvn/types/index.ts +17 -0
- package/src/generated/endpoint/accounts/ComposeMessageState.ts +170 -0
- package/src/generated/endpoint/accounts/EndpointSettings.ts +184 -0
- package/src/generated/endpoint/accounts/MessageLibInfo.ts +178 -0
- package/src/generated/endpoint/accounts/Nonce.ts +193 -0
- package/src/generated/endpoint/accounts/OAppRegistry.ts +169 -0
- package/src/generated/endpoint/accounts/PayloadHash.ts +169 -0
- package/src/generated/endpoint/accounts/PendingInboundNonce.ts +172 -0
- package/src/generated/endpoint/accounts/ReceiveLibraryConfig.ts +183 -0
- package/src/generated/endpoint/accounts/SendLibraryConfig.ts +171 -0
- package/src/generated/endpoint/accounts/index.ts +31 -0
- package/src/generated/endpoint/errors/index.ts +428 -0
- package/src/generated/endpoint/events/AdminTransferredEvent.ts +23 -0
- package/src/generated/endpoint/events/ComposeDeliveredEvent.ts +31 -0
- package/src/generated/endpoint/events/ComposeSentEvent.ts +33 -0
- package/src/generated/endpoint/events/DefaultReceiveLibrarySetEvent.ts +27 -0
- package/src/generated/endpoint/events/DefaultReceiveLibraryTimeoutSetEvent.ts +29 -0
- package/src/generated/endpoint/events/DefaultSendLibrarySetEvent.ts +27 -0
- package/src/generated/endpoint/events/DelegateSetEvent.ts +22 -0
- package/src/generated/endpoint/events/InboundNonceSkippedEvent.ts +31 -0
- package/src/generated/endpoint/events/LibraryRegisteredEvent.ts +27 -0
- package/src/generated/endpoint/events/LzComposeAlertEvent.ts +43 -0
- package/src/generated/endpoint/events/LzReceiveAlertEvent.ts +45 -0
- package/src/generated/endpoint/events/LzTokenSetEvent.ts +23 -0
- package/src/generated/endpoint/events/OAppRegisteredEvent.ts +27 -0
- package/src/generated/endpoint/events/PacketBurntEvent.ts +32 -0
- package/src/generated/endpoint/events/PacketDeliveredEvent.ts +31 -0
- package/src/generated/endpoint/events/PacketNilifiedEvent.ts +33 -0
- package/src/generated/endpoint/events/PacketSentEvent.ts +29 -0
- package/src/generated/endpoint/events/PacketVerifiedEvent.ts +33 -0
- package/src/generated/endpoint/events/ReceiveLibrarySetEvent.ts +29 -0
- package/src/generated/endpoint/events/ReceiveLibraryTimeoutSetEvent.ts +33 -0
- package/src/generated/endpoint/events/RentWithdrawnEvent.ts +27 -0
- package/src/generated/endpoint/events/SendLibrarySetEvent.ts +29 -0
- package/src/generated/endpoint/events/index.ts +22 -0
- package/src/generated/endpoint/index.ts +21 -0
- package/src/generated/endpoint/instructions/burn.ts +191 -0
- package/src/generated/endpoint/instructions/clear.ts +193 -0
- package/src/generated/endpoint/instructions/clearCompose.ts +160 -0
- package/src/generated/endpoint/instructions/index.ts +32 -0
- package/src/generated/endpoint/instructions/initConfig.ts +172 -0
- package/src/generated/endpoint/instructions/initDefaultReceiveLibrary.ts +195 -0
- package/src/generated/endpoint/instructions/initDefaultSendLibrary.ts +195 -0
- package/src/generated/endpoint/instructions/initEndpoint.ts +147 -0
- package/src/generated/endpoint/instructions/initNonce.ts +168 -0
- package/src/generated/endpoint/instructions/initReceiveLibrary.ts +159 -0
- package/src/generated/endpoint/instructions/initSendLibrary.ts +159 -0
- package/src/generated/endpoint/instructions/initVerify.ts +159 -0
- package/src/generated/endpoint/instructions/lzComposeAlert.ts +148 -0
- package/src/generated/endpoint/instructions/lzReceiveAlert.ts +148 -0
- package/src/generated/endpoint/instructions/nilify.ts +193 -0
- package/src/generated/endpoint/instructions/quote.ts +181 -0
- package/src/generated/endpoint/instructions/registerLibrary.ts +183 -0
- package/src/generated/endpoint/instructions/registerOapp.ts +183 -0
- package/src/generated/endpoint/instructions/send.ts +215 -0
- package/src/generated/endpoint/instructions/sendCompose.ts +183 -0
- package/src/generated/endpoint/instructions/setConfig.ts +169 -0
- package/src/generated/endpoint/instructions/setDefaultReceiveLibrary.ts +184 -0
- package/src/generated/endpoint/instructions/setDefaultReceiveLibraryTimeout.ts +185 -0
- package/src/generated/endpoint/instructions/setDefaultSendLibrary.ts +184 -0
- package/src/generated/endpoint/instructions/setDelegate.ts +160 -0
- package/src/generated/endpoint/instructions/setLzToken.ts +160 -0
- package/src/generated/endpoint/instructions/setReceiveLibrary.ts +190 -0
- package/src/generated/endpoint/instructions/setReceiveLibraryTimeout.ts +184 -0
- package/src/generated/endpoint/instructions/setSendLibrary.ts +190 -0
- package/src/generated/endpoint/instructions/skip.ts +203 -0
- package/src/generated/endpoint/instructions/transferAdmin.ts +160 -0
- package/src/generated/endpoint/instructions/verify.ts +205 -0
- package/src/generated/endpoint/instructions/withdrawRent.ts +172 -0
- package/src/generated/endpoint/types/BurnParams.ts +32 -0
- package/src/generated/endpoint/types/ClearComposeParams.ts +31 -0
- package/src/generated/endpoint/types/ClearParams.ts +34 -0
- package/src/generated/endpoint/types/InitConfigParams.ts +26 -0
- package/src/generated/endpoint/types/InitDefaultReceiveLibraryParams.ts +27 -0
- package/src/generated/endpoint/types/InitDefaultSendLibraryParams.ts +27 -0
- package/src/generated/endpoint/types/InitEndpointParams.ts +27 -0
- package/src/generated/endpoint/types/InitNonceParams.ts +28 -0
- package/src/generated/endpoint/types/InitReceiveLibraryParams.ts +27 -0
- package/src/generated/endpoint/types/InitSendLibraryParams.ts +27 -0
- package/src/generated/endpoint/types/InitVerifyParams.ts +30 -0
- package/src/generated/endpoint/types/LzComposeAlertParams.ts +41 -0
- package/src/generated/endpoint/types/LzReceiveAlertParams.ts +43 -0
- package/src/generated/endpoint/types/MessageLibType.ts +25 -0
- package/src/generated/endpoint/types/MessagingFee.ts +24 -0
- package/src/generated/endpoint/types/MessagingReceipt.ts +27 -0
- package/src/generated/endpoint/types/NilifyParams.ts +32 -0
- package/src/generated/endpoint/types/QuoteParams.ts +34 -0
- package/src/generated/endpoint/types/ReceiveLibraryTimeout.ts +27 -0
- package/src/generated/endpoint/types/RegisterLibraryParams.ts +28 -0
- package/src/generated/endpoint/types/RegisterOAppParams.ts +23 -0
- package/src/generated/endpoint/types/SendComposeParams.ts +31 -0
- package/src/generated/endpoint/types/SendParams.ts +32 -0
- package/src/generated/endpoint/types/SetConfigParams.ts +31 -0
- package/src/generated/endpoint/types/SetDefaultReceiveLibraryParams.ts +29 -0
- package/src/generated/endpoint/types/SetDefaultReceiveLibraryTimeoutParams.ts +29 -0
- package/src/generated/endpoint/types/SetDefaultSendLibraryParams.ts +27 -0
- package/src/generated/endpoint/types/SetDelegateParams.ts +22 -0
- package/src/generated/endpoint/types/SetLzTokenParams.ts +23 -0
- package/src/generated/endpoint/types/SetReceiveLibraryParams.ts +31 -0
- package/src/generated/endpoint/types/SetReceiveLibraryTimeoutParams.ts +31 -0
- package/src/generated/endpoint/types/SetSendLibraryParams.ts +29 -0
- package/src/generated/endpoint/types/SkipParams.ts +30 -0
- package/src/generated/endpoint/types/TransferAdminParams.ts +23 -0
- package/src/generated/endpoint/types/VerifyParams.ts +32 -0
- package/src/generated/endpoint/types/WithdrawRentParams.ts +21 -0
- package/src/generated/endpoint/types/index.ts +36 -0
- package/src/generated/executor/accounts/ExecutorConfig.ts +216 -0
- package/src/generated/executor/accounts/Nonce.ts +193 -0
- package/src/generated/executor/accounts/index.ts +7 -0
- package/src/generated/executor/errors/index.ts +434 -0
- package/src/generated/executor/events/NativeDropAppliedEvent.ts +38 -0
- package/src/generated/executor/events/index.ts +1 -0
- package/src/generated/executor/index.ts +21 -0
- package/src/generated/executor/instructions/adminSetConfig.ts +136 -0
- package/src/generated/executor/instructions/compose.ts +181 -0
- package/src/generated/executor/instructions/executable.ts +136 -0
- package/src/generated/executor/instructions/execute.ts +181 -0
- package/src/generated/executor/instructions/index.ts +8 -0
- package/src/generated/executor/instructions/initExecutor.ts +147 -0
- package/src/generated/executor/instructions/nativeDrop.ts +171 -0
- package/src/generated/executor/instructions/ownerSetConfig.ts +136 -0
- package/src/generated/executor/instructions/quoteExecutor.ts +148 -0
- package/src/generated/executor/types/Acl.ts +26 -0
- package/src/generated/executor/types/AdminSetConfigParams.ts +83 -0
- package/src/generated/executor/types/ComposeParams.ts +27 -0
- package/src/generated/executor/types/DstConfig.ts +32 -0
- package/src/generated/executor/types/ExecutableParams.ts +30 -0
- package/src/generated/executor/types/ExecuteParams.ts +31 -0
- package/src/generated/executor/types/ExecutionState.ts +26 -0
- package/src/generated/executor/types/InitExecutorParams.ts +33 -0
- package/src/generated/executor/types/LzComposeParams.ts +35 -0
- package/src/generated/executor/types/LzOption.ts +24 -0
- package/src/generated/executor/types/LzReceiveParams.ts +33 -0
- package/src/generated/executor/types/NativeDropParams.ts +36 -0
- package/src/generated/executor/types/NativeDropRequest.ts +26 -0
- package/src/generated/executor/types/OwnerSetConfigParams.ts +123 -0
- package/src/generated/executor/types/QuoteExecutorParams.ts +34 -0
- package/src/generated/executor/types/index.ts +15 -0
- package/src/generated/pricefeed/accounts/PriceFeed.ts +220 -0
- package/src/generated/pricefeed/accounts/index.ts +5 -0
- package/src/generated/pricefeed/errors/index.ts +115 -0
- package/src/generated/pricefeed/index.ts +21 -0
- package/src/generated/pricefeed/instructions/getFee.ts +121 -0
- package/src/generated/pricefeed/instructions/index.ts +6 -0
- package/src/generated/pricefeed/instructions/initPriceFeed.ts +147 -0
- package/src/generated/pricefeed/instructions/setPrice.ts +133 -0
- package/src/generated/pricefeed/instructions/setPriceFeed.ts +136 -0
- package/src/generated/pricefeed/instructions/setSolPrice.ts +136 -0
- package/src/generated/pricefeed/instructions/transferAdmin.ts +136 -0
- package/src/generated/pricefeed/types/GetFeeParams.ts +26 -0
- package/src/generated/pricefeed/types/InitPriceFeedParams.ts +27 -0
- package/src/generated/pricefeed/types/ModelType.ts +66 -0
- package/src/generated/pricefeed/types/Price.ts +31 -0
- package/src/generated/pricefeed/types/PriceParams.ts +29 -0
- package/src/generated/pricefeed/types/SetPriceFeedParams.ts +29 -0
- package/src/generated/pricefeed/types/SetPriceParams.ts +26 -0
- package/src/generated/pricefeed/types/SetSolPriceParams.ts +21 -0
- package/src/generated/pricefeed/types/TransferAdminParams.ts +23 -0
- package/src/generated/pricefeed/types/index.ts +9 -0
- package/src/generated/simple_messagelib/accounts/MessageLib.ts +222 -0
- package/src/generated/simple_messagelib/accounts/ReceiveConfigStore.ts +168 -0
- package/src/generated/simple_messagelib/accounts/SendConfigStore.ts +170 -0
- package/src/generated/simple_messagelib/accounts/index.ts +13 -0
- package/src/generated/simple_messagelib/errors/index.ts +207 -0
- package/src/generated/simple_messagelib/index.ts +21 -0
- package/src/generated/simple_messagelib/instructions/index.ts +15 -0
- package/src/generated/simple_messagelib/instructions/initConfig.ts +183 -0
- package/src/generated/simple_messagelib/instructions/initDefaultConfig.ts +171 -0
- package/src/generated/simple_messagelib/instructions/initMessageLib.ts +147 -0
- package/src/generated/simple_messagelib/instructions/quote.ts +133 -0
- package/src/generated/simple_messagelib/instructions/revertCall.ts +59 -0
- package/src/generated/simple_messagelib/instructions/send.ts +154 -0
- package/src/generated/simple_messagelib/instructions/sendWithLzToken.ts +207 -0
- package/src/generated/simple_messagelib/instructions/setConfig.ts +157 -0
- package/src/generated/simple_messagelib/instructions/setDefaultConfig.ts +171 -0
- package/src/generated/simple_messagelib/instructions/setFee.ts +133 -0
- package/src/generated/simple_messagelib/instructions/setWlCaller.ts +136 -0
- package/src/generated/simple_messagelib/instructions/transferAdmin.ts +136 -0
- package/src/generated/simple_messagelib/instructions/validatePacket.ts +136 -0
- package/src/generated/simple_messagelib/instructions/version.ts +59 -0
- package/src/generated/simple_messagelib/instructions/withdrawFees.ts +148 -0
- package/src/generated/simple_messagelib/types/InitConfigParams.ts +26 -0
- package/src/generated/simple_messagelib/types/InitDefaultConfigParams.ts +27 -0
- package/src/generated/simple_messagelib/types/InitMessageLibParams.ts +35 -0
- package/src/generated/simple_messagelib/types/MessagingFee.ts +24 -0
- package/src/generated/simple_messagelib/types/Packet.ts +36 -0
- package/src/generated/simple_messagelib/types/QuoteParams.ts +27 -0
- package/src/generated/simple_messagelib/types/SendParams.ts +27 -0
- package/src/generated/simple_messagelib/types/SendWithLzTokenParams.ts +34 -0
- package/src/generated/simple_messagelib/types/SetConfigParams.ts +31 -0
- package/src/generated/simple_messagelib/types/SetDefaultConfigParams.ts +27 -0
- package/src/generated/simple_messagelib/types/SetFeeParams.ts +24 -0
- package/src/generated/simple_messagelib/types/SetWlCallerParams.ts +22 -0
- package/src/generated/simple_messagelib/types/TransferAdminParams.ts +23 -0
- package/src/generated/simple_messagelib/types/ValidatePacketParams.ts +21 -0
- package/src/generated/simple_messagelib/types/Version.ts +26 -0
- package/src/generated/simple_messagelib/types/WithdrawFeesParams.ts +21 -0
- package/src/generated/simple_messagelib/types/index.ts +16 -0
- package/src/generated/uln/accounts/Confirmations.ts +171 -0
- package/src/generated/uln/accounts/ReceiveConfig.ts +169 -0
- package/src/generated/uln/accounts/SendConfig.ts +177 -0
- package/src/generated/uln/accounts/UlnSettings.ts +195 -0
- package/src/generated/uln/accounts/index.ts +16 -0
- package/src/generated/uln/errors/index.ts +761 -0
- package/src/generated/uln/events/AdminTransferredEvent.ts +23 -0
- package/src/generated/uln/events/ConfigSetEvent.ts +30 -0
- package/src/generated/uln/events/DefaultConfigSetEvent.ts +31 -0
- package/src/generated/uln/events/FeesPaidEvent.ts +28 -0
- package/src/generated/uln/events/LzTokenSetEvent.ts +23 -0
- package/src/generated/uln/events/PayloadVerifiedEvent.ts +31 -0
- package/src/generated/uln/events/RentWithdrawnEvent.ts +27 -0
- package/src/generated/uln/events/TreasuryFeeCapSetEvent.ts +21 -0
- package/src/generated/uln/events/TreasurySetEvent.ts +22 -0
- package/src/generated/uln/events/index.ts +7 -0
- package/src/generated/uln/index.ts +21 -0
- package/src/generated/uln/instructions/closeVerify.ts +148 -0
- package/src/generated/uln/instructions/commitVerification.ts +148 -0
- package/src/generated/uln/instructions/index.ts +16 -0
- package/src/generated/uln/instructions/initConfig.ts +183 -0
- package/src/generated/uln/instructions/initDefaultConfig.ts +195 -0
- package/src/generated/uln/instructions/initUln.ts +144 -0
- package/src/generated/uln/instructions/initVerify.ts +147 -0
- package/src/generated/uln/instructions/quote.ts +157 -0
- package/src/generated/uln/instructions/send.ts +220 -0
- package/src/generated/uln/instructions/sendWithLzToken.ts +255 -0
- package/src/generated/uln/instructions/setConfig.ts +205 -0
- package/src/generated/uln/instructions/setDefaultConfig.ts +184 -0
- package/src/generated/uln/instructions/setTreasury.ts +160 -0
- package/src/generated/uln/instructions/transferAdmin.ts +160 -0
- package/src/generated/uln/instructions/verify.ts +157 -0
- package/src/generated/uln/instructions/version.ts +59 -0
- package/src/generated/uln/instructions/withdrawRent.ts +172 -0
- package/src/generated/uln/types/CloseVerifyParams.ts +24 -0
- package/src/generated/uln/types/CommitVerificationParams.ts +25 -0
- package/src/generated/uln/types/Config.ts +75 -0
- package/src/generated/uln/types/ExecutorConfig.ts +26 -0
- package/src/generated/uln/types/InitConfigParams.ts +26 -0
- package/src/generated/uln/types/InitDefaultConfigParams.ts +31 -0
- package/src/generated/uln/types/InitUlnParams.ts +30 -0
- package/src/generated/uln/types/InitVerifyParams.ts +28 -0
- package/src/generated/uln/types/LzTokenTreasury.ts +26 -0
- package/src/generated/uln/types/MessagingFee.ts +24 -0
- package/src/generated/uln/types/Packet.ts +36 -0
- package/src/generated/uln/types/QuoteParams.ts +27 -0
- package/src/generated/uln/types/SendParams.ts +27 -0
- package/src/generated/uln/types/SendWithLzTokenParams.ts +34 -0
- package/src/generated/uln/types/SetConfigParams.ts +31 -0
- package/src/generated/uln/types/SetDefaultConfigParams.ts +31 -0
- package/src/generated/uln/types/SetTreasuryParams.ts +22 -0
- package/src/generated/uln/types/TransferAdminParams.ts +23 -0
- package/src/generated/uln/types/Treasury.ts +31 -0
- package/src/generated/uln/types/TreasuryFee.ts +28 -0
- package/src/generated/uln/types/UlnConfig.ts +34 -0
- package/src/generated/uln/types/VerifyParams.ts +26 -0
- package/src/generated/uln/types/Version.ts +26 -0
- package/src/generated/uln/types/WithdrawRentParams.ts +21 -0
- package/src/generated/uln/types/WorkerFee.ts +26 -0
- package/src/generated/uln/types/index.ts +25 -0
- package/src/generated/worker_interface/errors/index.ts +75 -0
- package/src/generated/worker_interface/index.ts +20 -0
- package/src/generated/worker_interface/instructions/index.ts +2 -0
- package/src/generated/worker_interface/instructions/quoteDvn.ts +145 -0
- package/src/generated/worker_interface/instructions/quoteExecutor.ts +148 -0
- package/src/generated/worker_interface/types/LzOption.ts +24 -0
- package/src/generated/worker_interface/types/QuoteDvnParams.ts +38 -0
- package/src/generated/worker_interface/types/QuoteExecutorParams.ts +34 -0
- package/src/generated/worker_interface/types/index.ts +3 -0
- package/src/index.ts +120 -0
- package/src/pda-deriver.ts +658 -0
- package/src/pricefeed.ts +208 -0
- package/src/recevie.ts +269 -0
- package/src/send-helper.ts +504 -0
- package/src/simple-message-lib.ts +303 -0
- package/src/types.ts +222 -0
- package/src/uln.ts +1045 -0
- package/src/utility.ts +592 -0
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This code was GENERATED using the solita package.
|
|
3
|
+
* Please DO NOT EDIT THIS FILE, instead rerun solita to update it or write a wrapper to add functionality.
|
|
4
|
+
*
|
|
5
|
+
* See: https://github.com/metaplex-foundation/solita
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import * as beet from '@metaplex-foundation/beet'
|
|
9
|
+
import * as web3 from '@solana/web3.js'
|
|
10
|
+
import {
|
|
11
|
+
LzReceiveAlertParams,
|
|
12
|
+
lzReceiveAlertParamsBeet,
|
|
13
|
+
} from '../types/LzReceiveAlertParams'
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* @category Instructions
|
|
17
|
+
* @category LzReceiveAlert
|
|
18
|
+
* @category generated
|
|
19
|
+
*/
|
|
20
|
+
export type LzReceiveAlertInstructionArgs = {
|
|
21
|
+
params: LzReceiveAlertParams
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* @category Instructions
|
|
25
|
+
* @category LzReceiveAlert
|
|
26
|
+
* @category generated
|
|
27
|
+
*/
|
|
28
|
+
export const lzReceiveAlertStruct = new beet.FixableBeetArgsStruct<
|
|
29
|
+
LzReceiveAlertInstructionArgs & {
|
|
30
|
+
instructionDiscriminator: number[] /* size: 8 */
|
|
31
|
+
}
|
|
32
|
+
>(
|
|
33
|
+
[
|
|
34
|
+
['instructionDiscriminator', beet.uniformFixedSizeArray(beet.u8, 8)],
|
|
35
|
+
['params', lzReceiveAlertParamsBeet],
|
|
36
|
+
],
|
|
37
|
+
'LzReceiveAlertInstructionArgs'
|
|
38
|
+
)
|
|
39
|
+
/**
|
|
40
|
+
* Accounts required by the _lzReceiveAlert_ instruction
|
|
41
|
+
*
|
|
42
|
+
* @property [**signer**] executor
|
|
43
|
+
* @property [] eventAuthority
|
|
44
|
+
* @property [] program
|
|
45
|
+
* @category Instructions
|
|
46
|
+
* @category LzReceiveAlert
|
|
47
|
+
* @category generated
|
|
48
|
+
*/
|
|
49
|
+
export type LzReceiveAlertInstructionAccounts = {
|
|
50
|
+
executor: web3.PublicKey
|
|
51
|
+
eventAuthority: web3.PublicKey
|
|
52
|
+
program: web3.PublicKey
|
|
53
|
+
anchorRemainingAccounts?: web3.AccountMeta[]
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export const lzReceiveAlertInstructionDiscriminator = [
|
|
57
|
+
131, 141, 48, 222, 15, 235, 141, 160,
|
|
58
|
+
]
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Creates a _LzReceiveAlert_ instruction.
|
|
62
|
+
*
|
|
63
|
+
* @param accounts that will be accessed while the instruction is processed
|
|
64
|
+
* @param args to provide as instruction data to the program
|
|
65
|
+
*
|
|
66
|
+
* @category Instructions
|
|
67
|
+
* @category LzReceiveAlert
|
|
68
|
+
* @category generated
|
|
69
|
+
*/
|
|
70
|
+
export function createLzReceiveAlertInstruction(
|
|
71
|
+
accounts: LzReceiveAlertInstructionAccounts,
|
|
72
|
+
args: LzReceiveAlertInstructionArgs,
|
|
73
|
+
programId: web3.PublicKey
|
|
74
|
+
) {
|
|
75
|
+
const [data] = lzReceiveAlertStruct.serialize({
|
|
76
|
+
instructionDiscriminator: lzReceiveAlertInstructionDiscriminator,
|
|
77
|
+
...args,
|
|
78
|
+
})
|
|
79
|
+
const keys: web3.AccountMeta[] = [
|
|
80
|
+
{
|
|
81
|
+
pubkey: accounts.executor,
|
|
82
|
+
isWritable: false,
|
|
83
|
+
isSigner: true,
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
pubkey: accounts.eventAuthority,
|
|
87
|
+
isWritable: false,
|
|
88
|
+
isSigner: false,
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
pubkey: accounts.program,
|
|
92
|
+
isWritable: false,
|
|
93
|
+
isSigner: false,
|
|
94
|
+
},
|
|
95
|
+
]
|
|
96
|
+
|
|
97
|
+
if (accounts.anchorRemainingAccounts != null) {
|
|
98
|
+
for (const acc of accounts.anchorRemainingAccounts) {
|
|
99
|
+
keys.push(acc)
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
const ix = new web3.TransactionInstruction({
|
|
104
|
+
programId,
|
|
105
|
+
keys,
|
|
106
|
+
data,
|
|
107
|
+
})
|
|
108
|
+
return ix
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* Creates a _LzReceiveAlert_ instructionAccounts.
|
|
113
|
+
*
|
|
114
|
+
* @param accounts that will be accessed while the instruction is processed
|
|
115
|
+
* @category Instructions
|
|
116
|
+
* @category LzReceiveAlert
|
|
117
|
+
* @category generated
|
|
118
|
+
*/
|
|
119
|
+
export function createLzReceiveAlertInstructionAccounts(
|
|
120
|
+
accounts: LzReceiveAlertInstructionAccounts,
|
|
121
|
+
programId: web3.PublicKey
|
|
122
|
+
) {
|
|
123
|
+
const keys: web3.AccountMeta[] = [
|
|
124
|
+
{
|
|
125
|
+
pubkey: accounts.executor,
|
|
126
|
+
isWritable: false,
|
|
127
|
+
isSigner: true,
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
pubkey: accounts.eventAuthority,
|
|
131
|
+
isWritable: false,
|
|
132
|
+
isSigner: false,
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
pubkey: accounts.program,
|
|
136
|
+
isWritable: false,
|
|
137
|
+
isSigner: false,
|
|
138
|
+
},
|
|
139
|
+
]
|
|
140
|
+
|
|
141
|
+
if (accounts.anchorRemainingAccounts != null) {
|
|
142
|
+
for (const acc of accounts.anchorRemainingAccounts) {
|
|
143
|
+
keys.push(acc)
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
return keys
|
|
148
|
+
}
|
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This code was GENERATED using the solita package.
|
|
3
|
+
* Please DO NOT EDIT THIS FILE, instead rerun solita to update it or write a wrapper to add functionality.
|
|
4
|
+
*
|
|
5
|
+
* See: https://github.com/metaplex-foundation/solita
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import * as beet from '@metaplex-foundation/beet'
|
|
9
|
+
import * as web3 from '@solana/web3.js'
|
|
10
|
+
import { NilifyParams, nilifyParamsBeet } from '../types/NilifyParams'
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* @category Instructions
|
|
14
|
+
* @category Nilify
|
|
15
|
+
* @category generated
|
|
16
|
+
*/
|
|
17
|
+
export type NilifyInstructionArgs = {
|
|
18
|
+
params: NilifyParams
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* @category Instructions
|
|
22
|
+
* @category Nilify
|
|
23
|
+
* @category generated
|
|
24
|
+
*/
|
|
25
|
+
export const nilifyStruct = new beet.BeetArgsStruct<
|
|
26
|
+
NilifyInstructionArgs & {
|
|
27
|
+
instructionDiscriminator: number[] /* size: 8 */
|
|
28
|
+
}
|
|
29
|
+
>(
|
|
30
|
+
[
|
|
31
|
+
['instructionDiscriminator', beet.uniformFixedSizeArray(beet.u8, 8)],
|
|
32
|
+
['params', nilifyParamsBeet],
|
|
33
|
+
],
|
|
34
|
+
'NilifyInstructionArgs'
|
|
35
|
+
)
|
|
36
|
+
/**
|
|
37
|
+
* Accounts required by the _nilify_ instruction
|
|
38
|
+
*
|
|
39
|
+
* @property [**signer**] signer
|
|
40
|
+
* @property [] oappRegistry
|
|
41
|
+
* @property [_writable_] nonce
|
|
42
|
+
* @property [_writable_] pendingInboundNonce
|
|
43
|
+
* @property [_writable_] payloadHash
|
|
44
|
+
* @property [] eventAuthority
|
|
45
|
+
* @property [] program
|
|
46
|
+
* @category Instructions
|
|
47
|
+
* @category Nilify
|
|
48
|
+
* @category generated
|
|
49
|
+
*/
|
|
50
|
+
export type NilifyInstructionAccounts = {
|
|
51
|
+
signer: web3.PublicKey
|
|
52
|
+
oappRegistry: web3.PublicKey
|
|
53
|
+
nonce: web3.PublicKey
|
|
54
|
+
pendingInboundNonce: web3.PublicKey
|
|
55
|
+
payloadHash: web3.PublicKey
|
|
56
|
+
eventAuthority: web3.PublicKey
|
|
57
|
+
program: web3.PublicKey
|
|
58
|
+
anchorRemainingAccounts?: web3.AccountMeta[]
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export const nilifyInstructionDiscriminator = [
|
|
62
|
+
143, 136, 129, 199, 36, 35, 160, 85,
|
|
63
|
+
]
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Creates a _Nilify_ instruction.
|
|
67
|
+
*
|
|
68
|
+
* @param accounts that will be accessed while the instruction is processed
|
|
69
|
+
* @param args to provide as instruction data to the program
|
|
70
|
+
*
|
|
71
|
+
* @category Instructions
|
|
72
|
+
* @category Nilify
|
|
73
|
+
* @category generated
|
|
74
|
+
*/
|
|
75
|
+
export function createNilifyInstruction(
|
|
76
|
+
accounts: NilifyInstructionAccounts,
|
|
77
|
+
args: NilifyInstructionArgs,
|
|
78
|
+
programId: web3.PublicKey
|
|
79
|
+
) {
|
|
80
|
+
const [data] = nilifyStruct.serialize({
|
|
81
|
+
instructionDiscriminator: nilifyInstructionDiscriminator,
|
|
82
|
+
...args,
|
|
83
|
+
})
|
|
84
|
+
const keys: web3.AccountMeta[] = [
|
|
85
|
+
{
|
|
86
|
+
pubkey: accounts.signer,
|
|
87
|
+
isWritable: false,
|
|
88
|
+
isSigner: true,
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
pubkey: accounts.oappRegistry,
|
|
92
|
+
isWritable: false,
|
|
93
|
+
isSigner: false,
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
pubkey: accounts.nonce,
|
|
97
|
+
isWritable: true,
|
|
98
|
+
isSigner: false,
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
pubkey: accounts.pendingInboundNonce,
|
|
102
|
+
isWritable: true,
|
|
103
|
+
isSigner: false,
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
pubkey: accounts.payloadHash,
|
|
107
|
+
isWritable: true,
|
|
108
|
+
isSigner: false,
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
pubkey: accounts.eventAuthority,
|
|
112
|
+
isWritable: false,
|
|
113
|
+
isSigner: false,
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
pubkey: accounts.program,
|
|
117
|
+
isWritable: false,
|
|
118
|
+
isSigner: false,
|
|
119
|
+
},
|
|
120
|
+
]
|
|
121
|
+
|
|
122
|
+
if (accounts.anchorRemainingAccounts != null) {
|
|
123
|
+
for (const acc of accounts.anchorRemainingAccounts) {
|
|
124
|
+
keys.push(acc)
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
const ix = new web3.TransactionInstruction({
|
|
129
|
+
programId,
|
|
130
|
+
keys,
|
|
131
|
+
data,
|
|
132
|
+
})
|
|
133
|
+
return ix
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* Creates a _Nilify_ instructionAccounts.
|
|
138
|
+
*
|
|
139
|
+
* @param accounts that will be accessed while the instruction is processed
|
|
140
|
+
* @category Instructions
|
|
141
|
+
* @category Nilify
|
|
142
|
+
* @category generated
|
|
143
|
+
*/
|
|
144
|
+
export function createNilifyInstructionAccounts(
|
|
145
|
+
accounts: NilifyInstructionAccounts,
|
|
146
|
+
programId: web3.PublicKey
|
|
147
|
+
) {
|
|
148
|
+
const keys: web3.AccountMeta[] = [
|
|
149
|
+
{
|
|
150
|
+
pubkey: accounts.signer,
|
|
151
|
+
isWritable: false,
|
|
152
|
+
isSigner: true,
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
pubkey: accounts.oappRegistry,
|
|
156
|
+
isWritable: false,
|
|
157
|
+
isSigner: false,
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
pubkey: accounts.nonce,
|
|
161
|
+
isWritable: true,
|
|
162
|
+
isSigner: false,
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
pubkey: accounts.pendingInboundNonce,
|
|
166
|
+
isWritable: true,
|
|
167
|
+
isSigner: false,
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
pubkey: accounts.payloadHash,
|
|
171
|
+
isWritable: true,
|
|
172
|
+
isSigner: false,
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
pubkey: accounts.eventAuthority,
|
|
176
|
+
isWritable: false,
|
|
177
|
+
isSigner: false,
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
pubkey: accounts.program,
|
|
181
|
+
isWritable: false,
|
|
182
|
+
isSigner: false,
|
|
183
|
+
},
|
|
184
|
+
]
|
|
185
|
+
|
|
186
|
+
if (accounts.anchorRemainingAccounts != null) {
|
|
187
|
+
for (const acc of accounts.anchorRemainingAccounts) {
|
|
188
|
+
keys.push(acc)
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
return keys
|
|
193
|
+
}
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This code was GENERATED using the solita package.
|
|
3
|
+
* Please DO NOT EDIT THIS FILE, instead rerun solita to update it or write a wrapper to add functionality.
|
|
4
|
+
*
|
|
5
|
+
* See: https://github.com/metaplex-foundation/solita
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import * as beet from '@metaplex-foundation/beet'
|
|
9
|
+
import * as web3 from '@solana/web3.js'
|
|
10
|
+
import { QuoteParams, quoteParamsBeet } from '../types/QuoteParams'
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* @category Instructions
|
|
14
|
+
* @category Quote
|
|
15
|
+
* @category generated
|
|
16
|
+
*/
|
|
17
|
+
export type QuoteInstructionArgs = {
|
|
18
|
+
params: QuoteParams
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* @category Instructions
|
|
22
|
+
* @category Quote
|
|
23
|
+
* @category generated
|
|
24
|
+
*/
|
|
25
|
+
export const quoteStruct = new beet.FixableBeetArgsStruct<
|
|
26
|
+
QuoteInstructionArgs & {
|
|
27
|
+
instructionDiscriminator: number[] /* size: 8 */
|
|
28
|
+
}
|
|
29
|
+
>(
|
|
30
|
+
[
|
|
31
|
+
['instructionDiscriminator', beet.uniformFixedSizeArray(beet.u8, 8)],
|
|
32
|
+
['params', quoteParamsBeet],
|
|
33
|
+
],
|
|
34
|
+
'QuoteInstructionArgs'
|
|
35
|
+
)
|
|
36
|
+
/**
|
|
37
|
+
* Accounts required by the _quote_ instruction
|
|
38
|
+
*
|
|
39
|
+
* @property [] sendLibraryProgram
|
|
40
|
+
* @property [] sendLibraryConfig
|
|
41
|
+
* @property [] defaultSendLibraryConfig
|
|
42
|
+
* @property [] sendLibraryInfo
|
|
43
|
+
* @property [] endpoint
|
|
44
|
+
* @property [] nonce
|
|
45
|
+
* @category Instructions
|
|
46
|
+
* @category Quote
|
|
47
|
+
* @category generated
|
|
48
|
+
*/
|
|
49
|
+
export type QuoteInstructionAccounts = {
|
|
50
|
+
sendLibraryProgram: web3.PublicKey
|
|
51
|
+
sendLibraryConfig: web3.PublicKey
|
|
52
|
+
defaultSendLibraryConfig: web3.PublicKey
|
|
53
|
+
sendLibraryInfo: web3.PublicKey
|
|
54
|
+
endpoint: web3.PublicKey
|
|
55
|
+
nonce: web3.PublicKey
|
|
56
|
+
anchorRemainingAccounts?: web3.AccountMeta[]
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export const quoteInstructionDiscriminator = [
|
|
60
|
+
149, 42, 109, 247, 134, 146, 213, 123,
|
|
61
|
+
]
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Creates a _Quote_ instruction.
|
|
65
|
+
*
|
|
66
|
+
* @param accounts that will be accessed while the instruction is processed
|
|
67
|
+
* @param args to provide as instruction data to the program
|
|
68
|
+
*
|
|
69
|
+
* @category Instructions
|
|
70
|
+
* @category Quote
|
|
71
|
+
* @category generated
|
|
72
|
+
*/
|
|
73
|
+
export function createQuoteInstruction(
|
|
74
|
+
accounts: QuoteInstructionAccounts,
|
|
75
|
+
args: QuoteInstructionArgs,
|
|
76
|
+
programId: web3.PublicKey
|
|
77
|
+
) {
|
|
78
|
+
const [data] = quoteStruct.serialize({
|
|
79
|
+
instructionDiscriminator: quoteInstructionDiscriminator,
|
|
80
|
+
...args,
|
|
81
|
+
})
|
|
82
|
+
const keys: web3.AccountMeta[] = [
|
|
83
|
+
{
|
|
84
|
+
pubkey: accounts.sendLibraryProgram,
|
|
85
|
+
isWritable: false,
|
|
86
|
+
isSigner: false,
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
pubkey: accounts.sendLibraryConfig,
|
|
90
|
+
isWritable: false,
|
|
91
|
+
isSigner: false,
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
pubkey: accounts.defaultSendLibraryConfig,
|
|
95
|
+
isWritable: false,
|
|
96
|
+
isSigner: false,
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
pubkey: accounts.sendLibraryInfo,
|
|
100
|
+
isWritable: false,
|
|
101
|
+
isSigner: false,
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
pubkey: accounts.endpoint,
|
|
105
|
+
isWritable: false,
|
|
106
|
+
isSigner: false,
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
pubkey: accounts.nonce,
|
|
110
|
+
isWritable: false,
|
|
111
|
+
isSigner: false,
|
|
112
|
+
},
|
|
113
|
+
]
|
|
114
|
+
|
|
115
|
+
if (accounts.anchorRemainingAccounts != null) {
|
|
116
|
+
for (const acc of accounts.anchorRemainingAccounts) {
|
|
117
|
+
keys.push(acc)
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
const ix = new web3.TransactionInstruction({
|
|
122
|
+
programId,
|
|
123
|
+
keys,
|
|
124
|
+
data,
|
|
125
|
+
})
|
|
126
|
+
return ix
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
/**
|
|
130
|
+
* Creates a _Quote_ instructionAccounts.
|
|
131
|
+
*
|
|
132
|
+
* @param accounts that will be accessed while the instruction is processed
|
|
133
|
+
* @category Instructions
|
|
134
|
+
* @category Quote
|
|
135
|
+
* @category generated
|
|
136
|
+
*/
|
|
137
|
+
export function createQuoteInstructionAccounts(
|
|
138
|
+
accounts: QuoteInstructionAccounts,
|
|
139
|
+
programId: web3.PublicKey
|
|
140
|
+
) {
|
|
141
|
+
const keys: web3.AccountMeta[] = [
|
|
142
|
+
{
|
|
143
|
+
pubkey: accounts.sendLibraryProgram,
|
|
144
|
+
isWritable: false,
|
|
145
|
+
isSigner: false,
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
pubkey: accounts.sendLibraryConfig,
|
|
149
|
+
isWritable: false,
|
|
150
|
+
isSigner: false,
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
pubkey: accounts.defaultSendLibraryConfig,
|
|
154
|
+
isWritable: false,
|
|
155
|
+
isSigner: false,
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
pubkey: accounts.sendLibraryInfo,
|
|
159
|
+
isWritable: false,
|
|
160
|
+
isSigner: false,
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
pubkey: accounts.endpoint,
|
|
164
|
+
isWritable: false,
|
|
165
|
+
isSigner: false,
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
pubkey: accounts.nonce,
|
|
169
|
+
isWritable: false,
|
|
170
|
+
isSigner: false,
|
|
171
|
+
},
|
|
172
|
+
]
|
|
173
|
+
|
|
174
|
+
if (accounts.anchorRemainingAccounts != null) {
|
|
175
|
+
for (const acc of accounts.anchorRemainingAccounts) {
|
|
176
|
+
keys.push(acc)
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
return keys
|
|
181
|
+
}
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This code was GENERATED using the solita package.
|
|
3
|
+
* Please DO NOT EDIT THIS FILE, instead rerun solita to update it or write a wrapper to add functionality.
|
|
4
|
+
*
|
|
5
|
+
* See: https://github.com/metaplex-foundation/solita
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import * as beet from '@metaplex-foundation/beet'
|
|
9
|
+
import * as web3 from '@solana/web3.js'
|
|
10
|
+
import {
|
|
11
|
+
RegisterLibraryParams,
|
|
12
|
+
registerLibraryParamsBeet,
|
|
13
|
+
} from '../types/RegisterLibraryParams'
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* @category Instructions
|
|
17
|
+
* @category RegisterLibrary
|
|
18
|
+
* @category generated
|
|
19
|
+
*/
|
|
20
|
+
export type RegisterLibraryInstructionArgs = {
|
|
21
|
+
params: RegisterLibraryParams
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* @category Instructions
|
|
25
|
+
* @category RegisterLibrary
|
|
26
|
+
* @category generated
|
|
27
|
+
*/
|
|
28
|
+
export const registerLibraryStruct = new beet.BeetArgsStruct<
|
|
29
|
+
RegisterLibraryInstructionArgs & {
|
|
30
|
+
instructionDiscriminator: number[] /* size: 8 */
|
|
31
|
+
}
|
|
32
|
+
>(
|
|
33
|
+
[
|
|
34
|
+
['instructionDiscriminator', beet.uniformFixedSizeArray(beet.u8, 8)],
|
|
35
|
+
['params', registerLibraryParamsBeet],
|
|
36
|
+
],
|
|
37
|
+
'RegisterLibraryInstructionArgs'
|
|
38
|
+
)
|
|
39
|
+
/**
|
|
40
|
+
* Accounts required by the _registerLibrary_ instruction
|
|
41
|
+
*
|
|
42
|
+
* @property [_writable_, **signer**] admin
|
|
43
|
+
* @property [] endpoint
|
|
44
|
+
* @property [_writable_] messageLibInfo
|
|
45
|
+
* @property [] eventAuthority
|
|
46
|
+
* @property [] program
|
|
47
|
+
* @category Instructions
|
|
48
|
+
* @category RegisterLibrary
|
|
49
|
+
* @category generated
|
|
50
|
+
*/
|
|
51
|
+
export type RegisterLibraryInstructionAccounts = {
|
|
52
|
+
admin: web3.PublicKey
|
|
53
|
+
endpoint: web3.PublicKey
|
|
54
|
+
messageLibInfo: web3.PublicKey
|
|
55
|
+
systemProgram?: web3.PublicKey
|
|
56
|
+
eventAuthority: web3.PublicKey
|
|
57
|
+
program: web3.PublicKey
|
|
58
|
+
anchorRemainingAccounts?: web3.AccountMeta[]
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export const registerLibraryInstructionDiscriminator = [
|
|
62
|
+
23, 171, 28, 116, 111, 193, 238, 142,
|
|
63
|
+
]
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Creates a _RegisterLibrary_ instruction.
|
|
67
|
+
*
|
|
68
|
+
* @param accounts that will be accessed while the instruction is processed
|
|
69
|
+
* @param args to provide as instruction data to the program
|
|
70
|
+
*
|
|
71
|
+
* @category Instructions
|
|
72
|
+
* @category RegisterLibrary
|
|
73
|
+
* @category generated
|
|
74
|
+
*/
|
|
75
|
+
export function createRegisterLibraryInstruction(
|
|
76
|
+
accounts: RegisterLibraryInstructionAccounts,
|
|
77
|
+
args: RegisterLibraryInstructionArgs,
|
|
78
|
+
programId: web3.PublicKey
|
|
79
|
+
) {
|
|
80
|
+
const [data] = registerLibraryStruct.serialize({
|
|
81
|
+
instructionDiscriminator: registerLibraryInstructionDiscriminator,
|
|
82
|
+
...args,
|
|
83
|
+
})
|
|
84
|
+
const keys: web3.AccountMeta[] = [
|
|
85
|
+
{
|
|
86
|
+
pubkey: accounts.admin,
|
|
87
|
+
isWritable: true,
|
|
88
|
+
isSigner: true,
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
pubkey: accounts.endpoint,
|
|
92
|
+
isWritable: false,
|
|
93
|
+
isSigner: false,
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
pubkey: accounts.messageLibInfo,
|
|
97
|
+
isWritable: true,
|
|
98
|
+
isSigner: false,
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
pubkey: accounts.systemProgram ?? web3.SystemProgram.programId,
|
|
102
|
+
isWritable: false,
|
|
103
|
+
isSigner: false,
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
pubkey: accounts.eventAuthority,
|
|
107
|
+
isWritable: false,
|
|
108
|
+
isSigner: false,
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
pubkey: accounts.program,
|
|
112
|
+
isWritable: false,
|
|
113
|
+
isSigner: false,
|
|
114
|
+
},
|
|
115
|
+
]
|
|
116
|
+
|
|
117
|
+
if (accounts.anchorRemainingAccounts != null) {
|
|
118
|
+
for (const acc of accounts.anchorRemainingAccounts) {
|
|
119
|
+
keys.push(acc)
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
const ix = new web3.TransactionInstruction({
|
|
124
|
+
programId,
|
|
125
|
+
keys,
|
|
126
|
+
data,
|
|
127
|
+
})
|
|
128
|
+
return ix
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* Creates a _RegisterLibrary_ instructionAccounts.
|
|
133
|
+
*
|
|
134
|
+
* @param accounts that will be accessed while the instruction is processed
|
|
135
|
+
* @category Instructions
|
|
136
|
+
* @category RegisterLibrary
|
|
137
|
+
* @category generated
|
|
138
|
+
*/
|
|
139
|
+
export function createRegisterLibraryInstructionAccounts(
|
|
140
|
+
accounts: RegisterLibraryInstructionAccounts,
|
|
141
|
+
programId: web3.PublicKey
|
|
142
|
+
) {
|
|
143
|
+
const keys: web3.AccountMeta[] = [
|
|
144
|
+
{
|
|
145
|
+
pubkey: accounts.admin,
|
|
146
|
+
isWritable: true,
|
|
147
|
+
isSigner: true,
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
pubkey: accounts.endpoint,
|
|
151
|
+
isWritable: false,
|
|
152
|
+
isSigner: false,
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
pubkey: accounts.messageLibInfo,
|
|
156
|
+
isWritable: true,
|
|
157
|
+
isSigner: false,
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
pubkey: accounts.systemProgram ?? web3.SystemProgram.programId,
|
|
161
|
+
isWritable: false,
|
|
162
|
+
isSigner: false,
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
pubkey: accounts.eventAuthority,
|
|
166
|
+
isWritable: false,
|
|
167
|
+
isSigner: false,
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
pubkey: accounts.program,
|
|
171
|
+
isWritable: false,
|
|
172
|
+
isSigner: false,
|
|
173
|
+
},
|
|
174
|
+
]
|
|
175
|
+
|
|
176
|
+
if (accounts.anchorRemainingAccounts != null) {
|
|
177
|
+
for (const acc of accounts.anchorRemainingAccounts) {
|
|
178
|
+
keys.push(acc)
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
return keys
|
|
183
|
+
}
|