@layerzerolabs/lz-solana-sdk-v2 3.0.47 → 3.0.49
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 +26 -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,195 @@
|
|
|
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
|
+
InitDefaultReceiveLibraryParams,
|
|
12
|
+
initDefaultReceiveLibraryParamsBeet,
|
|
13
|
+
} from '../types/InitDefaultReceiveLibraryParams'
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* @category Instructions
|
|
17
|
+
* @category InitDefaultReceiveLibrary
|
|
18
|
+
* @category generated
|
|
19
|
+
*/
|
|
20
|
+
export type InitDefaultReceiveLibraryInstructionArgs = {
|
|
21
|
+
params: InitDefaultReceiveLibraryParams
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* @category Instructions
|
|
25
|
+
* @category InitDefaultReceiveLibrary
|
|
26
|
+
* @category generated
|
|
27
|
+
*/
|
|
28
|
+
export const initDefaultReceiveLibraryStruct = new beet.BeetArgsStruct<
|
|
29
|
+
InitDefaultReceiveLibraryInstructionArgs & {
|
|
30
|
+
instructionDiscriminator: number[] /* size: 8 */
|
|
31
|
+
}
|
|
32
|
+
>(
|
|
33
|
+
[
|
|
34
|
+
['instructionDiscriminator', beet.uniformFixedSizeArray(beet.u8, 8)],
|
|
35
|
+
['params', initDefaultReceiveLibraryParamsBeet],
|
|
36
|
+
],
|
|
37
|
+
'InitDefaultReceiveLibraryInstructionArgs'
|
|
38
|
+
)
|
|
39
|
+
/**
|
|
40
|
+
* Accounts required by the _initDefaultReceiveLibrary_ instruction
|
|
41
|
+
*
|
|
42
|
+
* @property [_writable_, **signer**] admin
|
|
43
|
+
* @property [] endpoint
|
|
44
|
+
* @property [_writable_] defaultReceiveLibraryConfig
|
|
45
|
+
* @property [] messageLibInfo
|
|
46
|
+
* @property [] eventAuthority
|
|
47
|
+
* @property [] program
|
|
48
|
+
* @category Instructions
|
|
49
|
+
* @category InitDefaultReceiveLibrary
|
|
50
|
+
* @category generated
|
|
51
|
+
*/
|
|
52
|
+
export type InitDefaultReceiveLibraryInstructionAccounts = {
|
|
53
|
+
admin: web3.PublicKey
|
|
54
|
+
endpoint: web3.PublicKey
|
|
55
|
+
defaultReceiveLibraryConfig: web3.PublicKey
|
|
56
|
+
messageLibInfo: web3.PublicKey
|
|
57
|
+
systemProgram?: web3.PublicKey
|
|
58
|
+
eventAuthority: web3.PublicKey
|
|
59
|
+
program: web3.PublicKey
|
|
60
|
+
anchorRemainingAccounts?: web3.AccountMeta[]
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export const initDefaultReceiveLibraryInstructionDiscriminator = [
|
|
64
|
+
32, 202, 76, 22, 42, 249, 227, 109,
|
|
65
|
+
]
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Creates a _InitDefaultReceiveLibrary_ instruction.
|
|
69
|
+
*
|
|
70
|
+
* @param accounts that will be accessed while the instruction is processed
|
|
71
|
+
* @param args to provide as instruction data to the program
|
|
72
|
+
*
|
|
73
|
+
* @category Instructions
|
|
74
|
+
* @category InitDefaultReceiveLibrary
|
|
75
|
+
* @category generated
|
|
76
|
+
*/
|
|
77
|
+
export function createInitDefaultReceiveLibraryInstruction(
|
|
78
|
+
accounts: InitDefaultReceiveLibraryInstructionAccounts,
|
|
79
|
+
args: InitDefaultReceiveLibraryInstructionArgs,
|
|
80
|
+
programId: web3.PublicKey
|
|
81
|
+
) {
|
|
82
|
+
const [data] = initDefaultReceiveLibraryStruct.serialize({
|
|
83
|
+
instructionDiscriminator: initDefaultReceiveLibraryInstructionDiscriminator,
|
|
84
|
+
...args,
|
|
85
|
+
})
|
|
86
|
+
const keys: web3.AccountMeta[] = [
|
|
87
|
+
{
|
|
88
|
+
pubkey: accounts.admin,
|
|
89
|
+
isWritable: true,
|
|
90
|
+
isSigner: true,
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
pubkey: accounts.endpoint,
|
|
94
|
+
isWritable: false,
|
|
95
|
+
isSigner: false,
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
pubkey: accounts.defaultReceiveLibraryConfig,
|
|
99
|
+
isWritable: true,
|
|
100
|
+
isSigner: false,
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
pubkey: accounts.messageLibInfo,
|
|
104
|
+
isWritable: false,
|
|
105
|
+
isSigner: false,
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
pubkey: accounts.systemProgram ?? web3.SystemProgram.programId,
|
|
109
|
+
isWritable: false,
|
|
110
|
+
isSigner: false,
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
pubkey: accounts.eventAuthority,
|
|
114
|
+
isWritable: false,
|
|
115
|
+
isSigner: false,
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
pubkey: accounts.program,
|
|
119
|
+
isWritable: false,
|
|
120
|
+
isSigner: false,
|
|
121
|
+
},
|
|
122
|
+
]
|
|
123
|
+
|
|
124
|
+
if (accounts.anchorRemainingAccounts != null) {
|
|
125
|
+
for (const acc of accounts.anchorRemainingAccounts) {
|
|
126
|
+
keys.push(acc)
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
const ix = new web3.TransactionInstruction({
|
|
131
|
+
programId,
|
|
132
|
+
keys,
|
|
133
|
+
data,
|
|
134
|
+
})
|
|
135
|
+
return ix
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* Creates a _InitDefaultReceiveLibrary_ instructionAccounts.
|
|
140
|
+
*
|
|
141
|
+
* @param accounts that will be accessed while the instruction is processed
|
|
142
|
+
* @category Instructions
|
|
143
|
+
* @category InitDefaultReceiveLibrary
|
|
144
|
+
* @category generated
|
|
145
|
+
*/
|
|
146
|
+
export function createInitDefaultReceiveLibraryInstructionAccounts(
|
|
147
|
+
accounts: InitDefaultReceiveLibraryInstructionAccounts,
|
|
148
|
+
programId: web3.PublicKey
|
|
149
|
+
) {
|
|
150
|
+
const keys: web3.AccountMeta[] = [
|
|
151
|
+
{
|
|
152
|
+
pubkey: accounts.admin,
|
|
153
|
+
isWritable: true,
|
|
154
|
+
isSigner: true,
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
pubkey: accounts.endpoint,
|
|
158
|
+
isWritable: false,
|
|
159
|
+
isSigner: false,
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
pubkey: accounts.defaultReceiveLibraryConfig,
|
|
163
|
+
isWritable: true,
|
|
164
|
+
isSigner: false,
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
pubkey: accounts.messageLibInfo,
|
|
168
|
+
isWritable: false,
|
|
169
|
+
isSigner: false,
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
pubkey: accounts.systemProgram ?? web3.SystemProgram.programId,
|
|
173
|
+
isWritable: false,
|
|
174
|
+
isSigner: false,
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
pubkey: accounts.eventAuthority,
|
|
178
|
+
isWritable: false,
|
|
179
|
+
isSigner: false,
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
pubkey: accounts.program,
|
|
183
|
+
isWritable: false,
|
|
184
|
+
isSigner: false,
|
|
185
|
+
},
|
|
186
|
+
]
|
|
187
|
+
|
|
188
|
+
if (accounts.anchorRemainingAccounts != null) {
|
|
189
|
+
for (const acc of accounts.anchorRemainingAccounts) {
|
|
190
|
+
keys.push(acc)
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
return keys
|
|
195
|
+
}
|
|
@@ -0,0 +1,195 @@
|
|
|
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
|
+
InitDefaultSendLibraryParams,
|
|
12
|
+
initDefaultSendLibraryParamsBeet,
|
|
13
|
+
} from '../types/InitDefaultSendLibraryParams'
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* @category Instructions
|
|
17
|
+
* @category InitDefaultSendLibrary
|
|
18
|
+
* @category generated
|
|
19
|
+
*/
|
|
20
|
+
export type InitDefaultSendLibraryInstructionArgs = {
|
|
21
|
+
params: InitDefaultSendLibraryParams
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* @category Instructions
|
|
25
|
+
* @category InitDefaultSendLibrary
|
|
26
|
+
* @category generated
|
|
27
|
+
*/
|
|
28
|
+
export const initDefaultSendLibraryStruct = new beet.BeetArgsStruct<
|
|
29
|
+
InitDefaultSendLibraryInstructionArgs & {
|
|
30
|
+
instructionDiscriminator: number[] /* size: 8 */
|
|
31
|
+
}
|
|
32
|
+
>(
|
|
33
|
+
[
|
|
34
|
+
['instructionDiscriminator', beet.uniformFixedSizeArray(beet.u8, 8)],
|
|
35
|
+
['params', initDefaultSendLibraryParamsBeet],
|
|
36
|
+
],
|
|
37
|
+
'InitDefaultSendLibraryInstructionArgs'
|
|
38
|
+
)
|
|
39
|
+
/**
|
|
40
|
+
* Accounts required by the _initDefaultSendLibrary_ instruction
|
|
41
|
+
*
|
|
42
|
+
* @property [_writable_, **signer**] admin
|
|
43
|
+
* @property [] endpoint
|
|
44
|
+
* @property [_writable_] defaultSendLibraryConfig
|
|
45
|
+
* @property [] messageLibInfo
|
|
46
|
+
* @property [] eventAuthority
|
|
47
|
+
* @property [] program
|
|
48
|
+
* @category Instructions
|
|
49
|
+
* @category InitDefaultSendLibrary
|
|
50
|
+
* @category generated
|
|
51
|
+
*/
|
|
52
|
+
export type InitDefaultSendLibraryInstructionAccounts = {
|
|
53
|
+
admin: web3.PublicKey
|
|
54
|
+
endpoint: web3.PublicKey
|
|
55
|
+
defaultSendLibraryConfig: web3.PublicKey
|
|
56
|
+
messageLibInfo: web3.PublicKey
|
|
57
|
+
systemProgram?: web3.PublicKey
|
|
58
|
+
eventAuthority: web3.PublicKey
|
|
59
|
+
program: web3.PublicKey
|
|
60
|
+
anchorRemainingAccounts?: web3.AccountMeta[]
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export const initDefaultSendLibraryInstructionDiscriminator = [
|
|
64
|
+
120, 187, 15, 31, 174, 97, 138, 58,
|
|
65
|
+
]
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Creates a _InitDefaultSendLibrary_ instruction.
|
|
69
|
+
*
|
|
70
|
+
* @param accounts that will be accessed while the instruction is processed
|
|
71
|
+
* @param args to provide as instruction data to the program
|
|
72
|
+
*
|
|
73
|
+
* @category Instructions
|
|
74
|
+
* @category InitDefaultSendLibrary
|
|
75
|
+
* @category generated
|
|
76
|
+
*/
|
|
77
|
+
export function createInitDefaultSendLibraryInstruction(
|
|
78
|
+
accounts: InitDefaultSendLibraryInstructionAccounts,
|
|
79
|
+
args: InitDefaultSendLibraryInstructionArgs,
|
|
80
|
+
programId: web3.PublicKey
|
|
81
|
+
) {
|
|
82
|
+
const [data] = initDefaultSendLibraryStruct.serialize({
|
|
83
|
+
instructionDiscriminator: initDefaultSendLibraryInstructionDiscriminator,
|
|
84
|
+
...args,
|
|
85
|
+
})
|
|
86
|
+
const keys: web3.AccountMeta[] = [
|
|
87
|
+
{
|
|
88
|
+
pubkey: accounts.admin,
|
|
89
|
+
isWritable: true,
|
|
90
|
+
isSigner: true,
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
pubkey: accounts.endpoint,
|
|
94
|
+
isWritable: false,
|
|
95
|
+
isSigner: false,
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
pubkey: accounts.defaultSendLibraryConfig,
|
|
99
|
+
isWritable: true,
|
|
100
|
+
isSigner: false,
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
pubkey: accounts.messageLibInfo,
|
|
104
|
+
isWritable: false,
|
|
105
|
+
isSigner: false,
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
pubkey: accounts.systemProgram ?? web3.SystemProgram.programId,
|
|
109
|
+
isWritable: false,
|
|
110
|
+
isSigner: false,
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
pubkey: accounts.eventAuthority,
|
|
114
|
+
isWritable: false,
|
|
115
|
+
isSigner: false,
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
pubkey: accounts.program,
|
|
119
|
+
isWritable: false,
|
|
120
|
+
isSigner: false,
|
|
121
|
+
},
|
|
122
|
+
]
|
|
123
|
+
|
|
124
|
+
if (accounts.anchorRemainingAccounts != null) {
|
|
125
|
+
for (const acc of accounts.anchorRemainingAccounts) {
|
|
126
|
+
keys.push(acc)
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
const ix = new web3.TransactionInstruction({
|
|
131
|
+
programId,
|
|
132
|
+
keys,
|
|
133
|
+
data,
|
|
134
|
+
})
|
|
135
|
+
return ix
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* Creates a _InitDefaultSendLibrary_ instructionAccounts.
|
|
140
|
+
*
|
|
141
|
+
* @param accounts that will be accessed while the instruction is processed
|
|
142
|
+
* @category Instructions
|
|
143
|
+
* @category InitDefaultSendLibrary
|
|
144
|
+
* @category generated
|
|
145
|
+
*/
|
|
146
|
+
export function createInitDefaultSendLibraryInstructionAccounts(
|
|
147
|
+
accounts: InitDefaultSendLibraryInstructionAccounts,
|
|
148
|
+
programId: web3.PublicKey
|
|
149
|
+
) {
|
|
150
|
+
const keys: web3.AccountMeta[] = [
|
|
151
|
+
{
|
|
152
|
+
pubkey: accounts.admin,
|
|
153
|
+
isWritable: true,
|
|
154
|
+
isSigner: true,
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
pubkey: accounts.endpoint,
|
|
158
|
+
isWritable: false,
|
|
159
|
+
isSigner: false,
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
pubkey: accounts.defaultSendLibraryConfig,
|
|
163
|
+
isWritable: true,
|
|
164
|
+
isSigner: false,
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
pubkey: accounts.messageLibInfo,
|
|
168
|
+
isWritable: false,
|
|
169
|
+
isSigner: false,
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
pubkey: accounts.systemProgram ?? web3.SystemProgram.programId,
|
|
173
|
+
isWritable: false,
|
|
174
|
+
isSigner: false,
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
pubkey: accounts.eventAuthority,
|
|
178
|
+
isWritable: false,
|
|
179
|
+
isSigner: false,
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
pubkey: accounts.program,
|
|
183
|
+
isWritable: false,
|
|
184
|
+
isSigner: false,
|
|
185
|
+
},
|
|
186
|
+
]
|
|
187
|
+
|
|
188
|
+
if (accounts.anchorRemainingAccounts != null) {
|
|
189
|
+
for (const acc of accounts.anchorRemainingAccounts) {
|
|
190
|
+
keys.push(acc)
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
return keys
|
|
195
|
+
}
|
|
@@ -0,0 +1,147 @@
|
|
|
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
|
+
InitEndpointParams,
|
|
12
|
+
initEndpointParamsBeet,
|
|
13
|
+
} from '../types/InitEndpointParams'
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* @category Instructions
|
|
17
|
+
* @category InitEndpoint
|
|
18
|
+
* @category generated
|
|
19
|
+
*/
|
|
20
|
+
export type InitEndpointInstructionArgs = {
|
|
21
|
+
params: InitEndpointParams
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* @category Instructions
|
|
25
|
+
* @category InitEndpoint
|
|
26
|
+
* @category generated
|
|
27
|
+
*/
|
|
28
|
+
export const initEndpointStruct = new beet.BeetArgsStruct<
|
|
29
|
+
InitEndpointInstructionArgs & {
|
|
30
|
+
instructionDiscriminator: number[] /* size: 8 */
|
|
31
|
+
}
|
|
32
|
+
>(
|
|
33
|
+
[
|
|
34
|
+
['instructionDiscriminator', beet.uniformFixedSizeArray(beet.u8, 8)],
|
|
35
|
+
['params', initEndpointParamsBeet],
|
|
36
|
+
],
|
|
37
|
+
'InitEndpointInstructionArgs'
|
|
38
|
+
)
|
|
39
|
+
/**
|
|
40
|
+
* Accounts required by the _initEndpoint_ instruction
|
|
41
|
+
*
|
|
42
|
+
* @property [_writable_, **signer**] payer
|
|
43
|
+
* @property [_writable_] endpoint
|
|
44
|
+
* @category Instructions
|
|
45
|
+
* @category InitEndpoint
|
|
46
|
+
* @category generated
|
|
47
|
+
*/
|
|
48
|
+
export type InitEndpointInstructionAccounts = {
|
|
49
|
+
payer: web3.PublicKey
|
|
50
|
+
endpoint: web3.PublicKey
|
|
51
|
+
systemProgram?: web3.PublicKey
|
|
52
|
+
anchorRemainingAccounts?: web3.AccountMeta[]
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export const initEndpointInstructionDiscriminator = [
|
|
56
|
+
178, 30, 29, 207, 120, 225, 246, 134,
|
|
57
|
+
]
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Creates a _InitEndpoint_ instruction.
|
|
61
|
+
*
|
|
62
|
+
* @param accounts that will be accessed while the instruction is processed
|
|
63
|
+
* @param args to provide as instruction data to the program
|
|
64
|
+
*
|
|
65
|
+
* @category Instructions
|
|
66
|
+
* @category InitEndpoint
|
|
67
|
+
* @category generated
|
|
68
|
+
*/
|
|
69
|
+
export function createInitEndpointInstruction(
|
|
70
|
+
accounts: InitEndpointInstructionAccounts,
|
|
71
|
+
args: InitEndpointInstructionArgs,
|
|
72
|
+
programId: web3.PublicKey
|
|
73
|
+
) {
|
|
74
|
+
const [data] = initEndpointStruct.serialize({
|
|
75
|
+
instructionDiscriminator: initEndpointInstructionDiscriminator,
|
|
76
|
+
...args,
|
|
77
|
+
})
|
|
78
|
+
const keys: web3.AccountMeta[] = [
|
|
79
|
+
{
|
|
80
|
+
pubkey: accounts.payer,
|
|
81
|
+
isWritable: true,
|
|
82
|
+
isSigner: true,
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
pubkey: accounts.endpoint,
|
|
86
|
+
isWritable: true,
|
|
87
|
+
isSigner: false,
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
pubkey: accounts.systemProgram ?? web3.SystemProgram.programId,
|
|
91
|
+
isWritable: false,
|
|
92
|
+
isSigner: false,
|
|
93
|
+
},
|
|
94
|
+
]
|
|
95
|
+
|
|
96
|
+
if (accounts.anchorRemainingAccounts != null) {
|
|
97
|
+
for (const acc of accounts.anchorRemainingAccounts) {
|
|
98
|
+
keys.push(acc)
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
const ix = new web3.TransactionInstruction({
|
|
103
|
+
programId,
|
|
104
|
+
keys,
|
|
105
|
+
data,
|
|
106
|
+
})
|
|
107
|
+
return ix
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* Creates a _InitEndpoint_ instructionAccounts.
|
|
112
|
+
*
|
|
113
|
+
* @param accounts that will be accessed while the instruction is processed
|
|
114
|
+
* @category Instructions
|
|
115
|
+
* @category InitEndpoint
|
|
116
|
+
* @category generated
|
|
117
|
+
*/
|
|
118
|
+
export function createInitEndpointInstructionAccounts(
|
|
119
|
+
accounts: InitEndpointInstructionAccounts,
|
|
120
|
+
programId: web3.PublicKey
|
|
121
|
+
) {
|
|
122
|
+
const keys: web3.AccountMeta[] = [
|
|
123
|
+
{
|
|
124
|
+
pubkey: accounts.payer,
|
|
125
|
+
isWritable: true,
|
|
126
|
+
isSigner: true,
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
pubkey: accounts.endpoint,
|
|
130
|
+
isWritable: true,
|
|
131
|
+
isSigner: false,
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
pubkey: accounts.systemProgram ?? web3.SystemProgram.programId,
|
|
135
|
+
isWritable: false,
|
|
136
|
+
isSigner: false,
|
|
137
|
+
},
|
|
138
|
+
]
|
|
139
|
+
|
|
140
|
+
if (accounts.anchorRemainingAccounts != null) {
|
|
141
|
+
for (const acc of accounts.anchorRemainingAccounts) {
|
|
142
|
+
keys.push(acc)
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
return keys
|
|
147
|
+
}
|
|
@@ -0,0 +1,168 @@
|
|
|
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 { InitNonceParams, initNonceParamsBeet } from '../types/InitNonceParams'
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* @category Instructions
|
|
14
|
+
* @category InitNonce
|
|
15
|
+
* @category generated
|
|
16
|
+
*/
|
|
17
|
+
export type InitNonceInstructionArgs = {
|
|
18
|
+
params: InitNonceParams
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* @category Instructions
|
|
22
|
+
* @category InitNonce
|
|
23
|
+
* @category generated
|
|
24
|
+
*/
|
|
25
|
+
export const initNonceStruct = new beet.BeetArgsStruct<
|
|
26
|
+
InitNonceInstructionArgs & {
|
|
27
|
+
instructionDiscriminator: number[] /* size: 8 */
|
|
28
|
+
}
|
|
29
|
+
>(
|
|
30
|
+
[
|
|
31
|
+
['instructionDiscriminator', beet.uniformFixedSizeArray(beet.u8, 8)],
|
|
32
|
+
['params', initNonceParamsBeet],
|
|
33
|
+
],
|
|
34
|
+
'InitNonceInstructionArgs'
|
|
35
|
+
)
|
|
36
|
+
/**
|
|
37
|
+
* Accounts required by the _initNonce_ instruction
|
|
38
|
+
*
|
|
39
|
+
* @property [_writable_, **signer**] delegate
|
|
40
|
+
* @property [] oappRegistry
|
|
41
|
+
* @property [_writable_] nonce
|
|
42
|
+
* @property [_writable_] pendingInboundNonce
|
|
43
|
+
* @category Instructions
|
|
44
|
+
* @category InitNonce
|
|
45
|
+
* @category generated
|
|
46
|
+
*/
|
|
47
|
+
export type InitNonceInstructionAccounts = {
|
|
48
|
+
delegate: web3.PublicKey
|
|
49
|
+
oappRegistry: web3.PublicKey
|
|
50
|
+
nonce: web3.PublicKey
|
|
51
|
+
pendingInboundNonce: web3.PublicKey
|
|
52
|
+
systemProgram?: web3.PublicKey
|
|
53
|
+
anchorRemainingAccounts?: web3.AccountMeta[]
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export const initNonceInstructionDiscriminator = [
|
|
57
|
+
204, 171, 16, 214, 182, 191, 27, 196,
|
|
58
|
+
]
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Creates a _InitNonce_ 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 InitNonce
|
|
68
|
+
* @category generated
|
|
69
|
+
*/
|
|
70
|
+
export function createInitNonceInstruction(
|
|
71
|
+
accounts: InitNonceInstructionAccounts,
|
|
72
|
+
args: InitNonceInstructionArgs,
|
|
73
|
+
programId: web3.PublicKey
|
|
74
|
+
) {
|
|
75
|
+
const [data] = initNonceStruct.serialize({
|
|
76
|
+
instructionDiscriminator: initNonceInstructionDiscriminator,
|
|
77
|
+
...args,
|
|
78
|
+
})
|
|
79
|
+
const keys: web3.AccountMeta[] = [
|
|
80
|
+
{
|
|
81
|
+
pubkey: accounts.delegate,
|
|
82
|
+
isWritable: true,
|
|
83
|
+
isSigner: true,
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
pubkey: accounts.oappRegistry,
|
|
87
|
+
isWritable: false,
|
|
88
|
+
isSigner: false,
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
pubkey: accounts.nonce,
|
|
92
|
+
isWritable: true,
|
|
93
|
+
isSigner: false,
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
pubkey: accounts.pendingInboundNonce,
|
|
97
|
+
isWritable: true,
|
|
98
|
+
isSigner: false,
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
pubkey: accounts.systemProgram ?? web3.SystemProgram.programId,
|
|
102
|
+
isWritable: false,
|
|
103
|
+
isSigner: false,
|
|
104
|
+
},
|
|
105
|
+
]
|
|
106
|
+
|
|
107
|
+
if (accounts.anchorRemainingAccounts != null) {
|
|
108
|
+
for (const acc of accounts.anchorRemainingAccounts) {
|
|
109
|
+
keys.push(acc)
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
const ix = new web3.TransactionInstruction({
|
|
114
|
+
programId,
|
|
115
|
+
keys,
|
|
116
|
+
data,
|
|
117
|
+
})
|
|
118
|
+
return ix
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* Creates a _InitNonce_ instructionAccounts.
|
|
123
|
+
*
|
|
124
|
+
* @param accounts that will be accessed while the instruction is processed
|
|
125
|
+
* @category Instructions
|
|
126
|
+
* @category InitNonce
|
|
127
|
+
* @category generated
|
|
128
|
+
*/
|
|
129
|
+
export function createInitNonceInstructionAccounts(
|
|
130
|
+
accounts: InitNonceInstructionAccounts,
|
|
131
|
+
programId: web3.PublicKey
|
|
132
|
+
) {
|
|
133
|
+
const keys: web3.AccountMeta[] = [
|
|
134
|
+
{
|
|
135
|
+
pubkey: accounts.delegate,
|
|
136
|
+
isWritable: true,
|
|
137
|
+
isSigner: true,
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
pubkey: accounts.oappRegistry,
|
|
141
|
+
isWritable: false,
|
|
142
|
+
isSigner: false,
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
pubkey: accounts.nonce,
|
|
146
|
+
isWritable: true,
|
|
147
|
+
isSigner: false,
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
pubkey: accounts.pendingInboundNonce,
|
|
151
|
+
isWritable: true,
|
|
152
|
+
isSigner: false,
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
pubkey: accounts.systemProgram ?? web3.SystemProgram.programId,
|
|
156
|
+
isWritable: false,
|
|
157
|
+
isSigner: false,
|
|
158
|
+
},
|
|
159
|
+
]
|
|
160
|
+
|
|
161
|
+
if (accounts.anchorRemainingAccounts != null) {
|
|
162
|
+
for (const acc of accounts.anchorRemainingAccounts) {
|
|
163
|
+
keys.push(acc)
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
return keys
|
|
168
|
+
}
|