@ghostspeak/sdk 2.0.7 → 2.0.8
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/README.md +145 -2
- package/dist/{GhostSpeakClient-CWmGaM9Q.d.ts → GhostSpeakClient-bnXwUPHI.d.ts} +10 -6
- package/dist/{StakingModule-C5rzuOWb.d.ts → StakingModule-DunDShLq.d.ts} +263 -343
- package/dist/{agent-5YLZ7DAC.js → agent-S42FIMR7.js} +3 -3
- package/dist/{agent-5YLZ7DAC.js.map → agent-S42FIMR7.js.map} +1 -1
- package/dist/browser-CI5_6Gzk.d.ts +234 -0
- package/dist/browser.d.ts +3 -64
- package/dist/browser.js +9 -9
- package/dist/{chunk-SFTSZ3LC.js → chunk-46QWY3MG.js} +3 -3
- package/dist/{chunk-SFTSZ3LC.js.map → chunk-46QWY3MG.js.map} +1 -1
- package/dist/{chunk-G7S6B6WB.js → chunk-5QBSC4T4.js} +7 -7
- package/dist/{chunk-G7S6B6WB.js.map → chunk-5QBSC4T4.js.map} +1 -1
- package/dist/{chunk-IHVDQ4YI.js → chunk-5QZVFUXB.js} +201 -256
- package/dist/chunk-5QZVFUXB.js.map +1 -0
- package/dist/{chunk-E3FD2CNY.js → chunk-6XCCMJ6M.js} +19 -23
- package/dist/chunk-6XCCMJ6M.js.map +1 -0
- package/dist/{chunk-JV2SWONF.js → chunk-A7ALCVUI.js} +3 -3
- package/dist/{chunk-JV2SWONF.js.map → chunk-A7ALCVUI.js.map} +1 -1
- package/dist/{chunk-AL3HQN73.js → chunk-AWMGX3OX.js} +172 -112
- package/dist/chunk-AWMGX3OX.js.map +1 -0
- package/dist/{chunk-S74EH3KD.js → chunk-IQM5RASO.js} +637 -25
- package/dist/chunk-IQM5RASO.js.map +1 -0
- package/dist/{chunk-SZGFSCNU.js → chunk-JYXSOXCP.js} +467 -299
- package/dist/chunk-JYXSOXCP.js.map +1 -0
- package/dist/{chunk-C5CDA3WX.js → chunk-OXA7MECJ.js} +476 -3
- package/dist/chunk-OXA7MECJ.js.map +1 -0
- package/dist/{chunk-KB6CKIUK.js → chunk-QLRWUHN2.js} +3 -3
- package/dist/{chunk-KB6CKIUK.js.map → chunk-QLRWUHN2.js.map} +1 -1
- package/dist/client.d.ts +2 -3
- package/dist/client.js +9 -9
- package/dist/{createAgentAuthorization-ULG47ZJI.js → createAgentAuthorization-KGZNXZBT.js} +4 -4
- package/dist/{createAgentAuthorization-ULG47ZJI.js.map → createAgentAuthorization-KGZNXZBT.js.map} +1 -1
- package/dist/generated-QJREJQ2C.js +9 -0
- package/dist/{generated-EG5USUFG.js.map → generated-QJREJQ2C.js.map} +1 -1
- package/dist/index.d.ts +209 -231
- package/dist/index.js +231 -521
- package/dist/index.js.map +1 -1
- package/dist/metafile-esm.json +1 -1
- package/dist/minimal/core-minimal.d.ts +266 -184
- package/dist/minimal/core-minimal.js +6 -6
- package/dist/minimal/core-minimal.js.map +1 -1
- package/dist/{revokeAuthorization-OK7E7OK3.js → revokeAuthorization-2ZRO6GUZ.js} +4 -4
- package/dist/{revokeAuthorization-OK7E7OK3.js.map → revokeAuthorization-2ZRO6GUZ.js.map} +1 -1
- package/dist/{updateReputationWithAuth-Y4ONEVSP.js → updateReputationWithAuth-PCEUOCFV.js} +4 -4
- package/dist/{updateReputationWithAuth-Y4ONEVSP.js.map → updateReputationWithAuth-PCEUOCFV.js.map} +1 -1
- package/dist/utils.js +9 -9
- package/package.json +4 -4
- package/dist/chunk-AL3HQN73.js.map +0 -1
- package/dist/chunk-C5CDA3WX.js.map +0 -1
- package/dist/chunk-E3FD2CNY.js.map +0 -1
- package/dist/chunk-IHVDQ4YI.js.map +0 -1
- package/dist/chunk-S74EH3KD.js.map +0 -1
- package/dist/chunk-SZGFSCNU.js.map +0 -1
- package/dist/generated-EG5USUFG.js +0 -9
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/generated/accounts/agentReputationAuth.ts","../src/generated/accounts/agentTreeConfig.ts","../src/generated/accounts/agentVerification.ts","../src/generated/accounts/auditTrail.ts","../src/generated/accounts/authorizationUsageRecord.ts","../src/generated/accounts/complianceReport.ts","../src/generated/accounts/credential.ts","../src/generated/accounts/credentialTemplate.ts","../src/generated/accounts/credentialType.ts","../src/generated/accounts/didDocument.ts","../src/generated/accounts/ghostProtectEscrow.ts","../src/generated/accounts/governanceProposal.ts","../src/generated/accounts/multisig.ts","../src/generated/accounts/protocolConfig.ts","../src/generated/accounts/rbacConfig.ts","../src/generated/accounts/reentrancyGuard.ts","../src/generated/accounts/reputationMetrics.ts","../src/generated/accounts/stakingAccount.ts","../src/generated/accounts/stakingConfig.ts","../src/generated/accounts/userRegistry.ts","../src/generated/errors/ghostspeakMarketplace.ts","../src/generated/instructions/activateAgent.ts","../src/generated/instructions/approveDelivery.ts","../src/generated/instructions/arbitrateDispute.ts","../src/generated/instructions/createCredentialTemplate.ts","../src/generated/instructions/createCredentialType.ts","../src/generated/instructions/createDidDocument.ts","../src/generated/instructions/createEscrow.ts","../src/generated/instructions/createMultisig.ts","../src/generated/instructions/deactivateAgent.ts","../src/generated/instructions/deactivateCredentialTemplate.ts","../src/generated/instructions/deactivateCredentialType.ts","../src/generated/instructions/deactivateDidDocument.ts","../src/generated/instructions/enableProtocolFees.ts","../src/generated/instructions/fileDispute.ts","../src/generated/instructions/generateComplianceReport.ts","../src/generated/instructions/initializeAuditTrail.ts","../src/generated/instructions/initializeGovernanceProposal.ts","../src/generated/instructions/initializeProtocolConfig.ts","../src/generated/instructions/initializeRbacConfig.ts","../src/generated/instructions/initializeReputationMetrics.ts","../src/generated/instructions/initializeStakingConfig.ts","../src/generated/instructions/initReentrancyGuard.ts","../src/generated/instructions/issueCredential.ts","../src/generated/instructions/manageAgentStatus.ts","../src/generated/instructions/recordPayaiPayment.ts","../src/generated/instructions/registerAgent.ts","../src/generated/instructions/registerAgentCompressed.ts","../src/generated/instructions/resetReentrancyGuard.ts","../src/generated/instructions/resolveDidDocument.ts","../src/generated/instructions/revokeCredential.ts","../src/generated/instructions/slashStake.ts","../src/generated/instructions/stakeGhost.ts","../src/generated/instructions/submitDelivery.ts","../src/generated/instructions/submitServiceRating.ts","../src/generated/instructions/unstakeGhost.ts","../src/generated/instructions/updateAgent.ts","../src/generated/instructions/updateAgentReputation.ts","../src/generated/instructions/updateAgentService.ts","../src/generated/instructions/updateCrosschainStatus.ts","../src/generated/instructions/updateDidDocument.ts","../src/generated/instructions/updateProtocolConfig.ts","../src/generated/instructions/updateReputationTags.ts","../src/generated/instructions/updateSourceReputation.ts","../src/generated/instructions/verifyAgent.ts","../src/generated/instructions/verifyAuthorization.ts"],"names":["fixEncoderSize","getBytesEncoder","transformEncoder","getStructEncoder","getAddressEncoder","getU64Encoder","getU8Encoder","getStructDecoder","fixDecoderSize","getBytesDecoder","getAddressDecoder","getU64Decoder","getU8Decoder","combineCodec","decodeAccount","assertAccountExists","fetchEncodedAccount","assertAccountsExist","fetchEncodedAccounts","getI64Encoder","getBooleanEncoder","getI64Decoder","getBooleanDecoder","addEncoderSizePrefix","getUtf8Encoder","getU32Encoder","getOptionEncoder","addDecoderSizePrefix","getUtf8Decoder","getU32Decoder","getOptionDecoder","getArrayEncoder","getArrayDecoder","getU16Encoder","getU16Decoder","getProgramDerivedAddress"],"mappings":";;;;AAuDO,IAAM,mCAAA,GAAsC,IAAI,UAAA,CAAW;AAAA,EAChE,EAAA;AAAA,EAAI,GAAA;AAAA,EAAK,GAAA;AAAA,EAAK,EAAA;AAAA,EAAI,GAAA;AAAA,EAAK,GAAA;AAAA,EAAK,GAAA;AAAA,EAAK;AACnC,CAAC;AAEM,SAAS,wCAAA,GAA2C;AACzD,EAAA,OAAO,cAAA,CAAe,eAAA,EAAgB,EAAG,CAAC,CAAA,CAAE,MAAA;AAAA,IAC1C;AAAA,GACF;AACF;AAoEO,SAAS,6BAAA,GAAkE;AAChF,EAAA,OAAO,gBAAA;AAAA,IACL,gBAAA,CAAiB;AAAA,MACf,CAAC,eAAA,EAAiB,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ACR,OAAO,cAAA,EAAe;AAAA,MACtB,eAAe,cAAA,EAAe;AAAA,MAC9B,OAAO,cAAA;AAAe,KACxB;AAAA,IACA,IAAA,EAAM,8CAA6C,CAAE,MAAA;AAAA,MACnD,WAAA,CAAY;AAAA;AACd,GACF;AACF","file":"chunk-S74EH3KD.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 addDecoderSizePrefix,\n addEncoderSizePrefix,\n assertAccountExists,\n assertAccountsExist,\n combineCodec,\n decodeAccount,\n fetchEncodedAccount,\n fetchEncodedAccounts,\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 getStructDecoder,\n getStructEncoder,\n getU32Decoder,\n getU32Encoder,\n getU64Decoder,\n getU64Encoder,\n getU8Decoder,\n getU8Encoder,\n getUtf8Decoder,\n getUtf8Encoder,\n transformEncoder,\n type Account,\n type Address,\n type Codec,\n type Decoder,\n type EncodedAccount,\n type Encoder,\n type FetchAccountConfig,\n type FetchAccountsConfig,\n type MaybeAccount,\n type MaybeEncodedAccount,\n type Option,\n type OptionOrNullable,\n type ReadonlyUint8Array,\n} from \"@solana/kit\";\n\nexport const AGENT_REPUTATION_AUTH_DISCRIMINATOR = new Uint8Array([\n 30, 249, 165, 44, 155, 194, 188, 175,\n]);\n\nexport function getAgentReputationAuthDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 8).encode(\n AGENT_REPUTATION_AUTH_DISCRIMINATOR,\n );\n}\n\nexport type AgentReputationAuth = {\n discriminator: ReadonlyUint8Array;\n /** Agent granting authorization */\n agent: Address;\n /** Authorized source (e.g., PayAI facilitator address) */\n authorizedSource: Address;\n /** Maximum number of reputation updates allowed */\n indexLimit: bigint;\n /** Current usage count (number of times used) */\n currentIndex: bigint;\n /** Expiration timestamp (Unix seconds) */\n expiresAt: bigint;\n /**\n * Solana network this authorization is valid on\n * 0 = mainnet-beta, 1 = devnet, 2 = testnet, 3 = localnet\n */\n network: number;\n /** Ed25519 signature proving agent's intent (64 bytes) */\n signature: ReadonlyUint8Array;\n /** Optional nonce for replay protection */\n nonce: Option<string>;\n /** Whether this authorization has been revoked */\n revoked: boolean;\n /** Creation timestamp */\n createdAt: bigint;\n /** Last used timestamp */\n lastUsedAt: Option<bigint>;\n /** Total reputation change applied via this authorization */\n totalReputationChange: bigint;\n /** PDA bump */\n bump: number;\n};\n\nexport type AgentReputationAuthArgs = {\n /** Agent granting authorization */\n agent: Address;\n /** Authorized source (e.g., PayAI facilitator address) */\n authorizedSource: Address;\n /** Maximum number of reputation updates allowed */\n indexLimit: number | bigint;\n /** Current usage count (number of times used) */\n currentIndex: number | bigint;\n /** Expiration timestamp (Unix seconds) */\n expiresAt: number | bigint;\n /**\n * Solana network this authorization is valid on\n * 0 = mainnet-beta, 1 = devnet, 2 = testnet, 3 = localnet\n */\n network: number;\n /** Ed25519 signature proving agent's intent (64 bytes) */\n signature: ReadonlyUint8Array;\n /** Optional nonce for replay protection */\n nonce: OptionOrNullable<string>;\n /** Whether this authorization has been revoked */\n revoked: boolean;\n /** Creation timestamp */\n createdAt: number | bigint;\n /** Last used timestamp */\n lastUsedAt: OptionOrNullable<number | bigint>;\n /** Total reputation change applied via this authorization */\n totalReputationChange: number | bigint;\n /** PDA bump */\n bump: number;\n};\n\n/** Gets the encoder for {@link AgentReputationAuthArgs} account data. */\nexport function getAgentReputationAuthEncoder(): Encoder<AgentReputationAuthArgs> {\n return transformEncoder(\n getStructEncoder([\n [\"discriminator\", fixEncoderSize(getBytesEncoder(), 8)],\n [\"agent\", getAddressEncoder()],\n [\"authorizedSource\", getAddressEncoder()],\n [\"indexLimit\", getU64Encoder()],\n [\"currentIndex\", getU64Encoder()],\n [\"expiresAt\", getI64Encoder()],\n [\"network\", getU8Encoder()],\n [\"signature\", fixEncoderSize(getBytesEncoder(), 64)],\n [\n \"nonce\",\n getOptionEncoder(\n addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder()),\n ),\n ],\n [\"revoked\", getBooleanEncoder()],\n [\"createdAt\", getI64Encoder()],\n [\"lastUsedAt\", getOptionEncoder(getI64Encoder())],\n [\"totalReputationChange\", getI64Encoder()],\n [\"bump\", getU8Encoder()],\n ]),\n (value) => ({\n ...value,\n discriminator: AGENT_REPUTATION_AUTH_DISCRIMINATOR,\n }),\n );\n}\n\n/** Gets the decoder for {@link AgentReputationAuth} account data. */\nexport function getAgentReputationAuthDecoder(): Decoder<AgentReputationAuth> {\n return getStructDecoder([\n [\"discriminator\", fixDecoderSize(getBytesDecoder(), 8)],\n [\"agent\", getAddressDecoder()],\n [\"authorizedSource\", getAddressDecoder()],\n [\"indexLimit\", getU64Decoder()],\n [\"currentIndex\", getU64Decoder()],\n [\"expiresAt\", getI64Decoder()],\n [\"network\", getU8Decoder()],\n [\"signature\", fixDecoderSize(getBytesDecoder(), 64)],\n [\n \"nonce\",\n getOptionDecoder(addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())),\n ],\n [\"revoked\", getBooleanDecoder()],\n [\"createdAt\", getI64Decoder()],\n [\"lastUsedAt\", getOptionDecoder(getI64Decoder())],\n [\"totalReputationChange\", getI64Decoder()],\n [\"bump\", getU8Decoder()],\n ]);\n}\n\n/** Gets the codec for {@link AgentReputationAuth} account data. */\nexport function getAgentReputationAuthCodec(): Codec<\n AgentReputationAuthArgs,\n AgentReputationAuth\n> {\n return combineCodec(\n getAgentReputationAuthEncoder(),\n getAgentReputationAuthDecoder(),\n );\n}\n\nexport function decodeAgentReputationAuth<TAddress extends string = string>(\n encodedAccount: EncodedAccount<TAddress>,\n): Account<AgentReputationAuth, TAddress>;\nexport function decodeAgentReputationAuth<TAddress extends string = string>(\n encodedAccount: MaybeEncodedAccount<TAddress>,\n): MaybeAccount<AgentReputationAuth, TAddress>;\nexport function decodeAgentReputationAuth<TAddress extends string = string>(\n encodedAccount: EncodedAccount<TAddress> | MaybeEncodedAccount<TAddress>,\n):\n | Account<AgentReputationAuth, TAddress>\n | MaybeAccount<AgentReputationAuth, TAddress> {\n return decodeAccount(\n encodedAccount as MaybeEncodedAccount<TAddress>,\n getAgentReputationAuthDecoder(),\n );\n}\n\nexport async function fetchAgentReputationAuth<\n TAddress extends string = string,\n>(\n rpc: Parameters<typeof fetchEncodedAccount>[0],\n address: Address<TAddress>,\n config?: FetchAccountConfig,\n): Promise<Account<AgentReputationAuth, TAddress>> {\n const maybeAccount = await fetchMaybeAgentReputationAuth(\n rpc,\n address,\n config,\n );\n assertAccountExists(maybeAccount);\n return maybeAccount;\n}\n\nexport async function fetchMaybeAgentReputationAuth<\n TAddress extends string = string,\n>(\n rpc: Parameters<typeof fetchEncodedAccount>[0],\n address: Address<TAddress>,\n config?: FetchAccountConfig,\n): Promise<MaybeAccount<AgentReputationAuth, TAddress>> {\n const maybeAccount = await fetchEncodedAccount(rpc, address, config);\n return decodeAgentReputationAuth(maybeAccount);\n}\n\nexport async function fetchAllAgentReputationAuth(\n rpc: Parameters<typeof fetchEncodedAccounts>[0],\n addresses: Array<Address>,\n config?: FetchAccountsConfig,\n): Promise<Account<AgentReputationAuth>[]> {\n const maybeAccounts = await fetchAllMaybeAgentReputationAuth(\n rpc,\n addresses,\n config,\n );\n assertAccountsExist(maybeAccounts);\n return maybeAccounts;\n}\n\nexport async function fetchAllMaybeAgentReputationAuth(\n rpc: Parameters<typeof fetchEncodedAccounts>[0],\n addresses: Array<Address>,\n config?: FetchAccountsConfig,\n): Promise<MaybeAccount<AgentReputationAuth>[]> {\n const maybeAccounts = await fetchEncodedAccounts(rpc, addresses, config);\n return maybeAccounts.map((maybeAccount) =>\n decodeAgentReputationAuth(maybeAccount),\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 assertAccountExists,\n assertAccountsExist,\n combineCodec,\n decodeAccount,\n fetchEncodedAccount,\n fetchEncodedAccounts,\n fixDecoderSize,\n fixEncoderSize,\n getAddressDecoder,\n getAddressEncoder,\n getBytesDecoder,\n getBytesEncoder,\n getStructDecoder,\n getStructEncoder,\n getU64Decoder,\n getU64Encoder,\n getU8Decoder,\n getU8Encoder,\n transformEncoder,\n type Account,\n type Address,\n type EncodedAccount,\n type FetchAccountConfig,\n type FetchAccountsConfig,\n type FixedSizeCodec,\n type FixedSizeDecoder,\n type FixedSizeEncoder,\n type MaybeAccount,\n type MaybeEncodedAccount,\n type ReadonlyUint8Array,\n} from \"@solana/kit\";\n\nexport const AGENT_TREE_CONFIG_DISCRIMINATOR = new Uint8Array([\n 145, 145, 156, 0, 197, 232, 130, 245,\n]);\n\nexport function getAgentTreeConfigDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 8).encode(\n AGENT_TREE_CONFIG_DISCRIMINATOR,\n );\n}\n\nexport type AgentTreeConfig = {\n discriminator: ReadonlyUint8Array;\n /** Tree creator/owner */\n treeCreator: Address;\n /** Tree delegate authority */\n treeDelegate: Address;\n /** Number of agents minted in this tree */\n numMinted: bigint;\n /** Bump seed */\n bump: number;\n};\n\nexport type AgentTreeConfigArgs = {\n /** Tree creator/owner */\n treeCreator: Address;\n /** Tree delegate authority */\n treeDelegate: Address;\n /** Number of agents minted in this tree */\n numMinted: number | bigint;\n /** Bump seed */\n bump: number;\n};\n\n/** Gets the encoder for {@link AgentTreeConfigArgs} account data. */\nexport function getAgentTreeConfigEncoder(): FixedSizeEncoder<AgentTreeConfigArgs> {\n return transformEncoder(\n getStructEncoder([\n [\"discriminator\", fixEncoderSize(getBytesEncoder(), 8)],\n [\"treeCreator\", getAddressEncoder()],\n [\"treeDelegate\", getAddressEncoder()],\n [\"numMinted\", getU64Encoder()],\n [\"bump\", getU8Encoder()],\n ]),\n (value) => ({ ...value, discriminator: AGENT_TREE_CONFIG_DISCRIMINATOR }),\n );\n}\n\n/** Gets the decoder for {@link AgentTreeConfig} account data. */\nexport function getAgentTreeConfigDecoder(): FixedSizeDecoder<AgentTreeConfig> {\n return getStructDecoder([\n [\"discriminator\", fixDecoderSize(getBytesDecoder(), 8)],\n [\"treeCreator\", getAddressDecoder()],\n [\"treeDelegate\", getAddressDecoder()],\n [\"numMinted\", getU64Decoder()],\n [\"bump\", getU8Decoder()],\n ]);\n}\n\n/** Gets the codec for {@link AgentTreeConfig} account data. */\nexport function getAgentTreeConfigCodec(): FixedSizeCodec<\n AgentTreeConfigArgs,\n AgentTreeConfig\n> {\n return combineCodec(getAgentTreeConfigEncoder(), getAgentTreeConfigDecoder());\n}\n\nexport function decodeAgentTreeConfig<TAddress extends string = string>(\n encodedAccount: EncodedAccount<TAddress>,\n): Account<AgentTreeConfig, TAddress>;\nexport function decodeAgentTreeConfig<TAddress extends string = string>(\n encodedAccount: MaybeEncodedAccount<TAddress>,\n): MaybeAccount<AgentTreeConfig, TAddress>;\nexport function decodeAgentTreeConfig<TAddress extends string = string>(\n encodedAccount: EncodedAccount<TAddress> | MaybeEncodedAccount<TAddress>,\n):\n | Account<AgentTreeConfig, TAddress>\n | MaybeAccount<AgentTreeConfig, TAddress> {\n return decodeAccount(\n encodedAccount as MaybeEncodedAccount<TAddress>,\n getAgentTreeConfigDecoder(),\n );\n}\n\nexport async function fetchAgentTreeConfig<TAddress extends string = string>(\n rpc: Parameters<typeof fetchEncodedAccount>[0],\n address: Address<TAddress>,\n config?: FetchAccountConfig,\n): Promise<Account<AgentTreeConfig, TAddress>> {\n const maybeAccount = await fetchMaybeAgentTreeConfig(rpc, address, config);\n assertAccountExists(maybeAccount);\n return maybeAccount;\n}\n\nexport async function fetchMaybeAgentTreeConfig<\n TAddress extends string = string,\n>(\n rpc: Parameters<typeof fetchEncodedAccount>[0],\n address: Address<TAddress>,\n config?: FetchAccountConfig,\n): Promise<MaybeAccount<AgentTreeConfig, TAddress>> {\n const maybeAccount = await fetchEncodedAccount(rpc, address, config);\n return decodeAgentTreeConfig(maybeAccount);\n}\n\nexport async function fetchAllAgentTreeConfig(\n rpc: Parameters<typeof fetchEncodedAccounts>[0],\n addresses: Array<Address>,\n config?: FetchAccountsConfig,\n): Promise<Account<AgentTreeConfig>[]> {\n const maybeAccounts = await fetchAllMaybeAgentTreeConfig(\n rpc,\n addresses,\n config,\n );\n assertAccountsExist(maybeAccounts);\n return maybeAccounts;\n}\n\nexport async function fetchAllMaybeAgentTreeConfig(\n rpc: Parameters<typeof fetchEncodedAccounts>[0],\n addresses: Array<Address>,\n config?: FetchAccountsConfig,\n): Promise<MaybeAccount<AgentTreeConfig>[]> {\n const maybeAccounts = await fetchEncodedAccounts(rpc, addresses, config);\n return maybeAccounts.map((maybeAccount) =>\n decodeAgentTreeConfig(maybeAccount),\n );\n}\n\nexport function getAgentTreeConfigSize(): number {\n return 81;\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 assertAccountExists,\n assertAccountsExist,\n combineCodec,\n decodeAccount,\n fetchEncodedAccount,\n fetchEncodedAccounts,\n fixDecoderSize,\n fixEncoderSize,\n getAddressDecoder,\n getAddressEncoder,\n getBooleanDecoder,\n getBooleanEncoder,\n getBytesDecoder,\n getBytesEncoder,\n getI64Decoder,\n getI64Encoder,\n getStructDecoder,\n getStructEncoder,\n getU8Decoder,\n getU8Encoder,\n transformEncoder,\n type Account,\n type Address,\n type Codec,\n type Decoder,\n type EncodedAccount,\n type Encoder,\n type FetchAccountConfig,\n type FetchAccountsConfig,\n type MaybeAccount,\n type MaybeEncodedAccount,\n type ReadonlyUint8Array,\n} from \"@solana/kit\";\nimport {\n getAgentVerificationDataDecoder,\n getAgentVerificationDataEncoder,\n type AgentVerificationData,\n type AgentVerificationDataArgs,\n} from \"../types\";\n\nexport const AGENT_VERIFICATION_DISCRIMINATOR = new Uint8Array([\n 128, 155, 95, 241, 66, 207, 166, 59,\n]);\n\nexport function getAgentVerificationDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 8).encode(\n AGENT_VERIFICATION_DISCRIMINATOR,\n );\n}\n\nexport type AgentVerification = {\n discriminator: ReadonlyUint8Array;\n agent: Address;\n verifier: Address;\n verificationData: AgentVerificationData;\n createdAt: bigint;\n expiresAt: bigint;\n isActive: boolean;\n bump: number;\n};\n\nexport type AgentVerificationArgs = {\n agent: Address;\n verifier: Address;\n verificationData: AgentVerificationDataArgs;\n createdAt: number | bigint;\n expiresAt: number | bigint;\n isActive: boolean;\n bump: number;\n};\n\n/** Gets the encoder for {@link AgentVerificationArgs} account data. */\nexport function getAgentVerificationEncoder(): Encoder<AgentVerificationArgs> {\n return transformEncoder(\n getStructEncoder([\n [\"discriminator\", fixEncoderSize(getBytesEncoder(), 8)],\n [\"agent\", getAddressEncoder()],\n [\"verifier\", getAddressEncoder()],\n [\"verificationData\", getAgentVerificationDataEncoder()],\n [\"createdAt\", getI64Encoder()],\n [\"expiresAt\", getI64Encoder()],\n [\"isActive\", getBooleanEncoder()],\n [\"bump\", getU8Encoder()],\n ]),\n (value) => ({ ...value, discriminator: AGENT_VERIFICATION_DISCRIMINATOR }),\n );\n}\n\n/** Gets the decoder for {@link AgentVerification} account data. */\nexport function getAgentVerificationDecoder(): Decoder<AgentVerification> {\n return getStructDecoder([\n [\"discriminator\", fixDecoderSize(getBytesDecoder(), 8)],\n [\"agent\", getAddressDecoder()],\n [\"verifier\", getAddressDecoder()],\n [\"verificationData\", getAgentVerificationDataDecoder()],\n [\"createdAt\", getI64Decoder()],\n [\"expiresAt\", getI64Decoder()],\n [\"isActive\", getBooleanDecoder()],\n [\"bump\", getU8Decoder()],\n ]);\n}\n\n/** Gets the codec for {@link AgentVerification} account data. */\nexport function getAgentVerificationCodec(): Codec<\n AgentVerificationArgs,\n AgentVerification\n> {\n return combineCodec(\n getAgentVerificationEncoder(),\n getAgentVerificationDecoder(),\n );\n}\n\nexport function decodeAgentVerification<TAddress extends string = string>(\n encodedAccount: EncodedAccount<TAddress>,\n): Account<AgentVerification, TAddress>;\nexport function decodeAgentVerification<TAddress extends string = string>(\n encodedAccount: MaybeEncodedAccount<TAddress>,\n): MaybeAccount<AgentVerification, TAddress>;\nexport function decodeAgentVerification<TAddress extends string = string>(\n encodedAccount: EncodedAccount<TAddress> | MaybeEncodedAccount<TAddress>,\n):\n | Account<AgentVerification, TAddress>\n | MaybeAccount<AgentVerification, TAddress> {\n return decodeAccount(\n encodedAccount as MaybeEncodedAccount<TAddress>,\n getAgentVerificationDecoder(),\n );\n}\n\nexport async function fetchAgentVerification<TAddress extends string = string>(\n rpc: Parameters<typeof fetchEncodedAccount>[0],\n address: Address<TAddress>,\n config?: FetchAccountConfig,\n): Promise<Account<AgentVerification, TAddress>> {\n const maybeAccount = await fetchMaybeAgentVerification(rpc, address, config);\n assertAccountExists(maybeAccount);\n return maybeAccount;\n}\n\nexport async function fetchMaybeAgentVerification<\n TAddress extends string = string,\n>(\n rpc: Parameters<typeof fetchEncodedAccount>[0],\n address: Address<TAddress>,\n config?: FetchAccountConfig,\n): Promise<MaybeAccount<AgentVerification, TAddress>> {\n const maybeAccount = await fetchEncodedAccount(rpc, address, config);\n return decodeAgentVerification(maybeAccount);\n}\n\nexport async function fetchAllAgentVerification(\n rpc: Parameters<typeof fetchEncodedAccounts>[0],\n addresses: Array<Address>,\n config?: FetchAccountsConfig,\n): Promise<Account<AgentVerification>[]> {\n const maybeAccounts = await fetchAllMaybeAgentVerification(\n rpc,\n addresses,\n config,\n );\n assertAccountsExist(maybeAccounts);\n return maybeAccounts;\n}\n\nexport async function fetchAllMaybeAgentVerification(\n rpc: Parameters<typeof fetchEncodedAccounts>[0],\n addresses: Array<Address>,\n config?: FetchAccountsConfig,\n): Promise<MaybeAccount<AgentVerification>[]> {\n const maybeAccounts = await fetchEncodedAccounts(rpc, addresses, config);\n return maybeAccounts.map((maybeAccount) =>\n decodeAgentVerification(maybeAccount),\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 assertAccountExists,\n assertAccountsExist,\n combineCodec,\n decodeAccount,\n fetchEncodedAccount,\n fetchEncodedAccounts,\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 getU64Decoder,\n getU64Encoder,\n getU8Decoder,\n getU8Encoder,\n transformEncoder,\n type Account,\n type Address,\n type Codec,\n type Decoder,\n type EncodedAccount,\n type Encoder,\n type FetchAccountConfig,\n type FetchAccountsConfig,\n type MaybeAccount,\n type MaybeEncodedAccount,\n type ReadonlyUint8Array,\n} from \"@solana/kit\";\nimport {\n getAuditConfigDecoder,\n getAuditConfigEncoder,\n getAuditEntryDecoder,\n getAuditEntryEncoder,\n getComplianceStatusDecoder,\n getComplianceStatusEncoder,\n type AuditConfig,\n type AuditConfigArgs,\n type AuditEntry,\n type AuditEntryArgs,\n type ComplianceStatus,\n type ComplianceStatusArgs,\n} from \"../types\";\n\nexport const AUDIT_TRAIL_DISCRIMINATOR = new Uint8Array([\n 171, 223, 253, 181, 134, 88, 66, 26,\n]);\n\nexport function getAuditTrailDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 8).encode(AUDIT_TRAIL_DISCRIMINATOR);\n}\n\nexport type AuditTrail = {\n discriminator: ReadonlyUint8Array;\n /** Authority that can manage this audit trail */\n authority: Address;\n /** Unique identifier for this audit trail */\n trailId: bigint;\n /** Creation timestamp */\n createdAt: bigint;\n /** Last update timestamp */\n updatedAt: bigint;\n /** Version for compatibility */\n version: number;\n /** Audit entries (immutable log) */\n entries: Array<AuditEntry>;\n /** Trail configuration */\n config: AuditConfig;\n /** Compliance status */\n complianceStatus: ComplianceStatus;\n /** Hash chain for integrity verification */\n hashChain: Array<ReadonlyUint8Array>;\n /** Reserved space for future extensions */\n reserved: ReadonlyUint8Array;\n};\n\nexport type AuditTrailArgs = {\n /** Authority that can manage this audit trail */\n authority: Address;\n /** Unique identifier for this audit trail */\n trailId: number | bigint;\n /** Creation timestamp */\n createdAt: number | bigint;\n /** Last update timestamp */\n updatedAt: number | bigint;\n /** Version for compatibility */\n version: number;\n /** Audit entries (immutable log) */\n entries: Array<AuditEntryArgs>;\n /** Trail configuration */\n config: AuditConfigArgs;\n /** Compliance status */\n complianceStatus: ComplianceStatusArgs;\n /** Hash chain for integrity verification */\n hashChain: Array<ReadonlyUint8Array>;\n /** Reserved space for future extensions */\n reserved: ReadonlyUint8Array;\n};\n\n/** Gets the encoder for {@link AuditTrailArgs} account data. */\nexport function getAuditTrailEncoder(): Encoder<AuditTrailArgs> {\n return transformEncoder(\n getStructEncoder([\n [\"discriminator\", fixEncoderSize(getBytesEncoder(), 8)],\n [\"authority\", getAddressEncoder()],\n [\"trailId\", getU64Encoder()],\n [\"createdAt\", getI64Encoder()],\n [\"updatedAt\", getI64Encoder()],\n [\"version\", getU8Encoder()],\n [\"entries\", getArrayEncoder(getAuditEntryEncoder())],\n [\"config\", getAuditConfigEncoder()],\n [\"complianceStatus\", getComplianceStatusEncoder()],\n [\"hashChain\", getArrayEncoder(fixEncoderSize(getBytesEncoder(), 32))],\n [\"reserved\", fixEncoderSize(getBytesEncoder(), 128)],\n ]),\n (value) => ({ ...value, discriminator: AUDIT_TRAIL_DISCRIMINATOR }),\n );\n}\n\n/** Gets the decoder for {@link AuditTrail} account data. */\nexport function getAuditTrailDecoder(): Decoder<AuditTrail> {\n return getStructDecoder([\n [\"discriminator\", fixDecoderSize(getBytesDecoder(), 8)],\n [\"authority\", getAddressDecoder()],\n [\"trailId\", getU64Decoder()],\n [\"createdAt\", getI64Decoder()],\n [\"updatedAt\", getI64Decoder()],\n [\"version\", getU8Decoder()],\n [\"entries\", getArrayDecoder(getAuditEntryDecoder())],\n [\"config\", getAuditConfigDecoder()],\n [\"complianceStatus\", getComplianceStatusDecoder()],\n [\"hashChain\", getArrayDecoder(fixDecoderSize(getBytesDecoder(), 32))],\n [\"reserved\", fixDecoderSize(getBytesDecoder(), 128)],\n ]);\n}\n\n/** Gets the codec for {@link AuditTrail} account data. */\nexport function getAuditTrailCodec(): Codec<AuditTrailArgs, AuditTrail> {\n return combineCodec(getAuditTrailEncoder(), getAuditTrailDecoder());\n}\n\nexport function decodeAuditTrail<TAddress extends string = string>(\n encodedAccount: EncodedAccount<TAddress>,\n): Account<AuditTrail, TAddress>;\nexport function decodeAuditTrail<TAddress extends string = string>(\n encodedAccount: MaybeEncodedAccount<TAddress>,\n): MaybeAccount<AuditTrail, TAddress>;\nexport function decodeAuditTrail<TAddress extends string = string>(\n encodedAccount: EncodedAccount<TAddress> | MaybeEncodedAccount<TAddress>,\n): Account<AuditTrail, TAddress> | MaybeAccount<AuditTrail, TAddress> {\n return decodeAccount(\n encodedAccount as MaybeEncodedAccount<TAddress>,\n getAuditTrailDecoder(),\n );\n}\n\nexport async function fetchAuditTrail<TAddress extends string = string>(\n rpc: Parameters<typeof fetchEncodedAccount>[0],\n address: Address<TAddress>,\n config?: FetchAccountConfig,\n): Promise<Account<AuditTrail, TAddress>> {\n const maybeAccount = await fetchMaybeAuditTrail(rpc, address, config);\n assertAccountExists(maybeAccount);\n return maybeAccount;\n}\n\nexport async function fetchMaybeAuditTrail<TAddress extends string = string>(\n rpc: Parameters<typeof fetchEncodedAccount>[0],\n address: Address<TAddress>,\n config?: FetchAccountConfig,\n): Promise<MaybeAccount<AuditTrail, TAddress>> {\n const maybeAccount = await fetchEncodedAccount(rpc, address, config);\n return decodeAuditTrail(maybeAccount);\n}\n\nexport async function fetchAllAuditTrail(\n rpc: Parameters<typeof fetchEncodedAccounts>[0],\n addresses: Array<Address>,\n config?: FetchAccountsConfig,\n): Promise<Account<AuditTrail>[]> {\n const maybeAccounts = await fetchAllMaybeAuditTrail(rpc, addresses, config);\n assertAccountsExist(maybeAccounts);\n return maybeAccounts;\n}\n\nexport async function fetchAllMaybeAuditTrail(\n rpc: Parameters<typeof fetchEncodedAccounts>[0],\n addresses: Array<Address>,\n config?: FetchAccountsConfig,\n): Promise<MaybeAccount<AuditTrail>[]> {\n const maybeAccounts = await fetchEncodedAccounts(rpc, addresses, config);\n return maybeAccounts.map((maybeAccount) => decodeAuditTrail(maybeAccount));\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 assertAccountExists,\n assertAccountsExist,\n combineCodec,\n decodeAccount,\n fetchEncodedAccount,\n fetchEncodedAccounts,\n fixDecoderSize,\n fixEncoderSize,\n getAddressDecoder,\n getAddressEncoder,\n getBytesDecoder,\n getBytesEncoder,\n getI64Decoder,\n getI64Encoder,\n getOptionDecoder,\n getOptionEncoder,\n getStructDecoder,\n getStructEncoder,\n getU32Decoder,\n getU32Encoder,\n getU64Decoder,\n getU64Encoder,\n getU8Decoder,\n getU8Encoder,\n getUtf8Decoder,\n getUtf8Encoder,\n transformEncoder,\n type Account,\n type Address,\n type Codec,\n type Decoder,\n type EncodedAccount,\n type Encoder,\n type FetchAccountConfig,\n type FetchAccountsConfig,\n type MaybeAccount,\n type MaybeEncodedAccount,\n type Option,\n type OptionOrNullable,\n type ReadonlyUint8Array,\n} from \"@solana/kit\";\n\nexport const AUTHORIZATION_USAGE_RECORD_DISCRIMINATOR = new Uint8Array([\n 109, 102, 102, 17, 210, 84, 85, 210,\n]);\n\nexport function getAuthorizationUsageRecordDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 8).encode(\n AUTHORIZATION_USAGE_RECORD_DISCRIMINATOR,\n );\n}\n\nexport type AuthorizationUsageRecord = {\n discriminator: ReadonlyUint8Array;\n /** Authorization this usage belongs to */\n authorization: Address;\n /** Agent address */\n agent: Address;\n /** Authorized source that used this */\n authorizedSource: Address;\n /** Index at time of use */\n usageIndex: bigint;\n /** Reputation change applied */\n reputationChange: bigint;\n /** Timestamp of usage */\n usedAt: bigint;\n /** Transaction signature (for cross-reference) */\n transactionSignature: string;\n /** Additional metadata (e.g., payment details) */\n metadata: Option<string>;\n /** PDA bump */\n bump: number;\n};\n\nexport type AuthorizationUsageRecordArgs = {\n /** Authorization this usage belongs to */\n authorization: Address;\n /** Agent address */\n agent: Address;\n /** Authorized source that used this */\n authorizedSource: Address;\n /** Index at time of use */\n usageIndex: number | bigint;\n /** Reputation change applied */\n reputationChange: number | bigint;\n /** Timestamp of usage */\n usedAt: number | bigint;\n /** Transaction signature (for cross-reference) */\n transactionSignature: string;\n /** Additional metadata (e.g., payment details) */\n metadata: OptionOrNullable<string>;\n /** PDA bump */\n bump: number;\n};\n\n/** Gets the encoder for {@link AuthorizationUsageRecordArgs} account data. */\nexport function getAuthorizationUsageRecordEncoder(): Encoder<AuthorizationUsageRecordArgs> {\n return transformEncoder(\n getStructEncoder([\n [\"discriminator\", fixEncoderSize(getBytesEncoder(), 8)],\n [\"authorization\", getAddressEncoder()],\n [\"agent\", getAddressEncoder()],\n [\"authorizedSource\", getAddressEncoder()],\n [\"usageIndex\", getU64Encoder()],\n [\"reputationChange\", getI64Encoder()],\n [\"usedAt\", getI64Encoder()],\n [\n \"transactionSignature\",\n addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder()),\n ],\n [\n \"metadata\",\n getOptionEncoder(\n addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder()),\n ),\n ],\n [\"bump\", getU8Encoder()],\n ]),\n (value) => ({\n ...value,\n discriminator: AUTHORIZATION_USAGE_RECORD_DISCRIMINATOR,\n }),\n );\n}\n\n/** Gets the decoder for {@link AuthorizationUsageRecord} account data. */\nexport function getAuthorizationUsageRecordDecoder(): Decoder<AuthorizationUsageRecord> {\n return getStructDecoder([\n [\"discriminator\", fixDecoderSize(getBytesDecoder(), 8)],\n [\"authorization\", getAddressDecoder()],\n [\"agent\", getAddressDecoder()],\n [\"authorizedSource\", getAddressDecoder()],\n [\"usageIndex\", getU64Decoder()],\n [\"reputationChange\", getI64Decoder()],\n [\"usedAt\", getI64Decoder()],\n [\n \"transactionSignature\",\n addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder()),\n ],\n [\n \"metadata\",\n getOptionDecoder(addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())),\n ],\n [\"bump\", getU8Decoder()],\n ]);\n}\n\n/** Gets the codec for {@link AuthorizationUsageRecord} account data. */\nexport function getAuthorizationUsageRecordCodec(): Codec<\n AuthorizationUsageRecordArgs,\n AuthorizationUsageRecord\n> {\n return combineCodec(\n getAuthorizationUsageRecordEncoder(),\n getAuthorizationUsageRecordDecoder(),\n );\n}\n\nexport function decodeAuthorizationUsageRecord<\n TAddress extends string = string,\n>(\n encodedAccount: EncodedAccount<TAddress>,\n): Account<AuthorizationUsageRecord, TAddress>;\nexport function decodeAuthorizationUsageRecord<\n TAddress extends string = string,\n>(\n encodedAccount: MaybeEncodedAccount<TAddress>,\n): MaybeAccount<AuthorizationUsageRecord, TAddress>;\nexport function decodeAuthorizationUsageRecord<\n TAddress extends string = string,\n>(\n encodedAccount: EncodedAccount<TAddress> | MaybeEncodedAccount<TAddress>,\n):\n | Account<AuthorizationUsageRecord, TAddress>\n | MaybeAccount<AuthorizationUsageRecord, TAddress> {\n return decodeAccount(\n encodedAccount as MaybeEncodedAccount<TAddress>,\n getAuthorizationUsageRecordDecoder(),\n );\n}\n\nexport async function fetchAuthorizationUsageRecord<\n TAddress extends string = string,\n>(\n rpc: Parameters<typeof fetchEncodedAccount>[0],\n address: Address<TAddress>,\n config?: FetchAccountConfig,\n): Promise<Account<AuthorizationUsageRecord, TAddress>> {\n const maybeAccount = await fetchMaybeAuthorizationUsageRecord(\n rpc,\n address,\n config,\n );\n assertAccountExists(maybeAccount);\n return maybeAccount;\n}\n\nexport async function fetchMaybeAuthorizationUsageRecord<\n TAddress extends string = string,\n>(\n rpc: Parameters<typeof fetchEncodedAccount>[0],\n address: Address<TAddress>,\n config?: FetchAccountConfig,\n): Promise<MaybeAccount<AuthorizationUsageRecord, TAddress>> {\n const maybeAccount = await fetchEncodedAccount(rpc, address, config);\n return decodeAuthorizationUsageRecord(maybeAccount);\n}\n\nexport async function fetchAllAuthorizationUsageRecord(\n rpc: Parameters<typeof fetchEncodedAccounts>[0],\n addresses: Array<Address>,\n config?: FetchAccountsConfig,\n): Promise<Account<AuthorizationUsageRecord>[]> {\n const maybeAccounts = await fetchAllMaybeAuthorizationUsageRecord(\n rpc,\n addresses,\n config,\n );\n assertAccountsExist(maybeAccounts);\n return maybeAccounts;\n}\n\nexport async function fetchAllMaybeAuthorizationUsageRecord(\n rpc: Parameters<typeof fetchEncodedAccounts>[0],\n addresses: Array<Address>,\n config?: FetchAccountsConfig,\n): Promise<MaybeAccount<AuthorizationUsageRecord>[]> {\n const maybeAccounts = await fetchEncodedAccounts(rpc, addresses, config);\n return maybeAccounts.map((maybeAccount) =>\n decodeAuthorizationUsageRecord(maybeAccount),\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 assertAccountExists,\n assertAccountsExist,\n combineCodec,\n decodeAccount,\n fetchEncodedAccount,\n fetchEncodedAccounts,\n fixDecoderSize,\n fixEncoderSize,\n getBytesDecoder,\n getBytesEncoder,\n getI64Decoder,\n getI64Encoder,\n getOptionDecoder,\n getOptionEncoder,\n getStructDecoder,\n getStructEncoder,\n getU64Decoder,\n getU64Encoder,\n transformEncoder,\n type Account,\n type Address,\n type Codec,\n type Decoder,\n type EncodedAccount,\n type Encoder,\n type FetchAccountConfig,\n type FetchAccountsConfig,\n type MaybeAccount,\n type MaybeEncodedAccount,\n type Option,\n type OptionOrNullable,\n type ReadonlyUint8Array,\n} from \"@solana/kit\";\nimport {\n getReportDataDecoder,\n getReportDataEncoder,\n getReportStatusDecoder,\n getReportStatusEncoder,\n getReportTypeDecoder,\n getReportTypeEncoder,\n getSubmissionDetailsDecoder,\n getSubmissionDetailsEncoder,\n type ReportData,\n type ReportDataArgs,\n type ReportStatus,\n type ReportStatusArgs,\n type ReportType,\n type ReportTypeArgs,\n type SubmissionDetails,\n type SubmissionDetailsArgs,\n} from \"../types\";\n\nexport const COMPLIANCE_REPORT_DISCRIMINATOR = new Uint8Array([\n 75, 146, 78, 26, 130, 240, 228, 35,\n]);\n\nexport function getComplianceReportDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 8).encode(\n COMPLIANCE_REPORT_DISCRIMINATOR,\n );\n}\n\nexport type ComplianceReport = {\n discriminator: ReadonlyUint8Array;\n /** Report ID */\n reportId: bigint;\n /** Report type */\n reportType: ReportType;\n /** Generation timestamp */\n generatedAt: bigint;\n /** Reporting period start */\n periodStart: bigint;\n /** Reporting period end */\n periodEnd: bigint;\n /** Report data */\n reportData: ReportData;\n /** Digital signature for authenticity */\n signature: ReadonlyUint8Array;\n /** Report status */\n status: ReportStatus;\n /** Submission details */\n submissionDetails: Option<SubmissionDetails>;\n /** Reserved space */\n reserved: ReadonlyUint8Array;\n};\n\nexport type ComplianceReportArgs = {\n /** Report ID */\n reportId: number | bigint;\n /** Report type */\n reportType: ReportTypeArgs;\n /** Generation timestamp */\n generatedAt: number | bigint;\n /** Reporting period start */\n periodStart: number | bigint;\n /** Reporting period end */\n periodEnd: number | bigint;\n /** Report data */\n reportData: ReportDataArgs;\n /** Digital signature for authenticity */\n signature: ReadonlyUint8Array;\n /** Report status */\n status: ReportStatusArgs;\n /** Submission details */\n submissionDetails: OptionOrNullable<SubmissionDetailsArgs>;\n /** Reserved space */\n reserved: ReadonlyUint8Array;\n};\n\n/** Gets the encoder for {@link ComplianceReportArgs} account data. */\nexport function getComplianceReportEncoder(): Encoder<ComplianceReportArgs> {\n return transformEncoder(\n getStructEncoder([\n [\"discriminator\", fixEncoderSize(getBytesEncoder(), 8)],\n [\"reportId\", getU64Encoder()],\n [\"reportType\", getReportTypeEncoder()],\n [\"generatedAt\", getI64Encoder()],\n [\"periodStart\", getI64Encoder()],\n [\"periodEnd\", getI64Encoder()],\n [\"reportData\", getReportDataEncoder()],\n [\"signature\", fixEncoderSize(getBytesEncoder(), 64)],\n [\"status\", getReportStatusEncoder()],\n [\"submissionDetails\", getOptionEncoder(getSubmissionDetailsEncoder())],\n [\"reserved\", fixEncoderSize(getBytesEncoder(), 64)],\n ]),\n (value) => ({ ...value, discriminator: COMPLIANCE_REPORT_DISCRIMINATOR }),\n );\n}\n\n/** Gets the decoder for {@link ComplianceReport} account data. */\nexport function getComplianceReportDecoder(): Decoder<ComplianceReport> {\n return getStructDecoder([\n [\"discriminator\", fixDecoderSize(getBytesDecoder(), 8)],\n [\"reportId\", getU64Decoder()],\n [\"reportType\", getReportTypeDecoder()],\n [\"generatedAt\", getI64Decoder()],\n [\"periodStart\", getI64Decoder()],\n [\"periodEnd\", getI64Decoder()],\n [\"reportData\", getReportDataDecoder()],\n [\"signature\", fixDecoderSize(getBytesDecoder(), 64)],\n [\"status\", getReportStatusDecoder()],\n [\"submissionDetails\", getOptionDecoder(getSubmissionDetailsDecoder())],\n [\"reserved\", fixDecoderSize(getBytesDecoder(), 64)],\n ]);\n}\n\n/** Gets the codec for {@link ComplianceReport} account data. */\nexport function getComplianceReportCodec(): Codec<\n ComplianceReportArgs,\n ComplianceReport\n> {\n return combineCodec(\n getComplianceReportEncoder(),\n getComplianceReportDecoder(),\n );\n}\n\nexport function decodeComplianceReport<TAddress extends string = string>(\n encodedAccount: EncodedAccount<TAddress>,\n): Account<ComplianceReport, TAddress>;\nexport function decodeComplianceReport<TAddress extends string = string>(\n encodedAccount: MaybeEncodedAccount<TAddress>,\n): MaybeAccount<ComplianceReport, TAddress>;\nexport function decodeComplianceReport<TAddress extends string = string>(\n encodedAccount: EncodedAccount<TAddress> | MaybeEncodedAccount<TAddress>,\n):\n | Account<ComplianceReport, TAddress>\n | MaybeAccount<ComplianceReport, TAddress> {\n return decodeAccount(\n encodedAccount as MaybeEncodedAccount<TAddress>,\n getComplianceReportDecoder(),\n );\n}\n\nexport async function fetchComplianceReport<TAddress extends string = string>(\n rpc: Parameters<typeof fetchEncodedAccount>[0],\n address: Address<TAddress>,\n config?: FetchAccountConfig,\n): Promise<Account<ComplianceReport, TAddress>> {\n const maybeAccount = await fetchMaybeComplianceReport(rpc, address, config);\n assertAccountExists(maybeAccount);\n return maybeAccount;\n}\n\nexport async function fetchMaybeComplianceReport<\n TAddress extends string = string,\n>(\n rpc: Parameters<typeof fetchEncodedAccount>[0],\n address: Address<TAddress>,\n config?: FetchAccountConfig,\n): Promise<MaybeAccount<ComplianceReport, TAddress>> {\n const maybeAccount = await fetchEncodedAccount(rpc, address, config);\n return decodeComplianceReport(maybeAccount);\n}\n\nexport async function fetchAllComplianceReport(\n rpc: Parameters<typeof fetchEncodedAccounts>[0],\n addresses: Array<Address>,\n config?: FetchAccountsConfig,\n): Promise<Account<ComplianceReport>[]> {\n const maybeAccounts = await fetchAllMaybeComplianceReport(\n rpc,\n addresses,\n config,\n );\n assertAccountsExist(maybeAccounts);\n return maybeAccounts;\n}\n\nexport async function fetchAllMaybeComplianceReport(\n rpc: Parameters<typeof fetchEncodedAccounts>[0],\n addresses: Array<Address>,\n config?: FetchAccountsConfig,\n): Promise<MaybeAccount<ComplianceReport>[]> {\n const maybeAccounts = await fetchEncodedAccounts(rpc, addresses, config);\n return maybeAccounts.map((maybeAccount) =>\n decodeComplianceReport(maybeAccount),\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 assertAccountExists,\n assertAccountsExist,\n combineCodec,\n decodeAccount,\n fetchEncodedAccount,\n fetchEncodedAccounts,\n fixDecoderSize,\n fixEncoderSize,\n getAddressDecoder,\n getAddressEncoder,\n getBytesDecoder,\n getBytesEncoder,\n getI64Decoder,\n getI64Encoder,\n getOptionDecoder,\n getOptionEncoder,\n getStructDecoder,\n getStructEncoder,\n getU32Decoder,\n getU32Encoder,\n getU8Decoder,\n getU8Encoder,\n getUtf8Decoder,\n getUtf8Encoder,\n transformEncoder,\n type Account,\n type Address,\n type Codec,\n type Decoder,\n type EncodedAccount,\n type Encoder,\n type FetchAccountConfig,\n type FetchAccountsConfig,\n type MaybeAccount,\n type MaybeEncodedAccount,\n type Option,\n type OptionOrNullable,\n type ReadonlyUint8Array,\n} from \"@solana/kit\";\nimport {\n getCredentialStatusDecoder,\n getCredentialStatusEncoder,\n getCrossChainStatusDecoder,\n getCrossChainStatusEncoder,\n type CredentialStatus,\n type CredentialStatusArgs,\n type CrossChainStatus,\n type CrossChainStatusArgs,\n} from \"../types\";\n\nexport const CREDENTIAL_DISCRIMINATOR = new Uint8Array([\n 145, 44, 68, 220, 67, 46, 100, 135,\n]);\n\nexport function getCredentialDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 8).encode(CREDENTIAL_DISCRIMINATOR);\n}\n\nexport type Credential = {\n discriminator: ReadonlyUint8Array;\n /** Reference to the template used */\n template: Address;\n /** The subject (recipient) of the credential */\n subject: Address;\n /** The issuer who created this credential */\n issuer: Address;\n /** Unique credential ID (urn:uuid:xxx format) */\n credentialId: string;\n /**\n * SHA-256 hash of the credential subject data\n * Actual data stored off-chain (IPFS) to save space\n */\n subjectDataHash: ReadonlyUint8Array;\n /** URI to the full credential subject data (IPFS/HTTPS) */\n subjectDataUri: string;\n /** Current status */\n status: CredentialStatus;\n /**\n * Ed25519 signature of the credential for off-chain verification\n * Signs: sha256(credential_id || subject || subject_data_hash || issued_at)\n */\n signature: ReadonlyUint8Array;\n /** Issuance timestamp */\n issuedAt: bigint;\n /** Expiration timestamp (None = never expires) */\n expiresAt: Option<bigint>;\n /** Revocation timestamp (if revoked) */\n revokedAt: Option<bigint>;\n /** Cross-chain sync status */\n crossChainStatus: CrossChainStatus;\n /** Crossmint credential ID (if synced to EVM) */\n crossmintCredentialId: Option<string>;\n /** Source data reference (e.g., agent PDA, escrow PDA) */\n sourceAccount: Option<Address>;\n /** PDA bump */\n bump: number;\n};\n\nexport type CredentialArgs = {\n /** Reference to the template used */\n template: Address;\n /** The subject (recipient) of the credential */\n subject: Address;\n /** The issuer who created this credential */\n issuer: Address;\n /** Unique credential ID (urn:uuid:xxx format) */\n credentialId: string;\n /**\n * SHA-256 hash of the credential subject data\n * Actual data stored off-chain (IPFS) to save space\n */\n subjectDataHash: ReadonlyUint8Array;\n /** URI to the full credential subject data (IPFS/HTTPS) */\n subjectDataUri: string;\n /** Current status */\n status: CredentialStatusArgs;\n /**\n * Ed25519 signature of the credential for off-chain verification\n * Signs: sha256(credential_id || subject || subject_data_hash || issued_at)\n */\n signature: ReadonlyUint8Array;\n /** Issuance timestamp */\n issuedAt: number | bigint;\n /** Expiration timestamp (None = never expires) */\n expiresAt: OptionOrNullable<number | bigint>;\n /** Revocation timestamp (if revoked) */\n revokedAt: OptionOrNullable<number | bigint>;\n /** Cross-chain sync status */\n crossChainStatus: CrossChainStatusArgs;\n /** Crossmint credential ID (if synced to EVM) */\n crossmintCredentialId: OptionOrNullable<string>;\n /** Source data reference (e.g., agent PDA, escrow PDA) */\n sourceAccount: OptionOrNullable<Address>;\n /** PDA bump */\n bump: number;\n};\n\n/** Gets the encoder for {@link CredentialArgs} account data. */\nexport function getCredentialEncoder(): Encoder<CredentialArgs> {\n return transformEncoder(\n getStructEncoder([\n [\"discriminator\", fixEncoderSize(getBytesEncoder(), 8)],\n [\"template\", getAddressEncoder()],\n [\"subject\", getAddressEncoder()],\n [\"issuer\", getAddressEncoder()],\n [\"credentialId\", addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder())],\n [\"subjectDataHash\", fixEncoderSize(getBytesEncoder(), 32)],\n [\n \"subjectDataUri\",\n addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder()),\n ],\n [\"status\", getCredentialStatusEncoder()],\n [\"signature\", fixEncoderSize(getBytesEncoder(), 64)],\n [\"issuedAt\", getI64Encoder()],\n [\"expiresAt\", getOptionEncoder(getI64Encoder())],\n [\"revokedAt\", getOptionEncoder(getI64Encoder())],\n [\"crossChainStatus\", getCrossChainStatusEncoder()],\n [\n \"crossmintCredentialId\",\n getOptionEncoder(\n addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder()),\n ),\n ],\n [\"sourceAccount\", getOptionEncoder(getAddressEncoder())],\n [\"bump\", getU8Encoder()],\n ]),\n (value) => ({ ...value, discriminator: CREDENTIAL_DISCRIMINATOR }),\n );\n}\n\n/** Gets the decoder for {@link Credential} account data. */\nexport function getCredentialDecoder(): Decoder<Credential> {\n return getStructDecoder([\n [\"discriminator\", fixDecoderSize(getBytesDecoder(), 8)],\n [\"template\", getAddressDecoder()],\n [\"subject\", getAddressDecoder()],\n [\"issuer\", getAddressDecoder()],\n [\"credentialId\", addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())],\n [\"subjectDataHash\", fixDecoderSize(getBytesDecoder(), 32)],\n [\"subjectDataUri\", addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())],\n [\"status\", getCredentialStatusDecoder()],\n [\"signature\", fixDecoderSize(getBytesDecoder(), 64)],\n [\"issuedAt\", getI64Decoder()],\n [\"expiresAt\", getOptionDecoder(getI64Decoder())],\n [\"revokedAt\", getOptionDecoder(getI64Decoder())],\n [\"crossChainStatus\", getCrossChainStatusDecoder()],\n [\n \"crossmintCredentialId\",\n getOptionDecoder(addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())),\n ],\n [\"sourceAccount\", getOptionDecoder(getAddressDecoder())],\n [\"bump\", getU8Decoder()],\n ]);\n}\n\n/** Gets the codec for {@link Credential} account data. */\nexport function getCredentialCodec(): Codec<CredentialArgs, Credential> {\n return combineCodec(getCredentialEncoder(), getCredentialDecoder());\n}\n\nexport function decodeCredential<TAddress extends string = string>(\n encodedAccount: EncodedAccount<TAddress>,\n): Account<Credential, TAddress>;\nexport function decodeCredential<TAddress extends string = string>(\n encodedAccount: MaybeEncodedAccount<TAddress>,\n): MaybeAccount<Credential, TAddress>;\nexport function decodeCredential<TAddress extends string = string>(\n encodedAccount: EncodedAccount<TAddress> | MaybeEncodedAccount<TAddress>,\n): Account<Credential, TAddress> | MaybeAccount<Credential, TAddress> {\n return decodeAccount(\n encodedAccount as MaybeEncodedAccount<TAddress>,\n getCredentialDecoder(),\n );\n}\n\nexport async function fetchCredential<TAddress extends string = string>(\n rpc: Parameters<typeof fetchEncodedAccount>[0],\n address: Address<TAddress>,\n config?: FetchAccountConfig,\n): Promise<Account<Credential, TAddress>> {\n const maybeAccount = await fetchMaybeCredential(rpc, address, config);\n assertAccountExists(maybeAccount);\n return maybeAccount;\n}\n\nexport async function fetchMaybeCredential<TAddress extends string = string>(\n rpc: Parameters<typeof fetchEncodedAccount>[0],\n address: Address<TAddress>,\n config?: FetchAccountConfig,\n): Promise<MaybeAccount<Credential, TAddress>> {\n const maybeAccount = await fetchEncodedAccount(rpc, address, config);\n return decodeCredential(maybeAccount);\n}\n\nexport async function fetchAllCredential(\n rpc: Parameters<typeof fetchEncodedAccounts>[0],\n addresses: Array<Address>,\n config?: FetchAccountsConfig,\n): Promise<Account<Credential>[]> {\n const maybeAccounts = await fetchAllMaybeCredential(rpc, addresses, config);\n assertAccountsExist(maybeAccounts);\n return maybeAccounts;\n}\n\nexport async function fetchAllMaybeCredential(\n rpc: Parameters<typeof fetchEncodedAccounts>[0],\n addresses: Array<Address>,\n config?: FetchAccountsConfig,\n): Promise<MaybeAccount<Credential>[]> {\n const maybeAccounts = await fetchEncodedAccounts(rpc, addresses, config);\n return maybeAccounts.map((maybeAccount) => decodeCredential(maybeAccount));\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 assertAccountExists,\n assertAccountsExist,\n combineCodec,\n decodeAccount,\n fetchEncodedAccount,\n fetchEncodedAccounts,\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 getStructDecoder,\n getStructEncoder,\n getU32Decoder,\n getU32Encoder,\n getU64Decoder,\n getU64Encoder,\n getU8Decoder,\n getU8Encoder,\n getUtf8Decoder,\n getUtf8Encoder,\n transformEncoder,\n type Account,\n type Address,\n type Codec,\n type Decoder,\n type EncodedAccount,\n type Encoder,\n type FetchAccountConfig,\n type FetchAccountsConfig,\n type MaybeAccount,\n type MaybeEncodedAccount,\n type Option,\n type OptionOrNullable,\n type ReadonlyUint8Array,\n} from \"@solana/kit\";\n\nexport const CREDENTIAL_TEMPLATE_DISCRIMINATOR = new Uint8Array([\n 229, 129, 99, 91, 179, 207, 66, 75,\n]);\n\nexport function getCredentialTemplateDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 8).encode(\n CREDENTIAL_TEMPLATE_DISCRIMINATOR,\n );\n}\n\nexport type CredentialTemplate = {\n discriminator: ReadonlyUint8Array;\n /** Reference to the credential type */\n credentialType: Address;\n /** Name of the template */\n name: string;\n /** Image/icon URI for visual display */\n imageUri: string;\n /** Issuer authority (who can issue from this template) */\n issuer: Address;\n /** Whether template is active */\n isActive: boolean;\n /** Total issued from this template */\n totalIssued: bigint;\n /** Creation timestamp */\n createdAt: bigint;\n /** Corresponding Crossmint template ID (for EVM sync) */\n crossmintTemplateId: Option<string>;\n /** PDA bump */\n bump: number;\n};\n\nexport type CredentialTemplateArgs = {\n /** Reference to the credential type */\n credentialType: Address;\n /** Name of the template */\n name: string;\n /** Image/icon URI for visual display */\n imageUri: string;\n /** Issuer authority (who can issue from this template) */\n issuer: Address;\n /** Whether template is active */\n isActive: boolean;\n /** Total issued from this template */\n totalIssued: number | bigint;\n /** Creation timestamp */\n createdAt: number | bigint;\n /** Corresponding Crossmint template ID (for EVM sync) */\n crossmintTemplateId: OptionOrNullable<string>;\n /** PDA bump */\n bump: number;\n};\n\n/** Gets the encoder for {@link CredentialTemplateArgs} account data. */\nexport function getCredentialTemplateEncoder(): Encoder<CredentialTemplateArgs> {\n return transformEncoder(\n getStructEncoder([\n [\"discriminator\", fixEncoderSize(getBytesEncoder(), 8)],\n [\"credentialType\", getAddressEncoder()],\n [\"name\", addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder())],\n [\"imageUri\", addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder())],\n [\"issuer\", getAddressEncoder()],\n [\"isActive\", getBooleanEncoder()],\n [\"totalIssued\", getU64Encoder()],\n [\"createdAt\", getI64Encoder()],\n [\n \"crossmintTemplateId\",\n getOptionEncoder(\n addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder()),\n ),\n ],\n [\"bump\", getU8Encoder()],\n ]),\n (value) => ({ ...value, discriminator: CREDENTIAL_TEMPLATE_DISCRIMINATOR }),\n );\n}\n\n/** Gets the decoder for {@link CredentialTemplate} account data. */\nexport function getCredentialTemplateDecoder(): Decoder<CredentialTemplate> {\n return getStructDecoder([\n [\"discriminator\", fixDecoderSize(getBytesDecoder(), 8)],\n [\"credentialType\", getAddressDecoder()],\n [\"name\", addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())],\n [\"imageUri\", addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())],\n [\"issuer\", getAddressDecoder()],\n [\"isActive\", getBooleanDecoder()],\n [\"totalIssued\", getU64Decoder()],\n [\"createdAt\", getI64Decoder()],\n [\n \"crossmintTemplateId\",\n getOptionDecoder(addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())),\n ],\n [\"bump\", getU8Decoder()],\n ]);\n}\n\n/** Gets the codec for {@link CredentialTemplate} account data. */\nexport function getCredentialTemplateCodec(): Codec<\n CredentialTemplateArgs,\n CredentialTemplate\n> {\n return combineCodec(\n getCredentialTemplateEncoder(),\n getCredentialTemplateDecoder(),\n );\n}\n\nexport function decodeCredentialTemplate<TAddress extends string = string>(\n encodedAccount: EncodedAccount<TAddress>,\n): Account<CredentialTemplate, TAddress>;\nexport function decodeCredentialTemplate<TAddress extends string = string>(\n encodedAccount: MaybeEncodedAccount<TAddress>,\n): MaybeAccount<CredentialTemplate, TAddress>;\nexport function decodeCredentialTemplate<TAddress extends string = string>(\n encodedAccount: EncodedAccount<TAddress> | MaybeEncodedAccount<TAddress>,\n):\n | Account<CredentialTemplate, TAddress>\n | MaybeAccount<CredentialTemplate, TAddress> {\n return decodeAccount(\n encodedAccount as MaybeEncodedAccount<TAddress>,\n getCredentialTemplateDecoder(),\n );\n}\n\nexport async function fetchCredentialTemplate<TAddress extends string = string>(\n rpc: Parameters<typeof fetchEncodedAccount>[0],\n address: Address<TAddress>,\n config?: FetchAccountConfig,\n): Promise<Account<CredentialTemplate, TAddress>> {\n const maybeAccount = await fetchMaybeCredentialTemplate(rpc, address, config);\n assertAccountExists(maybeAccount);\n return maybeAccount;\n}\n\nexport async function fetchMaybeCredentialTemplate<\n TAddress extends string = string,\n>(\n rpc: Parameters<typeof fetchEncodedAccount>[0],\n address: Address<TAddress>,\n config?: FetchAccountConfig,\n): Promise<MaybeAccount<CredentialTemplate, TAddress>> {\n const maybeAccount = await fetchEncodedAccount(rpc, address, config);\n return decodeCredentialTemplate(maybeAccount);\n}\n\nexport async function fetchAllCredentialTemplate(\n rpc: Parameters<typeof fetchEncodedAccounts>[0],\n addresses: Array<Address>,\n config?: FetchAccountsConfig,\n): Promise<Account<CredentialTemplate>[]> {\n const maybeAccounts = await fetchAllMaybeCredentialTemplate(\n rpc,\n addresses,\n config,\n );\n assertAccountsExist(maybeAccounts);\n return maybeAccounts;\n}\n\nexport async function fetchAllMaybeCredentialTemplate(\n rpc: Parameters<typeof fetchEncodedAccounts>[0],\n addresses: Array<Address>,\n config?: FetchAccountsConfig,\n): Promise<MaybeAccount<CredentialTemplate>[]> {\n const maybeAccounts = await fetchEncodedAccounts(rpc, addresses, config);\n return maybeAccounts.map((maybeAccount) =>\n decodeCredentialTemplate(maybeAccount),\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 assertAccountExists,\n assertAccountsExist,\n combineCodec,\n decodeAccount,\n fetchEncodedAccount,\n fetchEncodedAccounts,\n fixDecoderSize,\n fixEncoderSize,\n getAddressDecoder,\n getAddressEncoder,\n getBooleanDecoder,\n getBooleanEncoder,\n getBytesDecoder,\n getBytesEncoder,\n getI64Decoder,\n getI64Encoder,\n getStructDecoder,\n getStructEncoder,\n getU32Decoder,\n getU32Encoder,\n getU64Decoder,\n getU64Encoder,\n getU8Decoder,\n getU8Encoder,\n getUtf8Decoder,\n getUtf8Encoder,\n transformEncoder,\n type Account,\n type Address,\n type Codec,\n type Decoder,\n type EncodedAccount,\n type Encoder,\n type FetchAccountConfig,\n type FetchAccountsConfig,\n type MaybeAccount,\n type MaybeEncodedAccount,\n type ReadonlyUint8Array,\n} from \"@solana/kit\";\nimport {\n getCredentialKindDecoder,\n getCredentialKindEncoder,\n type CredentialKind,\n type CredentialKindArgs,\n} from \"../types\";\n\nexport const CREDENTIAL_TYPE_DISCRIMINATOR = new Uint8Array([\n 132, 171, 20, 181, 39, 219, 217, 112,\n]);\n\nexport function getCredentialTypeDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 8).encode(\n CREDENTIAL_TYPE_DISCRIMINATOR,\n );\n}\n\nexport type CredentialType = {\n discriminator: ReadonlyUint8Array;\n /** Authority that can manage this type (governance/multisig) */\n authority: Address;\n /** Unique name for this credential type */\n name: string;\n /** The kind of credential (built-in or custom) */\n kind: CredentialKind;\n /** URI to the JSON-LD schema (IPFS or HTTPS) */\n schemaUri: string;\n /** Human-readable description */\n description: string;\n /** Whether this type is active (can issue new credentials) */\n isActive: boolean;\n /** Total credentials issued of this type */\n totalIssued: bigint;\n /** Creation timestamp */\n createdAt: bigint;\n /** PDA bump */\n bump: number;\n};\n\nexport type CredentialTypeArgs = {\n /** Authority that can manage this type (governance/multisig) */\n authority: Address;\n /** Unique name for this credential type */\n name: string;\n /** The kind of credential (built-in or custom) */\n kind: CredentialKindArgs;\n /** URI to the JSON-LD schema (IPFS or HTTPS) */\n schemaUri: string;\n /** Human-readable description */\n description: string;\n /** Whether this type is active (can issue new credentials) */\n isActive: boolean;\n /** Total credentials issued of this type */\n totalIssued: number | bigint;\n /** Creation timestamp */\n createdAt: number | bigint;\n /** PDA bump */\n bump: number;\n};\n\n/** Gets the encoder for {@link CredentialTypeArgs} account data. */\nexport function getCredentialTypeEncoder(): Encoder<CredentialTypeArgs> {\n return transformEncoder(\n getStructEncoder([\n [\"discriminator\", fixEncoderSize(getBytesEncoder(), 8)],\n [\"authority\", getAddressEncoder()],\n [\"name\", addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder())],\n [\"kind\", getCredentialKindEncoder()],\n [\"schemaUri\", addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder())],\n [\"description\", addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder())],\n [\"isActive\", getBooleanEncoder()],\n [\"totalIssued\", getU64Encoder()],\n [\"createdAt\", getI64Encoder()],\n [\"bump\", getU8Encoder()],\n ]),\n (value) => ({ ...value, discriminator: CREDENTIAL_TYPE_DISCRIMINATOR }),\n );\n}\n\n/** Gets the decoder for {@link CredentialType} account data. */\nexport function getCredentialTypeDecoder(): Decoder<CredentialType> {\n return getStructDecoder([\n [\"discriminator\", fixDecoderSize(getBytesDecoder(), 8)],\n [\"authority\", getAddressDecoder()],\n [\"name\", addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())],\n [\"kind\", getCredentialKindDecoder()],\n [\"schemaUri\", addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())],\n [\"description\", addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())],\n [\"isActive\", getBooleanDecoder()],\n [\"totalIssued\", getU64Decoder()],\n [\"createdAt\", getI64Decoder()],\n [\"bump\", getU8Decoder()],\n ]);\n}\n\n/** Gets the codec for {@link CredentialType} account data. */\nexport function getCredentialTypeCodec(): Codec<\n CredentialTypeArgs,\n CredentialType\n> {\n return combineCodec(getCredentialTypeEncoder(), getCredentialTypeDecoder());\n}\n\nexport function decodeCredentialType<TAddress extends string = string>(\n encodedAccount: EncodedAccount<TAddress>,\n): Account<CredentialType, TAddress>;\nexport function decodeCredentialType<TAddress extends string = string>(\n encodedAccount: MaybeEncodedAccount<TAddress>,\n): MaybeAccount<CredentialType, TAddress>;\nexport function decodeCredentialType<TAddress extends string = string>(\n encodedAccount: EncodedAccount<TAddress> | MaybeEncodedAccount<TAddress>,\n): Account<CredentialType, TAddress> | MaybeAccount<CredentialType, TAddress> {\n return decodeAccount(\n encodedAccount as MaybeEncodedAccount<TAddress>,\n getCredentialTypeDecoder(),\n );\n}\n\nexport async function fetchCredentialType<TAddress extends string = string>(\n rpc: Parameters<typeof fetchEncodedAccount>[0],\n address: Address<TAddress>,\n config?: FetchAccountConfig,\n): Promise<Account<CredentialType, TAddress>> {\n const maybeAccount = await fetchMaybeCredentialType(rpc, address, config);\n assertAccountExists(maybeAccount);\n return maybeAccount;\n}\n\nexport async function fetchMaybeCredentialType<\n TAddress extends string = string,\n>(\n rpc: Parameters<typeof fetchEncodedAccount>[0],\n address: Address<TAddress>,\n config?: FetchAccountConfig,\n): Promise<MaybeAccount<CredentialType, TAddress>> {\n const maybeAccount = await fetchEncodedAccount(rpc, address, config);\n return decodeCredentialType(maybeAccount);\n}\n\nexport async function fetchAllCredentialType(\n rpc: Parameters<typeof fetchEncodedAccounts>[0],\n addresses: Array<Address>,\n config?: FetchAccountsConfig,\n): Promise<Account<CredentialType>[]> {\n const maybeAccounts = await fetchAllMaybeCredentialType(\n rpc,\n addresses,\n config,\n );\n assertAccountsExist(maybeAccounts);\n return maybeAccounts;\n}\n\nexport async function fetchAllMaybeCredentialType(\n rpc: Parameters<typeof fetchEncodedAccounts>[0],\n addresses: Array<Address>,\n config?: FetchAccountsConfig,\n): Promise<MaybeAccount<CredentialType>[]> {\n const maybeAccounts = await fetchEncodedAccounts(rpc, addresses, config);\n return maybeAccounts.map((maybeAccount) =>\n decodeCredentialType(maybeAccount),\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 assertAccountExists,\n assertAccountsExist,\n combineCodec,\n decodeAccount,\n fetchEncodedAccount,\n fetchEncodedAccounts,\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 getStructDecoder,\n getStructEncoder,\n getU32Decoder,\n getU32Encoder,\n getU8Decoder,\n getU8Encoder,\n getUtf8Decoder,\n getUtf8Encoder,\n transformEncoder,\n type Account,\n type Address,\n type Codec,\n type Decoder,\n type EncodedAccount,\n type Encoder,\n type FetchAccountConfig,\n type FetchAccountsConfig,\n type MaybeAccount,\n type MaybeEncodedAccount,\n type Option,\n type OptionOrNullable,\n type ReadonlyUint8Array,\n} from \"@solana/kit\";\nimport {\n getServiceEndpointDecoder,\n getServiceEndpointEncoder,\n getVerificationMethodDecoder,\n getVerificationMethodEncoder,\n type ServiceEndpoint,\n type ServiceEndpointArgs,\n type VerificationMethod,\n type VerificationMethodArgs,\n} from \"../types\";\n\nexport const DID_DOCUMENT_DISCRIMINATOR = new Uint8Array([\n 109, 220, 168, 224, 33, 173, 192, 166,\n]);\n\nexport function getDidDocumentDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 8).encode(\n DID_DOCUMENT_DISCRIMINATOR,\n );\n}\n\nexport type DidDocument = {\n discriminator: ReadonlyUint8Array;\n /** The DID string (e.g., \"did:sol:devnet:HN7cABqLq46Es1jh92dQQisAq662SmxELLLsHHe4YWrH\") */\n did: string;\n /** Controller of the DID (can update the document) */\n controller: Address;\n /** Verification methods (public keys) */\n verificationMethods: Array<VerificationMethod>;\n /** Service endpoints */\n serviceEndpoints: Array<ServiceEndpoint>;\n /** Context URIs (for W3C compatibility) */\n context: Array<string>;\n /** Also known as (alternative DIDs) */\n alsoKnownAs: Array<string>;\n /** DID document creation timestamp */\n createdAt: bigint;\n /** Last update timestamp */\n updatedAt: bigint;\n /** Version number (incremented on each update) */\n version: number;\n /** Deactivated flag */\n deactivated: boolean;\n /** Deactivation timestamp (if deactivated) */\n deactivatedAt: Option<bigint>;\n /** PDA bump */\n bump: number;\n};\n\nexport type DidDocumentArgs = {\n /** The DID string (e.g., \"did:sol:devnet:HN7cABqLq46Es1jh92dQQisAq662SmxELLLsHHe4YWrH\") */\n did: string;\n /** Controller of the DID (can update the document) */\n controller: Address;\n /** Verification methods (public keys) */\n verificationMethods: Array<VerificationMethodArgs>;\n /** Service endpoints */\n serviceEndpoints: Array<ServiceEndpointArgs>;\n /** Context URIs (for W3C compatibility) */\n context: Array<string>;\n /** Also known as (alternative DIDs) */\n alsoKnownAs: Array<string>;\n /** DID document creation timestamp */\n createdAt: number | bigint;\n /** Last update timestamp */\n updatedAt: number | bigint;\n /** Version number (incremented on each update) */\n version: number;\n /** Deactivated flag */\n deactivated: boolean;\n /** Deactivation timestamp (if deactivated) */\n deactivatedAt: OptionOrNullable<number | bigint>;\n /** PDA bump */\n bump: number;\n};\n\n/** Gets the encoder for {@link DidDocumentArgs} account data. */\nexport function getDidDocumentEncoder(): Encoder<DidDocumentArgs> {\n return transformEncoder(\n getStructEncoder([\n [\"discriminator\", fixEncoderSize(getBytesEncoder(), 8)],\n [\"did\", addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder())],\n [\"controller\", getAddressEncoder()],\n [\"verificationMethods\", getArrayEncoder(getVerificationMethodEncoder())],\n [\"serviceEndpoints\", getArrayEncoder(getServiceEndpointEncoder())],\n [\n \"context\",\n getArrayEncoder(\n addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder()),\n ),\n ],\n [\n \"alsoKnownAs\",\n getArrayEncoder(\n addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder()),\n ),\n ],\n [\"createdAt\", getI64Encoder()],\n [\"updatedAt\", getI64Encoder()],\n [\"version\", getU32Encoder()],\n [\"deactivated\", getBooleanEncoder()],\n [\"deactivatedAt\", getOptionEncoder(getI64Encoder())],\n [\"bump\", getU8Encoder()],\n ]),\n (value) => ({ ...value, discriminator: DID_DOCUMENT_DISCRIMINATOR }),\n );\n}\n\n/** Gets the decoder for {@link DidDocument} account data. */\nexport function getDidDocumentDecoder(): Decoder<DidDocument> {\n return getStructDecoder([\n [\"discriminator\", fixDecoderSize(getBytesDecoder(), 8)],\n [\"did\", addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())],\n [\"controller\", getAddressDecoder()],\n [\"verificationMethods\", getArrayDecoder(getVerificationMethodDecoder())],\n [\"serviceEndpoints\", getArrayDecoder(getServiceEndpointDecoder())],\n [\n \"context\",\n getArrayDecoder(addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())),\n ],\n [\n \"alsoKnownAs\",\n getArrayDecoder(addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())),\n ],\n [\"createdAt\", getI64Decoder()],\n [\"updatedAt\", getI64Decoder()],\n [\"version\", getU32Decoder()],\n [\"deactivated\", getBooleanDecoder()],\n [\"deactivatedAt\", getOptionDecoder(getI64Decoder())],\n [\"bump\", getU8Decoder()],\n ]);\n}\n\n/** Gets the codec for {@link DidDocument} account data. */\nexport function getDidDocumentCodec(): Codec<DidDocumentArgs, DidDocument> {\n return combineCodec(getDidDocumentEncoder(), getDidDocumentDecoder());\n}\n\nexport function decodeDidDocument<TAddress extends string = string>(\n encodedAccount: EncodedAccount<TAddress>,\n): Account<DidDocument, TAddress>;\nexport function decodeDidDocument<TAddress extends string = string>(\n encodedAccount: MaybeEncodedAccount<TAddress>,\n): MaybeAccount<DidDocument, TAddress>;\nexport function decodeDidDocument<TAddress extends string = string>(\n encodedAccount: EncodedAccount<TAddress> | MaybeEncodedAccount<TAddress>,\n): Account<DidDocument, TAddress> | MaybeAccount<DidDocument, TAddress> {\n return decodeAccount(\n encodedAccount as MaybeEncodedAccount<TAddress>,\n getDidDocumentDecoder(),\n );\n}\n\nexport async function fetchDidDocument<TAddress extends string = string>(\n rpc: Parameters<typeof fetchEncodedAccount>[0],\n address: Address<TAddress>,\n config?: FetchAccountConfig,\n): Promise<Account<DidDocument, TAddress>> {\n const maybeAccount = await fetchMaybeDidDocument(rpc, address, config);\n assertAccountExists(maybeAccount);\n return maybeAccount;\n}\n\nexport async function fetchMaybeDidDocument<TAddress extends string = string>(\n rpc: Parameters<typeof fetchEncodedAccount>[0],\n address: Address<TAddress>,\n config?: FetchAccountConfig,\n): Promise<MaybeAccount<DidDocument, TAddress>> {\n const maybeAccount = await fetchEncodedAccount(rpc, address, config);\n return decodeDidDocument(maybeAccount);\n}\n\nexport async function fetchAllDidDocument(\n rpc: Parameters<typeof fetchEncodedAccounts>[0],\n addresses: Array<Address>,\n config?: FetchAccountsConfig,\n): Promise<Account<DidDocument>[]> {\n const maybeAccounts = await fetchAllMaybeDidDocument(rpc, addresses, config);\n assertAccountsExist(maybeAccounts);\n return maybeAccounts;\n}\n\nexport async function fetchAllMaybeDidDocument(\n rpc: Parameters<typeof fetchEncodedAccounts>[0],\n addresses: Array<Address>,\n config?: FetchAccountsConfig,\n): Promise<MaybeAccount<DidDocument>[]> {\n const maybeAccounts = await fetchEncodedAccounts(rpc, addresses, config);\n return maybeAccounts.map((maybeAccount) => decodeDidDocument(maybeAccount));\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 assertAccountExists,\n assertAccountsExist,\n combineCodec,\n decodeAccount,\n fetchEncodedAccount,\n fetchEncodedAccounts,\n fixDecoderSize,\n fixEncoderSize,\n getAddressDecoder,\n getAddressEncoder,\n getBytesDecoder,\n getBytesEncoder,\n getI64Decoder,\n getI64Encoder,\n getOptionDecoder,\n getOptionEncoder,\n getStructDecoder,\n getStructEncoder,\n getU32Decoder,\n getU32Encoder,\n getU64Decoder,\n getU64Encoder,\n getU8Decoder,\n getU8Encoder,\n getUtf8Decoder,\n getUtf8Encoder,\n transformEncoder,\n type Account,\n type Address,\n type Codec,\n type Decoder,\n type EncodedAccount,\n type Encoder,\n type FetchAccountConfig,\n type FetchAccountsConfig,\n type MaybeAccount,\n type MaybeEncodedAccount,\n type Option,\n type OptionOrNullable,\n type ReadonlyUint8Array,\n} from \"@solana/kit\";\nimport {\n getArbitratorDecisionDecoder,\n getArbitratorDecisionEncoder,\n getEscrowStatusDecoder,\n getEscrowStatusEncoder,\n type ArbitratorDecision,\n type ArbitratorDecisionArgs,\n type EscrowStatus,\n type EscrowStatusArgs,\n} from \"../types\";\n\nexport const GHOST_PROTECT_ESCROW_DISCRIMINATOR = new Uint8Array([\n 38, 0, 98, 160, 102, 4, 51, 160,\n]);\n\nexport function getGhostProtectEscrowDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 8).encode(\n GHOST_PROTECT_ESCROW_DISCRIMINATOR,\n );\n}\n\nexport type GhostProtectEscrow = {\n discriminator: ReadonlyUint8Array;\n /** Unique escrow ID */\n escrowId: bigint;\n /** Client (payer) */\n client: Address;\n /** Agent (service provider) */\n agent: Address;\n /** Payment amount */\n amount: bigint;\n /** Payment token mint */\n tokenMint: Address;\n /** Escrow status */\n status: EscrowStatus;\n /** Job description (IPFS hash) */\n jobDescription: string;\n /** Delivery proof (IPFS hash) */\n deliveryProof: Option<string>;\n /** Deadline timestamp */\n deadline: bigint;\n /** Created timestamp */\n createdAt: bigint;\n /** Completed/disputed timestamp */\n completedAt: Option<bigint>;\n /** Dispute reason (if disputed) */\n disputeReason: Option<string>;\n /** Arbitrator decision (if disputed) */\n arbitratorDecision: Option<ArbitratorDecision>;\n bump: number;\n};\n\nexport type GhostProtectEscrowArgs = {\n /** Unique escrow ID */\n escrowId: number | bigint;\n /** Client (payer) */\n client: Address;\n /** Agent (service provider) */\n agent: Address;\n /** Payment amount */\n amount: number | bigint;\n /** Payment token mint */\n tokenMint: Address;\n /** Escrow status */\n status: EscrowStatusArgs;\n /** Job description (IPFS hash) */\n jobDescription: string;\n /** Delivery proof (IPFS hash) */\n deliveryProof: OptionOrNullable<string>;\n /** Deadline timestamp */\n deadline: number | bigint;\n /** Created timestamp */\n createdAt: number | bigint;\n /** Completed/disputed timestamp */\n completedAt: OptionOrNullable<number | bigint>;\n /** Dispute reason (if disputed) */\n disputeReason: OptionOrNullable<string>;\n /** Arbitrator decision (if disputed) */\n arbitratorDecision: OptionOrNullable<ArbitratorDecisionArgs>;\n bump: number;\n};\n\n/** Gets the encoder for {@link GhostProtectEscrowArgs} account data. */\nexport function getGhostProtectEscrowEncoder(): Encoder<GhostProtectEscrowArgs> {\n return transformEncoder(\n getStructEncoder([\n [\"discriminator\", fixEncoderSize(getBytesEncoder(), 8)],\n [\"escrowId\", getU64Encoder()],\n [\"client\", getAddressEncoder()],\n [\"agent\", getAddressEncoder()],\n [\"amount\", getU64Encoder()],\n [\"tokenMint\", getAddressEncoder()],\n [\"status\", getEscrowStatusEncoder()],\n [\n \"jobDescription\",\n addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder()),\n ],\n [\n \"deliveryProof\",\n getOptionEncoder(\n addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder()),\n ),\n ],\n [\"deadline\", getI64Encoder()],\n [\"createdAt\", getI64Encoder()],\n [\"completedAt\", getOptionEncoder(getI64Encoder())],\n [\n \"disputeReason\",\n getOptionEncoder(\n addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder()),\n ),\n ],\n [\"arbitratorDecision\", getOptionEncoder(getArbitratorDecisionEncoder())],\n [\"bump\", getU8Encoder()],\n ]),\n (value) => ({\n ...value,\n discriminator: GHOST_PROTECT_ESCROW_DISCRIMINATOR,\n }),\n );\n}\n\n/** Gets the decoder for {@link GhostProtectEscrow} account data. */\nexport function getGhostProtectEscrowDecoder(): Decoder<GhostProtectEscrow> {\n return getStructDecoder([\n [\"discriminator\", fixDecoderSize(getBytesDecoder(), 8)],\n [\"escrowId\", getU64Decoder()],\n [\"client\", getAddressDecoder()],\n [\"agent\", getAddressDecoder()],\n [\"amount\", getU64Decoder()],\n [\"tokenMint\", getAddressDecoder()],\n [\"status\", getEscrowStatusDecoder()],\n [\"jobDescription\", addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())],\n [\n \"deliveryProof\",\n getOptionDecoder(addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())),\n ],\n [\"deadline\", getI64Decoder()],\n [\"createdAt\", getI64Decoder()],\n [\"completedAt\", getOptionDecoder(getI64Decoder())],\n [\n \"disputeReason\",\n getOptionDecoder(addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())),\n ],\n [\"arbitratorDecision\", getOptionDecoder(getArbitratorDecisionDecoder())],\n [\"bump\", getU8Decoder()],\n ]);\n}\n\n/** Gets the codec for {@link GhostProtectEscrow} account data. */\nexport function getGhostProtectEscrowCodec(): Codec<\n GhostProtectEscrowArgs,\n GhostProtectEscrow\n> {\n return combineCodec(\n getGhostProtectEscrowEncoder(),\n getGhostProtectEscrowDecoder(),\n );\n}\n\nexport function decodeGhostProtectEscrow<TAddress extends string = string>(\n encodedAccount: EncodedAccount<TAddress>,\n): Account<GhostProtectEscrow, TAddress>;\nexport function decodeGhostProtectEscrow<TAddress extends string = string>(\n encodedAccount: MaybeEncodedAccount<TAddress>,\n): MaybeAccount<GhostProtectEscrow, TAddress>;\nexport function decodeGhostProtectEscrow<TAddress extends string = string>(\n encodedAccount: EncodedAccount<TAddress> | MaybeEncodedAccount<TAddress>,\n):\n | Account<GhostProtectEscrow, TAddress>\n | MaybeAccount<GhostProtectEscrow, TAddress> {\n return decodeAccount(\n encodedAccount as MaybeEncodedAccount<TAddress>,\n getGhostProtectEscrowDecoder(),\n );\n}\n\nexport async function fetchGhostProtectEscrow<TAddress extends string = string>(\n rpc: Parameters<typeof fetchEncodedAccount>[0],\n address: Address<TAddress>,\n config?: FetchAccountConfig,\n): Promise<Account<GhostProtectEscrow, TAddress>> {\n const maybeAccount = await fetchMaybeGhostProtectEscrow(rpc, address, config);\n assertAccountExists(maybeAccount);\n return maybeAccount;\n}\n\nexport async function fetchMaybeGhostProtectEscrow<\n TAddress extends string = string,\n>(\n rpc: Parameters<typeof fetchEncodedAccount>[0],\n address: Address<TAddress>,\n config?: FetchAccountConfig,\n): Promise<MaybeAccount<GhostProtectEscrow, TAddress>> {\n const maybeAccount = await fetchEncodedAccount(rpc, address, config);\n return decodeGhostProtectEscrow(maybeAccount);\n}\n\nexport async function fetchAllGhostProtectEscrow(\n rpc: Parameters<typeof fetchEncodedAccounts>[0],\n addresses: Array<Address>,\n config?: FetchAccountsConfig,\n): Promise<Account<GhostProtectEscrow>[]> {\n const maybeAccounts = await fetchAllMaybeGhostProtectEscrow(\n rpc,\n addresses,\n config,\n );\n assertAccountsExist(maybeAccounts);\n return maybeAccounts;\n}\n\nexport async function fetchAllMaybeGhostProtectEscrow(\n rpc: Parameters<typeof fetchEncodedAccounts>[0],\n addresses: Array<Address>,\n config?: FetchAccountsConfig,\n): Promise<MaybeAccount<GhostProtectEscrow>[]> {\n const maybeAccounts = await fetchEncodedAccounts(rpc, addresses, config);\n return maybeAccounts.map((maybeAccount) =>\n decodeGhostProtectEscrow(maybeAccount),\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 assertAccountExists,\n assertAccountsExist,\n combineCodec,\n decodeAccount,\n fetchEncodedAccount,\n fetchEncodedAccounts,\n fixDecoderSize,\n fixEncoderSize,\n getAddressDecoder,\n getAddressEncoder,\n getBytesDecoder,\n getBytesEncoder,\n getI64Decoder,\n getI64Encoder,\n getOptionDecoder,\n getOptionEncoder,\n getStructDecoder,\n getStructEncoder,\n getU32Decoder,\n getU32Encoder,\n getU64Decoder,\n getU64Encoder,\n getUtf8Decoder,\n getUtf8Encoder,\n transformEncoder,\n type Account,\n type Address,\n type Codec,\n type Decoder,\n type EncodedAccount,\n type Encoder,\n type FetchAccountConfig,\n type FetchAccountsConfig,\n type MaybeAccount,\n type MaybeEncodedAccount,\n type Option,\n type OptionOrNullable,\n type ReadonlyUint8Array,\n} from \"@solana/kit\";\nimport {\n getExecutionParamsDecoder,\n getExecutionParamsEncoder,\n getProposalMetadataDecoder,\n getProposalMetadataEncoder,\n getProposalStatusDecoder,\n getProposalStatusEncoder,\n getProposalTypeDecoder,\n getProposalTypeEncoder,\n getQuorumRequirementsDecoder,\n getQuorumRequirementsEncoder,\n getVotingResultsDecoder,\n getVotingResultsEncoder,\n type ExecutionParams,\n type ExecutionParamsArgs,\n type ProposalMetadata,\n type ProposalMetadataArgs,\n type ProposalStatus,\n type ProposalStatusArgs,\n type ProposalType,\n type ProposalTypeArgs,\n type QuorumRequirements,\n type QuorumRequirementsArgs,\n type VotingResults,\n type VotingResultsArgs,\n} from \"../types\";\n\nexport const GOVERNANCE_PROPOSAL_DISCRIMINATOR = new Uint8Array([\n 53, 107, 240, 190, 43, 73, 65, 143,\n]);\n\nexport function getGovernanceProposalDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 8).encode(\n GOVERNANCE_PROPOSAL_DISCRIMINATOR,\n );\n}\n\nexport type GovernanceProposal = {\n discriminator: ReadonlyUint8Array;\n /** Proposal ID */\n proposalId: bigint;\n /** Proposer */\n proposer: Address;\n /** Proposal title */\n title: string;\n /** Proposal description */\n description: string;\n /** Proposal type */\n proposalType: ProposalType;\n /** Creation timestamp */\n createdAt: bigint;\n /** Voting start timestamp */\n votingStartsAt: bigint;\n /** Voting end timestamp */\n votingEndsAt: bigint;\n /** Execution timestamp (if approved) */\n executionTimestamp: Option<bigint>;\n /** Proposal status */\n status: ProposalStatus;\n /** Voting results */\n votingResults: VotingResults;\n /** Execution parameters */\n executionParams: ExecutionParams;\n /** Quorum requirements */\n quorumRequirements: QuorumRequirements;\n /** Proposal metadata */\n metadata: ProposalMetadata;\n /** Reserved space */\n reserved: ReadonlyUint8Array;\n};\n\nexport type GovernanceProposalArgs = {\n /** Proposal ID */\n proposalId: number | bigint;\n /** Proposer */\n proposer: Address;\n /** Proposal title */\n title: string;\n /** Proposal description */\n description: string;\n /** Proposal type */\n proposalType: ProposalTypeArgs;\n /** Creation timestamp */\n createdAt: number | bigint;\n /** Voting start timestamp */\n votingStartsAt: number | bigint;\n /** Voting end timestamp */\n votingEndsAt: number | bigint;\n /** Execution timestamp (if approved) */\n executionTimestamp: OptionOrNullable<number | bigint>;\n /** Proposal status */\n status: ProposalStatusArgs;\n /** Voting results */\n votingResults: VotingResultsArgs;\n /** Execution parameters */\n executionParams: ExecutionParamsArgs;\n /** Quorum requirements */\n quorumRequirements: QuorumRequirementsArgs;\n /** Proposal metadata */\n metadata: ProposalMetadataArgs;\n /** Reserved space */\n reserved: ReadonlyUint8Array;\n};\n\n/** Gets the encoder for {@link GovernanceProposalArgs} account data. */\nexport function getGovernanceProposalEncoder(): Encoder<GovernanceProposalArgs> {\n return transformEncoder(\n getStructEncoder([\n [\"discriminator\", fixEncoderSize(getBytesEncoder(), 8)],\n [\"proposalId\", getU64Encoder()],\n [\"proposer\", getAddressEncoder()],\n [\"title\", addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder())],\n [\"description\", addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder())],\n [\"proposalType\", getProposalTypeEncoder()],\n [\"createdAt\", getI64Encoder()],\n [\"votingStartsAt\", getI64Encoder()],\n [\"votingEndsAt\", getI64Encoder()],\n [\"executionTimestamp\", getOptionEncoder(getI64Encoder())],\n [\"status\", getProposalStatusEncoder()],\n [\"votingResults\", getVotingResultsEncoder()],\n [\"executionParams\", getExecutionParamsEncoder()],\n [\"quorumRequirements\", getQuorumRequirementsEncoder()],\n [\"metadata\", getProposalMetadataEncoder()],\n [\"reserved\", fixEncoderSize(getBytesEncoder(), 64)],\n ]),\n (value) => ({ ...value, discriminator: GOVERNANCE_PROPOSAL_DISCRIMINATOR }),\n );\n}\n\n/** Gets the decoder for {@link GovernanceProposal} account data. */\nexport function getGovernanceProposalDecoder(): Decoder<GovernanceProposal> {\n return getStructDecoder([\n [\"discriminator\", fixDecoderSize(getBytesDecoder(), 8)],\n [\"proposalId\", getU64Decoder()],\n [\"proposer\", getAddressDecoder()],\n [\"title\", addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())],\n [\"description\", addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())],\n [\"proposalType\", getProposalTypeDecoder()],\n [\"createdAt\", getI64Decoder()],\n [\"votingStartsAt\", getI64Decoder()],\n [\"votingEndsAt\", getI64Decoder()],\n [\"executionTimestamp\", getOptionDecoder(getI64Decoder())],\n [\"status\", getProposalStatusDecoder()],\n [\"votingResults\", getVotingResultsDecoder()],\n [\"executionParams\", getExecutionParamsDecoder()],\n [\"quorumRequirements\", getQuorumRequirementsDecoder()],\n [\"metadata\", getProposalMetadataDecoder()],\n [\"reserved\", fixDecoderSize(getBytesDecoder(), 64)],\n ]);\n}\n\n/** Gets the codec for {@link GovernanceProposal} account data. */\nexport function getGovernanceProposalCodec(): Codec<\n GovernanceProposalArgs,\n GovernanceProposal\n> {\n return combineCodec(\n getGovernanceProposalEncoder(),\n getGovernanceProposalDecoder(),\n );\n}\n\nexport function decodeGovernanceProposal<TAddress extends string = string>(\n encodedAccount: EncodedAccount<TAddress>,\n): Account<GovernanceProposal, TAddress>;\nexport function decodeGovernanceProposal<TAddress extends string = string>(\n encodedAccount: MaybeEncodedAccount<TAddress>,\n): MaybeAccount<GovernanceProposal, TAddress>;\nexport function decodeGovernanceProposal<TAddress extends string = string>(\n encodedAccount: EncodedAccount<TAddress> | MaybeEncodedAccount<TAddress>,\n):\n | Account<GovernanceProposal, TAddress>\n | MaybeAccount<GovernanceProposal, TAddress> {\n return decodeAccount(\n encodedAccount as MaybeEncodedAccount<TAddress>,\n getGovernanceProposalDecoder(),\n );\n}\n\nexport async function fetchGovernanceProposal<TAddress extends string = string>(\n rpc: Parameters<typeof fetchEncodedAccount>[0],\n address: Address<TAddress>,\n config?: FetchAccountConfig,\n): Promise<Account<GovernanceProposal, TAddress>> {\n const maybeAccount = await fetchMaybeGovernanceProposal(rpc, address, config);\n assertAccountExists(maybeAccount);\n return maybeAccount;\n}\n\nexport async function fetchMaybeGovernanceProposal<\n TAddress extends string = string,\n>(\n rpc: Parameters<typeof fetchEncodedAccount>[0],\n address: Address<TAddress>,\n config?: FetchAccountConfig,\n): Promise<MaybeAccount<GovernanceProposal, TAddress>> {\n const maybeAccount = await fetchEncodedAccount(rpc, address, config);\n return decodeGovernanceProposal(maybeAccount);\n}\n\nexport async function fetchAllGovernanceProposal(\n rpc: Parameters<typeof fetchEncodedAccounts>[0],\n addresses: Array<Address>,\n config?: FetchAccountsConfig,\n): Promise<Account<GovernanceProposal>[]> {\n const maybeAccounts = await fetchAllMaybeGovernanceProposal(\n rpc,\n addresses,\n config,\n );\n assertAccountsExist(maybeAccounts);\n return maybeAccounts;\n}\n\nexport async function fetchAllMaybeGovernanceProposal(\n rpc: Parameters<typeof fetchEncodedAccounts>[0],\n addresses: Array<Address>,\n config?: FetchAccountsConfig,\n): Promise<MaybeAccount<GovernanceProposal>[]> {\n const maybeAccounts = await fetchEncodedAccounts(rpc, addresses, config);\n return maybeAccounts.map((maybeAccount) =>\n decodeGovernanceProposal(maybeAccount),\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 assertAccountExists,\n assertAccountsExist,\n combineCodec,\n decodeAccount,\n fetchEncodedAccount,\n fetchEncodedAccounts,\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 getU64Decoder,\n getU64Encoder,\n getU8Decoder,\n getU8Encoder,\n transformEncoder,\n type Account,\n type Address,\n type Codec,\n type Decoder,\n type EncodedAccount,\n type Encoder,\n type FetchAccountConfig,\n type FetchAccountsConfig,\n type MaybeAccount,\n type MaybeEncodedAccount,\n type ReadonlyUint8Array,\n} from \"@solana/kit\";\nimport {\n getEmergencyConfigDecoder,\n getEmergencyConfigEncoder,\n getMultisigConfigDecoder,\n getMultisigConfigEncoder,\n getMultisigTypeConfigDecoder,\n getMultisigTypeConfigEncoder,\n getMultisigTypeDecoder,\n getMultisigTypeEncoder,\n getPendingTransactionDecoder,\n getPendingTransactionEncoder,\n type EmergencyConfig,\n type EmergencyConfigArgs,\n type MultisigConfig,\n type MultisigConfigArgs,\n type MultisigType,\n type MultisigTypeArgs,\n type MultisigTypeConfig,\n type MultisigTypeConfigArgs,\n type PendingTransaction,\n type PendingTransactionArgs,\n} from \"../types\";\n\nexport const MULTISIG_DISCRIMINATOR = new Uint8Array([\n 224, 116, 121, 186, 68, 161, 79, 236,\n]);\n\nexport function getMultisigDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 8).encode(MULTISIG_DISCRIMINATOR);\n}\n\nexport type Multisig = {\n discriminator: ReadonlyUint8Array;\n /** Unique identifier */\n multisigId: bigint;\n /** Multisig type classification (Protocol, DAO, Dispute, etc.) */\n multisigType: MultisigType;\n /** Required number of signatures */\n threshold: number;\n /** List of authorized signers */\n signers: Array<Address>;\n /** Multisig owner (can modify signers) */\n owner: Address;\n /** Creation timestamp */\n createdAt: bigint;\n /** Last update timestamp */\n updatedAt: bigint;\n /** Current nonce (prevents replay attacks) */\n nonce: bigint;\n /** Pending transactions */\n pendingTransactions: Array<PendingTransaction>;\n /** Configuration settings */\n config: MultisigConfig;\n /** Emergency settings */\n emergencyConfig: EmergencyConfig;\n /** Type-specific configuration */\n typeConfig: MultisigTypeConfig;\n /** Reserved space for future extensions */\n reserved: ReadonlyUint8Array;\n};\n\nexport type MultisigArgs = {\n /** Unique identifier */\n multisigId: number | bigint;\n /** Multisig type classification (Protocol, DAO, Dispute, etc.) */\n multisigType: MultisigTypeArgs;\n /** Required number of signatures */\n threshold: number;\n /** List of authorized signers */\n signers: Array<Address>;\n /** Multisig owner (can modify signers) */\n owner: Address;\n /** Creation timestamp */\n createdAt: number | bigint;\n /** Last update timestamp */\n updatedAt: number | bigint;\n /** Current nonce (prevents replay attacks) */\n nonce: number | bigint;\n /** Pending transactions */\n pendingTransactions: Array<PendingTransactionArgs>;\n /** Configuration settings */\n config: MultisigConfigArgs;\n /** Emergency settings */\n emergencyConfig: EmergencyConfigArgs;\n /** Type-specific configuration */\n typeConfig: MultisigTypeConfigArgs;\n /** Reserved space for future extensions */\n reserved: ReadonlyUint8Array;\n};\n\n/** Gets the encoder for {@link MultisigArgs} account data. */\nexport function getMultisigEncoder(): Encoder<MultisigArgs> {\n return transformEncoder(\n getStructEncoder([\n [\"discriminator\", fixEncoderSize(getBytesEncoder(), 8)],\n [\"multisigId\", getU64Encoder()],\n [\"multisigType\", getMultisigTypeEncoder()],\n [\"threshold\", getU8Encoder()],\n [\"signers\", getArrayEncoder(getAddressEncoder())],\n [\"owner\", getAddressEncoder()],\n [\"createdAt\", getI64Encoder()],\n [\"updatedAt\", getI64Encoder()],\n [\"nonce\", getU64Encoder()],\n [\"pendingTransactions\", getArrayEncoder(getPendingTransactionEncoder())],\n [\"config\", getMultisigConfigEncoder()],\n [\"emergencyConfig\", getEmergencyConfigEncoder()],\n [\"typeConfig\", getMultisigTypeConfigEncoder()],\n [\"reserved\", fixEncoderSize(getBytesEncoder(), 64)],\n ]),\n (value) => ({ ...value, discriminator: MULTISIG_DISCRIMINATOR }),\n );\n}\n\n/** Gets the decoder for {@link Multisig} account data. */\nexport function getMultisigDecoder(): Decoder<Multisig> {\n return getStructDecoder([\n [\"discriminator\", fixDecoderSize(getBytesDecoder(), 8)],\n [\"multisigId\", getU64Decoder()],\n [\"multisigType\", getMultisigTypeDecoder()],\n [\"threshold\", getU8Decoder()],\n [\"signers\", getArrayDecoder(getAddressDecoder())],\n [\"owner\", getAddressDecoder()],\n [\"createdAt\", getI64Decoder()],\n [\"updatedAt\", getI64Decoder()],\n [\"nonce\", getU64Decoder()],\n [\"pendingTransactions\", getArrayDecoder(getPendingTransactionDecoder())],\n [\"config\", getMultisigConfigDecoder()],\n [\"emergencyConfig\", getEmergencyConfigDecoder()],\n [\"typeConfig\", getMultisigTypeConfigDecoder()],\n [\"reserved\", fixDecoderSize(getBytesDecoder(), 64)],\n ]);\n}\n\n/** Gets the codec for {@link Multisig} account data. */\nexport function getMultisigCodec(): Codec<MultisigArgs, Multisig> {\n return combineCodec(getMultisigEncoder(), getMultisigDecoder());\n}\n\nexport function decodeMultisig<TAddress extends string = string>(\n encodedAccount: EncodedAccount<TAddress>,\n): Account<Multisig, TAddress>;\nexport function decodeMultisig<TAddress extends string = string>(\n encodedAccount: MaybeEncodedAccount<TAddress>,\n): MaybeAccount<Multisig, TAddress>;\nexport function decodeMultisig<TAddress extends string = string>(\n encodedAccount: EncodedAccount<TAddress> | MaybeEncodedAccount<TAddress>,\n): Account<Multisig, TAddress> | MaybeAccount<Multisig, TAddress> {\n return decodeAccount(\n encodedAccount as MaybeEncodedAccount<TAddress>,\n getMultisigDecoder(),\n );\n}\n\nexport async function fetchMultisig<TAddress extends string = string>(\n rpc: Parameters<typeof fetchEncodedAccount>[0],\n address: Address<TAddress>,\n config?: FetchAccountConfig,\n): Promise<Account<Multisig, TAddress>> {\n const maybeAccount = await fetchMaybeMultisig(rpc, address, config);\n assertAccountExists(maybeAccount);\n return maybeAccount;\n}\n\nexport async function fetchMaybeMultisig<TAddress extends string = string>(\n rpc: Parameters<typeof fetchEncodedAccount>[0],\n address: Address<TAddress>,\n config?: FetchAccountConfig,\n): Promise<MaybeAccount<Multisig, TAddress>> {\n const maybeAccount = await fetchEncodedAccount(rpc, address, config);\n return decodeMultisig(maybeAccount);\n}\n\nexport async function fetchAllMultisig(\n rpc: Parameters<typeof fetchEncodedAccounts>[0],\n addresses: Array<Address>,\n config?: FetchAccountsConfig,\n): Promise<Account<Multisig>[]> {\n const maybeAccounts = await fetchAllMaybeMultisig(rpc, addresses, config);\n assertAccountsExist(maybeAccounts);\n return maybeAccounts;\n}\n\nexport async function fetchAllMaybeMultisig(\n rpc: Parameters<typeof fetchEncodedAccounts>[0],\n addresses: Array<Address>,\n config?: FetchAccountsConfig,\n): Promise<MaybeAccount<Multisig>[]> {\n const maybeAccounts = await fetchEncodedAccounts(rpc, addresses, config);\n return maybeAccounts.map((maybeAccount) => decodeMultisig(maybeAccount));\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 assertAccountExists,\n assertAccountsExist,\n combineCodec,\n decodeAccount,\n fetchEncodedAccount,\n fetchEncodedAccounts,\n fixDecoderSize,\n fixEncoderSize,\n getAddressDecoder,\n getAddressEncoder,\n getBooleanDecoder,\n getBooleanEncoder,\n getBytesDecoder,\n getBytesEncoder,\n getI64Decoder,\n getI64Encoder,\n getStructDecoder,\n getStructEncoder,\n getU16Decoder,\n getU16Encoder,\n getU64Decoder,\n getU64Encoder,\n getU8Decoder,\n getU8Encoder,\n transformEncoder,\n type Account,\n type Address,\n type EncodedAccount,\n type FetchAccountConfig,\n type FetchAccountsConfig,\n type FixedSizeCodec,\n type FixedSizeDecoder,\n type FixedSizeEncoder,\n type MaybeAccount,\n type MaybeEncodedAccount,\n type ReadonlyUint8Array,\n} from \"@solana/kit\";\n\nexport const PROTOCOL_CONFIG_DISCRIMINATOR = new Uint8Array([\n 207, 91, 250, 28, 152, 179, 215, 209,\n]);\n\nexport function getProtocolConfigDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 8).encode(\n PROTOCOL_CONFIG_DISCRIMINATOR,\n );\n}\n\nexport type ProtocolConfig = {\n discriminator: ReadonlyUint8Array;\n /** Authority who can update the config (typically DAO or multisig) */\n authority: Address;\n /** Treasury wallet that receives protocol fees */\n treasury: Address;\n /** Buyback pool wallet for token buybacks (receives 20% of escrow fees) */\n buybackPool: Address;\n /** Moderator pool for dispute resolution fees */\n moderatorPool: Address;\n /**\n * Escrow completion fee in basis points (100 = 1%)\n * Default: 0 (disabled until mainnet)\n * Target: 50 (0.5%)\n */\n escrowFeeBps: number;\n /**\n * Agent registration fee in lamports\n * Default: 0 (disabled until mainnet)\n * Target: 10_000_000 (0.01 SOL)\n */\n agentRegistrationFee: bigint;\n /**\n * Marketplace listing fee in lamports\n * Default: 0 (disabled until mainnet)\n * Target: 1_000_000 (0.001 SOL)\n */\n listingFee: bigint;\n /**\n * Dispute resolution fee in basis points (100 = 1%)\n * Default: 0 (disabled until mainnet)\n * Target: 100 (1%)\n */\n disputeFeeBps: number;\n /**\n * Whether fees are enabled\n * Set to false during devnet, true after mainnet governance approval\n */\n feesEnabled: boolean;\n /** Timestamp when config was last updated */\n updatedAt: bigint;\n /** PDA bump seed */\n bump: number;\n /** Reserved for future use */\n reserved: ReadonlyUint8Array;\n};\n\nexport type ProtocolConfigArgs = {\n /** Authority who can update the config (typically DAO or multisig) */\n authority: Address;\n /** Treasury wallet that receives protocol fees */\n treasury: Address;\n /** Buyback pool wallet for token buybacks (receives 20% of escrow fees) */\n buybackPool: Address;\n /** Moderator pool for dispute resolution fees */\n moderatorPool: Address;\n /**\n * Escrow completion fee in basis points (100 = 1%)\n * Default: 0 (disabled until mainnet)\n * Target: 50 (0.5%)\n */\n escrowFeeBps: number;\n /**\n * Agent registration fee in lamports\n * Default: 0 (disabled until mainnet)\n * Target: 10_000_000 (0.01 SOL)\n */\n agentRegistrationFee: number | bigint;\n /**\n * Marketplace listing fee in lamports\n * Default: 0 (disabled until mainnet)\n * Target: 1_000_000 (0.001 SOL)\n */\n listingFee: number | bigint;\n /**\n * Dispute resolution fee in basis points (100 = 1%)\n * Default: 0 (disabled until mainnet)\n * Target: 100 (1%)\n */\n disputeFeeBps: number;\n /**\n * Whether fees are enabled\n * Set to false during devnet, true after mainnet governance approval\n */\n feesEnabled: boolean;\n /** Timestamp when config was last updated */\n updatedAt: number | bigint;\n /** PDA bump seed */\n bump: number;\n /** Reserved for future use */\n reserved: ReadonlyUint8Array;\n};\n\n/** Gets the encoder for {@link ProtocolConfigArgs} account data. */\nexport function getProtocolConfigEncoder(): FixedSizeEncoder<ProtocolConfigArgs> {\n return transformEncoder(\n getStructEncoder([\n [\"discriminator\", fixEncoderSize(getBytesEncoder(), 8)],\n [\"authority\", getAddressEncoder()],\n [\"treasury\", getAddressEncoder()],\n [\"buybackPool\", getAddressEncoder()],\n [\"moderatorPool\", getAddressEncoder()],\n [\"escrowFeeBps\", getU16Encoder()],\n [\"agentRegistrationFee\", getU64Encoder()],\n [\"listingFee\", getU64Encoder()],\n [\"disputeFeeBps\", getU16Encoder()],\n [\"feesEnabled\", getBooleanEncoder()],\n [\"updatedAt\", getI64Encoder()],\n [\"bump\", getU8Encoder()],\n [\"reserved\", fixEncoderSize(getBytesEncoder(), 64)],\n ]),\n (value) => ({ ...value, discriminator: PROTOCOL_CONFIG_DISCRIMINATOR }),\n );\n}\n\n/** Gets the decoder for {@link ProtocolConfig} account data. */\nexport function getProtocolConfigDecoder(): FixedSizeDecoder<ProtocolConfig> {\n return getStructDecoder([\n [\"discriminator\", fixDecoderSize(getBytesDecoder(), 8)],\n [\"authority\", getAddressDecoder()],\n [\"treasury\", getAddressDecoder()],\n [\"buybackPool\", getAddressDecoder()],\n [\"moderatorPool\", getAddressDecoder()],\n [\"escrowFeeBps\", getU16Decoder()],\n [\"agentRegistrationFee\", getU64Decoder()],\n [\"listingFee\", getU64Decoder()],\n [\"disputeFeeBps\", getU16Decoder()],\n [\"feesEnabled\", getBooleanDecoder()],\n [\"updatedAt\", getI64Decoder()],\n [\"bump\", getU8Decoder()],\n [\"reserved\", fixDecoderSize(getBytesDecoder(), 64)],\n ]);\n}\n\n/** Gets the codec for {@link ProtocolConfig} account data. */\nexport function getProtocolConfigCodec(): FixedSizeCodec<\n ProtocolConfigArgs,\n ProtocolConfig\n> {\n return combineCodec(getProtocolConfigEncoder(), getProtocolConfigDecoder());\n}\n\nexport function decodeProtocolConfig<TAddress extends string = string>(\n encodedAccount: EncodedAccount<TAddress>,\n): Account<ProtocolConfig, TAddress>;\nexport function decodeProtocolConfig<TAddress extends string = string>(\n encodedAccount: MaybeEncodedAccount<TAddress>,\n): MaybeAccount<ProtocolConfig, TAddress>;\nexport function decodeProtocolConfig<TAddress extends string = string>(\n encodedAccount: EncodedAccount<TAddress> | MaybeEncodedAccount<TAddress>,\n): Account<ProtocolConfig, TAddress> | MaybeAccount<ProtocolConfig, TAddress> {\n return decodeAccount(\n encodedAccount as MaybeEncodedAccount<TAddress>,\n getProtocolConfigDecoder(),\n );\n}\n\nexport async function fetchProtocolConfig<TAddress extends string = string>(\n rpc: Parameters<typeof fetchEncodedAccount>[0],\n address: Address<TAddress>,\n config?: FetchAccountConfig,\n): Promise<Account<ProtocolConfig, TAddress>> {\n const maybeAccount = await fetchMaybeProtocolConfig(rpc, address, config);\n assertAccountExists(maybeAccount);\n return maybeAccount;\n}\n\nexport async function fetchMaybeProtocolConfig<\n TAddress extends string = string,\n>(\n rpc: Parameters<typeof fetchEncodedAccount>[0],\n address: Address<TAddress>,\n config?: FetchAccountConfig,\n): Promise<MaybeAccount<ProtocolConfig, TAddress>> {\n const maybeAccount = await fetchEncodedAccount(rpc, address, config);\n return decodeProtocolConfig(maybeAccount);\n}\n\nexport async function fetchAllProtocolConfig(\n rpc: Parameters<typeof fetchEncodedAccounts>[0],\n addresses: Array<Address>,\n config?: FetchAccountsConfig,\n): Promise<Account<ProtocolConfig>[]> {\n const maybeAccounts = await fetchAllMaybeProtocolConfig(\n rpc,\n addresses,\n config,\n );\n assertAccountsExist(maybeAccounts);\n return maybeAccounts;\n}\n\nexport async function fetchAllMaybeProtocolConfig(\n rpc: Parameters<typeof fetchEncodedAccounts>[0],\n addresses: Array<Address>,\n config?: FetchAccountsConfig,\n): Promise<MaybeAccount<ProtocolConfig>[]> {\n const maybeAccounts = await fetchEncodedAccounts(rpc, addresses, config);\n return maybeAccounts.map((maybeAccount) =>\n decodeProtocolConfig(maybeAccount),\n );\n}\n\nexport function getProtocolConfigSize(): number {\n return 230;\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 assertAccountExists,\n assertAccountsExist,\n combineCodec,\n decodeAccount,\n fetchEncodedAccount,\n fetchEncodedAccounts,\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 getU8Decoder,\n getU8Encoder,\n transformEncoder,\n type Account,\n type Address,\n type Codec,\n type Decoder,\n type EncodedAccount,\n type Encoder,\n type FetchAccountConfig,\n type FetchAccountsConfig,\n type MaybeAccount,\n type MaybeEncodedAccount,\n type ReadonlyUint8Array,\n} from \"@solana/kit\";\nimport {\n getAccessAuditConfigDecoder,\n getAccessAuditConfigEncoder,\n getAccessPolicyDecoder,\n getAccessPolicyEncoder,\n getEmergencyAccessConfigDecoder,\n getEmergencyAccessConfigEncoder,\n getPermissionDecoder,\n getPermissionEncoder,\n getRoleDecoder,\n getRoleEncoder,\n getSecurityPoliciesDecoder,\n getSecurityPoliciesEncoder,\n type AccessAuditConfig,\n type AccessAuditConfigArgs,\n type AccessPolicy,\n type AccessPolicyArgs,\n type EmergencyAccessConfig,\n type EmergencyAccessConfigArgs,\n type Permission,\n type PermissionArgs,\n type Role,\n type RoleArgs,\n type SecurityPolicies,\n type SecurityPoliciesArgs,\n} from \"../types\";\n\nexport const RBAC_CONFIG_DISCRIMINATOR = new Uint8Array([\n 177, 94, 184, 202, 221, 112, 110, 38,\n]);\n\nexport function getRbacConfigDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 8).encode(RBAC_CONFIG_DISCRIMINATOR);\n}\n\nexport type RbacConfig = {\n discriminator: ReadonlyUint8Array;\n /** Authority for RBAC management */\n authority: Address;\n /** Creation timestamp */\n createdAt: bigint;\n /** Last update timestamp */\n updatedAt: bigint;\n /** Version for compatibility */\n version: number;\n /** Role definitions */\n roles: Array<Role>;\n /** Permission definitions */\n permissions: Array<Permission>;\n /** Access policies */\n accessPolicies: Array<AccessPolicy>;\n /** Security policies */\n securityPolicies: SecurityPolicies;\n /** Audit configuration */\n auditConfig: AccessAuditConfig;\n /** Emergency access procedures */\n emergencyAccess: EmergencyAccessConfig;\n /** Reserved space */\n reserved: ReadonlyUint8Array;\n};\n\nexport type RbacConfigArgs = {\n /** Authority for RBAC management */\n authority: Address;\n /** Creation timestamp */\n createdAt: number | bigint;\n /** Last update timestamp */\n updatedAt: number | bigint;\n /** Version for compatibility */\n version: number;\n /** Role definitions */\n roles: Array<RoleArgs>;\n /** Permission definitions */\n permissions: Array<PermissionArgs>;\n /** Access policies */\n accessPolicies: Array<AccessPolicyArgs>;\n /** Security policies */\n securityPolicies: SecurityPoliciesArgs;\n /** Audit configuration */\n auditConfig: AccessAuditConfigArgs;\n /** Emergency access procedures */\n emergencyAccess: EmergencyAccessConfigArgs;\n /** Reserved space */\n reserved: ReadonlyUint8Array;\n};\n\n/** Gets the encoder for {@link RbacConfigArgs} account data. */\nexport function getRbacConfigEncoder(): Encoder<RbacConfigArgs> {\n return transformEncoder(\n getStructEncoder([\n [\"discriminator\", fixEncoderSize(getBytesEncoder(), 8)],\n [\"authority\", getAddressEncoder()],\n [\"createdAt\", getI64Encoder()],\n [\"updatedAt\", getI64Encoder()],\n [\"version\", getU8Encoder()],\n [\"roles\", getArrayEncoder(getRoleEncoder())],\n [\"permissions\", getArrayEncoder(getPermissionEncoder())],\n [\"accessPolicies\", getArrayEncoder(getAccessPolicyEncoder())],\n [\"securityPolicies\", getSecurityPoliciesEncoder()],\n [\"auditConfig\", getAccessAuditConfigEncoder()],\n [\"emergencyAccess\", getEmergencyAccessConfigEncoder()],\n [\"reserved\", fixEncoderSize(getBytesEncoder(), 128)],\n ]),\n (value) => ({ ...value, discriminator: RBAC_CONFIG_DISCRIMINATOR }),\n );\n}\n\n/** Gets the decoder for {@link RbacConfig} account data. */\nexport function getRbacConfigDecoder(): Decoder<RbacConfig> {\n return getStructDecoder([\n [\"discriminator\", fixDecoderSize(getBytesDecoder(), 8)],\n [\"authority\", getAddressDecoder()],\n [\"createdAt\", getI64Decoder()],\n [\"updatedAt\", getI64Decoder()],\n [\"version\", getU8Decoder()],\n [\"roles\", getArrayDecoder(getRoleDecoder())],\n [\"permissions\", getArrayDecoder(getPermissionDecoder())],\n [\"accessPolicies\", getArrayDecoder(getAccessPolicyDecoder())],\n [\"securityPolicies\", getSecurityPoliciesDecoder()],\n [\"auditConfig\", getAccessAuditConfigDecoder()],\n [\"emergencyAccess\", getEmergencyAccessConfigDecoder()],\n [\"reserved\", fixDecoderSize(getBytesDecoder(), 128)],\n ]);\n}\n\n/** Gets the codec for {@link RbacConfig} account data. */\nexport function getRbacConfigCodec(): Codec<RbacConfigArgs, RbacConfig> {\n return combineCodec(getRbacConfigEncoder(), getRbacConfigDecoder());\n}\n\nexport function decodeRbacConfig<TAddress extends string = string>(\n encodedAccount: EncodedAccount<TAddress>,\n): Account<RbacConfig, TAddress>;\nexport function decodeRbacConfig<TAddress extends string = string>(\n encodedAccount: MaybeEncodedAccount<TAddress>,\n): MaybeAccount<RbacConfig, TAddress>;\nexport function decodeRbacConfig<TAddress extends string = string>(\n encodedAccount: EncodedAccount<TAddress> | MaybeEncodedAccount<TAddress>,\n): Account<RbacConfig, TAddress> | MaybeAccount<RbacConfig, TAddress> {\n return decodeAccount(\n encodedAccount as MaybeEncodedAccount<TAddress>,\n getRbacConfigDecoder(),\n );\n}\n\nexport async function fetchRbacConfig<TAddress extends string = string>(\n rpc: Parameters<typeof fetchEncodedAccount>[0],\n address: Address<TAddress>,\n config?: FetchAccountConfig,\n): Promise<Account<RbacConfig, TAddress>> {\n const maybeAccount = await fetchMaybeRbacConfig(rpc, address, config);\n assertAccountExists(maybeAccount);\n return maybeAccount;\n}\n\nexport async function fetchMaybeRbacConfig<TAddress extends string = string>(\n rpc: Parameters<typeof fetchEncodedAccount>[0],\n address: Address<TAddress>,\n config?: FetchAccountConfig,\n): Promise<MaybeAccount<RbacConfig, TAddress>> {\n const maybeAccount = await fetchEncodedAccount(rpc, address, config);\n return decodeRbacConfig(maybeAccount);\n}\n\nexport async function fetchAllRbacConfig(\n rpc: Parameters<typeof fetchEncodedAccounts>[0],\n addresses: Array<Address>,\n config?: FetchAccountsConfig,\n): Promise<Account<RbacConfig>[]> {\n const maybeAccounts = await fetchAllMaybeRbacConfig(rpc, addresses, config);\n assertAccountsExist(maybeAccounts);\n return maybeAccounts;\n}\n\nexport async function fetchAllMaybeRbacConfig(\n rpc: Parameters<typeof fetchEncodedAccounts>[0],\n addresses: Array<Address>,\n config?: FetchAccountsConfig,\n): Promise<MaybeAccount<RbacConfig>[]> {\n const maybeAccounts = await fetchEncodedAccounts(rpc, addresses, config);\n return maybeAccounts.map((maybeAccount) => decodeRbacConfig(maybeAccount));\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 assertAccountExists,\n assertAccountsExist,\n combineCodec,\n decodeAccount,\n fetchEncodedAccount,\n fetchEncodedAccounts,\n fixDecoderSize,\n fixEncoderSize,\n getAddressDecoder,\n getAddressEncoder,\n getBytesDecoder,\n getBytesEncoder,\n getI64Decoder,\n getI64Encoder,\n getStructDecoder,\n getStructEncoder,\n getU64Decoder,\n getU64Encoder,\n getU8Decoder,\n getU8Encoder,\n transformEncoder,\n type Account,\n type Address,\n type EncodedAccount,\n type FetchAccountConfig,\n type FetchAccountsConfig,\n type FixedSizeCodec,\n type FixedSizeDecoder,\n type FixedSizeEncoder,\n type MaybeAccount,\n type MaybeEncodedAccount,\n type ReadonlyUint8Array,\n} from \"@solana/kit\";\nimport {\n getReentrancyStateDecoder,\n getReentrancyStateEncoder,\n type ReentrancyState,\n type ReentrancyStateArgs,\n} from \"../types\";\n\nexport const REENTRANCY_GUARD_DISCRIMINATOR = new Uint8Array([\n 207, 227, 141, 11, 194, 21, 193, 32,\n]);\n\nexport function getReentrancyGuardDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 8).encode(\n REENTRANCY_GUARD_DISCRIMINATOR,\n );\n}\n\nexport type ReentrancyGuard = {\n discriminator: ReadonlyUint8Array;\n /** Current state of the guard */\n state: ReentrancyState;\n /** Nonce to prevent replay attacks */\n nonce: bigint;\n /** Last interaction timestamp */\n lastInteraction: bigint;\n /** Authority that can reset the guard (for emergency situations) */\n authority: Address;\n /** Bump seed for PDA */\n bump: number;\n};\n\nexport type ReentrancyGuardArgs = {\n /** Current state of the guard */\n state: ReentrancyStateArgs;\n /** Nonce to prevent replay attacks */\n nonce: number | bigint;\n /** Last interaction timestamp */\n lastInteraction: number | bigint;\n /** Authority that can reset the guard (for emergency situations) */\n authority: Address;\n /** Bump seed for PDA */\n bump: number;\n};\n\n/** Gets the encoder for {@link ReentrancyGuardArgs} account data. */\nexport function getReentrancyGuardEncoder(): FixedSizeEncoder<ReentrancyGuardArgs> {\n return transformEncoder(\n getStructEncoder([\n [\"discriminator\", fixEncoderSize(getBytesEncoder(), 8)],\n [\"state\", getReentrancyStateEncoder()],\n [\"nonce\", getU64Encoder()],\n [\"lastInteraction\", getI64Encoder()],\n [\"authority\", getAddressEncoder()],\n [\"bump\", getU8Encoder()],\n ]),\n (value) => ({ ...value, discriminator: REENTRANCY_GUARD_DISCRIMINATOR }),\n );\n}\n\n/** Gets the decoder for {@link ReentrancyGuard} account data. */\nexport function getReentrancyGuardDecoder(): FixedSizeDecoder<ReentrancyGuard> {\n return getStructDecoder([\n [\"discriminator\", fixDecoderSize(getBytesDecoder(), 8)],\n [\"state\", getReentrancyStateDecoder()],\n [\"nonce\", getU64Decoder()],\n [\"lastInteraction\", getI64Decoder()],\n [\"authority\", getAddressDecoder()],\n [\"bump\", getU8Decoder()],\n ]);\n}\n\n/** Gets the codec for {@link ReentrancyGuard} account data. */\nexport function getReentrancyGuardCodec(): FixedSizeCodec<\n ReentrancyGuardArgs,\n ReentrancyGuard\n> {\n return combineCodec(getReentrancyGuardEncoder(), getReentrancyGuardDecoder());\n}\n\nexport function decodeReentrancyGuard<TAddress extends string = string>(\n encodedAccount: EncodedAccount<TAddress>,\n): Account<ReentrancyGuard, TAddress>;\nexport function decodeReentrancyGuard<TAddress extends string = string>(\n encodedAccount: MaybeEncodedAccount<TAddress>,\n): MaybeAccount<ReentrancyGuard, TAddress>;\nexport function decodeReentrancyGuard<TAddress extends string = string>(\n encodedAccount: EncodedAccount<TAddress> | MaybeEncodedAccount<TAddress>,\n):\n | Account<ReentrancyGuard, TAddress>\n | MaybeAccount<ReentrancyGuard, TAddress> {\n return decodeAccount(\n encodedAccount as MaybeEncodedAccount<TAddress>,\n getReentrancyGuardDecoder(),\n );\n}\n\nexport async function fetchReentrancyGuard<TAddress extends string = string>(\n rpc: Parameters<typeof fetchEncodedAccount>[0],\n address: Address<TAddress>,\n config?: FetchAccountConfig,\n): Promise<Account<ReentrancyGuard, TAddress>> {\n const maybeAccount = await fetchMaybeReentrancyGuard(rpc, address, config);\n assertAccountExists(maybeAccount);\n return maybeAccount;\n}\n\nexport async function fetchMaybeReentrancyGuard<\n TAddress extends string = string,\n>(\n rpc: Parameters<typeof fetchEncodedAccount>[0],\n address: Address<TAddress>,\n config?: FetchAccountConfig,\n): Promise<MaybeAccount<ReentrancyGuard, TAddress>> {\n const maybeAccount = await fetchEncodedAccount(rpc, address, config);\n return decodeReentrancyGuard(maybeAccount);\n}\n\nexport async function fetchAllReentrancyGuard(\n rpc: Parameters<typeof fetchEncodedAccounts>[0],\n addresses: Array<Address>,\n config?: FetchAccountsConfig,\n): Promise<Account<ReentrancyGuard>[]> {\n const maybeAccounts = await fetchAllMaybeReentrancyGuard(\n rpc,\n addresses,\n config,\n );\n assertAccountsExist(maybeAccounts);\n return maybeAccounts;\n}\n\nexport async function fetchAllMaybeReentrancyGuard(\n rpc: Parameters<typeof fetchEncodedAccounts>[0],\n addresses: Array<Address>,\n config?: FetchAccountsConfig,\n): Promise<MaybeAccount<ReentrancyGuard>[]> {\n const maybeAccounts = await fetchEncodedAccounts(rpc, addresses, config);\n return maybeAccounts.map((maybeAccount) =>\n decodeReentrancyGuard(maybeAccount),\n );\n}\n\nexport function getReentrancyGuardSize(): number {\n return 58;\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 assertAccountExists,\n assertAccountsExist,\n combineCodec,\n decodeAccount,\n fetchEncodedAccount,\n fetchEncodedAccounts,\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 getU8Decoder,\n getU8Encoder,\n getUtf8Decoder,\n getUtf8Encoder,\n transformEncoder,\n type Account,\n type Address,\n type Codec,\n type Decoder,\n type EncodedAccount,\n type Encoder,\n type FetchAccountConfig,\n type FetchAccountsConfig,\n type MaybeAccount,\n type MaybeEncodedAccount,\n type ReadonlyUint8Array,\n} from \"@solana/kit\";\nimport {\n getSourceScoreDecoder,\n getSourceScoreEncoder,\n getTagScoreDecoder,\n getTagScoreEncoder,\n type SourceScore,\n type SourceScoreArgs,\n type TagScore,\n type TagScoreArgs,\n} from \"../types\";\n\nexport const REPUTATION_METRICS_DISCRIMINATOR = new Uint8Array([\n 8, 160, 71, 30, 66, 150, 108, 33,\n]);\n\nexport function getReputationMetricsDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 8).encode(\n REPUTATION_METRICS_DISCRIMINATOR,\n );\n}\n\nexport type ReputationMetrics = {\n discriminator: ReadonlyUint8Array;\n /** Agent public key */\n agent: Address;\n /** Total successful x402 payments received */\n successfulPayments: bigint;\n /** Total failed x402 payment attempts */\n failedPayments: bigint;\n /** Cumulative response time in milliseconds */\n totalResponseTime: bigint;\n /** Number of response time measurements */\n responseTimeCount: bigint;\n /** Total disputes filed against agent for x402 services */\n totalDisputes: number;\n /** Disputes resolved favorably */\n disputesResolved: number;\n /** Sum of all client ratings (0-5 scale) */\n totalRating: number;\n /** Number of ratings submitted */\n totalRatingsCount: number;\n /** Rolling 7-day payment volume (daily buckets) */\n paymentHistory7d: Array<bigint>;\n /** Creation timestamp */\n createdAt: bigint;\n /** Last update timestamp */\n updatedAt: bigint;\n /** Skill-based reputation tags (e.g., \"code-generation\", \"defi-expert\") */\n skillTags: Array<string>;\n /** Behavior-based tags (e.g., \"fast-responder\", \"dispute-free\") */\n behaviorTags: Array<string>;\n /** Compliance-based tags (e.g., \"kyc-verified\", \"audited-code\") */\n complianceTags: Array<string>;\n /** Tag confidence scores with evidence */\n tagScores: Array<TagScore>;\n /** Last time tags were updated */\n tagUpdatedAt: bigint;\n /** Multi-source reputation scores (max 10 sources) */\n sourceScores: Array<SourceScore>;\n /** Primary reputation source (default: \"payai\") */\n primarySource: string;\n /** Last time multi-source aggregation was performed */\n lastAggregation: bigint;\n /** Conflict flags describing score discrepancies */\n conflictFlags: Array<string>;\n /** PDA bump */\n bump: number;\n};\n\nexport type ReputationMetricsArgs = {\n /** Agent public key */\n agent: Address;\n /** Total successful x402 payments received */\n successfulPayments: number | bigint;\n /** Total failed x402 payment attempts */\n failedPayments: number | bigint;\n /** Cumulative response time in milliseconds */\n totalResponseTime: number | bigint;\n /** Number of response time measurements */\n responseTimeCount: number | bigint;\n /** Total disputes filed against agent for x402 services */\n totalDisputes: number;\n /** Disputes resolved favorably */\n disputesResolved: number;\n /** Sum of all client ratings (0-5 scale) */\n totalRating: number;\n /** Number of ratings submitted */\n totalRatingsCount: number;\n /** Rolling 7-day payment volume (daily buckets) */\n paymentHistory7d: Array<number | bigint>;\n /** Creation timestamp */\n createdAt: number | bigint;\n /** Last update timestamp */\n updatedAt: number | bigint;\n /** Skill-based reputation tags (e.g., \"code-generation\", \"defi-expert\") */\n skillTags: Array<string>;\n /** Behavior-based tags (e.g., \"fast-responder\", \"dispute-free\") */\n behaviorTags: Array<string>;\n /** Compliance-based tags (e.g., \"kyc-verified\", \"audited-code\") */\n complianceTags: Array<string>;\n /** Tag confidence scores with evidence */\n tagScores: Array<TagScoreArgs>;\n /** Last time tags were updated */\n tagUpdatedAt: number | bigint;\n /** Multi-source reputation scores (max 10 sources) */\n sourceScores: Array<SourceScoreArgs>;\n /** Primary reputation source (default: \"payai\") */\n primarySource: string;\n /** Last time multi-source aggregation was performed */\n lastAggregation: number | bigint;\n /** Conflict flags describing score discrepancies */\n conflictFlags: Array<string>;\n /** PDA bump */\n bump: number;\n};\n\n/** Gets the encoder for {@link ReputationMetricsArgs} account data. */\nexport function getReputationMetricsEncoder(): Encoder<ReputationMetricsArgs> {\n return transformEncoder(\n getStructEncoder([\n [\"discriminator\", fixEncoderSize(getBytesEncoder(), 8)],\n [\"agent\", getAddressEncoder()],\n [\"successfulPayments\", getU64Encoder()],\n [\"failedPayments\", getU64Encoder()],\n [\"totalResponseTime\", getU64Encoder()],\n [\"responseTimeCount\", getU64Encoder()],\n [\"totalDisputes\", getU32Encoder()],\n [\"disputesResolved\", getU32Encoder()],\n [\"totalRating\", getU32Encoder()],\n [\"totalRatingsCount\", getU32Encoder()],\n [\"paymentHistory7d\", getArrayEncoder(getU64Encoder(), { size: 7 })],\n [\"createdAt\", getI64Encoder()],\n [\"updatedAt\", getI64Encoder()],\n [\n \"skillTags\",\n getArrayEncoder(\n addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder()),\n ),\n ],\n [\n \"behaviorTags\",\n getArrayEncoder(\n addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder()),\n ),\n ],\n [\n \"complianceTags\",\n getArrayEncoder(\n addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder()),\n ),\n ],\n [\"tagScores\", getArrayEncoder(getTagScoreEncoder())],\n [\"tagUpdatedAt\", getI64Encoder()],\n [\"sourceScores\", getArrayEncoder(getSourceScoreEncoder())],\n [\n \"primarySource\",\n addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder()),\n ],\n [\"lastAggregation\", getI64Encoder()],\n [\n \"conflictFlags\",\n getArrayEncoder(\n addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder()),\n ),\n ],\n [\"bump\", getU8Encoder()],\n ]),\n (value) => ({ ...value, discriminator: REPUTATION_METRICS_DISCRIMINATOR }),\n );\n}\n\n/** Gets the decoder for {@link ReputationMetrics} account data. */\nexport function getReputationMetricsDecoder(): Decoder<ReputationMetrics> {\n return getStructDecoder([\n [\"discriminator\", fixDecoderSize(getBytesDecoder(), 8)],\n [\"agent\", getAddressDecoder()],\n [\"successfulPayments\", getU64Decoder()],\n [\"failedPayments\", getU64Decoder()],\n [\"totalResponseTime\", getU64Decoder()],\n [\"responseTimeCount\", getU64Decoder()],\n [\"totalDisputes\", getU32Decoder()],\n [\"disputesResolved\", getU32Decoder()],\n [\"totalRating\", getU32Decoder()],\n [\"totalRatingsCount\", getU32Decoder()],\n [\"paymentHistory7d\", getArrayDecoder(getU64Decoder(), { size: 7 })],\n [\"createdAt\", getI64Decoder()],\n [\"updatedAt\", getI64Decoder()],\n [\n \"skillTags\",\n getArrayDecoder(addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())),\n ],\n [\n \"behaviorTags\",\n getArrayDecoder(addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())),\n ],\n [\n \"complianceTags\",\n getArrayDecoder(addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())),\n ],\n [\"tagScores\", getArrayDecoder(getTagScoreDecoder())],\n [\"tagUpdatedAt\", getI64Decoder()],\n [\"sourceScores\", getArrayDecoder(getSourceScoreDecoder())],\n [\"primarySource\", addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())],\n [\"lastAggregation\", getI64Decoder()],\n [\n \"conflictFlags\",\n getArrayDecoder(addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())),\n ],\n [\"bump\", getU8Decoder()],\n ]);\n}\n\n/** Gets the codec for {@link ReputationMetrics} account data. */\nexport function getReputationMetricsCodec(): Codec<\n ReputationMetricsArgs,\n ReputationMetrics\n> {\n return combineCodec(\n getReputationMetricsEncoder(),\n getReputationMetricsDecoder(),\n );\n}\n\nexport function decodeReputationMetrics<TAddress extends string = string>(\n encodedAccount: EncodedAccount<TAddress>,\n): Account<ReputationMetrics, TAddress>;\nexport function decodeReputationMetrics<TAddress extends string = string>(\n encodedAccount: MaybeEncodedAccount<TAddress>,\n): MaybeAccount<ReputationMetrics, TAddress>;\nexport function decodeReputationMetrics<TAddress extends string = string>(\n encodedAccount: EncodedAccount<TAddress> | MaybeEncodedAccount<TAddress>,\n):\n | Account<ReputationMetrics, TAddress>\n | MaybeAccount<ReputationMetrics, TAddress> {\n return decodeAccount(\n encodedAccount as MaybeEncodedAccount<TAddress>,\n getReputationMetricsDecoder(),\n );\n}\n\nexport async function fetchReputationMetrics<TAddress extends string = string>(\n rpc: Parameters<typeof fetchEncodedAccount>[0],\n address: Address<TAddress>,\n config?: FetchAccountConfig,\n): Promise<Account<ReputationMetrics, TAddress>> {\n const maybeAccount = await fetchMaybeReputationMetrics(rpc, address, config);\n assertAccountExists(maybeAccount);\n return maybeAccount;\n}\n\nexport async function fetchMaybeReputationMetrics<\n TAddress extends string = string,\n>(\n rpc: Parameters<typeof fetchEncodedAccount>[0],\n address: Address<TAddress>,\n config?: FetchAccountConfig,\n): Promise<MaybeAccount<ReputationMetrics, TAddress>> {\n const maybeAccount = await fetchEncodedAccount(rpc, address, config);\n return decodeReputationMetrics(maybeAccount);\n}\n\nexport async function fetchAllReputationMetrics(\n rpc: Parameters<typeof fetchEncodedAccounts>[0],\n addresses: Array<Address>,\n config?: FetchAccountsConfig,\n): Promise<Account<ReputationMetrics>[]> {\n const maybeAccounts = await fetchAllMaybeReputationMetrics(\n rpc,\n addresses,\n config,\n );\n assertAccountsExist(maybeAccounts);\n return maybeAccounts;\n}\n\nexport async function fetchAllMaybeReputationMetrics(\n rpc: Parameters<typeof fetchEncodedAccounts>[0],\n addresses: Array<Address>,\n config?: FetchAccountsConfig,\n): Promise<MaybeAccount<ReputationMetrics>[]> {\n const maybeAccounts = await fetchEncodedAccounts(rpc, addresses, config);\n return maybeAccounts.map((maybeAccount) =>\n decodeReputationMetrics(maybeAccount),\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 assertAccountExists,\n assertAccountsExist,\n combineCodec,\n decodeAccount,\n fetchEncodedAccount,\n fetchEncodedAccounts,\n fixDecoderSize,\n fixEncoderSize,\n getAddressDecoder,\n getAddressEncoder,\n getBooleanDecoder,\n getBooleanEncoder,\n getBytesDecoder,\n getBytesEncoder,\n getI64Decoder,\n getI64Encoder,\n getStructDecoder,\n getStructEncoder,\n getU16Decoder,\n getU16Encoder,\n getU32Decoder,\n getU32Encoder,\n getU64Decoder,\n getU64Encoder,\n getU8Decoder,\n getU8Encoder,\n transformEncoder,\n type Account,\n type Address,\n type EncodedAccount,\n type FetchAccountConfig,\n type FetchAccountsConfig,\n type FixedSizeCodec,\n type FixedSizeDecoder,\n type FixedSizeEncoder,\n type MaybeAccount,\n type MaybeEncodedAccount,\n type ReadonlyUint8Array,\n} from \"@solana/kit\";\nimport {\n getAccessTierDecoder,\n getAccessTierEncoder,\n type AccessTier,\n type AccessTierArgs,\n} from \"../types\";\n\nexport const STAKING_ACCOUNT_DISCRIMINATOR = new Uint8Array([\n 52, 178, 251, 157, 180, 186, 98, 234,\n]);\n\nexport function getStakingAccountDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 8).encode(\n STAKING_ACCOUNT_DISCRIMINATOR,\n );\n}\n\nexport type StakingAccount = {\n discriminator: ReadonlyUint8Array;\n /** Owner of this staking account (can register multiple agents) */\n owner: Address;\n /** Amount of GHOST tokens staked */\n amountStaked: bigint;\n /** Timestamp when staking started */\n stakedAt: bigint;\n /** Lock duration in seconds (minimum 30 days) */\n lockDuration: bigint;\n /** Timestamp when unlock is available */\n unlockAt: bigint;\n /** Reputation boost percentage (in basis points, e.g., 500 = 5%) */\n reputationBoostBps: number;\n /** Whether agent has \"Verified\" badge */\n hasVerifiedBadge: boolean;\n /** Whether agent has premium listing benefits */\n hasPremiumBenefits: boolean;\n /** Total slashed amount (never recoverable) */\n totalSlashed: bigint;\n /** Current access tier based on stake amount */\n tier: AccessTier;\n /** Daily API calls remaining (resets every 24h) */\n apiCallsRemaining: number;\n /** Last API quota reset timestamp */\n lastQuotaReset: bigint;\n /** Voting power for governance (equals amount_staked) */\n votingPower: bigint;\n /** Bump for PDA */\n bump: number;\n};\n\nexport type StakingAccountArgs = {\n /** Owner of this staking account (can register multiple agents) */\n owner: Address;\n /** Amount of GHOST tokens staked */\n amountStaked: number | bigint;\n /** Timestamp when staking started */\n stakedAt: number | bigint;\n /** Lock duration in seconds (minimum 30 days) */\n lockDuration: number | bigint;\n /** Timestamp when unlock is available */\n unlockAt: number | bigint;\n /** Reputation boost percentage (in basis points, e.g., 500 = 5%) */\n reputationBoostBps: number;\n /** Whether agent has \"Verified\" badge */\n hasVerifiedBadge: boolean;\n /** Whether agent has premium listing benefits */\n hasPremiumBenefits: boolean;\n /** Total slashed amount (never recoverable) */\n totalSlashed: number | bigint;\n /** Current access tier based on stake amount */\n tier: AccessTierArgs;\n /** Daily API calls remaining (resets every 24h) */\n apiCallsRemaining: number;\n /** Last API quota reset timestamp */\n lastQuotaReset: number | bigint;\n /** Voting power for governance (equals amount_staked) */\n votingPower: number | bigint;\n /** Bump for PDA */\n bump: number;\n};\n\n/** Gets the encoder for {@link StakingAccountArgs} account data. */\nexport function getStakingAccountEncoder(): FixedSizeEncoder<StakingAccountArgs> {\n return transformEncoder(\n getStructEncoder([\n [\"discriminator\", fixEncoderSize(getBytesEncoder(), 8)],\n [\"owner\", getAddressEncoder()],\n [\"amountStaked\", getU64Encoder()],\n [\"stakedAt\", getI64Encoder()],\n [\"lockDuration\", getI64Encoder()],\n [\"unlockAt\", getI64Encoder()],\n [\"reputationBoostBps\", getU16Encoder()],\n [\"hasVerifiedBadge\", getBooleanEncoder()],\n [\"hasPremiumBenefits\", getBooleanEncoder()],\n [\"totalSlashed\", getU64Encoder()],\n [\"tier\", getAccessTierEncoder()],\n [\"apiCallsRemaining\", getU32Encoder()],\n [\"lastQuotaReset\", getI64Encoder()],\n [\"votingPower\", getU64Encoder()],\n [\"bump\", getU8Encoder()],\n ]),\n (value) => ({ ...value, discriminator: STAKING_ACCOUNT_DISCRIMINATOR }),\n );\n}\n\n/** Gets the decoder for {@link StakingAccount} account data. */\nexport function getStakingAccountDecoder(): FixedSizeDecoder<StakingAccount> {\n return getStructDecoder([\n [\"discriminator\", fixDecoderSize(getBytesDecoder(), 8)],\n [\"owner\", getAddressDecoder()],\n [\"amountStaked\", getU64Decoder()],\n [\"stakedAt\", getI64Decoder()],\n [\"lockDuration\", getI64Decoder()],\n [\"unlockAt\", getI64Decoder()],\n [\"reputationBoostBps\", getU16Decoder()],\n [\"hasVerifiedBadge\", getBooleanDecoder()],\n [\"hasPremiumBenefits\", getBooleanDecoder()],\n [\"totalSlashed\", getU64Decoder()],\n [\"tier\", getAccessTierDecoder()],\n [\"apiCallsRemaining\", getU32Decoder()],\n [\"lastQuotaReset\", getI64Decoder()],\n [\"votingPower\", getU64Decoder()],\n [\"bump\", getU8Decoder()],\n ]);\n}\n\n/** Gets the codec for {@link StakingAccount} account data. */\nexport function getStakingAccountCodec(): FixedSizeCodec<\n StakingAccountArgs,\n StakingAccount\n> {\n return combineCodec(getStakingAccountEncoder(), getStakingAccountDecoder());\n}\n\nexport function decodeStakingAccount<TAddress extends string = string>(\n encodedAccount: EncodedAccount<TAddress>,\n): Account<StakingAccount, TAddress>;\nexport function decodeStakingAccount<TAddress extends string = string>(\n encodedAccount: MaybeEncodedAccount<TAddress>,\n): MaybeAccount<StakingAccount, TAddress>;\nexport function decodeStakingAccount<TAddress extends string = string>(\n encodedAccount: EncodedAccount<TAddress> | MaybeEncodedAccount<TAddress>,\n): Account<StakingAccount, TAddress> | MaybeAccount<StakingAccount, TAddress> {\n return decodeAccount(\n encodedAccount as MaybeEncodedAccount<TAddress>,\n getStakingAccountDecoder(),\n );\n}\n\nexport async function fetchStakingAccount<TAddress extends string = string>(\n rpc: Parameters<typeof fetchEncodedAccount>[0],\n address: Address<TAddress>,\n config?: FetchAccountConfig,\n): Promise<Account<StakingAccount, TAddress>> {\n const maybeAccount = await fetchMaybeStakingAccount(rpc, address, config);\n assertAccountExists(maybeAccount);\n return maybeAccount;\n}\n\nexport async function fetchMaybeStakingAccount<\n TAddress extends string = string,\n>(\n rpc: Parameters<typeof fetchEncodedAccount>[0],\n address: Address<TAddress>,\n config?: FetchAccountConfig,\n): Promise<MaybeAccount<StakingAccount, TAddress>> {\n const maybeAccount = await fetchEncodedAccount(rpc, address, config);\n return decodeStakingAccount(maybeAccount);\n}\n\nexport async function fetchAllStakingAccount(\n rpc: Parameters<typeof fetchEncodedAccounts>[0],\n addresses: Array<Address>,\n config?: FetchAccountsConfig,\n): Promise<Account<StakingAccount>[]> {\n const maybeAccounts = await fetchAllMaybeStakingAccount(\n rpc,\n addresses,\n config,\n );\n assertAccountsExist(maybeAccounts);\n return maybeAccounts;\n}\n\nexport async function fetchAllMaybeStakingAccount(\n rpc: Parameters<typeof fetchEncodedAccounts>[0],\n addresses: Array<Address>,\n config?: FetchAccountsConfig,\n): Promise<MaybeAccount<StakingAccount>[]> {\n const maybeAccounts = await fetchEncodedAccounts(rpc, addresses, config);\n return maybeAccounts.map((maybeAccount) =>\n decodeStakingAccount(maybeAccount),\n );\n}\n\nexport function getStakingAccountSize(): number {\n return 106;\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 assertAccountExists,\n assertAccountsExist,\n combineCodec,\n decodeAccount,\n fetchEncodedAccount,\n fetchEncodedAccounts,\n fixDecoderSize,\n fixEncoderSize,\n getAddressDecoder,\n getAddressEncoder,\n getBytesDecoder,\n getBytesEncoder,\n getI64Decoder,\n getI64Encoder,\n getStructDecoder,\n getStructEncoder,\n getU16Decoder,\n getU16Encoder,\n getU64Decoder,\n getU64Encoder,\n getU8Decoder,\n getU8Encoder,\n transformEncoder,\n type Account,\n type Address,\n type EncodedAccount,\n type FetchAccountConfig,\n type FetchAccountsConfig,\n type FixedSizeCodec,\n type FixedSizeDecoder,\n type FixedSizeEncoder,\n type MaybeAccount,\n type MaybeEncodedAccount,\n type ReadonlyUint8Array,\n} from \"@solana/kit\";\n\nexport const STAKING_CONFIG_DISCRIMINATOR = new Uint8Array([\n 45, 134, 252, 82, 37, 57, 84, 25,\n]);\n\nexport function getStakingConfigDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 8).encode(\n STAKING_CONFIG_DISCRIMINATOR,\n );\n}\n\nexport type StakingConfig = {\n discriminator: ReadonlyUint8Array;\n /** Authority who can update staking parameters */\n authority: Address;\n /** Minimum stake amount (1,000 GHOST) */\n minStake: bigint;\n /** Minimum lock duration (30 days in seconds) */\n minLockDuration: bigint;\n /** Slash percentage for fraud (50% = 5000 bps) */\n fraudSlashBps: number;\n /** Slash percentage for dispute loss (10% = 1000 bps) */\n disputeSlashBps: number;\n /** Treasury account for slashed tokens */\n treasury: Address;\n bump: number;\n};\n\nexport type StakingConfigArgs = {\n /** Authority who can update staking parameters */\n authority: Address;\n /** Minimum stake amount (1,000 GHOST) */\n minStake: number | bigint;\n /** Minimum lock duration (30 days in seconds) */\n minLockDuration: number | bigint;\n /** Slash percentage for fraud (50% = 5000 bps) */\n fraudSlashBps: number;\n /** Slash percentage for dispute loss (10% = 1000 bps) */\n disputeSlashBps: number;\n /** Treasury account for slashed tokens */\n treasury: Address;\n bump: number;\n};\n\n/** Gets the encoder for {@link StakingConfigArgs} account data. */\nexport function getStakingConfigEncoder(): FixedSizeEncoder<StakingConfigArgs> {\n return transformEncoder(\n getStructEncoder([\n [\"discriminator\", fixEncoderSize(getBytesEncoder(), 8)],\n [\"authority\", getAddressEncoder()],\n [\"minStake\", getU64Encoder()],\n [\"minLockDuration\", getI64Encoder()],\n [\"fraudSlashBps\", getU16Encoder()],\n [\"disputeSlashBps\", getU16Encoder()],\n [\"treasury\", getAddressEncoder()],\n [\"bump\", getU8Encoder()],\n ]),\n (value) => ({ ...value, discriminator: STAKING_CONFIG_DISCRIMINATOR }),\n );\n}\n\n/** Gets the decoder for {@link StakingConfig} account data. */\nexport function getStakingConfigDecoder(): FixedSizeDecoder<StakingConfig> {\n return getStructDecoder([\n [\"discriminator\", fixDecoderSize(getBytesDecoder(), 8)],\n [\"authority\", getAddressDecoder()],\n [\"minStake\", getU64Decoder()],\n [\"minLockDuration\", getI64Decoder()],\n [\"fraudSlashBps\", getU16Decoder()],\n [\"disputeSlashBps\", getU16Decoder()],\n [\"treasury\", getAddressDecoder()],\n [\"bump\", getU8Decoder()],\n ]);\n}\n\n/** Gets the codec for {@link StakingConfig} account data. */\nexport function getStakingConfigCodec(): FixedSizeCodec<\n StakingConfigArgs,\n StakingConfig\n> {\n return combineCodec(getStakingConfigEncoder(), getStakingConfigDecoder());\n}\n\nexport function decodeStakingConfig<TAddress extends string = string>(\n encodedAccount: EncodedAccount<TAddress>,\n): Account<StakingConfig, TAddress>;\nexport function decodeStakingConfig<TAddress extends string = string>(\n encodedAccount: MaybeEncodedAccount<TAddress>,\n): MaybeAccount<StakingConfig, TAddress>;\nexport function decodeStakingConfig<TAddress extends string = string>(\n encodedAccount: EncodedAccount<TAddress> | MaybeEncodedAccount<TAddress>,\n): Account<StakingConfig, TAddress> | MaybeAccount<StakingConfig, TAddress> {\n return decodeAccount(\n encodedAccount as MaybeEncodedAccount<TAddress>,\n getStakingConfigDecoder(),\n );\n}\n\nexport async function fetchStakingConfig<TAddress extends string = string>(\n rpc: Parameters<typeof fetchEncodedAccount>[0],\n address: Address<TAddress>,\n config?: FetchAccountConfig,\n): Promise<Account<StakingConfig, TAddress>> {\n const maybeAccount = await fetchMaybeStakingConfig(rpc, address, config);\n assertAccountExists(maybeAccount);\n return maybeAccount;\n}\n\nexport async function fetchMaybeStakingConfig<TAddress extends string = string>(\n rpc: Parameters<typeof fetchEncodedAccount>[0],\n address: Address<TAddress>,\n config?: FetchAccountConfig,\n): Promise<MaybeAccount<StakingConfig, TAddress>> {\n const maybeAccount = await fetchEncodedAccount(rpc, address, config);\n return decodeStakingConfig(maybeAccount);\n}\n\nexport async function fetchAllStakingConfig(\n rpc: Parameters<typeof fetchEncodedAccounts>[0],\n addresses: Array<Address>,\n config?: FetchAccountsConfig,\n): Promise<Account<StakingConfig>[]> {\n const maybeAccounts = await fetchAllMaybeStakingConfig(\n rpc,\n addresses,\n config,\n );\n assertAccountsExist(maybeAccounts);\n return maybeAccounts;\n}\n\nexport async function fetchAllMaybeStakingConfig(\n rpc: Parameters<typeof fetchEncodedAccounts>[0],\n addresses: Array<Address>,\n config?: FetchAccountsConfig,\n): Promise<MaybeAccount<StakingConfig>[]> {\n const maybeAccounts = await fetchEncodedAccounts(rpc, addresses, config);\n return maybeAccounts.map((maybeAccount) => decodeStakingConfig(maybeAccount));\n}\n\nexport function getStakingConfigSize(): number {\n return 93;\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 assertAccountExists,\n assertAccountsExist,\n combineCodec,\n decodeAccount,\n fetchEncodedAccount,\n fetchEncodedAccounts,\n fixDecoderSize,\n fixEncoderSize,\n getAddressDecoder,\n getAddressEncoder,\n getBooleanDecoder,\n getBooleanEncoder,\n getBytesDecoder,\n getBytesEncoder,\n getI64Decoder,\n getI64Encoder,\n getStructDecoder,\n getStructEncoder,\n getU16Decoder,\n getU16Encoder,\n getU64Decoder,\n getU64Encoder,\n getU8Decoder,\n getU8Encoder,\n transformEncoder,\n type Account,\n type Address,\n type EncodedAccount,\n type FetchAccountConfig,\n type FetchAccountsConfig,\n type FixedSizeCodec,\n type FixedSizeDecoder,\n type FixedSizeEncoder,\n type MaybeAccount,\n type MaybeEncodedAccount,\n type ReadonlyUint8Array,\n} from \"@solana/kit\";\n\nexport const USER_REGISTRY_DISCRIMINATOR = new Uint8Array([\n 37, 84, 98, 14, 130, 63, 210, 138,\n]);\n\nexport function getUserRegistryDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 8).encode(\n USER_REGISTRY_DISCRIMINATOR,\n );\n}\n\nexport type UserRegistry = {\n discriminator: ReadonlyUint8Array;\n user: Address;\n agentCount: number;\n listingCount: number;\n workOrderCount: number;\n channelCount: number;\n totalVolumeTraded: bigint;\n lastActivity: bigint;\n createdAt: bigint;\n isRateLimited: boolean;\n rateLimitExpiry: bigint;\n lastExtensionRegistration: bigint;\n lastDisputeFiling: bigint;\n lastEvidenceSubmission: bigint;\n lastBatchExecution: bigint;\n lastDashboardUpdate: bigint;\n lastBulkDealCreation: bigint;\n lastDashboardCreation: bigint;\n bump: number;\n};\n\nexport type UserRegistryArgs = {\n user: Address;\n agentCount: number;\n listingCount: number;\n workOrderCount: number;\n channelCount: number;\n totalVolumeTraded: number | bigint;\n lastActivity: number | bigint;\n createdAt: number | bigint;\n isRateLimited: boolean;\n rateLimitExpiry: number | bigint;\n lastExtensionRegistration: number | bigint;\n lastDisputeFiling: number | bigint;\n lastEvidenceSubmission: number | bigint;\n lastBatchExecution: number | bigint;\n lastDashboardUpdate: number | bigint;\n lastBulkDealCreation: number | bigint;\n lastDashboardCreation: number | bigint;\n bump: number;\n};\n\n/** Gets the encoder for {@link UserRegistryArgs} account data. */\nexport function getUserRegistryEncoder(): FixedSizeEncoder<UserRegistryArgs> {\n return transformEncoder(\n getStructEncoder([\n [\"discriminator\", fixEncoderSize(getBytesEncoder(), 8)],\n [\"user\", getAddressEncoder()],\n [\"agentCount\", getU16Encoder()],\n [\"listingCount\", getU16Encoder()],\n [\"workOrderCount\", getU16Encoder()],\n [\"channelCount\", getU16Encoder()],\n [\"totalVolumeTraded\", getU64Encoder()],\n [\"lastActivity\", getI64Encoder()],\n [\"createdAt\", getI64Encoder()],\n [\"isRateLimited\", getBooleanEncoder()],\n [\"rateLimitExpiry\", getI64Encoder()],\n [\"lastExtensionRegistration\", getI64Encoder()],\n [\"lastDisputeFiling\", getI64Encoder()],\n [\"lastEvidenceSubmission\", getI64Encoder()],\n [\"lastBatchExecution\", getI64Encoder()],\n [\"lastDashboardUpdate\", getI64Encoder()],\n [\"lastBulkDealCreation\", getI64Encoder()],\n [\"lastDashboardCreation\", getI64Encoder()],\n [\"bump\", getU8Encoder()],\n ]),\n (value) => ({ ...value, discriminator: USER_REGISTRY_DISCRIMINATOR }),\n );\n}\n\n/** Gets the decoder for {@link UserRegistry} account data. */\nexport function getUserRegistryDecoder(): FixedSizeDecoder<UserRegistry> {\n return getStructDecoder([\n [\"discriminator\", fixDecoderSize(getBytesDecoder(), 8)],\n [\"user\", getAddressDecoder()],\n [\"agentCount\", getU16Decoder()],\n [\"listingCount\", getU16Decoder()],\n [\"workOrderCount\", getU16Decoder()],\n [\"channelCount\", getU16Decoder()],\n [\"totalVolumeTraded\", getU64Decoder()],\n [\"lastActivity\", getI64Decoder()],\n [\"createdAt\", getI64Decoder()],\n [\"isRateLimited\", getBooleanDecoder()],\n [\"rateLimitExpiry\", getI64Decoder()],\n [\"lastExtensionRegistration\", getI64Decoder()],\n [\"lastDisputeFiling\", getI64Decoder()],\n [\"lastEvidenceSubmission\", getI64Decoder()],\n [\"lastBatchExecution\", getI64Decoder()],\n [\"lastDashboardUpdate\", getI64Decoder()],\n [\"lastBulkDealCreation\", getI64Decoder()],\n [\"lastDashboardCreation\", getI64Decoder()],\n [\"bump\", getU8Decoder()],\n ]);\n}\n\n/** Gets the codec for {@link UserRegistry} account data. */\nexport function getUserRegistryCodec(): FixedSizeCodec<\n UserRegistryArgs,\n UserRegistry\n> {\n return combineCodec(getUserRegistryEncoder(), getUserRegistryDecoder());\n}\n\nexport function decodeUserRegistry<TAddress extends string = string>(\n encodedAccount: EncodedAccount<TAddress>,\n): Account<UserRegistry, TAddress>;\nexport function decodeUserRegistry<TAddress extends string = string>(\n encodedAccount: MaybeEncodedAccount<TAddress>,\n): MaybeAccount<UserRegistry, TAddress>;\nexport function decodeUserRegistry<TAddress extends string = string>(\n encodedAccount: EncodedAccount<TAddress> | MaybeEncodedAccount<TAddress>,\n): Account<UserRegistry, TAddress> | MaybeAccount<UserRegistry, TAddress> {\n return decodeAccount(\n encodedAccount as MaybeEncodedAccount<TAddress>,\n getUserRegistryDecoder(),\n );\n}\n\nexport async function fetchUserRegistry<TAddress extends string = string>(\n rpc: Parameters<typeof fetchEncodedAccount>[0],\n address: Address<TAddress>,\n config?: FetchAccountConfig,\n): Promise<Account<UserRegistry, TAddress>> {\n const maybeAccount = await fetchMaybeUserRegistry(rpc, address, config);\n assertAccountExists(maybeAccount);\n return maybeAccount;\n}\n\nexport async function fetchMaybeUserRegistry<TAddress extends string = string>(\n rpc: Parameters<typeof fetchEncodedAccount>[0],\n address: Address<TAddress>,\n config?: FetchAccountConfig,\n): Promise<MaybeAccount<UserRegistry, TAddress>> {\n const maybeAccount = await fetchEncodedAccount(rpc, address, config);\n return decodeUserRegistry(maybeAccount);\n}\n\nexport async function fetchAllUserRegistry(\n rpc: Parameters<typeof fetchEncodedAccounts>[0],\n addresses: Array<Address>,\n config?: FetchAccountsConfig,\n): Promise<Account<UserRegistry>[]> {\n const maybeAccounts = await fetchAllMaybeUserRegistry(rpc, addresses, config);\n assertAccountsExist(maybeAccounts);\n return maybeAccounts;\n}\n\nexport async function fetchAllMaybeUserRegistry(\n rpc: Parameters<typeof fetchEncodedAccounts>[0],\n addresses: Array<Address>,\n config?: FetchAccountsConfig,\n): Promise<MaybeAccount<UserRegistry>[]> {\n const maybeAccounts = await fetchEncodedAccounts(rpc, addresses, config);\n return maybeAccounts.map((maybeAccount) => decodeUserRegistry(maybeAccount));\n}\n\nexport function getUserRegistrySize(): number {\n return 138;\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 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/** AlreadyDeactivated: DID document is already deactivated */\nexport const GHOSTSPEAK_MARKETPLACE_ERROR__ALREADY_DEACTIVATED = 0x1770; // 6000\n/** TooManyVerificationMethods: Maximum number of verification methods reached */\nexport const GHOSTSPEAK_MARKETPLACE_ERROR__TOO_MANY_VERIFICATION_METHODS = 0x1771; // 6001\n/** TooManyServiceEndpoints: Maximum number of service endpoints reached */\nexport const GHOSTSPEAK_MARKETPLACE_ERROR__TOO_MANY_SERVICE_ENDPOINTS = 0x1772; // 6002\n/** DuplicateMethodId: Duplicate verification method ID */\nexport const GHOSTSPEAK_MARKETPLACE_ERROR__DUPLICATE_METHOD_ID = 0x1773; // 6003\n/** DuplicateServiceId: Duplicate service endpoint ID */\nexport const GHOSTSPEAK_MARKETPLACE_ERROR__DUPLICATE_SERVICE_ID = 0x1774; // 6004\n/** MethodNotFound: Verification method not found */\nexport const GHOSTSPEAK_MARKETPLACE_ERROR__METHOD_NOT_FOUND = 0x1775; // 6005\n/** ServiceNotFound: Service endpoint not found */\nexport const GHOSTSPEAK_MARKETPLACE_ERROR__SERVICE_NOT_FOUND = 0x1776; // 6006\n/** InvalidDidFormat: Invalid DID format */\nexport const GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_DID_FORMAT = 0x1777; // 6007\n/** UnauthorizedDidOperation: Unauthorized DID operation */\nexport const GHOSTSPEAK_MARKETPLACE_ERROR__UNAUTHORIZED_DID_OPERATION = 0x1778; // 6008\n/** DidDeactivated: DID is deactivated */\nexport const GHOSTSPEAK_MARKETPLACE_ERROR__DID_DEACTIVATED = 0x1779; // 6009\n\nexport type GhostspeakMarketplaceError =\n | typeof GHOSTSPEAK_MARKETPLACE_ERROR__ALREADY_DEACTIVATED\n | typeof GHOSTSPEAK_MARKETPLACE_ERROR__DID_DEACTIVATED\n | typeof GHOSTSPEAK_MARKETPLACE_ERROR__DUPLICATE_METHOD_ID\n | typeof GHOSTSPEAK_MARKETPLACE_ERROR__DUPLICATE_SERVICE_ID\n | typeof GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_DID_FORMAT\n | typeof GHOSTSPEAK_MARKETPLACE_ERROR__METHOD_NOT_FOUND\n | typeof GHOSTSPEAK_MARKETPLACE_ERROR__SERVICE_NOT_FOUND\n | typeof GHOSTSPEAK_MARKETPLACE_ERROR__TOO_MANY_SERVICE_ENDPOINTS\n | typeof GHOSTSPEAK_MARKETPLACE_ERROR__TOO_MANY_VERIFICATION_METHODS\n | typeof GHOSTSPEAK_MARKETPLACE_ERROR__UNAUTHORIZED_DID_OPERATION;\n\nlet ghostspeakMarketplaceErrorMessages:\n | Record<GhostspeakMarketplaceError, string>\n | undefined;\nif (process.env.NODE_ENV !== \"production\") {\n ghostspeakMarketplaceErrorMessages = {\n [GHOSTSPEAK_MARKETPLACE_ERROR__ALREADY_DEACTIVATED]: `DID document is already deactivated`,\n [GHOSTSPEAK_MARKETPLACE_ERROR__DID_DEACTIVATED]: `DID is deactivated`,\n [GHOSTSPEAK_MARKETPLACE_ERROR__DUPLICATE_METHOD_ID]: `Duplicate verification method ID`,\n [GHOSTSPEAK_MARKETPLACE_ERROR__DUPLICATE_SERVICE_ID]: `Duplicate service endpoint ID`,\n [GHOSTSPEAK_MARKETPLACE_ERROR__INVALID_DID_FORMAT]: `Invalid DID format`,\n [GHOSTSPEAK_MARKETPLACE_ERROR__METHOD_NOT_FOUND]: `Verification method not found`,\n [GHOSTSPEAK_MARKETPLACE_ERROR__SERVICE_NOT_FOUND]: `Service endpoint not found`,\n [GHOSTSPEAK_MARKETPLACE_ERROR__TOO_MANY_SERVICE_ENDPOINTS]: `Maximum number of service endpoints reached`,\n [GHOSTSPEAK_MARKETPLACE_ERROR__TOO_MANY_VERIFICATION_METHODS]: `Maximum number of verification methods reached`,\n [GHOSTSPEAK_MARKETPLACE_ERROR__UNAUTHORIZED_DID_OPERATION]: `Unauthorized DID operation`,\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 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 { 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 string | AccountMeta<string> =\n \"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 Address =\n 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 getUtf8Encoder().encode(expectSome(args.agentId)),\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 return Object.freeze({\n accounts: [\n getAccountMeta(accounts.agentAccount),\n getAccountMeta(accounts.signer),\n getAccountMeta(accounts.clock),\n ],\n data: getActivateAgentInstructionDataEncoder().encode(\n args as ActivateAgentInstructionDataArgs,\n ),\n programAddress,\n } as ActivateAgentInstruction<\n TProgramAddress,\n TAccountAgentAccount,\n TAccountSigner,\n TAccountClock\n >);\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 Address =\n 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 return Object.freeze({\n accounts: [\n getAccountMeta(accounts.agentAccount),\n getAccountMeta(accounts.signer),\n getAccountMeta(accounts.clock),\n ],\n data: getActivateAgentInstructionDataEncoder().encode(\n args as ActivateAgentInstructionDataArgs,\n ),\n programAddress,\n } as ActivateAgentInstruction<\n TProgramAddress,\n TAccountAgentAccount,\n TAccountSigner,\n TAccountClock\n >);\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 // TODO: Coded error.\n throw new Error(\"Not enough accounts\");\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = (instruction.accounts as TAccountMetas)[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 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 { GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS } from \"../programs\";\nimport { getAccountMetaFactory, type ResolvedAccount } from \"../shared\";\n\nexport const APPROVE_DELIVERY_DISCRIMINATOR = new Uint8Array([\n 28, 233, 51, 115, 33, 220, 41, 28,\n]);\n\nexport function getApproveDeliveryDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 8).encode(\n APPROVE_DELIVERY_DISCRIMINATOR,\n );\n}\n\nexport type ApproveDeliveryInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountEscrow extends string | AccountMeta<string> = string,\n TAccountEscrowVault extends string | AccountMeta<string> = string,\n TAccountAgentTokenAccount extends string | AccountMeta<string> = string,\n TAccountClient extends string | AccountMeta<string> = string,\n TAccountTokenProgram extends string | AccountMeta<string> =\n \"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA\",\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 TAccountEscrowVault extends string\n ? WritableAccount<TAccountEscrowVault>\n : TAccountEscrowVault,\n TAccountAgentTokenAccount extends string\n ? WritableAccount<TAccountAgentTokenAccount>\n : TAccountAgentTokenAccount,\n TAccountClient extends string\n ? ReadonlySignerAccount<TAccountClient> &\n AccountSignerMeta<TAccountClient>\n : TAccountClient,\n TAccountTokenProgram extends string\n ? ReadonlyAccount<TAccountTokenProgram>\n : TAccountTokenProgram,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type ApproveDeliveryInstructionData = {\n discriminator: ReadonlyUint8Array;\n};\n\nexport type ApproveDeliveryInstructionDataArgs = {};\n\nexport function getApproveDeliveryInstructionDataEncoder(): FixedSizeEncoder<ApproveDeliveryInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([[\"discriminator\", fixEncoderSize(getBytesEncoder(), 8)]]),\n (value) => ({ ...value, discriminator: APPROVE_DELIVERY_DISCRIMINATOR }),\n );\n}\n\nexport function getApproveDeliveryInstructionDataDecoder(): FixedSizeDecoder<ApproveDeliveryInstructionData> {\n return getStructDecoder([\n [\"discriminator\", fixDecoderSize(getBytesDecoder(), 8)],\n ]);\n}\n\nexport function getApproveDeliveryInstructionDataCodec(): FixedSizeCodec<\n ApproveDeliveryInstructionDataArgs,\n ApproveDeliveryInstructionData\n> {\n return combineCodec(\n getApproveDeliveryInstructionDataEncoder(),\n getApproveDeliveryInstructionDataDecoder(),\n );\n}\n\nexport type ApproveDeliveryInput<\n TAccountEscrow extends string = string,\n TAccountEscrowVault extends string = string,\n TAccountAgentTokenAccount extends string = string,\n TAccountClient extends string = string,\n TAccountTokenProgram extends string = string,\n> = {\n escrow: Address<TAccountEscrow>;\n escrowVault: Address<TAccountEscrowVault>;\n agentTokenAccount: Address<TAccountAgentTokenAccount>;\n client: TransactionSigner<TAccountClient>;\n tokenProgram?: Address<TAccountTokenProgram>;\n};\n\nexport function getApproveDeliveryInstruction<\n TAccountEscrow extends string,\n TAccountEscrowVault extends string,\n TAccountAgentTokenAccount extends string,\n TAccountClient extends string,\n TAccountTokenProgram extends string,\n TProgramAddress extends Address =\n typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: ApproveDeliveryInput<\n TAccountEscrow,\n TAccountEscrowVault,\n TAccountAgentTokenAccount,\n TAccountClient,\n TAccountTokenProgram\n >,\n config?: { programAddress?: TProgramAddress },\n): ApproveDeliveryInstruction<\n TProgramAddress,\n TAccountEscrow,\n TAccountEscrowVault,\n TAccountAgentTokenAccount,\n TAccountClient,\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 escrowVault: { value: input.escrowVault ?? null, isWritable: true },\n agentTokenAccount: {\n value: input.agentTokenAccount ?? null,\n isWritable: true,\n },\n client: { value: input.client ?? 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 \"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA\" as Address<\"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA\">;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, \"programId\");\n return Object.freeze({\n accounts: [\n getAccountMeta(accounts.escrow),\n getAccountMeta(accounts.escrowVault),\n getAccountMeta(accounts.agentTokenAccount),\n getAccountMeta(accounts.client),\n getAccountMeta(accounts.tokenProgram),\n ],\n data: getApproveDeliveryInstructionDataEncoder().encode({}),\n programAddress,\n } as ApproveDeliveryInstruction<\n TProgramAddress,\n TAccountEscrow,\n TAccountEscrowVault,\n TAccountAgentTokenAccount,\n TAccountClient,\n TAccountTokenProgram\n >);\n}\n\nexport type ParsedApproveDeliveryInstruction<\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 escrowVault: TAccountMetas[1];\n agentTokenAccount: TAccountMetas[2];\n client: TAccountMetas[3];\n tokenProgram: TAccountMetas[4];\n };\n data: ApproveDeliveryInstructionData;\n};\n\nexport function parseApproveDeliveryInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>,\n): ParsedApproveDeliveryInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 5) {\n // TODO: Coded error.\n throw new Error(\"Not enough accounts\");\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = (instruction.accounts as TAccountMetas)[accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n escrow: getNextAccount(),\n escrowVault: getNextAccount(),\n agentTokenAccount: getNextAccount(),\n client: getNextAccount(),\n tokenProgram: getNextAccount(),\n },\n data: getApproveDeliveryInstructionDataDecoder().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 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 { GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS } from \"../programs\";\nimport { getAccountMetaFactory, type ResolvedAccount } from \"../shared\";\nimport {\n getArbitratorDecisionDecoder,\n getArbitratorDecisionEncoder,\n type ArbitratorDecision,\n type ArbitratorDecisionArgs,\n} from \"../types\";\n\nexport const ARBITRATE_DISPUTE_DISCRIMINATOR = new Uint8Array([\n 225, 89, 166, 101, 215, 40, 191, 4,\n]);\n\nexport function getArbitrateDisputeDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 8).encode(\n ARBITRATE_DISPUTE_DISCRIMINATOR,\n );\n}\n\nexport type ArbitrateDisputeInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountEscrow extends string | AccountMeta<string> = string,\n TAccountEscrowVault extends string | AccountMeta<string> = string,\n TAccountAgentTokenAccount extends string | AccountMeta<string> = string,\n TAccountClientTokenAccount extends string | AccountMeta<string> = string,\n TAccountAgentStaking extends string | AccountMeta<string> = string,\n TAccountArbitrator extends string | AccountMeta<string> = string,\n TAccountTokenProgram extends string | AccountMeta<string> =\n \"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA\",\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 TAccountEscrowVault extends string\n ? WritableAccount<TAccountEscrowVault>\n : TAccountEscrowVault,\n TAccountAgentTokenAccount extends string\n ? WritableAccount<TAccountAgentTokenAccount>\n : TAccountAgentTokenAccount,\n TAccountClientTokenAccount extends string\n ? WritableAccount<TAccountClientTokenAccount>\n : TAccountClientTokenAccount,\n TAccountAgentStaking extends string\n ? WritableAccount<TAccountAgentStaking>\n : TAccountAgentStaking,\n TAccountArbitrator extends string\n ? ReadonlySignerAccount<TAccountArbitrator> &\n AccountSignerMeta<TAccountArbitrator>\n : TAccountArbitrator,\n TAccountTokenProgram extends string\n ? ReadonlyAccount<TAccountTokenProgram>\n : TAccountTokenProgram,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type ArbitrateDisputeInstructionData = {\n discriminator: ReadonlyUint8Array;\n decision: ArbitratorDecision;\n};\n\nexport type ArbitrateDisputeInstructionDataArgs = {\n decision: ArbitratorDecisionArgs;\n};\n\nexport function getArbitrateDisputeInstructionDataEncoder(): Encoder<ArbitrateDisputeInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n [\"discriminator\", fixEncoderSize(getBytesEncoder(), 8)],\n [\"decision\", getArbitratorDecisionEncoder()],\n ]),\n (value) => ({ ...value, discriminator: ARBITRATE_DISPUTE_DISCRIMINATOR }),\n );\n}\n\nexport function getArbitrateDisputeInstructionDataDecoder(): Decoder<ArbitrateDisputeInstructionData> {\n return getStructDecoder([\n [\"discriminator\", fixDecoderSize(getBytesDecoder(), 8)],\n [\"decision\", getArbitratorDecisionDecoder()],\n ]);\n}\n\nexport function getArbitrateDisputeInstructionDataCodec(): Codec<\n ArbitrateDisputeInstructionDataArgs,\n ArbitrateDisputeInstructionData\n> {\n return combineCodec(\n getArbitrateDisputeInstructionDataEncoder(),\n getArbitrateDisputeInstructionDataDecoder(),\n );\n}\n\nexport type ArbitrateDisputeInput<\n TAccountEscrow extends string = string,\n TAccountEscrowVault extends string = string,\n TAccountAgentTokenAccount extends string = string,\n TAccountClientTokenAccount extends string = string,\n TAccountAgentStaking extends string = string,\n TAccountArbitrator extends string = string,\n TAccountTokenProgram extends string = string,\n> = {\n escrow: Address<TAccountEscrow>;\n escrowVault: Address<TAccountEscrowVault>;\n agentTokenAccount: Address<TAccountAgentTokenAccount>;\n clientTokenAccount: Address<TAccountClientTokenAccount>;\n /** Agent's staking account (for potential slashing) */\n agentStaking: Address<TAccountAgentStaking>;\n arbitrator: TransactionSigner<TAccountArbitrator>;\n tokenProgram?: Address<TAccountTokenProgram>;\n decision: ArbitrateDisputeInstructionDataArgs[\"decision\"];\n};\n\nexport function getArbitrateDisputeInstruction<\n TAccountEscrow extends string,\n TAccountEscrowVault extends string,\n TAccountAgentTokenAccount extends string,\n TAccountClientTokenAccount extends string,\n TAccountAgentStaking extends string,\n TAccountArbitrator extends string,\n TAccountTokenProgram extends string,\n TProgramAddress extends Address =\n typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: ArbitrateDisputeInput<\n TAccountEscrow,\n TAccountEscrowVault,\n TAccountAgentTokenAccount,\n TAccountClientTokenAccount,\n TAccountAgentStaking,\n TAccountArbitrator,\n TAccountTokenProgram\n >,\n config?: { programAddress?: TProgramAddress },\n): ArbitrateDisputeInstruction<\n TProgramAddress,\n TAccountEscrow,\n TAccountEscrowVault,\n TAccountAgentTokenAccount,\n TAccountClientTokenAccount,\n TAccountAgentStaking,\n TAccountArbitrator,\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 escrowVault: { value: input.escrowVault ?? null, isWritable: true },\n agentTokenAccount: {\n value: input.agentTokenAccount ?? null,\n isWritable: true,\n },\n clientTokenAccount: {\n value: input.clientTokenAccount ?? null,\n isWritable: true,\n },\n agentStaking: { value: input.agentStaking ?? null, isWritable: true },\n arbitrator: { value: input.arbitrator ?? 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 \"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA\" as Address<\"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA\">;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, \"programId\");\n return Object.freeze({\n accounts: [\n getAccountMeta(accounts.escrow),\n getAccountMeta(accounts.escrowVault),\n getAccountMeta(accounts.agentTokenAccount),\n getAccountMeta(accounts.clientTokenAccount),\n getAccountMeta(accounts.agentStaking),\n getAccountMeta(accounts.arbitrator),\n getAccountMeta(accounts.tokenProgram),\n ],\n data: getArbitrateDisputeInstructionDataEncoder().encode(\n args as ArbitrateDisputeInstructionDataArgs,\n ),\n programAddress,\n } as ArbitrateDisputeInstruction<\n TProgramAddress,\n TAccountEscrow,\n TAccountEscrowVault,\n TAccountAgentTokenAccount,\n TAccountClientTokenAccount,\n TAccountAgentStaking,\n TAccountArbitrator,\n TAccountTokenProgram\n >);\n}\n\nexport type ParsedArbitrateDisputeInstruction<\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 escrowVault: TAccountMetas[1];\n agentTokenAccount: TAccountMetas[2];\n clientTokenAccount: TAccountMetas[3];\n /** Agent's staking account (for potential slashing) */\n agentStaking: TAccountMetas[4];\n arbitrator: TAccountMetas[5];\n tokenProgram: TAccountMetas[6];\n };\n data: ArbitrateDisputeInstructionData;\n};\n\nexport function parseArbitrateDisputeInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>,\n): ParsedArbitrateDisputeInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 7) {\n // TODO: Coded error.\n throw new Error(\"Not enough accounts\");\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = (instruction.accounts as TAccountMetas)[accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n escrow: getNextAccount(),\n escrowVault: getNextAccount(),\n agentTokenAccount: getNextAccount(),\n clientTokenAccount: getNextAccount(),\n agentStaking: getNextAccount(),\n arbitrator: getNextAccount(),\n tokenProgram: getNextAccount(),\n },\n data: getArbitrateDisputeInstructionDataDecoder().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 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 { GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS } from \"../programs\";\nimport {\n expectAddress,\n expectSome,\n getAccountMetaFactory,\n type ResolvedAccount,\n} from \"../shared\";\n\nexport const CREATE_CREDENTIAL_TEMPLATE_DISCRIMINATOR = new Uint8Array([\n 183, 109, 12, 128, 134, 8, 139, 144,\n]);\n\nexport function getCreateCredentialTemplateDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 8).encode(\n CREATE_CREDENTIAL_TEMPLATE_DISCRIMINATOR,\n );\n}\n\nexport type CreateCredentialTemplateInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountCredentialTemplate extends string | AccountMeta<string> = string,\n TAccountCredentialType extends string | AccountMeta<string> = string,\n TAccountIssuer extends string | AccountMeta<string> = string,\n TAccountSystemProgram extends string | AccountMeta<string> =\n \"11111111111111111111111111111111\",\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountCredentialTemplate extends string\n ? WritableAccount<TAccountCredentialTemplate>\n : TAccountCredentialTemplate,\n TAccountCredentialType extends string\n ? ReadonlyAccount<TAccountCredentialType>\n : TAccountCredentialType,\n TAccountIssuer extends string\n ? WritableSignerAccount<TAccountIssuer> &\n AccountSignerMeta<TAccountIssuer>\n : TAccountIssuer,\n TAccountSystemProgram extends string\n ? ReadonlyAccount<TAccountSystemProgram>\n : TAccountSystemProgram,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type CreateCredentialTemplateInstructionData = {\n discriminator: ReadonlyUint8Array;\n name: string;\n imageUri: string;\n crossmintTemplateId: Option<string>;\n};\n\nexport type CreateCredentialTemplateInstructionDataArgs = {\n name: string;\n imageUri: string;\n crossmintTemplateId: OptionOrNullable<string>;\n};\n\nexport function getCreateCredentialTemplateInstructionDataEncoder(): Encoder<CreateCredentialTemplateInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n [\"discriminator\", fixEncoderSize(getBytesEncoder(), 8)],\n [\"name\", addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder())],\n [\"imageUri\", addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder())],\n [\n \"crossmintTemplateId\",\n getOptionEncoder(\n addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder()),\n ),\n ],\n ]),\n (value) => ({\n ...value,\n discriminator: CREATE_CREDENTIAL_TEMPLATE_DISCRIMINATOR,\n }),\n );\n}\n\nexport function getCreateCredentialTemplateInstructionDataDecoder(): Decoder<CreateCredentialTemplateInstructionData> {\n return getStructDecoder([\n [\"discriminator\", fixDecoderSize(getBytesDecoder(), 8)],\n [\"name\", addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())],\n [\"imageUri\", addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())],\n [\n \"crossmintTemplateId\",\n getOptionDecoder(addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())),\n ],\n ]);\n}\n\nexport function getCreateCredentialTemplateInstructionDataCodec(): Codec<\n CreateCredentialTemplateInstructionDataArgs,\n CreateCredentialTemplateInstructionData\n> {\n return combineCodec(\n getCreateCredentialTemplateInstructionDataEncoder(),\n getCreateCredentialTemplateInstructionDataDecoder(),\n );\n}\n\nexport type CreateCredentialTemplateAsyncInput<\n TAccountCredentialTemplate extends string = string,\n TAccountCredentialType extends string = string,\n TAccountIssuer extends string = string,\n TAccountSystemProgram extends string = string,\n> = {\n credentialTemplate?: Address<TAccountCredentialTemplate>;\n credentialType: Address<TAccountCredentialType>;\n issuer: TransactionSigner<TAccountIssuer>;\n systemProgram?: Address<TAccountSystemProgram>;\n name: CreateCredentialTemplateInstructionDataArgs[\"name\"];\n imageUri: CreateCredentialTemplateInstructionDataArgs[\"imageUri\"];\n crossmintTemplateId: CreateCredentialTemplateInstructionDataArgs[\"crossmintTemplateId\"];\n};\n\nexport async function getCreateCredentialTemplateInstructionAsync<\n TAccountCredentialTemplate extends string,\n TAccountCredentialType extends string,\n TAccountIssuer extends string,\n TAccountSystemProgram extends string,\n TProgramAddress extends Address =\n typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: CreateCredentialTemplateAsyncInput<\n TAccountCredentialTemplate,\n TAccountCredentialType,\n TAccountIssuer,\n TAccountSystemProgram\n >,\n config?: { programAddress?: TProgramAddress },\n): Promise<\n CreateCredentialTemplateInstruction<\n TProgramAddress,\n TAccountCredentialTemplate,\n TAccountCredentialType,\n TAccountIssuer,\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 credentialTemplate: {\n value: input.credentialTemplate ?? null,\n isWritable: true,\n },\n credentialType: { value: input.credentialType ?? null, isWritable: false },\n issuer: { value: input.issuer ?? 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.credentialTemplate.value) {\n accounts.credentialTemplate.value = await getProgramDerivedAddress({\n programAddress,\n seeds: [\n getBytesEncoder().encode(\n new Uint8Array([\n 99, 114, 101, 100, 101, 110, 116, 105, 97, 108, 95, 116, 101, 109,\n 112, 108, 97, 116, 101,\n ]),\n ),\n getAddressEncoder().encode(\n expectAddress(accounts.credentialType.value),\n ),\n getUtf8Encoder().encode(expectSome(args.name)),\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 return Object.freeze({\n accounts: [\n getAccountMeta(accounts.credentialTemplate),\n getAccountMeta(accounts.credentialType),\n getAccountMeta(accounts.issuer),\n getAccountMeta(accounts.systemProgram),\n ],\n data: getCreateCredentialTemplateInstructionDataEncoder().encode(\n args as CreateCredentialTemplateInstructionDataArgs,\n ),\n programAddress,\n } as CreateCredentialTemplateInstruction<\n TProgramAddress,\n TAccountCredentialTemplate,\n TAccountCredentialType,\n TAccountIssuer,\n TAccountSystemProgram\n >);\n}\n\nexport type CreateCredentialTemplateInput<\n TAccountCredentialTemplate extends string = string,\n TAccountCredentialType extends string = string,\n TAccountIssuer extends string = string,\n TAccountSystemProgram extends string = string,\n> = {\n credentialTemplate: Address<TAccountCredentialTemplate>;\n credentialType: Address<TAccountCredentialType>;\n issuer: TransactionSigner<TAccountIssuer>;\n systemProgram?: Address<TAccountSystemProgram>;\n name: CreateCredentialTemplateInstructionDataArgs[\"name\"];\n imageUri: CreateCredentialTemplateInstructionDataArgs[\"imageUri\"];\n crossmintTemplateId: CreateCredentialTemplateInstructionDataArgs[\"crossmintTemplateId\"];\n};\n\nexport function getCreateCredentialTemplateInstruction<\n TAccountCredentialTemplate extends string,\n TAccountCredentialType extends string,\n TAccountIssuer extends string,\n TAccountSystemProgram extends string,\n TProgramAddress extends Address =\n typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: CreateCredentialTemplateInput<\n TAccountCredentialTemplate,\n TAccountCredentialType,\n TAccountIssuer,\n TAccountSystemProgram\n >,\n config?: { programAddress?: TProgramAddress },\n): CreateCredentialTemplateInstruction<\n TProgramAddress,\n TAccountCredentialTemplate,\n TAccountCredentialType,\n TAccountIssuer,\n TAccountSystemProgram\n> {\n // Program address.\n const programAddress =\n config?.programAddress ?? GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n credentialTemplate: {\n value: input.credentialTemplate ?? null,\n isWritable: true,\n },\n credentialType: { value: input.credentialType ?? null, isWritable: false },\n issuer: { value: input.issuer ?? 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 return Object.freeze({\n accounts: [\n getAccountMeta(accounts.credentialTemplate),\n getAccountMeta(accounts.credentialType),\n getAccountMeta(accounts.issuer),\n getAccountMeta(accounts.systemProgram),\n ],\n data: getCreateCredentialTemplateInstructionDataEncoder().encode(\n args as CreateCredentialTemplateInstructionDataArgs,\n ),\n programAddress,\n } as CreateCredentialTemplateInstruction<\n TProgramAddress,\n TAccountCredentialTemplate,\n TAccountCredentialType,\n TAccountIssuer,\n TAccountSystemProgram\n >);\n}\n\nexport type ParsedCreateCredentialTemplateInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n credentialTemplate: TAccountMetas[0];\n credentialType: TAccountMetas[1];\n issuer: TAccountMetas[2];\n systemProgram: TAccountMetas[3];\n };\n data: CreateCredentialTemplateInstructionData;\n};\n\nexport function parseCreateCredentialTemplateInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>,\n): ParsedCreateCredentialTemplateInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 4) {\n // TODO: Coded error.\n throw new Error(\"Not enough accounts\");\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = (instruction.accounts as TAccountMetas)[accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n credentialTemplate: getNextAccount(),\n credentialType: getNextAccount(),\n issuer: getNextAccount(),\n systemProgram: getNextAccount(),\n },\n data: getCreateCredentialTemplateInstructionDataDecoder().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 { GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS } from \"../programs\";\nimport {\n expectSome,\n getAccountMetaFactory,\n type ResolvedAccount,\n} from \"../shared\";\nimport {\n getCredentialKindDecoder,\n getCredentialKindEncoder,\n type CredentialKind,\n type CredentialKindArgs,\n} from \"../types\";\n\nexport const CREATE_CREDENTIAL_TYPE_DISCRIMINATOR = new Uint8Array([\n 211, 208, 67, 175, 20, 248, 8, 227,\n]);\n\nexport function getCreateCredentialTypeDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 8).encode(\n CREATE_CREDENTIAL_TYPE_DISCRIMINATOR,\n );\n}\n\nexport type CreateCredentialTypeInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountCredentialType extends string | AccountMeta<string> = string,\n TAccountAuthority extends string | AccountMeta<string> = string,\n TAccountSystemProgram extends string | AccountMeta<string> =\n \"11111111111111111111111111111111\",\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountCredentialType extends string\n ? WritableAccount<TAccountCredentialType>\n : TAccountCredentialType,\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 CreateCredentialTypeInstructionData = {\n discriminator: ReadonlyUint8Array;\n name: string;\n kind: CredentialKind;\n schemaUri: string;\n description: string;\n};\n\nexport type CreateCredentialTypeInstructionDataArgs = {\n name: string;\n kind: CredentialKindArgs;\n schemaUri: string;\n description: string;\n};\n\nexport function getCreateCredentialTypeInstructionDataEncoder(): Encoder<CreateCredentialTypeInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n [\"discriminator\", fixEncoderSize(getBytesEncoder(), 8)],\n [\"name\", addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder())],\n [\"kind\", getCredentialKindEncoder()],\n [\"schemaUri\", addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder())],\n [\"description\", addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder())],\n ]),\n (value) => ({\n ...value,\n discriminator: CREATE_CREDENTIAL_TYPE_DISCRIMINATOR,\n }),\n );\n}\n\nexport function getCreateCredentialTypeInstructionDataDecoder(): Decoder<CreateCredentialTypeInstructionData> {\n return getStructDecoder([\n [\"discriminator\", fixDecoderSize(getBytesDecoder(), 8)],\n [\"name\", addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())],\n [\"kind\", getCredentialKindDecoder()],\n [\"schemaUri\", addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())],\n [\"description\", addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())],\n ]);\n}\n\nexport function getCreateCredentialTypeInstructionDataCodec(): Codec<\n CreateCredentialTypeInstructionDataArgs,\n CreateCredentialTypeInstructionData\n> {\n return combineCodec(\n getCreateCredentialTypeInstructionDataEncoder(),\n getCreateCredentialTypeInstructionDataDecoder(),\n );\n}\n\nexport type CreateCredentialTypeAsyncInput<\n TAccountCredentialType extends string = string,\n TAccountAuthority extends string = string,\n TAccountSystemProgram extends string = string,\n> = {\n credentialType?: Address<TAccountCredentialType>;\n authority: TransactionSigner<TAccountAuthority>;\n systemProgram?: Address<TAccountSystemProgram>;\n name: CreateCredentialTypeInstructionDataArgs[\"name\"];\n kind: CreateCredentialTypeInstructionDataArgs[\"kind\"];\n schemaUri: CreateCredentialTypeInstructionDataArgs[\"schemaUri\"];\n description: CreateCredentialTypeInstructionDataArgs[\"description\"];\n};\n\nexport async function getCreateCredentialTypeInstructionAsync<\n TAccountCredentialType extends string,\n TAccountAuthority extends string,\n TAccountSystemProgram extends string,\n TProgramAddress extends Address =\n typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: CreateCredentialTypeAsyncInput<\n TAccountCredentialType,\n TAccountAuthority,\n TAccountSystemProgram\n >,\n config?: { programAddress?: TProgramAddress },\n): Promise<\n CreateCredentialTypeInstruction<\n TProgramAddress,\n TAccountCredentialType,\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 credentialType: { value: input.credentialType ?? 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.credentialType.value) {\n accounts.credentialType.value = await getProgramDerivedAddress({\n programAddress,\n seeds: [\n getBytesEncoder().encode(\n new Uint8Array([\n 99, 114, 101, 100, 101, 110, 116, 105, 97, 108, 95, 116, 121, 112,\n 101,\n ]),\n ),\n getUtf8Encoder().encode(expectSome(args.name)),\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 return Object.freeze({\n accounts: [\n getAccountMeta(accounts.credentialType),\n getAccountMeta(accounts.authority),\n getAccountMeta(accounts.systemProgram),\n ],\n data: getCreateCredentialTypeInstructionDataEncoder().encode(\n args as CreateCredentialTypeInstructionDataArgs,\n ),\n programAddress,\n } as CreateCredentialTypeInstruction<\n TProgramAddress,\n TAccountCredentialType,\n TAccountAuthority,\n TAccountSystemProgram\n >);\n}\n\nexport type CreateCredentialTypeInput<\n TAccountCredentialType extends string = string,\n TAccountAuthority extends string = string,\n TAccountSystemProgram extends string = string,\n> = {\n credentialType: Address<TAccountCredentialType>;\n authority: TransactionSigner<TAccountAuthority>;\n systemProgram?: Address<TAccountSystemProgram>;\n name: CreateCredentialTypeInstructionDataArgs[\"name\"];\n kind: CreateCredentialTypeInstructionDataArgs[\"kind\"];\n schemaUri: CreateCredentialTypeInstructionDataArgs[\"schemaUri\"];\n description: CreateCredentialTypeInstructionDataArgs[\"description\"];\n};\n\nexport function getCreateCredentialTypeInstruction<\n TAccountCredentialType extends string,\n TAccountAuthority extends string,\n TAccountSystemProgram extends string,\n TProgramAddress extends Address =\n typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: CreateCredentialTypeInput<\n TAccountCredentialType,\n TAccountAuthority,\n TAccountSystemProgram\n >,\n config?: { programAddress?: TProgramAddress },\n): CreateCredentialTypeInstruction<\n TProgramAddress,\n TAccountCredentialType,\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 credentialType: { value: input.credentialType ?? 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 return Object.freeze({\n accounts: [\n getAccountMeta(accounts.credentialType),\n getAccountMeta(accounts.authority),\n getAccountMeta(accounts.systemProgram),\n ],\n data: getCreateCredentialTypeInstructionDataEncoder().encode(\n args as CreateCredentialTypeInstructionDataArgs,\n ),\n programAddress,\n } as CreateCredentialTypeInstruction<\n TProgramAddress,\n TAccountCredentialType,\n TAccountAuthority,\n TAccountSystemProgram\n >);\n}\n\nexport type ParsedCreateCredentialTypeInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n credentialType: TAccountMetas[0];\n authority: TAccountMetas[1];\n systemProgram: TAccountMetas[2];\n };\n data: CreateCredentialTypeInstructionData;\n};\n\nexport function parseCreateCredentialTypeInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>,\n): ParsedCreateCredentialTypeInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 3) {\n // TODO: Coded error.\n throw new Error(\"Not enough accounts\");\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = (instruction.accounts as TAccountMetas)[accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n credentialType: getNextAccount(),\n authority: getNextAccount(),\n systemProgram: getNextAccount(),\n },\n data: getCreateCredentialTypeInstructionDataDecoder().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 getServiceEndpointDecoder,\n getServiceEndpointEncoder,\n getVerificationMethodDecoder,\n getVerificationMethodEncoder,\n type ServiceEndpoint,\n type ServiceEndpointArgs,\n type VerificationMethod,\n type VerificationMethodArgs,\n} from \"../types\";\n\nexport const CREATE_DID_DOCUMENT_DISCRIMINATOR = new Uint8Array([\n 253, 40, 200, 239, 69, 147, 82, 182,\n]);\n\nexport function getCreateDidDocumentDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 8).encode(\n CREATE_DID_DOCUMENT_DISCRIMINATOR,\n );\n}\n\nexport type CreateDidDocumentInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountDidDocument extends string | AccountMeta<string> = string,\n TAccountController extends string | AccountMeta<string> = string,\n TAccountSystemProgram extends string | AccountMeta<string> =\n \"11111111111111111111111111111111\",\n TAccountClock extends string | AccountMeta<string> =\n \"SysvarC1ock11111111111111111111111111111111\",\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountDidDocument extends string\n ? WritableAccount<TAccountDidDocument>\n : TAccountDidDocument,\n TAccountController extends string\n ? WritableSignerAccount<TAccountController> &\n AccountSignerMeta<TAccountController>\n : TAccountController,\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 CreateDidDocumentInstructionData = {\n discriminator: ReadonlyUint8Array;\n didString: string;\n verificationMethods: Array<VerificationMethod>;\n serviceEndpoints: Array<ServiceEndpoint>;\n};\n\nexport type CreateDidDocumentInstructionDataArgs = {\n didString: string;\n verificationMethods: Array<VerificationMethodArgs>;\n serviceEndpoints: Array<ServiceEndpointArgs>;\n};\n\nexport function getCreateDidDocumentInstructionDataEncoder(): Encoder<CreateDidDocumentInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n [\"discriminator\", fixEncoderSize(getBytesEncoder(), 8)],\n [\"didString\", addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder())],\n [\"verificationMethods\", getArrayEncoder(getVerificationMethodEncoder())],\n [\"serviceEndpoints\", getArrayEncoder(getServiceEndpointEncoder())],\n ]),\n (value) => ({ ...value, discriminator: CREATE_DID_DOCUMENT_DISCRIMINATOR }),\n );\n}\n\nexport function getCreateDidDocumentInstructionDataDecoder(): Decoder<CreateDidDocumentInstructionData> {\n return getStructDecoder([\n [\"discriminator\", fixDecoderSize(getBytesDecoder(), 8)],\n [\"didString\", addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())],\n [\"verificationMethods\", getArrayDecoder(getVerificationMethodDecoder())],\n [\"serviceEndpoints\", getArrayDecoder(getServiceEndpointDecoder())],\n ]);\n}\n\nexport function getCreateDidDocumentInstructionDataCodec(): Codec<\n CreateDidDocumentInstructionDataArgs,\n CreateDidDocumentInstructionData\n> {\n return combineCodec(\n getCreateDidDocumentInstructionDataEncoder(),\n getCreateDidDocumentInstructionDataDecoder(),\n );\n}\n\nexport type CreateDidDocumentAsyncInput<\n TAccountDidDocument extends string = string,\n TAccountController extends string = string,\n TAccountSystemProgram extends string = string,\n TAccountClock extends string = string,\n> = {\n /** DID document account with canonical PDA */\n didDocument?: Address<TAccountDidDocument>;\n /** Controller of the DID (owner) */\n controller: TransactionSigner<TAccountController>;\n /** System program for account creation */\n systemProgram?: Address<TAccountSystemProgram>;\n /** Clock sysvar for timestamp validation */\n clock?: Address<TAccountClock>;\n didString: CreateDidDocumentInstructionDataArgs[\"didString\"];\n verificationMethods: CreateDidDocumentInstructionDataArgs[\"verificationMethods\"];\n serviceEndpoints: CreateDidDocumentInstructionDataArgs[\"serviceEndpoints\"];\n};\n\nexport async function getCreateDidDocumentInstructionAsync<\n TAccountDidDocument extends string,\n TAccountController extends string,\n TAccountSystemProgram extends string,\n TAccountClock extends string,\n TProgramAddress extends Address =\n typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: CreateDidDocumentAsyncInput<\n TAccountDidDocument,\n TAccountController,\n TAccountSystemProgram,\n TAccountClock\n >,\n config?: { programAddress?: TProgramAddress },\n): Promise<\n CreateDidDocumentInstruction<\n TProgramAddress,\n TAccountDidDocument,\n TAccountController,\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 didDocument: { value: input.didDocument ?? null, isWritable: true },\n controller: { value: input.controller ?? 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.didDocument.value) {\n accounts.didDocument.value = await getProgramDerivedAddress({\n programAddress,\n seeds: [\n getBytesEncoder().encode(\n new Uint8Array([\n 100, 105, 100, 95, 100, 111, 99, 117, 109, 101, 110, 116,\n ]),\n ),\n getAddressEncoder().encode(expectAddress(accounts.controller.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 return Object.freeze({\n accounts: [\n getAccountMeta(accounts.didDocument),\n getAccountMeta(accounts.controller),\n getAccountMeta(accounts.systemProgram),\n getAccountMeta(accounts.clock),\n ],\n data: getCreateDidDocumentInstructionDataEncoder().encode(\n args as CreateDidDocumentInstructionDataArgs,\n ),\n programAddress,\n } as CreateDidDocumentInstruction<\n TProgramAddress,\n TAccountDidDocument,\n TAccountController,\n TAccountSystemProgram,\n TAccountClock\n >);\n}\n\nexport type CreateDidDocumentInput<\n TAccountDidDocument extends string = string,\n TAccountController extends string = string,\n TAccountSystemProgram extends string = string,\n TAccountClock extends string = string,\n> = {\n /** DID document account with canonical PDA */\n didDocument: Address<TAccountDidDocument>;\n /** Controller of the DID (owner) */\n controller: TransactionSigner<TAccountController>;\n /** System program for account creation */\n systemProgram?: Address<TAccountSystemProgram>;\n /** Clock sysvar for timestamp validation */\n clock?: Address<TAccountClock>;\n didString: CreateDidDocumentInstructionDataArgs[\"didString\"];\n verificationMethods: CreateDidDocumentInstructionDataArgs[\"verificationMethods\"];\n serviceEndpoints: CreateDidDocumentInstructionDataArgs[\"serviceEndpoints\"];\n};\n\nexport function getCreateDidDocumentInstruction<\n TAccountDidDocument extends string,\n TAccountController extends string,\n TAccountSystemProgram extends string,\n TAccountClock extends string,\n TProgramAddress extends Address =\n typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: CreateDidDocumentInput<\n TAccountDidDocument,\n TAccountController,\n TAccountSystemProgram,\n TAccountClock\n >,\n config?: { programAddress?: TProgramAddress },\n): CreateDidDocumentInstruction<\n TProgramAddress,\n TAccountDidDocument,\n TAccountController,\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 didDocument: { value: input.didDocument ?? null, isWritable: true },\n controller: { value: input.controller ?? 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 return Object.freeze({\n accounts: [\n getAccountMeta(accounts.didDocument),\n getAccountMeta(accounts.controller),\n getAccountMeta(accounts.systemProgram),\n getAccountMeta(accounts.clock),\n ],\n data: getCreateDidDocumentInstructionDataEncoder().encode(\n args as CreateDidDocumentInstructionDataArgs,\n ),\n programAddress,\n } as CreateDidDocumentInstruction<\n TProgramAddress,\n TAccountDidDocument,\n TAccountController,\n TAccountSystemProgram,\n TAccountClock\n >);\n}\n\nexport type ParsedCreateDidDocumentInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n /** DID document account with canonical PDA */\n didDocument: TAccountMetas[0];\n /** Controller of the DID (owner) */\n controller: 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: CreateDidDocumentInstructionData;\n};\n\nexport function parseCreateDidDocumentInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>,\n): ParsedCreateDidDocumentInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 4) {\n // TODO: Coded error.\n throw new Error(\"Not enough accounts\");\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = (instruction.accounts as TAccountMetas)[accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n didDocument: getNextAccount(),\n controller: getNextAccount(),\n systemProgram: getNextAccount(),\n clock: getNextAccount(),\n },\n data: getCreateDidDocumentInstructionDataDecoder().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 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 { 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 TAccountAgent extends string | AccountMeta<string> = string,\n TAccountClientTokenAccount extends string | AccountMeta<string> = string,\n TAccountEscrowVault extends string | AccountMeta<string> = string,\n TAccountTokenMint extends string | AccountMeta<string> = string,\n TAccountClient extends string | AccountMeta<string> = string,\n TAccountTokenProgram extends string | AccountMeta<string> =\n \"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA\",\n TAccountSystemProgram extends string | AccountMeta<string> =\n \"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 TAccountAgent extends string\n ? ReadonlyAccount<TAccountAgent>\n : TAccountAgent,\n TAccountClientTokenAccount extends string\n ? WritableAccount<TAccountClientTokenAccount>\n : TAccountClientTokenAccount,\n TAccountEscrowVault extends string\n ? WritableAccount<TAccountEscrowVault>\n : TAccountEscrowVault,\n TAccountTokenMint extends string\n ? ReadonlyAccount<TAccountTokenMint>\n : TAccountTokenMint,\n TAccountClient extends string\n ? WritableSignerAccount<TAccountClient> &\n AccountSignerMeta<TAccountClient>\n : TAccountClient,\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 CreateEscrowInstructionData = {\n discriminator: ReadonlyUint8Array;\n escrowId: bigint;\n amount: bigint;\n jobDescription: string;\n deadline: bigint;\n};\n\nexport type CreateEscrowInstructionDataArgs = {\n escrowId: number | bigint;\n amount: number | bigint;\n jobDescription: string;\n deadline: number | bigint;\n};\n\nexport function getCreateEscrowInstructionDataEncoder(): Encoder<CreateEscrowInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n [\"discriminator\", fixEncoderSize(getBytesEncoder(), 8)],\n [\"escrowId\", getU64Encoder()],\n [\"amount\", getU64Encoder()],\n [\n \"jobDescription\",\n addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder()),\n ],\n [\"deadline\", getI64Encoder()],\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 [\"escrowId\", getU64Decoder()],\n [\"amount\", getU64Decoder()],\n [\"jobDescription\", addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())],\n [\"deadline\", getI64Decoder()],\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 TAccountAgent extends string = string,\n TAccountClientTokenAccount extends string = string,\n TAccountEscrowVault extends string = string,\n TAccountTokenMint extends string = string,\n TAccountClient extends string = string,\n TAccountTokenProgram extends string = string,\n TAccountSystemProgram extends string = string,\n> = {\n escrow?: Address<TAccountEscrow>;\n agent: Address<TAccountAgent>;\n clientTokenAccount: Address<TAccountClientTokenAccount>;\n escrowVault: Address<TAccountEscrowVault>;\n tokenMint: Address<TAccountTokenMint>;\n client: TransactionSigner<TAccountClient>;\n tokenProgram?: Address<TAccountTokenProgram>;\n systemProgram?: Address<TAccountSystemProgram>;\n escrowId: CreateEscrowInstructionDataArgs[\"escrowId\"];\n amount: CreateEscrowInstructionDataArgs[\"amount\"];\n jobDescription: CreateEscrowInstructionDataArgs[\"jobDescription\"];\n deadline: CreateEscrowInstructionDataArgs[\"deadline\"];\n};\n\nexport async function getCreateEscrowInstructionAsync<\n TAccountEscrow extends string,\n TAccountAgent extends string,\n TAccountClientTokenAccount extends string,\n TAccountEscrowVault extends string,\n TAccountTokenMint extends string,\n TAccountClient extends string,\n TAccountTokenProgram extends string,\n TAccountSystemProgram extends string,\n TProgramAddress extends Address =\n typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: CreateEscrowAsyncInput<\n TAccountEscrow,\n TAccountAgent,\n TAccountClientTokenAccount,\n TAccountEscrowVault,\n TAccountTokenMint,\n TAccountClient,\n TAccountTokenProgram,\n TAccountSystemProgram\n >,\n config?: { programAddress?: TProgramAddress },\n): Promise<\n CreateEscrowInstruction<\n TProgramAddress,\n TAccountEscrow,\n TAccountAgent,\n TAccountClientTokenAccount,\n TAccountEscrowVault,\n TAccountTokenMint,\n TAccountClient,\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 escrow: { value: input.escrow ?? null, isWritable: true },\n agent: { value: input.agent ?? null, isWritable: false },\n clientTokenAccount: {\n value: input.clientTokenAccount ?? null,\n isWritable: true,\n },\n escrowVault: { value: input.escrowVault ?? null, isWritable: true },\n tokenMint: { value: input.tokenMint ?? null, isWritable: false },\n client: { value: input.client ?? 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.escrow.value) {\n accounts.escrow.value = await getProgramDerivedAddress({\n programAddress,\n seeds: [\n getBytesEncoder().encode(\n new Uint8Array([\n 103, 104, 111, 115, 116, 95, 112, 114, 111, 116, 101, 99, 116,\n ]),\n ),\n getAddressEncoder().encode(expectAddress(accounts.client.value)),\n getU64Encoder().encode(expectSome(args.escrowId)),\n ],\n });\n }\n if (!accounts.tokenProgram.value) {\n accounts.tokenProgram.value =\n \"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA\" as Address<\"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA\">;\n }\n if (!accounts.systemProgram.value) {\n accounts.systemProgram.value =\n \"11111111111111111111111111111111\" as Address<\"11111111111111111111111111111111\">;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, \"programId\");\n return Object.freeze({\n accounts: [\n getAccountMeta(accounts.escrow),\n getAccountMeta(accounts.agent),\n getAccountMeta(accounts.clientTokenAccount),\n getAccountMeta(accounts.escrowVault),\n getAccountMeta(accounts.tokenMint),\n getAccountMeta(accounts.client),\n getAccountMeta(accounts.tokenProgram),\n getAccountMeta(accounts.systemProgram),\n ],\n data: getCreateEscrowInstructionDataEncoder().encode(\n args as CreateEscrowInstructionDataArgs,\n ),\n programAddress,\n } as CreateEscrowInstruction<\n TProgramAddress,\n TAccountEscrow,\n TAccountAgent,\n TAccountClientTokenAccount,\n TAccountEscrowVault,\n TAccountTokenMint,\n TAccountClient,\n TAccountTokenProgram,\n TAccountSystemProgram\n >);\n}\n\nexport type CreateEscrowInput<\n TAccountEscrow extends string = string,\n TAccountAgent extends string = string,\n TAccountClientTokenAccount extends string = string,\n TAccountEscrowVault extends string = string,\n TAccountTokenMint extends string = string,\n TAccountClient extends string = string,\n TAccountTokenProgram extends string = string,\n TAccountSystemProgram extends string = string,\n> = {\n escrow: Address<TAccountEscrow>;\n agent: Address<TAccountAgent>;\n clientTokenAccount: Address<TAccountClientTokenAccount>;\n escrowVault: Address<TAccountEscrowVault>;\n tokenMint: Address<TAccountTokenMint>;\n client: TransactionSigner<TAccountClient>;\n tokenProgram?: Address<TAccountTokenProgram>;\n systemProgram?: Address<TAccountSystemProgram>;\n escrowId: CreateEscrowInstructionDataArgs[\"escrowId\"];\n amount: CreateEscrowInstructionDataArgs[\"amount\"];\n jobDescription: CreateEscrowInstructionDataArgs[\"jobDescription\"];\n deadline: CreateEscrowInstructionDataArgs[\"deadline\"];\n};\n\nexport function getCreateEscrowInstruction<\n TAccountEscrow extends string,\n TAccountAgent extends string,\n TAccountClientTokenAccount extends string,\n TAccountEscrowVault extends string,\n TAccountTokenMint extends string,\n TAccountClient extends string,\n TAccountTokenProgram extends string,\n TAccountSystemProgram extends string,\n TProgramAddress extends Address =\n typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: CreateEscrowInput<\n TAccountEscrow,\n TAccountAgent,\n TAccountClientTokenAccount,\n TAccountEscrowVault,\n TAccountTokenMint,\n TAccountClient,\n TAccountTokenProgram,\n TAccountSystemProgram\n >,\n config?: { programAddress?: TProgramAddress },\n): CreateEscrowInstruction<\n TProgramAddress,\n TAccountEscrow,\n TAccountAgent,\n TAccountClientTokenAccount,\n TAccountEscrowVault,\n TAccountTokenMint,\n TAccountClient,\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 escrow: { value: input.escrow ?? null, isWritable: true },\n agent: { value: input.agent ?? null, isWritable: false },\n clientTokenAccount: {\n value: input.clientTokenAccount ?? null,\n isWritable: true,\n },\n escrowVault: { value: input.escrowVault ?? null, isWritable: true },\n tokenMint: { value: input.tokenMint ?? null, isWritable: false },\n client: { value: input.client ?? 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 \"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA\" as Address<\"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA\">;\n }\n if (!accounts.systemProgram.value) {\n accounts.systemProgram.value =\n \"11111111111111111111111111111111\" as Address<\"11111111111111111111111111111111\">;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, \"programId\");\n return Object.freeze({\n accounts: [\n getAccountMeta(accounts.escrow),\n getAccountMeta(accounts.agent),\n getAccountMeta(accounts.clientTokenAccount),\n getAccountMeta(accounts.escrowVault),\n getAccountMeta(accounts.tokenMint),\n getAccountMeta(accounts.client),\n getAccountMeta(accounts.tokenProgram),\n getAccountMeta(accounts.systemProgram),\n ],\n data: getCreateEscrowInstructionDataEncoder().encode(\n args as CreateEscrowInstructionDataArgs,\n ),\n programAddress,\n } as CreateEscrowInstruction<\n TProgramAddress,\n TAccountEscrow,\n TAccountAgent,\n TAccountClientTokenAccount,\n TAccountEscrowVault,\n TAccountTokenMint,\n TAccountClient,\n TAccountTokenProgram,\n TAccountSystemProgram\n >);\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 agent: TAccountMetas[1];\n clientTokenAccount: TAccountMetas[2];\n escrowVault: TAccountMetas[3];\n tokenMint: TAccountMetas[4];\n client: TAccountMetas[5];\n tokenProgram: TAccountMetas[6];\n systemProgram: TAccountMetas[7];\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 < 8) {\n // TODO: Coded error.\n throw new Error(\"Not enough accounts\");\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = (instruction.accounts as TAccountMetas)[accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n escrow: getNextAccount(),\n agent: getNextAccount(),\n clientTokenAccount: getNextAccount(),\n escrowVault: getNextAccount(),\n tokenMint: getNextAccount(),\n client: getNextAccount(),\n tokenProgram: 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 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 { 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 string | AccountMeta<string> =\n \"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 Address =\n 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 return Object.freeze({\n accounts: [\n getAccountMeta(accounts.multisig),\n getAccountMeta(accounts.owner),\n getAccountMeta(accounts.systemProgram),\n ],\n data: getCreateMultisigInstructionDataEncoder().encode(\n args as CreateMultisigInstructionDataArgs,\n ),\n programAddress,\n } as CreateMultisigInstruction<\n TProgramAddress,\n TAccountMultisig,\n TAccountOwner,\n TAccountSystemProgram\n >);\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 Address =\n 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 return Object.freeze({\n accounts: [\n getAccountMeta(accounts.multisig),\n getAccountMeta(accounts.owner),\n getAccountMeta(accounts.systemProgram),\n ],\n data: getCreateMultisigInstructionDataEncoder().encode(\n args as CreateMultisigInstructionDataArgs,\n ),\n programAddress,\n } as CreateMultisigInstruction<\n TProgramAddress,\n TAccountMultisig,\n TAccountOwner,\n TAccountSystemProgram\n >);\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 // TODO: Coded error.\n throw new Error(\"Not enough accounts\");\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = (instruction.accounts as TAccountMetas)[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 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 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 string | AccountMeta<string> =\n \"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 Address =\n 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 getUtf8Encoder().encode(expectSome(args.agentId)),\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 return Object.freeze({\n accounts: [\n getAccountMeta(accounts.agentAccount),\n getAccountMeta(accounts.signer),\n getAccountMeta(accounts.clock),\n ],\n data: getDeactivateAgentInstructionDataEncoder().encode(\n args as DeactivateAgentInstructionDataArgs,\n ),\n programAddress,\n } as DeactivateAgentInstruction<\n TProgramAddress,\n TAccountAgentAccount,\n TAccountSigner,\n TAccountClock\n >);\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 Address =\n 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 return Object.freeze({\n accounts: [\n getAccountMeta(accounts.agentAccount),\n getAccountMeta(accounts.signer),\n getAccountMeta(accounts.clock),\n ],\n data: getDeactivateAgentInstructionDataEncoder().encode(\n args as DeactivateAgentInstructionDataArgs,\n ),\n programAddress,\n } as DeactivateAgentInstruction<\n TProgramAddress,\n TAccountAgentAccount,\n TAccountSigner,\n TAccountClock\n >);\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 // TODO: Coded error.\n throw new Error(\"Not enough accounts\");\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = (instruction.accounts as TAccountMetas)[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 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 { GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS } from \"../programs\";\nimport { getAccountMetaFactory, type ResolvedAccount } from \"../shared\";\n\nexport const DEACTIVATE_CREDENTIAL_TEMPLATE_DISCRIMINATOR = new Uint8Array([\n 177, 8, 195, 104, 56, 34, 84, 162,\n]);\n\nexport function getDeactivateCredentialTemplateDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 8).encode(\n DEACTIVATE_CREDENTIAL_TEMPLATE_DISCRIMINATOR,\n );\n}\n\nexport type DeactivateCredentialTemplateInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountCredentialTemplate extends string | AccountMeta<string> = string,\n TAccountIssuer extends string | AccountMeta<string> = string,\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountCredentialTemplate extends string\n ? WritableAccount<TAccountCredentialTemplate>\n : TAccountCredentialTemplate,\n TAccountIssuer extends string\n ? WritableSignerAccount<TAccountIssuer> &\n AccountSignerMeta<TAccountIssuer>\n : TAccountIssuer,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type DeactivateCredentialTemplateInstructionData = {\n discriminator: ReadonlyUint8Array;\n};\n\nexport type DeactivateCredentialTemplateInstructionDataArgs = {};\n\nexport function getDeactivateCredentialTemplateInstructionDataEncoder(): FixedSizeEncoder<DeactivateCredentialTemplateInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([[\"discriminator\", fixEncoderSize(getBytesEncoder(), 8)]]),\n (value) => ({\n ...value,\n discriminator: DEACTIVATE_CREDENTIAL_TEMPLATE_DISCRIMINATOR,\n }),\n );\n}\n\nexport function getDeactivateCredentialTemplateInstructionDataDecoder(): FixedSizeDecoder<DeactivateCredentialTemplateInstructionData> {\n return getStructDecoder([\n [\"discriminator\", fixDecoderSize(getBytesDecoder(), 8)],\n ]);\n}\n\nexport function getDeactivateCredentialTemplateInstructionDataCodec(): FixedSizeCodec<\n DeactivateCredentialTemplateInstructionDataArgs,\n DeactivateCredentialTemplateInstructionData\n> {\n return combineCodec(\n getDeactivateCredentialTemplateInstructionDataEncoder(),\n getDeactivateCredentialTemplateInstructionDataDecoder(),\n );\n}\n\nexport type DeactivateCredentialTemplateInput<\n TAccountCredentialTemplate extends string = string,\n TAccountIssuer extends string = string,\n> = {\n credentialTemplate: Address<TAccountCredentialTemplate>;\n issuer: TransactionSigner<TAccountIssuer>;\n};\n\nexport function getDeactivateCredentialTemplateInstruction<\n TAccountCredentialTemplate extends string,\n TAccountIssuer extends string,\n TProgramAddress extends Address =\n typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: DeactivateCredentialTemplateInput<\n TAccountCredentialTemplate,\n TAccountIssuer\n >,\n config?: { programAddress?: TProgramAddress },\n): DeactivateCredentialTemplateInstruction<\n TProgramAddress,\n TAccountCredentialTemplate,\n TAccountIssuer\n> {\n // Program address.\n const programAddress =\n config?.programAddress ?? GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n credentialTemplate: {\n value: input.credentialTemplate ?? null,\n isWritable: true,\n },\n issuer: { value: input.issuer ?? 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 return Object.freeze({\n accounts: [\n getAccountMeta(accounts.credentialTemplate),\n getAccountMeta(accounts.issuer),\n ],\n data: getDeactivateCredentialTemplateInstructionDataEncoder().encode({}),\n programAddress,\n } as DeactivateCredentialTemplateInstruction<\n TProgramAddress,\n TAccountCredentialTemplate,\n TAccountIssuer\n >);\n}\n\nexport type ParsedDeactivateCredentialTemplateInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n credentialTemplate: TAccountMetas[0];\n issuer: TAccountMetas[1];\n };\n data: DeactivateCredentialTemplateInstructionData;\n};\n\nexport function parseDeactivateCredentialTemplateInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>,\n): ParsedDeactivateCredentialTemplateInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 2) {\n // TODO: Coded error.\n throw new Error(\"Not enough accounts\");\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = (instruction.accounts as TAccountMetas)[accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n credentialTemplate: getNextAccount(),\n issuer: getNextAccount(),\n },\n data: getDeactivateCredentialTemplateInstructionDataDecoder().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 { GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS } from \"../programs\";\nimport { getAccountMetaFactory, type ResolvedAccount } from \"../shared\";\n\nexport const DEACTIVATE_CREDENTIAL_TYPE_DISCRIMINATOR = new Uint8Array([\n 110, 174, 221, 244, 36, 206, 60, 237,\n]);\n\nexport function getDeactivateCredentialTypeDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 8).encode(\n DEACTIVATE_CREDENTIAL_TYPE_DISCRIMINATOR,\n );\n}\n\nexport type DeactivateCredentialTypeInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountCredentialType 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 TAccountCredentialType extends string\n ? WritableAccount<TAccountCredentialType>\n : TAccountCredentialType,\n TAccountAuthority extends string\n ? WritableSignerAccount<TAccountAuthority> &\n AccountSignerMeta<TAccountAuthority>\n : TAccountAuthority,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type DeactivateCredentialTypeInstructionData = {\n discriminator: ReadonlyUint8Array;\n};\n\nexport type DeactivateCredentialTypeInstructionDataArgs = {};\n\nexport function getDeactivateCredentialTypeInstructionDataEncoder(): FixedSizeEncoder<DeactivateCredentialTypeInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([[\"discriminator\", fixEncoderSize(getBytesEncoder(), 8)]]),\n (value) => ({\n ...value,\n discriminator: DEACTIVATE_CREDENTIAL_TYPE_DISCRIMINATOR,\n }),\n );\n}\n\nexport function getDeactivateCredentialTypeInstructionDataDecoder(): FixedSizeDecoder<DeactivateCredentialTypeInstructionData> {\n return getStructDecoder([\n [\"discriminator\", fixDecoderSize(getBytesDecoder(), 8)],\n ]);\n}\n\nexport function getDeactivateCredentialTypeInstructionDataCodec(): FixedSizeCodec<\n DeactivateCredentialTypeInstructionDataArgs,\n DeactivateCredentialTypeInstructionData\n> {\n return combineCodec(\n getDeactivateCredentialTypeInstructionDataEncoder(),\n getDeactivateCredentialTypeInstructionDataDecoder(),\n );\n}\n\nexport type DeactivateCredentialTypeInput<\n TAccountCredentialType extends string = string,\n TAccountAuthority extends string = string,\n> = {\n credentialType: Address<TAccountCredentialType>;\n authority: TransactionSigner<TAccountAuthority>;\n};\n\nexport function getDeactivateCredentialTypeInstruction<\n TAccountCredentialType extends string,\n TAccountAuthority extends string,\n TProgramAddress extends Address =\n typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: DeactivateCredentialTypeInput<\n TAccountCredentialType,\n TAccountAuthority\n >,\n config?: { programAddress?: TProgramAddress },\n): DeactivateCredentialTypeInstruction<\n TProgramAddress,\n TAccountCredentialType,\n TAccountAuthority\n> {\n // Program address.\n const programAddress =\n config?.programAddress ?? GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n credentialType: { value: input.credentialType ?? 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 return Object.freeze({\n accounts: [\n getAccountMeta(accounts.credentialType),\n getAccountMeta(accounts.authority),\n ],\n data: getDeactivateCredentialTypeInstructionDataEncoder().encode({}),\n programAddress,\n } as DeactivateCredentialTypeInstruction<\n TProgramAddress,\n TAccountCredentialType,\n TAccountAuthority\n >);\n}\n\nexport type ParsedDeactivateCredentialTypeInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n credentialType: TAccountMetas[0];\n authority: TAccountMetas[1];\n };\n data: DeactivateCredentialTypeInstructionData;\n};\n\nexport function parseDeactivateCredentialTypeInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>,\n): ParsedDeactivateCredentialTypeInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 2) {\n // TODO: Coded error.\n throw new Error(\"Not enough accounts\");\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = (instruction.accounts as TAccountMetas)[accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: { credentialType: getNextAccount(), authority: getNextAccount() },\n data: getDeactivateCredentialTypeInstructionDataDecoder().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 { GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS } from \"../programs\";\nimport {\n expectAddress,\n getAccountMetaFactory,\n type ResolvedAccount,\n} from \"../shared\";\n\nexport const DEACTIVATE_DID_DOCUMENT_DISCRIMINATOR = new Uint8Array([\n 77, 13, 56, 161, 67, 155, 206, 119,\n]);\n\nexport function getDeactivateDidDocumentDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 8).encode(\n DEACTIVATE_DID_DOCUMENT_DISCRIMINATOR,\n );\n}\n\nexport type DeactivateDidDocumentInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountDidDocument extends string | AccountMeta<string> = string,\n TAccountController extends string | AccountMeta<string> = string,\n TAccountClock extends string | AccountMeta<string> =\n \"SysvarC1ock11111111111111111111111111111111\",\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountDidDocument extends string\n ? WritableAccount<TAccountDidDocument>\n : TAccountDidDocument,\n TAccountController extends string\n ? WritableSignerAccount<TAccountController> &\n AccountSignerMeta<TAccountController>\n : TAccountController,\n TAccountClock extends string\n ? ReadonlyAccount<TAccountClock>\n : TAccountClock,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type DeactivateDidDocumentInstructionData = {\n discriminator: ReadonlyUint8Array;\n};\n\nexport type DeactivateDidDocumentInstructionDataArgs = {};\n\nexport function getDeactivateDidDocumentInstructionDataEncoder(): FixedSizeEncoder<DeactivateDidDocumentInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([[\"discriminator\", fixEncoderSize(getBytesEncoder(), 8)]]),\n (value) => ({\n ...value,\n discriminator: DEACTIVATE_DID_DOCUMENT_DISCRIMINATOR,\n }),\n );\n}\n\nexport function getDeactivateDidDocumentInstructionDataDecoder(): FixedSizeDecoder<DeactivateDidDocumentInstructionData> {\n return getStructDecoder([\n [\"discriminator\", fixDecoderSize(getBytesDecoder(), 8)],\n ]);\n}\n\nexport function getDeactivateDidDocumentInstructionDataCodec(): FixedSizeCodec<\n DeactivateDidDocumentInstructionDataArgs,\n DeactivateDidDocumentInstructionData\n> {\n return combineCodec(\n getDeactivateDidDocumentInstructionDataEncoder(),\n getDeactivateDidDocumentInstructionDataDecoder(),\n );\n}\n\nexport type DeactivateDidDocumentAsyncInput<\n TAccountDidDocument extends string = string,\n TAccountController extends string = string,\n TAccountClock extends string = string,\n> = {\n /** DID document account with canonical PDA validation */\n didDocument?: Address<TAccountDidDocument>;\n /** Controller of the DID (must match document controller) */\n controller: TransactionSigner<TAccountController>;\n /** Clock sysvar for timestamp validation */\n clock?: Address<TAccountClock>;\n};\n\nexport async function getDeactivateDidDocumentInstructionAsync<\n TAccountDidDocument extends string,\n TAccountController extends string,\n TAccountClock extends string,\n TProgramAddress extends Address =\n typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: DeactivateDidDocumentAsyncInput<\n TAccountDidDocument,\n TAccountController,\n TAccountClock\n >,\n config?: { programAddress?: TProgramAddress },\n): Promise<\n DeactivateDidDocumentInstruction<\n TProgramAddress,\n TAccountDidDocument,\n TAccountController,\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 didDocument: { value: input.didDocument ?? null, isWritable: true },\n controller: { value: input.controller ?? 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.didDocument.value) {\n accounts.didDocument.value = await getProgramDerivedAddress({\n programAddress,\n seeds: [\n getBytesEncoder().encode(\n new Uint8Array([\n 100, 105, 100, 95, 100, 111, 99, 117, 109, 101, 110, 116,\n ]),\n ),\n getAddressEncoder().encode(expectAddress(accounts.controller.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 return Object.freeze({\n accounts: [\n getAccountMeta(accounts.didDocument),\n getAccountMeta(accounts.controller),\n getAccountMeta(accounts.clock),\n ],\n data: getDeactivateDidDocumentInstructionDataEncoder().encode({}),\n programAddress,\n } as DeactivateDidDocumentInstruction<\n TProgramAddress,\n TAccountDidDocument,\n TAccountController,\n TAccountClock\n >);\n}\n\nexport type DeactivateDidDocumentInput<\n TAccountDidDocument extends string = string,\n TAccountController extends string = string,\n TAccountClock extends string = string,\n> = {\n /** DID document account with canonical PDA validation */\n didDocument: Address<TAccountDidDocument>;\n /** Controller of the DID (must match document controller) */\n controller: TransactionSigner<TAccountController>;\n /** Clock sysvar for timestamp validation */\n clock?: Address<TAccountClock>;\n};\n\nexport function getDeactivateDidDocumentInstruction<\n TAccountDidDocument extends string,\n TAccountController extends string,\n TAccountClock extends string,\n TProgramAddress extends Address =\n typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: DeactivateDidDocumentInput<\n TAccountDidDocument,\n TAccountController,\n TAccountClock\n >,\n config?: { programAddress?: TProgramAddress },\n): DeactivateDidDocumentInstruction<\n TProgramAddress,\n TAccountDidDocument,\n TAccountController,\n TAccountClock\n> {\n // Program address.\n const programAddress =\n config?.programAddress ?? GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n didDocument: { value: input.didDocument ?? null, isWritable: true },\n controller: { value: input.controller ?? 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 return Object.freeze({\n accounts: [\n getAccountMeta(accounts.didDocument),\n getAccountMeta(accounts.controller),\n getAccountMeta(accounts.clock),\n ],\n data: getDeactivateDidDocumentInstructionDataEncoder().encode({}),\n programAddress,\n } as DeactivateDidDocumentInstruction<\n TProgramAddress,\n TAccountDidDocument,\n TAccountController,\n TAccountClock\n >);\n}\n\nexport type ParsedDeactivateDidDocumentInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n /** DID document account with canonical PDA validation */\n didDocument: TAccountMetas[0];\n /** Controller of the DID (must match document controller) */\n controller: TAccountMetas[1];\n /** Clock sysvar for timestamp validation */\n clock: TAccountMetas[2];\n };\n data: DeactivateDidDocumentInstructionData;\n};\n\nexport function parseDeactivateDidDocumentInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>,\n): ParsedDeactivateDidDocumentInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 3) {\n // TODO: Coded error.\n throw new Error(\"Not enough accounts\");\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = (instruction.accounts as TAccountMetas)[accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n didDocument: getNextAccount(),\n controller: getNextAccount(),\n clock: getNextAccount(),\n },\n data: getDeactivateDidDocumentInstructionDataDecoder().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 ReadonlySignerAccount,\n type ReadonlyUint8Array,\n type TransactionSigner,\n type WritableAccount,\n} from \"@solana/kit\";\nimport { GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS } from \"../programs\";\nimport { getAccountMetaFactory, type ResolvedAccount } from \"../shared\";\n\nexport const ENABLE_PROTOCOL_FEES_DISCRIMINATOR = new Uint8Array([\n 9, 115, 79, 19, 158, 209, 221, 38,\n]);\n\nexport function getEnableProtocolFeesDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 8).encode(\n ENABLE_PROTOCOL_FEES_DISCRIMINATOR,\n );\n}\n\nexport type EnableProtocolFeesInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountConfig 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 TAccountConfig extends string\n ? WritableAccount<TAccountConfig>\n : TAccountConfig,\n TAccountAuthority extends string\n ? ReadonlySignerAccount<TAccountAuthority> &\n AccountSignerMeta<TAccountAuthority>\n : TAccountAuthority,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type EnableProtocolFeesInstructionData = {\n discriminator: ReadonlyUint8Array;\n};\n\nexport type EnableProtocolFeesInstructionDataArgs = {};\n\nexport function getEnableProtocolFeesInstructionDataEncoder(): FixedSizeEncoder<EnableProtocolFeesInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([[\"discriminator\", fixEncoderSize(getBytesEncoder(), 8)]]),\n (value) => ({\n ...value,\n discriminator: ENABLE_PROTOCOL_FEES_DISCRIMINATOR,\n }),\n );\n}\n\nexport function getEnableProtocolFeesInstructionDataDecoder(): FixedSizeDecoder<EnableProtocolFeesInstructionData> {\n return getStructDecoder([\n [\"discriminator\", fixDecoderSize(getBytesDecoder(), 8)],\n ]);\n}\n\nexport function getEnableProtocolFeesInstructionDataCodec(): FixedSizeCodec<\n EnableProtocolFeesInstructionDataArgs,\n EnableProtocolFeesInstructionData\n> {\n return combineCodec(\n getEnableProtocolFeesInstructionDataEncoder(),\n getEnableProtocolFeesInstructionDataDecoder(),\n );\n}\n\nexport type EnableProtocolFeesAsyncInput<\n TAccountConfig extends string = string,\n TAccountAuthority extends string = string,\n> = {\n config?: Address<TAccountConfig>;\n authority: TransactionSigner<TAccountAuthority>;\n};\n\nexport async function getEnableProtocolFeesInstructionAsync<\n TAccountConfig extends string,\n TAccountAuthority extends string,\n TProgramAddress extends Address =\n typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: EnableProtocolFeesAsyncInput<TAccountConfig, TAccountAuthority>,\n config?: { programAddress?: TProgramAddress },\n): Promise<\n EnableProtocolFeesInstruction<\n TProgramAddress,\n TAccountConfig,\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 config: { value: input.config ?? 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 // Resolve default values.\n if (!accounts.config.value) {\n accounts.config.value = await getProgramDerivedAddress({\n programAddress,\n seeds: [\n getBytesEncoder().encode(\n new Uint8Array([\n 112, 114, 111, 116, 111, 99, 111, 108, 95, 99, 111, 110, 102, 105,\n 103,\n ]),\n ),\n ],\n });\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, \"programId\");\n return Object.freeze({\n accounts: [\n getAccountMeta(accounts.config),\n getAccountMeta(accounts.authority),\n ],\n data: getEnableProtocolFeesInstructionDataEncoder().encode({}),\n programAddress,\n } as EnableProtocolFeesInstruction<\n TProgramAddress,\n TAccountConfig,\n TAccountAuthority\n >);\n}\n\nexport type EnableProtocolFeesInput<\n TAccountConfig extends string = string,\n TAccountAuthority extends string = string,\n> = {\n config: Address<TAccountConfig>;\n authority: TransactionSigner<TAccountAuthority>;\n};\n\nexport function getEnableProtocolFeesInstruction<\n TAccountConfig extends string,\n TAccountAuthority extends string,\n TProgramAddress extends Address =\n typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: EnableProtocolFeesInput<TAccountConfig, TAccountAuthority>,\n config?: { programAddress?: TProgramAddress },\n): EnableProtocolFeesInstruction<\n TProgramAddress,\n TAccountConfig,\n TAccountAuthority\n> {\n // Program address.\n const programAddress =\n config?.programAddress ?? GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n config: { value: input.config ?? 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 const getAccountMeta = getAccountMetaFactory(programAddress, \"programId\");\n return Object.freeze({\n accounts: [\n getAccountMeta(accounts.config),\n getAccountMeta(accounts.authority),\n ],\n data: getEnableProtocolFeesInstructionDataEncoder().encode({}),\n programAddress,\n } as EnableProtocolFeesInstruction<\n TProgramAddress,\n TAccountConfig,\n TAccountAuthority\n >);\n}\n\nexport type ParsedEnableProtocolFeesInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n config: TAccountMetas[0];\n authority: TAccountMetas[1];\n };\n data: EnableProtocolFeesInstructionData;\n};\n\nexport function parseEnableProtocolFeesInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>,\n): ParsedEnableProtocolFeesInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 2) {\n // TODO: Coded error.\n throw new Error(\"Not enough accounts\");\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = (instruction.accounts as TAccountMetas)[accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: { config: getNextAccount(), authority: getNextAccount() },\n data: getEnableProtocolFeesInstructionDataDecoder().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 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 { GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS } from \"../programs\";\nimport { getAccountMetaFactory, type ResolvedAccount } 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 TAccountEscrow extends string | AccountMeta<string> = string,\n TAccountClient 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 TAccountClient extends string\n ? ReadonlySignerAccount<TAccountClient> &\n AccountSignerMeta<TAccountClient>\n : TAccountClient,\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 FileDisputeInput<\n TAccountEscrow extends string = string,\n TAccountClient extends string = string,\n> = {\n escrow: Address<TAccountEscrow>;\n client: TransactionSigner<TAccountClient>;\n reason: FileDisputeInstructionDataArgs[\"reason\"];\n};\n\nexport function getFileDisputeInstruction<\n TAccountEscrow extends string,\n TAccountClient extends string,\n TProgramAddress extends Address =\n typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: FileDisputeInput<TAccountEscrow, TAccountClient>,\n config?: { programAddress?: TProgramAddress },\n): FileDisputeInstruction<TProgramAddress, TAccountEscrow, TAccountClient> {\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 client: { value: input.client ?? 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 return Object.freeze({\n accounts: [\n getAccountMeta(accounts.escrow),\n getAccountMeta(accounts.client),\n ],\n data: getFileDisputeInstructionDataEncoder().encode(\n args as FileDisputeInstructionDataArgs,\n ),\n programAddress,\n } as FileDisputeInstruction<TProgramAddress, TAccountEscrow, TAccountClient>);\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 escrow: TAccountMetas[0];\n client: TAccountMetas[1];\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 < 2) {\n // TODO: Coded error.\n throw new Error(\"Not enough accounts\");\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = (instruction.accounts as TAccountMetas)[accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: { escrow: getNextAccount(), client: getNextAccount() },\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 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 { 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 string | AccountMeta<string> =\n \"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 Address =\n 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 return Object.freeze({\n accounts: [\n getAccountMeta(accounts.report),\n getAccountMeta(accounts.auditTrail),\n getAccountMeta(accounts.authority),\n getAccountMeta(accounts.systemProgram),\n ],\n data: getGenerateComplianceReportInstructionDataEncoder().encode(\n args as GenerateComplianceReportInstructionDataArgs,\n ),\n programAddress,\n } as GenerateComplianceReportInstruction<\n TProgramAddress,\n TAccountReport,\n TAccountAuditTrail,\n TAccountAuthority,\n TAccountSystemProgram\n >);\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 Address =\n 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 return Object.freeze({\n accounts: [\n getAccountMeta(accounts.report),\n getAccountMeta(accounts.auditTrail),\n getAccountMeta(accounts.authority),\n getAccountMeta(accounts.systemProgram),\n ],\n data: getGenerateComplianceReportInstructionDataEncoder().encode(\n args as GenerateComplianceReportInstructionDataArgs,\n ),\n programAddress,\n } as GenerateComplianceReportInstruction<\n TProgramAddress,\n TAccountReport,\n TAccountAuditTrail,\n TAccountAuthority,\n TAccountSystemProgram\n >);\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 // TODO: Coded error.\n throw new Error(\"Not enough accounts\");\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = (instruction.accounts as TAccountMetas)[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 { 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 string | AccountMeta<string> =\n \"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 Address =\n 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 return Object.freeze({\n accounts: [\n getAccountMeta(accounts.auditTrail),\n getAccountMeta(accounts.entity),\n getAccountMeta(accounts.authority),\n getAccountMeta(accounts.systemProgram),\n ],\n data: getInitializeAuditTrailInstructionDataEncoder().encode(\n args as InitializeAuditTrailInstructionDataArgs,\n ),\n programAddress,\n } as InitializeAuditTrailInstruction<\n TProgramAddress,\n TAccountAuditTrail,\n TAccountEntity,\n TAccountAuthority,\n TAccountSystemProgram\n >);\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 Address =\n 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 return Object.freeze({\n accounts: [\n getAccountMeta(accounts.auditTrail),\n getAccountMeta(accounts.entity),\n getAccountMeta(accounts.authority),\n getAccountMeta(accounts.systemProgram),\n ],\n data: getInitializeAuditTrailInstructionDataEncoder().encode(\n args as InitializeAuditTrailInstructionDataArgs,\n ),\n programAddress,\n } as InitializeAuditTrailInstruction<\n TProgramAddress,\n TAccountAuditTrail,\n TAccountEntity,\n TAccountAuthority,\n TAccountSystemProgram\n >);\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 // TODO: Coded error.\n throw new Error(\"Not enough accounts\");\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = (instruction.accounts as TAccountMetas)[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 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 { 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 string | AccountMeta<string> =\n \"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 Address =\n 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 return Object.freeze({\n accounts: [\n getAccountMeta(accounts.proposal),\n getAccountMeta(accounts.proposer),\n getAccountMeta(accounts.systemProgram),\n ],\n data: getInitializeGovernanceProposalInstructionDataEncoder().encode(\n args as InitializeGovernanceProposalInstructionDataArgs,\n ),\n programAddress,\n } as InitializeGovernanceProposalInstruction<\n TProgramAddress,\n TAccountProposal,\n TAccountProposer,\n TAccountSystemProgram\n >);\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 Address =\n 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 return Object.freeze({\n accounts: [\n getAccountMeta(accounts.proposal),\n getAccountMeta(accounts.proposer),\n getAccountMeta(accounts.systemProgram),\n ],\n data: getInitializeGovernanceProposalInstructionDataEncoder().encode(\n args as InitializeGovernanceProposalInstructionDataArgs,\n ),\n programAddress,\n } as InitializeGovernanceProposalInstruction<\n TProgramAddress,\n TAccountProposal,\n TAccountProposer,\n TAccountSystemProgram\n >);\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 // TODO: Coded error.\n throw new Error(\"Not enough accounts\");\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = (instruction.accounts as TAccountMetas)[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 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 { GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS } from \"../programs\";\nimport { getAccountMetaFactory, type ResolvedAccount } from \"../shared\";\n\nexport const INITIALIZE_PROTOCOL_CONFIG_DISCRIMINATOR = new Uint8Array([\n 28, 50, 43, 233, 244, 98, 123, 118,\n]);\n\nexport function getInitializeProtocolConfigDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 8).encode(\n INITIALIZE_PROTOCOL_CONFIG_DISCRIMINATOR,\n );\n}\n\nexport type InitializeProtocolConfigInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountConfig extends string | AccountMeta<string> = string,\n TAccountAuthority extends string | AccountMeta<string> = string,\n TAccountTreasury extends string | AccountMeta<string> = string,\n TAccountBuybackPool extends string | AccountMeta<string> = string,\n TAccountModeratorPool extends string | AccountMeta<string> = string,\n TAccountSystemProgram extends string | AccountMeta<string> =\n \"11111111111111111111111111111111\",\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountConfig extends string\n ? WritableAccount<TAccountConfig>\n : TAccountConfig,\n TAccountAuthority extends string\n ? WritableSignerAccount<TAccountAuthority> &\n AccountSignerMeta<TAccountAuthority>\n : TAccountAuthority,\n TAccountTreasury extends string\n ? ReadonlyAccount<TAccountTreasury>\n : TAccountTreasury,\n TAccountBuybackPool extends string\n ? ReadonlyAccount<TAccountBuybackPool>\n : TAccountBuybackPool,\n TAccountModeratorPool extends string\n ? ReadonlyAccount<TAccountModeratorPool>\n : TAccountModeratorPool,\n TAccountSystemProgram extends string\n ? ReadonlyAccount<TAccountSystemProgram>\n : TAccountSystemProgram,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type InitializeProtocolConfigInstructionData = {\n discriminator: ReadonlyUint8Array;\n};\n\nexport type InitializeProtocolConfigInstructionDataArgs = {};\n\nexport function getInitializeProtocolConfigInstructionDataEncoder(): FixedSizeEncoder<InitializeProtocolConfigInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([[\"discriminator\", fixEncoderSize(getBytesEncoder(), 8)]]),\n (value) => ({\n ...value,\n discriminator: INITIALIZE_PROTOCOL_CONFIG_DISCRIMINATOR,\n }),\n );\n}\n\nexport function getInitializeProtocolConfigInstructionDataDecoder(): FixedSizeDecoder<InitializeProtocolConfigInstructionData> {\n return getStructDecoder([\n [\"discriminator\", fixDecoderSize(getBytesDecoder(), 8)],\n ]);\n}\n\nexport function getInitializeProtocolConfigInstructionDataCodec(): FixedSizeCodec<\n InitializeProtocolConfigInstructionDataArgs,\n InitializeProtocolConfigInstructionData\n> {\n return combineCodec(\n getInitializeProtocolConfigInstructionDataEncoder(),\n getInitializeProtocolConfigInstructionDataDecoder(),\n );\n}\n\nexport type InitializeProtocolConfigAsyncInput<\n TAccountConfig extends string = string,\n TAccountAuthority extends string = string,\n TAccountTreasury extends string = string,\n TAccountBuybackPool extends string = string,\n TAccountModeratorPool extends string = string,\n TAccountSystemProgram extends string = string,\n> = {\n config?: Address<TAccountConfig>;\n /** Authority who will control the config (typically DAO or multisig) */\n authority: TransactionSigner<TAccountAuthority>;\n /** Treasury wallet to receive protocol fees */\n treasury: Address<TAccountTreasury>;\n /** Buyback pool wallet for token buybacks */\n buybackPool: Address<TAccountBuybackPool>;\n /** Moderator pool for dispute fees */\n moderatorPool: Address<TAccountModeratorPool>;\n systemProgram?: Address<TAccountSystemProgram>;\n};\n\nexport async function getInitializeProtocolConfigInstructionAsync<\n TAccountConfig extends string,\n TAccountAuthority extends string,\n TAccountTreasury extends string,\n TAccountBuybackPool extends string,\n TAccountModeratorPool extends string,\n TAccountSystemProgram extends string,\n TProgramAddress extends Address =\n typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: InitializeProtocolConfigAsyncInput<\n TAccountConfig,\n TAccountAuthority,\n TAccountTreasury,\n TAccountBuybackPool,\n TAccountModeratorPool,\n TAccountSystemProgram\n >,\n config?: { programAddress?: TProgramAddress },\n): Promise<\n InitializeProtocolConfigInstruction<\n TProgramAddress,\n TAccountConfig,\n TAccountAuthority,\n TAccountTreasury,\n TAccountBuybackPool,\n TAccountModeratorPool,\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 config: { value: input.config ?? null, isWritable: true },\n authority: { value: input.authority ?? null, isWritable: true },\n treasury: { value: input.treasury ?? null, isWritable: false },\n buybackPool: { value: input.buybackPool ?? null, isWritable: false },\n moderatorPool: { value: input.moderatorPool ?? 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 // Resolve default values.\n if (!accounts.config.value) {\n accounts.config.value = await getProgramDerivedAddress({\n programAddress,\n seeds: [\n getBytesEncoder().encode(\n new Uint8Array([\n 112, 114, 111, 116, 111, 99, 111, 108, 95, 99, 111, 110, 102, 105,\n 103,\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 return Object.freeze({\n accounts: [\n getAccountMeta(accounts.config),\n getAccountMeta(accounts.authority),\n getAccountMeta(accounts.treasury),\n getAccountMeta(accounts.buybackPool),\n getAccountMeta(accounts.moderatorPool),\n getAccountMeta(accounts.systemProgram),\n ],\n data: getInitializeProtocolConfigInstructionDataEncoder().encode({}),\n programAddress,\n } as InitializeProtocolConfigInstruction<\n TProgramAddress,\n TAccountConfig,\n TAccountAuthority,\n TAccountTreasury,\n TAccountBuybackPool,\n TAccountModeratorPool,\n TAccountSystemProgram\n >);\n}\n\nexport type InitializeProtocolConfigInput<\n TAccountConfig extends string = string,\n TAccountAuthority extends string = string,\n TAccountTreasury extends string = string,\n TAccountBuybackPool extends string = string,\n TAccountModeratorPool extends string = string,\n TAccountSystemProgram extends string = string,\n> = {\n config: Address<TAccountConfig>;\n /** Authority who will control the config (typically DAO or multisig) */\n authority: TransactionSigner<TAccountAuthority>;\n /** Treasury wallet to receive protocol fees */\n treasury: Address<TAccountTreasury>;\n /** Buyback pool wallet for token buybacks */\n buybackPool: Address<TAccountBuybackPool>;\n /** Moderator pool for dispute fees */\n moderatorPool: Address<TAccountModeratorPool>;\n systemProgram?: Address<TAccountSystemProgram>;\n};\n\nexport function getInitializeProtocolConfigInstruction<\n TAccountConfig extends string,\n TAccountAuthority extends string,\n TAccountTreasury extends string,\n TAccountBuybackPool extends string,\n TAccountModeratorPool extends string,\n TAccountSystemProgram extends string,\n TProgramAddress extends Address =\n typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: InitializeProtocolConfigInput<\n TAccountConfig,\n TAccountAuthority,\n TAccountTreasury,\n TAccountBuybackPool,\n TAccountModeratorPool,\n TAccountSystemProgram\n >,\n config?: { programAddress?: TProgramAddress },\n): InitializeProtocolConfigInstruction<\n TProgramAddress,\n TAccountConfig,\n TAccountAuthority,\n TAccountTreasury,\n TAccountBuybackPool,\n TAccountModeratorPool,\n TAccountSystemProgram\n> {\n // Program address.\n const programAddress =\n config?.programAddress ?? GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n config: { value: input.config ?? null, isWritable: true },\n authority: { value: input.authority ?? null, isWritable: true },\n treasury: { value: input.treasury ?? null, isWritable: false },\n buybackPool: { value: input.buybackPool ?? null, isWritable: false },\n moderatorPool: { value: input.moderatorPool ?? 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 // 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 return Object.freeze({\n accounts: [\n getAccountMeta(accounts.config),\n getAccountMeta(accounts.authority),\n getAccountMeta(accounts.treasury),\n getAccountMeta(accounts.buybackPool),\n getAccountMeta(accounts.moderatorPool),\n getAccountMeta(accounts.systemProgram),\n ],\n data: getInitializeProtocolConfigInstructionDataEncoder().encode({}),\n programAddress,\n } as InitializeProtocolConfigInstruction<\n TProgramAddress,\n TAccountConfig,\n TAccountAuthority,\n TAccountTreasury,\n TAccountBuybackPool,\n TAccountModeratorPool,\n TAccountSystemProgram\n >);\n}\n\nexport type ParsedInitializeProtocolConfigInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n config: TAccountMetas[0];\n /** Authority who will control the config (typically DAO or multisig) */\n authority: TAccountMetas[1];\n /** Treasury wallet to receive protocol fees */\n treasury: TAccountMetas[2];\n /** Buyback pool wallet for token buybacks */\n buybackPool: TAccountMetas[3];\n /** Moderator pool for dispute fees */\n moderatorPool: TAccountMetas[4];\n systemProgram: TAccountMetas[5];\n };\n data: InitializeProtocolConfigInstructionData;\n};\n\nexport function parseInitializeProtocolConfigInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>,\n): ParsedInitializeProtocolConfigInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 6) {\n // TODO: Coded error.\n throw new Error(\"Not enough accounts\");\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = (instruction.accounts as TAccountMetas)[accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n config: getNextAccount(),\n authority: getNextAccount(),\n treasury: getNextAccount(),\n buybackPool: getNextAccount(),\n moderatorPool: getNextAccount(),\n systemProgram: getNextAccount(),\n },\n data: getInitializeProtocolConfigInstructionDataDecoder().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 { 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 string | AccountMeta<string> =\n \"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 Address =\n 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 return Object.freeze({\n accounts: [\n getAccountMeta(accounts.rbacConfig),\n getAccountMeta(accounts.authority),\n getAccountMeta(accounts.systemProgram),\n ],\n data: getInitializeRbacConfigInstructionDataEncoder().encode(\n args as InitializeRbacConfigInstructionDataArgs,\n ),\n programAddress,\n } as InitializeRbacConfigInstruction<\n TProgramAddress,\n TAccountRbacConfig,\n TAccountAuthority,\n TAccountSystemProgram\n >);\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 Address =\n 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 return Object.freeze({\n accounts: [\n getAccountMeta(accounts.rbacConfig),\n getAccountMeta(accounts.authority),\n getAccountMeta(accounts.systemProgram),\n ],\n data: getInitializeRbacConfigInstructionDataEncoder().encode(\n args as InitializeRbacConfigInstructionDataArgs,\n ),\n programAddress,\n } as InitializeRbacConfigInstruction<\n TProgramAddress,\n TAccountRbacConfig,\n TAccountAuthority,\n TAccountSystemProgram\n >);\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 // TODO: Coded error.\n throw new Error(\"Not enough accounts\");\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = (instruction.accounts as TAccountMetas)[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 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 { GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS } from \"../programs\";\nimport {\n expectAddress,\n getAccountMetaFactory,\n type ResolvedAccount,\n} from \"../shared\";\n\nexport const INITIALIZE_REPUTATION_METRICS_DISCRIMINATOR = new Uint8Array([\n 228, 11, 207, 44, 52, 188, 169, 237,\n]);\n\nexport function getInitializeReputationMetricsDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 8).encode(\n INITIALIZE_REPUTATION_METRICS_DISCRIMINATOR,\n );\n}\n\nexport type InitializeReputationMetricsInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountReputationMetrics extends string | AccountMeta<string> = string,\n TAccountAgent extends string | AccountMeta<string> = string,\n TAccountAuthority extends string | AccountMeta<string> = string,\n TAccountSystemProgram extends string | AccountMeta<string> =\n \"11111111111111111111111111111111\",\n TAccountClock extends string | AccountMeta<string> =\n \"SysvarC1ock11111111111111111111111111111111\",\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountReputationMetrics extends string\n ? WritableAccount<TAccountReputationMetrics>\n : TAccountReputationMetrics,\n TAccountAgent extends string\n ? ReadonlyAccount<TAccountAgent>\n : TAccountAgent,\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 InitializeReputationMetricsInstructionData = {\n discriminator: ReadonlyUint8Array;\n};\n\nexport type InitializeReputationMetricsInstructionDataArgs = {};\n\nexport function getInitializeReputationMetricsInstructionDataEncoder(): FixedSizeEncoder<InitializeReputationMetricsInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([[\"discriminator\", fixEncoderSize(getBytesEncoder(), 8)]]),\n (value) => ({\n ...value,\n discriminator: INITIALIZE_REPUTATION_METRICS_DISCRIMINATOR,\n }),\n );\n}\n\nexport function getInitializeReputationMetricsInstructionDataDecoder(): FixedSizeDecoder<InitializeReputationMetricsInstructionData> {\n return getStructDecoder([\n [\"discriminator\", fixDecoderSize(getBytesDecoder(), 8)],\n ]);\n}\n\nexport function getInitializeReputationMetricsInstructionDataCodec(): FixedSizeCodec<\n InitializeReputationMetricsInstructionDataArgs,\n InitializeReputationMetricsInstructionData\n> {\n return combineCodec(\n getInitializeReputationMetricsInstructionDataEncoder(),\n getInitializeReputationMetricsInstructionDataDecoder(),\n );\n}\n\nexport type InitializeReputationMetricsAsyncInput<\n TAccountReputationMetrics extends string = string,\n TAccountAgent extends string = string,\n TAccountAuthority extends string = string,\n TAccountSystemProgram extends string = string,\n TAccountClock extends string = string,\n> = {\n /** Reputation metrics account */\n reputationMetrics?: Address<TAccountReputationMetrics>;\n /** Agent account */\n agent: Address<TAccountAgent>;\n /** Authority (agent owner) */\n authority: TransactionSigner<TAccountAuthority>;\n /** System program */\n systemProgram?: Address<TAccountSystemProgram>;\n /** Clock for timestamps */\n clock?: Address<TAccountClock>;\n};\n\nexport async function getInitializeReputationMetricsInstructionAsync<\n TAccountReputationMetrics extends string,\n TAccountAgent extends string,\n TAccountAuthority extends string,\n TAccountSystemProgram extends string,\n TAccountClock extends string,\n TProgramAddress extends Address =\n typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: InitializeReputationMetricsAsyncInput<\n TAccountReputationMetrics,\n TAccountAgent,\n TAccountAuthority,\n TAccountSystemProgram,\n TAccountClock\n >,\n config?: { programAddress?: TProgramAddress },\n): Promise<\n InitializeReputationMetricsInstruction<\n TProgramAddress,\n TAccountReputationMetrics,\n TAccountAgent,\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 reputationMetrics: {\n value: input.reputationMetrics ?? null,\n isWritable: true,\n },\n agent: { value: input.agent ?? null, isWritable: false },\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 // Resolve default values.\n if (!accounts.reputationMetrics.value) {\n accounts.reputationMetrics.value = await getProgramDerivedAddress({\n programAddress,\n seeds: [\n getBytesEncoder().encode(\n new Uint8Array([\n 114, 101, 112, 117, 116, 97, 116, 105, 111, 110, 95, 109, 101, 116,\n 114, 105, 99, 115,\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 if (!accounts.clock.value) {\n accounts.clock.value =\n \"SysvarC1ock11111111111111111111111111111111\" as Address<\"SysvarC1ock11111111111111111111111111111111\">;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, \"programId\");\n return Object.freeze({\n accounts: [\n getAccountMeta(accounts.reputationMetrics),\n getAccountMeta(accounts.agent),\n getAccountMeta(accounts.authority),\n getAccountMeta(accounts.systemProgram),\n getAccountMeta(accounts.clock),\n ],\n data: getInitializeReputationMetricsInstructionDataEncoder().encode({}),\n programAddress,\n } as InitializeReputationMetricsInstruction<\n TProgramAddress,\n TAccountReputationMetrics,\n TAccountAgent,\n TAccountAuthority,\n TAccountSystemProgram,\n TAccountClock\n >);\n}\n\nexport type InitializeReputationMetricsInput<\n TAccountReputationMetrics extends string = string,\n TAccountAgent extends string = string,\n TAccountAuthority extends string = string,\n TAccountSystemProgram extends string = string,\n TAccountClock extends string = string,\n> = {\n /** Reputation metrics account */\n reputationMetrics: Address<TAccountReputationMetrics>;\n /** Agent account */\n agent: Address<TAccountAgent>;\n /** Authority (agent owner) */\n authority: TransactionSigner<TAccountAuthority>;\n /** System program */\n systemProgram?: Address<TAccountSystemProgram>;\n /** Clock for timestamps */\n clock?: Address<TAccountClock>;\n};\n\nexport function getInitializeReputationMetricsInstruction<\n TAccountReputationMetrics extends string,\n TAccountAgent extends string,\n TAccountAuthority extends string,\n TAccountSystemProgram extends string,\n TAccountClock extends string,\n TProgramAddress extends Address =\n typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: InitializeReputationMetricsInput<\n TAccountReputationMetrics,\n TAccountAgent,\n TAccountAuthority,\n TAccountSystemProgram,\n TAccountClock\n >,\n config?: { programAddress?: TProgramAddress },\n): InitializeReputationMetricsInstruction<\n TProgramAddress,\n TAccountReputationMetrics,\n TAccountAgent,\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 reputationMetrics: {\n value: input.reputationMetrics ?? null,\n isWritable: true,\n },\n agent: { value: input.agent ?? null, isWritable: false },\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 // 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 return Object.freeze({\n accounts: [\n getAccountMeta(accounts.reputationMetrics),\n getAccountMeta(accounts.agent),\n getAccountMeta(accounts.authority),\n getAccountMeta(accounts.systemProgram),\n getAccountMeta(accounts.clock),\n ],\n data: getInitializeReputationMetricsInstructionDataEncoder().encode({}),\n programAddress,\n } as InitializeReputationMetricsInstruction<\n TProgramAddress,\n TAccountReputationMetrics,\n TAccountAgent,\n TAccountAuthority,\n TAccountSystemProgram,\n TAccountClock\n >);\n}\n\nexport type ParsedInitializeReputationMetricsInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n /** Reputation metrics account */\n reputationMetrics: TAccountMetas[0];\n /** Agent account */\n agent: TAccountMetas[1];\n /** Authority (agent owner) */\n authority: TAccountMetas[2];\n /** System program */\n systemProgram: TAccountMetas[3];\n /** Clock for timestamps */\n clock: TAccountMetas[4];\n };\n data: InitializeReputationMetricsInstructionData;\n};\n\nexport function parseInitializeReputationMetricsInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>,\n): ParsedInitializeReputationMetricsInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 5) {\n // TODO: Coded error.\n throw new Error(\"Not enough accounts\");\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = (instruction.accounts as TAccountMetas)[accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n reputationMetrics: getNextAccount(),\n agent: getNextAccount(),\n authority: getNextAccount(),\n systemProgram: getNextAccount(),\n clock: getNextAccount(),\n },\n data: getInitializeReputationMetricsInstructionDataDecoder().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 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 { GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS } from \"../programs\";\nimport { getAccountMetaFactory, type ResolvedAccount } from \"../shared\";\n\nexport const INITIALIZE_STAKING_CONFIG_DISCRIMINATOR = new Uint8Array([\n 78, 164, 6, 115, 206, 48, 168, 105,\n]);\n\nexport function getInitializeStakingConfigDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 8).encode(\n INITIALIZE_STAKING_CONFIG_DISCRIMINATOR,\n );\n}\n\nexport type InitializeStakingConfigInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountStakingConfig extends string | AccountMeta<string> = string,\n TAccountAuthority extends string | AccountMeta<string> = string,\n TAccountSystemProgram extends string | AccountMeta<string> =\n \"11111111111111111111111111111111\",\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountStakingConfig extends string\n ? WritableAccount<TAccountStakingConfig>\n : TAccountStakingConfig,\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 InitializeStakingConfigInstructionData = {\n discriminator: ReadonlyUint8Array;\n minStake: bigint;\n treasury: Address;\n};\n\nexport type InitializeStakingConfigInstructionDataArgs = {\n minStake: number | bigint;\n treasury: Address;\n};\n\nexport function getInitializeStakingConfigInstructionDataEncoder(): FixedSizeEncoder<InitializeStakingConfigInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n [\"discriminator\", fixEncoderSize(getBytesEncoder(), 8)],\n [\"minStake\", getU64Encoder()],\n [\"treasury\", getAddressEncoder()],\n ]),\n (value) => ({\n ...value,\n discriminator: INITIALIZE_STAKING_CONFIG_DISCRIMINATOR,\n }),\n );\n}\n\nexport function getInitializeStakingConfigInstructionDataDecoder(): FixedSizeDecoder<InitializeStakingConfigInstructionData> {\n return getStructDecoder([\n [\"discriminator\", fixDecoderSize(getBytesDecoder(), 8)],\n [\"minStake\", getU64Decoder()],\n [\"treasury\", getAddressDecoder()],\n ]);\n}\n\nexport function getInitializeStakingConfigInstructionDataCodec(): FixedSizeCodec<\n InitializeStakingConfigInstructionDataArgs,\n InitializeStakingConfigInstructionData\n> {\n return combineCodec(\n getInitializeStakingConfigInstructionDataEncoder(),\n getInitializeStakingConfigInstructionDataDecoder(),\n );\n}\n\nexport type InitializeStakingConfigAsyncInput<\n TAccountStakingConfig extends string = string,\n TAccountAuthority extends string = string,\n TAccountSystemProgram extends string = string,\n> = {\n stakingConfig?: Address<TAccountStakingConfig>;\n authority: TransactionSigner<TAccountAuthority>;\n systemProgram?: Address<TAccountSystemProgram>;\n minStake: InitializeStakingConfigInstructionDataArgs[\"minStake\"];\n treasury: InitializeStakingConfigInstructionDataArgs[\"treasury\"];\n};\n\nexport async function getInitializeStakingConfigInstructionAsync<\n TAccountStakingConfig extends string,\n TAccountAuthority extends string,\n TAccountSystemProgram extends string,\n TProgramAddress extends Address =\n typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: InitializeStakingConfigAsyncInput<\n TAccountStakingConfig,\n TAccountAuthority,\n TAccountSystemProgram\n >,\n config?: { programAddress?: TProgramAddress },\n): Promise<\n InitializeStakingConfigInstruction<\n TProgramAddress,\n TAccountStakingConfig,\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 stakingConfig: { value: input.stakingConfig ?? 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.stakingConfig.value) {\n accounts.stakingConfig.value = await getProgramDerivedAddress({\n programAddress,\n seeds: [\n getBytesEncoder().encode(\n new Uint8Array([\n 115, 116, 97, 107, 105, 110, 103, 95, 99, 111, 110, 102, 105, 103,\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 return Object.freeze({\n accounts: [\n getAccountMeta(accounts.stakingConfig),\n getAccountMeta(accounts.authority),\n getAccountMeta(accounts.systemProgram),\n ],\n data: getInitializeStakingConfigInstructionDataEncoder().encode(\n args as InitializeStakingConfigInstructionDataArgs,\n ),\n programAddress,\n } as InitializeStakingConfigInstruction<\n TProgramAddress,\n TAccountStakingConfig,\n TAccountAuthority,\n TAccountSystemProgram\n >);\n}\n\nexport type InitializeStakingConfigInput<\n TAccountStakingConfig extends string = string,\n TAccountAuthority extends string = string,\n TAccountSystemProgram extends string = string,\n> = {\n stakingConfig: Address<TAccountStakingConfig>;\n authority: TransactionSigner<TAccountAuthority>;\n systemProgram?: Address<TAccountSystemProgram>;\n minStake: InitializeStakingConfigInstructionDataArgs[\"minStake\"];\n treasury: InitializeStakingConfigInstructionDataArgs[\"treasury\"];\n};\n\nexport function getInitializeStakingConfigInstruction<\n TAccountStakingConfig extends string,\n TAccountAuthority extends string,\n TAccountSystemProgram extends string,\n TProgramAddress extends Address =\n typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: InitializeStakingConfigInput<\n TAccountStakingConfig,\n TAccountAuthority,\n TAccountSystemProgram\n >,\n config?: { programAddress?: TProgramAddress },\n): InitializeStakingConfigInstruction<\n TProgramAddress,\n TAccountStakingConfig,\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 stakingConfig: { value: input.stakingConfig ?? 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 return Object.freeze({\n accounts: [\n getAccountMeta(accounts.stakingConfig),\n getAccountMeta(accounts.authority),\n getAccountMeta(accounts.systemProgram),\n ],\n data: getInitializeStakingConfigInstructionDataEncoder().encode(\n args as InitializeStakingConfigInstructionDataArgs,\n ),\n programAddress,\n } as InitializeStakingConfigInstruction<\n TProgramAddress,\n TAccountStakingConfig,\n TAccountAuthority,\n TAccountSystemProgram\n >);\n}\n\nexport type ParsedInitializeStakingConfigInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n stakingConfig: TAccountMetas[0];\n authority: TAccountMetas[1];\n systemProgram: TAccountMetas[2];\n };\n data: InitializeStakingConfigInstructionData;\n};\n\nexport function parseInitializeStakingConfigInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>,\n): ParsedInitializeStakingConfigInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 3) {\n // TODO: Coded error.\n throw new Error(\"Not enough accounts\");\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = (instruction.accounts as TAccountMetas)[accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n stakingConfig: getNextAccount(),\n authority: getNextAccount(),\n systemProgram: getNextAccount(),\n },\n data: getInitializeStakingConfigInstructionDataDecoder().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 { GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS } from \"../programs\";\nimport { getAccountMetaFactory, type ResolvedAccount } from \"../shared\";\n\nexport const INIT_REENTRANCY_GUARD_DISCRIMINATOR = new Uint8Array([\n 156, 109, 115, 85, 12, 60, 245, 99,\n]);\n\nexport function getInitReentrancyGuardDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 8).encode(\n INIT_REENTRANCY_GUARD_DISCRIMINATOR,\n );\n}\n\nexport type InitReentrancyGuardInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountReentrancyGuard extends string | AccountMeta<string> = string,\n TAccountAuthority extends string | AccountMeta<string> = string,\n TAccountSystemProgram extends string | AccountMeta<string> =\n \"11111111111111111111111111111111\",\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountReentrancyGuard extends string\n ? WritableAccount<TAccountReentrancyGuard>\n : TAccountReentrancyGuard,\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 InitReentrancyGuardInstructionData = {\n discriminator: ReadonlyUint8Array;\n};\n\nexport type InitReentrancyGuardInstructionDataArgs = {};\n\nexport function getInitReentrancyGuardInstructionDataEncoder(): FixedSizeEncoder<InitReentrancyGuardInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([[\"discriminator\", fixEncoderSize(getBytesEncoder(), 8)]]),\n (value) => ({\n ...value,\n discriminator: INIT_REENTRANCY_GUARD_DISCRIMINATOR,\n }),\n );\n}\n\nexport function getInitReentrancyGuardInstructionDataDecoder(): FixedSizeDecoder<InitReentrancyGuardInstructionData> {\n return getStructDecoder([\n [\"discriminator\", fixDecoderSize(getBytesDecoder(), 8)],\n ]);\n}\n\nexport function getInitReentrancyGuardInstructionDataCodec(): FixedSizeCodec<\n InitReentrancyGuardInstructionDataArgs,\n InitReentrancyGuardInstructionData\n> {\n return combineCodec(\n getInitReentrancyGuardInstructionDataEncoder(),\n getInitReentrancyGuardInstructionDataDecoder(),\n );\n}\n\nexport type InitReentrancyGuardAsyncInput<\n TAccountReentrancyGuard extends string = string,\n TAccountAuthority extends string = string,\n TAccountSystemProgram extends string = string,\n> = {\n reentrancyGuard?: Address<TAccountReentrancyGuard>;\n authority: TransactionSigner<TAccountAuthority>;\n systemProgram?: Address<TAccountSystemProgram>;\n};\n\nexport async function getInitReentrancyGuardInstructionAsync<\n TAccountReentrancyGuard extends string,\n TAccountAuthority extends string,\n TAccountSystemProgram extends string,\n TProgramAddress extends Address =\n typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: InitReentrancyGuardAsyncInput<\n TAccountReentrancyGuard,\n TAccountAuthority,\n TAccountSystemProgram\n >,\n config?: { programAddress?: TProgramAddress },\n): Promise<\n InitReentrancyGuardInstruction<\n TProgramAddress,\n TAccountReentrancyGuard,\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 reentrancyGuard: { value: input.reentrancyGuard ?? 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 // 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.systemProgram.value) {\n accounts.systemProgram.value =\n \"11111111111111111111111111111111\" as Address<\"11111111111111111111111111111111\">;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, \"programId\");\n return Object.freeze({\n accounts: [\n getAccountMeta(accounts.reentrancyGuard),\n getAccountMeta(accounts.authority),\n getAccountMeta(accounts.systemProgram),\n ],\n data: getInitReentrancyGuardInstructionDataEncoder().encode({}),\n programAddress,\n } as InitReentrancyGuardInstruction<\n TProgramAddress,\n TAccountReentrancyGuard,\n TAccountAuthority,\n TAccountSystemProgram\n >);\n}\n\nexport type InitReentrancyGuardInput<\n TAccountReentrancyGuard extends string = string,\n TAccountAuthority extends string = string,\n TAccountSystemProgram extends string = string,\n> = {\n reentrancyGuard: Address<TAccountReentrancyGuard>;\n authority: TransactionSigner<TAccountAuthority>;\n systemProgram?: Address<TAccountSystemProgram>;\n};\n\nexport function getInitReentrancyGuardInstruction<\n TAccountReentrancyGuard extends string,\n TAccountAuthority extends string,\n TAccountSystemProgram extends string,\n TProgramAddress extends Address =\n typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: InitReentrancyGuardInput<\n TAccountReentrancyGuard,\n TAccountAuthority,\n TAccountSystemProgram\n >,\n config?: { programAddress?: TProgramAddress },\n): InitReentrancyGuardInstruction<\n TProgramAddress,\n TAccountReentrancyGuard,\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 reentrancyGuard: { value: input.reentrancyGuard ?? 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 // 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 return Object.freeze({\n accounts: [\n getAccountMeta(accounts.reentrancyGuard),\n getAccountMeta(accounts.authority),\n getAccountMeta(accounts.systemProgram),\n ],\n data: getInitReentrancyGuardInstructionDataEncoder().encode({}),\n programAddress,\n } as InitReentrancyGuardInstruction<\n TProgramAddress,\n TAccountReentrancyGuard,\n TAccountAuthority,\n TAccountSystemProgram\n >);\n}\n\nexport type ParsedInitReentrancyGuardInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n reentrancyGuard: TAccountMetas[0];\n authority: TAccountMetas[1];\n systemProgram: TAccountMetas[2];\n };\n data: InitReentrancyGuardInstructionData;\n};\n\nexport function parseInitReentrancyGuardInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>,\n): ParsedInitReentrancyGuardInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 3) {\n // TODO: Coded error.\n throw new Error(\"Not enough accounts\");\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = (instruction.accounts as TAccountMetas)[accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n reentrancyGuard: getNextAccount(),\n authority: getNextAccount(),\n systemProgram: getNextAccount(),\n },\n data: getInitReentrancyGuardInstructionDataDecoder().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 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 { GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS } from \"../programs\";\nimport {\n expectAddress,\n expectSome,\n getAccountMetaFactory,\n type ResolvedAccount,\n} from \"../shared\";\n\nexport const ISSUE_CREDENTIAL_DISCRIMINATOR = new Uint8Array([\n 255, 193, 171, 224, 68, 171, 194, 87,\n]);\n\nexport function getIssueCredentialDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 8).encode(\n ISSUE_CREDENTIAL_DISCRIMINATOR,\n );\n}\n\nexport type IssueCredentialInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountCredential extends string | AccountMeta<string> = string,\n TAccountCredentialTemplate extends string | AccountMeta<string> = string,\n TAccountCredentialType extends string | AccountMeta<string> = string,\n TAccountSubject extends string | AccountMeta<string> = string,\n TAccountIssuer extends string | AccountMeta<string> = string,\n TAccountSystemProgram extends string | AccountMeta<string> =\n \"11111111111111111111111111111111\",\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountCredential extends string\n ? WritableAccount<TAccountCredential>\n : TAccountCredential,\n TAccountCredentialTemplate extends string\n ? WritableAccount<TAccountCredentialTemplate>\n : TAccountCredentialTemplate,\n TAccountCredentialType extends string\n ? WritableAccount<TAccountCredentialType>\n : TAccountCredentialType,\n TAccountSubject extends string\n ? ReadonlyAccount<TAccountSubject>\n : TAccountSubject,\n TAccountIssuer extends string\n ? WritableSignerAccount<TAccountIssuer> &\n AccountSignerMeta<TAccountIssuer>\n : TAccountIssuer,\n TAccountSystemProgram extends string\n ? ReadonlyAccount<TAccountSystemProgram>\n : TAccountSystemProgram,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type IssueCredentialInstructionData = {\n discriminator: ReadonlyUint8Array;\n credentialId: string;\n subjectDataHash: ReadonlyUint8Array;\n subjectDataUri: string;\n expiresAt: Option<bigint>;\n sourceAccount: Option<Address>;\n};\n\nexport type IssueCredentialInstructionDataArgs = {\n credentialId: string;\n subjectDataHash: ReadonlyUint8Array;\n subjectDataUri: string;\n expiresAt: OptionOrNullable<number | bigint>;\n sourceAccount: OptionOrNullable<Address>;\n};\n\nexport function getIssueCredentialInstructionDataEncoder(): Encoder<IssueCredentialInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n [\"discriminator\", fixEncoderSize(getBytesEncoder(), 8)],\n [\"credentialId\", addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder())],\n [\"subjectDataHash\", fixEncoderSize(getBytesEncoder(), 32)],\n [\n \"subjectDataUri\",\n addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder()),\n ],\n [\"expiresAt\", getOptionEncoder(getI64Encoder())],\n [\"sourceAccount\", getOptionEncoder(getAddressEncoder())],\n ]),\n (value) => ({ ...value, discriminator: ISSUE_CREDENTIAL_DISCRIMINATOR }),\n );\n}\n\nexport function getIssueCredentialInstructionDataDecoder(): Decoder<IssueCredentialInstructionData> {\n return getStructDecoder([\n [\"discriminator\", fixDecoderSize(getBytesDecoder(), 8)],\n [\"credentialId\", addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())],\n [\"subjectDataHash\", fixDecoderSize(getBytesDecoder(), 32)],\n [\"subjectDataUri\", addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())],\n [\"expiresAt\", getOptionDecoder(getI64Decoder())],\n [\"sourceAccount\", getOptionDecoder(getAddressDecoder())],\n ]);\n}\n\nexport function getIssueCredentialInstructionDataCodec(): Codec<\n IssueCredentialInstructionDataArgs,\n IssueCredentialInstructionData\n> {\n return combineCodec(\n getIssueCredentialInstructionDataEncoder(),\n getIssueCredentialInstructionDataDecoder(),\n );\n}\n\nexport type IssueCredentialAsyncInput<\n TAccountCredential extends string = string,\n TAccountCredentialTemplate extends string = string,\n TAccountCredentialType extends string = string,\n TAccountSubject extends string = string,\n TAccountIssuer extends string = string,\n TAccountSystemProgram extends string = string,\n> = {\n credential?: Address<TAccountCredential>;\n credentialTemplate: Address<TAccountCredentialTemplate>;\n credentialType: Address<TAccountCredentialType>;\n subject: Address<TAccountSubject>;\n issuer: TransactionSigner<TAccountIssuer>;\n systemProgram?: Address<TAccountSystemProgram>;\n credentialId: IssueCredentialInstructionDataArgs[\"credentialId\"];\n subjectDataHash: IssueCredentialInstructionDataArgs[\"subjectDataHash\"];\n subjectDataUri: IssueCredentialInstructionDataArgs[\"subjectDataUri\"];\n expiresAt: IssueCredentialInstructionDataArgs[\"expiresAt\"];\n sourceAccount: IssueCredentialInstructionDataArgs[\"sourceAccount\"];\n};\n\nexport async function getIssueCredentialInstructionAsync<\n TAccountCredential extends string,\n TAccountCredentialTemplate extends string,\n TAccountCredentialType extends string,\n TAccountSubject extends string,\n TAccountIssuer extends string,\n TAccountSystemProgram extends string,\n TProgramAddress extends Address =\n typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: IssueCredentialAsyncInput<\n TAccountCredential,\n TAccountCredentialTemplate,\n TAccountCredentialType,\n TAccountSubject,\n TAccountIssuer,\n TAccountSystemProgram\n >,\n config?: { programAddress?: TProgramAddress },\n): Promise<\n IssueCredentialInstruction<\n TProgramAddress,\n TAccountCredential,\n TAccountCredentialTemplate,\n TAccountCredentialType,\n TAccountSubject,\n TAccountIssuer,\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 credential: { value: input.credential ?? null, isWritable: true },\n credentialTemplate: {\n value: input.credentialTemplate ?? null,\n isWritable: true,\n },\n credentialType: { value: input.credentialType ?? null, isWritable: true },\n subject: { value: input.subject ?? null, isWritable: false },\n issuer: { value: input.issuer ?? 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.credential.value) {\n accounts.credential.value = await getProgramDerivedAddress({\n programAddress,\n seeds: [\n getBytesEncoder().encode(\n new Uint8Array([99, 114, 101, 100, 101, 110, 116, 105, 97, 108]),\n ),\n getAddressEncoder().encode(\n expectAddress(accounts.credentialTemplate.value),\n ),\n getAddressEncoder().encode(expectAddress(accounts.subject.value)),\n getUtf8Encoder().encode(expectSome(args.credentialId)),\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 return Object.freeze({\n accounts: [\n getAccountMeta(accounts.credential),\n getAccountMeta(accounts.credentialTemplate),\n getAccountMeta(accounts.credentialType),\n getAccountMeta(accounts.subject),\n getAccountMeta(accounts.issuer),\n getAccountMeta(accounts.systemProgram),\n ],\n data: getIssueCredentialInstructionDataEncoder().encode(\n args as IssueCredentialInstructionDataArgs,\n ),\n programAddress,\n } as IssueCredentialInstruction<\n TProgramAddress,\n TAccountCredential,\n TAccountCredentialTemplate,\n TAccountCredentialType,\n TAccountSubject,\n TAccountIssuer,\n TAccountSystemProgram\n >);\n}\n\nexport type IssueCredentialInput<\n TAccountCredential extends string = string,\n TAccountCredentialTemplate extends string = string,\n TAccountCredentialType extends string = string,\n TAccountSubject extends string = string,\n TAccountIssuer extends string = string,\n TAccountSystemProgram extends string = string,\n> = {\n credential: Address<TAccountCredential>;\n credentialTemplate: Address<TAccountCredentialTemplate>;\n credentialType: Address<TAccountCredentialType>;\n subject: Address<TAccountSubject>;\n issuer: TransactionSigner<TAccountIssuer>;\n systemProgram?: Address<TAccountSystemProgram>;\n credentialId: IssueCredentialInstructionDataArgs[\"credentialId\"];\n subjectDataHash: IssueCredentialInstructionDataArgs[\"subjectDataHash\"];\n subjectDataUri: IssueCredentialInstructionDataArgs[\"subjectDataUri\"];\n expiresAt: IssueCredentialInstructionDataArgs[\"expiresAt\"];\n sourceAccount: IssueCredentialInstructionDataArgs[\"sourceAccount\"];\n};\n\nexport function getIssueCredentialInstruction<\n TAccountCredential extends string,\n TAccountCredentialTemplate extends string,\n TAccountCredentialType extends string,\n TAccountSubject extends string,\n TAccountIssuer extends string,\n TAccountSystemProgram extends string,\n TProgramAddress extends Address =\n typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: IssueCredentialInput<\n TAccountCredential,\n TAccountCredentialTemplate,\n TAccountCredentialType,\n TAccountSubject,\n TAccountIssuer,\n TAccountSystemProgram\n >,\n config?: { programAddress?: TProgramAddress },\n): IssueCredentialInstruction<\n TProgramAddress,\n TAccountCredential,\n TAccountCredentialTemplate,\n TAccountCredentialType,\n TAccountSubject,\n TAccountIssuer,\n TAccountSystemProgram\n> {\n // Program address.\n const programAddress =\n config?.programAddress ?? GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n credential: { value: input.credential ?? null, isWritable: true },\n credentialTemplate: {\n value: input.credentialTemplate ?? null,\n isWritable: true,\n },\n credentialType: { value: input.credentialType ?? null, isWritable: true },\n subject: { value: input.subject ?? null, isWritable: false },\n issuer: { value: input.issuer ?? 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 return Object.freeze({\n accounts: [\n getAccountMeta(accounts.credential),\n getAccountMeta(accounts.credentialTemplate),\n getAccountMeta(accounts.credentialType),\n getAccountMeta(accounts.subject),\n getAccountMeta(accounts.issuer),\n getAccountMeta(accounts.systemProgram),\n ],\n data: getIssueCredentialInstructionDataEncoder().encode(\n args as IssueCredentialInstructionDataArgs,\n ),\n programAddress,\n } as IssueCredentialInstruction<\n TProgramAddress,\n TAccountCredential,\n TAccountCredentialTemplate,\n TAccountCredentialType,\n TAccountSubject,\n TAccountIssuer,\n TAccountSystemProgram\n >);\n}\n\nexport type ParsedIssueCredentialInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n credential: TAccountMetas[0];\n credentialTemplate: TAccountMetas[1];\n credentialType: TAccountMetas[2];\n subject: TAccountMetas[3];\n issuer: TAccountMetas[4];\n systemProgram: TAccountMetas[5];\n };\n data: IssueCredentialInstructionData;\n};\n\nexport function parseIssueCredentialInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>,\n): ParsedIssueCredentialInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 6) {\n // TODO: Coded error.\n throw new Error(\"Not enough accounts\");\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = (instruction.accounts as TAccountMetas)[accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n credential: getNextAccount(),\n credentialTemplate: getNextAccount(),\n credentialType: getNextAccount(),\n subject: getNextAccount(),\n issuer: getNextAccount(),\n systemProgram: getNextAccount(),\n },\n data: getIssueCredentialInstructionDataDecoder().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 { 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 string | AccountMeta<string> =\n \"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 Address =\n 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 return Object.freeze({\n accounts: [\n getAccountMeta(accounts.agent),\n getAccountMeta(accounts.owner),\n getAccountMeta(accounts.clock),\n ],\n data: getManageAgentStatusInstructionDataEncoder().encode(\n args as ManageAgentStatusInstructionDataArgs,\n ),\n programAddress,\n } as ManageAgentStatusInstruction<\n TProgramAddress,\n TAccountAgent,\n TAccountOwner,\n TAccountClock\n >);\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 Address =\n 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 return Object.freeze({\n accounts: [\n getAccountMeta(accounts.agent),\n getAccountMeta(accounts.owner),\n getAccountMeta(accounts.clock),\n ],\n data: getManageAgentStatusInstructionDataEncoder().encode(\n args as ManageAgentStatusInstructionDataArgs,\n ),\n programAddress,\n } as ManageAgentStatusInstruction<\n TProgramAddress,\n TAccountAgent,\n TAccountOwner,\n TAccountClock\n >);\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 // TODO: Coded error.\n throw new Error(\"Not enough accounts\");\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = (instruction.accounts as TAccountMetas)[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 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 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 ReadonlySignerAccount,\n type ReadonlyUint8Array,\n type TransactionSigner,\n type WritableAccount,\n} from \"@solana/kit\";\nimport { GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS } from \"../programs\";\nimport {\n expectAddress,\n getAccountMetaFactory,\n type ResolvedAccount,\n} from \"../shared\";\n\nexport const RECORD_PAYAI_PAYMENT_DISCRIMINATOR = new Uint8Array([\n 165, 202, 159, 139, 65, 65, 36, 163,\n]);\n\nexport function getRecordPayaiPaymentDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 8).encode(\n RECORD_PAYAI_PAYMENT_DISCRIMINATOR,\n );\n}\n\nexport type RecordPayaiPaymentInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountReputationMetrics extends string | AccountMeta<string> = string,\n TAccountAgent extends string | AccountMeta<string> = string,\n TAccountAuthority extends string | AccountMeta<string> = string,\n TAccountClock extends string | AccountMeta<string> =\n \"SysvarC1ock11111111111111111111111111111111\",\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountReputationMetrics extends string\n ? WritableAccount<TAccountReputationMetrics>\n : TAccountReputationMetrics,\n TAccountAgent extends string\n ? WritableAccount<TAccountAgent>\n : TAccountAgent,\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 RecordPayaiPaymentInstructionData = {\n discriminator: ReadonlyUint8Array;\n paymentSignature: string;\n amount: bigint;\n responseTimeMs: bigint;\n success: boolean;\n};\n\nexport type RecordPayaiPaymentInstructionDataArgs = {\n paymentSignature: string;\n amount: number | bigint;\n responseTimeMs: number | bigint;\n success: boolean;\n};\n\nexport function getRecordPayaiPaymentInstructionDataEncoder(): Encoder<RecordPayaiPaymentInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n [\"discriminator\", fixEncoderSize(getBytesEncoder(), 8)],\n [\n \"paymentSignature\",\n addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder()),\n ],\n [\"amount\", getU64Encoder()],\n [\"responseTimeMs\", getU64Encoder()],\n [\"success\", getBooleanEncoder()],\n ]),\n (value) => ({\n ...value,\n discriminator: RECORD_PAYAI_PAYMENT_DISCRIMINATOR,\n }),\n );\n}\n\nexport function getRecordPayaiPaymentInstructionDataDecoder(): Decoder<RecordPayaiPaymentInstructionData> {\n return getStructDecoder([\n [\"discriminator\", fixDecoderSize(getBytesDecoder(), 8)],\n [\n \"paymentSignature\",\n addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder()),\n ],\n [\"amount\", getU64Decoder()],\n [\"responseTimeMs\", getU64Decoder()],\n [\"success\", getBooleanDecoder()],\n ]);\n}\n\nexport function getRecordPayaiPaymentInstructionDataCodec(): Codec<\n RecordPayaiPaymentInstructionDataArgs,\n RecordPayaiPaymentInstructionData\n> {\n return combineCodec(\n getRecordPayaiPaymentInstructionDataEncoder(),\n getRecordPayaiPaymentInstructionDataDecoder(),\n );\n}\n\nexport type RecordPayaiPaymentAsyncInput<\n TAccountReputationMetrics extends string = string,\n TAccountAgent extends string = string,\n TAccountAuthority extends string = string,\n TAccountClock extends string = string,\n> = {\n /** Reputation metrics account */\n reputationMetrics?: Address<TAccountReputationMetrics>;\n /** Agent account */\n agent: Address<TAccountAgent>;\n /** Authority (can be the payment verifier or agent owner) */\n authority: TransactionSigner<TAccountAuthority>;\n /** Clock for timestamps */\n clock?: Address<TAccountClock>;\n paymentSignature: RecordPayaiPaymentInstructionDataArgs[\"paymentSignature\"];\n amount: RecordPayaiPaymentInstructionDataArgs[\"amount\"];\n responseTimeMs: RecordPayaiPaymentInstructionDataArgs[\"responseTimeMs\"];\n success: RecordPayaiPaymentInstructionDataArgs[\"success\"];\n};\n\nexport async function getRecordPayaiPaymentInstructionAsync<\n TAccountReputationMetrics extends string,\n TAccountAgent extends string,\n TAccountAuthority extends string,\n TAccountClock extends string,\n TProgramAddress extends Address =\n typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: RecordPayaiPaymentAsyncInput<\n TAccountReputationMetrics,\n TAccountAgent,\n TAccountAuthority,\n TAccountClock\n >,\n config?: { programAddress?: TProgramAddress },\n): Promise<\n RecordPayaiPaymentInstruction<\n TProgramAddress,\n TAccountReputationMetrics,\n TAccountAgent,\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 reputationMetrics: {\n value: input.reputationMetrics ?? null,\n isWritable: true,\n },\n agent: { value: input.agent ?? 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.reputationMetrics.value) {\n accounts.reputationMetrics.value = await getProgramDerivedAddress({\n programAddress,\n seeds: [\n getBytesEncoder().encode(\n new Uint8Array([\n 114, 101, 112, 117, 116, 97, 116, 105, 111, 110, 95, 109, 101, 116,\n 114, 105, 99, 115,\n ]),\n ),\n getAddressEncoder().encode(expectAddress(accounts.agent.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 return Object.freeze({\n accounts: [\n getAccountMeta(accounts.reputationMetrics),\n getAccountMeta(accounts.agent),\n getAccountMeta(accounts.authority),\n getAccountMeta(accounts.clock),\n ],\n data: getRecordPayaiPaymentInstructionDataEncoder().encode(\n args as RecordPayaiPaymentInstructionDataArgs,\n ),\n programAddress,\n } as RecordPayaiPaymentInstruction<\n TProgramAddress,\n TAccountReputationMetrics,\n TAccountAgent,\n TAccountAuthority,\n TAccountClock\n >);\n}\n\nexport type RecordPayaiPaymentInput<\n TAccountReputationMetrics extends string = string,\n TAccountAgent extends string = string,\n TAccountAuthority extends string = string,\n TAccountClock extends string = string,\n> = {\n /** Reputation metrics account */\n reputationMetrics: Address<TAccountReputationMetrics>;\n /** Agent account */\n agent: Address<TAccountAgent>;\n /** Authority (can be the payment verifier or agent owner) */\n authority: TransactionSigner<TAccountAuthority>;\n /** Clock for timestamps */\n clock?: Address<TAccountClock>;\n paymentSignature: RecordPayaiPaymentInstructionDataArgs[\"paymentSignature\"];\n amount: RecordPayaiPaymentInstructionDataArgs[\"amount\"];\n responseTimeMs: RecordPayaiPaymentInstructionDataArgs[\"responseTimeMs\"];\n success: RecordPayaiPaymentInstructionDataArgs[\"success\"];\n};\n\nexport function getRecordPayaiPaymentInstruction<\n TAccountReputationMetrics extends string,\n TAccountAgent extends string,\n TAccountAuthority extends string,\n TAccountClock extends string,\n TProgramAddress extends Address =\n typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: RecordPayaiPaymentInput<\n TAccountReputationMetrics,\n TAccountAgent,\n TAccountAuthority,\n TAccountClock\n >,\n config?: { programAddress?: TProgramAddress },\n): RecordPayaiPaymentInstruction<\n TProgramAddress,\n TAccountReputationMetrics,\n TAccountAgent,\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 reputationMetrics: {\n value: input.reputationMetrics ?? null,\n isWritable: true,\n },\n agent: { value: input.agent ?? 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 return Object.freeze({\n accounts: [\n getAccountMeta(accounts.reputationMetrics),\n getAccountMeta(accounts.agent),\n getAccountMeta(accounts.authority),\n getAccountMeta(accounts.clock),\n ],\n data: getRecordPayaiPaymentInstructionDataEncoder().encode(\n args as RecordPayaiPaymentInstructionDataArgs,\n ),\n programAddress,\n } as RecordPayaiPaymentInstruction<\n TProgramAddress,\n TAccountReputationMetrics,\n TAccountAgent,\n TAccountAuthority,\n TAccountClock\n >);\n}\n\nexport type ParsedRecordPayaiPaymentInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n /** Reputation metrics account */\n reputationMetrics: TAccountMetas[0];\n /** Agent account */\n agent: TAccountMetas[1];\n /** Authority (can be the payment verifier or agent owner) */\n authority: TAccountMetas[2];\n /** Clock for timestamps */\n clock: TAccountMetas[3];\n };\n data: RecordPayaiPaymentInstructionData;\n};\n\nexport function parseRecordPayaiPaymentInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>,\n): ParsedRecordPayaiPaymentInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 4) {\n // TODO: Coded error.\n throw new Error(\"Not enough accounts\");\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = (instruction.accounts as TAccountMetas)[accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n reputationMetrics: getNextAccount(),\n agent: getNextAccount(),\n authority: getNextAccount(),\n clock: getNextAccount(),\n },\n data: getRecordPayaiPaymentInstructionDataDecoder().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 { GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS } from \"../programs\";\nimport {\n expectAddress,\n expectSome,\n getAccountMetaFactory,\n type ResolvedAccount,\n} from \"../shared\";\nimport {\n getPricingModelDecoder,\n getPricingModelEncoder,\n type PricingModel,\n type PricingModelArgs,\n} from \"../types\";\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 TAccountStakingAccount extends string | AccountMeta<string> = string,\n TAccountSigner extends string | AccountMeta<string> = string,\n TAccountSystemProgram extends string | AccountMeta<string> =\n \"11111111111111111111111111111111\",\n TAccountClock extends string | AccountMeta<string> =\n \"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 TAccountStakingAccount extends string\n ? ReadonlyAccount<TAccountStakingAccount>\n : TAccountStakingAccount,\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 name: string;\n description: string;\n metadataUri: string;\n agentId: string;\n pricingModel: PricingModel;\n};\n\nexport type RegisterAgentInstructionDataArgs = {\n agentType: number;\n name: string;\n description: string;\n metadataUri: string;\n agentId: string;\n pricingModel: PricingModelArgs;\n};\n\nexport function getRegisterAgentInstructionDataEncoder(): Encoder<RegisterAgentInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n [\"discriminator\", fixEncoderSize(getBytesEncoder(), 8)],\n [\"agentType\", getU8Encoder()],\n [\"name\", addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder())],\n [\"description\", addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder())],\n [\"metadataUri\", addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder())],\n [\"agentId\", addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder())],\n [\"pricingModel\", getPricingModelEncoder()],\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 [\"name\", addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())],\n [\"description\", addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())],\n [\"metadataUri\", addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())],\n [\"agentId\", addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())],\n [\"pricingModel\", getPricingModelDecoder()],\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 TAccountStakingAccount 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 /** Staking account - REQUIRED for Sybil resistance (must have >= 1K GHOST staked) */\n stakingAccount?: Address<TAccountStakingAccount>;\n /**\n * User registry with enhanced validation\n * Authority with enhanced verification\n */\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 name: RegisterAgentInstructionDataArgs[\"name\"];\n description: RegisterAgentInstructionDataArgs[\"description\"];\n metadataUri: RegisterAgentInstructionDataArgs[\"metadataUri\"];\n agentId: RegisterAgentInstructionDataArgs[\"agentId\"];\n pricingModel: RegisterAgentInstructionDataArgs[\"pricingModel\"];\n};\n\nexport async function getRegisterAgentInstructionAsync<\n TAccountAgentAccount extends string,\n TAccountStakingAccount extends string,\n TAccountSigner extends string,\n TAccountSystemProgram extends string,\n TAccountClock extends string,\n TProgramAddress extends Address =\n typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: RegisterAgentAsyncInput<\n TAccountAgentAccount,\n TAccountStakingAccount,\n TAccountSigner,\n TAccountSystemProgram,\n TAccountClock\n >,\n config?: { programAddress?: TProgramAddress },\n): Promise<\n RegisterAgentInstruction<\n TProgramAddress,\n TAccountAgentAccount,\n TAccountStakingAccount,\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 stakingAccount: { value: input.stakingAccount ?? null, isWritable: false },\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 getUtf8Encoder().encode(expectSome(args.agentId)),\n ],\n });\n }\n if (!accounts.stakingAccount.value) {\n accounts.stakingAccount.value = await getProgramDerivedAddress({\n programAddress,\n seeds: [\n getBytesEncoder().encode(\n new Uint8Array([115, 116, 97, 107, 105, 110, 103]),\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 return Object.freeze({\n accounts: [\n getAccountMeta(accounts.agentAccount),\n getAccountMeta(accounts.stakingAccount),\n getAccountMeta(accounts.signer),\n getAccountMeta(accounts.systemProgram),\n getAccountMeta(accounts.clock),\n ],\n data: getRegisterAgentInstructionDataEncoder().encode(\n args as RegisterAgentInstructionDataArgs,\n ),\n programAddress,\n } as RegisterAgentInstruction<\n TProgramAddress,\n TAccountAgentAccount,\n TAccountStakingAccount,\n TAccountSigner,\n TAccountSystemProgram,\n TAccountClock\n >);\n}\n\nexport type RegisterAgentInput<\n TAccountAgentAccount extends string = string,\n TAccountStakingAccount 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 /** Staking account - REQUIRED for Sybil resistance (must have >= 1K GHOST staked) */\n stakingAccount: Address<TAccountStakingAccount>;\n /**\n * User registry with enhanced validation\n * Authority with enhanced verification\n */\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 name: RegisterAgentInstructionDataArgs[\"name\"];\n description: RegisterAgentInstructionDataArgs[\"description\"];\n metadataUri: RegisterAgentInstructionDataArgs[\"metadataUri\"];\n agentId: RegisterAgentInstructionDataArgs[\"agentId\"];\n pricingModel: RegisterAgentInstructionDataArgs[\"pricingModel\"];\n};\n\nexport function getRegisterAgentInstruction<\n TAccountAgentAccount extends string,\n TAccountStakingAccount extends string,\n TAccountSigner extends string,\n TAccountSystemProgram extends string,\n TAccountClock extends string,\n TProgramAddress extends Address =\n typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: RegisterAgentInput<\n TAccountAgentAccount,\n TAccountStakingAccount,\n TAccountSigner,\n TAccountSystemProgram,\n TAccountClock\n >,\n config?: { programAddress?: TProgramAddress },\n): RegisterAgentInstruction<\n TProgramAddress,\n TAccountAgentAccount,\n TAccountStakingAccount,\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 stakingAccount: { value: input.stakingAccount ?? null, isWritable: false },\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 return Object.freeze({\n accounts: [\n getAccountMeta(accounts.agentAccount),\n getAccountMeta(accounts.stakingAccount),\n getAccountMeta(accounts.signer),\n getAccountMeta(accounts.systemProgram),\n getAccountMeta(accounts.clock),\n ],\n data: getRegisterAgentInstructionDataEncoder().encode(\n args as RegisterAgentInstructionDataArgs,\n ),\n programAddress,\n } as RegisterAgentInstruction<\n TProgramAddress,\n TAccountAgentAccount,\n TAccountStakingAccount,\n TAccountSigner,\n TAccountSystemProgram,\n TAccountClock\n >);\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 /** Staking account - REQUIRED for Sybil resistance (must have >= 1K GHOST staked) */\n stakingAccount: TAccountMetas[1];\n /**\n * User registry with enhanced validation\n * Authority with enhanced verification\n */\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 // TODO: Coded error.\n throw new Error(\"Not enough accounts\");\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = (instruction.accounts as TAccountMetas)[accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n agentAccount: getNextAccount(),\n stakingAccount: 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 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 { GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS } from \"../programs\";\nimport {\n expectAddress,\n getAccountMetaFactory,\n type ResolvedAccount,\n} from \"../shared\";\nimport {\n getPricingModelDecoder,\n getPricingModelEncoder,\n type PricingModel,\n type PricingModelArgs,\n} from \"../types\";\n\nexport const REGISTER_AGENT_COMPRESSED_DISCRIMINATOR = new Uint8Array([\n 15, 6, 94, 55, 65, 80, 123, 248,\n]);\n\nexport function getRegisterAgentCompressedDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 8).encode(\n REGISTER_AGENT_COMPRESSED_DISCRIMINATOR,\n );\n}\n\nexport type RegisterAgentCompressedInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountTreeAuthority extends string | AccountMeta<string> = string,\n TAccountMerkleTree extends string | AccountMeta<string> = string,\n TAccountUserRegistry extends string | AccountMeta<string> = string,\n TAccountSigner extends string | AccountMeta<string> = string,\n TAccountCompressionProgram extends string | AccountMeta<string> =\n \"cmtDvXumGCrqC1Age74AVPhSRVXJMd8PJS91L8KbNCK\",\n TAccountLogWrapper extends string | AccountMeta<string> =\n \"noopb9bkMVfRPU8AsbpTUg8AQkHtKwMYZiFUjNRtMmV\",\n TAccountSystemProgram extends string | AccountMeta<string> =\n \"11111111111111111111111111111111\",\n TAccountClock extends string | AccountMeta<string> =\n \"SysvarC1ock11111111111111111111111111111111\",\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountTreeAuthority extends string\n ? WritableAccount<TAccountTreeAuthority>\n : TAccountTreeAuthority,\n TAccountMerkleTree extends string\n ? WritableAccount<TAccountMerkleTree>\n : TAccountMerkleTree,\n TAccountUserRegistry extends string\n ? WritableAccount<TAccountUserRegistry>\n : TAccountUserRegistry,\n TAccountSigner extends string\n ? WritableSignerAccount<TAccountSigner> &\n AccountSignerMeta<TAccountSigner>\n : TAccountSigner,\n TAccountCompressionProgram extends string\n ? ReadonlyAccount<TAccountCompressionProgram>\n : TAccountCompressionProgram,\n TAccountLogWrapper extends string\n ? ReadonlyAccount<TAccountLogWrapper>\n : TAccountLogWrapper,\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 RegisterAgentCompressedInstructionData = {\n discriminator: ReadonlyUint8Array;\n agentType: number;\n metadataUri: string;\n agentId: string;\n name: string;\n description: string;\n pricingModel: PricingModel;\n};\n\nexport type RegisterAgentCompressedInstructionDataArgs = {\n agentType: number;\n metadataUri: string;\n agentId: string;\n name: string;\n description: string;\n pricingModel: PricingModelArgs;\n};\n\nexport function getRegisterAgentCompressedInstructionDataEncoder(): Encoder<RegisterAgentCompressedInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n [\"discriminator\", fixEncoderSize(getBytesEncoder(), 8)],\n [\"agentType\", getU8Encoder()],\n [\"metadataUri\", addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder())],\n [\"agentId\", addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder())],\n [\"name\", addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder())],\n [\"description\", addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder())],\n [\"pricingModel\", getPricingModelEncoder()],\n ]),\n (value) => ({\n ...value,\n discriminator: REGISTER_AGENT_COMPRESSED_DISCRIMINATOR,\n }),\n );\n}\n\nexport function getRegisterAgentCompressedInstructionDataDecoder(): Decoder<RegisterAgentCompressedInstructionData> {\n return getStructDecoder([\n [\"discriminator\", fixDecoderSize(getBytesDecoder(), 8)],\n [\"agentType\", getU8Decoder()],\n [\"metadataUri\", addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())],\n [\"agentId\", addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())],\n [\"name\", addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())],\n [\"description\", addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())],\n [\"pricingModel\", getPricingModelDecoder()],\n ]);\n}\n\nexport function getRegisterAgentCompressedInstructionDataCodec(): Codec<\n RegisterAgentCompressedInstructionDataArgs,\n RegisterAgentCompressedInstructionData\n> {\n return combineCodec(\n getRegisterAgentCompressedInstructionDataEncoder(),\n getRegisterAgentCompressedInstructionDataDecoder(),\n );\n}\n\nexport type RegisterAgentCompressedAsyncInput<\n TAccountTreeAuthority extends string = string,\n TAccountMerkleTree extends string = string,\n TAccountUserRegistry extends string = string,\n TAccountSigner extends string = string,\n TAccountCompressionProgram extends string = string,\n TAccountLogWrapper extends string = string,\n TAccountSystemProgram extends string = string,\n TAccountClock extends string = string,\n> = {\n /** Tree authority PDA that manages the compressed Agent tree */\n treeAuthority?: Address<TAccountTreeAuthority>;\n /** The Merkle tree account that stores compressed Agent data */\n merkleTree: Address<TAccountMerkleTree>;\n /** User registry with enhanced validation */\n userRegistry?: Address<TAccountUserRegistry>;\n /** Authority with enhanced verification */\n signer: TransactionSigner<TAccountSigner>;\n /** SPL Account Compression program */\n compressionProgram?: Address<TAccountCompressionProgram>;\n /** SPL Noop program for logging */\n logWrapper?: Address<TAccountLogWrapper>;\n /** System program for account creation */\n systemProgram?: Address<TAccountSystemProgram>;\n /** Clock sysvar for timestamps */\n clock?: Address<TAccountClock>;\n agentType: RegisterAgentCompressedInstructionDataArgs[\"agentType\"];\n metadataUri: RegisterAgentCompressedInstructionDataArgs[\"metadataUri\"];\n agentId: RegisterAgentCompressedInstructionDataArgs[\"agentId\"];\n name: RegisterAgentCompressedInstructionDataArgs[\"name\"];\n description: RegisterAgentCompressedInstructionDataArgs[\"description\"];\n pricingModel: RegisterAgentCompressedInstructionDataArgs[\"pricingModel\"];\n};\n\nexport async function getRegisterAgentCompressedInstructionAsync<\n TAccountTreeAuthority extends string,\n TAccountMerkleTree extends string,\n TAccountUserRegistry extends string,\n TAccountSigner extends string,\n TAccountCompressionProgram extends string,\n TAccountLogWrapper extends string,\n TAccountSystemProgram extends string,\n TAccountClock extends string,\n TProgramAddress extends Address =\n typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: RegisterAgentCompressedAsyncInput<\n TAccountTreeAuthority,\n TAccountMerkleTree,\n TAccountUserRegistry,\n TAccountSigner,\n TAccountCompressionProgram,\n TAccountLogWrapper,\n TAccountSystemProgram,\n TAccountClock\n >,\n config?: { programAddress?: TProgramAddress },\n): Promise<\n RegisterAgentCompressedInstruction<\n TProgramAddress,\n TAccountTreeAuthority,\n TAccountMerkleTree,\n TAccountUserRegistry,\n TAccountSigner,\n TAccountCompressionProgram,\n TAccountLogWrapper,\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 treeAuthority: { value: input.treeAuthority ?? null, isWritable: true },\n merkleTree: { value: input.merkleTree ?? null, isWritable: true },\n userRegistry: { value: input.userRegistry ?? null, isWritable: true },\n signer: { value: input.signer ?? null, isWritable: true },\n compressionProgram: {\n value: input.compressionProgram ?? null,\n isWritable: false,\n },\n logWrapper: { value: input.logWrapper ?? 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.treeAuthority.value) {\n accounts.treeAuthority.value = await getProgramDerivedAddress({\n programAddress,\n seeds: [\n getBytesEncoder().encode(\n new Uint8Array([\n 97, 103, 101, 110, 116, 95, 116, 114, 101, 101, 95, 99, 111, 110,\n 102, 105, 103,\n ]),\n ),\n getAddressEncoder().encode(expectAddress(accounts.signer.value)),\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.compressionProgram.value) {\n accounts.compressionProgram.value =\n \"cmtDvXumGCrqC1Age74AVPhSRVXJMd8PJS91L8KbNCK\" as Address<\"cmtDvXumGCrqC1Age74AVPhSRVXJMd8PJS91L8KbNCK\">;\n }\n if (!accounts.logWrapper.value) {\n accounts.logWrapper.value =\n \"noopb9bkMVfRPU8AsbpTUg8AQkHtKwMYZiFUjNRtMmV\" as Address<\"noopb9bkMVfRPU8AsbpTUg8AQkHtKwMYZiFUjNRtMmV\">;\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 return Object.freeze({\n accounts: [\n getAccountMeta(accounts.treeAuthority),\n getAccountMeta(accounts.merkleTree),\n getAccountMeta(accounts.userRegistry),\n getAccountMeta(accounts.signer),\n getAccountMeta(accounts.compressionProgram),\n getAccountMeta(accounts.logWrapper),\n getAccountMeta(accounts.systemProgram),\n getAccountMeta(accounts.clock),\n ],\n data: getRegisterAgentCompressedInstructionDataEncoder().encode(\n args as RegisterAgentCompressedInstructionDataArgs,\n ),\n programAddress,\n } as RegisterAgentCompressedInstruction<\n TProgramAddress,\n TAccountTreeAuthority,\n TAccountMerkleTree,\n TAccountUserRegistry,\n TAccountSigner,\n TAccountCompressionProgram,\n TAccountLogWrapper,\n TAccountSystemProgram,\n TAccountClock\n >);\n}\n\nexport type RegisterAgentCompressedInput<\n TAccountTreeAuthority extends string = string,\n TAccountMerkleTree extends string = string,\n TAccountUserRegistry extends string = string,\n TAccountSigner extends string = string,\n TAccountCompressionProgram extends string = string,\n TAccountLogWrapper extends string = string,\n TAccountSystemProgram extends string = string,\n TAccountClock extends string = string,\n> = {\n /** Tree authority PDA that manages the compressed Agent tree */\n treeAuthority: Address<TAccountTreeAuthority>;\n /** The Merkle tree account that stores compressed Agent data */\n merkleTree: Address<TAccountMerkleTree>;\n /** User registry with enhanced validation */\n userRegistry: Address<TAccountUserRegistry>;\n /** Authority with enhanced verification */\n signer: TransactionSigner<TAccountSigner>;\n /** SPL Account Compression program */\n compressionProgram?: Address<TAccountCompressionProgram>;\n /** SPL Noop program for logging */\n logWrapper?: Address<TAccountLogWrapper>;\n /** System program for account creation */\n systemProgram?: Address<TAccountSystemProgram>;\n /** Clock sysvar for timestamps */\n clock?: Address<TAccountClock>;\n agentType: RegisterAgentCompressedInstructionDataArgs[\"agentType\"];\n metadataUri: RegisterAgentCompressedInstructionDataArgs[\"metadataUri\"];\n agentId: RegisterAgentCompressedInstructionDataArgs[\"agentId\"];\n name: RegisterAgentCompressedInstructionDataArgs[\"name\"];\n description: RegisterAgentCompressedInstructionDataArgs[\"description\"];\n pricingModel: RegisterAgentCompressedInstructionDataArgs[\"pricingModel\"];\n};\n\nexport function getRegisterAgentCompressedInstruction<\n TAccountTreeAuthority extends string,\n TAccountMerkleTree extends string,\n TAccountUserRegistry extends string,\n TAccountSigner extends string,\n TAccountCompressionProgram extends string,\n TAccountLogWrapper extends string,\n TAccountSystemProgram extends string,\n TAccountClock extends string,\n TProgramAddress extends Address =\n typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: RegisterAgentCompressedInput<\n TAccountTreeAuthority,\n TAccountMerkleTree,\n TAccountUserRegistry,\n TAccountSigner,\n TAccountCompressionProgram,\n TAccountLogWrapper,\n TAccountSystemProgram,\n TAccountClock\n >,\n config?: { programAddress?: TProgramAddress },\n): RegisterAgentCompressedInstruction<\n TProgramAddress,\n TAccountTreeAuthority,\n TAccountMerkleTree,\n TAccountUserRegistry,\n TAccountSigner,\n TAccountCompressionProgram,\n TAccountLogWrapper,\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 treeAuthority: { value: input.treeAuthority ?? null, isWritable: true },\n merkleTree: { value: input.merkleTree ?? null, isWritable: true },\n userRegistry: { value: input.userRegistry ?? null, isWritable: true },\n signer: { value: input.signer ?? null, isWritable: true },\n compressionProgram: {\n value: input.compressionProgram ?? null,\n isWritable: false,\n },\n logWrapper: { value: input.logWrapper ?? 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.compressionProgram.value) {\n accounts.compressionProgram.value =\n \"cmtDvXumGCrqC1Age74AVPhSRVXJMd8PJS91L8KbNCK\" as Address<\"cmtDvXumGCrqC1Age74AVPhSRVXJMd8PJS91L8KbNCK\">;\n }\n if (!accounts.logWrapper.value) {\n accounts.logWrapper.value =\n \"noopb9bkMVfRPU8AsbpTUg8AQkHtKwMYZiFUjNRtMmV\" as Address<\"noopb9bkMVfRPU8AsbpTUg8AQkHtKwMYZiFUjNRtMmV\">;\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 return Object.freeze({\n accounts: [\n getAccountMeta(accounts.treeAuthority),\n getAccountMeta(accounts.merkleTree),\n getAccountMeta(accounts.userRegistry),\n getAccountMeta(accounts.signer),\n getAccountMeta(accounts.compressionProgram),\n getAccountMeta(accounts.logWrapper),\n getAccountMeta(accounts.systemProgram),\n getAccountMeta(accounts.clock),\n ],\n data: getRegisterAgentCompressedInstructionDataEncoder().encode(\n args as RegisterAgentCompressedInstructionDataArgs,\n ),\n programAddress,\n } as RegisterAgentCompressedInstruction<\n TProgramAddress,\n TAccountTreeAuthority,\n TAccountMerkleTree,\n TAccountUserRegistry,\n TAccountSigner,\n TAccountCompressionProgram,\n TAccountLogWrapper,\n TAccountSystemProgram,\n TAccountClock\n >);\n}\n\nexport type ParsedRegisterAgentCompressedInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n /** Tree authority PDA that manages the compressed Agent tree */\n treeAuthority: TAccountMetas[0];\n /** The Merkle tree account that stores compressed Agent data */\n merkleTree: TAccountMetas[1];\n /** User registry with enhanced validation */\n userRegistry: TAccountMetas[2];\n /** Authority with enhanced verification */\n signer: TAccountMetas[3];\n /** SPL Account Compression program */\n compressionProgram: TAccountMetas[4];\n /** SPL Noop program for logging */\n logWrapper: TAccountMetas[5];\n /** System program for account creation */\n systemProgram: TAccountMetas[6];\n /** Clock sysvar for timestamps */\n clock: TAccountMetas[7];\n };\n data: RegisterAgentCompressedInstructionData;\n};\n\nexport function parseRegisterAgentCompressedInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>,\n): ParsedRegisterAgentCompressedInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 8) {\n // TODO: Coded error.\n throw new Error(\"Not enough accounts\");\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = (instruction.accounts as TAccountMetas)[accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n treeAuthority: getNextAccount(),\n merkleTree: getNextAccount(),\n userRegistry: getNextAccount(),\n signer: getNextAccount(),\n compressionProgram: getNextAccount(),\n logWrapper: getNextAccount(),\n systemProgram: getNextAccount(),\n clock: getNextAccount(),\n },\n data: getRegisterAgentCompressedInstructionDataDecoder().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 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\";\n\nexport const RESET_REENTRANCY_GUARD_DISCRIMINATOR = new Uint8Array([\n 93, 74, 168, 125, 46, 153, 9, 255,\n]);\n\nexport function getResetReentrancyGuardDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 8).encode(\n RESET_REENTRANCY_GUARD_DISCRIMINATOR,\n );\n}\n\nexport type ResetReentrancyGuardInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\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 TAccountReentrancyGuard extends string\n ? WritableAccount<TAccountReentrancyGuard>\n : TAccountReentrancyGuard,\n TAccountAuthority extends string\n ? WritableSignerAccount<TAccountAuthority> &\n AccountSignerMeta<TAccountAuthority>\n : TAccountAuthority,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type ResetReentrancyGuardInstructionData = {\n discriminator: ReadonlyUint8Array;\n};\n\nexport type ResetReentrancyGuardInstructionDataArgs = {};\n\nexport function getResetReentrancyGuardInstructionDataEncoder(): FixedSizeEncoder<ResetReentrancyGuardInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([[\"discriminator\", fixEncoderSize(getBytesEncoder(), 8)]]),\n (value) => ({\n ...value,\n discriminator: RESET_REENTRANCY_GUARD_DISCRIMINATOR,\n }),\n );\n}\n\nexport function getResetReentrancyGuardInstructionDataDecoder(): FixedSizeDecoder<ResetReentrancyGuardInstructionData> {\n return getStructDecoder([\n [\"discriminator\", fixDecoderSize(getBytesDecoder(), 8)],\n ]);\n}\n\nexport function getResetReentrancyGuardInstructionDataCodec(): FixedSizeCodec<\n ResetReentrancyGuardInstructionDataArgs,\n ResetReentrancyGuardInstructionData\n> {\n return combineCodec(\n getResetReentrancyGuardInstructionDataEncoder(),\n getResetReentrancyGuardInstructionDataDecoder(),\n );\n}\n\nexport type ResetReentrancyGuardAsyncInput<\n TAccountReentrancyGuard extends string = string,\n TAccountAuthority extends string = string,\n> = {\n reentrancyGuard?: Address<TAccountReentrancyGuard>;\n authority: TransactionSigner<TAccountAuthority>;\n};\n\nexport async function getResetReentrancyGuardInstructionAsync<\n TAccountReentrancyGuard extends string,\n TAccountAuthority extends string,\n TProgramAddress extends Address =\n typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: ResetReentrancyGuardAsyncInput<\n TAccountReentrancyGuard,\n TAccountAuthority\n >,\n config?: { programAddress?: TProgramAddress },\n): Promise<\n ResetReentrancyGuardInstruction<\n TProgramAddress,\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 reentrancyGuard: { value: input.reentrancyGuard ?? 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 // 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 return Object.freeze({\n accounts: [\n getAccountMeta(accounts.reentrancyGuard),\n getAccountMeta(accounts.authority),\n ],\n data: getResetReentrancyGuardInstructionDataEncoder().encode({}),\n programAddress,\n } as ResetReentrancyGuardInstruction<\n TProgramAddress,\n TAccountReentrancyGuard,\n TAccountAuthority\n >);\n}\n\nexport type ResetReentrancyGuardInput<\n TAccountReentrancyGuard extends string = string,\n TAccountAuthority extends string = string,\n> = {\n reentrancyGuard: Address<TAccountReentrancyGuard>;\n authority: TransactionSigner<TAccountAuthority>;\n};\n\nexport function getResetReentrancyGuardInstruction<\n TAccountReentrancyGuard extends string,\n TAccountAuthority extends string,\n TProgramAddress extends Address =\n typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: ResetReentrancyGuardInput<TAccountReentrancyGuard, TAccountAuthority>,\n config?: { programAddress?: TProgramAddress },\n): ResetReentrancyGuardInstruction<\n TProgramAddress,\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 reentrancyGuard: { value: input.reentrancyGuard ?? 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 return Object.freeze({\n accounts: [\n getAccountMeta(accounts.reentrancyGuard),\n getAccountMeta(accounts.authority),\n ],\n data: getResetReentrancyGuardInstructionDataEncoder().encode({}),\n programAddress,\n } as ResetReentrancyGuardInstruction<\n TProgramAddress,\n TAccountReentrancyGuard,\n TAccountAuthority\n >);\n}\n\nexport type ParsedResetReentrancyGuardInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n reentrancyGuard: TAccountMetas[0];\n authority: TAccountMetas[1];\n };\n data: ResetReentrancyGuardInstructionData;\n};\n\nexport function parseResetReentrancyGuardInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>,\n): ParsedResetReentrancyGuardInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 2) {\n // TODO: Coded error.\n throw new Error(\"Not enough accounts\");\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = (instruction.accounts as TAccountMetas)[accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n reentrancyGuard: getNextAccount(),\n authority: getNextAccount(),\n },\n data: getResetReentrancyGuardInstructionDataDecoder().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 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} from \"@solana/kit\";\nimport { GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS } from \"../programs\";\nimport {\n expectAddress,\n getAccountMetaFactory,\n type ResolvedAccount,\n} from \"../shared\";\n\nexport const RESOLVE_DID_DOCUMENT_DISCRIMINATOR = new Uint8Array([\n 168, 180, 218, 211, 184, 19, 102, 12,\n]);\n\nexport function getResolveDidDocumentDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 8).encode(\n RESOLVE_DID_DOCUMENT_DISCRIMINATOR,\n );\n}\n\nexport type ResolveDidDocumentInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountDidDocument extends string | AccountMeta<string> = string,\n TAccountDidController extends string | AccountMeta<string> = string,\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountDidDocument extends string\n ? ReadonlyAccount<TAccountDidDocument>\n : TAccountDidDocument,\n TAccountDidController extends string\n ? ReadonlyAccount<TAccountDidController>\n : TAccountDidController,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type ResolveDidDocumentInstructionData = {\n discriminator: ReadonlyUint8Array;\n};\n\nexport type ResolveDidDocumentInstructionDataArgs = {};\n\nexport function getResolveDidDocumentInstructionDataEncoder(): FixedSizeEncoder<ResolveDidDocumentInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([[\"discriminator\", fixEncoderSize(getBytesEncoder(), 8)]]),\n (value) => ({\n ...value,\n discriminator: RESOLVE_DID_DOCUMENT_DISCRIMINATOR,\n }),\n );\n}\n\nexport function getResolveDidDocumentInstructionDataDecoder(): FixedSizeDecoder<ResolveDidDocumentInstructionData> {\n return getStructDecoder([\n [\"discriminator\", fixDecoderSize(getBytesDecoder(), 8)],\n ]);\n}\n\nexport function getResolveDidDocumentInstructionDataCodec(): FixedSizeCodec<\n ResolveDidDocumentInstructionDataArgs,\n ResolveDidDocumentInstructionData\n> {\n return combineCodec(\n getResolveDidDocumentInstructionDataEncoder(),\n getResolveDidDocumentInstructionDataDecoder(),\n );\n}\n\nexport type ResolveDidDocumentAsyncInput<\n TAccountDidDocument extends string = string,\n TAccountDidController extends string = string,\n> = {\n /** DID document account */\n didDocument?: Address<TAccountDidDocument>;\n /** Controller public key (used for PDA derivation) */\n didController: Address<TAccountDidController>;\n};\n\nexport async function getResolveDidDocumentInstructionAsync<\n TAccountDidDocument extends string,\n TAccountDidController extends string,\n TProgramAddress extends Address =\n typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: ResolveDidDocumentAsyncInput<\n TAccountDidDocument,\n TAccountDidController\n >,\n config?: { programAddress?: TProgramAddress },\n): Promise<\n ResolveDidDocumentInstruction<\n TProgramAddress,\n TAccountDidDocument,\n TAccountDidController\n >\n> {\n // Program address.\n const programAddress =\n config?.programAddress ?? GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n didDocument: { value: input.didDocument ?? null, isWritable: false },\n didController: { value: input.didController ?? 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.didDocument.value) {\n accounts.didDocument.value = await getProgramDerivedAddress({\n programAddress,\n seeds: [\n getBytesEncoder().encode(\n new Uint8Array([\n 100, 105, 100, 95, 100, 111, 99, 117, 109, 101, 110, 116,\n ]),\n ),\n getAddressEncoder().encode(expectAddress(accounts.didController.value)),\n ],\n });\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, \"programId\");\n return Object.freeze({\n accounts: [\n getAccountMeta(accounts.didDocument),\n getAccountMeta(accounts.didController),\n ],\n data: getResolveDidDocumentInstructionDataEncoder().encode({}),\n programAddress,\n } as ResolveDidDocumentInstruction<\n TProgramAddress,\n TAccountDidDocument,\n TAccountDidController\n >);\n}\n\nexport type ResolveDidDocumentInput<\n TAccountDidDocument extends string = string,\n TAccountDidController extends string = string,\n> = {\n /** DID document account */\n didDocument: Address<TAccountDidDocument>;\n /** Controller public key (used for PDA derivation) */\n didController: Address<TAccountDidController>;\n};\n\nexport function getResolveDidDocumentInstruction<\n TAccountDidDocument extends string,\n TAccountDidController extends string,\n TProgramAddress extends Address =\n typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: ResolveDidDocumentInput<TAccountDidDocument, TAccountDidController>,\n config?: { programAddress?: TProgramAddress },\n): ResolveDidDocumentInstruction<\n TProgramAddress,\n TAccountDidDocument,\n TAccountDidController\n> {\n // Program address.\n const programAddress =\n config?.programAddress ?? GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n didDocument: { value: input.didDocument ?? null, isWritable: false },\n didController: { value: input.didController ?? 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 return Object.freeze({\n accounts: [\n getAccountMeta(accounts.didDocument),\n getAccountMeta(accounts.didController),\n ],\n data: getResolveDidDocumentInstructionDataEncoder().encode({}),\n programAddress,\n } as ResolveDidDocumentInstruction<\n TProgramAddress,\n TAccountDidDocument,\n TAccountDidController\n >);\n}\n\nexport type ParsedResolveDidDocumentInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n /** DID document account */\n didDocument: TAccountMetas[0];\n /** Controller public key (used for PDA derivation) */\n didController: TAccountMetas[1];\n };\n data: ResolveDidDocumentInstructionData;\n};\n\nexport function parseResolveDidDocumentInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>,\n): ParsedResolveDidDocumentInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 2) {\n // TODO: Coded error.\n throw new Error(\"Not enough accounts\");\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = (instruction.accounts as TAccountMetas)[accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n didDocument: getNextAccount(),\n didController: getNextAccount(),\n },\n data: getResolveDidDocumentInstructionDataDecoder().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 { GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS } from \"../programs\";\nimport { getAccountMetaFactory, type ResolvedAccount } from \"../shared\";\n\nexport const REVOKE_CREDENTIAL_DISCRIMINATOR = new Uint8Array([\n 38, 123, 95, 95, 223, 158, 169, 87,\n]);\n\nexport function getRevokeCredentialDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 8).encode(\n REVOKE_CREDENTIAL_DISCRIMINATOR,\n );\n}\n\nexport type RevokeCredentialInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountCredential extends string | AccountMeta<string> = string,\n TAccountIssuer extends string | AccountMeta<string> = string,\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountCredential extends string\n ? WritableAccount<TAccountCredential>\n : TAccountCredential,\n TAccountIssuer extends string\n ? WritableSignerAccount<TAccountIssuer> &\n AccountSignerMeta<TAccountIssuer>\n : TAccountIssuer,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type RevokeCredentialInstructionData = {\n discriminator: ReadonlyUint8Array;\n};\n\nexport type RevokeCredentialInstructionDataArgs = {};\n\nexport function getRevokeCredentialInstructionDataEncoder(): FixedSizeEncoder<RevokeCredentialInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([[\"discriminator\", fixEncoderSize(getBytesEncoder(), 8)]]),\n (value) => ({ ...value, discriminator: REVOKE_CREDENTIAL_DISCRIMINATOR }),\n );\n}\n\nexport function getRevokeCredentialInstructionDataDecoder(): FixedSizeDecoder<RevokeCredentialInstructionData> {\n return getStructDecoder([\n [\"discriminator\", fixDecoderSize(getBytesDecoder(), 8)],\n ]);\n}\n\nexport function getRevokeCredentialInstructionDataCodec(): FixedSizeCodec<\n RevokeCredentialInstructionDataArgs,\n RevokeCredentialInstructionData\n> {\n return combineCodec(\n getRevokeCredentialInstructionDataEncoder(),\n getRevokeCredentialInstructionDataDecoder(),\n );\n}\n\nexport type RevokeCredentialInput<\n TAccountCredential extends string = string,\n TAccountIssuer extends string = string,\n> = {\n credential: Address<TAccountCredential>;\n issuer: TransactionSigner<TAccountIssuer>;\n};\n\nexport function getRevokeCredentialInstruction<\n TAccountCredential extends string,\n TAccountIssuer extends string,\n TProgramAddress extends Address =\n typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: RevokeCredentialInput<TAccountCredential, TAccountIssuer>,\n config?: { programAddress?: TProgramAddress },\n): RevokeCredentialInstruction<\n TProgramAddress,\n TAccountCredential,\n TAccountIssuer\n> {\n // Program address.\n const programAddress =\n config?.programAddress ?? GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n credential: { value: input.credential ?? null, isWritable: true },\n issuer: { value: input.issuer ?? 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 return Object.freeze({\n accounts: [\n getAccountMeta(accounts.credential),\n getAccountMeta(accounts.issuer),\n ],\n data: getRevokeCredentialInstructionDataEncoder().encode({}),\n programAddress,\n } as RevokeCredentialInstruction<\n TProgramAddress,\n TAccountCredential,\n TAccountIssuer\n >);\n}\n\nexport type ParsedRevokeCredentialInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n credential: TAccountMetas[0];\n issuer: TAccountMetas[1];\n };\n data: RevokeCredentialInstructionData;\n};\n\nexport function parseRevokeCredentialInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>,\n): ParsedRevokeCredentialInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 2) {\n // TODO: Coded error.\n throw new Error(\"Not enough accounts\");\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = (instruction.accounts as TAccountMetas)[accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: { credential: getNextAccount(), issuer: getNextAccount() },\n data: getRevokeCredentialInstructionDataDecoder().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 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 ReadonlySignerAccount,\n type ReadonlyUint8Array,\n type TransactionSigner,\n type WritableAccount,\n} from \"@solana/kit\";\nimport { GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS } from \"../programs\";\nimport {\n expectAddress,\n expectSome,\n getAccountMetaFactory,\n type ResolvedAccount,\n} from \"../shared\";\nimport {\n getSlashReasonDecoder,\n getSlashReasonEncoder,\n type SlashReason,\n type SlashReasonArgs,\n} from \"../types\";\n\nexport const SLASH_STAKE_DISCRIMINATOR = new Uint8Array([\n 190, 242, 137, 27, 41, 18, 233, 37,\n]);\n\nexport function getSlashStakeDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 8).encode(SLASH_STAKE_DISCRIMINATOR);\n}\n\nexport type SlashStakeInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountStakingAccount extends string | AccountMeta<string> = string,\n TAccountStakingConfig extends string | AccountMeta<string> = string,\n TAccountStakingVault extends string | AccountMeta<string> = string,\n TAccountTreasury extends string | AccountMeta<string> = string,\n TAccountAuthority extends string | AccountMeta<string> = string,\n TAccountTokenProgram extends string | AccountMeta<string> =\n \"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA\",\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountStakingAccount extends string\n ? WritableAccount<TAccountStakingAccount>\n : TAccountStakingAccount,\n TAccountStakingConfig extends string\n ? ReadonlyAccount<TAccountStakingConfig>\n : TAccountStakingConfig,\n TAccountStakingVault extends string\n ? WritableAccount<TAccountStakingVault>\n : TAccountStakingVault,\n TAccountTreasury extends string\n ? WritableAccount<TAccountTreasury>\n : TAccountTreasury,\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 SlashStakeInstructionData = {\n discriminator: ReadonlyUint8Array;\n owner: Address;\n reason: SlashReason;\n customAmount: Option<bigint>;\n};\n\nexport type SlashStakeInstructionDataArgs = {\n owner: Address;\n reason: SlashReasonArgs;\n customAmount: OptionOrNullable<number | bigint>;\n};\n\nexport function getSlashStakeInstructionDataEncoder(): Encoder<SlashStakeInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n [\"discriminator\", fixEncoderSize(getBytesEncoder(), 8)],\n [\"owner\", getAddressEncoder()],\n [\"reason\", getSlashReasonEncoder()],\n [\"customAmount\", getOptionEncoder(getU64Encoder())],\n ]),\n (value) => ({ ...value, discriminator: SLASH_STAKE_DISCRIMINATOR }),\n );\n}\n\nexport function getSlashStakeInstructionDataDecoder(): Decoder<SlashStakeInstructionData> {\n return getStructDecoder([\n [\"discriminator\", fixDecoderSize(getBytesDecoder(), 8)],\n [\"owner\", getAddressDecoder()],\n [\"reason\", getSlashReasonDecoder()],\n [\"customAmount\", getOptionDecoder(getU64Decoder())],\n ]);\n}\n\nexport function getSlashStakeInstructionDataCodec(): Codec<\n SlashStakeInstructionDataArgs,\n SlashStakeInstructionData\n> {\n return combineCodec(\n getSlashStakeInstructionDataEncoder(),\n getSlashStakeInstructionDataDecoder(),\n );\n}\n\nexport type SlashStakeAsyncInput<\n TAccountStakingAccount extends string = string,\n TAccountStakingConfig extends string = string,\n TAccountStakingVault extends string = string,\n TAccountTreasury extends string = string,\n TAccountAuthority extends string = string,\n TAccountTokenProgram extends string = string,\n> = {\n stakingAccount?: Address<TAccountStakingAccount>;\n stakingConfig?: Address<TAccountStakingConfig>;\n stakingVault?: Address<TAccountStakingVault>;\n treasury: Address<TAccountTreasury>;\n authority: TransactionSigner<TAccountAuthority>;\n tokenProgram?: Address<TAccountTokenProgram>;\n owner: SlashStakeInstructionDataArgs[\"owner\"];\n reason: SlashStakeInstructionDataArgs[\"reason\"];\n customAmount: SlashStakeInstructionDataArgs[\"customAmount\"];\n};\n\nexport async function getSlashStakeInstructionAsync<\n TAccountStakingAccount extends string,\n TAccountStakingConfig extends string,\n TAccountStakingVault extends string,\n TAccountTreasury extends string,\n TAccountAuthority extends string,\n TAccountTokenProgram extends string,\n TProgramAddress extends Address =\n typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: SlashStakeAsyncInput<\n TAccountStakingAccount,\n TAccountStakingConfig,\n TAccountStakingVault,\n TAccountTreasury,\n TAccountAuthority,\n TAccountTokenProgram\n >,\n config?: { programAddress?: TProgramAddress },\n): Promise<\n SlashStakeInstruction<\n TProgramAddress,\n TAccountStakingAccount,\n TAccountStakingConfig,\n TAccountStakingVault,\n TAccountTreasury,\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 stakingAccount: { value: input.stakingAccount ?? null, isWritable: true },\n stakingConfig: { value: input.stakingConfig ?? null, isWritable: false },\n stakingVault: { value: input.stakingVault ?? null, isWritable: true },\n treasury: { value: input.treasury ?? null, isWritable: true },\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.stakingAccount.value) {\n accounts.stakingAccount.value = await getProgramDerivedAddress({\n programAddress,\n seeds: [\n getBytesEncoder().encode(\n new Uint8Array([115, 116, 97, 107, 105, 110, 103]),\n ),\n getAddressEncoder().encode(expectSome(args.owner)),\n ],\n });\n }\n if (!accounts.stakingConfig.value) {\n accounts.stakingConfig.value = await getProgramDerivedAddress({\n programAddress,\n seeds: [\n getBytesEncoder().encode(\n new Uint8Array([\n 115, 116, 97, 107, 105, 110, 103, 95, 99, 111, 110, 102, 105, 103,\n ]),\n ),\n ],\n });\n }\n if (!accounts.stakingVault.value) {\n accounts.stakingVault.value = await getProgramDerivedAddress({\n programAddress,\n seeds: [\n getBytesEncoder().encode(\n new Uint8Array([\n 115, 116, 97, 107, 105, 110, 103, 95, 118, 97, 117, 108, 116,\n ]),\n ),\n getAddressEncoder().encode(expectAddress(accounts.stakingConfig.value)),\n ],\n });\n }\n if (!accounts.tokenProgram.value) {\n accounts.tokenProgram.value =\n \"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA\" as Address<\"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA\">;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, \"programId\");\n return Object.freeze({\n accounts: [\n getAccountMeta(accounts.stakingAccount),\n getAccountMeta(accounts.stakingConfig),\n getAccountMeta(accounts.stakingVault),\n getAccountMeta(accounts.treasury),\n getAccountMeta(accounts.authority),\n getAccountMeta(accounts.tokenProgram),\n ],\n data: getSlashStakeInstructionDataEncoder().encode(\n args as SlashStakeInstructionDataArgs,\n ),\n programAddress,\n } as SlashStakeInstruction<\n TProgramAddress,\n TAccountStakingAccount,\n TAccountStakingConfig,\n TAccountStakingVault,\n TAccountTreasury,\n TAccountAuthority,\n TAccountTokenProgram\n >);\n}\n\nexport type SlashStakeInput<\n TAccountStakingAccount extends string = string,\n TAccountStakingConfig extends string = string,\n TAccountStakingVault extends string = string,\n TAccountTreasury extends string = string,\n TAccountAuthority extends string = string,\n TAccountTokenProgram extends string = string,\n> = {\n stakingAccount: Address<TAccountStakingAccount>;\n stakingConfig: Address<TAccountStakingConfig>;\n stakingVault: Address<TAccountStakingVault>;\n treasury: Address<TAccountTreasury>;\n authority: TransactionSigner<TAccountAuthority>;\n tokenProgram?: Address<TAccountTokenProgram>;\n owner: SlashStakeInstructionDataArgs[\"owner\"];\n reason: SlashStakeInstructionDataArgs[\"reason\"];\n customAmount: SlashStakeInstructionDataArgs[\"customAmount\"];\n};\n\nexport function getSlashStakeInstruction<\n TAccountStakingAccount extends string,\n TAccountStakingConfig extends string,\n TAccountStakingVault extends string,\n TAccountTreasury extends string,\n TAccountAuthority extends string,\n TAccountTokenProgram extends string,\n TProgramAddress extends Address =\n typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: SlashStakeInput<\n TAccountStakingAccount,\n TAccountStakingConfig,\n TAccountStakingVault,\n TAccountTreasury,\n TAccountAuthority,\n TAccountTokenProgram\n >,\n config?: { programAddress?: TProgramAddress },\n): SlashStakeInstruction<\n TProgramAddress,\n TAccountStakingAccount,\n TAccountStakingConfig,\n TAccountStakingVault,\n TAccountTreasury,\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 stakingAccount: { value: input.stakingAccount ?? null, isWritable: true },\n stakingConfig: { value: input.stakingConfig ?? null, isWritable: false },\n stakingVault: { value: input.stakingVault ?? null, isWritable: true },\n treasury: { value: input.treasury ?? null, isWritable: true },\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 \"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA\" as Address<\"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA\">;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, \"programId\");\n return Object.freeze({\n accounts: [\n getAccountMeta(accounts.stakingAccount),\n getAccountMeta(accounts.stakingConfig),\n getAccountMeta(accounts.stakingVault),\n getAccountMeta(accounts.treasury),\n getAccountMeta(accounts.authority),\n getAccountMeta(accounts.tokenProgram),\n ],\n data: getSlashStakeInstructionDataEncoder().encode(\n args as SlashStakeInstructionDataArgs,\n ),\n programAddress,\n } as SlashStakeInstruction<\n TProgramAddress,\n TAccountStakingAccount,\n TAccountStakingConfig,\n TAccountStakingVault,\n TAccountTreasury,\n TAccountAuthority,\n TAccountTokenProgram\n >);\n}\n\nexport type ParsedSlashStakeInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n stakingAccount: TAccountMetas[0];\n stakingConfig: TAccountMetas[1];\n stakingVault: TAccountMetas[2];\n treasury: TAccountMetas[3];\n authority: TAccountMetas[4];\n tokenProgram: TAccountMetas[5];\n };\n data: SlashStakeInstructionData;\n};\n\nexport function parseSlashStakeInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>,\n): ParsedSlashStakeInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 6) {\n // TODO: Coded error.\n throw new Error(\"Not enough accounts\");\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = (instruction.accounts as TAccountMetas)[accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n stakingAccount: getNextAccount(),\n stakingConfig: getNextAccount(),\n stakingVault: getNextAccount(),\n treasury: getNextAccount(),\n authority: getNextAccount(),\n tokenProgram: getNextAccount(),\n },\n data: getSlashStakeInstructionDataDecoder().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 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 { GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS } from \"../programs\";\nimport {\n expectAddress,\n getAccountMetaFactory,\n type ResolvedAccount,\n} from \"../shared\";\n\nexport const STAKE_GHOST_DISCRIMINATOR = new Uint8Array([\n 5, 196, 24, 54, 196, 56, 173, 191,\n]);\n\nexport function getStakeGhostDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 8).encode(STAKE_GHOST_DISCRIMINATOR);\n}\n\nexport type StakeGhostInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountStakingAccount extends string | AccountMeta<string> = string,\n TAccountOwnerTokenAccount extends string | AccountMeta<string> = string,\n TAccountStakingVault extends string | AccountMeta<string> = string,\n TAccountStakingConfig extends string | AccountMeta<string> = string,\n TAccountGhostMint extends string | AccountMeta<string> = string,\n TAccountOwner extends string | AccountMeta<string> = string,\n TAccountTokenProgram extends string | AccountMeta<string> =\n \"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA\",\n TAccountSystemProgram extends string | AccountMeta<string> =\n \"11111111111111111111111111111111\",\n TAccountRent extends string | AccountMeta<string> =\n \"SysvarRent111111111111111111111111111111111\",\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountStakingAccount extends string\n ? WritableAccount<TAccountStakingAccount>\n : TAccountStakingAccount,\n TAccountOwnerTokenAccount extends string\n ? WritableAccount<TAccountOwnerTokenAccount>\n : TAccountOwnerTokenAccount,\n TAccountStakingVault extends string\n ? WritableAccount<TAccountStakingVault>\n : TAccountStakingVault,\n TAccountStakingConfig extends string\n ? ReadonlyAccount<TAccountStakingConfig>\n : TAccountStakingConfig,\n TAccountGhostMint extends string\n ? ReadonlyAccount<TAccountGhostMint>\n : TAccountGhostMint,\n TAccountOwner extends string\n ? WritableSignerAccount<TAccountOwner> &\n AccountSignerMeta<TAccountOwner>\n : TAccountOwner,\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 StakeGhostInstructionData = {\n discriminator: ReadonlyUint8Array;\n amount: bigint;\n lockDuration: bigint;\n};\n\nexport type StakeGhostInstructionDataArgs = {\n amount: number | bigint;\n lockDuration: number | bigint;\n};\n\nexport function getStakeGhostInstructionDataEncoder(): FixedSizeEncoder<StakeGhostInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n [\"discriminator\", fixEncoderSize(getBytesEncoder(), 8)],\n [\"amount\", getU64Encoder()],\n [\"lockDuration\", getI64Encoder()],\n ]),\n (value) => ({ ...value, discriminator: STAKE_GHOST_DISCRIMINATOR }),\n );\n}\n\nexport function getStakeGhostInstructionDataDecoder(): FixedSizeDecoder<StakeGhostInstructionData> {\n return getStructDecoder([\n [\"discriminator\", fixDecoderSize(getBytesDecoder(), 8)],\n [\"amount\", getU64Decoder()],\n [\"lockDuration\", getI64Decoder()],\n ]);\n}\n\nexport function getStakeGhostInstructionDataCodec(): FixedSizeCodec<\n StakeGhostInstructionDataArgs,\n StakeGhostInstructionData\n> {\n return combineCodec(\n getStakeGhostInstructionDataEncoder(),\n getStakeGhostInstructionDataDecoder(),\n );\n}\n\nexport type StakeGhostAsyncInput<\n TAccountStakingAccount extends string = string,\n TAccountOwnerTokenAccount extends string = string,\n TAccountStakingVault extends string = string,\n TAccountStakingConfig extends string = string,\n TAccountGhostMint extends string = string,\n TAccountOwner extends string = string,\n TAccountTokenProgram extends string = string,\n TAccountSystemProgram extends string = string,\n TAccountRent extends string = string,\n> = {\n stakingAccount?: Address<TAccountStakingAccount>;\n ownerTokenAccount: Address<TAccountOwnerTokenAccount>;\n /**\n * Staking vault to hold all staked GHOST tokens\n * Automatically initialized on first stake using init_if_needed\n */\n stakingVault?: Address<TAccountStakingVault>;\n stakingConfig: Address<TAccountStakingConfig>;\n ghostMint: Address<TAccountGhostMint>;\n owner: TransactionSigner<TAccountOwner>;\n tokenProgram?: Address<TAccountTokenProgram>;\n systemProgram?: Address<TAccountSystemProgram>;\n rent?: Address<TAccountRent>;\n amount: StakeGhostInstructionDataArgs[\"amount\"];\n lockDuration: StakeGhostInstructionDataArgs[\"lockDuration\"];\n};\n\nexport async function getStakeGhostInstructionAsync<\n TAccountStakingAccount extends string,\n TAccountOwnerTokenAccount extends string,\n TAccountStakingVault extends string,\n TAccountStakingConfig extends string,\n TAccountGhostMint extends string,\n TAccountOwner extends string,\n TAccountTokenProgram extends string,\n TAccountSystemProgram extends string,\n TAccountRent extends string,\n TProgramAddress extends Address =\n typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: StakeGhostAsyncInput<\n TAccountStakingAccount,\n TAccountOwnerTokenAccount,\n TAccountStakingVault,\n TAccountStakingConfig,\n TAccountGhostMint,\n TAccountOwner,\n TAccountTokenProgram,\n TAccountSystemProgram,\n TAccountRent\n >,\n config?: { programAddress?: TProgramAddress },\n): Promise<\n StakeGhostInstruction<\n TProgramAddress,\n TAccountStakingAccount,\n TAccountOwnerTokenAccount,\n TAccountStakingVault,\n TAccountStakingConfig,\n TAccountGhostMint,\n TAccountOwner,\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 stakingAccount: { value: input.stakingAccount ?? null, isWritable: true },\n ownerTokenAccount: {\n value: input.ownerTokenAccount ?? null,\n isWritable: true,\n },\n stakingVault: { value: input.stakingVault ?? null, isWritable: true },\n stakingConfig: { value: input.stakingConfig ?? null, isWritable: false },\n ghostMint: { value: input.ghostMint ?? null, isWritable: false },\n owner: { value: input.owner ?? 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.stakingAccount.value) {\n accounts.stakingAccount.value = await getProgramDerivedAddress({\n programAddress,\n seeds: [\n getBytesEncoder().encode(\n new Uint8Array([115, 116, 97, 107, 105, 110, 103]),\n ),\n getAddressEncoder().encode(expectAddress(accounts.owner.value)),\n ],\n });\n }\n if (!accounts.stakingVault.value) {\n accounts.stakingVault.value = await getProgramDerivedAddress({\n programAddress,\n seeds: [\n getBytesEncoder().encode(\n new Uint8Array([\n 115, 116, 97, 107, 105, 110, 103, 95, 118, 97, 117, 108, 116,\n ]),\n ),\n getAddressEncoder().encode(expectAddress(accounts.stakingConfig.value)),\n ],\n });\n }\n if (!accounts.tokenProgram.value) {\n accounts.tokenProgram.value =\n \"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA\" as Address<\"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA\">;\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 return Object.freeze({\n accounts: [\n getAccountMeta(accounts.stakingAccount),\n getAccountMeta(accounts.ownerTokenAccount),\n getAccountMeta(accounts.stakingVault),\n getAccountMeta(accounts.stakingConfig),\n getAccountMeta(accounts.ghostMint),\n getAccountMeta(accounts.owner),\n getAccountMeta(accounts.tokenProgram),\n getAccountMeta(accounts.systemProgram),\n getAccountMeta(accounts.rent),\n ],\n data: getStakeGhostInstructionDataEncoder().encode(\n args as StakeGhostInstructionDataArgs,\n ),\n programAddress,\n } as StakeGhostInstruction<\n TProgramAddress,\n TAccountStakingAccount,\n TAccountOwnerTokenAccount,\n TAccountStakingVault,\n TAccountStakingConfig,\n TAccountGhostMint,\n TAccountOwner,\n TAccountTokenProgram,\n TAccountSystemProgram,\n TAccountRent\n >);\n}\n\nexport type StakeGhostInput<\n TAccountStakingAccount extends string = string,\n TAccountOwnerTokenAccount extends string = string,\n TAccountStakingVault extends string = string,\n TAccountStakingConfig extends string = string,\n TAccountGhostMint extends string = string,\n TAccountOwner extends string = string,\n TAccountTokenProgram extends string = string,\n TAccountSystemProgram extends string = string,\n TAccountRent extends string = string,\n> = {\n stakingAccount: Address<TAccountStakingAccount>;\n ownerTokenAccount: Address<TAccountOwnerTokenAccount>;\n /**\n * Staking vault to hold all staked GHOST tokens\n * Automatically initialized on first stake using init_if_needed\n */\n stakingVault: Address<TAccountStakingVault>;\n stakingConfig: Address<TAccountStakingConfig>;\n ghostMint: Address<TAccountGhostMint>;\n owner: TransactionSigner<TAccountOwner>;\n tokenProgram?: Address<TAccountTokenProgram>;\n systemProgram?: Address<TAccountSystemProgram>;\n rent?: Address<TAccountRent>;\n amount: StakeGhostInstructionDataArgs[\"amount\"];\n lockDuration: StakeGhostInstructionDataArgs[\"lockDuration\"];\n};\n\nexport function getStakeGhostInstruction<\n TAccountStakingAccount extends string,\n TAccountOwnerTokenAccount extends string,\n TAccountStakingVault extends string,\n TAccountStakingConfig extends string,\n TAccountGhostMint extends string,\n TAccountOwner extends string,\n TAccountTokenProgram extends string,\n TAccountSystemProgram extends string,\n TAccountRent extends string,\n TProgramAddress extends Address =\n typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: StakeGhostInput<\n TAccountStakingAccount,\n TAccountOwnerTokenAccount,\n TAccountStakingVault,\n TAccountStakingConfig,\n TAccountGhostMint,\n TAccountOwner,\n TAccountTokenProgram,\n TAccountSystemProgram,\n TAccountRent\n >,\n config?: { programAddress?: TProgramAddress },\n): StakeGhostInstruction<\n TProgramAddress,\n TAccountStakingAccount,\n TAccountOwnerTokenAccount,\n TAccountStakingVault,\n TAccountStakingConfig,\n TAccountGhostMint,\n TAccountOwner,\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 stakingAccount: { value: input.stakingAccount ?? null, isWritable: true },\n ownerTokenAccount: {\n value: input.ownerTokenAccount ?? null,\n isWritable: true,\n },\n stakingVault: { value: input.stakingVault ?? null, isWritable: true },\n stakingConfig: { value: input.stakingConfig ?? null, isWritable: false },\n ghostMint: { value: input.ghostMint ?? null, isWritable: false },\n owner: { value: input.owner ?? 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 \"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA\" as Address<\"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA\">;\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 return Object.freeze({\n accounts: [\n getAccountMeta(accounts.stakingAccount),\n getAccountMeta(accounts.ownerTokenAccount),\n getAccountMeta(accounts.stakingVault),\n getAccountMeta(accounts.stakingConfig),\n getAccountMeta(accounts.ghostMint),\n getAccountMeta(accounts.owner),\n getAccountMeta(accounts.tokenProgram),\n getAccountMeta(accounts.systemProgram),\n getAccountMeta(accounts.rent),\n ],\n data: getStakeGhostInstructionDataEncoder().encode(\n args as StakeGhostInstructionDataArgs,\n ),\n programAddress,\n } as StakeGhostInstruction<\n TProgramAddress,\n TAccountStakingAccount,\n TAccountOwnerTokenAccount,\n TAccountStakingVault,\n TAccountStakingConfig,\n TAccountGhostMint,\n TAccountOwner,\n TAccountTokenProgram,\n TAccountSystemProgram,\n TAccountRent\n >);\n}\n\nexport type ParsedStakeGhostInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n stakingAccount: TAccountMetas[0];\n ownerTokenAccount: TAccountMetas[1];\n /**\n * Staking vault to hold all staked GHOST tokens\n * Automatically initialized on first stake using init_if_needed\n */\n stakingVault: TAccountMetas[2];\n stakingConfig: TAccountMetas[3];\n ghostMint: TAccountMetas[4];\n owner: TAccountMetas[5];\n tokenProgram: TAccountMetas[6];\n systemProgram: TAccountMetas[7];\n rent: TAccountMetas[8];\n };\n data: StakeGhostInstructionData;\n};\n\nexport function parseStakeGhostInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>,\n): ParsedStakeGhostInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 9) {\n // TODO: Coded error.\n throw new Error(\"Not enough accounts\");\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = (instruction.accounts as TAccountMetas)[accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n stakingAccount: getNextAccount(),\n ownerTokenAccount: getNextAccount(),\n stakingVault: getNextAccount(),\n stakingConfig: getNextAccount(),\n ghostMint: getNextAccount(),\n owner: getNextAccount(),\n tokenProgram: getNextAccount(),\n systemProgram: getNextAccount(),\n rent: getNextAccount(),\n },\n data: getStakeGhostInstructionDataDecoder().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 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 { GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS } from \"../programs\";\nimport { getAccountMetaFactory, type ResolvedAccount } from \"../shared\";\n\nexport const SUBMIT_DELIVERY_DISCRIMINATOR = new Uint8Array([\n 217, 177, 33, 54, 136, 185, 123, 96,\n]);\n\nexport function getSubmitDeliveryDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 8).encode(\n SUBMIT_DELIVERY_DISCRIMINATOR,\n );\n}\n\nexport type SubmitDeliveryInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountEscrow extends string | AccountMeta<string> = string,\n TAccountAgent extends string | AccountMeta<string> = string,\n TAccountAgentOwner 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 TAccountAgent extends string\n ? ReadonlyAccount<TAccountAgent>\n : TAccountAgent,\n TAccountAgentOwner extends string\n ? ReadonlySignerAccount<TAccountAgentOwner> &\n AccountSignerMeta<TAccountAgentOwner>\n : TAccountAgentOwner,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type SubmitDeliveryInstructionData = {\n discriminator: ReadonlyUint8Array;\n deliveryProof: string;\n};\n\nexport type SubmitDeliveryInstructionDataArgs = { deliveryProof: string };\n\nexport function getSubmitDeliveryInstructionDataEncoder(): Encoder<SubmitDeliveryInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n [\"discriminator\", fixEncoderSize(getBytesEncoder(), 8)],\n [\n \"deliveryProof\",\n addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder()),\n ],\n ]),\n (value) => ({ ...value, discriminator: SUBMIT_DELIVERY_DISCRIMINATOR }),\n );\n}\n\nexport function getSubmitDeliveryInstructionDataDecoder(): Decoder<SubmitDeliveryInstructionData> {\n return getStructDecoder([\n [\"discriminator\", fixDecoderSize(getBytesDecoder(), 8)],\n [\"deliveryProof\", addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())],\n ]);\n}\n\nexport function getSubmitDeliveryInstructionDataCodec(): Codec<\n SubmitDeliveryInstructionDataArgs,\n SubmitDeliveryInstructionData\n> {\n return combineCodec(\n getSubmitDeliveryInstructionDataEncoder(),\n getSubmitDeliveryInstructionDataDecoder(),\n );\n}\n\nexport type SubmitDeliveryInput<\n TAccountEscrow extends string = string,\n TAccountAgent extends string = string,\n TAccountAgentOwner extends string = string,\n> = {\n escrow: Address<TAccountEscrow>;\n agent: Address<TAccountAgent>;\n agentOwner: TransactionSigner<TAccountAgentOwner>;\n deliveryProof: SubmitDeliveryInstructionDataArgs[\"deliveryProof\"];\n};\n\nexport function getSubmitDeliveryInstruction<\n TAccountEscrow extends string,\n TAccountAgent extends string,\n TAccountAgentOwner extends string,\n TProgramAddress extends Address =\n typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: SubmitDeliveryInput<TAccountEscrow, TAccountAgent, TAccountAgentOwner>,\n config?: { programAddress?: TProgramAddress },\n): SubmitDeliveryInstruction<\n TProgramAddress,\n TAccountEscrow,\n TAccountAgent,\n TAccountAgentOwner\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 agent: { value: input.agent ?? null, isWritable: false },\n agentOwner: { value: input.agentOwner ?? 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 return Object.freeze({\n accounts: [\n getAccountMeta(accounts.escrow),\n getAccountMeta(accounts.agent),\n getAccountMeta(accounts.agentOwner),\n ],\n data: getSubmitDeliveryInstructionDataEncoder().encode(\n args as SubmitDeliveryInstructionDataArgs,\n ),\n programAddress,\n } as SubmitDeliveryInstruction<\n TProgramAddress,\n TAccountEscrow,\n TAccountAgent,\n TAccountAgentOwner\n >);\n}\n\nexport type ParsedSubmitDeliveryInstruction<\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 agent: TAccountMetas[1];\n agentOwner: TAccountMetas[2];\n };\n data: SubmitDeliveryInstructionData;\n};\n\nexport function parseSubmitDeliveryInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>,\n): ParsedSubmitDeliveryInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 3) {\n // TODO: Coded error.\n throw new Error(\"Not enough accounts\");\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = (instruction.accounts as TAccountMetas)[accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n escrow: getNextAccount(),\n agent: getNextAccount(),\n agentOwner: getNextAccount(),\n },\n data: getSubmitDeliveryInstructionDataDecoder().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 ReadonlySignerAccount,\n type ReadonlyUint8Array,\n type TransactionSigner,\n type WritableAccount,\n} from \"@solana/kit\";\nimport { GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS } from \"../programs\";\nimport {\n expectAddress,\n getAccountMetaFactory,\n type ResolvedAccount,\n} from \"../shared\";\n\nexport const SUBMIT_SERVICE_RATING_DISCRIMINATOR = new Uint8Array([\n 23, 160, 228, 88, 168, 145, 129, 19,\n]);\n\nexport function getSubmitServiceRatingDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 8).encode(\n SUBMIT_SERVICE_RATING_DISCRIMINATOR,\n );\n}\n\nexport type SubmitServiceRatingInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountReputationMetrics extends string | AccountMeta<string> = string,\n TAccountAgent extends string | AccountMeta<string> = string,\n TAccountClient extends string | AccountMeta<string> = string,\n TAccountClock extends string | AccountMeta<string> =\n \"SysvarC1ock11111111111111111111111111111111\",\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountReputationMetrics extends string\n ? WritableAccount<TAccountReputationMetrics>\n : TAccountReputationMetrics,\n TAccountAgent extends string\n ? WritableAccount<TAccountAgent>\n : TAccountAgent,\n TAccountClient extends string\n ? ReadonlySignerAccount<TAccountClient> &\n AccountSignerMeta<TAccountClient>\n : TAccountClient,\n TAccountClock extends string\n ? ReadonlyAccount<TAccountClock>\n : TAccountClock,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type SubmitServiceRatingInstructionData = {\n discriminator: ReadonlyUint8Array;\n rating: number;\n paymentSignature: string;\n};\n\nexport type SubmitServiceRatingInstructionDataArgs = {\n rating: number;\n paymentSignature: string;\n};\n\nexport function getSubmitServiceRatingInstructionDataEncoder(): Encoder<SubmitServiceRatingInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n [\"discriminator\", fixEncoderSize(getBytesEncoder(), 8)],\n [\"rating\", getU8Encoder()],\n [\n \"paymentSignature\",\n addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder()),\n ],\n ]),\n (value) => ({\n ...value,\n discriminator: SUBMIT_SERVICE_RATING_DISCRIMINATOR,\n }),\n );\n}\n\nexport function getSubmitServiceRatingInstructionDataDecoder(): Decoder<SubmitServiceRatingInstructionData> {\n return getStructDecoder([\n [\"discriminator\", fixDecoderSize(getBytesDecoder(), 8)],\n [\"rating\", getU8Decoder()],\n [\n \"paymentSignature\",\n addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder()),\n ],\n ]);\n}\n\nexport function getSubmitServiceRatingInstructionDataCodec(): Codec<\n SubmitServiceRatingInstructionDataArgs,\n SubmitServiceRatingInstructionData\n> {\n return combineCodec(\n getSubmitServiceRatingInstructionDataEncoder(),\n getSubmitServiceRatingInstructionDataDecoder(),\n );\n}\n\nexport type SubmitServiceRatingAsyncInput<\n TAccountReputationMetrics extends string = string,\n TAccountAgent extends string = string,\n TAccountClient extends string = string,\n TAccountClock extends string = string,\n> = {\n /** Reputation metrics account */\n reputationMetrics?: Address<TAccountReputationMetrics>;\n /** Agent account */\n agent: Address<TAccountAgent>;\n /** Client submitting the rating */\n client: TransactionSigner<TAccountClient>;\n /** Clock for timestamps */\n clock?: Address<TAccountClock>;\n rating: SubmitServiceRatingInstructionDataArgs[\"rating\"];\n paymentSignature: SubmitServiceRatingInstructionDataArgs[\"paymentSignature\"];\n};\n\nexport async function getSubmitServiceRatingInstructionAsync<\n TAccountReputationMetrics extends string,\n TAccountAgent extends string,\n TAccountClient extends string,\n TAccountClock extends string,\n TProgramAddress extends Address =\n typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: SubmitServiceRatingAsyncInput<\n TAccountReputationMetrics,\n TAccountAgent,\n TAccountClient,\n TAccountClock\n >,\n config?: { programAddress?: TProgramAddress },\n): Promise<\n SubmitServiceRatingInstruction<\n TProgramAddress,\n TAccountReputationMetrics,\n TAccountAgent,\n TAccountClient,\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 reputationMetrics: {\n value: input.reputationMetrics ?? null,\n isWritable: true,\n },\n agent: { value: input.agent ?? null, isWritable: true },\n client: { value: input.client ?? 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.reputationMetrics.value) {\n accounts.reputationMetrics.value = await getProgramDerivedAddress({\n programAddress,\n seeds: [\n getBytesEncoder().encode(\n new Uint8Array([\n 114, 101, 112, 117, 116, 97, 116, 105, 111, 110, 95, 109, 101, 116,\n 114, 105, 99, 115,\n ]),\n ),\n getAddressEncoder().encode(expectAddress(accounts.agent.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 return Object.freeze({\n accounts: [\n getAccountMeta(accounts.reputationMetrics),\n getAccountMeta(accounts.agent),\n getAccountMeta(accounts.client),\n getAccountMeta(accounts.clock),\n ],\n data: getSubmitServiceRatingInstructionDataEncoder().encode(\n args as SubmitServiceRatingInstructionDataArgs,\n ),\n programAddress,\n } as SubmitServiceRatingInstruction<\n TProgramAddress,\n TAccountReputationMetrics,\n TAccountAgent,\n TAccountClient,\n TAccountClock\n >);\n}\n\nexport type SubmitServiceRatingInput<\n TAccountReputationMetrics extends string = string,\n TAccountAgent extends string = string,\n TAccountClient extends string = string,\n TAccountClock extends string = string,\n> = {\n /** Reputation metrics account */\n reputationMetrics: Address<TAccountReputationMetrics>;\n /** Agent account */\n agent: Address<TAccountAgent>;\n /** Client submitting the rating */\n client: TransactionSigner<TAccountClient>;\n /** Clock for timestamps */\n clock?: Address<TAccountClock>;\n rating: SubmitServiceRatingInstructionDataArgs[\"rating\"];\n paymentSignature: SubmitServiceRatingInstructionDataArgs[\"paymentSignature\"];\n};\n\nexport function getSubmitServiceRatingInstruction<\n TAccountReputationMetrics extends string,\n TAccountAgent extends string,\n TAccountClient extends string,\n TAccountClock extends string,\n TProgramAddress extends Address =\n typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: SubmitServiceRatingInput<\n TAccountReputationMetrics,\n TAccountAgent,\n TAccountClient,\n TAccountClock\n >,\n config?: { programAddress?: TProgramAddress },\n): SubmitServiceRatingInstruction<\n TProgramAddress,\n TAccountReputationMetrics,\n TAccountAgent,\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 reputationMetrics: {\n value: input.reputationMetrics ?? null,\n isWritable: true,\n },\n agent: { value: input.agent ?? null, isWritable: true },\n client: { value: input.client ?? 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 return Object.freeze({\n accounts: [\n getAccountMeta(accounts.reputationMetrics),\n getAccountMeta(accounts.agent),\n getAccountMeta(accounts.client),\n getAccountMeta(accounts.clock),\n ],\n data: getSubmitServiceRatingInstructionDataEncoder().encode(\n args as SubmitServiceRatingInstructionDataArgs,\n ),\n programAddress,\n } as SubmitServiceRatingInstruction<\n TProgramAddress,\n TAccountReputationMetrics,\n TAccountAgent,\n TAccountClient,\n TAccountClock\n >);\n}\n\nexport type ParsedSubmitServiceRatingInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n /** Reputation metrics account */\n reputationMetrics: TAccountMetas[0];\n /** Agent account */\n agent: TAccountMetas[1];\n /** Client submitting the rating */\n client: TAccountMetas[2];\n /** Clock for timestamps */\n clock: TAccountMetas[3];\n };\n data: SubmitServiceRatingInstructionData;\n};\n\nexport function parseSubmitServiceRatingInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>,\n): ParsedSubmitServiceRatingInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 4) {\n // TODO: Coded error.\n throw new Error(\"Not enough accounts\");\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = (instruction.accounts as TAccountMetas)[accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n reputationMetrics: getNextAccount(),\n agent: getNextAccount(),\n client: getNextAccount(),\n clock: getNextAccount(),\n },\n data: getSubmitServiceRatingInstructionDataDecoder().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 { GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS } from \"../programs\";\nimport {\n expectAddress,\n getAccountMetaFactory,\n type ResolvedAccount,\n} from \"../shared\";\n\nexport const UNSTAKE_GHOST_DISCRIMINATOR = new Uint8Array([\n 252, 101, 172, 252, 1, 4, 12, 116,\n]);\n\nexport function getUnstakeGhostDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 8).encode(\n UNSTAKE_GHOST_DISCRIMINATOR,\n );\n}\n\nexport type UnstakeGhostInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountStakingAccount extends string | AccountMeta<string> = string,\n TAccountStakingConfig extends string | AccountMeta<string> = string,\n TAccountStakingVault extends string | AccountMeta<string> = string,\n TAccountOwnerTokenAccount extends string | AccountMeta<string> = string,\n TAccountOwner extends string | AccountMeta<string> = string,\n TAccountTokenProgram extends string | AccountMeta<string> =\n \"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA\",\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountStakingAccount extends string\n ? WritableAccount<TAccountStakingAccount>\n : TAccountStakingAccount,\n TAccountStakingConfig extends string\n ? ReadonlyAccount<TAccountStakingConfig>\n : TAccountStakingConfig,\n TAccountStakingVault extends string\n ? WritableAccount<TAccountStakingVault>\n : TAccountStakingVault,\n TAccountOwnerTokenAccount extends string\n ? WritableAccount<TAccountOwnerTokenAccount>\n : TAccountOwnerTokenAccount,\n TAccountOwner extends string\n ? WritableSignerAccount<TAccountOwner> &\n AccountSignerMeta<TAccountOwner>\n : TAccountOwner,\n TAccountTokenProgram extends string\n ? ReadonlyAccount<TAccountTokenProgram>\n : TAccountTokenProgram,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type UnstakeGhostInstructionData = { discriminator: ReadonlyUint8Array };\n\nexport type UnstakeGhostInstructionDataArgs = {};\n\nexport function getUnstakeGhostInstructionDataEncoder(): FixedSizeEncoder<UnstakeGhostInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([[\"discriminator\", fixEncoderSize(getBytesEncoder(), 8)]]),\n (value) => ({ ...value, discriminator: UNSTAKE_GHOST_DISCRIMINATOR }),\n );\n}\n\nexport function getUnstakeGhostInstructionDataDecoder(): FixedSizeDecoder<UnstakeGhostInstructionData> {\n return getStructDecoder([\n [\"discriminator\", fixDecoderSize(getBytesDecoder(), 8)],\n ]);\n}\n\nexport function getUnstakeGhostInstructionDataCodec(): FixedSizeCodec<\n UnstakeGhostInstructionDataArgs,\n UnstakeGhostInstructionData\n> {\n return combineCodec(\n getUnstakeGhostInstructionDataEncoder(),\n getUnstakeGhostInstructionDataDecoder(),\n );\n}\n\nexport type UnstakeGhostAsyncInput<\n TAccountStakingAccount extends string = string,\n TAccountStakingConfig extends string = string,\n TAccountStakingVault extends string = string,\n TAccountOwnerTokenAccount extends string = string,\n TAccountOwner extends string = string,\n TAccountTokenProgram extends string = string,\n> = {\n stakingAccount?: Address<TAccountStakingAccount>;\n stakingConfig?: Address<TAccountStakingConfig>;\n stakingVault?: Address<TAccountStakingVault>;\n ownerTokenAccount: Address<TAccountOwnerTokenAccount>;\n owner: TransactionSigner<TAccountOwner>;\n tokenProgram?: Address<TAccountTokenProgram>;\n};\n\nexport async function getUnstakeGhostInstructionAsync<\n TAccountStakingAccount extends string,\n TAccountStakingConfig extends string,\n TAccountStakingVault extends string,\n TAccountOwnerTokenAccount extends string,\n TAccountOwner extends string,\n TAccountTokenProgram extends string,\n TProgramAddress extends Address =\n typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: UnstakeGhostAsyncInput<\n TAccountStakingAccount,\n TAccountStakingConfig,\n TAccountStakingVault,\n TAccountOwnerTokenAccount,\n TAccountOwner,\n TAccountTokenProgram\n >,\n config?: { programAddress?: TProgramAddress },\n): Promise<\n UnstakeGhostInstruction<\n TProgramAddress,\n TAccountStakingAccount,\n TAccountStakingConfig,\n TAccountStakingVault,\n TAccountOwnerTokenAccount,\n TAccountOwner,\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 stakingAccount: { value: input.stakingAccount ?? null, isWritable: true },\n stakingConfig: { value: input.stakingConfig ?? null, isWritable: false },\n stakingVault: { value: input.stakingVault ?? null, isWritable: true },\n ownerTokenAccount: {\n value: input.ownerTokenAccount ?? null,\n isWritable: true,\n },\n owner: { value: input.owner ?? 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.stakingAccount.value) {\n accounts.stakingAccount.value = await getProgramDerivedAddress({\n programAddress,\n seeds: [\n getBytesEncoder().encode(\n new Uint8Array([115, 116, 97, 107, 105, 110, 103]),\n ),\n getAddressEncoder().encode(expectAddress(accounts.owner.value)),\n ],\n });\n }\n if (!accounts.stakingConfig.value) {\n accounts.stakingConfig.value = await getProgramDerivedAddress({\n programAddress,\n seeds: [\n getBytesEncoder().encode(\n new Uint8Array([\n 115, 116, 97, 107, 105, 110, 103, 95, 99, 111, 110, 102, 105, 103,\n ]),\n ),\n ],\n });\n }\n if (!accounts.stakingVault.value) {\n accounts.stakingVault.value = await getProgramDerivedAddress({\n programAddress,\n seeds: [\n getBytesEncoder().encode(\n new Uint8Array([\n 115, 116, 97, 107, 105, 110, 103, 95, 118, 97, 117, 108, 116,\n ]),\n ),\n getAddressEncoder().encode(expectAddress(accounts.stakingConfig.value)),\n ],\n });\n }\n if (!accounts.tokenProgram.value) {\n accounts.tokenProgram.value =\n \"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA\" as Address<\"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA\">;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, \"programId\");\n return Object.freeze({\n accounts: [\n getAccountMeta(accounts.stakingAccount),\n getAccountMeta(accounts.stakingConfig),\n getAccountMeta(accounts.stakingVault),\n getAccountMeta(accounts.ownerTokenAccount),\n getAccountMeta(accounts.owner),\n getAccountMeta(accounts.tokenProgram),\n ],\n data: getUnstakeGhostInstructionDataEncoder().encode({}),\n programAddress,\n } as UnstakeGhostInstruction<\n TProgramAddress,\n TAccountStakingAccount,\n TAccountStakingConfig,\n TAccountStakingVault,\n TAccountOwnerTokenAccount,\n TAccountOwner,\n TAccountTokenProgram\n >);\n}\n\nexport type UnstakeGhostInput<\n TAccountStakingAccount extends string = string,\n TAccountStakingConfig extends string = string,\n TAccountStakingVault extends string = string,\n TAccountOwnerTokenAccount extends string = string,\n TAccountOwner extends string = string,\n TAccountTokenProgram extends string = string,\n> = {\n stakingAccount: Address<TAccountStakingAccount>;\n stakingConfig: Address<TAccountStakingConfig>;\n stakingVault: Address<TAccountStakingVault>;\n ownerTokenAccount: Address<TAccountOwnerTokenAccount>;\n owner: TransactionSigner<TAccountOwner>;\n tokenProgram?: Address<TAccountTokenProgram>;\n};\n\nexport function getUnstakeGhostInstruction<\n TAccountStakingAccount extends string,\n TAccountStakingConfig extends string,\n TAccountStakingVault extends string,\n TAccountOwnerTokenAccount extends string,\n TAccountOwner extends string,\n TAccountTokenProgram extends string,\n TProgramAddress extends Address =\n typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: UnstakeGhostInput<\n TAccountStakingAccount,\n TAccountStakingConfig,\n TAccountStakingVault,\n TAccountOwnerTokenAccount,\n TAccountOwner,\n TAccountTokenProgram\n >,\n config?: { programAddress?: TProgramAddress },\n): UnstakeGhostInstruction<\n TProgramAddress,\n TAccountStakingAccount,\n TAccountStakingConfig,\n TAccountStakingVault,\n TAccountOwnerTokenAccount,\n TAccountOwner,\n TAccountTokenProgram\n> {\n // Program address.\n const programAddress =\n config?.programAddress ?? GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n stakingAccount: { value: input.stakingAccount ?? null, isWritable: true },\n stakingConfig: { value: input.stakingConfig ?? null, isWritable: false },\n stakingVault: { value: input.stakingVault ?? null, isWritable: true },\n ownerTokenAccount: {\n value: input.ownerTokenAccount ?? null,\n isWritable: true,\n },\n owner: { value: input.owner ?? 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 \"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA\" as Address<\"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA\">;\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, \"programId\");\n return Object.freeze({\n accounts: [\n getAccountMeta(accounts.stakingAccount),\n getAccountMeta(accounts.stakingConfig),\n getAccountMeta(accounts.stakingVault),\n getAccountMeta(accounts.ownerTokenAccount),\n getAccountMeta(accounts.owner),\n getAccountMeta(accounts.tokenProgram),\n ],\n data: getUnstakeGhostInstructionDataEncoder().encode({}),\n programAddress,\n } as UnstakeGhostInstruction<\n TProgramAddress,\n TAccountStakingAccount,\n TAccountStakingConfig,\n TAccountStakingVault,\n TAccountOwnerTokenAccount,\n TAccountOwner,\n TAccountTokenProgram\n >);\n}\n\nexport type ParsedUnstakeGhostInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n stakingAccount: TAccountMetas[0];\n stakingConfig: TAccountMetas[1];\n stakingVault: TAccountMetas[2];\n ownerTokenAccount: TAccountMetas[3];\n owner: TAccountMetas[4];\n tokenProgram: TAccountMetas[5];\n };\n data: UnstakeGhostInstructionData;\n};\n\nexport function parseUnstakeGhostInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>,\n): ParsedUnstakeGhostInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 6) {\n // TODO: Coded error.\n throw new Error(\"Not enough accounts\");\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = (instruction.accounts as TAccountMetas)[accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n stakingAccount: getNextAccount(),\n stakingConfig: getNextAccount(),\n stakingVault: getNextAccount(),\n ownerTokenAccount: getNextAccount(),\n owner: getNextAccount(),\n tokenProgram: getNextAccount(),\n },\n data: getUnstakeGhostInstructionDataDecoder().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 getOptionDecoder,\n getOptionEncoder,\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 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 {\n expectAddress,\n expectSome,\n getAccountMetaFactory,\n type ResolvedAccount,\n} from \"../shared\";\nimport {\n getPricingModelDecoder,\n getPricingModelEncoder,\n type PricingModel,\n type PricingModelArgs,\n} from \"../types\";\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 string | AccountMeta<string> =\n \"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 name: Option<string>;\n description: Option<string>;\n metadataUri: string;\n agentId: string;\n pricingModel: Option<PricingModel>;\n};\n\nexport type UpdateAgentInstructionDataArgs = {\n agentType: number;\n name: OptionOrNullable<string>;\n description: OptionOrNullable<string>;\n metadataUri: string;\n agentId: string;\n pricingModel: OptionOrNullable<PricingModelArgs>;\n};\n\nexport function getUpdateAgentInstructionDataEncoder(): Encoder<UpdateAgentInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n [\"discriminator\", fixEncoderSize(getBytesEncoder(), 8)],\n [\"agentType\", getU8Encoder()],\n [\n \"name\",\n getOptionEncoder(\n addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder()),\n ),\n ],\n [\n \"description\",\n getOptionEncoder(\n addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder()),\n ),\n ],\n [\"metadataUri\", addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder())],\n [\"agentId\", addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder())],\n [\"pricingModel\", getOptionEncoder(getPricingModelEncoder())],\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 [\n \"name\",\n getOptionDecoder(addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())),\n ],\n [\n \"description\",\n getOptionDecoder(addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())),\n ],\n [\"metadataUri\", addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())],\n [\"agentId\", addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())],\n [\"pricingModel\", getOptionDecoder(getPricingModelDecoder())],\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 name: UpdateAgentInstructionDataArgs[\"name\"];\n description: UpdateAgentInstructionDataArgs[\"description\"];\n metadataUri: UpdateAgentInstructionDataArgs[\"metadataUri\"];\n agentId: UpdateAgentInstructionDataArgs[\"agentId\"];\n pricingModel: UpdateAgentInstructionDataArgs[\"pricingModel\"];\n};\n\nexport async function getUpdateAgentInstructionAsync<\n TAccountAgentAccount extends string,\n TAccountSigner extends string,\n TAccountClock extends string,\n TProgramAddress extends Address =\n 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 getUtf8Encoder().encode(expectSome(args.agentId)),\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 return Object.freeze({\n accounts: [\n getAccountMeta(accounts.agentAccount),\n getAccountMeta(accounts.signer),\n getAccountMeta(accounts.clock),\n ],\n data: getUpdateAgentInstructionDataEncoder().encode(\n args as UpdateAgentInstructionDataArgs,\n ),\n programAddress,\n } as UpdateAgentInstruction<\n TProgramAddress,\n TAccountAgentAccount,\n TAccountSigner,\n TAccountClock\n >);\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 name: UpdateAgentInstructionDataArgs[\"name\"];\n description: UpdateAgentInstructionDataArgs[\"description\"];\n metadataUri: UpdateAgentInstructionDataArgs[\"metadataUri\"];\n agentId: UpdateAgentInstructionDataArgs[\"agentId\"];\n pricingModel: UpdateAgentInstructionDataArgs[\"pricingModel\"];\n};\n\nexport function getUpdateAgentInstruction<\n TAccountAgentAccount extends string,\n TAccountSigner extends string,\n TAccountClock extends string,\n TProgramAddress extends Address =\n 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 return Object.freeze({\n accounts: [\n getAccountMeta(accounts.agentAccount),\n getAccountMeta(accounts.signer),\n getAccountMeta(accounts.clock),\n ],\n data: getUpdateAgentInstructionDataEncoder().encode(\n args as UpdateAgentInstructionDataArgs,\n ),\n programAddress,\n } as UpdateAgentInstruction<\n TProgramAddress,\n TAccountAgentAccount,\n TAccountSigner,\n TAccountClock\n >);\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 // TODO: Coded error.\n throw new Error(\"Not enough accounts\");\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = (instruction.accounts as TAccountMetas)[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 { 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 string | AccountMeta<string> =\n \"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 Address =\n 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 getUtf8Encoder().encode(expectSome(args.agentId)),\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 return Object.freeze({\n accounts: [\n getAccountMeta(accounts.agentAccount),\n getAccountMeta(accounts.signer),\n getAccountMeta(accounts.clock),\n ],\n data: getUpdateAgentReputationInstructionDataEncoder().encode(\n args as UpdateAgentReputationInstructionDataArgs,\n ),\n programAddress,\n } as UpdateAgentReputationInstruction<\n TProgramAddress,\n TAccountAgentAccount,\n TAccountSigner,\n TAccountClock\n >);\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 Address =\n 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 return Object.freeze({\n accounts: [\n getAccountMeta(accounts.agentAccount),\n getAccountMeta(accounts.signer),\n getAccountMeta(accounts.clock),\n ],\n data: getUpdateAgentReputationInstructionDataEncoder().encode(\n args as UpdateAgentReputationInstructionDataArgs,\n ),\n programAddress,\n } as UpdateAgentReputationInstruction<\n TProgramAddress,\n TAccountAgentAccount,\n TAccountSigner,\n TAccountClock\n >);\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 // TODO: Coded error.\n throw new Error(\"Not enough accounts\");\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = (instruction.accounts as TAccountMetas)[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 { 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 string | AccountMeta<string> =\n \"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) => ({\n ...value,\n discriminator: UPDATE_AGENT_SERVICE_DISCRIMINATOR,\n }),\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 Address =\n 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 return Object.freeze({\n accounts: [\n getAccountMeta(accounts.agent),\n getAccountMeta(accounts.owner),\n getAccountMeta(accounts.systemProgram),\n ],\n data: getUpdateAgentServiceInstructionDataEncoder().encode(\n args as UpdateAgentServiceInstructionDataArgs,\n ),\n programAddress,\n } as UpdateAgentServiceInstruction<\n TProgramAddress,\n TAccountAgent,\n TAccountOwner,\n TAccountSystemProgram\n >);\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 Address =\n 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 return Object.freeze({\n accounts: [\n getAccountMeta(accounts.agent),\n getAccountMeta(accounts.owner),\n getAccountMeta(accounts.systemProgram),\n ],\n data: getUpdateAgentServiceInstructionDataEncoder().encode(\n args as UpdateAgentServiceInstructionDataArgs,\n ),\n programAddress,\n } as UpdateAgentServiceInstruction<\n TProgramAddress,\n TAccountAgent,\n TAccountOwner,\n TAccountSystemProgram\n >);\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 // TODO: Coded error.\n throw new Error(\"Not enough accounts\");\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = (instruction.accounts as TAccountMetas)[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 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 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 {\n getCrossChainStatusDecoder,\n getCrossChainStatusEncoder,\n type CrossChainStatus,\n type CrossChainStatusArgs,\n} from \"../types\";\n\nexport const UPDATE_CROSSCHAIN_STATUS_DISCRIMINATOR = new Uint8Array([\n 22, 167, 59, 238, 22, 231, 239, 146,\n]);\n\nexport function getUpdateCrosschainStatusDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 8).encode(\n UPDATE_CROSSCHAIN_STATUS_DISCRIMINATOR,\n );\n}\n\nexport type UpdateCrosschainStatusInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountCredential extends string | AccountMeta<string> = string,\n TAccountIssuer extends string | AccountMeta<string> = string,\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountCredential extends string\n ? WritableAccount<TAccountCredential>\n : TAccountCredential,\n TAccountIssuer extends string\n ? WritableSignerAccount<TAccountIssuer> &\n AccountSignerMeta<TAccountIssuer>\n : TAccountIssuer,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type UpdateCrosschainStatusInstructionData = {\n discriminator: ReadonlyUint8Array;\n crossmintCredentialId: string;\n status: CrossChainStatus;\n};\n\nexport type UpdateCrosschainStatusInstructionDataArgs = {\n crossmintCredentialId: string;\n status: CrossChainStatusArgs;\n};\n\nexport function getUpdateCrosschainStatusInstructionDataEncoder(): Encoder<UpdateCrosschainStatusInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n [\"discriminator\", fixEncoderSize(getBytesEncoder(), 8)],\n [\n \"crossmintCredentialId\",\n addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder()),\n ],\n [\"status\", getCrossChainStatusEncoder()],\n ]),\n (value) => ({\n ...value,\n discriminator: UPDATE_CROSSCHAIN_STATUS_DISCRIMINATOR,\n }),\n );\n}\n\nexport function getUpdateCrosschainStatusInstructionDataDecoder(): Decoder<UpdateCrosschainStatusInstructionData> {\n return getStructDecoder([\n [\"discriminator\", fixDecoderSize(getBytesDecoder(), 8)],\n [\n \"crossmintCredentialId\",\n addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder()),\n ],\n [\"status\", getCrossChainStatusDecoder()],\n ]);\n}\n\nexport function getUpdateCrosschainStatusInstructionDataCodec(): Codec<\n UpdateCrosschainStatusInstructionDataArgs,\n UpdateCrosschainStatusInstructionData\n> {\n return combineCodec(\n getUpdateCrosschainStatusInstructionDataEncoder(),\n getUpdateCrosschainStatusInstructionDataDecoder(),\n );\n}\n\nexport type UpdateCrosschainStatusInput<\n TAccountCredential extends string = string,\n TAccountIssuer extends string = string,\n> = {\n credential: Address<TAccountCredential>;\n issuer: TransactionSigner<TAccountIssuer>;\n crossmintCredentialId: UpdateCrosschainStatusInstructionDataArgs[\"crossmintCredentialId\"];\n status: UpdateCrosschainStatusInstructionDataArgs[\"status\"];\n};\n\nexport function getUpdateCrosschainStatusInstruction<\n TAccountCredential extends string,\n TAccountIssuer extends string,\n TProgramAddress extends Address =\n typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: UpdateCrosschainStatusInput<TAccountCredential, TAccountIssuer>,\n config?: { programAddress?: TProgramAddress },\n): UpdateCrosschainStatusInstruction<\n TProgramAddress,\n TAccountCredential,\n TAccountIssuer\n> {\n // Program address.\n const programAddress =\n config?.programAddress ?? GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n credential: { value: input.credential ?? null, isWritable: true },\n issuer: { value: input.issuer ?? null, isWritable: true },\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 return Object.freeze({\n accounts: [\n getAccountMeta(accounts.credential),\n getAccountMeta(accounts.issuer),\n ],\n data: getUpdateCrosschainStatusInstructionDataEncoder().encode(\n args as UpdateCrosschainStatusInstructionDataArgs,\n ),\n programAddress,\n } as UpdateCrosschainStatusInstruction<\n TProgramAddress,\n TAccountCredential,\n TAccountIssuer\n >);\n}\n\nexport type ParsedUpdateCrosschainStatusInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n credential: TAccountMetas[0];\n issuer: TAccountMetas[1];\n };\n data: UpdateCrosschainStatusInstructionData;\n};\n\nexport function parseUpdateCrosschainStatusInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>,\n): ParsedUpdateCrosschainStatusInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 2) {\n // TODO: Coded error.\n throw new Error(\"Not enough accounts\");\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = (instruction.accounts as TAccountMetas)[accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: { credential: getNextAccount(), issuer: getNextAccount() },\n data: getUpdateCrosschainStatusInstructionDataDecoder().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 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 { GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS } from \"../programs\";\nimport {\n expectAddress,\n getAccountMetaFactory,\n type ResolvedAccount,\n} from \"../shared\";\nimport {\n getServiceEndpointDecoder,\n getServiceEndpointEncoder,\n getVerificationMethodDecoder,\n getVerificationMethodEncoder,\n type ServiceEndpoint,\n type ServiceEndpointArgs,\n type VerificationMethod,\n type VerificationMethodArgs,\n} from \"../types\";\n\nexport const UPDATE_DID_DOCUMENT_DISCRIMINATOR = new Uint8Array([\n 64, 216, 17, 91, 205, 94, 45, 57,\n]);\n\nexport function getUpdateDidDocumentDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 8).encode(\n UPDATE_DID_DOCUMENT_DISCRIMINATOR,\n );\n}\n\nexport type UpdateDidDocumentInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountDidDocument extends string | AccountMeta<string> = string,\n TAccountController extends string | AccountMeta<string> = string,\n TAccountClock extends string | AccountMeta<string> =\n \"SysvarC1ock11111111111111111111111111111111\",\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountDidDocument extends string\n ? WritableAccount<TAccountDidDocument>\n : TAccountDidDocument,\n TAccountController extends string\n ? WritableSignerAccount<TAccountController> &\n AccountSignerMeta<TAccountController>\n : TAccountController,\n TAccountClock extends string\n ? ReadonlyAccount<TAccountClock>\n : TAccountClock,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type UpdateDidDocumentInstructionData = {\n discriminator: ReadonlyUint8Array;\n addVerificationMethod: Option<VerificationMethod>;\n removeVerificationMethodId: Option<string>;\n addServiceEndpoint: Option<ServiceEndpoint>;\n removeServiceEndpointId: Option<string>;\n};\n\nexport type UpdateDidDocumentInstructionDataArgs = {\n addVerificationMethod: OptionOrNullable<VerificationMethodArgs>;\n removeVerificationMethodId: OptionOrNullable<string>;\n addServiceEndpoint: OptionOrNullable<ServiceEndpointArgs>;\n removeServiceEndpointId: OptionOrNullable<string>;\n};\n\nexport function getUpdateDidDocumentInstructionDataEncoder(): Encoder<UpdateDidDocumentInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n [\"discriminator\", fixEncoderSize(getBytesEncoder(), 8)],\n [\n \"addVerificationMethod\",\n getOptionEncoder(getVerificationMethodEncoder()),\n ],\n [\n \"removeVerificationMethodId\",\n getOptionEncoder(\n addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder()),\n ),\n ],\n [\"addServiceEndpoint\", getOptionEncoder(getServiceEndpointEncoder())],\n [\n \"removeServiceEndpointId\",\n getOptionEncoder(\n addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder()),\n ),\n ],\n ]),\n (value) => ({ ...value, discriminator: UPDATE_DID_DOCUMENT_DISCRIMINATOR }),\n );\n}\n\nexport function getUpdateDidDocumentInstructionDataDecoder(): Decoder<UpdateDidDocumentInstructionData> {\n return getStructDecoder([\n [\"discriminator\", fixDecoderSize(getBytesDecoder(), 8)],\n [\"addVerificationMethod\", getOptionDecoder(getVerificationMethodDecoder())],\n [\n \"removeVerificationMethodId\",\n getOptionDecoder(addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())),\n ],\n [\"addServiceEndpoint\", getOptionDecoder(getServiceEndpointDecoder())],\n [\n \"removeServiceEndpointId\",\n getOptionDecoder(addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())),\n ],\n ]);\n}\n\nexport function getUpdateDidDocumentInstructionDataCodec(): Codec<\n UpdateDidDocumentInstructionDataArgs,\n UpdateDidDocumentInstructionData\n> {\n return combineCodec(\n getUpdateDidDocumentInstructionDataEncoder(),\n getUpdateDidDocumentInstructionDataDecoder(),\n );\n}\n\nexport type UpdateDidDocumentAsyncInput<\n TAccountDidDocument extends string = string,\n TAccountController extends string = string,\n TAccountClock extends string = string,\n> = {\n /** DID document account with canonical PDA validation */\n didDocument?: Address<TAccountDidDocument>;\n /** Controller of the DID (must match document controller) */\n controller: TransactionSigner<TAccountController>;\n /** Clock sysvar for timestamp validation */\n clock?: Address<TAccountClock>;\n addVerificationMethod: UpdateDidDocumentInstructionDataArgs[\"addVerificationMethod\"];\n removeVerificationMethodId: UpdateDidDocumentInstructionDataArgs[\"removeVerificationMethodId\"];\n addServiceEndpoint: UpdateDidDocumentInstructionDataArgs[\"addServiceEndpoint\"];\n removeServiceEndpointId: UpdateDidDocumentInstructionDataArgs[\"removeServiceEndpointId\"];\n};\n\nexport async function getUpdateDidDocumentInstructionAsync<\n TAccountDidDocument extends string,\n TAccountController extends string,\n TAccountClock extends string,\n TProgramAddress extends Address =\n typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: UpdateDidDocumentAsyncInput<\n TAccountDidDocument,\n TAccountController,\n TAccountClock\n >,\n config?: { programAddress?: TProgramAddress },\n): Promise<\n UpdateDidDocumentInstruction<\n TProgramAddress,\n TAccountDidDocument,\n TAccountController,\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 didDocument: { value: input.didDocument ?? null, isWritable: true },\n controller: { value: input.controller ?? 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.didDocument.value) {\n accounts.didDocument.value = await getProgramDerivedAddress({\n programAddress,\n seeds: [\n getBytesEncoder().encode(\n new Uint8Array([\n 100, 105, 100, 95, 100, 111, 99, 117, 109, 101, 110, 116,\n ]),\n ),\n getAddressEncoder().encode(expectAddress(accounts.controller.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 return Object.freeze({\n accounts: [\n getAccountMeta(accounts.didDocument),\n getAccountMeta(accounts.controller),\n getAccountMeta(accounts.clock),\n ],\n data: getUpdateDidDocumentInstructionDataEncoder().encode(\n args as UpdateDidDocumentInstructionDataArgs,\n ),\n programAddress,\n } as UpdateDidDocumentInstruction<\n TProgramAddress,\n TAccountDidDocument,\n TAccountController,\n TAccountClock\n >);\n}\n\nexport type UpdateDidDocumentInput<\n TAccountDidDocument extends string = string,\n TAccountController extends string = string,\n TAccountClock extends string = string,\n> = {\n /** DID document account with canonical PDA validation */\n didDocument: Address<TAccountDidDocument>;\n /** Controller of the DID (must match document controller) */\n controller: TransactionSigner<TAccountController>;\n /** Clock sysvar for timestamp validation */\n clock?: Address<TAccountClock>;\n addVerificationMethod: UpdateDidDocumentInstructionDataArgs[\"addVerificationMethod\"];\n removeVerificationMethodId: UpdateDidDocumentInstructionDataArgs[\"removeVerificationMethodId\"];\n addServiceEndpoint: UpdateDidDocumentInstructionDataArgs[\"addServiceEndpoint\"];\n removeServiceEndpointId: UpdateDidDocumentInstructionDataArgs[\"removeServiceEndpointId\"];\n};\n\nexport function getUpdateDidDocumentInstruction<\n TAccountDidDocument extends string,\n TAccountController extends string,\n TAccountClock extends string,\n TProgramAddress extends Address =\n typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: UpdateDidDocumentInput<\n TAccountDidDocument,\n TAccountController,\n TAccountClock\n >,\n config?: { programAddress?: TProgramAddress },\n): UpdateDidDocumentInstruction<\n TProgramAddress,\n TAccountDidDocument,\n TAccountController,\n TAccountClock\n> {\n // Program address.\n const programAddress =\n config?.programAddress ?? GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n didDocument: { value: input.didDocument ?? null, isWritable: true },\n controller: { value: input.controller ?? 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 return Object.freeze({\n accounts: [\n getAccountMeta(accounts.didDocument),\n getAccountMeta(accounts.controller),\n getAccountMeta(accounts.clock),\n ],\n data: getUpdateDidDocumentInstructionDataEncoder().encode(\n args as UpdateDidDocumentInstructionDataArgs,\n ),\n programAddress,\n } as UpdateDidDocumentInstruction<\n TProgramAddress,\n TAccountDidDocument,\n TAccountController,\n TAccountClock\n >);\n}\n\nexport type ParsedUpdateDidDocumentInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n /** DID document account with canonical PDA validation */\n didDocument: TAccountMetas[0];\n /** Controller of the DID (must match document controller) */\n controller: TAccountMetas[1];\n /** Clock sysvar for timestamp validation */\n clock: TAccountMetas[2];\n };\n data: UpdateDidDocumentInstructionData;\n};\n\nexport function parseUpdateDidDocumentInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>,\n): ParsedUpdateDidDocumentInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 3) {\n // TODO: Coded error.\n throw new Error(\"Not enough accounts\");\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = (instruction.accounts as TAccountMetas)[accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n didDocument: getNextAccount(),\n controller: getNextAccount(),\n clock: getNextAccount(),\n },\n data: getUpdateDidDocumentInstructionDataDecoder().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 getBooleanDecoder,\n getBooleanEncoder,\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 ReadonlySignerAccount,\n type ReadonlyUint8Array,\n type TransactionSigner,\n type WritableAccount,\n} from \"@solana/kit\";\nimport { GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS } from \"../programs\";\nimport { getAccountMetaFactory, type ResolvedAccount } from \"../shared\";\n\nexport const UPDATE_PROTOCOL_CONFIG_DISCRIMINATOR = new Uint8Array([\n 197, 97, 123, 54, 221, 168, 11, 135,\n]);\n\nexport function getUpdateProtocolConfigDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 8).encode(\n UPDATE_PROTOCOL_CONFIG_DISCRIMINATOR,\n );\n}\n\nexport type UpdateProtocolConfigInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountConfig 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 TAccountConfig extends string\n ? WritableAccount<TAccountConfig>\n : TAccountConfig,\n TAccountAuthority extends string\n ? ReadonlySignerAccount<TAccountAuthority> &\n AccountSignerMeta<TAccountAuthority>\n : TAccountAuthority,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type UpdateProtocolConfigInstructionData = {\n discriminator: ReadonlyUint8Array;\n escrowFeeBps: Option<number>;\n agentRegistrationFee: Option<bigint>;\n listingFee: Option<bigint>;\n disputeFeeBps: Option<number>;\n feesEnabled: Option<boolean>;\n treasury: Option<Address>;\n buybackPool: Option<Address>;\n moderatorPool: Option<Address>;\n};\n\nexport type UpdateProtocolConfigInstructionDataArgs = {\n escrowFeeBps: OptionOrNullable<number>;\n agentRegistrationFee: OptionOrNullable<number | bigint>;\n listingFee: OptionOrNullable<number | bigint>;\n disputeFeeBps: OptionOrNullable<number>;\n feesEnabled: OptionOrNullable<boolean>;\n treasury: OptionOrNullable<Address>;\n buybackPool: OptionOrNullable<Address>;\n moderatorPool: OptionOrNullable<Address>;\n};\n\nexport function getUpdateProtocolConfigInstructionDataEncoder(): Encoder<UpdateProtocolConfigInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n [\"discriminator\", fixEncoderSize(getBytesEncoder(), 8)],\n [\"escrowFeeBps\", getOptionEncoder(getU16Encoder())],\n [\"agentRegistrationFee\", getOptionEncoder(getU64Encoder())],\n [\"listingFee\", getOptionEncoder(getU64Encoder())],\n [\"disputeFeeBps\", getOptionEncoder(getU16Encoder())],\n [\"feesEnabled\", getOptionEncoder(getBooleanEncoder())],\n [\"treasury\", getOptionEncoder(getAddressEncoder())],\n [\"buybackPool\", getOptionEncoder(getAddressEncoder())],\n [\"moderatorPool\", getOptionEncoder(getAddressEncoder())],\n ]),\n (value) => ({\n ...value,\n discriminator: UPDATE_PROTOCOL_CONFIG_DISCRIMINATOR,\n }),\n );\n}\n\nexport function getUpdateProtocolConfigInstructionDataDecoder(): Decoder<UpdateProtocolConfigInstructionData> {\n return getStructDecoder([\n [\"discriminator\", fixDecoderSize(getBytesDecoder(), 8)],\n [\"escrowFeeBps\", getOptionDecoder(getU16Decoder())],\n [\"agentRegistrationFee\", getOptionDecoder(getU64Decoder())],\n [\"listingFee\", getOptionDecoder(getU64Decoder())],\n [\"disputeFeeBps\", getOptionDecoder(getU16Decoder())],\n [\"feesEnabled\", getOptionDecoder(getBooleanDecoder())],\n [\"treasury\", getOptionDecoder(getAddressDecoder())],\n [\"buybackPool\", getOptionDecoder(getAddressDecoder())],\n [\"moderatorPool\", getOptionDecoder(getAddressDecoder())],\n ]);\n}\n\nexport function getUpdateProtocolConfigInstructionDataCodec(): Codec<\n UpdateProtocolConfigInstructionDataArgs,\n UpdateProtocolConfigInstructionData\n> {\n return combineCodec(\n getUpdateProtocolConfigInstructionDataEncoder(),\n getUpdateProtocolConfigInstructionDataDecoder(),\n );\n}\n\nexport type UpdateProtocolConfigAsyncInput<\n TAccountConfig extends string = string,\n TAccountAuthority extends string = string,\n> = {\n config?: Address<TAccountConfig>;\n authority: TransactionSigner<TAccountAuthority>;\n escrowFeeBps: UpdateProtocolConfigInstructionDataArgs[\"escrowFeeBps\"];\n agentRegistrationFee: UpdateProtocolConfigInstructionDataArgs[\"agentRegistrationFee\"];\n listingFee: UpdateProtocolConfigInstructionDataArgs[\"listingFee\"];\n disputeFeeBps: UpdateProtocolConfigInstructionDataArgs[\"disputeFeeBps\"];\n feesEnabled: UpdateProtocolConfigInstructionDataArgs[\"feesEnabled\"];\n treasury: UpdateProtocolConfigInstructionDataArgs[\"treasury\"];\n buybackPool: UpdateProtocolConfigInstructionDataArgs[\"buybackPool\"];\n moderatorPool: UpdateProtocolConfigInstructionDataArgs[\"moderatorPool\"];\n};\n\nexport async function getUpdateProtocolConfigInstructionAsync<\n TAccountConfig extends string,\n TAccountAuthority extends string,\n TProgramAddress extends Address =\n typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: UpdateProtocolConfigAsyncInput<TAccountConfig, TAccountAuthority>,\n config?: { programAddress?: TProgramAddress },\n): Promise<\n UpdateProtocolConfigInstruction<\n TProgramAddress,\n TAccountConfig,\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 config: { value: input.config ?? 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.config.value) {\n accounts.config.value = await getProgramDerivedAddress({\n programAddress,\n seeds: [\n getBytesEncoder().encode(\n new Uint8Array([\n 112, 114, 111, 116, 111, 99, 111, 108, 95, 99, 111, 110, 102, 105,\n 103,\n ]),\n ),\n ],\n });\n }\n\n const getAccountMeta = getAccountMetaFactory(programAddress, \"programId\");\n return Object.freeze({\n accounts: [\n getAccountMeta(accounts.config),\n getAccountMeta(accounts.authority),\n ],\n data: getUpdateProtocolConfigInstructionDataEncoder().encode(\n args as UpdateProtocolConfigInstructionDataArgs,\n ),\n programAddress,\n } as UpdateProtocolConfigInstruction<\n TProgramAddress,\n TAccountConfig,\n TAccountAuthority\n >);\n}\n\nexport type UpdateProtocolConfigInput<\n TAccountConfig extends string = string,\n TAccountAuthority extends string = string,\n> = {\n config: Address<TAccountConfig>;\n authority: TransactionSigner<TAccountAuthority>;\n escrowFeeBps: UpdateProtocolConfigInstructionDataArgs[\"escrowFeeBps\"];\n agentRegistrationFee: UpdateProtocolConfigInstructionDataArgs[\"agentRegistrationFee\"];\n listingFee: UpdateProtocolConfigInstructionDataArgs[\"listingFee\"];\n disputeFeeBps: UpdateProtocolConfigInstructionDataArgs[\"disputeFeeBps\"];\n feesEnabled: UpdateProtocolConfigInstructionDataArgs[\"feesEnabled\"];\n treasury: UpdateProtocolConfigInstructionDataArgs[\"treasury\"];\n buybackPool: UpdateProtocolConfigInstructionDataArgs[\"buybackPool\"];\n moderatorPool: UpdateProtocolConfigInstructionDataArgs[\"moderatorPool\"];\n};\n\nexport function getUpdateProtocolConfigInstruction<\n TAccountConfig extends string,\n TAccountAuthority extends string,\n TProgramAddress extends Address =\n typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: UpdateProtocolConfigInput<TAccountConfig, TAccountAuthority>,\n config?: { programAddress?: TProgramAddress },\n): UpdateProtocolConfigInstruction<\n TProgramAddress,\n TAccountConfig,\n TAccountAuthority\n> {\n // Program address.\n const programAddress =\n config?.programAddress ?? GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n config: { value: input.config ?? 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 return Object.freeze({\n accounts: [\n getAccountMeta(accounts.config),\n getAccountMeta(accounts.authority),\n ],\n data: getUpdateProtocolConfigInstructionDataEncoder().encode(\n args as UpdateProtocolConfigInstructionDataArgs,\n ),\n programAddress,\n } as UpdateProtocolConfigInstruction<\n TProgramAddress,\n TAccountConfig,\n TAccountAuthority\n >);\n}\n\nexport type ParsedUpdateProtocolConfigInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n config: TAccountMetas[0];\n authority: TAccountMetas[1];\n };\n data: UpdateProtocolConfigInstructionData;\n};\n\nexport function parseUpdateProtocolConfigInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>,\n): ParsedUpdateProtocolConfigInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 2) {\n // TODO: Coded error.\n throw new Error(\"Not enough accounts\");\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = (instruction.accounts as TAccountMetas)[accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: { config: getNextAccount(), authority: getNextAccount() },\n data: getUpdateProtocolConfigInstructionDataDecoder().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 ReadonlySignerAccount,\n type ReadonlyUint8Array,\n type TransactionSigner,\n type WritableAccount,\n} from \"@solana/kit\";\nimport { GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS } from \"../programs\";\nimport {\n expectAddress,\n getAccountMetaFactory,\n type ResolvedAccount,\n} from \"../shared\";\nimport {\n getTagScoreDecoder,\n getTagScoreEncoder,\n type TagScore,\n type TagScoreArgs,\n} from \"../types\";\n\nexport const UPDATE_REPUTATION_TAGS_DISCRIMINATOR = new Uint8Array([\n 206, 96, 254, 186, 129, 180, 103, 198,\n]);\n\nexport function getUpdateReputationTagsDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 8).encode(\n UPDATE_REPUTATION_TAGS_DISCRIMINATOR,\n );\n}\n\nexport type UpdateReputationTagsInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountReputationMetrics extends string | AccountMeta<string> = string,\n TAccountAgent extends string | AccountMeta<string> = string,\n TAccountAuthority extends string | AccountMeta<string> = string,\n TAccountClock extends string | AccountMeta<string> =\n \"SysvarC1ock11111111111111111111111111111111\",\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountReputationMetrics extends string\n ? WritableAccount<TAccountReputationMetrics>\n : TAccountReputationMetrics,\n TAccountAgent extends string\n ? WritableAccount<TAccountAgent>\n : TAccountAgent,\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 UpdateReputationTagsInstructionData = {\n discriminator: ReadonlyUint8Array;\n skillTags: Array<string>;\n behaviorTags: Array<string>;\n complianceTags: Array<string>;\n tagScores: Array<TagScore>;\n};\n\nexport type UpdateReputationTagsInstructionDataArgs = {\n skillTags: Array<string>;\n behaviorTags: Array<string>;\n complianceTags: Array<string>;\n tagScores: Array<TagScoreArgs>;\n};\n\nexport function getUpdateReputationTagsInstructionDataEncoder(): Encoder<UpdateReputationTagsInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n [\"discriminator\", fixEncoderSize(getBytesEncoder(), 8)],\n [\n \"skillTags\",\n getArrayEncoder(\n addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder()),\n ),\n ],\n [\n \"behaviorTags\",\n getArrayEncoder(\n addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder()),\n ),\n ],\n [\n \"complianceTags\",\n getArrayEncoder(\n addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder()),\n ),\n ],\n [\"tagScores\", getArrayEncoder(getTagScoreEncoder())],\n ]),\n (value) => ({\n ...value,\n discriminator: UPDATE_REPUTATION_TAGS_DISCRIMINATOR,\n }),\n );\n}\n\nexport function getUpdateReputationTagsInstructionDataDecoder(): Decoder<UpdateReputationTagsInstructionData> {\n return getStructDecoder([\n [\"discriminator\", fixDecoderSize(getBytesDecoder(), 8)],\n [\n \"skillTags\",\n getArrayDecoder(addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())),\n ],\n [\n \"behaviorTags\",\n getArrayDecoder(addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())),\n ],\n [\n \"complianceTags\",\n getArrayDecoder(addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())),\n ],\n [\"tagScores\", getArrayDecoder(getTagScoreDecoder())],\n ]);\n}\n\nexport function getUpdateReputationTagsInstructionDataCodec(): Codec<\n UpdateReputationTagsInstructionDataArgs,\n UpdateReputationTagsInstructionData\n> {\n return combineCodec(\n getUpdateReputationTagsInstructionDataEncoder(),\n getUpdateReputationTagsInstructionDataDecoder(),\n );\n}\n\nexport type UpdateReputationTagsAsyncInput<\n TAccountReputationMetrics extends string = string,\n TAccountAgent extends string = string,\n TAccountAuthority extends string = string,\n TAccountClock extends string = string,\n> = {\n /** Reputation metrics account */\n reputationMetrics?: Address<TAccountReputationMetrics>;\n /** Agent account */\n agent: Address<TAccountAgent>;\n /** Authority (can be the agent owner or authorized updater) */\n authority: TransactionSigner<TAccountAuthority>;\n /** Clock for timestamps */\n clock?: Address<TAccountClock>;\n skillTags: UpdateReputationTagsInstructionDataArgs[\"skillTags\"];\n behaviorTags: UpdateReputationTagsInstructionDataArgs[\"behaviorTags\"];\n complianceTags: UpdateReputationTagsInstructionDataArgs[\"complianceTags\"];\n tagScores: UpdateReputationTagsInstructionDataArgs[\"tagScores\"];\n};\n\nexport async function getUpdateReputationTagsInstructionAsync<\n TAccountReputationMetrics extends string,\n TAccountAgent extends string,\n TAccountAuthority extends string,\n TAccountClock extends string,\n TProgramAddress extends Address =\n typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: UpdateReputationTagsAsyncInput<\n TAccountReputationMetrics,\n TAccountAgent,\n TAccountAuthority,\n TAccountClock\n >,\n config?: { programAddress?: TProgramAddress },\n): Promise<\n UpdateReputationTagsInstruction<\n TProgramAddress,\n TAccountReputationMetrics,\n TAccountAgent,\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 reputationMetrics: {\n value: input.reputationMetrics ?? null,\n isWritable: true,\n },\n agent: { value: input.agent ?? 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.reputationMetrics.value) {\n accounts.reputationMetrics.value = await getProgramDerivedAddress({\n programAddress,\n seeds: [\n getBytesEncoder().encode(\n new Uint8Array([\n 114, 101, 112, 117, 116, 97, 116, 105, 111, 110, 95, 109, 101, 116,\n 114, 105, 99, 115,\n ]),\n ),\n getAddressEncoder().encode(expectAddress(accounts.agent.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 return Object.freeze({\n accounts: [\n getAccountMeta(accounts.reputationMetrics),\n getAccountMeta(accounts.agent),\n getAccountMeta(accounts.authority),\n getAccountMeta(accounts.clock),\n ],\n data: getUpdateReputationTagsInstructionDataEncoder().encode(\n args as UpdateReputationTagsInstructionDataArgs,\n ),\n programAddress,\n } as UpdateReputationTagsInstruction<\n TProgramAddress,\n TAccountReputationMetrics,\n TAccountAgent,\n TAccountAuthority,\n TAccountClock\n >);\n}\n\nexport type UpdateReputationTagsInput<\n TAccountReputationMetrics extends string = string,\n TAccountAgent extends string = string,\n TAccountAuthority extends string = string,\n TAccountClock extends string = string,\n> = {\n /** Reputation metrics account */\n reputationMetrics: Address<TAccountReputationMetrics>;\n /** Agent account */\n agent: Address<TAccountAgent>;\n /** Authority (can be the agent owner or authorized updater) */\n authority: TransactionSigner<TAccountAuthority>;\n /** Clock for timestamps */\n clock?: Address<TAccountClock>;\n skillTags: UpdateReputationTagsInstructionDataArgs[\"skillTags\"];\n behaviorTags: UpdateReputationTagsInstructionDataArgs[\"behaviorTags\"];\n complianceTags: UpdateReputationTagsInstructionDataArgs[\"complianceTags\"];\n tagScores: UpdateReputationTagsInstructionDataArgs[\"tagScores\"];\n};\n\nexport function getUpdateReputationTagsInstruction<\n TAccountReputationMetrics extends string,\n TAccountAgent extends string,\n TAccountAuthority extends string,\n TAccountClock extends string,\n TProgramAddress extends Address =\n typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: UpdateReputationTagsInput<\n TAccountReputationMetrics,\n TAccountAgent,\n TAccountAuthority,\n TAccountClock\n >,\n config?: { programAddress?: TProgramAddress },\n): UpdateReputationTagsInstruction<\n TProgramAddress,\n TAccountReputationMetrics,\n TAccountAgent,\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 reputationMetrics: {\n value: input.reputationMetrics ?? null,\n isWritable: true,\n },\n agent: { value: input.agent ?? 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 return Object.freeze({\n accounts: [\n getAccountMeta(accounts.reputationMetrics),\n getAccountMeta(accounts.agent),\n getAccountMeta(accounts.authority),\n getAccountMeta(accounts.clock),\n ],\n data: getUpdateReputationTagsInstructionDataEncoder().encode(\n args as UpdateReputationTagsInstructionDataArgs,\n ),\n programAddress,\n } as UpdateReputationTagsInstruction<\n TProgramAddress,\n TAccountReputationMetrics,\n TAccountAgent,\n TAccountAuthority,\n TAccountClock\n >);\n}\n\nexport type ParsedUpdateReputationTagsInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n /** Reputation metrics account */\n reputationMetrics: TAccountMetas[0];\n /** Agent account */\n agent: TAccountMetas[1];\n /** Authority (can be the agent owner or authorized updater) */\n authority: TAccountMetas[2];\n /** Clock for timestamps */\n clock: TAccountMetas[3];\n };\n data: UpdateReputationTagsInstructionData;\n};\n\nexport function parseUpdateReputationTagsInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>,\n): ParsedUpdateReputationTagsInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 4) {\n // TODO: Coded error.\n throw new Error(\"Not enough accounts\");\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = (instruction.accounts as TAccountMetas)[accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n reputationMetrics: getNextAccount(),\n agent: getNextAccount(),\n authority: getNextAccount(),\n clock: getNextAccount(),\n },\n data: getUpdateReputationTagsInstructionDataDecoder().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 getU16Decoder,\n getU16Encoder,\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 { GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS } from \"../programs\";\nimport {\n expectAddress,\n getAccountMetaFactory,\n type ResolvedAccount,\n} from \"../shared\";\n\nexport const UPDATE_SOURCE_REPUTATION_DISCRIMINATOR = new Uint8Array([\n 161, 240, 255, 69, 130, 227, 71, 123,\n]);\n\nexport function getUpdateSourceReputationDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 8).encode(\n UPDATE_SOURCE_REPUTATION_DISCRIMINATOR,\n );\n}\n\nexport type UpdateSourceReputationInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountReputationMetrics extends string | AccountMeta<string> = string,\n TAccountAgent extends string | AccountMeta<string> = string,\n TAccountAuthority extends string | AccountMeta<string> = string,\n TAccountClock extends string | AccountMeta<string> =\n \"SysvarC1ock11111111111111111111111111111111\",\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountReputationMetrics extends string\n ? WritableAccount<TAccountReputationMetrics>\n : TAccountReputationMetrics,\n TAccountAgent extends string\n ? WritableAccount<TAccountAgent>\n : TAccountAgent,\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 UpdateSourceReputationInstructionData = {\n discriminator: ReadonlyUint8Array;\n sourceName: string;\n score: number;\n weight: number;\n dataPoints: number;\n reliability: number;\n};\n\nexport type UpdateSourceReputationInstructionDataArgs = {\n sourceName: string;\n score: number;\n weight: number;\n dataPoints: number;\n reliability: number;\n};\n\nexport function getUpdateSourceReputationInstructionDataEncoder(): Encoder<UpdateSourceReputationInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n [\"discriminator\", fixEncoderSize(getBytesEncoder(), 8)],\n [\"sourceName\", addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder())],\n [\"score\", getU16Encoder()],\n [\"weight\", getU16Encoder()],\n [\"dataPoints\", getU32Encoder()],\n [\"reliability\", getU16Encoder()],\n ]),\n (value) => ({\n ...value,\n discriminator: UPDATE_SOURCE_REPUTATION_DISCRIMINATOR,\n }),\n );\n}\n\nexport function getUpdateSourceReputationInstructionDataDecoder(): Decoder<UpdateSourceReputationInstructionData> {\n return getStructDecoder([\n [\"discriminator\", fixDecoderSize(getBytesDecoder(), 8)],\n [\"sourceName\", addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())],\n [\"score\", getU16Decoder()],\n [\"weight\", getU16Decoder()],\n [\"dataPoints\", getU32Decoder()],\n [\"reliability\", getU16Decoder()],\n ]);\n}\n\nexport function getUpdateSourceReputationInstructionDataCodec(): Codec<\n UpdateSourceReputationInstructionDataArgs,\n UpdateSourceReputationInstructionData\n> {\n return combineCodec(\n getUpdateSourceReputationInstructionDataEncoder(),\n getUpdateSourceReputationInstructionDataDecoder(),\n );\n}\n\nexport type UpdateSourceReputationAsyncInput<\n TAccountReputationMetrics extends string = string,\n TAccountAgent extends string = string,\n TAccountAuthority extends string = string,\n TAccountClock extends string = string,\n> = {\n /** Reputation metrics account */\n reputationMetrics?: Address<TAccountReputationMetrics>;\n /** Agent account */\n agent: Address<TAccountAgent>;\n /** Authority (can be oracle, agent owner, or authorized updater) */\n authority: TransactionSigner<TAccountAuthority>;\n /** Clock for timestamps */\n clock?: Address<TAccountClock>;\n sourceName: UpdateSourceReputationInstructionDataArgs[\"sourceName\"];\n score: UpdateSourceReputationInstructionDataArgs[\"score\"];\n weight: UpdateSourceReputationInstructionDataArgs[\"weight\"];\n dataPoints: UpdateSourceReputationInstructionDataArgs[\"dataPoints\"];\n reliability: UpdateSourceReputationInstructionDataArgs[\"reliability\"];\n};\n\nexport async function getUpdateSourceReputationInstructionAsync<\n TAccountReputationMetrics extends string,\n TAccountAgent extends string,\n TAccountAuthority extends string,\n TAccountClock extends string,\n TProgramAddress extends Address =\n typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: UpdateSourceReputationAsyncInput<\n TAccountReputationMetrics,\n TAccountAgent,\n TAccountAuthority,\n TAccountClock\n >,\n config?: { programAddress?: TProgramAddress },\n): Promise<\n UpdateSourceReputationInstruction<\n TProgramAddress,\n TAccountReputationMetrics,\n TAccountAgent,\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 reputationMetrics: {\n value: input.reputationMetrics ?? null,\n isWritable: true,\n },\n agent: { value: input.agent ?? 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.reputationMetrics.value) {\n accounts.reputationMetrics.value = await getProgramDerivedAddress({\n programAddress,\n seeds: [\n getBytesEncoder().encode(\n new Uint8Array([\n 114, 101, 112, 117, 116, 97, 116, 105, 111, 110, 95, 109, 101, 116,\n 114, 105, 99, 115,\n ]),\n ),\n getAddressEncoder().encode(expectAddress(accounts.agent.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 return Object.freeze({\n accounts: [\n getAccountMeta(accounts.reputationMetrics),\n getAccountMeta(accounts.agent),\n getAccountMeta(accounts.authority),\n getAccountMeta(accounts.clock),\n ],\n data: getUpdateSourceReputationInstructionDataEncoder().encode(\n args as UpdateSourceReputationInstructionDataArgs,\n ),\n programAddress,\n } as UpdateSourceReputationInstruction<\n TProgramAddress,\n TAccountReputationMetrics,\n TAccountAgent,\n TAccountAuthority,\n TAccountClock\n >);\n}\n\nexport type UpdateSourceReputationInput<\n TAccountReputationMetrics extends string = string,\n TAccountAgent extends string = string,\n TAccountAuthority extends string = string,\n TAccountClock extends string = string,\n> = {\n /** Reputation metrics account */\n reputationMetrics: Address<TAccountReputationMetrics>;\n /** Agent account */\n agent: Address<TAccountAgent>;\n /** Authority (can be oracle, agent owner, or authorized updater) */\n authority: TransactionSigner<TAccountAuthority>;\n /** Clock for timestamps */\n clock?: Address<TAccountClock>;\n sourceName: UpdateSourceReputationInstructionDataArgs[\"sourceName\"];\n score: UpdateSourceReputationInstructionDataArgs[\"score\"];\n weight: UpdateSourceReputationInstructionDataArgs[\"weight\"];\n dataPoints: UpdateSourceReputationInstructionDataArgs[\"dataPoints\"];\n reliability: UpdateSourceReputationInstructionDataArgs[\"reliability\"];\n};\n\nexport function getUpdateSourceReputationInstruction<\n TAccountReputationMetrics extends string,\n TAccountAgent extends string,\n TAccountAuthority extends string,\n TAccountClock extends string,\n TProgramAddress extends Address =\n typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: UpdateSourceReputationInput<\n TAccountReputationMetrics,\n TAccountAgent,\n TAccountAuthority,\n TAccountClock\n >,\n config?: { programAddress?: TProgramAddress },\n): UpdateSourceReputationInstruction<\n TProgramAddress,\n TAccountReputationMetrics,\n TAccountAgent,\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 reputationMetrics: {\n value: input.reputationMetrics ?? null,\n isWritable: true,\n },\n agent: { value: input.agent ?? 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 return Object.freeze({\n accounts: [\n getAccountMeta(accounts.reputationMetrics),\n getAccountMeta(accounts.agent),\n getAccountMeta(accounts.authority),\n getAccountMeta(accounts.clock),\n ],\n data: getUpdateSourceReputationInstructionDataEncoder().encode(\n args as UpdateSourceReputationInstructionDataArgs,\n ),\n programAddress,\n } as UpdateSourceReputationInstruction<\n TProgramAddress,\n TAccountReputationMetrics,\n TAccountAgent,\n TAccountAuthority,\n TAccountClock\n >);\n}\n\nexport type ParsedUpdateSourceReputationInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n /** Reputation metrics account */\n reputationMetrics: TAccountMetas[0];\n /** Agent account */\n agent: TAccountMetas[1];\n /** Authority (can be oracle, agent owner, or authorized updater) */\n authority: TAccountMetas[2];\n /** Clock for timestamps */\n clock: TAccountMetas[3];\n };\n data: UpdateSourceReputationInstructionData;\n};\n\nexport function parseUpdateSourceReputationInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>,\n): ParsedUpdateSourceReputationInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 4) {\n // TODO: Coded error.\n throw new Error(\"Not enough accounts\");\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = (instruction.accounts as TAccountMetas)[accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n reputationMetrics: getNextAccount(),\n agent: getNextAccount(),\n authority: getNextAccount(),\n clock: getNextAccount(),\n },\n data: getUpdateSourceReputationInstructionDataDecoder().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 { 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 string | AccountMeta<string> =\n \"11111111111111111111111111111111\",\n TAccountClock extends string | AccountMeta<string> =\n \"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 Address =\n 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 return Object.freeze({\n accounts: [\n getAccountMeta(accounts.agentVerification),\n getAccountMeta(accounts.agent),\n getAccountMeta(accounts.verifier),\n getAccountMeta(accounts.systemProgram),\n getAccountMeta(accounts.clock),\n ],\n data: getVerifyAgentInstructionDataEncoder().encode(\n args as VerifyAgentInstructionDataArgs,\n ),\n programAddress,\n } as VerifyAgentInstruction<\n TProgramAddress,\n TAccountAgentVerification,\n TAccountAgent,\n TAccountVerifier,\n TAccountSystemProgram,\n TAccountClock\n >);\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 Address =\n 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 return Object.freeze({\n accounts: [\n getAccountMeta(accounts.agentVerification),\n getAccountMeta(accounts.agent),\n getAccountMeta(accounts.verifier),\n getAccountMeta(accounts.systemProgram),\n getAccountMeta(accounts.clock),\n ],\n data: getVerifyAgentInstructionDataEncoder().encode(\n args as VerifyAgentInstructionDataArgs,\n ),\n programAddress,\n } as VerifyAgentInstruction<\n TProgramAddress,\n TAccountAgentVerification,\n TAccountAgent,\n TAccountVerifier,\n TAccountSystemProgram,\n TAccountClock\n >);\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 // TODO: Coded error.\n throw new Error(\"Not enough accounts\");\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = (instruction.accounts as TAccountMetas)[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 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} from \"@solana/kit\";\nimport { GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS } from \"../programs\";\nimport { getAccountMetaFactory, type ResolvedAccount } from \"../shared\";\n\nexport const VERIFY_AUTHORIZATION_DISCRIMINATOR = new Uint8Array([\n 43, 9, 131, 59, 74, 118, 113, 170,\n]);\n\nexport function getVerifyAuthorizationDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 8).encode(\n VERIFY_AUTHORIZATION_DISCRIMINATOR,\n );\n}\n\nexport type VerifyAuthorizationInstruction<\n TProgram extends string = typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n TAccountAgent extends string | AccountMeta<string> = string,\n TAccountAuthorization extends string | AccountMeta<string> = string,\n TAccountClock extends string | AccountMeta<string> =\n \"SysvarC1ock11111111111111111111111111111111\",\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountAgent extends string\n ? ReadonlyAccount<TAccountAgent>\n : TAccountAgent,\n TAccountAuthorization extends string\n ? ReadonlyAccount<TAccountAuthorization>\n : TAccountAuthorization,\n TAccountClock extends string\n ? ReadonlyAccount<TAccountClock>\n : TAccountClock,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type VerifyAuthorizationInstructionData = {\n discriminator: ReadonlyUint8Array;\n nonce: Option<string>;\n};\n\nexport type VerifyAuthorizationInstructionDataArgs = {\n nonce: OptionOrNullable<string>;\n};\n\nexport function getVerifyAuthorizationInstructionDataEncoder(): Encoder<VerifyAuthorizationInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n [\"discriminator\", fixEncoderSize(getBytesEncoder(), 8)],\n [\n \"nonce\",\n getOptionEncoder(\n addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder()),\n ),\n ],\n ]),\n (value) => ({\n ...value,\n discriminator: VERIFY_AUTHORIZATION_DISCRIMINATOR,\n }),\n );\n}\n\nexport function getVerifyAuthorizationInstructionDataDecoder(): Decoder<VerifyAuthorizationInstructionData> {\n return getStructDecoder([\n [\"discriminator\", fixDecoderSize(getBytesDecoder(), 8)],\n [\n \"nonce\",\n getOptionDecoder(addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())),\n ],\n ]);\n}\n\nexport function getVerifyAuthorizationInstructionDataCodec(): Codec<\n VerifyAuthorizationInstructionDataArgs,\n VerifyAuthorizationInstructionData\n> {\n return combineCodec(\n getVerifyAuthorizationInstructionDataEncoder(),\n getVerifyAuthorizationInstructionDataDecoder(),\n );\n}\n\nexport type VerifyAuthorizationInput<\n TAccountAgent extends string = string,\n TAccountAuthorization extends string = string,\n TAccountClock extends string = string,\n> = {\n /** Agent account */\n agent: Address<TAccountAgent>;\n /** Authorization account (PDA) */\n authorization: Address<TAccountAuthorization>;\n /** Clock for timestamp validation */\n clock?: Address<TAccountClock>;\n nonce: VerifyAuthorizationInstructionDataArgs[\"nonce\"];\n};\n\nexport function getVerifyAuthorizationInstruction<\n TAccountAgent extends string,\n TAccountAuthorization extends string,\n TAccountClock extends string,\n TProgramAddress extends Address =\n typeof GHOSTSPEAK_MARKETPLACE_PROGRAM_ADDRESS,\n>(\n input: VerifyAuthorizationInput<\n TAccountAgent,\n TAccountAuthorization,\n TAccountClock\n >,\n config?: { programAddress?: TProgramAddress },\n): VerifyAuthorizationInstruction<\n TProgramAddress,\n TAccountAgent,\n TAccountAuthorization,\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: false },\n authorization: { value: input.authorization ?? 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 return Object.freeze({\n accounts: [\n getAccountMeta(accounts.agent),\n getAccountMeta(accounts.authorization),\n getAccountMeta(accounts.clock),\n ],\n data: getVerifyAuthorizationInstructionDataEncoder().encode(\n args as VerifyAuthorizationInstructionDataArgs,\n ),\n programAddress,\n } as VerifyAuthorizationInstruction<\n TProgramAddress,\n TAccountAgent,\n TAccountAuthorization,\n TAccountClock\n >);\n}\n\nexport type ParsedVerifyAuthorizationInstruction<\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 */\n agent: TAccountMetas[0];\n /** Authorization account (PDA) */\n authorization: TAccountMetas[1];\n /** Clock for timestamp validation */\n clock: TAccountMetas[2];\n };\n data: VerifyAuthorizationInstructionData;\n};\n\nexport function parseVerifyAuthorizationInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>,\n): ParsedVerifyAuthorizationInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 3) {\n // TODO: Coded error.\n throw new Error(\"Not enough accounts\");\n }\n let accountIndex = 0;\n const getNextAccount = () => {\n const accountMeta = (instruction.accounts as TAccountMetas)[accountIndex]!;\n accountIndex += 1;\n return accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n agent: getNextAccount(),\n authorization: getNextAccount(),\n clock: getNextAccount(),\n },\n data: getVerifyAuthorizationInstructionDataDecoder().decode(\n instruction.data,\n ),\n };\n}\n"]}
|