@ghostspeak/sdk 2.0.0 → 2.0.1
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/LICENSE +21 -0
- package/dist/.tsbuildinfo +1 -1
- package/dist/GhostSpeakClient-CyeZ6Tyb.d.ts +2061 -0
- package/dist/client.d.ts +4 -3
- package/dist/crypto.d.ts +2 -2
- package/dist/{feature-flags-CEaxXgQQ.d.ts → feature-flags-3POmoO_Z.d.ts} +833 -1190
- package/dist/index.d.ts +206 -4543
- package/dist/ipfs-types-KJcvy9Qk.d.ts +553 -0
- package/dist/minimal/core-minimal.d.ts +2037 -82
- package/dist/utils.d.ts +4 -4
- package/package.json +5 -29
- package/dist/EscrowInstructions-4P3H6ETO.js +0 -2
- package/dist/EscrowInstructions-4P3H6ETO.js.map +0 -1
- package/dist/GhostSpeakClient-4SROinEf.d.ts +0 -503
- package/dist/accounts-IUZMPYVE.js +0 -2
- package/dist/accounts-IUZMPYVE.js.map +0 -1
- package/dist/agent-GZ2OES75.js +0 -2
- package/dist/agent-GZ2OES75.js.map +0 -1
- package/dist/auctionMarketplace-W4YM7HKU.js +0 -2
- package/dist/auctionMarketplace-W4YM7HKU.js.map +0 -1
- package/dist/chunk-2KOOI5BX.js +0 -2
- package/dist/chunk-2KOOI5BX.js.map +0 -1
- package/dist/chunk-32GWTXRJ.js +0 -3
- package/dist/chunk-32GWTXRJ.js.map +0 -1
- package/dist/chunk-B4WUFVLE.js +0 -2
- package/dist/chunk-B4WUFVLE.js.map +0 -1
- package/dist/chunk-C2OTQ5YS.js +0 -2
- package/dist/chunk-C2OTQ5YS.js.map +0 -1
- package/dist/chunk-CTC4ZJ26.js +0 -5
- package/dist/chunk-CTC4ZJ26.js.map +0 -1
- package/dist/chunk-DF7LLAMH.js +0 -2
- package/dist/chunk-DF7LLAMH.js.map +0 -1
- package/dist/chunk-DJ356OUX.js +0 -2
- package/dist/chunk-DJ356OUX.js.map +0 -1
- package/dist/chunk-DK5YDBXR.js +0 -2
- package/dist/chunk-DK5YDBXR.js.map +0 -1
- package/dist/chunk-DOTF5ECA.js +0 -4
- package/dist/chunk-DOTF5ECA.js.map +0 -1
- package/dist/chunk-FKEUXXZS.js +0 -30
- package/dist/chunk-FKEUXXZS.js.map +0 -1
- package/dist/chunk-GSHXEKBW.js +0 -2
- package/dist/chunk-GSHXEKBW.js.map +0 -1
- package/dist/chunk-IZDAEOLH.js +0 -2
- package/dist/chunk-IZDAEOLH.js.map +0 -1
- package/dist/chunk-JY554RGE.js +0 -3
- package/dist/chunk-JY554RGE.js.map +0 -1
- package/dist/chunk-KK3HV2RD.js +0 -3
- package/dist/chunk-KK3HV2RD.js.map +0 -1
- package/dist/chunk-PPOCDM6G.js +0 -2
- package/dist/chunk-PPOCDM6G.js.map +0 -1
- package/dist/chunk-PUI35LBF.js +0 -2
- package/dist/chunk-PUI35LBF.js.map +0 -1
- package/dist/chunk-Q34J6YDA.js +0 -11
- package/dist/chunk-Q34J6YDA.js.map +0 -1
- package/dist/chunk-QATBFZMM.js +0 -3
- package/dist/chunk-QATBFZMM.js.map +0 -1
- package/dist/chunk-QTKN3VZV.js +0 -2
- package/dist/chunk-QTKN3VZV.js.map +0 -1
- package/dist/chunk-RFBYMTTN.js +0 -2
- package/dist/chunk-RFBYMTTN.js.map +0 -1
- package/dist/chunk-RJJPOLCK.js +0 -22
- package/dist/chunk-RJJPOLCK.js.map +0 -1
- package/dist/chunk-RTWJTEND.js +0 -2
- package/dist/chunk-RTWJTEND.js.map +0 -1
- package/dist/chunk-SR3ZJCME.js +0 -2
- package/dist/chunk-SR3ZJCME.js.map +0 -1
- package/dist/chunk-TAWXH7KX.js +0 -2
- package/dist/chunk-TAWXH7KX.js.map +0 -1
- package/dist/client.js +0 -2
- package/dist/client.js.map +0 -1
- package/dist/confidential-transfer-manager-CGS3T5DG.js +0 -2
- package/dist/confidential-transfer-manager-CGS3T5DG.js.map +0 -1
- package/dist/crypto.js +0 -2
- package/dist/crypto.js.map +0 -1
- package/dist/elgamal-3ABOJSHC.js +0 -2
- package/dist/elgamal-3ABOJSHC.js.map +0 -1
- package/dist/enhanced-client-errors-W22U3LNH.js +0 -2
- package/dist/enhanced-client-errors-W22U3LNH.js.map +0 -1
- package/dist/errors.js +0 -2
- package/dist/errors.js.map +0 -1
- package/dist/generated-U3L4KUE4.js +0 -2
- package/dist/generated-U3L4KUE4.js.map +0 -1
- package/dist/ghostspeak_wasm-3KPNJTSS.js +0 -2
- package/dist/ghostspeak_wasm-3KPNJTSS.js.map +0 -1
- package/dist/index.js +0 -97
- package/dist/index.js.map +0 -1
- package/dist/ipfs-types-BlxtJ3q2.d.ts +0 -194
- package/dist/metafile-esm.json +0 -1
- package/dist/minimal/core-minimal.js +0 -12
- package/dist/minimal/core-minimal.js.map +0 -1
- package/dist/pda-2GUWRQ5G.js +0 -2
- package/dist/pda-2GUWRQ5G.js.map +0 -1
- package/dist/registerAgentCompressed-L6ACXD2Z.js +0 -2
- package/dist/registerAgentCompressed-L6ACXD2Z.js.map +0 -1
- package/dist/token-2022-rpc-SRHRFN5Y.js +0 -2
- package/dist/token-2022-rpc-SRHRFN5Y.js.map +0 -1
- package/dist/types.js +0 -2
- package/dist/types.js.map +0 -1
- package/dist/utils.js +0 -2
- package/dist/utils.js.map +0 -1
- package/dist/zk-proof-builder-GXZ42QZA.js +0 -2
- package/dist/zk-proof-builder-GXZ42QZA.js.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/generated/errors/ghostspeakMarketplace.ts","../src/generated/instructions/acceptJobApplication.ts","../src/generated/instructions/activateAgent.ts","../src/generated/instructions/addMessageReaction.ts","../src/generated/instructions/addTopAgent.ts","../src/generated/instructions/applyToJob.ts","../src/generated/instructions/approveExtension.ts","../src/generated/instructions/assignArbitrator.ts","../src/generated/instructions/batchReplicateAgents.ts","../src/generated/instructions/cancelEscrow.ts","../src/generated/instructions/castVote.ts","../src/generated/instructions/completeEscrow.ts","../src/generated/instructions/createA2aSession.ts","../src/generated/instructions/createAnalyticsDashboard.ts","../src/generated/instructions/createBulkDeal.ts","../src/generated/instructions/createChannel.ts","../src/generated/instructions/createDynamicPricingEngine.ts","../src/generated/instructions/createEnhancedChannel.ts","../src/generated/instructions/createEscrow.ts","../src/generated/instructions/createIncentiveProgram.ts","../src/generated/instructions/createJobPosting.ts","../src/generated/instructions/createMarketAnalytics.ts","../src/generated/instructions/createMultisig.ts","../src/generated/instructions/createReplicationTemplate.ts","../src/generated/instructions/createRoyaltyStream.ts","../src/generated/instructions/createServiceAuction.ts","../src/generated/instructions/createServiceListing.ts","../src/generated/instructions/createToken2022Mint.ts","../src/generated/instructions/createWorkOrder.ts","../src/generated/instructions/deactivateAgent.ts","../src/generated/instructions/delegateVote.ts","../src/generated/instructions/disputeEscrow.ts","../src/generated/instructions/distributeIncentives.ts","../src/generated/instructions/executeBulkDealBatch.ts","../src/generated/instructions/executeProposal.ts","../src/generated/instructions/exportAction.ts","../src/generated/instructions/exportAuditContext.ts","../src/generated/instructions/exportBiometricQuality.ts","../src/generated/instructions/exportComplianceStatus.ts","../src/generated/instructions/exportDynamicPricingConfig.ts","../src/generated/instructions/exportMultisigConfig.ts","../src/generated/instructions/exportReportEntry.ts","../src/generated/instructions/exportResourceConstraints.ts","../src/generated/instructions/exportRuleCondition.ts","../src/generated/instructions/extendAuctionForReserve.ts","../src/generated/instructions/fileDispute.ts","../src/generated/instructions/finalizeAuction.ts","../src/generated/instructions/generateComplianceReport.ts","../src/generated/instructions/initializeAuditTrail.ts","../src/generated/instructions/initializeConfidentialTransferMint.ts","../src/generated/instructions/initializeDefaultAccountState.ts","../src/generated/instructions/initializeGovernanceProposal.ts","../src/generated/instructions/initializeInterestBearingConfig.ts","../src/generated/instructions/initializeMintCloseAuthority.ts","../src/generated/instructions/initializeRbacConfig.ts","../src/generated/instructions/initializeTransferFeeConfig.ts","../src/generated/instructions/initiateNegotiation.ts","../src/generated/instructions/joinChannel.ts","../src/generated/instructions/leaveChannel.ts","../src/generated/instructions/listAgentForResale.ts","../src/generated/instructions/makeCounterOffer.ts","../src/generated/instructions/manageAgentStatus.ts","../src/generated/instructions/placeAuctionBid.ts","../src/generated/instructions/placeDutchAuctionBid.ts","../src/generated/instructions/processEscrowPayment.ts","../src/generated/instructions/processPartialRefund.ts","../src/generated/instructions/processPayment.ts","../src/generated/instructions/purchaseService.ts","../src/generated/instructions/refundExpiredEscrow.ts","../src/generated/instructions/registerAgent.ts","../src/generated/instructions/registerExtension.ts","../src/generated/instructions/rejectWorkDelivery.ts","../src/generated/instructions/replicateAgent.ts","../src/generated/instructions/resolveDispute.ts","../src/generated/instructions/sendA2aMessage.ts","../src/generated/instructions/sendEnhancedMessage.ts","../src/generated/instructions/sendMessage.ts","../src/generated/instructions/submitDisputeEvidence.ts","../src/generated/instructions/submitEvidenceBatch.ts","../src/generated/instructions/submitWorkDelivery.ts","../src/generated/instructions/tallyVotes.ts","../src/generated/instructions/updateA2aStatus.ts","../src/generated/instructions/updateAgent.ts","../src/generated/instructions/updateAgentReputation.ts","../src/generated/instructions/updateAgentService.ts","../src/generated/instructions/updateAnalyticsDashboard.ts","../src/generated/instructions/updateAuctionReservePrice.ts","../src/generated/instructions/updateChannelSettings.ts","../src/generated/instructions/updateDynamicPricing.ts","../src/generated/instructions/updateMarketAnalytics.ts","../src/generated/instructions/verifyAgent.ts","../src/generated/instructions/verifyWorkDelivery.ts"],"names":["GHOSTSPEAK_MARKETPLACE_ERROR__SYSTEM_PROGRAM_AS_ADMIN","GHOSTSPEAK_MARKETPLACE_ERROR__DEFAULT_KEY_AS_ADMIN","GHOSTSPEAK_MARKETPLACE_ERROR__UNAUTHORIZED_ADMIN","GHOSTSPEAK_MARKETPLACE_ERROR__TEST_ADDRESS_ON_MAINNET","GHOSTSPEAK_MARKETPLACE_ERROR__VALIDATION_FAILED","GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS","GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_INSTRUCTION_DATA","GHOSTSPEAK_MARKETPLACE_ERROR__MISSING_REQUIRED_ACCOUNT","GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_ACCOUNT","GHOSTSPEAK_MARKETPLACE_ERROR__INSTRUCTION_PARSING_FAILED","ghostspeakMarketplaceErrorMessages","getGhostspeakMarketplaceErrorMessage","code","isGhostspeakMarketplaceError","error","transactionMessage","isProgramError","GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS","ACCEPT_JOB_APPLICATION_DISCRIMINATOR","getAcceptJobApplicationDiscriminatorBytes","fixEncoderSize","getBytesEncoder","getAcceptJobApplicationInstructionDataEncoder","transformEncoder","getStructEncoder","value","getAcceptJobApplicationInstructionDataDecoder","getStructDecoder","fixDecoderSize","getBytesDecoder","getAcceptJobApplicationInstructionDataCodec","combineCodec","getAcceptJobApplicationInstructionAsync","input","config","programAddress","accounts","getProgramDerivedAddress","getAddressEncoder","expectAddress","getAccountMeta","getAccountMetaFactory","getAcceptJobApplicationInstruction","parseAcceptJobApplicationInstruction","instruction","accountIndex","getNextAccount","accountMeta","ACTIVATE_AGENT_DISCRIMINATOR","getActivateAgentDiscriminatorBytes","getActivateAgentInstructionDataEncoder","addEncoderSizePrefix","getUtf8Encoder","getU32Encoder","getActivateAgentInstructionDataDecoder","addDecoderSizePrefix","getUtf8Decoder","getU32Decoder","getActivateAgentInstructionDataCodec","getActivateAgentInstructionAsync","args","expectSome","getActivateAgentInstruction","parseActivateAgentInstruction","ADD_MESSAGE_REACTION_DISCRIMINATOR","getAddMessageReactionDiscriminatorBytes","getAddMessageReactionInstructionDataEncoder","getAddMessageReactionInstructionDataDecoder","getAddMessageReactionInstructionDataCodec","getAddMessageReactionInstructionAsync","getAddMessageReactionInstruction","parseAddMessageReactionInstruction","ADD_TOP_AGENT_DISCRIMINATOR","getAddTopAgentDiscriminatorBytes","getAddTopAgentInstructionDataEncoder","getAddTopAgentInstructionDataDecoder","getAddressDecoder","getAddTopAgentInstructionDataCodec","getAddTopAgentInstruction","parseAddTopAgentInstruction","APPLY_TO_JOB_DISCRIMINATOR","getApplyToJobDiscriminatorBytes","getApplyToJobInstructionDataEncoder","getU64Encoder","getI64Encoder","getArrayEncoder","getApplyToJobInstructionDataDecoder","getU64Decoder","getI64Decoder","getArrayDecoder","getApplyToJobInstructionDataCodec","getApplyToJobInstructionAsync","getApplyToJobInstruction","parseApplyToJobInstruction","APPROVE_EXTENSION_DISCRIMINATOR","getApproveExtensionDiscriminatorBytes","getApproveExtensionInstructionDataEncoder","getApproveExtensionInstructionDataDecoder","getApproveExtensionInstructionDataCodec","getApproveExtensionInstruction","parseApproveExtensionInstruction","ASSIGN_ARBITRATOR_DISCRIMINATOR","getAssignArbitratorDiscriminatorBytes","getAssignArbitratorInstructionDataEncoder","getAssignArbitratorInstructionDataDecoder","getAssignArbitratorInstructionDataCodec","getAssignArbitratorInstructionAsync","getAssignArbitratorInstruction","parseAssignArbitratorInstruction","BATCH_REPLICATE_AGENTS_DISCRIMINATOR","getBatchReplicateAgentsDiscriminatorBytes","getBatchReplicateAgentsInstructionDataEncoder","getAgentCustomizationEncoder","getBatchReplicateAgentsInstructionDataDecoder","getAgentCustomizationDecoder","getBatchReplicateAgentsInstructionDataCodec","getBatchReplicateAgentsInstruction","parseBatchReplicateAgentsInstruction","CANCEL_ESCROW_DISCRIMINATOR","getCancelEscrowDiscriminatorBytes","getCancelEscrowInstructionDataEncoder","getCancelEscrowInstructionDataDecoder","getCancelEscrowInstructionDataCodec","getCancelEscrowInstructionAsync","getCancelEscrowInstruction","parseCancelEscrowInstruction","CAST_VOTE_DISCRIMINATOR","getCastVoteDiscriminatorBytes","getCastVoteInstructionDataEncoder","getVoteChoiceEncoder","getOptionEncoder","getCastVoteInstructionDataDecoder","getVoteChoiceDecoder","getOptionDecoder","getCastVoteInstructionDataCodec","getCastVoteInstruction","parseCastVoteInstruction","getNextOptionalAccount","COMPLETE_ESCROW_DISCRIMINATOR","getCompleteEscrowDiscriminatorBytes","getCompleteEscrowInstructionDataEncoder","getCompleteEscrowInstructionDataDecoder","getCompleteEscrowInstructionDataCodec","getCompleteEscrowInstructionAsync","getCompleteEscrowInstruction","parseCompleteEscrowInstruction","CREATE_A2A_SESSION_DISCRIMINATOR","getCreateA2aSessionDiscriminatorBytes","getCreateA2aSessionInstructionDataEncoder","getCreateA2aSessionInstructionDataDecoder","getCreateA2aSessionInstructionDataCodec","getCreateA2aSessionInstructionAsync","getCreateA2aSessionInstruction","parseCreateA2aSessionInstruction","CREATE_ANALYTICS_DASHBOARD_DISCRIMINATOR","getCreateAnalyticsDashboardDiscriminatorBytes","getCreateAnalyticsDashboardInstructionDataEncoder","getCreateAnalyticsDashboardInstructionDataDecoder","getCreateAnalyticsDashboardInstructionDataCodec","getCreateAnalyticsDashboardInstructionAsync","getCreateAnalyticsDashboardInstruction","parseCreateAnalyticsDashboardInstruction","CREATE_BULK_DEAL_DISCRIMINATOR","getCreateBulkDealDiscriminatorBytes","getCreateBulkDealInstructionDataEncoder","getDealTypeEncoder","getF64Encoder","getVolumeTierEncoder","getCreateBulkDealInstructionDataDecoder","getDealTypeDecoder","getF64Decoder","getVolumeTierDecoder","getCreateBulkDealInstructionDataCodec","getCreateBulkDealInstructionAsync","getCreateBulkDealInstruction","parseCreateBulkDealInstruction","CREATE_CHANNEL_DISCRIMINATOR","getCreateChannelDiscriminatorBytes","getCreateChannelInstructionDataEncoder","getChannelTypeEncoder","getBooleanEncoder","getCreateChannelInstructionDataDecoder","getChannelTypeDecoder","getBooleanDecoder","getCreateChannelInstructionDataCodec","getCreateChannelInstruction","parseCreateChannelInstruction","CREATE_DYNAMIC_PRICING_ENGINE_DISCRIMINATOR","getCreateDynamicPricingEngineDiscriminatorBytes","getCreateDynamicPricingEngineInstructionDataEncoder","getDynamicPricingConfigEncoder","getCreateDynamicPricingEngineInstructionDataDecoder","getDynamicPricingConfigDecoder","getCreateDynamicPricingEngineInstructionDataCodec","getCreateDynamicPricingEngineInstructionAsync","getCreateDynamicPricingEngineInstruction","parseCreateDynamicPricingEngineInstruction","CREATE_ENHANCED_CHANNEL_DISCRIMINATOR","getCreateEnhancedChannelDiscriminatorBytes","getCreateEnhancedChannelInstructionDataEncoder","getChannelMetadataEncoder","getCreateEnhancedChannelInstructionDataDecoder","getChannelMetadataDecoder","getCreateEnhancedChannelInstructionDataCodec","getCreateEnhancedChannelInstructionAsync","getCreateEnhancedChannelInstruction","parseCreateEnhancedChannelInstruction","CREATE_ESCROW_DISCRIMINATOR","getCreateEscrowDiscriminatorBytes","getCreateEscrowInstructionDataEncoder","getCreateEscrowInstructionDataDecoder","getCreateEscrowInstructionDataCodec","getCreateEscrowInstructionAsync","getCreateEscrowInstruction","parseCreateEscrowInstruction","CREATE_INCENTIVE_PROGRAM_DISCRIMINATOR","getCreateIncentiveProgramDiscriminatorBytes","getCreateIncentiveProgramInstructionDataEncoder","getIncentiveConfigEncoder","getCreateIncentiveProgramInstructionDataDecoder","getIncentiveConfigDecoder","getCreateIncentiveProgramInstructionDataCodec","getCreateIncentiveProgramInstructionAsync","getCreateIncentiveProgramInstruction","parseCreateIncentiveProgramInstruction","CREATE_JOB_POSTING_DISCRIMINATOR","getCreateJobPostingDiscriminatorBytes","getCreateJobPostingInstructionDataEncoder","getCreateJobPostingInstructionDataDecoder","getCreateJobPostingInstructionDataCodec","getCreateJobPostingInstructionAsync","getCreateJobPostingInstruction","parseCreateJobPostingInstruction","CREATE_MARKET_ANALYTICS_DISCRIMINATOR","getCreateMarketAnalyticsDiscriminatorBytes","getCreateMarketAnalyticsInstructionDataEncoder","getCreateMarketAnalyticsInstructionDataDecoder","getCreateMarketAnalyticsInstructionDataCodec","getCreateMarketAnalyticsInstructionAsync","getCreateMarketAnalyticsInstruction","parseCreateMarketAnalyticsInstruction","CREATE_MULTISIG_DISCRIMINATOR","getCreateMultisigDiscriminatorBytes","getCreateMultisigInstructionDataEncoder","getU8Encoder","getMultisigConfigEncoder","getCreateMultisigInstructionDataDecoder","getU8Decoder","getMultisigConfigDecoder","getCreateMultisigInstructionDataCodec","getCreateMultisigInstructionAsync","getCreateMultisigInstruction","parseCreateMultisigInstruction","CREATE_REPLICATION_TEMPLATE_DISCRIMINATOR","getCreateReplicationTemplateDiscriminatorBytes","getCreateReplicationTemplateInstructionDataEncoder","getCreateReplicationTemplateInstructionDataDecoder","getCreateReplicationTemplateInstructionDataCodec","getCreateReplicationTemplateInstructionAsync","getCreateReplicationTemplateInstruction","parseCreateReplicationTemplateInstruction","CREATE_ROYALTY_STREAM_DISCRIMINATOR","getCreateRoyaltyStreamDiscriminatorBytes","getCreateRoyaltyStreamInstructionDataEncoder","getRoyaltyConfigEncoder","getCreateRoyaltyStreamInstructionDataDecoder","getRoyaltyConfigDecoder","getCreateRoyaltyStreamInstructionDataCodec","getCreateRoyaltyStreamInstructionAsync","getCreateRoyaltyStreamInstruction","parseCreateRoyaltyStreamInstruction","CREATE_SERVICE_AUCTION_DISCRIMINATOR","getCreateServiceAuctionDiscriminatorBytes","getCreateServiceAuctionInstructionDataEncoder","getAuctionTypeEncoder","getDutchAuctionConfigEncoder","getCreateServiceAuctionInstructionDataDecoder","getAuctionTypeDecoder","getDutchAuctionConfigDecoder","getCreateServiceAuctionInstructionDataCodec","getCreateServiceAuctionInstructionAsync","getCreateServiceAuctionInstruction","parseCreateServiceAuctionInstruction","CREATE_SERVICE_LISTING_DISCRIMINATOR","getCreateServiceListingDiscriminatorBytes","getCreateServiceListingInstructionDataEncoder","getCreateServiceListingInstructionDataDecoder","getCreateServiceListingInstructionDataCodec","getCreateServiceListingInstructionAsync","getCreateServiceListingInstruction","parseCreateServiceListingInstruction","CREATE_TOKEN2022_MINT_DISCRIMINATOR","getCreateToken2022MintDiscriminatorBytes","getCreateToken2022MintInstructionDataEncoder","getCreateToken2022MintInstructionDataDecoder","getCreateToken2022MintInstructionDataCodec","getCreateToken2022MintInstructionAsync","getCreateToken2022MintInstruction","parseCreateToken2022MintInstruction","CREATE_WORK_ORDER_DISCRIMINATOR","getCreateWorkOrderDiscriminatorBytes","getCreateWorkOrderInstructionDataEncoder","getCreateWorkOrderInstructionDataDecoder","getCreateWorkOrderInstructionDataCodec","getCreateWorkOrderInstruction","parseCreateWorkOrderInstruction","getWorkOrderErrorMessage","DEACTIVATE_AGENT_DISCRIMINATOR","getDeactivateAgentDiscriminatorBytes","getDeactivateAgentInstructionDataEncoder","getDeactivateAgentInstructionDataDecoder","getDeactivateAgentInstructionDataCodec","getDeactivateAgentInstructionAsync","getDeactivateAgentInstruction","parseDeactivateAgentInstruction","DELEGATE_VOTE_DISCRIMINATOR","getDelegateVoteDiscriminatorBytes","getDelegateVoteInstructionDataEncoder","getDelegationScopeEncoder","getDelegateVoteInstructionDataDecoder","getDelegationScopeDecoder","getDelegateVoteInstructionDataCodec","getDelegateVoteInstructionAsync","getDelegateVoteInstruction","parseDelegateVoteInstruction","DISPUTE_ESCROW_DISCRIMINATOR","getDisputeEscrowDiscriminatorBytes","getDisputeEscrowInstructionDataEncoder","getDisputeEscrowInstructionDataDecoder","getDisputeEscrowInstructionDataCodec","getDisputeEscrowInstructionAsync","getDisputeEscrowInstruction","parseDisputeEscrowInstruction","DISTRIBUTE_INCENTIVES_DISCRIMINATOR","getDistributeIncentivesDiscriminatorBytes","getDistributeIncentivesInstructionDataEncoder","getDistributeIncentivesInstructionDataDecoder","getDistributeIncentivesInstructionDataCodec","getDistributeIncentivesInstruction","parseDistributeIncentivesInstruction","EXECUTE_BULK_DEAL_BATCH_DISCRIMINATOR","getExecuteBulkDealBatchDiscriminatorBytes","getExecuteBulkDealBatchInstructionDataEncoder","getExecuteBulkDealBatchInstructionDataDecoder","getExecuteBulkDealBatchInstructionDataCodec","getExecuteBulkDealBatchInstructionAsync","getExecuteBulkDealBatchInstruction","parseExecuteBulkDealBatchInstruction","EXECUTE_PROPOSAL_DISCRIMINATOR","getExecuteProposalDiscriminatorBytes","getExecuteProposalInstructionDataEncoder","getExecuteProposalInstructionDataDecoder","getExecuteProposalInstructionDataCodec","getExecuteProposalInstruction","parseExecuteProposalInstruction","EXPORT_ACTION_DISCRIMINATOR","getExportActionDiscriminatorBytes","getExportActionInstructionDataEncoder","getActionEncoder","getExportActionInstructionDataDecoder","getActionDecoder","getExportActionInstructionDataCodec","getExportActionInstruction","parseExportActionInstruction","EXPORT_AUDIT_CONTEXT_DISCRIMINATOR","getExportAuditContextDiscriminatorBytes","getExportAuditContextInstructionDataEncoder","getAuditContextEncoder","getExportAuditContextInstructionDataDecoder","getAuditContextDecoder","getExportAuditContextInstructionDataCodec","getExportAuditContextInstruction","parseExportAuditContextInstruction","EXPORT_BIOMETRIC_QUALITY_DISCRIMINATOR","getExportBiometricQualityDiscriminatorBytes","getExportBiometricQualityInstructionDataEncoder","getBiometricQualityEncoder","getExportBiometricQualityInstructionDataDecoder","getBiometricQualityDecoder","getExportBiometricQualityInstructionDataCodec","getExportBiometricQualityInstruction","parseExportBiometricQualityInstruction","EXPORT_COMPLIANCE_STATUS_DISCRIMINATOR","getExportComplianceStatusDiscriminatorBytes","getExportComplianceStatusInstructionDataEncoder","getComplianceStatusEncoder","getExportComplianceStatusInstructionDataDecoder","getComplianceStatusDecoder","getExportComplianceStatusInstructionDataCodec","getExportComplianceStatusInstruction","parseExportComplianceStatusInstruction","EXPORT_DYNAMIC_PRICING_CONFIG_DISCRIMINATOR","getExportDynamicPricingConfigDiscriminatorBytes","getExportDynamicPricingConfigInstructionDataEncoder","getExportDynamicPricingConfigInstructionDataDecoder","getExportDynamicPricingConfigInstructionDataCodec","getExportDynamicPricingConfigInstruction","parseExportDynamicPricingConfigInstruction","EXPORT_MULTISIG_CONFIG_DISCRIMINATOR","getExportMultisigConfigDiscriminatorBytes","getExportMultisigConfigInstructionDataEncoder","getExportMultisigConfigInstructionDataDecoder","getExportMultisigConfigInstructionDataCodec","getExportMultisigConfigInstruction","parseExportMultisigConfigInstruction","EXPORT_REPORT_ENTRY_DISCRIMINATOR","getExportReportEntryDiscriminatorBytes","getExportReportEntryInstructionDataEncoder","getReportEntryEncoder","getExportReportEntryInstructionDataDecoder","getReportEntryDecoder","getExportReportEntryInstructionDataCodec","getExportReportEntryInstruction","parseExportReportEntryInstruction","EXPORT_RESOURCE_CONSTRAINTS_DISCRIMINATOR","getExportResourceConstraintsDiscriminatorBytes","getExportResourceConstraintsInstructionDataEncoder","getResourceConstraintsEncoder","getExportResourceConstraintsInstructionDataDecoder","getResourceConstraintsDecoder","getExportResourceConstraintsInstructionDataCodec","getExportResourceConstraintsInstruction","parseExportResourceConstraintsInstruction","EXPORT_RULE_CONDITION_DISCRIMINATOR","getExportRuleConditionDiscriminatorBytes","getExportRuleConditionInstructionDataEncoder","getRuleConditionEncoder","getExportRuleConditionInstructionDataDecoder","getRuleConditionDecoder","getExportRuleConditionInstructionDataCodec","getExportRuleConditionInstruction","parseExportRuleConditionInstruction","EXTEND_AUCTION_FOR_RESERVE_DISCRIMINATOR","getExtendAuctionForReserveDiscriminatorBytes","getExtendAuctionForReserveInstructionDataEncoder","getExtendAuctionForReserveInstructionDataDecoder","getExtendAuctionForReserveInstructionDataCodec","getExtendAuctionForReserveInstruction","parseExtendAuctionForReserveInstruction","FILE_DISPUTE_DISCRIMINATOR","getFileDisputeDiscriminatorBytes","getFileDisputeInstructionDataEncoder","getFileDisputeInstructionDataDecoder","getFileDisputeInstructionDataCodec","getFileDisputeInstructionAsync","getFileDisputeInstruction","parseFileDisputeInstruction","FINALIZE_AUCTION_DISCRIMINATOR","getFinalizeAuctionDiscriminatorBytes","getFinalizeAuctionInstructionDataEncoder","getFinalizeAuctionInstructionDataDecoder","getFinalizeAuctionInstructionDataCodec","getFinalizeAuctionInstruction","parseFinalizeAuctionInstruction","GENERATE_COMPLIANCE_REPORT_DISCRIMINATOR","getGenerateComplianceReportDiscriminatorBytes","getGenerateComplianceReportInstructionDataEncoder","getReportTypeEncoder","getGenerateComplianceReportInstructionDataDecoder","getReportTypeDecoder","getGenerateComplianceReportInstructionDataCodec","getGenerateComplianceReportInstructionAsync","getGenerateComplianceReportInstruction","parseGenerateComplianceReportInstruction","INITIALIZE_AUDIT_TRAIL_DISCRIMINATOR","getInitializeAuditTrailDiscriminatorBytes","getInitializeAuditTrailInstructionDataEncoder","getAuditConfigEncoder","getInitializeAuditTrailInstructionDataDecoder","getAuditConfigDecoder","getInitializeAuditTrailInstructionDataCodec","getInitializeAuditTrailInstructionAsync","getInitializeAuditTrailInstruction","parseInitializeAuditTrailInstruction","INITIALIZE_CONFIDENTIAL_TRANSFER_MINT_DISCRIMINATOR","getInitializeConfidentialTransferMintDiscriminatorBytes","getInitializeConfidentialTransferMintInstructionDataEncoder","getInitializeConfidentialTransferMintInstructionDataDecoder","getInitializeConfidentialTransferMintInstructionDataCodec","getInitializeConfidentialTransferMintInstructionAsync","getInitializeConfidentialTransferMintInstruction","parseInitializeConfidentialTransferMintInstruction","INITIALIZE_DEFAULT_ACCOUNT_STATE_DISCRIMINATOR","getInitializeDefaultAccountStateDiscriminatorBytes","getInitializeDefaultAccountStateInstructionDataEncoder","getAccountStateEncoder","getInitializeDefaultAccountStateInstructionDataDecoder","getAccountStateDecoder","getInitializeDefaultAccountStateInstructionDataCodec","getInitializeDefaultAccountStateInstructionAsync","getInitializeDefaultAccountStateInstruction","parseInitializeDefaultAccountStateInstruction","INITIALIZE_GOVERNANCE_PROPOSAL_DISCRIMINATOR","getInitializeGovernanceProposalDiscriminatorBytes","getInitializeGovernanceProposalInstructionDataEncoder","getProposalTypeEncoder","getExecutionParamsEncoder","getInitializeGovernanceProposalInstructionDataDecoder","getProposalTypeDecoder","getExecutionParamsDecoder","getInitializeGovernanceProposalInstructionDataCodec","getInitializeGovernanceProposalInstructionAsync","getInitializeGovernanceProposalInstruction","parseInitializeGovernanceProposalInstruction","INITIALIZE_INTEREST_BEARING_CONFIG_DISCRIMINATOR","getInitializeInterestBearingConfigDiscriminatorBytes","getInitializeInterestBearingConfigInstructionDataEncoder","getI16Encoder","getInitializeInterestBearingConfigInstructionDataDecoder","getI16Decoder","getInitializeInterestBearingConfigInstructionDataCodec","getInitializeInterestBearingConfigInstructionAsync","getInitializeInterestBearingConfigInstruction","parseInitializeInterestBearingConfigInstruction","INITIALIZE_MINT_CLOSE_AUTHORITY_DISCRIMINATOR","getInitializeMintCloseAuthorityDiscriminatorBytes","getInitializeMintCloseAuthorityInstructionDataEncoder","getInitializeMintCloseAuthorityInstructionDataDecoder","getInitializeMintCloseAuthorityInstructionDataCodec","getInitializeMintCloseAuthorityInstructionAsync","getInitializeMintCloseAuthorityInstruction","parseInitializeMintCloseAuthorityInstruction","INITIALIZE_RBAC_CONFIG_DISCRIMINATOR","getInitializeRbacConfigDiscriminatorBytes","getInitializeRbacConfigInstructionDataEncoder","getRoleEncoder","getInitializeRbacConfigInstructionDataDecoder","getRoleDecoder","getInitializeRbacConfigInstructionDataCodec","getInitializeRbacConfigInstructionAsync","getInitializeRbacConfigInstruction","parseInitializeRbacConfigInstruction","INITIALIZE_TRANSFER_FEE_CONFIG_DISCRIMINATOR","getInitializeTransferFeeConfigDiscriminatorBytes","getInitializeTransferFeeConfigInstructionDataEncoder","getU16Encoder","getInitializeTransferFeeConfigInstructionDataDecoder","getU16Decoder","getInitializeTransferFeeConfigInstructionDataCodec","getInitializeTransferFeeConfigInstructionAsync","getInitializeTransferFeeConfigInstruction","parseInitializeTransferFeeConfigInstruction","INITIATE_NEGOTIATION_DISCRIMINATOR","getInitiateNegotiationDiscriminatorBytes","getInitiateNegotiationInstructionDataEncoder","getInitiateNegotiationInstructionDataDecoder","getInitiateNegotiationInstructionDataCodec","getInitiateNegotiationInstructionAsync","getInitiateNegotiationInstruction","parseInitiateNegotiationInstruction","JOIN_CHANNEL_DISCRIMINATOR","getJoinChannelDiscriminatorBytes","getJoinChannelInstructionDataEncoder","getJoinChannelInstructionDataDecoder","getJoinChannelInstructionDataCodec","getJoinChannelInstructionAsync","getJoinChannelInstruction","parseJoinChannelInstruction","LEAVE_CHANNEL_DISCRIMINATOR","getLeaveChannelDiscriminatorBytes","getLeaveChannelInstructionDataEncoder","getLeaveChannelInstructionDataDecoder","getLeaveChannelInstructionDataCodec","getLeaveChannelInstructionAsync","getLeaveChannelInstruction","parseLeaveChannelInstruction","LIST_AGENT_FOR_RESALE_DISCRIMINATOR","getListAgentForResaleDiscriminatorBytes","getListAgentForResaleInstructionDataEncoder","getListAgentForResaleInstructionDataDecoder","getListAgentForResaleInstructionDataCodec","getListAgentForResaleInstructionAsync","getListAgentForResaleInstruction","parseListAgentForResaleInstruction","MAKE_COUNTER_OFFER_DISCRIMINATOR","getMakeCounterOfferDiscriminatorBytes","getMakeCounterOfferInstructionDataEncoder","getMakeCounterOfferInstructionDataDecoder","getMakeCounterOfferInstructionDataCodec","getMakeCounterOfferInstruction","parseMakeCounterOfferInstruction","MANAGE_AGENT_STATUS_DISCRIMINATOR","getManageAgentStatusDiscriminatorBytes","getManageAgentStatusInstructionDataEncoder","getManageAgentStatusInstructionDataDecoder","getManageAgentStatusInstructionDataCodec","getManageAgentStatusInstructionAsync","getManageAgentStatusInstruction","parseManageAgentStatusInstruction","PLACE_AUCTION_BID_DISCRIMINATOR","getPlaceAuctionBidDiscriminatorBytes","getPlaceAuctionBidInstructionDataEncoder","getPlaceAuctionBidInstructionDataDecoder","getPlaceAuctionBidInstructionDataCodec","getPlaceAuctionBidInstruction","parsePlaceAuctionBidInstruction","PLACE_DUTCH_AUCTION_BID_DISCRIMINATOR","getPlaceDutchAuctionBidDiscriminatorBytes","getPlaceDutchAuctionBidInstructionDataEncoder","getPlaceDutchAuctionBidInstructionDataDecoder","getPlaceDutchAuctionBidInstructionDataCodec","getPlaceDutchAuctionBidInstruction","parsePlaceDutchAuctionBidInstruction","PROCESS_ESCROW_PAYMENT_DISCRIMINATOR","getProcessEscrowPaymentDiscriminatorBytes","getProcessEscrowPaymentInstructionDataEncoder","getProcessEscrowPaymentInstructionDataDecoder","getProcessEscrowPaymentInstructionDataCodec","getProcessEscrowPaymentInstructionAsync","getProcessEscrowPaymentInstruction","parseProcessEscrowPaymentInstruction","PROCESS_PARTIAL_REFUND_DISCRIMINATOR","getProcessPartialRefundDiscriminatorBytes","getProcessPartialRefundInstructionDataEncoder","getProcessPartialRefundInstructionDataDecoder","getProcessPartialRefundInstructionDataCodec","getProcessPartialRefundInstructionAsync","getProcessPartialRefundInstruction","parseProcessPartialRefundInstruction","PROCESS_PAYMENT_DISCRIMINATOR","getProcessPaymentDiscriminatorBytes","getProcessPaymentInstructionDataEncoder","getProcessPaymentInstructionDataDecoder","getProcessPaymentInstructionDataCodec","getProcessPaymentInstructionAsync","getProcessPaymentInstruction","parseProcessPaymentInstruction","PURCHASE_SERVICE_DISCRIMINATOR","getPurchaseServiceDiscriminatorBytes","getPurchaseServiceInstructionDataEncoder","getPurchaseServiceInstructionDataDecoder","getPurchaseServiceInstructionDataCodec","getPurchaseServiceInstructionAsync","getPurchaseServiceInstruction","parsePurchaseServiceInstruction","REFUND_EXPIRED_ESCROW_DISCRIMINATOR","getRefundExpiredEscrowDiscriminatorBytes","getRefundExpiredEscrowInstructionDataEncoder","getRefundExpiredEscrowInstructionDataDecoder","getRefundExpiredEscrowInstructionDataCodec","getRefundExpiredEscrowInstructionAsync","getRefundExpiredEscrowInstruction","parseRefundExpiredEscrowInstruction","REGISTER_AGENT_DISCRIMINATOR","getRegisterAgentDiscriminatorBytes","getRegisterAgentInstructionDataEncoder","getRegisterAgentInstructionDataDecoder","getRegisterAgentInstructionDataCodec","getRegisterAgentInstructionAsync","getRegisterAgentInstruction","parseRegisterAgentInstruction","REGISTER_EXTENSION_DISCRIMINATOR","getRegisterExtensionDiscriminatorBytes","getRegisterExtensionInstructionDataEncoder","getExtensionMetadataEncoder","getRegisterExtensionInstructionDataDecoder","getExtensionMetadataDecoder","getRegisterExtensionInstructionDataCodec","getRegisterExtensionInstructionAsync","getRegisterExtensionInstruction","parseRegisterExtensionInstruction","REJECT_WORK_DELIVERY_DISCRIMINATOR","getRejectWorkDeliveryDiscriminatorBytes","getRejectWorkDeliveryInstructionDataEncoder","getRejectWorkDeliveryInstructionDataDecoder","getRejectWorkDeliveryInstructionDataCodec","getRejectWorkDeliveryInstruction","parseRejectWorkDeliveryInstruction","REPLICATE_AGENT_DISCRIMINATOR","getReplicateAgentDiscriminatorBytes","getReplicateAgentInstructionDataEncoder","getReplicateAgentInstructionDataDecoder","getReplicateAgentInstructionDataCodec","getReplicateAgentInstructionAsync","getReplicateAgentInstruction","parseReplicateAgentInstruction","RESOLVE_DISPUTE_DISCRIMINATOR","getResolveDisputeDiscriminatorBytes","getResolveDisputeInstructionDataEncoder","getResolveDisputeInstructionDataDecoder","getResolveDisputeInstructionDataCodec","getResolveDisputeInstructionAsync","getResolveDisputeInstruction","parseResolveDisputeInstruction","SEND_A2A_MESSAGE_DISCRIMINATOR","getSendA2aMessageDiscriminatorBytes","getSendA2aMessageInstructionDataEncoder","getSendA2aMessageInstructionDataDecoder","getSendA2aMessageInstructionDataCodec","getSendA2aMessageInstruction","parseSendA2aMessageInstruction","SEND_ENHANCED_MESSAGE_DISCRIMINATOR","getSendEnhancedMessageDiscriminatorBytes","getSendEnhancedMessageInstructionDataEncoder","getMessageTypeEncoder","getMessageMetadataEncoder","getSendEnhancedMessageInstructionDataDecoder","getMessageTypeDecoder","getMessageMetadataDecoder","getSendEnhancedMessageInstructionDataCodec","getSendEnhancedMessageInstructionAsync","getSendEnhancedMessageInstruction","parseSendEnhancedMessageInstruction","SEND_MESSAGE_DISCRIMINATOR","getSendMessageDiscriminatorBytes","getSendMessageInstructionDataEncoder","getSendMessageInstructionDataDecoder","getSendMessageInstructionDataCodec","getSendMessageInstruction","parseSendMessageInstruction","SUBMIT_DISPUTE_EVIDENCE_DISCRIMINATOR","getSubmitDisputeEvidenceDiscriminatorBytes","getSubmitDisputeEvidenceInstructionDataEncoder","getSubmitDisputeEvidenceInstructionDataDecoder","getSubmitDisputeEvidenceInstructionDataCodec","getSubmitDisputeEvidenceInstructionAsync","getSubmitDisputeEvidenceInstruction","parseSubmitDisputeEvidenceInstruction","SUBMIT_EVIDENCE_BATCH_DISCRIMINATOR","getSubmitEvidenceBatchDiscriminatorBytes","getSubmitEvidenceBatchInstructionDataEncoder","getEvidenceBatchItemEncoder","getSubmitEvidenceBatchInstructionDataDecoder","getEvidenceBatchItemDecoder","getSubmitEvidenceBatchInstructionDataCodec","getSubmitEvidenceBatchInstructionAsync","getSubmitEvidenceBatchInstruction","parseSubmitEvidenceBatchInstruction","SUBMIT_WORK_DELIVERY_DISCRIMINATOR","getSubmitWorkDeliveryDiscriminatorBytes","getSubmitWorkDeliveryInstructionDataEncoder","getDeliverableEncoder","getSubmitWorkDeliveryInstructionDataDecoder","getDeliverableDecoder","getSubmitWorkDeliveryInstructionDataCodec","getSubmitWorkDeliveryInstructionAsync","getSubmitWorkDeliveryInstruction","parseSubmitWorkDeliveryInstruction","TALLY_VOTES_DISCRIMINATOR","getTallyVotesDiscriminatorBytes","getTallyVotesInstructionDataEncoder","getTallyVotesInstructionDataDecoder","getTallyVotesInstructionDataCodec","getTallyVotesInstruction","parseTallyVotesInstruction","UPDATE_A2A_STATUS_DISCRIMINATOR","getUpdateA2aStatusDiscriminatorBytes","getUpdateA2aStatusInstructionDataEncoder","getUpdateA2aStatusInstructionDataDecoder","getUpdateA2aStatusInstructionDataCodec","getUpdateA2aStatusInstructionAsync","getUpdateA2aStatusInstruction","parseUpdateA2aStatusInstruction","UPDATE_AGENT_DISCRIMINATOR","getUpdateAgentDiscriminatorBytes","getUpdateAgentInstructionDataEncoder","getUpdateAgentInstructionDataDecoder","getUpdateAgentInstructionDataCodec","getUpdateAgentInstructionAsync","getUpdateAgentInstruction","parseUpdateAgentInstruction","UPDATE_AGENT_REPUTATION_DISCRIMINATOR","getUpdateAgentReputationDiscriminatorBytes","getUpdateAgentReputationInstructionDataEncoder","getUpdateAgentReputationInstructionDataDecoder","getUpdateAgentReputationInstructionDataCodec","getUpdateAgentReputationInstructionAsync","getUpdateAgentReputationInstruction","parseUpdateAgentReputationInstruction","UPDATE_AGENT_SERVICE_DISCRIMINATOR","getUpdateAgentServiceDiscriminatorBytes","getUpdateAgentServiceInstructionDataEncoder","getUpdateAgentServiceInstructionDataDecoder","getUpdateAgentServiceInstructionDataCodec","getUpdateAgentServiceInstructionAsync","getUpdateAgentServiceInstruction","parseUpdateAgentServiceInstruction","UPDATE_ANALYTICS_DASHBOARD_DISCRIMINATOR","getUpdateAnalyticsDashboardDiscriminatorBytes","getUpdateAnalyticsDashboardInstructionDataEncoder","getUpdateAnalyticsDashboardInstructionDataDecoder","getUpdateAnalyticsDashboardInstructionDataCodec","getUpdateAnalyticsDashboardInstructionAsync","getUpdateAnalyticsDashboardInstruction","parseUpdateAnalyticsDashboardInstruction","UPDATE_AUCTION_RESERVE_PRICE_DISCRIMINATOR","getUpdateAuctionReservePriceDiscriminatorBytes","getUpdateAuctionReservePriceInstructionDataEncoder","getUpdateAuctionReservePriceInstructionDataDecoder","getUpdateAuctionReservePriceInstructionDataCodec","getUpdateAuctionReservePriceInstruction","parseUpdateAuctionReservePriceInstruction","UPDATE_CHANNEL_SETTINGS_DISCRIMINATOR","getUpdateChannelSettingsDiscriminatorBytes","getUpdateChannelSettingsInstructionDataEncoder","getUpdateChannelSettingsInstructionDataDecoder","getUpdateChannelSettingsInstructionDataCodec","getUpdateChannelSettingsInstructionAsync","getUpdateChannelSettingsInstruction","parseUpdateChannelSettingsInstruction","UPDATE_DYNAMIC_PRICING_DISCRIMINATOR","getUpdateDynamicPricingDiscriminatorBytes","getUpdateDynamicPricingInstructionDataEncoder","getI32Encoder","getUpdateDynamicPricingInstructionDataDecoder","getI32Decoder","getUpdateDynamicPricingInstructionDataCodec","getUpdateDynamicPricingInstruction","parseUpdateDynamicPricingInstruction","UPDATE_MARKET_ANALYTICS_DISCRIMINATOR","getUpdateMarketAnalyticsDiscriminatorBytes","getUpdateMarketAnalyticsInstructionDataEncoder","getUpdateMarketAnalyticsInstructionDataDecoder","getUpdateMarketAnalyticsInstructionDataCodec","getUpdateMarketAnalyticsInstruction","parseUpdateMarketAnalyticsInstruction","VERIFY_AGENT_DISCRIMINATOR","getVerifyAgentDiscriminatorBytes","getVerifyAgentInstructionDataEncoder","getVerifyAgentInstructionDataDecoder","getVerifyAgentInstructionDataCodec","getVerifyAgentInstructionAsync","getVerifyAgentInstruction","parseVerifyAgentInstruction","VERIFY_WORK_DELIVERY_DISCRIMINATOR","getVerifyWorkDeliveryDiscriminatorBytes","getVerifyWorkDeliveryInstructionDataEncoder","getVerifyWorkDeliveryInstructionDataDecoder","getVerifyWorkDeliveryInstructionDataCodec","getVerifyWorkDeliveryInstruction","parseVerifyWorkDeliveryInstruction"],"mappings":"kkCAiBO,IAAMA,GAAwD,GAAA,CAExDC,EAAAA,CAAqD,IAAA,CAErDC,EAAAA,CAAmD,IAAA,CAEnDC,EAAAA,CAAwD,IAAA,CAExDC,EAAAA,CAAkD,KAGlDC,EAAAA,CAAsD,IAAA,CAEtDC,EAAAA,CAAyD,IAAA,CAEzDC,EAAAA,CAAyD,IAAA,CAEzDC,EAAAA,CAAgD,IAAA,CAEhDC,GAA2D,IAAA,CAapEC,GAGA,OAAA,CAAQ,GAAA,CAAI,QAAA,GAAa,YAAA,GAC3BA,EAAAA,CAAqC,CAEnC,CAACT,EAAkD,EAAG,mDAAA,CACtD,CAACD,EAAqD,EAAG,wCAAA,CACzD,CAACG,EAAqD,EAAG,wCAAA,CACzD,CAACD,EAAgD,EAAG,wDAAA,CACpD,CAACE,EAA+C,EAAG,yBAAA,CACnD,CAACC,EAAmD,EAAG,uBAAA,CACvD,CAACC,EAAsD,EAAG,2BAC1D,CAACC,EAAsD,EAAG,0BAAA,CAC1D,CAACC,EAA6C,EAAG,iBAAA,CACjD,CAACC,EAAwD,EAAG,4BAC9D,CAAA,CAAA,CAGK,SAASE,EAAAA,CACdC,CAAAA,CACQ,CACR,OAAI,QAAQ,GAAA,CAAI,QAAA,GAAa,YAAA,CAEzBF,EAAAA,CAIAE,CAAI,CAAA,CAGD,oDACT,CAEO,SAASC,EAAAA,CAGdC,CAAAA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AAA,CAClD9vB,CACF,CACF,CASF,CAgBO,SAASkwB,EAAAA,CAIdlxB,CAAAA,CAG8D,CAC9D,GAAIA,CAAAA,CAAY,SAAS,MAAA,CAAS,CAAA,CAChC,MAAM,IAAI,KAAA,CAAMsQ,CAAAA,CAAyB,sBAAA,CAAwBtQ,CAAAA,CAAY,SAAS,MAAM,CAAC,CAAA,CAE/F,IAAIC,EAAe,CAAA,CACbC,CAAAA,CAAiB,IAAM,CAC3B,IAAMC,CAAAA,CAAcH,CAAAA,CAAY,QAAA,CAAUC,CAAY,CAAA,CACtD,OAAAA,CAAAA,EAAgB,CAAA,CACTE,CACT,CAAA,CACA,OAAO,CACL,cAAA,CAAgBH,CAAAA,CAAY,cAAA,CAC5B,QAAA,CAAU,CACR,UAAWE,CAAAA,EAAe,CAC1B,YAAA,CAAcA,CAAAA,EAAe,CAC7B,MAAA,CAAQA,CAAAA,EAAe,CACvB,MAAOA,CAAAA,EACT,CAAA,CACA,IAAA,CAAM6wB,IAA4C,CAAE,MAAA,CAClD/wB,CAAAA,CAAY,IACd,CACF,CACF","file":"chunk-QTKN3VZV.js","sourcesContent":["/**\n * This code was AUTOGENERATED using the codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n isProgramError,\n type Address,\n type SOLANA_ERROR__INSTRUCTION_ERROR__CUSTOM,\n type SolanaError,\n} from '@solana/kit';\nimport { GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS } from '../programs';\n\n/** SystemProgramAsAdmin: System program cannot be used as admin */\nexport const GHOSTSPEAK_MARKETPLACE_ERROR__SYSTEM_PROGRAM_AS_ADMIN = 0x1770; // 6000\n/** DefaultKeyAsAdmin: Default (null) public key cannot be used as admin */\nexport const GHOSTSPEAK_MARKETPLACE_ERROR__DEFAULT_KEY_AS_ADMIN = 0x1771; // 6001\n/** UnauthorizedAdmin: Unauthorized admin - key does not match protocol admin */\nexport const GHOSTSPEAK_MARKETPLACE_ERROR__UNAUTHORIZED_ADMIN = 0x1772; // 6002\n/** TestAddressOnMainnet: Test address cannot be used on mainnet */\nexport const GHOSTSPEAK_MARKETPLACE_ERROR__TEST_ADDRESS_ON_MAINNET = 0x1773; // 6003\n/** ValidationFailed: Admin validation failed */\nexport const GHOSTSPEAK_MARKETPLACE_ERROR__VALIDATION_FAILED = 0x1774; // 6004\n\n/** Insufficient Accounts */\nexport const GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS = 0x1775; // 6005\n/** Invalid Instruction Data */\nexport const GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_INSTRUCTION_DATA = 0x1776; // 6006\n/** Missing Required Account */\nexport const GHOSTSPEAK_MARKETPLACE_ERROR__MISSING_REQUIRED_ACCOUNT = 0x1777; // 6007\n/** Invalid Account */\nexport const GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_ACCOUNT = 0x1778; // 6008\n/** Instruction Parsing Failed */\nexport const GHOSTSPEAK_MARKETPLACE_ERROR__INSTRUCTION_PARSING_FAILED = 0x1779; // 6009\nexport type GhostspeakMarketplaceError =\n| typeof GHOSTSPEAK_MARKETPLACE_ERROR__DEFAULT_KEY_AS_ADMIN\n | typeof GHOSTSPEAK_MARKETPLACE_ERROR__SYSTEM_PROGRAM_AS_ADMIN\n | typeof GHOSTSPEAK_MARKETPLACE_ERROR__TEST_ADDRESS_ON_MAINNET\n | typeof GHOSTSPEAK_MARKETPLACE_ERROR__UNAUTHORIZED_ADMIN\n | typeof GHOSTSPEAK_MARKETPLACE_ERROR__VALIDATION_FAILED\n | typeof GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS\n | typeof GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_INSTRUCTION_DATA\n | typeof GHOSTSPEAK_MARKETPLACE_ERROR__MISSING_REQUIRED_ACCOUNT\n | typeof GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_ACCOUNT\n | typeof GHOSTSPEAK_MARKETPLACE_ERROR__INSTRUCTION_PARSING_FAILED;\n\nlet ghostspeakMarketplaceErrorMessages:\n | Record<GhostspeakMarketplaceError, string>\n | undefined;\nif (process.env.NODE_ENV !== 'production') {\n ghostspeakMarketplaceErrorMessages = {\n\n [GHOSTSPEAK_MARKETPLACE_ERROR__DEFAULT_KEY_AS_ADMIN]: `Default (null) public key cannot be used as admin`,\n [GHOSTSPEAK_MARKETPLACE_ERROR__SYSTEM_PROGRAM_AS_ADMIN]: `System program cannot be used as admin`,\n [GHOSTSPEAK_MARKETPLACE_ERROR__TEST_ADDRESS_ON_MAINNET]: `Test address cannot be used on mainnet`,\n [GHOSTSPEAK_MARKETPLACE_ERROR__UNAUTHORIZED_ADMIN]: `Unauthorized admin - key does not match protocol admin`,\n [GHOSTSPEAK_MARKETPLACE_ERROR__VALIDATION_FAILED]: `Admin validation failed`,\n [GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS]: `Insufficient Accounts`,\n [GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_INSTRUCTION_DATA]: `Invalid Instruction Data`,\n [GHOSTSPEAK_MARKETPLACE_ERROR__MISSING_REQUIRED_ACCOUNT]: `Missing Required Account`,\n [GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_ACCOUNT]: `Invalid Account`,\n [GHOSTSPEAK_MARKETPLACE_ERROR__INSTRUCTION_PARSING_FAILED]: `Instruction Parsing Failed`,\n };\n}\n\nexport function getGhostspeakMarketplaceErrorMessage(\n code: GhostspeakMarketplaceError\n): string {\n if (process.env.NODE_ENV !== 'production') {\n return (\n ghostspeakMarketplaceErrorMessages as Record<\n GhostspeakMarketplaceError,\n string\n >\n )[code];\n }\n\n return 'Error message not available in production bundles.';\n}\n\nexport function isGhostspeakMarketplaceError<\n TProgramErrorCode extends GhostspeakMarketplaceError,\n>(\n error: unknown,\n transactionMessage: {\n instructions: Record<number, { programAddress: Address }>;\n },\n code?: TProgramErrorCode\n): error is SolanaError<typeof SOLANA_ERROR__INSTRUCTION_ERROR__CUSTOM> &\n Readonly<{ context: Readonly<{ code: TProgramErrorCode }> }> {\n return isProgramError<TProgramErrorCode>(\n error,\n transactionMessage,\n GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n code\n );\n}\n","/**\n * This code was AUTOGENERATED using the codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n combineCodec,\n fixDecoderSize,\n fixEncoderSize,\n getAddressEncoder,\n getBytesDecoder,\n getBytesEncoder,\n getProgramDerivedAddress,\n getStructDecoder,\n getStructEncoder,\n transformEncoder,\n type AccountMeta,\n type AccountSignerMeta,\n type Address,\n type FixedSizeCodec,\n type FixedSizeDecoder,\n type FixedSizeEncoder,\n type Instruction,\n type InstructionWithAccounts,\n type InstructionWithData,\n type ReadonlyAccount,\n type ReadonlyUint8Array,\n type TransactionSigner,\n type WritableAccount,\n type WritableSignerAccount,\n} from '@solana/kit';\nimport {\n GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_INSTRUCTION_DATA,\n GHOSTSPEAK_MARKETPLACE_ERROR__MISSING_REQUIRED_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INSTRUCTION_PARSING_FAILED,\n isGhostspeakMarketplaceError,\n} from '../errors';\nimport { GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS } from '../programs';\nimport {\n expectAddress,\n getAccountMetaFactory,\n type ResolvedAccount,\n} from '../shared';\n\nexport const ACCEPT_JOB_APPLICATION_DISCRIMINATOR = new Uint8Array([\n 191, 161, 93, 207, 225, 58, 71, 16,\n]);\n\nexport function getAcceptJobApplicationDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 8).encode(\n ACCEPT_JOB_APPLICATION_DISCRIMINATOR\n );\n}\n\nexport type AcceptJobApplicationInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountJobContract extends string | AccountMeta<string> = string,\n TAccountJobPosting extends string | AccountMeta<string> = string,\n TAccountJobApplication extends string | AccountMeta<string> = string,\n TAccountEmployer extends string | AccountMeta<string> = string,\n TAccountSystemProgram extends\n | string\n | AccountMeta<string> = '11111111111111111111111111111111',\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountJobContract extends string\n ? WritableAccount<TAccountJobContract>\n : TAccountJobContract,\n TAccountJobPosting extends string\n ? WritableAccount<TAccountJobPosting>\n : TAccountJobPosting,\n TAccountJobApplication extends string\n ? WritableAccount<TAccountJobApplication>\n : TAccountJobApplication,\n TAccountEmployer extends string\n ? WritableSignerAccount<TAccountEmployer> &\n AccountSignerMeta<TAccountEmployer>\n : TAccountEmployer,\n TAccountSystemProgram extends string\n ? ReadonlyAccount<TAccountSystemProgram>\n : TAccountSystemProgram,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type AcceptJobApplicationInstructionData = {\n discriminator: ReadonlyUint8Array;\n};\n\nexport type AcceptJobApplicationInstructionDataArgs = {};\n\nexport function getAcceptJobApplicationInstructionDataEncoder(): FixedSizeEncoder<AcceptJobApplicationInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([['discriminator', fixEncoderSize(getBytesEncoder(), 8)]]),\n (value) => ({\n ...value,\n discriminator: ACCEPT_JOB_APPLICATION_DISCRIMINATOR,\n })\n );\n}\n\nexport function getAcceptJobApplicationInstructionDataDecoder(): FixedSizeDecoder<AcceptJobApplicationInstructionData> {\n return getStructDecoder([\n ['discriminator', fixDecoderSize(getBytesDecoder(), 8)],\n ]);\n}\n\nexport function getAcceptJobApplicationInstructionDataCodec(): FixedSizeCodec<\n AcceptJobApplicationInstructionDataArgs,\n AcceptJobApplicationInstructionData\n> {\n return combineCodec(\n getAcceptJobApplicationInstructionDataEncoder(),\n getAcceptJobApplicationInstructionDataDecoder()\n );\n}\n\nexport type AcceptJobApplicationAsyncInput<\n TAccountJobContract extends string = string,\n TAccountJobPosting extends string = string,\n TAccountJobApplication extends string = string,\n TAccountEmployer extends string = string,\n TAccountSystemProgram extends string = string,\n> = {\n jobContract?: Address<TAccountJobContract>;\n jobPosting: Address<TAccountJobPosting>;\n jobApplication: Address<TAccountJobApplication>;\n employer: TransactionSigner<TAccountEmployer>;\n systemProgram?: Address<TAccountSystemProgram>;\n};\n\nexport async function getAcceptJobApplicationInstructionAsync<\n TAccountJobContract extends string,\n TAccountJobPosting extends string,\n TAccountJobApplication extends string,\n TAccountEmployer extends string,\n TAccountSystemProgram extends string,\n TProgramAddress extends\n Address = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: AcceptJobApplicationAsyncInput<\n TAccountJobContract,\n TAccountJobPosting,\n TAccountJobApplication,\n TAccountEmployer,\n TAccountSystemProgram\n >,\n config?: { programAddress?: TProgramAddress }\n): Promise<\n AcceptJobApplicationInstruction<\n TProgramAddress,\n TAccountJobContract,\n TAccountJobPosting,\n TAccountJobApplication,\n TAccountEmployer,\n TAccountSystemProgram\n >\n> {\n // Program address.\n const programAddress =\n config?.programAddress ?? GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n jobContract: { value: input.jobContract ?? null, isWritable: true },\n jobPosting: { value: input.jobPosting ?? null, isWritable: true },\n jobApplication: { value: input.jobApplication ?? null, isWritable: true },\n employer: { value: input.employer ?? null, isWritable: true },\n systemProgram: { value: input.systemProgram ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Resolve default values.\n if (!accounts.jobContract.value) {\n accounts.jobContract.value = await getProgramDerivedAddress({\n programAddress,\n seeds: [\n getBytesEncoder().encode(\n new Uint8Array([\n 106, 111, 98, 95, 99, 111, 110, 116, 114, 97, 99, 116,\n ])\n ),\n getAddressEncoder().encode(expectAddress(accounts.jobPosting.value)),\n getAddressEncoder().encode(\n expectAddress(accounts.jobApplication.value)\n ),\n ],\n });\n }\n if (!accounts.systemProgram.value) {\n accounts.systemProgram.value =\n '11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.jobContract),\n getAccountMeta(accounts.jobPosting),\n getAccountMeta(accounts.jobApplication),\n getAccountMeta(accounts.employer),\n getAccountMeta(accounts.systemProgram),\n ],\n programAddress,\n data: getAcceptJobApplicationInstructionDataEncoder().encode({}),\n } as AcceptJobApplicationInstruction<\n TProgramAddress,\n TAccountJobContract,\n TAccountJobPosting,\n TAccountJobApplication,\n TAccountEmployer,\n TAccountSystemProgram\n >;\n\n return instruction;\n}\n\nexport type AcceptJobApplicationInput<\n TAccountJobContract extends string = string,\n TAccountJobPosting extends string = string,\n TAccountJobApplication extends string = string,\n TAccountEmployer extends string = string,\n TAccountSystemProgram extends string = string,\n> = {\n jobContract: Address<TAccountJobContract>;\n jobPosting: Address<TAccountJobPosting>;\n jobApplication: Address<TAccountJobApplication>;\n employer: TransactionSigner<TAccountEmployer>;\n systemProgram?: Address<TAccountSystemProgram>;\n};\n\nexport function getAcceptJobApplicationInstruction<\n TAccountJobContract extends string,\n TAccountJobPosting extends string,\n TAccountJobApplication extends string,\n TAccountEmployer extends string,\n TAccountSystemProgram extends string,\n TProgramAddress extends\n Address = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: AcceptJobApplicationInput<\n TAccountJobContract,\n TAccountJobPosting,\n TAccountJobApplication,\n TAccountEmployer,\n TAccountSystemProgram\n >,\n config?: { programAddress?: TProgramAddress }\n): AcceptJobApplicationInstruction<\n TProgramAddress,\n TAccountJobContract,\n TAccountJobPosting,\n TAccountJobApplication,\n TAccountEmployer,\n TAccountSystemProgram\n> {\n // Program address.\n const programAddress =\n config?.programAddress ?? GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n jobContract: { value: input.jobContract ?? null, isWritable: true },\n jobPosting: { value: input.jobPosting ?? null, isWritable: true },\n jobApplication: { value: input.jobApplication ?? null, isWritable: true },\n employer: { value: input.employer ?? null, isWritable: true },\n systemProgram: { value: input.systemProgram ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Resolve default values.\n if (!accounts.systemProgram.value) {\n accounts.systemProgram.value =\n '11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.jobContract),\n getAccountMeta(accounts.jobPosting),\n getAccountMeta(accounts.jobApplication),\n getAccountMeta(accounts.employer),\n getAccountMeta(accounts.systemProgram),\n ],\n programAddress,\n data: getAcceptJobApplicationInstructionDataEncoder().encode({}),\n } as AcceptJobApplicationInstruction<\n TProgramAddress,\n TAccountJobContract,\n TAccountJobPosting,\n TAccountJobApplication,\n TAccountEmployer,\n TAccountSystemProgram\n >;\n\n return instruction;\n}\n\nexport type ParsedAcceptJobApplicationInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n jobContract: TAccountMetas[0];\n jobPosting: TAccountMetas[1];\n jobApplication: TAccountMetas[2];\n employer: TAccountMetas[3];\n systemProgram: TAccountMetas[4];\n };\n data: AcceptJobApplicationInstructionData;\n};\n\nexport function parseAcceptJobApplicationInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>\n): ParsedAcceptJobApplicationInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 5) {\n throw new Error('[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts');\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = instruction.accounts![accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n jobContract: getNextAccount(),\n jobPosting: getNextAccount(),\n jobApplication: getNextAccount(),\n employer: getNextAccount(),\n systemProgram: getNextAccount(),\n },\n data: getAcceptJobApplicationInstructionDataDecoder().decode(\n instruction.data\n ),\n };\n}\n","/**\n * This code was AUTOGENERATED using the codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n addDecoderSizePrefix,\n addEncoderSizePrefix,\n combineCodec,\n fixDecoderSize,\n fixEncoderSize,\n getAddressEncoder,\n getBytesDecoder,\n getBytesEncoder,\n getProgramDerivedAddress,\n getStructDecoder,\n getStructEncoder,\n getU32Decoder,\n getU32Encoder,\n getUtf8Decoder,\n getUtf8Encoder,\n transformEncoder,\n type AccountMeta,\n type AccountSignerMeta,\n type Address,\n type Codec,\n type Decoder,\n type Encoder,\n type Instruction,\n type InstructionWithAccounts,\n type InstructionWithData,\n type ReadonlyAccount,\n type ReadonlyUint8Array,\n type TransactionSigner,\n type WritableAccount,\n type WritableSignerAccount,\n} from '@solana/kit';\nimport {\n GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_INSTRUCTION_DATA,\n GHOSTSPEAK_MARKETPLACE_ERROR__MISSING_REQUIRED_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INSTRUCTION_PARSING_FAILED,\n isGhostspeakMarketplaceError,\n} from '../errors';\nimport { GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS } from '../programs';\nimport {\n expectAddress,\n expectSome,\n getAccountMetaFactory,\n type ResolvedAccount,\n} from '../shared';\n\nexport const ACTIVATE_AGENT_DISCRIMINATOR = new Uint8Array([\n 252, 139, 87, 21, 195, 152, 29, 217,\n]);\n\nexport function getActivateAgentDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 8).encode(\n ACTIVATE_AGENT_DISCRIMINATOR\n );\n}\n\nexport type ActivateAgentInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountAgentAccount extends string | AccountMeta<string> = string,\n TAccountSigner extends string | AccountMeta<string> = string,\n TAccountClock extends\n | string\n | AccountMeta<string> = 'SysvarC1ock11111111111111111111111111111111',\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountAgentAccount extends string\n ? WritableAccount<TAccountAgentAccount>\n : TAccountAgentAccount,\n TAccountSigner extends string\n ? WritableSignerAccount<TAccountSigner> &\n AccountSignerMeta<TAccountSigner>\n : TAccountSigner,\n TAccountClock extends string\n ? ReadonlyAccount<TAccountClock>\n : TAccountClock,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type ActivateAgentInstructionData = {\n discriminator: ReadonlyUint8Array;\n agentId: string;\n};\n\nexport type ActivateAgentInstructionDataArgs = { agentId: string };\n\nexport function getActivateAgentInstructionDataEncoder(): Encoder<ActivateAgentInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n ['discriminator', fixEncoderSize(getBytesEncoder(), 8)],\n ['agentId', addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder())],\n ]),\n (value) => ({ ...value, discriminator: ACTIVATE_AGENT_DISCRIMINATOR })\n );\n}\n\nexport function getActivateAgentInstructionDataDecoder(): Decoder<ActivateAgentInstructionData> {\n return getStructDecoder([\n ['discriminator', fixDecoderSize(getBytesDecoder(), 8)],\n ['agentId', addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())],\n ]);\n}\n\nexport function getActivateAgentInstructionDataCodec(): Codec<\n ActivateAgentInstructionDataArgs,\n ActivateAgentInstructionData\n> {\n return combineCodec(\n getActivateAgentInstructionDataEncoder(),\n getActivateAgentInstructionDataDecoder()\n );\n}\n\nexport type ActivateAgentAsyncInput<\n TAccountAgentAccount extends string = string,\n TAccountSigner extends string = string,\n TAccountClock extends string = string,\n> = {\n /** Agent account with canonical PDA validation */\n agentAccount?: Address<TAccountAgentAccount>;\n /** Enhanced authority verification */\n signer: TransactionSigner<TAccountSigner>;\n /** Clock sysvar for rate limiting */\n clock?: Address<TAccountClock>;\n agentId: ActivateAgentInstructionDataArgs['agentId'];\n};\n\nexport async function getActivateAgentInstructionAsync<\n TAccountAgentAccount extends string,\n TAccountSigner extends string,\n TAccountClock extends string,\n TProgramAddress extends\n Address = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: ActivateAgentAsyncInput<\n TAccountAgentAccount,\n TAccountSigner,\n TAccountClock\n >,\n config?: { programAddress?: TProgramAddress }\n): Promise<\n ActivateAgentInstruction<\n TProgramAddress,\n TAccountAgentAccount,\n TAccountSigner,\n TAccountClock\n >\n> {\n // Program address.\n const programAddress =\n config?.programAddress ?? GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n agentAccount: { value: input.agentAccount ?? null, isWritable: true },\n signer: { value: input.signer ?? null, isWritable: true },\n clock: { value: input.clock ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolve default values.\n if (!accounts.agentAccount.value) {\n accounts.agentAccount.value = await getProgramDerivedAddress({\n programAddress,\n seeds: [\n getBytesEncoder().encode(new Uint8Array([97, 103, 101, 110, 116])),\n getAddressEncoder().encode(expectAddress(accounts.signer.value)),\n addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder()).encode(\n expectSome(args.agentId)\n ),\n ],\n });\n }\n if (!accounts.clock.value) {\n accounts.clock.value =\n 'SysvarC1ock11111111111111111111111111111111' as Address<'SysvarC1ock11111111111111111111111111111111'>;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.agentAccount),\n getAccountMeta(accounts.signer),\n getAccountMeta(accounts.clock),\n ],\n programAddress,\n data: getActivateAgentInstructionDataEncoder().encode(\n args as ActivateAgentInstructionDataArgs\n ),\n } as ActivateAgentInstruction<\n TProgramAddress,\n TAccountAgentAccount,\n TAccountSigner,\n TAccountClock\n >;\n\n return instruction;\n}\n\nexport type ActivateAgentInput<\n TAccountAgentAccount extends string = string,\n TAccountSigner extends string = string,\n TAccountClock extends string = string,\n> = {\n /** Agent account with canonical PDA validation */\n agentAccount: Address<TAccountAgentAccount>;\n /** Enhanced authority verification */\n signer: TransactionSigner<TAccountSigner>;\n /** Clock sysvar for rate limiting */\n clock?: Address<TAccountClock>;\n agentId: ActivateAgentInstructionDataArgs['agentId'];\n};\n\nexport function getActivateAgentInstruction<\n TAccountAgentAccount extends string,\n TAccountSigner extends string,\n TAccountClock extends string,\n TProgramAddress extends\n Address = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: ActivateAgentInput<\n TAccountAgentAccount,\n TAccountSigner,\n TAccountClock\n >,\n config?: { programAddress?: TProgramAddress }\n): ActivateAgentInstruction<\n TProgramAddress,\n TAccountAgentAccount,\n TAccountSigner,\n TAccountClock\n> {\n // Program address.\n const programAddress =\n config?.programAddress ?? GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n agentAccount: { value: input.agentAccount ?? null, isWritable: true },\n signer: { value: input.signer ?? null, isWritable: true },\n clock: { value: input.clock ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolve default values.\n if (!accounts.clock.value) {\n accounts.clock.value =\n 'SysvarC1ock11111111111111111111111111111111' as Address<'SysvarC1ock11111111111111111111111111111111'>;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.agentAccount),\n getAccountMeta(accounts.signer),\n getAccountMeta(accounts.clock),\n ],\n programAddress,\n data: getActivateAgentInstructionDataEncoder().encode(\n args as ActivateAgentInstructionDataArgs\n ),\n } as ActivateAgentInstruction<\n TProgramAddress,\n TAccountAgentAccount,\n TAccountSigner,\n TAccountClock\n >;\n\n return instruction;\n}\n\nexport type ParsedActivateAgentInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n /** Agent account with canonical PDA validation */\n agentAccount: TAccountMetas[0];\n /** Enhanced authority verification */\n signer: TAccountMetas[1];\n /** Clock sysvar for rate limiting */\n clock: TAccountMetas[2];\n };\n data: ActivateAgentInstructionData;\n};\n\nexport function parseActivateAgentInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>\n): ParsedActivateAgentInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 3) {\n throw new Error('[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts');\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = instruction.accounts![accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n agentAccount: getNextAccount(),\n signer: getNextAccount(),\n clock: getNextAccount(),\n },\n data: getActivateAgentInstructionDataDecoder().decode(instruction.data),\n };\n}\n","/**\n * This code was AUTOGENERATED using the codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n addDecoderSizePrefix,\n addEncoderSizePrefix,\n combineCodec,\n fixDecoderSize,\n fixEncoderSize,\n getBytesDecoder,\n getBytesEncoder,\n getProgramDerivedAddress,\n getStructDecoder,\n getStructEncoder,\n getU32Decoder,\n getU32Encoder,\n getUtf8Decoder,\n getUtf8Encoder,\n transformEncoder,\n type AccountMeta,\n type AccountSignerMeta,\n type Address,\n type Codec,\n type Decoder,\n type Encoder,\n type Instruction,\n type InstructionWithAccounts,\n type InstructionWithData,\n type ReadonlySignerAccount,\n type ReadonlyUint8Array,\n type TransactionSigner,\n type WritableAccount,\n} from '@solana/kit';\nimport {\n GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_INSTRUCTION_DATA,\n GHOSTSPEAK_MARKETPLACE_ERROR__MISSING_REQUIRED_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INSTRUCTION_PARSING_FAILED,\n isGhostspeakMarketplaceError,\n} from '../errors';\nimport { GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS } from '../programs';\nimport { getAccountMetaFactory, type ResolvedAccount } from '../shared';\n\nexport const ADD_MESSAGE_REACTION_DISCRIMINATOR = new Uint8Array([\n 82, 29, 134, 149, 255, 74, 248, 210,\n]);\n\nexport function getAddMessageReactionDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 8).encode(\n ADD_MESSAGE_REACTION_DISCRIMINATOR\n );\n}\n\nexport type AddMessageReactionInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountChannel extends string | AccountMeta<string> = string,\n TAccountMessage extends string | AccountMeta<string> = string,\n TAccountReentrancyGuard extends string | AccountMeta<string> = string,\n TAccountUser extends string | AccountMeta<string> = string,\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountChannel extends string\n ? WritableAccount<TAccountChannel>\n : TAccountChannel,\n TAccountMessage extends string\n ? WritableAccount<TAccountMessage>\n : TAccountMessage,\n TAccountReentrancyGuard extends string\n ? WritableAccount<TAccountReentrancyGuard>\n : TAccountReentrancyGuard,\n TAccountUser extends string\n ? ReadonlySignerAccount<TAccountUser> & AccountSignerMeta<TAccountUser>\n : TAccountUser,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type AddMessageReactionInstructionData = {\n discriminator: ReadonlyUint8Array;\n reaction: string;\n};\n\nexport type AddMessageReactionInstructionDataArgs = { reaction: string };\n\nexport function getAddMessageReactionInstructionDataEncoder(): Encoder<AddMessageReactionInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n ['discriminator', fixEncoderSize(getBytesEncoder(), 8)],\n ['reaction', addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder())],\n ]),\n (value) => ({ ...value, discriminator: ADD_MESSAGE_REACTION_DISCRIMINATOR })\n );\n}\n\nexport function getAddMessageReactionInstructionDataDecoder(): Decoder<AddMessageReactionInstructionData> {\n return getStructDecoder([\n ['discriminator', fixDecoderSize(getBytesDecoder(), 8)],\n ['reaction', addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())],\n ]);\n}\n\nexport function getAddMessageReactionInstructionDataCodec(): Codec<\n AddMessageReactionInstructionDataArgs,\n AddMessageReactionInstructionData\n> {\n return combineCodec(\n getAddMessageReactionInstructionDataEncoder(),\n getAddMessageReactionInstructionDataDecoder()\n );\n}\n\nexport type AddMessageReactionAsyncInput<\n TAccountChannel extends string = string,\n TAccountMessage extends string = string,\n TAccountReentrancyGuard extends string = string,\n TAccountUser extends string = string,\n> = {\n channel: Address<TAccountChannel>;\n message: Address<TAccountMessage>;\n reentrancyGuard?: Address<TAccountReentrancyGuard>;\n user: TransactionSigner<TAccountUser>;\n reaction: AddMessageReactionInstructionDataArgs['reaction'];\n};\n\nexport async function getAddMessageReactionInstructionAsync<\n TAccountChannel extends string,\n TAccountMessage extends string,\n TAccountReentrancyGuard extends string,\n TAccountUser extends string,\n TProgramAddress extends\n Address = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: AddMessageReactionAsyncInput<\n TAccountChannel,\n TAccountMessage,\n TAccountReentrancyGuard,\n TAccountUser\n >,\n config?: { programAddress?: TProgramAddress }\n): Promise<\n AddMessageReactionInstruction<\n TProgramAddress,\n TAccountChannel,\n TAccountMessage,\n TAccountReentrancyGuard,\n TAccountUser\n >\n> {\n // Program address.\n const programAddress =\n config?.programAddress ?? GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n channel: { value: input.channel ?? null, isWritable: true },\n message: { value: input.message ?? null, isWritable: true },\n reentrancyGuard: { value: input.reentrancyGuard ?? null, isWritable: true },\n user: { value: input.user ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolve default values.\n if (!accounts.reentrancyGuard.value) {\n accounts.reentrancyGuard.value = await getProgramDerivedAddress({\n programAddress,\n seeds: [\n getBytesEncoder().encode(\n new Uint8Array([\n 114, 101, 101, 110, 116, 114, 97, 110, 99, 121, 95, 103, 117, 97,\n 114, 100,\n ])\n ),\n ],\n });\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.channel),\n getAccountMeta(accounts.message),\n getAccountMeta(accounts.reentrancyGuard),\n getAccountMeta(accounts.user),\n ],\n programAddress,\n data: getAddMessageReactionInstructionDataEncoder().encode(\n args as AddMessageReactionInstructionDataArgs\n ),\n } as AddMessageReactionInstruction<\n TProgramAddress,\n TAccountChannel,\n TAccountMessage,\n TAccountReentrancyGuard,\n TAccountUser\n >;\n\n return instruction;\n}\n\nexport type AddMessageReactionInput<\n TAccountChannel extends string = string,\n TAccountMessage extends string = string,\n TAccountReentrancyGuard extends string = string,\n TAccountUser extends string = string,\n> = {\n channel: Address<TAccountChannel>;\n message: Address<TAccountMessage>;\n reentrancyGuard: Address<TAccountReentrancyGuard>;\n user: TransactionSigner<TAccountUser>;\n reaction: AddMessageReactionInstructionDataArgs['reaction'];\n};\n\nexport function getAddMessageReactionInstruction<\n TAccountChannel extends string,\n TAccountMessage extends string,\n TAccountReentrancyGuard extends string,\n TAccountUser extends string,\n TProgramAddress extends\n Address = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: AddMessageReactionInput<\n TAccountChannel,\n TAccountMessage,\n TAccountReentrancyGuard,\n TAccountUser\n >,\n config?: { programAddress?: TProgramAddress }\n): AddMessageReactionInstruction<\n TProgramAddress,\n TAccountChannel,\n TAccountMessage,\n TAccountReentrancyGuard,\n TAccountUser\n> {\n // Program address.\n const programAddress =\n config?.programAddress ?? GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n channel: { value: input.channel ?? null, isWritable: true },\n message: { value: input.message ?? null, isWritable: true },\n reentrancyGuard: { value: input.reentrancyGuard ?? null, isWritable: true },\n user: { value: input.user ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.channel),\n getAccountMeta(accounts.message),\n getAccountMeta(accounts.reentrancyGuard),\n getAccountMeta(accounts.user),\n ],\n programAddress,\n data: getAddMessageReactionInstructionDataEncoder().encode(\n args as AddMessageReactionInstructionDataArgs\n ),\n } as AddMessageReactionInstruction<\n TProgramAddress,\n TAccountChannel,\n TAccountMessage,\n TAccountReentrancyGuard,\n TAccountUser\n >;\n\n return instruction;\n}\n\nexport type ParsedAddMessageReactionInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n channel: TAccountMetas[0];\n message: TAccountMetas[1];\n reentrancyGuard: TAccountMetas[2];\n user: TAccountMetas[3];\n };\n data: AddMessageReactionInstructionData;\n};\n\nexport function parseAddMessageReactionInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>\n): ParsedAddMessageReactionInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 4) {\n throw new Error('[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts');\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = instruction.accounts![accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n channel: getNextAccount(),\n message: getNextAccount(),\n reentrancyGuard: getNextAccount(),\n user: getNextAccount(),\n },\n data: getAddMessageReactionInstructionDataDecoder().decode(\n instruction.data\n ),\n };\n}\n","/**\n * This code was AUTOGENERATED using the codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n combineCodec,\n fixDecoderSize,\n fixEncoderSize,\n getAddressDecoder,\n getAddressEncoder,\n getBytesDecoder,\n getBytesEncoder,\n getStructDecoder,\n getStructEncoder,\n transformEncoder,\n type AccountMeta,\n type AccountSignerMeta,\n type Address,\n type FixedSizeCodec,\n type FixedSizeDecoder,\n type FixedSizeEncoder,\n type Instruction,\n type InstructionWithAccounts,\n type InstructionWithData,\n type ReadonlyAccount,\n type ReadonlySignerAccount,\n type ReadonlyUint8Array,\n type TransactionSigner,\n type WritableAccount,\n} from '@solana/kit';\nimport {\n GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_INSTRUCTION_DATA,\n GHOSTSPEAK_MARKETPLACE_ERROR__MISSING_REQUIRED_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INSTRUCTION_PARSING_FAILED,\n isGhostspeakMarketplaceError,\n} from '../errors';\nimport { GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS } from '../programs';\nimport { getAccountMetaFactory, type ResolvedAccount } from '../shared';\n\nexport const ADD_TOP_AGENT_DISCRIMINATOR = new Uint8Array([\n 9, 96, 62, 59, 180, 205, 102, 11,\n]);\n\nexport function getAddTopAgentDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 8).encode(\n ADD_TOP_AGENT_DISCRIMINATOR\n );\n}\n\nexport type AddTopAgentInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountMarketAnalytics extends string | AccountMeta<string> = string,\n TAccountAuthority extends string | AccountMeta<string> = string,\n TAccountClock extends\n | string\n | AccountMeta<string> = 'SysvarC1ock11111111111111111111111111111111',\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountMarketAnalytics extends string\n ? WritableAccount<TAccountMarketAnalytics>\n : TAccountMarketAnalytics,\n TAccountAuthority extends string\n ? ReadonlySignerAccount<TAccountAuthority> &\n AccountSignerMeta<TAccountAuthority>\n : TAccountAuthority,\n TAccountClock extends string\n ? ReadonlyAccount<TAccountClock>\n : TAccountClock,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type AddTopAgentInstructionData = {\n discriminator: ReadonlyUint8Array;\n agent: Address;\n};\n\nexport type AddTopAgentInstructionDataArgs = { agent: Address };\n\nexport function getAddTopAgentInstructionDataEncoder(): FixedSizeEncoder<AddTopAgentInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n ['discriminator', fixEncoderSize(getBytesEncoder(), 8)],\n ['agent', getAddressEncoder()],\n ]),\n (value) => ({ ...value, discriminator: ADD_TOP_AGENT_DISCRIMINATOR })\n );\n}\n\nexport function getAddTopAgentInstructionDataDecoder(): FixedSizeDecoder<AddTopAgentInstructionData> {\n return getStructDecoder([\n ['discriminator', fixDecoderSize(getBytesDecoder(), 8)],\n ['agent', getAddressDecoder()],\n ]);\n}\n\nexport function getAddTopAgentInstructionDataCodec(): FixedSizeCodec<\n AddTopAgentInstructionDataArgs,\n AddTopAgentInstructionData\n> {\n return combineCodec(\n getAddTopAgentInstructionDataEncoder(),\n getAddTopAgentInstructionDataDecoder()\n );\n}\n\nexport type AddTopAgentInput<\n TAccountMarketAnalytics extends string = string,\n TAccountAuthority extends string = string,\n TAccountClock extends string = string,\n> = {\n /** Market analytics account with canonical bump validation */\n marketAnalytics: Address<TAccountMarketAnalytics>;\n /** Enhanced authority verification */\n authority: TransactionSigner<TAccountAuthority>;\n /** Clock sysvar for timestamp validation */\n clock?: Address<TAccountClock>;\n agent: AddTopAgentInstructionDataArgs['agent'];\n};\n\nexport function getAddTopAgentInstruction<\n TAccountMarketAnalytics extends string,\n TAccountAuthority extends string,\n TAccountClock extends string,\n TProgramAddress extends\n Address = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: AddTopAgentInput<\n TAccountMarketAnalytics,\n TAccountAuthority,\n TAccountClock\n >,\n config?: { programAddress?: TProgramAddress }\n): AddTopAgentInstruction<\n TProgramAddress,\n TAccountMarketAnalytics,\n TAccountAuthority,\n TAccountClock\n> {\n // Program address.\n const programAddress =\n config?.programAddress ?? GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n marketAnalytics: { value: input.marketAnalytics ?? null, isWritable: true },\n authority: { value: input.authority ?? null, isWritable: false },\n clock: { value: input.clock ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolve default values.\n if (!accounts.clock.value) {\n accounts.clock.value =\n 'SysvarC1ock11111111111111111111111111111111' as Address<'SysvarC1ock11111111111111111111111111111111'>;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.marketAnalytics),\n getAccountMeta(accounts.authority),\n getAccountMeta(accounts.clock),\n ],\n programAddress,\n data: getAddTopAgentInstructionDataEncoder().encode(\n args as AddTopAgentInstructionDataArgs\n ),\n } as AddTopAgentInstruction<\n TProgramAddress,\n TAccountMarketAnalytics,\n TAccountAuthority,\n TAccountClock\n >;\n\n return instruction;\n}\n\nexport type ParsedAddTopAgentInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n /** Market analytics account with canonical bump validation */\n marketAnalytics: TAccountMetas[0];\n /** Enhanced authority verification */\n authority: TAccountMetas[1];\n /** Clock sysvar for timestamp validation */\n clock: TAccountMetas[2];\n };\n data: AddTopAgentInstructionData;\n};\n\nexport function parseAddTopAgentInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>\n): ParsedAddTopAgentInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 3) {\n throw new Error('[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts');\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = instruction.accounts![accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n marketAnalytics: getNextAccount(),\n authority: getNextAccount(),\n clock: getNextAccount(),\n },\n data: getAddTopAgentInstructionDataDecoder().decode(instruction.data),\n };\n}\n","/**\n * This code was AUTOGENERATED using the codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n addDecoderSizePrefix,\n addEncoderSizePrefix,\n combineCodec,\n fixDecoderSize,\n fixEncoderSize,\n getAddressEncoder,\n getArrayDecoder,\n getArrayEncoder,\n getBytesDecoder,\n getBytesEncoder,\n getI64Decoder,\n getI64Encoder,\n getProgramDerivedAddress,\n getStructDecoder,\n getStructEncoder,\n getU32Decoder,\n getU32Encoder,\n getU64Decoder,\n getU64Encoder,\n getUtf8Decoder,\n getUtf8Encoder,\n transformEncoder,\n type AccountMeta,\n type AccountSignerMeta,\n type Address,\n type Codec,\n type Decoder,\n type Encoder,\n type Instruction,\n type InstructionWithAccounts,\n type InstructionWithData,\n type ReadonlyAccount,\n type ReadonlyUint8Array,\n type TransactionSigner,\n type WritableAccount,\n type WritableSignerAccount,\n} from '@solana/kit';\nimport {\n GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_INSTRUCTION_DATA,\n GHOSTSPEAK_MARKETPLACE_ERROR__MISSING_REQUIRED_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INSTRUCTION_PARSING_FAILED,\n isGhostspeakMarketplaceError,\n} from '../errors';\nimport { GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS } from '../programs';\nimport {\n expectAddress,\n getAccountMetaFactory,\n type ResolvedAccount,\n} from '../shared';\n\nexport const APPLY_TO_JOB_DISCRIMINATOR = new Uint8Array([\n 0, 252, 167, 244, 145, 90, 227, 29,\n]);\n\nexport function getApplyToJobDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 8).encode(\n APPLY_TO_JOB_DISCRIMINATOR\n );\n}\n\nexport type ApplyToJobInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountJobApplication extends string | AccountMeta<string> = string,\n TAccountJobPosting extends string | AccountMeta<string> = string,\n TAccountAgent extends string | AccountMeta<string> = string,\n TAccountAgentOwner extends string | AccountMeta<string> = string,\n TAccountSystemProgram extends\n | string\n | AccountMeta<string> = '11111111111111111111111111111111',\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountJobApplication extends string\n ? WritableAccount<TAccountJobApplication>\n : TAccountJobApplication,\n TAccountJobPosting extends string\n ? WritableAccount<TAccountJobPosting>\n : TAccountJobPosting,\n TAccountAgent extends string\n ? ReadonlyAccount<TAccountAgent>\n : TAccountAgent,\n TAccountAgentOwner extends string\n ? WritableSignerAccount<TAccountAgentOwner> &\n AccountSignerMeta<TAccountAgentOwner>\n : TAccountAgentOwner,\n TAccountSystemProgram extends string\n ? ReadonlyAccount<TAccountSystemProgram>\n : TAccountSystemProgram,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type ApplyToJobInstructionData = {\n discriminator: ReadonlyUint8Array;\n coverLetter: string;\n proposedPrice: bigint;\n estimatedDuration: number;\n proposedRate: bigint;\n estimatedDelivery: bigint;\n portfolioItems: Array<string>;\n};\n\nexport type ApplyToJobInstructionDataArgs = {\n coverLetter: string;\n proposedPrice: number | bigint;\n estimatedDuration: number;\n proposedRate: number | bigint;\n estimatedDelivery: number | bigint;\n portfolioItems: Array<string>;\n};\n\nexport function getApplyToJobInstructionDataEncoder(): Encoder<ApplyToJobInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n ['discriminator', fixEncoderSize(getBytesEncoder(), 8)],\n ['coverLetter', addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder())],\n ['proposedPrice', getU64Encoder()],\n ['estimatedDuration', getU32Encoder()],\n ['proposedRate', getU64Encoder()],\n ['estimatedDelivery', getI64Encoder()],\n [\n 'portfolioItems',\n getArrayEncoder(\n addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder())\n ),\n ],\n ]),\n (value) => ({ ...value, discriminator: APPLY_TO_JOB_DISCRIMINATOR })\n );\n}\n\nexport function getApplyToJobInstructionDataDecoder(): Decoder<ApplyToJobInstructionData> {\n return getStructDecoder([\n ['discriminator', fixDecoderSize(getBytesDecoder(), 8)],\n ['coverLetter', addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())],\n ['proposedPrice', getU64Decoder()],\n ['estimatedDuration', getU32Decoder()],\n ['proposedRate', getU64Decoder()],\n ['estimatedDelivery', getI64Decoder()],\n [\n 'portfolioItems',\n getArrayDecoder(addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())),\n ],\n ]);\n}\n\nexport function getApplyToJobInstructionDataCodec(): Codec<\n ApplyToJobInstructionDataArgs,\n ApplyToJobInstructionData\n> {\n return combineCodec(\n getApplyToJobInstructionDataEncoder(),\n getApplyToJobInstructionDataDecoder()\n );\n}\n\nexport type ApplyToJobAsyncInput<\n TAccountJobApplication extends string = string,\n TAccountJobPosting extends string = string,\n TAccountAgent extends string = string,\n TAccountAgentOwner extends string = string,\n TAccountSystemProgram extends string = string,\n> = {\n jobApplication?: Address<TAccountJobApplication>;\n jobPosting: Address<TAccountJobPosting>;\n agent: Address<TAccountAgent>;\n agentOwner: TransactionSigner<TAccountAgentOwner>;\n systemProgram?: Address<TAccountSystemProgram>;\n coverLetter: ApplyToJobInstructionDataArgs['coverLetter'];\n proposedPrice: ApplyToJobInstructionDataArgs['proposedPrice'];\n estimatedDuration: ApplyToJobInstructionDataArgs['estimatedDuration'];\n proposedRate: ApplyToJobInstructionDataArgs['proposedRate'];\n estimatedDelivery: ApplyToJobInstructionDataArgs['estimatedDelivery'];\n portfolioItems: ApplyToJobInstructionDataArgs['portfolioItems'];\n};\n\nexport async function getApplyToJobInstructionAsync<\n TAccountJobApplication extends string,\n TAccountJobPosting extends string,\n TAccountAgent extends string,\n TAccountAgentOwner extends string,\n TAccountSystemProgram extends string,\n TProgramAddress extends\n Address = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: ApplyToJobAsyncInput<\n TAccountJobApplication,\n TAccountJobPosting,\n TAccountAgent,\n TAccountAgentOwner,\n TAccountSystemProgram\n >,\n config?: { programAddress?: TProgramAddress }\n): Promise<\n ApplyToJobInstruction<\n TProgramAddress,\n TAccountJobApplication,\n TAccountJobPosting,\n TAccountAgent,\n TAccountAgentOwner,\n TAccountSystemProgram\n >\n> {\n // Program address.\n const programAddress =\n config?.programAddress ?? GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n jobApplication: { value: input.jobApplication ?? null, isWritable: true },\n jobPosting: { value: input.jobPosting ?? null, isWritable: true },\n agent: { value: input.agent ?? null, isWritable: false },\n agentOwner: { value: input.agentOwner ?? null, isWritable: true },\n systemProgram: { value: input.systemProgram ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolve default values.\n if (!accounts.jobApplication.value) {\n accounts.jobApplication.value = await getProgramDerivedAddress({\n programAddress,\n seeds: [\n getBytesEncoder().encode(\n new Uint8Array([\n 106, 111, 98, 95, 97, 112, 112, 108, 105, 99, 97, 116, 105, 111,\n 110,\n ])\n ),\n getAddressEncoder().encode(expectAddress(accounts.jobPosting.value)),\n getAddressEncoder().encode(expectAddress(accounts.agent.value)),\n ],\n });\n }\n if (!accounts.systemProgram.value) {\n accounts.systemProgram.value =\n '11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.jobApplication),\n getAccountMeta(accounts.jobPosting),\n getAccountMeta(accounts.agent),\n getAccountMeta(accounts.agentOwner),\n getAccountMeta(accounts.systemProgram),\n ],\n programAddress,\n data: getApplyToJobInstructionDataEncoder().encode(\n args as ApplyToJobInstructionDataArgs\n ),\n } as ApplyToJobInstruction<\n TProgramAddress,\n TAccountJobApplication,\n TAccountJobPosting,\n TAccountAgent,\n TAccountAgentOwner,\n TAccountSystemProgram\n >;\n\n return instruction;\n}\n\nexport type ApplyToJobInput<\n TAccountJobApplication extends string = string,\n TAccountJobPosting extends string = string,\n TAccountAgent extends string = string,\n TAccountAgentOwner extends string = string,\n TAccountSystemProgram extends string = string,\n> = {\n jobApplication: Address<TAccountJobApplication>;\n jobPosting: Address<TAccountJobPosting>;\n agent: Address<TAccountAgent>;\n agentOwner: TransactionSigner<TAccountAgentOwner>;\n systemProgram?: Address<TAccountSystemProgram>;\n coverLetter: ApplyToJobInstructionDataArgs['coverLetter'];\n proposedPrice: ApplyToJobInstructionDataArgs['proposedPrice'];\n estimatedDuration: ApplyToJobInstructionDataArgs['estimatedDuration'];\n proposedRate: ApplyToJobInstructionDataArgs['proposedRate'];\n estimatedDelivery: ApplyToJobInstructionDataArgs['estimatedDelivery'];\n portfolioItems: ApplyToJobInstructionDataArgs['portfolioItems'];\n};\n\nexport function getApplyToJobInstruction<\n TAccountJobApplication extends string,\n TAccountJobPosting extends string,\n TAccountAgent extends string,\n TAccountAgentOwner extends string,\n TAccountSystemProgram extends string,\n TProgramAddress extends\n Address = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: ApplyToJobInput<\n TAccountJobApplication,\n TAccountJobPosting,\n TAccountAgent,\n TAccountAgentOwner,\n TAccountSystemProgram\n >,\n config?: { programAddress?: TProgramAddress }\n): ApplyToJobInstruction<\n TProgramAddress,\n TAccountJobApplication,\n TAccountJobPosting,\n TAccountAgent,\n TAccountAgentOwner,\n TAccountSystemProgram\n> {\n // Program address.\n const programAddress =\n config?.programAddress ?? GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n jobApplication: { value: input.jobApplication ?? null, isWritable: true },\n jobPosting: { value: input.jobPosting ?? null, isWritable: true },\n agent: { value: input.agent ?? null, isWritable: false },\n agentOwner: { value: input.agentOwner ?? null, isWritable: true },\n systemProgram: { value: input.systemProgram ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolve default values.\n if (!accounts.systemProgram.value) {\n accounts.systemProgram.value =\n '11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.jobApplication),\n getAccountMeta(accounts.jobPosting),\n getAccountMeta(accounts.agent),\n getAccountMeta(accounts.agentOwner),\n getAccountMeta(accounts.systemProgram),\n ],\n programAddress,\n data: getApplyToJobInstructionDataEncoder().encode(\n args as ApplyToJobInstructionDataArgs\n ),\n } as ApplyToJobInstruction<\n TProgramAddress,\n TAccountJobApplication,\n TAccountJobPosting,\n TAccountAgent,\n TAccountAgentOwner,\n TAccountSystemProgram\n >;\n\n return instruction;\n}\n\nexport type ParsedApplyToJobInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n jobApplication: TAccountMetas[0];\n jobPosting: TAccountMetas[1];\n agent: TAccountMetas[2];\n agentOwner: TAccountMetas[3];\n systemProgram: TAccountMetas[4];\n };\n data: ApplyToJobInstructionData;\n};\n\nexport function parseApplyToJobInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>\n): ParsedApplyToJobInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 5) {\n throw new Error('[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts');\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = instruction.accounts![accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n jobApplication: getNextAccount(),\n jobPosting: getNextAccount(),\n agent: getNextAccount(),\n agentOwner: getNextAccount(),\n systemProgram: getNextAccount(),\n },\n data: getApplyToJobInstructionDataDecoder().decode(instruction.data),\n };\n}\n","/**\n * This code was AUTOGENERATED using the codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n combineCodec,\n fixDecoderSize,\n fixEncoderSize,\n getBytesDecoder,\n getBytesEncoder,\n getStructDecoder,\n getStructEncoder,\n transformEncoder,\n type AccountMeta,\n type AccountSignerMeta,\n type Address,\n type FixedSizeCodec,\n type FixedSizeDecoder,\n type FixedSizeEncoder,\n type Instruction,\n type InstructionWithAccounts,\n type InstructionWithData,\n type ReadonlyAccount,\n type ReadonlySignerAccount,\n type ReadonlyUint8Array,\n type TransactionSigner,\n type WritableAccount,\n} from '@solana/kit';\nimport {\n GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_INSTRUCTION_DATA,\n GHOSTSPEAK_MARKETPLACE_ERROR__MISSING_REQUIRED_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INSTRUCTION_PARSING_FAILED,\n isGhostspeakMarketplaceError,\n} from '../errors';\nimport { GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS } from '../programs';\nimport { getAccountMetaFactory, type ResolvedAccount } from '../shared';\n\nexport const APPROVE_EXTENSION_DISCRIMINATOR = new Uint8Array([\n 202, 138, 100, 241, 89, 154, 3, 53,\n]);\n\nexport function getApproveExtensionDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 8).encode(\n APPROVE_EXTENSION_DISCRIMINATOR\n );\n}\n\nexport type ApproveExtensionInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountExtension extends string | AccountMeta<string> = string,\n TAccountAuthority extends string | AccountMeta<string> = string,\n TAccountClock extends\n | string\n | AccountMeta<string> = 'SysvarC1ock11111111111111111111111111111111',\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountExtension extends string\n ? WritableAccount<TAccountExtension>\n : TAccountExtension,\n TAccountAuthority extends string\n ? ReadonlySignerAccount<TAccountAuthority> &\n AccountSignerMeta<TAccountAuthority>\n : TAccountAuthority,\n TAccountClock extends string\n ? ReadonlyAccount<TAccountClock>\n : TAccountClock,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type ApproveExtensionInstructionData = {\n discriminator: ReadonlyUint8Array;\n};\n\nexport type ApproveExtensionInstructionDataArgs = {};\n\nexport function getApproveExtensionInstructionDataEncoder(): FixedSizeEncoder<ApproveExtensionInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([['discriminator', fixEncoderSize(getBytesEncoder(), 8)]]),\n (value) => ({ ...value, discriminator: APPROVE_EXTENSION_DISCRIMINATOR })\n );\n}\n\nexport function getApproveExtensionInstructionDataDecoder(): FixedSizeDecoder<ApproveExtensionInstructionData> {\n return getStructDecoder([\n ['discriminator', fixDecoderSize(getBytesDecoder(), 8)],\n ]);\n}\n\nexport function getApproveExtensionInstructionDataCodec(): FixedSizeCodec<\n ApproveExtensionInstructionDataArgs,\n ApproveExtensionInstructionData\n> {\n return combineCodec(\n getApproveExtensionInstructionDataEncoder(),\n getApproveExtensionInstructionDataDecoder()\n );\n}\n\nexport type ApproveExtensionInput<\n TAccountExtension extends string = string,\n TAccountAuthority extends string = string,\n TAccountClock extends string = string,\n> = {\n /** Extension account with canonical validation */\n extension: Address<TAccountExtension>;\n /** Enhanced authority verification - only protocol admin */\n authority: TransactionSigner<TAccountAuthority>;\n /** Clock sysvar for timestamp validation */\n clock?: Address<TAccountClock>;\n};\n\nexport function getApproveExtensionInstruction<\n TAccountExtension extends string,\n TAccountAuthority extends string,\n TAccountClock extends string,\n TProgramAddress extends\n Address = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: ApproveExtensionInput<\n TAccountExtension,\n TAccountAuthority,\n TAccountClock\n >,\n config?: { programAddress?: TProgramAddress }\n): ApproveExtensionInstruction<\n TProgramAddress,\n TAccountExtension,\n TAccountAuthority,\n TAccountClock\n> {\n // Program address.\n const programAddress =\n config?.programAddress ?? GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n extension: { value: input.extension ?? null, isWritable: true },\n authority: { value: input.authority ?? null, isWritable: false },\n clock: { value: input.clock ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Resolve default values.\n if (!accounts.clock.value) {\n accounts.clock.value =\n 'SysvarC1ock11111111111111111111111111111111' as Address<'SysvarC1ock11111111111111111111111111111111'>;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.extension),\n getAccountMeta(accounts.authority),\n getAccountMeta(accounts.clock),\n ],\n programAddress,\n data: getApproveExtensionInstructionDataEncoder().encode({}),\n } as ApproveExtensionInstruction<\n TProgramAddress,\n TAccountExtension,\n TAccountAuthority,\n TAccountClock\n >;\n\n return instruction;\n}\n\nexport type ParsedApproveExtensionInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n /** Extension account with canonical validation */\n extension: TAccountMetas[0];\n /** Enhanced authority verification - only protocol admin */\n authority: TAccountMetas[1];\n /** Clock sysvar for timestamp validation */\n clock: TAccountMetas[2];\n };\n data: ApproveExtensionInstructionData;\n};\n\nexport function parseApproveExtensionInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>\n): ParsedApproveExtensionInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 3) {\n throw new Error('[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts');\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = instruction.accounts![accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n extension: getNextAccount(),\n authority: getNextAccount(),\n clock: getNextAccount(),\n },\n data: getApproveExtensionInstructionDataDecoder().decode(instruction.data),\n };\n}\n","/**\n * This code was AUTOGENERATED using the codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n combineCodec,\n fixDecoderSize,\n fixEncoderSize,\n getAddressDecoder,\n getAddressEncoder,\n getBytesDecoder,\n getBytesEncoder,\n getProgramDerivedAddress,\n getStructDecoder,\n getStructEncoder,\n transformEncoder,\n type AccountMeta,\n type AccountSignerMeta,\n type Address,\n type FixedSizeCodec,\n type FixedSizeDecoder,\n type FixedSizeEncoder,\n type Instruction,\n type InstructionWithAccounts,\n type InstructionWithData,\n type ReadonlyAccount,\n type ReadonlySignerAccount,\n type ReadonlyUint8Array,\n type TransactionSigner,\n type WritableAccount,\n} from '@solana/kit';\nimport {\n GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_INSTRUCTION_DATA,\n GHOSTSPEAK_MARKETPLACE_ERROR__MISSING_REQUIRED_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INSTRUCTION_PARSING_FAILED,\n isGhostspeakMarketplaceError,\n} from '../errors';\nimport { GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS } from '../programs';\nimport { getAccountMetaFactory, type ResolvedAccount } from '../shared';\n\nexport const ASSIGN_ARBITRATOR_DISCRIMINATOR = new Uint8Array([\n 227, 183, 153, 251, 4, 55, 13, 56,\n]);\n\nexport function getAssignArbitratorDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 8).encode(\n ASSIGN_ARBITRATOR_DISCRIMINATOR\n );\n}\n\nexport type AssignArbitratorInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountDispute extends string | AccountMeta<string> = string,\n TAccountArbitratorRegistry extends string | AccountMeta<string> = string,\n TAccountAuthority extends string | AccountMeta<string> = string,\n TAccountClock extends\n | string\n | AccountMeta<string> = 'SysvarC1ock11111111111111111111111111111111',\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountDispute extends string\n ? WritableAccount<TAccountDispute>\n : TAccountDispute,\n TAccountArbitratorRegistry extends string\n ? ReadonlyAccount<TAccountArbitratorRegistry>\n : TAccountArbitratorRegistry,\n TAccountAuthority extends string\n ? ReadonlySignerAccount<TAccountAuthority> &\n AccountSignerMeta<TAccountAuthority>\n : TAccountAuthority,\n TAccountClock extends string\n ? ReadonlyAccount<TAccountClock>\n : TAccountClock,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type AssignArbitratorInstructionData = {\n discriminator: ReadonlyUint8Array;\n arbitrator: Address;\n};\n\nexport type AssignArbitratorInstructionDataArgs = { arbitrator: Address };\n\nexport function getAssignArbitratorInstructionDataEncoder(): FixedSizeEncoder<AssignArbitratorInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n ['discriminator', fixEncoderSize(getBytesEncoder(), 8)],\n ['arbitrator', getAddressEncoder()],\n ]),\n (value) => ({ ...value, discriminator: ASSIGN_ARBITRATOR_DISCRIMINATOR })\n );\n}\n\nexport function getAssignArbitratorInstructionDataDecoder(): FixedSizeDecoder<AssignArbitratorInstructionData> {\n return getStructDecoder([\n ['discriminator', fixDecoderSize(getBytesDecoder(), 8)],\n ['arbitrator', getAddressDecoder()],\n ]);\n}\n\nexport function getAssignArbitratorInstructionDataCodec(): FixedSizeCodec<\n AssignArbitratorInstructionDataArgs,\n AssignArbitratorInstructionData\n> {\n return combineCodec(\n getAssignArbitratorInstructionDataEncoder(),\n getAssignArbitratorInstructionDataDecoder()\n );\n}\n\nexport type AssignArbitratorAsyncInput<\n TAccountDispute extends string = string,\n TAccountArbitratorRegistry extends string = string,\n TAccountAuthority extends string = string,\n TAccountClock extends string = string,\n> = {\n /** Dispute account with canonical validation */\n dispute: Address<TAccountDispute>;\n /** Arbitrator registry for validation */\n arbitratorRegistry?: Address<TAccountArbitratorRegistry>;\n /** Authority (protocol admin or governance) */\n authority: TransactionSigner<TAccountAuthority>;\n /** Clock sysvar for timestamp */\n clock?: Address<TAccountClock>;\n arbitrator: AssignArbitratorInstructionDataArgs['arbitrator'];\n};\n\nexport async function getAssignArbitratorInstructionAsync<\n TAccountDispute extends string,\n TAccountArbitratorRegistry extends string,\n TAccountAuthority extends string,\n TAccountClock extends string,\n TProgramAddress extends\n Address = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: AssignArbitratorAsyncInput<\n TAccountDispute,\n TAccountArbitratorRegistry,\n TAccountAuthority,\n TAccountClock\n >,\n config?: { programAddress?: TProgramAddress }\n): Promise<\n AssignArbitratorInstruction<\n TProgramAddress,\n TAccountDispute,\n TAccountArbitratorRegistry,\n TAccountAuthority,\n TAccountClock\n >\n> {\n // Program address.\n const programAddress =\n config?.programAddress ?? GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n dispute: { value: input.dispute ?? null, isWritable: true },\n arbitratorRegistry: {\n value: input.arbitratorRegistry ?? null,\n isWritable: false,\n },\n authority: { value: input.authority ?? null, isWritable: false },\n clock: { value: input.clock ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolve default values.\n if (!accounts.arbitratorRegistry.value) {\n accounts.arbitratorRegistry.value = await getProgramDerivedAddress({\n programAddress,\n seeds: [\n getBytesEncoder().encode(\n new Uint8Array([\n 97, 114, 98, 105, 116, 114, 97, 116, 111, 114, 95, 114, 101, 103,\n 105, 115, 116, 114, 121,\n ])\n ),\n ],\n });\n }\n if (!accounts.clock.value) {\n accounts.clock.value =\n 'SysvarC1ock11111111111111111111111111111111' as Address<'SysvarC1ock11111111111111111111111111111111'>;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.dispute),\n getAccountMeta(accounts.arbitratorRegistry),\n getAccountMeta(accounts.authority),\n getAccountMeta(accounts.clock),\n ],\n programAddress,\n data: getAssignArbitratorInstructionDataEncoder().encode(\n args as AssignArbitratorInstructionDataArgs\n ),\n } as AssignArbitratorInstruction<\n TProgramAddress,\n TAccountDispute,\n TAccountArbitratorRegistry,\n TAccountAuthority,\n TAccountClock\n >;\n\n return instruction;\n}\n\nexport type AssignArbitratorInput<\n TAccountDispute extends string = string,\n TAccountArbitratorRegistry extends string = string,\n TAccountAuthority extends string = string,\n TAccountClock extends string = string,\n> = {\n /** Dispute account with canonical validation */\n dispute: Address<TAccountDispute>;\n /** Arbitrator registry for validation */\n arbitratorRegistry: Address<TAccountArbitratorRegistry>;\n /** Authority (protocol admin or governance) */\n authority: TransactionSigner<TAccountAuthority>;\n /** Clock sysvar for timestamp */\n clock?: Address<TAccountClock>;\n arbitrator: AssignArbitratorInstructionDataArgs['arbitrator'];\n};\n\nexport function getAssignArbitratorInstruction<\n TAccountDispute extends string,\n TAccountArbitratorRegistry extends string,\n TAccountAuthority extends string,\n TAccountClock extends string,\n TProgramAddress extends\n Address = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: AssignArbitratorInput<\n TAccountDispute,\n TAccountArbitratorRegistry,\n TAccountAuthority,\n TAccountClock\n >,\n config?: { programAddress?: TProgramAddress }\n): AssignArbitratorInstruction<\n TProgramAddress,\n TAccountDispute,\n TAccountArbitratorRegistry,\n TAccountAuthority,\n TAccountClock\n> {\n // Program address.\n const programAddress =\n config?.programAddress ?? GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n dispute: { value: input.dispute ?? null, isWritable: true },\n arbitratorRegistry: {\n value: input.arbitratorRegistry ?? null,\n isWritable: false,\n },\n authority: { value: input.authority ?? null, isWritable: false },\n clock: { value: input.clock ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolve default values.\n if (!accounts.clock.value) {\n accounts.clock.value =\n 'SysvarC1ock11111111111111111111111111111111' as Address<'SysvarC1ock11111111111111111111111111111111'>;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.dispute),\n getAccountMeta(accounts.arbitratorRegistry),\n getAccountMeta(accounts.authority),\n getAccountMeta(accounts.clock),\n ],\n programAddress,\n data: getAssignArbitratorInstructionDataEncoder().encode(\n args as AssignArbitratorInstructionDataArgs\n ),\n } as AssignArbitratorInstruction<\n TProgramAddress,\n TAccountDispute,\n TAccountArbitratorRegistry,\n TAccountAuthority,\n TAccountClock\n >;\n\n return instruction;\n}\n\nexport type ParsedAssignArbitratorInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n /** Dispute account with canonical validation */\n dispute: TAccountMetas[0];\n /** Arbitrator registry for validation */\n arbitratorRegistry: TAccountMetas[1];\n /** Authority (protocol admin or governance) */\n authority: TAccountMetas[2];\n /** Clock sysvar for timestamp */\n clock: TAccountMetas[3];\n };\n data: AssignArbitratorInstructionData;\n};\n\nexport function parseAssignArbitratorInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>\n): ParsedAssignArbitratorInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 4) {\n throw new Error('[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts');\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = instruction.accounts![accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n dispute: getNextAccount(),\n arbitratorRegistry: getNextAccount(),\n authority: getNextAccount(),\n clock: getNextAccount(),\n },\n data: getAssignArbitratorInstructionDataDecoder().decode(instruction.data),\n };\n}\n","/**\n * This code was AUTOGENERATED using the codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n combineCodec,\n fixDecoderSize,\n fixEncoderSize,\n getArrayDecoder,\n getArrayEncoder,\n getBytesDecoder,\n getBytesEncoder,\n getStructDecoder,\n getStructEncoder,\n getU32Decoder,\n getU32Encoder,\n transformEncoder,\n type AccountMeta,\n type AccountSignerMeta,\n type Address,\n type Codec,\n type Decoder,\n type Encoder,\n type Instruction,\n type InstructionWithAccounts,\n type InstructionWithData,\n type ReadonlyAccount,\n type ReadonlyUint8Array,\n type TransactionSigner,\n type WritableAccount,\n type WritableSignerAccount,\n} from '@solana/kit';\nimport {\n GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_INSTRUCTION_DATA,\n GHOSTSPEAK_MARKETPLACE_ERROR__MISSING_REQUIRED_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INSTRUCTION_PARSING_FAILED,\n isGhostspeakMarketplaceError,\n} from '../errors';\nimport { GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS } from '../programs';\nimport { getAccountMetaFactory, type ResolvedAccount } from '../shared';\nimport {\n getAgentCustomizationDecoder,\n getAgentCustomizationEncoder,\n type AgentCustomization,\n type AgentCustomizationArgs,\n} from '../types';\n\nexport const BATCH_REPLICATE_AGENTS_DISCRIMINATOR = new Uint8Array([\n 224, 241, 221, 158, 57, 55, 110, 180,\n]);\n\nexport function getBatchReplicateAgentsDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 8).encode(\n BATCH_REPLICATE_AGENTS_DISCRIMINATOR\n );\n}\n\nexport type BatchReplicateAgentsInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountReplicationTemplate extends string | AccountMeta<string> = string,\n TAccountBuyer extends string | AccountMeta<string> = string,\n TAccountSystemProgram extends\n | string\n | AccountMeta<string> = '11111111111111111111111111111111',\n TAccountTokenProgram extends\n | string\n | AccountMeta<string> = 'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA',\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountReplicationTemplate extends string\n ? WritableAccount<TAccountReplicationTemplate>\n : TAccountReplicationTemplate,\n TAccountBuyer extends string\n ? WritableSignerAccount<TAccountBuyer> &\n AccountSignerMeta<TAccountBuyer>\n : TAccountBuyer,\n TAccountSystemProgram extends string\n ? ReadonlyAccount<TAccountSystemProgram>\n : TAccountSystemProgram,\n TAccountTokenProgram extends string\n ? ReadonlyAccount<TAccountTokenProgram>\n : TAccountTokenProgram,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type BatchReplicateAgentsInstructionData = {\n discriminator: ReadonlyUint8Array;\n customizations: Array<AgentCustomization>;\n royaltyPercentage: number;\n};\n\nexport type BatchReplicateAgentsInstructionDataArgs = {\n customizations: Array<AgentCustomizationArgs>;\n royaltyPercentage: number;\n};\n\nexport function getBatchReplicateAgentsInstructionDataEncoder(): Encoder<BatchReplicateAgentsInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n ['discriminator', fixEncoderSize(getBytesEncoder(), 8)],\n ['customizations', getArrayEncoder(getAgentCustomizationEncoder())],\n ['royaltyPercentage', getU32Encoder()],\n ]),\n (value) => ({\n ...value,\n discriminator: BATCH_REPLICATE_AGENTS_DISCRIMINATOR,\n })\n );\n}\n\nexport function getBatchReplicateAgentsInstructionDataDecoder(): Decoder<BatchReplicateAgentsInstructionData> {\n return getStructDecoder([\n ['discriminator', fixDecoderSize(getBytesDecoder(), 8)],\n ['customizations', getArrayDecoder(getAgentCustomizationDecoder())],\n ['royaltyPercentage', getU32Decoder()],\n ]);\n}\n\nexport function getBatchReplicateAgentsInstructionDataCodec(): Codec<\n BatchReplicateAgentsInstructionDataArgs,\n BatchReplicateAgentsInstructionData\n> {\n return combineCodec(\n getBatchReplicateAgentsInstructionDataEncoder(),\n getBatchReplicateAgentsInstructionDataDecoder()\n );\n}\n\nexport type BatchReplicateAgentsInput<\n TAccountReplicationTemplate extends string = string,\n TAccountBuyer extends string = string,\n TAccountSystemProgram extends string = string,\n TAccountTokenProgram extends string = string,\n> = {\n replicationTemplate: Address<TAccountReplicationTemplate>;\n buyer: TransactionSigner<TAccountBuyer>;\n systemProgram?: Address<TAccountSystemProgram>;\n tokenProgram?: Address<TAccountTokenProgram>;\n customizations: BatchReplicateAgentsInstructionDataArgs['customizations'];\n royaltyPercentage: BatchReplicateAgentsInstructionDataArgs['royaltyPercentage'];\n};\n\nexport function getBatchReplicateAgentsInstruction<\n TAccountReplicationTemplate extends string,\n TAccountBuyer extends string,\n TAccountSystemProgram extends string,\n TAccountTokenProgram extends string,\n TProgramAddress extends\n Address = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: BatchReplicateAgentsInput<\n TAccountReplicationTemplate,\n TAccountBuyer,\n TAccountSystemProgram,\n TAccountTokenProgram\n >,\n config?: { programAddress?: TProgramAddress }\n): BatchReplicateAgentsInstruction<\n TProgramAddress,\n TAccountReplicationTemplate,\n TAccountBuyer,\n TAccountSystemProgram,\n TAccountTokenProgram\n> {\n // Program address.\n const programAddress =\n config?.programAddress ?? GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n replicationTemplate: {\n value: input.replicationTemplate ?? null,\n isWritable: true,\n },\n buyer: { value: input.buyer ?? null, isWritable: true },\n systemProgram: { value: input.systemProgram ?? null, isWritable: false },\n tokenProgram: { value: input.tokenProgram ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolve default values.\n if (!accounts.systemProgram.value) {\n accounts.systemProgram.value =\n '11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>;\n }\n if (!accounts.tokenProgram.value) {\n accounts.tokenProgram.value =\n 'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA' as Address<'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA'>;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.replicationTemplate),\n getAccountMeta(accounts.buyer),\n getAccountMeta(accounts.systemProgram),\n getAccountMeta(accounts.tokenProgram),\n ],\n programAddress,\n data: getBatchReplicateAgentsInstructionDataEncoder().encode(\n args as BatchReplicateAgentsInstructionDataArgs\n ),\n } as BatchReplicateAgentsInstruction<\n TProgramAddress,\n TAccountReplicationTemplate,\n TAccountBuyer,\n TAccountSystemProgram,\n TAccountTokenProgram\n >;\n\n return instruction;\n}\n\nexport type ParsedBatchReplicateAgentsInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n replicationTemplate: TAccountMetas[0];\n buyer: TAccountMetas[1];\n systemProgram: TAccountMetas[2];\n tokenProgram: TAccountMetas[3];\n };\n data: BatchReplicateAgentsInstructionData;\n};\n\nexport function parseBatchReplicateAgentsInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>\n): ParsedBatchReplicateAgentsInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 4) {\n throw new Error('[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts');\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = instruction.accounts![accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n replicationTemplate: getNextAccount(),\n buyer: getNextAccount(),\n systemProgram: getNextAccount(),\n tokenProgram: getNextAccount(),\n },\n data: getBatchReplicateAgentsInstructionDataDecoder().decode(\n instruction.data\n ),\n };\n}\n","/**\n * This code was AUTOGENERATED using the codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n addDecoderSizePrefix,\n addEncoderSizePrefix,\n combineCodec,\n fixDecoderSize,\n fixEncoderSize,\n getBytesDecoder,\n getBytesEncoder,\n getProgramDerivedAddress,\n getStructDecoder,\n getStructEncoder,\n getU32Decoder,\n getU32Encoder,\n getUtf8Decoder,\n getUtf8Encoder,\n transformEncoder,\n type AccountMeta,\n type AccountSignerMeta,\n type Address,\n type Codec,\n type Decoder,\n type Encoder,\n type Instruction,\n type InstructionWithAccounts,\n type InstructionWithData,\n type ReadonlyAccount,\n type ReadonlyUint8Array,\n type TransactionSigner,\n type WritableAccount,\n type WritableSignerAccount,\n} from '@solana/kit';\nimport {\n GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_INSTRUCTION_DATA,\n GHOSTSPEAK_MARKETPLACE_ERROR__MISSING_REQUIRED_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INSTRUCTION_PARSING_FAILED,\n isGhostspeakMarketplaceError,\n} from '../errors';\nimport { GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS } from '../programs';\nimport { getAccountMetaFactory, type ResolvedAccount } from '../shared';\n\nexport const CANCEL_ESCROW_DISCRIMINATOR = new Uint8Array([\n 156, 203, 54, 179, 38, 72, 33, 21,\n]);\n\nexport function getCancelEscrowDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 8).encode(\n CANCEL_ESCROW_DISCRIMINATOR\n );\n}\n\nexport type CancelEscrowInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountEscrow extends string | AccountMeta<string> = string,\n TAccountReentrancyGuard extends string | AccountMeta<string> = string,\n TAccountEscrowTokenAccount extends string | AccountMeta<string> = string,\n TAccountClientRefundAccount extends string | AccountMeta<string> = string,\n TAccountPaymentToken extends string | AccountMeta<string> = string,\n TAccountAuthority extends string | AccountMeta<string> = string,\n TAccountTokenProgram extends\n | string\n | AccountMeta<string> = 'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb',\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountEscrow extends string\n ? WritableAccount<TAccountEscrow>\n : TAccountEscrow,\n TAccountReentrancyGuard extends string\n ? WritableAccount<TAccountReentrancyGuard>\n : TAccountReentrancyGuard,\n TAccountEscrowTokenAccount extends string\n ? WritableAccount<TAccountEscrowTokenAccount>\n : TAccountEscrowTokenAccount,\n TAccountClientRefundAccount extends string\n ? WritableAccount<TAccountClientRefundAccount>\n : TAccountClientRefundAccount,\n TAccountPaymentToken extends string\n ? ReadonlyAccount<TAccountPaymentToken>\n : TAccountPaymentToken,\n TAccountAuthority extends string\n ? WritableSignerAccount<TAccountAuthority> &\n AccountSignerMeta<TAccountAuthority>\n : TAccountAuthority,\n TAccountTokenProgram extends string\n ? ReadonlyAccount<TAccountTokenProgram>\n : TAccountTokenProgram,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type CancelEscrowInstructionData = {\n discriminator: ReadonlyUint8Array;\n cancellationReason: string;\n};\n\nexport type CancelEscrowInstructionDataArgs = { cancellationReason: string };\n\nexport function getCancelEscrowInstructionDataEncoder(): Encoder<CancelEscrowInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n ['discriminator', fixEncoderSize(getBytesEncoder(), 8)],\n [\n 'cancellationReason',\n addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder()),\n ],\n ]),\n (value) => ({ ...value, discriminator: CANCEL_ESCROW_DISCRIMINATOR })\n );\n}\n\nexport function getCancelEscrowInstructionDataDecoder(): Decoder<CancelEscrowInstructionData> {\n return getStructDecoder([\n ['discriminator', fixDecoderSize(getBytesDecoder(), 8)],\n [\n 'cancellationReason',\n addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder()),\n ],\n ]);\n}\n\nexport function getCancelEscrowInstructionDataCodec(): Codec<\n CancelEscrowInstructionDataArgs,\n CancelEscrowInstructionData\n> {\n return combineCodec(\n getCancelEscrowInstructionDataEncoder(),\n getCancelEscrowInstructionDataDecoder()\n );\n}\n\nexport type CancelEscrowAsyncInput<\n TAccountEscrow extends string = string,\n TAccountReentrancyGuard extends string = string,\n TAccountEscrowTokenAccount extends string = string,\n TAccountClientRefundAccount extends string = string,\n TAccountPaymentToken extends string = string,\n TAccountAuthority extends string = string,\n TAccountTokenProgram extends string = string,\n> = {\n escrow: Address<TAccountEscrow>;\n reentrancyGuard?: Address<TAccountReentrancyGuard>;\n escrowTokenAccount: Address<TAccountEscrowTokenAccount>;\n clientRefundAccount: Address<TAccountClientRefundAccount>;\n /** The token mint used for payments */\n paymentToken: Address<TAccountPaymentToken>;\n authority: TransactionSigner<TAccountAuthority>;\n tokenProgram?: Address<TAccountTokenProgram>;\n cancellationReason: CancelEscrowInstructionDataArgs['cancellationReason'];\n};\n\nexport async function getCancelEscrowInstructionAsync<\n TAccountEscrow extends string,\n TAccountReentrancyGuard extends string,\n TAccountEscrowTokenAccount extends string,\n TAccountClientRefundAccount extends string,\n TAccountPaymentToken extends string,\n TAccountAuthority extends string,\n TAccountTokenProgram extends string,\n TProgramAddress extends\n Address = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: CancelEscrowAsyncInput<\n TAccountEscrow,\n TAccountReentrancyGuard,\n TAccountEscrowTokenAccount,\n TAccountClientRefundAccount,\n TAccountPaymentToken,\n TAccountAuthority,\n TAccountTokenProgram\n >,\n config?: { programAddress?: TProgramAddress }\n): Promise<\n CancelEscrowInstruction<\n TProgramAddress,\n TAccountEscrow,\n TAccountReentrancyGuard,\n TAccountEscrowTokenAccount,\n TAccountClientRefundAccount,\n TAccountPaymentToken,\n TAccountAuthority,\n TAccountTokenProgram\n >\n> {\n // Program address.\n const programAddress =\n config?.programAddress ?? GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n escrow: { value: input.escrow ?? null, isWritable: true },\n reentrancyGuard: { value: input.reentrancyGuard ?? null, isWritable: true },\n escrowTokenAccount: {\n value: input.escrowTokenAccount ?? null,\n isWritable: true,\n },\n clientRefundAccount: {\n value: input.clientRefundAccount ?? null,\n isWritable: true,\n },\n paymentToken: { value: input.paymentToken ?? null, isWritable: false },\n authority: { value: input.authority ?? null, isWritable: true },\n tokenProgram: { value: input.tokenProgram ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolve default values.\n if (!accounts.reentrancyGuard.value) {\n accounts.reentrancyGuard.value = await getProgramDerivedAddress({\n programAddress,\n seeds: [\n getBytesEncoder().encode(\n new Uint8Array([\n 114, 101, 101, 110, 116, 114, 97, 110, 99, 121, 95, 103, 117, 97,\n 114, 100,\n ])\n ),\n ],\n });\n }\n if (!accounts.tokenProgram.value) {\n accounts.tokenProgram.value =\n 'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb' as Address<'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb'>;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.escrow),\n getAccountMeta(accounts.reentrancyGuard),\n getAccountMeta(accounts.escrowTokenAccount),\n getAccountMeta(accounts.clientRefundAccount),\n getAccountMeta(accounts.paymentToken),\n getAccountMeta(accounts.authority),\n getAccountMeta(accounts.tokenProgram),\n ],\n programAddress,\n data: getCancelEscrowInstructionDataEncoder().encode(\n args as CancelEscrowInstructionDataArgs\n ),\n } as CancelEscrowInstruction<\n TProgramAddress,\n TAccountEscrow,\n TAccountReentrancyGuard,\n TAccountEscrowTokenAccount,\n TAccountClientRefundAccount,\n TAccountPaymentToken,\n TAccountAuthority,\n TAccountTokenProgram\n >;\n\n return instruction;\n}\n\nexport type CancelEscrowInput<\n TAccountEscrow extends string = string,\n TAccountReentrancyGuard extends string = string,\n TAccountEscrowTokenAccount extends string = string,\n TAccountClientRefundAccount extends string = string,\n TAccountPaymentToken extends string = string,\n TAccountAuthority extends string = string,\n TAccountTokenProgram extends string = string,\n> = {\n escrow: Address<TAccountEscrow>;\n reentrancyGuard: Address<TAccountReentrancyGuard>;\n escrowTokenAccount: Address<TAccountEscrowTokenAccount>;\n clientRefundAccount: Address<TAccountClientRefundAccount>;\n /** The token mint used for payments */\n paymentToken: Address<TAccountPaymentToken>;\n authority: TransactionSigner<TAccountAuthority>;\n tokenProgram?: Address<TAccountTokenProgram>;\n cancellationReason: CancelEscrowInstructionDataArgs['cancellationReason'];\n};\n\nexport function getCancelEscrowInstruction<\n TAccountEscrow extends string,\n TAccountReentrancyGuard extends string,\n TAccountEscrowTokenAccount extends string,\n TAccountClientRefundAccount extends string,\n TAccountPaymentToken extends string,\n TAccountAuthority extends string,\n TAccountTokenProgram extends string,\n TProgramAddress extends\n Address = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: CancelEscrowInput<\n TAccountEscrow,\n TAccountReentrancyGuard,\n TAccountEscrowTokenAccount,\n TAccountClientRefundAccount,\n TAccountPaymentToken,\n TAccountAuthority,\n TAccountTokenProgram\n >,\n config?: { programAddress?: TProgramAddress }\n): CancelEscrowInstruction<\n TProgramAddress,\n TAccountEscrow,\n TAccountReentrancyGuard,\n TAccountEscrowTokenAccount,\n TAccountClientRefundAccount,\n TAccountPaymentToken,\n TAccountAuthority,\n TAccountTokenProgram\n> {\n // Program address.\n const programAddress =\n config?.programAddress ?? GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n escrow: { value: input.escrow ?? null, isWritable: true },\n reentrancyGuard: { value: input.reentrancyGuard ?? null, isWritable: true },\n escrowTokenAccount: {\n value: input.escrowTokenAccount ?? null,\n isWritable: true,\n },\n clientRefundAccount: {\n value: input.clientRefundAccount ?? null,\n isWritable: true,\n },\n paymentToken: { value: input.paymentToken ?? null, isWritable: false },\n authority: { value: input.authority ?? null, isWritable: true },\n tokenProgram: { value: input.tokenProgram ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolve default values.\n if (!accounts.tokenProgram.value) {\n accounts.tokenProgram.value =\n 'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb' as Address<'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb'>;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.escrow),\n getAccountMeta(accounts.reentrancyGuard),\n getAccountMeta(accounts.escrowTokenAccount),\n getAccountMeta(accounts.clientRefundAccount),\n getAccountMeta(accounts.paymentToken),\n getAccountMeta(accounts.authority),\n getAccountMeta(accounts.tokenProgram),\n ],\n programAddress,\n data: getCancelEscrowInstructionDataEncoder().encode(\n args as CancelEscrowInstructionDataArgs\n ),\n } as CancelEscrowInstruction<\n TProgramAddress,\n TAccountEscrow,\n TAccountReentrancyGuard,\n TAccountEscrowTokenAccount,\n TAccountClientRefundAccount,\n TAccountPaymentToken,\n TAccountAuthority,\n TAccountTokenProgram\n >;\n\n return instruction;\n}\n\nexport type ParsedCancelEscrowInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n escrow: TAccountMetas[0];\n reentrancyGuard: TAccountMetas[1];\n escrowTokenAccount: TAccountMetas[2];\n clientRefundAccount: TAccountMetas[3];\n /** The token mint used for payments */\n paymentToken: TAccountMetas[4];\n authority: TAccountMetas[5];\n tokenProgram: TAccountMetas[6];\n };\n data: CancelEscrowInstructionData;\n};\n\nexport function parseCancelEscrowInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>\n): ParsedCancelEscrowInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 7) {\n throw new Error('[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts');\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = instruction.accounts![accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n escrow: getNextAccount(),\n reentrancyGuard: getNextAccount(),\n escrowTokenAccount: getNextAccount(),\n clientRefundAccount: getNextAccount(),\n paymentToken: getNextAccount(),\n authority: getNextAccount(),\n tokenProgram: getNextAccount(),\n },\n data: getCancelEscrowInstructionDataDecoder().decode(instruction.data),\n };\n}\n","/**\n * This code was AUTOGENERATED using the codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n addDecoderSizePrefix,\n addEncoderSizePrefix,\n combineCodec,\n fixDecoderSize,\n fixEncoderSize,\n getBytesDecoder,\n getBytesEncoder,\n getOptionDecoder,\n getOptionEncoder,\n getStructDecoder,\n getStructEncoder,\n getU32Decoder,\n getU32Encoder,\n getUtf8Decoder,\n getUtf8Encoder,\n transformEncoder,\n type AccountMeta,\n type AccountSignerMeta,\n type Address,\n type Codec,\n type Decoder,\n type Encoder,\n type Instruction,\n type InstructionWithAccounts,\n type InstructionWithData,\n type Option,\n type OptionOrNullable,\n type ReadonlyAccount,\n type ReadonlyUint8Array,\n type TransactionSigner,\n type WritableAccount,\n type WritableSignerAccount,\n} from '@solana/kit';\nimport {\n GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_INSTRUCTION_DATA,\n GHOSTSPEAK_MARKETPLACE_ERROR__MISSING_REQUIRED_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INSTRUCTION_PARSING_FAILED,\n isGhostspeakMarketplaceError,\n} from '../errors';\nimport { GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS } from '../programs';\nimport { getAccountMetaFactory, type ResolvedAccount } from '../shared';\nimport {\n getVoteChoiceDecoder,\n getVoteChoiceEncoder,\n type VoteChoice,\n type VoteChoiceArgs,\n} from '../types';\n\nexport const CAST_VOTE_DISCRIMINATOR = new Uint8Array([\n 20, 212, 15, 189, 69, 180, 69, 151,\n]);\n\nexport function getCastVoteDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 8).encode(CAST_VOTE_DISCRIMINATOR);\n}\n\nexport type CastVoteInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountProposal extends string | AccountMeta<string> = string,\n TAccountVoter extends string | AccountMeta<string> = string,\n TAccountVoterTokenAccount extends string | AccountMeta<string> = string,\n TAccountDelegateTokenAccount extends string | AccountMeta<string> = string,\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountProposal extends string\n ? WritableAccount<TAccountProposal>\n : TAccountProposal,\n TAccountVoter extends string\n ? WritableSignerAccount<TAccountVoter> &\n AccountSignerMeta<TAccountVoter>\n : TAccountVoter,\n TAccountVoterTokenAccount extends string\n ? ReadonlyAccount<TAccountVoterTokenAccount>\n : TAccountVoterTokenAccount,\n TAccountDelegateTokenAccount extends string\n ? ReadonlyAccount<TAccountDelegateTokenAccount>\n : TAccountDelegateTokenAccount,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type CastVoteInstructionData = {\n discriminator: ReadonlyUint8Array;\n voteChoice: VoteChoice;\n reasoning: Option<string>;\n};\n\nexport type CastVoteInstructionDataArgs = {\n voteChoice: VoteChoiceArgs;\n reasoning: OptionOrNullable<string>;\n};\n\nexport function getCastVoteInstructionDataEncoder(): Encoder<CastVoteInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n ['discriminator', fixEncoderSize(getBytesEncoder(), 8)],\n ['voteChoice', getVoteChoiceEncoder()],\n [\n 'reasoning',\n getOptionEncoder(\n addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder())\n ),\n ],\n ]),\n (value) => ({ ...value, discriminator: CAST_VOTE_DISCRIMINATOR })\n );\n}\n\nexport function getCastVoteInstructionDataDecoder(): Decoder<CastVoteInstructionData> {\n return getStructDecoder([\n ['discriminator', fixDecoderSize(getBytesDecoder(), 8)],\n ['voteChoice', getVoteChoiceDecoder()],\n [\n 'reasoning',\n getOptionDecoder(addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())),\n ],\n ]);\n}\n\nexport function getCastVoteInstructionDataCodec(): Codec<\n CastVoteInstructionDataArgs,\n CastVoteInstructionData\n> {\n return combineCodec(\n getCastVoteInstructionDataEncoder(),\n getCastVoteInstructionDataDecoder()\n );\n}\n\nexport type CastVoteInput<\n TAccountProposal extends string = string,\n TAccountVoter extends string = string,\n TAccountVoterTokenAccount extends string = string,\n TAccountDelegateTokenAccount extends string = string,\n> = {\n proposal: Address<TAccountProposal>;\n voter: TransactionSigner<TAccountVoter>;\n /** Voter's token account for voting power calculation */\n voterTokenAccount: Address<TAccountVoterTokenAccount>;\n /** Optional: Delegate's token account if voting as a delegate */\n delegateTokenAccount?: Address<TAccountDelegateTokenAccount>;\n voteChoice: CastVoteInstructionDataArgs['voteChoice'];\n reasoning: CastVoteInstructionDataArgs['reasoning'];\n};\n\nexport function getCastVoteInstruction<\n TAccountProposal extends string,\n TAccountVoter extends string,\n TAccountVoterTokenAccount extends string,\n TAccountDelegateTokenAccount extends string,\n TProgramAddress extends\n Address = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: CastVoteInput<\n TAccountProposal,\n TAccountVoter,\n TAccountVoterTokenAccount,\n TAccountDelegateTokenAccount\n >,\n config?: { programAddress?: TProgramAddress }\n): CastVoteInstruction<\n TProgramAddress,\n TAccountProposal,\n TAccountVoter,\n TAccountVoterTokenAccount,\n TAccountDelegateTokenAccount\n> {\n // Program address.\n const programAddress =\n config?.programAddress ?? GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n proposal: { value: input.proposal ?? null, isWritable: true },\n voter: { value: input.voter ?? null, isWritable: true },\n voterTokenAccount: {\n value: input.voterTokenAccount ?? null,\n isWritable: false,\n },\n delegateTokenAccount: {\n value: input.delegateTokenAccount ?? null,\n isWritable: false,\n },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.proposal),\n getAccountMeta(accounts.voter),\n getAccountMeta(accounts.voterTokenAccount),\n getAccountMeta(accounts.delegateTokenAccount),\n ],\n programAddress,\n data: getCastVoteInstructionDataEncoder().encode(\n args as CastVoteInstructionDataArgs\n ),\n } as CastVoteInstruction<\n TProgramAddress,\n TAccountProposal,\n TAccountVoter,\n TAccountVoterTokenAccount,\n TAccountDelegateTokenAccount\n >;\n\n return instruction;\n}\n\nexport type ParsedCastVoteInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n proposal: TAccountMetas[0];\n voter: TAccountMetas[1];\n /** Voter's token account for voting power calculation */\n voterTokenAccount: TAccountMetas[2];\n /** Optional: Delegate's token account if voting as a delegate */\n delegateTokenAccount?: TAccountMetas[3] | undefined;\n };\n data: CastVoteInstructionData;\n};\n\nexport function parseCastVoteInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>\n): ParsedCastVoteInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 4) {\n throw new Error('[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts');\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = instruction.accounts![accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n const getNextOptionalAccount = () => {\n const accountMeta = getNextAccount();\n return accountMeta.address === GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS\n ? undefined\n : accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n proposal: getNextAccount(),\n voter: getNextAccount(),\n voterTokenAccount: getNextAccount(),\n delegateTokenAccount: getNextOptionalAccount(),\n },\n data: getCastVoteInstructionDataDecoder().decode(instruction.data),\n };\n}\n","/**\n * This code was AUTOGENERATED using the codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n addDecoderSizePrefix,\n addEncoderSizePrefix,\n combineCodec,\n fixDecoderSize,\n fixEncoderSize,\n getBytesDecoder,\n getBytesEncoder,\n getOptionDecoder,\n getOptionEncoder,\n getProgramDerivedAddress,\n getStructDecoder,\n getStructEncoder,\n getU32Decoder,\n getU32Encoder,\n getUtf8Decoder,\n getUtf8Encoder,\n transformEncoder,\n type AccountMeta,\n type AccountSignerMeta,\n type Address,\n type Codec,\n type Decoder,\n type Encoder,\n type Instruction,\n type InstructionWithAccounts,\n type InstructionWithData,\n type Option,\n type OptionOrNullable,\n type ReadonlyAccount,\n type ReadonlySignerAccount,\n type ReadonlyUint8Array,\n type TransactionSigner,\n type WritableAccount,\n} from '@solana/kit';\nimport {\n GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_INSTRUCTION_DATA,\n GHOSTSPEAK_MARKETPLACE_ERROR__MISSING_REQUIRED_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INSTRUCTION_PARSING_FAILED,\n isGhostspeakMarketplaceError,\n} from '../errors';\nimport { GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS } from '../programs';\nimport { getAccountMetaFactory, type ResolvedAccount } from '../shared';\n\nexport const COMPLETE_ESCROW_DISCRIMINATOR = new Uint8Array([\n 158, 211, 102, 36, 244, 24, 103, 163,\n]);\n\nexport function getCompleteEscrowDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 8).encode(\n COMPLETE_ESCROW_DISCRIMINATOR\n );\n}\n\nexport type CompleteEscrowInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountEscrow extends string | AccountMeta<string> = string,\n TAccountReentrancyGuard extends string | AccountMeta<string> = string,\n TAccountAgent extends string | AccountMeta<string> = string,\n TAccountEscrowTokenAccount extends string | AccountMeta<string> = string,\n TAccountAgentTokenAccount extends string | AccountMeta<string> = string,\n TAccountAuthority extends string | AccountMeta<string> = string,\n TAccountTokenProgram extends\n | string\n | AccountMeta<string> = 'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb',\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountEscrow extends string\n ? WritableAccount<TAccountEscrow>\n : TAccountEscrow,\n TAccountReentrancyGuard extends string\n ? WritableAccount<TAccountReentrancyGuard>\n : TAccountReentrancyGuard,\n TAccountAgent extends string\n ? WritableAccount<TAccountAgent>\n : TAccountAgent,\n TAccountEscrowTokenAccount extends string\n ? WritableAccount<TAccountEscrowTokenAccount>\n : TAccountEscrowTokenAccount,\n TAccountAgentTokenAccount extends string\n ? WritableAccount<TAccountAgentTokenAccount>\n : TAccountAgentTokenAccount,\n TAccountAuthority extends string\n ? ReadonlySignerAccount<TAccountAuthority> &\n AccountSignerMeta<TAccountAuthority>\n : TAccountAuthority,\n TAccountTokenProgram extends string\n ? ReadonlyAccount<TAccountTokenProgram>\n : TAccountTokenProgram,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type CompleteEscrowInstructionData = {\n discriminator: ReadonlyUint8Array;\n resolutionNotes: Option<string>;\n};\n\nexport type CompleteEscrowInstructionDataArgs = {\n resolutionNotes: OptionOrNullable<string>;\n};\n\nexport function getCompleteEscrowInstructionDataEncoder(): Encoder<CompleteEscrowInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n ['discriminator', fixEncoderSize(getBytesEncoder(), 8)],\n [\n 'resolutionNotes',\n getOptionEncoder(\n addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder())\n ),\n ],\n ]),\n (value) => ({ ...value, discriminator: COMPLETE_ESCROW_DISCRIMINATOR })\n );\n}\n\nexport function getCompleteEscrowInstructionDataDecoder(): Decoder<CompleteEscrowInstructionData> {\n return getStructDecoder([\n ['discriminator', fixDecoderSize(getBytesDecoder(), 8)],\n [\n 'resolutionNotes',\n getOptionDecoder(addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())),\n ],\n ]);\n}\n\nexport function getCompleteEscrowInstructionDataCodec(): Codec<\n CompleteEscrowInstructionDataArgs,\n CompleteEscrowInstructionData\n> {\n return combineCodec(\n getCompleteEscrowInstructionDataEncoder(),\n getCompleteEscrowInstructionDataDecoder()\n );\n}\n\nexport type CompleteEscrowAsyncInput<\n TAccountEscrow extends string = string,\n TAccountReentrancyGuard extends string = string,\n TAccountAgent extends string = string,\n TAccountEscrowTokenAccount extends string = string,\n TAccountAgentTokenAccount extends string = string,\n TAccountAuthority extends string = string,\n TAccountTokenProgram extends string = string,\n> = {\n escrow: Address<TAccountEscrow>;\n reentrancyGuard?: Address<TAccountReentrancyGuard>;\n agent: Address<TAccountAgent>;\n escrowTokenAccount: Address<TAccountEscrowTokenAccount>;\n agentTokenAccount: Address<TAccountAgentTokenAccount>;\n authority: TransactionSigner<TAccountAuthority>;\n tokenProgram?: Address<TAccountTokenProgram>;\n resolutionNotes: CompleteEscrowInstructionDataArgs['resolutionNotes'];\n};\n\nexport async function getCompleteEscrowInstructionAsync<\n TAccountEscrow extends string,\n TAccountReentrancyGuard extends string,\n TAccountAgent extends string,\n TAccountEscrowTokenAccount extends string,\n TAccountAgentTokenAccount extends string,\n TAccountAuthority extends string,\n TAccountTokenProgram extends string,\n TProgramAddress extends\n Address = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: CompleteEscrowAsyncInput<\n TAccountEscrow,\n TAccountReentrancyGuard,\n TAccountAgent,\n TAccountEscrowTokenAccount,\n TAccountAgentTokenAccount,\n TAccountAuthority,\n TAccountTokenProgram\n >,\n config?: { programAddress?: TProgramAddress }\n): Promise<\n CompleteEscrowInstruction<\n TProgramAddress,\n TAccountEscrow,\n TAccountReentrancyGuard,\n TAccountAgent,\n TAccountEscrowTokenAccount,\n TAccountAgentTokenAccount,\n TAccountAuthority,\n TAccountTokenProgram\n >\n> {\n // Program address.\n const programAddress =\n config?.programAddress ?? GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n escrow: { value: input.escrow ?? null, isWritable: true },\n reentrancyGuard: { value: input.reentrancyGuard ?? null, isWritable: true },\n agent: { value: input.agent ?? null, isWritable: true },\n escrowTokenAccount: {\n value: input.escrowTokenAccount ?? null,\n isWritable: true,\n },\n agentTokenAccount: {\n value: input.agentTokenAccount ?? null,\n isWritable: true,\n },\n authority: { value: input.authority ?? null, isWritable: false },\n tokenProgram: { value: input.tokenProgram ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolve default values.\n if (!accounts.reentrancyGuard.value) {\n accounts.reentrancyGuard.value = await getProgramDerivedAddress({\n programAddress,\n seeds: [\n getBytesEncoder().encode(\n new Uint8Array([\n 114, 101, 101, 110, 116, 114, 97, 110, 99, 121, 95, 103, 117, 97,\n 114, 100,\n ])\n ),\n ],\n });\n }\n if (!accounts.tokenProgram.value) {\n accounts.tokenProgram.value =\n 'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb' as Address<'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb'>;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.escrow),\n getAccountMeta(accounts.reentrancyGuard),\n getAccountMeta(accounts.agent),\n getAccountMeta(accounts.escrowTokenAccount),\n getAccountMeta(accounts.agentTokenAccount),\n getAccountMeta(accounts.authority),\n getAccountMeta(accounts.tokenProgram),\n ],\n programAddress,\n data: getCompleteEscrowInstructionDataEncoder().encode(\n args as CompleteEscrowInstructionDataArgs\n ),\n } as CompleteEscrowInstruction<\n TProgramAddress,\n TAccountEscrow,\n TAccountReentrancyGuard,\n TAccountAgent,\n TAccountEscrowTokenAccount,\n TAccountAgentTokenAccount,\n TAccountAuthority,\n TAccountTokenProgram\n >;\n\n return instruction;\n}\n\nexport type CompleteEscrowInput<\n TAccountEscrow extends string = string,\n TAccountReentrancyGuard extends string = string,\n TAccountAgent extends string = string,\n TAccountEscrowTokenAccount extends string = string,\n TAccountAgentTokenAccount extends string = string,\n TAccountAuthority extends string = string,\n TAccountTokenProgram extends string = string,\n> = {\n escrow: Address<TAccountEscrow>;\n reentrancyGuard: Address<TAccountReentrancyGuard>;\n agent: Address<TAccountAgent>;\n escrowTokenAccount: Address<TAccountEscrowTokenAccount>;\n agentTokenAccount: Address<TAccountAgentTokenAccount>;\n authority: TransactionSigner<TAccountAuthority>;\n tokenProgram?: Address<TAccountTokenProgram>;\n resolutionNotes: CompleteEscrowInstructionDataArgs['resolutionNotes'];\n};\n\nexport function getCompleteEscrowInstruction<\n TAccountEscrow extends string,\n TAccountReentrancyGuard extends string,\n TAccountAgent extends string,\n TAccountEscrowTokenAccount extends string,\n TAccountAgentTokenAccount extends string,\n TAccountAuthority extends string,\n TAccountTokenProgram extends string,\n TProgramAddress extends\n Address = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: CompleteEscrowInput<\n TAccountEscrow,\n TAccountReentrancyGuard,\n TAccountAgent,\n TAccountEscrowTokenAccount,\n TAccountAgentTokenAccount,\n TAccountAuthority,\n TAccountTokenProgram\n >,\n config?: { programAddress?: TProgramAddress }\n): CompleteEscrowInstruction<\n TProgramAddress,\n TAccountEscrow,\n TAccountReentrancyGuard,\n TAccountAgent,\n TAccountEscrowTokenAccount,\n TAccountAgentTokenAccount,\n TAccountAuthority,\n TAccountTokenProgram\n> {\n // Program address.\n const programAddress =\n config?.programAddress ?? GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n escrow: { value: input.escrow ?? null, isWritable: true },\n reentrancyGuard: { value: input.reentrancyGuard ?? null, isWritable: true },\n agent: { value: input.agent ?? null, isWritable: true },\n escrowTokenAccount: {\n value: input.escrowTokenAccount ?? null,\n isWritable: true,\n },\n agentTokenAccount: {\n value: input.agentTokenAccount ?? null,\n isWritable: true,\n },\n authority: { value: input.authority ?? null, isWritable: false },\n tokenProgram: { value: input.tokenProgram ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolve default values.\n if (!accounts.tokenProgram.value) {\n accounts.tokenProgram.value =\n 'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb' as Address<'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb'>;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.escrow),\n getAccountMeta(accounts.reentrancyGuard),\n getAccountMeta(accounts.agent),\n getAccountMeta(accounts.escrowTokenAccount),\n getAccountMeta(accounts.agentTokenAccount),\n getAccountMeta(accounts.authority),\n getAccountMeta(accounts.tokenProgram),\n ],\n programAddress,\n data: getCompleteEscrowInstructionDataEncoder().encode(\n args as CompleteEscrowInstructionDataArgs\n ),\n } as CompleteEscrowInstruction<\n TProgramAddress,\n TAccountEscrow,\n TAccountReentrancyGuard,\n TAccountAgent,\n TAccountEscrowTokenAccount,\n TAccountAgentTokenAccount,\n TAccountAuthority,\n TAccountTokenProgram\n >;\n\n return instruction;\n}\n\nexport type ParsedCompleteEscrowInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n escrow: TAccountMetas[0];\n reentrancyGuard: TAccountMetas[1];\n agent: TAccountMetas[2];\n escrowTokenAccount: TAccountMetas[3];\n agentTokenAccount: TAccountMetas[4];\n authority: TAccountMetas[5];\n tokenProgram: TAccountMetas[6];\n };\n data: CompleteEscrowInstructionData;\n};\n\nexport function parseCompleteEscrowInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>\n): ParsedCompleteEscrowInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 7) {\n throw new Error('[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts');\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = instruction.accounts![accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n escrow: getNextAccount(),\n reentrancyGuard: getNextAccount(),\n agent: getNextAccount(),\n escrowTokenAccount: getNextAccount(),\n agentTokenAccount: getNextAccount(),\n authority: getNextAccount(),\n tokenProgram: getNextAccount(),\n },\n data: getCompleteEscrowInstructionDataDecoder().decode(instruction.data),\n };\n}\n","/**\n * This code was AUTOGENERATED using the codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n addDecoderSizePrefix,\n addEncoderSizePrefix,\n combineCodec,\n fixDecoderSize,\n fixEncoderSize,\n getAddressDecoder,\n getAddressEncoder,\n getBytesDecoder,\n getBytesEncoder,\n getI64Decoder,\n getI64Encoder,\n getProgramDerivedAddress,\n getStructDecoder,\n getStructEncoder,\n getU32Decoder,\n getU32Encoder,\n getU64Decoder,\n getU64Encoder,\n getUtf8Decoder,\n getUtf8Encoder,\n transformEncoder,\n type AccountMeta,\n type AccountSignerMeta,\n type Address,\n type Codec,\n type Decoder,\n type Encoder,\n type Instruction,\n type InstructionWithAccounts,\n type InstructionWithData,\n type ReadonlyAccount,\n type ReadonlyUint8Array,\n type TransactionSigner,\n type WritableAccount,\n type WritableSignerAccount,\n} from '@solana/kit';\nimport {\n GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_INSTRUCTION_DATA,\n GHOSTSPEAK_MARKETPLACE_ERROR__MISSING_REQUIRED_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INSTRUCTION_PARSING_FAILED,\n isGhostspeakMarketplaceError,\n} from '../errors';\nimport { GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS } from '../programs';\nimport {\n expectAddress,\n getAccountMetaFactory,\n type ResolvedAccount,\n} from '../shared';\n\nexport const CREATE_A2A_SESSION_DISCRIMINATOR = new Uint8Array([\n 22, 57, 77, 239, 115, 215, 61, 131,\n]);\n\nexport function getCreateA2aSessionDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 8).encode(\n CREATE_A2A_SESSION_DISCRIMINATOR\n );\n}\n\nexport type CreateA2aSessionInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountSession extends string | AccountMeta<string> = string,\n TAccountCreator extends string | AccountMeta<string> = string,\n TAccountSystemProgram extends\n | string\n | AccountMeta<string> = '11111111111111111111111111111111',\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountSession extends string\n ? WritableAccount<TAccountSession>\n : TAccountSession,\n TAccountCreator extends string\n ? WritableSignerAccount<TAccountCreator> &\n AccountSignerMeta<TAccountCreator>\n : TAccountCreator,\n TAccountSystemProgram extends string\n ? ReadonlyAccount<TAccountSystemProgram>\n : TAccountSystemProgram,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type CreateA2aSessionInstructionData = {\n discriminator: ReadonlyUint8Array;\n sessionId: bigint;\n initiator: Address;\n responder: Address;\n sessionType: string;\n metadata: string;\n expiresAt: bigint;\n};\n\nexport type CreateA2aSessionInstructionDataArgs = {\n sessionId: number | bigint;\n initiator: Address;\n responder: Address;\n sessionType: string;\n metadata: string;\n expiresAt: number | bigint;\n};\n\nexport function getCreateA2aSessionInstructionDataEncoder(): Encoder<CreateA2aSessionInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n ['discriminator', fixEncoderSize(getBytesEncoder(), 8)],\n ['sessionId', getU64Encoder()],\n ['initiator', getAddressEncoder()],\n ['responder', getAddressEncoder()],\n ['sessionType', addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder())],\n ['metadata', addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder())],\n ['expiresAt', getI64Encoder()],\n ]),\n (value) => ({ ...value, discriminator: CREATE_A2A_SESSION_DISCRIMINATOR })\n );\n}\n\nexport function getCreateA2aSessionInstructionDataDecoder(): Decoder<CreateA2aSessionInstructionData> {\n return getStructDecoder([\n ['discriminator', fixDecoderSize(getBytesDecoder(), 8)],\n ['sessionId', getU64Decoder()],\n ['initiator', getAddressDecoder()],\n ['responder', getAddressDecoder()],\n ['sessionType', addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())],\n ['metadata', addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())],\n ['expiresAt', getI64Decoder()],\n ]);\n}\n\nexport function getCreateA2aSessionInstructionDataCodec(): Codec<\n CreateA2aSessionInstructionDataArgs,\n CreateA2aSessionInstructionData\n> {\n return combineCodec(\n getCreateA2aSessionInstructionDataEncoder(),\n getCreateA2aSessionInstructionDataDecoder()\n );\n}\n\nexport type CreateA2aSessionAsyncInput<\n TAccountSession extends string = string,\n TAccountCreator extends string = string,\n TAccountSystemProgram extends string = string,\n> = {\n session?: Address<TAccountSession>;\n creator: TransactionSigner<TAccountCreator>;\n systemProgram?: Address<TAccountSystemProgram>;\n sessionId: CreateA2aSessionInstructionDataArgs['sessionId'];\n initiator: CreateA2aSessionInstructionDataArgs['initiator'];\n responder: CreateA2aSessionInstructionDataArgs['responder'];\n sessionType: CreateA2aSessionInstructionDataArgs['sessionType'];\n metadata: CreateA2aSessionInstructionDataArgs['metadata'];\n expiresAt: CreateA2aSessionInstructionDataArgs['expiresAt'];\n};\n\nexport async function getCreateA2aSessionInstructionAsync<\n TAccountSession extends string,\n TAccountCreator extends string,\n TAccountSystemProgram extends string,\n TProgramAddress extends\n Address = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: CreateA2aSessionAsyncInput<\n TAccountSession,\n TAccountCreator,\n TAccountSystemProgram\n >,\n config?: { programAddress?: TProgramAddress }\n): Promise<\n CreateA2aSessionInstruction<\n TProgramAddress,\n TAccountSession,\n TAccountCreator,\n TAccountSystemProgram\n >\n> {\n // Program address.\n const programAddress =\n config?.programAddress ?? GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n session: { value: input.session ?? null, isWritable: true },\n creator: { value: input.creator ?? null, isWritable: true },\n systemProgram: { value: input.systemProgram ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolve default values.\n if (!accounts.session.value) {\n accounts.session.value = await getProgramDerivedAddress({\n programAddress,\n seeds: [\n getBytesEncoder().encode(\n new Uint8Array([97, 50, 97, 95, 115, 101, 115, 115, 105, 111, 110])\n ),\n getAddressEncoder().encode(expectAddress(accounts.creator.value)),\n ],\n });\n }\n if (!accounts.systemProgram.value) {\n accounts.systemProgram.value =\n '11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.session),\n getAccountMeta(accounts.creator),\n getAccountMeta(accounts.systemProgram),\n ],\n programAddress,\n data: getCreateA2aSessionInstructionDataEncoder().encode(\n args as CreateA2aSessionInstructionDataArgs\n ),\n } as CreateA2aSessionInstruction<\n TProgramAddress,\n TAccountSession,\n TAccountCreator,\n TAccountSystemProgram\n >;\n\n return instruction;\n}\n\nexport type CreateA2aSessionInput<\n TAccountSession extends string = string,\n TAccountCreator extends string = string,\n TAccountSystemProgram extends string = string,\n> = {\n session: Address<TAccountSession>;\n creator: TransactionSigner<TAccountCreator>;\n systemProgram?: Address<TAccountSystemProgram>;\n sessionId: CreateA2aSessionInstructionDataArgs['sessionId'];\n initiator: CreateA2aSessionInstructionDataArgs['initiator'];\n responder: CreateA2aSessionInstructionDataArgs['responder'];\n sessionType: CreateA2aSessionInstructionDataArgs['sessionType'];\n metadata: CreateA2aSessionInstructionDataArgs['metadata'];\n expiresAt: CreateA2aSessionInstructionDataArgs['expiresAt'];\n};\n\nexport function getCreateA2aSessionInstruction<\n TAccountSession extends string,\n TAccountCreator extends string,\n TAccountSystemProgram extends string,\n TProgramAddress extends\n Address = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: CreateA2aSessionInput<\n TAccountSession,\n TAccountCreator,\n TAccountSystemProgram\n >,\n config?: { programAddress?: TProgramAddress }\n): CreateA2aSessionInstruction<\n TProgramAddress,\n TAccountSession,\n TAccountCreator,\n TAccountSystemProgram\n> {\n // Program address.\n const programAddress =\n config?.programAddress ?? GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n session: { value: input.session ?? null, isWritable: true },\n creator: { value: input.creator ?? null, isWritable: true },\n systemProgram: { value: input.systemProgram ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolve default values.\n if (!accounts.systemProgram.value) {\n accounts.systemProgram.value =\n '11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.session),\n getAccountMeta(accounts.creator),\n getAccountMeta(accounts.systemProgram),\n ],\n programAddress,\n data: getCreateA2aSessionInstructionDataEncoder().encode(\n args as CreateA2aSessionInstructionDataArgs\n ),\n } as CreateA2aSessionInstruction<\n TProgramAddress,\n TAccountSession,\n TAccountCreator,\n TAccountSystemProgram\n >;\n\n return instruction;\n}\n\nexport type ParsedCreateA2aSessionInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n session: TAccountMetas[0];\n creator: TAccountMetas[1];\n systemProgram: TAccountMetas[2];\n };\n data: CreateA2aSessionInstructionData;\n};\n\nexport function parseCreateA2aSessionInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>\n): ParsedCreateA2aSessionInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 3) {\n throw new Error('[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts');\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = instruction.accounts![accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n session: getNextAccount(),\n creator: getNextAccount(),\n systemProgram: getNextAccount(),\n },\n data: getCreateA2aSessionInstructionDataDecoder().decode(instruction.data),\n };\n}\n","/**\n * This code was AUTOGENERATED using the codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n addDecoderSizePrefix,\n addEncoderSizePrefix,\n combineCodec,\n fixDecoderSize,\n fixEncoderSize,\n getAddressEncoder,\n getBytesDecoder,\n getBytesEncoder,\n getProgramDerivedAddress,\n getStructDecoder,\n getStructEncoder,\n getU32Decoder,\n getU32Encoder,\n getU64Decoder,\n getU64Encoder,\n getUtf8Decoder,\n getUtf8Encoder,\n transformEncoder,\n type AccountMeta,\n type AccountSignerMeta,\n type Address,\n type Codec,\n type Decoder,\n type Encoder,\n type Instruction,\n type InstructionWithAccounts,\n type InstructionWithData,\n type ReadonlyAccount,\n type ReadonlyUint8Array,\n type TransactionSigner,\n type WritableAccount,\n type WritableSignerAccount,\n} from '@solana/kit';\nimport {\n GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_INSTRUCTION_DATA,\n GHOSTSPEAK_MARKETPLACE_ERROR__MISSING_REQUIRED_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INSTRUCTION_PARSING_FAILED,\n isGhostspeakMarketplaceError,\n} from '../errors';\nimport { GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS } from '../programs';\nimport {\n expectAddress,\n expectSome,\n getAccountMetaFactory,\n type ResolvedAccount,\n} from '../shared';\n\nexport const CREATE_ANALYTICS_DASHBOARD_DISCRIMINATOR = new Uint8Array([\n 160, 237, 52, 23, 118, 243, 100, 75,\n]);\n\nexport function getCreateAnalyticsDashboardDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 8).encode(\n CREATE_ANALYTICS_DASHBOARD_DISCRIMINATOR\n );\n}\n\nexport type CreateAnalyticsDashboardInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountDashboard extends string | AccountMeta<string> = string,\n TAccountUserRegistry extends string | AccountMeta<string> = string,\n TAccountOwner extends string | AccountMeta<string> = string,\n TAccountSystemProgram extends\n | string\n | AccountMeta<string> = '11111111111111111111111111111111',\n TAccountClock extends\n | string\n | AccountMeta<string> = 'SysvarC1ock11111111111111111111111111111111',\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountDashboard extends string\n ? WritableAccount<TAccountDashboard>\n : TAccountDashboard,\n TAccountUserRegistry extends string\n ? WritableAccount<TAccountUserRegistry>\n : TAccountUserRegistry,\n TAccountOwner extends string\n ? WritableSignerAccount<TAccountOwner> &\n AccountSignerMeta<TAccountOwner>\n : TAccountOwner,\n TAccountSystemProgram extends string\n ? ReadonlyAccount<TAccountSystemProgram>\n : TAccountSystemProgram,\n TAccountClock extends string\n ? ReadonlyAccount<TAccountClock>\n : TAccountClock,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type CreateAnalyticsDashboardInstructionData = {\n discriminator: ReadonlyUint8Array;\n dashboardId: bigint;\n metrics: string;\n};\n\nexport type CreateAnalyticsDashboardInstructionDataArgs = {\n dashboardId: number | bigint;\n metrics: string;\n};\n\nexport function getCreateAnalyticsDashboardInstructionDataEncoder(): Encoder<CreateAnalyticsDashboardInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n ['discriminator', fixEncoderSize(getBytesEncoder(), 8)],\n ['dashboardId', getU64Encoder()],\n ['metrics', addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder())],\n ]),\n (value) => ({\n ...value,\n discriminator: CREATE_ANALYTICS_DASHBOARD_DISCRIMINATOR,\n })\n );\n}\n\nexport function getCreateAnalyticsDashboardInstructionDataDecoder(): Decoder<CreateAnalyticsDashboardInstructionData> {\n return getStructDecoder([\n ['discriminator', fixDecoderSize(getBytesDecoder(), 8)],\n ['dashboardId', getU64Decoder()],\n ['metrics', addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())],\n ]);\n}\n\nexport function getCreateAnalyticsDashboardInstructionDataCodec(): Codec<\n CreateAnalyticsDashboardInstructionDataArgs,\n CreateAnalyticsDashboardInstructionData\n> {\n return combineCodec(\n getCreateAnalyticsDashboardInstructionDataEncoder(),\n getCreateAnalyticsDashboardInstructionDataDecoder()\n );\n}\n\nexport type CreateAnalyticsDashboardAsyncInput<\n TAccountDashboard extends string = string,\n TAccountUserRegistry extends string = string,\n TAccountOwner extends string = string,\n TAccountSystemProgram extends string = string,\n TAccountClock extends string = string,\n> = {\n /** Dashboard account with collision prevention */\n dashboard?: Address<TAccountDashboard>;\n /** User registry for rate limiting and spam prevention */\n userRegistry?: Address<TAccountUserRegistry>;\n /** Enhanced authority verification */\n owner: TransactionSigner<TAccountOwner>;\n /** System program for account creation */\n systemProgram?: Address<TAccountSystemProgram>;\n /** Clock sysvar for timestamp validation */\n clock?: Address<TAccountClock>;\n dashboardId: CreateAnalyticsDashboardInstructionDataArgs['dashboardId'];\n metrics: CreateAnalyticsDashboardInstructionDataArgs['metrics'];\n};\n\nexport async function getCreateAnalyticsDashboardInstructionAsync<\n TAccountDashboard extends string,\n TAccountUserRegistry extends string,\n TAccountOwner extends string,\n TAccountSystemProgram extends string,\n TAccountClock extends string,\n TProgramAddress extends\n Address = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: CreateAnalyticsDashboardAsyncInput<\n TAccountDashboard,\n TAccountUserRegistry,\n TAccountOwner,\n TAccountSystemProgram,\n TAccountClock\n >,\n config?: { programAddress?: TProgramAddress }\n): Promise<\n CreateAnalyticsDashboardInstruction<\n TProgramAddress,\n TAccountDashboard,\n TAccountUserRegistry,\n TAccountOwner,\n TAccountSystemProgram,\n TAccountClock\n >\n> {\n // Program address.\n const programAddress =\n config?.programAddress ?? GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n dashboard: { value: input.dashboard ?? null, isWritable: true },\n userRegistry: { value: input.userRegistry ?? null, isWritable: true },\n owner: { value: input.owner ?? null, isWritable: true },\n systemProgram: { value: input.systemProgram ?? null, isWritable: false },\n clock: { value: input.clock ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolve default values.\n if (!accounts.dashboard.value) {\n accounts.dashboard.value = await getProgramDerivedAddress({\n programAddress,\n seeds: [\n getBytesEncoder().encode(\n new Uint8Array([97, 110, 97, 108, 121, 116, 105, 99, 115])\n ),\n getAddressEncoder().encode(expectAddress(accounts.owner.value)),\n getU64Encoder().encode(expectSome(args.dashboardId)),\n ],\n });\n }\n if (!accounts.userRegistry.value) {\n accounts.userRegistry.value = await getProgramDerivedAddress({\n programAddress,\n seeds: [\n getBytesEncoder().encode(\n new Uint8Array([\n 117, 115, 101, 114, 95, 114, 101, 103, 105, 115, 116, 114, 121,\n ])\n ),\n getAddressEncoder().encode(expectAddress(accounts.owner.value)),\n ],\n });\n }\n if (!accounts.systemProgram.value) {\n accounts.systemProgram.value =\n '11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>;\n }\n if (!accounts.clock.value) {\n accounts.clock.value =\n 'SysvarC1ock11111111111111111111111111111111' as Address<'SysvarC1ock11111111111111111111111111111111'>;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.dashboard),\n getAccountMeta(accounts.userRegistry),\n getAccountMeta(accounts.owner),\n getAccountMeta(accounts.systemProgram),\n getAccountMeta(accounts.clock),\n ],\n programAddress,\n data: getCreateAnalyticsDashboardInstructionDataEncoder().encode(\n args as CreateAnalyticsDashboardInstructionDataArgs\n ),\n } as CreateAnalyticsDashboardInstruction<\n TProgramAddress,\n TAccountDashboard,\n TAccountUserRegistry,\n TAccountOwner,\n TAccountSystemProgram,\n TAccountClock\n >;\n\n return instruction;\n}\n\nexport type CreateAnalyticsDashboardInput<\n TAccountDashboard extends string = string,\n TAccountUserRegistry extends string = string,\n TAccountOwner extends string = string,\n TAccountSystemProgram extends string = string,\n TAccountClock extends string = string,\n> = {\n /** Dashboard account with collision prevention */\n dashboard: Address<TAccountDashboard>;\n /** User registry for rate limiting and spam prevention */\n userRegistry: Address<TAccountUserRegistry>;\n /** Enhanced authority verification */\n owner: TransactionSigner<TAccountOwner>;\n /** System program for account creation */\n systemProgram?: Address<TAccountSystemProgram>;\n /** Clock sysvar for timestamp validation */\n clock?: Address<TAccountClock>;\n dashboardId: CreateAnalyticsDashboardInstructionDataArgs['dashboardId'];\n metrics: CreateAnalyticsDashboardInstructionDataArgs['metrics'];\n};\n\nexport function getCreateAnalyticsDashboardInstruction<\n TAccountDashboard extends string,\n TAccountUserRegistry extends string,\n TAccountOwner extends string,\n TAccountSystemProgram extends string,\n TAccountClock extends string,\n TProgramAddress extends\n Address = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: CreateAnalyticsDashboardInput<\n TAccountDashboard,\n TAccountUserRegistry,\n TAccountOwner,\n TAccountSystemProgram,\n TAccountClock\n >,\n config?: { programAddress?: TProgramAddress }\n): CreateAnalyticsDashboardInstruction<\n TProgramAddress,\n TAccountDashboard,\n TAccountUserRegistry,\n TAccountOwner,\n TAccountSystemProgram,\n TAccountClock\n> {\n // Program address.\n const programAddress =\n config?.programAddress ?? GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n dashboard: { value: input.dashboard ?? null, isWritable: true },\n userRegistry: { value: input.userRegistry ?? null, isWritable: true },\n owner: { value: input.owner ?? null, isWritable: true },\n systemProgram: { value: input.systemProgram ?? null, isWritable: false },\n clock: { value: input.clock ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolve default values.\n if (!accounts.systemProgram.value) {\n accounts.systemProgram.value =\n '11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>;\n }\n if (!accounts.clock.value) {\n accounts.clock.value =\n 'SysvarC1ock11111111111111111111111111111111' as Address<'SysvarC1ock11111111111111111111111111111111'>;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.dashboard),\n getAccountMeta(accounts.userRegistry),\n getAccountMeta(accounts.owner),\n getAccountMeta(accounts.systemProgram),\n getAccountMeta(accounts.clock),\n ],\n programAddress,\n data: getCreateAnalyticsDashboardInstructionDataEncoder().encode(\n args as CreateAnalyticsDashboardInstructionDataArgs\n ),\n } as CreateAnalyticsDashboardInstruction<\n TProgramAddress,\n TAccountDashboard,\n TAccountUserRegistry,\n TAccountOwner,\n TAccountSystemProgram,\n TAccountClock\n >;\n\n return instruction;\n}\n\nexport type ParsedCreateAnalyticsDashboardInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n /** Dashboard account with collision prevention */\n dashboard: TAccountMetas[0];\n /** User registry for rate limiting and spam prevention */\n userRegistry: TAccountMetas[1];\n /** Enhanced authority verification */\n owner: TAccountMetas[2];\n /** System program for account creation */\n systemProgram: TAccountMetas[3];\n /** Clock sysvar for timestamp validation */\n clock: TAccountMetas[4];\n };\n data: CreateAnalyticsDashboardInstructionData;\n};\n\nexport function parseCreateAnalyticsDashboardInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>\n): ParsedCreateAnalyticsDashboardInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 5) {\n throw new Error('[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts');\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = instruction.accounts![accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n dashboard: getNextAccount(),\n userRegistry: getNextAccount(),\n owner: getNextAccount(),\n systemProgram: getNextAccount(),\n clock: getNextAccount(),\n },\n data: getCreateAnalyticsDashboardInstructionDataDecoder().decode(\n instruction.data\n ),\n };\n}\n","/**\n * This code was AUTOGENERATED using the codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n addDecoderSizePrefix,\n addEncoderSizePrefix,\n combineCodec,\n fixDecoderSize,\n fixEncoderSize,\n getAddressEncoder,\n getArrayDecoder,\n getArrayEncoder,\n getBytesDecoder,\n getBytesEncoder,\n getF64Decoder,\n getF64Encoder,\n getI64Decoder,\n getI64Encoder,\n getProgramDerivedAddress,\n getStructDecoder,\n getStructEncoder,\n getU32Decoder,\n getU32Encoder,\n getU64Decoder,\n getU64Encoder,\n getUtf8Decoder,\n getUtf8Encoder,\n transformEncoder,\n type AccountMeta,\n type AccountSignerMeta,\n type Address,\n type Codec,\n type Decoder,\n type Encoder,\n type Instruction,\n type InstructionWithAccounts,\n type InstructionWithData,\n type ReadonlyAccount,\n type ReadonlyUint8Array,\n type TransactionSigner,\n type WritableAccount,\n type WritableSignerAccount,\n} from '@solana/kit';\nimport {\n GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_INSTRUCTION_DATA,\n GHOSTSPEAK_MARKETPLACE_ERROR__MISSING_REQUIRED_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INSTRUCTION_PARSING_FAILED,\n isGhostspeakMarketplaceError,\n} from '../errors';\nimport { GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS } from '../programs';\nimport {\n expectAddress,\n getAccountMetaFactory,\n type ResolvedAccount,\n} from '../shared';\nimport {\n getDealTypeDecoder,\n getDealTypeEncoder,\n getVolumeTierDecoder,\n getVolumeTierEncoder,\n type DealType,\n type DealTypeArgs,\n type VolumeTier,\n type VolumeTierArgs,\n} from '../types';\n\nexport const CREATE_BULK_DEAL_DISCRIMINATOR = new Uint8Array([\n 133, 143, 169, 255, 188, 189, 104, 216,\n]);\n\nexport function getCreateBulkDealDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 8).encode(\n CREATE_BULK_DEAL_DISCRIMINATOR\n );\n}\n\nexport type CreateBulkDealInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountDeal extends string | AccountMeta<string> = string,\n TAccountAgent extends string | AccountMeta<string> = string,\n TAccountUserRegistry extends string | AccountMeta<string> = string,\n TAccountCustomer extends string | AccountMeta<string> = string,\n TAccountSystemProgram extends\n | string\n | AccountMeta<string> = '11111111111111111111111111111111',\n TAccountClock extends\n | string\n | AccountMeta<string> = 'SysvarC1ock11111111111111111111111111111111',\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountDeal extends string\n ? WritableAccount<TAccountDeal>\n : TAccountDeal,\n TAccountAgent extends string\n ? ReadonlyAccount<TAccountAgent>\n : TAccountAgent,\n TAccountUserRegistry extends string\n ? WritableAccount<TAccountUserRegistry>\n : TAccountUserRegistry,\n TAccountCustomer extends string\n ? WritableSignerAccount<TAccountCustomer> &\n AccountSignerMeta<TAccountCustomer>\n : TAccountCustomer,\n TAccountSystemProgram extends string\n ? ReadonlyAccount<TAccountSystemProgram>\n : TAccountSystemProgram,\n TAccountClock extends string\n ? ReadonlyAccount<TAccountClock>\n : TAccountClock,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type CreateBulkDealInstructionData = {\n discriminator: ReadonlyUint8Array;\n dealId: bigint;\n dealType: DealType;\n totalVolume: number;\n totalValue: bigint;\n discountPercentage: number;\n volumeTiers: Array<VolumeTier>;\n slaTerms: string;\n contractDuration: bigint;\n endDate: bigint;\n};\n\nexport type CreateBulkDealInstructionDataArgs = {\n dealId: number | bigint;\n dealType: DealTypeArgs;\n totalVolume: number;\n totalValue: number | bigint;\n discountPercentage: number;\n volumeTiers: Array<VolumeTierArgs>;\n slaTerms: string;\n contractDuration: number | bigint;\n endDate: number | bigint;\n};\n\nexport function getCreateBulkDealInstructionDataEncoder(): Encoder<CreateBulkDealInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n ['discriminator', fixEncoderSize(getBytesEncoder(), 8)],\n ['dealId', getU64Encoder()],\n ['dealType', getDealTypeEncoder()],\n ['totalVolume', getU32Encoder()],\n ['totalValue', getU64Encoder()],\n ['discountPercentage', getF64Encoder()],\n ['volumeTiers', getArrayEncoder(getVolumeTierEncoder())],\n ['slaTerms', addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder())],\n ['contractDuration', getI64Encoder()],\n ['endDate', getI64Encoder()],\n ]),\n (value) => ({ ...value, discriminator: CREATE_BULK_DEAL_DISCRIMINATOR })\n );\n}\n\nexport function getCreateBulkDealInstructionDataDecoder(): Decoder<CreateBulkDealInstructionData> {\n return getStructDecoder([\n ['discriminator', fixDecoderSize(getBytesDecoder(), 8)],\n ['dealId', getU64Decoder()],\n ['dealType', getDealTypeDecoder()],\n ['totalVolume', getU32Decoder()],\n ['totalValue', getU64Decoder()],\n ['discountPercentage', getF64Decoder()],\n ['volumeTiers', getArrayDecoder(getVolumeTierDecoder())],\n ['slaTerms', addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())],\n ['contractDuration', getI64Decoder()],\n ['endDate', getI64Decoder()],\n ]);\n}\n\nexport function getCreateBulkDealInstructionDataCodec(): Codec<\n CreateBulkDealInstructionDataArgs,\n CreateBulkDealInstructionData\n> {\n return combineCodec(\n getCreateBulkDealInstructionDataEncoder(),\n getCreateBulkDealInstructionDataDecoder()\n );\n}\n\nexport type CreateBulkDealAsyncInput<\n TAccountDeal extends string = string,\n TAccountAgent extends string = string,\n TAccountUserRegistry extends string = string,\n TAccountCustomer extends string = string,\n TAccountSystemProgram extends string = string,\n TAccountClock extends string = string,\n> = {\n /** Bulk deal account with collision prevention */\n deal: Address<TAccountDeal>;\n /** Agent account with enhanced constraints */\n agent: Address<TAccountAgent>;\n /** User registry for rate limiting and spam prevention */\n userRegistry?: Address<TAccountUserRegistry>;\n /** Enhanced customer verification */\n customer: TransactionSigner<TAccountCustomer>;\n /** System program for account creation */\n systemProgram?: Address<TAccountSystemProgram>;\n /** Clock sysvar for timestamp validation */\n clock?: Address<TAccountClock>;\n dealId: CreateBulkDealInstructionDataArgs['dealId'];\n dealType: CreateBulkDealInstructionDataArgs['dealType'];\n totalVolume: CreateBulkDealInstructionDataArgs['totalVolume'];\n totalValue: CreateBulkDealInstructionDataArgs['totalValue'];\n discountPercentage: CreateBulkDealInstructionDataArgs['discountPercentage'];\n volumeTiers: CreateBulkDealInstructionDataArgs['volumeTiers'];\n slaTerms: CreateBulkDealInstructionDataArgs['slaTerms'];\n contractDuration: CreateBulkDealInstructionDataArgs['contractDuration'];\n endDate: CreateBulkDealInstructionDataArgs['endDate'];\n};\n\nexport async function getCreateBulkDealInstructionAsync<\n TAccountDeal extends string,\n TAccountAgent extends string,\n TAccountUserRegistry extends string,\n TAccountCustomer extends string,\n TAccountSystemProgram extends string,\n TAccountClock extends string,\n TProgramAddress extends\n Address = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: CreateBulkDealAsyncInput<\n TAccountDeal,\n TAccountAgent,\n TAccountUserRegistry,\n TAccountCustomer,\n TAccountSystemProgram,\n TAccountClock\n >,\n config?: { programAddress?: TProgramAddress }\n): Promise<\n CreateBulkDealInstruction<\n TProgramAddress,\n TAccountDeal,\n TAccountAgent,\n TAccountUserRegistry,\n TAccountCustomer,\n TAccountSystemProgram,\n TAccountClock\n >\n> {\n // Program address.\n const programAddress =\n config?.programAddress ?? GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n deal: { value: input.deal ?? null, isWritable: true },\n agent: { value: input.agent ?? null, isWritable: false },\n userRegistry: { value: input.userRegistry ?? null, isWritable: true },\n customer: { value: input.customer ?? null, isWritable: true },\n systemProgram: { value: input.systemProgram ?? null, isWritable: false },\n clock: { value: input.clock ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolve default values.\n if (!accounts.userRegistry.value) {\n accounts.userRegistry.value = await getProgramDerivedAddress({\n programAddress,\n seeds: [\n getBytesEncoder().encode(\n new Uint8Array([\n 117, 115, 101, 114, 95, 114, 101, 103, 105, 115, 116, 114, 121,\n ])\n ),\n getAddressEncoder().encode(expectAddress(accounts.customer.value)),\n ],\n });\n }\n if (!accounts.systemProgram.value) {\n accounts.systemProgram.value =\n '11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>;\n }\n if (!accounts.clock.value) {\n accounts.clock.value =\n 'SysvarC1ock11111111111111111111111111111111' as Address<'SysvarC1ock11111111111111111111111111111111'>;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.deal),\n getAccountMeta(accounts.agent),\n getAccountMeta(accounts.userRegistry),\n getAccountMeta(accounts.customer),\n getAccountMeta(accounts.systemProgram),\n getAccountMeta(accounts.clock),\n ],\n programAddress,\n data: getCreateBulkDealInstructionDataEncoder().encode(\n args as CreateBulkDealInstructionDataArgs\n ),\n } as CreateBulkDealInstruction<\n TProgramAddress,\n TAccountDeal,\n TAccountAgent,\n TAccountUserRegistry,\n TAccountCustomer,\n TAccountSystemProgram,\n TAccountClock\n >;\n\n return instruction;\n}\n\nexport type CreateBulkDealInput<\n TAccountDeal extends string = string,\n TAccountAgent extends string = string,\n TAccountUserRegistry extends string = string,\n TAccountCustomer extends string = string,\n TAccountSystemProgram extends string = string,\n TAccountClock extends string = string,\n> = {\n /** Bulk deal account with collision prevention */\n deal: Address<TAccountDeal>;\n /** Agent account with enhanced constraints */\n agent: Address<TAccountAgent>;\n /** User registry for rate limiting and spam prevention */\n userRegistry: Address<TAccountUserRegistry>;\n /** Enhanced customer verification */\n customer: TransactionSigner<TAccountCustomer>;\n /** System program for account creation */\n systemProgram?: Address<TAccountSystemProgram>;\n /** Clock sysvar for timestamp validation */\n clock?: Address<TAccountClock>;\n dealId: CreateBulkDealInstructionDataArgs['dealId'];\n dealType: CreateBulkDealInstructionDataArgs['dealType'];\n totalVolume: CreateBulkDealInstructionDataArgs['totalVolume'];\n totalValue: CreateBulkDealInstructionDataArgs['totalValue'];\n discountPercentage: CreateBulkDealInstructionDataArgs['discountPercentage'];\n volumeTiers: CreateBulkDealInstructionDataArgs['volumeTiers'];\n slaTerms: CreateBulkDealInstructionDataArgs['slaTerms'];\n contractDuration: CreateBulkDealInstructionDataArgs['contractDuration'];\n endDate: CreateBulkDealInstructionDataArgs['endDate'];\n};\n\nexport function getCreateBulkDealInstruction<\n TAccountDeal extends string,\n TAccountAgent extends string,\n TAccountUserRegistry extends string,\n TAccountCustomer extends string,\n TAccountSystemProgram extends string,\n TAccountClock extends string,\n TProgramAddress extends\n Address = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: CreateBulkDealInput<\n TAccountDeal,\n TAccountAgent,\n TAccountUserRegistry,\n TAccountCustomer,\n TAccountSystemProgram,\n TAccountClock\n >,\n config?: { programAddress?: TProgramAddress }\n): CreateBulkDealInstruction<\n TProgramAddress,\n TAccountDeal,\n TAccountAgent,\n TAccountUserRegistry,\n TAccountCustomer,\n TAccountSystemProgram,\n TAccountClock\n> {\n // Program address.\n const programAddress =\n config?.programAddress ?? GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n deal: { value: input.deal ?? null, isWritable: true },\n agent: { value: input.agent ?? null, isWritable: false },\n userRegistry: { value: input.userRegistry ?? null, isWritable: true },\n customer: { value: input.customer ?? null, isWritable: true },\n systemProgram: { value: input.systemProgram ?? null, isWritable: false },\n clock: { value: input.clock ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolve default values.\n if (!accounts.systemProgram.value) {\n accounts.systemProgram.value =\n '11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>;\n }\n if (!accounts.clock.value) {\n accounts.clock.value =\n 'SysvarC1ock11111111111111111111111111111111' as Address<'SysvarC1ock11111111111111111111111111111111'>;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.deal),\n getAccountMeta(accounts.agent),\n getAccountMeta(accounts.userRegistry),\n getAccountMeta(accounts.customer),\n getAccountMeta(accounts.systemProgram),\n getAccountMeta(accounts.clock),\n ],\n programAddress,\n data: getCreateBulkDealInstructionDataEncoder().encode(\n args as CreateBulkDealInstructionDataArgs\n ),\n } as CreateBulkDealInstruction<\n TProgramAddress,\n TAccountDeal,\n TAccountAgent,\n TAccountUserRegistry,\n TAccountCustomer,\n TAccountSystemProgram,\n TAccountClock\n >;\n\n return instruction;\n}\n\nexport type ParsedCreateBulkDealInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n /** Bulk deal account with collision prevention */\n deal: TAccountMetas[0];\n /** Agent account with enhanced constraints */\n agent: TAccountMetas[1];\n /** User registry for rate limiting and spam prevention */\n userRegistry: TAccountMetas[2];\n /** Enhanced customer verification */\n customer: TAccountMetas[3];\n /** System program for account creation */\n systemProgram: TAccountMetas[4];\n /** Clock sysvar for timestamp validation */\n clock: TAccountMetas[5];\n };\n data: CreateBulkDealInstructionData;\n};\n\nexport function parseCreateBulkDealInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>\n): ParsedCreateBulkDealInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 6) {\n throw new Error('[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts');\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = instruction.accounts![accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n deal: getNextAccount(),\n agent: getNextAccount(),\n userRegistry: getNextAccount(),\n customer: getNextAccount(),\n systemProgram: getNextAccount(),\n clock: getNextAccount(),\n },\n data: getCreateBulkDealInstructionDataDecoder().decode(instruction.data),\n };\n}\n","/**\n * This code was AUTOGENERATED using the codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n combineCodec,\n fixDecoderSize,\n fixEncoderSize,\n getAddressDecoder,\n getAddressEncoder,\n getArrayDecoder,\n getArrayEncoder,\n getBooleanDecoder,\n getBooleanEncoder,\n getBytesDecoder,\n getBytesEncoder,\n getStructDecoder,\n getStructEncoder,\n getU64Decoder,\n getU64Encoder,\n transformEncoder,\n type AccountMeta,\n type AccountSignerMeta,\n type Address,\n type Codec,\n type Decoder,\n type Encoder,\n type Instruction,\n type InstructionWithAccounts,\n type InstructionWithData,\n type ReadonlyAccount,\n type ReadonlyUint8Array,\n type TransactionSigner,\n type WritableAccount,\n type WritableSignerAccount,\n} from '@solana/kit';\nimport {\n GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_INSTRUCTION_DATA,\n GHOSTSPEAK_MARKETPLACE_ERROR__MISSING_REQUIRED_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INSTRUCTION_PARSING_FAILED,\n isGhostspeakMarketplaceError,\n} from '../errors';\nimport { GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS } from '../programs';\nimport { getAccountMetaFactory, type ResolvedAccount } from '../shared';\nimport {\n getChannelTypeDecoder,\n getChannelTypeEncoder,\n type ChannelType,\n type ChannelTypeArgs,\n} from '../types';\n\nexport const CREATE_CHANNEL_DISCRIMINATOR = new Uint8Array([\n 37, 105, 253, 99, 87, 46, 223, 20,\n]);\n\nexport function getCreateChannelDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 8).encode(\n CREATE_CHANNEL_DISCRIMINATOR\n );\n}\n\nexport type CreateChannelInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountChannel extends string | AccountMeta<string> = string,\n TAccountCreator extends string | AccountMeta<string> = string,\n TAccountSystemProgram extends\n | string\n | AccountMeta<string> = '11111111111111111111111111111111',\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountChannel extends string\n ? WritableAccount<TAccountChannel>\n : TAccountChannel,\n TAccountCreator extends string\n ? WritableSignerAccount<TAccountCreator> &\n AccountSignerMeta<TAccountCreator>\n : TAccountCreator,\n TAccountSystemProgram extends string\n ? ReadonlyAccount<TAccountSystemProgram>\n : TAccountSystemProgram,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type CreateChannelInstructionData = {\n discriminator: ReadonlyUint8Array;\n channelId: bigint;\n participants: Array<Address>;\n channelType: ChannelType;\n isPrivate: boolean;\n};\n\nexport type CreateChannelInstructionDataArgs = {\n channelId: number | bigint;\n participants: Array<Address>;\n channelType: ChannelTypeArgs;\n isPrivate: boolean;\n};\n\nexport function getCreateChannelInstructionDataEncoder(): Encoder<CreateChannelInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n ['discriminator', fixEncoderSize(getBytesEncoder(), 8)],\n ['channelId', getU64Encoder()],\n ['participants', getArrayEncoder(getAddressEncoder())],\n ['channelType', getChannelTypeEncoder()],\n ['isPrivate', getBooleanEncoder()],\n ]),\n (value) => ({ ...value, discriminator: CREATE_CHANNEL_DISCRIMINATOR })\n );\n}\n\nexport function getCreateChannelInstructionDataDecoder(): Decoder<CreateChannelInstructionData> {\n return getStructDecoder([\n ['discriminator', fixDecoderSize(getBytesDecoder(), 8)],\n ['channelId', getU64Decoder()],\n ['participants', getArrayDecoder(getAddressDecoder())],\n ['channelType', getChannelTypeDecoder()],\n ['isPrivate', getBooleanDecoder()],\n ]);\n}\n\nexport function getCreateChannelInstructionDataCodec(): Codec<\n CreateChannelInstructionDataArgs,\n CreateChannelInstructionData\n> {\n return combineCodec(\n getCreateChannelInstructionDataEncoder(),\n getCreateChannelInstructionDataDecoder()\n );\n}\n\nexport type CreateChannelInput<\n TAccountChannel extends string = string,\n TAccountCreator extends string = string,\n TAccountSystemProgram extends string = string,\n> = {\n channel: Address<TAccountChannel>;\n creator: TransactionSigner<TAccountCreator>;\n systemProgram?: Address<TAccountSystemProgram>;\n channelId: CreateChannelInstructionDataArgs['channelId'];\n participants: CreateChannelInstructionDataArgs['participants'];\n channelType: CreateChannelInstructionDataArgs['channelType'];\n isPrivate: CreateChannelInstructionDataArgs['isPrivate'];\n};\n\nexport function getCreateChannelInstruction<\n TAccountChannel extends string,\n TAccountCreator extends string,\n TAccountSystemProgram extends string,\n TProgramAddress extends\n Address = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: CreateChannelInput<\n TAccountChannel,\n TAccountCreator,\n TAccountSystemProgram\n >,\n config?: { programAddress?: TProgramAddress }\n): CreateChannelInstruction<\n TProgramAddress,\n TAccountChannel,\n TAccountCreator,\n TAccountSystemProgram\n> {\n // Program address.\n const programAddress =\n config?.programAddress ?? GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n channel: { value: input.channel ?? null, isWritable: true },\n creator: { value: input.creator ?? null, isWritable: true },\n systemProgram: { value: input.systemProgram ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolve default values.\n if (!accounts.systemProgram.value) {\n accounts.systemProgram.value =\n '11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.channel),\n getAccountMeta(accounts.creator),\n getAccountMeta(accounts.systemProgram),\n ],\n programAddress,\n data: getCreateChannelInstructionDataEncoder().encode(\n args as CreateChannelInstructionDataArgs\n ),\n } as CreateChannelInstruction<\n TProgramAddress,\n TAccountChannel,\n TAccountCreator,\n TAccountSystemProgram\n >;\n\n return instruction;\n}\n\nexport type ParsedCreateChannelInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n channel: TAccountMetas[0];\n creator: TAccountMetas[1];\n systemProgram: TAccountMetas[2];\n };\n data: CreateChannelInstructionData;\n};\n\nexport function parseCreateChannelInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>\n): ParsedCreateChannelInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 3) {\n throw new Error('[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts');\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = instruction.accounts![accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n channel: getNextAccount(),\n creator: getNextAccount(),\n systemProgram: getNextAccount(),\n },\n data: getCreateChannelInstructionDataDecoder().decode(instruction.data),\n };\n}\n","/**\n * This code was AUTOGENERATED using the codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n combineCodec,\n fixDecoderSize,\n fixEncoderSize,\n getAddressEncoder,\n getBytesDecoder,\n getBytesEncoder,\n getProgramDerivedAddress,\n getStructDecoder,\n getStructEncoder,\n transformEncoder,\n type AccountMeta,\n type AccountSignerMeta,\n type Address,\n type Codec,\n type Decoder,\n type Encoder,\n type Instruction,\n type InstructionWithAccounts,\n type InstructionWithData,\n type ReadonlyAccount,\n type ReadonlyUint8Array,\n type TransactionSigner,\n type WritableAccount,\n type WritableSignerAccount,\n} from '@solana/kit';\nimport {\n GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_INSTRUCTION_DATA,\n GHOSTSPEAK_MARKETPLACE_ERROR__MISSING_REQUIRED_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INSTRUCTION_PARSING_FAILED,\n isGhostspeakMarketplaceError,\n} from '../errors';\nimport { GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS } from '../programs';\nimport {\n expectAddress,\n getAccountMetaFactory,\n type ResolvedAccount,\n} from '../shared';\nimport {\n getDynamicPricingConfigDecoder,\n getDynamicPricingConfigEncoder,\n type DynamicPricingConfig,\n type DynamicPricingConfigArgs,\n} from '../types';\n\nexport const CREATE_DYNAMIC_PRICING_ENGINE_DISCRIMINATOR = new Uint8Array([\n 251, 20, 25, 4, 140, 172, 5, 167,\n]);\n\nexport function getCreateDynamicPricingEngineDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 8).encode(\n CREATE_DYNAMIC_PRICING_ENGINE_DISCRIMINATOR\n );\n}\n\nexport type CreateDynamicPricingEngineInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountEngine extends string | AccountMeta<string> = string,\n TAccountAgent extends string | AccountMeta<string> = string,\n TAccountOwner extends string | AccountMeta<string> = string,\n TAccountSystemProgram extends\n | string\n | AccountMeta<string> = '11111111111111111111111111111111',\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountEngine extends string\n ? WritableAccount<TAccountEngine>\n : TAccountEngine,\n TAccountAgent extends string\n ? ReadonlyAccount<TAccountAgent>\n : TAccountAgent,\n TAccountOwner extends string\n ? WritableSignerAccount<TAccountOwner> &\n AccountSignerMeta<TAccountOwner>\n : TAccountOwner,\n TAccountSystemProgram extends string\n ? ReadonlyAccount<TAccountSystemProgram>\n : TAccountSystemProgram,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type CreateDynamicPricingEngineInstructionData = {\n discriminator: ReadonlyUint8Array;\n config: DynamicPricingConfig;\n};\n\nexport type CreateDynamicPricingEngineInstructionDataArgs = {\n config: DynamicPricingConfigArgs;\n};\n\nexport function getCreateDynamicPricingEngineInstructionDataEncoder(): Encoder<CreateDynamicPricingEngineInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n ['discriminator', fixEncoderSize(getBytesEncoder(), 8)],\n ['config', getDynamicPricingConfigEncoder()],\n ]),\n (value) => ({\n ...value,\n discriminator: CREATE_DYNAMIC_PRICING_ENGINE_DISCRIMINATOR,\n })\n );\n}\n\nexport function getCreateDynamicPricingEngineInstructionDataDecoder(): Decoder<CreateDynamicPricingEngineInstructionData> {\n return getStructDecoder([\n ['discriminator', fixDecoderSize(getBytesDecoder(), 8)],\n ['config', getDynamicPricingConfigDecoder()],\n ]);\n}\n\nexport function getCreateDynamicPricingEngineInstructionDataCodec(): Codec<\n CreateDynamicPricingEngineInstructionDataArgs,\n CreateDynamicPricingEngineInstructionData\n> {\n return combineCodec(\n getCreateDynamicPricingEngineInstructionDataEncoder(),\n getCreateDynamicPricingEngineInstructionDataDecoder()\n );\n}\n\nexport type CreateDynamicPricingEngineAsyncInput<\n TAccountEngine extends string = string,\n TAccountAgent extends string = string,\n TAccountOwner extends string = string,\n TAccountSystemProgram extends string = string,\n> = {\n engine?: Address<TAccountEngine>;\n agent: Address<TAccountAgent>;\n owner: TransactionSigner<TAccountOwner>;\n systemProgram?: Address<TAccountSystemProgram>;\n config: CreateDynamicPricingEngineInstructionDataArgs['config'];\n};\n\nexport async function getCreateDynamicPricingEngineInstructionAsync<\n TAccountEngine extends string,\n TAccountAgent extends string,\n TAccountOwner extends string,\n TAccountSystemProgram extends string,\n TProgramAddress extends\n Address = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: CreateDynamicPricingEngineAsyncInput<\n TAccountEngine,\n TAccountAgent,\n TAccountOwner,\n TAccountSystemProgram\n >,\n config?: { programAddress?: TProgramAddress }\n): Promise<\n CreateDynamicPricingEngineInstruction<\n TProgramAddress,\n TAccountEngine,\n TAccountAgent,\n TAccountOwner,\n TAccountSystemProgram\n >\n> {\n // Program address.\n const programAddress =\n config?.programAddress ?? GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n engine: { value: input.engine ?? null, isWritable: true },\n agent: { value: input.agent ?? null, isWritable: false },\n owner: { value: input.owner ?? null, isWritable: true },\n systemProgram: { value: input.systemProgram ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolve default values.\n if (!accounts.engine.value) {\n accounts.engine.value = await getProgramDerivedAddress({\n programAddress,\n seeds: [\n getBytesEncoder().encode(\n new Uint8Array([\n 100, 121, 110, 97, 109, 105, 99, 95, 112, 114, 105, 99, 105, 110,\n 103,\n ])\n ),\n getAddressEncoder().encode(expectAddress(accounts.agent.value)),\n ],\n });\n }\n if (!accounts.systemProgram.value) {\n accounts.systemProgram.value =\n '11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.engine),\n getAccountMeta(accounts.agent),\n getAccountMeta(accounts.owner),\n getAccountMeta(accounts.systemProgram),\n ],\n programAddress,\n data: getCreateDynamicPricingEngineInstructionDataEncoder().encode(\n args as CreateDynamicPricingEngineInstructionDataArgs\n ),\n } as CreateDynamicPricingEngineInstruction<\n TProgramAddress,\n TAccountEngine,\n TAccountAgent,\n TAccountOwner,\n TAccountSystemProgram\n >;\n\n return instruction;\n}\n\nexport type CreateDynamicPricingEngineInput<\n TAccountEngine extends string = string,\n TAccountAgent extends string = string,\n TAccountOwner extends string = string,\n TAccountSystemProgram extends string = string,\n> = {\n engine: Address<TAccountEngine>;\n agent: Address<TAccountAgent>;\n owner: TransactionSigner<TAccountOwner>;\n systemProgram?: Address<TAccountSystemProgram>;\n config: CreateDynamicPricingEngineInstructionDataArgs['config'];\n};\n\nexport function getCreateDynamicPricingEngineInstruction<\n TAccountEngine extends string,\n TAccountAgent extends string,\n TAccountOwner extends string,\n TAccountSystemProgram extends string,\n TProgramAddress extends\n Address = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: CreateDynamicPricingEngineInput<\n TAccountEngine,\n TAccountAgent,\n TAccountOwner,\n TAccountSystemProgram\n >,\n config?: { programAddress?: TProgramAddress }\n): CreateDynamicPricingEngineInstruction<\n TProgramAddress,\n TAccountEngine,\n TAccountAgent,\n TAccountOwner,\n TAccountSystemProgram\n> {\n // Program address.\n const programAddress =\n config?.programAddress ?? GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n engine: { value: input.engine ?? null, isWritable: true },\n agent: { value: input.agent ?? null, isWritable: false },\n owner: { value: input.owner ?? null, isWritable: true },\n systemProgram: { value: input.systemProgram ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolve default values.\n if (!accounts.systemProgram.value) {\n accounts.systemProgram.value =\n '11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.engine),\n getAccountMeta(accounts.agent),\n getAccountMeta(accounts.owner),\n getAccountMeta(accounts.systemProgram),\n ],\n programAddress,\n data: getCreateDynamicPricingEngineInstructionDataEncoder().encode(\n args as CreateDynamicPricingEngineInstructionDataArgs\n ),\n } as CreateDynamicPricingEngineInstruction<\n TProgramAddress,\n TAccountEngine,\n TAccountAgent,\n TAccountOwner,\n TAccountSystemProgram\n >;\n\n return instruction;\n}\n\nexport type ParsedCreateDynamicPricingEngineInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n engine: TAccountMetas[0];\n agent: TAccountMetas[1];\n owner: TAccountMetas[2];\n systemProgram: TAccountMetas[3];\n };\n data: CreateDynamicPricingEngineInstructionData;\n};\n\nexport function parseCreateDynamicPricingEngineInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>\n): ParsedCreateDynamicPricingEngineInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 4) {\n throw new Error('[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts');\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = instruction.accounts![accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n engine: getNextAccount(),\n agent: getNextAccount(),\n owner: getNextAccount(),\n systemProgram: getNextAccount(),\n },\n data: getCreateDynamicPricingEngineInstructionDataDecoder().decode(\n instruction.data\n ),\n };\n}\n","/**\n * This code was AUTOGENERATED using the codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n addDecoderSizePrefix,\n addEncoderSizePrefix,\n combineCodec,\n fixDecoderSize,\n fixEncoderSize,\n getAddressDecoder,\n getAddressEncoder,\n getArrayDecoder,\n getArrayEncoder,\n getBytesDecoder,\n getBytesEncoder,\n getProgramDerivedAddress,\n getStructDecoder,\n getStructEncoder,\n getU32Decoder,\n getU32Encoder,\n getUtf8Decoder,\n getUtf8Encoder,\n transformEncoder,\n type AccountMeta,\n type AccountSignerMeta,\n type Address,\n type Codec,\n type Decoder,\n type Encoder,\n type Instruction,\n type InstructionWithAccounts,\n type InstructionWithData,\n type ReadonlyAccount,\n type ReadonlyUint8Array,\n type TransactionSigner,\n type WritableAccount,\n type WritableSignerAccount,\n} from '@solana/kit';\nimport {\n GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_INSTRUCTION_DATA,\n GHOSTSPEAK_MARKETPLACE_ERROR__MISSING_REQUIRED_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INSTRUCTION_PARSING_FAILED,\n isGhostspeakMarketplaceError,\n} from '../errors';\nimport { GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS } from '../programs';\nimport {\n expectSome,\n getAccountMetaFactory,\n type ResolvedAccount,\n} from '../shared';\nimport {\n getChannelMetadataDecoder,\n getChannelMetadataEncoder,\n getChannelTypeDecoder,\n getChannelTypeEncoder,\n type ChannelMetadata,\n type ChannelMetadataArgs,\n type ChannelType,\n type ChannelTypeArgs,\n} from '../types';\n\nexport const CREATE_ENHANCED_CHANNEL_DISCRIMINATOR = new Uint8Array([\n 28, 188, 236, 214, 244, 184, 198, 219,\n]);\n\nexport function getCreateEnhancedChannelDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 8).encode(\n CREATE_ENHANCED_CHANNEL_DISCRIMINATOR\n );\n}\n\nexport type CreateEnhancedChannelInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountChannel extends string | AccountMeta<string> = string,\n TAccountReentrancyGuard extends string | AccountMeta<string> = string,\n TAccountCreator extends string | AccountMeta<string> = string,\n TAccountCreatorAgent extends string | AccountMeta<string> = string,\n TAccountSystemProgram extends\n | string\n | AccountMeta<string> = '11111111111111111111111111111111',\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountChannel extends string\n ? WritableAccount<TAccountChannel>\n : TAccountChannel,\n TAccountReentrancyGuard extends string\n ? WritableAccount<TAccountReentrancyGuard>\n : TAccountReentrancyGuard,\n TAccountCreator extends string\n ? WritableSignerAccount<TAccountCreator> &\n AccountSignerMeta<TAccountCreator>\n : TAccountCreator,\n TAccountCreatorAgent extends string\n ? ReadonlyAccount<TAccountCreatorAgent>\n : TAccountCreatorAgent,\n TAccountSystemProgram extends string\n ? ReadonlyAccount<TAccountSystemProgram>\n : TAccountSystemProgram,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type CreateEnhancedChannelInstructionData = {\n discriminator: ReadonlyUint8Array;\n channelId: string;\n participants: Array<Address>;\n channelType: ChannelType;\n metadata: ChannelMetadata;\n};\n\nexport type CreateEnhancedChannelInstructionDataArgs = {\n channelId: string;\n participants: Array<Address>;\n channelType: ChannelTypeArgs;\n metadata: ChannelMetadataArgs;\n};\n\nexport function getCreateEnhancedChannelInstructionDataEncoder(): Encoder<CreateEnhancedChannelInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n ['discriminator', fixEncoderSize(getBytesEncoder(), 8)],\n ['channelId', addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder())],\n ['participants', getArrayEncoder(getAddressEncoder())],\n ['channelType', getChannelTypeEncoder()],\n ['metadata', getChannelMetadataEncoder()],\n ]),\n (value) => ({\n ...value,\n discriminator: CREATE_ENHANCED_CHANNEL_DISCRIMINATOR,\n })\n );\n}\n\nexport function getCreateEnhancedChannelInstructionDataDecoder(): Decoder<CreateEnhancedChannelInstructionData> {\n return getStructDecoder([\n ['discriminator', fixDecoderSize(getBytesDecoder(), 8)],\n ['channelId', addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())],\n ['participants', getArrayDecoder(getAddressDecoder())],\n ['channelType', getChannelTypeDecoder()],\n ['metadata', getChannelMetadataDecoder()],\n ]);\n}\n\nexport function getCreateEnhancedChannelInstructionDataCodec(): Codec<\n CreateEnhancedChannelInstructionDataArgs,\n CreateEnhancedChannelInstructionData\n> {\n return combineCodec(\n getCreateEnhancedChannelInstructionDataEncoder(),\n getCreateEnhancedChannelInstructionDataDecoder()\n );\n}\n\nexport type CreateEnhancedChannelAsyncInput<\n TAccountChannel extends string = string,\n TAccountReentrancyGuard extends string = string,\n TAccountCreator extends string = string,\n TAccountCreatorAgent extends string = string,\n TAccountSystemProgram extends string = string,\n> = {\n channel?: Address<TAccountChannel>;\n reentrancyGuard?: Address<TAccountReentrancyGuard>;\n creator: TransactionSigner<TAccountCreator>;\n creatorAgent: Address<TAccountCreatorAgent>;\n systemProgram?: Address<TAccountSystemProgram>;\n channelId: CreateEnhancedChannelInstructionDataArgs['channelId'];\n participants: CreateEnhancedChannelInstructionDataArgs['participants'];\n channelType: CreateEnhancedChannelInstructionDataArgs['channelType'];\n metadata: CreateEnhancedChannelInstructionDataArgs['metadata'];\n};\n\nexport async function getCreateEnhancedChannelInstructionAsync<\n TAccountChannel extends string,\n TAccountReentrancyGuard extends string,\n TAccountCreator extends string,\n TAccountCreatorAgent extends string,\n TAccountSystemProgram extends string,\n TProgramAddress extends\n Address = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: CreateEnhancedChannelAsyncInput<\n TAccountChannel,\n TAccountReentrancyGuard,\n TAccountCreator,\n TAccountCreatorAgent,\n TAccountSystemProgram\n >,\n config?: { programAddress?: TProgramAddress }\n): Promise<\n CreateEnhancedChannelInstruction<\n TProgramAddress,\n TAccountChannel,\n TAccountReentrancyGuard,\n TAccountCreator,\n TAccountCreatorAgent,\n TAccountSystemProgram\n >\n> {\n // Program address.\n const programAddress =\n config?.programAddress ?? GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n channel: { value: input.channel ?? null, isWritable: true },\n reentrancyGuard: { value: input.reentrancyGuard ?? null, isWritable: true },\n creator: { value: input.creator ?? null, isWritable: true },\n creatorAgent: { value: input.creatorAgent ?? null, isWritable: false },\n systemProgram: { value: input.systemProgram ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolve default values.\n if (!accounts.channel.value) {\n accounts.channel.value = await getProgramDerivedAddress({\n programAddress,\n seeds: [\n getBytesEncoder().encode(\n new Uint8Array([99, 104, 97, 110, 110, 101, 108])\n ),\n addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder()).encode(\n expectSome(args.channelId)\n ),\n ],\n });\n }\n if (!accounts.reentrancyGuard.value) {\n accounts.reentrancyGuard.value = await getProgramDerivedAddress({\n programAddress,\n seeds: [\n getBytesEncoder().encode(\n new Uint8Array([\n 114, 101, 101, 110, 116, 114, 97, 110, 99, 121, 95, 103, 117, 97,\n 114, 100,\n ])\n ),\n ],\n });\n }\n if (!accounts.systemProgram.value) {\n accounts.systemProgram.value =\n '11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.channel),\n getAccountMeta(accounts.reentrancyGuard),\n getAccountMeta(accounts.creator),\n getAccountMeta(accounts.creatorAgent),\n getAccountMeta(accounts.systemProgram),\n ],\n programAddress,\n data: getCreateEnhancedChannelInstructionDataEncoder().encode(\n args as CreateEnhancedChannelInstructionDataArgs\n ),\n } as CreateEnhancedChannelInstruction<\n TProgramAddress,\n TAccountChannel,\n TAccountReentrancyGuard,\n TAccountCreator,\n TAccountCreatorAgent,\n TAccountSystemProgram\n >;\n\n return instruction;\n}\n\nexport type CreateEnhancedChannelInput<\n TAccountChannel extends string = string,\n TAccountReentrancyGuard extends string = string,\n TAccountCreator extends string = string,\n TAccountCreatorAgent extends string = string,\n TAccountSystemProgram extends string = string,\n> = {\n channel: Address<TAccountChannel>;\n reentrancyGuard: Address<TAccountReentrancyGuard>;\n creator: TransactionSigner<TAccountCreator>;\n creatorAgent: Address<TAccountCreatorAgent>;\n systemProgram?: Address<TAccountSystemProgram>;\n channelId: CreateEnhancedChannelInstructionDataArgs['channelId'];\n participants: CreateEnhancedChannelInstructionDataArgs['participants'];\n channelType: CreateEnhancedChannelInstructionDataArgs['channelType'];\n metadata: CreateEnhancedChannelInstructionDataArgs['metadata'];\n};\n\nexport function getCreateEnhancedChannelInstruction<\n TAccountChannel extends string,\n TAccountReentrancyGuard extends string,\n TAccountCreator extends string,\n TAccountCreatorAgent extends string,\n TAccountSystemProgram extends string,\n TProgramAddress extends\n Address = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: CreateEnhancedChannelInput<\n TAccountChannel,\n TAccountReentrancyGuard,\n TAccountCreator,\n TAccountCreatorAgent,\n TAccountSystemProgram\n >,\n config?: { programAddress?: TProgramAddress }\n): CreateEnhancedChannelInstruction<\n TProgramAddress,\n TAccountChannel,\n TAccountReentrancyGuard,\n TAccountCreator,\n TAccountCreatorAgent,\n TAccountSystemProgram\n> {\n // Program address.\n const programAddress =\n config?.programAddress ?? GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n channel: { value: input.channel ?? null, isWritable: true },\n reentrancyGuard: { value: input.reentrancyGuard ?? null, isWritable: true },\n creator: { value: input.creator ?? null, isWritable: true },\n creatorAgent: { value: input.creatorAgent ?? null, isWritable: false },\n systemProgram: { value: input.systemProgram ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolve default values.\n if (!accounts.systemProgram.value) {\n accounts.systemProgram.value =\n '11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.channel),\n getAccountMeta(accounts.reentrancyGuard),\n getAccountMeta(accounts.creator),\n getAccountMeta(accounts.creatorAgent),\n getAccountMeta(accounts.systemProgram),\n ],\n programAddress,\n data: getCreateEnhancedChannelInstructionDataEncoder().encode(\n args as CreateEnhancedChannelInstructionDataArgs\n ),\n } as CreateEnhancedChannelInstruction<\n TProgramAddress,\n TAccountChannel,\n TAccountReentrancyGuard,\n TAccountCreator,\n TAccountCreatorAgent,\n TAccountSystemProgram\n >;\n\n return instruction;\n}\n\nexport type ParsedCreateEnhancedChannelInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n channel: TAccountMetas[0];\n reentrancyGuard: TAccountMetas[1];\n creator: TAccountMetas[2];\n creatorAgent: TAccountMetas[3];\n systemProgram: TAccountMetas[4];\n };\n data: CreateEnhancedChannelInstructionData;\n};\n\nexport function parseCreateEnhancedChannelInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>\n): ParsedCreateEnhancedChannelInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 5) {\n throw new Error('[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts');\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = instruction.accounts![accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n channel: getNextAccount(),\n reentrancyGuard: getNextAccount(),\n creator: getNextAccount(),\n creatorAgent: getNextAccount(),\n systemProgram: getNextAccount(),\n },\n data: getCreateEnhancedChannelInstructionDataDecoder().decode(\n instruction.data\n ),\n };\n}\n","/**\n * This code was AUTOGENERATED using the codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n addDecoderSizePrefix,\n addEncoderSizePrefix,\n combineCodec,\n fixDecoderSize,\n fixEncoderSize,\n getAddressDecoder,\n getAddressEncoder,\n getBooleanDecoder,\n getBooleanEncoder,\n getBytesDecoder,\n getBytesEncoder,\n getI64Decoder,\n getI64Encoder,\n getOptionDecoder,\n getOptionEncoder,\n getProgramDerivedAddress,\n getStructDecoder,\n getStructEncoder,\n getU32Decoder,\n getU32Encoder,\n getU64Decoder,\n getU64Encoder,\n getUtf8Decoder,\n getUtf8Encoder,\n transformEncoder,\n type AccountMeta,\n type AccountSignerMeta,\n type Address,\n type Codec,\n type Decoder,\n type Encoder,\n type Instruction,\n type InstructionWithAccounts,\n type InstructionWithData,\n type Option,\n type OptionOrNullable,\n type ReadonlyAccount,\n type ReadonlyUint8Array,\n type TransactionSigner,\n type WritableAccount,\n type WritableSignerAccount,\n} from '@solana/kit';\nimport {\n GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_INSTRUCTION_DATA,\n GHOSTSPEAK_MARKETPLACE_ERROR__MISSING_REQUIRED_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INSTRUCTION_PARSING_FAILED,\n isGhostspeakMarketplaceError,\n} from '../errors';\nimport { GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS } from '../programs';\nimport {\n expectAddress,\n expectSome,\n getAccountMetaFactory,\n type ResolvedAccount,\n} from '../shared';\n\nexport const CREATE_ESCROW_DISCRIMINATOR = new Uint8Array([\n 253, 215, 165, 116, 36, 108, 68, 80,\n]);\n\nexport function getCreateEscrowDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 8).encode(\n CREATE_ESCROW_DISCRIMINATOR\n );\n}\n\nexport type CreateEscrowInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountEscrow extends string | AccountMeta<string> = string,\n TAccountReentrancyGuard extends string | AccountMeta<string> = string,\n TAccountClient extends string | AccountMeta<string> = string,\n TAccountAgent extends string | AccountMeta<string> = string,\n TAccountClientTokenAccount extends string | AccountMeta<string> = string,\n TAccountEscrowTokenAccount extends string | AccountMeta<string> = string,\n TAccountPaymentToken extends string | AccountMeta<string> = string,\n TAccountTokenProgram extends\n | string\n | AccountMeta<string> = 'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb',\n TAccountAssociatedTokenProgram extends\n | string\n | AccountMeta<string> = 'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL',\n TAccountSystemProgram extends\n | string\n | AccountMeta<string> = '11111111111111111111111111111111',\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountEscrow extends string\n ? WritableAccount<TAccountEscrow>\n : TAccountEscrow,\n TAccountReentrancyGuard extends string\n ? WritableAccount<TAccountReentrancyGuard>\n : TAccountReentrancyGuard,\n TAccountClient extends string\n ? WritableSignerAccount<TAccountClient> &\n AccountSignerMeta<TAccountClient>\n : TAccountClient,\n TAccountAgent extends string\n ? ReadonlyAccount<TAccountAgent>\n : TAccountAgent,\n TAccountClientTokenAccount extends string\n ? WritableAccount<TAccountClientTokenAccount>\n : TAccountClientTokenAccount,\n TAccountEscrowTokenAccount extends string\n ? WritableAccount<TAccountEscrowTokenAccount>\n : TAccountEscrowTokenAccount,\n TAccountPaymentToken extends string\n ? ReadonlyAccount<TAccountPaymentToken>\n : TAccountPaymentToken,\n TAccountTokenProgram extends string\n ? ReadonlyAccount<TAccountTokenProgram>\n : TAccountTokenProgram,\n TAccountAssociatedTokenProgram extends string\n ? ReadonlyAccount<TAccountAssociatedTokenProgram>\n : TAccountAssociatedTokenProgram,\n TAccountSystemProgram extends string\n ? ReadonlyAccount<TAccountSystemProgram>\n : TAccountSystemProgram,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type CreateEscrowInstructionData = {\n discriminator: ReadonlyUint8Array;\n taskId: string;\n amount: bigint;\n expiresAt: bigint;\n transferHook: Option<Address>;\n isConfidential: boolean;\n};\n\nexport type CreateEscrowInstructionDataArgs = {\n taskId: string;\n amount: number | bigint;\n expiresAt: number | bigint;\n transferHook: OptionOrNullable<Address>;\n isConfidential: boolean;\n};\n\nexport function getCreateEscrowInstructionDataEncoder(): Encoder<CreateEscrowInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n ['discriminator', fixEncoderSize(getBytesEncoder(), 8)],\n ['taskId', addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder())],\n ['amount', getU64Encoder()],\n ['expiresAt', getI64Encoder()],\n ['transferHook', getOptionEncoder(getAddressEncoder())],\n ['isConfidential', getBooleanEncoder()],\n ]),\n (value) => ({ ...value, discriminator: CREATE_ESCROW_DISCRIMINATOR })\n );\n}\n\nexport function getCreateEscrowInstructionDataDecoder(): Decoder<CreateEscrowInstructionData> {\n return getStructDecoder([\n ['discriminator', fixDecoderSize(getBytesDecoder(), 8)],\n ['taskId', addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())],\n ['amount', getU64Decoder()],\n ['expiresAt', getI64Decoder()],\n ['transferHook', getOptionDecoder(getAddressDecoder())],\n ['isConfidential', getBooleanDecoder()],\n ]);\n}\n\nexport function getCreateEscrowInstructionDataCodec(): Codec<\n CreateEscrowInstructionDataArgs,\n CreateEscrowInstructionData\n> {\n return combineCodec(\n getCreateEscrowInstructionDataEncoder(),\n getCreateEscrowInstructionDataDecoder()\n );\n}\n\nexport type CreateEscrowAsyncInput<\n TAccountEscrow extends string = string,\n TAccountReentrancyGuard extends string = string,\n TAccountClient extends string = string,\n TAccountAgent extends string = string,\n TAccountClientTokenAccount extends string = string,\n TAccountEscrowTokenAccount extends string = string,\n TAccountPaymentToken extends string = string,\n TAccountTokenProgram extends string = string,\n TAccountAssociatedTokenProgram extends string = string,\n TAccountSystemProgram extends string = string,\n> = {\n escrow?: Address<TAccountEscrow>;\n reentrancyGuard?: Address<TAccountReentrancyGuard>;\n client: TransactionSigner<TAccountClient>;\n agent: Address<TAccountAgent>;\n clientTokenAccount?: Address<TAccountClientTokenAccount>;\n escrowTokenAccount?: Address<TAccountEscrowTokenAccount>;\n paymentToken: Address<TAccountPaymentToken>;\n tokenProgram?: Address<TAccountTokenProgram>;\n associatedTokenProgram?: Address<TAccountAssociatedTokenProgram>;\n systemProgram?: Address<TAccountSystemProgram>;\n taskId: CreateEscrowInstructionDataArgs['taskId'];\n amount: CreateEscrowInstructionDataArgs['amount'];\n expiresAt: CreateEscrowInstructionDataArgs['expiresAt'];\n transferHook: CreateEscrowInstructionDataArgs['transferHook'];\n isConfidential: CreateEscrowInstructionDataArgs['isConfidential'];\n};\n\nexport async function getCreateEscrowInstructionAsync<\n TAccountEscrow extends string,\n TAccountReentrancyGuard extends string,\n TAccountClient extends string,\n TAccountAgent extends string,\n TAccountClientTokenAccount extends string,\n TAccountEscrowTokenAccount extends string,\n TAccountPaymentToken extends string,\n TAccountTokenProgram extends string,\n TAccountAssociatedTokenProgram extends string,\n TAccountSystemProgram extends string,\n TProgramAddress extends\n Address = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: CreateEscrowAsyncInput<\n TAccountEscrow,\n TAccountReentrancyGuard,\n TAccountClient,\n TAccountAgent,\n TAccountClientTokenAccount,\n TAccountEscrowTokenAccount,\n TAccountPaymentToken,\n TAccountTokenProgram,\n TAccountAssociatedTokenProgram,\n TAccountSystemProgram\n >,\n config?: { programAddress?: TProgramAddress }\n): Promise<\n CreateEscrowInstruction<\n TProgramAddress,\n TAccountEscrow,\n TAccountReentrancyGuard,\n TAccountClient,\n TAccountAgent,\n TAccountClientTokenAccount,\n TAccountEscrowTokenAccount,\n TAccountPaymentToken,\n TAccountTokenProgram,\n TAccountAssociatedTokenProgram,\n TAccountSystemProgram\n >\n> {\n // Program address.\n const programAddress =\n config?.programAddress ?? GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n escrow: { value: input.escrow ?? null, isWritable: true },\n reentrancyGuard: { value: input.reentrancyGuard ?? null, isWritable: true },\n client: { value: input.client ?? null, isWritable: true },\n agent: { value: input.agent ?? null, isWritable: false },\n clientTokenAccount: {\n value: input.clientTokenAccount ?? null,\n isWritable: true,\n },\n escrowTokenAccount: {\n value: input.escrowTokenAccount ?? null,\n isWritable: true,\n },\n paymentToken: { value: input.paymentToken ?? null, isWritable: false },\n tokenProgram: { value: input.tokenProgram ?? null, isWritable: false },\n associatedTokenProgram: {\n value: input.associatedTokenProgram ?? null,\n isWritable: false,\n },\n systemProgram: { value: input.systemProgram ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolve default values.\n if (!accounts.escrow.value) {\n accounts.escrow.value = await getProgramDerivedAddress({\n programAddress,\n seeds: [\n getBytesEncoder().encode(new Uint8Array([101, 115, 99, 114, 111, 119])),\n addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder()).encode(\n expectSome(args.taskId)\n ),\n ],\n });\n }\n if (!accounts.reentrancyGuard.value) {\n accounts.reentrancyGuard.value = await getProgramDerivedAddress({\n programAddress,\n seeds: [\n getBytesEncoder().encode(\n new Uint8Array([\n 114, 101, 101, 110, 116, 114, 97, 110, 99, 121, 95, 103, 117, 97,\n 114, 100,\n ])\n ),\n ],\n });\n }\n if (!accounts.clientTokenAccount.value) {\n accounts.clientTokenAccount.value = await getProgramDerivedAddress({\n programAddress:\n 'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL' as Address<'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL'>,\n seeds: [\n getAddressEncoder().encode(expectAddress(accounts.client.value)),\n getBytesEncoder().encode(\n new Uint8Array([\n 6, 221, 246, 225, 215, 101, 161, 147, 217, 203, 225, 70, 206, 235,\n 121, 172, 28, 180, 133, 237, 95, 91, 55, 145, 58, 140, 245, 133,\n 126, 255, 0, 169,\n ])\n ),\n getAddressEncoder().encode(expectAddress(accounts.paymentToken.value)),\n ],\n });\n }\n if (!accounts.escrowTokenAccount.value) {\n accounts.escrowTokenAccount.value = await getProgramDerivedAddress({\n programAddress:\n 'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL' as Address<'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL'>,\n seeds: [\n getAddressEncoder().encode(expectAddress(accounts.escrow.value)),\n getBytesEncoder().encode(\n new Uint8Array([\n 6, 221, 246, 225, 215, 101, 161, 147, 217, 203, 225, 70, 206, 235,\n 121, 172, 28, 180, 133, 237, 95, 91, 55, 145, 58, 140, 245, 133,\n 126, 255, 0, 169,\n ])\n ),\n getAddressEncoder().encode(expectAddress(accounts.paymentToken.value)),\n ],\n });\n }\n if (!accounts.tokenProgram.value) {\n accounts.tokenProgram.value =\n 'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb' as Address<'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb'>;\n }\n if (!accounts.associatedTokenProgram.value) {\n accounts.associatedTokenProgram.value =\n 'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL' as Address<'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL'>;\n }\n if (!accounts.systemProgram.value) {\n accounts.systemProgram.value =\n '11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.escrow),\n getAccountMeta(accounts.reentrancyGuard),\n getAccountMeta(accounts.client),\n getAccountMeta(accounts.agent),\n getAccountMeta(accounts.clientTokenAccount),\n getAccountMeta(accounts.escrowTokenAccount),\n getAccountMeta(accounts.paymentToken),\n getAccountMeta(accounts.tokenProgram),\n getAccountMeta(accounts.associatedTokenProgram),\n getAccountMeta(accounts.systemProgram),\n ],\n programAddress,\n data: getCreateEscrowInstructionDataEncoder().encode(\n args as CreateEscrowInstructionDataArgs\n ),\n } as CreateEscrowInstruction<\n TProgramAddress,\n TAccountEscrow,\n TAccountReentrancyGuard,\n TAccountClient,\n TAccountAgent,\n TAccountClientTokenAccount,\n TAccountEscrowTokenAccount,\n TAccountPaymentToken,\n TAccountTokenProgram,\n TAccountAssociatedTokenProgram,\n TAccountSystemProgram\n >;\n\n return instruction;\n}\n\nexport type CreateEscrowInput<\n TAccountEscrow extends string = string,\n TAccountReentrancyGuard extends string = string,\n TAccountClient extends string = string,\n TAccountAgent extends string = string,\n TAccountClientTokenAccount extends string = string,\n TAccountEscrowTokenAccount extends string = string,\n TAccountPaymentToken extends string = string,\n TAccountTokenProgram extends string = string,\n TAccountAssociatedTokenProgram extends string = string,\n TAccountSystemProgram extends string = string,\n> = {\n escrow: Address<TAccountEscrow>;\n reentrancyGuard: Address<TAccountReentrancyGuard>;\n client: TransactionSigner<TAccountClient>;\n agent: Address<TAccountAgent>;\n clientTokenAccount: Address<TAccountClientTokenAccount>;\n escrowTokenAccount: Address<TAccountEscrowTokenAccount>;\n paymentToken: Address<TAccountPaymentToken>;\n tokenProgram?: Address<TAccountTokenProgram>;\n associatedTokenProgram?: Address<TAccountAssociatedTokenProgram>;\n systemProgram?: Address<TAccountSystemProgram>;\n taskId: CreateEscrowInstructionDataArgs['taskId'];\n amount: CreateEscrowInstructionDataArgs['amount'];\n expiresAt: CreateEscrowInstructionDataArgs['expiresAt'];\n transferHook: CreateEscrowInstructionDataArgs['transferHook'];\n isConfidential: CreateEscrowInstructionDataArgs['isConfidential'];\n};\n\nexport function getCreateEscrowInstruction<\n TAccountEscrow extends string,\n TAccountReentrancyGuard extends string,\n TAccountClient extends string,\n TAccountAgent extends string,\n TAccountClientTokenAccount extends string,\n TAccountEscrowTokenAccount extends string,\n TAccountPaymentToken extends string,\n TAccountTokenProgram extends string,\n TAccountAssociatedTokenProgram extends string,\n TAccountSystemProgram extends string,\n TProgramAddress extends\n Address = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: CreateEscrowInput<\n TAccountEscrow,\n TAccountReentrancyGuard,\n TAccountClient,\n TAccountAgent,\n TAccountClientTokenAccount,\n TAccountEscrowTokenAccount,\n TAccountPaymentToken,\n TAccountTokenProgram,\n TAccountAssociatedTokenProgram,\n TAccountSystemProgram\n >,\n config?: { programAddress?: TProgramAddress }\n): CreateEscrowInstruction<\n TProgramAddress,\n TAccountEscrow,\n TAccountReentrancyGuard,\n TAccountClient,\n TAccountAgent,\n TAccountClientTokenAccount,\n TAccountEscrowTokenAccount,\n TAccountPaymentToken,\n TAccountTokenProgram,\n TAccountAssociatedTokenProgram,\n TAccountSystemProgram\n> {\n // Program address.\n const programAddress =\n config?.programAddress ?? GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n escrow: { value: input.escrow ?? null, isWritable: true },\n reentrancyGuard: { value: input.reentrancyGuard ?? null, isWritable: true },\n client: { value: input.client ?? null, isWritable: true },\n agent: { value: input.agent ?? null, isWritable: false },\n clientTokenAccount: {\n value: input.clientTokenAccount ?? null,\n isWritable: true,\n },\n escrowTokenAccount: {\n value: input.escrowTokenAccount ?? null,\n isWritable: true,\n },\n paymentToken: { value: input.paymentToken ?? null, isWritable: false },\n tokenProgram: { value: input.tokenProgram ?? null, isWritable: false },\n associatedTokenProgram: {\n value: input.associatedTokenProgram ?? null,\n isWritable: false,\n },\n systemProgram: { value: input.systemProgram ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolve default values.\n if (!accounts.tokenProgram.value) {\n accounts.tokenProgram.value =\n 'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb' as Address<'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb'>;\n }\n if (!accounts.associatedTokenProgram.value) {\n accounts.associatedTokenProgram.value =\n 'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL' as Address<'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL'>;\n }\n if (!accounts.systemProgram.value) {\n accounts.systemProgram.value =\n '11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.escrow),\n getAccountMeta(accounts.reentrancyGuard),\n getAccountMeta(accounts.client),\n getAccountMeta(accounts.agent),\n getAccountMeta(accounts.clientTokenAccount),\n getAccountMeta(accounts.escrowTokenAccount),\n getAccountMeta(accounts.paymentToken),\n getAccountMeta(accounts.tokenProgram),\n getAccountMeta(accounts.associatedTokenProgram),\n getAccountMeta(accounts.systemProgram),\n ],\n programAddress,\n data: getCreateEscrowInstructionDataEncoder().encode(\n args as CreateEscrowInstructionDataArgs\n ),\n } as CreateEscrowInstruction<\n TProgramAddress,\n TAccountEscrow,\n TAccountReentrancyGuard,\n TAccountClient,\n TAccountAgent,\n TAccountClientTokenAccount,\n TAccountEscrowTokenAccount,\n TAccountPaymentToken,\n TAccountTokenProgram,\n TAccountAssociatedTokenProgram,\n TAccountSystemProgram\n >;\n\n return instruction;\n}\n\nexport type ParsedCreateEscrowInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n escrow: TAccountMetas[0];\n reentrancyGuard: TAccountMetas[1];\n client: TAccountMetas[2];\n agent: TAccountMetas[3];\n clientTokenAccount: TAccountMetas[4];\n escrowTokenAccount: TAccountMetas[5];\n paymentToken: TAccountMetas[6];\n tokenProgram: TAccountMetas[7];\n associatedTokenProgram: TAccountMetas[8];\n systemProgram: TAccountMetas[9];\n };\n data: CreateEscrowInstructionData;\n};\n\nexport function parseCreateEscrowInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>\n): ParsedCreateEscrowInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 10) {\n throw new Error('[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts');\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = instruction.accounts![accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n escrow: getNextAccount(),\n reentrancyGuard: getNextAccount(),\n client: getNextAccount(),\n agent: getNextAccount(),\n clientTokenAccount: getNextAccount(),\n escrowTokenAccount: getNextAccount(),\n paymentToken: getNextAccount(),\n tokenProgram: getNextAccount(),\n associatedTokenProgram: getNextAccount(),\n systemProgram: getNextAccount(),\n },\n data: getCreateEscrowInstructionDataDecoder().decode(instruction.data),\n };\n}\n","/**\n * This code was AUTOGENERATED using the codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n combineCodec,\n fixDecoderSize,\n fixEncoderSize,\n getAddressEncoder,\n getBytesDecoder,\n getBytesEncoder,\n getProgramDerivedAddress,\n getStructDecoder,\n getStructEncoder,\n transformEncoder,\n type AccountMeta,\n type AccountSignerMeta,\n type Address,\n type FixedSizeCodec,\n type FixedSizeDecoder,\n type FixedSizeEncoder,\n type Instruction,\n type InstructionWithAccounts,\n type InstructionWithData,\n type ReadonlyAccount,\n type ReadonlyUint8Array,\n type TransactionSigner,\n type WritableAccount,\n type WritableSignerAccount,\n} from '@solana/kit';\nimport {\n GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_INSTRUCTION_DATA,\n GHOSTSPEAK_MARKETPLACE_ERROR__MISSING_REQUIRED_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INSTRUCTION_PARSING_FAILED,\n isGhostspeakMarketplaceError,\n} from '../errors';\nimport { GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS } from '../programs';\nimport {\n expectAddress,\n getAccountMetaFactory,\n type ResolvedAccount,\n} from '../shared';\nimport {\n getIncentiveConfigDecoder,\n getIncentiveConfigEncoder,\n type IncentiveConfig,\n type IncentiveConfigArgs,\n} from '../types';\n\nexport const CREATE_INCENTIVE_PROGRAM_DISCRIMINATOR = new Uint8Array([\n 115, 222, 207, 231, 169, 56, 125, 153,\n]);\n\nexport function getCreateIncentiveProgramDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 8).encode(\n CREATE_INCENTIVE_PROGRAM_DISCRIMINATOR\n );\n}\n\nexport type CreateIncentiveProgramInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountProgram extends string | AccountMeta<string> = string,\n TAccountCreator extends string | AccountMeta<string> = string,\n TAccountSystemProgram extends\n | string\n | AccountMeta<string> = '11111111111111111111111111111111',\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountProgram extends string\n ? WritableAccount<TAccountProgram>\n : TAccountProgram,\n TAccountCreator extends string\n ? WritableSignerAccount<TAccountCreator> &\n AccountSignerMeta<TAccountCreator>\n : TAccountCreator,\n TAccountSystemProgram extends string\n ? ReadonlyAccount<TAccountSystemProgram>\n : TAccountSystemProgram,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type CreateIncentiveProgramInstructionData = {\n discriminator: ReadonlyUint8Array;\n config: IncentiveConfig;\n};\n\nexport type CreateIncentiveProgramInstructionDataArgs = {\n config: IncentiveConfigArgs;\n};\n\nexport function getCreateIncentiveProgramInstructionDataEncoder(): FixedSizeEncoder<CreateIncentiveProgramInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n ['discriminator', fixEncoderSize(getBytesEncoder(), 8)],\n ['config', getIncentiveConfigEncoder()],\n ]),\n (value) => ({\n ...value,\n discriminator: CREATE_INCENTIVE_PROGRAM_DISCRIMINATOR,\n })\n );\n}\n\nexport function getCreateIncentiveProgramInstructionDataDecoder(): FixedSizeDecoder<CreateIncentiveProgramInstructionData> {\n return getStructDecoder([\n ['discriminator', fixDecoderSize(getBytesDecoder(), 8)],\n ['config', getIncentiveConfigDecoder()],\n ]);\n}\n\nexport function getCreateIncentiveProgramInstructionDataCodec(): FixedSizeCodec<\n CreateIncentiveProgramInstructionDataArgs,\n CreateIncentiveProgramInstructionData\n> {\n return combineCodec(\n getCreateIncentiveProgramInstructionDataEncoder(),\n getCreateIncentiveProgramInstructionDataDecoder()\n );\n}\n\nexport type CreateIncentiveProgramAsyncInput<\n TAccountProgram extends string = string,\n TAccountCreator extends string = string,\n TAccountSystemProgram extends string = string,\n> = {\n program?: Address<TAccountProgram>;\n creator: TransactionSigner<TAccountCreator>;\n systemProgram?: Address<TAccountSystemProgram>;\n config: CreateIncentiveProgramInstructionDataArgs['config'];\n};\n\nexport async function getCreateIncentiveProgramInstructionAsync<\n TAccountProgram extends string,\n TAccountCreator extends string,\n TAccountSystemProgram extends string,\n TProgramAddress extends\n Address = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: CreateIncentiveProgramAsyncInput<\n TAccountProgram,\n TAccountCreator,\n TAccountSystemProgram\n >,\n config?: { programAddress?: TProgramAddress }\n): Promise<\n CreateIncentiveProgramInstruction<\n TProgramAddress,\n TAccountProgram,\n TAccountCreator,\n TAccountSystemProgram\n >\n> {\n // Program address.\n const programAddress =\n config?.programAddress ?? GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n program: { value: input.program ?? null, isWritable: true },\n creator: { value: input.creator ?? null, isWritable: true },\n systemProgram: { value: input.systemProgram ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolve default values.\n if (!accounts.program.value) {\n accounts.program.value = await getProgramDerivedAddress({\n programAddress,\n seeds: [\n getBytesEncoder().encode(\n new Uint8Array([\n 105, 110, 99, 101, 110, 116, 105, 118, 101, 95, 112, 114, 111, 103,\n 114, 97, 109,\n ])\n ),\n getAddressEncoder().encode(expectAddress(accounts.creator.value)),\n ],\n });\n }\n if (!accounts.systemProgram.value) {\n accounts.systemProgram.value =\n '11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.program),\n getAccountMeta(accounts.creator),\n getAccountMeta(accounts.systemProgram),\n ],\n programAddress,\n data: getCreateIncentiveProgramInstructionDataEncoder().encode(\n args as CreateIncentiveProgramInstructionDataArgs\n ),\n } as CreateIncentiveProgramInstruction<\n TProgramAddress,\n TAccountProgram,\n TAccountCreator,\n TAccountSystemProgram\n >;\n\n return instruction;\n}\n\nexport type CreateIncentiveProgramInput<\n TAccountProgram extends string = string,\n TAccountCreator extends string = string,\n TAccountSystemProgram extends string = string,\n> = {\n program: Address<TAccountProgram>;\n creator: TransactionSigner<TAccountCreator>;\n systemProgram?: Address<TAccountSystemProgram>;\n config: CreateIncentiveProgramInstructionDataArgs['config'];\n};\n\nexport function getCreateIncentiveProgramInstruction<\n TAccountProgram extends string,\n TAccountCreator extends string,\n TAccountSystemProgram extends string,\n TProgramAddress extends\n Address = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: CreateIncentiveProgramInput<\n TAccountProgram,\n TAccountCreator,\n TAccountSystemProgram\n >,\n config?: { programAddress?: TProgramAddress }\n): CreateIncentiveProgramInstruction<\n TProgramAddress,\n TAccountProgram,\n TAccountCreator,\n TAccountSystemProgram\n> {\n // Program address.\n const programAddress =\n config?.programAddress ?? GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n program: { value: input.program ?? null, isWritable: true },\n creator: { value: input.creator ?? null, isWritable: true },\n systemProgram: { value: input.systemProgram ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolve default values.\n if (!accounts.systemProgram.value) {\n accounts.systemProgram.value =\n '11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.program),\n getAccountMeta(accounts.creator),\n getAccountMeta(accounts.systemProgram),\n ],\n programAddress,\n data: getCreateIncentiveProgramInstructionDataEncoder().encode(\n args as CreateIncentiveProgramInstructionDataArgs\n ),\n } as CreateIncentiveProgramInstruction<\n TProgramAddress,\n TAccountProgram,\n TAccountCreator,\n TAccountSystemProgram\n >;\n\n return instruction;\n}\n\nexport type ParsedCreateIncentiveProgramInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n program: TAccountMetas[0];\n creator: TAccountMetas[1];\n systemProgram: TAccountMetas[2];\n };\n data: CreateIncentiveProgramInstructionData;\n};\n\nexport function parseCreateIncentiveProgramInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>\n): ParsedCreateIncentiveProgramInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 3) {\n throw new Error('[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts');\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = instruction.accounts![accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n program: getNextAccount(),\n creator: getNextAccount(),\n systemProgram: getNextAccount(),\n },\n data: getCreateIncentiveProgramInstructionDataDecoder().decode(\n instruction.data\n ),\n };\n}\n","/**\n * This code was AUTOGENERATED using the codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n addDecoderSizePrefix,\n addEncoderSizePrefix,\n combineCodec,\n fixDecoderSize,\n fixEncoderSize,\n getAddressDecoder,\n getAddressEncoder,\n getArrayDecoder,\n getArrayEncoder,\n getBytesDecoder,\n getBytesEncoder,\n getI64Decoder,\n getI64Encoder,\n getProgramDerivedAddress,\n getStructDecoder,\n getStructEncoder,\n getU32Decoder,\n getU32Encoder,\n getU64Decoder,\n getU64Encoder,\n getUtf8Decoder,\n getUtf8Encoder,\n transformEncoder,\n type AccountMeta,\n type AccountSignerMeta,\n type Address,\n type Codec,\n type Decoder,\n type Encoder,\n type Instruction,\n type InstructionWithAccounts,\n type InstructionWithData,\n type ReadonlyAccount,\n type ReadonlyUint8Array,\n type TransactionSigner,\n type WritableAccount,\n type WritableSignerAccount,\n} from '@solana/kit';\nimport {\n GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_INSTRUCTION_DATA,\n GHOSTSPEAK_MARKETPLACE_ERROR__MISSING_REQUIRED_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INSTRUCTION_PARSING_FAILED,\n isGhostspeakMarketplaceError,\n} from '../errors';\nimport { GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS } from '../programs';\nimport {\n expectAddress,\n getAccountMetaFactory,\n type ResolvedAccount,\n} from '../shared';\n\nexport const CREATE_JOB_POSTING_DISCRIMINATOR = new Uint8Array([\n 71, 93, 23, 166, 103, 210, 218, 105,\n]);\n\nexport function getCreateJobPostingDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 8).encode(\n CREATE_JOB_POSTING_DISCRIMINATOR\n );\n}\n\nexport type CreateJobPostingInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountJobPosting extends string | AccountMeta<string> = string,\n TAccountEmployer extends string | AccountMeta<string> = string,\n TAccountSystemProgram extends\n | string\n | AccountMeta<string> = '11111111111111111111111111111111',\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountJobPosting extends string\n ? WritableAccount<TAccountJobPosting>\n : TAccountJobPosting,\n TAccountEmployer extends string\n ? WritableSignerAccount<TAccountEmployer> &\n AccountSignerMeta<TAccountEmployer>\n : TAccountEmployer,\n TAccountSystemProgram extends string\n ? ReadonlyAccount<TAccountSystemProgram>\n : TAccountSystemProgram,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type CreateJobPostingInstructionData = {\n discriminator: ReadonlyUint8Array;\n title: string;\n description: string;\n requirements: Array<string>;\n budget: bigint;\n deadline: bigint;\n skillsNeeded: Array<string>;\n budgetMin: bigint;\n budgetMax: bigint;\n paymentToken: Address;\n jobType: string;\n experienceLevel: string;\n};\n\nexport type CreateJobPostingInstructionDataArgs = {\n title: string;\n description: string;\n requirements: Array<string>;\n budget: number | bigint;\n deadline: number | bigint;\n skillsNeeded: Array<string>;\n budgetMin: number | bigint;\n budgetMax: number | bigint;\n paymentToken: Address;\n jobType: string;\n experienceLevel: string;\n};\n\nexport function getCreateJobPostingInstructionDataEncoder(): Encoder<CreateJobPostingInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n ['discriminator', fixEncoderSize(getBytesEncoder(), 8)],\n ['title', addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder())],\n ['description', addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder())],\n [\n 'requirements',\n getArrayEncoder(\n addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder())\n ),\n ],\n ['budget', getU64Encoder()],\n ['deadline', getI64Encoder()],\n [\n 'skillsNeeded',\n getArrayEncoder(\n addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder())\n ),\n ],\n ['budgetMin', getU64Encoder()],\n ['budgetMax', getU64Encoder()],\n ['paymentToken', getAddressEncoder()],\n ['jobType', addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder())],\n [\n 'experienceLevel',\n addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder()),\n ],\n ]),\n (value) => ({ ...value, discriminator: CREATE_JOB_POSTING_DISCRIMINATOR })\n );\n}\n\nexport function getCreateJobPostingInstructionDataDecoder(): Decoder<CreateJobPostingInstructionData> {\n return getStructDecoder([\n ['discriminator', fixDecoderSize(getBytesDecoder(), 8)],\n ['title', addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())],\n ['description', addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())],\n [\n 'requirements',\n getArrayDecoder(addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())),\n ],\n ['budget', getU64Decoder()],\n ['deadline', getI64Decoder()],\n [\n 'skillsNeeded',\n getArrayDecoder(addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())),\n ],\n ['budgetMin', getU64Decoder()],\n ['budgetMax', getU64Decoder()],\n ['paymentToken', getAddressDecoder()],\n ['jobType', addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())],\n [\n 'experienceLevel',\n addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder()),\n ],\n ]);\n}\n\nexport function getCreateJobPostingInstructionDataCodec(): Codec<\n CreateJobPostingInstructionDataArgs,\n CreateJobPostingInstructionData\n> {\n return combineCodec(\n getCreateJobPostingInstructionDataEncoder(),\n getCreateJobPostingInstructionDataDecoder()\n );\n}\n\nexport type CreateJobPostingAsyncInput<\n TAccountJobPosting extends string = string,\n TAccountEmployer extends string = string,\n TAccountSystemProgram extends string = string,\n> = {\n jobPosting?: Address<TAccountJobPosting>;\n employer: TransactionSigner<TAccountEmployer>;\n systemProgram?: Address<TAccountSystemProgram>;\n title: CreateJobPostingInstructionDataArgs['title'];\n description: CreateJobPostingInstructionDataArgs['description'];\n requirements: CreateJobPostingInstructionDataArgs['requirements'];\n budget: CreateJobPostingInstructionDataArgs['budget'];\n deadline: CreateJobPostingInstructionDataArgs['deadline'];\n skillsNeeded: CreateJobPostingInstructionDataArgs['skillsNeeded'];\n budgetMin: CreateJobPostingInstructionDataArgs['budgetMin'];\n budgetMax: CreateJobPostingInstructionDataArgs['budgetMax'];\n paymentToken: CreateJobPostingInstructionDataArgs['paymentToken'];\n jobType: CreateJobPostingInstructionDataArgs['jobType'];\n experienceLevel: CreateJobPostingInstructionDataArgs['experienceLevel'];\n};\n\nexport async function getCreateJobPostingInstructionAsync<\n TAccountJobPosting extends string,\n TAccountEmployer extends string,\n TAccountSystemProgram extends string,\n TProgramAddress extends\n Address = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: CreateJobPostingAsyncInput<\n TAccountJobPosting,\n TAccountEmployer,\n TAccountSystemProgram\n >,\n config?: { programAddress?: TProgramAddress }\n): Promise<\n CreateJobPostingInstruction<\n TProgramAddress,\n TAccountJobPosting,\n TAccountEmployer,\n TAccountSystemProgram\n >\n> {\n // Program address.\n const programAddress =\n config?.programAddress ?? GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n jobPosting: { value: input.jobPosting ?? null, isWritable: true },\n employer: { value: input.employer ?? null, isWritable: true },\n systemProgram: { value: input.systemProgram ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolve default values.\n if (!accounts.jobPosting.value) {\n accounts.jobPosting.value = await getProgramDerivedAddress({\n programAddress,\n seeds: [\n getBytesEncoder().encode(\n new Uint8Array([106, 111, 98, 95, 112, 111, 115, 116, 105, 110, 103])\n ),\n getAddressEncoder().encode(expectAddress(accounts.employer.value)),\n ],\n });\n }\n if (!accounts.systemProgram.value) {\n accounts.systemProgram.value =\n '11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.jobPosting),\n getAccountMeta(accounts.employer),\n getAccountMeta(accounts.systemProgram),\n ],\n programAddress,\n data: getCreateJobPostingInstructionDataEncoder().encode(\n args as CreateJobPostingInstructionDataArgs\n ),\n } as CreateJobPostingInstruction<\n TProgramAddress,\n TAccountJobPosting,\n TAccountEmployer,\n TAccountSystemProgram\n >;\n\n return instruction;\n}\n\nexport type CreateJobPostingInput<\n TAccountJobPosting extends string = string,\n TAccountEmployer extends string = string,\n TAccountSystemProgram extends string = string,\n> = {\n jobPosting: Address<TAccountJobPosting>;\n employer: TransactionSigner<TAccountEmployer>;\n systemProgram?: Address<TAccountSystemProgram>;\n title: CreateJobPostingInstructionDataArgs['title'];\n description: CreateJobPostingInstructionDataArgs['description'];\n requirements: CreateJobPostingInstructionDataArgs['requirements'];\n budget: CreateJobPostingInstructionDataArgs['budget'];\n deadline: CreateJobPostingInstructionDataArgs['deadline'];\n skillsNeeded: CreateJobPostingInstructionDataArgs['skillsNeeded'];\n budgetMin: CreateJobPostingInstructionDataArgs['budgetMin'];\n budgetMax: CreateJobPostingInstructionDataArgs['budgetMax'];\n paymentToken: CreateJobPostingInstructionDataArgs['paymentToken'];\n jobType: CreateJobPostingInstructionDataArgs['jobType'];\n experienceLevel: CreateJobPostingInstructionDataArgs['experienceLevel'];\n};\n\nexport function getCreateJobPostingInstruction<\n TAccountJobPosting extends string,\n TAccountEmployer extends string,\n TAccountSystemProgram extends string,\n TProgramAddress extends\n Address = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: CreateJobPostingInput<\n TAccountJobPosting,\n TAccountEmployer,\n TAccountSystemProgram\n >,\n config?: { programAddress?: TProgramAddress }\n): CreateJobPostingInstruction<\n TProgramAddress,\n TAccountJobPosting,\n TAccountEmployer,\n TAccountSystemProgram\n> {\n // Program address.\n const programAddress =\n config?.programAddress ?? GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n jobPosting: { value: input.jobPosting ?? null, isWritable: true },\n employer: { value: input.employer ?? null, isWritable: true },\n systemProgram: { value: input.systemProgram ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolve default values.\n if (!accounts.systemProgram.value) {\n accounts.systemProgram.value =\n '11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.jobPosting),\n getAccountMeta(accounts.employer),\n getAccountMeta(accounts.systemProgram),\n ],\n programAddress,\n data: getCreateJobPostingInstructionDataEncoder().encode(\n args as CreateJobPostingInstructionDataArgs\n ),\n } as CreateJobPostingInstruction<\n TProgramAddress,\n TAccountJobPosting,\n TAccountEmployer,\n TAccountSystemProgram\n >;\n\n return instruction;\n}\n\nexport type ParsedCreateJobPostingInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n jobPosting: TAccountMetas[0];\n employer: TAccountMetas[1];\n systemProgram: TAccountMetas[2];\n };\n data: CreateJobPostingInstructionData;\n};\n\nexport function parseCreateJobPostingInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>\n): ParsedCreateJobPostingInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 3) {\n throw new Error('[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts');\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = instruction.accounts![accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n jobPosting: getNextAccount(),\n employer: getNextAccount(),\n systemProgram: getNextAccount(),\n },\n data: getCreateJobPostingInstructionDataDecoder().decode(instruction.data),\n };\n}\n","/**\n * This code was AUTOGENERATED using the codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n combineCodec,\n fixDecoderSize,\n fixEncoderSize,\n getBytesDecoder,\n getBytesEncoder,\n getI64Decoder,\n getI64Encoder,\n getProgramDerivedAddress,\n getStructDecoder,\n getStructEncoder,\n transformEncoder,\n type AccountMeta,\n type AccountSignerMeta,\n type Address,\n type FixedSizeCodec,\n type FixedSizeDecoder,\n type FixedSizeEncoder,\n type Instruction,\n type InstructionWithAccounts,\n type InstructionWithData,\n type ReadonlyAccount,\n type ReadonlyUint8Array,\n type TransactionSigner,\n type WritableAccount,\n type WritableSignerAccount,\n} from '@solana/kit';\nimport {\n GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_INSTRUCTION_DATA,\n GHOSTSPEAK_MARKETPLACE_ERROR__MISSING_REQUIRED_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INSTRUCTION_PARSING_FAILED,\n isGhostspeakMarketplaceError,\n} from '../errors';\nimport { GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS } from '../programs';\nimport {\n expectSome,\n getAccountMetaFactory,\n type ResolvedAccount,\n} from '../shared';\n\nexport const CREATE_MARKET_ANALYTICS_DISCRIMINATOR = new Uint8Array([\n 72, 76, 122, 193, 232, 239, 106, 81,\n]);\n\nexport function getCreateMarketAnalyticsDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 8).encode(\n CREATE_MARKET_ANALYTICS_DISCRIMINATOR\n );\n}\n\nexport type CreateMarketAnalyticsInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountMarketAnalytics extends string | AccountMeta<string> = string,\n TAccountAuthority extends string | AccountMeta<string> = string,\n TAccountSystemProgram extends\n | string\n | AccountMeta<string> = '11111111111111111111111111111111',\n TAccountClock extends\n | string\n | AccountMeta<string> = 'SysvarC1ock11111111111111111111111111111111',\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountMarketAnalytics extends string\n ? WritableAccount<TAccountMarketAnalytics>\n : TAccountMarketAnalytics,\n TAccountAuthority extends string\n ? WritableSignerAccount<TAccountAuthority> &\n AccountSignerMeta<TAccountAuthority>\n : TAccountAuthority,\n TAccountSystemProgram extends string\n ? ReadonlyAccount<TAccountSystemProgram>\n : TAccountSystemProgram,\n TAccountClock extends string\n ? ReadonlyAccount<TAccountClock>\n : TAccountClock,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type CreateMarketAnalyticsInstructionData = {\n discriminator: ReadonlyUint8Array;\n periodStart: bigint;\n periodEnd: bigint;\n};\n\nexport type CreateMarketAnalyticsInstructionDataArgs = {\n periodStart: number | bigint;\n periodEnd: number | bigint;\n};\n\nexport function getCreateMarketAnalyticsInstructionDataEncoder(): FixedSizeEncoder<CreateMarketAnalyticsInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n ['discriminator', fixEncoderSize(getBytesEncoder(), 8)],\n ['periodStart', getI64Encoder()],\n ['periodEnd', getI64Encoder()],\n ]),\n (value) => ({\n ...value,\n discriminator: CREATE_MARKET_ANALYTICS_DISCRIMINATOR,\n })\n );\n}\n\nexport function getCreateMarketAnalyticsInstructionDataDecoder(): FixedSizeDecoder<CreateMarketAnalyticsInstructionData> {\n return getStructDecoder([\n ['discriminator', fixDecoderSize(getBytesDecoder(), 8)],\n ['periodStart', getI64Decoder()],\n ['periodEnd', getI64Decoder()],\n ]);\n}\n\nexport function getCreateMarketAnalyticsInstructionDataCodec(): FixedSizeCodec<\n CreateMarketAnalyticsInstructionDataArgs,\n CreateMarketAnalyticsInstructionData\n> {\n return combineCodec(\n getCreateMarketAnalyticsInstructionDataEncoder(),\n getCreateMarketAnalyticsInstructionDataDecoder()\n );\n}\n\nexport type CreateMarketAnalyticsAsyncInput<\n TAccountMarketAnalytics extends string = string,\n TAccountAuthority extends string = string,\n TAccountSystemProgram extends string = string,\n TAccountClock extends string = string,\n> = {\n /** Market analytics account with enhanced PDA security */\n marketAnalytics?: Address<TAccountMarketAnalytics>;\n /** Enhanced authority verification - must be protocol admin */\n authority: TransactionSigner<TAccountAuthority>;\n /** System program for account creation */\n systemProgram?: Address<TAccountSystemProgram>;\n /** Clock sysvar for timestamp validation */\n clock?: Address<TAccountClock>;\n periodStart: CreateMarketAnalyticsInstructionDataArgs['periodStart'];\n periodEnd: CreateMarketAnalyticsInstructionDataArgs['periodEnd'];\n};\n\nexport async function getCreateMarketAnalyticsInstructionAsync<\n TAccountMarketAnalytics extends string,\n TAccountAuthority extends string,\n TAccountSystemProgram extends string,\n TAccountClock extends string,\n TProgramAddress extends\n Address = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: CreateMarketAnalyticsAsyncInput<\n TAccountMarketAnalytics,\n TAccountAuthority,\n TAccountSystemProgram,\n TAccountClock\n >,\n config?: { programAddress?: TProgramAddress }\n): Promise<\n CreateMarketAnalyticsInstruction<\n TProgramAddress,\n TAccountMarketAnalytics,\n TAccountAuthority,\n TAccountSystemProgram,\n TAccountClock\n >\n> {\n // Program address.\n const programAddress =\n config?.programAddress ?? GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n marketAnalytics: { value: input.marketAnalytics ?? null, isWritable: true },\n authority: { value: input.authority ?? null, isWritable: true },\n systemProgram: { value: input.systemProgram ?? null, isWritable: false },\n clock: { value: input.clock ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolve default values.\n if (!accounts.marketAnalytics.value) {\n accounts.marketAnalytics.value = await getProgramDerivedAddress({\n programAddress,\n seeds: [\n getBytesEncoder().encode(\n new Uint8Array([\n 109, 97, 114, 107, 101, 116, 95, 97, 110, 97, 108, 121, 116, 105,\n 99, 115,\n ])\n ),\n getI64Encoder().encode(expectSome(args.periodStart)),\n getI64Encoder().encode(expectSome(args.periodEnd)),\n ],\n });\n }\n if (!accounts.systemProgram.value) {\n accounts.systemProgram.value =\n '11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>;\n }\n if (!accounts.clock.value) {\n accounts.clock.value =\n 'SysvarC1ock11111111111111111111111111111111' as Address<'SysvarC1ock11111111111111111111111111111111'>;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.marketAnalytics),\n getAccountMeta(accounts.authority),\n getAccountMeta(accounts.systemProgram),\n getAccountMeta(accounts.clock),\n ],\n programAddress,\n data: getCreateMarketAnalyticsInstructionDataEncoder().encode(\n args as CreateMarketAnalyticsInstructionDataArgs\n ),\n } as CreateMarketAnalyticsInstruction<\n TProgramAddress,\n TAccountMarketAnalytics,\n TAccountAuthority,\n TAccountSystemProgram,\n TAccountClock\n >;\n\n return instruction;\n}\n\nexport type CreateMarketAnalyticsInput<\n TAccountMarketAnalytics extends string = string,\n TAccountAuthority extends string = string,\n TAccountSystemProgram extends string = string,\n TAccountClock extends string = string,\n> = {\n /** Market analytics account with enhanced PDA security */\n marketAnalytics: Address<TAccountMarketAnalytics>;\n /** Enhanced authority verification - must be protocol admin */\n authority: TransactionSigner<TAccountAuthority>;\n /** System program for account creation */\n systemProgram?: Address<TAccountSystemProgram>;\n /** Clock sysvar for timestamp validation */\n clock?: Address<TAccountClock>;\n periodStart: CreateMarketAnalyticsInstructionDataArgs['periodStart'];\n periodEnd: CreateMarketAnalyticsInstructionDataArgs['periodEnd'];\n};\n\nexport function getCreateMarketAnalyticsInstruction<\n TAccountMarketAnalytics extends string,\n TAccountAuthority extends string,\n TAccountSystemProgram extends string,\n TAccountClock extends string,\n TProgramAddress extends\n Address = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: CreateMarketAnalyticsInput<\n TAccountMarketAnalytics,\n TAccountAuthority,\n TAccountSystemProgram,\n TAccountClock\n >,\n config?: { programAddress?: TProgramAddress }\n): CreateMarketAnalyticsInstruction<\n TProgramAddress,\n TAccountMarketAnalytics,\n TAccountAuthority,\n TAccountSystemProgram,\n TAccountClock\n> {\n // Program address.\n const programAddress =\n config?.programAddress ?? GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n marketAnalytics: { value: input.marketAnalytics ?? null, isWritable: true },\n authority: { value: input.authority ?? null, isWritable: true },\n systemProgram: { value: input.systemProgram ?? null, isWritable: false },\n clock: { value: input.clock ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolve default values.\n if (!accounts.systemProgram.value) {\n accounts.systemProgram.value =\n '11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>;\n }\n if (!accounts.clock.value) {\n accounts.clock.value =\n 'SysvarC1ock11111111111111111111111111111111' as Address<'SysvarC1ock11111111111111111111111111111111'>;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.marketAnalytics),\n getAccountMeta(accounts.authority),\n getAccountMeta(accounts.systemProgram),\n getAccountMeta(accounts.clock),\n ],\n programAddress,\n data: getCreateMarketAnalyticsInstructionDataEncoder().encode(\n args as CreateMarketAnalyticsInstructionDataArgs\n ),\n } as CreateMarketAnalyticsInstruction<\n TProgramAddress,\n TAccountMarketAnalytics,\n TAccountAuthority,\n TAccountSystemProgram,\n TAccountClock\n >;\n\n return instruction;\n}\n\nexport type ParsedCreateMarketAnalyticsInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n /** Market analytics account with enhanced PDA security */\n marketAnalytics: TAccountMetas[0];\n /** Enhanced authority verification - must be protocol admin */\n authority: TAccountMetas[1];\n /** System program for account creation */\n systemProgram: TAccountMetas[2];\n /** Clock sysvar for timestamp validation */\n clock: TAccountMetas[3];\n };\n data: CreateMarketAnalyticsInstructionData;\n};\n\nexport function parseCreateMarketAnalyticsInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>\n): ParsedCreateMarketAnalyticsInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 4) {\n throw new Error('[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts');\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = instruction.accounts![accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n marketAnalytics: getNextAccount(),\n authority: getNextAccount(),\n systemProgram: getNextAccount(),\n clock: getNextAccount(),\n },\n data: getCreateMarketAnalyticsInstructionDataDecoder().decode(\n instruction.data\n ),\n };\n}\n","/**\n * This code was AUTOGENERATED using the codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n combineCodec,\n fixDecoderSize,\n fixEncoderSize,\n getAddressDecoder,\n getAddressEncoder,\n getArrayDecoder,\n getArrayEncoder,\n getBytesDecoder,\n getBytesEncoder,\n getProgramDerivedAddress,\n getStructDecoder,\n getStructEncoder,\n getU64Decoder,\n getU64Encoder,\n getU8Decoder,\n getU8Encoder,\n transformEncoder,\n type AccountMeta,\n type AccountSignerMeta,\n type Address,\n type Codec,\n type Decoder,\n type Encoder,\n type Instruction,\n type InstructionWithAccounts,\n type InstructionWithData,\n type ReadonlyAccount,\n type ReadonlyUint8Array,\n type TransactionSigner,\n type WritableAccount,\n type WritableSignerAccount,\n} from '@solana/kit';\nimport {\n GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_INSTRUCTION_DATA,\n GHOSTSPEAK_MARKETPLACE_ERROR__MISSING_REQUIRED_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INSTRUCTION_PARSING_FAILED,\n isGhostspeakMarketplaceError,\n} from '../errors';\nimport { GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS } from '../programs';\nimport {\n expectAddress,\n expectSome,\n getAccountMetaFactory,\n type ResolvedAccount,\n} from '../shared';\nimport {\n getMultisigConfigDecoder,\n getMultisigConfigEncoder,\n type MultisigConfig,\n type MultisigConfigArgs,\n} from '../types';\n\nexport const CREATE_MULTISIG_DISCRIMINATOR = new Uint8Array([\n 148, 146, 240, 10, 226, 215, 167, 174,\n]);\n\nexport function getCreateMultisigDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 8).encode(\n CREATE_MULTISIG_DISCRIMINATOR\n );\n}\n\nexport type CreateMultisigInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountMultisig extends string | AccountMeta<string> = string,\n TAccountOwner extends string | AccountMeta<string> = string,\n TAccountSystemProgram extends\n | string\n | AccountMeta<string> = '11111111111111111111111111111111',\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountMultisig extends string\n ? WritableAccount<TAccountMultisig>\n : TAccountMultisig,\n TAccountOwner extends string\n ? WritableSignerAccount<TAccountOwner> &\n AccountSignerMeta<TAccountOwner>\n : TAccountOwner,\n TAccountSystemProgram extends string\n ? ReadonlyAccount<TAccountSystemProgram>\n : TAccountSystemProgram,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type CreateMultisigInstructionData = {\n discriminator: ReadonlyUint8Array;\n multisigId: bigint;\n threshold: number;\n signers: Array<Address>;\n config: MultisigConfig;\n};\n\nexport type CreateMultisigInstructionDataArgs = {\n multisigId: number | bigint;\n threshold: number;\n signers: Array<Address>;\n config: MultisigConfigArgs;\n};\n\nexport function getCreateMultisigInstructionDataEncoder(): Encoder<CreateMultisigInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n ['discriminator', fixEncoderSize(getBytesEncoder(), 8)],\n ['multisigId', getU64Encoder()],\n ['threshold', getU8Encoder()],\n ['signers', getArrayEncoder(getAddressEncoder())],\n ['config', getMultisigConfigEncoder()],\n ]),\n (value) => ({ ...value, discriminator: CREATE_MULTISIG_DISCRIMINATOR })\n );\n}\n\nexport function getCreateMultisigInstructionDataDecoder(): Decoder<CreateMultisigInstructionData> {\n return getStructDecoder([\n ['discriminator', fixDecoderSize(getBytesDecoder(), 8)],\n ['multisigId', getU64Decoder()],\n ['threshold', getU8Decoder()],\n ['signers', getArrayDecoder(getAddressDecoder())],\n ['config', getMultisigConfigDecoder()],\n ]);\n}\n\nexport function getCreateMultisigInstructionDataCodec(): Codec<\n CreateMultisigInstructionDataArgs,\n CreateMultisigInstructionData\n> {\n return combineCodec(\n getCreateMultisigInstructionDataEncoder(),\n getCreateMultisigInstructionDataDecoder()\n );\n}\n\nexport type CreateMultisigAsyncInput<\n TAccountMultisig extends string = string,\n TAccountOwner extends string = string,\n TAccountSystemProgram extends string = string,\n> = {\n multisig?: Address<TAccountMultisig>;\n owner: TransactionSigner<TAccountOwner>;\n systemProgram?: Address<TAccountSystemProgram>;\n multisigId: CreateMultisigInstructionDataArgs['multisigId'];\n threshold: CreateMultisigInstructionDataArgs['threshold'];\n signers: CreateMultisigInstructionDataArgs['signers'];\n config: CreateMultisigInstructionDataArgs['config'];\n};\n\nexport async function getCreateMultisigInstructionAsync<\n TAccountMultisig extends string,\n TAccountOwner extends string,\n TAccountSystemProgram extends string,\n TProgramAddress extends\n Address = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: CreateMultisigAsyncInput<\n TAccountMultisig,\n TAccountOwner,\n TAccountSystemProgram\n >,\n config?: { programAddress?: TProgramAddress }\n): Promise<\n CreateMultisigInstruction<\n TProgramAddress,\n TAccountMultisig,\n TAccountOwner,\n TAccountSystemProgram\n >\n> {\n // Program address.\n const programAddress =\n config?.programAddress ?? GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n multisig: { value: input.multisig ?? null, isWritable: true },\n owner: { value: input.owner ?? null, isWritable: true },\n systemProgram: { value: input.systemProgram ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolve default values.\n if (!accounts.multisig.value) {\n accounts.multisig.value = await getProgramDerivedAddress({\n programAddress,\n seeds: [\n getBytesEncoder().encode(\n new Uint8Array([109, 117, 108, 116, 105, 115, 105, 103])\n ),\n getAddressEncoder().encode(expectAddress(accounts.owner.value)),\n getU64Encoder().encode(expectSome(args.multisigId)),\n ],\n });\n }\n if (!accounts.systemProgram.value) {\n accounts.systemProgram.value =\n '11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.multisig),\n getAccountMeta(accounts.owner),\n getAccountMeta(accounts.systemProgram),\n ],\n programAddress,\n data: getCreateMultisigInstructionDataEncoder().encode(\n args as CreateMultisigInstructionDataArgs\n ),\n } as CreateMultisigInstruction<\n TProgramAddress,\n TAccountMultisig,\n TAccountOwner,\n TAccountSystemProgram\n >;\n\n return instruction;\n}\n\nexport type CreateMultisigInput<\n TAccountMultisig extends string = string,\n TAccountOwner extends string = string,\n TAccountSystemProgram extends string = string,\n> = {\n multisig: Address<TAccountMultisig>;\n owner: TransactionSigner<TAccountOwner>;\n systemProgram?: Address<TAccountSystemProgram>;\n multisigId: CreateMultisigInstructionDataArgs['multisigId'];\n threshold: CreateMultisigInstructionDataArgs['threshold'];\n signers: CreateMultisigInstructionDataArgs['signers'];\n config: CreateMultisigInstructionDataArgs['config'];\n};\n\nexport function getCreateMultisigInstruction<\n TAccountMultisig extends string,\n TAccountOwner extends string,\n TAccountSystemProgram extends string,\n TProgramAddress extends\n Address = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: CreateMultisigInput<\n TAccountMultisig,\n TAccountOwner,\n TAccountSystemProgram\n >,\n config?: { programAddress?: TProgramAddress }\n): CreateMultisigInstruction<\n TProgramAddress,\n TAccountMultisig,\n TAccountOwner,\n TAccountSystemProgram\n> {\n // Program address.\n const programAddress =\n config?.programAddress ?? GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n multisig: { value: input.multisig ?? null, isWritable: true },\n owner: { value: input.owner ?? null, isWritable: true },\n systemProgram: { value: input.systemProgram ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolve default values.\n if (!accounts.systemProgram.value) {\n accounts.systemProgram.value =\n '11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.multisig),\n getAccountMeta(accounts.owner),\n getAccountMeta(accounts.systemProgram),\n ],\n programAddress,\n data: getCreateMultisigInstructionDataEncoder().encode(\n args as CreateMultisigInstructionDataArgs\n ),\n } as CreateMultisigInstruction<\n TProgramAddress,\n TAccountMultisig,\n TAccountOwner,\n TAccountSystemProgram\n >;\n\n return instruction;\n}\n\nexport type ParsedCreateMultisigInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n multisig: TAccountMetas[0];\n owner: TAccountMetas[1];\n systemProgram: TAccountMetas[2];\n };\n data: CreateMultisigInstructionData;\n};\n\nexport function parseCreateMultisigInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>\n): ParsedCreateMultisigInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 3) {\n throw new Error('[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts');\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = instruction.accounts![accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n multisig: getNextAccount(),\n owner: getNextAccount(),\n systemProgram: getNextAccount(),\n },\n data: getCreateMultisigInstructionDataDecoder().decode(instruction.data),\n };\n}\n","/**\n * This code was AUTOGENERATED using the codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n addDecoderSizePrefix,\n addEncoderSizePrefix,\n combineCodec,\n fixDecoderSize,\n fixEncoderSize,\n getAddressEncoder,\n getArrayDecoder,\n getArrayEncoder,\n getBytesDecoder,\n getBytesEncoder,\n getProgramDerivedAddress,\n getStructDecoder,\n getStructEncoder,\n getU32Decoder,\n getU32Encoder,\n getU64Decoder,\n getU64Encoder,\n getUtf8Decoder,\n getUtf8Encoder,\n transformEncoder,\n type AccountMeta,\n type AccountSignerMeta,\n type Address,\n type Codec,\n type Decoder,\n type Encoder,\n type Instruction,\n type InstructionWithAccounts,\n type InstructionWithData,\n type ReadonlyAccount,\n type ReadonlyUint8Array,\n type TransactionSigner,\n type WritableAccount,\n type WritableSignerAccount,\n} from '@solana/kit';\nimport {\n GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_INSTRUCTION_DATA,\n GHOSTSPEAK_MARKETPLACE_ERROR__MISSING_REQUIRED_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INSTRUCTION_PARSING_FAILED,\n isGhostspeakMarketplaceError,\n} from '../errors';\nimport { GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS } from '../programs';\nimport {\n expectAddress,\n getAccountMetaFactory,\n type ResolvedAccount,\n} from '../shared';\n\nexport const CREATE_REPLICATION_TEMPLATE_DISCRIMINATOR = new Uint8Array([\n 58, 37, 131, 238, 116, 165, 200, 193,\n]);\n\nexport function getCreateReplicationTemplateDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 8).encode(\n CREATE_REPLICATION_TEMPLATE_DISCRIMINATOR\n );\n}\n\nexport type CreateReplicationTemplateInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountReplicationTemplate extends string | AccountMeta<string> = string,\n TAccountSourceAgent extends string | AccountMeta<string> = string,\n TAccountCreator extends string | AccountMeta<string> = string,\n TAccountClock extends\n | string\n | AccountMeta<string> = 'SysvarC1ock11111111111111111111111111111111',\n TAccountSystemProgram extends\n | string\n | AccountMeta<string> = '11111111111111111111111111111111',\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountReplicationTemplate extends string\n ? WritableAccount<TAccountReplicationTemplate>\n : TAccountReplicationTemplate,\n TAccountSourceAgent extends string\n ? ReadonlyAccount<TAccountSourceAgent>\n : TAccountSourceAgent,\n TAccountCreator extends string\n ? WritableSignerAccount<TAccountCreator> &\n AccountSignerMeta<TAccountCreator>\n : TAccountCreator,\n TAccountClock extends string\n ? ReadonlyAccount<TAccountClock>\n : TAccountClock,\n TAccountSystemProgram extends string\n ? ReadonlyAccount<TAccountSystemProgram>\n : TAccountSystemProgram,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type CreateReplicationTemplateInstructionData = {\n discriminator: ReadonlyUint8Array;\n genomeHash: string;\n baseCapabilities: Array<string>;\n replicationFee: bigint;\n maxReplications: number;\n};\n\nexport type CreateReplicationTemplateInstructionDataArgs = {\n genomeHash: string;\n baseCapabilities: Array<string>;\n replicationFee: number | bigint;\n maxReplications: number;\n};\n\nexport function getCreateReplicationTemplateInstructionDataEncoder(): Encoder<CreateReplicationTemplateInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n ['discriminator', fixEncoderSize(getBytesEncoder(), 8)],\n ['genomeHash', addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder())],\n [\n 'baseCapabilities',\n getArrayEncoder(\n addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder())\n ),\n ],\n ['replicationFee', getU64Encoder()],\n ['maxReplications', getU32Encoder()],\n ]),\n (value) => ({\n ...value,\n discriminator: CREATE_REPLICATION_TEMPLATE_DISCRIMINATOR,\n })\n );\n}\n\nexport function getCreateReplicationTemplateInstructionDataDecoder(): Decoder<CreateReplicationTemplateInstructionData> {\n return getStructDecoder([\n ['discriminator', fixDecoderSize(getBytesDecoder(), 8)],\n ['genomeHash', addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())],\n [\n 'baseCapabilities',\n getArrayDecoder(addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())),\n ],\n ['replicationFee', getU64Decoder()],\n ['maxReplications', getU32Decoder()],\n ]);\n}\n\nexport function getCreateReplicationTemplateInstructionDataCodec(): Codec<\n CreateReplicationTemplateInstructionDataArgs,\n CreateReplicationTemplateInstructionData\n> {\n return combineCodec(\n getCreateReplicationTemplateInstructionDataEncoder(),\n getCreateReplicationTemplateInstructionDataDecoder()\n );\n}\n\nexport type CreateReplicationTemplateAsyncInput<\n TAccountReplicationTemplate extends string = string,\n TAccountSourceAgent extends string = string,\n TAccountCreator extends string = string,\n TAccountClock extends string = string,\n TAccountSystemProgram extends string = string,\n> = {\n replicationTemplate?: Address<TAccountReplicationTemplate>;\n sourceAgent: Address<TAccountSourceAgent>;\n creator: TransactionSigner<TAccountCreator>;\n clock?: Address<TAccountClock>;\n systemProgram?: Address<TAccountSystemProgram>;\n genomeHash: CreateReplicationTemplateInstructionDataArgs['genomeHash'];\n baseCapabilities: CreateReplicationTemplateInstructionDataArgs['baseCapabilities'];\n replicationFee: CreateReplicationTemplateInstructionDataArgs['replicationFee'];\n maxReplications: CreateReplicationTemplateInstructionDataArgs['maxReplications'];\n};\n\nexport async function getCreateReplicationTemplateInstructionAsync<\n TAccountReplicationTemplate extends string,\n TAccountSourceAgent extends string,\n TAccountCreator extends string,\n TAccountClock extends string,\n TAccountSystemProgram extends string,\n TProgramAddress extends\n Address = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: CreateReplicationTemplateAsyncInput<\n TAccountReplicationTemplate,\n TAccountSourceAgent,\n TAccountCreator,\n TAccountClock,\n TAccountSystemProgram\n >,\n config?: { programAddress?: TProgramAddress }\n): Promise<\n CreateReplicationTemplateInstruction<\n TProgramAddress,\n TAccountReplicationTemplate,\n TAccountSourceAgent,\n TAccountCreator,\n TAccountClock,\n TAccountSystemProgram\n >\n> {\n // Program address.\n const programAddress =\n config?.programAddress ?? GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n replicationTemplate: {\n value: input.replicationTemplate ?? null,\n isWritable: true,\n },\n sourceAgent: { value: input.sourceAgent ?? null, isWritable: false },\n creator: { value: input.creator ?? null, isWritable: true },\n clock: { value: input.clock ?? null, isWritable: false },\n systemProgram: { value: input.systemProgram ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolve default values.\n if (!accounts.replicationTemplate.value) {\n accounts.replicationTemplate.value = await getProgramDerivedAddress({\n programAddress,\n seeds: [\n getBytesEncoder().encode(\n new Uint8Array([\n 114, 101, 112, 108, 105, 99, 97, 116, 105, 111, 110, 95, 116, 101,\n 109, 112, 108, 97, 116, 101,\n ])\n ),\n getAddressEncoder().encode(expectAddress(accounts.sourceAgent.value)),\n ],\n });\n }\n if (!accounts.clock.value) {\n accounts.clock.value =\n 'SysvarC1ock11111111111111111111111111111111' as Address<'SysvarC1ock11111111111111111111111111111111'>;\n }\n if (!accounts.systemProgram.value) {\n accounts.systemProgram.value =\n '11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.replicationTemplate),\n getAccountMeta(accounts.sourceAgent),\n getAccountMeta(accounts.creator),\n getAccountMeta(accounts.clock),\n getAccountMeta(accounts.systemProgram),\n ],\n programAddress,\n data: getCreateReplicationTemplateInstructionDataEncoder().encode(\n args as CreateReplicationTemplateInstructionDataArgs\n ),\n } as CreateReplicationTemplateInstruction<\n TProgramAddress,\n TAccountReplicationTemplate,\n TAccountSourceAgent,\n TAccountCreator,\n TAccountClock,\n TAccountSystemProgram\n >;\n\n return instruction;\n}\n\nexport type CreateReplicationTemplateInput<\n TAccountReplicationTemplate extends string = string,\n TAccountSourceAgent extends string = string,\n TAccountCreator extends string = string,\n TAccountClock extends string = string,\n TAccountSystemProgram extends string = string,\n> = {\n replicationTemplate: Address<TAccountReplicationTemplate>;\n sourceAgent: Address<TAccountSourceAgent>;\n creator: TransactionSigner<TAccountCreator>;\n clock?: Address<TAccountClock>;\n systemProgram?: Address<TAccountSystemProgram>;\n genomeHash: CreateReplicationTemplateInstructionDataArgs['genomeHash'];\n baseCapabilities: CreateReplicationTemplateInstructionDataArgs['baseCapabilities'];\n replicationFee: CreateReplicationTemplateInstructionDataArgs['replicationFee'];\n maxReplications: CreateReplicationTemplateInstructionDataArgs['maxReplications'];\n};\n\nexport function getCreateReplicationTemplateInstruction<\n TAccountReplicationTemplate extends string,\n TAccountSourceAgent extends string,\n TAccountCreator extends string,\n TAccountClock extends string,\n TAccountSystemProgram extends string,\n TProgramAddress extends\n Address = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: CreateReplicationTemplateInput<\n TAccountReplicationTemplate,\n TAccountSourceAgent,\n TAccountCreator,\n TAccountClock,\n TAccountSystemProgram\n >,\n config?: { programAddress?: TProgramAddress }\n): CreateReplicationTemplateInstruction<\n TProgramAddress,\n TAccountReplicationTemplate,\n TAccountSourceAgent,\n TAccountCreator,\n TAccountClock,\n TAccountSystemProgram\n> {\n // Program address.\n const programAddress =\n config?.programAddress ?? GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n replicationTemplate: {\n value: input.replicationTemplate ?? null,\n isWritable: true,\n },\n sourceAgent: { value: input.sourceAgent ?? null, isWritable: false },\n creator: { value: input.creator ?? null, isWritable: true },\n clock: { value: input.clock ?? null, isWritable: false },\n systemProgram: { value: input.systemProgram ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolve default values.\n if (!accounts.clock.value) {\n accounts.clock.value =\n 'SysvarC1ock11111111111111111111111111111111' as Address<'SysvarC1ock11111111111111111111111111111111'>;\n }\n if (!accounts.systemProgram.value) {\n accounts.systemProgram.value =\n '11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.replicationTemplate),\n getAccountMeta(accounts.sourceAgent),\n getAccountMeta(accounts.creator),\n getAccountMeta(accounts.clock),\n getAccountMeta(accounts.systemProgram),\n ],\n programAddress,\n data: getCreateReplicationTemplateInstructionDataEncoder().encode(\n args as CreateReplicationTemplateInstructionDataArgs\n ),\n } as CreateReplicationTemplateInstruction<\n TProgramAddress,\n TAccountReplicationTemplate,\n TAccountSourceAgent,\n TAccountCreator,\n TAccountClock,\n TAccountSystemProgram\n >;\n\n return instruction;\n}\n\nexport type ParsedCreateReplicationTemplateInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n replicationTemplate: TAccountMetas[0];\n sourceAgent: TAccountMetas[1];\n creator: TAccountMetas[2];\n clock: TAccountMetas[3];\n systemProgram: TAccountMetas[4];\n };\n data: CreateReplicationTemplateInstructionData;\n};\n\nexport function parseCreateReplicationTemplateInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>\n): ParsedCreateReplicationTemplateInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 5) {\n throw new Error('[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts');\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = instruction.accounts![accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n replicationTemplate: getNextAccount(),\n sourceAgent: getNextAccount(),\n creator: getNextAccount(),\n clock: getNextAccount(),\n systemProgram: getNextAccount(),\n },\n data: getCreateReplicationTemplateInstructionDataDecoder().decode(\n instruction.data\n ),\n };\n}\n","/**\n * This code was AUTOGENERATED using the codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n combineCodec,\n fixDecoderSize,\n fixEncoderSize,\n getAddressEncoder,\n getBytesDecoder,\n getBytesEncoder,\n getProgramDerivedAddress,\n getStructDecoder,\n getStructEncoder,\n transformEncoder,\n type AccountMeta,\n type AccountSignerMeta,\n type Address,\n type FixedSizeCodec,\n type FixedSizeDecoder,\n type FixedSizeEncoder,\n type Instruction,\n type InstructionWithAccounts,\n type InstructionWithData,\n type ReadonlyAccount,\n type ReadonlyUint8Array,\n type TransactionSigner,\n type WritableAccount,\n type WritableSignerAccount,\n} from '@solana/kit';\nimport {\n GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_INSTRUCTION_DATA,\n GHOSTSPEAK_MARKETPLACE_ERROR__MISSING_REQUIRED_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INSTRUCTION_PARSING_FAILED,\n isGhostspeakMarketplaceError,\n} from '../errors';\nimport { GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS } from '../programs';\nimport {\n expectAddress,\n getAccountMetaFactory,\n type ResolvedAccount,\n} from '../shared';\nimport {\n getRoyaltyConfigDecoder,\n getRoyaltyConfigEncoder,\n type RoyaltyConfig,\n type RoyaltyConfigArgs,\n} from '../types';\n\nexport const CREATE_ROYALTY_STREAM_DISCRIMINATOR = new Uint8Array([\n 139, 213, 158, 201, 140, 251, 236, 89,\n]);\n\nexport function getCreateRoyaltyStreamDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 8).encode(\n CREATE_ROYALTY_STREAM_DISCRIMINATOR\n );\n}\n\nexport type CreateRoyaltyStreamInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountStream extends string | AccountMeta<string> = string,\n TAccountAgent extends string | AccountMeta<string> = string,\n TAccountCreator extends string | AccountMeta<string> = string,\n TAccountSystemProgram extends\n | string\n | AccountMeta<string> = '11111111111111111111111111111111',\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountStream extends string\n ? WritableAccount<TAccountStream>\n : TAccountStream,\n TAccountAgent extends string\n ? ReadonlyAccount<TAccountAgent>\n : TAccountAgent,\n TAccountCreator extends string\n ? WritableSignerAccount<TAccountCreator> &\n AccountSignerMeta<TAccountCreator>\n : TAccountCreator,\n TAccountSystemProgram extends string\n ? ReadonlyAccount<TAccountSystemProgram>\n : TAccountSystemProgram,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type CreateRoyaltyStreamInstructionData = {\n discriminator: ReadonlyUint8Array;\n config: RoyaltyConfig;\n};\n\nexport type CreateRoyaltyStreamInstructionDataArgs = {\n config: RoyaltyConfigArgs;\n};\n\nexport function getCreateRoyaltyStreamInstructionDataEncoder(): FixedSizeEncoder<CreateRoyaltyStreamInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n ['discriminator', fixEncoderSize(getBytesEncoder(), 8)],\n ['config', getRoyaltyConfigEncoder()],\n ]),\n (value) => ({\n ...value,\n discriminator: CREATE_ROYALTY_STREAM_DISCRIMINATOR,\n })\n );\n}\n\nexport function getCreateRoyaltyStreamInstructionDataDecoder(): FixedSizeDecoder<CreateRoyaltyStreamInstructionData> {\n return getStructDecoder([\n ['discriminator', fixDecoderSize(getBytesDecoder(), 8)],\n ['config', getRoyaltyConfigDecoder()],\n ]);\n}\n\nexport function getCreateRoyaltyStreamInstructionDataCodec(): FixedSizeCodec<\n CreateRoyaltyStreamInstructionDataArgs,\n CreateRoyaltyStreamInstructionData\n> {\n return combineCodec(\n getCreateRoyaltyStreamInstructionDataEncoder(),\n getCreateRoyaltyStreamInstructionDataDecoder()\n );\n}\n\nexport type CreateRoyaltyStreamAsyncInput<\n TAccountStream extends string = string,\n TAccountAgent extends string = string,\n TAccountCreator extends string = string,\n TAccountSystemProgram extends string = string,\n> = {\n stream?: Address<TAccountStream>;\n agent: Address<TAccountAgent>;\n creator: TransactionSigner<TAccountCreator>;\n systemProgram?: Address<TAccountSystemProgram>;\n config: CreateRoyaltyStreamInstructionDataArgs['config'];\n};\n\nexport async function getCreateRoyaltyStreamInstructionAsync<\n TAccountStream extends string,\n TAccountAgent extends string,\n TAccountCreator extends string,\n TAccountSystemProgram extends string,\n TProgramAddress extends\n Address = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: CreateRoyaltyStreamAsyncInput<\n TAccountStream,\n TAccountAgent,\n TAccountCreator,\n TAccountSystemProgram\n >,\n config?: { programAddress?: TProgramAddress }\n): Promise<\n CreateRoyaltyStreamInstruction<\n TProgramAddress,\n TAccountStream,\n TAccountAgent,\n TAccountCreator,\n TAccountSystemProgram\n >\n> {\n // Program address.\n const programAddress =\n config?.programAddress ?? GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n stream: { value: input.stream ?? null, isWritable: true },\n agent: { value: input.agent ?? null, isWritable: false },\n creator: { value: input.creator ?? null, isWritable: true },\n systemProgram: { value: input.systemProgram ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolve default values.\n if (!accounts.stream.value) {\n accounts.stream.value = await getProgramDerivedAddress({\n programAddress,\n seeds: [\n getBytesEncoder().encode(\n new Uint8Array([\n 114, 111, 121, 97, 108, 116, 121, 95, 115, 116, 114, 101, 97, 109,\n ])\n ),\n getAddressEncoder().encode(expectAddress(accounts.agent.value)),\n ],\n });\n }\n if (!accounts.systemProgram.value) {\n accounts.systemProgram.value =\n '11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.stream),\n getAccountMeta(accounts.agent),\n getAccountMeta(accounts.creator),\n getAccountMeta(accounts.systemProgram),\n ],\n programAddress,\n data: getCreateRoyaltyStreamInstructionDataEncoder().encode(\n args as CreateRoyaltyStreamInstructionDataArgs\n ),\n } as CreateRoyaltyStreamInstruction<\n TProgramAddress,\n TAccountStream,\n TAccountAgent,\n TAccountCreator,\n TAccountSystemProgram\n >;\n\n return instruction;\n}\n\nexport type CreateRoyaltyStreamInput<\n TAccountStream extends string = string,\n TAccountAgent extends string = string,\n TAccountCreator extends string = string,\n TAccountSystemProgram extends string = string,\n> = {\n stream: Address<TAccountStream>;\n agent: Address<TAccountAgent>;\n creator: TransactionSigner<TAccountCreator>;\n systemProgram?: Address<TAccountSystemProgram>;\n config: CreateRoyaltyStreamInstructionDataArgs['config'];\n};\n\nexport function getCreateRoyaltyStreamInstruction<\n TAccountStream extends string,\n TAccountAgent extends string,\n TAccountCreator extends string,\n TAccountSystemProgram extends string,\n TProgramAddress extends\n Address = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: CreateRoyaltyStreamInput<\n TAccountStream,\n TAccountAgent,\n TAccountCreator,\n TAccountSystemProgram\n >,\n config?: { programAddress?: TProgramAddress }\n): CreateRoyaltyStreamInstruction<\n TProgramAddress,\n TAccountStream,\n TAccountAgent,\n TAccountCreator,\n TAccountSystemProgram\n> {\n // Program address.\n const programAddress =\n config?.programAddress ?? GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n stream: { value: input.stream ?? null, isWritable: true },\n agent: { value: input.agent ?? null, isWritable: false },\n creator: { value: input.creator ?? null, isWritable: true },\n systemProgram: { value: input.systemProgram ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolve default values.\n if (!accounts.systemProgram.value) {\n accounts.systemProgram.value =\n '11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.stream),\n getAccountMeta(accounts.agent),\n getAccountMeta(accounts.creator),\n getAccountMeta(accounts.systemProgram),\n ],\n programAddress,\n data: getCreateRoyaltyStreamInstructionDataEncoder().encode(\n args as CreateRoyaltyStreamInstructionDataArgs\n ),\n } as CreateRoyaltyStreamInstruction<\n TProgramAddress,\n TAccountStream,\n TAccountAgent,\n TAccountCreator,\n TAccountSystemProgram\n >;\n\n return instruction;\n}\n\nexport type ParsedCreateRoyaltyStreamInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n stream: TAccountMetas[0];\n agent: TAccountMetas[1];\n creator: TAccountMetas[2];\n systemProgram: TAccountMetas[3];\n };\n data: CreateRoyaltyStreamInstructionData;\n};\n\nexport function parseCreateRoyaltyStreamInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>\n): ParsedCreateRoyaltyStreamInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 4) {\n throw new Error('[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts');\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = instruction.accounts![accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n stream: getNextAccount(),\n agent: getNextAccount(),\n creator: getNextAccount(),\n systemProgram: getNextAccount(),\n },\n data: getCreateRoyaltyStreamInstructionDataDecoder().decode(\n instruction.data\n ),\n };\n}\n","/**\n * This code was AUTOGENERATED using the codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n combineCodec,\n fixDecoderSize,\n fixEncoderSize,\n getAddressDecoder,\n getAddressEncoder,\n getBooleanDecoder,\n getBooleanEncoder,\n getBytesDecoder,\n getBytesEncoder,\n getI64Decoder,\n getI64Encoder,\n getOptionDecoder,\n getOptionEncoder,\n getProgramDerivedAddress,\n getStructDecoder,\n getStructEncoder,\n getU32Decoder,\n getU32Encoder,\n getU64Decoder,\n getU64Encoder,\n transformEncoder,\n type AccountMeta,\n type AccountSignerMeta,\n type Address,\n type Codec,\n type Decoder,\n type Encoder,\n type Instruction,\n type InstructionWithAccounts,\n type InstructionWithData,\n type Option,\n type OptionOrNullable,\n type ReadonlyAccount,\n type ReadonlyUint8Array,\n type TransactionSigner,\n type WritableAccount,\n type WritableSignerAccount,\n} from '@solana/kit';\nimport {\n GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_INSTRUCTION_DATA,\n GHOSTSPEAK_MARKETPLACE_ERROR__MISSING_REQUIRED_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INSTRUCTION_PARSING_FAILED,\n isGhostspeakMarketplaceError,\n} from '../errors';\nimport { GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS } from '../programs';\nimport {\n expectAddress,\n getAccountMetaFactory,\n type ResolvedAccount,\n} from '../shared';\nimport {\n getAuctionTypeDecoder,\n getAuctionTypeEncoder,\n getDutchAuctionConfigDecoder,\n getDutchAuctionConfigEncoder,\n type AuctionType,\n type AuctionTypeArgs,\n type DutchAuctionConfig,\n type DutchAuctionConfigArgs,\n} from '../types';\n\nexport const CREATE_SERVICE_AUCTION_DISCRIMINATOR = new Uint8Array([\n 236, 178, 59, 67, 226, 82, 27, 209,\n]);\n\nexport function getCreateServiceAuctionDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 8).encode(\n CREATE_SERVICE_AUCTION_DISCRIMINATOR\n );\n}\n\nexport type CreateServiceAuctionInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountAuction extends string | AccountMeta<string> = string,\n TAccountAgent extends string | AccountMeta<string> = string,\n TAccountUserRegistry extends string | AccountMeta<string> = string,\n TAccountCreator extends string | AccountMeta<string> = string,\n TAccountSystemProgram extends\n | string\n | AccountMeta<string> = '11111111111111111111111111111111',\n TAccountClock extends\n | string\n | AccountMeta<string> = 'SysvarC1ock11111111111111111111111111111111',\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountAuction extends string\n ? WritableAccount<TAccountAuction>\n : TAccountAuction,\n TAccountAgent extends string\n ? ReadonlyAccount<TAccountAgent>\n : TAccountAgent,\n TAccountUserRegistry extends string\n ? ReadonlyAccount<TAccountUserRegistry>\n : TAccountUserRegistry,\n TAccountCreator extends string\n ? WritableSignerAccount<TAccountCreator> &\n AccountSignerMeta<TAccountCreator>\n : TAccountCreator,\n TAccountSystemProgram extends string\n ? ReadonlyAccount<TAccountSystemProgram>\n : TAccountSystemProgram,\n TAccountClock extends string\n ? ReadonlyAccount<TAccountClock>\n : TAccountClock,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type CreateServiceAuctionInstructionData = {\n discriminator: ReadonlyUint8Array;\n auctionType: AuctionType;\n startingPrice: bigint;\n reservePrice: bigint;\n isReserveHidden: boolean;\n currentBid: bigint;\n currentBidder: Option<Address>;\n auctionEndTime: bigint;\n minimumBidIncrement: bigint;\n totalBids: number;\n dutchConfig: Option<DutchAuctionConfig>;\n};\n\nexport type CreateServiceAuctionInstructionDataArgs = {\n auctionType: AuctionTypeArgs;\n startingPrice: number | bigint;\n reservePrice: number | bigint;\n isReserveHidden: boolean;\n currentBid: number | bigint;\n currentBidder: OptionOrNullable<Address>;\n auctionEndTime: number | bigint;\n minimumBidIncrement: number | bigint;\n totalBids: number;\n dutchConfig: OptionOrNullable<DutchAuctionConfigArgs>;\n};\n\nexport function getCreateServiceAuctionInstructionDataEncoder(): Encoder<CreateServiceAuctionInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n ['discriminator', fixEncoderSize(getBytesEncoder(), 8)],\n ['auctionType', getAuctionTypeEncoder()],\n ['startingPrice', getU64Encoder()],\n ['reservePrice', getU64Encoder()],\n ['isReserveHidden', getBooleanEncoder()],\n ['currentBid', getU64Encoder()],\n ['currentBidder', getOptionEncoder(getAddressEncoder())],\n ['auctionEndTime', getI64Encoder()],\n ['minimumBidIncrement', getU64Encoder()],\n ['totalBids', getU32Encoder()],\n ['dutchConfig', getOptionEncoder(getDutchAuctionConfigEncoder())],\n ]),\n (value) => ({\n ...value,\n discriminator: CREATE_SERVICE_AUCTION_DISCRIMINATOR,\n })\n );\n}\n\nexport function getCreateServiceAuctionInstructionDataDecoder(): Decoder<CreateServiceAuctionInstructionData> {\n return getStructDecoder([\n ['discriminator', fixDecoderSize(getBytesDecoder(), 8)],\n ['auctionType', getAuctionTypeDecoder()],\n ['startingPrice', getU64Decoder()],\n ['reservePrice', getU64Decoder()],\n ['isReserveHidden', getBooleanDecoder()],\n ['currentBid', getU64Decoder()],\n ['currentBidder', getOptionDecoder(getAddressDecoder())],\n ['auctionEndTime', getI64Decoder()],\n ['minimumBidIncrement', getU64Decoder()],\n ['totalBids', getU32Decoder()],\n ['dutchConfig', getOptionDecoder(getDutchAuctionConfigDecoder())],\n ]);\n}\n\nexport function getCreateServiceAuctionInstructionDataCodec(): Codec<\n CreateServiceAuctionInstructionDataArgs,\n CreateServiceAuctionInstructionData\n> {\n return combineCodec(\n getCreateServiceAuctionInstructionDataEncoder(),\n getCreateServiceAuctionInstructionDataDecoder()\n );\n}\n\nexport type CreateServiceAuctionAsyncInput<\n TAccountAuction extends string = string,\n TAccountAgent extends string = string,\n TAccountUserRegistry extends string = string,\n TAccountCreator extends string = string,\n TAccountSystemProgram extends string = string,\n TAccountClock extends string = string,\n> = {\n /** Auction account with canonical PDA validation and collision prevention */\n auction?: Address<TAccountAuction>;\n /** Agent account with enhanced constraints */\n agent: Address<TAccountAgent>;\n /** User registry for rate limiting and spam prevention */\n userRegistry: Address<TAccountUserRegistry>;\n /** Enhanced authority verification */\n creator: TransactionSigner<TAccountCreator>;\n /** System program for account creation */\n systemProgram?: Address<TAccountSystemProgram>;\n /** Clock sysvar for timestamp validation */\n clock?: Address<TAccountClock>;\n auctionType: CreateServiceAuctionInstructionDataArgs['auctionType'];\n startingPrice: CreateServiceAuctionInstructionDataArgs['startingPrice'];\n reservePrice: CreateServiceAuctionInstructionDataArgs['reservePrice'];\n isReserveHidden: CreateServiceAuctionInstructionDataArgs['isReserveHidden'];\n currentBid: CreateServiceAuctionInstructionDataArgs['currentBid'];\n currentBidder: CreateServiceAuctionInstructionDataArgs['currentBidder'];\n auctionEndTime: CreateServiceAuctionInstructionDataArgs['auctionEndTime'];\n minimumBidIncrement: CreateServiceAuctionInstructionDataArgs['minimumBidIncrement'];\n totalBids: CreateServiceAuctionInstructionDataArgs['totalBids'];\n dutchConfig: CreateServiceAuctionInstructionDataArgs['dutchConfig'];\n};\n\nexport async function getCreateServiceAuctionInstructionAsync<\n TAccountAuction extends string,\n TAccountAgent extends string,\n TAccountUserRegistry extends string,\n TAccountCreator extends string,\n TAccountSystemProgram extends string,\n TAccountClock extends string,\n TProgramAddress extends\n Address = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: CreateServiceAuctionAsyncInput<\n TAccountAuction,\n TAccountAgent,\n TAccountUserRegistry,\n TAccountCreator,\n TAccountSystemProgram,\n TAccountClock\n >,\n config?: { programAddress?: TProgramAddress }\n): Promise<\n CreateServiceAuctionInstruction<\n TProgramAddress,\n TAccountAuction,\n TAccountAgent,\n TAccountUserRegistry,\n TAccountCreator,\n TAccountSystemProgram,\n TAccountClock\n >\n> {\n // Program address.\n const programAddress =\n config?.programAddress ?? GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n auction: { value: input.auction ?? null, isWritable: true },\n agent: { value: input.agent ?? null, isWritable: false },\n userRegistry: { value: input.userRegistry ?? null, isWritable: false },\n creator: { value: input.creator ?? null, isWritable: true },\n systemProgram: { value: input.systemProgram ?? null, isWritable: false },\n clock: { value: input.clock ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolve default values.\n if (!accounts.auction.value) {\n accounts.auction.value = await getProgramDerivedAddress({\n programAddress,\n seeds: [\n getBytesEncoder().encode(\n new Uint8Array([97, 117, 99, 116, 105, 111, 110])\n ),\n getAddressEncoder().encode(expectAddress(accounts.agent.value)),\n getAddressEncoder().encode(expectAddress(accounts.creator.value)),\n ],\n });\n }\n if (!accounts.systemProgram.value) {\n accounts.systemProgram.value =\n '11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>;\n }\n if (!accounts.clock.value) {\n accounts.clock.value =\n 'SysvarC1ock11111111111111111111111111111111' as Address<'SysvarC1ock11111111111111111111111111111111'>;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.auction),\n getAccountMeta(accounts.agent),\n getAccountMeta(accounts.userRegistry),\n getAccountMeta(accounts.creator),\n getAccountMeta(accounts.systemProgram),\n getAccountMeta(accounts.clock),\n ],\n programAddress,\n data: getCreateServiceAuctionInstructionDataEncoder().encode(\n args as CreateServiceAuctionInstructionDataArgs\n ),\n } as CreateServiceAuctionInstruction<\n TProgramAddress,\n TAccountAuction,\n TAccountAgent,\n TAccountUserRegistry,\n TAccountCreator,\n TAccountSystemProgram,\n TAccountClock\n >;\n\n return instruction;\n}\n\nexport type CreateServiceAuctionInput<\n TAccountAuction extends string = string,\n TAccountAgent extends string = string,\n TAccountUserRegistry extends string = string,\n TAccountCreator extends string = string,\n TAccountSystemProgram extends string = string,\n TAccountClock extends string = string,\n> = {\n /** Auction account with canonical PDA validation and collision prevention */\n auction: Address<TAccountAuction>;\n /** Agent account with enhanced constraints */\n agent: Address<TAccountAgent>;\n /** User registry for rate limiting and spam prevention */\n userRegistry: Address<TAccountUserRegistry>;\n /** Enhanced authority verification */\n creator: TransactionSigner<TAccountCreator>;\n /** System program for account creation */\n systemProgram?: Address<TAccountSystemProgram>;\n /** Clock sysvar for timestamp validation */\n clock?: Address<TAccountClock>;\n auctionType: CreateServiceAuctionInstructionDataArgs['auctionType'];\n startingPrice: CreateServiceAuctionInstructionDataArgs['startingPrice'];\n reservePrice: CreateServiceAuctionInstructionDataArgs['reservePrice'];\n isReserveHidden: CreateServiceAuctionInstructionDataArgs['isReserveHidden'];\n currentBid: CreateServiceAuctionInstructionDataArgs['currentBid'];\n currentBidder: CreateServiceAuctionInstructionDataArgs['currentBidder'];\n auctionEndTime: CreateServiceAuctionInstructionDataArgs['auctionEndTime'];\n minimumBidIncrement: CreateServiceAuctionInstructionDataArgs['minimumBidIncrement'];\n totalBids: CreateServiceAuctionInstructionDataArgs['totalBids'];\n dutchConfig: CreateServiceAuctionInstructionDataArgs['dutchConfig'];\n};\n\nexport function getCreateServiceAuctionInstruction<\n TAccountAuction extends string,\n TAccountAgent extends string,\n TAccountUserRegistry extends string,\n TAccountCreator extends string,\n TAccountSystemProgram extends string,\n TAccountClock extends string,\n TProgramAddress extends\n Address = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: CreateServiceAuctionInput<\n TAccountAuction,\n TAccountAgent,\n TAccountUserRegistry,\n TAccountCreator,\n TAccountSystemProgram,\n TAccountClock\n >,\n config?: { programAddress?: TProgramAddress }\n): CreateServiceAuctionInstruction<\n TProgramAddress,\n TAccountAuction,\n TAccountAgent,\n TAccountUserRegistry,\n TAccountCreator,\n TAccountSystemProgram,\n TAccountClock\n> {\n // Program address.\n const programAddress =\n config?.programAddress ?? GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n auction: { value: input.auction ?? null, isWritable: true },\n agent: { value: input.agent ?? null, isWritable: false },\n userRegistry: { value: input.userRegistry ?? null, isWritable: false },\n creator: { value: input.creator ?? null, isWritable: true },\n systemProgram: { value: input.systemProgram ?? null, isWritable: false },\n clock: { value: input.clock ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolve default values.\n if (!accounts.systemProgram.value) {\n accounts.systemProgram.value =\n '11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>;\n }\n if (!accounts.clock.value) {\n accounts.clock.value =\n 'SysvarC1ock11111111111111111111111111111111' as Address<'SysvarC1ock11111111111111111111111111111111'>;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.auction),\n getAccountMeta(accounts.agent),\n getAccountMeta(accounts.userRegistry),\n getAccountMeta(accounts.creator),\n getAccountMeta(accounts.systemProgram),\n getAccountMeta(accounts.clock),\n ],\n programAddress,\n data: getCreateServiceAuctionInstructionDataEncoder().encode(\n args as CreateServiceAuctionInstructionDataArgs\n ),\n } as CreateServiceAuctionInstruction<\n TProgramAddress,\n TAccountAuction,\n TAccountAgent,\n TAccountUserRegistry,\n TAccountCreator,\n TAccountSystemProgram,\n TAccountClock\n >;\n\n return instruction;\n}\n\nexport type ParsedCreateServiceAuctionInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n /** Auction account with canonical PDA validation and collision prevention */\n auction: TAccountMetas[0];\n /** Agent account with enhanced constraints */\n agent: TAccountMetas[1];\n /** User registry for rate limiting and spam prevention */\n userRegistry: TAccountMetas[2];\n /** Enhanced authority verification */\n creator: TAccountMetas[3];\n /** System program for account creation */\n systemProgram: TAccountMetas[4];\n /** Clock sysvar for timestamp validation */\n clock: TAccountMetas[5];\n };\n data: CreateServiceAuctionInstructionData;\n};\n\nexport function parseCreateServiceAuctionInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>\n): ParsedCreateServiceAuctionInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 6) {\n throw new Error('[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts');\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = instruction.accounts![accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n auction: getNextAccount(),\n agent: getNextAccount(),\n userRegistry: getNextAccount(),\n creator: getNextAccount(),\n systemProgram: getNextAccount(),\n clock: getNextAccount(),\n },\n data: getCreateServiceAuctionInstructionDataDecoder().decode(\n instruction.data\n ),\n };\n}\n","/**\n * This code was AUTOGENERATED using the codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n addDecoderSizePrefix,\n addEncoderSizePrefix,\n combineCodec,\n fixDecoderSize,\n fixEncoderSize,\n getAddressDecoder,\n getAddressEncoder,\n getArrayDecoder,\n getArrayEncoder,\n getBytesDecoder,\n getBytesEncoder,\n getI64Decoder,\n getI64Encoder,\n getProgramDerivedAddress,\n getStructDecoder,\n getStructEncoder,\n getU32Decoder,\n getU32Encoder,\n getU64Decoder,\n getU64Encoder,\n getUtf8Decoder,\n getUtf8Encoder,\n transformEncoder,\n type AccountMeta,\n type AccountSignerMeta,\n type Address,\n type Codec,\n type Decoder,\n type Encoder,\n type Instruction,\n type InstructionWithAccounts,\n type InstructionWithData,\n type ReadonlyAccount,\n type ReadonlyUint8Array,\n type TransactionSigner,\n type WritableAccount,\n type WritableSignerAccount,\n} from '@solana/kit';\nimport {\n GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_INSTRUCTION_DATA,\n GHOSTSPEAK_MARKETPLACE_ERROR__MISSING_REQUIRED_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INSTRUCTION_PARSING_FAILED,\n isGhostspeakMarketplaceError,\n} from '../errors';\nimport { GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS } from '../programs';\nimport {\n expectAddress,\n expectSome,\n getAccountMetaFactory,\n type ResolvedAccount,\n} from '../shared';\n\nexport const CREATE_SERVICE_LISTING_DISCRIMINATOR = new Uint8Array([\n 91, 37, 216, 26, 93, 146, 13, 182,\n]);\n\nexport function getCreateServiceListingDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 8).encode(\n CREATE_SERVICE_LISTING_DISCRIMINATOR\n );\n}\n\nexport type CreateServiceListingInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountServiceListing extends string | AccountMeta<string> = string,\n TAccountAgent extends string | AccountMeta<string> = string,\n TAccountUserRegistry extends string | AccountMeta<string> = string,\n TAccountCreator extends string | AccountMeta<string> = string,\n TAccountSystemProgram extends\n | string\n | AccountMeta<string> = '11111111111111111111111111111111',\n TAccountClock extends\n | string\n | AccountMeta<string> = 'SysvarC1ock11111111111111111111111111111111',\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountServiceListing extends string\n ? WritableAccount<TAccountServiceListing>\n : TAccountServiceListing,\n TAccountAgent extends string\n ? ReadonlyAccount<TAccountAgent>\n : TAccountAgent,\n TAccountUserRegistry extends string\n ? WritableAccount<TAccountUserRegistry>\n : TAccountUserRegistry,\n TAccountCreator extends string\n ? WritableSignerAccount<TAccountCreator> &\n AccountSignerMeta<TAccountCreator>\n : TAccountCreator,\n TAccountSystemProgram extends string\n ? ReadonlyAccount<TAccountSystemProgram>\n : TAccountSystemProgram,\n TAccountClock extends string\n ? ReadonlyAccount<TAccountClock>\n : TAccountClock,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type CreateServiceListingInstructionData = {\n discriminator: ReadonlyUint8Array;\n title: string;\n description: string;\n price: bigint;\n tokenMint: Address;\n serviceType: string;\n paymentToken: Address;\n estimatedDelivery: bigint;\n tags: Array<string>;\n listingId: string;\n};\n\nexport type CreateServiceListingInstructionDataArgs = {\n title: string;\n description: string;\n price: number | bigint;\n tokenMint: Address;\n serviceType: string;\n paymentToken: Address;\n estimatedDelivery: number | bigint;\n tags: Array<string>;\n listingId: string;\n};\n\nexport function getCreateServiceListingInstructionDataEncoder(): Encoder<CreateServiceListingInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n ['discriminator', fixEncoderSize(getBytesEncoder(), 8)],\n ['title', addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder())],\n ['description', addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder())],\n ['price', getU64Encoder()],\n ['tokenMint', getAddressEncoder()],\n ['serviceType', addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder())],\n ['paymentToken', getAddressEncoder()],\n ['estimatedDelivery', getI64Encoder()],\n [\n 'tags',\n getArrayEncoder(\n addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder())\n ),\n ],\n ['listingId', addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder())],\n ]),\n (value) => ({\n ...value,\n discriminator: CREATE_SERVICE_LISTING_DISCRIMINATOR,\n })\n );\n}\n\nexport function getCreateServiceListingInstructionDataDecoder(): Decoder<CreateServiceListingInstructionData> {\n return getStructDecoder([\n ['discriminator', fixDecoderSize(getBytesDecoder(), 8)],\n ['title', addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())],\n ['description', addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())],\n ['price', getU64Decoder()],\n ['tokenMint', getAddressDecoder()],\n ['serviceType', addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())],\n ['paymentToken', getAddressDecoder()],\n ['estimatedDelivery', getI64Decoder()],\n [\n 'tags',\n getArrayDecoder(addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())),\n ],\n ['listingId', addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())],\n ]);\n}\n\nexport function getCreateServiceListingInstructionDataCodec(): Codec<\n CreateServiceListingInstructionDataArgs,\n CreateServiceListingInstructionData\n> {\n return combineCodec(\n getCreateServiceListingInstructionDataEncoder(),\n getCreateServiceListingInstructionDataDecoder()\n );\n}\n\nexport type CreateServiceListingAsyncInput<\n TAccountServiceListing extends string = string,\n TAccountAgent extends string = string,\n TAccountUserRegistry extends string = string,\n TAccountCreator extends string = string,\n TAccountSystemProgram extends string = string,\n TAccountClock extends string = string,\n> = {\n /** Service listing account with enhanced PDA security */\n serviceListing?: Address<TAccountServiceListing>;\n /** Agent account with ownership validation */\n agent: Address<TAccountAgent>;\n /** User registry for rate limiting */\n userRegistry?: Address<TAccountUserRegistry>;\n /** Creator authority with enhanced verification */\n creator: TransactionSigner<TAccountCreator>;\n /** System program for account operations */\n systemProgram?: Address<TAccountSystemProgram>;\n /** Clock sysvar for timestamp validation and rate limiting */\n clock?: Address<TAccountClock>;\n title: CreateServiceListingInstructionDataArgs['title'];\n description: CreateServiceListingInstructionDataArgs['description'];\n price: CreateServiceListingInstructionDataArgs['price'];\n tokenMint: CreateServiceListingInstructionDataArgs['tokenMint'];\n serviceType: CreateServiceListingInstructionDataArgs['serviceType'];\n paymentToken: CreateServiceListingInstructionDataArgs['paymentToken'];\n estimatedDelivery: CreateServiceListingInstructionDataArgs['estimatedDelivery'];\n tags: CreateServiceListingInstructionDataArgs['tags'];\n listingId: CreateServiceListingInstructionDataArgs['listingId'];\n};\n\nexport async function getCreateServiceListingInstructionAsync<\n TAccountServiceListing extends string,\n TAccountAgent extends string,\n TAccountUserRegistry extends string,\n TAccountCreator extends string,\n TAccountSystemProgram extends string,\n TAccountClock extends string,\n TProgramAddress extends\n Address = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: CreateServiceListingAsyncInput<\n TAccountServiceListing,\n TAccountAgent,\n TAccountUserRegistry,\n TAccountCreator,\n TAccountSystemProgram,\n TAccountClock\n >,\n config?: { programAddress?: TProgramAddress }\n): Promise<\n CreateServiceListingInstruction<\n TProgramAddress,\n TAccountServiceListing,\n TAccountAgent,\n TAccountUserRegistry,\n TAccountCreator,\n TAccountSystemProgram,\n TAccountClock\n >\n> {\n // Program address.\n const programAddress =\n config?.programAddress ?? GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n serviceListing: { value: input.serviceListing ?? null, isWritable: true },\n agent: { value: input.agent ?? null, isWritable: false },\n userRegistry: { value: input.userRegistry ?? null, isWritable: true },\n creator: { value: input.creator ?? null, isWritable: true },\n systemProgram: { value: input.systemProgram ?? null, isWritable: false },\n clock: { value: input.clock ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolve default values.\n if (!accounts.serviceListing.value) {\n accounts.serviceListing.value = await getProgramDerivedAddress({\n programAddress,\n seeds: [\n getBytesEncoder().encode(\n new Uint8Array([\n 115, 101, 114, 118, 105, 99, 101, 95, 108, 105, 115, 116, 105, 110,\n 103,\n ])\n ),\n getAddressEncoder().encode(expectAddress(accounts.creator.value)),\n addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder()).encode(\n expectSome(args.listingId)\n ),\n ],\n });\n }\n if (!accounts.userRegistry.value) {\n accounts.userRegistry.value = await getProgramDerivedAddress({\n programAddress,\n seeds: [\n getBytesEncoder().encode(\n new Uint8Array([\n 117, 115, 101, 114, 95, 114, 101, 103, 105, 115, 116, 114, 121,\n ])\n ),\n getAddressEncoder().encode(expectAddress(accounts.creator.value)),\n ],\n });\n }\n if (!accounts.systemProgram.value) {\n accounts.systemProgram.value =\n '11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>;\n }\n if (!accounts.clock.value) {\n accounts.clock.value =\n 'SysvarC1ock11111111111111111111111111111111' as Address<'SysvarC1ock11111111111111111111111111111111'>;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.serviceListing),\n getAccountMeta(accounts.agent),\n getAccountMeta(accounts.userRegistry),\n getAccountMeta(accounts.creator),\n getAccountMeta(accounts.systemProgram),\n getAccountMeta(accounts.clock),\n ],\n programAddress,\n data: getCreateServiceListingInstructionDataEncoder().encode(\n args as CreateServiceListingInstructionDataArgs\n ),\n } as CreateServiceListingInstruction<\n TProgramAddress,\n TAccountServiceListing,\n TAccountAgent,\n TAccountUserRegistry,\n TAccountCreator,\n TAccountSystemProgram,\n TAccountClock\n >;\n\n return instruction;\n}\n\nexport type CreateServiceListingInput<\n TAccountServiceListing extends string = string,\n TAccountAgent extends string = string,\n TAccountUserRegistry extends string = string,\n TAccountCreator extends string = string,\n TAccountSystemProgram extends string = string,\n TAccountClock extends string = string,\n> = {\n /** Service listing account with enhanced PDA security */\n serviceListing: Address<TAccountServiceListing>;\n /** Agent account with ownership validation */\n agent: Address<TAccountAgent>;\n /** User registry for rate limiting */\n userRegistry: Address<TAccountUserRegistry>;\n /** Creator authority with enhanced verification */\n creator: TransactionSigner<TAccountCreator>;\n /** System program for account operations */\n systemProgram?: Address<TAccountSystemProgram>;\n /** Clock sysvar for timestamp validation and rate limiting */\n clock?: Address<TAccountClock>;\n title: CreateServiceListingInstructionDataArgs['title'];\n description: CreateServiceListingInstructionDataArgs['description'];\n price: CreateServiceListingInstructionDataArgs['price'];\n tokenMint: CreateServiceListingInstructionDataArgs['tokenMint'];\n serviceType: CreateServiceListingInstructionDataArgs['serviceType'];\n paymentToken: CreateServiceListingInstructionDataArgs['paymentToken'];\n estimatedDelivery: CreateServiceListingInstructionDataArgs['estimatedDelivery'];\n tags: CreateServiceListingInstructionDataArgs['tags'];\n listingId: CreateServiceListingInstructionDataArgs['listingId'];\n};\n\nexport function getCreateServiceListingInstruction<\n TAccountServiceListing extends string,\n TAccountAgent extends string,\n TAccountUserRegistry extends string,\n TAccountCreator extends string,\n TAccountSystemProgram extends string,\n TAccountClock extends string,\n TProgramAddress extends\n Address = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: CreateServiceListingInput<\n TAccountServiceListing,\n TAccountAgent,\n TAccountUserRegistry,\n TAccountCreator,\n TAccountSystemProgram,\n TAccountClock\n >,\n config?: { programAddress?: TProgramAddress }\n): CreateServiceListingInstruction<\n TProgramAddress,\n TAccountServiceListing,\n TAccountAgent,\n TAccountUserRegistry,\n TAccountCreator,\n TAccountSystemProgram,\n TAccountClock\n> {\n // Program address.\n const programAddress =\n config?.programAddress ?? GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n serviceListing: { value: input.serviceListing ?? null, isWritable: true },\n agent: { value: input.agent ?? null, isWritable: false },\n userRegistry: { value: input.userRegistry ?? null, isWritable: true },\n creator: { value: input.creator ?? null, isWritable: true },\n systemProgram: { value: input.systemProgram ?? null, isWritable: false },\n clock: { value: input.clock ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolve default values.\n if (!accounts.systemProgram.value) {\n accounts.systemProgram.value =\n '11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>;\n }\n if (!accounts.clock.value) {\n accounts.clock.value =\n 'SysvarC1ock11111111111111111111111111111111' as Address<'SysvarC1ock11111111111111111111111111111111'>;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.serviceListing),\n getAccountMeta(accounts.agent),\n getAccountMeta(accounts.userRegistry),\n getAccountMeta(accounts.creator),\n getAccountMeta(accounts.systemProgram),\n getAccountMeta(accounts.clock),\n ],\n programAddress,\n data: getCreateServiceListingInstructionDataEncoder().encode(\n args as CreateServiceListingInstructionDataArgs\n ),\n } as CreateServiceListingInstruction<\n TProgramAddress,\n TAccountServiceListing,\n TAccountAgent,\n TAccountUserRegistry,\n TAccountCreator,\n TAccountSystemProgram,\n TAccountClock\n >;\n\n return instruction;\n}\n\nexport type ParsedCreateServiceListingInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n /** Service listing account with enhanced PDA security */\n serviceListing: TAccountMetas[0];\n /** Agent account with ownership validation */\n agent: TAccountMetas[1];\n /** User registry for rate limiting */\n userRegistry: TAccountMetas[2];\n /** Creator authority with enhanced verification */\n creator: TAccountMetas[3];\n /** System program for account operations */\n systemProgram: TAccountMetas[4];\n /** Clock sysvar for timestamp validation and rate limiting */\n clock: TAccountMetas[5];\n };\n data: CreateServiceListingInstructionData;\n};\n\nexport function parseCreateServiceListingInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>\n): ParsedCreateServiceListingInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 6) {\n throw new Error('[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts');\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = instruction.accounts![accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n serviceListing: getNextAccount(),\n agent: getNextAccount(),\n userRegistry: getNextAccount(),\n creator: getNextAccount(),\n systemProgram: getNextAccount(),\n clock: getNextAccount(),\n },\n data: getCreateServiceListingInstructionDataDecoder().decode(\n instruction.data\n ),\n };\n}\n","/**\n * This code was AUTOGENERATED using the codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n combineCodec,\n fixDecoderSize,\n fixEncoderSize,\n getAddressDecoder,\n getAddressEncoder,\n getBooleanDecoder,\n getBooleanEncoder,\n getBytesDecoder,\n getBytesEncoder,\n getOptionDecoder,\n getOptionEncoder,\n getProgramDerivedAddress,\n getStructDecoder,\n getStructEncoder,\n getU8Decoder,\n getU8Encoder,\n transformEncoder,\n type AccountMeta,\n type AccountSignerMeta,\n type Address,\n type Codec,\n type Decoder,\n type Encoder,\n type Instruction,\n type InstructionWithAccounts,\n type InstructionWithData,\n type Option,\n type OptionOrNullable,\n type ReadonlyAccount,\n type ReadonlyUint8Array,\n type TransactionSigner,\n type WritableSignerAccount,\n} from '@solana/kit';\nimport {\n GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_INSTRUCTION_DATA,\n GHOSTSPEAK_MARKETPLACE_ERROR__MISSING_REQUIRED_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INSTRUCTION_PARSING_FAILED,\n isGhostspeakMarketplaceError,\n} from '../errors';\nimport { GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS } from '../programs';\nimport {\n expectAddress,\n getAccountMetaFactory,\n type ResolvedAccount,\n} from '../shared';\n\nexport const CREATE_TOKEN2022_MINT_DISCRIMINATOR = new Uint8Array([\n 4, 45, 127, 74, 240, 104, 83, 178,\n]);\n\nexport function getCreateToken2022MintDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 8).encode(\n CREATE_TOKEN2022_MINT_DISCRIMINATOR\n );\n}\n\nexport type CreateToken2022MintInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountAuthority extends string | AccountMeta<string> = string,\n TAccountAgent extends string | AccountMeta<string> = string,\n TAccountMint extends string | AccountMeta<string> = string,\n TAccountTokenProgram extends\n | string\n | AccountMeta<string> = 'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb',\n TAccountSystemProgram extends\n | string\n | AccountMeta<string> = '11111111111111111111111111111111',\n TAccountRent extends\n | string\n | AccountMeta<string> = 'SysvarRent111111111111111111111111111111111',\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountAuthority extends string\n ? WritableSignerAccount<TAccountAuthority> &\n AccountSignerMeta<TAccountAuthority>\n : TAccountAuthority,\n TAccountAgent extends string\n ? ReadonlyAccount<TAccountAgent>\n : TAccountAgent,\n TAccountMint extends string\n ? WritableSignerAccount<TAccountMint> & AccountSignerMeta<TAccountMint>\n : TAccountMint,\n TAccountTokenProgram extends string\n ? ReadonlyAccount<TAccountTokenProgram>\n : TAccountTokenProgram,\n TAccountSystemProgram extends string\n ? ReadonlyAccount<TAccountSystemProgram>\n : TAccountSystemProgram,\n TAccountRent extends string\n ? ReadonlyAccount<TAccountRent>\n : TAccountRent,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type CreateToken2022MintInstructionData = {\n discriminator: ReadonlyUint8Array;\n decimals: number;\n freezeAuthority: Option<Address>;\n enableTransferFee: boolean;\n enableConfidentialTransfers: boolean;\n enableInterestBearing: boolean;\n};\n\nexport type CreateToken2022MintInstructionDataArgs = {\n decimals: number;\n freezeAuthority: OptionOrNullable<Address>;\n enableTransferFee: boolean;\n enableConfidentialTransfers: boolean;\n enableInterestBearing: boolean;\n};\n\nexport function getCreateToken2022MintInstructionDataEncoder(): Encoder<CreateToken2022MintInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n ['discriminator', fixEncoderSize(getBytesEncoder(), 8)],\n ['decimals', getU8Encoder()],\n ['freezeAuthority', getOptionEncoder(getAddressEncoder())],\n ['enableTransferFee', getBooleanEncoder()],\n ['enableConfidentialTransfers', getBooleanEncoder()],\n ['enableInterestBearing', getBooleanEncoder()],\n ]),\n (value) => ({\n ...value,\n discriminator: CREATE_TOKEN2022_MINT_DISCRIMINATOR,\n })\n );\n}\n\nexport function getCreateToken2022MintInstructionDataDecoder(): Decoder<CreateToken2022MintInstructionData> {\n return getStructDecoder([\n ['discriminator', fixDecoderSize(getBytesDecoder(), 8)],\n ['decimals', getU8Decoder()],\n ['freezeAuthority', getOptionDecoder(getAddressDecoder())],\n ['enableTransferFee', getBooleanDecoder()],\n ['enableConfidentialTransfers', getBooleanDecoder()],\n ['enableInterestBearing', getBooleanDecoder()],\n ]);\n}\n\nexport function getCreateToken2022MintInstructionDataCodec(): Codec<\n CreateToken2022MintInstructionDataArgs,\n CreateToken2022MintInstructionData\n> {\n return combineCodec(\n getCreateToken2022MintInstructionDataEncoder(),\n getCreateToken2022MintInstructionDataDecoder()\n );\n}\n\nexport type CreateToken2022MintAsyncInput<\n TAccountAuthority extends string = string,\n TAccountAgent extends string = string,\n TAccountMint extends string = string,\n TAccountTokenProgram extends string = string,\n TAccountSystemProgram extends string = string,\n TAccountRent extends string = string,\n> = {\n authority: TransactionSigner<TAccountAuthority>;\n /** The agent creating the token */\n agent?: Address<TAccountAgent>;\n /** The mint to be created with Token-2022 extensions */\n mint: TransactionSigner<TAccountMint>;\n /** Token-2022 program */\n tokenProgram?: Address<TAccountTokenProgram>;\n systemProgram?: Address<TAccountSystemProgram>;\n rent?: Address<TAccountRent>;\n decimals: CreateToken2022MintInstructionDataArgs['decimals'];\n freezeAuthority: CreateToken2022MintInstructionDataArgs['freezeAuthority'];\n enableTransferFee: CreateToken2022MintInstructionDataArgs['enableTransferFee'];\n enableConfidentialTransfers: CreateToken2022MintInstructionDataArgs['enableConfidentialTransfers'];\n enableInterestBearing: CreateToken2022MintInstructionDataArgs['enableInterestBearing'];\n};\n\nexport async function getCreateToken2022MintInstructionAsync<\n TAccountAuthority extends string,\n TAccountAgent extends string,\n TAccountMint extends string,\n TAccountTokenProgram extends string,\n TAccountSystemProgram extends string,\n TAccountRent extends string,\n TProgramAddress extends\n Address = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: CreateToken2022MintAsyncInput<\n TAccountAuthority,\n TAccountAgent,\n TAccountMint,\n TAccountTokenProgram,\n TAccountSystemProgram,\n TAccountRent\n >,\n config?: { programAddress?: TProgramAddress }\n): Promise<\n CreateToken2022MintInstruction<\n TProgramAddress,\n TAccountAuthority,\n TAccountAgent,\n TAccountMint,\n TAccountTokenProgram,\n TAccountSystemProgram,\n TAccountRent\n >\n> {\n // Program address.\n const programAddress =\n config?.programAddress ?? GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n authority: { value: input.authority ?? null, isWritable: true },\n agent: { value: input.agent ?? null, isWritable: false },\n mint: { value: input.mint ?? null, isWritable: true },\n tokenProgram: { value: input.tokenProgram ?? null, isWritable: false },\n systemProgram: { value: input.systemProgram ?? null, isWritable: false },\n rent: { value: input.rent ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolve default values.\n if (!accounts.agent.value) {\n accounts.agent.value = await getProgramDerivedAddress({\n programAddress,\n seeds: [\n getBytesEncoder().encode(new Uint8Array([97, 103, 101, 110, 116])),\n getAddressEncoder().encode(expectAddress(accounts.authority.value)),\n ],\n });\n }\n if (!accounts.tokenProgram.value) {\n accounts.tokenProgram.value =\n 'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb' as Address<'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb'>;\n }\n if (!accounts.systemProgram.value) {\n accounts.systemProgram.value =\n '11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>;\n }\n if (!accounts.rent.value) {\n accounts.rent.value =\n 'SysvarRent111111111111111111111111111111111' as Address<'SysvarRent111111111111111111111111111111111'>;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.authority),\n getAccountMeta(accounts.agent),\n getAccountMeta(accounts.mint),\n getAccountMeta(accounts.tokenProgram),\n getAccountMeta(accounts.systemProgram),\n getAccountMeta(accounts.rent),\n ],\n programAddress,\n data: getCreateToken2022MintInstructionDataEncoder().encode(\n args as CreateToken2022MintInstructionDataArgs\n ),\n } as CreateToken2022MintInstruction<\n TProgramAddress,\n TAccountAuthority,\n TAccountAgent,\n TAccountMint,\n TAccountTokenProgram,\n TAccountSystemProgram,\n TAccountRent\n >;\n\n return instruction;\n}\n\nexport type CreateToken2022MintInput<\n TAccountAuthority extends string = string,\n TAccountAgent extends string = string,\n TAccountMint extends string = string,\n TAccountTokenProgram extends string = string,\n TAccountSystemProgram extends string = string,\n TAccountRent extends string = string,\n> = {\n authority: TransactionSigner<TAccountAuthority>;\n /** The agent creating the token */\n agent: Address<TAccountAgent>;\n /** The mint to be created with Token-2022 extensions */\n mint: TransactionSigner<TAccountMint>;\n /** Token-2022 program */\n tokenProgram?: Address<TAccountTokenProgram>;\n systemProgram?: Address<TAccountSystemProgram>;\n rent?: Address<TAccountRent>;\n decimals: CreateToken2022MintInstructionDataArgs['decimals'];\n freezeAuthority: CreateToken2022MintInstructionDataArgs['freezeAuthority'];\n enableTransferFee: CreateToken2022MintInstructionDataArgs['enableTransferFee'];\n enableConfidentialTransfers: CreateToken2022MintInstructionDataArgs['enableConfidentialTransfers'];\n enableInterestBearing: CreateToken2022MintInstructionDataArgs['enableInterestBearing'];\n};\n\nexport function getCreateToken2022MintInstruction<\n TAccountAuthority extends string,\n TAccountAgent extends string,\n TAccountMint extends string,\n TAccountTokenProgram extends string,\n TAccountSystemProgram extends string,\n TAccountRent extends string,\n TProgramAddress extends\n Address = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: CreateToken2022MintInput<\n TAccountAuthority,\n TAccountAgent,\n TAccountMint,\n TAccountTokenProgram,\n TAccountSystemProgram,\n TAccountRent\n >,\n config?: { programAddress?: TProgramAddress }\n): CreateToken2022MintInstruction<\n TProgramAddress,\n TAccountAuthority,\n TAccountAgent,\n TAccountMint,\n TAccountTokenProgram,\n TAccountSystemProgram,\n TAccountRent\n> {\n // Program address.\n const programAddress =\n config?.programAddress ?? GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n authority: { value: input.authority ?? null, isWritable: true },\n agent: { value: input.agent ?? null, isWritable: false },\n mint: { value: input.mint ?? null, isWritable: true },\n tokenProgram: { value: input.tokenProgram ?? null, isWritable: false },\n systemProgram: { value: input.systemProgram ?? null, isWritable: false },\n rent: { value: input.rent ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolve default values.\n if (!accounts.tokenProgram.value) {\n accounts.tokenProgram.value =\n 'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb' as Address<'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb'>;\n }\n if (!accounts.systemProgram.value) {\n accounts.systemProgram.value =\n '11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>;\n }\n if (!accounts.rent.value) {\n accounts.rent.value =\n 'SysvarRent111111111111111111111111111111111' as Address<'SysvarRent111111111111111111111111111111111'>;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.authority),\n getAccountMeta(accounts.agent),\n getAccountMeta(accounts.mint),\n getAccountMeta(accounts.tokenProgram),\n getAccountMeta(accounts.systemProgram),\n getAccountMeta(accounts.rent),\n ],\n programAddress,\n data: getCreateToken2022MintInstructionDataEncoder().encode(\n args as CreateToken2022MintInstructionDataArgs\n ),\n } as CreateToken2022MintInstruction<\n TProgramAddress,\n TAccountAuthority,\n TAccountAgent,\n TAccountMint,\n TAccountTokenProgram,\n TAccountSystemProgram,\n TAccountRent\n >;\n\n return instruction;\n}\n\nexport type ParsedCreateToken2022MintInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n authority: TAccountMetas[0];\n /** The agent creating the token */\n agent: TAccountMetas[1];\n /** The mint to be created with Token-2022 extensions */\n mint: TAccountMetas[2];\n /** Token-2022 program */\n tokenProgram: TAccountMetas[3];\n systemProgram: TAccountMetas[4];\n rent: TAccountMetas[5];\n };\n data: CreateToken2022MintInstructionData;\n};\n\nexport function parseCreateToken2022MintInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>\n): ParsedCreateToken2022MintInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 6) {\n throw new Error('[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts');\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = instruction.accounts![accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n authority: getNextAccount(),\n agent: getNextAccount(),\n mint: getNextAccount(),\n tokenProgram: getNextAccount(),\n systemProgram: getNextAccount(),\n rent: getNextAccount(),\n },\n data: getCreateToken2022MintInstructionDataDecoder().decode(\n instruction.data\n ),\n };\n}\n","/**\n * This code was AUTOGENERATED using the codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n addDecoderSizePrefix,\n addEncoderSizePrefix,\n combineCodec,\n fixDecoderSize,\n fixEncoderSize,\n getAddressDecoder,\n getAddressEncoder,\n getArrayDecoder,\n getArrayEncoder,\n getBytesDecoder,\n getBytesEncoder,\n getI64Decoder,\n getI64Encoder,\n getStructDecoder,\n getStructEncoder,\n getU32Decoder,\n getU32Encoder,\n getU64Decoder,\n getU64Encoder,\n getUtf8Decoder,\n getUtf8Encoder,\n transformEncoder,\n type AccountMeta,\n type AccountSignerMeta,\n type Address,\n type Codec,\n type Decoder,\n type Encoder,\n type Instruction,\n type InstructionWithAccounts,\n type InstructionWithData,\n type ReadonlyAccount,\n type ReadonlyUint8Array,\n type TransactionSigner,\n type WritableAccount,\n type WritableSignerAccount,\n} from '@solana/kit';\nimport { GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS } from '../programs';\nimport { getAccountMetaFactory, type ResolvedAccount } from '../shared';\nimport { getWorkOrderErrorMessage } from '../../utils/enhanced-client-errors.js';\n\nexport const CREATE_WORK_ORDER_DISCRIMINATOR = new Uint8Array([\n 143, 17, 248, 200, 217, 85, 10, 175,\n]);\n\nexport function getCreateWorkOrderDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 8).encode(\n CREATE_WORK_ORDER_DISCRIMINATOR\n );\n}\n\nexport type CreateWorkOrderInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountWorkOrder extends string | AccountMeta<string> = string,\n TAccountClient extends string | AccountMeta<string> = string,\n TAccountClock extends\n | string\n | AccountMeta<string> = 'SysvarC1ock11111111111111111111111111111111',\n TAccountSystemProgram extends\n | string\n | AccountMeta<string> = '11111111111111111111111111111111',\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountWorkOrder extends string\n ? WritableAccount<TAccountWorkOrder>\n : TAccountWorkOrder,\n TAccountClient extends string\n ? WritableSignerAccount<TAccountClient> &\n AccountSignerMeta<TAccountClient>\n : TAccountClient,\n TAccountClock extends string\n ? ReadonlyAccount<TAccountClock>\n : TAccountClock,\n TAccountSystemProgram extends string\n ? ReadonlyAccount<TAccountSystemProgram>\n : TAccountSystemProgram,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type CreateWorkOrderInstructionData = {\n discriminator: ReadonlyUint8Array;\n orderId: bigint;\n provider: Address;\n title: string;\n description: string;\n requirements: Array<string>;\n paymentAmount: bigint;\n paymentToken: Address;\n deadline: bigint;\n};\n\nexport type CreateWorkOrderInstructionDataArgs = {\n orderId: number | bigint;\n provider: Address;\n title: string;\n description: string;\n requirements: Array<string>;\n paymentAmount: number | bigint;\n paymentToken: Address;\n deadline: number | bigint;\n};\n\nexport function getCreateWorkOrderInstructionDataEncoder(): Encoder<CreateWorkOrderInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n ['discriminator', fixEncoderSize(getBytesEncoder(), 8)],\n ['orderId', getU64Encoder()],\n ['provider', getAddressEncoder()],\n ['title', addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder())],\n ['description', addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder())],\n [\n 'requirements',\n getArrayEncoder(\n addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder())\n ),\n ],\n ['paymentAmount', getU64Encoder()],\n ['paymentToken', getAddressEncoder()],\n ['deadline', getI64Encoder()],\n ]),\n (value) => ({ ...value, discriminator: CREATE_WORK_ORDER_DISCRIMINATOR })\n );\n}\n\nexport function getCreateWorkOrderInstructionDataDecoder(): Decoder<CreateWorkOrderInstructionData> {\n return getStructDecoder([\n ['discriminator', fixDecoderSize(getBytesDecoder(), 8)],\n ['orderId', getU64Decoder()],\n ['provider', getAddressDecoder()],\n ['title', addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())],\n ['description', addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())],\n [\n 'requirements',\n getArrayDecoder(addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())),\n ],\n ['paymentAmount', getU64Decoder()],\n ['paymentToken', getAddressDecoder()],\n ['deadline', getI64Decoder()],\n ]);\n}\n\nexport function getCreateWorkOrderInstructionDataCodec(): Codec<\n CreateWorkOrderInstructionDataArgs,\n CreateWorkOrderInstructionData\n> {\n return combineCodec(\n getCreateWorkOrderInstructionDataEncoder(),\n getCreateWorkOrderInstructionDataDecoder()\n );\n}\n\nexport type CreateWorkOrderInput<\n TAccountWorkOrder extends string = string,\n TAccountClient extends string = string,\n TAccountClock extends string = string,\n TAccountSystemProgram extends string = string,\n> = {\n workOrder: Address<TAccountWorkOrder>;\n client: TransactionSigner<TAccountClient>;\n clock?: Address<TAccountClock>;\n systemProgram?: Address<TAccountSystemProgram>;\n orderId: CreateWorkOrderInstructionDataArgs['orderId'];\n provider: CreateWorkOrderInstructionDataArgs['provider'];\n title: CreateWorkOrderInstructionDataArgs['title'];\n description: CreateWorkOrderInstructionDataArgs['description'];\n requirements: CreateWorkOrderInstructionDataArgs['requirements'];\n paymentAmount: CreateWorkOrderInstructionDataArgs['paymentAmount'];\n paymentToken: CreateWorkOrderInstructionDataArgs['paymentToken'];\n deadline: CreateWorkOrderInstructionDataArgs['deadline'];\n};\n\nexport function getCreateWorkOrderInstruction<\n TAccountWorkOrder extends string,\n TAccountClient extends string,\n TAccountClock extends string,\n TAccountSystemProgram extends string,\n TProgramAddress extends\n Address = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: CreateWorkOrderInput<\n TAccountWorkOrder,\n TAccountClient,\n TAccountClock,\n TAccountSystemProgram\n >,\n config?: { programAddress?: TProgramAddress }\n): CreateWorkOrderInstruction<\n TProgramAddress,\n TAccountWorkOrder,\n TAccountClient,\n TAccountClock,\n TAccountSystemProgram\n> {\n // Program address.\n const programAddress =\n config?.programAddress ?? GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n workOrder: { value: input.workOrder ?? null, isWritable: true },\n client: { value: input.client ?? null, isWritable: true },\n clock: { value: input.clock ?? null, isWritable: false },\n systemProgram: { value: input.systemProgram ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolve default values.\n if (!accounts.clock.value) {\n accounts.clock.value =\n 'SysvarC1ock11111111111111111111111111111111' as Address<'SysvarC1ock11111111111111111111111111111111'>;\n }\n if (!accounts.systemProgram.value) {\n accounts.systemProgram.value =\n '11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.workOrder),\n getAccountMeta(accounts.client),\n getAccountMeta(accounts.clock),\n getAccountMeta(accounts.systemProgram),\n ],\n programAddress,\n data: getCreateWorkOrderInstructionDataEncoder().encode(\n args as CreateWorkOrderInstructionDataArgs\n ),\n } as CreateWorkOrderInstruction<\n TProgramAddress,\n TAccountWorkOrder,\n TAccountClient,\n TAccountClock,\n TAccountSystemProgram\n >;\n\n return instruction;\n}\n\nexport type ParsedCreateWorkOrderInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n workOrder: TAccountMetas[0];\n client: TAccountMetas[1];\n clock: TAccountMetas[2];\n systemProgram: TAccountMetas[3];\n };\n data: CreateWorkOrderInstructionData;\n};\n\nexport function parseCreateWorkOrderInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>\n): ParsedCreateWorkOrderInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 3) {\n throw new Error(getWorkOrderErrorMessage(\"create_work_order\", instruction.accounts.length));\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = instruction.accounts![accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n workOrder: getNextAccount(),\n client: getNextAccount(),\n clock: getNextAccount(),\n systemProgram: getNextAccount(),\n },\n data: getCreateWorkOrderInstructionDataDecoder().decode(instruction.data),\n };\n}\n","/**\n * This code was AUTOGENERATED using the codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n addDecoderSizePrefix,\n addEncoderSizePrefix,\n combineCodec,\n fixDecoderSize,\n fixEncoderSize,\n getAddressEncoder,\n getBytesDecoder,\n getBytesEncoder,\n getProgramDerivedAddress,\n getStructDecoder,\n getStructEncoder,\n getU32Decoder,\n getU32Encoder,\n getUtf8Decoder,\n getUtf8Encoder,\n transformEncoder,\n type AccountMeta,\n type AccountSignerMeta,\n type Address,\n type Codec,\n type Decoder,\n type Encoder,\n type Instruction,\n type InstructionWithAccounts,\n type InstructionWithData,\n type ReadonlyAccount,\n type ReadonlyUint8Array,\n type TransactionSigner,\n type WritableAccount,\n type WritableSignerAccount,\n} from '@solana/kit';\nimport {\n GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_INSTRUCTION_DATA,\n GHOSTSPEAK_MARKETPLACE_ERROR__MISSING_REQUIRED_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INSTRUCTION_PARSING_FAILED,\n isGhostspeakMarketplaceError,\n} from '../errors';\nimport { GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS } from '../programs';\nimport {\n expectAddress,\n expectSome,\n getAccountMetaFactory,\n type ResolvedAccount,\n} from '../shared';\n\nexport const DEACTIVATE_AGENT_DISCRIMINATOR = new Uint8Array([\n 205, 171, 239, 225, 82, 126, 96, 166,\n]);\n\nexport function getDeactivateAgentDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 8).encode(\n DEACTIVATE_AGENT_DISCRIMINATOR\n );\n}\n\nexport type DeactivateAgentInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountAgentAccount extends string | AccountMeta<string> = string,\n TAccountSigner extends string | AccountMeta<string> = string,\n TAccountClock extends\n | string\n | AccountMeta<string> = 'SysvarC1ock11111111111111111111111111111111',\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountAgentAccount extends string\n ? WritableAccount<TAccountAgentAccount>\n : TAccountAgentAccount,\n TAccountSigner extends string\n ? WritableSignerAccount<TAccountSigner> &\n AccountSignerMeta<TAccountSigner>\n : TAccountSigner,\n TAccountClock extends string\n ? ReadonlyAccount<TAccountClock>\n : TAccountClock,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type DeactivateAgentInstructionData = {\n discriminator: ReadonlyUint8Array;\n agentId: string;\n};\n\nexport type DeactivateAgentInstructionDataArgs = { agentId: string };\n\nexport function getDeactivateAgentInstructionDataEncoder(): Encoder<DeactivateAgentInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n ['discriminator', fixEncoderSize(getBytesEncoder(), 8)],\n ['agentId', addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder())],\n ]),\n (value) => ({ ...value, discriminator: DEACTIVATE_AGENT_DISCRIMINATOR })\n );\n}\n\nexport function getDeactivateAgentInstructionDataDecoder(): Decoder<DeactivateAgentInstructionData> {\n return getStructDecoder([\n ['discriminator', fixDecoderSize(getBytesDecoder(), 8)],\n ['agentId', addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())],\n ]);\n}\n\nexport function getDeactivateAgentInstructionDataCodec(): Codec<\n DeactivateAgentInstructionDataArgs,\n DeactivateAgentInstructionData\n> {\n return combineCodec(\n getDeactivateAgentInstructionDataEncoder(),\n getDeactivateAgentInstructionDataDecoder()\n );\n}\n\nexport type DeactivateAgentAsyncInput<\n TAccountAgentAccount extends string = string,\n TAccountSigner extends string = string,\n TAccountClock extends string = string,\n> = {\n /** Agent account with canonical PDA validation */\n agentAccount?: Address<TAccountAgentAccount>;\n /** Enhanced authority verification */\n signer: TransactionSigner<TAccountSigner>;\n /** Clock sysvar for rate limiting */\n clock?: Address<TAccountClock>;\n agentId: DeactivateAgentInstructionDataArgs['agentId'];\n};\n\nexport async function getDeactivateAgentInstructionAsync<\n TAccountAgentAccount extends string,\n TAccountSigner extends string,\n TAccountClock extends string,\n TProgramAddress extends\n Address = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: DeactivateAgentAsyncInput<\n TAccountAgentAccount,\n TAccountSigner,\n TAccountClock\n >,\n config?: { programAddress?: TProgramAddress }\n): Promise<\n DeactivateAgentInstruction<\n TProgramAddress,\n TAccountAgentAccount,\n TAccountSigner,\n TAccountClock\n >\n> {\n // Program address.\n const programAddress =\n config?.programAddress ?? GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n agentAccount: { value: input.agentAccount ?? null, isWritable: true },\n signer: { value: input.signer ?? null, isWritable: true },\n clock: { value: input.clock ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolve default values.\n if (!accounts.agentAccount.value) {\n accounts.agentAccount.value = await getProgramDerivedAddress({\n programAddress,\n seeds: [\n getBytesEncoder().encode(new Uint8Array([97, 103, 101, 110, 116])),\n getAddressEncoder().encode(expectAddress(accounts.signer.value)),\n addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder()).encode(\n expectSome(args.agentId)\n ),\n ],\n });\n }\n if (!accounts.clock.value) {\n accounts.clock.value =\n 'SysvarC1ock11111111111111111111111111111111' as Address<'SysvarC1ock11111111111111111111111111111111'>;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.agentAccount),\n getAccountMeta(accounts.signer),\n getAccountMeta(accounts.clock),\n ],\n programAddress,\n data: getDeactivateAgentInstructionDataEncoder().encode(\n args as DeactivateAgentInstructionDataArgs\n ),\n } as DeactivateAgentInstruction<\n TProgramAddress,\n TAccountAgentAccount,\n TAccountSigner,\n TAccountClock\n >;\n\n return instruction;\n}\n\nexport type DeactivateAgentInput<\n TAccountAgentAccount extends string = string,\n TAccountSigner extends string = string,\n TAccountClock extends string = string,\n> = {\n /** Agent account with canonical PDA validation */\n agentAccount: Address<TAccountAgentAccount>;\n /** Enhanced authority verification */\n signer: TransactionSigner<TAccountSigner>;\n /** Clock sysvar for rate limiting */\n clock?: Address<TAccountClock>;\n agentId: DeactivateAgentInstructionDataArgs['agentId'];\n};\n\nexport function getDeactivateAgentInstruction<\n TAccountAgentAccount extends string,\n TAccountSigner extends string,\n TAccountClock extends string,\n TProgramAddress extends\n Address = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: DeactivateAgentInput<\n TAccountAgentAccount,\n TAccountSigner,\n TAccountClock\n >,\n config?: { programAddress?: TProgramAddress }\n): DeactivateAgentInstruction<\n TProgramAddress,\n TAccountAgentAccount,\n TAccountSigner,\n TAccountClock\n> {\n // Program address.\n const programAddress =\n config?.programAddress ?? GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n agentAccount: { value: input.agentAccount ?? null, isWritable: true },\n signer: { value: input.signer ?? null, isWritable: true },\n clock: { value: input.clock ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolve default values.\n if (!accounts.clock.value) {\n accounts.clock.value =\n 'SysvarC1ock11111111111111111111111111111111' as Address<'SysvarC1ock11111111111111111111111111111111'>;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.agentAccount),\n getAccountMeta(accounts.signer),\n getAccountMeta(accounts.clock),\n ],\n programAddress,\n data: getDeactivateAgentInstructionDataEncoder().encode(\n args as DeactivateAgentInstructionDataArgs\n ),\n } as DeactivateAgentInstruction<\n TProgramAddress,\n TAccountAgentAccount,\n TAccountSigner,\n TAccountClock\n >;\n\n return instruction;\n}\n\nexport type ParsedDeactivateAgentInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n /** Agent account with canonical PDA validation */\n agentAccount: TAccountMetas[0];\n /** Enhanced authority verification */\n signer: TAccountMetas[1];\n /** Clock sysvar for rate limiting */\n clock: TAccountMetas[2];\n };\n data: DeactivateAgentInstructionData;\n};\n\nexport function parseDeactivateAgentInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>\n): ParsedDeactivateAgentInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 3) {\n throw new Error('[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts');\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = instruction.accounts![accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n agentAccount: getNextAccount(),\n signer: getNextAccount(),\n clock: getNextAccount(),\n },\n data: getDeactivateAgentInstructionDataDecoder().decode(instruction.data),\n };\n}\n","/**\n * This code was AUTOGENERATED using the codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n combineCodec,\n fixDecoderSize,\n fixEncoderSize,\n getBytesDecoder,\n getBytesEncoder,\n getI64Decoder,\n getI64Encoder,\n getOptionDecoder,\n getOptionEncoder,\n getProgramDerivedAddress,\n getStructDecoder,\n getStructEncoder,\n getU64Decoder,\n getU64Encoder,\n transformEncoder,\n type AccountMeta,\n type AccountSignerMeta,\n type Address,\n type Codec,\n type Decoder,\n type Encoder,\n type Instruction,\n type InstructionWithAccounts,\n type InstructionWithData,\n type Option,\n type OptionOrNullable,\n type ReadonlyAccount,\n type ReadonlyUint8Array,\n type TransactionSigner,\n type WritableAccount,\n type WritableSignerAccount,\n} from '@solana/kit';\nimport {\n GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_INSTRUCTION_DATA,\n GHOSTSPEAK_MARKETPLACE_ERROR__MISSING_REQUIRED_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INSTRUCTION_PARSING_FAILED,\n isGhostspeakMarketplaceError,\n} from '../errors';\nimport { GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS } from '../programs';\nimport {\n expectSome,\n getAccountMetaFactory,\n type ResolvedAccount,\n} from '../shared';\nimport {\n getDelegationScopeDecoder,\n getDelegationScopeEncoder,\n type DelegationScope,\n type DelegationScopeArgs,\n} from '../types';\n\nexport const DELEGATE_VOTE_DISCRIMINATOR = new Uint8Array([\n 12, 116, 204, 68, 87, 205, 40, 205,\n]);\n\nexport function getDelegateVoteDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 8).encode(\n DELEGATE_VOTE_DISCRIMINATOR\n );\n}\n\nexport type DelegateVoteInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountProposal extends string | AccountMeta<string> = string,\n TAccountDelegator extends string | AccountMeta<string> = string,\n TAccountDelegate extends string | AccountMeta<string> = string,\n TAccountDelegatorTokenAccount extends string | AccountMeta<string> = string,\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountProposal extends string\n ? WritableAccount<TAccountProposal>\n : TAccountProposal,\n TAccountDelegator extends string\n ? WritableSignerAccount<TAccountDelegator> &\n AccountSignerMeta<TAccountDelegator>\n : TAccountDelegator,\n TAccountDelegate extends string\n ? ReadonlyAccount<TAccountDelegate>\n : TAccountDelegate,\n TAccountDelegatorTokenAccount extends string\n ? ReadonlyAccount<TAccountDelegatorTokenAccount>\n : TAccountDelegatorTokenAccount,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type DelegateVoteInstructionData = {\n discriminator: ReadonlyUint8Array;\n proposalId: bigint;\n scope: DelegationScope;\n expiresAt: Option<bigint>;\n};\n\nexport type DelegateVoteInstructionDataArgs = {\n proposalId: number | bigint;\n scope: DelegationScopeArgs;\n expiresAt: OptionOrNullable<number | bigint>;\n};\n\nexport function getDelegateVoteInstructionDataEncoder(): Encoder<DelegateVoteInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n ['discriminator', fixEncoderSize(getBytesEncoder(), 8)],\n ['proposalId', getU64Encoder()],\n ['scope', getDelegationScopeEncoder()],\n ['expiresAt', getOptionEncoder(getI64Encoder())],\n ]),\n (value) => ({ ...value, discriminator: DELEGATE_VOTE_DISCRIMINATOR })\n );\n}\n\nexport function getDelegateVoteInstructionDataDecoder(): Decoder<DelegateVoteInstructionData> {\n return getStructDecoder([\n ['discriminator', fixDecoderSize(getBytesDecoder(), 8)],\n ['proposalId', getU64Decoder()],\n ['scope', getDelegationScopeDecoder()],\n ['expiresAt', getOptionDecoder(getI64Decoder())],\n ]);\n}\n\nexport function getDelegateVoteInstructionDataCodec(): Codec<\n DelegateVoteInstructionDataArgs,\n DelegateVoteInstructionData\n> {\n return combineCodec(\n getDelegateVoteInstructionDataEncoder(),\n getDelegateVoteInstructionDataDecoder()\n );\n}\n\nexport type DelegateVoteAsyncInput<\n TAccountProposal extends string = string,\n TAccountDelegator extends string = string,\n TAccountDelegate extends string = string,\n TAccountDelegatorTokenAccount extends string = string,\n> = {\n /** The proposal to delegate for (or use 0 for all proposals) */\n proposal?: Address<TAccountProposal>;\n delegator: TransactionSigner<TAccountDelegator>;\n /** The account to delegate voting power to */\n delegate: Address<TAccountDelegate>;\n /** Delegator's token account */\n delegatorTokenAccount: Address<TAccountDelegatorTokenAccount>;\n proposalId: DelegateVoteInstructionDataArgs['proposalId'];\n scope: DelegateVoteInstructionDataArgs['scope'];\n expiresAt: DelegateVoteInstructionDataArgs['expiresAt'];\n};\n\nexport async function getDelegateVoteInstructionAsync<\n TAccountProposal extends string,\n TAccountDelegator extends string,\n TAccountDelegate extends string,\n TAccountDelegatorTokenAccount extends string,\n TProgramAddress extends\n Address = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: DelegateVoteAsyncInput<\n TAccountProposal,\n TAccountDelegator,\n TAccountDelegate,\n TAccountDelegatorTokenAccount\n >,\n config?: { programAddress?: TProgramAddress }\n): Promise<\n DelegateVoteInstruction<\n TProgramAddress,\n TAccountProposal,\n TAccountDelegator,\n TAccountDelegate,\n TAccountDelegatorTokenAccount\n >\n> {\n // Program address.\n const programAddress =\n config?.programAddress ?? GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n proposal: { value: input.proposal ?? null, isWritable: true },\n delegator: { value: input.delegator ?? null, isWritable: true },\n delegate: { value: input.delegate ?? null, isWritable: false },\n delegatorTokenAccount: {\n value: input.delegatorTokenAccount ?? null,\n isWritable: false,\n },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolve default values.\n if (!accounts.proposal.value) {\n accounts.proposal.value = await getProgramDerivedAddress({\n programAddress,\n seeds: [\n getBytesEncoder().encode(\n new Uint8Array([\n 103, 111, 118, 101, 114, 110, 97, 110, 99, 101, 95, 112, 114, 111,\n 112, 111, 115, 97, 108,\n ])\n ),\n getU64Encoder().encode(expectSome(args.proposalId)),\n ],\n });\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.proposal),\n getAccountMeta(accounts.delegator),\n getAccountMeta(accounts.delegate),\n getAccountMeta(accounts.delegatorTokenAccount),\n ],\n programAddress,\n data: getDelegateVoteInstructionDataEncoder().encode(\n args as DelegateVoteInstructionDataArgs\n ),\n } as DelegateVoteInstruction<\n TProgramAddress,\n TAccountProposal,\n TAccountDelegator,\n TAccountDelegate,\n TAccountDelegatorTokenAccount\n >;\n\n return instruction;\n}\n\nexport type DelegateVoteInput<\n TAccountProposal extends string = string,\n TAccountDelegator extends string = string,\n TAccountDelegate extends string = string,\n TAccountDelegatorTokenAccount extends string = string,\n> = {\n /** The proposal to delegate for (or use 0 for all proposals) */\n proposal?: Address<TAccountProposal>;\n delegator: TransactionSigner<TAccountDelegator>;\n /** The account to delegate voting power to */\n delegate: Address<TAccountDelegate>;\n /** Delegator's token account */\n delegatorTokenAccount: Address<TAccountDelegatorTokenAccount>;\n proposalId: DelegateVoteInstructionDataArgs['proposalId'];\n scope: DelegateVoteInstructionDataArgs['scope'];\n expiresAt: DelegateVoteInstructionDataArgs['expiresAt'];\n};\n\nexport function getDelegateVoteInstruction<\n TAccountProposal extends string,\n TAccountDelegator extends string,\n TAccountDelegate extends string,\n TAccountDelegatorTokenAccount extends string,\n TProgramAddress extends\n Address = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: DelegateVoteInput<\n TAccountProposal,\n TAccountDelegator,\n TAccountDelegate,\n TAccountDelegatorTokenAccount\n >,\n config?: { programAddress?: TProgramAddress }\n): DelegateVoteInstruction<\n TProgramAddress,\n TAccountProposal,\n TAccountDelegator,\n TAccountDelegate,\n TAccountDelegatorTokenAccount\n> {\n // Program address.\n const programAddress =\n config?.programAddress ?? GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n proposal: { value: input.proposal ?? null, isWritable: true },\n delegator: { value: input.delegator ?? null, isWritable: true },\n delegate: { value: input.delegate ?? null, isWritable: false },\n delegatorTokenAccount: {\n value: input.delegatorTokenAccount ?? null,\n isWritable: false,\n },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.proposal),\n getAccountMeta(accounts.delegator),\n getAccountMeta(accounts.delegate),\n getAccountMeta(accounts.delegatorTokenAccount),\n ],\n programAddress,\n data: getDelegateVoteInstructionDataEncoder().encode(\n args as DelegateVoteInstructionDataArgs\n ),\n } as DelegateVoteInstruction<\n TProgramAddress,\n TAccountProposal,\n TAccountDelegator,\n TAccountDelegate,\n TAccountDelegatorTokenAccount\n >;\n\n return instruction;\n}\n\nexport type ParsedDelegateVoteInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n /** The proposal to delegate for (or use 0 for all proposals) */\n proposal?: TAccountMetas[0] | undefined;\n delegator: TAccountMetas[1];\n /** The account to delegate voting power to */\n delegate: TAccountMetas[2];\n /** Delegator's token account */\n delegatorTokenAccount: TAccountMetas[3];\n };\n data: DelegateVoteInstructionData;\n};\n\nexport function parseDelegateVoteInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>\n): ParsedDelegateVoteInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 4) {\n throw new Error('[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts');\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = instruction.accounts![accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n const getNextOptionalAccount = () => {\n const accountMeta = getNextAccount();\n return accountMeta.address === GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS\n ? undefined\n : accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n proposal: getNextOptionalAccount(),\n delegator: getNextAccount(),\n delegate: getNextAccount(),\n delegatorTokenAccount: getNextAccount(),\n },\n data: getDelegateVoteInstructionDataDecoder().decode(instruction.data),\n };\n}\n","/**\n * This code was AUTOGENERATED using the codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n addDecoderSizePrefix,\n addEncoderSizePrefix,\n combineCodec,\n fixDecoderSize,\n fixEncoderSize,\n getBytesDecoder,\n getBytesEncoder,\n getProgramDerivedAddress,\n getStructDecoder,\n getStructEncoder,\n getU32Decoder,\n getU32Encoder,\n getUtf8Decoder,\n getUtf8Encoder,\n transformEncoder,\n type AccountMeta,\n type AccountSignerMeta,\n type Address,\n type Codec,\n type Decoder,\n type Encoder,\n type Instruction,\n type InstructionWithAccounts,\n type InstructionWithData,\n type ReadonlySignerAccount,\n type ReadonlyUint8Array,\n type TransactionSigner,\n type WritableAccount,\n} from '@solana/kit';\nimport {\n GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_INSTRUCTION_DATA,\n GHOSTSPEAK_MARKETPLACE_ERROR__MISSING_REQUIRED_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INSTRUCTION_PARSING_FAILED,\n isGhostspeakMarketplaceError,\n} from '../errors';\nimport { GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS } from '../programs';\nimport { getAccountMetaFactory, type ResolvedAccount } from '../shared';\n\nexport const DISPUTE_ESCROW_DISCRIMINATOR = new Uint8Array([\n 198, 174, 139, 70, 87, 79, 181, 139,\n]);\n\nexport function getDisputeEscrowDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 8).encode(\n DISPUTE_ESCROW_DISCRIMINATOR\n );\n}\n\nexport type DisputeEscrowInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountEscrow extends string | AccountMeta<string> = string,\n TAccountReentrancyGuard extends string | AccountMeta<string> = string,\n TAccountAuthority extends string | AccountMeta<string> = string,\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountEscrow extends string\n ? WritableAccount<TAccountEscrow>\n : TAccountEscrow,\n TAccountReentrancyGuard extends string\n ? WritableAccount<TAccountReentrancyGuard>\n : TAccountReentrancyGuard,\n TAccountAuthority extends string\n ? ReadonlySignerAccount<TAccountAuthority> &\n AccountSignerMeta<TAccountAuthority>\n : TAccountAuthority,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type DisputeEscrowInstructionData = {\n discriminator: ReadonlyUint8Array;\n disputeReason: string;\n};\n\nexport type DisputeEscrowInstructionDataArgs = { disputeReason: string };\n\nexport function getDisputeEscrowInstructionDataEncoder(): Encoder<DisputeEscrowInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n ['discriminator', fixEncoderSize(getBytesEncoder(), 8)],\n [\n 'disputeReason',\n addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder()),\n ],\n ]),\n (value) => ({ ...value, discriminator: DISPUTE_ESCROW_DISCRIMINATOR })\n );\n}\n\nexport function getDisputeEscrowInstructionDataDecoder(): Decoder<DisputeEscrowInstructionData> {\n return getStructDecoder([\n ['discriminator', fixDecoderSize(getBytesDecoder(), 8)],\n ['disputeReason', addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())],\n ]);\n}\n\nexport function getDisputeEscrowInstructionDataCodec(): Codec<\n DisputeEscrowInstructionDataArgs,\n DisputeEscrowInstructionData\n> {\n return combineCodec(\n getDisputeEscrowInstructionDataEncoder(),\n getDisputeEscrowInstructionDataDecoder()\n );\n}\n\nexport type DisputeEscrowAsyncInput<\n TAccountEscrow extends string = string,\n TAccountReentrancyGuard extends string = string,\n TAccountAuthority extends string = string,\n> = {\n escrow: Address<TAccountEscrow>;\n reentrancyGuard?: Address<TAccountReentrancyGuard>;\n authority: TransactionSigner<TAccountAuthority>;\n disputeReason: DisputeEscrowInstructionDataArgs['disputeReason'];\n};\n\nexport async function getDisputeEscrowInstructionAsync<\n TAccountEscrow extends string,\n TAccountReentrancyGuard extends string,\n TAccountAuthority extends string,\n TProgramAddress extends\n Address = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: DisputeEscrowAsyncInput<\n TAccountEscrow,\n TAccountReentrancyGuard,\n TAccountAuthority\n >,\n config?: { programAddress?: TProgramAddress }\n): Promise<\n DisputeEscrowInstruction<\n TProgramAddress,\n TAccountEscrow,\n TAccountReentrancyGuard,\n TAccountAuthority\n >\n> {\n // Program address.\n const programAddress =\n config?.programAddress ?? GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n escrow: { value: input.escrow ?? null, isWritable: true },\n reentrancyGuard: { value: input.reentrancyGuard ?? null, isWritable: true },\n authority: { value: input.authority ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolve default values.\n if (!accounts.reentrancyGuard.value) {\n accounts.reentrancyGuard.value = await getProgramDerivedAddress({\n programAddress,\n seeds: [\n getBytesEncoder().encode(\n new Uint8Array([\n 114, 101, 101, 110, 116, 114, 97, 110, 99, 121, 95, 103, 117, 97,\n 114, 100,\n ])\n ),\n ],\n });\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.escrow),\n getAccountMeta(accounts.reentrancyGuard),\n getAccountMeta(accounts.authority),\n ],\n programAddress,\n data: getDisputeEscrowInstructionDataEncoder().encode(\n args as DisputeEscrowInstructionDataArgs\n ),\n } as DisputeEscrowInstruction<\n TProgramAddress,\n TAccountEscrow,\n TAccountReentrancyGuard,\n TAccountAuthority\n >;\n\n return instruction;\n}\n\nexport type DisputeEscrowInput<\n TAccountEscrow extends string = string,\n TAccountReentrancyGuard extends string = string,\n TAccountAuthority extends string = string,\n> = {\n escrow: Address<TAccountEscrow>;\n reentrancyGuard: Address<TAccountReentrancyGuard>;\n authority: TransactionSigner<TAccountAuthority>;\n disputeReason: DisputeEscrowInstructionDataArgs['disputeReason'];\n};\n\nexport function getDisputeEscrowInstruction<\n TAccountEscrow extends string,\n TAccountReentrancyGuard extends string,\n TAccountAuthority extends string,\n TProgramAddress extends\n Address = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: DisputeEscrowInput<\n TAccountEscrow,\n TAccountReentrancyGuard,\n TAccountAuthority\n >,\n config?: { programAddress?: TProgramAddress }\n): DisputeEscrowInstruction<\n TProgramAddress,\n TAccountEscrow,\n TAccountReentrancyGuard,\n TAccountAuthority\n> {\n // Program address.\n const programAddress =\n config?.programAddress ?? GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n escrow: { value: input.escrow ?? null, isWritable: true },\n reentrancyGuard: { value: input.reentrancyGuard ?? null, isWritable: true },\n authority: { value: input.authority ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.escrow),\n getAccountMeta(accounts.reentrancyGuard),\n getAccountMeta(accounts.authority),\n ],\n programAddress,\n data: getDisputeEscrowInstructionDataEncoder().encode(\n args as DisputeEscrowInstructionDataArgs\n ),\n } as DisputeEscrowInstruction<\n TProgramAddress,\n TAccountEscrow,\n TAccountReentrancyGuard,\n TAccountAuthority\n >;\n\n return instruction;\n}\n\nexport type ParsedDisputeEscrowInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n escrow: TAccountMetas[0];\n reentrancyGuard: TAccountMetas[1];\n authority: TAccountMetas[2];\n };\n data: DisputeEscrowInstructionData;\n};\n\nexport function parseDisputeEscrowInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>\n): ParsedDisputeEscrowInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 3) {\n throw new Error('[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts');\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = instruction.accounts![accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n escrow: getNextAccount(),\n reentrancyGuard: getNextAccount(),\n authority: getNextAccount(),\n },\n data: getDisputeEscrowInstructionDataDecoder().decode(instruction.data),\n };\n}\n","/**\n * This code was AUTOGENERATED using the codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n addDecoderSizePrefix,\n addEncoderSizePrefix,\n combineCodec,\n fixDecoderSize,\n fixEncoderSize,\n getAddressDecoder,\n getAddressEncoder,\n getBytesDecoder,\n getBytesEncoder,\n getStructDecoder,\n getStructEncoder,\n getU32Decoder,\n getU32Encoder,\n getU64Decoder,\n getU64Encoder,\n getUtf8Decoder,\n getUtf8Encoder,\n transformEncoder,\n type AccountMeta,\n type AccountSignerMeta,\n type Address,\n type Codec,\n type Decoder,\n type Encoder,\n type Instruction,\n type InstructionWithAccounts,\n type InstructionWithData,\n type ReadonlySignerAccount,\n type ReadonlyUint8Array,\n type TransactionSigner,\n type WritableAccount,\n} from '@solana/kit';\nimport {\n GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_INSTRUCTION_DATA,\n GHOSTSPEAK_MARKETPLACE_ERROR__MISSING_REQUIRED_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INSTRUCTION_PARSING_FAILED,\n isGhostspeakMarketplaceError,\n} from '../errors';\nimport { GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS } from '../programs';\nimport { getAccountMetaFactory, type ResolvedAccount } from '../shared';\n\nexport const DISTRIBUTE_INCENTIVES_DISCRIMINATOR = new Uint8Array([\n 172, 97, 184, 220, 51, 131, 45, 160,\n]);\n\nexport function getDistributeIncentivesDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 8).encode(\n DISTRIBUTE_INCENTIVES_DISCRIMINATOR\n );\n}\n\nexport type DistributeIncentivesInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountProgram extends string | AccountMeta<string> = string,\n TAccountIncentives extends string | AccountMeta<string> = string,\n TAccountDistributor extends string | AccountMeta<string> = string,\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountProgram extends string\n ? WritableAccount<TAccountProgram>\n : TAccountProgram,\n TAccountIncentives extends string\n ? WritableAccount<TAccountIncentives>\n : TAccountIncentives,\n TAccountDistributor extends string\n ? ReadonlySignerAccount<TAccountDistributor> &\n AccountSignerMeta<TAccountDistributor>\n : TAccountDistributor,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type DistributeIncentivesInstructionData = {\n discriminator: ReadonlyUint8Array;\n agent: Address;\n incentiveType: string;\n amount: bigint;\n};\n\nexport type DistributeIncentivesInstructionDataArgs = {\n agent: Address;\n incentiveType: string;\n amount: number | bigint;\n};\n\nexport function getDistributeIncentivesInstructionDataEncoder(): Encoder<DistributeIncentivesInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n ['discriminator', fixEncoderSize(getBytesEncoder(), 8)],\n ['agent', getAddressEncoder()],\n [\n 'incentiveType',\n addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder()),\n ],\n ['amount', getU64Encoder()],\n ]),\n (value) => ({\n ...value,\n discriminator: DISTRIBUTE_INCENTIVES_DISCRIMINATOR,\n })\n );\n}\n\nexport function getDistributeIncentivesInstructionDataDecoder(): Decoder<DistributeIncentivesInstructionData> {\n return getStructDecoder([\n ['discriminator', fixDecoderSize(getBytesDecoder(), 8)],\n ['agent', getAddressDecoder()],\n ['incentiveType', addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())],\n ['amount', getU64Decoder()],\n ]);\n}\n\nexport function getDistributeIncentivesInstructionDataCodec(): Codec<\n DistributeIncentivesInstructionDataArgs,\n DistributeIncentivesInstructionData\n> {\n return combineCodec(\n getDistributeIncentivesInstructionDataEncoder(),\n getDistributeIncentivesInstructionDataDecoder()\n );\n}\n\nexport type DistributeIncentivesInput<\n TAccountProgram extends string = string,\n TAccountIncentives extends string = string,\n TAccountDistributor extends string = string,\n> = {\n program: Address<TAccountProgram>;\n incentives: Address<TAccountIncentives>;\n distributor: TransactionSigner<TAccountDistributor>;\n agent: DistributeIncentivesInstructionDataArgs['agent'];\n incentiveType: DistributeIncentivesInstructionDataArgs['incentiveType'];\n amount: DistributeIncentivesInstructionDataArgs['amount'];\n};\n\nexport function getDistributeIncentivesInstruction<\n TAccountProgram extends string,\n TAccountIncentives extends string,\n TAccountDistributor extends string,\n TProgramAddress extends\n Address = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: DistributeIncentivesInput<\n TAccountProgram,\n TAccountIncentives,\n TAccountDistributor\n >,\n config?: { programAddress?: TProgramAddress }\n): DistributeIncentivesInstruction<\n TProgramAddress,\n TAccountProgram,\n TAccountIncentives,\n TAccountDistributor\n> {\n // Program address.\n const programAddress =\n config?.programAddress ?? GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n program: { value: input.program ?? null, isWritable: true },\n incentives: { value: input.incentives ?? null, isWritable: true },\n distributor: { value: input.distributor ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.program),\n getAccountMeta(accounts.incentives),\n getAccountMeta(accounts.distributor),\n ],\n programAddress,\n data: getDistributeIncentivesInstructionDataEncoder().encode(\n args as DistributeIncentivesInstructionDataArgs\n ),\n } as DistributeIncentivesInstruction<\n TProgramAddress,\n TAccountProgram,\n TAccountIncentives,\n TAccountDistributor\n >;\n\n return instruction;\n}\n\nexport type ParsedDistributeIncentivesInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n program: TAccountMetas[0];\n incentives: TAccountMetas[1];\n distributor: TAccountMetas[2];\n };\n data: DistributeIncentivesInstructionData;\n};\n\nexport function parseDistributeIncentivesInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>\n): ParsedDistributeIncentivesInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 3) {\n throw new Error('[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts');\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = instruction.accounts![accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n program: getNextAccount(),\n incentives: getNextAccount(),\n distributor: getNextAccount(),\n },\n data: getDistributeIncentivesInstructionDataDecoder().decode(\n instruction.data\n ),\n };\n}\n","/**\n * This code was AUTOGENERATED using the codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n combineCodec,\n fixDecoderSize,\n fixEncoderSize,\n getAddressEncoder,\n getBytesDecoder,\n getBytesEncoder,\n getProgramDerivedAddress,\n getStructDecoder,\n getStructEncoder,\n getU32Decoder,\n getU32Encoder,\n transformEncoder,\n type AccountMeta,\n type AccountSignerMeta,\n type Address,\n type FixedSizeCodec,\n type FixedSizeDecoder,\n type FixedSizeEncoder,\n type Instruction,\n type InstructionWithAccounts,\n type InstructionWithData,\n type ReadonlyAccount,\n type ReadonlyUint8Array,\n type TransactionSigner,\n type WritableAccount,\n type WritableSignerAccount,\n} from '@solana/kit';\nimport {\n GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_INSTRUCTION_DATA,\n GHOSTSPEAK_MARKETPLACE_ERROR__MISSING_REQUIRED_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INSTRUCTION_PARSING_FAILED,\n isGhostspeakMarketplaceError,\n} from '../errors';\nimport { GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS } from '../programs';\nimport {\n expectAddress,\n getAccountMetaFactory,\n type ResolvedAccount,\n} from '../shared';\n\nexport const EXECUTE_BULK_DEAL_BATCH_DISCRIMINATOR = new Uint8Array([\n 236, 222, 159, 76, 52, 79, 235, 109,\n]);\n\nexport function getExecuteBulkDealBatchDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 8).encode(\n EXECUTE_BULK_DEAL_BATCH_DISCRIMINATOR\n );\n}\n\nexport type ExecuteBulkDealBatchInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountDeal extends string | AccountMeta<string> = string,\n TAccountUserRegistry extends string | AccountMeta<string> = string,\n TAccountAuthority extends string | AccountMeta<string> = string,\n TAccountClock extends\n | string\n | AccountMeta<string> = 'SysvarC1ock11111111111111111111111111111111',\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountDeal extends string\n ? WritableAccount<TAccountDeal>\n : TAccountDeal,\n TAccountUserRegistry extends string\n ? WritableAccount<TAccountUserRegistry>\n : TAccountUserRegistry,\n TAccountAuthority extends string\n ? WritableSignerAccount<TAccountAuthority> &\n AccountSignerMeta<TAccountAuthority>\n : TAccountAuthority,\n TAccountClock extends string\n ? ReadonlyAccount<TAccountClock>\n : TAccountClock,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type ExecuteBulkDealBatchInstructionData = {\n discriminator: ReadonlyUint8Array;\n batchSize: number;\n};\n\nexport type ExecuteBulkDealBatchInstructionDataArgs = { batchSize: number };\n\nexport function getExecuteBulkDealBatchInstructionDataEncoder(): FixedSizeEncoder<ExecuteBulkDealBatchInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n ['discriminator', fixEncoderSize(getBytesEncoder(), 8)],\n ['batchSize', getU32Encoder()],\n ]),\n (value) => ({\n ...value,\n discriminator: EXECUTE_BULK_DEAL_BATCH_DISCRIMINATOR,\n })\n );\n}\n\nexport function getExecuteBulkDealBatchInstructionDataDecoder(): FixedSizeDecoder<ExecuteBulkDealBatchInstructionData> {\n return getStructDecoder([\n ['discriminator', fixDecoderSize(getBytesDecoder(), 8)],\n ['batchSize', getU32Decoder()],\n ]);\n}\n\nexport function getExecuteBulkDealBatchInstructionDataCodec(): FixedSizeCodec<\n ExecuteBulkDealBatchInstructionDataArgs,\n ExecuteBulkDealBatchInstructionData\n> {\n return combineCodec(\n getExecuteBulkDealBatchInstructionDataEncoder(),\n getExecuteBulkDealBatchInstructionDataDecoder()\n );\n}\n\nexport type ExecuteBulkDealBatchAsyncInput<\n TAccountDeal extends string = string,\n TAccountUserRegistry extends string = string,\n TAccountAuthority extends string = string,\n TAccountClock extends string = string,\n> = {\n /** Bulk deal account with canonical bump validation */\n deal: Address<TAccountDeal>;\n /** User registry for rate limiting */\n userRegistry?: Address<TAccountUserRegistry>;\n /** Enhanced authority verification - only customer or agent */\n authority: TransactionSigner<TAccountAuthority>;\n /** Clock sysvar for rate limiting */\n clock?: Address<TAccountClock>;\n batchSize: ExecuteBulkDealBatchInstructionDataArgs['batchSize'];\n};\n\nexport async function getExecuteBulkDealBatchInstructionAsync<\n TAccountDeal extends string,\n TAccountUserRegistry extends string,\n TAccountAuthority extends string,\n TAccountClock extends string,\n TProgramAddress extends\n Address = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: ExecuteBulkDealBatchAsyncInput<\n TAccountDeal,\n TAccountUserRegistry,\n TAccountAuthority,\n TAccountClock\n >,\n config?: { programAddress?: TProgramAddress }\n): Promise<\n ExecuteBulkDealBatchInstruction<\n TProgramAddress,\n TAccountDeal,\n TAccountUserRegistry,\n TAccountAuthority,\n TAccountClock\n >\n> {\n // Program address.\n const programAddress =\n config?.programAddress ?? GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n deal: { value: input.deal ?? null, isWritable: true },\n userRegistry: { value: input.userRegistry ?? null, isWritable: true },\n authority: { value: input.authority ?? null, isWritable: true },\n clock: { value: input.clock ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolve default values.\n if (!accounts.userRegistry.value) {\n accounts.userRegistry.value = await getProgramDerivedAddress({\n programAddress,\n seeds: [\n getBytesEncoder().encode(\n new Uint8Array([\n 117, 115, 101, 114, 95, 114, 101, 103, 105, 115, 116, 114, 121,\n ])\n ),\n getAddressEncoder().encode(expectAddress(accounts.authority.value)),\n ],\n });\n }\n if (!accounts.clock.value) {\n accounts.clock.value =\n 'SysvarC1ock11111111111111111111111111111111' as Address<'SysvarC1ock11111111111111111111111111111111'>;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.deal),\n getAccountMeta(accounts.userRegistry),\n getAccountMeta(accounts.authority),\n getAccountMeta(accounts.clock),\n ],\n programAddress,\n data: getExecuteBulkDealBatchInstructionDataEncoder().encode(\n args as ExecuteBulkDealBatchInstructionDataArgs\n ),\n } as ExecuteBulkDealBatchInstruction<\n TProgramAddress,\n TAccountDeal,\n TAccountUserRegistry,\n TAccountAuthority,\n TAccountClock\n >;\n\n return instruction;\n}\n\nexport type ExecuteBulkDealBatchInput<\n TAccountDeal extends string = string,\n TAccountUserRegistry extends string = string,\n TAccountAuthority extends string = string,\n TAccountClock extends string = string,\n> = {\n /** Bulk deal account with canonical bump validation */\n deal: Address<TAccountDeal>;\n /** User registry for rate limiting */\n userRegistry: Address<TAccountUserRegistry>;\n /** Enhanced authority verification - only customer or agent */\n authority: TransactionSigner<TAccountAuthority>;\n /** Clock sysvar for rate limiting */\n clock?: Address<TAccountClock>;\n batchSize: ExecuteBulkDealBatchInstructionDataArgs['batchSize'];\n};\n\nexport function getExecuteBulkDealBatchInstruction<\n TAccountDeal extends string,\n TAccountUserRegistry extends string,\n TAccountAuthority extends string,\n TAccountClock extends string,\n TProgramAddress extends\n Address = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: ExecuteBulkDealBatchInput<\n TAccountDeal,\n TAccountUserRegistry,\n TAccountAuthority,\n TAccountClock\n >,\n config?: { programAddress?: TProgramAddress }\n): ExecuteBulkDealBatchInstruction<\n TProgramAddress,\n TAccountDeal,\n TAccountUserRegistry,\n TAccountAuthority,\n TAccountClock\n> {\n // Program address.\n const programAddress =\n config?.programAddress ?? GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n deal: { value: input.deal ?? null, isWritable: true },\n userRegistry: { value: input.userRegistry ?? null, isWritable: true },\n authority: { value: input.authority ?? null, isWritable: true },\n clock: { value: input.clock ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolve default values.\n if (!accounts.clock.value) {\n accounts.clock.value =\n 'SysvarC1ock11111111111111111111111111111111' as Address<'SysvarC1ock11111111111111111111111111111111'>;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.deal),\n getAccountMeta(accounts.userRegistry),\n getAccountMeta(accounts.authority),\n getAccountMeta(accounts.clock),\n ],\n programAddress,\n data: getExecuteBulkDealBatchInstructionDataEncoder().encode(\n args as ExecuteBulkDealBatchInstructionDataArgs\n ),\n } as ExecuteBulkDealBatchInstruction<\n TProgramAddress,\n TAccountDeal,\n TAccountUserRegistry,\n TAccountAuthority,\n TAccountClock\n >;\n\n return instruction;\n}\n\nexport type ParsedExecuteBulkDealBatchInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n /** Bulk deal account with canonical bump validation */\n deal: TAccountMetas[0];\n /** User registry for rate limiting */\n userRegistry: TAccountMetas[1];\n /** Enhanced authority verification - only customer or agent */\n authority: TAccountMetas[2];\n /** Clock sysvar for rate limiting */\n clock: TAccountMetas[3];\n };\n data: ExecuteBulkDealBatchInstructionData;\n};\n\nexport function parseExecuteBulkDealBatchInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>\n): ParsedExecuteBulkDealBatchInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 4) {\n throw new Error('[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts');\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = instruction.accounts![accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n deal: getNextAccount(),\n userRegistry: getNextAccount(),\n authority: getNextAccount(),\n clock: getNextAccount(),\n },\n data: getExecuteBulkDealBatchInstructionDataDecoder().decode(\n instruction.data\n ),\n };\n}\n","/**\n * This code was AUTOGENERATED using the codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n combineCodec,\n fixDecoderSize,\n fixEncoderSize,\n getBytesDecoder,\n getBytesEncoder,\n getStructDecoder,\n getStructEncoder,\n transformEncoder,\n type AccountMeta,\n type AccountSignerMeta,\n type Address,\n type FixedSizeCodec,\n type FixedSizeDecoder,\n type FixedSizeEncoder,\n type Instruction,\n type InstructionWithAccounts,\n type InstructionWithData,\n type ReadonlyAccount,\n type ReadonlyUint8Array,\n type TransactionSigner,\n type WritableAccount,\n type WritableSignerAccount,\n} from '@solana/kit';\nimport {\n GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_INSTRUCTION_DATA,\n GHOSTSPEAK_MARKETPLACE_ERROR__MISSING_REQUIRED_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INSTRUCTION_PARSING_FAILED,\n isGhostspeakMarketplaceError,\n} from '../errors';\nimport { GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS } from '../programs';\nimport { getAccountMetaFactory, type ResolvedAccount } from '../shared';\n\nexport const EXECUTE_PROPOSAL_DISCRIMINATOR = new Uint8Array([\n 186, 60, 116, 133, 108, 128, 111, 28,\n]);\n\nexport function getExecuteProposalDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 8).encode(\n EXECUTE_PROPOSAL_DISCRIMINATOR\n );\n}\n\nexport type ExecuteProposalInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountProposal extends string | AccountMeta<string> = string,\n TAccountExecutor extends string | AccountMeta<string> = string,\n TAccountTargetProgram extends string | AccountMeta<string> = string,\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountProposal extends string\n ? WritableAccount<TAccountProposal>\n : TAccountProposal,\n TAccountExecutor extends string\n ? WritableSignerAccount<TAccountExecutor> &\n AccountSignerMeta<TAccountExecutor>\n : TAccountExecutor,\n TAccountTargetProgram extends string\n ? ReadonlyAccount<TAccountTargetProgram>\n : TAccountTargetProgram,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type ExecuteProposalInstructionData = {\n discriminator: ReadonlyUint8Array;\n};\n\nexport type ExecuteProposalInstructionDataArgs = {};\n\nexport function getExecuteProposalInstructionDataEncoder(): FixedSizeEncoder<ExecuteProposalInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([['discriminator', fixEncoderSize(getBytesEncoder(), 8)]]),\n (value) => ({ ...value, discriminator: EXECUTE_PROPOSAL_DISCRIMINATOR })\n );\n}\n\nexport function getExecuteProposalInstructionDataDecoder(): FixedSizeDecoder<ExecuteProposalInstructionData> {\n return getStructDecoder([\n ['discriminator', fixDecoderSize(getBytesDecoder(), 8)],\n ]);\n}\n\nexport function getExecuteProposalInstructionDataCodec(): FixedSizeCodec<\n ExecuteProposalInstructionDataArgs,\n ExecuteProposalInstructionData\n> {\n return combineCodec(\n getExecuteProposalInstructionDataEncoder(),\n getExecuteProposalInstructionDataDecoder()\n );\n}\n\nexport type ExecuteProposalInput<\n TAccountProposal extends string = string,\n TAccountExecutor extends string = string,\n TAccountTargetProgram extends string = string,\n> = {\n proposal: Address<TAccountProposal>;\n executor: TransactionSigner<TAccountExecutor>;\n /** Target program for proposal execution */\n targetProgram: Address<TAccountTargetProgram>;\n};\n\nexport function getExecuteProposalInstruction<\n TAccountProposal extends string,\n TAccountExecutor extends string,\n TAccountTargetProgram extends string,\n TProgramAddress extends\n Address = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: ExecuteProposalInput<\n TAccountProposal,\n TAccountExecutor,\n TAccountTargetProgram\n >,\n config?: { programAddress?: TProgramAddress }\n): ExecuteProposalInstruction<\n TProgramAddress,\n TAccountProposal,\n TAccountExecutor,\n TAccountTargetProgram\n> {\n // Program address.\n const programAddress =\n config?.programAddress ?? GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n proposal: { value: input.proposal ?? null, isWritable: true },\n executor: { value: input.executor ?? null, isWritable: true },\n targetProgram: { value: input.targetProgram ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.proposal),\n getAccountMeta(accounts.executor),\n getAccountMeta(accounts.targetProgram),\n ],\n programAddress,\n data: getExecuteProposalInstructionDataEncoder().encode({}),\n } as ExecuteProposalInstruction<\n TProgramAddress,\n TAccountProposal,\n TAccountExecutor,\n TAccountTargetProgram\n >;\n\n return instruction;\n}\n\nexport type ParsedExecuteProposalInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n proposal: TAccountMetas[0];\n executor: TAccountMetas[1];\n /** Target program for proposal execution */\n targetProgram: TAccountMetas[2];\n };\n data: ExecuteProposalInstructionData;\n};\n\nexport function parseExecuteProposalInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>\n): ParsedExecuteProposalInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 3) {\n throw new Error('[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts');\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = instruction.accounts![accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n proposal: getNextAccount(),\n executor: getNextAccount(),\n targetProgram: getNextAccount(),\n },\n data: getExecuteProposalInstructionDataDecoder().decode(instruction.data),\n };\n}\n","/**\n * This code was AUTOGENERATED using the codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n combineCodec,\n fixDecoderSize,\n fixEncoderSize,\n getBytesDecoder,\n getBytesEncoder,\n getStructDecoder,\n getStructEncoder,\n transformEncoder,\n type AccountMeta,\n type Address,\n type Codec,\n type Decoder,\n type Encoder,\n type Instruction,\n type InstructionWithAccounts,\n type InstructionWithData,\n type ReadonlyAccount,\n type ReadonlyUint8Array,\n} from '@solana/kit';\nimport {\n GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_INSTRUCTION_DATA,\n GHOSTSPEAK_MARKETPLACE_ERROR__MISSING_REQUIRED_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INSTRUCTION_PARSING_FAILED,\n isGhostspeakMarketplaceError,\n} from '../errors';\nimport { GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS } from '../programs';\nimport { getAccountMetaFactory, type ResolvedAccount } from '../shared';\nimport {\n getActionDecoder,\n getActionEncoder,\n type Action,\n type ActionArgs,\n} from '../types';\n\nexport const EXPORT_ACTION_DISCRIMINATOR = new Uint8Array([\n 206, 39, 235, 232, 29, 98, 124, 4,\n]);\n\nexport function getExportActionDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 8).encode(\n EXPORT_ACTION_DISCRIMINATOR\n );\n}\n\nexport type ExportActionInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountSystemProgram extends\n | string\n | AccountMeta<string> = '11111111111111111111111111111111',\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountSystemProgram extends string\n ? ReadonlyAccount<TAccountSystemProgram>\n : TAccountSystemProgram,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type ExportActionInstructionData = {\n discriminator: ReadonlyUint8Array;\n data: Action;\n};\n\nexport type ExportActionInstructionDataArgs = { data: ActionArgs };\n\nexport function getExportActionInstructionDataEncoder(): Encoder<ExportActionInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n ['discriminator', fixEncoderSize(getBytesEncoder(), 8)],\n ['data', getActionEncoder()],\n ]),\n (value) => ({ ...value, discriminator: EXPORT_ACTION_DISCRIMINATOR })\n );\n}\n\nexport function getExportActionInstructionDataDecoder(): Decoder<ExportActionInstructionData> {\n return getStructDecoder([\n ['discriminator', fixDecoderSize(getBytesDecoder(), 8)],\n ['data', getActionDecoder()],\n ]);\n}\n\nexport function getExportActionInstructionDataCodec(): Codec<\n ExportActionInstructionDataArgs,\n ExportActionInstructionData\n> {\n return combineCodec(\n getExportActionInstructionDataEncoder(),\n getExportActionInstructionDataDecoder()\n );\n}\n\nexport type ExportActionInput<TAccountSystemProgram extends string = string> = {\n systemProgram?: Address<TAccountSystemProgram>;\n data: ExportActionInstructionDataArgs['data'];\n};\n\nexport function getExportActionInstruction<\n TAccountSystemProgram extends string,\n TProgramAddress extends\n Address = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: ExportActionInput<TAccountSystemProgram>,\n config?: { programAddress?: TProgramAddress }\n): ExportActionInstruction<TProgramAddress, TAccountSystemProgram> {\n // Program address.\n const programAddress =\n config?.programAddress ?? GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n systemProgram: { value: input.systemProgram ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolve default values.\n if (!accounts.systemProgram.value) {\n accounts.systemProgram.value =\n '11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [getAccountMeta(accounts.systemProgram)],\n programAddress,\n data: getExportActionInstructionDataEncoder().encode(\n args as ExportActionInstructionDataArgs\n ),\n } as ExportActionInstruction<TProgramAddress, TAccountSystemProgram>;\n\n return instruction;\n}\n\nexport type ParsedExportActionInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n systemProgram: TAccountMetas[0];\n };\n data: ExportActionInstructionData;\n};\n\nexport function parseExportActionInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>\n): ParsedExportActionInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 1) {\n throw new Error('[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts');\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = instruction.accounts![accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n systemProgram: getNextAccount(),\n },\n data: getExportActionInstructionDataDecoder().decode(instruction.data),\n };\n}\n","/**\n * This code was AUTOGENERATED using the codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n combineCodec,\n fixDecoderSize,\n fixEncoderSize,\n getBytesDecoder,\n getBytesEncoder,\n getStructDecoder,\n getStructEncoder,\n transformEncoder,\n type AccountMeta,\n type Address,\n type Codec,\n type Decoder,\n type Encoder,\n type Instruction,\n type InstructionWithAccounts,\n type InstructionWithData,\n type ReadonlyAccount,\n type ReadonlyUint8Array,\n} from '@solana/kit';\nimport {\n GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_INSTRUCTION_DATA,\n GHOSTSPEAK_MARKETPLACE_ERROR__MISSING_REQUIRED_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INSTRUCTION_PARSING_FAILED,\n isGhostspeakMarketplaceError,\n} from '../errors';\nimport { GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS } from '../programs';\nimport { getAccountMetaFactory, type ResolvedAccount } from '../shared';\nimport {\n getAuditContextDecoder,\n getAuditContextEncoder,\n type AuditContext,\n type AuditContextArgs,\n} from '../types';\n\nexport const EXPORT_AUDIT_CONTEXT_DISCRIMINATOR = new Uint8Array([\n 146, 64, 145, 33, 190, 17, 82, 70,\n]);\n\nexport function getExportAuditContextDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 8).encode(\n EXPORT_AUDIT_CONTEXT_DISCRIMINATOR\n );\n}\n\nexport type ExportAuditContextInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountSystemProgram extends\n | string\n | AccountMeta<string> = '11111111111111111111111111111111',\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountSystemProgram extends string\n ? ReadonlyAccount<TAccountSystemProgram>\n : TAccountSystemProgram,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type ExportAuditContextInstructionData = {\n discriminator: ReadonlyUint8Array;\n data: AuditContext;\n};\n\nexport type ExportAuditContextInstructionDataArgs = { data: AuditContextArgs };\n\nexport function getExportAuditContextInstructionDataEncoder(): Encoder<ExportAuditContextInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n ['discriminator', fixEncoderSize(getBytesEncoder(), 8)],\n ['data', getAuditContextEncoder()],\n ]),\n (value) => ({ ...value, discriminator: EXPORT_AUDIT_CONTEXT_DISCRIMINATOR })\n );\n}\n\nexport function getExportAuditContextInstructionDataDecoder(): Decoder<ExportAuditContextInstructionData> {\n return getStructDecoder([\n ['discriminator', fixDecoderSize(getBytesDecoder(), 8)],\n ['data', getAuditContextDecoder()],\n ]);\n}\n\nexport function getExportAuditContextInstructionDataCodec(): Codec<\n ExportAuditContextInstructionDataArgs,\n ExportAuditContextInstructionData\n> {\n return combineCodec(\n getExportAuditContextInstructionDataEncoder(),\n getExportAuditContextInstructionDataDecoder()\n );\n}\n\nexport type ExportAuditContextInput<\n TAccountSystemProgram extends string = string,\n> = {\n systemProgram?: Address<TAccountSystemProgram>;\n data: ExportAuditContextInstructionDataArgs['data'];\n};\n\nexport function getExportAuditContextInstruction<\n TAccountSystemProgram extends string,\n TProgramAddress extends\n Address = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: ExportAuditContextInput<TAccountSystemProgram>,\n config?: { programAddress?: TProgramAddress }\n): ExportAuditContextInstruction<TProgramAddress, TAccountSystemProgram> {\n // Program address.\n const programAddress =\n config?.programAddress ?? GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n systemProgram: { value: input.systemProgram ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolve default values.\n if (!accounts.systemProgram.value) {\n accounts.systemProgram.value =\n '11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [getAccountMeta(accounts.systemProgram)],\n programAddress,\n data: getExportAuditContextInstructionDataEncoder().encode(\n args as ExportAuditContextInstructionDataArgs\n ),\n } as ExportAuditContextInstruction<TProgramAddress, TAccountSystemProgram>;\n\n return instruction;\n}\n\nexport type ParsedExportAuditContextInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n systemProgram: TAccountMetas[0];\n };\n data: ExportAuditContextInstructionData;\n};\n\nexport function parseExportAuditContextInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>\n): ParsedExportAuditContextInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 1) {\n throw new Error('[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts');\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = instruction.accounts![accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n systemProgram: getNextAccount(),\n },\n data: getExportAuditContextInstructionDataDecoder().decode(\n instruction.data\n ),\n };\n}\n","/**\n * This code was AUTOGENERATED using the codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n combineCodec,\n fixDecoderSize,\n fixEncoderSize,\n getBytesDecoder,\n getBytesEncoder,\n getStructDecoder,\n getStructEncoder,\n transformEncoder,\n type AccountMeta,\n type Address,\n type Codec,\n type Decoder,\n type Encoder,\n type Instruction,\n type InstructionWithAccounts,\n type InstructionWithData,\n type ReadonlyAccount,\n type ReadonlyUint8Array,\n} from '@solana/kit';\nimport {\n GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_INSTRUCTION_DATA,\n GHOSTSPEAK_MARKETPLACE_ERROR__MISSING_REQUIRED_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INSTRUCTION_PARSING_FAILED,\n isGhostspeakMarketplaceError,\n} from '../errors';\nimport { GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS } from '../programs';\nimport { getAccountMetaFactory, type ResolvedAccount } from '../shared';\nimport {\n getBiometricQualityDecoder,\n getBiometricQualityEncoder,\n type BiometricQuality,\n type BiometricQualityArgs,\n} from '../types';\n\nexport const EXPORT_BIOMETRIC_QUALITY_DISCRIMINATOR = new Uint8Array([\n 30, 229, 117, 69, 175, 246, 7, 143,\n]);\n\nexport function getExportBiometricQualityDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 8).encode(\n EXPORT_BIOMETRIC_QUALITY_DISCRIMINATOR\n );\n}\n\nexport type ExportBiometricQualityInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountSystemProgram extends\n | string\n | AccountMeta<string> = '11111111111111111111111111111111',\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountSystemProgram extends string\n ? ReadonlyAccount<TAccountSystemProgram>\n : TAccountSystemProgram,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type ExportBiometricQualityInstructionData = {\n discriminator: ReadonlyUint8Array;\n data: BiometricQuality;\n};\n\nexport type ExportBiometricQualityInstructionDataArgs = {\n data: BiometricQualityArgs;\n};\n\nexport function getExportBiometricQualityInstructionDataEncoder(): Encoder<ExportBiometricQualityInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n ['discriminator', fixEncoderSize(getBytesEncoder(), 8)],\n ['data', getBiometricQualityEncoder()],\n ]),\n (value) => ({\n ...value,\n discriminator: EXPORT_BIOMETRIC_QUALITY_DISCRIMINATOR,\n })\n );\n}\n\nexport function getExportBiometricQualityInstructionDataDecoder(): Decoder<ExportBiometricQualityInstructionData> {\n return getStructDecoder([\n ['discriminator', fixDecoderSize(getBytesDecoder(), 8)],\n ['data', getBiometricQualityDecoder()],\n ]);\n}\n\nexport function getExportBiometricQualityInstructionDataCodec(): Codec<\n ExportBiometricQualityInstructionDataArgs,\n ExportBiometricQualityInstructionData\n> {\n return combineCodec(\n getExportBiometricQualityInstructionDataEncoder(),\n getExportBiometricQualityInstructionDataDecoder()\n );\n}\n\nexport type ExportBiometricQualityInput<\n TAccountSystemProgram extends string = string,\n> = {\n systemProgram?: Address<TAccountSystemProgram>;\n data: ExportBiometricQualityInstructionDataArgs['data'];\n};\n\nexport function getExportBiometricQualityInstruction<\n TAccountSystemProgram extends string,\n TProgramAddress extends\n Address = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: ExportBiometricQualityInput<TAccountSystemProgram>,\n config?: { programAddress?: TProgramAddress }\n): ExportBiometricQualityInstruction<TProgramAddress, TAccountSystemProgram> {\n // Program address.\n const programAddress =\n config?.programAddress ?? GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n systemProgram: { value: input.systemProgram ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolve default values.\n if (!accounts.systemProgram.value) {\n accounts.systemProgram.value =\n '11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [getAccountMeta(accounts.systemProgram)],\n programAddress,\n data: getExportBiometricQualityInstructionDataEncoder().encode(\n args as ExportBiometricQualityInstructionDataArgs\n ),\n } as ExportBiometricQualityInstruction<\n TProgramAddress,\n TAccountSystemProgram\n >;\n\n return instruction;\n}\n\nexport type ParsedExportBiometricQualityInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n systemProgram: TAccountMetas[0];\n };\n data: ExportBiometricQualityInstructionData;\n};\n\nexport function parseExportBiometricQualityInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>\n): ParsedExportBiometricQualityInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 1) {\n throw new Error('[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts');\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = instruction.accounts![accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n systemProgram: getNextAccount(),\n },\n data: getExportBiometricQualityInstructionDataDecoder().decode(\n instruction.data\n ),\n };\n}\n","/**\n * This code was AUTOGENERATED using the codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n combineCodec,\n fixDecoderSize,\n fixEncoderSize,\n getBytesDecoder,\n getBytesEncoder,\n getStructDecoder,\n getStructEncoder,\n transformEncoder,\n type AccountMeta,\n type Address,\n type Codec,\n type Decoder,\n type Encoder,\n type Instruction,\n type InstructionWithAccounts,\n type InstructionWithData,\n type ReadonlyAccount,\n type ReadonlyUint8Array,\n} from '@solana/kit';\nimport {\n GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_INSTRUCTION_DATA,\n GHOSTSPEAK_MARKETPLACE_ERROR__MISSING_REQUIRED_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INSTRUCTION_PARSING_FAILED,\n isGhostspeakMarketplaceError,\n} from '../errors';\nimport { GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS } from '../programs';\nimport { getAccountMetaFactory, type ResolvedAccount } from '../shared';\nimport {\n getComplianceStatusDecoder,\n getComplianceStatusEncoder,\n type ComplianceStatus,\n type ComplianceStatusArgs,\n} from '../types';\n\nexport const EXPORT_COMPLIANCE_STATUS_DISCRIMINATOR = new Uint8Array([\n 25, 78, 239, 255, 21, 9, 170, 98,\n]);\n\nexport function getExportComplianceStatusDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 8).encode(\n EXPORT_COMPLIANCE_STATUS_DISCRIMINATOR\n );\n}\n\nexport type ExportComplianceStatusInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountSystemProgram extends\n | string\n | AccountMeta<string> = '11111111111111111111111111111111',\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountSystemProgram extends string\n ? ReadonlyAccount<TAccountSystemProgram>\n : TAccountSystemProgram,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type ExportComplianceStatusInstructionData = {\n discriminator: ReadonlyUint8Array;\n data: ComplianceStatus;\n};\n\nexport type ExportComplianceStatusInstructionDataArgs = {\n data: ComplianceStatusArgs;\n};\n\nexport function getExportComplianceStatusInstructionDataEncoder(): Encoder<ExportComplianceStatusInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n ['discriminator', fixEncoderSize(getBytesEncoder(), 8)],\n ['data', getComplianceStatusEncoder()],\n ]),\n (value) => ({\n ...value,\n discriminator: EXPORT_COMPLIANCE_STATUS_DISCRIMINATOR,\n })\n );\n}\n\nexport function getExportComplianceStatusInstructionDataDecoder(): Decoder<ExportComplianceStatusInstructionData> {\n return getStructDecoder([\n ['discriminator', fixDecoderSize(getBytesDecoder(), 8)],\n ['data', getComplianceStatusDecoder()],\n ]);\n}\n\nexport function getExportComplianceStatusInstructionDataCodec(): Codec<\n ExportComplianceStatusInstructionDataArgs,\n ExportComplianceStatusInstructionData\n> {\n return combineCodec(\n getExportComplianceStatusInstructionDataEncoder(),\n getExportComplianceStatusInstructionDataDecoder()\n );\n}\n\nexport type ExportComplianceStatusInput<\n TAccountSystemProgram extends string = string,\n> = {\n systemProgram?: Address<TAccountSystemProgram>;\n data: ExportComplianceStatusInstructionDataArgs['data'];\n};\n\nexport function getExportComplianceStatusInstruction<\n TAccountSystemProgram extends string,\n TProgramAddress extends\n Address = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: ExportComplianceStatusInput<TAccountSystemProgram>,\n config?: { programAddress?: TProgramAddress }\n): ExportComplianceStatusInstruction<TProgramAddress, TAccountSystemProgram> {\n // Program address.\n const programAddress =\n config?.programAddress ?? GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n systemProgram: { value: input.systemProgram ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolve default values.\n if (!accounts.systemProgram.value) {\n accounts.systemProgram.value =\n '11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [getAccountMeta(accounts.systemProgram)],\n programAddress,\n data: getExportComplianceStatusInstructionDataEncoder().encode(\n args as ExportComplianceStatusInstructionDataArgs\n ),\n } as ExportComplianceStatusInstruction<\n TProgramAddress,\n TAccountSystemProgram\n >;\n\n return instruction;\n}\n\nexport type ParsedExportComplianceStatusInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n systemProgram: TAccountMetas[0];\n };\n data: ExportComplianceStatusInstructionData;\n};\n\nexport function parseExportComplianceStatusInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>\n): ParsedExportComplianceStatusInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 1) {\n throw new Error('[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts');\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = instruction.accounts![accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n systemProgram: getNextAccount(),\n },\n data: getExportComplianceStatusInstructionDataDecoder().decode(\n instruction.data\n ),\n };\n}\n","/**\n * This code was AUTOGENERATED using the codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n combineCodec,\n fixDecoderSize,\n fixEncoderSize,\n getBytesDecoder,\n getBytesEncoder,\n getStructDecoder,\n getStructEncoder,\n transformEncoder,\n type AccountMeta,\n type Address,\n type Codec,\n type Decoder,\n type Encoder,\n type Instruction,\n type InstructionWithAccounts,\n type InstructionWithData,\n type ReadonlyAccount,\n type ReadonlyUint8Array,\n} from '@solana/kit';\nimport {\n GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_INSTRUCTION_DATA,\n GHOSTSPEAK_MARKETPLACE_ERROR__MISSING_REQUIRED_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INSTRUCTION_PARSING_FAILED,\n isGhostspeakMarketplaceError,\n} from '../errors';\nimport { GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS } from '../programs';\nimport { getAccountMetaFactory, type ResolvedAccount } from '../shared';\nimport {\n getDynamicPricingConfigDecoder,\n getDynamicPricingConfigEncoder,\n type DynamicPricingConfig,\n type DynamicPricingConfigArgs,\n} from '../types';\n\nexport const EXPORT_DYNAMIC_PRICING_CONFIG_DISCRIMINATOR = new Uint8Array([\n 212, 219, 242, 67, 179, 18, 238, 104,\n]);\n\nexport function getExportDynamicPricingConfigDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 8).encode(\n EXPORT_DYNAMIC_PRICING_CONFIG_DISCRIMINATOR\n );\n}\n\nexport type ExportDynamicPricingConfigInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountSystemProgram extends\n | string\n | AccountMeta<string> = '11111111111111111111111111111111',\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountSystemProgram extends string\n ? ReadonlyAccount<TAccountSystemProgram>\n : TAccountSystemProgram,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type ExportDynamicPricingConfigInstructionData = {\n discriminator: ReadonlyUint8Array;\n data: DynamicPricingConfig;\n};\n\nexport type ExportDynamicPricingConfigInstructionDataArgs = {\n data: DynamicPricingConfigArgs;\n};\n\nexport function getExportDynamicPricingConfigInstructionDataEncoder(): Encoder<ExportDynamicPricingConfigInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n ['discriminator', fixEncoderSize(getBytesEncoder(), 8)],\n ['data', getDynamicPricingConfigEncoder()],\n ]),\n (value) => ({\n ...value,\n discriminator: EXPORT_DYNAMIC_PRICING_CONFIG_DISCRIMINATOR,\n })\n );\n}\n\nexport function getExportDynamicPricingConfigInstructionDataDecoder(): Decoder<ExportDynamicPricingConfigInstructionData> {\n return getStructDecoder([\n ['discriminator', fixDecoderSize(getBytesDecoder(), 8)],\n ['data', getDynamicPricingConfigDecoder()],\n ]);\n}\n\nexport function getExportDynamicPricingConfigInstructionDataCodec(): Codec<\n ExportDynamicPricingConfigInstructionDataArgs,\n ExportDynamicPricingConfigInstructionData\n> {\n return combineCodec(\n getExportDynamicPricingConfigInstructionDataEncoder(),\n getExportDynamicPricingConfigInstructionDataDecoder()\n );\n}\n\nexport type ExportDynamicPricingConfigInput<\n TAccountSystemProgram extends string = string,\n> = {\n systemProgram?: Address<TAccountSystemProgram>;\n data: ExportDynamicPricingConfigInstructionDataArgs['data'];\n};\n\nexport function getExportDynamicPricingConfigInstruction<\n TAccountSystemProgram extends string,\n TProgramAddress extends\n Address = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: ExportDynamicPricingConfigInput<TAccountSystemProgram>,\n config?: { programAddress?: TProgramAddress }\n): ExportDynamicPricingConfigInstruction<\n TProgramAddress,\n TAccountSystemProgram\n> {\n // Program address.\n const programAddress =\n config?.programAddress ?? GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n systemProgram: { value: input.systemProgram ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolve default values.\n if (!accounts.systemProgram.value) {\n accounts.systemProgram.value =\n '11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [getAccountMeta(accounts.systemProgram)],\n programAddress,\n data: getExportDynamicPricingConfigInstructionDataEncoder().encode(\n args as ExportDynamicPricingConfigInstructionDataArgs\n ),\n } as ExportDynamicPricingConfigInstruction<\n TProgramAddress,\n TAccountSystemProgram\n >;\n\n return instruction;\n}\n\nexport type ParsedExportDynamicPricingConfigInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n systemProgram: TAccountMetas[0];\n };\n data: ExportDynamicPricingConfigInstructionData;\n};\n\nexport function parseExportDynamicPricingConfigInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>\n): ParsedExportDynamicPricingConfigInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 1) {\n throw new Error('[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts');\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = instruction.accounts![accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n systemProgram: getNextAccount(),\n },\n data: getExportDynamicPricingConfigInstructionDataDecoder().decode(\n instruction.data\n ),\n };\n}\n","/**\n * This code was AUTOGENERATED using the codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n combineCodec,\n fixDecoderSize,\n fixEncoderSize,\n getBytesDecoder,\n getBytesEncoder,\n getStructDecoder,\n getStructEncoder,\n transformEncoder,\n type AccountMeta,\n type Address,\n type Codec,\n type Decoder,\n type Encoder,\n type Instruction,\n type InstructionWithAccounts,\n type InstructionWithData,\n type ReadonlyAccount,\n type ReadonlyUint8Array,\n} from '@solana/kit';\nimport {\n GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_INSTRUCTION_DATA,\n GHOSTSPEAK_MARKETPLACE_ERROR__MISSING_REQUIRED_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INSTRUCTION_PARSING_FAILED,\n isGhostspeakMarketplaceError,\n} from '../errors';\nimport { GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS } from '../programs';\nimport { getAccountMetaFactory, type ResolvedAccount } from '../shared';\nimport {\n getMultisigConfigDecoder,\n getMultisigConfigEncoder,\n type MultisigConfig,\n type MultisigConfigArgs,\n} from '../types';\n\nexport const EXPORT_MULTISIG_CONFIG_DISCRIMINATOR = new Uint8Array([\n 100, 100, 216, 86, 42, 163, 37, 64,\n]);\n\nexport function getExportMultisigConfigDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 8).encode(\n EXPORT_MULTISIG_CONFIG_DISCRIMINATOR\n );\n}\n\nexport type ExportMultisigConfigInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountSystemProgram extends\n | string\n | AccountMeta<string> = '11111111111111111111111111111111',\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountSystemProgram extends string\n ? ReadonlyAccount<TAccountSystemProgram>\n : TAccountSystemProgram,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type ExportMultisigConfigInstructionData = {\n discriminator: ReadonlyUint8Array;\n data: MultisigConfig;\n};\n\nexport type ExportMultisigConfigInstructionDataArgs = {\n data: MultisigConfigArgs;\n};\n\nexport function getExportMultisigConfigInstructionDataEncoder(): Encoder<ExportMultisigConfigInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n ['discriminator', fixEncoderSize(getBytesEncoder(), 8)],\n ['data', getMultisigConfigEncoder()],\n ]),\n (value) => ({\n ...value,\n discriminator: EXPORT_MULTISIG_CONFIG_DISCRIMINATOR,\n })\n );\n}\n\nexport function getExportMultisigConfigInstructionDataDecoder(): Decoder<ExportMultisigConfigInstructionData> {\n return getStructDecoder([\n ['discriminator', fixDecoderSize(getBytesDecoder(), 8)],\n ['data', getMultisigConfigDecoder()],\n ]);\n}\n\nexport function getExportMultisigConfigInstructionDataCodec(): Codec<\n ExportMultisigConfigInstructionDataArgs,\n ExportMultisigConfigInstructionData\n> {\n return combineCodec(\n getExportMultisigConfigInstructionDataEncoder(),\n getExportMultisigConfigInstructionDataDecoder()\n );\n}\n\nexport type ExportMultisigConfigInput<\n TAccountSystemProgram extends string = string,\n> = {\n systemProgram?: Address<TAccountSystemProgram>;\n data: ExportMultisigConfigInstructionDataArgs['data'];\n};\n\nexport function getExportMultisigConfigInstruction<\n TAccountSystemProgram extends string,\n TProgramAddress extends\n Address = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: ExportMultisigConfigInput<TAccountSystemProgram>,\n config?: { programAddress?: TProgramAddress }\n): ExportMultisigConfigInstruction<TProgramAddress, TAccountSystemProgram> {\n // Program address.\n const programAddress =\n config?.programAddress ?? GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n systemProgram: { value: input.systemProgram ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolve default values.\n if (!accounts.systemProgram.value) {\n accounts.systemProgram.value =\n '11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [getAccountMeta(accounts.systemProgram)],\n programAddress,\n data: getExportMultisigConfigInstructionDataEncoder().encode(\n args as ExportMultisigConfigInstructionDataArgs\n ),\n } as ExportMultisigConfigInstruction<TProgramAddress, TAccountSystemProgram>;\n\n return instruction;\n}\n\nexport type ParsedExportMultisigConfigInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n systemProgram: TAccountMetas[0];\n };\n data: ExportMultisigConfigInstructionData;\n};\n\nexport function parseExportMultisigConfigInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>\n): ParsedExportMultisigConfigInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 1) {\n throw new Error('[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts');\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = instruction.accounts![accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n systemProgram: getNextAccount(),\n },\n data: getExportMultisigConfigInstructionDataDecoder().decode(\n instruction.data\n ),\n };\n}\n","/**\n * This code was AUTOGENERATED using the codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n combineCodec,\n fixDecoderSize,\n fixEncoderSize,\n getBytesDecoder,\n getBytesEncoder,\n getStructDecoder,\n getStructEncoder,\n transformEncoder,\n type AccountMeta,\n type Address,\n type Codec,\n type Decoder,\n type Encoder,\n type Instruction,\n type InstructionWithAccounts,\n type InstructionWithData,\n type ReadonlyAccount,\n type ReadonlyUint8Array,\n} from '@solana/kit';\nimport {\n GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_INSTRUCTION_DATA,\n GHOSTSPEAK_MARKETPLACE_ERROR__MISSING_REQUIRED_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INSTRUCTION_PARSING_FAILED,\n isGhostspeakMarketplaceError,\n} from '../errors';\nimport { GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS } from '../programs';\nimport { getAccountMetaFactory, type ResolvedAccount } from '../shared';\nimport {\n getReportEntryDecoder,\n getReportEntryEncoder,\n type ReportEntry,\n type ReportEntryArgs,\n} from '../types';\n\nexport const EXPORT_REPORT_ENTRY_DISCRIMINATOR = new Uint8Array([\n 34, 42, 234, 113, 80, 201, 15, 95,\n]);\n\nexport function getExportReportEntryDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 8).encode(\n EXPORT_REPORT_ENTRY_DISCRIMINATOR\n );\n}\n\nexport type ExportReportEntryInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountSystemProgram extends\n | string\n | AccountMeta<string> = '11111111111111111111111111111111',\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountSystemProgram extends string\n ? ReadonlyAccount<TAccountSystemProgram>\n : TAccountSystemProgram,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type ExportReportEntryInstructionData = {\n discriminator: ReadonlyUint8Array;\n data: ReportEntry;\n};\n\nexport type ExportReportEntryInstructionDataArgs = { data: ReportEntryArgs };\n\nexport function getExportReportEntryInstructionDataEncoder(): Encoder<ExportReportEntryInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n ['discriminator', fixEncoderSize(getBytesEncoder(), 8)],\n ['data', getReportEntryEncoder()],\n ]),\n (value) => ({ ...value, discriminator: EXPORT_REPORT_ENTRY_DISCRIMINATOR })\n );\n}\n\nexport function getExportReportEntryInstructionDataDecoder(): Decoder<ExportReportEntryInstructionData> {\n return getStructDecoder([\n ['discriminator', fixDecoderSize(getBytesDecoder(), 8)],\n ['data', getReportEntryDecoder()],\n ]);\n}\n\nexport function getExportReportEntryInstructionDataCodec(): Codec<\n ExportReportEntryInstructionDataArgs,\n ExportReportEntryInstructionData\n> {\n return combineCodec(\n getExportReportEntryInstructionDataEncoder(),\n getExportReportEntryInstructionDataDecoder()\n );\n}\n\nexport type ExportReportEntryInput<\n TAccountSystemProgram extends string = string,\n> = {\n systemProgram?: Address<TAccountSystemProgram>;\n data: ExportReportEntryInstructionDataArgs['data'];\n};\n\nexport function getExportReportEntryInstruction<\n TAccountSystemProgram extends string,\n TProgramAddress extends\n Address = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: ExportReportEntryInput<TAccountSystemProgram>,\n config?: { programAddress?: TProgramAddress }\n): ExportReportEntryInstruction<TProgramAddress, TAccountSystemProgram> {\n // Program address.\n const programAddress =\n config?.programAddress ?? GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n systemProgram: { value: input.systemProgram ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolve default values.\n if (!accounts.systemProgram.value) {\n accounts.systemProgram.value =\n '11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [getAccountMeta(accounts.systemProgram)],\n programAddress,\n data: getExportReportEntryInstructionDataEncoder().encode(\n args as ExportReportEntryInstructionDataArgs\n ),\n } as ExportReportEntryInstruction<TProgramAddress, TAccountSystemProgram>;\n\n return instruction;\n}\n\nexport type ParsedExportReportEntryInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n systemProgram: TAccountMetas[0];\n };\n data: ExportReportEntryInstructionData;\n};\n\nexport function parseExportReportEntryInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>\n): ParsedExportReportEntryInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 1) {\n throw new Error('[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts');\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = instruction.accounts![accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n systemProgram: getNextAccount(),\n },\n data: getExportReportEntryInstructionDataDecoder().decode(instruction.data),\n };\n}\n","/**\n * This code was AUTOGENERATED using the codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n combineCodec,\n fixDecoderSize,\n fixEncoderSize,\n getBytesDecoder,\n getBytesEncoder,\n getStructDecoder,\n getStructEncoder,\n transformEncoder,\n type AccountMeta,\n type Address,\n type Codec,\n type Decoder,\n type Encoder,\n type Instruction,\n type InstructionWithAccounts,\n type InstructionWithData,\n type ReadonlyAccount,\n type ReadonlyUint8Array,\n} from '@solana/kit';\nimport {\n GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_INSTRUCTION_DATA,\n GHOSTSPEAK_MARKETPLACE_ERROR__MISSING_REQUIRED_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INSTRUCTION_PARSING_FAILED,\n isGhostspeakMarketplaceError,\n} from '../errors';\nimport { GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS } from '../programs';\nimport { getAccountMetaFactory, type ResolvedAccount } from '../shared';\nimport {\n getResourceConstraintsDecoder,\n getResourceConstraintsEncoder,\n type ResourceConstraints,\n type ResourceConstraintsArgs,\n} from '../types';\n\nexport const EXPORT_RESOURCE_CONSTRAINTS_DISCRIMINATOR = new Uint8Array([\n 250, 43, 164, 121, 205, 210, 124, 127,\n]);\n\nexport function getExportResourceConstraintsDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 8).encode(\n EXPORT_RESOURCE_CONSTRAINTS_DISCRIMINATOR\n );\n}\n\nexport type ExportResourceConstraintsInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountSystemProgram extends\n | string\n | AccountMeta<string> = '11111111111111111111111111111111',\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountSystemProgram extends string\n ? ReadonlyAccount<TAccountSystemProgram>\n : TAccountSystemProgram,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type ExportResourceConstraintsInstructionData = {\n discriminator: ReadonlyUint8Array;\n data: ResourceConstraints;\n};\n\nexport type ExportResourceConstraintsInstructionDataArgs = {\n data: ResourceConstraintsArgs;\n};\n\nexport function getExportResourceConstraintsInstructionDataEncoder(): Encoder<ExportResourceConstraintsInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n ['discriminator', fixEncoderSize(getBytesEncoder(), 8)],\n ['data', getResourceConstraintsEncoder()],\n ]),\n (value) => ({\n ...value,\n discriminator: EXPORT_RESOURCE_CONSTRAINTS_DISCRIMINATOR,\n })\n );\n}\n\nexport function getExportResourceConstraintsInstructionDataDecoder(): Decoder<ExportResourceConstraintsInstructionData> {\n return getStructDecoder([\n ['discriminator', fixDecoderSize(getBytesDecoder(), 8)],\n ['data', getResourceConstraintsDecoder()],\n ]);\n}\n\nexport function getExportResourceConstraintsInstructionDataCodec(): Codec<\n ExportResourceConstraintsInstructionDataArgs,\n ExportResourceConstraintsInstructionData\n> {\n return combineCodec(\n getExportResourceConstraintsInstructionDataEncoder(),\n getExportResourceConstraintsInstructionDataDecoder()\n );\n}\n\nexport type ExportResourceConstraintsInput<\n TAccountSystemProgram extends string = string,\n> = {\n systemProgram?: Address<TAccountSystemProgram>;\n data: ExportResourceConstraintsInstructionDataArgs['data'];\n};\n\nexport function getExportResourceConstraintsInstruction<\n TAccountSystemProgram extends string,\n TProgramAddress extends\n Address = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: ExportResourceConstraintsInput<TAccountSystemProgram>,\n config?: { programAddress?: TProgramAddress }\n): ExportResourceConstraintsInstruction<\n TProgramAddress,\n TAccountSystemProgram\n> {\n // Program address.\n const programAddress =\n config?.programAddress ?? GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n systemProgram: { value: input.systemProgram ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolve default values.\n if (!accounts.systemProgram.value) {\n accounts.systemProgram.value =\n '11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [getAccountMeta(accounts.systemProgram)],\n programAddress,\n data: getExportResourceConstraintsInstructionDataEncoder().encode(\n args as ExportResourceConstraintsInstructionDataArgs\n ),\n } as ExportResourceConstraintsInstruction<\n TProgramAddress,\n TAccountSystemProgram\n >;\n\n return instruction;\n}\n\nexport type ParsedExportResourceConstraintsInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n systemProgram: TAccountMetas[0];\n };\n data: ExportResourceConstraintsInstructionData;\n};\n\nexport function parseExportResourceConstraintsInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>\n): ParsedExportResourceConstraintsInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 1) {\n throw new Error('[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts');\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = instruction.accounts![accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n systemProgram: getNextAccount(),\n },\n data: getExportResourceConstraintsInstructionDataDecoder().decode(\n instruction.data\n ),\n };\n}\n","/**\n * This code was AUTOGENERATED using the codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n combineCodec,\n fixDecoderSize,\n fixEncoderSize,\n getBytesDecoder,\n getBytesEncoder,\n getStructDecoder,\n getStructEncoder,\n transformEncoder,\n type AccountMeta,\n type Address,\n type Codec,\n type Decoder,\n type Encoder,\n type Instruction,\n type InstructionWithAccounts,\n type InstructionWithData,\n type ReadonlyAccount,\n type ReadonlyUint8Array,\n} from '@solana/kit';\nimport {\n GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_INSTRUCTION_DATA,\n GHOSTSPEAK_MARKETPLACE_ERROR__MISSING_REQUIRED_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INSTRUCTION_PARSING_FAILED,\n isGhostspeakMarketplaceError,\n} from '../errors';\nimport { GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS } from '../programs';\nimport { getAccountMetaFactory, type ResolvedAccount } from '../shared';\nimport {\n getRuleConditionDecoder,\n getRuleConditionEncoder,\n type RuleCondition,\n type RuleConditionArgs,\n} from '../types';\n\nexport const EXPORT_RULE_CONDITION_DISCRIMINATOR = new Uint8Array([\n 87, 78, 249, 236, 50, 103, 49, 173,\n]);\n\nexport function getExportRuleConditionDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 8).encode(\n EXPORT_RULE_CONDITION_DISCRIMINATOR\n );\n}\n\nexport type ExportRuleConditionInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountSystemProgram extends\n | string\n | AccountMeta<string> = '11111111111111111111111111111111',\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountSystemProgram extends string\n ? ReadonlyAccount<TAccountSystemProgram>\n : TAccountSystemProgram,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type ExportRuleConditionInstructionData = {\n discriminator: ReadonlyUint8Array;\n data: RuleCondition;\n};\n\nexport type ExportRuleConditionInstructionDataArgs = {\n data: RuleConditionArgs;\n};\n\nexport function getExportRuleConditionInstructionDataEncoder(): Encoder<ExportRuleConditionInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n ['discriminator', fixEncoderSize(getBytesEncoder(), 8)],\n ['data', getRuleConditionEncoder()],\n ]),\n (value) => ({\n ...value,\n discriminator: EXPORT_RULE_CONDITION_DISCRIMINATOR,\n })\n );\n}\n\nexport function getExportRuleConditionInstructionDataDecoder(): Decoder<ExportRuleConditionInstructionData> {\n return getStructDecoder([\n ['discriminator', fixDecoderSize(getBytesDecoder(), 8)],\n ['data', getRuleConditionDecoder()],\n ]);\n}\n\nexport function getExportRuleConditionInstructionDataCodec(): Codec<\n ExportRuleConditionInstructionDataArgs,\n ExportRuleConditionInstructionData\n> {\n return combineCodec(\n getExportRuleConditionInstructionDataEncoder(),\n getExportRuleConditionInstructionDataDecoder()\n );\n}\n\nexport type ExportRuleConditionInput<\n TAccountSystemProgram extends string = string,\n> = {\n systemProgram?: Address<TAccountSystemProgram>;\n data: ExportRuleConditionInstructionDataArgs['data'];\n};\n\nexport function getExportRuleConditionInstruction<\n TAccountSystemProgram extends string,\n TProgramAddress extends\n Address = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: ExportRuleConditionInput<TAccountSystemProgram>,\n config?: { programAddress?: TProgramAddress }\n): ExportRuleConditionInstruction<TProgramAddress, TAccountSystemProgram> {\n // Program address.\n const programAddress =\n config?.programAddress ?? GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n systemProgram: { value: input.systemProgram ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolve default values.\n if (!accounts.systemProgram.value) {\n accounts.systemProgram.value =\n '11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [getAccountMeta(accounts.systemProgram)],\n programAddress,\n data: getExportRuleConditionInstructionDataEncoder().encode(\n args as ExportRuleConditionInstructionDataArgs\n ),\n } as ExportRuleConditionInstruction<TProgramAddress, TAccountSystemProgram>;\n\n return instruction;\n}\n\nexport type ParsedExportRuleConditionInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n systemProgram: TAccountMetas[0];\n };\n data: ExportRuleConditionInstructionData;\n};\n\nexport function parseExportRuleConditionInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>\n): ParsedExportRuleConditionInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 1) {\n throw new Error('[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts');\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = instruction.accounts![accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n systemProgram: getNextAccount(),\n },\n data: getExportRuleConditionInstructionDataDecoder().decode(\n instruction.data\n ),\n };\n}\n","/**\n * This code was AUTOGENERATED using the codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n combineCodec,\n fixDecoderSize,\n fixEncoderSize,\n getBytesDecoder,\n getBytesEncoder,\n getStructDecoder,\n getStructEncoder,\n transformEncoder,\n type AccountMeta,\n type AccountSignerMeta,\n type Address,\n type FixedSizeCodec,\n type FixedSizeDecoder,\n type FixedSizeEncoder,\n type Instruction,\n type InstructionWithAccounts,\n type InstructionWithData,\n type ReadonlyAccount,\n type ReadonlyUint8Array,\n type TransactionSigner,\n type WritableAccount,\n type WritableSignerAccount,\n} from '@solana/kit';\nimport {\n GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_INSTRUCTION_DATA,\n GHOSTSPEAK_MARKETPLACE_ERROR__MISSING_REQUIRED_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INSTRUCTION_PARSING_FAILED,\n isGhostspeakMarketplaceError,\n} from '../errors';\nimport { GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS } from '../programs';\nimport { getAccountMetaFactory, type ResolvedAccount } from '../shared';\n\nexport const EXTEND_AUCTION_FOR_RESERVE_DISCRIMINATOR = new Uint8Array([\n 99, 201, 28, 182, 134, 0, 55, 181,\n]);\n\nexport function getExtendAuctionForReserveDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 8).encode(\n EXTEND_AUCTION_FOR_RESERVE_DISCRIMINATOR\n );\n}\n\nexport type ExtendAuctionForReserveInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountAuction extends string | AccountMeta<string> = string,\n TAccountAuthority extends string | AccountMeta<string> = string,\n TAccountClock extends\n | string\n | AccountMeta<string> = 'SysvarC1ock11111111111111111111111111111111',\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountAuction extends string\n ? WritableAccount<TAccountAuction>\n : TAccountAuction,\n TAccountAuthority extends string\n ? WritableSignerAccount<TAccountAuthority> &\n AccountSignerMeta<TAccountAuthority>\n : TAccountAuthority,\n TAccountClock extends string\n ? ReadonlyAccount<TAccountClock>\n : TAccountClock,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type ExtendAuctionForReserveInstructionData = {\n discriminator: ReadonlyUint8Array;\n};\n\nexport type ExtendAuctionForReserveInstructionDataArgs = {};\n\nexport function getExtendAuctionForReserveInstructionDataEncoder(): FixedSizeEncoder<ExtendAuctionForReserveInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([['discriminator', fixEncoderSize(getBytesEncoder(), 8)]]),\n (value) => ({\n ...value,\n discriminator: EXTEND_AUCTION_FOR_RESERVE_DISCRIMINATOR,\n })\n );\n}\n\nexport function getExtendAuctionForReserveInstructionDataDecoder(): FixedSizeDecoder<ExtendAuctionForReserveInstructionData> {\n return getStructDecoder([\n ['discriminator', fixDecoderSize(getBytesDecoder(), 8)],\n ]);\n}\n\nexport function getExtendAuctionForReserveInstructionDataCodec(): FixedSizeCodec<\n ExtendAuctionForReserveInstructionDataArgs,\n ExtendAuctionForReserveInstructionData\n> {\n return combineCodec(\n getExtendAuctionForReserveInstructionDataEncoder(),\n getExtendAuctionForReserveInstructionDataDecoder()\n );\n}\n\nexport type ExtendAuctionForReserveInput<\n TAccountAuction extends string = string,\n TAccountAuthority extends string = string,\n TAccountClock extends string = string,\n> = {\n /** Auction account with canonical validation */\n auction: Address<TAccountAuction>;\n /** Enhanced authority verification - only creator or protocol admin can extend */\n authority: TransactionSigner<TAccountAuthority>;\n /** Clock sysvar for timestamp validation */\n clock?: Address<TAccountClock>;\n};\n\nexport function getExtendAuctionForReserveInstruction<\n TAccountAuction extends string,\n TAccountAuthority extends string,\n TAccountClock extends string,\n TProgramAddress extends\n Address = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: ExtendAuctionForReserveInput<\n TAccountAuction,\n TAccountAuthority,\n TAccountClock\n >,\n config?: { programAddress?: TProgramAddress }\n): ExtendAuctionForReserveInstruction<\n TProgramAddress,\n TAccountAuction,\n TAccountAuthority,\n TAccountClock\n> {\n // Program address.\n const programAddress =\n config?.programAddress ?? GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n auction: { value: input.auction ?? null, isWritable: true },\n authority: { value: input.authority ?? null, isWritable: true },\n clock: { value: input.clock ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Resolve default values.\n if (!accounts.clock.value) {\n accounts.clock.value =\n 'SysvarC1ock11111111111111111111111111111111' as Address<'SysvarC1ock11111111111111111111111111111111'>;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.auction),\n getAccountMeta(accounts.authority),\n getAccountMeta(accounts.clock),\n ],\n programAddress,\n data: getExtendAuctionForReserveInstructionDataEncoder().encode({}),\n } as ExtendAuctionForReserveInstruction<\n TProgramAddress,\n TAccountAuction,\n TAccountAuthority,\n TAccountClock\n >;\n\n return instruction;\n}\n\nexport type ParsedExtendAuctionForReserveInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n /** Auction account with canonical validation */\n auction: TAccountMetas[0];\n /** Enhanced authority verification - only creator or protocol admin can extend */\n authority: TAccountMetas[1];\n /** Clock sysvar for timestamp validation */\n clock: TAccountMetas[2];\n };\n data: ExtendAuctionForReserveInstructionData;\n};\n\nexport function parseExtendAuctionForReserveInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>\n): ParsedExtendAuctionForReserveInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 3) {\n throw new Error('[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts');\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = instruction.accounts![accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n auction: getNextAccount(),\n authority: getNextAccount(),\n clock: getNextAccount(),\n },\n data: getExtendAuctionForReserveInstructionDataDecoder().decode(\n instruction.data\n ),\n };\n}\n","/**\n * This code was AUTOGENERATED using the codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n addDecoderSizePrefix,\n addEncoderSizePrefix,\n combineCodec,\n fixDecoderSize,\n fixEncoderSize,\n getAddressEncoder,\n getBytesDecoder,\n getBytesEncoder,\n getProgramDerivedAddress,\n getStructDecoder,\n getStructEncoder,\n getU32Decoder,\n getU32Encoder,\n getUtf8Decoder,\n getUtf8Encoder,\n transformEncoder,\n type AccountMeta,\n type AccountSignerMeta,\n type Address,\n type Codec,\n type Decoder,\n type Encoder,\n type Instruction,\n type InstructionWithAccounts,\n type InstructionWithData,\n type ReadonlyAccount,\n type ReadonlyUint8Array,\n type TransactionSigner,\n type WritableAccount,\n type WritableSignerAccount,\n} from '@solana/kit';\nimport {\n GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_INSTRUCTION_DATA,\n GHOSTSPEAK_MARKETPLACE_ERROR__MISSING_REQUIRED_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INSTRUCTION_PARSING_FAILED,\n isGhostspeakMarketplaceError,\n} from '../errors';\nimport { GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS } from '../programs';\nimport {\n expectAddress,\n expectSome,\n getAccountMetaFactory,\n type ResolvedAccount,\n} from '../shared';\n\nexport const FILE_DISPUTE_DISCRIMINATOR = new Uint8Array([\n 210, 63, 221, 114, 212, 97, 195, 156,\n]);\n\nexport function getFileDisputeDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 8).encode(\n FILE_DISPUTE_DISCRIMINATOR\n );\n}\n\nexport type FileDisputeInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountDispute extends string | AccountMeta<string> = string,\n TAccountTransaction extends string | AccountMeta<string> = string,\n TAccountUserRegistry extends string | AccountMeta<string> = string,\n TAccountComplainant extends string | AccountMeta<string> = string,\n TAccountRespondent extends string | AccountMeta<string> = string,\n TAccountSystemProgram extends\n | string\n | AccountMeta<string> = '11111111111111111111111111111111',\n TAccountClock extends\n | string\n | AccountMeta<string> = 'SysvarC1ock11111111111111111111111111111111',\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountDispute extends string\n ? WritableAccount<TAccountDispute>\n : TAccountDispute,\n TAccountTransaction extends string\n ? ReadonlyAccount<TAccountTransaction>\n : TAccountTransaction,\n TAccountUserRegistry extends string\n ? WritableAccount<TAccountUserRegistry>\n : TAccountUserRegistry,\n TAccountComplainant extends string\n ? WritableSignerAccount<TAccountComplainant> &\n AccountSignerMeta<TAccountComplainant>\n : TAccountComplainant,\n TAccountRespondent extends string\n ? ReadonlyAccount<TAccountRespondent>\n : TAccountRespondent,\n TAccountSystemProgram extends string\n ? ReadonlyAccount<TAccountSystemProgram>\n : TAccountSystemProgram,\n TAccountClock extends string\n ? ReadonlyAccount<TAccountClock>\n : TAccountClock,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type FileDisputeInstructionData = {\n discriminator: ReadonlyUint8Array;\n reason: string;\n};\n\nexport type FileDisputeInstructionDataArgs = { reason: string };\n\nexport function getFileDisputeInstructionDataEncoder(): Encoder<FileDisputeInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n ['discriminator', fixEncoderSize(getBytesEncoder(), 8)],\n ['reason', addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder())],\n ]),\n (value) => ({ ...value, discriminator: FILE_DISPUTE_DISCRIMINATOR })\n );\n}\n\nexport function getFileDisputeInstructionDataDecoder(): Decoder<FileDisputeInstructionData> {\n return getStructDecoder([\n ['discriminator', fixDecoderSize(getBytesDecoder(), 8)],\n ['reason', addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())],\n ]);\n}\n\nexport function getFileDisputeInstructionDataCodec(): Codec<\n FileDisputeInstructionDataArgs,\n FileDisputeInstructionData\n> {\n return combineCodec(\n getFileDisputeInstructionDataEncoder(),\n getFileDisputeInstructionDataDecoder()\n );\n}\n\nexport type FileDisputeAsyncInput<\n TAccountDispute extends string = string,\n TAccountTransaction extends string = string,\n TAccountUserRegistry extends string = string,\n TAccountComplainant extends string = string,\n TAccountRespondent extends string = string,\n TAccountSystemProgram extends string = string,\n TAccountClock extends string = string,\n> = {\n /** Dispute account with collision prevention */\n dispute?: Address<TAccountDispute>;\n /**\n * Transaction account with enhanced validation\n * The transaction type is validated in the instruction handler\n * Transaction info for key reference\n */\n transaction: Address<TAccountTransaction>;\n /** User registry for rate limiting and spam prevention */\n userRegistry?: Address<TAccountUserRegistry>;\n /** Enhanced complainant verification */\n complainant: TransactionSigner<TAccountComplainant>;\n /** Enhanced respondent validation */\n respondent: Address<TAccountRespondent>;\n /** System program for account creation */\n systemProgram?: Address<TAccountSystemProgram>;\n /** Clock sysvar for timestamp validation */\n clock?: Address<TAccountClock>;\n reason: FileDisputeInstructionDataArgs['reason'];\n};\n\nexport async function getFileDisputeInstructionAsync<\n TAccountDispute extends string,\n TAccountTransaction extends string,\n TAccountUserRegistry extends string,\n TAccountComplainant extends string,\n TAccountRespondent extends string,\n TAccountSystemProgram extends string,\n TAccountClock extends string,\n TProgramAddress extends\n Address = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: FileDisputeAsyncInput<\n TAccountDispute,\n TAccountTransaction,\n TAccountUserRegistry,\n TAccountComplainant,\n TAccountRespondent,\n TAccountSystemProgram,\n TAccountClock\n >,\n config?: { programAddress?: TProgramAddress }\n): Promise<\n FileDisputeInstruction<\n TProgramAddress,\n TAccountDispute,\n TAccountTransaction,\n TAccountUserRegistry,\n TAccountComplainant,\n TAccountRespondent,\n TAccountSystemProgram,\n TAccountClock\n >\n> {\n // Program address.\n const programAddress =\n config?.programAddress ?? GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n dispute: { value: input.dispute ?? null, isWritable: true },\n transaction: { value: input.transaction ?? null, isWritable: false },\n userRegistry: { value: input.userRegistry ?? null, isWritable: true },\n complainant: { value: input.complainant ?? null, isWritable: true },\n respondent: { value: input.respondent ?? null, isWritable: false },\n systemProgram: { value: input.systemProgram ?? null, isWritable: false },\n clock: { value: input.clock ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolve default values.\n if (!accounts.dispute.value) {\n accounts.dispute.value = await getProgramDerivedAddress({\n programAddress,\n seeds: [\n getBytesEncoder().encode(\n new Uint8Array([100, 105, 115, 112, 117, 116, 101])\n ),\n getAddressEncoder().encode(expectAddress(accounts.transaction.value)),\n getAddressEncoder().encode(expectAddress(accounts.complainant.value)),\n addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder()).encode(\n expectSome(args.reason)\n ),\n ],\n });\n }\n if (!accounts.userRegistry.value) {\n accounts.userRegistry.value = await getProgramDerivedAddress({\n programAddress,\n seeds: [\n getBytesEncoder().encode(\n new Uint8Array([\n 117, 115, 101, 114, 95, 114, 101, 103, 105, 115, 116, 114, 121,\n ])\n ),\n getAddressEncoder().encode(expectAddress(accounts.complainant.value)),\n ],\n });\n }\n if (!accounts.systemProgram.value) {\n accounts.systemProgram.value =\n '11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>;\n }\n if (!accounts.clock.value) {\n accounts.clock.value =\n 'SysvarC1ock11111111111111111111111111111111' as Address<'SysvarC1ock11111111111111111111111111111111'>;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.dispute),\n getAccountMeta(accounts.transaction),\n getAccountMeta(accounts.userRegistry),\n getAccountMeta(accounts.complainant),\n getAccountMeta(accounts.respondent),\n getAccountMeta(accounts.systemProgram),\n getAccountMeta(accounts.clock),\n ],\n programAddress,\n data: getFileDisputeInstructionDataEncoder().encode(\n args as FileDisputeInstructionDataArgs\n ),\n } as FileDisputeInstruction<\n TProgramAddress,\n TAccountDispute,\n TAccountTransaction,\n TAccountUserRegistry,\n TAccountComplainant,\n TAccountRespondent,\n TAccountSystemProgram,\n TAccountClock\n >;\n\n return instruction;\n}\n\nexport type FileDisputeInput<\n TAccountDispute extends string = string,\n TAccountTransaction extends string = string,\n TAccountUserRegistry extends string = string,\n TAccountComplainant extends string = string,\n TAccountRespondent extends string = string,\n TAccountSystemProgram extends string = string,\n TAccountClock extends string = string,\n> = {\n /** Dispute account with collision prevention */\n dispute: Address<TAccountDispute>;\n /**\n * Transaction account with enhanced validation\n * The transaction type is validated in the instruction handler\n * Transaction info for key reference\n */\n transaction: Address<TAccountTransaction>;\n /** User registry for rate limiting and spam prevention */\n userRegistry: Address<TAccountUserRegistry>;\n /** Enhanced complainant verification */\n complainant: TransactionSigner<TAccountComplainant>;\n /** Enhanced respondent validation */\n respondent: Address<TAccountRespondent>;\n /** System program for account creation */\n systemProgram?: Address<TAccountSystemProgram>;\n /** Clock sysvar for timestamp validation */\n clock?: Address<TAccountClock>;\n reason: FileDisputeInstructionDataArgs['reason'];\n};\n\nexport function getFileDisputeInstruction<\n TAccountDispute extends string,\n TAccountTransaction extends string,\n TAccountUserRegistry extends string,\n TAccountComplainant extends string,\n TAccountRespondent extends string,\n TAccountSystemProgram extends string,\n TAccountClock extends string,\n TProgramAddress extends\n Address = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: FileDisputeInput<\n TAccountDispute,\n TAccountTransaction,\n TAccountUserRegistry,\n TAccountComplainant,\n TAccountRespondent,\n TAccountSystemProgram,\n TAccountClock\n >,\n config?: { programAddress?: TProgramAddress }\n): FileDisputeInstruction<\n TProgramAddress,\n TAccountDispute,\n TAccountTransaction,\n TAccountUserRegistry,\n TAccountComplainant,\n TAccountRespondent,\n TAccountSystemProgram,\n TAccountClock\n> {\n // Program address.\n const programAddress =\n config?.programAddress ?? GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n dispute: { value: input.dispute ?? null, isWritable: true },\n transaction: { value: input.transaction ?? null, isWritable: false },\n userRegistry: { value: input.userRegistry ?? null, isWritable: true },\n complainant: { value: input.complainant ?? null, isWritable: true },\n respondent: { value: input.respondent ?? null, isWritable: false },\n systemProgram: { value: input.systemProgram ?? null, isWritable: false },\n clock: { value: input.clock ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolve default values.\n if (!accounts.systemProgram.value) {\n accounts.systemProgram.value =\n '11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>;\n }\n if (!accounts.clock.value) {\n accounts.clock.value =\n 'SysvarC1ock11111111111111111111111111111111' as Address<'SysvarC1ock11111111111111111111111111111111'>;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.dispute),\n getAccountMeta(accounts.transaction),\n getAccountMeta(accounts.userRegistry),\n getAccountMeta(accounts.complainant),\n getAccountMeta(accounts.respondent),\n getAccountMeta(accounts.systemProgram),\n getAccountMeta(accounts.clock),\n ],\n programAddress,\n data: getFileDisputeInstructionDataEncoder().encode(\n args as FileDisputeInstructionDataArgs\n ),\n } as FileDisputeInstruction<\n TProgramAddress,\n TAccountDispute,\n TAccountTransaction,\n TAccountUserRegistry,\n TAccountComplainant,\n TAccountRespondent,\n TAccountSystemProgram,\n TAccountClock\n >;\n\n return instruction;\n}\n\nexport type ParsedFileDisputeInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n /** Dispute account with collision prevention */\n dispute: TAccountMetas[0];\n /**\n * Transaction account with enhanced validation\n * The transaction type is validated in the instruction handler\n * Transaction info for key reference\n */\n\n transaction: TAccountMetas[1];\n /** User registry for rate limiting and spam prevention */\n userRegistry: TAccountMetas[2];\n /** Enhanced complainant verification */\n complainant: TAccountMetas[3];\n /** Enhanced respondent validation */\n respondent: TAccountMetas[4];\n /** System program for account creation */\n systemProgram: TAccountMetas[5];\n /** Clock sysvar for timestamp validation */\n clock: TAccountMetas[6];\n };\n data: FileDisputeInstructionData;\n};\n\nexport function parseFileDisputeInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>\n): ParsedFileDisputeInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 7) {\n throw new Error('[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts');\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = instruction.accounts![accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n dispute: getNextAccount(),\n transaction: getNextAccount(),\n userRegistry: getNextAccount(),\n complainant: getNextAccount(),\n respondent: getNextAccount(),\n systemProgram: getNextAccount(),\n clock: getNextAccount(),\n },\n data: getFileDisputeInstructionDataDecoder().decode(instruction.data),\n };\n}\n","/**\n * This code was AUTOGENERATED using the codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n combineCodec,\n fixDecoderSize,\n fixEncoderSize,\n getBytesDecoder,\n getBytesEncoder,\n getStructDecoder,\n getStructEncoder,\n transformEncoder,\n type AccountMeta,\n type AccountSignerMeta,\n type Address,\n type FixedSizeCodec,\n type FixedSizeDecoder,\n type FixedSizeEncoder,\n type Instruction,\n type InstructionWithAccounts,\n type InstructionWithData,\n type ReadonlyAccount,\n type ReadonlyUint8Array,\n type TransactionSigner,\n type WritableAccount,\n type WritableSignerAccount,\n} from '@solana/kit';\nimport {\n GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_INSTRUCTION_DATA,\n GHOSTSPEAK_MARKETPLACE_ERROR__MISSING_REQUIRED_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INSTRUCTION_PARSING_FAILED,\n isGhostspeakMarketplaceError,\n} from '../errors';\nimport { GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS } from '../programs';\nimport { getAccountMetaFactory, type ResolvedAccount } from '../shared';\n\nexport const FINALIZE_AUCTION_DISCRIMINATOR = new Uint8Array([\n 220, 209, 175, 193, 57, 132, 241, 168,\n]);\n\nexport function getFinalizeAuctionDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 8).encode(\n FINALIZE_AUCTION_DISCRIMINATOR\n );\n}\n\nexport type FinalizeAuctionInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountAuction extends string | AccountMeta<string> = string,\n TAccountAuthority extends string | AccountMeta<string> = string,\n TAccountClock extends\n | string\n | AccountMeta<string> = 'SysvarC1ock11111111111111111111111111111111',\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountAuction extends string\n ? WritableAccount<TAccountAuction>\n : TAccountAuction,\n TAccountAuthority extends string\n ? WritableSignerAccount<TAccountAuthority> &\n AccountSignerMeta<TAccountAuthority>\n : TAccountAuthority,\n TAccountClock extends string\n ? ReadonlyAccount<TAccountClock>\n : TAccountClock,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type FinalizeAuctionInstructionData = {\n discriminator: ReadonlyUint8Array;\n};\n\nexport type FinalizeAuctionInstructionDataArgs = {};\n\nexport function getFinalizeAuctionInstructionDataEncoder(): FixedSizeEncoder<FinalizeAuctionInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([['discriminator', fixEncoderSize(getBytesEncoder(), 8)]]),\n (value) => ({ ...value, discriminator: FINALIZE_AUCTION_DISCRIMINATOR })\n );\n}\n\nexport function getFinalizeAuctionInstructionDataDecoder(): FixedSizeDecoder<FinalizeAuctionInstructionData> {\n return getStructDecoder([\n ['discriminator', fixDecoderSize(getBytesDecoder(), 8)],\n ]);\n}\n\nexport function getFinalizeAuctionInstructionDataCodec(): FixedSizeCodec<\n FinalizeAuctionInstructionDataArgs,\n FinalizeAuctionInstructionData\n> {\n return combineCodec(\n getFinalizeAuctionInstructionDataEncoder(),\n getFinalizeAuctionInstructionDataDecoder()\n );\n}\n\nexport type FinalizeAuctionInput<\n TAccountAuction extends string = string,\n TAccountAuthority extends string = string,\n TAccountClock extends string = string,\n> = {\n /** Auction account with canonical validation */\n auction: Address<TAccountAuction>;\n /** Enhanced authority verification - only creator or protocol admin */\n authority: TransactionSigner<TAccountAuthority>;\n /** Clock sysvar for timestamp validation */\n clock?: Address<TAccountClock>;\n};\n\nexport function getFinalizeAuctionInstruction<\n TAccountAuction extends string,\n TAccountAuthority extends string,\n TAccountClock extends string,\n TProgramAddress extends\n Address = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: FinalizeAuctionInput<\n TAccountAuction,\n TAccountAuthority,\n TAccountClock\n >,\n config?: { programAddress?: TProgramAddress }\n): FinalizeAuctionInstruction<\n TProgramAddress,\n TAccountAuction,\n TAccountAuthority,\n TAccountClock\n> {\n // Program address.\n const programAddress =\n config?.programAddress ?? GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n auction: { value: input.auction ?? null, isWritable: true },\n authority: { value: input.authority ?? null, isWritable: true },\n clock: { value: input.clock ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Resolve default values.\n if (!accounts.clock.value) {\n accounts.clock.value =\n 'SysvarC1ock11111111111111111111111111111111' as Address<'SysvarC1ock11111111111111111111111111111111'>;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.auction),\n getAccountMeta(accounts.authority),\n getAccountMeta(accounts.clock),\n ],\n programAddress,\n data: getFinalizeAuctionInstructionDataEncoder().encode({}),\n } as FinalizeAuctionInstruction<\n TProgramAddress,\n TAccountAuction,\n TAccountAuthority,\n TAccountClock\n >;\n\n return instruction;\n}\n\nexport type ParsedFinalizeAuctionInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n /** Auction account with canonical validation */\n auction: TAccountMetas[0];\n /** Enhanced authority verification - only creator or protocol admin */\n authority: TAccountMetas[1];\n /** Clock sysvar for timestamp validation */\n clock: TAccountMetas[2];\n };\n data: FinalizeAuctionInstructionData;\n};\n\nexport function parseFinalizeAuctionInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>\n): ParsedFinalizeAuctionInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 3) {\n throw new Error('[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts');\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = instruction.accounts![accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n auction: getNextAccount(),\n authority: getNextAccount(),\n clock: getNextAccount(),\n },\n data: getFinalizeAuctionInstructionDataDecoder().decode(instruction.data),\n };\n}\n","/**\n * This code was AUTOGENERATED using the codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n combineCodec,\n fixDecoderSize,\n fixEncoderSize,\n getBytesDecoder,\n getBytesEncoder,\n getI64Decoder,\n getI64Encoder,\n getProgramDerivedAddress,\n getStructDecoder,\n getStructEncoder,\n getU64Decoder,\n getU64Encoder,\n transformEncoder,\n type AccountMeta,\n type AccountSignerMeta,\n type Address,\n type FixedSizeCodec,\n type FixedSizeDecoder,\n type FixedSizeEncoder,\n type Instruction,\n type InstructionWithAccounts,\n type InstructionWithData,\n type ReadonlyAccount,\n type ReadonlyUint8Array,\n type TransactionSigner,\n type WritableAccount,\n type WritableSignerAccount,\n} from '@solana/kit';\nimport {\n GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_INSTRUCTION_DATA,\n GHOSTSPEAK_MARKETPLACE_ERROR__MISSING_REQUIRED_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INSTRUCTION_PARSING_FAILED,\n isGhostspeakMarketplaceError,\n} from '../errors';\nimport { GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS } from '../programs';\nimport {\n expectSome,\n getAccountMetaFactory,\n type ResolvedAccount,\n} from '../shared';\nimport {\n getReportTypeDecoder,\n getReportTypeEncoder,\n type ReportType,\n type ReportTypeArgs,\n} from '../types';\n\nexport const GENERATE_COMPLIANCE_REPORT_DISCRIMINATOR = new Uint8Array([\n 213, 97, 79, 234, 22, 228, 14, 32,\n]);\n\nexport function getGenerateComplianceReportDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 8).encode(\n GENERATE_COMPLIANCE_REPORT_DISCRIMINATOR\n );\n}\n\nexport type GenerateComplianceReportInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountReport extends string | AccountMeta<string> = string,\n TAccountAuditTrail extends string | AccountMeta<string> = string,\n TAccountAuthority extends string | AccountMeta<string> = string,\n TAccountSystemProgram extends\n | string\n | AccountMeta<string> = '11111111111111111111111111111111',\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountReport extends string\n ? WritableAccount<TAccountReport>\n : TAccountReport,\n TAccountAuditTrail extends string\n ? WritableAccount<TAccountAuditTrail>\n : TAccountAuditTrail,\n TAccountAuthority extends string\n ? WritableSignerAccount<TAccountAuthority> &\n AccountSignerMeta<TAccountAuthority>\n : TAccountAuthority,\n TAccountSystemProgram extends string\n ? ReadonlyAccount<TAccountSystemProgram>\n : TAccountSystemProgram,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type GenerateComplianceReportInstructionData = {\n discriminator: ReadonlyUint8Array;\n reportId: bigint;\n reportType: ReportType;\n dateRangeStart: bigint;\n dateRangeEnd: bigint;\n};\n\nexport type GenerateComplianceReportInstructionDataArgs = {\n reportId: number | bigint;\n reportType: ReportTypeArgs;\n dateRangeStart: number | bigint;\n dateRangeEnd: number | bigint;\n};\n\nexport function getGenerateComplianceReportInstructionDataEncoder(): FixedSizeEncoder<GenerateComplianceReportInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n ['discriminator', fixEncoderSize(getBytesEncoder(), 8)],\n ['reportId', getU64Encoder()],\n ['reportType', getReportTypeEncoder()],\n ['dateRangeStart', getI64Encoder()],\n ['dateRangeEnd', getI64Encoder()],\n ]),\n (value) => ({\n ...value,\n discriminator: GENERATE_COMPLIANCE_REPORT_DISCRIMINATOR,\n })\n );\n}\n\nexport function getGenerateComplianceReportInstructionDataDecoder(): FixedSizeDecoder<GenerateComplianceReportInstructionData> {\n return getStructDecoder([\n ['discriminator', fixDecoderSize(getBytesDecoder(), 8)],\n ['reportId', getU64Decoder()],\n ['reportType', getReportTypeDecoder()],\n ['dateRangeStart', getI64Decoder()],\n ['dateRangeEnd', getI64Decoder()],\n ]);\n}\n\nexport function getGenerateComplianceReportInstructionDataCodec(): FixedSizeCodec<\n GenerateComplianceReportInstructionDataArgs,\n GenerateComplianceReportInstructionData\n> {\n return combineCodec(\n getGenerateComplianceReportInstructionDataEncoder(),\n getGenerateComplianceReportInstructionDataDecoder()\n );\n}\n\nexport type GenerateComplianceReportAsyncInput<\n TAccountReport extends string = string,\n TAccountAuditTrail extends string = string,\n TAccountAuthority extends string = string,\n TAccountSystemProgram extends string = string,\n> = {\n report?: Address<TAccountReport>;\n /** Audit trail for the entity */\n auditTrail: Address<TAccountAuditTrail>;\n authority: TransactionSigner<TAccountAuthority>;\n systemProgram?: Address<TAccountSystemProgram>;\n reportId: GenerateComplianceReportInstructionDataArgs['reportId'];\n reportType: GenerateComplianceReportInstructionDataArgs['reportType'];\n dateRangeStart: GenerateComplianceReportInstructionDataArgs['dateRangeStart'];\n dateRangeEnd: GenerateComplianceReportInstructionDataArgs['dateRangeEnd'];\n};\n\nexport async function getGenerateComplianceReportInstructionAsync<\n TAccountReport extends string,\n TAccountAuditTrail extends string,\n TAccountAuthority extends string,\n TAccountSystemProgram extends string,\n TProgramAddress extends\n Address = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: GenerateComplianceReportAsyncInput<\n TAccountReport,\n TAccountAuditTrail,\n TAccountAuthority,\n TAccountSystemProgram\n >,\n config?: { programAddress?: TProgramAddress }\n): Promise<\n GenerateComplianceReportInstruction<\n TProgramAddress,\n TAccountReport,\n TAccountAuditTrail,\n TAccountAuthority,\n TAccountSystemProgram\n >\n> {\n // Program address.\n const programAddress =\n config?.programAddress ?? GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n report: { value: input.report ?? null, isWritable: true },\n auditTrail: { value: input.auditTrail ?? null, isWritable: true },\n authority: { value: input.authority ?? null, isWritable: true },\n systemProgram: { value: input.systemProgram ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolve default values.\n if (!accounts.report.value) {\n accounts.report.value = await getProgramDerivedAddress({\n programAddress,\n seeds: [\n getBytesEncoder().encode(\n new Uint8Array([\n 99, 111, 109, 112, 108, 105, 97, 110, 99, 101, 95, 114, 101, 112,\n 111, 114, 116,\n ])\n ),\n getU64Encoder().encode(expectSome(args.reportId)),\n ],\n });\n }\n if (!accounts.systemProgram.value) {\n accounts.systemProgram.value =\n '11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.report),\n getAccountMeta(accounts.auditTrail),\n getAccountMeta(accounts.authority),\n getAccountMeta(accounts.systemProgram),\n ],\n programAddress,\n data: getGenerateComplianceReportInstructionDataEncoder().encode(\n args as GenerateComplianceReportInstructionDataArgs\n ),\n } as GenerateComplianceReportInstruction<\n TProgramAddress,\n TAccountReport,\n TAccountAuditTrail,\n TAccountAuthority,\n TAccountSystemProgram\n >;\n\n return instruction;\n}\n\nexport type GenerateComplianceReportInput<\n TAccountReport extends string = string,\n TAccountAuditTrail extends string = string,\n TAccountAuthority extends string = string,\n TAccountSystemProgram extends string = string,\n> = {\n report: Address<TAccountReport>;\n /** Audit trail for the entity */\n auditTrail: Address<TAccountAuditTrail>;\n authority: TransactionSigner<TAccountAuthority>;\n systemProgram?: Address<TAccountSystemProgram>;\n reportId: GenerateComplianceReportInstructionDataArgs['reportId'];\n reportType: GenerateComplianceReportInstructionDataArgs['reportType'];\n dateRangeStart: GenerateComplianceReportInstructionDataArgs['dateRangeStart'];\n dateRangeEnd: GenerateComplianceReportInstructionDataArgs['dateRangeEnd'];\n};\n\nexport function getGenerateComplianceReportInstruction<\n TAccountReport extends string,\n TAccountAuditTrail extends string,\n TAccountAuthority extends string,\n TAccountSystemProgram extends string,\n TProgramAddress extends\n Address = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: GenerateComplianceReportInput<\n TAccountReport,\n TAccountAuditTrail,\n TAccountAuthority,\n TAccountSystemProgram\n >,\n config?: { programAddress?: TProgramAddress }\n): GenerateComplianceReportInstruction<\n TProgramAddress,\n TAccountReport,\n TAccountAuditTrail,\n TAccountAuthority,\n TAccountSystemProgram\n> {\n // Program address.\n const programAddress =\n config?.programAddress ?? GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n report: { value: input.report ?? null, isWritable: true },\n auditTrail: { value: input.auditTrail ?? null, isWritable: true },\n authority: { value: input.authority ?? null, isWritable: true },\n systemProgram: { value: input.systemProgram ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolve default values.\n if (!accounts.systemProgram.value) {\n accounts.systemProgram.value =\n '11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.report),\n getAccountMeta(accounts.auditTrail),\n getAccountMeta(accounts.authority),\n getAccountMeta(accounts.systemProgram),\n ],\n programAddress,\n data: getGenerateComplianceReportInstructionDataEncoder().encode(\n args as GenerateComplianceReportInstructionDataArgs\n ),\n } as GenerateComplianceReportInstruction<\n TProgramAddress,\n TAccountReport,\n TAccountAuditTrail,\n TAccountAuthority,\n TAccountSystemProgram\n >;\n\n return instruction;\n}\n\nexport type ParsedGenerateComplianceReportInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n report: TAccountMetas[0];\n /** Audit trail for the entity */\n auditTrail: TAccountMetas[1];\n authority: TAccountMetas[2];\n systemProgram: TAccountMetas[3];\n };\n data: GenerateComplianceReportInstructionData;\n};\n\nexport function parseGenerateComplianceReportInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>\n): ParsedGenerateComplianceReportInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 4) {\n throw new Error('[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts');\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = instruction.accounts![accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n report: getNextAccount(),\n auditTrail: getNextAccount(),\n authority: getNextAccount(),\n systemProgram: getNextAccount(),\n },\n data: getGenerateComplianceReportInstructionDataDecoder().decode(\n instruction.data\n ),\n };\n}\n","/**\n * This code was AUTOGENERATED using the codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n addDecoderSizePrefix,\n addEncoderSizePrefix,\n combineCodec,\n fixDecoderSize,\n fixEncoderSize,\n getAddressEncoder,\n getBytesDecoder,\n getBytesEncoder,\n getProgramDerivedAddress,\n getStructDecoder,\n getStructEncoder,\n getU32Decoder,\n getU32Encoder,\n getUtf8Decoder,\n getUtf8Encoder,\n transformEncoder,\n type AccountMeta,\n type AccountSignerMeta,\n type Address,\n type Codec,\n type Decoder,\n type Encoder,\n type Instruction,\n type InstructionWithAccounts,\n type InstructionWithData,\n type ReadonlyAccount,\n type ReadonlyUint8Array,\n type TransactionSigner,\n type WritableAccount,\n type WritableSignerAccount,\n} from '@solana/kit';\nimport {\n GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_INSTRUCTION_DATA,\n GHOSTSPEAK_MARKETPLACE_ERROR__MISSING_REQUIRED_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INSTRUCTION_PARSING_FAILED,\n isGhostspeakMarketplaceError,\n} from '../errors';\nimport { GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS } from '../programs';\nimport {\n expectAddress,\n getAccountMetaFactory,\n type ResolvedAccount,\n} from '../shared';\nimport {\n getAuditConfigDecoder,\n getAuditConfigEncoder,\n type AuditConfig,\n type AuditConfigArgs,\n} from '../types';\n\nexport const INITIALIZE_AUDIT_TRAIL_DISCRIMINATOR = new Uint8Array([\n 145, 182, 236, 249, 212, 17, 175, 161,\n]);\n\nexport function getInitializeAuditTrailDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 8).encode(\n INITIALIZE_AUDIT_TRAIL_DISCRIMINATOR\n );\n}\n\nexport type InitializeAuditTrailInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountAuditTrail extends string | AccountMeta<string> = string,\n TAccountEntity extends string | AccountMeta<string> = string,\n TAccountAuthority extends string | AccountMeta<string> = string,\n TAccountSystemProgram extends\n | string\n | AccountMeta<string> = '11111111111111111111111111111111',\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountAuditTrail extends string\n ? WritableAccount<TAccountAuditTrail>\n : TAccountAuditTrail,\n TAccountEntity extends string\n ? ReadonlyAccount<TAccountEntity>\n : TAccountEntity,\n TAccountAuthority extends string\n ? WritableSignerAccount<TAccountAuthority> &\n AccountSignerMeta<TAccountAuthority>\n : TAccountAuthority,\n TAccountSystemProgram extends string\n ? ReadonlyAccount<TAccountSystemProgram>\n : TAccountSystemProgram,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type InitializeAuditTrailInstructionData = {\n discriminator: ReadonlyUint8Array;\n entityType: string;\n config: AuditConfig;\n};\n\nexport type InitializeAuditTrailInstructionDataArgs = {\n entityType: string;\n config: AuditConfigArgs;\n};\n\nexport function getInitializeAuditTrailInstructionDataEncoder(): Encoder<InitializeAuditTrailInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n ['discriminator', fixEncoderSize(getBytesEncoder(), 8)],\n ['entityType', addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder())],\n ['config', getAuditConfigEncoder()],\n ]),\n (value) => ({\n ...value,\n discriminator: INITIALIZE_AUDIT_TRAIL_DISCRIMINATOR,\n })\n );\n}\n\nexport function getInitializeAuditTrailInstructionDataDecoder(): Decoder<InitializeAuditTrailInstructionData> {\n return getStructDecoder([\n ['discriminator', fixDecoderSize(getBytesDecoder(), 8)],\n ['entityType', addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())],\n ['config', getAuditConfigDecoder()],\n ]);\n}\n\nexport function getInitializeAuditTrailInstructionDataCodec(): Codec<\n InitializeAuditTrailInstructionDataArgs,\n InitializeAuditTrailInstructionData\n> {\n return combineCodec(\n getInitializeAuditTrailInstructionDataEncoder(),\n getInitializeAuditTrailInstructionDataDecoder()\n );\n}\n\nexport type InitializeAuditTrailAsyncInput<\n TAccountAuditTrail extends string = string,\n TAccountEntity extends string = string,\n TAccountAuthority extends string = string,\n TAccountSystemProgram extends string = string,\n> = {\n auditTrail?: Address<TAccountAuditTrail>;\n /** Entity being audited */\n entity: Address<TAccountEntity>;\n authority: TransactionSigner<TAccountAuthority>;\n systemProgram?: Address<TAccountSystemProgram>;\n entityType: InitializeAuditTrailInstructionDataArgs['entityType'];\n config: InitializeAuditTrailInstructionDataArgs['config'];\n};\n\nexport async function getInitializeAuditTrailInstructionAsync<\n TAccountAuditTrail extends string,\n TAccountEntity extends string,\n TAccountAuthority extends string,\n TAccountSystemProgram extends string,\n TProgramAddress extends\n Address = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: InitializeAuditTrailAsyncInput<\n TAccountAuditTrail,\n TAccountEntity,\n TAccountAuthority,\n TAccountSystemProgram\n >,\n config?: { programAddress?: TProgramAddress }\n): Promise<\n InitializeAuditTrailInstruction<\n TProgramAddress,\n TAccountAuditTrail,\n TAccountEntity,\n TAccountAuthority,\n TAccountSystemProgram\n >\n> {\n // Program address.\n const programAddress =\n config?.programAddress ?? GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n auditTrail: { value: input.auditTrail ?? null, isWritable: true },\n entity: { value: input.entity ?? null, isWritable: false },\n authority: { value: input.authority ?? null, isWritable: true },\n systemProgram: { value: input.systemProgram ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolve default values.\n if (!accounts.auditTrail.value) {\n accounts.auditTrail.value = await getProgramDerivedAddress({\n programAddress,\n seeds: [\n getBytesEncoder().encode(\n new Uint8Array([97, 117, 100, 105, 116, 95, 116, 114, 97, 105, 108])\n ),\n getAddressEncoder().encode(expectAddress(accounts.entity.value)),\n ],\n });\n }\n if (!accounts.systemProgram.value) {\n accounts.systemProgram.value =\n '11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.auditTrail),\n getAccountMeta(accounts.entity),\n getAccountMeta(accounts.authority),\n getAccountMeta(accounts.systemProgram),\n ],\n programAddress,\n data: getInitializeAuditTrailInstructionDataEncoder().encode(\n args as InitializeAuditTrailInstructionDataArgs\n ),\n } as InitializeAuditTrailInstruction<\n TProgramAddress,\n TAccountAuditTrail,\n TAccountEntity,\n TAccountAuthority,\n TAccountSystemProgram\n >;\n\n return instruction;\n}\n\nexport type InitializeAuditTrailInput<\n TAccountAuditTrail extends string = string,\n TAccountEntity extends string = string,\n TAccountAuthority extends string = string,\n TAccountSystemProgram extends string = string,\n> = {\n auditTrail: Address<TAccountAuditTrail>;\n /** Entity being audited */\n entity: Address<TAccountEntity>;\n authority: TransactionSigner<TAccountAuthority>;\n systemProgram?: Address<TAccountSystemProgram>;\n entityType: InitializeAuditTrailInstructionDataArgs['entityType'];\n config: InitializeAuditTrailInstructionDataArgs['config'];\n};\n\nexport function getInitializeAuditTrailInstruction<\n TAccountAuditTrail extends string,\n TAccountEntity extends string,\n TAccountAuthority extends string,\n TAccountSystemProgram extends string,\n TProgramAddress extends\n Address = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: InitializeAuditTrailInput<\n TAccountAuditTrail,\n TAccountEntity,\n TAccountAuthority,\n TAccountSystemProgram\n >,\n config?: { programAddress?: TProgramAddress }\n): InitializeAuditTrailInstruction<\n TProgramAddress,\n TAccountAuditTrail,\n TAccountEntity,\n TAccountAuthority,\n TAccountSystemProgram\n> {\n // Program address.\n const programAddress =\n config?.programAddress ?? GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n auditTrail: { value: input.auditTrail ?? null, isWritable: true },\n entity: { value: input.entity ?? null, isWritable: false },\n authority: { value: input.authority ?? null, isWritable: true },\n systemProgram: { value: input.systemProgram ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolve default values.\n if (!accounts.systemProgram.value) {\n accounts.systemProgram.value =\n '11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.auditTrail),\n getAccountMeta(accounts.entity),\n getAccountMeta(accounts.authority),\n getAccountMeta(accounts.systemProgram),\n ],\n programAddress,\n data: getInitializeAuditTrailInstructionDataEncoder().encode(\n args as InitializeAuditTrailInstructionDataArgs\n ),\n } as InitializeAuditTrailInstruction<\n TProgramAddress,\n TAccountAuditTrail,\n TAccountEntity,\n TAccountAuthority,\n TAccountSystemProgram\n >;\n\n return instruction;\n}\n\nexport type ParsedInitializeAuditTrailInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n auditTrail: TAccountMetas[0];\n /** Entity being audited */\n entity: TAccountMetas[1];\n authority: TAccountMetas[2];\n systemProgram: TAccountMetas[3];\n };\n data: InitializeAuditTrailInstructionData;\n};\n\nexport function parseInitializeAuditTrailInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>\n): ParsedInitializeAuditTrailInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 4) {\n throw new Error('[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts');\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = instruction.accounts![accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n auditTrail: getNextAccount(),\n entity: getNextAccount(),\n authority: getNextAccount(),\n systemProgram: getNextAccount(),\n },\n data: getInitializeAuditTrailInstructionDataDecoder().decode(\n instruction.data\n ),\n };\n}\n","/**\n * This code was AUTOGENERATED using the codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n combineCodec,\n fixDecoderSize,\n fixEncoderSize,\n getAddressEncoder,\n getBooleanDecoder,\n getBooleanEncoder,\n getBytesDecoder,\n getBytesEncoder,\n getOptionDecoder,\n getOptionEncoder,\n getProgramDerivedAddress,\n getStructDecoder,\n getStructEncoder,\n transformEncoder,\n type AccountMeta,\n type AccountSignerMeta,\n type Address,\n type Codec,\n type Decoder,\n type Encoder,\n type Instruction,\n type InstructionWithAccounts,\n type InstructionWithData,\n type Option,\n type OptionOrNullable,\n type ReadonlyAccount,\n type ReadonlyUint8Array,\n type TransactionSigner,\n type WritableAccount,\n type WritableSignerAccount,\n} from '@solana/kit';\nimport {\n GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_INSTRUCTION_DATA,\n GHOSTSPEAK_MARKETPLACE_ERROR__MISSING_REQUIRED_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INSTRUCTION_PARSING_FAILED,\n isGhostspeakMarketplaceError,\n} from '../errors';\nimport { GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS } from '../programs';\nimport {\n expectAddress,\n getAccountMetaFactory,\n type ResolvedAccount,\n} from '../shared';\n\nexport const INITIALIZE_CONFIDENTIAL_TRANSFER_MINT_DISCRIMINATOR =\n new Uint8Array([154, 47, 116, 20, 167, 57, 114, 41]);\n\nexport function getInitializeConfidentialTransferMintDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 8).encode(\n INITIALIZE_CONFIDENTIAL_TRANSFER_MINT_DISCRIMINATOR\n );\n}\n\nexport type InitializeConfidentialTransferMintInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountAuthority extends string | AccountMeta<string> = string,\n TAccountMint extends string | AccountMeta<string> = string,\n TAccountAgent extends string | AccountMeta<string> = string,\n TAccountTokenProgram extends\n | string\n | AccountMeta<string> = 'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb',\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountAuthority extends string\n ? WritableSignerAccount<TAccountAuthority> &\n AccountSignerMeta<TAccountAuthority>\n : TAccountAuthority,\n TAccountMint extends string\n ? WritableAccount<TAccountMint>\n : TAccountMint,\n TAccountAgent extends string\n ? ReadonlyAccount<TAccountAgent>\n : TAccountAgent,\n TAccountTokenProgram extends string\n ? ReadonlyAccount<TAccountTokenProgram>\n : TAccountTokenProgram,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type InitializeConfidentialTransferMintInstructionData = {\n discriminator: ReadonlyUint8Array;\n autoApproveNewAccounts: boolean;\n auditorElgamalPubkey: Option<ReadonlyUint8Array>;\n};\n\nexport type InitializeConfidentialTransferMintInstructionDataArgs = {\n autoApproveNewAccounts: boolean;\n auditorElgamalPubkey: OptionOrNullable<ReadonlyUint8Array>;\n};\n\nexport function getInitializeConfidentialTransferMintInstructionDataEncoder(): Encoder<InitializeConfidentialTransferMintInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n ['discriminator', fixEncoderSize(getBytesEncoder(), 8)],\n ['autoApproveNewAccounts', getBooleanEncoder()],\n [\n 'auditorElgamalPubkey',\n getOptionEncoder(fixEncoderSize(getBytesEncoder(), 32)),\n ],\n ]),\n (value) => ({\n ...value,\n discriminator: INITIALIZE_CONFIDENTIAL_TRANSFER_MINT_DISCRIMINATOR,\n })\n );\n}\n\nexport function getInitializeConfidentialTransferMintInstructionDataDecoder(): Decoder<InitializeConfidentialTransferMintInstructionData> {\n return getStructDecoder([\n ['discriminator', fixDecoderSize(getBytesDecoder(), 8)],\n ['autoApproveNewAccounts', getBooleanDecoder()],\n [\n 'auditorElgamalPubkey',\n getOptionDecoder(fixDecoderSize(getBytesDecoder(), 32)),\n ],\n ]);\n}\n\nexport function getInitializeConfidentialTransferMintInstructionDataCodec(): Codec<\n InitializeConfidentialTransferMintInstructionDataArgs,\n InitializeConfidentialTransferMintInstructionData\n> {\n return combineCodec(\n getInitializeConfidentialTransferMintInstructionDataEncoder(),\n getInitializeConfidentialTransferMintInstructionDataDecoder()\n );\n}\n\nexport type InitializeConfidentialTransferMintAsyncInput<\n TAccountAuthority extends string = string,\n TAccountMint extends string = string,\n TAccountAgent extends string = string,\n TAccountTokenProgram extends string = string,\n> = {\n authority: TransactionSigner<TAccountAuthority>;\n /** The mint to initialize confidential transfers for */\n mint: Address<TAccountMint>;\n /** The agent that owns this mint */\n agent?: Address<TAccountAgent>;\n /** Token-2022 program */\n tokenProgram?: Address<TAccountTokenProgram>;\n autoApproveNewAccounts: InitializeConfidentialTransferMintInstructionDataArgs['autoApproveNewAccounts'];\n auditorElgamalPubkey: InitializeConfidentialTransferMintInstructionDataArgs['auditorElgamalPubkey'];\n};\n\nexport async function getInitializeConfidentialTransferMintInstructionAsync<\n TAccountAuthority extends string,\n TAccountMint extends string,\n TAccountAgent extends string,\n TAccountTokenProgram extends string,\n TProgramAddress extends\n Address = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: InitializeConfidentialTransferMintAsyncInput<\n TAccountAuthority,\n TAccountMint,\n TAccountAgent,\n TAccountTokenProgram\n >,\n config?: { programAddress?: TProgramAddress }\n): Promise<\n InitializeConfidentialTransferMintInstruction<\n TProgramAddress,\n TAccountAuthority,\n TAccountMint,\n TAccountAgent,\n TAccountTokenProgram\n >\n> {\n // Program address.\n const programAddress =\n config?.programAddress ?? GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n authority: { value: input.authority ?? null, isWritable: true },\n mint: { value: input.mint ?? null, isWritable: true },\n agent: { value: input.agent ?? null, isWritable: false },\n tokenProgram: { value: input.tokenProgram ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolve default values.\n if (!accounts.agent.value) {\n accounts.agent.value = await getProgramDerivedAddress({\n programAddress,\n seeds: [\n getBytesEncoder().encode(new Uint8Array([97, 103, 101, 110, 116])),\n getAddressEncoder().encode(expectAddress(accounts.authority.value)),\n ],\n });\n }\n if (!accounts.tokenProgram.value) {\n accounts.tokenProgram.value =\n 'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb' as Address<'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb'>;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.authority),\n getAccountMeta(accounts.mint),\n getAccountMeta(accounts.agent),\n getAccountMeta(accounts.tokenProgram),\n ],\n programAddress,\n data: getInitializeConfidentialTransferMintInstructionDataEncoder().encode(\n args as InitializeConfidentialTransferMintInstructionDataArgs\n ),\n } as InitializeConfidentialTransferMintInstruction<\n TProgramAddress,\n TAccountAuthority,\n TAccountMint,\n TAccountAgent,\n TAccountTokenProgram\n >;\n\n return instruction;\n}\n\nexport type InitializeConfidentialTransferMintInput<\n TAccountAuthority extends string = string,\n TAccountMint extends string = string,\n TAccountAgent extends string = string,\n TAccountTokenProgram extends string = string,\n> = {\n authority: TransactionSigner<TAccountAuthority>;\n /** The mint to initialize confidential transfers for */\n mint: Address<TAccountMint>;\n /** The agent that owns this mint */\n agent: Address<TAccountAgent>;\n /** Token-2022 program */\n tokenProgram?: Address<TAccountTokenProgram>;\n autoApproveNewAccounts: InitializeConfidentialTransferMintInstructionDataArgs['autoApproveNewAccounts'];\n auditorElgamalPubkey: InitializeConfidentialTransferMintInstructionDataArgs['auditorElgamalPubkey'];\n};\n\nexport function getInitializeConfidentialTransferMintInstruction<\n TAccountAuthority extends string,\n TAccountMint extends string,\n TAccountAgent extends string,\n TAccountTokenProgram extends string,\n TProgramAddress extends\n Address = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: InitializeConfidentialTransferMintInput<\n TAccountAuthority,\n TAccountMint,\n TAccountAgent,\n TAccountTokenProgram\n >,\n config?: { programAddress?: TProgramAddress }\n): InitializeConfidentialTransferMintInstruction<\n TProgramAddress,\n TAccountAuthority,\n TAccountMint,\n TAccountAgent,\n TAccountTokenProgram\n> {\n // Program address.\n const programAddress =\n config?.programAddress ?? GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n authority: { value: input.authority ?? null, isWritable: true },\n mint: { value: input.mint ?? null, isWritable: true },\n agent: { value: input.agent ?? null, isWritable: false },\n tokenProgram: { value: input.tokenProgram ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolve default values.\n if (!accounts.tokenProgram.value) {\n accounts.tokenProgram.value =\n 'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb' as Address<'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb'>;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.authority),\n getAccountMeta(accounts.mint),\n getAccountMeta(accounts.agent),\n getAccountMeta(accounts.tokenProgram),\n ],\n programAddress,\n data: getInitializeConfidentialTransferMintInstructionDataEncoder().encode(\n args as InitializeConfidentialTransferMintInstructionDataArgs\n ),\n } as InitializeConfidentialTransferMintInstruction<\n TProgramAddress,\n TAccountAuthority,\n TAccountMint,\n TAccountAgent,\n TAccountTokenProgram\n >;\n\n return instruction;\n}\n\nexport type ParsedInitializeConfidentialTransferMintInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n authority: TAccountMetas[0];\n /** The mint to initialize confidential transfers for */\n mint: TAccountMetas[1];\n /** The agent that owns this mint */\n agent: TAccountMetas[2];\n /** Token-2022 program */\n tokenProgram: TAccountMetas[3];\n };\n data: InitializeConfidentialTransferMintInstructionData;\n};\n\nexport function parseInitializeConfidentialTransferMintInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>\n): ParsedInitializeConfidentialTransferMintInstruction<\n TProgram,\n TAccountMetas\n> {\n if (instruction.accounts.length < 4) {\n throw new Error('[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts');\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = instruction.accounts![accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n authority: getNextAccount(),\n mint: getNextAccount(),\n agent: getNextAccount(),\n tokenProgram: getNextAccount(),\n },\n data: getInitializeConfidentialTransferMintInstructionDataDecoder().decode(\n instruction.data\n ),\n };\n}\n","/**\n * This code was AUTOGENERATED using the codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n combineCodec,\n fixDecoderSize,\n fixEncoderSize,\n getAddressEncoder,\n getBytesDecoder,\n getBytesEncoder,\n getProgramDerivedAddress,\n getStructDecoder,\n getStructEncoder,\n transformEncoder,\n type AccountMeta,\n type AccountSignerMeta,\n type Address,\n type FixedSizeCodec,\n type FixedSizeDecoder,\n type FixedSizeEncoder,\n type Instruction,\n type InstructionWithAccounts,\n type InstructionWithData,\n type ReadonlyAccount,\n type ReadonlyUint8Array,\n type TransactionSigner,\n type WritableAccount,\n type WritableSignerAccount,\n} from '@solana/kit';\nimport {\n GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_INSTRUCTION_DATA,\n GHOSTSPEAK_MARKETPLACE_ERROR__MISSING_REQUIRED_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INSTRUCTION_PARSING_FAILED,\n isGhostspeakMarketplaceError,\n} from '../errors';\nimport { GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS } from '../programs';\nimport {\n expectAddress,\n getAccountMetaFactory,\n type ResolvedAccount,\n} from '../shared';\nimport {\n getAccountStateDecoder,\n getAccountStateEncoder,\n type AccountState,\n type AccountStateArgs,\n} from '../types';\n\nexport const INITIALIZE_DEFAULT_ACCOUNT_STATE_DISCRIMINATOR = new Uint8Array([\n 175, 89, 119, 112, 150, 203, 202, 198,\n]);\n\nexport function getInitializeDefaultAccountStateDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 8).encode(\n INITIALIZE_DEFAULT_ACCOUNT_STATE_DISCRIMINATOR\n );\n}\n\nexport type InitializeDefaultAccountStateInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountAuthority extends string | AccountMeta<string> = string,\n TAccountMint extends string | AccountMeta<string> = string,\n TAccountAgent extends string | AccountMeta<string> = string,\n TAccountTokenProgram extends\n | string\n | AccountMeta<string> = 'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb',\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountAuthority extends string\n ? WritableSignerAccount<TAccountAuthority> &\n AccountSignerMeta<TAccountAuthority>\n : TAccountAuthority,\n TAccountMint extends string\n ? WritableAccount<TAccountMint>\n : TAccountMint,\n TAccountAgent extends string\n ? ReadonlyAccount<TAccountAgent>\n : TAccountAgent,\n TAccountTokenProgram extends string\n ? ReadonlyAccount<TAccountTokenProgram>\n : TAccountTokenProgram,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type InitializeDefaultAccountStateInstructionData = {\n discriminator: ReadonlyUint8Array;\n state: AccountState;\n};\n\nexport type InitializeDefaultAccountStateInstructionDataArgs = {\n state: AccountStateArgs;\n};\n\nexport function getInitializeDefaultAccountStateInstructionDataEncoder(): FixedSizeEncoder<InitializeDefaultAccountStateInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n ['discriminator', fixEncoderSize(getBytesEncoder(), 8)],\n ['state', getAccountStateEncoder()],\n ]),\n (value) => ({\n ...value,\n discriminator: INITIALIZE_DEFAULT_ACCOUNT_STATE_DISCRIMINATOR,\n })\n );\n}\n\nexport function getInitializeDefaultAccountStateInstructionDataDecoder(): FixedSizeDecoder<InitializeDefaultAccountStateInstructionData> {\n return getStructDecoder([\n ['discriminator', fixDecoderSize(getBytesDecoder(), 8)],\n ['state', getAccountStateDecoder()],\n ]);\n}\n\nexport function getInitializeDefaultAccountStateInstructionDataCodec(): FixedSizeCodec<\n InitializeDefaultAccountStateInstructionDataArgs,\n InitializeDefaultAccountStateInstructionData\n> {\n return combineCodec(\n getInitializeDefaultAccountStateInstructionDataEncoder(),\n getInitializeDefaultAccountStateInstructionDataDecoder()\n );\n}\n\nexport type InitializeDefaultAccountStateAsyncInput<\n TAccountAuthority extends string = string,\n TAccountMint extends string = string,\n TAccountAgent extends string = string,\n TAccountTokenProgram extends string = string,\n> = {\n authority: TransactionSigner<TAccountAuthority>;\n /** The mint to initialize default account state for */\n mint: Address<TAccountMint>;\n /** The agent that owns this mint */\n agent?: Address<TAccountAgent>;\n /** Token-2022 program */\n tokenProgram?: Address<TAccountTokenProgram>;\n state: InitializeDefaultAccountStateInstructionDataArgs['state'];\n};\n\nexport async function getInitializeDefaultAccountStateInstructionAsync<\n TAccountAuthority extends string,\n TAccountMint extends string,\n TAccountAgent extends string,\n TAccountTokenProgram extends string,\n TProgramAddress extends\n Address = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: InitializeDefaultAccountStateAsyncInput<\n TAccountAuthority,\n TAccountMint,\n TAccountAgent,\n TAccountTokenProgram\n >,\n config?: { programAddress?: TProgramAddress }\n): Promise<\n InitializeDefaultAccountStateInstruction<\n TProgramAddress,\n TAccountAuthority,\n TAccountMint,\n TAccountAgent,\n TAccountTokenProgram\n >\n> {\n // Program address.\n const programAddress =\n config?.programAddress ?? GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n authority: { value: input.authority ?? null, isWritable: true },\n mint: { value: input.mint ?? null, isWritable: true },\n agent: { value: input.agent ?? null, isWritable: false },\n tokenProgram: { value: input.tokenProgram ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolve default values.\n if (!accounts.agent.value) {\n accounts.agent.value = await getProgramDerivedAddress({\n programAddress,\n seeds: [\n getBytesEncoder().encode(new Uint8Array([97, 103, 101, 110, 116])),\n getAddressEncoder().encode(expectAddress(accounts.authority.value)),\n ],\n });\n }\n if (!accounts.tokenProgram.value) {\n accounts.tokenProgram.value =\n 'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb' as Address<'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb'>;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.authority),\n getAccountMeta(accounts.mint),\n getAccountMeta(accounts.agent),\n getAccountMeta(accounts.tokenProgram),\n ],\n programAddress,\n data: getInitializeDefaultAccountStateInstructionDataEncoder().encode(\n args as InitializeDefaultAccountStateInstructionDataArgs\n ),\n } as InitializeDefaultAccountStateInstruction<\n TProgramAddress,\n TAccountAuthority,\n TAccountMint,\n TAccountAgent,\n TAccountTokenProgram\n >;\n\n return instruction;\n}\n\nexport type InitializeDefaultAccountStateInput<\n TAccountAuthority extends string = string,\n TAccountMint extends string = string,\n TAccountAgent extends string = string,\n TAccountTokenProgram extends string = string,\n> = {\n authority: TransactionSigner<TAccountAuthority>;\n /** The mint to initialize default account state for */\n mint: Address<TAccountMint>;\n /** The agent that owns this mint */\n agent: Address<TAccountAgent>;\n /** Token-2022 program */\n tokenProgram?: Address<TAccountTokenProgram>;\n state: InitializeDefaultAccountStateInstructionDataArgs['state'];\n};\n\nexport function getInitializeDefaultAccountStateInstruction<\n TAccountAuthority extends string,\n TAccountMint extends string,\n TAccountAgent extends string,\n TAccountTokenProgram extends string,\n TProgramAddress extends\n Address = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: InitializeDefaultAccountStateInput<\n TAccountAuthority,\n TAccountMint,\n TAccountAgent,\n TAccountTokenProgram\n >,\n config?: { programAddress?: TProgramAddress }\n): InitializeDefaultAccountStateInstruction<\n TProgramAddress,\n TAccountAuthority,\n TAccountMint,\n TAccountAgent,\n TAccountTokenProgram\n> {\n // Program address.\n const programAddress =\n config?.programAddress ?? GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n authority: { value: input.authority ?? null, isWritable: true },\n mint: { value: input.mint ?? null, isWritable: true },\n agent: { value: input.agent ?? null, isWritable: false },\n tokenProgram: { value: input.tokenProgram ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolve default values.\n if (!accounts.tokenProgram.value) {\n accounts.tokenProgram.value =\n 'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb' as Address<'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb'>;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.authority),\n getAccountMeta(accounts.mint),\n getAccountMeta(accounts.agent),\n getAccountMeta(accounts.tokenProgram),\n ],\n programAddress,\n data: getInitializeDefaultAccountStateInstructionDataEncoder().encode(\n args as InitializeDefaultAccountStateInstructionDataArgs\n ),\n } as InitializeDefaultAccountStateInstruction<\n TProgramAddress,\n TAccountAuthority,\n TAccountMint,\n TAccountAgent,\n TAccountTokenProgram\n >;\n\n return instruction;\n}\n\nexport type ParsedInitializeDefaultAccountStateInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n authority: TAccountMetas[0];\n /** The mint to initialize default account state for */\n mint: TAccountMetas[1];\n /** The agent that owns this mint */\n agent: TAccountMetas[2];\n /** Token-2022 program */\n tokenProgram: TAccountMetas[3];\n };\n data: InitializeDefaultAccountStateInstructionData;\n};\n\nexport function parseInitializeDefaultAccountStateInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>\n): ParsedInitializeDefaultAccountStateInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 4) {\n throw new Error('[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts');\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = instruction.accounts![accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n authority: getNextAccount(),\n mint: getNextAccount(),\n agent: getNextAccount(),\n tokenProgram: getNextAccount(),\n },\n data: getInitializeDefaultAccountStateInstructionDataDecoder().decode(\n instruction.data\n ),\n };\n}\n","/**\n * This code was AUTOGENERATED using the codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n addDecoderSizePrefix,\n addEncoderSizePrefix,\n combineCodec,\n fixDecoderSize,\n fixEncoderSize,\n getBytesDecoder,\n getBytesEncoder,\n getProgramDerivedAddress,\n getStructDecoder,\n getStructEncoder,\n getU32Decoder,\n getU32Encoder,\n getU64Decoder,\n getU64Encoder,\n getUtf8Decoder,\n getUtf8Encoder,\n transformEncoder,\n type AccountMeta,\n type AccountSignerMeta,\n type Address,\n type Codec,\n type Decoder,\n type Encoder,\n type Instruction,\n type InstructionWithAccounts,\n type InstructionWithData,\n type ReadonlyAccount,\n type ReadonlyUint8Array,\n type TransactionSigner,\n type WritableAccount,\n type WritableSignerAccount,\n} from '@solana/kit';\nimport {\n GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_INSTRUCTION_DATA,\n GHOSTSPEAK_MARKETPLACE_ERROR__MISSING_REQUIRED_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INSTRUCTION_PARSING_FAILED,\n isGhostspeakMarketplaceError,\n} from '../errors';\nimport { GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS } from '../programs';\nimport {\n expectSome,\n getAccountMetaFactory,\n type ResolvedAccount,\n} from '../shared';\nimport {\n getExecutionParamsDecoder,\n getExecutionParamsEncoder,\n getProposalTypeDecoder,\n getProposalTypeEncoder,\n type ExecutionParams,\n type ExecutionParamsArgs,\n type ProposalType,\n type ProposalTypeArgs,\n} from '../types';\n\nexport const INITIALIZE_GOVERNANCE_PROPOSAL_DISCRIMINATOR = new Uint8Array([\n 137, 84, 234, 206, 17, 58, 54, 215,\n]);\n\nexport function getInitializeGovernanceProposalDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 8).encode(\n INITIALIZE_GOVERNANCE_PROPOSAL_DISCRIMINATOR\n );\n}\n\nexport type InitializeGovernanceProposalInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountProposal extends string | AccountMeta<string> = string,\n TAccountProposer extends string | AccountMeta<string> = string,\n TAccountSystemProgram extends\n | string\n | AccountMeta<string> = '11111111111111111111111111111111',\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountProposal extends string\n ? WritableAccount<TAccountProposal>\n : TAccountProposal,\n TAccountProposer extends string\n ? WritableSignerAccount<TAccountProposer> &\n AccountSignerMeta<TAccountProposer>\n : TAccountProposer,\n TAccountSystemProgram extends string\n ? ReadonlyAccount<TAccountSystemProgram>\n : TAccountSystemProgram,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type InitializeGovernanceProposalInstructionData = {\n discriminator: ReadonlyUint8Array;\n proposalId: bigint;\n title: string;\n description: string;\n proposalType: ProposalType;\n executionParams: ExecutionParams;\n};\n\nexport type InitializeGovernanceProposalInstructionDataArgs = {\n proposalId: number | bigint;\n title: string;\n description: string;\n proposalType: ProposalTypeArgs;\n executionParams: ExecutionParamsArgs;\n};\n\nexport function getInitializeGovernanceProposalInstructionDataEncoder(): Encoder<InitializeGovernanceProposalInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n ['discriminator', fixEncoderSize(getBytesEncoder(), 8)],\n ['proposalId', getU64Encoder()],\n ['title', addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder())],\n ['description', addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder())],\n ['proposalType', getProposalTypeEncoder()],\n ['executionParams', getExecutionParamsEncoder()],\n ]),\n (value) => ({\n ...value,\n discriminator: INITIALIZE_GOVERNANCE_PROPOSAL_DISCRIMINATOR,\n })\n );\n}\n\nexport function getInitializeGovernanceProposalInstructionDataDecoder(): Decoder<InitializeGovernanceProposalInstructionData> {\n return getStructDecoder([\n ['discriminator', fixDecoderSize(getBytesDecoder(), 8)],\n ['proposalId', getU64Decoder()],\n ['title', addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())],\n ['description', addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())],\n ['proposalType', getProposalTypeDecoder()],\n ['executionParams', getExecutionParamsDecoder()],\n ]);\n}\n\nexport function getInitializeGovernanceProposalInstructionDataCodec(): Codec<\n InitializeGovernanceProposalInstructionDataArgs,\n InitializeGovernanceProposalInstructionData\n> {\n return combineCodec(\n getInitializeGovernanceProposalInstructionDataEncoder(),\n getInitializeGovernanceProposalInstructionDataDecoder()\n );\n}\n\nexport type InitializeGovernanceProposalAsyncInput<\n TAccountProposal extends string = string,\n TAccountProposer extends string = string,\n TAccountSystemProgram extends string = string,\n> = {\n proposal?: Address<TAccountProposal>;\n proposer: TransactionSigner<TAccountProposer>;\n systemProgram?: Address<TAccountSystemProgram>;\n proposalId: InitializeGovernanceProposalInstructionDataArgs['proposalId'];\n title: InitializeGovernanceProposalInstructionDataArgs['title'];\n description: InitializeGovernanceProposalInstructionDataArgs['description'];\n proposalType: InitializeGovernanceProposalInstructionDataArgs['proposalType'];\n executionParams: InitializeGovernanceProposalInstructionDataArgs['executionParams'];\n};\n\nexport async function getInitializeGovernanceProposalInstructionAsync<\n TAccountProposal extends string,\n TAccountProposer extends string,\n TAccountSystemProgram extends string,\n TProgramAddress extends\n Address = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: InitializeGovernanceProposalAsyncInput<\n TAccountProposal,\n TAccountProposer,\n TAccountSystemProgram\n >,\n config?: { programAddress?: TProgramAddress }\n): Promise<\n InitializeGovernanceProposalInstruction<\n TProgramAddress,\n TAccountProposal,\n TAccountProposer,\n TAccountSystemProgram\n >\n> {\n // Program address.\n const programAddress =\n config?.programAddress ?? GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n proposal: { value: input.proposal ?? null, isWritable: true },\n proposer: { value: input.proposer ?? null, isWritable: true },\n systemProgram: { value: input.systemProgram ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolve default values.\n if (!accounts.proposal.value) {\n accounts.proposal.value = await getProgramDerivedAddress({\n programAddress,\n seeds: [\n getBytesEncoder().encode(\n new Uint8Array([\n 103, 111, 118, 101, 114, 110, 97, 110, 99, 101, 95, 112, 114, 111,\n 112, 111, 115, 97, 108,\n ])\n ),\n getU64Encoder().encode(expectSome(args.proposalId)),\n ],\n });\n }\n if (!accounts.systemProgram.value) {\n accounts.systemProgram.value =\n '11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.proposal),\n getAccountMeta(accounts.proposer),\n getAccountMeta(accounts.systemProgram),\n ],\n programAddress,\n data: getInitializeGovernanceProposalInstructionDataEncoder().encode(\n args as InitializeGovernanceProposalInstructionDataArgs\n ),\n } as InitializeGovernanceProposalInstruction<\n TProgramAddress,\n TAccountProposal,\n TAccountProposer,\n TAccountSystemProgram\n >;\n\n return instruction;\n}\n\nexport type InitializeGovernanceProposalInput<\n TAccountProposal extends string = string,\n TAccountProposer extends string = string,\n TAccountSystemProgram extends string = string,\n> = {\n proposal: Address<TAccountProposal>;\n proposer: TransactionSigner<TAccountProposer>;\n systemProgram?: Address<TAccountSystemProgram>;\n proposalId: InitializeGovernanceProposalInstructionDataArgs['proposalId'];\n title: InitializeGovernanceProposalInstructionDataArgs['title'];\n description: InitializeGovernanceProposalInstructionDataArgs['description'];\n proposalType: InitializeGovernanceProposalInstructionDataArgs['proposalType'];\n executionParams: InitializeGovernanceProposalInstructionDataArgs['executionParams'];\n};\n\nexport function getInitializeGovernanceProposalInstruction<\n TAccountProposal extends string,\n TAccountProposer extends string,\n TAccountSystemProgram extends string,\n TProgramAddress extends\n Address = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: InitializeGovernanceProposalInput<\n TAccountProposal,\n TAccountProposer,\n TAccountSystemProgram\n >,\n config?: { programAddress?: TProgramAddress }\n): InitializeGovernanceProposalInstruction<\n TProgramAddress,\n TAccountProposal,\n TAccountProposer,\n TAccountSystemProgram\n> {\n // Program address.\n const programAddress =\n config?.programAddress ?? GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n proposal: { value: input.proposal ?? null, isWritable: true },\n proposer: { value: input.proposer ?? null, isWritable: true },\n systemProgram: { value: input.systemProgram ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolve default values.\n if (!accounts.systemProgram.value) {\n accounts.systemProgram.value =\n '11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.proposal),\n getAccountMeta(accounts.proposer),\n getAccountMeta(accounts.systemProgram),\n ],\n programAddress,\n data: getInitializeGovernanceProposalInstructionDataEncoder().encode(\n args as InitializeGovernanceProposalInstructionDataArgs\n ),\n } as InitializeGovernanceProposalInstruction<\n TProgramAddress,\n TAccountProposal,\n TAccountProposer,\n TAccountSystemProgram\n >;\n\n return instruction;\n}\n\nexport type ParsedInitializeGovernanceProposalInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n proposal: TAccountMetas[0];\n proposer: TAccountMetas[1];\n systemProgram: TAccountMetas[2];\n };\n data: InitializeGovernanceProposalInstructionData;\n};\n\nexport function parseInitializeGovernanceProposalInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>\n): ParsedInitializeGovernanceProposalInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 3) {\n throw new Error('[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts');\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = instruction.accounts![accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n proposal: getNextAccount(),\n proposer: getNextAccount(),\n systemProgram: getNextAccount(),\n },\n data: getInitializeGovernanceProposalInstructionDataDecoder().decode(\n instruction.data\n ),\n };\n}\n","/**\n * This code was AUTOGENERATED using the codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n combineCodec,\n fixDecoderSize,\n fixEncoderSize,\n getAddressEncoder,\n getBytesDecoder,\n getBytesEncoder,\n getI16Decoder,\n getI16Encoder,\n getProgramDerivedAddress,\n getStructDecoder,\n getStructEncoder,\n transformEncoder,\n type AccountMeta,\n type AccountSignerMeta,\n type Address,\n type FixedSizeCodec,\n type FixedSizeDecoder,\n type FixedSizeEncoder,\n type Instruction,\n type InstructionWithAccounts,\n type InstructionWithData,\n type ReadonlyAccount,\n type ReadonlyUint8Array,\n type TransactionSigner,\n type WritableAccount,\n type WritableSignerAccount,\n} from '@solana/kit';\nimport {\n GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_INSTRUCTION_DATA,\n GHOSTSPEAK_MARKETPLACE_ERROR__MISSING_REQUIRED_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INSTRUCTION_PARSING_FAILED,\n isGhostspeakMarketplaceError,\n} from '../errors';\nimport { GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS } from '../programs';\nimport {\n expectAddress,\n getAccountMetaFactory,\n type ResolvedAccount,\n} from '../shared';\n\nexport const INITIALIZE_INTEREST_BEARING_CONFIG_DISCRIMINATOR = new Uint8Array([\n 59, 39, 17, 210, 123, 130, 101, 67,\n]);\n\nexport function getInitializeInterestBearingConfigDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 8).encode(\n INITIALIZE_INTEREST_BEARING_CONFIG_DISCRIMINATOR\n );\n}\n\nexport type InitializeInterestBearingConfigInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountAuthority extends string | AccountMeta<string> = string,\n TAccountMint extends string | AccountMeta<string> = string,\n TAccountAgent extends string | AccountMeta<string> = string,\n TAccountRateAuthority extends string | AccountMeta<string> = string,\n TAccountTokenProgram extends\n | string\n | AccountMeta<string> = 'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb',\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountAuthority extends string\n ? WritableSignerAccount<TAccountAuthority> &\n AccountSignerMeta<TAccountAuthority>\n : TAccountAuthority,\n TAccountMint extends string\n ? WritableAccount<TAccountMint>\n : TAccountMint,\n TAccountAgent extends string\n ? ReadonlyAccount<TAccountAgent>\n : TAccountAgent,\n TAccountRateAuthority extends string\n ? ReadonlyAccount<TAccountRateAuthority>\n : TAccountRateAuthority,\n TAccountTokenProgram extends string\n ? ReadonlyAccount<TAccountTokenProgram>\n : TAccountTokenProgram,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type InitializeInterestBearingConfigInstructionData = {\n discriminator: ReadonlyUint8Array;\n rate: number;\n};\n\nexport type InitializeInterestBearingConfigInstructionDataArgs = {\n rate: number;\n};\n\nexport function getInitializeInterestBearingConfigInstructionDataEncoder(): FixedSizeEncoder<InitializeInterestBearingConfigInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n ['discriminator', fixEncoderSize(getBytesEncoder(), 8)],\n ['rate', getI16Encoder()],\n ]),\n (value) => ({\n ...value,\n discriminator: INITIALIZE_INTEREST_BEARING_CONFIG_DISCRIMINATOR,\n })\n );\n}\n\nexport function getInitializeInterestBearingConfigInstructionDataDecoder(): FixedSizeDecoder<InitializeInterestBearingConfigInstructionData> {\n return getStructDecoder([\n ['discriminator', fixDecoderSize(getBytesDecoder(), 8)],\n ['rate', getI16Decoder()],\n ]);\n}\n\nexport function getInitializeInterestBearingConfigInstructionDataCodec(): FixedSizeCodec<\n InitializeInterestBearingConfigInstructionDataArgs,\n InitializeInterestBearingConfigInstructionData\n> {\n return combineCodec(\n getInitializeInterestBearingConfigInstructionDataEncoder(),\n getInitializeInterestBearingConfigInstructionDataDecoder()\n );\n}\n\nexport type InitializeInterestBearingConfigAsyncInput<\n TAccountAuthority extends string = string,\n TAccountMint extends string = string,\n TAccountAgent extends string = string,\n TAccountRateAuthority extends string = string,\n TAccountTokenProgram extends string = string,\n> = {\n authority: TransactionSigner<TAccountAuthority>;\n /** The mint to initialize interest-bearing config for */\n mint: Address<TAccountMint>;\n /** The agent that owns this mint */\n agent?: Address<TAccountAgent>;\n /** The account that can update the interest rate */\n rateAuthority: Address<TAccountRateAuthority>;\n /** Token-2022 program */\n tokenProgram?: Address<TAccountTokenProgram>;\n rate: InitializeInterestBearingConfigInstructionDataArgs['rate'];\n};\n\nexport async function getInitializeInterestBearingConfigInstructionAsync<\n TAccountAuthority extends string,\n TAccountMint extends string,\n TAccountAgent extends string,\n TAccountRateAuthority extends string,\n TAccountTokenProgram extends string,\n TProgramAddress extends\n Address = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: InitializeInterestBearingConfigAsyncInput<\n TAccountAuthority,\n TAccountMint,\n TAccountAgent,\n TAccountRateAuthority,\n TAccountTokenProgram\n >,\n config?: { programAddress?: TProgramAddress }\n): Promise<\n InitializeInterestBearingConfigInstruction<\n TProgramAddress,\n TAccountAuthority,\n TAccountMint,\n TAccountAgent,\n TAccountRateAuthority,\n TAccountTokenProgram\n >\n> {\n // Program address.\n const programAddress =\n config?.programAddress ?? GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n authority: { value: input.authority ?? null, isWritable: true },\n mint: { value: input.mint ?? null, isWritable: true },\n agent: { value: input.agent ?? null, isWritable: false },\n rateAuthority: { value: input.rateAuthority ?? null, isWritable: false },\n tokenProgram: { value: input.tokenProgram ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolve default values.\n if (!accounts.agent.value) {\n accounts.agent.value = await getProgramDerivedAddress({\n programAddress,\n seeds: [\n getBytesEncoder().encode(new Uint8Array([97, 103, 101, 110, 116])),\n getAddressEncoder().encode(expectAddress(accounts.authority.value)),\n ],\n });\n }\n if (!accounts.tokenProgram.value) {\n accounts.tokenProgram.value =\n 'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb' as Address<'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb'>;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.authority),\n getAccountMeta(accounts.mint),\n getAccountMeta(accounts.agent),\n getAccountMeta(accounts.rateAuthority),\n getAccountMeta(accounts.tokenProgram),\n ],\n programAddress,\n data: getInitializeInterestBearingConfigInstructionDataEncoder().encode(\n args as InitializeInterestBearingConfigInstructionDataArgs\n ),\n } as InitializeInterestBearingConfigInstruction<\n TProgramAddress,\n TAccountAuthority,\n TAccountMint,\n TAccountAgent,\n TAccountRateAuthority,\n TAccountTokenProgram\n >;\n\n return instruction;\n}\n\nexport type InitializeInterestBearingConfigInput<\n TAccountAuthority extends string = string,\n TAccountMint extends string = string,\n TAccountAgent extends string = string,\n TAccountRateAuthority extends string = string,\n TAccountTokenProgram extends string = string,\n> = {\n authority: TransactionSigner<TAccountAuthority>;\n /** The mint to initialize interest-bearing config for */\n mint: Address<TAccountMint>;\n /** The agent that owns this mint */\n agent: Address<TAccountAgent>;\n /** The account that can update the interest rate */\n rateAuthority: Address<TAccountRateAuthority>;\n /** Token-2022 program */\n tokenProgram?: Address<TAccountTokenProgram>;\n rate: InitializeInterestBearingConfigInstructionDataArgs['rate'];\n};\n\nexport function getInitializeInterestBearingConfigInstruction<\n TAccountAuthority extends string,\n TAccountMint extends string,\n TAccountAgent extends string,\n TAccountRateAuthority extends string,\n TAccountTokenProgram extends string,\n TProgramAddress extends\n Address = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: InitializeInterestBearingConfigInput<\n TAccountAuthority,\n TAccountMint,\n TAccountAgent,\n TAccountRateAuthority,\n TAccountTokenProgram\n >,\n config?: { programAddress?: TProgramAddress }\n): InitializeInterestBearingConfigInstruction<\n TProgramAddress,\n TAccountAuthority,\n TAccountMint,\n TAccountAgent,\n TAccountRateAuthority,\n TAccountTokenProgram\n> {\n // Program address.\n const programAddress =\n config?.programAddress ?? GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n authority: { value: input.authority ?? null, isWritable: true },\n mint: { value: input.mint ?? null, isWritable: true },\n agent: { value: input.agent ?? null, isWritable: false },\n rateAuthority: { value: input.rateAuthority ?? null, isWritable: false },\n tokenProgram: { value: input.tokenProgram ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolve default values.\n if (!accounts.tokenProgram.value) {\n accounts.tokenProgram.value =\n 'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb' as Address<'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb'>;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.authority),\n getAccountMeta(accounts.mint),\n getAccountMeta(accounts.agent),\n getAccountMeta(accounts.rateAuthority),\n getAccountMeta(accounts.tokenProgram),\n ],\n programAddress,\n data: getInitializeInterestBearingConfigInstructionDataEncoder().encode(\n args as InitializeInterestBearingConfigInstructionDataArgs\n ),\n } as InitializeInterestBearingConfigInstruction<\n TProgramAddress,\n TAccountAuthority,\n TAccountMint,\n TAccountAgent,\n TAccountRateAuthority,\n TAccountTokenProgram\n >;\n\n return instruction;\n}\n\nexport type ParsedInitializeInterestBearingConfigInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n authority: TAccountMetas[0];\n /** The mint to initialize interest-bearing config for */\n mint: TAccountMetas[1];\n /** The agent that owns this mint */\n agent: TAccountMetas[2];\n /** The account that can update the interest rate */\n rateAuthority: TAccountMetas[3];\n /** Token-2022 program */\n tokenProgram: TAccountMetas[4];\n };\n data: InitializeInterestBearingConfigInstructionData;\n};\n\nexport function parseInitializeInterestBearingConfigInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>\n): ParsedInitializeInterestBearingConfigInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 5) {\n throw new Error('[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts');\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = instruction.accounts![accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n authority: getNextAccount(),\n mint: getNextAccount(),\n agent: getNextAccount(),\n rateAuthority: getNextAccount(),\n tokenProgram: getNextAccount(),\n },\n data: getInitializeInterestBearingConfigInstructionDataDecoder().decode(\n instruction.data\n ),\n };\n}\n","/**\n * This code was AUTOGENERATED using the codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n combineCodec,\n fixDecoderSize,\n fixEncoderSize,\n getAddressEncoder,\n getBytesDecoder,\n getBytesEncoder,\n getProgramDerivedAddress,\n getStructDecoder,\n getStructEncoder,\n transformEncoder,\n type AccountMeta,\n type AccountSignerMeta,\n type Address,\n type FixedSizeCodec,\n type FixedSizeDecoder,\n type FixedSizeEncoder,\n type Instruction,\n type InstructionWithAccounts,\n type InstructionWithData,\n type ReadonlyAccount,\n type ReadonlyUint8Array,\n type TransactionSigner,\n type WritableAccount,\n type WritableSignerAccount,\n} from '@solana/kit';\nimport {\n GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_INSTRUCTION_DATA,\n GHOSTSPEAK_MARKETPLACE_ERROR__MISSING_REQUIRED_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INSTRUCTION_PARSING_FAILED,\n isGhostspeakMarketplaceError,\n} from '../errors';\nimport { GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS } from '../programs';\nimport {\n expectAddress,\n getAccountMetaFactory,\n type ResolvedAccount,\n} from '../shared';\n\nexport const INITIALIZE_MINT_CLOSE_AUTHORITY_DISCRIMINATOR = new Uint8Array([\n 117, 167, 56, 158, 201, 160, 209, 109,\n]);\n\nexport function getInitializeMintCloseAuthorityDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 8).encode(\n INITIALIZE_MINT_CLOSE_AUTHORITY_DISCRIMINATOR\n );\n}\n\nexport type InitializeMintCloseAuthorityInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountAuthority extends string | AccountMeta<string> = string,\n TAccountMint extends string | AccountMeta<string> = string,\n TAccountAgent extends string | AccountMeta<string> = string,\n TAccountCloseAuthority extends string | AccountMeta<string> = string,\n TAccountTokenProgram extends\n | string\n | AccountMeta<string> = 'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb',\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountAuthority extends string\n ? WritableSignerAccount<TAccountAuthority> &\n AccountSignerMeta<TAccountAuthority>\n : TAccountAuthority,\n TAccountMint extends string\n ? WritableAccount<TAccountMint>\n : TAccountMint,\n TAccountAgent extends string\n ? ReadonlyAccount<TAccountAgent>\n : TAccountAgent,\n TAccountCloseAuthority extends string\n ? ReadonlyAccount<TAccountCloseAuthority>\n : TAccountCloseAuthority,\n TAccountTokenProgram extends string\n ? ReadonlyAccount<TAccountTokenProgram>\n : TAccountTokenProgram,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type InitializeMintCloseAuthorityInstructionData = {\n discriminator: ReadonlyUint8Array;\n};\n\nexport type InitializeMintCloseAuthorityInstructionDataArgs = {};\n\nexport function getInitializeMintCloseAuthorityInstructionDataEncoder(): FixedSizeEncoder<InitializeMintCloseAuthorityInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([['discriminator', fixEncoderSize(getBytesEncoder(), 8)]]),\n (value) => ({\n ...value,\n discriminator: INITIALIZE_MINT_CLOSE_AUTHORITY_DISCRIMINATOR,\n })\n );\n}\n\nexport function getInitializeMintCloseAuthorityInstructionDataDecoder(): FixedSizeDecoder<InitializeMintCloseAuthorityInstructionData> {\n return getStructDecoder([\n ['discriminator', fixDecoderSize(getBytesDecoder(), 8)],\n ]);\n}\n\nexport function getInitializeMintCloseAuthorityInstructionDataCodec(): FixedSizeCodec<\n InitializeMintCloseAuthorityInstructionDataArgs,\n InitializeMintCloseAuthorityInstructionData\n> {\n return combineCodec(\n getInitializeMintCloseAuthorityInstructionDataEncoder(),\n getInitializeMintCloseAuthorityInstructionDataDecoder()\n );\n}\n\nexport type InitializeMintCloseAuthorityAsyncInput<\n TAccountAuthority extends string = string,\n TAccountMint extends string = string,\n TAccountAgent extends string = string,\n TAccountCloseAuthority extends string = string,\n TAccountTokenProgram extends string = string,\n> = {\n authority: TransactionSigner<TAccountAuthority>;\n /** The mint to initialize close authority for */\n mint: Address<TAccountMint>;\n /** The agent that owns this mint */\n agent?: Address<TAccountAgent>;\n /** The account that can close the mint */\n closeAuthority: Address<TAccountCloseAuthority>;\n /** Token-2022 program */\n tokenProgram?: Address<TAccountTokenProgram>;\n};\n\nexport async function getInitializeMintCloseAuthorityInstructionAsync<\n TAccountAuthority extends string,\n TAccountMint extends string,\n TAccountAgent extends string,\n TAccountCloseAuthority extends string,\n TAccountTokenProgram extends string,\n TProgramAddress extends\n Address = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: InitializeMintCloseAuthorityAsyncInput<\n TAccountAuthority,\n TAccountMint,\n TAccountAgent,\n TAccountCloseAuthority,\n TAccountTokenProgram\n >,\n config?: { programAddress?: TProgramAddress }\n): Promise<\n InitializeMintCloseAuthorityInstruction<\n TProgramAddress,\n TAccountAuthority,\n TAccountMint,\n TAccountAgent,\n TAccountCloseAuthority,\n TAccountTokenProgram\n >\n> {\n // Program address.\n const programAddress =\n config?.programAddress ?? GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n authority: { value: input.authority ?? null, isWritable: true },\n mint: { value: input.mint ?? null, isWritable: true },\n agent: { value: input.agent ?? null, isWritable: false },\n closeAuthority: { value: input.closeAuthority ?? null, isWritable: false },\n tokenProgram: { value: input.tokenProgram ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Resolve default values.\n if (!accounts.agent.value) {\n accounts.agent.value = await getProgramDerivedAddress({\n programAddress,\n seeds: [\n getBytesEncoder().encode(new Uint8Array([97, 103, 101, 110, 116])),\n getAddressEncoder().encode(expectAddress(accounts.authority.value)),\n ],\n });\n }\n if (!accounts.tokenProgram.value) {\n accounts.tokenProgram.value =\n 'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb' as Address<'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb'>;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.authority),\n getAccountMeta(accounts.mint),\n getAccountMeta(accounts.agent),\n getAccountMeta(accounts.closeAuthority),\n getAccountMeta(accounts.tokenProgram),\n ],\n programAddress,\n data: getInitializeMintCloseAuthorityInstructionDataEncoder().encode({}),\n } as InitializeMintCloseAuthorityInstruction<\n TProgramAddress,\n TAccountAuthority,\n TAccountMint,\n TAccountAgent,\n TAccountCloseAuthority,\n TAccountTokenProgram\n >;\n\n return instruction;\n}\n\nexport type InitializeMintCloseAuthorityInput<\n TAccountAuthority extends string = string,\n TAccountMint extends string = string,\n TAccountAgent extends string = string,\n TAccountCloseAuthority extends string = string,\n TAccountTokenProgram extends string = string,\n> = {\n authority: TransactionSigner<TAccountAuthority>;\n /** The mint to initialize close authority for */\n mint: Address<TAccountMint>;\n /** The agent that owns this mint */\n agent: Address<TAccountAgent>;\n /** The account that can close the mint */\n closeAuthority: Address<TAccountCloseAuthority>;\n /** Token-2022 program */\n tokenProgram?: Address<TAccountTokenProgram>;\n};\n\nexport function getInitializeMintCloseAuthorityInstruction<\n TAccountAuthority extends string,\n TAccountMint extends string,\n TAccountAgent extends string,\n TAccountCloseAuthority extends string,\n TAccountTokenProgram extends string,\n TProgramAddress extends\n Address = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: InitializeMintCloseAuthorityInput<\n TAccountAuthority,\n TAccountMint,\n TAccountAgent,\n TAccountCloseAuthority,\n TAccountTokenProgram\n >,\n config?: { programAddress?: TProgramAddress }\n): InitializeMintCloseAuthorityInstruction<\n TProgramAddress,\n TAccountAuthority,\n TAccountMint,\n TAccountAgent,\n TAccountCloseAuthority,\n TAccountTokenProgram\n> {\n // Program address.\n const programAddress =\n config?.programAddress ?? GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n authority: { value: input.authority ?? null, isWritable: true },\n mint: { value: input.mint ?? null, isWritable: true },\n agent: { value: input.agent ?? null, isWritable: false },\n closeAuthority: { value: input.closeAuthority ?? null, isWritable: false },\n tokenProgram: { value: input.tokenProgram ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Resolve default values.\n if (!accounts.tokenProgram.value) {\n accounts.tokenProgram.value =\n 'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb' as Address<'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb'>;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.authority),\n getAccountMeta(accounts.mint),\n getAccountMeta(accounts.agent),\n getAccountMeta(accounts.closeAuthority),\n getAccountMeta(accounts.tokenProgram),\n ],\n programAddress,\n data: getInitializeMintCloseAuthorityInstructionDataEncoder().encode({}),\n } as InitializeMintCloseAuthorityInstruction<\n TProgramAddress,\n TAccountAuthority,\n TAccountMint,\n TAccountAgent,\n TAccountCloseAuthority,\n TAccountTokenProgram\n >;\n\n return instruction;\n}\n\nexport type ParsedInitializeMintCloseAuthorityInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n authority: TAccountMetas[0];\n /** The mint to initialize close authority for */\n mint: TAccountMetas[1];\n /** The agent that owns this mint */\n agent: TAccountMetas[2];\n /** The account that can close the mint */\n closeAuthority: TAccountMetas[3];\n /** Token-2022 program */\n tokenProgram: TAccountMetas[4];\n };\n data: InitializeMintCloseAuthorityInstructionData;\n};\n\nexport function parseInitializeMintCloseAuthorityInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>\n): ParsedInitializeMintCloseAuthorityInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 5) {\n throw new Error('[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts');\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = instruction.accounts![accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n authority: getNextAccount(),\n mint: getNextAccount(),\n agent: getNextAccount(),\n closeAuthority: getNextAccount(),\n tokenProgram: getNextAccount(),\n },\n data: getInitializeMintCloseAuthorityInstructionDataDecoder().decode(\n instruction.data\n ),\n };\n}\n","/**\n * This code was AUTOGENERATED using the codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n combineCodec,\n fixDecoderSize,\n fixEncoderSize,\n getAddressEncoder,\n getArrayDecoder,\n getArrayEncoder,\n getBytesDecoder,\n getBytesEncoder,\n getProgramDerivedAddress,\n getStructDecoder,\n getStructEncoder,\n transformEncoder,\n type AccountMeta,\n type AccountSignerMeta,\n type Address,\n type Codec,\n type Decoder,\n type Encoder,\n type Instruction,\n type InstructionWithAccounts,\n type InstructionWithData,\n type ReadonlyAccount,\n type ReadonlyUint8Array,\n type TransactionSigner,\n type WritableAccount,\n type WritableSignerAccount,\n} from '@solana/kit';\nimport {\n GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_INSTRUCTION_DATA,\n GHOSTSPEAK_MARKETPLACE_ERROR__MISSING_REQUIRED_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INSTRUCTION_PARSING_FAILED,\n isGhostspeakMarketplaceError,\n} from '../errors';\nimport { GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS } from '../programs';\nimport {\n expectAddress,\n getAccountMetaFactory,\n type ResolvedAccount,\n} from '../shared';\nimport {\n getRoleDecoder,\n getRoleEncoder,\n type Role,\n type RoleArgs,\n} from '../types';\n\nexport const INITIALIZE_RBAC_CONFIG_DISCRIMINATOR = new Uint8Array([\n 215, 68, 129, 228, 237, 165, 0, 240,\n]);\n\nexport function getInitializeRbacConfigDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 8).encode(\n INITIALIZE_RBAC_CONFIG_DISCRIMINATOR\n );\n}\n\nexport type InitializeRbacConfigInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountRbacConfig extends string | AccountMeta<string> = string,\n TAccountAuthority extends string | AccountMeta<string> = string,\n TAccountSystemProgram extends\n | string\n | AccountMeta<string> = '11111111111111111111111111111111',\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountRbacConfig extends string\n ? WritableAccount<TAccountRbacConfig>\n : TAccountRbacConfig,\n TAccountAuthority extends string\n ? WritableSignerAccount<TAccountAuthority> &\n AccountSignerMeta<TAccountAuthority>\n : TAccountAuthority,\n TAccountSystemProgram extends string\n ? ReadonlyAccount<TAccountSystemProgram>\n : TAccountSystemProgram,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type InitializeRbacConfigInstructionData = {\n discriminator: ReadonlyUint8Array;\n initialRoles: Array<Role>;\n};\n\nexport type InitializeRbacConfigInstructionDataArgs = {\n initialRoles: Array<RoleArgs>;\n};\n\nexport function getInitializeRbacConfigInstructionDataEncoder(): Encoder<InitializeRbacConfigInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n ['discriminator', fixEncoderSize(getBytesEncoder(), 8)],\n ['initialRoles', getArrayEncoder(getRoleEncoder())],\n ]),\n (value) => ({\n ...value,\n discriminator: INITIALIZE_RBAC_CONFIG_DISCRIMINATOR,\n })\n );\n}\n\nexport function getInitializeRbacConfigInstructionDataDecoder(): Decoder<InitializeRbacConfigInstructionData> {\n return getStructDecoder([\n ['discriminator', fixDecoderSize(getBytesDecoder(), 8)],\n ['initialRoles', getArrayDecoder(getRoleDecoder())],\n ]);\n}\n\nexport function getInitializeRbacConfigInstructionDataCodec(): Codec<\n InitializeRbacConfigInstructionDataArgs,\n InitializeRbacConfigInstructionData\n> {\n return combineCodec(\n getInitializeRbacConfigInstructionDataEncoder(),\n getInitializeRbacConfigInstructionDataDecoder()\n );\n}\n\nexport type InitializeRbacConfigAsyncInput<\n TAccountRbacConfig extends string = string,\n TAccountAuthority extends string = string,\n TAccountSystemProgram extends string = string,\n> = {\n rbacConfig?: Address<TAccountRbacConfig>;\n authority: TransactionSigner<TAccountAuthority>;\n systemProgram?: Address<TAccountSystemProgram>;\n initialRoles: InitializeRbacConfigInstructionDataArgs['initialRoles'];\n};\n\nexport async function getInitializeRbacConfigInstructionAsync<\n TAccountRbacConfig extends string,\n TAccountAuthority extends string,\n TAccountSystemProgram extends string,\n TProgramAddress extends\n Address = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: InitializeRbacConfigAsyncInput<\n TAccountRbacConfig,\n TAccountAuthority,\n TAccountSystemProgram\n >,\n config?: { programAddress?: TProgramAddress }\n): Promise<\n InitializeRbacConfigInstruction<\n TProgramAddress,\n TAccountRbacConfig,\n TAccountAuthority,\n TAccountSystemProgram\n >\n> {\n // Program address.\n const programAddress =\n config?.programAddress ?? GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n rbacConfig: { value: input.rbacConfig ?? null, isWritable: true },\n authority: { value: input.authority ?? null, isWritable: true },\n systemProgram: { value: input.systemProgram ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolve default values.\n if (!accounts.rbacConfig.value) {\n accounts.rbacConfig.value = await getProgramDerivedAddress({\n programAddress,\n seeds: [\n getBytesEncoder().encode(\n new Uint8Array([114, 98, 97, 99, 95, 99, 111, 110, 102, 105, 103])\n ),\n getAddressEncoder().encode(expectAddress(accounts.authority.value)),\n ],\n });\n }\n if (!accounts.systemProgram.value) {\n accounts.systemProgram.value =\n '11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.rbacConfig),\n getAccountMeta(accounts.authority),\n getAccountMeta(accounts.systemProgram),\n ],\n programAddress,\n data: getInitializeRbacConfigInstructionDataEncoder().encode(\n args as InitializeRbacConfigInstructionDataArgs\n ),\n } as InitializeRbacConfigInstruction<\n TProgramAddress,\n TAccountRbacConfig,\n TAccountAuthority,\n TAccountSystemProgram\n >;\n\n return instruction;\n}\n\nexport type InitializeRbacConfigInput<\n TAccountRbacConfig extends string = string,\n TAccountAuthority extends string = string,\n TAccountSystemProgram extends string = string,\n> = {\n rbacConfig: Address<TAccountRbacConfig>;\n authority: TransactionSigner<TAccountAuthority>;\n systemProgram?: Address<TAccountSystemProgram>;\n initialRoles: InitializeRbacConfigInstructionDataArgs['initialRoles'];\n};\n\nexport function getInitializeRbacConfigInstruction<\n TAccountRbacConfig extends string,\n TAccountAuthority extends string,\n TAccountSystemProgram extends string,\n TProgramAddress extends\n Address = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: InitializeRbacConfigInput<\n TAccountRbacConfig,\n TAccountAuthority,\n TAccountSystemProgram\n >,\n config?: { programAddress?: TProgramAddress }\n): InitializeRbacConfigInstruction<\n TProgramAddress,\n TAccountRbacConfig,\n TAccountAuthority,\n TAccountSystemProgram\n> {\n // Program address.\n const programAddress =\n config?.programAddress ?? GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n rbacConfig: { value: input.rbacConfig ?? null, isWritable: true },\n authority: { value: input.authority ?? null, isWritable: true },\n systemProgram: { value: input.systemProgram ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolve default values.\n if (!accounts.systemProgram.value) {\n accounts.systemProgram.value =\n '11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.rbacConfig),\n getAccountMeta(accounts.authority),\n getAccountMeta(accounts.systemProgram),\n ],\n programAddress,\n data: getInitializeRbacConfigInstructionDataEncoder().encode(\n args as InitializeRbacConfigInstructionDataArgs\n ),\n } as InitializeRbacConfigInstruction<\n TProgramAddress,\n TAccountRbacConfig,\n TAccountAuthority,\n TAccountSystemProgram\n >;\n\n return instruction;\n}\n\nexport type ParsedInitializeRbacConfigInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n rbacConfig: TAccountMetas[0];\n authority: TAccountMetas[1];\n systemProgram: TAccountMetas[2];\n };\n data: InitializeRbacConfigInstructionData;\n};\n\nexport function parseInitializeRbacConfigInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>\n): ParsedInitializeRbacConfigInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 3) {\n throw new Error('[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts');\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = instruction.accounts![accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n rbacConfig: getNextAccount(),\n authority: getNextAccount(),\n systemProgram: getNextAccount(),\n },\n data: getInitializeRbacConfigInstructionDataDecoder().decode(\n instruction.data\n ),\n };\n}\n","/**\n * This code was AUTOGENERATED using the codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n combineCodec,\n fixDecoderSize,\n fixEncoderSize,\n getAddressDecoder,\n getAddressEncoder,\n getBytesDecoder,\n getBytesEncoder,\n getOptionDecoder,\n getOptionEncoder,\n getProgramDerivedAddress,\n getStructDecoder,\n getStructEncoder,\n getU16Decoder,\n getU16Encoder,\n getU64Decoder,\n getU64Encoder,\n transformEncoder,\n type AccountMeta,\n type AccountSignerMeta,\n type Address,\n type Codec,\n type Decoder,\n type Encoder,\n type Instruction,\n type InstructionWithAccounts,\n type InstructionWithData,\n type Option,\n type OptionOrNullable,\n type ReadonlyAccount,\n type ReadonlyUint8Array,\n type TransactionSigner,\n type WritableAccount,\n type WritableSignerAccount,\n} from '@solana/kit';\nimport {\n GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_INSTRUCTION_DATA,\n GHOSTSPEAK_MARKETPLACE_ERROR__MISSING_REQUIRED_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INSTRUCTION_PARSING_FAILED,\n isGhostspeakMarketplaceError,\n} from '../errors';\nimport { GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS } from '../programs';\nimport {\n expectAddress,\n getAccountMetaFactory,\n type ResolvedAccount,\n} from '../shared';\n\nexport const INITIALIZE_TRANSFER_FEE_CONFIG_DISCRIMINATOR = new Uint8Array([\n 189, 189, 171, 33, 115, 17, 231, 2,\n]);\n\nexport function getInitializeTransferFeeConfigDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 8).encode(\n INITIALIZE_TRANSFER_FEE_CONFIG_DISCRIMINATOR\n );\n}\n\nexport type InitializeTransferFeeConfigInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountAuthority extends string | AccountMeta<string> = string,\n TAccountMint extends string | AccountMeta<string> = string,\n TAccountAgent extends string | AccountMeta<string> = string,\n TAccountTokenProgram extends\n | string\n | AccountMeta<string> = 'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb',\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountAuthority extends string\n ? WritableSignerAccount<TAccountAuthority> &\n AccountSignerMeta<TAccountAuthority>\n : TAccountAuthority,\n TAccountMint extends string\n ? WritableAccount<TAccountMint>\n : TAccountMint,\n TAccountAgent extends string\n ? ReadonlyAccount<TAccountAgent>\n : TAccountAgent,\n TAccountTokenProgram extends string\n ? ReadonlyAccount<TAccountTokenProgram>\n : TAccountTokenProgram,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type InitializeTransferFeeConfigInstructionData = {\n discriminator: ReadonlyUint8Array;\n transferFeeBasisPoints: number;\n maximumFee: bigint;\n transferFeeAuthority: Option<Address>;\n withdrawWithheldAuthority: Option<Address>;\n};\n\nexport type InitializeTransferFeeConfigInstructionDataArgs = {\n transferFeeBasisPoints: number;\n maximumFee: number | bigint;\n transferFeeAuthority: OptionOrNullable<Address>;\n withdrawWithheldAuthority: OptionOrNullable<Address>;\n};\n\nexport function getInitializeTransferFeeConfigInstructionDataEncoder(): Encoder<InitializeTransferFeeConfigInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n ['discriminator', fixEncoderSize(getBytesEncoder(), 8)],\n ['transferFeeBasisPoints', getU16Encoder()],\n ['maximumFee', getU64Encoder()],\n ['transferFeeAuthority', getOptionEncoder(getAddressEncoder())],\n ['withdrawWithheldAuthority', getOptionEncoder(getAddressEncoder())],\n ]),\n (value) => ({\n ...value,\n discriminator: INITIALIZE_TRANSFER_FEE_CONFIG_DISCRIMINATOR,\n })\n );\n}\n\nexport function getInitializeTransferFeeConfigInstructionDataDecoder(): Decoder<InitializeTransferFeeConfigInstructionData> {\n return getStructDecoder([\n ['discriminator', fixDecoderSize(getBytesDecoder(), 8)],\n ['transferFeeBasisPoints', getU16Decoder()],\n ['maximumFee', getU64Decoder()],\n ['transferFeeAuthority', getOptionDecoder(getAddressDecoder())],\n ['withdrawWithheldAuthority', getOptionDecoder(getAddressDecoder())],\n ]);\n}\n\nexport function getInitializeTransferFeeConfigInstructionDataCodec(): Codec<\n InitializeTransferFeeConfigInstructionDataArgs,\n InitializeTransferFeeConfigInstructionData\n> {\n return combineCodec(\n getInitializeTransferFeeConfigInstructionDataEncoder(),\n getInitializeTransferFeeConfigInstructionDataDecoder()\n );\n}\n\nexport type InitializeTransferFeeConfigAsyncInput<\n TAccountAuthority extends string = string,\n TAccountMint extends string = string,\n TAccountAgent extends string = string,\n TAccountTokenProgram extends string = string,\n> = {\n authority: TransactionSigner<TAccountAuthority>;\n /** The mint to initialize transfer fees for */\n mint: Address<TAccountMint>;\n /** The agent that owns this mint */\n agent?: Address<TAccountAgent>;\n /** Token-2022 program */\n tokenProgram?: Address<TAccountTokenProgram>;\n transferFeeBasisPoints: InitializeTransferFeeConfigInstructionDataArgs['transferFeeBasisPoints'];\n maximumFee: InitializeTransferFeeConfigInstructionDataArgs['maximumFee'];\n transferFeeAuthority: InitializeTransferFeeConfigInstructionDataArgs['transferFeeAuthority'];\n withdrawWithheldAuthority: InitializeTransferFeeConfigInstructionDataArgs['withdrawWithheldAuthority'];\n};\n\nexport async function getInitializeTransferFeeConfigInstructionAsync<\n TAccountAuthority extends string,\n TAccountMint extends string,\n TAccountAgent extends string,\n TAccountTokenProgram extends string,\n TProgramAddress extends\n Address = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: InitializeTransferFeeConfigAsyncInput<\n TAccountAuthority,\n TAccountMint,\n TAccountAgent,\n TAccountTokenProgram\n >,\n config?: { programAddress?: TProgramAddress }\n): Promise<\n InitializeTransferFeeConfigInstruction<\n TProgramAddress,\n TAccountAuthority,\n TAccountMint,\n TAccountAgent,\n TAccountTokenProgram\n >\n> {\n // Program address.\n const programAddress =\n config?.programAddress ?? GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n authority: { value: input.authority ?? null, isWritable: true },\n mint: { value: input.mint ?? null, isWritable: true },\n agent: { value: input.agent ?? null, isWritable: false },\n tokenProgram: { value: input.tokenProgram ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolve default values.\n if (!accounts.agent.value) {\n accounts.agent.value = await getProgramDerivedAddress({\n programAddress,\n seeds: [\n getBytesEncoder().encode(new Uint8Array([97, 103, 101, 110, 116])),\n getAddressEncoder().encode(expectAddress(accounts.authority.value)),\n ],\n });\n }\n if (!accounts.tokenProgram.value) {\n accounts.tokenProgram.value =\n 'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb' as Address<'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb'>;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.authority),\n getAccountMeta(accounts.mint),\n getAccountMeta(accounts.agent),\n getAccountMeta(accounts.tokenProgram),\n ],\n programAddress,\n data: getInitializeTransferFeeConfigInstructionDataEncoder().encode(\n args as InitializeTransferFeeConfigInstructionDataArgs\n ),\n } as InitializeTransferFeeConfigInstruction<\n TProgramAddress,\n TAccountAuthority,\n TAccountMint,\n TAccountAgent,\n TAccountTokenProgram\n >;\n\n return instruction;\n}\n\nexport type InitializeTransferFeeConfigInput<\n TAccountAuthority extends string = string,\n TAccountMint extends string = string,\n TAccountAgent extends string = string,\n TAccountTokenProgram extends string = string,\n> = {\n authority: TransactionSigner<TAccountAuthority>;\n /** The mint to initialize transfer fees for */\n mint: Address<TAccountMint>;\n /** The agent that owns this mint */\n agent: Address<TAccountAgent>;\n /** Token-2022 program */\n tokenProgram?: Address<TAccountTokenProgram>;\n transferFeeBasisPoints: InitializeTransferFeeConfigInstructionDataArgs['transferFeeBasisPoints'];\n maximumFee: InitializeTransferFeeConfigInstructionDataArgs['maximumFee'];\n transferFeeAuthority: InitializeTransferFeeConfigInstructionDataArgs['transferFeeAuthority'];\n withdrawWithheldAuthority: InitializeTransferFeeConfigInstructionDataArgs['withdrawWithheldAuthority'];\n};\n\nexport function getInitializeTransferFeeConfigInstruction<\n TAccountAuthority extends string,\n TAccountMint extends string,\n TAccountAgent extends string,\n TAccountTokenProgram extends string,\n TProgramAddress extends\n Address = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: InitializeTransferFeeConfigInput<\n TAccountAuthority,\n TAccountMint,\n TAccountAgent,\n TAccountTokenProgram\n >,\n config?: { programAddress?: TProgramAddress }\n): InitializeTransferFeeConfigInstruction<\n TProgramAddress,\n TAccountAuthority,\n TAccountMint,\n TAccountAgent,\n TAccountTokenProgram\n> {\n // Program address.\n const programAddress =\n config?.programAddress ?? GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n authority: { value: input.authority ?? null, isWritable: true },\n mint: { value: input.mint ?? null, isWritable: true },\n agent: { value: input.agent ?? null, isWritable: false },\n tokenProgram: { value: input.tokenProgram ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolve default values.\n if (!accounts.tokenProgram.value) {\n accounts.tokenProgram.value =\n 'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb' as Address<'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb'>;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.authority),\n getAccountMeta(accounts.mint),\n getAccountMeta(accounts.agent),\n getAccountMeta(accounts.tokenProgram),\n ],\n programAddress,\n data: getInitializeTransferFeeConfigInstructionDataEncoder().encode(\n args as InitializeTransferFeeConfigInstructionDataArgs\n ),\n } as InitializeTransferFeeConfigInstruction<\n TProgramAddress,\n TAccountAuthority,\n TAccountMint,\n TAccountAgent,\n TAccountTokenProgram\n >;\n\n return instruction;\n}\n\nexport type ParsedInitializeTransferFeeConfigInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n authority: TAccountMetas[0];\n /** The mint to initialize transfer fees for */\n mint: TAccountMetas[1];\n /** The agent that owns this mint */\n agent: TAccountMetas[2];\n /** Token-2022 program */\n tokenProgram: TAccountMetas[3];\n };\n data: InitializeTransferFeeConfigInstructionData;\n};\n\nexport function parseInitializeTransferFeeConfigInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>\n): ParsedInitializeTransferFeeConfigInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 4) {\n throw new Error('[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts');\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = instruction.accounts![accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n authority: getNextAccount(),\n mint: getNextAccount(),\n agent: getNextAccount(),\n tokenProgram: getNextAccount(),\n },\n data: getInitializeTransferFeeConfigInstructionDataDecoder().decode(\n instruction.data\n ),\n };\n}\n","/**\n * This code was AUTOGENERATED using the codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n combineCodec,\n fixDecoderSize,\n fixEncoderSize,\n getAddressEncoder,\n getBytesDecoder,\n getBytesEncoder,\n getI64Decoder,\n getI64Encoder,\n getProgramDerivedAddress,\n getStructDecoder,\n getStructEncoder,\n getU64Decoder,\n getU64Encoder,\n transformEncoder,\n type AccountMeta,\n type AccountSignerMeta,\n type Address,\n type FixedSizeCodec,\n type FixedSizeDecoder,\n type FixedSizeEncoder,\n type Instruction,\n type InstructionWithAccounts,\n type InstructionWithData,\n type ReadonlyAccount,\n type ReadonlyUint8Array,\n type TransactionSigner,\n type WritableAccount,\n type WritableSignerAccount,\n} from '@solana/kit';\nimport {\n GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_INSTRUCTION_DATA,\n GHOSTSPEAK_MARKETPLACE_ERROR__MISSING_REQUIRED_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INSTRUCTION_PARSING_FAILED,\n isGhostspeakMarketplaceError,\n} from '../errors';\nimport { GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS } from '../programs';\nimport {\n expectAddress,\n getAccountMetaFactory,\n type ResolvedAccount,\n} from '../shared';\n\nexport const INITIATE_NEGOTIATION_DISCRIMINATOR = new Uint8Array([\n 170, 46, 176, 41, 191, 255, 104, 205,\n]);\n\nexport function getInitiateNegotiationDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 8).encode(\n INITIATE_NEGOTIATION_DISCRIMINATOR\n );\n}\n\nexport type InitiateNegotiationInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountNegotiation extends string | AccountMeta<string> = string,\n TAccountInitiator extends string | AccountMeta<string> = string,\n TAccountCounterparty extends string | AccountMeta<string> = string,\n TAccountSystemProgram extends\n | string\n | AccountMeta<string> = '11111111111111111111111111111111',\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountNegotiation extends string\n ? WritableAccount<TAccountNegotiation>\n : TAccountNegotiation,\n TAccountInitiator extends string\n ? WritableSignerAccount<TAccountInitiator> &\n AccountSignerMeta<TAccountInitiator>\n : TAccountInitiator,\n TAccountCounterparty extends string\n ? ReadonlyAccount<TAccountCounterparty>\n : TAccountCounterparty,\n TAccountSystemProgram extends string\n ? ReadonlyAccount<TAccountSystemProgram>\n : TAccountSystemProgram,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type InitiateNegotiationInstructionData = {\n discriminator: ReadonlyUint8Array;\n initialOffer: bigint;\n autoAcceptThreshold: bigint;\n negotiationDeadline: bigint;\n};\n\nexport type InitiateNegotiationInstructionDataArgs = {\n initialOffer: number | bigint;\n autoAcceptThreshold: number | bigint;\n negotiationDeadline: number | bigint;\n};\n\nexport function getInitiateNegotiationInstructionDataEncoder(): FixedSizeEncoder<InitiateNegotiationInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n ['discriminator', fixEncoderSize(getBytesEncoder(), 8)],\n ['initialOffer', getU64Encoder()],\n ['autoAcceptThreshold', getU64Encoder()],\n ['negotiationDeadline', getI64Encoder()],\n ]),\n (value) => ({ ...value, discriminator: INITIATE_NEGOTIATION_DISCRIMINATOR })\n );\n}\n\nexport function getInitiateNegotiationInstructionDataDecoder(): FixedSizeDecoder<InitiateNegotiationInstructionData> {\n return getStructDecoder([\n ['discriminator', fixDecoderSize(getBytesDecoder(), 8)],\n ['initialOffer', getU64Decoder()],\n ['autoAcceptThreshold', getU64Decoder()],\n ['negotiationDeadline', getI64Decoder()],\n ]);\n}\n\nexport function getInitiateNegotiationInstructionDataCodec(): FixedSizeCodec<\n InitiateNegotiationInstructionDataArgs,\n InitiateNegotiationInstructionData\n> {\n return combineCodec(\n getInitiateNegotiationInstructionDataEncoder(),\n getInitiateNegotiationInstructionDataDecoder()\n );\n}\n\nexport type InitiateNegotiationAsyncInput<\n TAccountNegotiation extends string = string,\n TAccountInitiator extends string = string,\n TAccountCounterparty extends string = string,\n TAccountSystemProgram extends string = string,\n> = {\n negotiation?: Address<TAccountNegotiation>;\n initiator: TransactionSigner<TAccountInitiator>;\n counterparty: Address<TAccountCounterparty>;\n systemProgram?: Address<TAccountSystemProgram>;\n initialOffer: InitiateNegotiationInstructionDataArgs['initialOffer'];\n autoAcceptThreshold: InitiateNegotiationInstructionDataArgs['autoAcceptThreshold'];\n negotiationDeadline: InitiateNegotiationInstructionDataArgs['negotiationDeadline'];\n};\n\nexport async function getInitiateNegotiationInstructionAsync<\n TAccountNegotiation extends string,\n TAccountInitiator extends string,\n TAccountCounterparty extends string,\n TAccountSystemProgram extends string,\n TProgramAddress extends\n Address = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: InitiateNegotiationAsyncInput<\n TAccountNegotiation,\n TAccountInitiator,\n TAccountCounterparty,\n TAccountSystemProgram\n >,\n config?: { programAddress?: TProgramAddress }\n): Promise<\n InitiateNegotiationInstruction<\n TProgramAddress,\n TAccountNegotiation,\n TAccountInitiator,\n TAccountCounterparty,\n TAccountSystemProgram\n >\n> {\n // Program address.\n const programAddress =\n config?.programAddress ?? GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n negotiation: { value: input.negotiation ?? null, isWritable: true },\n initiator: { value: input.initiator ?? null, isWritable: true },\n counterparty: { value: input.counterparty ?? null, isWritable: false },\n systemProgram: { value: input.systemProgram ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolve default values.\n if (!accounts.negotiation.value) {\n accounts.negotiation.value = await getProgramDerivedAddress({\n programAddress,\n seeds: [\n getBytesEncoder().encode(\n new Uint8Array([110, 101, 103, 111, 116, 105, 97, 116, 105, 111, 110])\n ),\n getAddressEncoder().encode(expectAddress(accounts.initiator.value)),\n getAddressEncoder().encode(expectAddress(accounts.counterparty.value)),\n ],\n });\n }\n if (!accounts.systemProgram.value) {\n accounts.systemProgram.value =\n '11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.negotiation),\n getAccountMeta(accounts.initiator),\n getAccountMeta(accounts.counterparty),\n getAccountMeta(accounts.systemProgram),\n ],\n programAddress,\n data: getInitiateNegotiationInstructionDataEncoder().encode(\n args as InitiateNegotiationInstructionDataArgs\n ),\n } as InitiateNegotiationInstruction<\n TProgramAddress,\n TAccountNegotiation,\n TAccountInitiator,\n TAccountCounterparty,\n TAccountSystemProgram\n >;\n\n return instruction;\n}\n\nexport type InitiateNegotiationInput<\n TAccountNegotiation extends string = string,\n TAccountInitiator extends string = string,\n TAccountCounterparty extends string = string,\n TAccountSystemProgram extends string = string,\n> = {\n negotiation: Address<TAccountNegotiation>;\n initiator: TransactionSigner<TAccountInitiator>;\n counterparty: Address<TAccountCounterparty>;\n systemProgram?: Address<TAccountSystemProgram>;\n initialOffer: InitiateNegotiationInstructionDataArgs['initialOffer'];\n autoAcceptThreshold: InitiateNegotiationInstructionDataArgs['autoAcceptThreshold'];\n negotiationDeadline: InitiateNegotiationInstructionDataArgs['negotiationDeadline'];\n};\n\nexport function getInitiateNegotiationInstruction<\n TAccountNegotiation extends string,\n TAccountInitiator extends string,\n TAccountCounterparty extends string,\n TAccountSystemProgram extends string,\n TProgramAddress extends\n Address = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: InitiateNegotiationInput<\n TAccountNegotiation,\n TAccountInitiator,\n TAccountCounterparty,\n TAccountSystemProgram\n >,\n config?: { programAddress?: TProgramAddress }\n): InitiateNegotiationInstruction<\n TProgramAddress,\n TAccountNegotiation,\n TAccountInitiator,\n TAccountCounterparty,\n TAccountSystemProgram\n> {\n // Program address.\n const programAddress =\n config?.programAddress ?? GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n negotiation: { value: input.negotiation ?? null, isWritable: true },\n initiator: { value: input.initiator ?? null, isWritable: true },\n counterparty: { value: input.counterparty ?? null, isWritable: false },\n systemProgram: { value: input.systemProgram ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolve default values.\n if (!accounts.systemProgram.value) {\n accounts.systemProgram.value =\n '11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.negotiation),\n getAccountMeta(accounts.initiator),\n getAccountMeta(accounts.counterparty),\n getAccountMeta(accounts.systemProgram),\n ],\n programAddress,\n data: getInitiateNegotiationInstructionDataEncoder().encode(\n args as InitiateNegotiationInstructionDataArgs\n ),\n } as InitiateNegotiationInstruction<\n TProgramAddress,\n TAccountNegotiation,\n TAccountInitiator,\n TAccountCounterparty,\n TAccountSystemProgram\n >;\n\n return instruction;\n}\n\nexport type ParsedInitiateNegotiationInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n negotiation: TAccountMetas[0];\n initiator: TAccountMetas[1];\n counterparty: TAccountMetas[2];\n systemProgram: TAccountMetas[3];\n };\n data: InitiateNegotiationInstructionData;\n};\n\nexport function parseInitiateNegotiationInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>\n): ParsedInitiateNegotiationInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 4) {\n throw new Error('[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts');\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = instruction.accounts![accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n negotiation: getNextAccount(),\n initiator: getNextAccount(),\n counterparty: getNextAccount(),\n systemProgram: getNextAccount(),\n },\n data: getInitiateNegotiationInstructionDataDecoder().decode(\n instruction.data\n ),\n };\n}\n","/**\n * This code was AUTOGENERATED using the codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n combineCodec,\n fixDecoderSize,\n fixEncoderSize,\n getBytesDecoder,\n getBytesEncoder,\n getProgramDerivedAddress,\n getStructDecoder,\n getStructEncoder,\n transformEncoder,\n type AccountMeta,\n type AccountSignerMeta,\n type Address,\n type FixedSizeCodec,\n type FixedSizeDecoder,\n type FixedSizeEncoder,\n type Instruction,\n type InstructionWithAccounts,\n type InstructionWithData,\n type ReadonlyAccount,\n type ReadonlyUint8Array,\n type TransactionSigner,\n type WritableAccount,\n type WritableSignerAccount,\n} from '@solana/kit';\nimport {\n GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_INSTRUCTION_DATA,\n GHOSTSPEAK_MARKETPLACE_ERROR__MISSING_REQUIRED_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INSTRUCTION_PARSING_FAILED,\n isGhostspeakMarketplaceError,\n} from '../errors';\nimport { GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS } from '../programs';\nimport { getAccountMetaFactory, type ResolvedAccount } from '../shared';\n\nexport const JOIN_CHANNEL_DISCRIMINATOR = new Uint8Array([\n 124, 39, 115, 89, 217, 26, 38, 29,\n]);\n\nexport function getJoinChannelDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 8).encode(\n JOIN_CHANNEL_DISCRIMINATOR\n );\n}\n\nexport type JoinChannelInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountChannel extends string | AccountMeta<string> = string,\n TAccountReentrancyGuard extends string | AccountMeta<string> = string,\n TAccountUser extends string | AccountMeta<string> = string,\n TAccountUserAgent extends string | AccountMeta<string> = string,\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountChannel extends string\n ? WritableAccount<TAccountChannel>\n : TAccountChannel,\n TAccountReentrancyGuard extends string\n ? WritableAccount<TAccountReentrancyGuard>\n : TAccountReentrancyGuard,\n TAccountUser extends string\n ? WritableSignerAccount<TAccountUser> & AccountSignerMeta<TAccountUser>\n : TAccountUser,\n TAccountUserAgent extends string\n ? ReadonlyAccount<TAccountUserAgent>\n : TAccountUserAgent,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type JoinChannelInstructionData = { discriminator: ReadonlyUint8Array };\n\nexport type JoinChannelInstructionDataArgs = {};\n\nexport function getJoinChannelInstructionDataEncoder(): FixedSizeEncoder<JoinChannelInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([['discriminator', fixEncoderSize(getBytesEncoder(), 8)]]),\n (value) => ({ ...value, discriminator: JOIN_CHANNEL_DISCRIMINATOR })\n );\n}\n\nexport function getJoinChannelInstructionDataDecoder(): FixedSizeDecoder<JoinChannelInstructionData> {\n return getStructDecoder([\n ['discriminator', fixDecoderSize(getBytesDecoder(), 8)],\n ]);\n}\n\nexport function getJoinChannelInstructionDataCodec(): FixedSizeCodec<\n JoinChannelInstructionDataArgs,\n JoinChannelInstructionData\n> {\n return combineCodec(\n getJoinChannelInstructionDataEncoder(),\n getJoinChannelInstructionDataDecoder()\n );\n}\n\nexport type JoinChannelAsyncInput<\n TAccountChannel extends string = string,\n TAccountReentrancyGuard extends string = string,\n TAccountUser extends string = string,\n TAccountUserAgent extends string = string,\n> = {\n channel: Address<TAccountChannel>;\n reentrancyGuard?: Address<TAccountReentrancyGuard>;\n user: TransactionSigner<TAccountUser>;\n userAgent: Address<TAccountUserAgent>;\n};\n\nexport async function getJoinChannelInstructionAsync<\n TAccountChannel extends string,\n TAccountReentrancyGuard extends string,\n TAccountUser extends string,\n TAccountUserAgent extends string,\n TProgramAddress extends\n Address = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: JoinChannelAsyncInput<\n TAccountChannel,\n TAccountReentrancyGuard,\n TAccountUser,\n TAccountUserAgent\n >,\n config?: { programAddress?: TProgramAddress }\n): Promise<\n JoinChannelInstruction<\n TProgramAddress,\n TAccountChannel,\n TAccountReentrancyGuard,\n TAccountUser,\n TAccountUserAgent\n >\n> {\n // Program address.\n const programAddress =\n config?.programAddress ?? GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n channel: { value: input.channel ?? null, isWritable: true },\n reentrancyGuard: { value: input.reentrancyGuard ?? null, isWritable: true },\n user: { value: input.user ?? null, isWritable: true },\n userAgent: { value: input.userAgent ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Resolve default values.\n if (!accounts.reentrancyGuard.value) {\n accounts.reentrancyGuard.value = await getProgramDerivedAddress({\n programAddress,\n seeds: [\n getBytesEncoder().encode(\n new Uint8Array([\n 114, 101, 101, 110, 116, 114, 97, 110, 99, 121, 95, 103, 117, 97,\n 114, 100,\n ])\n ),\n ],\n });\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.channel),\n getAccountMeta(accounts.reentrancyGuard),\n getAccountMeta(accounts.user),\n getAccountMeta(accounts.userAgent),\n ],\n programAddress,\n data: getJoinChannelInstructionDataEncoder().encode({}),\n } as JoinChannelInstruction<\n TProgramAddress,\n TAccountChannel,\n TAccountReentrancyGuard,\n TAccountUser,\n TAccountUserAgent\n >;\n\n return instruction;\n}\n\nexport type JoinChannelInput<\n TAccountChannel extends string = string,\n TAccountReentrancyGuard extends string = string,\n TAccountUser extends string = string,\n TAccountUserAgent extends string = string,\n> = {\n channel: Address<TAccountChannel>;\n reentrancyGuard: Address<TAccountReentrancyGuard>;\n user: TransactionSigner<TAccountUser>;\n userAgent: Address<TAccountUserAgent>;\n};\n\nexport function getJoinChannelInstruction<\n TAccountChannel extends string,\n TAccountReentrancyGuard extends string,\n TAccountUser extends string,\n TAccountUserAgent extends string,\n TProgramAddress extends\n Address = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: JoinChannelInput<\n TAccountChannel,\n TAccountReentrancyGuard,\n TAccountUser,\n TAccountUserAgent\n >,\n config?: { programAddress?: TProgramAddress }\n): JoinChannelInstruction<\n TProgramAddress,\n TAccountChannel,\n TAccountReentrancyGuard,\n TAccountUser,\n TAccountUserAgent\n> {\n // Program address.\n const programAddress =\n config?.programAddress ?? GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n channel: { value: input.channel ?? null, isWritable: true },\n reentrancyGuard: { value: input.reentrancyGuard ?? null, isWritable: true },\n user: { value: input.user ?? null, isWritable: true },\n userAgent: { value: input.userAgent ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.channel),\n getAccountMeta(accounts.reentrancyGuard),\n getAccountMeta(accounts.user),\n getAccountMeta(accounts.userAgent),\n ],\n programAddress,\n data: getJoinChannelInstructionDataEncoder().encode({}),\n } as JoinChannelInstruction<\n TProgramAddress,\n TAccountChannel,\n TAccountReentrancyGuard,\n TAccountUser,\n TAccountUserAgent\n >;\n\n return instruction;\n}\n\nexport type ParsedJoinChannelInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n channel: TAccountMetas[0];\n reentrancyGuard: TAccountMetas[1];\n user: TAccountMetas[2];\n userAgent: TAccountMetas[3];\n };\n data: JoinChannelInstructionData;\n};\n\nexport function parseJoinChannelInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>\n): ParsedJoinChannelInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 4) {\n throw new Error('[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts');\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = instruction.accounts![accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n channel: getNextAccount(),\n reentrancyGuard: getNextAccount(),\n user: getNextAccount(),\n userAgent: getNextAccount(),\n },\n data: getJoinChannelInstructionDataDecoder().decode(instruction.data),\n };\n}\n","/**\n * This code was AUTOGENERATED using the codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n combineCodec,\n fixDecoderSize,\n fixEncoderSize,\n getBytesDecoder,\n getBytesEncoder,\n getProgramDerivedAddress,\n getStructDecoder,\n getStructEncoder,\n transformEncoder,\n type AccountMeta,\n type AccountSignerMeta,\n type Address,\n type FixedSizeCodec,\n type FixedSizeDecoder,\n type FixedSizeEncoder,\n type Instruction,\n type InstructionWithAccounts,\n type InstructionWithData,\n type ReadonlyUint8Array,\n type TransactionSigner,\n type WritableAccount,\n type WritableSignerAccount,\n} from '@solana/kit';\nimport {\n GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_INSTRUCTION_DATA,\n GHOSTSPEAK_MARKETPLACE_ERROR__MISSING_REQUIRED_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INSTRUCTION_PARSING_FAILED,\n isGhostspeakMarketplaceError,\n} from '../errors';\nimport { GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS } from '../programs';\nimport { getAccountMetaFactory, type ResolvedAccount } from '../shared';\n\nexport const LEAVE_CHANNEL_DISCRIMINATOR = new Uint8Array([\n 104, 0, 75, 134, 95, 80, 68, 186,\n]);\n\nexport function getLeaveChannelDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 8).encode(\n LEAVE_CHANNEL_DISCRIMINATOR\n );\n}\n\nexport type LeaveChannelInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountChannel extends string | AccountMeta<string> = string,\n TAccountReentrancyGuard extends string | AccountMeta<string> = string,\n TAccountUser extends string | AccountMeta<string> = string,\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountChannel extends string\n ? WritableAccount<TAccountChannel>\n : TAccountChannel,\n TAccountReentrancyGuard extends string\n ? WritableAccount<TAccountReentrancyGuard>\n : TAccountReentrancyGuard,\n TAccountUser extends string\n ? WritableSignerAccount<TAccountUser> & AccountSignerMeta<TAccountUser>\n : TAccountUser,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type LeaveChannelInstructionData = { discriminator: ReadonlyUint8Array };\n\nexport type LeaveChannelInstructionDataArgs = {};\n\nexport function getLeaveChannelInstructionDataEncoder(): FixedSizeEncoder<LeaveChannelInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([['discriminator', fixEncoderSize(getBytesEncoder(), 8)]]),\n (value) => ({ ...value, discriminator: LEAVE_CHANNEL_DISCRIMINATOR })\n );\n}\n\nexport function getLeaveChannelInstructionDataDecoder(): FixedSizeDecoder<LeaveChannelInstructionData> {\n return getStructDecoder([\n ['discriminator', fixDecoderSize(getBytesDecoder(), 8)],\n ]);\n}\n\nexport function getLeaveChannelInstructionDataCodec(): FixedSizeCodec<\n LeaveChannelInstructionDataArgs,\n LeaveChannelInstructionData\n> {\n return combineCodec(\n getLeaveChannelInstructionDataEncoder(),\n getLeaveChannelInstructionDataDecoder()\n );\n}\n\nexport type LeaveChannelAsyncInput<\n TAccountChannel extends string = string,\n TAccountReentrancyGuard extends string = string,\n TAccountUser extends string = string,\n> = {\n channel: Address<TAccountChannel>;\n reentrancyGuard?: Address<TAccountReentrancyGuard>;\n user: TransactionSigner<TAccountUser>;\n};\n\nexport async function getLeaveChannelInstructionAsync<\n TAccountChannel extends string,\n TAccountReentrancyGuard extends string,\n TAccountUser extends string,\n TProgramAddress extends\n Address = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: LeaveChannelAsyncInput<\n TAccountChannel,\n TAccountReentrancyGuard,\n TAccountUser\n >,\n config?: { programAddress?: TProgramAddress }\n): Promise<\n LeaveChannelInstruction<\n TProgramAddress,\n TAccountChannel,\n TAccountReentrancyGuard,\n TAccountUser\n >\n> {\n // Program address.\n const programAddress =\n config?.programAddress ?? GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n channel: { value: input.channel ?? null, isWritable: true },\n reentrancyGuard: { value: input.reentrancyGuard ?? null, isWritable: true },\n user: { value: input.user ?? null, isWritable: true },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Resolve default values.\n if (!accounts.reentrancyGuard.value) {\n accounts.reentrancyGuard.value = await getProgramDerivedAddress({\n programAddress,\n seeds: [\n getBytesEncoder().encode(\n new Uint8Array([\n 114, 101, 101, 110, 116, 114, 97, 110, 99, 121, 95, 103, 117, 97,\n 114, 100,\n ])\n ),\n ],\n });\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.channel),\n getAccountMeta(accounts.reentrancyGuard),\n getAccountMeta(accounts.user),\n ],\n programAddress,\n data: getLeaveChannelInstructionDataEncoder().encode({}),\n } as LeaveChannelInstruction<\n TProgramAddress,\n TAccountChannel,\n TAccountReentrancyGuard,\n TAccountUser\n >;\n\n return instruction;\n}\n\nexport type LeaveChannelInput<\n TAccountChannel extends string = string,\n TAccountReentrancyGuard extends string = string,\n TAccountUser extends string = string,\n> = {\n channel: Address<TAccountChannel>;\n reentrancyGuard: Address<TAccountReentrancyGuard>;\n user: TransactionSigner<TAccountUser>;\n};\n\nexport function getLeaveChannelInstruction<\n TAccountChannel extends string,\n TAccountReentrancyGuard extends string,\n TAccountUser extends string,\n TProgramAddress extends\n Address = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: LeaveChannelInput<\n TAccountChannel,\n TAccountReentrancyGuard,\n TAccountUser\n >,\n config?: { programAddress?: TProgramAddress }\n): LeaveChannelInstruction<\n TProgramAddress,\n TAccountChannel,\n TAccountReentrancyGuard,\n TAccountUser\n> {\n // Program address.\n const programAddress =\n config?.programAddress ?? GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n channel: { value: input.channel ?? null, isWritable: true },\n reentrancyGuard: { value: input.reentrancyGuard ?? null, isWritable: true },\n user: { value: input.user ?? null, isWritable: true },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.channel),\n getAccountMeta(accounts.reentrancyGuard),\n getAccountMeta(accounts.user),\n ],\n programAddress,\n data: getLeaveChannelInstructionDataEncoder().encode({}),\n } as LeaveChannelInstruction<\n TProgramAddress,\n TAccountChannel,\n TAccountReentrancyGuard,\n TAccountUser\n >;\n\n return instruction;\n}\n\nexport type ParsedLeaveChannelInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n channel: TAccountMetas[0];\n reentrancyGuard: TAccountMetas[1];\n user: TAccountMetas[2];\n };\n data: LeaveChannelInstructionData;\n};\n\nexport function parseLeaveChannelInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>\n): ParsedLeaveChannelInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 3) {\n throw new Error('[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts');\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = instruction.accounts![accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n channel: getNextAccount(),\n reentrancyGuard: getNextAccount(),\n user: getNextAccount(),\n },\n data: getLeaveChannelInstructionDataDecoder().decode(instruction.data),\n };\n}\n","/**\n * This code was AUTOGENERATED using the codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n combineCodec,\n fixDecoderSize,\n fixEncoderSize,\n getAddressEncoder,\n getBytesDecoder,\n getBytesEncoder,\n getProgramDerivedAddress,\n getStructDecoder,\n getStructEncoder,\n getU64Decoder,\n getU64Encoder,\n transformEncoder,\n type AccountMeta,\n type AccountSignerMeta,\n type Address,\n type FixedSizeCodec,\n type FixedSizeDecoder,\n type FixedSizeEncoder,\n type Instruction,\n type InstructionWithAccounts,\n type InstructionWithData,\n type ReadonlyAccount,\n type ReadonlyUint8Array,\n type TransactionSigner,\n type WritableAccount,\n type WritableSignerAccount,\n} from '@solana/kit';\nimport {\n GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_INSTRUCTION_DATA,\n GHOSTSPEAK_MARKETPLACE_ERROR__MISSING_REQUIRED_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INSTRUCTION_PARSING_FAILED,\n isGhostspeakMarketplaceError,\n} from '../errors';\nimport { GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS } from '../programs';\nimport {\n expectAddress,\n getAccountMetaFactory,\n type ResolvedAccount,\n} from '../shared';\n\nexport const LIST_AGENT_FOR_RESALE_DISCRIMINATOR = new Uint8Array([\n 3, 233, 3, 123, 241, 61, 231, 238,\n]);\n\nexport function getListAgentForResaleDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 8).encode(\n LIST_AGENT_FOR_RESALE_DISCRIMINATOR\n );\n}\n\nexport type ListAgentForResaleInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountResale extends string | AccountMeta<string> = string,\n TAccountAgent extends string | AccountMeta<string> = string,\n TAccountSeller extends string | AccountMeta<string> = string,\n TAccountSystemProgram extends\n | string\n | AccountMeta<string> = '11111111111111111111111111111111',\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountResale extends string\n ? WritableAccount<TAccountResale>\n : TAccountResale,\n TAccountAgent extends string\n ? ReadonlyAccount<TAccountAgent>\n : TAccountAgent,\n TAccountSeller extends string\n ? WritableSignerAccount<TAccountSeller> &\n AccountSignerMeta<TAccountSeller>\n : TAccountSeller,\n TAccountSystemProgram extends string\n ? ReadonlyAccount<TAccountSystemProgram>\n : TAccountSystemProgram,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type ListAgentForResaleInstructionData = {\n discriminator: ReadonlyUint8Array;\n listingPrice: bigint;\n};\n\nexport type ListAgentForResaleInstructionDataArgs = {\n listingPrice: number | bigint;\n};\n\nexport function getListAgentForResaleInstructionDataEncoder(): FixedSizeEncoder<ListAgentForResaleInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n ['discriminator', fixEncoderSize(getBytesEncoder(), 8)],\n ['listingPrice', getU64Encoder()],\n ]),\n (value) => ({\n ...value,\n discriminator: LIST_AGENT_FOR_RESALE_DISCRIMINATOR,\n })\n );\n}\n\nexport function getListAgentForResaleInstructionDataDecoder(): FixedSizeDecoder<ListAgentForResaleInstructionData> {\n return getStructDecoder([\n ['discriminator', fixDecoderSize(getBytesDecoder(), 8)],\n ['listingPrice', getU64Decoder()],\n ]);\n}\n\nexport function getListAgentForResaleInstructionDataCodec(): FixedSizeCodec<\n ListAgentForResaleInstructionDataArgs,\n ListAgentForResaleInstructionData\n> {\n return combineCodec(\n getListAgentForResaleInstructionDataEncoder(),\n getListAgentForResaleInstructionDataDecoder()\n );\n}\n\nexport type ListAgentForResaleAsyncInput<\n TAccountResale extends string = string,\n TAccountAgent extends string = string,\n TAccountSeller extends string = string,\n TAccountSystemProgram extends string = string,\n> = {\n resale?: Address<TAccountResale>;\n agent: Address<TAccountAgent>;\n seller: TransactionSigner<TAccountSeller>;\n systemProgram?: Address<TAccountSystemProgram>;\n listingPrice: ListAgentForResaleInstructionDataArgs['listingPrice'];\n};\n\nexport async function getListAgentForResaleInstructionAsync<\n TAccountResale extends string,\n TAccountAgent extends string,\n TAccountSeller extends string,\n TAccountSystemProgram extends string,\n TProgramAddress extends\n Address = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: ListAgentForResaleAsyncInput<\n TAccountResale,\n TAccountAgent,\n TAccountSeller,\n TAccountSystemProgram\n >,\n config?: { programAddress?: TProgramAddress }\n): Promise<\n ListAgentForResaleInstruction<\n TProgramAddress,\n TAccountResale,\n TAccountAgent,\n TAccountSeller,\n TAccountSystemProgram\n >\n> {\n // Program address.\n const programAddress =\n config?.programAddress ?? GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n resale: { value: input.resale ?? null, isWritable: true },\n agent: { value: input.agent ?? null, isWritable: false },\n seller: { value: input.seller ?? null, isWritable: true },\n systemProgram: { value: input.systemProgram ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolve default values.\n if (!accounts.resale.value) {\n accounts.resale.value = await getProgramDerivedAddress({\n programAddress,\n seeds: [\n getBytesEncoder().encode(new Uint8Array([114, 101, 115, 97, 108, 101])),\n getAddressEncoder().encode(expectAddress(accounts.agent.value)),\n getAddressEncoder().encode(expectAddress(accounts.seller.value)),\n ],\n });\n }\n if (!accounts.systemProgram.value) {\n accounts.systemProgram.value =\n '11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.resale),\n getAccountMeta(accounts.agent),\n getAccountMeta(accounts.seller),\n getAccountMeta(accounts.systemProgram),\n ],\n programAddress,\n data: getListAgentForResaleInstructionDataEncoder().encode(\n args as ListAgentForResaleInstructionDataArgs\n ),\n } as ListAgentForResaleInstruction<\n TProgramAddress,\n TAccountResale,\n TAccountAgent,\n TAccountSeller,\n TAccountSystemProgram\n >;\n\n return instruction;\n}\n\nexport type ListAgentForResaleInput<\n TAccountResale extends string = string,\n TAccountAgent extends string = string,\n TAccountSeller extends string = string,\n TAccountSystemProgram extends string = string,\n> = {\n resale: Address<TAccountResale>;\n agent: Address<TAccountAgent>;\n seller: TransactionSigner<TAccountSeller>;\n systemProgram?: Address<TAccountSystemProgram>;\n listingPrice: ListAgentForResaleInstructionDataArgs['listingPrice'];\n};\n\nexport function getListAgentForResaleInstruction<\n TAccountResale extends string,\n TAccountAgent extends string,\n TAccountSeller extends string,\n TAccountSystemProgram extends string,\n TProgramAddress extends\n Address = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: ListAgentForResaleInput<\n TAccountResale,\n TAccountAgent,\n TAccountSeller,\n TAccountSystemProgram\n >,\n config?: { programAddress?: TProgramAddress }\n): ListAgentForResaleInstruction<\n TProgramAddress,\n TAccountResale,\n TAccountAgent,\n TAccountSeller,\n TAccountSystemProgram\n> {\n // Program address.\n const programAddress =\n config?.programAddress ?? GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n resale: { value: input.resale ?? null, isWritable: true },\n agent: { value: input.agent ?? null, isWritable: false },\n seller: { value: input.seller ?? null, isWritable: true },\n systemProgram: { value: input.systemProgram ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolve default values.\n if (!accounts.systemProgram.value) {\n accounts.systemProgram.value =\n '11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.resale),\n getAccountMeta(accounts.agent),\n getAccountMeta(accounts.seller),\n getAccountMeta(accounts.systemProgram),\n ],\n programAddress,\n data: getListAgentForResaleInstructionDataEncoder().encode(\n args as ListAgentForResaleInstructionDataArgs\n ),\n } as ListAgentForResaleInstruction<\n TProgramAddress,\n TAccountResale,\n TAccountAgent,\n TAccountSeller,\n TAccountSystemProgram\n >;\n\n return instruction;\n}\n\nexport type ParsedListAgentForResaleInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n resale: TAccountMetas[0];\n agent: TAccountMetas[1];\n seller: TAccountMetas[2];\n systemProgram: TAccountMetas[3];\n };\n data: ListAgentForResaleInstructionData;\n};\n\nexport function parseListAgentForResaleInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>\n): ParsedListAgentForResaleInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 4) {\n throw new Error('[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts');\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = instruction.accounts![accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n resale: getNextAccount(),\n agent: getNextAccount(),\n seller: getNextAccount(),\n systemProgram: getNextAccount(),\n },\n data: getListAgentForResaleInstructionDataDecoder().decode(\n instruction.data\n ),\n };\n}\n","/**\n * This code was AUTOGENERATED using the codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n addDecoderSizePrefix,\n addEncoderSizePrefix,\n combineCodec,\n fixDecoderSize,\n fixEncoderSize,\n getBytesDecoder,\n getBytesEncoder,\n getStructDecoder,\n getStructEncoder,\n getU32Decoder,\n getU32Encoder,\n getU64Decoder,\n getU64Encoder,\n getUtf8Decoder,\n getUtf8Encoder,\n transformEncoder,\n type AccountMeta,\n type AccountSignerMeta,\n type Address,\n type Codec,\n type Decoder,\n type Encoder,\n type Instruction,\n type InstructionWithAccounts,\n type InstructionWithData,\n type ReadonlySignerAccount,\n type ReadonlyUint8Array,\n type TransactionSigner,\n type WritableAccount,\n} from '@solana/kit';\nimport {\n GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_INSTRUCTION_DATA,\n GHOSTSPEAK_MARKETPLACE_ERROR__MISSING_REQUIRED_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INSTRUCTION_PARSING_FAILED,\n isGhostspeakMarketplaceError,\n} from '../errors';\nimport { GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS } from '../programs';\nimport { getAccountMetaFactory, type ResolvedAccount } from '../shared';\n\nexport const MAKE_COUNTER_OFFER_DISCRIMINATOR = new Uint8Array([\n 74, 8, 96, 55, 146, 85, 200, 152,\n]);\n\nexport function getMakeCounterOfferDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 8).encode(\n MAKE_COUNTER_OFFER_DISCRIMINATOR\n );\n}\n\nexport type MakeCounterOfferInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountNegotiation extends string | AccountMeta<string> = string,\n TAccountSender extends string | AccountMeta<string> = string,\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountNegotiation extends string\n ? WritableAccount<TAccountNegotiation>\n : TAccountNegotiation,\n TAccountSender extends string\n ? ReadonlySignerAccount<TAccountSender> &\n AccountSignerMeta<TAccountSender>\n : TAccountSender,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type MakeCounterOfferInstructionData = {\n discriminator: ReadonlyUint8Array;\n counterOffer: bigint;\n message: string;\n};\n\nexport type MakeCounterOfferInstructionDataArgs = {\n counterOffer: number | bigint;\n message: string;\n};\n\nexport function getMakeCounterOfferInstructionDataEncoder(): Encoder<MakeCounterOfferInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n ['discriminator', fixEncoderSize(getBytesEncoder(), 8)],\n ['counterOffer', getU64Encoder()],\n ['message', addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder())],\n ]),\n (value) => ({ ...value, discriminator: MAKE_COUNTER_OFFER_DISCRIMINATOR })\n );\n}\n\nexport function getMakeCounterOfferInstructionDataDecoder(): Decoder<MakeCounterOfferInstructionData> {\n return getStructDecoder([\n ['discriminator', fixDecoderSize(getBytesDecoder(), 8)],\n ['counterOffer', getU64Decoder()],\n ['message', addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())],\n ]);\n}\n\nexport function getMakeCounterOfferInstructionDataCodec(): Codec<\n MakeCounterOfferInstructionDataArgs,\n MakeCounterOfferInstructionData\n> {\n return combineCodec(\n getMakeCounterOfferInstructionDataEncoder(),\n getMakeCounterOfferInstructionDataDecoder()\n );\n}\n\nexport type MakeCounterOfferInput<\n TAccountNegotiation extends string = string,\n TAccountSender extends string = string,\n> = {\n negotiation: Address<TAccountNegotiation>;\n sender: TransactionSigner<TAccountSender>;\n counterOffer: MakeCounterOfferInstructionDataArgs['counterOffer'];\n message: MakeCounterOfferInstructionDataArgs['message'];\n};\n\nexport function getMakeCounterOfferInstruction<\n TAccountNegotiation extends string,\n TAccountSender extends string,\n TProgramAddress extends\n Address = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: MakeCounterOfferInput<TAccountNegotiation, TAccountSender>,\n config?: { programAddress?: TProgramAddress }\n): MakeCounterOfferInstruction<\n TProgramAddress,\n TAccountNegotiation,\n TAccountSender\n> {\n // Program address.\n const programAddress =\n config?.programAddress ?? GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n negotiation: { value: input.negotiation ?? null, isWritable: true },\n sender: { value: input.sender ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.negotiation),\n getAccountMeta(accounts.sender),\n ],\n programAddress,\n data: getMakeCounterOfferInstructionDataEncoder().encode(\n args as MakeCounterOfferInstructionDataArgs\n ),\n } as MakeCounterOfferInstruction<\n TProgramAddress,\n TAccountNegotiation,\n TAccountSender\n >;\n\n return instruction;\n}\n\nexport type ParsedMakeCounterOfferInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n negotiation: TAccountMetas[0];\n sender: TAccountMetas[1];\n };\n data: MakeCounterOfferInstructionData;\n};\n\nexport function parseMakeCounterOfferInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>\n): ParsedMakeCounterOfferInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 2) {\n throw new Error('[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts');\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = instruction.accounts![accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n negotiation: getNextAccount(),\n sender: getNextAccount(),\n },\n data: getMakeCounterOfferInstructionDataDecoder().decode(instruction.data),\n };\n}\n","/**\n * This code was AUTOGENERATED using the codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n combineCodec,\n fixDecoderSize,\n fixEncoderSize,\n getAddressEncoder,\n getBooleanDecoder,\n getBooleanEncoder,\n getBytesDecoder,\n getBytesEncoder,\n getProgramDerivedAddress,\n getStructDecoder,\n getStructEncoder,\n transformEncoder,\n type AccountMeta,\n type AccountSignerMeta,\n type Address,\n type FixedSizeCodec,\n type FixedSizeDecoder,\n type FixedSizeEncoder,\n type Instruction,\n type InstructionWithAccounts,\n type InstructionWithData,\n type ReadonlyAccount,\n type ReadonlySignerAccount,\n type ReadonlyUint8Array,\n type TransactionSigner,\n type WritableAccount,\n} from '@solana/kit';\nimport {\n GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_INSTRUCTION_DATA,\n GHOSTSPEAK_MARKETPLACE_ERROR__MISSING_REQUIRED_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INSTRUCTION_PARSING_FAILED,\n isGhostspeakMarketplaceError,\n} from '../errors';\nimport { GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS } from '../programs';\nimport {\n expectAddress,\n getAccountMetaFactory,\n type ResolvedAccount,\n} from '../shared';\n\nexport const MANAGE_AGENT_STATUS_DISCRIMINATOR = new Uint8Array([\n 164, 219, 91, 38, 45, 31, 33, 47,\n]);\n\nexport function getManageAgentStatusDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 8).encode(\n MANAGE_AGENT_STATUS_DISCRIMINATOR\n );\n}\n\nexport type ManageAgentStatusInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountAgent extends string | AccountMeta<string> = string,\n TAccountOwner extends string | AccountMeta<string> = string,\n TAccountClock extends\n | string\n | AccountMeta<string> = 'SysvarC1ock11111111111111111111111111111111',\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountAgent extends string\n ? WritableAccount<TAccountAgent>\n : TAccountAgent,\n TAccountOwner extends string\n ? ReadonlySignerAccount<TAccountOwner> &\n AccountSignerMeta<TAccountOwner>\n : TAccountOwner,\n TAccountClock extends string\n ? ReadonlyAccount<TAccountClock>\n : TAccountClock,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type ManageAgentStatusInstructionData = {\n discriminator: ReadonlyUint8Array;\n newStatus: boolean;\n};\n\nexport type ManageAgentStatusInstructionDataArgs = { newStatus: boolean };\n\nexport function getManageAgentStatusInstructionDataEncoder(): FixedSizeEncoder<ManageAgentStatusInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n ['discriminator', fixEncoderSize(getBytesEncoder(), 8)],\n ['newStatus', getBooleanEncoder()],\n ]),\n (value) => ({ ...value, discriminator: MANAGE_AGENT_STATUS_DISCRIMINATOR })\n );\n}\n\nexport function getManageAgentStatusInstructionDataDecoder(): FixedSizeDecoder<ManageAgentStatusInstructionData> {\n return getStructDecoder([\n ['discriminator', fixDecoderSize(getBytesDecoder(), 8)],\n ['newStatus', getBooleanDecoder()],\n ]);\n}\n\nexport function getManageAgentStatusInstructionDataCodec(): FixedSizeCodec<\n ManageAgentStatusInstructionDataArgs,\n ManageAgentStatusInstructionData\n> {\n return combineCodec(\n getManageAgentStatusInstructionDataEncoder(),\n getManageAgentStatusInstructionDataDecoder()\n );\n}\n\nexport type ManageAgentStatusAsyncInput<\n TAccountAgent extends string = string,\n TAccountOwner extends string = string,\n TAccountClock extends string = string,\n> = {\n /** Agent account with strict validation */\n agent?: Address<TAccountAgent>;\n /** Owner authority */\n owner: TransactionSigner<TAccountOwner>;\n /** Clock sysvar for timestamp validation */\n clock?: Address<TAccountClock>;\n newStatus: ManageAgentStatusInstructionDataArgs['newStatus'];\n};\n\nexport async function getManageAgentStatusInstructionAsync<\n TAccountAgent extends string,\n TAccountOwner extends string,\n TAccountClock extends string,\n TProgramAddress extends\n Address = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: ManageAgentStatusAsyncInput<\n TAccountAgent,\n TAccountOwner,\n TAccountClock\n >,\n config?: { programAddress?: TProgramAddress }\n): Promise<\n ManageAgentStatusInstruction<\n TProgramAddress,\n TAccountAgent,\n TAccountOwner,\n TAccountClock\n >\n> {\n // Program address.\n const programAddress =\n config?.programAddress ?? GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n agent: { value: input.agent ?? null, isWritable: true },\n owner: { value: input.owner ?? null, isWritable: false },\n clock: { value: input.clock ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolve default values.\n if (!accounts.agent.value) {\n accounts.agent.value = await getProgramDerivedAddress({\n programAddress,\n seeds: [\n getBytesEncoder().encode(new Uint8Array([97, 103, 101, 110, 116])),\n getAddressEncoder().encode(expectAddress(accounts.owner.value)),\n ],\n });\n }\n if (!accounts.clock.value) {\n accounts.clock.value =\n 'SysvarC1ock11111111111111111111111111111111' as Address<'SysvarC1ock11111111111111111111111111111111'>;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.agent),\n getAccountMeta(accounts.owner),\n getAccountMeta(accounts.clock),\n ],\n programAddress,\n data: getManageAgentStatusInstructionDataEncoder().encode(\n args as ManageAgentStatusInstructionDataArgs\n ),\n } as ManageAgentStatusInstruction<\n TProgramAddress,\n TAccountAgent,\n TAccountOwner,\n TAccountClock\n >;\n\n return instruction;\n}\n\nexport type ManageAgentStatusInput<\n TAccountAgent extends string = string,\n TAccountOwner extends string = string,\n TAccountClock extends string = string,\n> = {\n /** Agent account with strict validation */\n agent: Address<TAccountAgent>;\n /** Owner authority */\n owner: TransactionSigner<TAccountOwner>;\n /** Clock sysvar for timestamp validation */\n clock?: Address<TAccountClock>;\n newStatus: ManageAgentStatusInstructionDataArgs['newStatus'];\n};\n\nexport function getManageAgentStatusInstruction<\n TAccountAgent extends string,\n TAccountOwner extends string,\n TAccountClock extends string,\n TProgramAddress extends\n Address = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: ManageAgentStatusInput<TAccountAgent, TAccountOwner, TAccountClock>,\n config?: { programAddress?: TProgramAddress }\n): ManageAgentStatusInstruction<\n TProgramAddress,\n TAccountAgent,\n TAccountOwner,\n TAccountClock\n> {\n // Program address.\n const programAddress =\n config?.programAddress ?? GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n agent: { value: input.agent ?? null, isWritable: true },\n owner: { value: input.owner ?? null, isWritable: false },\n clock: { value: input.clock ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolve default values.\n if (!accounts.clock.value) {\n accounts.clock.value =\n 'SysvarC1ock11111111111111111111111111111111' as Address<'SysvarC1ock11111111111111111111111111111111'>;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.agent),\n getAccountMeta(accounts.owner),\n getAccountMeta(accounts.clock),\n ],\n programAddress,\n data: getManageAgentStatusInstructionDataEncoder().encode(\n args as ManageAgentStatusInstructionDataArgs\n ),\n } as ManageAgentStatusInstruction<\n TProgramAddress,\n TAccountAgent,\n TAccountOwner,\n TAccountClock\n >;\n\n return instruction;\n}\n\nexport type ParsedManageAgentStatusInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n /** Agent account with strict validation */\n agent: TAccountMetas[0];\n /** Owner authority */\n owner: TAccountMetas[1];\n /** Clock sysvar for timestamp validation */\n clock: TAccountMetas[2];\n };\n data: ManageAgentStatusInstructionData;\n};\n\nexport function parseManageAgentStatusInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>\n): ParsedManageAgentStatusInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 3) {\n throw new Error('[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts');\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = instruction.accounts![accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n agent: getNextAccount(),\n owner: getNextAccount(),\n clock: getNextAccount(),\n },\n data: getManageAgentStatusInstructionDataDecoder().decode(instruction.data),\n };\n}\n","/**\n * This code was AUTOGENERATED using the codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n combineCodec,\n fixDecoderSize,\n fixEncoderSize,\n getBytesDecoder,\n getBytesEncoder,\n getStructDecoder,\n getStructEncoder,\n getU64Decoder,\n getU64Encoder,\n transformEncoder,\n type AccountMeta,\n type AccountSignerMeta,\n type Address,\n type FixedSizeCodec,\n type FixedSizeDecoder,\n type FixedSizeEncoder,\n type Instruction,\n type InstructionWithAccounts,\n type InstructionWithData,\n type ReadonlyAccount,\n type ReadonlyUint8Array,\n type TransactionSigner,\n type WritableAccount,\n type WritableSignerAccount,\n} from '@solana/kit';\nimport {\n GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_INSTRUCTION_DATA,\n GHOSTSPEAK_MARKETPLACE_ERROR__MISSING_REQUIRED_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INSTRUCTION_PARSING_FAILED,\n isGhostspeakMarketplaceError,\n} from '../errors';\nimport { GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS } from '../programs';\nimport { getAccountMetaFactory, type ResolvedAccount } from '../shared';\n\nexport const PLACE_AUCTION_BID_DISCRIMINATOR = new Uint8Array([\n 38, 170, 233, 87, 52, 65, 23, 128,\n]);\n\nexport function getPlaceAuctionBidDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 8).encode(\n PLACE_AUCTION_BID_DISCRIMINATOR\n );\n}\n\nexport type PlaceAuctionBidInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountAuction extends string | AccountMeta<string> = string,\n TAccountUserRegistry extends string | AccountMeta<string> = string,\n TAccountBidder extends string | AccountMeta<string> = string,\n TAccountSystemProgram extends\n | string\n | AccountMeta<string> = '11111111111111111111111111111111',\n TAccountClock extends\n | string\n | AccountMeta<string> = 'SysvarC1ock11111111111111111111111111111111',\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountAuction extends string\n ? WritableAccount<TAccountAuction>\n : TAccountAuction,\n TAccountUserRegistry extends string\n ? ReadonlyAccount<TAccountUserRegistry>\n : TAccountUserRegistry,\n TAccountBidder extends string\n ? WritableSignerAccount<TAccountBidder> &\n AccountSignerMeta<TAccountBidder>\n : TAccountBidder,\n TAccountSystemProgram extends string\n ? ReadonlyAccount<TAccountSystemProgram>\n : TAccountSystemProgram,\n TAccountClock extends string\n ? ReadonlyAccount<TAccountClock>\n : TAccountClock,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type PlaceAuctionBidInstructionData = {\n discriminator: ReadonlyUint8Array;\n bidAmount: bigint;\n};\n\nexport type PlaceAuctionBidInstructionDataArgs = { bidAmount: number | bigint };\n\nexport function getPlaceAuctionBidInstructionDataEncoder(): FixedSizeEncoder<PlaceAuctionBidInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n ['discriminator', fixEncoderSize(getBytesEncoder(), 8)],\n ['bidAmount', getU64Encoder()],\n ]),\n (value) => ({ ...value, discriminator: PLACE_AUCTION_BID_DISCRIMINATOR })\n );\n}\n\nexport function getPlaceAuctionBidInstructionDataDecoder(): FixedSizeDecoder<PlaceAuctionBidInstructionData> {\n return getStructDecoder([\n ['discriminator', fixDecoderSize(getBytesDecoder(), 8)],\n ['bidAmount', getU64Decoder()],\n ]);\n}\n\nexport function getPlaceAuctionBidInstructionDataCodec(): FixedSizeCodec<\n PlaceAuctionBidInstructionDataArgs,\n PlaceAuctionBidInstructionData\n> {\n return combineCodec(\n getPlaceAuctionBidInstructionDataEncoder(),\n getPlaceAuctionBidInstructionDataDecoder()\n );\n}\n\nexport type PlaceAuctionBidInput<\n TAccountAuction extends string = string,\n TAccountUserRegistry extends string = string,\n TAccountBidder extends string = string,\n TAccountSystemProgram extends string = string,\n TAccountClock extends string = string,\n> = {\n /** Auction account with canonical bump validation */\n auction: Address<TAccountAuction>;\n /** User registry for rate limiting */\n userRegistry: Address<TAccountUserRegistry>;\n /** Enhanced bidder verification */\n bidder: TransactionSigner<TAccountBidder>;\n /** System program */\n systemProgram?: Address<TAccountSystemProgram>;\n /** Clock sysvar for rate limiting */\n clock?: Address<TAccountClock>;\n bidAmount: PlaceAuctionBidInstructionDataArgs['bidAmount'];\n};\n\nexport function getPlaceAuctionBidInstruction<\n TAccountAuction extends string,\n TAccountUserRegistry extends string,\n TAccountBidder extends string,\n TAccountSystemProgram extends string,\n TAccountClock extends string,\n TProgramAddress extends\n Address = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: PlaceAuctionBidInput<\n TAccountAuction,\n TAccountUserRegistry,\n TAccountBidder,\n TAccountSystemProgram,\n TAccountClock\n >,\n config?: { programAddress?: TProgramAddress }\n): PlaceAuctionBidInstruction<\n TProgramAddress,\n TAccountAuction,\n TAccountUserRegistry,\n TAccountBidder,\n TAccountSystemProgram,\n TAccountClock\n> {\n // Program address.\n const programAddress =\n config?.programAddress ?? GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n auction: { value: input.auction ?? null, isWritable: true },\n userRegistry: { value: input.userRegistry ?? null, isWritable: false },\n bidder: { value: input.bidder ?? null, isWritable: true },\n systemProgram: { value: input.systemProgram ?? null, isWritable: false },\n clock: { value: input.clock ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolve default values.\n if (!accounts.systemProgram.value) {\n accounts.systemProgram.value =\n '11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>;\n }\n if (!accounts.clock.value) {\n accounts.clock.value =\n 'SysvarC1ock11111111111111111111111111111111' as Address<'SysvarC1ock11111111111111111111111111111111'>;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.auction),\n getAccountMeta(accounts.userRegistry),\n getAccountMeta(accounts.bidder),\n getAccountMeta(accounts.systemProgram),\n getAccountMeta(accounts.clock),\n ],\n programAddress,\n data: getPlaceAuctionBidInstructionDataEncoder().encode(\n args as PlaceAuctionBidInstructionDataArgs\n ),\n } as PlaceAuctionBidInstruction<\n TProgramAddress,\n TAccountAuction,\n TAccountUserRegistry,\n TAccountBidder,\n TAccountSystemProgram,\n TAccountClock\n >;\n\n return instruction;\n}\n\nexport type ParsedPlaceAuctionBidInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n /** Auction account with canonical bump validation */\n auction: TAccountMetas[0];\n /** User registry for rate limiting */\n userRegistry: TAccountMetas[1];\n /** Enhanced bidder verification */\n bidder: TAccountMetas[2];\n /** System program */\n systemProgram: TAccountMetas[3];\n /** Clock sysvar for rate limiting */\n clock: TAccountMetas[4];\n };\n data: PlaceAuctionBidInstructionData;\n};\n\nexport function parsePlaceAuctionBidInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>\n): ParsedPlaceAuctionBidInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 5) {\n throw new Error('[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts');\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = instruction.accounts![accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n auction: getNextAccount(),\n userRegistry: getNextAccount(),\n bidder: getNextAccount(),\n systemProgram: getNextAccount(),\n clock: getNextAccount(),\n },\n data: getPlaceAuctionBidInstructionDataDecoder().decode(instruction.data),\n };\n}\n","/**\n * This code was AUTOGENERATED using the codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n combineCodec,\n fixDecoderSize,\n fixEncoderSize,\n getBytesDecoder,\n getBytesEncoder,\n getStructDecoder,\n getStructEncoder,\n transformEncoder,\n type AccountMeta,\n type AccountSignerMeta,\n type Address,\n type FixedSizeCodec,\n type FixedSizeDecoder,\n type FixedSizeEncoder,\n type Instruction,\n type InstructionWithAccounts,\n type InstructionWithData,\n type ReadonlyAccount,\n type ReadonlyUint8Array,\n type TransactionSigner,\n type WritableAccount,\n type WritableSignerAccount,\n} from '@solana/kit';\nimport {\n GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_INSTRUCTION_DATA,\n GHOSTSPEAK_MARKETPLACE_ERROR__MISSING_REQUIRED_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INSTRUCTION_PARSING_FAILED,\n isGhostspeakMarketplaceError,\n} from '../errors';\nimport { GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS } from '../programs';\nimport { getAccountMetaFactory, type ResolvedAccount } from '../shared';\n\nexport const PLACE_DUTCH_AUCTION_BID_DISCRIMINATOR = new Uint8Array([\n 209, 244, 155, 47, 62, 54, 119, 34,\n]);\n\nexport function getPlaceDutchAuctionBidDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 8).encode(\n PLACE_DUTCH_AUCTION_BID_DISCRIMINATOR\n );\n}\n\nexport type PlaceDutchAuctionBidInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountAuction extends string | AccountMeta<string> = string,\n TAccountUserRegistry extends string | AccountMeta<string> = string,\n TAccountBidder extends string | AccountMeta<string> = string,\n TAccountSystemProgram extends\n | string\n | AccountMeta<string> = '11111111111111111111111111111111',\n TAccountClock extends\n | string\n | AccountMeta<string> = 'SysvarC1ock11111111111111111111111111111111',\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountAuction extends string\n ? WritableAccount<TAccountAuction>\n : TAccountAuction,\n TAccountUserRegistry extends string\n ? ReadonlyAccount<TAccountUserRegistry>\n : TAccountUserRegistry,\n TAccountBidder extends string\n ? WritableSignerAccount<TAccountBidder> &\n AccountSignerMeta<TAccountBidder>\n : TAccountBidder,\n TAccountSystemProgram extends string\n ? ReadonlyAccount<TAccountSystemProgram>\n : TAccountSystemProgram,\n TAccountClock extends string\n ? ReadonlyAccount<TAccountClock>\n : TAccountClock,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type PlaceDutchAuctionBidInstructionData = {\n discriminator: ReadonlyUint8Array;\n};\n\nexport type PlaceDutchAuctionBidInstructionDataArgs = {};\n\nexport function getPlaceDutchAuctionBidInstructionDataEncoder(): FixedSizeEncoder<PlaceDutchAuctionBidInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([['discriminator', fixEncoderSize(getBytesEncoder(), 8)]]),\n (value) => ({\n ...value,\n discriminator: PLACE_DUTCH_AUCTION_BID_DISCRIMINATOR,\n })\n );\n}\n\nexport function getPlaceDutchAuctionBidInstructionDataDecoder(): FixedSizeDecoder<PlaceDutchAuctionBidInstructionData> {\n return getStructDecoder([\n ['discriminator', fixDecoderSize(getBytesDecoder(), 8)],\n ]);\n}\n\nexport function getPlaceDutchAuctionBidInstructionDataCodec(): FixedSizeCodec<\n PlaceDutchAuctionBidInstructionDataArgs,\n PlaceDutchAuctionBidInstructionData\n> {\n return combineCodec(\n getPlaceDutchAuctionBidInstructionDataEncoder(),\n getPlaceDutchAuctionBidInstructionDataDecoder()\n );\n}\n\nexport type PlaceDutchAuctionBidInput<\n TAccountAuction extends string = string,\n TAccountUserRegistry extends string = string,\n TAccountBidder extends string = string,\n TAccountSystemProgram extends string = string,\n TAccountClock extends string = string,\n> = {\n /** Auction account with canonical bump validation */\n auction: Address<TAccountAuction>;\n /** User registry for rate limiting */\n userRegistry: Address<TAccountUserRegistry>;\n /** Enhanced bidder verification */\n bidder: TransactionSigner<TAccountBidder>;\n /** System program */\n systemProgram?: Address<TAccountSystemProgram>;\n /** Clock sysvar for price calculation */\n clock?: Address<TAccountClock>;\n};\n\nexport function getPlaceDutchAuctionBidInstruction<\n TAccountAuction extends string,\n TAccountUserRegistry extends string,\n TAccountBidder extends string,\n TAccountSystemProgram extends string,\n TAccountClock extends string,\n TProgramAddress extends\n Address = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: PlaceDutchAuctionBidInput<\n TAccountAuction,\n TAccountUserRegistry,\n TAccountBidder,\n TAccountSystemProgram,\n TAccountClock\n >,\n config?: { programAddress?: TProgramAddress }\n): PlaceDutchAuctionBidInstruction<\n TProgramAddress,\n TAccountAuction,\n TAccountUserRegistry,\n TAccountBidder,\n TAccountSystemProgram,\n TAccountClock\n> {\n // Program address.\n const programAddress =\n config?.programAddress ?? GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n auction: { value: input.auction ?? null, isWritable: true },\n userRegistry: { value: input.userRegistry ?? null, isWritable: false },\n bidder: { value: input.bidder ?? null, isWritable: true },\n systemProgram: { value: input.systemProgram ?? null, isWritable: false },\n clock: { value: input.clock ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Resolve default values.\n if (!accounts.systemProgram.value) {\n accounts.systemProgram.value =\n '11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>;\n }\n if (!accounts.clock.value) {\n accounts.clock.value =\n 'SysvarC1ock11111111111111111111111111111111' as Address<'SysvarC1ock11111111111111111111111111111111'>;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.auction),\n getAccountMeta(accounts.userRegistry),\n getAccountMeta(accounts.bidder),\n getAccountMeta(accounts.systemProgram),\n getAccountMeta(accounts.clock),\n ],\n programAddress,\n data: getPlaceDutchAuctionBidInstructionDataEncoder().encode({}),\n } as PlaceDutchAuctionBidInstruction<\n TProgramAddress,\n TAccountAuction,\n TAccountUserRegistry,\n TAccountBidder,\n TAccountSystemProgram,\n TAccountClock\n >;\n\n return instruction;\n}\n\nexport type ParsedPlaceDutchAuctionBidInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n /** Auction account with canonical bump validation */\n auction: TAccountMetas[0];\n /** User registry for rate limiting */\n userRegistry: TAccountMetas[1];\n /** Enhanced bidder verification */\n bidder: TAccountMetas[2];\n /** System program */\n systemProgram: TAccountMetas[3];\n /** Clock sysvar for price calculation */\n clock: TAccountMetas[4];\n };\n data: PlaceDutchAuctionBidInstructionData;\n};\n\nexport function parsePlaceDutchAuctionBidInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>\n): ParsedPlaceDutchAuctionBidInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 5) {\n throw new Error('[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts');\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = instruction.accounts![accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n auction: getNextAccount(),\n userRegistry: getNextAccount(),\n bidder: getNextAccount(),\n systemProgram: getNextAccount(),\n clock: getNextAccount(),\n },\n data: getPlaceDutchAuctionBidInstructionDataDecoder().decode(\n instruction.data\n ),\n };\n}\n","/**\n * This code was AUTOGENERATED using the codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n combineCodec,\n fixDecoderSize,\n fixEncoderSize,\n getAddressDecoder,\n getAddressEncoder,\n getBytesDecoder,\n getBytesEncoder,\n getProgramDerivedAddress,\n getStructDecoder,\n getStructEncoder,\n transformEncoder,\n type AccountMeta,\n type AccountSignerMeta,\n type Address,\n type FixedSizeCodec,\n type FixedSizeDecoder,\n type FixedSizeEncoder,\n type Instruction,\n type InstructionWithAccounts,\n type InstructionWithData,\n type ReadonlyAccount,\n type ReadonlyUint8Array,\n type TransactionSigner,\n type WritableAccount,\n type WritableSignerAccount,\n} from '@solana/kit';\nimport {\n GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_INSTRUCTION_DATA,\n GHOSTSPEAK_MARKETPLACE_ERROR__MISSING_REQUIRED_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INSTRUCTION_PARSING_FAILED,\n isGhostspeakMarketplaceError,\n} from '../errors';\nimport { GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS } from '../programs';\nimport {\n expectAddress,\n getAccountMetaFactory,\n type ResolvedAccount,\n} from '../shared';\n\nexport const PROCESS_ESCROW_PAYMENT_DISCRIMINATOR = new Uint8Array([\n 99, 206, 125, 26, 181, 158, 189, 238,\n]);\n\nexport function getProcessEscrowPaymentDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 8).encode(\n PROCESS_ESCROW_PAYMENT_DISCRIMINATOR\n );\n}\n\nexport type ProcessEscrowPaymentInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountPayment extends string | AccountMeta<string> = string,\n TAccountEscrow extends string | AccountMeta<string> = string,\n TAccountReentrancyGuard extends string | AccountMeta<string> = string,\n TAccountEscrowTokenAccount extends string | AccountMeta<string> = string,\n TAccountRecipientTokenAccount extends string | AccountMeta<string> = string,\n TAccountRecipient extends string | AccountMeta<string> = string,\n TAccountPaymentToken extends string | AccountMeta<string> = string,\n TAccountAuthority extends string | AccountMeta<string> = string,\n TAccountTokenProgram extends\n | string\n | AccountMeta<string> = 'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb',\n TAccountSystemProgram extends\n | string\n | AccountMeta<string> = '11111111111111111111111111111111',\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountPayment extends string\n ? WritableAccount<TAccountPayment>\n : TAccountPayment,\n TAccountEscrow extends string\n ? WritableAccount<TAccountEscrow>\n : TAccountEscrow,\n TAccountReentrancyGuard extends string\n ? WritableAccount<TAccountReentrancyGuard>\n : TAccountReentrancyGuard,\n TAccountEscrowTokenAccount extends string\n ? WritableAccount<TAccountEscrowTokenAccount>\n : TAccountEscrowTokenAccount,\n TAccountRecipientTokenAccount extends string\n ? WritableAccount<TAccountRecipientTokenAccount>\n : TAccountRecipientTokenAccount,\n TAccountRecipient extends string\n ? ReadonlyAccount<TAccountRecipient>\n : TAccountRecipient,\n TAccountPaymentToken extends string\n ? ReadonlyAccount<TAccountPaymentToken>\n : TAccountPaymentToken,\n TAccountAuthority extends string\n ? WritableSignerAccount<TAccountAuthority> &\n AccountSignerMeta<TAccountAuthority>\n : TAccountAuthority,\n TAccountTokenProgram extends string\n ? ReadonlyAccount<TAccountTokenProgram>\n : TAccountTokenProgram,\n TAccountSystemProgram extends string\n ? ReadonlyAccount<TAccountSystemProgram>\n : TAccountSystemProgram,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type ProcessEscrowPaymentInstructionData = {\n discriminator: ReadonlyUint8Array;\n workOrder: Address;\n};\n\nexport type ProcessEscrowPaymentInstructionDataArgs = { workOrder: Address };\n\nexport function getProcessEscrowPaymentInstructionDataEncoder(): FixedSizeEncoder<ProcessEscrowPaymentInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n ['discriminator', fixEncoderSize(getBytesEncoder(), 8)],\n ['workOrder', getAddressEncoder()],\n ]),\n (value) => ({\n ...value,\n discriminator: PROCESS_ESCROW_PAYMENT_DISCRIMINATOR,\n })\n );\n}\n\nexport function getProcessEscrowPaymentInstructionDataDecoder(): FixedSizeDecoder<ProcessEscrowPaymentInstructionData> {\n return getStructDecoder([\n ['discriminator', fixDecoderSize(getBytesDecoder(), 8)],\n ['workOrder', getAddressDecoder()],\n ]);\n}\n\nexport function getProcessEscrowPaymentInstructionDataCodec(): FixedSizeCodec<\n ProcessEscrowPaymentInstructionDataArgs,\n ProcessEscrowPaymentInstructionData\n> {\n return combineCodec(\n getProcessEscrowPaymentInstructionDataEncoder(),\n getProcessEscrowPaymentInstructionDataDecoder()\n );\n}\n\nexport type ProcessEscrowPaymentAsyncInput<\n TAccountPayment extends string = string,\n TAccountEscrow extends string = string,\n TAccountReentrancyGuard extends string = string,\n TAccountEscrowTokenAccount extends string = string,\n TAccountRecipientTokenAccount extends string = string,\n TAccountRecipient extends string = string,\n TAccountPaymentToken extends string = string,\n TAccountAuthority extends string = string,\n TAccountTokenProgram extends string = string,\n TAccountSystemProgram extends string = string,\n> = {\n payment?: Address<TAccountPayment>;\n escrow: Address<TAccountEscrow>;\n reentrancyGuard?: Address<TAccountReentrancyGuard>;\n escrowTokenAccount?: Address<TAccountEscrowTokenAccount>;\n recipientTokenAccount?: Address<TAccountRecipientTokenAccount>;\n recipient: Address<TAccountRecipient>;\n paymentToken: Address<TAccountPaymentToken>;\n authority: TransactionSigner<TAccountAuthority>;\n tokenProgram?: Address<TAccountTokenProgram>;\n systemProgram?: Address<TAccountSystemProgram>;\n workOrder: ProcessEscrowPaymentInstructionDataArgs['workOrder'];\n};\n\nexport async function getProcessEscrowPaymentInstructionAsync<\n TAccountPayment extends string,\n TAccountEscrow extends string,\n TAccountReentrancyGuard extends string,\n TAccountEscrowTokenAccount extends string,\n TAccountRecipientTokenAccount extends string,\n TAccountRecipient extends string,\n TAccountPaymentToken extends string,\n TAccountAuthority extends string,\n TAccountTokenProgram extends string,\n TAccountSystemProgram extends string,\n TProgramAddress extends\n Address = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: ProcessEscrowPaymentAsyncInput<\n TAccountPayment,\n TAccountEscrow,\n TAccountReentrancyGuard,\n TAccountEscrowTokenAccount,\n TAccountRecipientTokenAccount,\n TAccountRecipient,\n TAccountPaymentToken,\n TAccountAuthority,\n TAccountTokenProgram,\n TAccountSystemProgram\n >,\n config?: { programAddress?: TProgramAddress }\n): Promise<\n ProcessEscrowPaymentInstruction<\n TProgramAddress,\n TAccountPayment,\n TAccountEscrow,\n TAccountReentrancyGuard,\n TAccountEscrowTokenAccount,\n TAccountRecipientTokenAccount,\n TAccountRecipient,\n TAccountPaymentToken,\n TAccountAuthority,\n TAccountTokenProgram,\n TAccountSystemProgram\n >\n> {\n // Program address.\n const programAddress =\n config?.programAddress ?? GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n payment: { value: input.payment ?? null, isWritable: true },\n escrow: { value: input.escrow ?? null, isWritable: true },\n reentrancyGuard: { value: input.reentrancyGuard ?? null, isWritable: true },\n escrowTokenAccount: {\n value: input.escrowTokenAccount ?? null,\n isWritable: true,\n },\n recipientTokenAccount: {\n value: input.recipientTokenAccount ?? null,\n isWritable: true,\n },\n recipient: { value: input.recipient ?? null, isWritable: false },\n paymentToken: { value: input.paymentToken ?? null, isWritable: false },\n authority: { value: input.authority ?? null, isWritable: true },\n tokenProgram: { value: input.tokenProgram ?? null, isWritable: false },\n systemProgram: { value: input.systemProgram ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolve default values.\n if (!accounts.payment.value) {\n accounts.payment.value = await getProgramDerivedAddress({\n programAddress,\n seeds: [\n getBytesEncoder().encode(\n new Uint8Array([112, 97, 121, 109, 101, 110, 116])\n ),\n getAddressEncoder().encode(expectAddress(accounts.escrow.value)),\n ],\n });\n }\n if (!accounts.reentrancyGuard.value) {\n accounts.reentrancyGuard.value = await getProgramDerivedAddress({\n programAddress,\n seeds: [\n getBytesEncoder().encode(\n new Uint8Array([\n 114, 101, 101, 110, 116, 114, 97, 110, 99, 121, 95, 103, 117, 97,\n 114, 100,\n ])\n ),\n ],\n });\n }\n if (!accounts.escrowTokenAccount.value) {\n accounts.escrowTokenAccount.value = await getProgramDerivedAddress({\n programAddress:\n 'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL' as Address<'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL'>,\n seeds: [\n getAddressEncoder().encode(expectAddress(accounts.escrow.value)),\n getBytesEncoder().encode(\n new Uint8Array([\n 6, 221, 246, 225, 215, 101, 161, 147, 217, 203, 225, 70, 206, 235,\n 121, 172, 28, 180, 133, 237, 95, 91, 55, 145, 58, 140, 245, 133,\n 126, 255, 0, 169,\n ])\n ),\n getAddressEncoder().encode(expectAddress(accounts.paymentToken.value)),\n ],\n });\n }\n if (!accounts.recipientTokenAccount.value) {\n accounts.recipientTokenAccount.value = await getProgramDerivedAddress({\n programAddress:\n 'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL' as Address<'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL'>,\n seeds: [\n getAddressEncoder().encode(expectAddress(accounts.recipient.value)),\n getBytesEncoder().encode(\n new Uint8Array([\n 6, 221, 246, 225, 215, 101, 161, 147, 217, 203, 225, 70, 206, 235,\n 121, 172, 28, 180, 133, 237, 95, 91, 55, 145, 58, 140, 245, 133,\n 126, 255, 0, 169,\n ])\n ),\n getAddressEncoder().encode(expectAddress(accounts.paymentToken.value)),\n ],\n });\n }\n if (!accounts.tokenProgram.value) {\n accounts.tokenProgram.value =\n 'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb' as Address<'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb'>;\n }\n if (!accounts.systemProgram.value) {\n accounts.systemProgram.value =\n '11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.payment),\n getAccountMeta(accounts.escrow),\n getAccountMeta(accounts.reentrancyGuard),\n getAccountMeta(accounts.escrowTokenAccount),\n getAccountMeta(accounts.recipientTokenAccount),\n getAccountMeta(accounts.recipient),\n getAccountMeta(accounts.paymentToken),\n getAccountMeta(accounts.authority),\n getAccountMeta(accounts.tokenProgram),\n getAccountMeta(accounts.systemProgram),\n ],\n programAddress,\n data: getProcessEscrowPaymentInstructionDataEncoder().encode(\n args as ProcessEscrowPaymentInstructionDataArgs\n ),\n } as ProcessEscrowPaymentInstruction<\n TProgramAddress,\n TAccountPayment,\n TAccountEscrow,\n TAccountReentrancyGuard,\n TAccountEscrowTokenAccount,\n TAccountRecipientTokenAccount,\n TAccountRecipient,\n TAccountPaymentToken,\n TAccountAuthority,\n TAccountTokenProgram,\n TAccountSystemProgram\n >;\n\n return instruction;\n}\n\nexport type ProcessEscrowPaymentInput<\n TAccountPayment extends string = string,\n TAccountEscrow extends string = string,\n TAccountReentrancyGuard extends string = string,\n TAccountEscrowTokenAccount extends string = string,\n TAccountRecipientTokenAccount extends string = string,\n TAccountRecipient extends string = string,\n TAccountPaymentToken extends string = string,\n TAccountAuthority extends string = string,\n TAccountTokenProgram extends string = string,\n TAccountSystemProgram extends string = string,\n> = {\n payment: Address<TAccountPayment>;\n escrow: Address<TAccountEscrow>;\n reentrancyGuard: Address<TAccountReentrancyGuard>;\n escrowTokenAccount: Address<TAccountEscrowTokenAccount>;\n recipientTokenAccount: Address<TAccountRecipientTokenAccount>;\n recipient: Address<TAccountRecipient>;\n paymentToken: Address<TAccountPaymentToken>;\n authority: TransactionSigner<TAccountAuthority>;\n tokenProgram?: Address<TAccountTokenProgram>;\n systemProgram?: Address<TAccountSystemProgram>;\n workOrder: ProcessEscrowPaymentInstructionDataArgs['workOrder'];\n};\n\nexport function getProcessEscrowPaymentInstruction<\n TAccountPayment extends string,\n TAccountEscrow extends string,\n TAccountReentrancyGuard extends string,\n TAccountEscrowTokenAccount extends string,\n TAccountRecipientTokenAccount extends string,\n TAccountRecipient extends string,\n TAccountPaymentToken extends string,\n TAccountAuthority extends string,\n TAccountTokenProgram extends string,\n TAccountSystemProgram extends string,\n TProgramAddress extends\n Address = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: ProcessEscrowPaymentInput<\n TAccountPayment,\n TAccountEscrow,\n TAccountReentrancyGuard,\n TAccountEscrowTokenAccount,\n TAccountRecipientTokenAccount,\n TAccountRecipient,\n TAccountPaymentToken,\n TAccountAuthority,\n TAccountTokenProgram,\n TAccountSystemProgram\n >,\n config?: { programAddress?: TProgramAddress }\n): ProcessEscrowPaymentInstruction<\n TProgramAddress,\n TAccountPayment,\n TAccountEscrow,\n TAccountReentrancyGuard,\n TAccountEscrowTokenAccount,\n TAccountRecipientTokenAccount,\n TAccountRecipient,\n TAccountPaymentToken,\n TAccountAuthority,\n TAccountTokenProgram,\n TAccountSystemProgram\n> {\n // Program address.\n const programAddress =\n config?.programAddress ?? GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n payment: { value: input.payment ?? null, isWritable: true },\n escrow: { value: input.escrow ?? null, isWritable: true },\n reentrancyGuard: { value: input.reentrancyGuard ?? null, isWritable: true },\n escrowTokenAccount: {\n value: input.escrowTokenAccount ?? null,\n isWritable: true,\n },\n recipientTokenAccount: {\n value: input.recipientTokenAccount ?? null,\n isWritable: true,\n },\n recipient: { value: input.recipient ?? null, isWritable: false },\n paymentToken: { value: input.paymentToken ?? null, isWritable: false },\n authority: { value: input.authority ?? null, isWritable: true },\n tokenProgram: { value: input.tokenProgram ?? null, isWritable: false },\n systemProgram: { value: input.systemProgram ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolve default values.\n if (!accounts.tokenProgram.value) {\n accounts.tokenProgram.value =\n 'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb' as Address<'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb'>;\n }\n if (!accounts.systemProgram.value) {\n accounts.systemProgram.value =\n '11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.payment),\n getAccountMeta(accounts.escrow),\n getAccountMeta(accounts.reentrancyGuard),\n getAccountMeta(accounts.escrowTokenAccount),\n getAccountMeta(accounts.recipientTokenAccount),\n getAccountMeta(accounts.recipient),\n getAccountMeta(accounts.paymentToken),\n getAccountMeta(accounts.authority),\n getAccountMeta(accounts.tokenProgram),\n getAccountMeta(accounts.systemProgram),\n ],\n programAddress,\n data: getProcessEscrowPaymentInstructionDataEncoder().encode(\n args as ProcessEscrowPaymentInstructionDataArgs\n ),\n } as ProcessEscrowPaymentInstruction<\n TProgramAddress,\n TAccountPayment,\n TAccountEscrow,\n TAccountReentrancyGuard,\n TAccountEscrowTokenAccount,\n TAccountRecipientTokenAccount,\n TAccountRecipient,\n TAccountPaymentToken,\n TAccountAuthority,\n TAccountTokenProgram,\n TAccountSystemProgram\n >;\n\n return instruction;\n}\n\nexport type ParsedProcessEscrowPaymentInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n payment: TAccountMetas[0];\n escrow: TAccountMetas[1];\n reentrancyGuard: TAccountMetas[2];\n escrowTokenAccount: TAccountMetas[3];\n recipientTokenAccount: TAccountMetas[4];\n recipient: TAccountMetas[5];\n paymentToken: TAccountMetas[6];\n authority: TAccountMetas[7];\n tokenProgram: TAccountMetas[8];\n systemProgram: TAccountMetas[9];\n };\n data: ProcessEscrowPaymentInstructionData;\n};\n\nexport function parseProcessEscrowPaymentInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>\n): ParsedProcessEscrowPaymentInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 10) {\n throw new Error('[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts');\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = instruction.accounts![accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n payment: getNextAccount(),\n escrow: getNextAccount(),\n reentrancyGuard: getNextAccount(),\n escrowTokenAccount: getNextAccount(),\n recipientTokenAccount: getNextAccount(),\n recipient: getNextAccount(),\n paymentToken: getNextAccount(),\n authority: getNextAccount(),\n tokenProgram: getNextAccount(),\n systemProgram: getNextAccount(),\n },\n data: getProcessEscrowPaymentInstructionDataDecoder().decode(\n instruction.data\n ),\n };\n}\n","/**\n * This code was AUTOGENERATED using the codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n combineCodec,\n fixDecoderSize,\n fixEncoderSize,\n getBytesDecoder,\n getBytesEncoder,\n getProgramDerivedAddress,\n getStructDecoder,\n getStructEncoder,\n getU8Decoder,\n getU8Encoder,\n transformEncoder,\n type AccountMeta,\n type AccountSignerMeta,\n type Address,\n type FixedSizeCodec,\n type FixedSizeDecoder,\n type FixedSizeEncoder,\n type Instruction,\n type InstructionWithAccounts,\n type InstructionWithData,\n type ReadonlyAccount,\n type ReadonlySignerAccount,\n type ReadonlyUint8Array,\n type TransactionSigner,\n type WritableAccount,\n} from '@solana/kit';\nimport {\n GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_INSTRUCTION_DATA,\n GHOSTSPEAK_MARKETPLACE_ERROR__MISSING_REQUIRED_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INSTRUCTION_PARSING_FAILED,\n isGhostspeakMarketplaceError,\n} from '../errors';\nimport { GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS } from '../programs';\nimport { getAccountMetaFactory, type ResolvedAccount } from '../shared';\n\nexport const PROCESS_PARTIAL_REFUND_DISCRIMINATOR = new Uint8Array([\n 91, 2, 45, 239, 179, 132, 197, 213,\n]);\n\nexport function getProcessPartialRefundDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 8).encode(\n PROCESS_PARTIAL_REFUND_DISCRIMINATOR\n );\n}\n\nexport type ProcessPartialRefundInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountEscrow extends string | AccountMeta<string> = string,\n TAccountReentrancyGuard extends string | AccountMeta<string> = string,\n TAccountEscrowTokenAccount extends string | AccountMeta<string> = string,\n TAccountClientRefundAccount extends string | AccountMeta<string> = string,\n TAccountAgentPaymentAccount extends string | AccountMeta<string> = string,\n TAccountPaymentToken extends string | AccountMeta<string> = string,\n TAccountAuthority extends string | AccountMeta<string> = string,\n TAccountTokenProgram extends\n | string\n | AccountMeta<string> = 'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb',\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountEscrow extends string\n ? WritableAccount<TAccountEscrow>\n : TAccountEscrow,\n TAccountReentrancyGuard extends string\n ? WritableAccount<TAccountReentrancyGuard>\n : TAccountReentrancyGuard,\n TAccountEscrowTokenAccount extends string\n ? WritableAccount<TAccountEscrowTokenAccount>\n : TAccountEscrowTokenAccount,\n TAccountClientRefundAccount extends string\n ? WritableAccount<TAccountClientRefundAccount>\n : TAccountClientRefundAccount,\n TAccountAgentPaymentAccount extends string\n ? WritableAccount<TAccountAgentPaymentAccount>\n : TAccountAgentPaymentAccount,\n TAccountPaymentToken extends string\n ? ReadonlyAccount<TAccountPaymentToken>\n : TAccountPaymentToken,\n TAccountAuthority extends string\n ? ReadonlySignerAccount<TAccountAuthority> &\n AccountSignerMeta<TAccountAuthority>\n : TAccountAuthority,\n TAccountTokenProgram extends string\n ? ReadonlyAccount<TAccountTokenProgram>\n : TAccountTokenProgram,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type ProcessPartialRefundInstructionData = {\n discriminator: ReadonlyUint8Array;\n clientRefundPercentage: number;\n};\n\nexport type ProcessPartialRefundInstructionDataArgs = {\n clientRefundPercentage: number;\n};\n\nexport function getProcessPartialRefundInstructionDataEncoder(): FixedSizeEncoder<ProcessPartialRefundInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n ['discriminator', fixEncoderSize(getBytesEncoder(), 8)],\n ['clientRefundPercentage', getU8Encoder()],\n ]),\n (value) => ({\n ...value,\n discriminator: PROCESS_PARTIAL_REFUND_DISCRIMINATOR,\n })\n );\n}\n\nexport function getProcessPartialRefundInstructionDataDecoder(): FixedSizeDecoder<ProcessPartialRefundInstructionData> {\n return getStructDecoder([\n ['discriminator', fixDecoderSize(getBytesDecoder(), 8)],\n ['clientRefundPercentage', getU8Decoder()],\n ]);\n}\n\nexport function getProcessPartialRefundInstructionDataCodec(): FixedSizeCodec<\n ProcessPartialRefundInstructionDataArgs,\n ProcessPartialRefundInstructionData\n> {\n return combineCodec(\n getProcessPartialRefundInstructionDataEncoder(),\n getProcessPartialRefundInstructionDataDecoder()\n );\n}\n\nexport type ProcessPartialRefundAsyncInput<\n TAccountEscrow extends string = string,\n TAccountReentrancyGuard extends string = string,\n TAccountEscrowTokenAccount extends string = string,\n TAccountClientRefundAccount extends string = string,\n TAccountAgentPaymentAccount extends string = string,\n TAccountPaymentToken extends string = string,\n TAccountAuthority extends string = string,\n TAccountTokenProgram extends string = string,\n> = {\n escrow: Address<TAccountEscrow>;\n reentrancyGuard?: Address<TAccountReentrancyGuard>;\n escrowTokenAccount: Address<TAccountEscrowTokenAccount>;\n clientRefundAccount: Address<TAccountClientRefundAccount>;\n agentPaymentAccount: Address<TAccountAgentPaymentAccount>;\n /** The token mint used for payments */\n paymentToken: Address<TAccountPaymentToken>;\n /** Authority to approve partial refunds (dispute resolver/admin) */\n authority: TransactionSigner<TAccountAuthority>;\n tokenProgram?: Address<TAccountTokenProgram>;\n clientRefundPercentage: ProcessPartialRefundInstructionDataArgs['clientRefundPercentage'];\n};\n\nexport async function getProcessPartialRefundInstructionAsync<\n TAccountEscrow extends string,\n TAccountReentrancyGuard extends string,\n TAccountEscrowTokenAccount extends string,\n TAccountClientRefundAccount extends string,\n TAccountAgentPaymentAccount extends string,\n TAccountPaymentToken extends string,\n TAccountAuthority extends string,\n TAccountTokenProgram extends string,\n TProgramAddress extends\n Address = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: ProcessPartialRefundAsyncInput<\n TAccountEscrow,\n TAccountReentrancyGuard,\n TAccountEscrowTokenAccount,\n TAccountClientRefundAccount,\n TAccountAgentPaymentAccount,\n TAccountPaymentToken,\n TAccountAuthority,\n TAccountTokenProgram\n >,\n config?: { programAddress?: TProgramAddress }\n): Promise<\n ProcessPartialRefundInstruction<\n TProgramAddress,\n TAccountEscrow,\n TAccountReentrancyGuard,\n TAccountEscrowTokenAccount,\n TAccountClientRefundAccount,\n TAccountAgentPaymentAccount,\n TAccountPaymentToken,\n TAccountAuthority,\n TAccountTokenProgram\n >\n> {\n // Program address.\n const programAddress =\n config?.programAddress ?? GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n escrow: { value: input.escrow ?? null, isWritable: true },\n reentrancyGuard: { value: input.reentrancyGuard ?? null, isWritable: true },\n escrowTokenAccount: {\n value: input.escrowTokenAccount ?? null,\n isWritable: true,\n },\n clientRefundAccount: {\n value: input.clientRefundAccount ?? null,\n isWritable: true,\n },\n agentPaymentAccount: {\n value: input.agentPaymentAccount ?? null,\n isWritable: true,\n },\n paymentToken: { value: input.paymentToken ?? null, isWritable: false },\n authority: { value: input.authority ?? null, isWritable: false },\n tokenProgram: { value: input.tokenProgram ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolve default values.\n if (!accounts.reentrancyGuard.value) {\n accounts.reentrancyGuard.value = await getProgramDerivedAddress({\n programAddress,\n seeds: [\n getBytesEncoder().encode(\n new Uint8Array([\n 114, 101, 101, 110, 116, 114, 97, 110, 99, 121, 95, 103, 117, 97,\n 114, 100,\n ])\n ),\n ],\n });\n }\n if (!accounts.tokenProgram.value) {\n accounts.tokenProgram.value =\n 'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb' as Address<'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb'>;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.escrow),\n getAccountMeta(accounts.reentrancyGuard),\n getAccountMeta(accounts.escrowTokenAccount),\n getAccountMeta(accounts.clientRefundAccount),\n getAccountMeta(accounts.agentPaymentAccount),\n getAccountMeta(accounts.paymentToken),\n getAccountMeta(accounts.authority),\n getAccountMeta(accounts.tokenProgram),\n ],\n programAddress,\n data: getProcessPartialRefundInstructionDataEncoder().encode(\n args as ProcessPartialRefundInstructionDataArgs\n ),\n } as ProcessPartialRefundInstruction<\n TProgramAddress,\n TAccountEscrow,\n TAccountReentrancyGuard,\n TAccountEscrowTokenAccount,\n TAccountClientRefundAccount,\n TAccountAgentPaymentAccount,\n TAccountPaymentToken,\n TAccountAuthority,\n TAccountTokenProgram\n >;\n\n return instruction;\n}\n\nexport type ProcessPartialRefundInput<\n TAccountEscrow extends string = string,\n TAccountReentrancyGuard extends string = string,\n TAccountEscrowTokenAccount extends string = string,\n TAccountClientRefundAccount extends string = string,\n TAccountAgentPaymentAccount extends string = string,\n TAccountPaymentToken extends string = string,\n TAccountAuthority extends string = string,\n TAccountTokenProgram extends string = string,\n> = {\n escrow: Address<TAccountEscrow>;\n reentrancyGuard: Address<TAccountReentrancyGuard>;\n escrowTokenAccount: Address<TAccountEscrowTokenAccount>;\n clientRefundAccount: Address<TAccountClientRefundAccount>;\n agentPaymentAccount: Address<TAccountAgentPaymentAccount>;\n /** The token mint used for payments */\n paymentToken: Address<TAccountPaymentToken>;\n /** Authority to approve partial refunds (dispute resolver/admin) */\n authority: TransactionSigner<TAccountAuthority>;\n tokenProgram?: Address<TAccountTokenProgram>;\n clientRefundPercentage: ProcessPartialRefundInstructionDataArgs['clientRefundPercentage'];\n};\n\nexport function getProcessPartialRefundInstruction<\n TAccountEscrow extends string,\n TAccountReentrancyGuard extends string,\n TAccountEscrowTokenAccount extends string,\n TAccountClientRefundAccount extends string,\n TAccountAgentPaymentAccount extends string,\n TAccountPaymentToken extends string,\n TAccountAuthority extends string,\n TAccountTokenProgram extends string,\n TProgramAddress extends\n Address = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: ProcessPartialRefundInput<\n TAccountEscrow,\n TAccountReentrancyGuard,\n TAccountEscrowTokenAccount,\n TAccountClientRefundAccount,\n TAccountAgentPaymentAccount,\n TAccountPaymentToken,\n TAccountAuthority,\n TAccountTokenProgram\n >,\n config?: { programAddress?: TProgramAddress }\n): ProcessPartialRefundInstruction<\n TProgramAddress,\n TAccountEscrow,\n TAccountReentrancyGuard,\n TAccountEscrowTokenAccount,\n TAccountClientRefundAccount,\n TAccountAgentPaymentAccount,\n TAccountPaymentToken,\n TAccountAuthority,\n TAccountTokenProgram\n> {\n // Program address.\n const programAddress =\n config?.programAddress ?? GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n escrow: { value: input.escrow ?? null, isWritable: true },\n reentrancyGuard: { value: input.reentrancyGuard ?? null, isWritable: true },\n escrowTokenAccount: {\n value: input.escrowTokenAccount ?? null,\n isWritable: true,\n },\n clientRefundAccount: {\n value: input.clientRefundAccount ?? null,\n isWritable: true,\n },\n agentPaymentAccount: {\n value: input.agentPaymentAccount ?? null,\n isWritable: true,\n },\n paymentToken: { value: input.paymentToken ?? null, isWritable: false },\n authority: { value: input.authority ?? null, isWritable: false },\n tokenProgram: { value: input.tokenProgram ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolve default values.\n if (!accounts.tokenProgram.value) {\n accounts.tokenProgram.value =\n 'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb' as Address<'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb'>;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.escrow),\n getAccountMeta(accounts.reentrancyGuard),\n getAccountMeta(accounts.escrowTokenAccount),\n getAccountMeta(accounts.clientRefundAccount),\n getAccountMeta(accounts.agentPaymentAccount),\n getAccountMeta(accounts.paymentToken),\n getAccountMeta(accounts.authority),\n getAccountMeta(accounts.tokenProgram),\n ],\n programAddress,\n data: getProcessPartialRefundInstructionDataEncoder().encode(\n args as ProcessPartialRefundInstructionDataArgs\n ),\n } as ProcessPartialRefundInstruction<\n TProgramAddress,\n TAccountEscrow,\n TAccountReentrancyGuard,\n TAccountEscrowTokenAccount,\n TAccountClientRefundAccount,\n TAccountAgentPaymentAccount,\n TAccountPaymentToken,\n TAccountAuthority,\n TAccountTokenProgram\n >;\n\n return instruction;\n}\n\nexport type ParsedProcessPartialRefundInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n escrow: TAccountMetas[0];\n reentrancyGuard: TAccountMetas[1];\n escrowTokenAccount: TAccountMetas[2];\n clientRefundAccount: TAccountMetas[3];\n agentPaymentAccount: TAccountMetas[4];\n /** The token mint used for payments */\n paymentToken: TAccountMetas[5];\n /** Authority to approve partial refunds (dispute resolver/admin) */\n authority: TAccountMetas[6];\n tokenProgram: TAccountMetas[7];\n };\n data: ProcessPartialRefundInstructionData;\n};\n\nexport function parseProcessPartialRefundInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>\n): ParsedProcessPartialRefundInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 8) {\n throw new Error('[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts');\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = instruction.accounts![accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n escrow: getNextAccount(),\n reentrancyGuard: getNextAccount(),\n escrowTokenAccount: getNextAccount(),\n clientRefundAccount: getNextAccount(),\n agentPaymentAccount: getNextAccount(),\n paymentToken: getNextAccount(),\n authority: getNextAccount(),\n tokenProgram: getNextAccount(),\n },\n data: getProcessPartialRefundInstructionDataDecoder().decode(\n instruction.data\n ),\n };\n}\n","/**\n * This code was AUTOGENERATED using the codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n combineCodec,\n fixDecoderSize,\n fixEncoderSize,\n getAddressEncoder,\n getBooleanDecoder,\n getBooleanEncoder,\n getBytesDecoder,\n getBytesEncoder,\n getProgramDerivedAddress,\n getStructDecoder,\n getStructEncoder,\n getU64Decoder,\n getU64Encoder,\n transformEncoder,\n type AccountMeta,\n type AccountSignerMeta,\n type Address,\n type FixedSizeCodec,\n type FixedSizeDecoder,\n type FixedSizeEncoder,\n type Instruction,\n type InstructionWithAccounts,\n type InstructionWithData,\n type ReadonlyAccount,\n type ReadonlyUint8Array,\n type TransactionSigner,\n type WritableAccount,\n type WritableSignerAccount,\n} from '@solana/kit';\nimport {\n GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_INSTRUCTION_DATA,\n GHOSTSPEAK_MARKETPLACE_ERROR__MISSING_REQUIRED_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INSTRUCTION_PARSING_FAILED,\n isGhostspeakMarketplaceError,\n} from '../errors';\nimport { GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS } from '../programs';\nimport {\n expectAddress,\n getAccountMetaFactory,\n type ResolvedAccount,\n} from '../shared';\n\nexport const PROCESS_PAYMENT_DISCRIMINATOR = new Uint8Array([\n 189, 81, 30, 198, 139, 186, 115, 23,\n]);\n\nexport function getProcessPaymentDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 8).encode(\n PROCESS_PAYMENT_DISCRIMINATOR\n );\n}\n\nexport type ProcessPaymentInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountPayment extends string | AccountMeta<string> = string,\n TAccountWorkOrder extends string | AccountMeta<string> = string,\n TAccountProviderAgent extends string | AccountMeta<string> = string,\n TAccountPayer extends string | AccountMeta<string> = string,\n TAccountPayerTokenAccount extends string | AccountMeta<string> = string,\n TAccountProviderTokenAccount extends string | AccountMeta<string> = string,\n TAccountTokenMint extends string | AccountMeta<string> = string,\n TAccountTokenProgram extends\n | string\n | AccountMeta<string> = 'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb',\n TAccountSystemProgram extends\n | string\n | AccountMeta<string> = '11111111111111111111111111111111',\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountPayment extends string\n ? WritableAccount<TAccountPayment>\n : TAccountPayment,\n TAccountWorkOrder extends string\n ? WritableAccount<TAccountWorkOrder>\n : TAccountWorkOrder,\n TAccountProviderAgent extends string\n ? WritableAccount<TAccountProviderAgent>\n : TAccountProviderAgent,\n TAccountPayer extends string\n ? WritableSignerAccount<TAccountPayer> &\n AccountSignerMeta<TAccountPayer>\n : TAccountPayer,\n TAccountPayerTokenAccount extends string\n ? WritableAccount<TAccountPayerTokenAccount>\n : TAccountPayerTokenAccount,\n TAccountProviderTokenAccount extends string\n ? WritableAccount<TAccountProviderTokenAccount>\n : TAccountProviderTokenAccount,\n TAccountTokenMint extends string\n ? ReadonlyAccount<TAccountTokenMint>\n : TAccountTokenMint,\n TAccountTokenProgram extends string\n ? ReadonlyAccount<TAccountTokenProgram>\n : TAccountTokenProgram,\n TAccountSystemProgram extends string\n ? ReadonlyAccount<TAccountSystemProgram>\n : TAccountSystemProgram,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type ProcessPaymentInstructionData = {\n discriminator: ReadonlyUint8Array;\n amount: bigint;\n useConfidentialTransfer: boolean;\n};\n\nexport type ProcessPaymentInstructionDataArgs = {\n amount: number | bigint;\n useConfidentialTransfer: boolean;\n};\n\nexport function getProcessPaymentInstructionDataEncoder(): FixedSizeEncoder<ProcessPaymentInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n ['discriminator', fixEncoderSize(getBytesEncoder(), 8)],\n ['amount', getU64Encoder()],\n ['useConfidentialTransfer', getBooleanEncoder()],\n ]),\n (value) => ({ ...value, discriminator: PROCESS_PAYMENT_DISCRIMINATOR })\n );\n}\n\nexport function getProcessPaymentInstructionDataDecoder(): FixedSizeDecoder<ProcessPaymentInstructionData> {\n return getStructDecoder([\n ['discriminator', fixDecoderSize(getBytesDecoder(), 8)],\n ['amount', getU64Decoder()],\n ['useConfidentialTransfer', getBooleanDecoder()],\n ]);\n}\n\nexport function getProcessPaymentInstructionDataCodec(): FixedSizeCodec<\n ProcessPaymentInstructionDataArgs,\n ProcessPaymentInstructionData\n> {\n return combineCodec(\n getProcessPaymentInstructionDataEncoder(),\n getProcessPaymentInstructionDataDecoder()\n );\n}\n\nexport type ProcessPaymentAsyncInput<\n TAccountPayment extends string = string,\n TAccountWorkOrder extends string = string,\n TAccountProviderAgent extends string = string,\n TAccountPayer extends string = string,\n TAccountPayerTokenAccount extends string = string,\n TAccountProviderTokenAccount extends string = string,\n TAccountTokenMint extends string = string,\n TAccountTokenProgram extends string = string,\n TAccountSystemProgram extends string = string,\n> = {\n payment?: Address<TAccountPayment>;\n workOrder: Address<TAccountWorkOrder>;\n providerAgent: Address<TAccountProviderAgent>;\n payer: TransactionSigner<TAccountPayer>;\n payerTokenAccount: Address<TAccountPayerTokenAccount>;\n providerTokenAccount: Address<TAccountProviderTokenAccount>;\n tokenMint: Address<TAccountTokenMint>;\n tokenProgram?: Address<TAccountTokenProgram>;\n systemProgram?: Address<TAccountSystemProgram>;\n amount: ProcessPaymentInstructionDataArgs['amount'];\n useConfidentialTransfer: ProcessPaymentInstructionDataArgs['useConfidentialTransfer'];\n};\n\nexport async function getProcessPaymentInstructionAsync<\n TAccountPayment extends string,\n TAccountWorkOrder extends string,\n TAccountProviderAgent extends string,\n TAccountPayer extends string,\n TAccountPayerTokenAccount extends string,\n TAccountProviderTokenAccount extends string,\n TAccountTokenMint extends string,\n TAccountTokenProgram extends string,\n TAccountSystemProgram extends string,\n TProgramAddress extends\n Address = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: ProcessPaymentAsyncInput<\n TAccountPayment,\n TAccountWorkOrder,\n TAccountProviderAgent,\n TAccountPayer,\n TAccountPayerTokenAccount,\n TAccountProviderTokenAccount,\n TAccountTokenMint,\n TAccountTokenProgram,\n TAccountSystemProgram\n >,\n config?: { programAddress?: TProgramAddress }\n): Promise<\n ProcessPaymentInstruction<\n TProgramAddress,\n TAccountPayment,\n TAccountWorkOrder,\n TAccountProviderAgent,\n TAccountPayer,\n TAccountPayerTokenAccount,\n TAccountProviderTokenAccount,\n TAccountTokenMint,\n TAccountTokenProgram,\n TAccountSystemProgram\n >\n> {\n // Program address.\n const programAddress =\n config?.programAddress ?? GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n payment: { value: input.payment ?? null, isWritable: true },\n workOrder: { value: input.workOrder ?? null, isWritable: true },\n providerAgent: { value: input.providerAgent ?? null, isWritable: true },\n payer: { value: input.payer ?? null, isWritable: true },\n payerTokenAccount: {\n value: input.payerTokenAccount ?? null,\n isWritable: true,\n },\n providerTokenAccount: {\n value: input.providerTokenAccount ?? null,\n isWritable: true,\n },\n tokenMint: { value: input.tokenMint ?? null, isWritable: false },\n tokenProgram: { value: input.tokenProgram ?? null, isWritable: false },\n systemProgram: { value: input.systemProgram ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolve default values.\n if (!accounts.payment.value) {\n accounts.payment.value = await getProgramDerivedAddress({\n programAddress,\n seeds: [\n getBytesEncoder().encode(\n new Uint8Array([112, 97, 121, 109, 101, 110, 116])\n ),\n getAddressEncoder().encode(expectAddress(accounts.workOrder.value)),\n ],\n });\n }\n if (!accounts.tokenProgram.value) {\n accounts.tokenProgram.value =\n 'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb' as Address<'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb'>;\n }\n if (!accounts.systemProgram.value) {\n accounts.systemProgram.value =\n '11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.payment),\n getAccountMeta(accounts.workOrder),\n getAccountMeta(accounts.providerAgent),\n getAccountMeta(accounts.payer),\n getAccountMeta(accounts.payerTokenAccount),\n getAccountMeta(accounts.providerTokenAccount),\n getAccountMeta(accounts.tokenMint),\n getAccountMeta(accounts.tokenProgram),\n getAccountMeta(accounts.systemProgram),\n ],\n programAddress,\n data: getProcessPaymentInstructionDataEncoder().encode(\n args as ProcessPaymentInstructionDataArgs\n ),\n } as ProcessPaymentInstruction<\n TProgramAddress,\n TAccountPayment,\n TAccountWorkOrder,\n TAccountProviderAgent,\n TAccountPayer,\n TAccountPayerTokenAccount,\n TAccountProviderTokenAccount,\n TAccountTokenMint,\n TAccountTokenProgram,\n TAccountSystemProgram\n >;\n\n return instruction;\n}\n\nexport type ProcessPaymentInput<\n TAccountPayment extends string = string,\n TAccountWorkOrder extends string = string,\n TAccountProviderAgent extends string = string,\n TAccountPayer extends string = string,\n TAccountPayerTokenAccount extends string = string,\n TAccountProviderTokenAccount extends string = string,\n TAccountTokenMint extends string = string,\n TAccountTokenProgram extends string = string,\n TAccountSystemProgram extends string = string,\n> = {\n payment: Address<TAccountPayment>;\n workOrder: Address<TAccountWorkOrder>;\n providerAgent: Address<TAccountProviderAgent>;\n payer: TransactionSigner<TAccountPayer>;\n payerTokenAccount: Address<TAccountPayerTokenAccount>;\n providerTokenAccount: Address<TAccountProviderTokenAccount>;\n tokenMint: Address<TAccountTokenMint>;\n tokenProgram?: Address<TAccountTokenProgram>;\n systemProgram?: Address<TAccountSystemProgram>;\n amount: ProcessPaymentInstructionDataArgs['amount'];\n useConfidentialTransfer: ProcessPaymentInstructionDataArgs['useConfidentialTransfer'];\n};\n\nexport function getProcessPaymentInstruction<\n TAccountPayment extends string,\n TAccountWorkOrder extends string,\n TAccountProviderAgent extends string,\n TAccountPayer extends string,\n TAccountPayerTokenAccount extends string,\n TAccountProviderTokenAccount extends string,\n TAccountTokenMint extends string,\n TAccountTokenProgram extends string,\n TAccountSystemProgram extends string,\n TProgramAddress extends\n Address = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: ProcessPaymentInput<\n TAccountPayment,\n TAccountWorkOrder,\n TAccountProviderAgent,\n TAccountPayer,\n TAccountPayerTokenAccount,\n TAccountProviderTokenAccount,\n TAccountTokenMint,\n TAccountTokenProgram,\n TAccountSystemProgram\n >,\n config?: { programAddress?: TProgramAddress }\n): ProcessPaymentInstruction<\n TProgramAddress,\n TAccountPayment,\n TAccountWorkOrder,\n TAccountProviderAgent,\n TAccountPayer,\n TAccountPayerTokenAccount,\n TAccountProviderTokenAccount,\n TAccountTokenMint,\n TAccountTokenProgram,\n TAccountSystemProgram\n> {\n // Program address.\n const programAddress =\n config?.programAddress ?? GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n payment: { value: input.payment ?? null, isWritable: true },\n workOrder: { value: input.workOrder ?? null, isWritable: true },\n providerAgent: { value: input.providerAgent ?? null, isWritable: true },\n payer: { value: input.payer ?? null, isWritable: true },\n payerTokenAccount: {\n value: input.payerTokenAccount ?? null,\n isWritable: true,\n },\n providerTokenAccount: {\n value: input.providerTokenAccount ?? null,\n isWritable: true,\n },\n tokenMint: { value: input.tokenMint ?? null, isWritable: false },\n tokenProgram: { value: input.tokenProgram ?? null, isWritable: false },\n systemProgram: { value: input.systemProgram ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolve default values.\n if (!accounts.tokenProgram.value) {\n accounts.tokenProgram.value =\n 'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb' as Address<'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb'>;\n }\n if (!accounts.systemProgram.value) {\n accounts.systemProgram.value =\n '11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.payment),\n getAccountMeta(accounts.workOrder),\n getAccountMeta(accounts.providerAgent),\n getAccountMeta(accounts.payer),\n getAccountMeta(accounts.payerTokenAccount),\n getAccountMeta(accounts.providerTokenAccount),\n getAccountMeta(accounts.tokenMint),\n getAccountMeta(accounts.tokenProgram),\n getAccountMeta(accounts.systemProgram),\n ],\n programAddress,\n data: getProcessPaymentInstructionDataEncoder().encode(\n args as ProcessPaymentInstructionDataArgs\n ),\n } as ProcessPaymentInstruction<\n TProgramAddress,\n TAccountPayment,\n TAccountWorkOrder,\n TAccountProviderAgent,\n TAccountPayer,\n TAccountPayerTokenAccount,\n TAccountProviderTokenAccount,\n TAccountTokenMint,\n TAccountTokenProgram,\n TAccountSystemProgram\n >;\n\n return instruction;\n}\n\nexport type ParsedProcessPaymentInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n payment: TAccountMetas[0];\n workOrder: TAccountMetas[1];\n providerAgent: TAccountMetas[2];\n payer: TAccountMetas[3];\n payerTokenAccount: TAccountMetas[4];\n providerTokenAccount: TAccountMetas[5];\n tokenMint: TAccountMetas[6];\n tokenProgram: TAccountMetas[7];\n systemProgram: TAccountMetas[8];\n };\n data: ProcessPaymentInstructionData;\n};\n\nexport function parseProcessPaymentInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>\n): ParsedProcessPaymentInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 9) {\n throw new Error('[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts');\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = instruction.accounts![accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n payment: getNextAccount(),\n workOrder: getNextAccount(),\n providerAgent: getNextAccount(),\n payer: getNextAccount(),\n payerTokenAccount: getNextAccount(),\n providerTokenAccount: getNextAccount(),\n tokenMint: getNextAccount(),\n tokenProgram: getNextAccount(),\n systemProgram: getNextAccount(),\n },\n data: getProcessPaymentInstructionDataDecoder().decode(instruction.data),\n };\n}\n","/**\n * This code was AUTOGENERATED using the codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n addDecoderSizePrefix,\n addEncoderSizePrefix,\n combineCodec,\n fixDecoderSize,\n fixEncoderSize,\n getAddressEncoder,\n getArrayDecoder,\n getArrayEncoder,\n getBytesDecoder,\n getBytesEncoder,\n getI64Decoder,\n getI64Encoder,\n getProgramDerivedAddress,\n getStructDecoder,\n getStructEncoder,\n getU32Decoder,\n getU32Encoder,\n getU64Decoder,\n getU64Encoder,\n getUtf8Decoder,\n getUtf8Encoder,\n transformEncoder,\n type AccountMeta,\n type AccountSignerMeta,\n type Address,\n type Codec,\n type Decoder,\n type Encoder,\n type Instruction,\n type InstructionWithAccounts,\n type InstructionWithData,\n type ReadonlyAccount,\n type ReadonlyUint8Array,\n type TransactionSigner,\n type WritableAccount,\n type WritableSignerAccount,\n} from '@solana/kit';\nimport {\n GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_INSTRUCTION_DATA,\n GHOSTSPEAK_MARKETPLACE_ERROR__MISSING_REQUIRED_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INSTRUCTION_PARSING_FAILED,\n isGhostspeakMarketplaceError,\n} from '../errors';\nimport { GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS } from '../programs';\nimport {\n expectAddress,\n getAccountMetaFactory,\n type ResolvedAccount,\n} from '../shared';\n\nexport const PURCHASE_SERVICE_DISCRIMINATOR = new Uint8Array([\n 197, 43, 201, 158, 119, 134, 66, 7,\n]);\n\nexport function getPurchaseServiceDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 8).encode(\n PURCHASE_SERVICE_DISCRIMINATOR\n );\n}\n\nexport type PurchaseServiceInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountServicePurchase extends string | AccountMeta<string> = string,\n TAccountServiceListing extends string | AccountMeta<string> = string,\n TAccountBuyer extends string | AccountMeta<string> = string,\n TAccountSystemProgram extends\n | string\n | AccountMeta<string> = '11111111111111111111111111111111',\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountServicePurchase extends string\n ? WritableAccount<TAccountServicePurchase>\n : TAccountServicePurchase,\n TAccountServiceListing extends string\n ? WritableAccount<TAccountServiceListing>\n : TAccountServiceListing,\n TAccountBuyer extends string\n ? WritableSignerAccount<TAccountBuyer> &\n AccountSignerMeta<TAccountBuyer>\n : TAccountBuyer,\n TAccountSystemProgram extends string\n ? ReadonlyAccount<TAccountSystemProgram>\n : TAccountSystemProgram,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type PurchaseServiceInstructionData = {\n discriminator: ReadonlyUint8Array;\n listingId: bigint;\n quantity: number;\n requirements: Array<string>;\n customInstructions: string;\n deadline: bigint;\n};\n\nexport type PurchaseServiceInstructionDataArgs = {\n listingId: number | bigint;\n quantity: number;\n requirements: Array<string>;\n customInstructions: string;\n deadline: number | bigint;\n};\n\nexport function getPurchaseServiceInstructionDataEncoder(): Encoder<PurchaseServiceInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n ['discriminator', fixEncoderSize(getBytesEncoder(), 8)],\n ['listingId', getU64Encoder()],\n ['quantity', getU32Encoder()],\n [\n 'requirements',\n getArrayEncoder(\n addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder())\n ),\n ],\n [\n 'customInstructions',\n addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder()),\n ],\n ['deadline', getI64Encoder()],\n ]),\n (value) => ({ ...value, discriminator: PURCHASE_SERVICE_DISCRIMINATOR })\n );\n}\n\nexport function getPurchaseServiceInstructionDataDecoder(): Decoder<PurchaseServiceInstructionData> {\n return getStructDecoder([\n ['discriminator', fixDecoderSize(getBytesDecoder(), 8)],\n ['listingId', getU64Decoder()],\n ['quantity', getU32Decoder()],\n [\n 'requirements',\n getArrayDecoder(addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())),\n ],\n [\n 'customInstructions',\n addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder()),\n ],\n ['deadline', getI64Decoder()],\n ]);\n}\n\nexport function getPurchaseServiceInstructionDataCodec(): Codec<\n PurchaseServiceInstructionDataArgs,\n PurchaseServiceInstructionData\n> {\n return combineCodec(\n getPurchaseServiceInstructionDataEncoder(),\n getPurchaseServiceInstructionDataDecoder()\n );\n}\n\nexport type PurchaseServiceAsyncInput<\n TAccountServicePurchase extends string = string,\n TAccountServiceListing extends string = string,\n TAccountBuyer extends string = string,\n TAccountSystemProgram extends string = string,\n> = {\n servicePurchase?: Address<TAccountServicePurchase>;\n serviceListing: Address<TAccountServiceListing>;\n buyer: TransactionSigner<TAccountBuyer>;\n systemProgram?: Address<TAccountSystemProgram>;\n listingId: PurchaseServiceInstructionDataArgs['listingId'];\n quantity: PurchaseServiceInstructionDataArgs['quantity'];\n requirements: PurchaseServiceInstructionDataArgs['requirements'];\n customInstructions: PurchaseServiceInstructionDataArgs['customInstructions'];\n deadline: PurchaseServiceInstructionDataArgs['deadline'];\n};\n\nexport async function getPurchaseServiceInstructionAsync<\n TAccountServicePurchase extends string,\n TAccountServiceListing extends string,\n TAccountBuyer extends string,\n TAccountSystemProgram extends string,\n TProgramAddress extends\n Address = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: PurchaseServiceAsyncInput<\n TAccountServicePurchase,\n TAccountServiceListing,\n TAccountBuyer,\n TAccountSystemProgram\n >,\n config?: { programAddress?: TProgramAddress }\n): Promise<\n PurchaseServiceInstruction<\n TProgramAddress,\n TAccountServicePurchase,\n TAccountServiceListing,\n TAccountBuyer,\n TAccountSystemProgram\n >\n> {\n // Program address.\n const programAddress =\n config?.programAddress ?? GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n servicePurchase: { value: input.servicePurchase ?? null, isWritable: true },\n serviceListing: { value: input.serviceListing ?? null, isWritable: true },\n buyer: { value: input.buyer ?? null, isWritable: true },\n systemProgram: { value: input.systemProgram ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolve default values.\n if (!accounts.servicePurchase.value) {\n accounts.servicePurchase.value = await getProgramDerivedAddress({\n programAddress,\n seeds: [\n getBytesEncoder().encode(\n new Uint8Array([\n 115, 101, 114, 118, 105, 99, 101, 95, 112, 117, 114, 99, 104, 97,\n 115, 101,\n ])\n ),\n getAddressEncoder().encode(expectAddress(accounts.buyer.value)),\n getAddressEncoder().encode(\n expectAddress(accounts.serviceListing.value)\n ),\n ],\n });\n }\n if (!accounts.systemProgram.value) {\n accounts.systemProgram.value =\n '11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.servicePurchase),\n getAccountMeta(accounts.serviceListing),\n getAccountMeta(accounts.buyer),\n getAccountMeta(accounts.systemProgram),\n ],\n programAddress,\n data: getPurchaseServiceInstructionDataEncoder().encode(\n args as PurchaseServiceInstructionDataArgs\n ),\n } as PurchaseServiceInstruction<\n TProgramAddress,\n TAccountServicePurchase,\n TAccountServiceListing,\n TAccountBuyer,\n TAccountSystemProgram\n >;\n\n return instruction;\n}\n\nexport type PurchaseServiceInput<\n TAccountServicePurchase extends string = string,\n TAccountServiceListing extends string = string,\n TAccountBuyer extends string = string,\n TAccountSystemProgram extends string = string,\n> = {\n servicePurchase: Address<TAccountServicePurchase>;\n serviceListing: Address<TAccountServiceListing>;\n buyer: TransactionSigner<TAccountBuyer>;\n systemProgram?: Address<TAccountSystemProgram>;\n listingId: PurchaseServiceInstructionDataArgs['listingId'];\n quantity: PurchaseServiceInstructionDataArgs['quantity'];\n requirements: PurchaseServiceInstructionDataArgs['requirements'];\n customInstructions: PurchaseServiceInstructionDataArgs['customInstructions'];\n deadline: PurchaseServiceInstructionDataArgs['deadline'];\n};\n\nexport function getPurchaseServiceInstruction<\n TAccountServicePurchase extends string,\n TAccountServiceListing extends string,\n TAccountBuyer extends string,\n TAccountSystemProgram extends string,\n TProgramAddress extends\n Address = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: PurchaseServiceInput<\n TAccountServicePurchase,\n TAccountServiceListing,\n TAccountBuyer,\n TAccountSystemProgram\n >,\n config?: { programAddress?: TProgramAddress }\n): PurchaseServiceInstruction<\n TProgramAddress,\n TAccountServicePurchase,\n TAccountServiceListing,\n TAccountBuyer,\n TAccountSystemProgram\n> {\n // Program address.\n const programAddress =\n config?.programAddress ?? GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n servicePurchase: { value: input.servicePurchase ?? null, isWritable: true },\n serviceListing: { value: input.serviceListing ?? null, isWritable: true },\n buyer: { value: input.buyer ?? null, isWritable: true },\n systemProgram: { value: input.systemProgram ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolve default values.\n if (!accounts.systemProgram.value) {\n accounts.systemProgram.value =\n '11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.servicePurchase),\n getAccountMeta(accounts.serviceListing),\n getAccountMeta(accounts.buyer),\n getAccountMeta(accounts.systemProgram),\n ],\n programAddress,\n data: getPurchaseServiceInstructionDataEncoder().encode(\n args as PurchaseServiceInstructionDataArgs\n ),\n } as PurchaseServiceInstruction<\n TProgramAddress,\n TAccountServicePurchase,\n TAccountServiceListing,\n TAccountBuyer,\n TAccountSystemProgram\n >;\n\n return instruction;\n}\n\nexport type ParsedPurchaseServiceInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n servicePurchase: TAccountMetas[0];\n serviceListing: TAccountMetas[1];\n buyer: TAccountMetas[2];\n systemProgram: TAccountMetas[3];\n };\n data: PurchaseServiceInstructionData;\n};\n\nexport function parsePurchaseServiceInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>\n): ParsedPurchaseServiceInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 4) {\n throw new Error('[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts');\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = instruction.accounts![accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n servicePurchase: getNextAccount(),\n serviceListing: getNextAccount(),\n buyer: getNextAccount(),\n systemProgram: getNextAccount(),\n },\n data: getPurchaseServiceInstructionDataDecoder().decode(instruction.data),\n };\n}\n","/**\n * This code was AUTOGENERATED using the codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n combineCodec,\n fixDecoderSize,\n fixEncoderSize,\n getBytesDecoder,\n getBytesEncoder,\n getProgramDerivedAddress,\n getStructDecoder,\n getStructEncoder,\n transformEncoder,\n type AccountMeta,\n type AccountSignerMeta,\n type Address,\n type FixedSizeCodec,\n type FixedSizeDecoder,\n type FixedSizeEncoder,\n type Instruction,\n type InstructionWithAccounts,\n type InstructionWithData,\n type ReadonlyAccount,\n type ReadonlyUint8Array,\n type TransactionSigner,\n type WritableAccount,\n type WritableSignerAccount,\n} from '@solana/kit';\nimport {\n GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_INSTRUCTION_DATA,\n GHOSTSPEAK_MARKETPLACE_ERROR__MISSING_REQUIRED_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INSTRUCTION_PARSING_FAILED,\n isGhostspeakMarketplaceError,\n} from '../errors';\nimport { GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS } from '../programs';\nimport { getAccountMetaFactory, type ResolvedAccount } from '../shared';\n\nexport const REFUND_EXPIRED_ESCROW_DISCRIMINATOR = new Uint8Array([\n 40, 9, 115, 148, 140, 7, 157, 160,\n]);\n\nexport function getRefundExpiredEscrowDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 8).encode(\n REFUND_EXPIRED_ESCROW_DISCRIMINATOR\n );\n}\n\nexport type RefundExpiredEscrowInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountEscrow extends string | AccountMeta<string> = string,\n TAccountReentrancyGuard extends string | AccountMeta<string> = string,\n TAccountEscrowTokenAccount extends string | AccountMeta<string> = string,\n TAccountClientRefundAccount extends string | AccountMeta<string> = string,\n TAccountPaymentToken extends string | AccountMeta<string> = string,\n TAccountCaller extends string | AccountMeta<string> = string,\n TAccountTokenProgram extends\n | string\n | AccountMeta<string> = 'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb',\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountEscrow extends string\n ? WritableAccount<TAccountEscrow>\n : TAccountEscrow,\n TAccountReentrancyGuard extends string\n ? WritableAccount<TAccountReentrancyGuard>\n : TAccountReentrancyGuard,\n TAccountEscrowTokenAccount extends string\n ? WritableAccount<TAccountEscrowTokenAccount>\n : TAccountEscrowTokenAccount,\n TAccountClientRefundAccount extends string\n ? WritableAccount<TAccountClientRefundAccount>\n : TAccountClientRefundAccount,\n TAccountPaymentToken extends string\n ? ReadonlyAccount<TAccountPaymentToken>\n : TAccountPaymentToken,\n TAccountCaller extends string\n ? WritableSignerAccount<TAccountCaller> &\n AccountSignerMeta<TAccountCaller>\n : TAccountCaller,\n TAccountTokenProgram extends string\n ? ReadonlyAccount<TAccountTokenProgram>\n : TAccountTokenProgram,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type RefundExpiredEscrowInstructionData = {\n discriminator: ReadonlyUint8Array;\n};\n\nexport type RefundExpiredEscrowInstructionDataArgs = {};\n\nexport function getRefundExpiredEscrowInstructionDataEncoder(): FixedSizeEncoder<RefundExpiredEscrowInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([['discriminator', fixEncoderSize(getBytesEncoder(), 8)]]),\n (value) => ({\n ...value,\n discriminator: REFUND_EXPIRED_ESCROW_DISCRIMINATOR,\n })\n );\n}\n\nexport function getRefundExpiredEscrowInstructionDataDecoder(): FixedSizeDecoder<RefundExpiredEscrowInstructionData> {\n return getStructDecoder([\n ['discriminator', fixDecoderSize(getBytesDecoder(), 8)],\n ]);\n}\n\nexport function getRefundExpiredEscrowInstructionDataCodec(): FixedSizeCodec<\n RefundExpiredEscrowInstructionDataArgs,\n RefundExpiredEscrowInstructionData\n> {\n return combineCodec(\n getRefundExpiredEscrowInstructionDataEncoder(),\n getRefundExpiredEscrowInstructionDataDecoder()\n );\n}\n\nexport type RefundExpiredEscrowAsyncInput<\n TAccountEscrow extends string = string,\n TAccountReentrancyGuard extends string = string,\n TAccountEscrowTokenAccount extends string = string,\n TAccountClientRefundAccount extends string = string,\n TAccountPaymentToken extends string = string,\n TAccountCaller extends string = string,\n TAccountTokenProgram extends string = string,\n> = {\n escrow: Address<TAccountEscrow>;\n reentrancyGuard?: Address<TAccountReentrancyGuard>;\n escrowTokenAccount: Address<TAccountEscrowTokenAccount>;\n clientRefundAccount: Address<TAccountClientRefundAccount>;\n /** The token mint used for payments */\n paymentToken: Address<TAccountPaymentToken>;\n /** Can be called by anyone for expired escrows */\n caller: TransactionSigner<TAccountCaller>;\n tokenProgram?: Address<TAccountTokenProgram>;\n};\n\nexport async function getRefundExpiredEscrowInstructionAsync<\n TAccountEscrow extends string,\n TAccountReentrancyGuard extends string,\n TAccountEscrowTokenAccount extends string,\n TAccountClientRefundAccount extends string,\n TAccountPaymentToken extends string,\n TAccountCaller extends string,\n TAccountTokenProgram extends string,\n TProgramAddress extends\n Address = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: RefundExpiredEscrowAsyncInput<\n TAccountEscrow,\n TAccountReentrancyGuard,\n TAccountEscrowTokenAccount,\n TAccountClientRefundAccount,\n TAccountPaymentToken,\n TAccountCaller,\n TAccountTokenProgram\n >,\n config?: { programAddress?: TProgramAddress }\n): Promise<\n RefundExpiredEscrowInstruction<\n TProgramAddress,\n TAccountEscrow,\n TAccountReentrancyGuard,\n TAccountEscrowTokenAccount,\n TAccountClientRefundAccount,\n TAccountPaymentToken,\n TAccountCaller,\n TAccountTokenProgram\n >\n> {\n // Program address.\n const programAddress =\n config?.programAddress ?? GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n escrow: { value: input.escrow ?? null, isWritable: true },\n reentrancyGuard: { value: input.reentrancyGuard ?? null, isWritable: true },\n escrowTokenAccount: {\n value: input.escrowTokenAccount ?? null,\n isWritable: true,\n },\n clientRefundAccount: {\n value: input.clientRefundAccount ?? null,\n isWritable: true,\n },\n paymentToken: { value: input.paymentToken ?? null, isWritable: false },\n caller: { value: input.caller ?? null, isWritable: true },\n tokenProgram: { value: input.tokenProgram ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Resolve default values.\n if (!accounts.reentrancyGuard.value) {\n accounts.reentrancyGuard.value = await getProgramDerivedAddress({\n programAddress,\n seeds: [\n getBytesEncoder().encode(\n new Uint8Array([\n 114, 101, 101, 110, 116, 114, 97, 110, 99, 121, 95, 103, 117, 97,\n 114, 100,\n ])\n ),\n ],\n });\n }\n if (!accounts.tokenProgram.value) {\n accounts.tokenProgram.value =\n 'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb' as Address<'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb'>;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.escrow),\n getAccountMeta(accounts.reentrancyGuard),\n getAccountMeta(accounts.escrowTokenAccount),\n getAccountMeta(accounts.clientRefundAccount),\n getAccountMeta(accounts.paymentToken),\n getAccountMeta(accounts.caller),\n getAccountMeta(accounts.tokenProgram),\n ],\n programAddress,\n data: getRefundExpiredEscrowInstructionDataEncoder().encode({}),\n } as RefundExpiredEscrowInstruction<\n TProgramAddress,\n TAccountEscrow,\n TAccountReentrancyGuard,\n TAccountEscrowTokenAccount,\n TAccountClientRefundAccount,\n TAccountPaymentToken,\n TAccountCaller,\n TAccountTokenProgram\n >;\n\n return instruction;\n}\n\nexport type RefundExpiredEscrowInput<\n TAccountEscrow extends string = string,\n TAccountReentrancyGuard extends string = string,\n TAccountEscrowTokenAccount extends string = string,\n TAccountClientRefundAccount extends string = string,\n TAccountPaymentToken extends string = string,\n TAccountCaller extends string = string,\n TAccountTokenProgram extends string = string,\n> = {\n escrow: Address<TAccountEscrow>;\n reentrancyGuard: Address<TAccountReentrancyGuard>;\n escrowTokenAccount: Address<TAccountEscrowTokenAccount>;\n clientRefundAccount: Address<TAccountClientRefundAccount>;\n /** The token mint used for payments */\n paymentToken: Address<TAccountPaymentToken>;\n /** Can be called by anyone for expired escrows */\n caller: TransactionSigner<TAccountCaller>;\n tokenProgram?: Address<TAccountTokenProgram>;\n};\n\nexport function getRefundExpiredEscrowInstruction<\n TAccountEscrow extends string,\n TAccountReentrancyGuard extends string,\n TAccountEscrowTokenAccount extends string,\n TAccountClientRefundAccount extends string,\n TAccountPaymentToken extends string,\n TAccountCaller extends string,\n TAccountTokenProgram extends string,\n TProgramAddress extends\n Address = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: RefundExpiredEscrowInput<\n TAccountEscrow,\n TAccountReentrancyGuard,\n TAccountEscrowTokenAccount,\n TAccountClientRefundAccount,\n TAccountPaymentToken,\n TAccountCaller,\n TAccountTokenProgram\n >,\n config?: { programAddress?: TProgramAddress }\n): RefundExpiredEscrowInstruction<\n TProgramAddress,\n TAccountEscrow,\n TAccountReentrancyGuard,\n TAccountEscrowTokenAccount,\n TAccountClientRefundAccount,\n TAccountPaymentToken,\n TAccountCaller,\n TAccountTokenProgram\n> {\n // Program address.\n const programAddress =\n config?.programAddress ?? GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n escrow: { value: input.escrow ?? null, isWritable: true },\n reentrancyGuard: { value: input.reentrancyGuard ?? null, isWritable: true },\n escrowTokenAccount: {\n value: input.escrowTokenAccount ?? null,\n isWritable: true,\n },\n clientRefundAccount: {\n value: input.clientRefundAccount ?? null,\n isWritable: true,\n },\n paymentToken: { value: input.paymentToken ?? null, isWritable: false },\n caller: { value: input.caller ?? null, isWritable: true },\n tokenProgram: { value: input.tokenProgram ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Resolve default values.\n if (!accounts.tokenProgram.value) {\n accounts.tokenProgram.value =\n 'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb' as Address<'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb'>;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.escrow),\n getAccountMeta(accounts.reentrancyGuard),\n getAccountMeta(accounts.escrowTokenAccount),\n getAccountMeta(accounts.clientRefundAccount),\n getAccountMeta(accounts.paymentToken),\n getAccountMeta(accounts.caller),\n getAccountMeta(accounts.tokenProgram),\n ],\n programAddress,\n data: getRefundExpiredEscrowInstructionDataEncoder().encode({}),\n } as RefundExpiredEscrowInstruction<\n TProgramAddress,\n TAccountEscrow,\n TAccountReentrancyGuard,\n TAccountEscrowTokenAccount,\n TAccountClientRefundAccount,\n TAccountPaymentToken,\n TAccountCaller,\n TAccountTokenProgram\n >;\n\n return instruction;\n}\n\nexport type ParsedRefundExpiredEscrowInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n escrow: TAccountMetas[0];\n reentrancyGuard: TAccountMetas[1];\n escrowTokenAccount: TAccountMetas[2];\n clientRefundAccount: TAccountMetas[3];\n /** The token mint used for payments */\n paymentToken: TAccountMetas[4];\n /** Can be called by anyone for expired escrows */\n caller: TAccountMetas[5];\n tokenProgram: TAccountMetas[6];\n };\n data: RefundExpiredEscrowInstructionData;\n};\n\nexport function parseRefundExpiredEscrowInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>\n): ParsedRefundExpiredEscrowInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 7) {\n throw new Error('[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts');\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = instruction.accounts![accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n escrow: getNextAccount(),\n reentrancyGuard: getNextAccount(),\n escrowTokenAccount: getNextAccount(),\n clientRefundAccount: getNextAccount(),\n paymentToken: getNextAccount(),\n caller: getNextAccount(),\n tokenProgram: getNextAccount(),\n },\n data: getRefundExpiredEscrowInstructionDataDecoder().decode(\n instruction.data\n ),\n };\n}\n","/**\n * This code was AUTOGENERATED using the codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n addDecoderSizePrefix,\n addEncoderSizePrefix,\n combineCodec,\n fixDecoderSize,\n fixEncoderSize,\n getAddressEncoder,\n getBytesDecoder,\n getBytesEncoder,\n getProgramDerivedAddress,\n getStructDecoder,\n getStructEncoder,\n getU32Decoder,\n getU32Encoder,\n getU8Decoder,\n getU8Encoder,\n getUtf8Decoder,\n getUtf8Encoder,\n transformEncoder,\n type AccountMeta,\n type AccountSignerMeta,\n type Address,\n type Codec,\n type Decoder,\n type Encoder,\n type Instruction,\n type InstructionWithAccounts,\n type InstructionWithData,\n type ReadonlyAccount,\n type ReadonlyUint8Array,\n type TransactionSigner,\n type WritableAccount,\n type WritableSignerAccount,\n} from '@solana/kit';\nimport {\n GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_INSTRUCTION_DATA,\n GHOSTSPEAK_MARKETPLACE_ERROR__MISSING_REQUIRED_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INSTRUCTION_PARSING_FAILED,\n isGhostspeakMarketplaceError,\n} from '../errors';\nimport { GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS } from '../programs';\nimport {\n expectAddress,\n expectSome,\n getAccountMetaFactory,\n type ResolvedAccount,\n} from '../shared';\n\nexport const REGISTER_AGENT_DISCRIMINATOR = new Uint8Array([\n 135, 157, 66, 195, 2, 113, 175, 30,\n]);\n\nexport function getRegisterAgentDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 8).encode(\n REGISTER_AGENT_DISCRIMINATOR\n );\n}\n\nexport type RegisterAgentInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountAgentAccount extends string | AccountMeta<string> = string,\n TAccountUserRegistry extends string | AccountMeta<string> = string,\n TAccountSigner extends string | AccountMeta<string> = string,\n TAccountSystemProgram extends\n | string\n | AccountMeta<string> = '11111111111111111111111111111111',\n TAccountClock extends\n | string\n | AccountMeta<string> = 'SysvarC1ock11111111111111111111111111111111',\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountAgentAccount extends string\n ? WritableAccount<TAccountAgentAccount>\n : TAccountAgentAccount,\n TAccountUserRegistry extends string\n ? WritableAccount<TAccountUserRegistry>\n : TAccountUserRegistry,\n TAccountSigner extends string\n ? WritableSignerAccount<TAccountSigner> &\n AccountSignerMeta<TAccountSigner>\n : TAccountSigner,\n TAccountSystemProgram extends string\n ? ReadonlyAccount<TAccountSystemProgram>\n : TAccountSystemProgram,\n TAccountClock extends string\n ? ReadonlyAccount<TAccountClock>\n : TAccountClock,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type RegisterAgentInstructionData = {\n discriminator: ReadonlyUint8Array;\n agentType: number;\n metadataUri: string;\n agentId: string;\n};\n\nexport type RegisterAgentInstructionDataArgs = {\n agentType: number;\n metadataUri: string;\n agentId: string;\n};\n\nexport function getRegisterAgentInstructionDataEncoder(): Encoder<RegisterAgentInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n ['discriminator', fixEncoderSize(getBytesEncoder(), 8)],\n ['agentType', getU8Encoder()],\n ['metadataUri', addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder())],\n ['agentId', addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder())],\n ]),\n (value) => ({ ...value, discriminator: REGISTER_AGENT_DISCRIMINATOR })\n );\n}\n\nexport function getRegisterAgentInstructionDataDecoder(): Decoder<RegisterAgentInstructionData> {\n return getStructDecoder([\n ['discriminator', fixDecoderSize(getBytesDecoder(), 8)],\n ['agentType', getU8Decoder()],\n ['metadataUri', addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())],\n ['agentId', addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())],\n ]);\n}\n\nexport function getRegisterAgentInstructionDataCodec(): Codec<\n RegisterAgentInstructionDataArgs,\n RegisterAgentInstructionData\n> {\n return combineCodec(\n getRegisterAgentInstructionDataEncoder(),\n getRegisterAgentInstructionDataDecoder()\n );\n}\n\nexport type RegisterAgentAsyncInput<\n TAccountAgentAccount extends string = string,\n TAccountUserRegistry extends string = string,\n TAccountSigner extends string = string,\n TAccountSystemProgram extends string = string,\n TAccountClock extends string = string,\n> = {\n /** Agent account with enhanced 2025 PDA security */\n agentAccount?: Address<TAccountAgentAccount>;\n /** User registry with enhanced validation */\n userRegistry?: Address<TAccountUserRegistry>;\n /** Authority with enhanced verification */\n signer: TransactionSigner<TAccountSigner>;\n /** System program for account creation */\n systemProgram?: Address<TAccountSystemProgram>;\n /** Clock sysvar for timestamp validation */\n clock?: Address<TAccountClock>;\n agentType: RegisterAgentInstructionDataArgs['agentType'];\n metadataUri: RegisterAgentInstructionDataArgs['metadataUri'];\n agentId: RegisterAgentInstructionDataArgs['agentId'];\n};\n\nexport async function getRegisterAgentInstructionAsync<\n TAccountAgentAccount extends string,\n TAccountUserRegistry extends string,\n TAccountSigner extends string,\n TAccountSystemProgram extends string,\n TAccountClock extends string,\n TProgramAddress extends\n Address = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: RegisterAgentAsyncInput<\n TAccountAgentAccount,\n TAccountUserRegistry,\n TAccountSigner,\n TAccountSystemProgram,\n TAccountClock\n >,\n config?: { programAddress?: TProgramAddress }\n): Promise<\n RegisterAgentInstruction<\n TProgramAddress,\n TAccountAgentAccount,\n TAccountUserRegistry,\n TAccountSigner,\n TAccountSystemProgram,\n TAccountClock\n >\n> {\n // Program address.\n const programAddress =\n config?.programAddress ?? GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n agentAccount: { value: input.agentAccount ?? null, isWritable: true },\n userRegistry: { value: input.userRegistry ?? null, isWritable: true },\n signer: { value: input.signer ?? null, isWritable: true },\n systemProgram: { value: input.systemProgram ?? null, isWritable: false },\n clock: { value: input.clock ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolve default values.\n if (!accounts.agentAccount.value) {\n accounts.agentAccount.value = await getProgramDerivedAddress({\n programAddress,\n seeds: [\n getBytesEncoder().encode(new Uint8Array([97, 103, 101, 110, 116])),\n getAddressEncoder().encode(expectAddress(accounts.signer.value)),\n addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder()).encode(\n expectSome(args.agentId)\n ),\n ],\n });\n }\n if (!accounts.userRegistry.value) {\n accounts.userRegistry.value = await getProgramDerivedAddress({\n programAddress,\n seeds: [\n getBytesEncoder().encode(\n new Uint8Array([\n 117, 115, 101, 114, 95, 114, 101, 103, 105, 115, 116, 114, 121,\n ])\n ),\n getAddressEncoder().encode(expectAddress(accounts.signer.value)),\n ],\n });\n }\n if (!accounts.systemProgram.value) {\n accounts.systemProgram.value =\n '11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>;\n }\n if (!accounts.clock.value) {\n accounts.clock.value =\n 'SysvarC1ock11111111111111111111111111111111' as Address<'SysvarC1ock11111111111111111111111111111111'>;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.agentAccount),\n getAccountMeta(accounts.userRegistry),\n getAccountMeta(accounts.signer),\n getAccountMeta(accounts.systemProgram),\n getAccountMeta(accounts.clock),\n ],\n programAddress,\n data: getRegisterAgentInstructionDataEncoder().encode(\n args as RegisterAgentInstructionDataArgs\n ),\n } as RegisterAgentInstruction<\n TProgramAddress,\n TAccountAgentAccount,\n TAccountUserRegistry,\n TAccountSigner,\n TAccountSystemProgram,\n TAccountClock\n >;\n\n return instruction;\n}\n\nexport type RegisterAgentInput<\n TAccountAgentAccount extends string = string,\n TAccountUserRegistry extends string = string,\n TAccountSigner extends string = string,\n TAccountSystemProgram extends string = string,\n TAccountClock extends string = string,\n> = {\n /** Agent account with enhanced 2025 PDA security */\n agentAccount: Address<TAccountAgentAccount>;\n /** User registry with enhanced validation */\n userRegistry: Address<TAccountUserRegistry>;\n /** Authority with enhanced verification */\n signer: TransactionSigner<TAccountSigner>;\n /** System program for account creation */\n systemProgram?: Address<TAccountSystemProgram>;\n /** Clock sysvar for timestamp validation */\n clock?: Address<TAccountClock>;\n agentType: RegisterAgentInstructionDataArgs['agentType'];\n metadataUri: RegisterAgentInstructionDataArgs['metadataUri'];\n agentId: RegisterAgentInstructionDataArgs['agentId'];\n};\n\nexport function getRegisterAgentInstruction<\n TAccountAgentAccount extends string,\n TAccountUserRegistry extends string,\n TAccountSigner extends string,\n TAccountSystemProgram extends string,\n TAccountClock extends string,\n TProgramAddress extends\n Address = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: RegisterAgentInput<\n TAccountAgentAccount,\n TAccountUserRegistry,\n TAccountSigner,\n TAccountSystemProgram,\n TAccountClock\n >,\n config?: { programAddress?: TProgramAddress }\n): RegisterAgentInstruction<\n TProgramAddress,\n TAccountAgentAccount,\n TAccountUserRegistry,\n TAccountSigner,\n TAccountSystemProgram,\n TAccountClock\n> {\n // Program address.\n const programAddress =\n config?.programAddress ?? GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n agentAccount: { value: input.agentAccount ?? null, isWritable: true },\n userRegistry: { value: input.userRegistry ?? null, isWritable: true },\n signer: { value: input.signer ?? null, isWritable: true },\n systemProgram: { value: input.systemProgram ?? null, isWritable: false },\n clock: { value: input.clock ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolve default values.\n if (!accounts.systemProgram.value) {\n accounts.systemProgram.value =\n '11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>;\n }\n if (!accounts.clock.value) {\n accounts.clock.value =\n 'SysvarC1ock11111111111111111111111111111111' as Address<'SysvarC1ock11111111111111111111111111111111'>;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.agentAccount),\n getAccountMeta(accounts.userRegistry),\n getAccountMeta(accounts.signer),\n getAccountMeta(accounts.systemProgram),\n getAccountMeta(accounts.clock),\n ],\n programAddress,\n data: getRegisterAgentInstructionDataEncoder().encode(\n args as RegisterAgentInstructionDataArgs\n ),\n } as RegisterAgentInstruction<\n TProgramAddress,\n TAccountAgentAccount,\n TAccountUserRegistry,\n TAccountSigner,\n TAccountSystemProgram,\n TAccountClock\n >;\n\n return instruction;\n}\n\nexport type ParsedRegisterAgentInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n /** Agent account with enhanced 2025 PDA security */\n agentAccount: TAccountMetas[0];\n /** User registry with enhanced validation */\n userRegistry: TAccountMetas[1];\n /** Authority with enhanced verification */\n signer: TAccountMetas[2];\n /** System program for account creation */\n systemProgram: TAccountMetas[3];\n /** Clock sysvar for timestamp validation */\n clock: TAccountMetas[4];\n };\n data: RegisterAgentInstructionData;\n};\n\nexport function parseRegisterAgentInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>\n): ParsedRegisterAgentInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 5) {\n throw new Error('[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts');\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = instruction.accounts![accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n agentAccount: getNextAccount(),\n userRegistry: getNextAccount(),\n signer: getNextAccount(),\n systemProgram: getNextAccount(),\n clock: getNextAccount(),\n },\n data: getRegisterAgentInstructionDataDecoder().decode(instruction.data),\n };\n}\n","/**\n * This code was AUTOGENERATED using the codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n addDecoderSizePrefix,\n addEncoderSizePrefix,\n combineCodec,\n fixDecoderSize,\n fixEncoderSize,\n getAddressEncoder,\n getBytesDecoder,\n getBytesEncoder,\n getF64Decoder,\n getF64Encoder,\n getProgramDerivedAddress,\n getStructDecoder,\n getStructEncoder,\n getU32Decoder,\n getU32Encoder,\n getUtf8Decoder,\n getUtf8Encoder,\n transformEncoder,\n type AccountMeta,\n type AccountSignerMeta,\n type Address,\n type Codec,\n type Decoder,\n type Encoder,\n type Instruction,\n type InstructionWithAccounts,\n type InstructionWithData,\n type ReadonlyAccount,\n type ReadonlyUint8Array,\n type TransactionSigner,\n type WritableAccount,\n type WritableSignerAccount,\n} from '@solana/kit';\nimport {\n GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_INSTRUCTION_DATA,\n GHOSTSPEAK_MARKETPLACE_ERROR__MISSING_REQUIRED_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INSTRUCTION_PARSING_FAILED,\n isGhostspeakMarketplaceError,\n} from '../errors';\nimport { GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS } from '../programs';\nimport {\n expectAddress,\n getAccountMetaFactory,\n type ResolvedAccount,\n} from '../shared';\nimport {\n getExtensionMetadataDecoder,\n getExtensionMetadataEncoder,\n type ExtensionMetadata,\n type ExtensionMetadataArgs,\n} from '../types';\n\nexport const REGISTER_EXTENSION_DISCRIMINATOR = new Uint8Array([\n 158, 205, 4, 17, 6, 106, 172, 148,\n]);\n\nexport function getRegisterExtensionDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 8).encode(\n REGISTER_EXTENSION_DISCRIMINATOR\n );\n}\n\nexport type RegisterExtensionInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountExtension extends string | AccountMeta<string> = string,\n TAccountUserRegistry extends string | AccountMeta<string> = string,\n TAccountDeveloper extends string | AccountMeta<string> = string,\n TAccountSystemProgram extends\n | string\n | AccountMeta<string> = '11111111111111111111111111111111',\n TAccountClock extends\n | string\n | AccountMeta<string> = 'SysvarC1ock11111111111111111111111111111111',\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountExtension extends string\n ? WritableAccount<TAccountExtension>\n : TAccountExtension,\n TAccountUserRegistry extends string\n ? WritableAccount<TAccountUserRegistry>\n : TAccountUserRegistry,\n TAccountDeveloper extends string\n ? WritableSignerAccount<TAccountDeveloper> &\n AccountSignerMeta<TAccountDeveloper>\n : TAccountDeveloper,\n TAccountSystemProgram extends string\n ? ReadonlyAccount<TAccountSystemProgram>\n : TAccountSystemProgram,\n TAccountClock extends string\n ? ReadonlyAccount<TAccountClock>\n : TAccountClock,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type RegisterExtensionInstructionData = {\n discriminator: ReadonlyUint8Array;\n metadata: ExtensionMetadata;\n codeHash: string;\n revenueShare: number;\n};\n\nexport type RegisterExtensionInstructionDataArgs = {\n metadata: ExtensionMetadataArgs;\n codeHash: string;\n revenueShare: number;\n};\n\nexport function getRegisterExtensionInstructionDataEncoder(): Encoder<RegisterExtensionInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n ['discriminator', fixEncoderSize(getBytesEncoder(), 8)],\n ['metadata', getExtensionMetadataEncoder()],\n ['codeHash', addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder())],\n ['revenueShare', getF64Encoder()],\n ]),\n (value) => ({ ...value, discriminator: REGISTER_EXTENSION_DISCRIMINATOR })\n );\n}\n\nexport function getRegisterExtensionInstructionDataDecoder(): Decoder<RegisterExtensionInstructionData> {\n return getStructDecoder([\n ['discriminator', fixDecoderSize(getBytesDecoder(), 8)],\n ['metadata', getExtensionMetadataDecoder()],\n ['codeHash', addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())],\n ['revenueShare', getF64Decoder()],\n ]);\n}\n\nexport function getRegisterExtensionInstructionDataCodec(): Codec<\n RegisterExtensionInstructionDataArgs,\n RegisterExtensionInstructionData\n> {\n return combineCodec(\n getRegisterExtensionInstructionDataEncoder(),\n getRegisterExtensionInstructionDataDecoder()\n );\n}\n\nexport type RegisterExtensionAsyncInput<\n TAccountExtension extends string = string,\n TAccountUserRegistry extends string = string,\n TAccountDeveloper extends string = string,\n TAccountSystemProgram extends string = string,\n TAccountClock extends string = string,\n> = {\n /** Extension account with collision prevention */\n extension: Address<TAccountExtension>;\n /** User registry for rate limiting and spam prevention */\n userRegistry?: Address<TAccountUserRegistry>;\n /** Enhanced developer verification */\n developer: TransactionSigner<TAccountDeveloper>;\n /** System program for account creation */\n systemProgram?: Address<TAccountSystemProgram>;\n /** Clock sysvar for timestamp validation */\n clock?: Address<TAccountClock>;\n metadata: RegisterExtensionInstructionDataArgs['metadata'];\n codeHash: RegisterExtensionInstructionDataArgs['codeHash'];\n revenueShare: RegisterExtensionInstructionDataArgs['revenueShare'];\n};\n\nexport async function getRegisterExtensionInstructionAsync<\n TAccountExtension extends string,\n TAccountUserRegistry extends string,\n TAccountDeveloper extends string,\n TAccountSystemProgram extends string,\n TAccountClock extends string,\n TProgramAddress extends\n Address = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: RegisterExtensionAsyncInput<\n TAccountExtension,\n TAccountUserRegistry,\n TAccountDeveloper,\n TAccountSystemProgram,\n TAccountClock\n >,\n config?: { programAddress?: TProgramAddress }\n): Promise<\n RegisterExtensionInstruction<\n TProgramAddress,\n TAccountExtension,\n TAccountUserRegistry,\n TAccountDeveloper,\n TAccountSystemProgram,\n TAccountClock\n >\n> {\n // Program address.\n const programAddress =\n config?.programAddress ?? GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n extension: { value: input.extension ?? null, isWritable: true },\n userRegistry: { value: input.userRegistry ?? null, isWritable: true },\n developer: { value: input.developer ?? null, isWritable: true },\n systemProgram: { value: input.systemProgram ?? null, isWritable: false },\n clock: { value: input.clock ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolve default values.\n if (!accounts.userRegistry.value) {\n accounts.userRegistry.value = await getProgramDerivedAddress({\n programAddress,\n seeds: [\n getBytesEncoder().encode(\n new Uint8Array([\n 117, 115, 101, 114, 95, 114, 101, 103, 105, 115, 116, 114, 121,\n ])\n ),\n getAddressEncoder().encode(expectAddress(accounts.developer.value)),\n ],\n });\n }\n if (!accounts.systemProgram.value) {\n accounts.systemProgram.value =\n '11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>;\n }\n if (!accounts.clock.value) {\n accounts.clock.value =\n 'SysvarC1ock11111111111111111111111111111111' as Address<'SysvarC1ock11111111111111111111111111111111'>;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.extension),\n getAccountMeta(accounts.userRegistry),\n getAccountMeta(accounts.developer),\n getAccountMeta(accounts.systemProgram),\n getAccountMeta(accounts.clock),\n ],\n programAddress,\n data: getRegisterExtensionInstructionDataEncoder().encode(\n args as RegisterExtensionInstructionDataArgs\n ),\n } as RegisterExtensionInstruction<\n TProgramAddress,\n TAccountExtension,\n TAccountUserRegistry,\n TAccountDeveloper,\n TAccountSystemProgram,\n TAccountClock\n >;\n\n return instruction;\n}\n\nexport type RegisterExtensionInput<\n TAccountExtension extends string = string,\n TAccountUserRegistry extends string = string,\n TAccountDeveloper extends string = string,\n TAccountSystemProgram extends string = string,\n TAccountClock extends string = string,\n> = {\n /** Extension account with collision prevention */\n extension: Address<TAccountExtension>;\n /** User registry for rate limiting and spam prevention */\n userRegistry: Address<TAccountUserRegistry>;\n /** Enhanced developer verification */\n developer: TransactionSigner<TAccountDeveloper>;\n /** System program for account creation */\n systemProgram?: Address<TAccountSystemProgram>;\n /** Clock sysvar for timestamp validation */\n clock?: Address<TAccountClock>;\n metadata: RegisterExtensionInstructionDataArgs['metadata'];\n codeHash: RegisterExtensionInstructionDataArgs['codeHash'];\n revenueShare: RegisterExtensionInstructionDataArgs['revenueShare'];\n};\n\nexport function getRegisterExtensionInstruction<\n TAccountExtension extends string,\n TAccountUserRegistry extends string,\n TAccountDeveloper extends string,\n TAccountSystemProgram extends string,\n TAccountClock extends string,\n TProgramAddress extends\n Address = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: RegisterExtensionInput<\n TAccountExtension,\n TAccountUserRegistry,\n TAccountDeveloper,\n TAccountSystemProgram,\n TAccountClock\n >,\n config?: { programAddress?: TProgramAddress }\n): RegisterExtensionInstruction<\n TProgramAddress,\n TAccountExtension,\n TAccountUserRegistry,\n TAccountDeveloper,\n TAccountSystemProgram,\n TAccountClock\n> {\n // Program address.\n const programAddress =\n config?.programAddress ?? GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n extension: { value: input.extension ?? null, isWritable: true },\n userRegistry: { value: input.userRegistry ?? null, isWritable: true },\n developer: { value: input.developer ?? null, isWritable: true },\n systemProgram: { value: input.systemProgram ?? null, isWritable: false },\n clock: { value: input.clock ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolve default values.\n if (!accounts.systemProgram.value) {\n accounts.systemProgram.value =\n '11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>;\n }\n if (!accounts.clock.value) {\n accounts.clock.value =\n 'SysvarC1ock11111111111111111111111111111111' as Address<'SysvarC1ock11111111111111111111111111111111'>;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.extension),\n getAccountMeta(accounts.userRegistry),\n getAccountMeta(accounts.developer),\n getAccountMeta(accounts.systemProgram),\n getAccountMeta(accounts.clock),\n ],\n programAddress,\n data: getRegisterExtensionInstructionDataEncoder().encode(\n args as RegisterExtensionInstructionDataArgs\n ),\n } as RegisterExtensionInstruction<\n TProgramAddress,\n TAccountExtension,\n TAccountUserRegistry,\n TAccountDeveloper,\n TAccountSystemProgram,\n TAccountClock\n >;\n\n return instruction;\n}\n\nexport type ParsedRegisterExtensionInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n /** Extension account with collision prevention */\n extension: TAccountMetas[0];\n /** User registry for rate limiting and spam prevention */\n userRegistry: TAccountMetas[1];\n /** Enhanced developer verification */\n developer: TAccountMetas[2];\n /** System program for account creation */\n systemProgram: TAccountMetas[3];\n /** Clock sysvar for timestamp validation */\n clock: TAccountMetas[4];\n };\n data: RegisterExtensionInstructionData;\n};\n\nexport function parseRegisterExtensionInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>\n): ParsedRegisterExtensionInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 5) {\n throw new Error('[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts');\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = instruction.accounts![accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n extension: getNextAccount(),\n userRegistry: getNextAccount(),\n developer: getNextAccount(),\n systemProgram: getNextAccount(),\n clock: getNextAccount(),\n },\n data: getRegisterExtensionInstructionDataDecoder().decode(instruction.data),\n };\n}\n","/**\n * This code was AUTOGENERATED using the codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n addDecoderSizePrefix,\n addEncoderSizePrefix,\n combineCodec,\n fixDecoderSize,\n fixEncoderSize,\n getArrayDecoder,\n getArrayEncoder,\n getBytesDecoder,\n getBytesEncoder,\n getOptionDecoder,\n getOptionEncoder,\n getStructDecoder,\n getStructEncoder,\n getU32Decoder,\n getU32Encoder,\n getUtf8Decoder,\n getUtf8Encoder,\n transformEncoder,\n type AccountMeta,\n type AccountSignerMeta,\n type Address,\n type Codec,\n type Decoder,\n type Encoder,\n type Instruction,\n type InstructionWithAccounts,\n type InstructionWithData,\n type Option,\n type OptionOrNullable,\n type ReadonlyAccount,\n type ReadonlyUint8Array,\n type TransactionSigner,\n type WritableAccount,\n type WritableSignerAccount,\n} from '@solana/kit';\nimport { GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS } from '../programs';\nimport { getAccountMetaFactory, type ResolvedAccount } from '../shared';\nimport { getWorkOrderErrorMessage } from '../../utils/enhanced-client-errors.js';\n\nexport const REJECT_WORK_DELIVERY_DISCRIMINATOR = new Uint8Array([\n 123, 7, 32, 171, 41, 109, 58, 250,\n]);\n\nexport function getRejectWorkDeliveryDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 8).encode(\n REJECT_WORK_DELIVERY_DISCRIMINATOR\n );\n}\n\nexport type RejectWorkDeliveryInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountWorkOrder extends string | AccountMeta<string> = string,\n TAccountWorkDelivery extends string | AccountMeta<string> = string,\n TAccountClient extends string | AccountMeta<string> = string,\n TAccountClock extends\n | string\n | AccountMeta<string> = 'SysvarC1ock11111111111111111111111111111111',\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountWorkOrder extends string\n ? WritableAccount<TAccountWorkOrder>\n : TAccountWorkOrder,\n TAccountWorkDelivery extends string\n ? ReadonlyAccount<TAccountWorkDelivery>\n : TAccountWorkDelivery,\n TAccountClient extends string\n ? WritableSignerAccount<TAccountClient> &\n AccountSignerMeta<TAccountClient>\n : TAccountClient,\n TAccountClock extends string\n ? ReadonlyAccount<TAccountClock>\n : TAccountClock,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type RejectWorkDeliveryInstructionData = {\n discriminator: ReadonlyUint8Array;\n rejectionReason: string;\n requestedChanges: Option<Array<string>>;\n};\n\nexport type RejectWorkDeliveryInstructionDataArgs = {\n rejectionReason: string;\n requestedChanges: OptionOrNullable<Array<string>>;\n};\n\nexport function getRejectWorkDeliveryInstructionDataEncoder(): Encoder<RejectWorkDeliveryInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n ['discriminator', fixEncoderSize(getBytesEncoder(), 8)],\n [\n 'rejectionReason',\n addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder()),\n ],\n [\n 'requestedChanges',\n getOptionEncoder(\n getArrayEncoder(\n addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder())\n )\n ),\n ],\n ]),\n (value) => ({ ...value, discriminator: REJECT_WORK_DELIVERY_DISCRIMINATOR })\n );\n}\n\nexport function getRejectWorkDeliveryInstructionDataDecoder(): Decoder<RejectWorkDeliveryInstructionData> {\n return getStructDecoder([\n ['discriminator', fixDecoderSize(getBytesDecoder(), 8)],\n [\n 'rejectionReason',\n addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder()),\n ],\n [\n 'requestedChanges',\n getOptionDecoder(\n getArrayDecoder(addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder()))\n ),\n ],\n ]);\n}\n\nexport function getRejectWorkDeliveryInstructionDataCodec(): Codec<\n RejectWorkDeliveryInstructionDataArgs,\n RejectWorkDeliveryInstructionData\n> {\n return combineCodec(\n getRejectWorkDeliveryInstructionDataEncoder(),\n getRejectWorkDeliveryInstructionDataDecoder()\n );\n}\n\nexport type RejectWorkDeliveryInput<\n TAccountWorkOrder extends string = string,\n TAccountWorkDelivery extends string = string,\n TAccountClient extends string = string,\n TAccountClock extends string = string,\n> = {\n workOrder: Address<TAccountWorkOrder>;\n workDelivery: Address<TAccountWorkDelivery>;\n client: TransactionSigner<TAccountClient>;\n clock?: Address<TAccountClock>;\n rejectionReason: RejectWorkDeliveryInstructionDataArgs['rejectionReason'];\n requestedChanges: RejectWorkDeliveryInstructionDataArgs['requestedChanges'];\n};\n\nexport function getRejectWorkDeliveryInstruction<\n TAccountWorkOrder extends string,\n TAccountWorkDelivery extends string,\n TAccountClient extends string,\n TAccountClock extends string,\n TProgramAddress extends\n Address = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: RejectWorkDeliveryInput<\n TAccountWorkOrder,\n TAccountWorkDelivery,\n TAccountClient,\n TAccountClock\n >,\n config?: { programAddress?: TProgramAddress }\n): RejectWorkDeliveryInstruction<\n TProgramAddress,\n TAccountWorkOrder,\n TAccountWorkDelivery,\n TAccountClient,\n TAccountClock\n> {\n // Program address.\n const programAddress =\n config?.programAddress ?? GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n workOrder: { value: input.workOrder ?? null, isWritable: true },\n workDelivery: { value: input.workDelivery ?? null, isWritable: false },\n client: { value: input.client ?? null, isWritable: true },\n clock: { value: input.clock ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolve default values.\n if (!accounts.clock.value) {\n accounts.clock.value =\n 'SysvarC1ock11111111111111111111111111111111' as Address<'SysvarC1ock11111111111111111111111111111111'>;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.workOrder),\n getAccountMeta(accounts.workDelivery),\n getAccountMeta(accounts.client),\n getAccountMeta(accounts.clock),\n ],\n programAddress,\n data: getRejectWorkDeliveryInstructionDataEncoder().encode(\n args as RejectWorkDeliveryInstructionDataArgs\n ),\n } as RejectWorkDeliveryInstruction<\n TProgramAddress,\n TAccountWorkOrder,\n TAccountWorkDelivery,\n TAccountClient,\n TAccountClock\n >;\n\n return instruction;\n}\n\nexport type ParsedRejectWorkDeliveryInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n workOrder: TAccountMetas[0];\n workDelivery: TAccountMetas[1];\n client: TAccountMetas[2];\n clock: TAccountMetas[3];\n };\n data: RejectWorkDeliveryInstructionData;\n};\n\nexport function parseRejectWorkDeliveryInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>\n): ParsedRejectWorkDeliveryInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 4) {\n throw new Error(getWorkOrderErrorMessage(\"reject_work_delivery\", instruction.accounts.length));\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = instruction.accounts![accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n workOrder: getNextAccount(),\n workDelivery: getNextAccount(),\n client: getNextAccount(),\n clock: getNextAccount(),\n },\n data: getRejectWorkDeliveryInstructionDataDecoder().decode(\n instruction.data\n ),\n };\n}\n","/**\n * This code was AUTOGENERATED using the codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n combineCodec,\n fixDecoderSize,\n fixEncoderSize,\n getAddressEncoder,\n getBytesDecoder,\n getBytesEncoder,\n getProgramDerivedAddress,\n getStructDecoder,\n getStructEncoder,\n getU32Decoder,\n getU32Encoder,\n transformEncoder,\n type AccountMeta,\n type AccountSignerMeta,\n type Address,\n type Codec,\n type Decoder,\n type Encoder,\n type Instruction,\n type InstructionWithAccounts,\n type InstructionWithData,\n type ReadonlyAccount,\n type ReadonlyUint8Array,\n type TransactionSigner,\n type WritableAccount,\n type WritableSignerAccount,\n} from '@solana/kit';\nimport {\n GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_INSTRUCTION_DATA,\n GHOSTSPEAK_MARKETPLACE_ERROR__MISSING_REQUIRED_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INSTRUCTION_PARSING_FAILED,\n isGhostspeakMarketplaceError,\n} from '../errors';\nimport { GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS } from '../programs';\nimport {\n expectAddress,\n getAccountMetaFactory,\n type ResolvedAccount,\n} from '../shared';\nimport {\n getAgentCustomizationDecoder,\n getAgentCustomizationEncoder,\n type AgentCustomization,\n type AgentCustomizationArgs,\n} from '../types';\n\nexport const REPLICATE_AGENT_DISCRIMINATOR = new Uint8Array([\n 252, 210, 89, 130, 31, 43, 39, 50,\n]);\n\nexport function getReplicateAgentDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 8).encode(\n REPLICATE_AGENT_DISCRIMINATOR\n );\n}\n\nexport type ReplicateAgentInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountReplicationTemplate extends string | AccountMeta<string> = string,\n TAccountNewAgent extends string | AccountMeta<string> = string,\n TAccountReplicationRecord extends string | AccountMeta<string> = string,\n TAccountRoyaltyStream extends string | AccountMeta<string> = string,\n TAccountBuyer extends string | AccountMeta<string> = string,\n TAccountSystemProgram extends\n | string\n | AccountMeta<string> = '11111111111111111111111111111111',\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountReplicationTemplate extends string\n ? WritableAccount<TAccountReplicationTemplate>\n : TAccountReplicationTemplate,\n TAccountNewAgent extends string\n ? WritableAccount<TAccountNewAgent>\n : TAccountNewAgent,\n TAccountReplicationRecord extends string\n ? WritableAccount<TAccountReplicationRecord>\n : TAccountReplicationRecord,\n TAccountRoyaltyStream extends string\n ? WritableAccount<TAccountRoyaltyStream>\n : TAccountRoyaltyStream,\n TAccountBuyer extends string\n ? WritableSignerAccount<TAccountBuyer> &\n AccountSignerMeta<TAccountBuyer>\n : TAccountBuyer,\n TAccountSystemProgram extends string\n ? ReadonlyAccount<TAccountSystemProgram>\n : TAccountSystemProgram,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type ReplicateAgentInstructionData = {\n discriminator: ReadonlyUint8Array;\n customization: AgentCustomization;\n royaltyPercentage: number;\n};\n\nexport type ReplicateAgentInstructionDataArgs = {\n customization: AgentCustomizationArgs;\n royaltyPercentage: number;\n};\n\nexport function getReplicateAgentInstructionDataEncoder(): Encoder<ReplicateAgentInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n ['discriminator', fixEncoderSize(getBytesEncoder(), 8)],\n ['customization', getAgentCustomizationEncoder()],\n ['royaltyPercentage', getU32Encoder()],\n ]),\n (value) => ({ ...value, discriminator: REPLICATE_AGENT_DISCRIMINATOR })\n );\n}\n\nexport function getReplicateAgentInstructionDataDecoder(): Decoder<ReplicateAgentInstructionData> {\n return getStructDecoder([\n ['discriminator', fixDecoderSize(getBytesDecoder(), 8)],\n ['customization', getAgentCustomizationDecoder()],\n ['royaltyPercentage', getU32Decoder()],\n ]);\n}\n\nexport function getReplicateAgentInstructionDataCodec(): Codec<\n ReplicateAgentInstructionDataArgs,\n ReplicateAgentInstructionData\n> {\n return combineCodec(\n getReplicateAgentInstructionDataEncoder(),\n getReplicateAgentInstructionDataDecoder()\n );\n}\n\nexport type ReplicateAgentAsyncInput<\n TAccountReplicationTemplate extends string = string,\n TAccountNewAgent extends string = string,\n TAccountReplicationRecord extends string = string,\n TAccountRoyaltyStream extends string = string,\n TAccountBuyer extends string = string,\n TAccountSystemProgram extends string = string,\n> = {\n replicationTemplate: Address<TAccountReplicationTemplate>;\n newAgent?: Address<TAccountNewAgent>;\n replicationRecord?: Address<TAccountReplicationRecord>;\n royaltyStream?: Address<TAccountRoyaltyStream>;\n buyer: TransactionSigner<TAccountBuyer>;\n systemProgram?: Address<TAccountSystemProgram>;\n customization: ReplicateAgentInstructionDataArgs['customization'];\n royaltyPercentage: ReplicateAgentInstructionDataArgs['royaltyPercentage'];\n};\n\nexport async function getReplicateAgentInstructionAsync<\n TAccountReplicationTemplate extends string,\n TAccountNewAgent extends string,\n TAccountReplicationRecord extends string,\n TAccountRoyaltyStream extends string,\n TAccountBuyer extends string,\n TAccountSystemProgram extends string,\n TProgramAddress extends\n Address = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: ReplicateAgentAsyncInput<\n TAccountReplicationTemplate,\n TAccountNewAgent,\n TAccountReplicationRecord,\n TAccountRoyaltyStream,\n TAccountBuyer,\n TAccountSystemProgram\n >,\n config?: { programAddress?: TProgramAddress }\n): Promise<\n ReplicateAgentInstruction<\n TProgramAddress,\n TAccountReplicationTemplate,\n TAccountNewAgent,\n TAccountReplicationRecord,\n TAccountRoyaltyStream,\n TAccountBuyer,\n TAccountSystemProgram\n >\n> {\n // Program address.\n const programAddress =\n config?.programAddress ?? GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n replicationTemplate: {\n value: input.replicationTemplate ?? null,\n isWritable: true,\n },\n newAgent: { value: input.newAgent ?? null, isWritable: true },\n replicationRecord: {\n value: input.replicationRecord ?? null,\n isWritable: true,\n },\n royaltyStream: { value: input.royaltyStream ?? null, isWritable: true },\n buyer: { value: input.buyer ?? null, isWritable: true },\n systemProgram: { value: input.systemProgram ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolve default values.\n if (!accounts.newAgent.value) {\n accounts.newAgent.value = await getProgramDerivedAddress({\n programAddress,\n seeds: [\n getBytesEncoder().encode(new Uint8Array([97, 103, 101, 110, 116])),\n getAddressEncoder().encode(expectAddress(accounts.buyer.value)),\n ],\n });\n }\n if (!accounts.replicationRecord.value) {\n accounts.replicationRecord.value = await getProgramDerivedAddress({\n programAddress,\n seeds: [\n getBytesEncoder().encode(\n new Uint8Array([\n 114, 101, 112, 108, 105, 99, 97, 116, 105, 111, 110, 95, 114, 101,\n 99, 111, 114, 100,\n ])\n ),\n getAddressEncoder().encode(\n expectAddress(accounts.replicationTemplate.value)\n ),\n getAddressEncoder().encode(expectAddress(accounts.buyer.value)),\n ],\n });\n }\n if (!accounts.royaltyStream.value) {\n accounts.royaltyStream.value = await getProgramDerivedAddress({\n programAddress,\n seeds: [\n getBytesEncoder().encode(\n new Uint8Array([\n 114, 111, 121, 97, 108, 116, 121, 95, 115, 116, 114, 101, 97, 109,\n ])\n ),\n getAddressEncoder().encode(expectAddress(accounts.newAgent.value)),\n ],\n });\n }\n if (!accounts.systemProgram.value) {\n accounts.systemProgram.value =\n '11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.replicationTemplate),\n getAccountMeta(accounts.newAgent),\n getAccountMeta(accounts.replicationRecord),\n getAccountMeta(accounts.royaltyStream),\n getAccountMeta(accounts.buyer),\n getAccountMeta(accounts.systemProgram),\n ],\n programAddress,\n data: getReplicateAgentInstructionDataEncoder().encode(\n args as ReplicateAgentInstructionDataArgs\n ),\n } as ReplicateAgentInstruction<\n TProgramAddress,\n TAccountReplicationTemplate,\n TAccountNewAgent,\n TAccountReplicationRecord,\n TAccountRoyaltyStream,\n TAccountBuyer,\n TAccountSystemProgram\n >;\n\n return instruction;\n}\n\nexport type ReplicateAgentInput<\n TAccountReplicationTemplate extends string = string,\n TAccountNewAgent extends string = string,\n TAccountReplicationRecord extends string = string,\n TAccountRoyaltyStream extends string = string,\n TAccountBuyer extends string = string,\n TAccountSystemProgram extends string = string,\n> = {\n replicationTemplate: Address<TAccountReplicationTemplate>;\n newAgent: Address<TAccountNewAgent>;\n replicationRecord: Address<TAccountReplicationRecord>;\n royaltyStream: Address<TAccountRoyaltyStream>;\n buyer: TransactionSigner<TAccountBuyer>;\n systemProgram?: Address<TAccountSystemProgram>;\n customization: ReplicateAgentInstructionDataArgs['customization'];\n royaltyPercentage: ReplicateAgentInstructionDataArgs['royaltyPercentage'];\n};\n\nexport function getReplicateAgentInstruction<\n TAccountReplicationTemplate extends string,\n TAccountNewAgent extends string,\n TAccountReplicationRecord extends string,\n TAccountRoyaltyStream extends string,\n TAccountBuyer extends string,\n TAccountSystemProgram extends string,\n TProgramAddress extends\n Address = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: ReplicateAgentInput<\n TAccountReplicationTemplate,\n TAccountNewAgent,\n TAccountReplicationRecord,\n TAccountRoyaltyStream,\n TAccountBuyer,\n TAccountSystemProgram\n >,\n config?: { programAddress?: TProgramAddress }\n): ReplicateAgentInstruction<\n TProgramAddress,\n TAccountReplicationTemplate,\n TAccountNewAgent,\n TAccountReplicationRecord,\n TAccountRoyaltyStream,\n TAccountBuyer,\n TAccountSystemProgram\n> {\n // Program address.\n const programAddress =\n config?.programAddress ?? GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n replicationTemplate: {\n value: input.replicationTemplate ?? null,\n isWritable: true,\n },\n newAgent: { value: input.newAgent ?? null, isWritable: true },\n replicationRecord: {\n value: input.replicationRecord ?? null,\n isWritable: true,\n },\n royaltyStream: { value: input.royaltyStream ?? null, isWritable: true },\n buyer: { value: input.buyer ?? null, isWritable: true },\n systemProgram: { value: input.systemProgram ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolve default values.\n if (!accounts.systemProgram.value) {\n accounts.systemProgram.value =\n '11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.replicationTemplate),\n getAccountMeta(accounts.newAgent),\n getAccountMeta(accounts.replicationRecord),\n getAccountMeta(accounts.royaltyStream),\n getAccountMeta(accounts.buyer),\n getAccountMeta(accounts.systemProgram),\n ],\n programAddress,\n data: getReplicateAgentInstructionDataEncoder().encode(\n args as ReplicateAgentInstructionDataArgs\n ),\n } as ReplicateAgentInstruction<\n TProgramAddress,\n TAccountReplicationTemplate,\n TAccountNewAgent,\n TAccountReplicationRecord,\n TAccountRoyaltyStream,\n TAccountBuyer,\n TAccountSystemProgram\n >;\n\n return instruction;\n}\n\nexport type ParsedReplicateAgentInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n replicationTemplate: TAccountMetas[0];\n newAgent: TAccountMetas[1];\n replicationRecord: TAccountMetas[2];\n royaltyStream: TAccountMetas[3];\n buyer: TAccountMetas[4];\n systemProgram: TAccountMetas[5];\n };\n data: ReplicateAgentInstructionData;\n};\n\nexport function parseReplicateAgentInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>\n): ParsedReplicateAgentInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 6) {\n throw new Error('[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts');\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = instruction.accounts![accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n replicationTemplate: getNextAccount(),\n newAgent: getNextAccount(),\n replicationRecord: getNextAccount(),\n royaltyStream: getNextAccount(),\n buyer: getNextAccount(),\n systemProgram: getNextAccount(),\n },\n data: getReplicateAgentInstructionDataDecoder().decode(instruction.data),\n };\n}\n","/**\n * This code was AUTOGENERATED using the codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n addDecoderSizePrefix,\n addEncoderSizePrefix,\n combineCodec,\n fixDecoderSize,\n fixEncoderSize,\n getBooleanDecoder,\n getBooleanEncoder,\n getBytesDecoder,\n getBytesEncoder,\n getProgramDerivedAddress,\n getStructDecoder,\n getStructEncoder,\n getU32Decoder,\n getU32Encoder,\n getUtf8Decoder,\n getUtf8Encoder,\n transformEncoder,\n type AccountMeta,\n type AccountSignerMeta,\n type Address,\n type Codec,\n type Decoder,\n type Encoder,\n type Instruction,\n type InstructionWithAccounts,\n type InstructionWithData,\n type ReadonlyAccount,\n type ReadonlySignerAccount,\n type ReadonlyUint8Array,\n type TransactionSigner,\n type WritableAccount,\n} from '@solana/kit';\nimport {\n GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_INSTRUCTION_DATA,\n GHOSTSPEAK_MARKETPLACE_ERROR__MISSING_REQUIRED_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INSTRUCTION_PARSING_FAILED,\n isGhostspeakMarketplaceError,\n} from '../errors';\nimport { GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS } from '../programs';\nimport { getAccountMetaFactory, type ResolvedAccount } from '../shared';\n\nexport const RESOLVE_DISPUTE_DISCRIMINATOR = new Uint8Array([\n 231, 6, 202, 6, 96, 103, 12, 230,\n]);\n\nexport function getResolveDisputeDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 8).encode(\n RESOLVE_DISPUTE_DISCRIMINATOR\n );\n}\n\nexport type ResolveDisputeInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountDispute extends string | AccountMeta<string> = string,\n TAccountArbitratorRegistry extends string | AccountMeta<string> = string,\n TAccountArbitrator extends string | AccountMeta<string> = string,\n TAccountClock extends\n | string\n | AccountMeta<string> = 'SysvarC1ock11111111111111111111111111111111',\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountDispute extends string\n ? WritableAccount<TAccountDispute>\n : TAccountDispute,\n TAccountArbitratorRegistry extends string\n ? ReadonlyAccount<TAccountArbitratorRegistry>\n : TAccountArbitratorRegistry,\n TAccountArbitrator extends string\n ? ReadonlySignerAccount<TAccountArbitrator> &\n AccountSignerMeta<TAccountArbitrator>\n : TAccountArbitrator,\n TAccountClock extends string\n ? ReadonlyAccount<TAccountClock>\n : TAccountClock,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type ResolveDisputeInstructionData = {\n discriminator: ReadonlyUint8Array;\n resolution: string;\n awardToComplainant: boolean;\n};\n\nexport type ResolveDisputeInstructionDataArgs = {\n resolution: string;\n awardToComplainant: boolean;\n};\n\nexport function getResolveDisputeInstructionDataEncoder(): Encoder<ResolveDisputeInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n ['discriminator', fixEncoderSize(getBytesEncoder(), 8)],\n ['resolution', addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder())],\n ['awardToComplainant', getBooleanEncoder()],\n ]),\n (value) => ({ ...value, discriminator: RESOLVE_DISPUTE_DISCRIMINATOR })\n );\n}\n\nexport function getResolveDisputeInstructionDataDecoder(): Decoder<ResolveDisputeInstructionData> {\n return getStructDecoder([\n ['discriminator', fixDecoderSize(getBytesDecoder(), 8)],\n ['resolution', addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())],\n ['awardToComplainant', getBooleanDecoder()],\n ]);\n}\n\nexport function getResolveDisputeInstructionDataCodec(): Codec<\n ResolveDisputeInstructionDataArgs,\n ResolveDisputeInstructionData\n> {\n return combineCodec(\n getResolveDisputeInstructionDataEncoder(),\n getResolveDisputeInstructionDataDecoder()\n );\n}\n\nexport type ResolveDisputeAsyncInput<\n TAccountDispute extends string = string,\n TAccountArbitratorRegistry extends string = string,\n TAccountArbitrator extends string = string,\n TAccountClock extends string = string,\n> = {\n /** Dispute account with canonical validation */\n dispute: Address<TAccountDispute>;\n /** Arbitrator registry for authority validation */\n arbitratorRegistry?: Address<TAccountArbitratorRegistry>;\n /** Enhanced arbitrator verification */\n arbitrator: TransactionSigner<TAccountArbitrator>;\n /** Clock sysvar for timestamp validation */\n clock?: Address<TAccountClock>;\n resolution: ResolveDisputeInstructionDataArgs['resolution'];\n awardToComplainant: ResolveDisputeInstructionDataArgs['awardToComplainant'];\n};\n\nexport async function getResolveDisputeInstructionAsync<\n TAccountDispute extends string,\n TAccountArbitratorRegistry extends string,\n TAccountArbitrator extends string,\n TAccountClock extends string,\n TProgramAddress extends\n Address = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: ResolveDisputeAsyncInput<\n TAccountDispute,\n TAccountArbitratorRegistry,\n TAccountArbitrator,\n TAccountClock\n >,\n config?: { programAddress?: TProgramAddress }\n): Promise<\n ResolveDisputeInstruction<\n TProgramAddress,\n TAccountDispute,\n TAccountArbitratorRegistry,\n TAccountArbitrator,\n TAccountClock\n >\n> {\n // Program address.\n const programAddress =\n config?.programAddress ?? GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n dispute: { value: input.dispute ?? null, isWritable: true },\n arbitratorRegistry: {\n value: input.arbitratorRegistry ?? null,\n isWritable: false,\n },\n arbitrator: { value: input.arbitrator ?? null, isWritable: false },\n clock: { value: input.clock ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolve default values.\n if (!accounts.arbitratorRegistry.value) {\n accounts.arbitratorRegistry.value = await getProgramDerivedAddress({\n programAddress,\n seeds: [\n getBytesEncoder().encode(\n new Uint8Array([\n 97, 114, 98, 105, 116, 114, 97, 116, 111, 114, 95, 114, 101, 103,\n 105, 115, 116, 114, 121,\n ])\n ),\n ],\n });\n }\n if (!accounts.clock.value) {\n accounts.clock.value =\n 'SysvarC1ock11111111111111111111111111111111' as Address<'SysvarC1ock11111111111111111111111111111111'>;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.dispute),\n getAccountMeta(accounts.arbitratorRegistry),\n getAccountMeta(accounts.arbitrator),\n getAccountMeta(accounts.clock),\n ],\n programAddress,\n data: getResolveDisputeInstructionDataEncoder().encode(\n args as ResolveDisputeInstructionDataArgs\n ),\n } as ResolveDisputeInstruction<\n TProgramAddress,\n TAccountDispute,\n TAccountArbitratorRegistry,\n TAccountArbitrator,\n TAccountClock\n >;\n\n return instruction;\n}\n\nexport type ResolveDisputeInput<\n TAccountDispute extends string = string,\n TAccountArbitratorRegistry extends string = string,\n TAccountArbitrator extends string = string,\n TAccountClock extends string = string,\n> = {\n /** Dispute account with canonical validation */\n dispute: Address<TAccountDispute>;\n /** Arbitrator registry for authority validation */\n arbitratorRegistry: Address<TAccountArbitratorRegistry>;\n /** Enhanced arbitrator verification */\n arbitrator: TransactionSigner<TAccountArbitrator>;\n /** Clock sysvar for timestamp validation */\n clock?: Address<TAccountClock>;\n resolution: ResolveDisputeInstructionDataArgs['resolution'];\n awardToComplainant: ResolveDisputeInstructionDataArgs['awardToComplainant'];\n};\n\nexport function getResolveDisputeInstruction<\n TAccountDispute extends string,\n TAccountArbitratorRegistry extends string,\n TAccountArbitrator extends string,\n TAccountClock extends string,\n TProgramAddress extends\n Address = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: ResolveDisputeInput<\n TAccountDispute,\n TAccountArbitratorRegistry,\n TAccountArbitrator,\n TAccountClock\n >,\n config?: { programAddress?: TProgramAddress }\n): ResolveDisputeInstruction<\n TProgramAddress,\n TAccountDispute,\n TAccountArbitratorRegistry,\n TAccountArbitrator,\n TAccountClock\n> {\n // Program address.\n const programAddress =\n config?.programAddress ?? GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n dispute: { value: input.dispute ?? null, isWritable: true },\n arbitratorRegistry: {\n value: input.arbitratorRegistry ?? null,\n isWritable: false,\n },\n arbitrator: { value: input.arbitrator ?? null, isWritable: false },\n clock: { value: input.clock ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolve default values.\n if (!accounts.clock.value) {\n accounts.clock.value =\n 'SysvarC1ock11111111111111111111111111111111' as Address<'SysvarC1ock11111111111111111111111111111111'>;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.dispute),\n getAccountMeta(accounts.arbitratorRegistry),\n getAccountMeta(accounts.arbitrator),\n getAccountMeta(accounts.clock),\n ],\n programAddress,\n data: getResolveDisputeInstructionDataEncoder().encode(\n args as ResolveDisputeInstructionDataArgs\n ),\n } as ResolveDisputeInstruction<\n TProgramAddress,\n TAccountDispute,\n TAccountArbitratorRegistry,\n TAccountArbitrator,\n TAccountClock\n >;\n\n return instruction;\n}\n\nexport type ParsedResolveDisputeInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n /** Dispute account with canonical validation */\n dispute: TAccountMetas[0];\n /** Arbitrator registry for authority validation */\n arbitratorRegistry: TAccountMetas[1];\n /** Enhanced arbitrator verification */\n arbitrator: TAccountMetas[2];\n /** Clock sysvar for timestamp validation */\n clock: TAccountMetas[3];\n };\n data: ResolveDisputeInstructionData;\n};\n\nexport function parseResolveDisputeInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>\n): ParsedResolveDisputeInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 4) {\n throw new Error('[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts');\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = instruction.accounts![accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n dispute: getNextAccount(),\n arbitratorRegistry: getNextAccount(),\n arbitrator: getNextAccount(),\n clock: getNextAccount(),\n },\n data: getResolveDisputeInstructionDataDecoder().decode(instruction.data),\n };\n}\n","/**\n * This code was AUTOGENERATED using the codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n addDecoderSizePrefix,\n addEncoderSizePrefix,\n combineCodec,\n fixDecoderSize,\n fixEncoderSize,\n getAddressDecoder,\n getAddressEncoder,\n getBytesDecoder,\n getBytesEncoder,\n getI64Decoder,\n getI64Encoder,\n getStructDecoder,\n getStructEncoder,\n getU32Decoder,\n getU32Encoder,\n getU64Decoder,\n getU64Encoder,\n getUtf8Decoder,\n getUtf8Encoder,\n transformEncoder,\n type AccountMeta,\n type AccountSignerMeta,\n type Address,\n type Codec,\n type Decoder,\n type Encoder,\n type Instruction,\n type InstructionWithAccounts,\n type InstructionWithData,\n type ReadonlyAccount,\n type ReadonlyUint8Array,\n type TransactionSigner,\n type WritableAccount,\n type WritableSignerAccount,\n} from '@solana/kit';\nimport {\n GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_INSTRUCTION_DATA,\n GHOSTSPEAK_MARKETPLACE_ERROR__MISSING_REQUIRED_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INSTRUCTION_PARSING_FAILED,\n isGhostspeakMarketplaceError,\n} from '../errors';\nimport { GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS } from '../programs';\nimport { getAccountMetaFactory, type ResolvedAccount } from '../shared';\n\nexport const SEND_A2A_MESSAGE_DISCRIMINATOR = new Uint8Array([\n 84, 12, 203, 77, 36, 199, 15, 83,\n]);\n\nexport function getSendA2aMessageDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 8).encode(\n SEND_A2A_MESSAGE_DISCRIMINATOR\n );\n}\n\nexport type SendA2aMessageInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountMessage extends string | AccountMeta<string> = string,\n TAccountSession extends string | AccountMeta<string> = string,\n TAccountSender extends string | AccountMeta<string> = string,\n TAccountSystemProgram extends\n | string\n | AccountMeta<string> = '11111111111111111111111111111111',\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountMessage extends string\n ? WritableAccount<TAccountMessage>\n : TAccountMessage,\n TAccountSession extends string\n ? WritableAccount<TAccountSession>\n : TAccountSession,\n TAccountSender extends string\n ? WritableSignerAccount<TAccountSender> &\n AccountSignerMeta<TAccountSender>\n : TAccountSender,\n TAccountSystemProgram extends string\n ? ReadonlyAccount<TAccountSystemProgram>\n : TAccountSystemProgram,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type SendA2aMessageInstructionData = {\n discriminator: ReadonlyUint8Array;\n messageId: bigint;\n sessionId: bigint;\n sender: Address;\n content: string;\n messageType: string;\n timestamp: bigint;\n};\n\nexport type SendA2aMessageInstructionDataArgs = {\n messageId: number | bigint;\n sessionId: number | bigint;\n sender: Address;\n content: string;\n messageType: string;\n timestamp: number | bigint;\n};\n\nexport function getSendA2aMessageInstructionDataEncoder(): Encoder<SendA2aMessageInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n ['discriminator', fixEncoderSize(getBytesEncoder(), 8)],\n ['messageId', getU64Encoder()],\n ['sessionId', getU64Encoder()],\n ['sender', getAddressEncoder()],\n ['content', addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder())],\n ['messageType', addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder())],\n ['timestamp', getI64Encoder()],\n ]),\n (value) => ({ ...value, discriminator: SEND_A2A_MESSAGE_DISCRIMINATOR })\n );\n}\n\nexport function getSendA2aMessageInstructionDataDecoder(): Decoder<SendA2aMessageInstructionData> {\n return getStructDecoder([\n ['discriminator', fixDecoderSize(getBytesDecoder(), 8)],\n ['messageId', getU64Decoder()],\n ['sessionId', getU64Decoder()],\n ['sender', getAddressDecoder()],\n ['content', addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())],\n ['messageType', addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())],\n ['timestamp', getI64Decoder()],\n ]);\n}\n\nexport function getSendA2aMessageInstructionDataCodec(): Codec<\n SendA2aMessageInstructionDataArgs,\n SendA2aMessageInstructionData\n> {\n return combineCodec(\n getSendA2aMessageInstructionDataEncoder(),\n getSendA2aMessageInstructionDataDecoder()\n );\n}\n\nexport type SendA2aMessageInput<\n TAccountMessage extends string = string,\n TAccountSession extends string = string,\n TAccountSender extends string = string,\n TAccountSystemProgram extends string = string,\n> = {\n message: Address<TAccountMessage>;\n session: Address<TAccountSession>;\n sender: TransactionSigner<TAccountSender>;\n systemProgram?: Address<TAccountSystemProgram>;\n messageId: SendA2aMessageInstructionDataArgs['messageId'];\n sessionId: SendA2aMessageInstructionDataArgs['sessionId'];\n senderArg: SendA2aMessageInstructionDataArgs['sender'];\n content: SendA2aMessageInstructionDataArgs['content'];\n messageType: SendA2aMessageInstructionDataArgs['messageType'];\n timestamp: SendA2aMessageInstructionDataArgs['timestamp'];\n};\n\nexport function getSendA2aMessageInstruction<\n TAccountMessage extends string,\n TAccountSession extends string,\n TAccountSender extends string,\n TAccountSystemProgram extends string,\n TProgramAddress extends\n Address = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: SendA2aMessageInput<\n TAccountMessage,\n TAccountSession,\n TAccountSender,\n TAccountSystemProgram\n >,\n config?: { programAddress?: TProgramAddress }\n): SendA2aMessageInstruction<\n TProgramAddress,\n TAccountMessage,\n TAccountSession,\n TAccountSender,\n TAccountSystemProgram\n> {\n // Program address.\n const programAddress =\n config?.programAddress ?? GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n message: { value: input.message ?? null, isWritable: true },\n session: { value: input.session ?? null, isWritable: true },\n sender: { value: input.sender ?? null, isWritable: true },\n systemProgram: { value: input.systemProgram ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input, sender: input.senderArg };\n\n // Resolve default values.\n if (!accounts.systemProgram.value) {\n accounts.systemProgram.value =\n '11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.message),\n getAccountMeta(accounts.session),\n getAccountMeta(accounts.sender),\n getAccountMeta(accounts.systemProgram),\n ],\n programAddress,\n data: getSendA2aMessageInstructionDataEncoder().encode(\n args as SendA2aMessageInstructionDataArgs\n ),\n } as SendA2aMessageInstruction<\n TProgramAddress,\n TAccountMessage,\n TAccountSession,\n TAccountSender,\n TAccountSystemProgram\n >;\n\n return instruction;\n}\n\nexport type ParsedSendA2aMessageInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n message: TAccountMetas[0];\n session: TAccountMetas[1];\n sender: TAccountMetas[2];\n systemProgram: TAccountMetas[3];\n };\n data: SendA2aMessageInstructionData;\n};\n\nexport function parseSendA2aMessageInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>\n): ParsedSendA2aMessageInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 4) {\n throw new Error('[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts');\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = instruction.accounts![accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n message: getNextAccount(),\n session: getNextAccount(),\n sender: getNextAccount(),\n systemProgram: getNextAccount(),\n },\n data: getSendA2aMessageInstructionDataDecoder().decode(instruction.data),\n };\n}\n","/**\n * This code was AUTOGENERATED using the codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n addDecoderSizePrefix,\n addEncoderSizePrefix,\n combineCodec,\n fixDecoderSize,\n fixEncoderSize,\n getAddressEncoder,\n getBooleanDecoder,\n getBooleanEncoder,\n getBytesDecoder,\n getBytesEncoder,\n getProgramDerivedAddress,\n getStructDecoder,\n getStructEncoder,\n getU32Decoder,\n getU32Encoder,\n getUtf8Decoder,\n getUtf8Encoder,\n transformEncoder,\n type AccountMeta,\n type AccountSignerMeta,\n type Address,\n type Codec,\n type Decoder,\n type Encoder,\n type Instruction,\n type InstructionWithAccounts,\n type InstructionWithData,\n type ReadonlyAccount,\n type ReadonlyUint8Array,\n type TransactionSigner,\n type WritableAccount,\n type WritableSignerAccount,\n} from '@solana/kit';\nimport {\n GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_INSTRUCTION_DATA,\n GHOSTSPEAK_MARKETPLACE_ERROR__MISSING_REQUIRED_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INSTRUCTION_PARSING_FAILED,\n isGhostspeakMarketplaceError,\n} from '../errors';\nimport { GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS } from '../programs';\nimport {\n expectAddress,\n expectSome,\n getAccountMetaFactory,\n type ResolvedAccount,\n} from '../shared';\nimport {\n getMessageMetadataDecoder,\n getMessageMetadataEncoder,\n getMessageTypeDecoder,\n getMessageTypeEncoder,\n type MessageMetadata,\n type MessageMetadataArgs,\n type MessageType,\n type MessageTypeArgs,\n} from '../types';\n\nexport const SEND_ENHANCED_MESSAGE_DISCRIMINATOR = new Uint8Array([\n 157, 174, 222, 205, 233, 240, 244, 136,\n]);\n\nexport function getSendEnhancedMessageDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 8).encode(\n SEND_ENHANCED_MESSAGE_DISCRIMINATOR\n );\n}\n\nexport type SendEnhancedMessageInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountMessage extends string | AccountMeta<string> = string,\n TAccountChannel extends string | AccountMeta<string> = string,\n TAccountReentrancyGuard extends string | AccountMeta<string> = string,\n TAccountSender extends string | AccountMeta<string> = string,\n TAccountSystemProgram extends\n | string\n | AccountMeta<string> = '11111111111111111111111111111111',\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountMessage extends string\n ? WritableAccount<TAccountMessage>\n : TAccountMessage,\n TAccountChannel extends string\n ? WritableAccount<TAccountChannel>\n : TAccountChannel,\n TAccountReentrancyGuard extends string\n ? WritableAccount<TAccountReentrancyGuard>\n : TAccountReentrancyGuard,\n TAccountSender extends string\n ? WritableSignerAccount<TAccountSender> &\n AccountSignerMeta<TAccountSender>\n : TAccountSender,\n TAccountSystemProgram extends string\n ? ReadonlyAccount<TAccountSystemProgram>\n : TAccountSystemProgram,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type SendEnhancedMessageInstructionData = {\n discriminator: ReadonlyUint8Array;\n messageId: string;\n content: string;\n messageType: MessageType;\n metadata: MessageMetadata;\n isEncrypted: boolean;\n};\n\nexport type SendEnhancedMessageInstructionDataArgs = {\n messageId: string;\n content: string;\n messageType: MessageTypeArgs;\n metadata: MessageMetadataArgs;\n isEncrypted: boolean;\n};\n\nexport function getSendEnhancedMessageInstructionDataEncoder(): Encoder<SendEnhancedMessageInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n ['discriminator', fixEncoderSize(getBytesEncoder(), 8)],\n ['messageId', addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder())],\n ['content', addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder())],\n ['messageType', getMessageTypeEncoder()],\n ['metadata', getMessageMetadataEncoder()],\n ['isEncrypted', getBooleanEncoder()],\n ]),\n (value) => ({\n ...value,\n discriminator: SEND_ENHANCED_MESSAGE_DISCRIMINATOR,\n })\n );\n}\n\nexport function getSendEnhancedMessageInstructionDataDecoder(): Decoder<SendEnhancedMessageInstructionData> {\n return getStructDecoder([\n ['discriminator', fixDecoderSize(getBytesDecoder(), 8)],\n ['messageId', addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())],\n ['content', addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())],\n ['messageType', getMessageTypeDecoder()],\n ['metadata', getMessageMetadataDecoder()],\n ['isEncrypted', getBooleanDecoder()],\n ]);\n}\n\nexport function getSendEnhancedMessageInstructionDataCodec(): Codec<\n SendEnhancedMessageInstructionDataArgs,\n SendEnhancedMessageInstructionData\n> {\n return combineCodec(\n getSendEnhancedMessageInstructionDataEncoder(),\n getSendEnhancedMessageInstructionDataDecoder()\n );\n}\n\nexport type SendEnhancedMessageAsyncInput<\n TAccountMessage extends string = string,\n TAccountChannel extends string = string,\n TAccountReentrancyGuard extends string = string,\n TAccountSender extends string = string,\n TAccountSystemProgram extends string = string,\n> = {\n message?: Address<TAccountMessage>;\n channel: Address<TAccountChannel>;\n reentrancyGuard?: Address<TAccountReentrancyGuard>;\n sender: TransactionSigner<TAccountSender>;\n systemProgram?: Address<TAccountSystemProgram>;\n messageId: SendEnhancedMessageInstructionDataArgs['messageId'];\n content: SendEnhancedMessageInstructionDataArgs['content'];\n messageType: SendEnhancedMessageInstructionDataArgs['messageType'];\n metadata: SendEnhancedMessageInstructionDataArgs['metadata'];\n isEncrypted: SendEnhancedMessageInstructionDataArgs['isEncrypted'];\n};\n\nexport async function getSendEnhancedMessageInstructionAsync<\n TAccountMessage extends string,\n TAccountChannel extends string,\n TAccountReentrancyGuard extends string,\n TAccountSender extends string,\n TAccountSystemProgram extends string,\n TProgramAddress extends\n Address = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: SendEnhancedMessageAsyncInput<\n TAccountMessage,\n TAccountChannel,\n TAccountReentrancyGuard,\n TAccountSender,\n TAccountSystemProgram\n >,\n config?: { programAddress?: TProgramAddress }\n): Promise<\n SendEnhancedMessageInstruction<\n TProgramAddress,\n TAccountMessage,\n TAccountChannel,\n TAccountReentrancyGuard,\n TAccountSender,\n TAccountSystemProgram\n >\n> {\n // Program address.\n const programAddress =\n config?.programAddress ?? GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n message: { value: input.message ?? null, isWritable: true },\n channel: { value: input.channel ?? null, isWritable: true },\n reentrancyGuard: { value: input.reentrancyGuard ?? null, isWritable: true },\n sender: { value: input.sender ?? null, isWritable: true },\n systemProgram: { value: input.systemProgram ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolve default values.\n if (!accounts.message.value) {\n accounts.message.value = await getProgramDerivedAddress({\n programAddress,\n seeds: [\n getBytesEncoder().encode(\n new Uint8Array([109, 101, 115, 115, 97, 103, 101])\n ),\n getAddressEncoder().encode(expectAddress(accounts.channel.value)),\n addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder()).encode(\n expectSome(args.messageId)\n ),\n ],\n });\n }\n if (!accounts.reentrancyGuard.value) {\n accounts.reentrancyGuard.value = await getProgramDerivedAddress({\n programAddress,\n seeds: [\n getBytesEncoder().encode(\n new Uint8Array([\n 114, 101, 101, 110, 116, 114, 97, 110, 99, 121, 95, 103, 117, 97,\n 114, 100,\n ])\n ),\n ],\n });\n }\n if (!accounts.systemProgram.value) {\n accounts.systemProgram.value =\n '11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.message),\n getAccountMeta(accounts.channel),\n getAccountMeta(accounts.reentrancyGuard),\n getAccountMeta(accounts.sender),\n getAccountMeta(accounts.systemProgram),\n ],\n programAddress,\n data: getSendEnhancedMessageInstructionDataEncoder().encode(\n args as SendEnhancedMessageInstructionDataArgs\n ),\n } as SendEnhancedMessageInstruction<\n TProgramAddress,\n TAccountMessage,\n TAccountChannel,\n TAccountReentrancyGuard,\n TAccountSender,\n TAccountSystemProgram\n >;\n\n return instruction;\n}\n\nexport type SendEnhancedMessageInput<\n TAccountMessage extends string = string,\n TAccountChannel extends string = string,\n TAccountReentrancyGuard extends string = string,\n TAccountSender extends string = string,\n TAccountSystemProgram extends string = string,\n> = {\n message: Address<TAccountMessage>;\n channel: Address<TAccountChannel>;\n reentrancyGuard: Address<TAccountReentrancyGuard>;\n sender: TransactionSigner<TAccountSender>;\n systemProgram?: Address<TAccountSystemProgram>;\n messageId: SendEnhancedMessageInstructionDataArgs['messageId'];\n content: SendEnhancedMessageInstructionDataArgs['content'];\n messageType: SendEnhancedMessageInstructionDataArgs['messageType'];\n metadata: SendEnhancedMessageInstructionDataArgs['metadata'];\n isEncrypted: SendEnhancedMessageInstructionDataArgs['isEncrypted'];\n};\n\nexport function getSendEnhancedMessageInstruction<\n TAccountMessage extends string,\n TAccountChannel extends string,\n TAccountReentrancyGuard extends string,\n TAccountSender extends string,\n TAccountSystemProgram extends string,\n TProgramAddress extends\n Address = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: SendEnhancedMessageInput<\n TAccountMessage,\n TAccountChannel,\n TAccountReentrancyGuard,\n TAccountSender,\n TAccountSystemProgram\n >,\n config?: { programAddress?: TProgramAddress }\n): SendEnhancedMessageInstruction<\n TProgramAddress,\n TAccountMessage,\n TAccountChannel,\n TAccountReentrancyGuard,\n TAccountSender,\n TAccountSystemProgram\n> {\n // Program address.\n const programAddress =\n config?.programAddress ?? GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n message: { value: input.message ?? null, isWritable: true },\n channel: { value: input.channel ?? null, isWritable: true },\n reentrancyGuard: { value: input.reentrancyGuard ?? null, isWritable: true },\n sender: { value: input.sender ?? null, isWritable: true },\n systemProgram: { value: input.systemProgram ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolve default values.\n if (!accounts.systemProgram.value) {\n accounts.systemProgram.value =\n '11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.message),\n getAccountMeta(accounts.channel),\n getAccountMeta(accounts.reentrancyGuard),\n getAccountMeta(accounts.sender),\n getAccountMeta(accounts.systemProgram),\n ],\n programAddress,\n data: getSendEnhancedMessageInstructionDataEncoder().encode(\n args as SendEnhancedMessageInstructionDataArgs\n ),\n } as SendEnhancedMessageInstruction<\n TProgramAddress,\n TAccountMessage,\n TAccountChannel,\n TAccountReentrancyGuard,\n TAccountSender,\n TAccountSystemProgram\n >;\n\n return instruction;\n}\n\nexport type ParsedSendEnhancedMessageInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n message: TAccountMetas[0];\n channel: TAccountMetas[1];\n reentrancyGuard: TAccountMetas[2];\n sender: TAccountMetas[3];\n systemProgram: TAccountMetas[4];\n };\n data: SendEnhancedMessageInstructionData;\n};\n\nexport function parseSendEnhancedMessageInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>\n): ParsedSendEnhancedMessageInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 5) {\n throw new Error('[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts');\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = instruction.accounts![accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n message: getNextAccount(),\n channel: getNextAccount(),\n reentrancyGuard: getNextAccount(),\n sender: getNextAccount(),\n systemProgram: getNextAccount(),\n },\n data: getSendEnhancedMessageInstructionDataDecoder().decode(\n instruction.data\n ),\n };\n}\n","/**\n * This code was AUTOGENERATED using the codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n addDecoderSizePrefix,\n addEncoderSizePrefix,\n combineCodec,\n fixDecoderSize,\n fixEncoderSize,\n getBooleanDecoder,\n getBooleanEncoder,\n getBytesDecoder,\n getBytesEncoder,\n getStructDecoder,\n getStructEncoder,\n getU32Decoder,\n getU32Encoder,\n getUtf8Decoder,\n getUtf8Encoder,\n transformEncoder,\n type AccountMeta,\n type AccountSignerMeta,\n type Address,\n type Codec,\n type Decoder,\n type Encoder,\n type Instruction,\n type InstructionWithAccounts,\n type InstructionWithData,\n type ReadonlyAccount,\n type ReadonlyUint8Array,\n type TransactionSigner,\n type WritableAccount,\n type WritableSignerAccount,\n} from '@solana/kit';\nimport {\n GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_INSTRUCTION_DATA,\n GHOSTSPEAK_MARKETPLACE_ERROR__MISSING_REQUIRED_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INSTRUCTION_PARSING_FAILED,\n isGhostspeakMarketplaceError,\n} from '../errors';\nimport { GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS } from '../programs';\nimport { getAccountMetaFactory, type ResolvedAccount } from '../shared';\nimport {\n getMessageTypeDecoder,\n getMessageTypeEncoder,\n type MessageType,\n type MessageTypeArgs,\n} from '../types';\n\nexport const SEND_MESSAGE_DISCRIMINATOR = new Uint8Array([\n 57, 40, 34, 178, 189, 10, 65, 26,\n]);\n\nexport function getSendMessageDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 8).encode(\n SEND_MESSAGE_DISCRIMINATOR\n );\n}\n\nexport type SendMessageInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountMessage extends string | AccountMeta<string> = string,\n TAccountChannel extends string | AccountMeta<string> = string,\n TAccountSender extends string | AccountMeta<string> = string,\n TAccountSystemProgram extends\n | string\n | AccountMeta<string> = '11111111111111111111111111111111',\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountMessage extends string\n ? WritableAccount<TAccountMessage>\n : TAccountMessage,\n TAccountChannel extends string\n ? WritableAccount<TAccountChannel>\n : TAccountChannel,\n TAccountSender extends string\n ? WritableSignerAccount<TAccountSender> &\n AccountSignerMeta<TAccountSender>\n : TAccountSender,\n TAccountSystemProgram extends string\n ? ReadonlyAccount<TAccountSystemProgram>\n : TAccountSystemProgram,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type SendMessageInstructionData = {\n discriminator: ReadonlyUint8Array;\n content: string;\n messageType: MessageType;\n isEncrypted: boolean;\n};\n\nexport type SendMessageInstructionDataArgs = {\n content: string;\n messageType: MessageTypeArgs;\n isEncrypted: boolean;\n};\n\nexport function getSendMessageInstructionDataEncoder(): Encoder<SendMessageInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n ['discriminator', fixEncoderSize(getBytesEncoder(), 8)],\n ['content', addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder())],\n ['messageType', getMessageTypeEncoder()],\n ['isEncrypted', getBooleanEncoder()],\n ]),\n (value) => ({ ...value, discriminator: SEND_MESSAGE_DISCRIMINATOR })\n );\n}\n\nexport function getSendMessageInstructionDataDecoder(): Decoder<SendMessageInstructionData> {\n return getStructDecoder([\n ['discriminator', fixDecoderSize(getBytesDecoder(), 8)],\n ['content', addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())],\n ['messageType', getMessageTypeDecoder()],\n ['isEncrypted', getBooleanDecoder()],\n ]);\n}\n\nexport function getSendMessageInstructionDataCodec(): Codec<\n SendMessageInstructionDataArgs,\n SendMessageInstructionData\n> {\n return combineCodec(\n getSendMessageInstructionDataEncoder(),\n getSendMessageInstructionDataDecoder()\n );\n}\n\nexport type SendMessageInput<\n TAccountMessage extends string = string,\n TAccountChannel extends string = string,\n TAccountSender extends string = string,\n TAccountSystemProgram extends string = string,\n> = {\n message: Address<TAccountMessage>;\n channel: Address<TAccountChannel>;\n sender: TransactionSigner<TAccountSender>;\n systemProgram?: Address<TAccountSystemProgram>;\n content: SendMessageInstructionDataArgs['content'];\n messageType: SendMessageInstructionDataArgs['messageType'];\n isEncrypted: SendMessageInstructionDataArgs['isEncrypted'];\n};\n\nexport function getSendMessageInstruction<\n TAccountMessage extends string,\n TAccountChannel extends string,\n TAccountSender extends string,\n TAccountSystemProgram extends string,\n TProgramAddress extends\n Address = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: SendMessageInput<\n TAccountMessage,\n TAccountChannel,\n TAccountSender,\n TAccountSystemProgram\n >,\n config?: { programAddress?: TProgramAddress }\n): SendMessageInstruction<\n TProgramAddress,\n TAccountMessage,\n TAccountChannel,\n TAccountSender,\n TAccountSystemProgram\n> {\n // Program address.\n const programAddress =\n config?.programAddress ?? GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n message: { value: input.message ?? null, isWritable: true },\n channel: { value: input.channel ?? null, isWritable: true },\n sender: { value: input.sender ?? null, isWritable: true },\n systemProgram: { value: input.systemProgram ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolve default values.\n if (!accounts.systemProgram.value) {\n accounts.systemProgram.value =\n '11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.message),\n getAccountMeta(accounts.channel),\n getAccountMeta(accounts.sender),\n getAccountMeta(accounts.systemProgram),\n ],\n programAddress,\n data: getSendMessageInstructionDataEncoder().encode(\n args as SendMessageInstructionDataArgs\n ),\n } as SendMessageInstruction<\n TProgramAddress,\n TAccountMessage,\n TAccountChannel,\n TAccountSender,\n TAccountSystemProgram\n >;\n\n return instruction;\n}\n\nexport type ParsedSendMessageInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n message: TAccountMetas[0];\n channel: TAccountMetas[1];\n sender: TAccountMetas[2];\n systemProgram: TAccountMetas[3];\n };\n data: SendMessageInstructionData;\n};\n\nexport function parseSendMessageInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>\n): ParsedSendMessageInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 4) {\n throw new Error('[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts');\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = instruction.accounts![accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n message: getNextAccount(),\n channel: getNextAccount(),\n sender: getNextAccount(),\n systemProgram: getNextAccount(),\n },\n data: getSendMessageInstructionDataDecoder().decode(instruction.data),\n };\n}\n","/**\n * This code was AUTOGENERATED using the codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n addDecoderSizePrefix,\n addEncoderSizePrefix,\n combineCodec,\n fixDecoderSize,\n fixEncoderSize,\n getAddressEncoder,\n getBytesDecoder,\n getBytesEncoder,\n getProgramDerivedAddress,\n getStructDecoder,\n getStructEncoder,\n getU32Decoder,\n getU32Encoder,\n getUtf8Decoder,\n getUtf8Encoder,\n transformEncoder,\n type AccountMeta,\n type AccountSignerMeta,\n type Address,\n type Codec,\n type Decoder,\n type Encoder,\n type Instruction,\n type InstructionWithAccounts,\n type InstructionWithData,\n type ReadonlyAccount,\n type ReadonlySignerAccount,\n type ReadonlyUint8Array,\n type TransactionSigner,\n type WritableAccount,\n} from '@solana/kit';\nimport {\n GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_INSTRUCTION_DATA,\n GHOSTSPEAK_MARKETPLACE_ERROR__MISSING_REQUIRED_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INSTRUCTION_PARSING_FAILED,\n isGhostspeakMarketplaceError,\n} from '../errors';\nimport { GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS } from '../programs';\nimport {\n expectAddress,\n getAccountMetaFactory,\n type ResolvedAccount,\n} from '../shared';\n\nexport const SUBMIT_DISPUTE_EVIDENCE_DISCRIMINATOR = new Uint8Array([\n 177, 174, 100, 125, 106, 213, 241, 22,\n]);\n\nexport function getSubmitDisputeEvidenceDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 8).encode(\n SUBMIT_DISPUTE_EVIDENCE_DISCRIMINATOR\n );\n}\n\nexport type SubmitDisputeEvidenceInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountDispute extends string | AccountMeta<string> = string,\n TAccountUserRegistry extends string | AccountMeta<string> = string,\n TAccountSubmitter extends string | AccountMeta<string> = string,\n TAccountClock extends\n | string\n | AccountMeta<string> = 'SysvarC1ock11111111111111111111111111111111',\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountDispute extends string\n ? WritableAccount<TAccountDispute>\n : TAccountDispute,\n TAccountUserRegistry extends string\n ? WritableAccount<TAccountUserRegistry>\n : TAccountUserRegistry,\n TAccountSubmitter extends string\n ? ReadonlySignerAccount<TAccountSubmitter> &\n AccountSignerMeta<TAccountSubmitter>\n : TAccountSubmitter,\n TAccountClock extends string\n ? ReadonlyAccount<TAccountClock>\n : TAccountClock,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type SubmitDisputeEvidenceInstructionData = {\n discriminator: ReadonlyUint8Array;\n evidenceType: string;\n evidenceData: string;\n};\n\nexport type SubmitDisputeEvidenceInstructionDataArgs = {\n evidenceType: string;\n evidenceData: string;\n};\n\nexport function getSubmitDisputeEvidenceInstructionDataEncoder(): Encoder<SubmitDisputeEvidenceInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n ['discriminator', fixEncoderSize(getBytesEncoder(), 8)],\n ['evidenceType', addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder())],\n ['evidenceData', addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder())],\n ]),\n (value) => ({\n ...value,\n discriminator: SUBMIT_DISPUTE_EVIDENCE_DISCRIMINATOR,\n })\n );\n}\n\nexport function getSubmitDisputeEvidenceInstructionDataDecoder(): Decoder<SubmitDisputeEvidenceInstructionData> {\n return getStructDecoder([\n ['discriminator', fixDecoderSize(getBytesDecoder(), 8)],\n ['evidenceType', addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())],\n ['evidenceData', addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())],\n ]);\n}\n\nexport function getSubmitDisputeEvidenceInstructionDataCodec(): Codec<\n SubmitDisputeEvidenceInstructionDataArgs,\n SubmitDisputeEvidenceInstructionData\n> {\n return combineCodec(\n getSubmitDisputeEvidenceInstructionDataEncoder(),\n getSubmitDisputeEvidenceInstructionDataDecoder()\n );\n}\n\nexport type SubmitDisputeEvidenceAsyncInput<\n TAccountDispute extends string = string,\n TAccountUserRegistry extends string = string,\n TAccountSubmitter extends string = string,\n TAccountClock extends string = string,\n> = {\n /** Dispute account with canonical bump validation */\n dispute: Address<TAccountDispute>;\n /** User registry for rate limiting */\n userRegistry?: Address<TAccountUserRegistry>;\n /** Enhanced submitter verification */\n submitter: TransactionSigner<TAccountSubmitter>;\n /** Clock sysvar for rate limiting and timing validation */\n clock?: Address<TAccountClock>;\n evidenceType: SubmitDisputeEvidenceInstructionDataArgs['evidenceType'];\n evidenceData: SubmitDisputeEvidenceInstructionDataArgs['evidenceData'];\n};\n\nexport async function getSubmitDisputeEvidenceInstructionAsync<\n TAccountDispute extends string,\n TAccountUserRegistry extends string,\n TAccountSubmitter extends string,\n TAccountClock extends string,\n TProgramAddress extends\n Address = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: SubmitDisputeEvidenceAsyncInput<\n TAccountDispute,\n TAccountUserRegistry,\n TAccountSubmitter,\n TAccountClock\n >,\n config?: { programAddress?: TProgramAddress }\n): Promise<\n SubmitDisputeEvidenceInstruction<\n TProgramAddress,\n TAccountDispute,\n TAccountUserRegistry,\n TAccountSubmitter,\n TAccountClock\n >\n> {\n // Program address.\n const programAddress =\n config?.programAddress ?? GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n dispute: { value: input.dispute ?? null, isWritable: true },\n userRegistry: { value: input.userRegistry ?? null, isWritable: true },\n submitter: { value: input.submitter ?? null, isWritable: false },\n clock: { value: input.clock ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolve default values.\n if (!accounts.userRegistry.value) {\n accounts.userRegistry.value = await getProgramDerivedAddress({\n programAddress,\n seeds: [\n getBytesEncoder().encode(\n new Uint8Array([\n 117, 115, 101, 114, 95, 114, 101, 103, 105, 115, 116, 114, 121,\n ])\n ),\n getAddressEncoder().encode(expectAddress(accounts.submitter.value)),\n ],\n });\n }\n if (!accounts.clock.value) {\n accounts.clock.value =\n 'SysvarC1ock11111111111111111111111111111111' as Address<'SysvarC1ock11111111111111111111111111111111'>;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.dispute),\n getAccountMeta(accounts.userRegistry),\n getAccountMeta(accounts.submitter),\n getAccountMeta(accounts.clock),\n ],\n programAddress,\n data: getSubmitDisputeEvidenceInstructionDataEncoder().encode(\n args as SubmitDisputeEvidenceInstructionDataArgs\n ),\n } as SubmitDisputeEvidenceInstruction<\n TProgramAddress,\n TAccountDispute,\n TAccountUserRegistry,\n TAccountSubmitter,\n TAccountClock\n >;\n\n return instruction;\n}\n\nexport type SubmitDisputeEvidenceInput<\n TAccountDispute extends string = string,\n TAccountUserRegistry extends string = string,\n TAccountSubmitter extends string = string,\n TAccountClock extends string = string,\n> = {\n /** Dispute account with canonical bump validation */\n dispute: Address<TAccountDispute>;\n /** User registry for rate limiting */\n userRegistry: Address<TAccountUserRegistry>;\n /** Enhanced submitter verification */\n submitter: TransactionSigner<TAccountSubmitter>;\n /** Clock sysvar for rate limiting and timing validation */\n clock?: Address<TAccountClock>;\n evidenceType: SubmitDisputeEvidenceInstructionDataArgs['evidenceType'];\n evidenceData: SubmitDisputeEvidenceInstructionDataArgs['evidenceData'];\n};\n\nexport function getSubmitDisputeEvidenceInstruction<\n TAccountDispute extends string,\n TAccountUserRegistry extends string,\n TAccountSubmitter extends string,\n TAccountClock extends string,\n TProgramAddress extends\n Address = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: SubmitDisputeEvidenceInput<\n TAccountDispute,\n TAccountUserRegistry,\n TAccountSubmitter,\n TAccountClock\n >,\n config?: { programAddress?: TProgramAddress }\n): SubmitDisputeEvidenceInstruction<\n TProgramAddress,\n TAccountDispute,\n TAccountUserRegistry,\n TAccountSubmitter,\n TAccountClock\n> {\n // Program address.\n const programAddress =\n config?.programAddress ?? GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n dispute: { value: input.dispute ?? null, isWritable: true },\n userRegistry: { value: input.userRegistry ?? null, isWritable: true },\n submitter: { value: input.submitter ?? null, isWritable: false },\n clock: { value: input.clock ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolve default values.\n if (!accounts.clock.value) {\n accounts.clock.value =\n 'SysvarC1ock11111111111111111111111111111111' as Address<'SysvarC1ock11111111111111111111111111111111'>;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.dispute),\n getAccountMeta(accounts.userRegistry),\n getAccountMeta(accounts.submitter),\n getAccountMeta(accounts.clock),\n ],\n programAddress,\n data: getSubmitDisputeEvidenceInstructionDataEncoder().encode(\n args as SubmitDisputeEvidenceInstructionDataArgs\n ),\n } as SubmitDisputeEvidenceInstruction<\n TProgramAddress,\n TAccountDispute,\n TAccountUserRegistry,\n TAccountSubmitter,\n TAccountClock\n >;\n\n return instruction;\n}\n\nexport type ParsedSubmitDisputeEvidenceInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n /** Dispute account with canonical bump validation */\n dispute: TAccountMetas[0];\n /** User registry for rate limiting */\n userRegistry: TAccountMetas[1];\n /** Enhanced submitter verification */\n submitter: TAccountMetas[2];\n /** Clock sysvar for rate limiting and timing validation */\n clock: TAccountMetas[3];\n };\n data: SubmitDisputeEvidenceInstructionData;\n};\n\nexport function parseSubmitDisputeEvidenceInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>\n): ParsedSubmitDisputeEvidenceInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 4) {\n throw new Error('[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts');\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = instruction.accounts![accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n dispute: getNextAccount(),\n userRegistry: getNextAccount(),\n submitter: getNextAccount(),\n clock: getNextAccount(),\n },\n data: getSubmitDisputeEvidenceInstructionDataDecoder().decode(\n instruction.data\n ),\n };\n}\n","/**\n * This code was AUTOGENERATED using the codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n combineCodec,\n fixDecoderSize,\n fixEncoderSize,\n getAddressEncoder,\n getArrayDecoder,\n getArrayEncoder,\n getBytesDecoder,\n getBytesEncoder,\n getProgramDerivedAddress,\n getStructDecoder,\n getStructEncoder,\n transformEncoder,\n type AccountMeta,\n type AccountSignerMeta,\n type Address,\n type Codec,\n type Decoder,\n type Encoder,\n type Instruction,\n type InstructionWithAccounts,\n type InstructionWithData,\n type ReadonlyAccount,\n type ReadonlySignerAccount,\n type ReadonlyUint8Array,\n type TransactionSigner,\n type WritableAccount,\n} from '@solana/kit';\nimport {\n GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_INSTRUCTION_DATA,\n GHOSTSPEAK_MARKETPLACE_ERROR__MISSING_REQUIRED_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INSTRUCTION_PARSING_FAILED,\n isGhostspeakMarketplaceError,\n} from '../errors';\nimport { GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS } from '../programs';\nimport {\n expectAddress,\n getAccountMetaFactory,\n type ResolvedAccount,\n} from '../shared';\nimport {\n getEvidenceBatchItemDecoder,\n getEvidenceBatchItemEncoder,\n type EvidenceBatchItem,\n type EvidenceBatchItemArgs,\n} from '../types';\n\nexport const SUBMIT_EVIDENCE_BATCH_DISCRIMINATOR = new Uint8Array([\n 168, 150, 145, 75, 38, 203, 43, 9,\n]);\n\nexport function getSubmitEvidenceBatchDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 8).encode(\n SUBMIT_EVIDENCE_BATCH_DISCRIMINATOR\n );\n}\n\nexport type SubmitEvidenceBatchInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountDispute extends string | AccountMeta<string> = string,\n TAccountUserRegistry extends string | AccountMeta<string> = string,\n TAccountSubmitter extends string | AccountMeta<string> = string,\n TAccountClock extends\n | string\n | AccountMeta<string> = 'SysvarC1ock11111111111111111111111111111111',\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountDispute extends string\n ? WritableAccount<TAccountDispute>\n : TAccountDispute,\n TAccountUserRegistry extends string\n ? WritableAccount<TAccountUserRegistry>\n : TAccountUserRegistry,\n TAccountSubmitter extends string\n ? ReadonlySignerAccount<TAccountSubmitter> &\n AccountSignerMeta<TAccountSubmitter>\n : TAccountSubmitter,\n TAccountClock extends string\n ? ReadonlyAccount<TAccountClock>\n : TAccountClock,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type SubmitEvidenceBatchInstructionData = {\n discriminator: ReadonlyUint8Array;\n evidenceBatch: Array<EvidenceBatchItem>;\n};\n\nexport type SubmitEvidenceBatchInstructionDataArgs = {\n evidenceBatch: Array<EvidenceBatchItemArgs>;\n};\n\nexport function getSubmitEvidenceBatchInstructionDataEncoder(): Encoder<SubmitEvidenceBatchInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n ['discriminator', fixEncoderSize(getBytesEncoder(), 8)],\n ['evidenceBatch', getArrayEncoder(getEvidenceBatchItemEncoder())],\n ]),\n (value) => ({\n ...value,\n discriminator: SUBMIT_EVIDENCE_BATCH_DISCRIMINATOR,\n })\n );\n}\n\nexport function getSubmitEvidenceBatchInstructionDataDecoder(): Decoder<SubmitEvidenceBatchInstructionData> {\n return getStructDecoder([\n ['discriminator', fixDecoderSize(getBytesDecoder(), 8)],\n ['evidenceBatch', getArrayDecoder(getEvidenceBatchItemDecoder())],\n ]);\n}\n\nexport function getSubmitEvidenceBatchInstructionDataCodec(): Codec<\n SubmitEvidenceBatchInstructionDataArgs,\n SubmitEvidenceBatchInstructionData\n> {\n return combineCodec(\n getSubmitEvidenceBatchInstructionDataEncoder(),\n getSubmitEvidenceBatchInstructionDataDecoder()\n );\n}\n\nexport type SubmitEvidenceBatchAsyncInput<\n TAccountDispute extends string = string,\n TAccountUserRegistry extends string = string,\n TAccountSubmitter extends string = string,\n TAccountClock extends string = string,\n> = {\n /** Dispute account with canonical bump validation */\n dispute: Address<TAccountDispute>;\n /** User registry for rate limiting */\n userRegistry?: Address<TAccountUserRegistry>;\n /** Enhanced submitter verification */\n submitter: TransactionSigner<TAccountSubmitter>;\n /** Clock sysvar for rate limiting and timing validation */\n clock?: Address<TAccountClock>;\n evidenceBatch: SubmitEvidenceBatchInstructionDataArgs['evidenceBatch'];\n};\n\nexport async function getSubmitEvidenceBatchInstructionAsync<\n TAccountDispute extends string,\n TAccountUserRegistry extends string,\n TAccountSubmitter extends string,\n TAccountClock extends string,\n TProgramAddress extends\n Address = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: SubmitEvidenceBatchAsyncInput<\n TAccountDispute,\n TAccountUserRegistry,\n TAccountSubmitter,\n TAccountClock\n >,\n config?: { programAddress?: TProgramAddress }\n): Promise<\n SubmitEvidenceBatchInstruction<\n TProgramAddress,\n TAccountDispute,\n TAccountUserRegistry,\n TAccountSubmitter,\n TAccountClock\n >\n> {\n // Program address.\n const programAddress =\n config?.programAddress ?? GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n dispute: { value: input.dispute ?? null, isWritable: true },\n userRegistry: { value: input.userRegistry ?? null, isWritable: true },\n submitter: { value: input.submitter ?? null, isWritable: false },\n clock: { value: input.clock ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolve default values.\n if (!accounts.userRegistry.value) {\n accounts.userRegistry.value = await getProgramDerivedAddress({\n programAddress,\n seeds: [\n getBytesEncoder().encode(\n new Uint8Array([\n 117, 115, 101, 114, 95, 114, 101, 103, 105, 115, 116, 114, 121,\n ])\n ),\n getAddressEncoder().encode(expectAddress(accounts.submitter.value)),\n ],\n });\n }\n if (!accounts.clock.value) {\n accounts.clock.value =\n 'SysvarC1ock11111111111111111111111111111111' as Address<'SysvarC1ock11111111111111111111111111111111'>;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.dispute),\n getAccountMeta(accounts.userRegistry),\n getAccountMeta(accounts.submitter),\n getAccountMeta(accounts.clock),\n ],\n programAddress,\n data: getSubmitEvidenceBatchInstructionDataEncoder().encode(\n args as SubmitEvidenceBatchInstructionDataArgs\n ),\n } as SubmitEvidenceBatchInstruction<\n TProgramAddress,\n TAccountDispute,\n TAccountUserRegistry,\n TAccountSubmitter,\n TAccountClock\n >;\n\n return instruction;\n}\n\nexport type SubmitEvidenceBatchInput<\n TAccountDispute extends string = string,\n TAccountUserRegistry extends string = string,\n TAccountSubmitter extends string = string,\n TAccountClock extends string = string,\n> = {\n /** Dispute account with canonical bump validation */\n dispute: Address<TAccountDispute>;\n /** User registry for rate limiting */\n userRegistry: Address<TAccountUserRegistry>;\n /** Enhanced submitter verification */\n submitter: TransactionSigner<TAccountSubmitter>;\n /** Clock sysvar for rate limiting and timing validation */\n clock?: Address<TAccountClock>;\n evidenceBatch: SubmitEvidenceBatchInstructionDataArgs['evidenceBatch'];\n};\n\nexport function getSubmitEvidenceBatchInstruction<\n TAccountDispute extends string,\n TAccountUserRegistry extends string,\n TAccountSubmitter extends string,\n TAccountClock extends string,\n TProgramAddress extends\n Address = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: SubmitEvidenceBatchInput<\n TAccountDispute,\n TAccountUserRegistry,\n TAccountSubmitter,\n TAccountClock\n >,\n config?: { programAddress?: TProgramAddress }\n): SubmitEvidenceBatchInstruction<\n TProgramAddress,\n TAccountDispute,\n TAccountUserRegistry,\n TAccountSubmitter,\n TAccountClock\n> {\n // Program address.\n const programAddress =\n config?.programAddress ?? GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n dispute: { value: input.dispute ?? null, isWritable: true },\n userRegistry: { value: input.userRegistry ?? null, isWritable: true },\n submitter: { value: input.submitter ?? null, isWritable: false },\n clock: { value: input.clock ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolve default values.\n if (!accounts.clock.value) {\n accounts.clock.value =\n 'SysvarC1ock11111111111111111111111111111111' as Address<'SysvarC1ock11111111111111111111111111111111'>;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.dispute),\n getAccountMeta(accounts.userRegistry),\n getAccountMeta(accounts.submitter),\n getAccountMeta(accounts.clock),\n ],\n programAddress,\n data: getSubmitEvidenceBatchInstructionDataEncoder().encode(\n args as SubmitEvidenceBatchInstructionDataArgs\n ),\n } as SubmitEvidenceBatchInstruction<\n TProgramAddress,\n TAccountDispute,\n TAccountUserRegistry,\n TAccountSubmitter,\n TAccountClock\n >;\n\n return instruction;\n}\n\nexport type ParsedSubmitEvidenceBatchInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n /** Dispute account with canonical bump validation */\n dispute: TAccountMetas[0];\n /** User registry for rate limiting */\n userRegistry: TAccountMetas[1];\n /** Enhanced submitter verification */\n submitter: TAccountMetas[2];\n /** Clock sysvar for rate limiting and timing validation */\n clock: TAccountMetas[3];\n };\n data: SubmitEvidenceBatchInstructionData;\n};\n\nexport function parseSubmitEvidenceBatchInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>\n): ParsedSubmitEvidenceBatchInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 4) {\n throw new Error('[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts');\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = instruction.accounts![accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n dispute: getNextAccount(),\n userRegistry: getNextAccount(),\n submitter: getNextAccount(),\n clock: getNextAccount(),\n },\n data: getSubmitEvidenceBatchInstructionDataDecoder().decode(\n instruction.data\n ),\n };\n}\n","/**\n * This code was AUTOGENERATED using the codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n addDecoderSizePrefix,\n addEncoderSizePrefix,\n combineCodec,\n fixDecoderSize,\n fixEncoderSize,\n getAddressEncoder,\n getArrayDecoder,\n getArrayEncoder,\n getBytesDecoder,\n getBytesEncoder,\n getProgramDerivedAddress,\n getStructDecoder,\n getStructEncoder,\n getU32Decoder,\n getU32Encoder,\n getUtf8Decoder,\n getUtf8Encoder,\n transformEncoder,\n type AccountMeta,\n type AccountSignerMeta,\n type Address,\n type Codec,\n type Decoder,\n type Encoder,\n type Instruction,\n type InstructionWithAccounts,\n type InstructionWithData,\n type ReadonlyAccount,\n type ReadonlyUint8Array,\n type TransactionSigner,\n type WritableAccount,\n type WritableSignerAccount,\n} from '@solana/kit';\nimport { GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS } from '../programs';\nimport {\n expectAddress,\n getAccountMetaFactory,\n type ResolvedAccount,\n} from '../shared';\nimport {\n getDeliverableDecoder,\n getDeliverableEncoder,\n type Deliverable,\n type DeliverableArgs,\n} from '../types';\nimport { getWorkOrderErrorMessage } from '../../utils/enhanced-client-errors.js';\n\nexport const SUBMIT_WORK_DELIVERY_DISCRIMINATOR = new Uint8Array([\n 151, 198, 209, 252, 41, 69, 106, 93,\n]);\n\nexport function getSubmitWorkDeliveryDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 8).encode(\n SUBMIT_WORK_DELIVERY_DISCRIMINATOR\n );\n}\n\nexport type SubmitWorkDeliveryInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountWorkDelivery extends string | AccountMeta<string> = string,\n TAccountWorkOrder extends string | AccountMeta<string> = string,\n TAccountProvider extends string | AccountMeta<string> = string,\n TAccountClock extends\n | string\n | AccountMeta<string> = 'SysvarC1ock11111111111111111111111111111111',\n TAccountSystemProgram extends\n | string\n | AccountMeta<string> = '11111111111111111111111111111111',\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountWorkDelivery extends string\n ? WritableAccount<TAccountWorkDelivery>\n : TAccountWorkDelivery,\n TAccountWorkOrder extends string\n ? WritableAccount<TAccountWorkOrder>\n : TAccountWorkOrder,\n TAccountProvider extends string\n ? WritableSignerAccount<TAccountProvider> &\n AccountSignerMeta<TAccountProvider>\n : TAccountProvider,\n TAccountClock extends string\n ? ReadonlyAccount<TAccountClock>\n : TAccountClock,\n TAccountSystemProgram extends string\n ? ReadonlyAccount<TAccountSystemProgram>\n : TAccountSystemProgram,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type SubmitWorkDeliveryInstructionData = {\n discriminator: ReadonlyUint8Array;\n deliverables: Array<Deliverable>;\n ipfsHash: string;\n metadataUri: string;\n};\n\nexport type SubmitWorkDeliveryInstructionDataArgs = {\n deliverables: Array<DeliverableArgs>;\n ipfsHash: string;\n metadataUri: string;\n};\n\nexport function getSubmitWorkDeliveryInstructionDataEncoder(): Encoder<SubmitWorkDeliveryInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n ['discriminator', fixEncoderSize(getBytesEncoder(), 8)],\n ['deliverables', getArrayEncoder(getDeliverableEncoder())],\n ['ipfsHash', addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder())],\n ['metadataUri', addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder())],\n ]),\n (value) => ({ ...value, discriminator: SUBMIT_WORK_DELIVERY_DISCRIMINATOR })\n );\n}\n\nexport function getSubmitWorkDeliveryInstructionDataDecoder(): Decoder<SubmitWorkDeliveryInstructionData> {\n return getStructDecoder([\n ['discriminator', fixDecoderSize(getBytesDecoder(), 8)],\n ['deliverables', getArrayDecoder(getDeliverableDecoder())],\n ['ipfsHash', addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())],\n ['metadataUri', addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())],\n ]);\n}\n\nexport function getSubmitWorkDeliveryInstructionDataCodec(): Codec<\n SubmitWorkDeliveryInstructionDataArgs,\n SubmitWorkDeliveryInstructionData\n> {\n return combineCodec(\n getSubmitWorkDeliveryInstructionDataEncoder(),\n getSubmitWorkDeliveryInstructionDataDecoder()\n );\n}\n\nexport type SubmitWorkDeliveryAsyncInput<\n TAccountWorkDelivery extends string = string,\n TAccountWorkOrder extends string = string,\n TAccountProvider extends string = string,\n TAccountClock extends string = string,\n TAccountSystemProgram extends string = string,\n> = {\n workDelivery?: Address<TAccountWorkDelivery>;\n workOrder: Address<TAccountWorkOrder>;\n provider: TransactionSigner<TAccountProvider>;\n clock?: Address<TAccountClock>;\n systemProgram?: Address<TAccountSystemProgram>;\n deliverables: SubmitWorkDeliveryInstructionDataArgs['deliverables'];\n ipfsHash: SubmitWorkDeliveryInstructionDataArgs['ipfsHash'];\n metadataUri: SubmitWorkDeliveryInstructionDataArgs['metadataUri'];\n};\n\nexport async function getSubmitWorkDeliveryInstructionAsync<\n TAccountWorkDelivery extends string,\n TAccountWorkOrder extends string,\n TAccountProvider extends string,\n TAccountClock extends string,\n TAccountSystemProgram extends string,\n TProgramAddress extends\n Address = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: SubmitWorkDeliveryAsyncInput<\n TAccountWorkDelivery,\n TAccountWorkOrder,\n TAccountProvider,\n TAccountClock,\n TAccountSystemProgram\n >,\n config?: { programAddress?: TProgramAddress }\n): Promise<\n SubmitWorkDeliveryInstruction<\n TProgramAddress,\n TAccountWorkDelivery,\n TAccountWorkOrder,\n TAccountProvider,\n TAccountClock,\n TAccountSystemProgram\n >\n> {\n // Program address.\n const programAddress =\n config?.programAddress ?? GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n workDelivery: { value: input.workDelivery ?? null, isWritable: true },\n workOrder: { value: input.workOrder ?? null, isWritable: true },\n provider: { value: input.provider ?? null, isWritable: true },\n clock: { value: input.clock ?? null, isWritable: false },\n systemProgram: { value: input.systemProgram ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolve default values.\n if (!accounts.workDelivery.value) {\n accounts.workDelivery.value = await getProgramDerivedAddress({\n programAddress,\n seeds: [\n getBytesEncoder().encode(\n new Uint8Array([\n 119, 111, 114, 107, 95, 100, 101, 108, 105, 118, 101, 114, 121,\n ])\n ),\n getAddressEncoder().encode(expectAddress(accounts.workOrder.value)),\n ],\n });\n }\n if (!accounts.clock.value) {\n accounts.clock.value =\n 'SysvarC1ock11111111111111111111111111111111' as Address<'SysvarC1ock11111111111111111111111111111111'>;\n }\n if (!accounts.systemProgram.value) {\n accounts.systemProgram.value =\n '11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.workDelivery),\n getAccountMeta(accounts.workOrder),\n getAccountMeta(accounts.provider),\n getAccountMeta(accounts.clock),\n getAccountMeta(accounts.systemProgram),\n ],\n programAddress,\n data: getSubmitWorkDeliveryInstructionDataEncoder().encode(\n args as SubmitWorkDeliveryInstructionDataArgs\n ),\n } as SubmitWorkDeliveryInstruction<\n TProgramAddress,\n TAccountWorkDelivery,\n TAccountWorkOrder,\n TAccountProvider,\n TAccountClock,\n TAccountSystemProgram\n >;\n\n return instruction;\n}\n\nexport type SubmitWorkDeliveryInput<\n TAccountWorkDelivery extends string = string,\n TAccountWorkOrder extends string = string,\n TAccountProvider extends string = string,\n TAccountClock extends string = string,\n TAccountSystemProgram extends string = string,\n> = {\n workDelivery: Address<TAccountWorkDelivery>;\n workOrder: Address<TAccountWorkOrder>;\n provider: TransactionSigner<TAccountProvider>;\n clock?: Address<TAccountClock>;\n systemProgram?: Address<TAccountSystemProgram>;\n deliverables: SubmitWorkDeliveryInstructionDataArgs['deliverables'];\n ipfsHash: SubmitWorkDeliveryInstructionDataArgs['ipfsHash'];\n metadataUri: SubmitWorkDeliveryInstructionDataArgs['metadataUri'];\n};\n\nexport function getSubmitWorkDeliveryInstruction<\n TAccountWorkDelivery extends string,\n TAccountWorkOrder extends string,\n TAccountProvider extends string,\n TAccountClock extends string,\n TAccountSystemProgram extends string,\n TProgramAddress extends\n Address = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: SubmitWorkDeliveryInput<\n TAccountWorkDelivery,\n TAccountWorkOrder,\n TAccountProvider,\n TAccountClock,\n TAccountSystemProgram\n >,\n config?: { programAddress?: TProgramAddress }\n): SubmitWorkDeliveryInstruction<\n TProgramAddress,\n TAccountWorkDelivery,\n TAccountWorkOrder,\n TAccountProvider,\n TAccountClock,\n TAccountSystemProgram\n> {\n // Program address.\n const programAddress =\n config?.programAddress ?? GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n workDelivery: { value: input.workDelivery ?? null, isWritable: true },\n workOrder: { value: input.workOrder ?? null, isWritable: true },\n provider: { value: input.provider ?? null, isWritable: true },\n clock: { value: input.clock ?? null, isWritable: false },\n systemProgram: { value: input.systemProgram ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolve default values.\n if (!accounts.clock.value) {\n accounts.clock.value =\n 'SysvarC1ock11111111111111111111111111111111' as Address<'SysvarC1ock11111111111111111111111111111111'>;\n }\n if (!accounts.systemProgram.value) {\n accounts.systemProgram.value =\n '11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.workDelivery),\n getAccountMeta(accounts.workOrder),\n getAccountMeta(accounts.provider),\n getAccountMeta(accounts.clock),\n getAccountMeta(accounts.systemProgram),\n ],\n programAddress,\n data: getSubmitWorkDeliveryInstructionDataEncoder().encode(\n args as SubmitWorkDeliveryInstructionDataArgs\n ),\n } as SubmitWorkDeliveryInstruction<\n TProgramAddress,\n TAccountWorkDelivery,\n TAccountWorkOrder,\n TAccountProvider,\n TAccountClock,\n TAccountSystemProgram\n >;\n\n return instruction;\n}\n\nexport type ParsedSubmitWorkDeliveryInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n workDelivery: TAccountMetas[0];\n workOrder: TAccountMetas[1];\n provider: TAccountMetas[2];\n clock: TAccountMetas[3];\n systemProgram: TAccountMetas[4];\n };\n data: SubmitWorkDeliveryInstructionData;\n};\n\nexport function parseSubmitWorkDeliveryInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>\n): ParsedSubmitWorkDeliveryInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 5) {\n throw new Error(getWorkOrderErrorMessage(\"submit_work_delivery\", instruction.accounts.length));\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = instruction.accounts![accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n workDelivery: getNextAccount(),\n workOrder: getNextAccount(),\n provider: getNextAccount(),\n clock: getNextAccount(),\n systemProgram: getNextAccount(),\n },\n data: getSubmitWorkDeliveryInstructionDataDecoder().decode(\n instruction.data\n ),\n };\n}\n","/**\n * This code was AUTOGENERATED using the codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n combineCodec,\n fixDecoderSize,\n fixEncoderSize,\n getBytesDecoder,\n getBytesEncoder,\n getStructDecoder,\n getStructEncoder,\n transformEncoder,\n type AccountMeta,\n type AccountSignerMeta,\n type Address,\n type FixedSizeCodec,\n type FixedSizeDecoder,\n type FixedSizeEncoder,\n type Instruction,\n type InstructionWithAccounts,\n type InstructionWithData,\n type ReadonlyUint8Array,\n type TransactionSigner,\n type WritableAccount,\n type WritableSignerAccount,\n} from '@solana/kit';\nimport {\n GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_INSTRUCTION_DATA,\n GHOSTSPEAK_MARKETPLACE_ERROR__MISSING_REQUIRED_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INSTRUCTION_PARSING_FAILED,\n isGhostspeakMarketplaceError,\n} from '../errors';\nimport { GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS } from '../programs';\nimport { getAccountMetaFactory, type ResolvedAccount } from '../shared';\n\nexport const TALLY_VOTES_DISCRIMINATOR = new Uint8Array([\n 144, 82, 0, 72, 160, 132, 35, 121,\n]);\n\nexport function getTallyVotesDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 8).encode(TALLY_VOTES_DISCRIMINATOR);\n}\n\nexport type TallyVotesInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountProposal extends string | AccountMeta<string> = string,\n TAccountAuthority extends string | AccountMeta<string> = string,\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountProposal extends string\n ? WritableAccount<TAccountProposal>\n : TAccountProposal,\n TAccountAuthority extends string\n ? WritableSignerAccount<TAccountAuthority> &\n AccountSignerMeta<TAccountAuthority>\n : TAccountAuthority,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type TallyVotesInstructionData = { discriminator: ReadonlyUint8Array };\n\nexport type TallyVotesInstructionDataArgs = {};\n\nexport function getTallyVotesInstructionDataEncoder(): FixedSizeEncoder<TallyVotesInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([['discriminator', fixEncoderSize(getBytesEncoder(), 8)]]),\n (value) => ({ ...value, discriminator: TALLY_VOTES_DISCRIMINATOR })\n );\n}\n\nexport function getTallyVotesInstructionDataDecoder(): FixedSizeDecoder<TallyVotesInstructionData> {\n return getStructDecoder([\n ['discriminator', fixDecoderSize(getBytesDecoder(), 8)],\n ]);\n}\n\nexport function getTallyVotesInstructionDataCodec(): FixedSizeCodec<\n TallyVotesInstructionDataArgs,\n TallyVotesInstructionData\n> {\n return combineCodec(\n getTallyVotesInstructionDataEncoder(),\n getTallyVotesInstructionDataDecoder()\n );\n}\n\nexport type TallyVotesInput<\n TAccountProposal extends string = string,\n TAccountAuthority extends string = string,\n> = {\n proposal: Address<TAccountProposal>;\n authority: TransactionSigner<TAccountAuthority>;\n};\n\nexport function getTallyVotesInstruction<\n TAccountProposal extends string,\n TAccountAuthority extends string,\n TProgramAddress extends\n Address = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: TallyVotesInput<TAccountProposal, TAccountAuthority>,\n config?: { programAddress?: TProgramAddress }\n): TallyVotesInstruction<TProgramAddress, TAccountProposal, TAccountAuthority> {\n // Program address.\n const programAddress =\n config?.programAddress ?? GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n proposal: { value: input.proposal ?? null, isWritable: true },\n authority: { value: input.authority ?? null, isWritable: true },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.proposal),\n getAccountMeta(accounts.authority),\n ],\n programAddress,\n data: getTallyVotesInstructionDataEncoder().encode({}),\n } as TallyVotesInstruction<\n TProgramAddress,\n TAccountProposal,\n TAccountAuthority\n >;\n\n return instruction;\n}\n\nexport type ParsedTallyVotesInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n proposal: TAccountMetas[0];\n authority: TAccountMetas[1];\n };\n data: TallyVotesInstructionData;\n};\n\nexport function parseTallyVotesInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>\n): ParsedTallyVotesInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 2) {\n throw new Error('[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts');\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = instruction.accounts![accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n proposal: getNextAccount(),\n authority: getNextAccount(),\n },\n data: getTallyVotesInstructionDataDecoder().decode(instruction.data),\n };\n}\n","/**\n * This code was AUTOGENERATED using the codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n addDecoderSizePrefix,\n addEncoderSizePrefix,\n combineCodec,\n fixDecoderSize,\n fixEncoderSize,\n getAddressDecoder,\n getAddressEncoder,\n getArrayDecoder,\n getArrayEncoder,\n getBooleanDecoder,\n getBooleanEncoder,\n getBytesDecoder,\n getBytesEncoder,\n getI64Decoder,\n getI64Encoder,\n getProgramDerivedAddress,\n getStructDecoder,\n getStructEncoder,\n getU32Decoder,\n getU32Encoder,\n getU64Decoder,\n getU64Encoder,\n getUtf8Decoder,\n getUtf8Encoder,\n transformEncoder,\n type AccountMeta,\n type AccountSignerMeta,\n type Address,\n type Codec,\n type Decoder,\n type Encoder,\n type Instruction,\n type InstructionWithAccounts,\n type InstructionWithData,\n type ReadonlyAccount,\n type ReadonlyUint8Array,\n type TransactionSigner,\n type WritableAccount,\n type WritableSignerAccount,\n} from '@solana/kit';\nimport {\n GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_INSTRUCTION_DATA,\n GHOSTSPEAK_MARKETPLACE_ERROR__MISSING_REQUIRED_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INSTRUCTION_PARSING_FAILED,\n isGhostspeakMarketplaceError,\n} from '../errors';\nimport { GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS } from '../programs';\nimport {\n expectAddress,\n getAccountMetaFactory,\n type ResolvedAccount,\n} from '../shared';\n\nexport const UPDATE_A2A_STATUS_DISCRIMINATOR = new Uint8Array([\n 10, 122, 84, 103, 225, 186, 125, 183,\n]);\n\nexport function getUpdateA2aStatusDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 8).encode(\n UPDATE_A2A_STATUS_DISCRIMINATOR\n );\n}\n\nexport type UpdateA2aStatusInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountStatus extends string | AccountMeta<string> = string,\n TAccountSession extends string | AccountMeta<string> = string,\n TAccountUpdater extends string | AccountMeta<string> = string,\n TAccountSystemProgram extends\n | string\n | AccountMeta<string> = '11111111111111111111111111111111',\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountStatus extends string\n ? WritableAccount<TAccountStatus>\n : TAccountStatus,\n TAccountSession extends string\n ? ReadonlyAccount<TAccountSession>\n : TAccountSession,\n TAccountUpdater extends string\n ? WritableSignerAccount<TAccountUpdater> &\n AccountSignerMeta<TAccountUpdater>\n : TAccountUpdater,\n TAccountSystemProgram extends string\n ? ReadonlyAccount<TAccountSystemProgram>\n : TAccountSystemProgram,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type UpdateA2aStatusInstructionData = {\n discriminator: ReadonlyUint8Array;\n statusId: bigint;\n agent: Address;\n status: string;\n capabilities: Array<string>;\n availability: boolean;\n lastUpdated: bigint;\n};\n\nexport type UpdateA2aStatusInstructionDataArgs = {\n statusId: number | bigint;\n agent: Address;\n status: string;\n capabilities: Array<string>;\n availability: boolean;\n lastUpdated: number | bigint;\n};\n\nexport function getUpdateA2aStatusInstructionDataEncoder(): Encoder<UpdateA2aStatusInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n ['discriminator', fixEncoderSize(getBytesEncoder(), 8)],\n ['statusId', getU64Encoder()],\n ['agent', getAddressEncoder()],\n ['status', addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder())],\n [\n 'capabilities',\n getArrayEncoder(\n addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder())\n ),\n ],\n ['availability', getBooleanEncoder()],\n ['lastUpdated', getI64Encoder()],\n ]),\n (value) => ({ ...value, discriminator: UPDATE_A2A_STATUS_DISCRIMINATOR })\n );\n}\n\nexport function getUpdateA2aStatusInstructionDataDecoder(): Decoder<UpdateA2aStatusInstructionData> {\n return getStructDecoder([\n ['discriminator', fixDecoderSize(getBytesDecoder(), 8)],\n ['statusId', getU64Decoder()],\n ['agent', getAddressDecoder()],\n ['status', addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())],\n [\n 'capabilities',\n getArrayDecoder(addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())),\n ],\n ['availability', getBooleanDecoder()],\n ['lastUpdated', getI64Decoder()],\n ]);\n}\n\nexport function getUpdateA2aStatusInstructionDataCodec(): Codec<\n UpdateA2aStatusInstructionDataArgs,\n UpdateA2aStatusInstructionData\n> {\n return combineCodec(\n getUpdateA2aStatusInstructionDataEncoder(),\n getUpdateA2aStatusInstructionDataDecoder()\n );\n}\n\nexport type UpdateA2aStatusAsyncInput<\n TAccountStatus extends string = string,\n TAccountSession extends string = string,\n TAccountUpdater extends string = string,\n TAccountSystemProgram extends string = string,\n> = {\n status?: Address<TAccountStatus>;\n session: Address<TAccountSession>;\n updater: TransactionSigner<TAccountUpdater>;\n systemProgram?: Address<TAccountSystemProgram>;\n statusId: UpdateA2aStatusInstructionDataArgs['statusId'];\n agent: UpdateA2aStatusInstructionDataArgs['agent'];\n statusArg: UpdateA2aStatusInstructionDataArgs['status'];\n capabilities: UpdateA2aStatusInstructionDataArgs['capabilities'];\n availability: UpdateA2aStatusInstructionDataArgs['availability'];\n lastUpdated: UpdateA2aStatusInstructionDataArgs['lastUpdated'];\n};\n\nexport async function getUpdateA2aStatusInstructionAsync<\n TAccountStatus extends string,\n TAccountSession extends string,\n TAccountUpdater extends string,\n TAccountSystemProgram extends string,\n TProgramAddress extends\n Address = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: UpdateA2aStatusAsyncInput<\n TAccountStatus,\n TAccountSession,\n TAccountUpdater,\n TAccountSystemProgram\n >,\n config?: { programAddress?: TProgramAddress }\n): Promise<\n UpdateA2aStatusInstruction<\n TProgramAddress,\n TAccountStatus,\n TAccountSession,\n TAccountUpdater,\n TAccountSystemProgram\n >\n> {\n // Program address.\n const programAddress =\n config?.programAddress ?? GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n status: { value: input.status ?? null, isWritable: true },\n session: { value: input.session ?? null, isWritable: false },\n updater: { value: input.updater ?? null, isWritable: true },\n systemProgram: { value: input.systemProgram ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input, status: input.statusArg };\n\n // Resolve default values.\n if (!accounts.status.value) {\n accounts.status.value = await getProgramDerivedAddress({\n programAddress,\n seeds: [\n getBytesEncoder().encode(\n new Uint8Array([97, 50, 97, 95, 115, 116, 97, 116, 117, 115])\n ),\n getAddressEncoder().encode(expectAddress(accounts.session.value)),\n ],\n });\n }\n if (!accounts.systemProgram.value) {\n accounts.systemProgram.value =\n '11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.status),\n getAccountMeta(accounts.session),\n getAccountMeta(accounts.updater),\n getAccountMeta(accounts.systemProgram),\n ],\n programAddress,\n data: getUpdateA2aStatusInstructionDataEncoder().encode(\n args as UpdateA2aStatusInstructionDataArgs\n ),\n } as UpdateA2aStatusInstruction<\n TProgramAddress,\n TAccountStatus,\n TAccountSession,\n TAccountUpdater,\n TAccountSystemProgram\n >;\n\n return instruction;\n}\n\nexport type UpdateA2aStatusInput<\n TAccountStatus extends string = string,\n TAccountSession extends string = string,\n TAccountUpdater extends string = string,\n TAccountSystemProgram extends string = string,\n> = {\n status: Address<TAccountStatus>;\n session: Address<TAccountSession>;\n updater: TransactionSigner<TAccountUpdater>;\n systemProgram?: Address<TAccountSystemProgram>;\n statusId: UpdateA2aStatusInstructionDataArgs['statusId'];\n agent: UpdateA2aStatusInstructionDataArgs['agent'];\n statusArg: UpdateA2aStatusInstructionDataArgs['status'];\n capabilities: UpdateA2aStatusInstructionDataArgs['capabilities'];\n availability: UpdateA2aStatusInstructionDataArgs['availability'];\n lastUpdated: UpdateA2aStatusInstructionDataArgs['lastUpdated'];\n};\n\nexport function getUpdateA2aStatusInstruction<\n TAccountStatus extends string,\n TAccountSession extends string,\n TAccountUpdater extends string,\n TAccountSystemProgram extends string,\n TProgramAddress extends\n Address = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: UpdateA2aStatusInput<\n TAccountStatus,\n TAccountSession,\n TAccountUpdater,\n TAccountSystemProgram\n >,\n config?: { programAddress?: TProgramAddress }\n): UpdateA2aStatusInstruction<\n TProgramAddress,\n TAccountStatus,\n TAccountSession,\n TAccountUpdater,\n TAccountSystemProgram\n> {\n // Program address.\n const programAddress =\n config?.programAddress ?? GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n status: { value: input.status ?? null, isWritable: true },\n session: { value: input.session ?? null, isWritable: false },\n updater: { value: input.updater ?? null, isWritable: true },\n systemProgram: { value: input.systemProgram ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input, status: input.statusArg };\n\n // Resolve default values.\n if (!accounts.systemProgram.value) {\n accounts.systemProgram.value =\n '11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.status),\n getAccountMeta(accounts.session),\n getAccountMeta(accounts.updater),\n getAccountMeta(accounts.systemProgram),\n ],\n programAddress,\n data: getUpdateA2aStatusInstructionDataEncoder().encode(\n args as UpdateA2aStatusInstructionDataArgs\n ),\n } as UpdateA2aStatusInstruction<\n TProgramAddress,\n TAccountStatus,\n TAccountSession,\n TAccountUpdater,\n TAccountSystemProgram\n >;\n\n return instruction;\n}\n\nexport type ParsedUpdateA2aStatusInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n status: TAccountMetas[0];\n session: TAccountMetas[1];\n updater: TAccountMetas[2];\n systemProgram: TAccountMetas[3];\n };\n data: UpdateA2aStatusInstructionData;\n};\n\nexport function parseUpdateA2aStatusInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>\n): ParsedUpdateA2aStatusInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 4) {\n throw new Error('[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts');\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = instruction.accounts![accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n status: getNextAccount(),\n session: getNextAccount(),\n updater: getNextAccount(),\n systemProgram: getNextAccount(),\n },\n data: getUpdateA2aStatusInstructionDataDecoder().decode(instruction.data),\n };\n}\n","/**\n * This code was AUTOGENERATED using the codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n addDecoderSizePrefix,\n addEncoderSizePrefix,\n combineCodec,\n fixDecoderSize,\n fixEncoderSize,\n getAddressEncoder,\n getBytesDecoder,\n getBytesEncoder,\n getProgramDerivedAddress,\n getStructDecoder,\n getStructEncoder,\n getU32Decoder,\n getU32Encoder,\n getU8Decoder,\n getU8Encoder,\n getUtf8Decoder,\n getUtf8Encoder,\n transformEncoder,\n type AccountMeta,\n type AccountSignerMeta,\n type Address,\n type Codec,\n type Decoder,\n type Encoder,\n type Instruction,\n type InstructionWithAccounts,\n type InstructionWithData,\n type ReadonlyAccount,\n type ReadonlyUint8Array,\n type TransactionSigner,\n type WritableAccount,\n type WritableSignerAccount,\n} from '@solana/kit';\nimport {\n GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_INSTRUCTION_DATA,\n GHOSTSPEAK_MARKETPLACE_ERROR__MISSING_REQUIRED_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INSTRUCTION_PARSING_FAILED,\n isGhostspeakMarketplaceError,\n} from '../errors';\nimport { GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS } from '../programs';\nimport {\n expectAddress,\n expectSome,\n getAccountMetaFactory,\n type ResolvedAccount,\n} from '../shared';\n\nexport const UPDATE_AGENT_DISCRIMINATOR = new Uint8Array([\n 85, 2, 178, 9, 119, 139, 102, 164,\n]);\n\nexport function getUpdateAgentDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 8).encode(\n UPDATE_AGENT_DISCRIMINATOR\n );\n}\n\nexport type UpdateAgentInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountAgentAccount extends string | AccountMeta<string> = string,\n TAccountSigner extends string | AccountMeta<string> = string,\n TAccountClock extends\n | string\n | AccountMeta<string> = 'SysvarC1ock11111111111111111111111111111111',\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountAgentAccount extends string\n ? WritableAccount<TAccountAgentAccount>\n : TAccountAgentAccount,\n TAccountSigner extends string\n ? WritableSignerAccount<TAccountSigner> &\n AccountSignerMeta<TAccountSigner>\n : TAccountSigner,\n TAccountClock extends string\n ? ReadonlyAccount<TAccountClock>\n : TAccountClock,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type UpdateAgentInstructionData = {\n discriminator: ReadonlyUint8Array;\n agentType: number;\n metadataUri: string;\n agentId: string;\n};\n\nexport type UpdateAgentInstructionDataArgs = {\n agentType: number;\n metadataUri: string;\n agentId: string;\n};\n\nexport function getUpdateAgentInstructionDataEncoder(): Encoder<UpdateAgentInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n ['discriminator', fixEncoderSize(getBytesEncoder(), 8)],\n ['agentType', getU8Encoder()],\n ['metadataUri', addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder())],\n ['agentId', addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder())],\n ]),\n (value) => ({ ...value, discriminator: UPDATE_AGENT_DISCRIMINATOR })\n );\n}\n\nexport function getUpdateAgentInstructionDataDecoder(): Decoder<UpdateAgentInstructionData> {\n return getStructDecoder([\n ['discriminator', fixDecoderSize(getBytesDecoder(), 8)],\n ['agentType', getU8Decoder()],\n ['metadataUri', addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())],\n ['agentId', addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())],\n ]);\n}\n\nexport function getUpdateAgentInstructionDataCodec(): Codec<\n UpdateAgentInstructionDataArgs,\n UpdateAgentInstructionData\n> {\n return combineCodec(\n getUpdateAgentInstructionDataEncoder(),\n getUpdateAgentInstructionDataDecoder()\n );\n}\n\nexport type UpdateAgentAsyncInput<\n TAccountAgentAccount extends string = string,\n TAccountSigner extends string = string,\n TAccountClock extends string = string,\n> = {\n /** Agent account with canonical PDA validation */\n agentAccount?: Address<TAccountAgentAccount>;\n /** Enhanced authority verification */\n signer: TransactionSigner<TAccountSigner>;\n /** Clock sysvar for rate limiting */\n clock?: Address<TAccountClock>;\n agentType: UpdateAgentInstructionDataArgs['agentType'];\n metadataUri: UpdateAgentInstructionDataArgs['metadataUri'];\n agentId: UpdateAgentInstructionDataArgs['agentId'];\n};\n\nexport async function getUpdateAgentInstructionAsync<\n TAccountAgentAccount extends string,\n TAccountSigner extends string,\n TAccountClock extends string,\n TProgramAddress extends\n Address = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: UpdateAgentAsyncInput<\n TAccountAgentAccount,\n TAccountSigner,\n TAccountClock\n >,\n config?: { programAddress?: TProgramAddress }\n): Promise<\n UpdateAgentInstruction<\n TProgramAddress,\n TAccountAgentAccount,\n TAccountSigner,\n TAccountClock\n >\n> {\n // Program address.\n const programAddress =\n config?.programAddress ?? GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n agentAccount: { value: input.agentAccount ?? null, isWritable: true },\n signer: { value: input.signer ?? null, isWritable: true },\n clock: { value: input.clock ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolve default values.\n if (!accounts.agentAccount.value) {\n accounts.agentAccount.value = await getProgramDerivedAddress({\n programAddress,\n seeds: [\n getBytesEncoder().encode(new Uint8Array([97, 103, 101, 110, 116])),\n getAddressEncoder().encode(expectAddress(accounts.signer.value)),\n addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder()).encode(\n expectSome(args.agentId)\n ),\n ],\n });\n }\n if (!accounts.clock.value) {\n accounts.clock.value =\n 'SysvarC1ock11111111111111111111111111111111' as Address<'SysvarC1ock11111111111111111111111111111111'>;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.agentAccount),\n getAccountMeta(accounts.signer),\n getAccountMeta(accounts.clock),\n ],\n programAddress,\n data: getUpdateAgentInstructionDataEncoder().encode(\n args as UpdateAgentInstructionDataArgs\n ),\n } as UpdateAgentInstruction<\n TProgramAddress,\n TAccountAgentAccount,\n TAccountSigner,\n TAccountClock\n >;\n\n return instruction;\n}\n\nexport type UpdateAgentInput<\n TAccountAgentAccount extends string = string,\n TAccountSigner extends string = string,\n TAccountClock extends string = string,\n> = {\n /** Agent account with canonical PDA validation */\n agentAccount: Address<TAccountAgentAccount>;\n /** Enhanced authority verification */\n signer: TransactionSigner<TAccountSigner>;\n /** Clock sysvar for rate limiting */\n clock?: Address<TAccountClock>;\n agentType: UpdateAgentInstructionDataArgs['agentType'];\n metadataUri: UpdateAgentInstructionDataArgs['metadataUri'];\n agentId: UpdateAgentInstructionDataArgs['agentId'];\n};\n\nexport function getUpdateAgentInstruction<\n TAccountAgentAccount extends string,\n TAccountSigner extends string,\n TAccountClock extends string,\n TProgramAddress extends\n Address = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: UpdateAgentInput<TAccountAgentAccount, TAccountSigner, TAccountClock>,\n config?: { programAddress?: TProgramAddress }\n): UpdateAgentInstruction<\n TProgramAddress,\n TAccountAgentAccount,\n TAccountSigner,\n TAccountClock\n> {\n // Program address.\n const programAddress =\n config?.programAddress ?? GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n agentAccount: { value: input.agentAccount ?? null, isWritable: true },\n signer: { value: input.signer ?? null, isWritable: true },\n clock: { value: input.clock ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolve default values.\n if (!accounts.clock.value) {\n accounts.clock.value =\n 'SysvarC1ock11111111111111111111111111111111' as Address<'SysvarC1ock11111111111111111111111111111111'>;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.agentAccount),\n getAccountMeta(accounts.signer),\n getAccountMeta(accounts.clock),\n ],\n programAddress,\n data: getUpdateAgentInstructionDataEncoder().encode(\n args as UpdateAgentInstructionDataArgs\n ),\n } as UpdateAgentInstruction<\n TProgramAddress,\n TAccountAgentAccount,\n TAccountSigner,\n TAccountClock\n >;\n\n return instruction;\n}\n\nexport type ParsedUpdateAgentInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n /** Agent account with canonical PDA validation */\n agentAccount: TAccountMetas[0];\n /** Enhanced authority verification */\n signer: TAccountMetas[1];\n /** Clock sysvar for rate limiting */\n clock: TAccountMetas[2];\n };\n data: UpdateAgentInstructionData;\n};\n\nexport function parseUpdateAgentInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>\n): ParsedUpdateAgentInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 3) {\n throw new Error('[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts');\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = instruction.accounts![accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n agentAccount: getNextAccount(),\n signer: getNextAccount(),\n clock: getNextAccount(),\n },\n data: getUpdateAgentInstructionDataDecoder().decode(instruction.data),\n };\n}\n","/**\n * This code was AUTOGENERATED using the codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n addDecoderSizePrefix,\n addEncoderSizePrefix,\n combineCodec,\n fixDecoderSize,\n fixEncoderSize,\n getAddressEncoder,\n getBytesDecoder,\n getBytesEncoder,\n getProgramDerivedAddress,\n getStructDecoder,\n getStructEncoder,\n getU32Decoder,\n getU32Encoder,\n getU64Decoder,\n getU64Encoder,\n getUtf8Decoder,\n getUtf8Encoder,\n transformEncoder,\n type AccountMeta,\n type AccountSignerMeta,\n type Address,\n type Codec,\n type Decoder,\n type Encoder,\n type Instruction,\n type InstructionWithAccounts,\n type InstructionWithData,\n type ReadonlyAccount,\n type ReadonlyUint8Array,\n type TransactionSigner,\n type WritableAccount,\n type WritableSignerAccount,\n} from '@solana/kit';\nimport {\n GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_INSTRUCTION_DATA,\n GHOSTSPEAK_MARKETPLACE_ERROR__MISSING_REQUIRED_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INSTRUCTION_PARSING_FAILED,\n isGhostspeakMarketplaceError,\n} from '../errors';\nimport { GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS } from '../programs';\nimport {\n expectAddress,\n expectSome,\n getAccountMetaFactory,\n type ResolvedAccount,\n} from '../shared';\n\nexport const UPDATE_AGENT_REPUTATION_DISCRIMINATOR = new Uint8Array([\n 80, 227, 92, 245, 231, 37, 99, 180,\n]);\n\nexport function getUpdateAgentReputationDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 8).encode(\n UPDATE_AGENT_REPUTATION_DISCRIMINATOR\n );\n}\n\nexport type UpdateAgentReputationInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountAgentAccount extends string | AccountMeta<string> = string,\n TAccountSigner extends string | AccountMeta<string> = string,\n TAccountClock extends\n | string\n | AccountMeta<string> = 'SysvarC1ock11111111111111111111111111111111',\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountAgentAccount extends string\n ? WritableAccount<TAccountAgentAccount>\n : TAccountAgentAccount,\n TAccountSigner extends string\n ? WritableSignerAccount<TAccountSigner> &\n AccountSignerMeta<TAccountSigner>\n : TAccountSigner,\n TAccountClock extends string\n ? ReadonlyAccount<TAccountClock>\n : TAccountClock,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type UpdateAgentReputationInstructionData = {\n discriminator: ReadonlyUint8Array;\n agentId: string;\n reputationScore: bigint;\n};\n\nexport type UpdateAgentReputationInstructionDataArgs = {\n agentId: string;\n reputationScore: number | bigint;\n};\n\nexport function getUpdateAgentReputationInstructionDataEncoder(): Encoder<UpdateAgentReputationInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n ['discriminator', fixEncoderSize(getBytesEncoder(), 8)],\n ['agentId', addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder())],\n ['reputationScore', getU64Encoder()],\n ]),\n (value) => ({\n ...value,\n discriminator: UPDATE_AGENT_REPUTATION_DISCRIMINATOR,\n })\n );\n}\n\nexport function getUpdateAgentReputationInstructionDataDecoder(): Decoder<UpdateAgentReputationInstructionData> {\n return getStructDecoder([\n ['discriminator', fixDecoderSize(getBytesDecoder(), 8)],\n ['agentId', addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())],\n ['reputationScore', getU64Decoder()],\n ]);\n}\n\nexport function getUpdateAgentReputationInstructionDataCodec(): Codec<\n UpdateAgentReputationInstructionDataArgs,\n UpdateAgentReputationInstructionData\n> {\n return combineCodec(\n getUpdateAgentReputationInstructionDataEncoder(),\n getUpdateAgentReputationInstructionDataDecoder()\n );\n}\n\nexport type UpdateAgentReputationAsyncInput<\n TAccountAgentAccount extends string = string,\n TAccountSigner extends string = string,\n TAccountClock extends string = string,\n> = {\n /** Agent account with canonical PDA validation */\n agentAccount?: Address<TAccountAgentAccount>;\n /** Enhanced authority verification */\n signer: TransactionSigner<TAccountSigner>;\n /** Clock sysvar for rate limiting */\n clock?: Address<TAccountClock>;\n agentId: UpdateAgentReputationInstructionDataArgs['agentId'];\n reputationScore: UpdateAgentReputationInstructionDataArgs['reputationScore'];\n};\n\nexport async function getUpdateAgentReputationInstructionAsync<\n TAccountAgentAccount extends string,\n TAccountSigner extends string,\n TAccountClock extends string,\n TProgramAddress extends\n Address = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: UpdateAgentReputationAsyncInput<\n TAccountAgentAccount,\n TAccountSigner,\n TAccountClock\n >,\n config?: { programAddress?: TProgramAddress }\n): Promise<\n UpdateAgentReputationInstruction<\n TProgramAddress,\n TAccountAgentAccount,\n TAccountSigner,\n TAccountClock\n >\n> {\n // Program address.\n const programAddress =\n config?.programAddress ?? GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n agentAccount: { value: input.agentAccount ?? null, isWritable: true },\n signer: { value: input.signer ?? null, isWritable: true },\n clock: { value: input.clock ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolve default values.\n if (!accounts.agentAccount.value) {\n accounts.agentAccount.value = await getProgramDerivedAddress({\n programAddress,\n seeds: [\n getBytesEncoder().encode(new Uint8Array([97, 103, 101, 110, 116])),\n getAddressEncoder().encode(expectAddress(accounts.signer.value)),\n addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder()).encode(\n expectSome(args.agentId)\n ),\n ],\n });\n }\n if (!accounts.clock.value) {\n accounts.clock.value =\n 'SysvarC1ock11111111111111111111111111111111' as Address<'SysvarC1ock11111111111111111111111111111111'>;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.agentAccount),\n getAccountMeta(accounts.signer),\n getAccountMeta(accounts.clock),\n ],\n programAddress,\n data: getUpdateAgentReputationInstructionDataEncoder().encode(\n args as UpdateAgentReputationInstructionDataArgs\n ),\n } as UpdateAgentReputationInstruction<\n TProgramAddress,\n TAccountAgentAccount,\n TAccountSigner,\n TAccountClock\n >;\n\n return instruction;\n}\n\nexport type UpdateAgentReputationInput<\n TAccountAgentAccount extends string = string,\n TAccountSigner extends string = string,\n TAccountClock extends string = string,\n> = {\n /** Agent account with canonical PDA validation */\n agentAccount: Address<TAccountAgentAccount>;\n /** Enhanced authority verification */\n signer: TransactionSigner<TAccountSigner>;\n /** Clock sysvar for rate limiting */\n clock?: Address<TAccountClock>;\n agentId: UpdateAgentReputationInstructionDataArgs['agentId'];\n reputationScore: UpdateAgentReputationInstructionDataArgs['reputationScore'];\n};\n\nexport function getUpdateAgentReputationInstruction<\n TAccountAgentAccount extends string,\n TAccountSigner extends string,\n TAccountClock extends string,\n TProgramAddress extends\n Address = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: UpdateAgentReputationInput<\n TAccountAgentAccount,\n TAccountSigner,\n TAccountClock\n >,\n config?: { programAddress?: TProgramAddress }\n): UpdateAgentReputationInstruction<\n TProgramAddress,\n TAccountAgentAccount,\n TAccountSigner,\n TAccountClock\n> {\n // Program address.\n const programAddress =\n config?.programAddress ?? GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n agentAccount: { value: input.agentAccount ?? null, isWritable: true },\n signer: { value: input.signer ?? null, isWritable: true },\n clock: { value: input.clock ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolve default values.\n if (!accounts.clock.value) {\n accounts.clock.value =\n 'SysvarC1ock11111111111111111111111111111111' as Address<'SysvarC1ock11111111111111111111111111111111'>;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.agentAccount),\n getAccountMeta(accounts.signer),\n getAccountMeta(accounts.clock),\n ],\n programAddress,\n data: getUpdateAgentReputationInstructionDataEncoder().encode(\n args as UpdateAgentReputationInstructionDataArgs\n ),\n } as UpdateAgentReputationInstruction<\n TProgramAddress,\n TAccountAgentAccount,\n TAccountSigner,\n TAccountClock\n >;\n\n return instruction;\n}\n\nexport type ParsedUpdateAgentReputationInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n /** Agent account with canonical PDA validation */\n agentAccount: TAccountMetas[0];\n /** Enhanced authority verification */\n signer: TAccountMetas[1];\n /** Clock sysvar for rate limiting */\n clock: TAccountMetas[2];\n };\n data: UpdateAgentReputationInstructionData;\n};\n\nexport function parseUpdateAgentReputationInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>\n): ParsedUpdateAgentReputationInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 3) {\n throw new Error('[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts');\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = instruction.accounts![accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n agentAccount: getNextAccount(),\n signer: getNextAccount(),\n clock: getNextAccount(),\n },\n data: getUpdateAgentReputationInstructionDataDecoder().decode(\n instruction.data\n ),\n };\n}\n","/**\n * This code was AUTOGENERATED using the codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n addDecoderSizePrefix,\n addEncoderSizePrefix,\n combineCodec,\n fixDecoderSize,\n fixEncoderSize,\n getAddressDecoder,\n getAddressEncoder,\n getArrayDecoder,\n getArrayEncoder,\n getBooleanDecoder,\n getBooleanEncoder,\n getBytesDecoder,\n getBytesEncoder,\n getI64Decoder,\n getI64Encoder,\n getOptionDecoder,\n getOptionEncoder,\n getProgramDerivedAddress,\n getStructDecoder,\n getStructEncoder,\n getU32Decoder,\n getU32Encoder,\n getUtf8Decoder,\n getUtf8Encoder,\n transformEncoder,\n type AccountMeta,\n type AccountSignerMeta,\n type Address,\n type Codec,\n type Decoder,\n type Encoder,\n type Instruction,\n type InstructionWithAccounts,\n type InstructionWithData,\n type Option,\n type OptionOrNullable,\n type ReadonlyAccount,\n type ReadonlyUint8Array,\n type TransactionSigner,\n type WritableAccount,\n type WritableSignerAccount,\n} from '@solana/kit';\nimport {\n GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_INSTRUCTION_DATA,\n GHOSTSPEAK_MARKETPLACE_ERROR__MISSING_REQUIRED_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INSTRUCTION_PARSING_FAILED,\n isGhostspeakMarketplaceError,\n} from '../errors';\nimport { GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS } from '../programs';\nimport {\n expectAddress,\n getAccountMetaFactory,\n type ResolvedAccount,\n} from '../shared';\n\nexport const UPDATE_AGENT_SERVICE_DISCRIMINATOR = new Uint8Array([\n 87, 146, 181, 198, 252, 68, 243, 102,\n]);\n\nexport function getUpdateAgentServiceDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 8).encode(\n UPDATE_AGENT_SERVICE_DISCRIMINATOR\n );\n}\n\nexport type UpdateAgentServiceInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountAgent extends string | AccountMeta<string> = string,\n TAccountOwner extends string | AccountMeta<string> = string,\n TAccountSystemProgram extends\n | string\n | AccountMeta<string> = '11111111111111111111111111111111',\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountAgent extends string\n ? WritableAccount<TAccountAgent>\n : TAccountAgent,\n TAccountOwner extends string\n ? WritableSignerAccount<TAccountOwner> &\n AccountSignerMeta<TAccountOwner>\n : TAccountOwner,\n TAccountSystemProgram extends string\n ? ReadonlyAccount<TAccountSystemProgram>\n : TAccountSystemProgram,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type UpdateAgentServiceInstructionData = {\n discriminator: ReadonlyUint8Array;\n /** Agent's public key for verification (must match PDA derivation) */\n agentPubkey: Address;\n /** Service endpoint URL (validated for length and format) */\n serviceEndpoint: string;\n /** Agent availability status for work orders */\n isActive: boolean;\n /** Timestamp for tracking updates (Unix timestamp) */\n lastUpdated: bigint;\n /** Optional metadata URI for extended agent information */\n metadataUri: Option<string>;\n /** Service capability tags for filtering */\n capabilities: Array<string>;\n};\n\nexport type UpdateAgentServiceInstructionDataArgs = {\n /** Agent's public key for verification (must match PDA derivation) */\n agentPubkey: Address;\n /** Service endpoint URL (validated for length and format) */\n serviceEndpoint: string;\n /** Agent availability status for work orders */\n isActive: boolean;\n /** Timestamp for tracking updates (Unix timestamp) */\n lastUpdated: number | bigint;\n /** Optional metadata URI for extended agent information */\n metadataUri: OptionOrNullable<string>;\n /** Service capability tags for filtering */\n capabilities: Array<string>;\n};\n\nexport function getUpdateAgentServiceInstructionDataEncoder(): Encoder<UpdateAgentServiceInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n ['discriminator', fixEncoderSize(getBytesEncoder(), 8)],\n ['agentPubkey', getAddressEncoder()],\n [\n 'serviceEndpoint',\n addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder()),\n ],\n ['isActive', getBooleanEncoder()],\n ['lastUpdated', getI64Encoder()],\n [\n 'metadataUri',\n getOptionEncoder(\n addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder())\n ),\n ],\n [\n 'capabilities',\n getArrayEncoder(\n addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder())\n ),\n ],\n ]),\n (value) => ({ ...value, discriminator: UPDATE_AGENT_SERVICE_DISCRIMINATOR })\n );\n}\n\nexport function getUpdateAgentServiceInstructionDataDecoder(): Decoder<UpdateAgentServiceInstructionData> {\n return getStructDecoder([\n ['discriminator', fixDecoderSize(getBytesDecoder(), 8)],\n ['agentPubkey', getAddressDecoder()],\n [\n 'serviceEndpoint',\n addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder()),\n ],\n ['isActive', getBooleanDecoder()],\n ['lastUpdated', getI64Decoder()],\n [\n 'metadataUri',\n getOptionDecoder(addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())),\n ],\n [\n 'capabilities',\n getArrayDecoder(addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())),\n ],\n ]);\n}\n\nexport function getUpdateAgentServiceInstructionDataCodec(): Codec<\n UpdateAgentServiceInstructionDataArgs,\n UpdateAgentServiceInstructionData\n> {\n return combineCodec(\n getUpdateAgentServiceInstructionDataEncoder(),\n getUpdateAgentServiceInstructionDataDecoder()\n );\n}\n\nexport type UpdateAgentServiceAsyncInput<\n TAccountAgent extends string = string,\n TAccountOwner extends string = string,\n TAccountSystemProgram extends string = string,\n> = {\n /** Agent account with enhanced 2025 security patterns */\n agent?: Address<TAccountAgent>;\n /** Owner must be signer for security (2025 pattern) */\n owner: TransactionSigner<TAccountOwner>;\n /** System program for account operations */\n systemProgram?: Address<TAccountSystemProgram>;\n agentPubkey: UpdateAgentServiceInstructionDataArgs['agentPubkey'];\n serviceEndpoint: UpdateAgentServiceInstructionDataArgs['serviceEndpoint'];\n isActive: UpdateAgentServiceInstructionDataArgs['isActive'];\n lastUpdated: UpdateAgentServiceInstructionDataArgs['lastUpdated'];\n metadataUri: UpdateAgentServiceInstructionDataArgs['metadataUri'];\n capabilities: UpdateAgentServiceInstructionDataArgs['capabilities'];\n};\n\nexport async function getUpdateAgentServiceInstructionAsync<\n TAccountAgent extends string,\n TAccountOwner extends string,\n TAccountSystemProgram extends string,\n TProgramAddress extends\n Address = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: UpdateAgentServiceAsyncInput<\n TAccountAgent,\n TAccountOwner,\n TAccountSystemProgram\n >,\n config?: { programAddress?: TProgramAddress }\n): Promise<\n UpdateAgentServiceInstruction<\n TProgramAddress,\n TAccountAgent,\n TAccountOwner,\n TAccountSystemProgram\n >\n> {\n // Program address.\n const programAddress =\n config?.programAddress ?? GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n agent: { value: input.agent ?? null, isWritable: true },\n owner: { value: input.owner ?? null, isWritable: true },\n systemProgram: { value: input.systemProgram ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolve default values.\n if (!accounts.agent.value) {\n accounts.agent.value = await getProgramDerivedAddress({\n programAddress,\n seeds: [\n getBytesEncoder().encode(new Uint8Array([97, 103, 101, 110, 116])),\n getAddressEncoder().encode(expectAddress(accounts.owner.value)),\n ],\n });\n }\n if (!accounts.systemProgram.value) {\n accounts.systemProgram.value =\n '11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.agent),\n getAccountMeta(accounts.owner),\n getAccountMeta(accounts.systemProgram),\n ],\n programAddress,\n data: getUpdateAgentServiceInstructionDataEncoder().encode(\n args as UpdateAgentServiceInstructionDataArgs\n ),\n } as UpdateAgentServiceInstruction<\n TProgramAddress,\n TAccountAgent,\n TAccountOwner,\n TAccountSystemProgram\n >;\n\n return instruction;\n}\n\nexport type UpdateAgentServiceInput<\n TAccountAgent extends string = string,\n TAccountOwner extends string = string,\n TAccountSystemProgram extends string = string,\n> = {\n /** Agent account with enhanced 2025 security patterns */\n agent: Address<TAccountAgent>;\n /** Owner must be signer for security (2025 pattern) */\n owner: TransactionSigner<TAccountOwner>;\n /** System program for account operations */\n systemProgram?: Address<TAccountSystemProgram>;\n agentPubkey: UpdateAgentServiceInstructionDataArgs['agentPubkey'];\n serviceEndpoint: UpdateAgentServiceInstructionDataArgs['serviceEndpoint'];\n isActive: UpdateAgentServiceInstructionDataArgs['isActive'];\n lastUpdated: UpdateAgentServiceInstructionDataArgs['lastUpdated'];\n metadataUri: UpdateAgentServiceInstructionDataArgs['metadataUri'];\n capabilities: UpdateAgentServiceInstructionDataArgs['capabilities'];\n};\n\nexport function getUpdateAgentServiceInstruction<\n TAccountAgent extends string,\n TAccountOwner extends string,\n TAccountSystemProgram extends string,\n TProgramAddress extends\n Address = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: UpdateAgentServiceInput<\n TAccountAgent,\n TAccountOwner,\n TAccountSystemProgram\n >,\n config?: { programAddress?: TProgramAddress }\n): UpdateAgentServiceInstruction<\n TProgramAddress,\n TAccountAgent,\n TAccountOwner,\n TAccountSystemProgram\n> {\n // Program address.\n const programAddress =\n config?.programAddress ?? GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n agent: { value: input.agent ?? null, isWritable: true },\n owner: { value: input.owner ?? null, isWritable: true },\n systemProgram: { value: input.systemProgram ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolve default values.\n if (!accounts.systemProgram.value) {\n accounts.systemProgram.value =\n '11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.agent),\n getAccountMeta(accounts.owner),\n getAccountMeta(accounts.systemProgram),\n ],\n programAddress,\n data: getUpdateAgentServiceInstructionDataEncoder().encode(\n args as UpdateAgentServiceInstructionDataArgs\n ),\n } as UpdateAgentServiceInstruction<\n TProgramAddress,\n TAccountAgent,\n TAccountOwner,\n TAccountSystemProgram\n >;\n\n return instruction;\n}\n\nexport type ParsedUpdateAgentServiceInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n /** Agent account with enhanced 2025 security patterns */\n agent: TAccountMetas[0];\n /** Owner must be signer for security (2025 pattern) */\n owner: TAccountMetas[1];\n /** System program for account operations */\n systemProgram: TAccountMetas[2];\n };\n data: UpdateAgentServiceInstructionData;\n};\n\nexport function parseUpdateAgentServiceInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>\n): ParsedUpdateAgentServiceInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 3) {\n throw new Error('[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts');\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = instruction.accounts![accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n agent: getNextAccount(),\n owner: getNextAccount(),\n systemProgram: getNextAccount(),\n },\n data: getUpdateAgentServiceInstructionDataDecoder().decode(\n instruction.data\n ),\n };\n}\n","/**\n * This code was AUTOGENERATED using the codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n addDecoderSizePrefix,\n addEncoderSizePrefix,\n combineCodec,\n fixDecoderSize,\n fixEncoderSize,\n getAddressEncoder,\n getBytesDecoder,\n getBytesEncoder,\n getProgramDerivedAddress,\n getStructDecoder,\n getStructEncoder,\n getU32Decoder,\n getU32Encoder,\n getUtf8Decoder,\n getUtf8Encoder,\n transformEncoder,\n type AccountMeta,\n type AccountSignerMeta,\n type Address,\n type Codec,\n type Decoder,\n type Encoder,\n type Instruction,\n type InstructionWithAccounts,\n type InstructionWithData,\n type ReadonlyAccount,\n type ReadonlySignerAccount,\n type ReadonlyUint8Array,\n type TransactionSigner,\n type WritableAccount,\n} from '@solana/kit';\nimport {\n GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_INSTRUCTION_DATA,\n GHOSTSPEAK_MARKETPLACE_ERROR__MISSING_REQUIRED_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INSTRUCTION_PARSING_FAILED,\n isGhostspeakMarketplaceError,\n} from '../errors';\nimport { GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS } from '../programs';\nimport {\n expectAddress,\n getAccountMetaFactory,\n type ResolvedAccount,\n} from '../shared';\n\nexport const UPDATE_ANALYTICS_DASHBOARD_DISCRIMINATOR = new Uint8Array([\n 184, 35, 106, 114, 27, 86, 233, 32,\n]);\n\nexport function getUpdateAnalyticsDashboardDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 8).encode(\n UPDATE_ANALYTICS_DASHBOARD_DISCRIMINATOR\n );\n}\n\nexport type UpdateAnalyticsDashboardInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountDashboard extends string | AccountMeta<string> = string,\n TAccountUserRegistry extends string | AccountMeta<string> = string,\n TAccountOwner extends string | AccountMeta<string> = string,\n TAccountClock extends\n | string\n | AccountMeta<string> = 'SysvarC1ock11111111111111111111111111111111',\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountDashboard extends string\n ? WritableAccount<TAccountDashboard>\n : TAccountDashboard,\n TAccountUserRegistry extends string\n ? WritableAccount<TAccountUserRegistry>\n : TAccountUserRegistry,\n TAccountOwner extends string\n ? ReadonlySignerAccount<TAccountOwner> &\n AccountSignerMeta<TAccountOwner>\n : TAccountOwner,\n TAccountClock extends string\n ? ReadonlyAccount<TAccountClock>\n : TAccountClock,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type UpdateAnalyticsDashboardInstructionData = {\n discriminator: ReadonlyUint8Array;\n newMetrics: string;\n};\n\nexport type UpdateAnalyticsDashboardInstructionDataArgs = {\n newMetrics: string;\n};\n\nexport function getUpdateAnalyticsDashboardInstructionDataEncoder(): Encoder<UpdateAnalyticsDashboardInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n ['discriminator', fixEncoderSize(getBytesEncoder(), 8)],\n ['newMetrics', addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder())],\n ]),\n (value) => ({\n ...value,\n discriminator: UPDATE_ANALYTICS_DASHBOARD_DISCRIMINATOR,\n })\n );\n}\n\nexport function getUpdateAnalyticsDashboardInstructionDataDecoder(): Decoder<UpdateAnalyticsDashboardInstructionData> {\n return getStructDecoder([\n ['discriminator', fixDecoderSize(getBytesDecoder(), 8)],\n ['newMetrics', addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())],\n ]);\n}\n\nexport function getUpdateAnalyticsDashboardInstructionDataCodec(): Codec<\n UpdateAnalyticsDashboardInstructionDataArgs,\n UpdateAnalyticsDashboardInstructionData\n> {\n return combineCodec(\n getUpdateAnalyticsDashboardInstructionDataEncoder(),\n getUpdateAnalyticsDashboardInstructionDataDecoder()\n );\n}\n\nexport type UpdateAnalyticsDashboardAsyncInput<\n TAccountDashboard extends string = string,\n TAccountUserRegistry extends string = string,\n TAccountOwner extends string = string,\n TAccountClock extends string = string,\n> = {\n /** Dashboard account with canonical validation */\n dashboard: Address<TAccountDashboard>;\n /** User registry for rate limiting */\n userRegistry?: Address<TAccountUserRegistry>;\n /** Enhanced owner verification */\n owner: TransactionSigner<TAccountOwner>;\n /** Clock sysvar for rate limiting */\n clock?: Address<TAccountClock>;\n newMetrics: UpdateAnalyticsDashboardInstructionDataArgs['newMetrics'];\n};\n\nexport async function getUpdateAnalyticsDashboardInstructionAsync<\n TAccountDashboard extends string,\n TAccountUserRegistry extends string,\n TAccountOwner extends string,\n TAccountClock extends string,\n TProgramAddress extends\n Address = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: UpdateAnalyticsDashboardAsyncInput<\n TAccountDashboard,\n TAccountUserRegistry,\n TAccountOwner,\n TAccountClock\n >,\n config?: { programAddress?: TProgramAddress }\n): Promise<\n UpdateAnalyticsDashboardInstruction<\n TProgramAddress,\n TAccountDashboard,\n TAccountUserRegistry,\n TAccountOwner,\n TAccountClock\n >\n> {\n // Program address.\n const programAddress =\n config?.programAddress ?? GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n dashboard: { value: input.dashboard ?? null, isWritable: true },\n userRegistry: { value: input.userRegistry ?? null, isWritable: true },\n owner: { value: input.owner ?? null, isWritable: false },\n clock: { value: input.clock ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolve default values.\n if (!accounts.userRegistry.value) {\n accounts.userRegistry.value = await getProgramDerivedAddress({\n programAddress,\n seeds: [\n getBytesEncoder().encode(\n new Uint8Array([\n 117, 115, 101, 114, 95, 114, 101, 103, 105, 115, 116, 114, 121,\n ])\n ),\n getAddressEncoder().encode(expectAddress(accounts.owner.value)),\n ],\n });\n }\n if (!accounts.clock.value) {\n accounts.clock.value =\n 'SysvarC1ock11111111111111111111111111111111' as Address<'SysvarC1ock11111111111111111111111111111111'>;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.dashboard),\n getAccountMeta(accounts.userRegistry),\n getAccountMeta(accounts.owner),\n getAccountMeta(accounts.clock),\n ],\n programAddress,\n data: getUpdateAnalyticsDashboardInstructionDataEncoder().encode(\n args as UpdateAnalyticsDashboardInstructionDataArgs\n ),\n } as UpdateAnalyticsDashboardInstruction<\n TProgramAddress,\n TAccountDashboard,\n TAccountUserRegistry,\n TAccountOwner,\n TAccountClock\n >;\n\n return instruction;\n}\n\nexport type UpdateAnalyticsDashboardInput<\n TAccountDashboard extends string = string,\n TAccountUserRegistry extends string = string,\n TAccountOwner extends string = string,\n TAccountClock extends string = string,\n> = {\n /** Dashboard account with canonical validation */\n dashboard: Address<TAccountDashboard>;\n /** User registry for rate limiting */\n userRegistry: Address<TAccountUserRegistry>;\n /** Enhanced owner verification */\n owner: TransactionSigner<TAccountOwner>;\n /** Clock sysvar for rate limiting */\n clock?: Address<TAccountClock>;\n newMetrics: UpdateAnalyticsDashboardInstructionDataArgs['newMetrics'];\n};\n\nexport function getUpdateAnalyticsDashboardInstruction<\n TAccountDashboard extends string,\n TAccountUserRegistry extends string,\n TAccountOwner extends string,\n TAccountClock extends string,\n TProgramAddress extends\n Address = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: UpdateAnalyticsDashboardInput<\n TAccountDashboard,\n TAccountUserRegistry,\n TAccountOwner,\n TAccountClock\n >,\n config?: { programAddress?: TProgramAddress }\n): UpdateAnalyticsDashboardInstruction<\n TProgramAddress,\n TAccountDashboard,\n TAccountUserRegistry,\n TAccountOwner,\n TAccountClock\n> {\n // Program address.\n const programAddress =\n config?.programAddress ?? GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n dashboard: { value: input.dashboard ?? null, isWritable: true },\n userRegistry: { value: input.userRegistry ?? null, isWritable: true },\n owner: { value: input.owner ?? null, isWritable: false },\n clock: { value: input.clock ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolve default values.\n if (!accounts.clock.value) {\n accounts.clock.value =\n 'SysvarC1ock11111111111111111111111111111111' as Address<'SysvarC1ock11111111111111111111111111111111'>;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.dashboard),\n getAccountMeta(accounts.userRegistry),\n getAccountMeta(accounts.owner),\n getAccountMeta(accounts.clock),\n ],\n programAddress,\n data: getUpdateAnalyticsDashboardInstructionDataEncoder().encode(\n args as UpdateAnalyticsDashboardInstructionDataArgs\n ),\n } as UpdateAnalyticsDashboardInstruction<\n TProgramAddress,\n TAccountDashboard,\n TAccountUserRegistry,\n TAccountOwner,\n TAccountClock\n >;\n\n return instruction;\n}\n\nexport type ParsedUpdateAnalyticsDashboardInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n /** Dashboard account with canonical validation */\n dashboard: TAccountMetas[0];\n /** User registry for rate limiting */\n userRegistry: TAccountMetas[1];\n /** Enhanced owner verification */\n owner: TAccountMetas[2];\n /** Clock sysvar for rate limiting */\n clock: TAccountMetas[3];\n };\n data: UpdateAnalyticsDashboardInstructionData;\n};\n\nexport function parseUpdateAnalyticsDashboardInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>\n): ParsedUpdateAnalyticsDashboardInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 4) {\n throw new Error('[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts');\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = instruction.accounts![accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n dashboard: getNextAccount(),\n userRegistry: getNextAccount(),\n owner: getNextAccount(),\n clock: getNextAccount(),\n },\n data: getUpdateAnalyticsDashboardInstructionDataDecoder().decode(\n instruction.data\n ),\n };\n}\n","/**\n * This code was AUTOGENERATED using the codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n combineCodec,\n fixDecoderSize,\n fixEncoderSize,\n getBooleanDecoder,\n getBooleanEncoder,\n getBytesDecoder,\n getBytesEncoder,\n getStructDecoder,\n getStructEncoder,\n getU64Decoder,\n getU64Encoder,\n transformEncoder,\n type AccountMeta,\n type AccountSignerMeta,\n type Address,\n type FixedSizeCodec,\n type FixedSizeDecoder,\n type FixedSizeEncoder,\n type Instruction,\n type InstructionWithAccounts,\n type InstructionWithData,\n type ReadonlyAccount,\n type ReadonlyUint8Array,\n type TransactionSigner,\n type WritableAccount,\n type WritableSignerAccount,\n} from '@solana/kit';\nimport {\n GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_INSTRUCTION_DATA,\n GHOSTSPEAK_MARKETPLACE_ERROR__MISSING_REQUIRED_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INSTRUCTION_PARSING_FAILED,\n isGhostspeakMarketplaceError,\n} from '../errors';\nimport { GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS } from '../programs';\nimport { getAccountMetaFactory, type ResolvedAccount } from '../shared';\n\nexport const UPDATE_AUCTION_RESERVE_PRICE_DISCRIMINATOR = new Uint8Array([\n 97, 2, 209, 24, 27, 236, 50, 174,\n]);\n\nexport function getUpdateAuctionReservePriceDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 8).encode(\n UPDATE_AUCTION_RESERVE_PRICE_DISCRIMINATOR\n );\n}\n\nexport type UpdateAuctionReservePriceInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountAuction extends string | AccountMeta<string> = string,\n TAccountAuthority extends string | AccountMeta<string> = string,\n TAccountClock extends\n | string\n | AccountMeta<string> = 'SysvarC1ock11111111111111111111111111111111',\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountAuction extends string\n ? WritableAccount<TAccountAuction>\n : TAccountAuction,\n TAccountAuthority extends string\n ? WritableSignerAccount<TAccountAuthority> &\n AccountSignerMeta<TAccountAuthority>\n : TAccountAuthority,\n TAccountClock extends string\n ? ReadonlyAccount<TAccountClock>\n : TAccountClock,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type UpdateAuctionReservePriceInstructionData = {\n discriminator: ReadonlyUint8Array;\n newReservePrice: bigint;\n revealHidden: boolean;\n};\n\nexport type UpdateAuctionReservePriceInstructionDataArgs = {\n newReservePrice: number | bigint;\n revealHidden: boolean;\n};\n\nexport function getUpdateAuctionReservePriceInstructionDataEncoder(): FixedSizeEncoder<UpdateAuctionReservePriceInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n ['discriminator', fixEncoderSize(getBytesEncoder(), 8)],\n ['newReservePrice', getU64Encoder()],\n ['revealHidden', getBooleanEncoder()],\n ]),\n (value) => ({\n ...value,\n discriminator: UPDATE_AUCTION_RESERVE_PRICE_DISCRIMINATOR,\n })\n );\n}\n\nexport function getUpdateAuctionReservePriceInstructionDataDecoder(): FixedSizeDecoder<UpdateAuctionReservePriceInstructionData> {\n return getStructDecoder([\n ['discriminator', fixDecoderSize(getBytesDecoder(), 8)],\n ['newReservePrice', getU64Decoder()],\n ['revealHidden', getBooleanDecoder()],\n ]);\n}\n\nexport function getUpdateAuctionReservePriceInstructionDataCodec(): FixedSizeCodec<\n UpdateAuctionReservePriceInstructionDataArgs,\n UpdateAuctionReservePriceInstructionData\n> {\n return combineCodec(\n getUpdateAuctionReservePriceInstructionDataEncoder(),\n getUpdateAuctionReservePriceInstructionDataDecoder()\n );\n}\n\nexport type UpdateAuctionReservePriceInput<\n TAccountAuction extends string = string,\n TAccountAuthority extends string = string,\n TAccountClock extends string = string,\n> = {\n /** Auction account with canonical validation */\n auction: Address<TAccountAuction>;\n /** Enhanced authority verification - only creator can update reserve */\n authority: TransactionSigner<TAccountAuthority>;\n /** Clock sysvar for timestamp validation */\n clock?: Address<TAccountClock>;\n newReservePrice: UpdateAuctionReservePriceInstructionDataArgs['newReservePrice'];\n revealHidden: UpdateAuctionReservePriceInstructionDataArgs['revealHidden'];\n};\n\nexport function getUpdateAuctionReservePriceInstruction<\n TAccountAuction extends string,\n TAccountAuthority extends string,\n TAccountClock extends string,\n TProgramAddress extends\n Address = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: UpdateAuctionReservePriceInput<\n TAccountAuction,\n TAccountAuthority,\n TAccountClock\n >,\n config?: { programAddress?: TProgramAddress }\n): UpdateAuctionReservePriceInstruction<\n TProgramAddress,\n TAccountAuction,\n TAccountAuthority,\n TAccountClock\n> {\n // Program address.\n const programAddress =\n config?.programAddress ?? GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n auction: { value: input.auction ?? null, isWritable: true },\n authority: { value: input.authority ?? null, isWritable: true },\n clock: { value: input.clock ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolve default values.\n if (!accounts.clock.value) {\n accounts.clock.value =\n 'SysvarC1ock11111111111111111111111111111111' as Address<'SysvarC1ock11111111111111111111111111111111'>;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.auction),\n getAccountMeta(accounts.authority),\n getAccountMeta(accounts.clock),\n ],\n programAddress,\n data: getUpdateAuctionReservePriceInstructionDataEncoder().encode(\n args as UpdateAuctionReservePriceInstructionDataArgs\n ),\n } as UpdateAuctionReservePriceInstruction<\n TProgramAddress,\n TAccountAuction,\n TAccountAuthority,\n TAccountClock\n >;\n\n return instruction;\n}\n\nexport type ParsedUpdateAuctionReservePriceInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n /** Auction account with canonical validation */\n auction: TAccountMetas[0];\n /** Enhanced authority verification - only creator can update reserve */\n authority: TAccountMetas[1];\n /** Clock sysvar for timestamp validation */\n clock: TAccountMetas[2];\n };\n data: UpdateAuctionReservePriceInstructionData;\n};\n\nexport function parseUpdateAuctionReservePriceInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>\n): ParsedUpdateAuctionReservePriceInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 3) {\n throw new Error('[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts');\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = instruction.accounts![accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n auction: getNextAccount(),\n authority: getNextAccount(),\n clock: getNextAccount(),\n },\n data: getUpdateAuctionReservePriceInstructionDataDecoder().decode(\n instruction.data\n ),\n };\n}\n","/**\n * This code was AUTOGENERATED using the codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n combineCodec,\n fixDecoderSize,\n fixEncoderSize,\n getBytesDecoder,\n getBytesEncoder,\n getProgramDerivedAddress,\n getStructDecoder,\n getStructEncoder,\n transformEncoder,\n type AccountMeta,\n type AccountSignerMeta,\n type Address,\n type Codec,\n type Decoder,\n type Encoder,\n type Instruction,\n type InstructionWithAccounts,\n type InstructionWithData,\n type ReadonlySignerAccount,\n type ReadonlyUint8Array,\n type TransactionSigner,\n type WritableAccount,\n} from '@solana/kit';\nimport {\n GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_INSTRUCTION_DATA,\n GHOSTSPEAK_MARKETPLACE_ERROR__MISSING_REQUIRED_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INSTRUCTION_PARSING_FAILED,\n isGhostspeakMarketplaceError,\n} from '../errors';\nimport { GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS } from '../programs';\nimport { getAccountMetaFactory, type ResolvedAccount } from '../shared';\nimport {\n getChannelMetadataDecoder,\n getChannelMetadataEncoder,\n type ChannelMetadata,\n type ChannelMetadataArgs,\n} from '../types';\n\nexport const UPDATE_CHANNEL_SETTINGS_DISCRIMINATOR = new Uint8Array([\n 149, 67, 63, 108, 132, 122, 95, 128,\n]);\n\nexport function getUpdateChannelSettingsDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 8).encode(\n UPDATE_CHANNEL_SETTINGS_DISCRIMINATOR\n );\n}\n\nexport type UpdateChannelSettingsInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountChannel extends string | AccountMeta<string> = string,\n TAccountReentrancyGuard extends string | AccountMeta<string> = string,\n TAccountAuthority extends string | AccountMeta<string> = string,\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountChannel extends string\n ? WritableAccount<TAccountChannel>\n : TAccountChannel,\n TAccountReentrancyGuard extends string\n ? WritableAccount<TAccountReentrancyGuard>\n : TAccountReentrancyGuard,\n TAccountAuthority extends string\n ? ReadonlySignerAccount<TAccountAuthority> &\n AccountSignerMeta<TAccountAuthority>\n : TAccountAuthority,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type UpdateChannelSettingsInstructionData = {\n discriminator: ReadonlyUint8Array;\n newMetadata: ChannelMetadata;\n};\n\nexport type UpdateChannelSettingsInstructionDataArgs = {\n newMetadata: ChannelMetadataArgs;\n};\n\nexport function getUpdateChannelSettingsInstructionDataEncoder(): Encoder<UpdateChannelSettingsInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n ['discriminator', fixEncoderSize(getBytesEncoder(), 8)],\n ['newMetadata', getChannelMetadataEncoder()],\n ]),\n (value) => ({\n ...value,\n discriminator: UPDATE_CHANNEL_SETTINGS_DISCRIMINATOR,\n })\n );\n}\n\nexport function getUpdateChannelSettingsInstructionDataDecoder(): Decoder<UpdateChannelSettingsInstructionData> {\n return getStructDecoder([\n ['discriminator', fixDecoderSize(getBytesDecoder(), 8)],\n ['newMetadata', getChannelMetadataDecoder()],\n ]);\n}\n\nexport function getUpdateChannelSettingsInstructionDataCodec(): Codec<\n UpdateChannelSettingsInstructionDataArgs,\n UpdateChannelSettingsInstructionData\n> {\n return combineCodec(\n getUpdateChannelSettingsInstructionDataEncoder(),\n getUpdateChannelSettingsInstructionDataDecoder()\n );\n}\n\nexport type UpdateChannelSettingsAsyncInput<\n TAccountChannel extends string = string,\n TAccountReentrancyGuard extends string = string,\n TAccountAuthority extends string = string,\n> = {\n channel: Address<TAccountChannel>;\n reentrancyGuard?: Address<TAccountReentrancyGuard>;\n authority: TransactionSigner<TAccountAuthority>;\n newMetadata: UpdateChannelSettingsInstructionDataArgs['newMetadata'];\n};\n\nexport async function getUpdateChannelSettingsInstructionAsync<\n TAccountChannel extends string,\n TAccountReentrancyGuard extends string,\n TAccountAuthority extends string,\n TProgramAddress extends\n Address = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: UpdateChannelSettingsAsyncInput<\n TAccountChannel,\n TAccountReentrancyGuard,\n TAccountAuthority\n >,\n config?: { programAddress?: TProgramAddress }\n): Promise<\n UpdateChannelSettingsInstruction<\n TProgramAddress,\n TAccountChannel,\n TAccountReentrancyGuard,\n TAccountAuthority\n >\n> {\n // Program address.\n const programAddress =\n config?.programAddress ?? GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n channel: { value: input.channel ?? null, isWritable: true },\n reentrancyGuard: { value: input.reentrancyGuard ?? null, isWritable: true },\n authority: { value: input.authority ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolve default values.\n if (!accounts.reentrancyGuard.value) {\n accounts.reentrancyGuard.value = await getProgramDerivedAddress({\n programAddress,\n seeds: [\n getBytesEncoder().encode(\n new Uint8Array([\n 114, 101, 101, 110, 116, 114, 97, 110, 99, 121, 95, 103, 117, 97,\n 114, 100,\n ])\n ),\n ],\n });\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.channel),\n getAccountMeta(accounts.reentrancyGuard),\n getAccountMeta(accounts.authority),\n ],\n programAddress,\n data: getUpdateChannelSettingsInstructionDataEncoder().encode(\n args as UpdateChannelSettingsInstructionDataArgs\n ),\n } as UpdateChannelSettingsInstruction<\n TProgramAddress,\n TAccountChannel,\n TAccountReentrancyGuard,\n TAccountAuthority\n >;\n\n return instruction;\n}\n\nexport type UpdateChannelSettingsInput<\n TAccountChannel extends string = string,\n TAccountReentrancyGuard extends string = string,\n TAccountAuthority extends string = string,\n> = {\n channel: Address<TAccountChannel>;\n reentrancyGuard: Address<TAccountReentrancyGuard>;\n authority: TransactionSigner<TAccountAuthority>;\n newMetadata: UpdateChannelSettingsInstructionDataArgs['newMetadata'];\n};\n\nexport function getUpdateChannelSettingsInstruction<\n TAccountChannel extends string,\n TAccountReentrancyGuard extends string,\n TAccountAuthority extends string,\n TProgramAddress extends\n Address = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: UpdateChannelSettingsInput<\n TAccountChannel,\n TAccountReentrancyGuard,\n TAccountAuthority\n >,\n config?: { programAddress?: TProgramAddress }\n): UpdateChannelSettingsInstruction<\n TProgramAddress,\n TAccountChannel,\n TAccountReentrancyGuard,\n TAccountAuthority\n> {\n // Program address.\n const programAddress =\n config?.programAddress ?? GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n channel: { value: input.channel ?? null, isWritable: true },\n reentrancyGuard: { value: input.reentrancyGuard ?? null, isWritable: true },\n authority: { value: input.authority ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.channel),\n getAccountMeta(accounts.reentrancyGuard),\n getAccountMeta(accounts.authority),\n ],\n programAddress,\n data: getUpdateChannelSettingsInstructionDataEncoder().encode(\n args as UpdateChannelSettingsInstructionDataArgs\n ),\n } as UpdateChannelSettingsInstruction<\n TProgramAddress,\n TAccountChannel,\n TAccountReentrancyGuard,\n TAccountAuthority\n >;\n\n return instruction;\n}\n\nexport type ParsedUpdateChannelSettingsInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n channel: TAccountMetas[0];\n reentrancyGuard: TAccountMetas[1];\n authority: TAccountMetas[2];\n };\n data: UpdateChannelSettingsInstructionData;\n};\n\nexport function parseUpdateChannelSettingsInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>\n): ParsedUpdateChannelSettingsInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 3) {\n throw new Error('[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts');\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = instruction.accounts![accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n channel: getNextAccount(),\n reentrancyGuard: getNextAccount(),\n authority: getNextAccount(),\n },\n data: getUpdateChannelSettingsInstructionDataDecoder().decode(\n instruction.data\n ),\n };\n}\n","/**\n * This code was AUTOGENERATED using the codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n combineCodec,\n fixDecoderSize,\n fixEncoderSize,\n getBytesDecoder,\n getBytesEncoder,\n getI32Decoder,\n getI32Encoder,\n getI64Decoder,\n getI64Encoder,\n getStructDecoder,\n getStructEncoder,\n getU32Decoder,\n getU32Encoder,\n getU64Decoder,\n getU64Encoder,\n transformEncoder,\n type AccountMeta,\n type AccountSignerMeta,\n type Address,\n type FixedSizeCodec,\n type FixedSizeDecoder,\n type FixedSizeEncoder,\n type Instruction,\n type InstructionWithAccounts,\n type InstructionWithData,\n type ReadonlySignerAccount,\n type ReadonlyUint8Array,\n type TransactionSigner,\n type WritableAccount,\n} from '@solana/kit';\nimport {\n GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_INSTRUCTION_DATA,\n GHOSTSPEAK_MARKETPLACE_ERROR__MISSING_REQUIRED_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INSTRUCTION_PARSING_FAILED,\n isGhostspeakMarketplaceError,\n} from '../errors';\nimport { GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS } from '../programs';\nimport { getAccountMetaFactory, type ResolvedAccount } from '../shared';\n\nexport const UPDATE_DYNAMIC_PRICING_DISCRIMINATOR = new Uint8Array([\n 22, 97, 198, 34, 14, 133, 83, 168,\n]);\n\nexport function getUpdateDynamicPricingDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 8).encode(\n UPDATE_DYNAMIC_PRICING_DISCRIMINATOR\n );\n}\n\nexport type UpdateDynamicPricingInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountEngine extends string | AccountMeta<string> = string,\n TAccountUpdater extends string | AccountMeta<string> = string,\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountEngine extends string\n ? WritableAccount<TAccountEngine>\n : TAccountEngine,\n TAccountUpdater extends string\n ? ReadonlySignerAccount<TAccountUpdater> &\n AccountSignerMeta<TAccountUpdater>\n : TAccountUpdater,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type UpdateDynamicPricingInstructionData = {\n discriminator: ReadonlyUint8Array;\n currentDemand: bigint;\n peakDemand: bigint;\n averageDemand: bigint;\n demandTrend: number;\n demandVolatility: number;\n lastUpdated: bigint;\n};\n\nexport type UpdateDynamicPricingInstructionDataArgs = {\n currentDemand: number | bigint;\n peakDemand: number | bigint;\n averageDemand: number | bigint;\n demandTrend: number;\n demandVolatility: number;\n lastUpdated: number | bigint;\n};\n\nexport function getUpdateDynamicPricingInstructionDataEncoder(): FixedSizeEncoder<UpdateDynamicPricingInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n ['discriminator', fixEncoderSize(getBytesEncoder(), 8)],\n ['currentDemand', getU64Encoder()],\n ['peakDemand', getU64Encoder()],\n ['averageDemand', getU64Encoder()],\n ['demandTrend', getI32Encoder()],\n ['demandVolatility', getU32Encoder()],\n ['lastUpdated', getI64Encoder()],\n ]),\n (value) => ({\n ...value,\n discriminator: UPDATE_DYNAMIC_PRICING_DISCRIMINATOR,\n })\n );\n}\n\nexport function getUpdateDynamicPricingInstructionDataDecoder(): FixedSizeDecoder<UpdateDynamicPricingInstructionData> {\n return getStructDecoder([\n ['discriminator', fixDecoderSize(getBytesDecoder(), 8)],\n ['currentDemand', getU64Decoder()],\n ['peakDemand', getU64Decoder()],\n ['averageDemand', getU64Decoder()],\n ['demandTrend', getI32Decoder()],\n ['demandVolatility', getU32Decoder()],\n ['lastUpdated', getI64Decoder()],\n ]);\n}\n\nexport function getUpdateDynamicPricingInstructionDataCodec(): FixedSizeCodec<\n UpdateDynamicPricingInstructionDataArgs,\n UpdateDynamicPricingInstructionData\n> {\n return combineCodec(\n getUpdateDynamicPricingInstructionDataEncoder(),\n getUpdateDynamicPricingInstructionDataDecoder()\n );\n}\n\nexport type UpdateDynamicPricingInput<\n TAccountEngine extends string = string,\n TAccountUpdater extends string = string,\n> = {\n engine: Address<TAccountEngine>;\n updater: TransactionSigner<TAccountUpdater>;\n currentDemand: UpdateDynamicPricingInstructionDataArgs['currentDemand'];\n peakDemand: UpdateDynamicPricingInstructionDataArgs['peakDemand'];\n averageDemand: UpdateDynamicPricingInstructionDataArgs['averageDemand'];\n demandTrend: UpdateDynamicPricingInstructionDataArgs['demandTrend'];\n demandVolatility: UpdateDynamicPricingInstructionDataArgs['demandVolatility'];\n lastUpdated: UpdateDynamicPricingInstructionDataArgs['lastUpdated'];\n};\n\nexport function getUpdateDynamicPricingInstruction<\n TAccountEngine extends string,\n TAccountUpdater extends string,\n TProgramAddress extends\n Address = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: UpdateDynamicPricingInput<TAccountEngine, TAccountUpdater>,\n config?: { programAddress?: TProgramAddress }\n): UpdateDynamicPricingInstruction<\n TProgramAddress,\n TAccountEngine,\n TAccountUpdater\n> {\n // Program address.\n const programAddress =\n config?.programAddress ?? GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n engine: { value: input.engine ?? null, isWritable: true },\n updater: { value: input.updater ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.engine),\n getAccountMeta(accounts.updater),\n ],\n programAddress,\n data: getUpdateDynamicPricingInstructionDataEncoder().encode(\n args as UpdateDynamicPricingInstructionDataArgs\n ),\n } as UpdateDynamicPricingInstruction<\n TProgramAddress,\n TAccountEngine,\n TAccountUpdater\n >;\n\n return instruction;\n}\n\nexport type ParsedUpdateDynamicPricingInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n engine: TAccountMetas[0];\n updater: TAccountMetas[1];\n };\n data: UpdateDynamicPricingInstructionData;\n};\n\nexport function parseUpdateDynamicPricingInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>\n): ParsedUpdateDynamicPricingInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 2) {\n throw new Error('[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts');\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = instruction.accounts![accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n engine: getNextAccount(),\n updater: getNextAccount(),\n },\n data: getUpdateDynamicPricingInstructionDataDecoder().decode(\n instruction.data\n ),\n };\n}\n","/**\n * This code was AUTOGENERATED using the codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n combineCodec,\n fixDecoderSize,\n fixEncoderSize,\n getBytesDecoder,\n getBytesEncoder,\n getStructDecoder,\n getStructEncoder,\n getU64Decoder,\n getU64Encoder,\n transformEncoder,\n type AccountMeta,\n type AccountSignerMeta,\n type Address,\n type FixedSizeCodec,\n type FixedSizeDecoder,\n type FixedSizeEncoder,\n type Instruction,\n type InstructionWithAccounts,\n type InstructionWithData,\n type ReadonlyAccount,\n type ReadonlySignerAccount,\n type ReadonlyUint8Array,\n type TransactionSigner,\n type WritableAccount,\n} from '@solana/kit';\nimport {\n GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_INSTRUCTION_DATA,\n GHOSTSPEAK_MARKETPLACE_ERROR__MISSING_REQUIRED_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INSTRUCTION_PARSING_FAILED,\n isGhostspeakMarketplaceError,\n} from '../errors';\nimport { GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS } from '../programs';\nimport { getAccountMetaFactory, type ResolvedAccount } from '../shared';\n\nexport const UPDATE_MARKET_ANALYTICS_DISCRIMINATOR = new Uint8Array([\n 156, 13, 81, 78, 11, 3, 54, 178,\n]);\n\nexport function getUpdateMarketAnalyticsDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 8).encode(\n UPDATE_MARKET_ANALYTICS_DISCRIMINATOR\n );\n}\n\nexport type UpdateMarketAnalyticsInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountMarketAnalytics extends string | AccountMeta<string> = string,\n TAccountAuthority extends string | AccountMeta<string> = string,\n TAccountClock extends\n | string\n | AccountMeta<string> = 'SysvarC1ock11111111111111111111111111111111',\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountMarketAnalytics extends string\n ? WritableAccount<TAccountMarketAnalytics>\n : TAccountMarketAnalytics,\n TAccountAuthority extends string\n ? ReadonlySignerAccount<TAccountAuthority> &\n AccountSignerMeta<TAccountAuthority>\n : TAccountAuthority,\n TAccountClock extends string\n ? ReadonlyAccount<TAccountClock>\n : TAccountClock,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type UpdateMarketAnalyticsInstructionData = {\n discriminator: ReadonlyUint8Array;\n volume: bigint;\n price: bigint;\n};\n\nexport type UpdateMarketAnalyticsInstructionDataArgs = {\n volume: number | bigint;\n price: number | bigint;\n};\n\nexport function getUpdateMarketAnalyticsInstructionDataEncoder(): FixedSizeEncoder<UpdateMarketAnalyticsInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n ['discriminator', fixEncoderSize(getBytesEncoder(), 8)],\n ['volume', getU64Encoder()],\n ['price', getU64Encoder()],\n ]),\n (value) => ({\n ...value,\n discriminator: UPDATE_MARKET_ANALYTICS_DISCRIMINATOR,\n })\n );\n}\n\nexport function getUpdateMarketAnalyticsInstructionDataDecoder(): FixedSizeDecoder<UpdateMarketAnalyticsInstructionData> {\n return getStructDecoder([\n ['discriminator', fixDecoderSize(getBytesDecoder(), 8)],\n ['volume', getU64Decoder()],\n ['price', getU64Decoder()],\n ]);\n}\n\nexport function getUpdateMarketAnalyticsInstructionDataCodec(): FixedSizeCodec<\n UpdateMarketAnalyticsInstructionDataArgs,\n UpdateMarketAnalyticsInstructionData\n> {\n return combineCodec(\n getUpdateMarketAnalyticsInstructionDataEncoder(),\n getUpdateMarketAnalyticsInstructionDataDecoder()\n );\n}\n\nexport type UpdateMarketAnalyticsInput<\n TAccountMarketAnalytics extends string = string,\n TAccountAuthority extends string = string,\n TAccountClock extends string = string,\n> = {\n /** Market analytics account with canonical bump validation */\n marketAnalytics: Address<TAccountMarketAnalytics>;\n /** Enhanced authority verification */\n authority: TransactionSigner<TAccountAuthority>;\n /** Clock sysvar for timestamp validation */\n clock?: Address<TAccountClock>;\n volume: UpdateMarketAnalyticsInstructionDataArgs['volume'];\n price: UpdateMarketAnalyticsInstructionDataArgs['price'];\n};\n\nexport function getUpdateMarketAnalyticsInstruction<\n TAccountMarketAnalytics extends string,\n TAccountAuthority extends string,\n TAccountClock extends string,\n TProgramAddress extends\n Address = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: UpdateMarketAnalyticsInput<\n TAccountMarketAnalytics,\n TAccountAuthority,\n TAccountClock\n >,\n config?: { programAddress?: TProgramAddress }\n): UpdateMarketAnalyticsInstruction<\n TProgramAddress,\n TAccountMarketAnalytics,\n TAccountAuthority,\n TAccountClock\n> {\n // Program address.\n const programAddress =\n config?.programAddress ?? GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n marketAnalytics: { value: input.marketAnalytics ?? null, isWritable: true },\n authority: { value: input.authority ?? null, isWritable: false },\n clock: { value: input.clock ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolve default values.\n if (!accounts.clock.value) {\n accounts.clock.value =\n 'SysvarC1ock11111111111111111111111111111111' as Address<'SysvarC1ock11111111111111111111111111111111'>;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.marketAnalytics),\n getAccountMeta(accounts.authority),\n getAccountMeta(accounts.clock),\n ],\n programAddress,\n data: getUpdateMarketAnalyticsInstructionDataEncoder().encode(\n args as UpdateMarketAnalyticsInstructionDataArgs\n ),\n } as UpdateMarketAnalyticsInstruction<\n TProgramAddress,\n TAccountMarketAnalytics,\n TAccountAuthority,\n TAccountClock\n >;\n\n return instruction;\n}\n\nexport type ParsedUpdateMarketAnalyticsInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n /** Market analytics account with canonical bump validation */\n marketAnalytics: TAccountMetas[0];\n /** Enhanced authority verification */\n authority: TAccountMetas[1];\n /** Clock sysvar for timestamp validation */\n clock: TAccountMetas[2];\n };\n data: UpdateMarketAnalyticsInstructionData;\n};\n\nexport function parseUpdateMarketAnalyticsInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>\n): ParsedUpdateMarketAnalyticsInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 3) {\n throw new Error('[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts');\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = instruction.accounts![accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n marketAnalytics: getNextAccount(),\n authority: getNextAccount(),\n clock: getNextAccount(),\n },\n data: getUpdateMarketAnalyticsInstructionDataDecoder().decode(\n instruction.data\n ),\n };\n}\n","/**\n * This code was AUTOGENERATED using the codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n addDecoderSizePrefix,\n addEncoderSizePrefix,\n combineCodec,\n fixDecoderSize,\n fixEncoderSize,\n getAddressDecoder,\n getAddressEncoder,\n getArrayDecoder,\n getArrayEncoder,\n getBytesDecoder,\n getBytesEncoder,\n getI64Decoder,\n getI64Encoder,\n getProgramDerivedAddress,\n getStructDecoder,\n getStructEncoder,\n getU32Decoder,\n getU32Encoder,\n getU64Decoder,\n getU64Encoder,\n getUtf8Decoder,\n getUtf8Encoder,\n transformEncoder,\n type AccountMeta,\n type AccountSignerMeta,\n type Address,\n type Codec,\n type Decoder,\n type Encoder,\n type Instruction,\n type InstructionWithAccounts,\n type InstructionWithData,\n type ReadonlyAccount,\n type ReadonlyUint8Array,\n type TransactionSigner,\n type WritableAccount,\n type WritableSignerAccount,\n} from '@solana/kit';\nimport {\n GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_INSTRUCTION_DATA,\n GHOSTSPEAK_MARKETPLACE_ERROR__MISSING_REQUIRED_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_ACCOUNT,\n GHOSTSPEAK_MARKETPLACE_ERROR__INSTRUCTION_PARSING_FAILED,\n isGhostspeakMarketplaceError,\n} from '../errors';\nimport { GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS } from '../programs';\nimport {\n expectAddress,\n getAccountMetaFactory,\n type ResolvedAccount,\n} from '../shared';\n\nexport const VERIFY_AGENT_DISCRIMINATOR = new Uint8Array([\n 206, 212, 108, 12, 105, 61, 100, 66,\n]);\n\nexport function getVerifyAgentDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 8).encode(\n VERIFY_AGENT_DISCRIMINATOR\n );\n}\n\nexport type VerifyAgentInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountAgentVerification extends string | AccountMeta<string> = string,\n TAccountAgent extends string | AccountMeta<string> = string,\n TAccountVerifier extends string | AccountMeta<string> = string,\n TAccountSystemProgram extends\n | string\n | AccountMeta<string> = '11111111111111111111111111111111',\n TAccountClock extends\n | string\n | AccountMeta<string> = 'SysvarC1ock11111111111111111111111111111111',\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountAgentVerification extends string\n ? WritableAccount<TAccountAgentVerification>\n : TAccountAgentVerification,\n TAccountAgent extends string\n ? ReadonlyAccount<TAccountAgent>\n : TAccountAgent,\n TAccountVerifier extends string\n ? WritableSignerAccount<TAccountVerifier> &\n AccountSignerMeta<TAccountVerifier>\n : TAccountVerifier,\n TAccountSystemProgram extends string\n ? ReadonlyAccount<TAccountSystemProgram>\n : TAccountSystemProgram,\n TAccountClock extends string\n ? ReadonlyAccount<TAccountClock>\n : TAccountClock,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type VerifyAgentInstructionData = {\n discriminator: ReadonlyUint8Array;\n agentPubkey: Address;\n serviceEndpoint: string;\n supportedCapabilities: Array<bigint>;\n verifiedAt: bigint;\n};\n\nexport type VerifyAgentInstructionDataArgs = {\n agentPubkey: Address;\n serviceEndpoint: string;\n supportedCapabilities: Array<number | bigint>;\n verifiedAt: number | bigint;\n};\n\nexport function getVerifyAgentInstructionDataEncoder(): Encoder<VerifyAgentInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n ['discriminator', fixEncoderSize(getBytesEncoder(), 8)],\n ['agentPubkey', getAddressEncoder()],\n [\n 'serviceEndpoint',\n addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder()),\n ],\n ['supportedCapabilities', getArrayEncoder(getU64Encoder())],\n ['verifiedAt', getI64Encoder()],\n ]),\n (value) => ({ ...value, discriminator: VERIFY_AGENT_DISCRIMINATOR })\n );\n}\n\nexport function getVerifyAgentInstructionDataDecoder(): Decoder<VerifyAgentInstructionData> {\n return getStructDecoder([\n ['discriminator', fixDecoderSize(getBytesDecoder(), 8)],\n ['agentPubkey', getAddressDecoder()],\n [\n 'serviceEndpoint',\n addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder()),\n ],\n ['supportedCapabilities', getArrayDecoder(getU64Decoder())],\n ['verifiedAt', getI64Decoder()],\n ]);\n}\n\nexport function getVerifyAgentInstructionDataCodec(): Codec<\n VerifyAgentInstructionDataArgs,\n VerifyAgentInstructionData\n> {\n return combineCodec(\n getVerifyAgentInstructionDataEncoder(),\n getVerifyAgentInstructionDataDecoder()\n );\n}\n\nexport type VerifyAgentAsyncInput<\n TAccountAgentVerification extends string = string,\n TAccountAgent extends string = string,\n TAccountVerifier extends string = string,\n TAccountSystemProgram extends string = string,\n TAccountClock extends string = string,\n> = {\n /** Verification account with enhanced PDA security */\n agentVerification?: Address<TAccountAgentVerification>;\n /** Agent account being verified (enhanced validation) */\n agent: Address<TAccountAgent>;\n /** Verifier authority with enhanced permissions */\n verifier: TransactionSigner<TAccountVerifier>;\n /** System program for account operations */\n systemProgram?: Address<TAccountSystemProgram>;\n /** Clock sysvar for timestamp validation */\n clock?: Address<TAccountClock>;\n agentPubkey: VerifyAgentInstructionDataArgs['agentPubkey'];\n serviceEndpoint: VerifyAgentInstructionDataArgs['serviceEndpoint'];\n supportedCapabilities: VerifyAgentInstructionDataArgs['supportedCapabilities'];\n verifiedAt: VerifyAgentInstructionDataArgs['verifiedAt'];\n};\n\nexport async function getVerifyAgentInstructionAsync<\n TAccountAgentVerification extends string,\n TAccountAgent extends string,\n TAccountVerifier extends string,\n TAccountSystemProgram extends string,\n TAccountClock extends string,\n TProgramAddress extends\n Address = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: VerifyAgentAsyncInput<\n TAccountAgentVerification,\n TAccountAgent,\n TAccountVerifier,\n TAccountSystemProgram,\n TAccountClock\n >,\n config?: { programAddress?: TProgramAddress }\n): Promise<\n VerifyAgentInstruction<\n TProgramAddress,\n TAccountAgentVerification,\n TAccountAgent,\n TAccountVerifier,\n TAccountSystemProgram,\n TAccountClock\n >\n> {\n // Program address.\n const programAddress =\n config?.programAddress ?? GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n agentVerification: {\n value: input.agentVerification ?? null,\n isWritable: true,\n },\n agent: { value: input.agent ?? null, isWritable: false },\n verifier: { value: input.verifier ?? null, isWritable: true },\n systemProgram: { value: input.systemProgram ?? null, isWritable: false },\n clock: { value: input.clock ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolve default values.\n if (!accounts.agentVerification.value) {\n accounts.agentVerification.value = await getProgramDerivedAddress({\n programAddress,\n seeds: [\n getBytesEncoder().encode(\n new Uint8Array([\n 97, 103, 101, 110, 116, 95, 118, 101, 114, 105, 102, 105, 99, 97,\n 116, 105, 111, 110,\n ])\n ),\n getAddressEncoder().encode(expectAddress(accounts.agent.value)),\n getAddressEncoder().encode(expectAddress(accounts.verifier.value)),\n ],\n });\n }\n if (!accounts.systemProgram.value) {\n accounts.systemProgram.value =\n '11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>;\n }\n if (!accounts.clock.value) {\n accounts.clock.value =\n 'SysvarC1ock11111111111111111111111111111111' as Address<'SysvarC1ock11111111111111111111111111111111'>;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.agentVerification),\n getAccountMeta(accounts.agent),\n getAccountMeta(accounts.verifier),\n getAccountMeta(accounts.systemProgram),\n getAccountMeta(accounts.clock),\n ],\n programAddress,\n data: getVerifyAgentInstructionDataEncoder().encode(\n args as VerifyAgentInstructionDataArgs\n ),\n } as VerifyAgentInstruction<\n TProgramAddress,\n TAccountAgentVerification,\n TAccountAgent,\n TAccountVerifier,\n TAccountSystemProgram,\n TAccountClock\n >;\n\n return instruction;\n}\n\nexport type VerifyAgentInput<\n TAccountAgentVerification extends string = string,\n TAccountAgent extends string = string,\n TAccountVerifier extends string = string,\n TAccountSystemProgram extends string = string,\n TAccountClock extends string = string,\n> = {\n /** Verification account with enhanced PDA security */\n agentVerification: Address<TAccountAgentVerification>;\n /** Agent account being verified (enhanced validation) */\n agent: Address<TAccountAgent>;\n /** Verifier authority with enhanced permissions */\n verifier: TransactionSigner<TAccountVerifier>;\n /** System program for account operations */\n systemProgram?: Address<TAccountSystemProgram>;\n /** Clock sysvar for timestamp validation */\n clock?: Address<TAccountClock>;\n agentPubkey: VerifyAgentInstructionDataArgs['agentPubkey'];\n serviceEndpoint: VerifyAgentInstructionDataArgs['serviceEndpoint'];\n supportedCapabilities: VerifyAgentInstructionDataArgs['supportedCapabilities'];\n verifiedAt: VerifyAgentInstructionDataArgs['verifiedAt'];\n};\n\nexport function getVerifyAgentInstruction<\n TAccountAgentVerification extends string,\n TAccountAgent extends string,\n TAccountVerifier extends string,\n TAccountSystemProgram extends string,\n TAccountClock extends string,\n TProgramAddress extends\n Address = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: VerifyAgentInput<\n TAccountAgentVerification,\n TAccountAgent,\n TAccountVerifier,\n TAccountSystemProgram,\n TAccountClock\n >,\n config?: { programAddress?: TProgramAddress }\n): VerifyAgentInstruction<\n TProgramAddress,\n TAccountAgentVerification,\n TAccountAgent,\n TAccountVerifier,\n TAccountSystemProgram,\n TAccountClock\n> {\n // Program address.\n const programAddress =\n config?.programAddress ?? GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n agentVerification: {\n value: input.agentVerification ?? null,\n isWritable: true,\n },\n agent: { value: input.agent ?? null, isWritable: false },\n verifier: { value: input.verifier ?? null, isWritable: true },\n systemProgram: { value: input.systemProgram ?? null, isWritable: false },\n clock: { value: input.clock ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolve default values.\n if (!accounts.systemProgram.value) {\n accounts.systemProgram.value =\n '11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>;\n }\n if (!accounts.clock.value) {\n accounts.clock.value =\n 'SysvarC1ock11111111111111111111111111111111' as Address<'SysvarC1ock11111111111111111111111111111111'>;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.agentVerification),\n getAccountMeta(accounts.agent),\n getAccountMeta(accounts.verifier),\n getAccountMeta(accounts.systemProgram),\n getAccountMeta(accounts.clock),\n ],\n programAddress,\n data: getVerifyAgentInstructionDataEncoder().encode(\n args as VerifyAgentInstructionDataArgs\n ),\n } as VerifyAgentInstruction<\n TProgramAddress,\n TAccountAgentVerification,\n TAccountAgent,\n TAccountVerifier,\n TAccountSystemProgram,\n TAccountClock\n >;\n\n return instruction;\n}\n\nexport type ParsedVerifyAgentInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n /** Verification account with enhanced PDA security */\n agentVerification: TAccountMetas[0];\n /** Agent account being verified (enhanced validation) */\n agent: TAccountMetas[1];\n /** Verifier authority with enhanced permissions */\n verifier: TAccountMetas[2];\n /** System program for account operations */\n systemProgram: TAccountMetas[3];\n /** Clock sysvar for timestamp validation */\n clock: TAccountMetas[4];\n };\n data: VerifyAgentInstructionData;\n};\n\nexport function parseVerifyAgentInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>\n): ParsedVerifyAgentInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 5) {\n throw new Error('[GHOSTSPEAK_MARKETPLACE_ERROR__INSUFFICIENT_ACCOUNTS] Not enough accounts');\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = instruction.accounts![accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n agentVerification: getNextAccount(),\n agent: getNextAccount(),\n verifier: getNextAccount(),\n systemProgram: getNextAccount(),\n clock: getNextAccount(),\n },\n data: getVerifyAgentInstructionDataDecoder().decode(instruction.data),\n };\n}\n","/**\n * This code was AUTOGENERATED using the codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n addDecoderSizePrefix,\n addEncoderSizePrefix,\n combineCodec,\n fixDecoderSize,\n fixEncoderSize,\n getBytesDecoder,\n getBytesEncoder,\n getOptionDecoder,\n getOptionEncoder,\n getStructDecoder,\n getStructEncoder,\n getU32Decoder,\n getU32Encoder,\n getUtf8Decoder,\n getUtf8Encoder,\n transformEncoder,\n type AccountMeta,\n type AccountSignerMeta,\n type Address,\n type Codec,\n type Decoder,\n type Encoder,\n type Instruction,\n type InstructionWithAccounts,\n type InstructionWithData,\n type Option,\n type OptionOrNullable,\n type ReadonlyAccount,\n type ReadonlyUint8Array,\n type TransactionSigner,\n type WritableAccount,\n type WritableSignerAccount,\n} from '@solana/kit';\nimport { GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS } from '../programs';\nimport { getAccountMetaFactory, type ResolvedAccount } from '../shared';\nimport { getWorkOrderErrorMessage } from '../../utils/enhanced-client-errors.js';\n\nexport const VERIFY_WORK_DELIVERY_DISCRIMINATOR = new Uint8Array([\n 51, 21, 40, 11, 225, 15, 184, 230,\n]);\n\nexport function getVerifyWorkDeliveryDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 8).encode(\n VERIFY_WORK_DELIVERY_DISCRIMINATOR\n );\n}\n\nexport type VerifyWorkDeliveryInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountWorkOrder extends string | AccountMeta<string> = string,\n TAccountWorkDelivery extends string | AccountMeta<string> = string,\n TAccountClient extends string | AccountMeta<string> = string,\n TAccountClock extends\n | string\n | AccountMeta<string> = 'SysvarC1ock11111111111111111111111111111111',\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountWorkOrder extends string\n ? WritableAccount<TAccountWorkOrder>\n : TAccountWorkOrder,\n TAccountWorkDelivery extends string\n ? ReadonlyAccount<TAccountWorkDelivery>\n : TAccountWorkDelivery,\n TAccountClient extends string\n ? WritableSignerAccount<TAccountClient> &\n AccountSignerMeta<TAccountClient>\n : TAccountClient,\n TAccountClock extends string\n ? ReadonlyAccount<TAccountClock>\n : TAccountClock,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type VerifyWorkDeliveryInstructionData = {\n discriminator: ReadonlyUint8Array;\n verificationNotes: Option<string>;\n};\n\nexport type VerifyWorkDeliveryInstructionDataArgs = {\n verificationNotes: OptionOrNullable<string>;\n};\n\nexport function getVerifyWorkDeliveryInstructionDataEncoder(): Encoder<VerifyWorkDeliveryInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n ['discriminator', fixEncoderSize(getBytesEncoder(), 8)],\n [\n 'verificationNotes',\n getOptionEncoder(\n addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder())\n ),\n ],\n ]),\n (value) => ({ ...value, discriminator: VERIFY_WORK_DELIVERY_DISCRIMINATOR })\n );\n}\n\nexport function getVerifyWorkDeliveryInstructionDataDecoder(): Decoder<VerifyWorkDeliveryInstructionData> {\n return getStructDecoder([\n ['discriminator', fixDecoderSize(getBytesDecoder(), 8)],\n [\n 'verificationNotes',\n getOptionDecoder(addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())),\n ],\n ]);\n}\n\nexport function getVerifyWorkDeliveryInstructionDataCodec(): Codec<\n VerifyWorkDeliveryInstructionDataArgs,\n VerifyWorkDeliveryInstructionData\n> {\n return combineCodec(\n getVerifyWorkDeliveryInstructionDataEncoder(),\n getVerifyWorkDeliveryInstructionDataDecoder()\n );\n}\n\nexport type VerifyWorkDeliveryInput<\n TAccountWorkOrder extends string = string,\n TAccountWorkDelivery extends string = string,\n TAccountClient extends string = string,\n TAccountClock extends string = string,\n> = {\n workOrder: Address<TAccountWorkOrder>;\n workDelivery: Address<TAccountWorkDelivery>;\n client: TransactionSigner<TAccountClient>;\n clock?: Address<TAccountClock>;\n verificationNotes: VerifyWorkDeliveryInstructionDataArgs['verificationNotes'];\n};\n\nexport function getVerifyWorkDeliveryInstruction<\n TAccountWorkOrder extends string,\n TAccountWorkDelivery extends string,\n TAccountClient extends string,\n TAccountClock extends string,\n TProgramAddress extends\n Address = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: VerifyWorkDeliveryInput<\n TAccountWorkOrder,\n TAccountWorkDelivery,\n TAccountClient,\n TAccountClock\n >,\n config?: { programAddress?: TProgramAddress }\n): VerifyWorkDeliveryInstruction<\n TProgramAddress,\n TAccountWorkOrder,\n TAccountWorkDelivery,\n TAccountClient,\n TAccountClock\n> {\n // Program address.\n const programAddress =\n config?.programAddress ?? GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n workOrder: { value: input.workOrder ?? null, isWritable: true },\n workDelivery: { value: input.workDelivery ?? null, isWritable: false },\n client: { value: input.client ?? null, isWritable: true },\n clock: { value: input.clock ?? null, isWritable: false },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolve default values.\n if (!accounts.clock.value) {\n accounts.clock.value =\n 'SysvarC1ock11111111111111111111111111111111' as Address<'SysvarC1ock11111111111111111111111111111111'>;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');\n const instruction = {\n accounts: [\n getAccountMeta(accounts.workOrder),\n getAccountMeta(accounts.workDelivery),\n getAccountMeta(accounts.client),\n getAccountMeta(accounts.clock),\n ],\n programAddress,\n data: getVerifyWorkDeliveryInstructionDataEncoder().encode(\n args as VerifyWorkDeliveryInstructionDataArgs\n ),\n } as VerifyWorkDeliveryInstruction<\n TProgramAddress,\n TAccountWorkOrder,\n TAccountWorkDelivery,\n TAccountClient,\n TAccountClock\n >;\n\n return instruction;\n}\n\nexport type ParsedVerifyWorkDeliveryInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n workOrder: TAccountMetas[0];\n workDelivery: TAccountMetas[1];\n client: TAccountMetas[2];\n clock: TAccountMetas[3];\n };\n data: VerifyWorkDeliveryInstructionData;\n};\n\nexport function parseVerifyWorkDeliveryInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>\n): ParsedVerifyWorkDeliveryInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 4) {\n throw new Error(getWorkOrderErrorMessage(\"verify_work_delivery\", instruction.accounts.length));\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = instruction.accounts![accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n workOrder: getNextAccount(),\n workDelivery: getNextAccount(),\n client: getNextAccount(),\n clock: getNextAccount(),\n },\n data: getVerifyWorkDeliveryInstructionDataDecoder().decode(\n instruction.data\n ),\n };\n}\n"]}
|