@revibase/core 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +2 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +38 -24
- package/dist/index.d.ts +38 -24
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/generated/accounts/domainConfig.ts","../src/generated/accounts/globalCounter.ts","../src/generated/types/addMemberArgs.ts","../src/generated/types/compiledInstruction.ts","../src/generated/types/compressedAccountMeta.ts","../src/generated/types/compressedAccountMetaReadOnly.ts","../src/generated/types/compressedProof.ts","../src/generated/types/compressedSettings.ts","../src/generated/types/compressedSettingsData.ts","../src/generated/types/configAction.ts","../src/generated/types/createUserAccountArgs.ts","../src/generated/types/delegateOp.ts","../src/generated/types/editMemberArgs.ts","../src/generated/types/linkWalletArgs.ts","../src/generated/types/member.ts","../src/generated/types/memberKey.ts","../src/generated/types/packedAddressTreeInfo.ts","../src/generated/types/packedStateTreeInfo.ts","../src/generated/types/permissions.ts","../src/generated/types/proofArgs.ts","../src/generated/types/removeMemberArgs.ts","../src/generated/types/secp256r1Pubkey.ts","../src/generated/types/secp256r1VerifyArgs.ts","../src/generated/types/secp256r1VerifyArgsWithDomainAddress.ts","../src/generated/types/settingsCreateOrMutateArgs.ts","../src/generated/types/settingsCreationArgs.ts","../src/generated/types/settingsMutArgs.ts","../src/generated/types/settingsReadonlyArgs.ts","../src/generated/types/transactionBufferCreateArgs.ts","../src/generated/types/transactionMessage.ts","../src/generated/types/transactionMessageAddressTableLookup.ts","../src/generated/types/user.ts","../src/generated/types/userCreationArgs.ts","../src/generated/types/userMutArgs.ts","../src/generated/types/userReadOnlyArgs.ts","../src/generated/types/userReadOnlyOrMutateArgs.ts","../src/generated/accounts/settings.ts","../src/generated/accounts/transactionBuffer.ts","../src/hooked/index.ts","../src/generated/shared/index.ts","../src/generated/instructions/changeConfig.ts","../src/generated/instructions/changeConfigCompressed.ts","../src/generated/instructions/compressSettingsAccount.ts","../src/generated/instructions/createDomainConfig.ts","../src/generated/instructions/createDomainUserAccount.ts","../src/generated/instructions/createGlobalCounter.ts","../src/generated/instructions/createMultiWallet.ts","../src/generated/instructions/createMultiWalletCompressed.ts","../src/generated/instructions/createUserAccounts.ts","../src/generated/instructions/decompressSettingsAccount.ts","../src/generated/instructions/disableDomainConfig.ts","../src/generated/instructions/editDomainConfig.ts","../src/generated/instructions/editTransactionManagerUrl.ts","../src/generated/instructions/migrateCompressedSettings.ts","../src/generated/instructions/migrateCompressedUsers.ts","../src/generated/instructions/nativeTransferIntent.ts","../src/generated/instructions/nativeTransferIntentCompressed.ts","../src/generated/instructions/tokenTransferIntent.ts","../src/generated/instructions/tokenTransferIntentCompressed.ts","../src/generated/instructions/transactionBufferClose.ts","../src/generated/instructions/transactionBufferCloseCompressed.ts","../src/generated/instructions/transactionBufferCreate.ts","../src/generated/instructions/transactionBufferCreateCompressed.ts","../src/generated/instructions/transactionBufferExecute.ts","../src/generated/instructions/transactionBufferExecuteCompressed.ts","../src/generated/instructions/transactionBufferExtend.ts","../src/generated/instructions/transactionBufferExtendCompressed.ts","../src/generated/instructions/transactionBufferVote.ts","../src/generated/instructions/transactionBufferVoteCompressed.ts","../src/generated/instructions/transactionExecute.ts","../src/generated/instructions/transactionExecuteCompressed.ts","../src/generated/instructions/transactionExecuteSync.ts","../src/generated/instructions/transactionExecuteSyncCompressed.ts","../src/generated/programs/multiWallet.ts","../src/generated/errors/multiWallet.ts","../src/types/keyType.ts","../src/types/permissions.ts","../src/types/secp256r1.ts","../src/types/vaultTransactionMessage.ts","../src/utils/consts.ts","../src/utils/addresses/index.ts","../src/utils/transaction/internal.ts","../src/utils/initialize.ts","../src/utils/compressed/packedAccounts.ts","../src/utils/compressed/internal.ts","../src/utils/compressed/helper.ts","../src/utils/passkeys/internal.ts","../src/utils/passkeys/helper.ts","../src/utils/transaction/helper.ts","../src/instructions/changeConfig.ts","../src/instructions/secp256r1Verify.ts","../src/instructions/compressSettingsAccount.ts","../src/instructions/configuration/createDomainConfig.ts","../src/instructions/configuration/createDomainUserAccounts.ts","../src/instructions/configuration/createGlobalCounter.ts","../src/instructions/configuration/createUserAccounts.ts","../src/instructions/configuration/disableDomainConfig.ts","../src/instructions/configuration/editDomainConfig.ts","../src/instructions/configuration/editTransactionManagerUrl.ts","../src/instructions/createWallet.ts","../src/instructions/decompressSettingsAccount.ts","../src/utils/transactionMessage/internal.ts","../src/instructions/executeTransaction.ts","../src/instructions/executeTransactionSync.ts","../src/instructions/intents/nativeTransferIntent.ts","../src/instructions/intents/tokenTransferIntent.ts","../src/instructions/transactionBuffers/closeTransactionBuffer.ts","../src/instructions/transactionBuffers/createTransactionBuffer.ts","../src/instructions/transactionBuffers/executeTransactionBuffer.ts","../src/instructions/transactionBuffers/extendTransactionBuffer.ts","../src/instructions/transactionBuffers/voteTransactionBuffer.ts","../src/passkeys/signMessage.ts","../src/passkeys/signTransaction.ts","../src/passkeys/verifyMessage.ts","../src/transaction/prepareTransactionBundle.ts","../src/utils/transactionMessage/compiled-keys.ts","../src/utils/transactionMessage/message-account-keys.ts","../src/utils/transactionMessage/compileToWrappedMessageV0.ts","../src/transaction/prepareTransactionMessage.ts","../src/transaction/prepareTransactionSync.ts"],"names":["DOMAIN_CONFIG_DISCRIMINATOR","getDomainConfigDiscriminatorBytes","fixEncoderSize","getBytesEncoder","getDomainConfigEncoder","transformEncoder","getStructEncoder","getU16Encoder","getAddressEncoder","getU8Encoder","value","getDomainConfigDecoder","getStructDecoder","fixDecoderSize","getBytesDecoder","getU16Decoder","getAddressDecoder","getU8Decoder","getDomainConfigCodec","combineCodec","decodeDomainConfig","encodedAccount","decodeAccount","fetchDomainConfig","rpc","address","config","maybeAccount","fetchMaybeDomainConfig","assertAccountExists","fetchEncodedAccount","fetchAllDomainConfig","addresses","maybeAccounts","fetchAllMaybeDomainConfig","assertAccountsExist","fetchEncodedAccounts","getDomainConfigSize","GLOBAL_COUNTER_DISCRIMINATOR","getGlobalCounterDiscriminatorBytes","getGlobalCounterEncoder","getU128Encoder","getGlobalCounterDecoder","getU128Decoder","getGlobalCounterCodec","decodeGlobalCounter","fetchGlobalCounter","fetchMaybeGlobalCounter","fetchAllGlobalCounter","fetchAllMaybeGlobalCounter","getGlobalCounterSize","getAddMemberArgsEncoder","getMemberEncoder","getOptionEncoder","getSecp256r1VerifyArgsEncoder","getUserReadOnlyOrMutateArgsEncoder","getBooleanEncoder","getAddMemberArgsDecoder","getMemberDecoder","getOptionDecoder","getSecp256r1VerifyArgsDecoder","getUserReadOnlyOrMutateArgsDecoder","getBooleanDecoder","getAddMemberArgsCodec","getCompiledInstructionEncoder","addEncoderSizePrefix","getU32Encoder","getCompiledInstructionDecoder","addDecoderSizePrefix","getU32Decoder","getCompiledInstructionCodec","getCompressedAccountMetaEncoder","getPackedStateTreeInfoEncoder","getCompressedAccountMetaDecoder","getPackedStateTreeInfoDecoder","getCompressedAccountMetaCodec","getCompressedAccountMetaReadOnlyEncoder","getCompressedAccountMetaReadOnlyDecoder","getCompressedAccountMetaReadOnlyCodec","getCompressedProofEncoder","getCompressedProofDecoder","getCompressedProofCodec","getCompressedSettingsEncoder","getCompressedSettingsDataEncoder","getCompressedSettingsDecoder","getCompressedSettingsDataDecoder","getCompressedSettingsCodec","getArrayEncoder","getArrayDecoder","getCompressedSettingsDataCodec","getConfigActionEncoder","getDiscriminatedUnionEncoder","getTupleEncoder","getEditMemberArgsEncoder","getRemoveMemberArgsEncoder","getConfigActionDecoder","getDiscriminatedUnionDecoder","getTupleDecoder","getEditMemberArgsDecoder","getRemoveMemberArgsDecoder","getConfigActionCodec","configAction","kind","data","isConfigAction","getCreateUserAccountArgsEncoder","getUtf8Encoder","getUserCreationArgsEncoder","getCreateUserAccountArgsDecoder","getUtf8Decoder","getUserCreationArgsDecoder","getCreateUserAccountArgsCodec","DelegateOp","getDelegateOpEncoder","getEnumEncoder","getDelegateOpDecoder","getEnumDecoder","getDelegateOpCodec","getMemberKeyEncoder","getPermissionsEncoder","getUserMutArgsEncoder","getMemberKeyDecoder","getPermissionsDecoder","getUserMutArgsDecoder","getEditMemberArgsCodec","getLinkWalletArgsEncoder","getSettingsMutArgsEncoder","getLinkWalletArgsDecoder","getSettingsMutArgsDecoder","getLinkWalletArgsCodec","getMemberCodec","getMemberKeyCodec","getPackedAddressTreeInfoEncoder","getPackedAddressTreeInfoDecoder","getPackedAddressTreeInfoCodec","getPackedStateTreeInfoCodec","getPermissionsCodec","getProofArgsEncoder","getProofArgsDecoder","getProofArgsCodec","getRemoveMemberArgsCodec","getSecp256r1PubkeyEncoder","getSecp256r1PubkeyDecoder","getSecp256r1PubkeyCodec","getU64Encoder","getU64Decoder","getSecp256r1VerifyArgsCodec","getSecp256r1VerifyArgsWithDomainAddressEncoder","getSecp256r1VerifyArgsWithDomainAddressDecoder","getSecp256r1VerifyArgsWithDomainAddressCodec","getSettingsCreateOrMutateArgsEncoder","getSettingsCreationArgsEncoder","getSettingsCreateOrMutateArgsDecoder","getSettingsCreationArgsDecoder","getSettingsCreateOrMutateArgsCodec","settingsCreateOrMutateArgs","isSettingsCreateOrMutateArgs","getSettingsCreationArgsCodec","getSettingsMutArgsCodec","getSettingsReadonlyArgsEncoder","getSettingsReadonlyArgsDecoder","getSettingsReadonlyArgsCodec","getTransactionBufferCreateArgsEncoder","getTransactionBufferCreateArgsDecoder","getTransactionBufferCreateArgsCodec","getTransactionMessageEncoder","getTransactionMessageAddressTableLookupEncoder","getTransactionMessageDecoder","getTransactionMessageAddressTableLookupDecoder","getTransactionMessageCodec","getTransactionMessageAddressTableLookupCodec","getUserEncoder","getUserDecoder","getUserCodec","getUserCreationArgsCodec","getUserMutArgsCodec","getUserReadOnlyArgsEncoder","getUserReadOnlyArgsDecoder","getUserReadOnlyArgsCodec","getUserReadOnlyOrMutateArgsCodec","userReadOnlyOrMutateArgs","isUserReadOnlyOrMutateArgs","SETTINGS_DISCRIMINATOR","getSettingsDiscriminatorBytes","getSettingsEncoder","getSettingsDecoder","getSettingsCodec","decodeSettings","fetchSettings","fetchMaybeSettings","fetchAllSettings","fetchAllMaybeSettings","getSettingsSize","TRANSACTION_BUFFER_DISCRIMINATOR","getTransactionBufferDiscriminatorBytes","getTransactionBufferEncoder","getTransactionBufferDecoder","getTransactionBufferCodec","decodeTransactionBuffer","fetchTransactionBuffer","fetchMaybeTransactionBuffer","fetchAllTransactionBuffer","fetchAllMaybeTransactionBuffer","parseRemainingAccounts","args","remainingAccounts","x","expectSome","expectAddress","getAccountMetaFactory","programAddress","optionalAccountStrategy","account","AccountRole","writableRole","isTransactionSigner","upgradeRoleToSigner","kitIsTransactionSigner","CHANGE_CONFIG_DISCRIMINATOR","getChangeConfigDiscriminatorBytes","getChangeConfigInstructionDataEncoder","getChangeConfigInstructionDataDecoder","getChangeConfigInstructionDataCodec","getChangeConfigInstructionAsync","input","MULTI_WALLET_PROGRAM_ADDRESS","accounts","resolverScope","getProgramDerivedAddress","getAccountMeta","getChangeConfigInstruction","parseChangeConfigInstruction","instruction","accountIndex","getNextAccount","accountMeta","getNextOptionalAccount","CHANGE_CONFIG_COMPRESSED_DISCRIMINATOR","getChangeConfigCompressedDiscriminatorBytes","getChangeConfigCompressedInstructionDataEncoder","getChangeConfigCompressedInstructionDataDecoder","getChangeConfigCompressedInstructionDataCodec","getChangeConfigCompressedInstruction","parseChangeConfigCompressedInstruction","COMPRESS_SETTINGS_ACCOUNT_DISCRIMINATOR","getCompressSettingsAccountDiscriminatorBytes","getCompressSettingsAccountInstructionDataEncoder","getCompressSettingsAccountInstructionDataDecoder","getCompressSettingsAccountInstructionDataCodec","getCompressSettingsAccountInstruction","parseCompressSettingsAccountInstruction","CREATE_DOMAIN_CONFIG_DISCRIMINATOR","getCreateDomainConfigDiscriminatorBytes","getCreateDomainConfigInstructionDataEncoder","getCreateDomainConfigInstructionDataDecoder","getCreateDomainConfigInstructionDataCodec","getCreateDomainConfigInstruction","parseCreateDomainConfigInstruction","CREATE_DOMAIN_USER_ACCOUNT_DISCRIMINATOR","getCreateDomainUserAccountDiscriminatorBytes","getCreateDomainUserAccountInstructionDataEncoder","getCreateDomainUserAccountInstructionDataDecoder","getCreateDomainUserAccountInstructionDataCodec","getCreateDomainUserAccountInstruction","parseCreateDomainUserAccountInstruction","CREATE_GLOBAL_COUNTER_DISCRIMINATOR","getCreateGlobalCounterDiscriminatorBytes","getCreateGlobalCounterInstructionDataEncoder","getCreateGlobalCounterInstructionDataDecoder","getCreateGlobalCounterInstructionDataCodec","getCreateGlobalCounterInstructionAsync","getCreateGlobalCounterInstruction","parseCreateGlobalCounterInstruction","CREATE_MULTI_WALLET_DISCRIMINATOR","getCreateMultiWalletDiscriminatorBytes","getCreateMultiWalletInstructionDataEncoder","getCreateMultiWalletInstructionDataDecoder","getCreateMultiWalletInstructionDataCodec","getCreateMultiWalletInstructionAsync","getCreateMultiWalletInstruction","parseCreateMultiWalletInstruction","CREATE_MULTI_WALLET_COMPRESSED_DISCRIMINATOR","getCreateMultiWalletCompressedDiscriminatorBytes","getCreateMultiWalletCompressedInstructionDataEncoder","getCreateMultiWalletCompressedInstructionDataDecoder","getCreateMultiWalletCompressedInstructionDataCodec","getCreateMultiWalletCompressedInstruction","parseCreateMultiWalletCompressedInstruction","CREATE_USER_ACCOUNTS_DISCRIMINATOR","getCreateUserAccountsDiscriminatorBytes","getCreateUserAccountsInstructionDataEncoder","getCreateUserAccountsInstructionDataDecoder","getCreateUserAccountsInstructionDataCodec","getCreateUserAccountsInstruction","parseCreateUserAccountsInstruction","DECOMPRESS_SETTINGS_ACCOUNT_DISCRIMINATOR","getDecompressSettingsAccountDiscriminatorBytes","getDecompressSettingsAccountInstructionDataEncoder","getDecompressSettingsAccountInstructionDataDecoder","getDecompressSettingsAccountInstructionDataCodec","getDecompressSettingsAccountInstruction","parseDecompressSettingsAccountInstruction","DISABLE_DOMAIN_CONFIG_DISCRIMINATOR","getDisableDomainConfigDiscriminatorBytes","getDisableDomainConfigInstructionDataEncoder","getDisableDomainConfigInstructionDataDecoder","getDisableDomainConfigInstructionDataCodec","getDisableDomainConfigInstruction","parseDisableDomainConfigInstruction","EDIT_DOMAIN_CONFIG_DISCRIMINATOR","getEditDomainConfigDiscriminatorBytes","getEditDomainConfigInstructionDataEncoder","getEditDomainConfigInstructionDataDecoder","getEditDomainConfigInstructionDataCodec","getEditDomainConfigInstruction","parseEditDomainConfigInstruction","EDIT_TRANSACTION_MANAGER_URL_DISCRIMINATOR","getEditTransactionManagerUrlDiscriminatorBytes","getEditTransactionManagerUrlInstructionDataEncoder","getEditTransactionManagerUrlInstructionDataDecoder","getEditTransactionManagerUrlInstructionDataCodec","getEditTransactionManagerUrlInstruction","parseEditTransactionManagerUrlInstruction","MIGRATE_COMPRESSED_SETTINGS_DISCRIMINATOR","getMigrateCompressedSettingsDiscriminatorBytes","getMigrateCompressedSettingsInstructionDataEncoder","getMigrateCompressedSettingsInstructionDataDecoder","getMigrateCompressedSettingsInstructionDataCodec","getMigrateCompressedSettingsInstruction","parseMigrateCompressedSettingsInstruction","MIGRATE_COMPRESSED_USERS_DISCRIMINATOR","getMigrateCompressedUsersDiscriminatorBytes","getMigrateCompressedUsersInstructionDataEncoder","getMigrateCompressedUsersInstructionDataDecoder","getMigrateCompressedUsersInstructionDataCodec","getMigrateCompressedUsersInstruction","parseMigrateCompressedUsersInstruction","NATIVE_TRANSFER_INTENT_DISCRIMINATOR","getNativeTransferIntentDiscriminatorBytes","getNativeTransferIntentInstructionDataEncoder","getNativeTransferIntentInstructionDataDecoder","getNativeTransferIntentInstructionDataCodec","getNativeTransferIntentInstructionAsync","getNativeTransferIntentInstruction","parseNativeTransferIntentInstruction","NATIVE_TRANSFER_INTENT_COMPRESSED_DISCRIMINATOR","getNativeTransferIntentCompressedDiscriminatorBytes","getNativeTransferIntentCompressedInstructionDataEncoder","getNativeTransferIntentCompressedInstructionDataDecoder","getNativeTransferIntentCompressedInstructionDataCodec","getNativeTransferIntentCompressedInstruction","parseNativeTransferIntentCompressedInstruction","TOKEN_TRANSFER_INTENT_DISCRIMINATOR","getTokenTransferIntentDiscriminatorBytes","getTokenTransferIntentInstructionDataEncoder","getTokenTransferIntentInstructionDataDecoder","getTokenTransferIntentInstructionDataCodec","getTokenTransferIntentInstructionAsync","getTokenTransferIntentInstruction","parseTokenTransferIntentInstruction","TOKEN_TRANSFER_INTENT_COMPRESSED_DISCRIMINATOR","getTokenTransferIntentCompressedDiscriminatorBytes","getTokenTransferIntentCompressedInstructionDataEncoder","getTokenTransferIntentCompressedInstructionDataDecoder","getTokenTransferIntentCompressedInstructionDataCodec","getTokenTransferIntentCompressedInstructionAsync","getTokenTransferIntentCompressedInstruction","parseTokenTransferIntentCompressedInstruction","TRANSACTION_BUFFER_CLOSE_DISCRIMINATOR","getTransactionBufferCloseDiscriminatorBytes","getTransactionBufferCloseInstructionDataEncoder","getTransactionBufferCloseInstructionDataDecoder","getTransactionBufferCloseInstructionDataCodec","getTransactionBufferCloseInstruction","parseTransactionBufferCloseInstruction","TRANSACTION_BUFFER_CLOSE_COMPRESSED_DISCRIMINATOR","getTransactionBufferCloseCompressedDiscriminatorBytes","getTransactionBufferCloseCompressedInstructionDataEncoder","getTransactionBufferCloseCompressedInstructionDataDecoder","getTransactionBufferCloseCompressedInstructionDataCodec","getTransactionBufferCloseCompressedInstruction","parseTransactionBufferCloseCompressedInstruction","TRANSACTION_BUFFER_CREATE_DISCRIMINATOR","getTransactionBufferCreateDiscriminatorBytes","getTransactionBufferCreateInstructionDataEncoder","getTransactionBufferCreateInstructionDataDecoder","getTransactionBufferCreateInstructionDataCodec","getTransactionBufferCreateInstruction","parseTransactionBufferCreateInstruction","TRANSACTION_BUFFER_CREATE_COMPRESSED_DISCRIMINATOR","getTransactionBufferCreateCompressedDiscriminatorBytes","getTransactionBufferCreateCompressedInstructionDataEncoder","getTransactionBufferCreateCompressedInstructionDataDecoder","getTransactionBufferCreateCompressedInstructionDataCodec","getTransactionBufferCreateCompressedInstruction","parseTransactionBufferCreateCompressedInstruction","TRANSACTION_BUFFER_EXECUTE_DISCRIMINATOR","getTransactionBufferExecuteDiscriminatorBytes","getTransactionBufferExecuteInstructionDataEncoder","getTransactionBufferExecuteInstructionDataDecoder","getTransactionBufferExecuteInstructionDataCodec","getTransactionBufferExecuteInstruction","parseTransactionBufferExecuteInstruction","TRANSACTION_BUFFER_EXECUTE_COMPRESSED_DISCRIMINATOR","getTransactionBufferExecuteCompressedDiscriminatorBytes","getTransactionBufferExecuteCompressedInstructionDataEncoder","getTransactionBufferExecuteCompressedInstructionDataDecoder","getTransactionBufferExecuteCompressedInstructionDataCodec","getTransactionBufferExecuteCompressedInstruction","parseTransactionBufferExecuteCompressedInstruction","TRANSACTION_BUFFER_EXTEND_DISCRIMINATOR","getTransactionBufferExtendDiscriminatorBytes","getTransactionBufferExtendInstructionDataEncoder","getTransactionBufferExtendInstructionDataDecoder","getTransactionBufferExtendInstructionDataCodec","getTransactionBufferExtendInstruction","parseTransactionBufferExtendInstruction","TRANSACTION_BUFFER_EXTEND_COMPRESSED_DISCRIMINATOR","getTransactionBufferExtendCompressedDiscriminatorBytes","getTransactionBufferExtendCompressedInstructionDataEncoder","getTransactionBufferExtendCompressedInstructionDataDecoder","getTransactionBufferExtendCompressedInstructionDataCodec","getTransactionBufferExtendCompressedInstruction","parseTransactionBufferExtendCompressedInstruction","TRANSACTION_BUFFER_VOTE_DISCRIMINATOR","getTransactionBufferVoteDiscriminatorBytes","getTransactionBufferVoteInstructionDataEncoder","getTransactionBufferVoteInstructionDataDecoder","getTransactionBufferVoteInstructionDataCodec","getTransactionBufferVoteInstruction","parseTransactionBufferVoteInstruction","TRANSACTION_BUFFER_VOTE_COMPRESSED_DISCRIMINATOR","getTransactionBufferVoteCompressedDiscriminatorBytes","getTransactionBufferVoteCompressedInstructionDataEncoder","getTransactionBufferVoteCompressedInstructionDataDecoder","getTransactionBufferVoteCompressedInstructionDataCodec","getTransactionBufferVoteCompressedInstruction","parseTransactionBufferVoteCompressedInstruction","TRANSACTION_EXECUTE_DISCRIMINATOR","getTransactionExecuteDiscriminatorBytes","getTransactionExecuteInstructionDataEncoder","getTransactionExecuteInstructionDataDecoder","getTransactionExecuteInstructionDataCodec","getTransactionExecuteInstruction","parseTransactionExecuteInstruction","TRANSACTION_EXECUTE_COMPRESSED_DISCRIMINATOR","getTransactionExecuteCompressedDiscriminatorBytes","getTransactionExecuteCompressedInstructionDataEncoder","getTransactionExecuteCompressedInstructionDataDecoder","getTransactionExecuteCompressedInstructionDataCodec","getTransactionExecuteCompressedInstruction","parseTransactionExecuteCompressedInstruction","TRANSACTION_EXECUTE_SYNC_DISCRIMINATOR","getTransactionExecuteSyncDiscriminatorBytes","getTransactionExecuteSyncInstructionDataEncoder","getTransactionExecuteSyncInstructionDataDecoder","getTransactionExecuteSyncInstructionDataCodec","getTransactionExecuteSyncInstruction","parseTransactionExecuteSyncInstruction","TRANSACTION_EXECUTE_SYNC_COMPRESSED_DISCRIMINATOR","getTransactionExecuteSyncCompressedDiscriminatorBytes","getTransactionExecuteSyncCompressedInstructionDataEncoder","getTransactionExecuteSyncCompressedInstructionDataDecoder","getTransactionExecuteSyncCompressedInstructionDataCodec","getTransactionExecuteSyncCompressedInstruction","parseTransactionExecuteSyncCompressedInstruction","MultiWalletAccount","identifyMultiWalletAccount","containsBytes","MultiWalletInstruction","identifyMultiWalletInstruction","MULTI_WALLET_ERROR__INVALID_SIGNED_MESSAGE","MULTI_WALLET_ERROR__INVALID_SECP256R1_VERIFY_ARG","MULTI_WALLET_ERROR__DURABLE_NONCE_DETECTED","MULTI_WALLET_ERROR__DUPLICATE_MEMBER","MULTI_WALLET_ERROR__PERMANENT_MEMBER","MULTI_WALLET_ERROR__PERMANENT_MEMBER_NOT_ALLOWED","MULTI_WALLET_ERROR__ONLY_ONE_PERMANENT_MEMBER_ALLOWED","MULTI_WALLET_ERROR__ONLY_ONE_TRANSACTION_MANAGER_ALLOWED","MULTI_WALLET_ERROR__TRANSACTION_MANAGER_NOT_ALLOWED","MULTI_WALLET_ERROR__EMPTY_MEMBERS","MULTI_WALLET_ERROR__TOO_MANY_MEMBERS","MULTI_WALLET_ERROR__INVALID_THRESHOLD","MULTI_WALLET_ERROR__INVALID_TRANSACTION_MESSAGE","MULTI_WALLET_ERROR__INVALID_NUMBER_OF_ACCOUNTS","MULTI_WALLET_ERROR__INVALID_ACCOUNT","MULTI_WALLET_ERROR__INVALID_ARGUMENTS","MULTI_WALLET_ERROR__MISSING_ACCOUNT","MULTI_WALLET_ERROR__MISSING_USER_ARGS","MULTI_WALLET_ERROR__ALREADY_DELEGATED","MULTI_WALLET_ERROR__INSUFFICIENT_SIGNER_WITH_EXECUTE_PERMISSION","MULTI_WALLET_ERROR__INSUFFICIENT_SIGNER_WITH_INITIATE_PERMISSION","MULTI_WALLET_ERROR__INSUFFICIENT_SIGNERS_WITH_VOTE_PERMISSION","MULTI_WALLET_ERROR__NO_SIGNER_FOUND","MULTI_WALLET_ERROR__UNAUTHORISED_TO_CLOSE_TRANSACTION_BUFFER","MULTI_WALLET_ERROR__INVALID_BUFFER","MULTI_WALLET_ERROR__FINAL_BUFFER_HASH_MISMATCH","MULTI_WALLET_ERROR__FINAL_BUFFER_SIZE_EXCEEDED","MULTI_WALLET_ERROR__FINAL_BUFFER_SIZE_MISMATCH","MULTI_WALLET_ERROR__TRANSACTION_HAS_EXPIRED","MULTI_WALLET_ERROR__TRANSACTION_NOT_APPROVED","MULTI_WALLET_ERROR__PROTECTED_ACCOUNT","MULTI_WALLET_ERROR__MAX_LENGTH_EXCEEDED","MULTI_WALLET_ERROR__MISSING_SYSVAR_SLOT_HISTORY","MULTI_WALLET_ERROR__INVALID_SYSVAR_DATA_FORMAT","MULTI_WALLET_ERROR__SLOT_NUMBER_NOT_FOUND","MULTI_WALLET_ERROR__DOMAIN_CONFIG_IS_DISABLED","MULTI_WALLET_ERROR__DOMAIN_CONFIG_IS_MISSING","MULTI_WALLET_ERROR__MEMBER_DOES_NOT_BELONG_TO_DOMAIN_CONFIG","MULTI_WALLET_ERROR__RP_ID_HASH_MISMATCH","MULTI_WALLET_ERROR__ORIGIN_INDEX_OUT_OF_BOUNDS","multiWalletErrorMessages","getMultiWalletErrorMessage","code","isMultiWalletError","error","transactionMessage","isProgramError","KeyType","Permission","PermanentMemberPermission","TransactionManagerPermission","Permissions","_Permissions","mask","permissions","permission","SECP256R1_PUBLIC_KEY_LENGTH","Secp256r1Key","getBase58Encoder","key","getBase58Decoder","buf","SignedSecp256r1Key","signed","getStructCodec","getU8Codec","getArrayCodec","getMessageAddressTableLookupCodec","getAddressCodec","vaultTransactionMessageCodec","vaultTransactionMessageSerialize","compiledMessage","ix","vaultTransactionMessageDeserialize","transactionMessageBytes","vaultTransactionMessage","featureFlags","VERSION","ADDRESS_TREE_VERSION","REVIBASE_RP_ID","REVIBASE_AUTH_ENDPOINT","REVIBASE_API_ENDPOINT","getCompressedSettingsAddressFromIndex","index","addressSeed","deriveAddressSeedV2","addressTree","PublicKey","batchAddressTree","createBN254","deriveAddressV2","getUserAccountAddress","member","getDomainConfigAddress","rpIdHash","rpId","sha256","domainConfig","getGlobalCounterAddress","globalCounter","getTransactionBufferAddress","settings","creator","buffer_index","transactionBuffer","getWalletAddressFromSettings","getSettingsFromIndex","getWalletAddressFromIndex","getLightCpiSigner","lightCpiSigner","createEncodedBundle","bundle","isSimulate","latestBlockHash","getBlockhashDecoder","getSolanaRpc","pipe","createTransactionMessage","tx","appendTransactionMessageInstructions","setTransactionMessageFeePayerSigner","setTransactionMessageLifetimeUsingBlockhash","compressTransactionMessageUsingAddressLookupTables","computeUnits","prependTransactionMessageInstructions","getSetComputeUnitLimitInstruction","compileTransaction","signTransactionMessageWithSigners","getMedianPriorityFees","connection","fees","f","a","b","mid","simulateBundle","connectionUrl","i","response","result","TransactionFailure","programError","extractSecp256r1VerificationArgs","signer","secp256r1PublicKey","verifyArgs","some","signature","message","publicKey","getDeduplicatedSigners","signers","getPubkeyString","pubkey","hashSet","dedupSigners","addJitoTip","payer","tipAmount","JITO_TIP_ACCOUNTS","tipAccount","getTransferSolInstruction","getRandomPayer","payerEndpoint","randomPayer","transactions","payload","getBase64Decoder","getTransactionEncoder","sig","globalSolanaRpcEndpoint","lightProtocolRpc","globalSolanaRpc","globalSendAndConfirmTransaction","globalComputeBudgetEstimate","globalFeePayer","globalApiEndpoint","globalJitoTipsConfig","globalAuthEndpoint","globalAuthorizedClient","globalAdditionalInfo","getSolanaRpcEndpoint","getLightProtocolRpc","getSendAndConfirmTransaction","getComputeBudgetEstimate","getFeePayer","getJitoTipsConfig","getAuthEndpoint","getGlobalAuthorizedClient","getGlobalAdditonalInfo","uninitialize","initialize","rpcEndpoint","proverEndpoint","compressionApiEndpoint","jitoTipsConfig","apiEndpoint","authEndpoint","authorizedClient","additionalInfo","createRpc","sendAndConfirmTransaction","createSolanaClient","estimateComputeUnitLimitFactory","PackedAccounts","isSigner","isWritable","getLightSystemAccountMetasV2","role","outputStateTreeInfo","TreeType","stateTreeInfos","selectStateTreeInfo","accountProofInputs","newAddressProofInputs","addressTreeInfos","merkleTreePubkeyIndex","queuePubkeyIndex","treeToUse","addressMerkleTreePubkeyIndex","addressQueuePubkeyIndex","systemAccountsStartOffset","packedAccountsStartOffset","packedAccounts","systemOffset","packedOffset","getCompressedAccount","cachedAccounts","compressedAccount","getCompressedAccountHashes","filtered","convertToCompressedProofArgs","validityProof","offset","getCompressedAccountInitArgs","treeInfos","roots","rootIndices","newAddresses","addressTrees","outputStateTreeIndex","addressWithTree","getCompressedAccountMutArgs","leafIndices","proveByIndices","hashes","decoder","stateTreeInfo","constructSettingsProofArgs","compressed","simulateProof","settingsReadonlyArgs","proof","getValidityProofWithRetry","retry","delay","attempt","resolve","fetchUserAccountData","fetchMaybeUserAccountData","fetchSettingsAccountData","settingsData","fetchMaybeSettingsAccountData","activeMessageHandler","HEARTBEAT_INTERVAL","TIMEOUT_BUFFER","DEFAULT_TIMEOUT","openAuthUrl","authUrl","popUp","reject","origin","heartbeatTimeout","closeCheckInterval","cleanUp","globalTimeout","log","createPopUp","messageReceivedHandler","event","isSameOrigin","isSameWindow","bufferToBase64URLString","buffer","str","charCode","base64URLStringToBuffer","base64URLString","base64","padLength","padded","binary","bytes","uint8ArrayToHex","hexToUint8Array","hex","extractAdditionalFields","clientData","knownKeys","remaining","serialized","parseOrigins","originsBytes","numOrigins","origins","cursor","strLen","strBytes","convertSignatureDERtoRS","totalLength","lengthBytes","rLen","rStart","r","sLen","sStart","s","rStripped","sStripped","rPad","HALF_ORDER","p256","sBig","sHex","sPad","url","screenWidth","screenHeight","isMobile","width","height","top","left","currentScreenLeft","currentScreenTop","features","passKeyPopup","convertPubkeyCoseToCompressed","decodedPublicKey","decodeCBOR","uncompressedPublicKey","convertPubkeyCompressedToCose","coseDecodedPublicKey","encodeCBOR","getSignedSecp256r1Key","originIndex","crossOrigin","authenticatorData","clientDataJSON","authData","clientDataJsonParsed","truncatedClientDataJson","convertedSignature","getOriginIndex","signAndSendBundledTransactions","simulationBundle","getBase64EncodedWireTransaction","encodedBundle","sendJitoBundle","signAndSendTransaction","instructions","addressesByLookupTableAddress","estimatedUnits","priorityFees","getSetComputeUnitPriceInstruction","getSignatureFromTransaction","serializedTransactions","maxRetries","delayMs","jitoBlockEngineUrl","pollJitoBundleConfirmation","bundleId","results","resolveTransactionManagerSigner","m","convertMemberKeyToString","hasInitiate","hasVote","hasExecute","transactionManager","transactionManagerAddress","userAccountData","createTransactionManagerSigner","memberKey","changeConfig","configActionsArgs","authority","addDelegates","removeDelegates","action","settingsMutArgs","userMutArgs","hashesWithTree","settingsHashes","userHashes","secp256r1VerifyInput","configActions","field","userArgs","getUserArgs","convertAddMember","convertRemoveMember","permanentMember","isPermanentMember","convertEditMember","compressedProofArgs","createNoopSigner","arg","BN","permissionArgs","delegateOperation","convertPermissions","convertPubkeyToMemberkey","none","setAsDelegate","isTransactionManager","getAddMemberPermission","p","perms","COMPRESSED_PUBKEY_SERIALIZED_SIZE","SIGNATURE_SERIALIZED_SIZE","SIGNATURE_OFFSETS_SERIALIZED_SIZE","SIGNATURE_OFFSETS_START","SECP256R1_PROGRAM_ADDRESS","getSecp256r1SignatureOffsetsDataEncoder","getSecp256r1SignatureOffsetsDataDecoder","getSecp256r1VerifyInstructionDataDecoder","createDecoder","numSignatures","padding","offsets","offsetDecoder","messageSize","getSecp256r1VerifyInstructionDataEncoder","createEncoder","offsetSize","payloadSize","sum","offsetEncoder","offsetEntry","entry","getSecp256r1VerifyInstructionDataCodec","getSecp256r1VerifyInstruction","currentOffset","publicKeyOffset","signatureOffset","messageDataOffset","parseSecp256r1VerifyInstruction","compressSettingsAccount","settingsAddress","settingsArg","newAddressParams","secp256r1Signers","secp256r1VerifyArgs","createDomainConfig","metadataUrl","adminDomainConfig","createDomainUserAccounts","createUserArgs","transactionManagerMutArgs","settingsHash","transactionManagerHash","userCreationArgs","createGlobalCounter","createUserAccounts","disableDomainConfig","admin","disable","editDomainConfig","newAuthority","newOrigins","newMetadataUrl","editTransactionManagerUrl","transactionManagerUrl","createWallet","initialMember","hashesWithTreeEndIndex","settingsCreationArgs","decompressSettingsAccount","getAccountRole","accountKey","vaultPda","isStaticWritableIndex","isSignerIndex","numAccountKeys","numSignerAccounts","numReadonlySignerAccounts","numReadonlyNonSignerAccounts","numWritableSigners","numWritableNonSigners","accountsForTransactionExecute","walletAddress","additionalSigners","addressLookupTableAccounts","fetchAddressesForLookupTables","accountMetas","lookup","lookupTableAccount","meta","executeTransaction","transactionBufferAddress","jitoBundlesTipAmount","executeTransactionSync","customTransactionMessage","parseTransactionMessage","y","nativeTransferIntent","destination","amount","tokenTransferIntent","mint","tokenProgram","sourceTokenAccount","destinationTokenAccount","getAssociatedTokenAccountAddress","closeTransactionBuffer","closer","createTransactionBuffer","bufferIndex","finalBufferHash","finalBufferSize","preauthorizeExecution","bufferExtendHashes","compressedArgs","executeTransactionBuffer","executor","extendTransactionBuffer","voteTransactionBuffer","voter","signMessageWithPasskey","authResponse","signTransactionWithPasskey","transactionActionType","transactionAddress","verifyMessage","expectedOrigin","verified","verifyAuthenticationResponse","prepareTransactionBundle","additionalVoters","chunkSize","chunks","chunksHash","chunk","createIxs","extendIxs","voteIxs","executeApprovalIxs","executeIxs","buildTx","CompiledKeys","_CompiledKeys","keyMetaMap","getOrInsertDefault","keyMeta","payerKeyMeta","mapEntries","writableSigners","readonlySigners","writableNonSigners","readonlyNonSigners","header","payerAddress","staticAccountKeys","lookupTableAddresses","writableIndexes","drainedWritableKeys","readonlyIndexes","drainedReadonlyKeys","lookupTableEntries","keyMetaFilter","lookupTableIndexes","drainedKeys","addressKey","lookupTableIndex","MessageAccountKeys","accountKeysFromLookups","keySegments","keySegment","keyIndexMap","findKeyIndex","keyIndex","compileToWrappedMessageV0","recentBlockhash","compiledKeys","addressTableLookups","lookupTableAccounts","lookupTable","extractResult","addressTableLookup","staticAccounts","compiledInstructions","prepareTransactionMessage","prepareTransactionSync"],"mappings":"kcAyCO,IAAMA,EAAAA,CAA8B,IAAI,UAAA,CAAW,CACxD,GAAA,CAAK,GAAA,CAAK,GAAA,CAAK,GAAA,CAAK,EAAA,CAAI,GAAA,CAAK,GAAA,CAAK,GACpC,CAAC,EAEM,SAASC,EAAAA,EAAoC,CAClD,OAAOC,mBAAAA,CAAeC,oBAAAA,EAAgB,CAAG,CAAC,CAAA,CAAE,OAC1CH,EACF,CACF,CA6BO,SAASI,EAAAA,EAA6D,CAC3E,OAAOC,qBAAAA,CACLC,qBAAAA,CAAiB,CACf,CAAC,eAAA,CAAiBJ,mBAAAA,CAAeC,oBAAAA,EAAgB,CAAG,CAAC,CAAC,CAAA,CACtD,CAAC,YAAA,CAAcI,kBAAAA,EAAe,CAAA,CAC9B,CAAC,WAAA,CAAaC,sBAAAA,EAAmB,CAAA,CACjC,CAAC,UAAA,CAAYN,mBAAAA,CAAeC,oBAAAA,EAAgB,CAAG,EAAE,CAAC,E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CACF,CAAC,CAAA,CAEH,OAAO,CACL,KAAA,CAAAtE,CAAAA,CACA,YAAA,CAAA2M,CAAAA,CACA,6BAAA,CAA+BqI,CACjC,CACF","file":"index.cjs","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 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 getU16Decoder,\n getU16Encoder,\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 \"gill\";\n\nexport const DOMAIN_CONFIG_DISCRIMINATOR = new Uint8Array([\n 201, 232, 212, 229, 59, 241, 106, 197,\n]);\n\nexport function getDomainConfigDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 8).encode(\n DOMAIN_CONFIG_DISCRIMINATOR\n );\n}\n\nexport type DomainConfig = {\n discriminator: ReadonlyUint8Array;\n numOrigins: number;\n authority: Address;\n rpIdHash: ReadonlyUint8Array;\n bump: number;\n isDisabled: number;\n rpIdLength: number;\n rpId: ReadonlyUint8Array;\n origins: ReadonlyUint8Array;\n metadataUrlLength: number;\n metadataUrl: ReadonlyUint8Array;\n};\n\nexport type DomainConfigArgs = {\n numOrigins: number;\n authority: Address;\n rpIdHash: ReadonlyUint8Array;\n bump: number;\n isDisabled: number;\n rpIdLength: number;\n rpId: ReadonlyUint8Array;\n origins: ReadonlyUint8Array;\n metadataUrlLength: number;\n metadataUrl: ReadonlyUint8Array;\n};\n\nexport function getDomainConfigEncoder(): FixedSizeEncoder<DomainConfigArgs> {\n return transformEncoder(\n getStructEncoder([\n [\"discriminator\", fixEncoderSize(getBytesEncoder(), 8)],\n [\"numOrigins\", getU16Encoder()],\n [\"authority\", getAddressEncoder()],\n [\"rpIdHash\", fixEncoderSize(getBytesEncoder(), 32)],\n [\"bump\", getU8Encoder()],\n [\"isDisabled\", getU8Encoder()],\n [\"rpIdLength\", getU8Encoder()],\n [\"rpId\", fixEncoderSize(getBytesEncoder(), 255)],\n [\"origins\", fixEncoderSize(getBytesEncoder(), 413)],\n [\"metadataUrlLength\", getU8Encoder()],\n [\"metadataUrl\", fixEncoderSize(getBytesEncoder(), 100)],\n ]),\n (value) => ({ ...value, discriminator: DOMAIN_CONFIG_DISCRIMINATOR })\n );\n}\n\nexport function getDomainConfigDecoder(): FixedSizeDecoder<DomainConfig> {\n return getStructDecoder([\n [\"discriminator\", fixDecoderSize(getBytesDecoder(), 8)],\n [\"numOrigins\", getU16Decoder()],\n [\"authority\", getAddressDecoder()],\n [\"rpIdHash\", fixDecoderSize(getBytesDecoder(), 32)],\n [\"bump\", getU8Decoder()],\n [\"isDisabled\", getU8Decoder()],\n [\"rpIdLength\", getU8Decoder()],\n [\"rpId\", fixDecoderSize(getBytesDecoder(), 255)],\n [\"origins\", fixDecoderSize(getBytesDecoder(), 413)],\n [\"metadataUrlLength\", getU8Decoder()],\n [\"metadataUrl\", fixDecoderSize(getBytesDecoder(), 100)],\n ]);\n}\n\nexport function getDomainConfigCodec(): FixedSizeCodec<\n DomainConfigArgs,\n DomainConfig\n> {\n return combineCodec(getDomainConfigEncoder(), getDomainConfigDecoder());\n}\n\nexport function decodeDomainConfig<TAddress extends string = string>(\n encodedAccount: EncodedAccount<TAddress>\n): Account<DomainConfig, TAddress>;\nexport function decodeDomainConfig<TAddress extends string = string>(\n encodedAccount: MaybeEncodedAccount<TAddress>\n): MaybeAccount<DomainConfig, TAddress>;\nexport function decodeDomainConfig<TAddress extends string = string>(\n encodedAccount: EncodedAccount<TAddress> | MaybeEncodedAccount<TAddress>\n): Account<DomainConfig, TAddress> | MaybeAccount<DomainConfig, TAddress> {\n return decodeAccount(\n encodedAccount as MaybeEncodedAccount<TAddress>,\n getDomainConfigDecoder()\n );\n}\n\nexport async function fetchDomainConfig<TAddress extends string = string>(\n rpc: Parameters<typeof fetchEncodedAccount>[0],\n address: Address<TAddress>,\n config?: FetchAccountConfig\n): Promise<Account<DomainConfig, TAddress>> {\n const maybeAccount = await fetchMaybeDomainConfig(rpc, address, config);\n assertAccountExists(maybeAccount);\n return maybeAccount;\n}\n\nexport async function fetchMaybeDomainConfig<TAddress extends string = string>(\n rpc: Parameters<typeof fetchEncodedAccount>[0],\n address: Address<TAddress>,\n config?: FetchAccountConfig\n): Promise<MaybeAccount<DomainConfig, TAddress>> {\n const maybeAccount = await fetchEncodedAccount(rpc, address, config);\n return decodeDomainConfig(maybeAccount);\n}\n\nexport async function fetchAllDomainConfig(\n rpc: Parameters<typeof fetchEncodedAccounts>[0],\n addresses: Array<Address>,\n config?: FetchAccountsConfig\n): Promise<Account<DomainConfig>[]> {\n const maybeAccounts = await fetchAllMaybeDomainConfig(rpc, addresses, config);\n assertAccountsExist(maybeAccounts);\n return maybeAccounts;\n}\n\nexport async function fetchAllMaybeDomainConfig(\n rpc: Parameters<typeof fetchEncodedAccounts>[0],\n addresses: Array<Address>,\n config?: FetchAccountsConfig\n): Promise<MaybeAccount<DomainConfig>[]> {\n const maybeAccounts = await fetchEncodedAccounts(rpc, addresses, config);\n return maybeAccounts.map((maybeAccount) => decodeDomainConfig(maybeAccount));\n}\n\nexport function getDomainConfigSize(): number {\n return 846;\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 getStructDecoder,\n getStructEncoder,\n getU128Decoder,\n getU128Encoder,\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 \"gill\";\n\nexport const GLOBAL_COUNTER_DISCRIMINATOR = new Uint8Array([\n 42, 206, 176, 58, 175, 129, 130, 233,\n]);\n\nexport function getGlobalCounterDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 8).encode(\n GLOBAL_COUNTER_DISCRIMINATOR\n );\n}\n\nexport type GlobalCounter = {\n discriminator: ReadonlyUint8Array;\n index: bigint;\n};\n\nexport type GlobalCounterArgs = { index: number | bigint };\n\nexport function getGlobalCounterEncoder(): FixedSizeEncoder<GlobalCounterArgs> {\n return transformEncoder(\n getStructEncoder([\n [\"discriminator\", fixEncoderSize(getBytesEncoder(), 8)],\n [\"index\", getU128Encoder()],\n ]),\n (value) => ({ ...value, discriminator: GLOBAL_COUNTER_DISCRIMINATOR })\n );\n}\n\nexport function getGlobalCounterDecoder(): FixedSizeDecoder<GlobalCounter> {\n return getStructDecoder([\n [\"discriminator\", fixDecoderSize(getBytesDecoder(), 8)],\n [\"index\", getU128Decoder()],\n ]);\n}\n\nexport function getGlobalCounterCodec(): FixedSizeCodec<\n GlobalCounterArgs,\n GlobalCounter\n> {\n return combineCodec(getGlobalCounterEncoder(), getGlobalCounterDecoder());\n}\n\nexport function decodeGlobalCounter<TAddress extends string = string>(\n encodedAccount: EncodedAccount<TAddress>\n): Account<GlobalCounter, TAddress>;\nexport function decodeGlobalCounter<TAddress extends string = string>(\n encodedAccount: MaybeEncodedAccount<TAddress>\n): MaybeAccount<GlobalCounter, TAddress>;\nexport function decodeGlobalCounter<TAddress extends string = string>(\n encodedAccount: EncodedAccount<TAddress> | MaybeEncodedAccount<TAddress>\n): Account<GlobalCounter, TAddress> | MaybeAccount<GlobalCounter, TAddress> {\n return decodeAccount(\n encodedAccount as MaybeEncodedAccount<TAddress>,\n getGlobalCounterDecoder()\n );\n}\n\nexport async function fetchGlobalCounter<TAddress extends string = string>(\n rpc: Parameters<typeof fetchEncodedAccount>[0],\n address: Address<TAddress>,\n config?: FetchAccountConfig\n): Promise<Account<GlobalCounter, TAddress>> {\n const maybeAccount = await fetchMaybeGlobalCounter(rpc, address, config);\n assertAccountExists(maybeAccount);\n return maybeAccount;\n}\n\nexport async function fetchMaybeGlobalCounter<TAddress extends string = string>(\n rpc: Parameters<typeof fetchEncodedAccount>[0],\n address: Address<TAddress>,\n config?: FetchAccountConfig\n): Promise<MaybeAccount<GlobalCounter, TAddress>> {\n const maybeAccount = await fetchEncodedAccount(rpc, address, config);\n return decodeGlobalCounter(maybeAccount);\n}\n\nexport async function fetchAllGlobalCounter(\n rpc: Parameters<typeof fetchEncodedAccounts>[0],\n addresses: Array<Address>,\n config?: FetchAccountsConfig\n): Promise<Account<GlobalCounter>[]> {\n const maybeAccounts = await fetchAllMaybeGlobalCounter(\n rpc,\n addresses,\n config\n );\n assertAccountsExist(maybeAccounts);\n return maybeAccounts;\n}\n\nexport async function fetchAllMaybeGlobalCounter(\n rpc: Parameters<typeof fetchEncodedAccounts>[0],\n addresses: Array<Address>,\n config?: FetchAccountsConfig\n): Promise<MaybeAccount<GlobalCounter>[]> {\n const maybeAccounts = await fetchEncodedAccounts(rpc, addresses, config);\n return maybeAccounts.map((maybeAccount) => decodeGlobalCounter(maybeAccount));\n}\n\nexport function getGlobalCounterSize(): number {\n return 24;\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 getBooleanDecoder,\n getBooleanEncoder,\n getOptionDecoder,\n getOptionEncoder,\n getStructDecoder,\n getStructEncoder,\n type Codec,\n type Decoder,\n type Encoder,\n type Option,\n type OptionOrNullable,\n} from \"gill\";\nimport {\n getMemberDecoder,\n getMemberEncoder,\n getSecp256r1VerifyArgsDecoder,\n getSecp256r1VerifyArgsEncoder,\n getUserReadOnlyOrMutateArgsDecoder,\n getUserReadOnlyOrMutateArgsEncoder,\n type Member,\n type MemberArgs,\n type Secp256r1VerifyArgs,\n type Secp256r1VerifyArgsArgs,\n type UserReadOnlyOrMutateArgs,\n type UserReadOnlyOrMutateArgsArgs,\n} from \".\";\n\nexport type AddMemberArgs = {\n member: Member;\n verifyArgs: Option<Secp256r1VerifyArgs>;\n userArgs: UserReadOnlyOrMutateArgs;\n setAsDelegate: boolean;\n};\n\nexport type AddMemberArgsArgs = {\n member: MemberArgs;\n verifyArgs: OptionOrNullable<Secp256r1VerifyArgsArgs>;\n userArgs: UserReadOnlyOrMutateArgsArgs;\n setAsDelegate: boolean;\n};\n\nexport function getAddMemberArgsEncoder(): Encoder<AddMemberArgsArgs> {\n return getStructEncoder([\n [\"member\", getMemberEncoder()],\n [\"verifyArgs\", getOptionEncoder(getSecp256r1VerifyArgsEncoder())],\n [\"userArgs\", getUserReadOnlyOrMutateArgsEncoder()],\n [\"setAsDelegate\", getBooleanEncoder()],\n ]);\n}\n\nexport function getAddMemberArgsDecoder(): Decoder<AddMemberArgs> {\n return getStructDecoder([\n [\"member\", getMemberDecoder()],\n [\"verifyArgs\", getOptionDecoder(getSecp256r1VerifyArgsDecoder())],\n [\"userArgs\", getUserReadOnlyOrMutateArgsDecoder()],\n [\"setAsDelegate\", getBooleanDecoder()],\n ]);\n}\n\nexport function getAddMemberArgsCodec(): Codec<\n AddMemberArgsArgs,\n AddMemberArgs\n> {\n return combineCodec(getAddMemberArgsEncoder(), getAddMemberArgsDecoder());\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 getBytesDecoder,\n getBytesEncoder,\n getStructDecoder,\n getStructEncoder,\n getU32Decoder,\n getU32Encoder,\n getU8Decoder,\n getU8Encoder,\n type Codec,\n type Decoder,\n type Encoder,\n type ReadonlyUint8Array,\n} from \"gill\";\n\nexport type CompiledInstruction = {\n programAddressIndex: number;\n accountIndices: ReadonlyUint8Array;\n data: ReadonlyUint8Array;\n};\n\nexport type CompiledInstructionArgs = CompiledInstruction;\n\nexport function getCompiledInstructionEncoder(): Encoder<CompiledInstructionArgs> {\n return getStructEncoder([\n [\"programAddressIndex\", getU8Encoder()],\n [\n \"accountIndices\",\n addEncoderSizePrefix(getBytesEncoder(), getU32Encoder()),\n ],\n [\"data\", addEncoderSizePrefix(getBytesEncoder(), getU32Encoder())],\n ]);\n}\n\nexport function getCompiledInstructionDecoder(): Decoder<CompiledInstruction> {\n return getStructDecoder([\n [\"programAddressIndex\", getU8Decoder()],\n [\n \"accountIndices\",\n addDecoderSizePrefix(getBytesDecoder(), getU32Decoder()),\n ],\n [\"data\", addDecoderSizePrefix(getBytesDecoder(), getU32Decoder())],\n ]);\n}\n\nexport function getCompiledInstructionCodec(): Codec<\n CompiledInstructionArgs,\n CompiledInstruction\n> {\n return combineCodec(\n getCompiledInstructionEncoder(),\n getCompiledInstructionDecoder()\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 getU8Decoder,\n getU8Encoder,\n type FixedSizeCodec,\n type FixedSizeDecoder,\n type FixedSizeEncoder,\n type ReadonlyUint8Array,\n} from \"gill\";\nimport {\n getPackedStateTreeInfoDecoder,\n getPackedStateTreeInfoEncoder,\n type PackedStateTreeInfo,\n type PackedStateTreeInfoArgs,\n} from \".\";\n\nexport type CompressedAccountMeta = {\n /** Merkle tree context. */\n treeInfo: PackedStateTreeInfo;\n /** Address. */\n address: ReadonlyUint8Array;\n /** Output merkle tree index. */\n outputStateTreeIndex: number;\n};\n\nexport type CompressedAccountMetaArgs = {\n /** Merkle tree context. */\n treeInfo: PackedStateTreeInfoArgs;\n /** Address. */\n address: ReadonlyUint8Array;\n /** Output merkle tree index. */\n outputStateTreeIndex: number;\n};\n\nexport function getCompressedAccountMetaEncoder(): FixedSizeEncoder<CompressedAccountMetaArgs> {\n return getStructEncoder([\n [\"treeInfo\", getPackedStateTreeInfoEncoder()],\n [\"address\", fixEncoderSize(getBytesEncoder(), 32)],\n [\"outputStateTreeIndex\", getU8Encoder()],\n ]);\n}\n\nexport function getCompressedAccountMetaDecoder(): FixedSizeDecoder<CompressedAccountMeta> {\n return getStructDecoder([\n [\"treeInfo\", getPackedStateTreeInfoDecoder()],\n [\"address\", fixDecoderSize(getBytesDecoder(), 32)],\n [\"outputStateTreeIndex\", getU8Decoder()],\n ]);\n}\n\nexport function getCompressedAccountMetaCodec(): FixedSizeCodec<\n CompressedAccountMetaArgs,\n CompressedAccountMeta\n> {\n return combineCodec(\n getCompressedAccountMetaEncoder(),\n getCompressedAccountMetaDecoder()\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 type FixedSizeCodec,\n type FixedSizeDecoder,\n type FixedSizeEncoder,\n type ReadonlyUint8Array,\n} from \"gill\";\nimport {\n getPackedStateTreeInfoDecoder,\n getPackedStateTreeInfoEncoder,\n type PackedStateTreeInfo,\n type PackedStateTreeInfoArgs,\n} from \".\";\n\nexport type CompressedAccountMetaReadOnly = {\n /** State Merkle tree context. */\n treeInfo: PackedStateTreeInfo;\n /** Address. */\n address: ReadonlyUint8Array;\n};\n\nexport type CompressedAccountMetaReadOnlyArgs = {\n /** State Merkle tree context. */\n treeInfo: PackedStateTreeInfoArgs;\n /** Address. */\n address: ReadonlyUint8Array;\n};\n\nexport function getCompressedAccountMetaReadOnlyEncoder(): FixedSizeEncoder<CompressedAccountMetaReadOnlyArgs> {\n return getStructEncoder([\n [\"treeInfo\", getPackedStateTreeInfoEncoder()],\n [\"address\", fixEncoderSize(getBytesEncoder(), 32)],\n ]);\n}\n\nexport function getCompressedAccountMetaReadOnlyDecoder(): FixedSizeDecoder<CompressedAccountMetaReadOnly> {\n return getStructDecoder([\n [\"treeInfo\", getPackedStateTreeInfoDecoder()],\n [\"address\", fixDecoderSize(getBytesDecoder(), 32)],\n ]);\n}\n\nexport function getCompressedAccountMetaReadOnlyCodec(): FixedSizeCodec<\n CompressedAccountMetaReadOnlyArgs,\n CompressedAccountMetaReadOnly\n> {\n return combineCodec(\n getCompressedAccountMetaReadOnlyEncoder(),\n getCompressedAccountMetaReadOnlyDecoder()\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 type FixedSizeCodec,\n type FixedSizeDecoder,\n type FixedSizeEncoder,\n type ReadonlyUint8Array,\n} from \"gill\";\n\nexport type CompressedProof = {\n a: ReadonlyUint8Array;\n b: ReadonlyUint8Array;\n c: ReadonlyUint8Array;\n};\n\nexport type CompressedProofArgs = CompressedProof;\n\nexport function getCompressedProofEncoder(): FixedSizeEncoder<CompressedProofArgs> {\n return getStructEncoder([\n [\"a\", fixEncoderSize(getBytesEncoder(), 32)],\n [\"b\", fixEncoderSize(getBytesEncoder(), 64)],\n [\"c\", fixEncoderSize(getBytesEncoder(), 32)],\n ]);\n}\n\nexport function getCompressedProofDecoder(): FixedSizeDecoder<CompressedProof> {\n return getStructDecoder([\n [\"a\", fixDecoderSize(getBytesDecoder(), 32)],\n [\"b\", fixDecoderSize(getBytesDecoder(), 64)],\n [\"c\", fixDecoderSize(getBytesDecoder(), 32)],\n ]);\n}\n\nexport function getCompressedProofCodec(): FixedSizeCodec<\n CompressedProofArgs,\n CompressedProof\n> {\n return combineCodec(getCompressedProofEncoder(), getCompressedProofDecoder());\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 getOptionDecoder,\n getOptionEncoder,\n getStructDecoder,\n getStructEncoder,\n type Codec,\n type Decoder,\n type Encoder,\n type Option,\n type OptionOrNullable,\n} from \"gill\";\nimport {\n getCompressedSettingsDataDecoder,\n getCompressedSettingsDataEncoder,\n type CompressedSettingsData,\n type CompressedSettingsDataArgs,\n} from \".\";\n\nexport type CompressedSettings = { data: Option<CompressedSettingsData> };\n\nexport type CompressedSettingsArgs = {\n data: OptionOrNullable<CompressedSettingsDataArgs>;\n};\n\nexport function getCompressedSettingsEncoder(): Encoder<CompressedSettingsArgs> {\n return getStructEncoder([\n [\"data\", getOptionEncoder(getCompressedSettingsDataEncoder())],\n ]);\n}\n\nexport function getCompressedSettingsDecoder(): Decoder<CompressedSettings> {\n return getStructDecoder([\n [\"data\", getOptionDecoder(getCompressedSettingsDataDecoder())],\n ]);\n}\n\nexport function getCompressedSettingsCodec(): Codec<\n CompressedSettingsArgs,\n CompressedSettings\n> {\n return combineCodec(\n getCompressedSettingsEncoder(),\n getCompressedSettingsDecoder()\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 getArrayDecoder,\n getArrayEncoder,\n getStructDecoder,\n getStructEncoder,\n getU128Decoder,\n getU128Encoder,\n getU8Decoder,\n getU8Encoder,\n type Codec,\n type Decoder,\n type Encoder,\n} from \"gill\";\nimport {\n getMemberDecoder,\n getMemberEncoder,\n type Member,\n type MemberArgs,\n} from \".\";\n\nexport type CompressedSettingsData = {\n threshold: number;\n bump: number;\n index: bigint;\n multiWalletBump: number;\n members: Array<Member>;\n};\n\nexport type CompressedSettingsDataArgs = {\n threshold: number;\n bump: number;\n index: number | bigint;\n multiWalletBump: number;\n members: Array<MemberArgs>;\n};\n\nexport function getCompressedSettingsDataEncoder(): Encoder<CompressedSettingsDataArgs> {\n return getStructEncoder([\n [\"threshold\", getU8Encoder()],\n [\"bump\", getU8Encoder()],\n [\"index\", getU128Encoder()],\n [\"multiWalletBump\", getU8Encoder()],\n [\"members\", getArrayEncoder(getMemberEncoder())],\n ]);\n}\n\nexport function getCompressedSettingsDataDecoder(): Decoder<CompressedSettingsData> {\n return getStructDecoder([\n [\"threshold\", getU8Decoder()],\n [\"bump\", getU8Decoder()],\n [\"index\", getU128Decoder()],\n [\"multiWalletBump\", getU8Decoder()],\n [\"members\", getArrayDecoder(getMemberDecoder())],\n ]);\n}\n\nexport function getCompressedSettingsDataCodec(): Codec<\n CompressedSettingsDataArgs,\n CompressedSettingsData\n> {\n return combineCodec(\n getCompressedSettingsDataEncoder(),\n getCompressedSettingsDataDecoder()\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 getArrayDecoder,\n getArrayEncoder,\n getDiscriminatedUnionDecoder,\n getDiscriminatedUnionEncoder,\n getStructDecoder,\n getStructEncoder,\n getTupleDecoder,\n getTupleEncoder,\n getU8Decoder,\n getU8Encoder,\n type Codec,\n type Decoder,\n type Encoder,\n type GetDiscriminatedUnionVariant,\n type GetDiscriminatedUnionVariantContent,\n} from \"gill\";\nimport {\n getAddMemberArgsDecoder,\n getAddMemberArgsEncoder,\n getEditMemberArgsDecoder,\n getEditMemberArgsEncoder,\n getRemoveMemberArgsDecoder,\n getRemoveMemberArgsEncoder,\n type AddMemberArgs,\n type AddMemberArgsArgs,\n type EditMemberArgs,\n type EditMemberArgsArgs,\n type RemoveMemberArgs,\n type RemoveMemberArgsArgs,\n} from \".\";\n\nexport type ConfigAction =\n | { __kind: \"EditPermissions\"; fields: readonly [Array<EditMemberArgs>] }\n | { __kind: \"AddMembers\"; fields: readonly [Array<AddMemberArgs>] }\n | { __kind: \"RemoveMembers\"; fields: readonly [Array<RemoveMemberArgs>] }\n | { __kind: \"SetThreshold\"; fields: readonly [number] };\n\nexport type ConfigActionArgs =\n | { __kind: \"EditPermissions\"; fields: readonly [Array<EditMemberArgsArgs>] }\n | { __kind: \"AddMembers\"; fields: readonly [Array<AddMemberArgsArgs>] }\n | { __kind: \"RemoveMembers\"; fields: readonly [Array<RemoveMemberArgsArgs>] }\n | { __kind: \"SetThreshold\"; fields: readonly [number] };\n\nexport function getConfigActionEncoder(): Encoder<ConfigActionArgs> {\n return getDiscriminatedUnionEncoder([\n [\n \"EditPermissions\",\n getStructEncoder([\n [\n \"fields\",\n getTupleEncoder([getArrayEncoder(getEditMemberArgsEncoder())]),\n ],\n ]),\n ],\n [\n \"AddMembers\",\n getStructEncoder([\n [\n \"fields\",\n getTupleEncoder([getArrayEncoder(getAddMemberArgsEncoder())]),\n ],\n ]),\n ],\n [\n \"RemoveMembers\",\n getStructEncoder([\n [\n \"fields\",\n getTupleEncoder([getArrayEncoder(getRemoveMemberArgsEncoder())]),\n ],\n ]),\n ],\n [\n \"SetThreshold\",\n getStructEncoder([[\"fields\", getTupleEncoder([getU8Encoder()])]]),\n ],\n ]);\n}\n\nexport function getConfigActionDecoder(): Decoder<ConfigAction> {\n return getDiscriminatedUnionDecoder([\n [\n \"EditPermissions\",\n getStructDecoder([\n [\n \"fields\",\n getTupleDecoder([getArrayDecoder(getEditMemberArgsDecoder())]),\n ],\n ]),\n ],\n [\n \"AddMembers\",\n getStructDecoder([\n [\n \"fields\",\n getTupleDecoder([getArrayDecoder(getAddMemberArgsDecoder())]),\n ],\n ]),\n ],\n [\n \"RemoveMembers\",\n getStructDecoder([\n [\n \"fields\",\n getTupleDecoder([getArrayDecoder(getRemoveMemberArgsDecoder())]),\n ],\n ]),\n ],\n [\n \"SetThreshold\",\n getStructDecoder([[\"fields\", getTupleDecoder([getU8Decoder()])]]),\n ],\n ]);\n}\n\nexport function getConfigActionCodec(): Codec<ConfigActionArgs, ConfigAction> {\n return combineCodec(getConfigActionEncoder(), getConfigActionDecoder());\n}\n\n// Data Enum Helpers.\nexport function configAction(\n kind: \"EditPermissions\",\n data: GetDiscriminatedUnionVariantContent<\n ConfigActionArgs,\n \"__kind\",\n \"EditPermissions\"\n >[\"fields\"]\n): GetDiscriminatedUnionVariant<ConfigActionArgs, \"__kind\", \"EditPermissions\">;\nexport function configAction(\n kind: \"AddMembers\",\n data: GetDiscriminatedUnionVariantContent<\n ConfigActionArgs,\n \"__kind\",\n \"AddMembers\"\n >[\"fields\"]\n): GetDiscriminatedUnionVariant<ConfigActionArgs, \"__kind\", \"AddMembers\">;\nexport function configAction(\n kind: \"RemoveMembers\",\n data: GetDiscriminatedUnionVariantContent<\n ConfigActionArgs,\n \"__kind\",\n \"RemoveMembers\"\n >[\"fields\"]\n): GetDiscriminatedUnionVariant<ConfigActionArgs, \"__kind\", \"RemoveMembers\">;\nexport function configAction(\n kind: \"SetThreshold\",\n data: GetDiscriminatedUnionVariantContent<\n ConfigActionArgs,\n \"__kind\",\n \"SetThreshold\"\n >[\"fields\"]\n): GetDiscriminatedUnionVariant<ConfigActionArgs, \"__kind\", \"SetThreshold\">;\nexport function configAction<K extends ConfigActionArgs[\"__kind\"], Data>(\n kind: K,\n data?: Data\n) {\n return Array.isArray(data)\n ? { __kind: kind, fields: data }\n : { __kind: kind, ...(data ?? {}) };\n}\n\nexport function isConfigAction<K extends ConfigAction[\"__kind\"]>(\n kind: K,\n value: ConfigAction\n): value is ConfigAction & { __kind: K } {\n return value.__kind === kind;\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 getAddressDecoder,\n getAddressEncoder,\n getBooleanDecoder,\n getBooleanEncoder,\n getOptionDecoder,\n getOptionEncoder,\n getStructDecoder,\n getStructEncoder,\n getU32Decoder,\n getU32Encoder,\n getUtf8Decoder,\n getUtf8Encoder,\n type Address,\n type Codec,\n type Decoder,\n type Encoder,\n type Option,\n type OptionOrNullable,\n} from \"gill\";\nimport {\n getUserCreationArgsDecoder,\n getUserCreationArgsEncoder,\n type UserCreationArgs,\n type UserCreationArgsArgs,\n} from \".\";\n\nexport type CreateUserAccountArgs = {\n member: Address;\n isPermanentMember: boolean;\n transactionManagerUrl: Option<string>;\n userCreationArgs: UserCreationArgs;\n};\n\nexport type CreateUserAccountArgsArgs = {\n member: Address;\n isPermanentMember: boolean;\n transactionManagerUrl: OptionOrNullable<string>;\n userCreationArgs: UserCreationArgsArgs;\n};\n\nexport function getCreateUserAccountArgsEncoder(): Encoder<CreateUserAccountArgsArgs> {\n return getStructEncoder([\n [\"member\", getAddressEncoder()],\n [\"isPermanentMember\", getBooleanEncoder()],\n [\n \"transactionManagerUrl\",\n getOptionEncoder(addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder())),\n ],\n [\"userCreationArgs\", getUserCreationArgsEncoder()],\n ]);\n}\n\nexport function getCreateUserAccountArgsDecoder(): Decoder<CreateUserAccountArgs> {\n return getStructDecoder([\n [\"member\", getAddressDecoder()],\n [\"isPermanentMember\", getBooleanDecoder()],\n [\n \"transactionManagerUrl\",\n getOptionDecoder(addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())),\n ],\n [\"userCreationArgs\", getUserCreationArgsDecoder()],\n ]);\n}\n\nexport function getCreateUserAccountArgsCodec(): Codec<\n CreateUserAccountArgsArgs,\n CreateUserAccountArgs\n> {\n return combineCodec(\n getCreateUserAccountArgsEncoder(),\n getCreateUserAccountArgsDecoder()\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 getEnumDecoder,\n getEnumEncoder,\n type FixedSizeCodec,\n type FixedSizeDecoder,\n type FixedSizeEncoder,\n} from \"gill\";\n\nexport enum DelegateOp {\n Add,\n Remove,\n Ignore,\n}\n\nexport type DelegateOpArgs = DelegateOp;\n\nexport function getDelegateOpEncoder(): FixedSizeEncoder<DelegateOpArgs> {\n return getEnumEncoder(DelegateOp);\n}\n\nexport function getDelegateOpDecoder(): FixedSizeDecoder<DelegateOp> {\n return getEnumDecoder(DelegateOp);\n}\n\nexport function getDelegateOpCodec(): FixedSizeCodec<\n DelegateOpArgs,\n DelegateOp\n> {\n return combineCodec(getDelegateOpEncoder(), getDelegateOpDecoder());\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 getOptionDecoder,\n getOptionEncoder,\n getStructDecoder,\n getStructEncoder,\n type Codec,\n type Decoder,\n type Encoder,\n type Option,\n type OptionOrNullable,\n} from \"gill\";\nimport {\n getDelegateOpDecoder,\n getDelegateOpEncoder,\n getMemberKeyDecoder,\n getMemberKeyEncoder,\n getPermissionsDecoder,\n getPermissionsEncoder,\n getUserMutArgsDecoder,\n getUserMutArgsEncoder,\n type DelegateOp,\n type DelegateOpArgs,\n type IPermissions,\n type MemberKey,\n type MemberKeyArgs,\n type PermissionsArgs,\n type UserMutArgs,\n type UserMutArgsArgs,\n} from \".\";\n\nexport type EditMemberArgs = {\n memberKey: MemberKey;\n permissions: IPermissions;\n userArgs: Option<UserMutArgs>;\n delegateOperation: DelegateOp;\n};\n\nexport type EditMemberArgsArgs = {\n memberKey: MemberKeyArgs;\n permissions: PermissionsArgs;\n userArgs: OptionOrNullable<UserMutArgsArgs>;\n delegateOperation: DelegateOpArgs;\n};\n\nexport function getEditMemberArgsEncoder(): Encoder<EditMemberArgsArgs> {\n return getStructEncoder([\n [\"memberKey\", getMemberKeyEncoder()],\n [\"permissions\", getPermissionsEncoder()],\n [\"userArgs\", getOptionEncoder(getUserMutArgsEncoder())],\n [\"delegateOperation\", getDelegateOpEncoder()],\n ]);\n}\n\nexport function getEditMemberArgsDecoder(): Decoder<EditMemberArgs> {\n return getStructDecoder([\n [\"memberKey\", getMemberKeyDecoder()],\n [\"permissions\", getPermissionsDecoder()],\n [\"userArgs\", getOptionDecoder(getUserMutArgsDecoder())],\n [\"delegateOperation\", getDelegateOpDecoder()],\n ]);\n}\n\nexport function getEditMemberArgsCodec(): Codec<\n EditMemberArgsArgs,\n EditMemberArgs\n> {\n return combineCodec(getEditMemberArgsEncoder(), getEditMemberArgsDecoder());\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 getOptionDecoder,\n getOptionEncoder,\n getStructDecoder,\n getStructEncoder,\n type Codec,\n type Decoder,\n type Encoder,\n type Option,\n type OptionOrNullable,\n} from \"gill\";\nimport {\n getSettingsMutArgsDecoder,\n getSettingsMutArgsEncoder,\n getUserMutArgsDecoder,\n getUserMutArgsEncoder,\n type SettingsMutArgs,\n type SettingsMutArgsArgs,\n type UserMutArgs,\n type UserMutArgsArgs,\n} from \".\";\n\nexport type LinkWalletArgs = {\n settingsMutArgs: SettingsMutArgs;\n transactionManager: Option<UserMutArgs>;\n};\n\nexport type LinkWalletArgsArgs = {\n settingsMutArgs: SettingsMutArgsArgs;\n transactionManager: OptionOrNullable<UserMutArgsArgs>;\n};\n\nexport function getLinkWalletArgsEncoder(): Encoder<LinkWalletArgsArgs> {\n return getStructEncoder([\n [\"settingsMutArgs\", getSettingsMutArgsEncoder()],\n [\"transactionManager\", getOptionEncoder(getUserMutArgsEncoder())],\n ]);\n}\n\nexport function getLinkWalletArgsDecoder(): Decoder<LinkWalletArgs> {\n return getStructDecoder([\n [\"settingsMutArgs\", getSettingsMutArgsDecoder()],\n [\"transactionManager\", getOptionDecoder(getUserMutArgsDecoder())],\n ]);\n}\n\nexport function getLinkWalletArgsCodec(): Codec<\n LinkWalletArgsArgs,\n LinkWalletArgs\n> {\n return combineCodec(getLinkWalletArgsEncoder(), getLinkWalletArgsDecoder());\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 getStructDecoder,\n getStructEncoder,\n type FixedSizeCodec,\n type FixedSizeDecoder,\n type FixedSizeEncoder,\n} from \"gill\";\nimport {\n getMemberKeyDecoder,\n getMemberKeyEncoder,\n getPermissionsDecoder,\n getPermissionsEncoder,\n type IPermissions,\n type MemberKey,\n type MemberKeyArgs,\n type PermissionsArgs,\n} from \".\";\n\nexport type Member = { pubkey: MemberKey; permissions: IPermissions };\n\nexport type MemberArgs = {\n pubkey: MemberKeyArgs;\n permissions: PermissionsArgs;\n};\n\nexport function getMemberEncoder(): FixedSizeEncoder<MemberArgs> {\n return getStructEncoder([\n [\"pubkey\", getMemberKeyEncoder()],\n [\"permissions\", getPermissionsEncoder()],\n ]);\n}\n\nexport function getMemberDecoder(): FixedSizeDecoder<Member> {\n return getStructDecoder([\n [\"pubkey\", getMemberKeyDecoder()],\n [\"permissions\", getPermissionsDecoder()],\n ]);\n}\n\nexport function getMemberCodec(): FixedSizeCodec<MemberArgs, Member> {\n return combineCodec(getMemberEncoder(), getMemberDecoder());\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 getU8Decoder,\n getU8Encoder,\n type FixedSizeCodec,\n type FixedSizeDecoder,\n type FixedSizeEncoder,\n type ReadonlyUint8Array,\n} from \"gill\";\n\nexport type MemberKey = { keyType: number; key: ReadonlyUint8Array };\n\nexport type MemberKeyArgs = MemberKey;\n\nexport function getMemberKeyEncoder(): FixedSizeEncoder<MemberKeyArgs> {\n return getStructEncoder([\n [\"keyType\", getU8Encoder()],\n [\"key\", fixEncoderSize(getBytesEncoder(), 33)],\n ]);\n}\n\nexport function getMemberKeyDecoder(): FixedSizeDecoder<MemberKey> {\n return getStructDecoder([\n [\"keyType\", getU8Decoder()],\n [\"key\", fixDecoderSize(getBytesDecoder(), 33)],\n ]);\n}\n\nexport function getMemberKeyCodec(): FixedSizeCodec<MemberKeyArgs, MemberKey> {\n return combineCodec(getMemberKeyEncoder(), getMemberKeyDecoder());\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 getStructDecoder,\n getStructEncoder,\n getU16Decoder,\n getU16Encoder,\n getU8Decoder,\n getU8Encoder,\n type FixedSizeCodec,\n type FixedSizeDecoder,\n type FixedSizeEncoder,\n} from \"gill\";\n\nexport type PackedAddressTreeInfo = {\n addressMerkleTreePubkeyIndex: number;\n addressQueuePubkeyIndex: number;\n rootIndex: number;\n};\n\nexport type PackedAddressTreeInfoArgs = PackedAddressTreeInfo;\n\nexport function getPackedAddressTreeInfoEncoder(): FixedSizeEncoder<PackedAddressTreeInfoArgs> {\n return getStructEncoder([\n [\"addressMerkleTreePubkeyIndex\", getU8Encoder()],\n [\"addressQueuePubkeyIndex\", getU8Encoder()],\n [\"rootIndex\", getU16Encoder()],\n ]);\n}\n\nexport function getPackedAddressTreeInfoDecoder(): FixedSizeDecoder<PackedAddressTreeInfo> {\n return getStructDecoder([\n [\"addressMerkleTreePubkeyIndex\", getU8Decoder()],\n [\"addressQueuePubkeyIndex\", getU8Decoder()],\n [\"rootIndex\", getU16Decoder()],\n ]);\n}\n\nexport function getPackedAddressTreeInfoCodec(): FixedSizeCodec<\n PackedAddressTreeInfoArgs,\n PackedAddressTreeInfo\n> {\n return combineCodec(\n getPackedAddressTreeInfoEncoder(),\n getPackedAddressTreeInfoDecoder()\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 getBooleanDecoder,\n getBooleanEncoder,\n getStructDecoder,\n getStructEncoder,\n getU16Decoder,\n getU16Encoder,\n getU32Decoder,\n getU32Encoder,\n getU8Decoder,\n getU8Encoder,\n type FixedSizeCodec,\n type FixedSizeDecoder,\n type FixedSizeEncoder,\n} from \"gill\";\n\nexport type PackedStateTreeInfo = {\n rootIndex: number;\n proveByIndex: boolean;\n merkleTreePubkeyIndex: number;\n queuePubkeyIndex: number;\n leafIndex: number;\n};\n\nexport type PackedStateTreeInfoArgs = PackedStateTreeInfo;\n\nexport function getPackedStateTreeInfoEncoder(): FixedSizeEncoder<PackedStateTreeInfoArgs> {\n return getStructEncoder([\n [\"rootIndex\", getU16Encoder()],\n [\"proveByIndex\", getBooleanEncoder()],\n [\"merkleTreePubkeyIndex\", getU8Encoder()],\n [\"queuePubkeyIndex\", getU8Encoder()],\n [\"leafIndex\", getU32Encoder()],\n ]);\n}\n\nexport function getPackedStateTreeInfoDecoder(): FixedSizeDecoder<PackedStateTreeInfo> {\n return getStructDecoder([\n [\"rootIndex\", getU16Decoder()],\n [\"proveByIndex\", getBooleanDecoder()],\n [\"merkleTreePubkeyIndex\", getU8Decoder()],\n [\"queuePubkeyIndex\", getU8Decoder()],\n [\"leafIndex\", getU32Decoder()],\n ]);\n}\n\nexport function getPackedStateTreeInfoCodec(): FixedSizeCodec<\n PackedStateTreeInfoArgs,\n PackedStateTreeInfo\n> {\n return combineCodec(\n getPackedStateTreeInfoEncoder(),\n getPackedStateTreeInfoDecoder()\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 getStructDecoder,\n getStructEncoder,\n getU8Decoder,\n getU8Encoder,\n type FixedSizeCodec,\n type FixedSizeDecoder,\n type FixedSizeEncoder,\n} from \"gill\";\n\n/** Bitmask for permissions. */\nexport type IPermissions = { mask: number };\n\nexport type PermissionsArgs = IPermissions;\n\nexport function getPermissionsEncoder(): FixedSizeEncoder<PermissionsArgs> {\n return getStructEncoder([[\"mask\", getU8Encoder()]]);\n}\n\nexport function getPermissionsDecoder(): FixedSizeDecoder<IPermissions> {\n return getStructDecoder([[\"mask\", getU8Decoder()]]);\n}\n\nexport function getPermissionsCodec(): FixedSizeCodec<\n PermissionsArgs,\n IPermissions\n> {\n return combineCodec(getPermissionsEncoder(), getPermissionsDecoder());\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 getOptionDecoder,\n getOptionEncoder,\n getStructDecoder,\n getStructEncoder,\n getU8Decoder,\n getU8Encoder,\n type Codec,\n type Decoder,\n type Encoder,\n type Option,\n type OptionOrNullable,\n} from \"gill\";\nimport {\n getCompressedProofDecoder,\n getCompressedProofEncoder,\n type CompressedProof,\n type CompressedProofArgs,\n} from \".\";\n\nexport type ProofArgs = {\n proof: Option<CompressedProof>;\n lightCpiAccountsStartIndex: number;\n};\n\nexport type ProofArgsArgs = {\n proof: OptionOrNullable<CompressedProofArgs>;\n lightCpiAccountsStartIndex: number;\n};\n\nexport function getProofArgsEncoder(): Encoder<ProofArgsArgs> {\n return getStructEncoder([\n [\"proof\", getOptionEncoder(getCompressedProofEncoder())],\n [\"lightCpiAccountsStartIndex\", getU8Encoder()],\n ]);\n}\n\nexport function getProofArgsDecoder(): Decoder<ProofArgs> {\n return getStructDecoder([\n [\"proof\", getOptionDecoder(getCompressedProofDecoder())],\n [\"lightCpiAccountsStartIndex\", getU8Decoder()],\n ]);\n}\n\nexport function getProofArgsCodec(): Codec<ProofArgsArgs, ProofArgs> {\n return combineCodec(getProofArgsEncoder(), getProofArgsDecoder());\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 getStructDecoder,\n getStructEncoder,\n type Codec,\n type Decoder,\n type Encoder,\n} from \"gill\";\nimport {\n getMemberKeyDecoder,\n getMemberKeyEncoder,\n getUserReadOnlyOrMutateArgsDecoder,\n getUserReadOnlyOrMutateArgsEncoder,\n type MemberKey,\n type MemberKeyArgs,\n type UserReadOnlyOrMutateArgs,\n type UserReadOnlyOrMutateArgsArgs,\n} from \".\";\n\nexport type RemoveMemberArgs = {\n memberKey: MemberKey;\n userArgs: UserReadOnlyOrMutateArgs;\n};\n\nexport type RemoveMemberArgsArgs = {\n memberKey: MemberKeyArgs;\n userArgs: UserReadOnlyOrMutateArgsArgs;\n};\n\nexport function getRemoveMemberArgsEncoder(): Encoder<RemoveMemberArgsArgs> {\n return getStructEncoder([\n [\"memberKey\", getMemberKeyEncoder()],\n [\"userArgs\", getUserReadOnlyOrMutateArgsEncoder()],\n ]);\n}\n\nexport function getRemoveMemberArgsDecoder(): Decoder<RemoveMemberArgs> {\n return getStructDecoder([\n [\"memberKey\", getMemberKeyDecoder()],\n [\"userArgs\", getUserReadOnlyOrMutateArgsDecoder()],\n ]);\n}\n\nexport function getRemoveMemberArgsCodec(): Codec<\n RemoveMemberArgsArgs,\n RemoveMemberArgs\n> {\n return combineCodec(\n getRemoveMemberArgsEncoder(),\n getRemoveMemberArgsDecoder()\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 getTupleDecoder,\n getTupleEncoder,\n type FixedSizeCodec,\n type FixedSizeDecoder,\n type FixedSizeEncoder,\n type ReadonlyUint8Array,\n} from \"gill\";\n\nexport type Secp256r1Pubkey = readonly [ReadonlyUint8Array];\n\nexport type Secp256r1PubkeyArgs = Secp256r1Pubkey;\n\nexport function getSecp256r1PubkeyEncoder(): FixedSizeEncoder<Secp256r1PubkeyArgs> {\n return getTupleEncoder([fixEncoderSize(getBytesEncoder(), 33)]);\n}\n\nexport function getSecp256r1PubkeyDecoder(): FixedSizeDecoder<Secp256r1Pubkey> {\n return getTupleDecoder([fixDecoderSize(getBytesDecoder(), 33)]);\n}\n\nexport function getSecp256r1PubkeyCodec(): FixedSizeCodec<\n Secp256r1PubkeyArgs,\n Secp256r1Pubkey\n> {\n return combineCodec(getSecp256r1PubkeyEncoder(), getSecp256r1PubkeyDecoder());\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 getBooleanDecoder,\n getBooleanEncoder,\n getBytesDecoder,\n getBytesEncoder,\n getStructDecoder,\n getStructEncoder,\n getU32Decoder,\n getU32Encoder,\n getU64Decoder,\n getU64Encoder,\n getU8Decoder,\n getU8Encoder,\n type Codec,\n type Decoder,\n type Encoder,\n type ReadonlyUint8Array,\n} from \"gill\";\n\nexport type Secp256r1VerifyArgs = {\n signedMessageIndex: number;\n slotNumber: bigint;\n originIndex: number;\n crossOrigin: boolean;\n truncatedClientDataJson: ReadonlyUint8Array;\n};\n\nexport type Secp256r1VerifyArgsArgs = {\n signedMessageIndex: number;\n slotNumber: number | bigint;\n originIndex: number;\n crossOrigin: boolean;\n truncatedClientDataJson: ReadonlyUint8Array;\n};\n\nexport function getSecp256r1VerifyArgsEncoder(): Encoder<Secp256r1VerifyArgsArgs> {\n return getStructEncoder([\n [\"signedMessageIndex\", getU8Encoder()],\n [\"slotNumber\", getU64Encoder()],\n [\"originIndex\", getU8Encoder()],\n [\"crossOrigin\", getBooleanEncoder()],\n [\n \"truncatedClientDataJson\",\n addEncoderSizePrefix(getBytesEncoder(), getU32Encoder()),\n ],\n ]);\n}\n\nexport function getSecp256r1VerifyArgsDecoder(): Decoder<Secp256r1VerifyArgs> {\n return getStructDecoder([\n [\"signedMessageIndex\", getU8Decoder()],\n [\"slotNumber\", getU64Decoder()],\n [\"originIndex\", getU8Decoder()],\n [\"crossOrigin\", getBooleanDecoder()],\n [\n \"truncatedClientDataJson\",\n addDecoderSizePrefix(getBytesDecoder(), getU32Decoder()),\n ],\n ]);\n}\n\nexport function getSecp256r1VerifyArgsCodec(): Codec<\n Secp256r1VerifyArgsArgs,\n Secp256r1VerifyArgs\n> {\n return combineCodec(\n getSecp256r1VerifyArgsEncoder(),\n getSecp256r1VerifyArgsDecoder()\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 getAddressDecoder,\n getAddressEncoder,\n getStructDecoder,\n getStructEncoder,\n type Address,\n type Codec,\n type Decoder,\n type Encoder,\n} from \"gill\";\nimport {\n getSecp256r1VerifyArgsDecoder,\n getSecp256r1VerifyArgsEncoder,\n type Secp256r1VerifyArgs,\n type Secp256r1VerifyArgsArgs,\n} from \".\";\n\nexport type Secp256r1VerifyArgsWithDomainAddress = {\n domainConfigKey: Address;\n verifyArgs: Secp256r1VerifyArgs;\n};\n\nexport type Secp256r1VerifyArgsWithDomainAddressArgs = {\n domainConfigKey: Address;\n verifyArgs: Secp256r1VerifyArgsArgs;\n};\n\nexport function getSecp256r1VerifyArgsWithDomainAddressEncoder(): Encoder<Secp256r1VerifyArgsWithDomainAddressArgs> {\n return getStructEncoder([\n [\"domainConfigKey\", getAddressEncoder()],\n [\"verifyArgs\", getSecp256r1VerifyArgsEncoder()],\n ]);\n}\n\nexport function getSecp256r1VerifyArgsWithDomainAddressDecoder(): Decoder<Secp256r1VerifyArgsWithDomainAddress> {\n return getStructDecoder([\n [\"domainConfigKey\", getAddressDecoder()],\n [\"verifyArgs\", getSecp256r1VerifyArgsDecoder()],\n ]);\n}\n\nexport function getSecp256r1VerifyArgsWithDomainAddressCodec(): Codec<\n Secp256r1VerifyArgsWithDomainAddressArgs,\n Secp256r1VerifyArgsWithDomainAddress\n> {\n return combineCodec(\n getSecp256r1VerifyArgsWithDomainAddressEncoder(),\n getSecp256r1VerifyArgsWithDomainAddressDecoder()\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 getDiscriminatedUnionDecoder,\n getDiscriminatedUnionEncoder,\n getStructDecoder,\n getStructEncoder,\n getTupleDecoder,\n getTupleEncoder,\n type Codec,\n type Decoder,\n type Encoder,\n type GetDiscriminatedUnionVariant,\n type GetDiscriminatedUnionVariantContent,\n} from \"gill\";\nimport {\n getSettingsCreationArgsDecoder,\n getSettingsCreationArgsEncoder,\n getSettingsMutArgsDecoder,\n getSettingsMutArgsEncoder,\n type SettingsCreationArgs,\n type SettingsCreationArgsArgs,\n type SettingsMutArgs,\n type SettingsMutArgsArgs,\n} from \".\";\n\nexport type SettingsCreateOrMutateArgs =\n | { __kind: \"Create\"; fields: readonly [SettingsCreationArgs] }\n | { __kind: \"Mutate\"; fields: readonly [SettingsMutArgs] };\n\nexport type SettingsCreateOrMutateArgsArgs =\n | { __kind: \"Create\"; fields: readonly [SettingsCreationArgsArgs] }\n | { __kind: \"Mutate\"; fields: readonly [SettingsMutArgsArgs] };\n\nexport function getSettingsCreateOrMutateArgsEncoder(): Encoder<SettingsCreateOrMutateArgsArgs> {\n return getDiscriminatedUnionEncoder([\n [\n \"Create\",\n getStructEncoder([\n [\"fields\", getTupleEncoder([getSettingsCreationArgsEncoder()])],\n ]),\n ],\n [\n \"Mutate\",\n getStructEncoder([\n [\"fields\", getTupleEncoder([getSettingsMutArgsEncoder()])],\n ]),\n ],\n ]);\n}\n\nexport function getSettingsCreateOrMutateArgsDecoder(): Decoder<SettingsCreateOrMutateArgs> {\n return getDiscriminatedUnionDecoder([\n [\n \"Create\",\n getStructDecoder([\n [\"fields\", getTupleDecoder([getSettingsCreationArgsDecoder()])],\n ]),\n ],\n [\n \"Mutate\",\n getStructDecoder([\n [\"fields\", getTupleDecoder([getSettingsMutArgsDecoder()])],\n ]),\n ],\n ]);\n}\n\nexport function getSettingsCreateOrMutateArgsCodec(): Codec<\n SettingsCreateOrMutateArgsArgs,\n SettingsCreateOrMutateArgs\n> {\n return combineCodec(\n getSettingsCreateOrMutateArgsEncoder(),\n getSettingsCreateOrMutateArgsDecoder()\n );\n}\n\n// Data Enum Helpers.\nexport function settingsCreateOrMutateArgs(\n kind: \"Create\",\n data: GetDiscriminatedUnionVariantContent<\n SettingsCreateOrMutateArgsArgs,\n \"__kind\",\n \"Create\"\n >[\"fields\"]\n): GetDiscriminatedUnionVariant<\n SettingsCreateOrMutateArgsArgs,\n \"__kind\",\n \"Create\"\n>;\nexport function settingsCreateOrMutateArgs(\n kind: \"Mutate\",\n data: GetDiscriminatedUnionVariantContent<\n SettingsCreateOrMutateArgsArgs,\n \"__kind\",\n \"Mutate\"\n >[\"fields\"]\n): GetDiscriminatedUnionVariant<\n SettingsCreateOrMutateArgsArgs,\n \"__kind\",\n \"Mutate\"\n>;\nexport function settingsCreateOrMutateArgs<\n K extends SettingsCreateOrMutateArgsArgs[\"__kind\"],\n Data,\n>(kind: K, data?: Data) {\n return Array.isArray(data)\n ? { __kind: kind, fields: data }\n : { __kind: kind, ...(data ?? {}) };\n}\n\nexport function isSettingsCreateOrMutateArgs<\n K extends SettingsCreateOrMutateArgs[\"__kind\"],\n>(\n kind: K,\n value: SettingsCreateOrMutateArgs\n): value is SettingsCreateOrMutateArgs & { __kind: K } {\n return value.__kind === kind;\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 getStructDecoder,\n getStructEncoder,\n getU8Decoder,\n getU8Encoder,\n type FixedSizeCodec,\n type FixedSizeDecoder,\n type FixedSizeEncoder,\n} from \"gill\";\nimport {\n getPackedAddressTreeInfoDecoder,\n getPackedAddressTreeInfoEncoder,\n type PackedAddressTreeInfo,\n type PackedAddressTreeInfoArgs,\n} from \".\";\n\nexport type SettingsCreationArgs = {\n addressTreeInfo: PackedAddressTreeInfo;\n outputStateTreeIndex: number;\n};\n\nexport type SettingsCreationArgsArgs = {\n addressTreeInfo: PackedAddressTreeInfoArgs;\n outputStateTreeIndex: number;\n};\n\nexport function getSettingsCreationArgsEncoder(): FixedSizeEncoder<SettingsCreationArgsArgs> {\n return getStructEncoder([\n [\"addressTreeInfo\", getPackedAddressTreeInfoEncoder()],\n [\"outputStateTreeIndex\", getU8Encoder()],\n ]);\n}\n\nexport function getSettingsCreationArgsDecoder(): FixedSizeDecoder<SettingsCreationArgs> {\n return getStructDecoder([\n [\"addressTreeInfo\", getPackedAddressTreeInfoDecoder()],\n [\"outputStateTreeIndex\", getU8Decoder()],\n ]);\n}\n\nexport function getSettingsCreationArgsCodec(): FixedSizeCodec<\n SettingsCreationArgsArgs,\n SettingsCreationArgs\n> {\n return combineCodec(\n getSettingsCreationArgsEncoder(),\n getSettingsCreationArgsDecoder()\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 getStructDecoder,\n getStructEncoder,\n type Codec,\n type Decoder,\n type Encoder,\n} from \"gill\";\nimport {\n getCompressedAccountMetaDecoder,\n getCompressedAccountMetaEncoder,\n getCompressedSettingsDecoder,\n getCompressedSettingsEncoder,\n type CompressedAccountMeta,\n type CompressedAccountMetaArgs,\n type CompressedSettings,\n type CompressedSettingsArgs,\n} from \".\";\n\nexport type SettingsMutArgs = {\n accountMeta: CompressedAccountMeta;\n data: CompressedSettings;\n};\n\nexport type SettingsMutArgsArgs = {\n accountMeta: CompressedAccountMetaArgs;\n data: CompressedSettingsArgs;\n};\n\nexport function getSettingsMutArgsEncoder(): Encoder<SettingsMutArgsArgs> {\n return getStructEncoder([\n [\"accountMeta\", getCompressedAccountMetaEncoder()],\n [\"data\", getCompressedSettingsEncoder()],\n ]);\n}\n\nexport function getSettingsMutArgsDecoder(): Decoder<SettingsMutArgs> {\n return getStructDecoder([\n [\"accountMeta\", getCompressedAccountMetaDecoder()],\n [\"data\", getCompressedSettingsDecoder()],\n ]);\n}\n\nexport function getSettingsMutArgsCodec(): Codec<\n SettingsMutArgsArgs,\n SettingsMutArgs\n> {\n return combineCodec(getSettingsMutArgsEncoder(), getSettingsMutArgsDecoder());\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 getStructDecoder,\n getStructEncoder,\n type Codec,\n type Decoder,\n type Encoder,\n} from \"gill\";\nimport {\n getCompressedAccountMetaReadOnlyDecoder,\n getCompressedAccountMetaReadOnlyEncoder,\n getCompressedSettingsDecoder,\n getCompressedSettingsEncoder,\n type CompressedAccountMetaReadOnly,\n type CompressedAccountMetaReadOnlyArgs,\n type CompressedSettings,\n type CompressedSettingsArgs,\n} from \".\";\n\nexport type SettingsReadonlyArgs = {\n accountMeta: CompressedAccountMetaReadOnly;\n data: CompressedSettings;\n};\n\nexport type SettingsReadonlyArgsArgs = {\n accountMeta: CompressedAccountMetaReadOnlyArgs;\n data: CompressedSettingsArgs;\n};\n\nexport function getSettingsReadonlyArgsEncoder(): Encoder<SettingsReadonlyArgsArgs> {\n return getStructEncoder([\n [\"accountMeta\", getCompressedAccountMetaReadOnlyEncoder()],\n [\"data\", getCompressedSettingsEncoder()],\n ]);\n}\n\nexport function getSettingsReadonlyArgsDecoder(): Decoder<SettingsReadonlyArgs> {\n return getStructDecoder([\n [\"accountMeta\", getCompressedAccountMetaReadOnlyDecoder()],\n [\"data\", getCompressedSettingsDecoder()],\n ]);\n}\n\nexport function getSettingsReadonlyArgsCodec(): Codec<\n SettingsReadonlyArgsArgs,\n SettingsReadonlyArgs\n> {\n return combineCodec(\n getSettingsReadonlyArgsEncoder(),\n getSettingsReadonlyArgsDecoder()\n );\n}\n","/**\n * This code was AUTOGENERATED using the Codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun Codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n combineCodec,\n fixDecoderSize,\n fixEncoderSize,\n getArrayDecoder,\n getArrayEncoder,\n getBooleanDecoder,\n getBooleanEncoder,\n getBytesDecoder,\n getBytesEncoder,\n getStructDecoder,\n getStructEncoder,\n getU16Decoder,\n getU16Encoder,\n getU8Decoder,\n getU8Encoder,\n type Codec,\n type Decoder,\n type Encoder,\n type ReadonlyUint8Array,\n} from \"gill\";\n\nexport type TransactionBufferCreateArgs = {\n bufferIndex: number;\n preauthorizeExecution: boolean;\n bufferExtendHashes: Array<ReadonlyUint8Array>;\n finalBufferHash: ReadonlyUint8Array;\n finalBufferSize: number;\n};\n\nexport type TransactionBufferCreateArgsArgs = TransactionBufferCreateArgs;\n\nexport function getTransactionBufferCreateArgsEncoder(): Encoder<TransactionBufferCreateArgsArgs> {\n return getStructEncoder([\n [\"bufferIndex\", getU8Encoder()],\n [\"preauthorizeExecution\", getBooleanEncoder()],\n [\n \"bufferExtendHashes\",\n getArrayEncoder(fixEncoderSize(getBytesEncoder(), 32)),\n ],\n [\"finalBufferHash\", fixEncoderSize(getBytesEncoder(), 32)],\n [\"finalBufferSize\", getU16Encoder()],\n ]);\n}\n\nexport function getTransactionBufferCreateArgsDecoder(): Decoder<TransactionBufferCreateArgs> {\n return getStructDecoder([\n [\"bufferIndex\", getU8Decoder()],\n [\"preauthorizeExecution\", getBooleanDecoder()],\n [\n \"bufferExtendHashes\",\n getArrayDecoder(fixDecoderSize(getBytesDecoder(), 32)),\n ],\n [\"finalBufferHash\", fixDecoderSize(getBytesDecoder(), 32)],\n [\"finalBufferSize\", getU16Decoder()],\n ]);\n}\n\nexport function getTransactionBufferCreateArgsCodec(): Codec<\n TransactionBufferCreateArgsArgs,\n TransactionBufferCreateArgs\n> {\n return combineCodec(\n getTransactionBufferCreateArgsEncoder(),\n getTransactionBufferCreateArgsDecoder()\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 getArrayDecoder,\n getArrayEncoder,\n getStructDecoder,\n getStructEncoder,\n getU8Decoder,\n getU8Encoder,\n type Codec,\n type Decoder,\n type Encoder,\n} from \"gill\";\nimport {\n getCompiledInstructionDecoder,\n getCompiledInstructionEncoder,\n getTransactionMessageAddressTableLookupDecoder,\n getTransactionMessageAddressTableLookupEncoder,\n type CompiledInstruction,\n type CompiledInstructionArgs,\n type TransactionMessageAddressTableLookup,\n type TransactionMessageAddressTableLookupArgs,\n} from \".\";\n\nexport type TransactionMessage = {\n numSigners: number;\n numWritableSigners: number;\n numWritableNonSigners: number;\n numAccountKeys: number;\n instructions: Array<CompiledInstruction>;\n addressTableLookups: Array<TransactionMessageAddressTableLookup>;\n};\n\nexport type TransactionMessageArgs = {\n numSigners: number;\n numWritableSigners: number;\n numWritableNonSigners: number;\n numAccountKeys: number;\n instructions: Array<CompiledInstructionArgs>;\n addressTableLookups: Array<TransactionMessageAddressTableLookupArgs>;\n};\n\nexport function getTransactionMessageEncoder(): Encoder<TransactionMessageArgs> {\n return getStructEncoder([\n [\"numSigners\", getU8Encoder()],\n [\"numWritableSigners\", getU8Encoder()],\n [\"numWritableNonSigners\", getU8Encoder()],\n [\"numAccountKeys\", getU8Encoder()],\n [\"instructions\", getArrayEncoder(getCompiledInstructionEncoder())],\n [\n \"addressTableLookups\",\n getArrayEncoder(getTransactionMessageAddressTableLookupEncoder()),\n ],\n ]);\n}\n\nexport function getTransactionMessageDecoder(): Decoder<TransactionMessage> {\n return getStructDecoder([\n [\"numSigners\", getU8Decoder()],\n [\"numWritableSigners\", getU8Decoder()],\n [\"numWritableNonSigners\", getU8Decoder()],\n [\"numAccountKeys\", getU8Decoder()],\n [\"instructions\", getArrayDecoder(getCompiledInstructionDecoder())],\n [\n \"addressTableLookups\",\n getArrayDecoder(getTransactionMessageAddressTableLookupDecoder()),\n ],\n ]);\n}\n\nexport function getTransactionMessageCodec(): Codec<\n TransactionMessageArgs,\n TransactionMessage\n> {\n return combineCodec(\n getTransactionMessageEncoder(),\n getTransactionMessageDecoder()\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 getBytesDecoder,\n getBytesEncoder,\n getStructDecoder,\n getStructEncoder,\n getU32Decoder,\n getU32Encoder,\n getU8Decoder,\n getU8Encoder,\n type Codec,\n type Decoder,\n type Encoder,\n type ReadonlyUint8Array,\n} from \"gill\";\n\nexport type TransactionMessageAddressTableLookup = {\n lookupTableAddressIndex: number;\n writableIndexes: ReadonlyUint8Array;\n readonlyIndexes: ReadonlyUint8Array;\n};\n\nexport type TransactionMessageAddressTableLookupArgs =\n TransactionMessageAddressTableLookup;\n\nexport function getTransactionMessageAddressTableLookupEncoder(): Encoder<TransactionMessageAddressTableLookupArgs> {\n return getStructEncoder([\n [\"lookupTableAddressIndex\", getU8Encoder()],\n [\n \"writableIndexes\",\n addEncoderSizePrefix(getBytesEncoder(), getU32Encoder()),\n ],\n [\n \"readonlyIndexes\",\n addEncoderSizePrefix(getBytesEncoder(), getU32Encoder()),\n ],\n ]);\n}\n\nexport function getTransactionMessageAddressTableLookupDecoder(): Decoder<TransactionMessageAddressTableLookup> {\n return getStructDecoder([\n [\"lookupTableAddressIndex\", getU8Decoder()],\n [\n \"writableIndexes\",\n addDecoderSizePrefix(getBytesDecoder(), getU32Decoder()),\n ],\n [\n \"readonlyIndexes\",\n addDecoderSizePrefix(getBytesDecoder(), getU32Decoder()),\n ],\n ]);\n}\n\nexport function getTransactionMessageAddressTableLookupCodec(): Codec<\n TransactionMessageAddressTableLookupArgs,\n TransactionMessageAddressTableLookup\n> {\n return combineCodec(\n getTransactionMessageAddressTableLookupEncoder(),\n getTransactionMessageAddressTableLookupDecoder()\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 getAddressDecoder,\n getAddressEncoder,\n getBooleanDecoder,\n getBooleanEncoder,\n getOptionDecoder,\n getOptionEncoder,\n getStructDecoder,\n getStructEncoder,\n getU128Decoder,\n getU128Encoder,\n getU32Decoder,\n getU32Encoder,\n getUtf8Decoder,\n getUtf8Encoder,\n type Address,\n type Codec,\n type Decoder,\n type Encoder,\n type Option,\n type OptionOrNullable,\n} from \"gill\";\nimport {\n getMemberKeyDecoder,\n getMemberKeyEncoder,\n type MemberKey,\n type MemberKeyArgs,\n} from \".\";\n\nexport type User = {\n member: MemberKey;\n domainConfig: Option<Address>;\n isPermanentMember: boolean;\n settingsIndex: Option<bigint>;\n transactionManagerUrl: Option<string>;\n};\n\nexport type UserArgs = {\n member: MemberKeyArgs;\n domainConfig: OptionOrNullable<Address>;\n isPermanentMember: boolean;\n settingsIndex: OptionOrNullable<number | bigint>;\n transactionManagerUrl: OptionOrNullable<string>;\n};\n\nexport function getUserEncoder(): Encoder<UserArgs> {\n return getStructEncoder([\n [\"member\", getMemberKeyEncoder()],\n [\"domainConfig\", getOptionEncoder(getAddressEncoder())],\n [\"isPermanentMember\", getBooleanEncoder()],\n [\"settingsIndex\", getOptionEncoder(getU128Encoder())],\n [\n \"transactionManagerUrl\",\n getOptionEncoder(addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder())),\n ],\n ]);\n}\n\nexport function getUserDecoder(): Decoder<User> {\n return getStructDecoder([\n [\"member\", getMemberKeyDecoder()],\n [\"domainConfig\", getOptionDecoder(getAddressDecoder())],\n [\"isPermanentMember\", getBooleanDecoder()],\n [\"settingsIndex\", getOptionDecoder(getU128Decoder())],\n [\n \"transactionManagerUrl\",\n getOptionDecoder(addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())),\n ],\n ]);\n}\n\nexport function getUserCodec(): Codec<UserArgs, User> {\n return combineCodec(getUserEncoder(), getUserDecoder());\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 getStructDecoder,\n getStructEncoder,\n getU8Decoder,\n getU8Encoder,\n type FixedSizeCodec,\n type FixedSizeDecoder,\n type FixedSizeEncoder,\n} from \"gill\";\nimport {\n getPackedAddressTreeInfoDecoder,\n getPackedAddressTreeInfoEncoder,\n type PackedAddressTreeInfo,\n type PackedAddressTreeInfoArgs,\n} from \".\";\n\nexport type UserCreationArgs = {\n addressTreeInfo: PackedAddressTreeInfo;\n outputStateTreeIndex: number;\n};\n\nexport type UserCreationArgsArgs = {\n addressTreeInfo: PackedAddressTreeInfoArgs;\n outputStateTreeIndex: number;\n};\n\nexport function getUserCreationArgsEncoder(): FixedSizeEncoder<UserCreationArgsArgs> {\n return getStructEncoder([\n [\"addressTreeInfo\", getPackedAddressTreeInfoEncoder()],\n [\"outputStateTreeIndex\", getU8Encoder()],\n ]);\n}\n\nexport function getUserCreationArgsDecoder(): FixedSizeDecoder<UserCreationArgs> {\n return getStructDecoder([\n [\"addressTreeInfo\", getPackedAddressTreeInfoDecoder()],\n [\"outputStateTreeIndex\", getU8Decoder()],\n ]);\n}\n\nexport function getUserCreationArgsCodec(): FixedSizeCodec<\n UserCreationArgsArgs,\n UserCreationArgs\n> {\n return combineCodec(\n getUserCreationArgsEncoder(),\n getUserCreationArgsDecoder()\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 getStructDecoder,\n getStructEncoder,\n type Codec,\n type Decoder,\n type Encoder,\n} from \"gill\";\nimport {\n getCompressedAccountMetaDecoder,\n getCompressedAccountMetaEncoder,\n getUserDecoder,\n getUserEncoder,\n type CompressedAccountMeta,\n type CompressedAccountMetaArgs,\n type User,\n type UserArgs,\n} from \".\";\n\nexport type UserMutArgs = { accountMeta: CompressedAccountMeta; data: User };\n\nexport type UserMutArgsArgs = {\n accountMeta: CompressedAccountMetaArgs;\n data: UserArgs;\n};\n\nexport function getUserMutArgsEncoder(): Encoder<UserMutArgsArgs> {\n return getStructEncoder([\n [\"accountMeta\", getCompressedAccountMetaEncoder()],\n [\"data\", getUserEncoder()],\n ]);\n}\n\nexport function getUserMutArgsDecoder(): Decoder<UserMutArgs> {\n return getStructDecoder([\n [\"accountMeta\", getCompressedAccountMetaDecoder()],\n [\"data\", getUserDecoder()],\n ]);\n}\n\nexport function getUserMutArgsCodec(): Codec<UserMutArgsArgs, UserMutArgs> {\n return combineCodec(getUserMutArgsEncoder(), getUserMutArgsDecoder());\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 getStructDecoder,\n getStructEncoder,\n type Codec,\n type Decoder,\n type Encoder,\n} from \"gill\";\nimport {\n getCompressedAccountMetaReadOnlyDecoder,\n getCompressedAccountMetaReadOnlyEncoder,\n getUserDecoder,\n getUserEncoder,\n type CompressedAccountMetaReadOnly,\n type CompressedAccountMetaReadOnlyArgs,\n type User,\n type UserArgs,\n} from \".\";\n\nexport type UserReadOnlyArgs = {\n accountMeta: CompressedAccountMetaReadOnly;\n data: User;\n};\n\nexport type UserReadOnlyArgsArgs = {\n accountMeta: CompressedAccountMetaReadOnlyArgs;\n data: UserArgs;\n};\n\nexport function getUserReadOnlyArgsEncoder(): Encoder<UserReadOnlyArgsArgs> {\n return getStructEncoder([\n [\"accountMeta\", getCompressedAccountMetaReadOnlyEncoder()],\n [\"data\", getUserEncoder()],\n ]);\n}\n\nexport function getUserReadOnlyArgsDecoder(): Decoder<UserReadOnlyArgs> {\n return getStructDecoder([\n [\"accountMeta\", getCompressedAccountMetaReadOnlyDecoder()],\n [\"data\", getUserDecoder()],\n ]);\n}\n\nexport function getUserReadOnlyArgsCodec(): Codec<\n UserReadOnlyArgsArgs,\n UserReadOnlyArgs\n> {\n return combineCodec(\n getUserReadOnlyArgsEncoder(),\n getUserReadOnlyArgsDecoder()\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 getDiscriminatedUnionDecoder,\n getDiscriminatedUnionEncoder,\n getStructDecoder,\n getStructEncoder,\n getTupleDecoder,\n getTupleEncoder,\n type Codec,\n type Decoder,\n type Encoder,\n type GetDiscriminatedUnionVariant,\n type GetDiscriminatedUnionVariantContent,\n} from \"gill\";\nimport {\n getUserMutArgsDecoder,\n getUserMutArgsEncoder,\n getUserReadOnlyArgsDecoder,\n getUserReadOnlyArgsEncoder,\n type UserMutArgs,\n type UserMutArgsArgs,\n type UserReadOnlyArgs,\n type UserReadOnlyArgsArgs,\n} from \".\";\n\nexport type UserReadOnlyOrMutateArgs =\n | { __kind: \"Read\"; fields: readonly [UserReadOnlyArgs] }\n | { __kind: \"Mutate\"; fields: readonly [UserMutArgs] };\n\nexport type UserReadOnlyOrMutateArgsArgs =\n | { __kind: \"Read\"; fields: readonly [UserReadOnlyArgsArgs] }\n | { __kind: \"Mutate\"; fields: readonly [UserMutArgsArgs] };\n\nexport function getUserReadOnlyOrMutateArgsEncoder(): Encoder<UserReadOnlyOrMutateArgsArgs> {\n return getDiscriminatedUnionEncoder([\n [\n \"Read\",\n getStructEncoder([\n [\"fields\", getTupleEncoder([getUserReadOnlyArgsEncoder()])],\n ]),\n ],\n [\n \"Mutate\",\n getStructEncoder([\n [\"fields\", getTupleEncoder([getUserMutArgsEncoder()])],\n ]),\n ],\n ]);\n}\n\nexport function getUserReadOnlyOrMutateArgsDecoder(): Decoder<UserReadOnlyOrMutateArgs> {\n return getDiscriminatedUnionDecoder([\n [\n \"Read\",\n getStructDecoder([\n [\"fields\", getTupleDecoder([getUserReadOnlyArgsDecoder()])],\n ]),\n ],\n [\n \"Mutate\",\n getStructDecoder([\n [\"fields\", getTupleDecoder([getUserMutArgsDecoder()])],\n ]),\n ],\n ]);\n}\n\nexport function getUserReadOnlyOrMutateArgsCodec(): Codec<\n UserReadOnlyOrMutateArgsArgs,\n UserReadOnlyOrMutateArgs\n> {\n return combineCodec(\n getUserReadOnlyOrMutateArgsEncoder(),\n getUserReadOnlyOrMutateArgsDecoder()\n );\n}\n\n// Data Enum Helpers.\nexport function userReadOnlyOrMutateArgs(\n kind: \"Read\",\n data: GetDiscriminatedUnionVariantContent<\n UserReadOnlyOrMutateArgsArgs,\n \"__kind\",\n \"Read\"\n >[\"fields\"]\n): GetDiscriminatedUnionVariant<UserReadOnlyOrMutateArgsArgs, \"__kind\", \"Read\">;\nexport function userReadOnlyOrMutateArgs(\n kind: \"Mutate\",\n data: GetDiscriminatedUnionVariantContent<\n UserReadOnlyOrMutateArgsArgs,\n \"__kind\",\n \"Mutate\"\n >[\"fields\"]\n): GetDiscriminatedUnionVariant<\n UserReadOnlyOrMutateArgsArgs,\n \"__kind\",\n \"Mutate\"\n>;\nexport function userReadOnlyOrMutateArgs<\n K extends UserReadOnlyOrMutateArgsArgs[\"__kind\"],\n Data,\n>(kind: K, data?: Data) {\n return Array.isArray(data)\n ? { __kind: kind, fields: data }\n : { __kind: kind, ...(data ?? {}) };\n}\n\nexport function isUserReadOnlyOrMutateArgs<\n K extends UserReadOnlyOrMutateArgs[\"__kind\"],\n>(\n kind: K,\n value: UserReadOnlyOrMutateArgs\n): value is UserReadOnlyOrMutateArgs & { __kind: K } {\n return value.__kind === kind;\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 getArrayDecoder,\n getArrayEncoder,\n getBytesDecoder,\n getBytesEncoder,\n getStructDecoder,\n getStructEncoder,\n getU128Decoder,\n getU128Encoder,\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 \"gill\";\nimport {\n getMemberDecoder,\n getMemberEncoder,\n type Member,\n type MemberArgs,\n} from \"../types\";\n\nexport const SETTINGS_DISCRIMINATOR = new Uint8Array([\n 223, 179, 163, 190, 177, 224, 67, 173,\n]);\n\nexport function getSettingsDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 8).encode(SETTINGS_DISCRIMINATOR);\n}\n\nexport type Settings = {\n discriminator: ReadonlyUint8Array;\n index: bigint;\n members: Array<Member>;\n membersLen: number;\n threshold: number;\n multiWalletBump: number;\n bump: number;\n};\n\nexport type SettingsArgs = {\n index: number | bigint;\n members: Array<MemberArgs>;\n membersLen: number;\n threshold: number;\n multiWalletBump: number;\n bump: number;\n};\n\nexport function getSettingsEncoder(): FixedSizeEncoder<SettingsArgs> {\n return transformEncoder(\n getStructEncoder([\n [\"discriminator\", fixEncoderSize(getBytesEncoder(), 8)],\n [\"index\", getU128Encoder()],\n [\"members\", getArrayEncoder(getMemberEncoder(), { size: 4 })],\n [\"membersLen\", getU8Encoder()],\n [\"threshold\", getU8Encoder()],\n [\"multiWalletBump\", getU8Encoder()],\n [\"bump\", getU8Encoder()],\n ]),\n (value) => ({ ...value, discriminator: SETTINGS_DISCRIMINATOR })\n );\n}\n\nexport function getSettingsDecoder(): FixedSizeDecoder<Settings> {\n return getStructDecoder([\n [\"discriminator\", fixDecoderSize(getBytesDecoder(), 8)],\n [\"index\", getU128Decoder()],\n [\"members\", getArrayDecoder(getMemberDecoder(), { size: 4 })],\n [\"membersLen\", getU8Decoder()],\n [\"threshold\", getU8Decoder()],\n [\"multiWalletBump\", getU8Decoder()],\n [\"bump\", getU8Decoder()],\n ]);\n}\n\nexport function getSettingsCodec(): FixedSizeCodec<SettingsArgs, Settings> {\n return combineCodec(getSettingsEncoder(), getSettingsDecoder());\n}\n\nexport function decodeSettings<TAddress extends string = string>(\n encodedAccount: EncodedAccount<TAddress>\n): Account<Settings, TAddress>;\nexport function decodeSettings<TAddress extends string = string>(\n encodedAccount: MaybeEncodedAccount<TAddress>\n): MaybeAccount<Settings, TAddress>;\nexport function decodeSettings<TAddress extends string = string>(\n encodedAccount: EncodedAccount<TAddress> | MaybeEncodedAccount<TAddress>\n): Account<Settings, TAddress> | MaybeAccount<Settings, TAddress> {\n return decodeAccount(\n encodedAccount as MaybeEncodedAccount<TAddress>,\n getSettingsDecoder()\n );\n}\n\nexport async function fetchSettings<TAddress extends string = string>(\n rpc: Parameters<typeof fetchEncodedAccount>[0],\n address: Address<TAddress>,\n config?: FetchAccountConfig\n): Promise<Account<Settings, TAddress>> {\n const maybeAccount = await fetchMaybeSettings(rpc, address, config);\n assertAccountExists(maybeAccount);\n return maybeAccount;\n}\n\nexport async function fetchMaybeSettings<TAddress extends string = string>(\n rpc: Parameters<typeof fetchEncodedAccount>[0],\n address: Address<TAddress>,\n config?: FetchAccountConfig\n): Promise<MaybeAccount<Settings, TAddress>> {\n const maybeAccount = await fetchEncodedAccount(rpc, address, config);\n return decodeSettings(maybeAccount);\n}\n\nexport async function fetchAllSettings(\n rpc: Parameters<typeof fetchEncodedAccounts>[0],\n addresses: Array<Address>,\n config?: FetchAccountsConfig\n): Promise<Account<Settings>[]> {\n const maybeAccounts = await fetchAllMaybeSettings(rpc, addresses, config);\n assertAccountsExist(maybeAccounts);\n return maybeAccounts;\n}\n\nexport async function fetchAllMaybeSettings(\n rpc: Parameters<typeof fetchEncodedAccounts>[0],\n addresses: Array<Address>,\n config?: FetchAccountsConfig\n): Promise<MaybeAccount<Settings>[]> {\n const maybeAccounts = await fetchEncodedAccounts(rpc, addresses, config);\n return maybeAccounts.map((maybeAccount) => decodeSettings(maybeAccount));\n}\n\nexport function getSettingsSize(): number {\n return 168;\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 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 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 \"gill\";\nimport {\n getMemberKeyDecoder,\n getMemberKeyEncoder,\n type MemberKey,\n type MemberKeyArgs,\n} from \"../types\";\n\nexport const TRANSACTION_BUFFER_DISCRIMINATOR = new Uint8Array([\n 90, 36, 35, 219, 93, 225, 110, 96,\n]);\n\nexport function getTransactionBufferDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 8).encode(\n TRANSACTION_BUFFER_DISCRIMINATOR\n );\n}\n\nexport type TransactionBuffer = {\n discriminator: ReadonlyUint8Array;\n /** The multisig settings this belongs to. */\n multiWalletSettings: Address;\n /** The bump for the multi_wallet */\n multiWalletBump: number;\n /** Flag to allow transaction to be executed */\n canExecute: boolean;\n /** Flag to preauthorize execution before sufficient threshold is met */\n preauthorizeExecution: boolean;\n validTill: bigint;\n /** Payer for the transaction buffer */\n payer: Address;\n /** transaction bump */\n bump: number;\n /** Index to seed address derivation */\n bufferIndex: number;\n /** Hash of the final assembled transaction message. */\n finalBufferHash: ReadonlyUint8Array;\n /** The size of the final assembled transaction message. */\n finalBufferSize: number;\n /** Member of the Multisig who created the TransactionBuffer. */\n creator: MemberKey;\n /** Buffer hash for all the buffer extend instruction */\n bufferExtendHashes: Array<ReadonlyUint8Array>;\n /** Members that voted for this transaction */\n voters: Array<MemberKey>;\n /** The buffer of the transaction message. */\n buffer: ReadonlyUint8Array;\n};\n\nexport type TransactionBufferArgs = {\n /** The multisig settings this belongs to. */\n multiWalletSettings: Address;\n /** The bump for the multi_wallet */\n multiWalletBump: number;\n /** Flag to allow transaction to be executed */\n canExecute: boolean;\n /** Flag to preauthorize execution before sufficient threshold is met */\n preauthorizeExecution: boolean;\n validTill: number | bigint;\n /** Payer for the transaction buffer */\n payer: Address;\n /** transaction bump */\n bump: number;\n /** Index to seed address derivation */\n bufferIndex: number;\n /** Hash of the final assembled transaction message. */\n finalBufferHash: ReadonlyUint8Array;\n /** The size of the final assembled transaction message. */\n finalBufferSize: number;\n /** Member of the Multisig who created the TransactionBuffer. */\n creator: MemberKeyArgs;\n /** Buffer hash for all the buffer extend instruction */\n bufferExtendHashes: Array<ReadonlyUint8Array>;\n /** Members that voted for this transaction */\n voters: Array<MemberKeyArgs>;\n /** The buffer of the transaction message. */\n buffer: ReadonlyUint8Array;\n};\n\nexport function getTransactionBufferEncoder(): Encoder<TransactionBufferArgs> {\n return transformEncoder(\n getStructEncoder([\n [\"discriminator\", fixEncoderSize(getBytesEncoder(), 8)],\n [\"multiWalletSettings\", getAddressEncoder()],\n [\"multiWalletBump\", getU8Encoder()],\n [\"canExecute\", getBooleanEncoder()],\n [\"preauthorizeExecution\", getBooleanEncoder()],\n [\"validTill\", getU64Encoder()],\n [\"payer\", getAddressEncoder()],\n [\"bump\", getU8Encoder()],\n [\"bufferIndex\", getU8Encoder()],\n [\"finalBufferHash\", fixEncoderSize(getBytesEncoder(), 32)],\n [\"finalBufferSize\", getU16Encoder()],\n [\"creator\", getMemberKeyEncoder()],\n [\n \"bufferExtendHashes\",\n getArrayEncoder(fixEncoderSize(getBytesEncoder(), 32)),\n ],\n [\"voters\", getArrayEncoder(getMemberKeyEncoder())],\n [\"buffer\", addEncoderSizePrefix(getBytesEncoder(), getU32Encoder())],\n ]),\n (value) => ({ ...value, discriminator: TRANSACTION_BUFFER_DISCRIMINATOR })\n );\n}\n\nexport function getTransactionBufferDecoder(): Decoder<TransactionBuffer> {\n return getStructDecoder([\n [\"discriminator\", fixDecoderSize(getBytesDecoder(), 8)],\n [\"multiWalletSettings\", getAddressDecoder()],\n [\"multiWalletBump\", getU8Decoder()],\n [\"canExecute\", getBooleanDecoder()],\n [\"preauthorizeExecution\", getBooleanDecoder()],\n [\"validTill\", getU64Decoder()],\n [\"payer\", getAddressDecoder()],\n [\"bump\", getU8Decoder()],\n [\"bufferIndex\", getU8Decoder()],\n [\"finalBufferHash\", fixDecoderSize(getBytesDecoder(), 32)],\n [\"finalBufferSize\", getU16Decoder()],\n [\"creator\", getMemberKeyDecoder()],\n [\n \"bufferExtendHashes\",\n getArrayDecoder(fixDecoderSize(getBytesDecoder(), 32)),\n ],\n [\"voters\", getArrayDecoder(getMemberKeyDecoder())],\n [\"buffer\", addDecoderSizePrefix(getBytesDecoder(), getU32Decoder())],\n ]);\n}\n\nexport function getTransactionBufferCodec(): Codec<\n TransactionBufferArgs,\n TransactionBuffer\n> {\n return combineCodec(\n getTransactionBufferEncoder(),\n getTransactionBufferDecoder()\n );\n}\n\nexport function decodeTransactionBuffer<TAddress extends string = string>(\n encodedAccount: EncodedAccount<TAddress>\n): Account<TransactionBuffer, TAddress>;\nexport function decodeTransactionBuffer<TAddress extends string = string>(\n encodedAccount: MaybeEncodedAccount<TAddress>\n): MaybeAccount<TransactionBuffer, TAddress>;\nexport function decodeTransactionBuffer<TAddress extends string = string>(\n encodedAccount: EncodedAccount<TAddress> | MaybeEncodedAccount<TAddress>\n):\n | Account<TransactionBuffer, TAddress>\n | MaybeAccount<TransactionBuffer, TAddress> {\n return decodeAccount(\n encodedAccount as MaybeEncodedAccount<TAddress>,\n getTransactionBufferDecoder()\n );\n}\n\nexport async function fetchTransactionBuffer<TAddress extends string = string>(\n rpc: Parameters<typeof fetchEncodedAccount>[0],\n address: Address<TAddress>,\n config?: FetchAccountConfig\n): Promise<Account<TransactionBuffer, TAddress>> {\n const maybeAccount = await fetchMaybeTransactionBuffer(rpc, address, config);\n assertAccountExists(maybeAccount);\n return maybeAccount;\n}\n\nexport async function fetchMaybeTransactionBuffer<\n TAddress extends string = string,\n>(\n rpc: Parameters<typeof fetchEncodedAccount>[0],\n address: Address<TAddress>,\n config?: FetchAccountConfig\n): Promise<MaybeAccount<TransactionBuffer, TAddress>> {\n const maybeAccount = await fetchEncodedAccount(rpc, address, config);\n return decodeTransactionBuffer(maybeAccount);\n}\n\nexport async function fetchAllTransactionBuffer(\n rpc: Parameters<typeof fetchEncodedAccounts>[0],\n addresses: Array<Address>,\n config?: FetchAccountsConfig\n): Promise<Account<TransactionBuffer>[]> {\n const maybeAccounts = await fetchAllMaybeTransactionBuffer(\n rpc,\n addresses,\n config\n );\n assertAccountsExist(maybeAccounts);\n return maybeAccounts;\n}\n\nexport async function fetchAllMaybeTransactionBuffer(\n rpc: Parameters<typeof fetchEncodedAccounts>[0],\n addresses: Array<Address>,\n config?: FetchAccountsConfig\n): Promise<MaybeAccount<TransactionBuffer>[]> {\n const maybeAccounts = await fetchEncodedAccounts(rpc, addresses, config);\n return maybeAccounts.map((maybeAccount) =>\n decodeTransactionBuffer(maybeAccount)\n );\n}\n","import {\n type AccountMeta,\n type AccountSignerMeta,\n type Address,\n type TransactionSigner,\n} from \"gill\";\n\nexport function parseRemainingAccounts({\n args,\n}: {\n programAddress: Address;\n accounts?: any;\n args?: {\n remainingAccounts: {\n address: Address;\n role: number;\n signer?: TransactionSigner;\n }[];\n };\n}): AccountMeta[] {\n if (!args) {\n return [];\n }\n const { remainingAccounts } = args;\n return remainingAccounts.map((x) =>\n x.signer\n ? ({\n address: x.address,\n role: x.role,\n signer: x.signer,\n } as AccountSignerMeta)\n : ({ address: x.address, role: x.role } as AccountMeta)\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 AccountRole,\n isProgramDerivedAddress,\n isTransactionSigner as kitIsTransactionSigner,\n upgradeRoleToSigner,\n type AccountMeta,\n type AccountSignerMeta,\n type Address,\n type ProgramDerivedAddress,\n type TransactionSigner,\n} from \"gill\";\n\n/**\n * Asserts that the given value is not null or undefined.\n * @internal\n */\nexport function expectSome<T>(value: T | null | undefined): T {\n if (value === null || value === undefined) {\n throw new Error(\"Expected a value but received null or undefined.\");\n }\n return value;\n}\n\n/**\n * Asserts that the given value is a PublicKey.\n * @internal\n */\nexport function expectAddress<T extends string = string>(\n value:\n | Address<T>\n | ProgramDerivedAddress<T>\n | TransactionSigner<T>\n | null\n | undefined\n): Address<T> {\n if (!value) {\n throw new Error(\"Expected a Address.\");\n }\n if (typeof value === \"object\" && \"address\" in value) {\n return value.address;\n }\n if (Array.isArray(value)) {\n return value[0] as Address<T>;\n }\n return value as Address<T>;\n}\n\n/**\n * Asserts that the given value is a PDA.\n * @internal\n */\nexport function expectProgramDerivedAddress<T extends string = string>(\n value:\n | Address<T>\n | ProgramDerivedAddress<T>\n | TransactionSigner<T>\n | null\n | undefined\n): ProgramDerivedAddress<T> {\n if (!value || !Array.isArray(value) || !isProgramDerivedAddress(value)) {\n throw new Error(\"Expected a ProgramDerivedAddress.\");\n }\n return value;\n}\n\n/**\n * Asserts that the given value is a TransactionSigner.\n * @internal\n */\nexport function expectTransactionSigner<T extends string = string>(\n value:\n | Address<T>\n | ProgramDerivedAddress<T>\n | TransactionSigner<T>\n | null\n | undefined\n): TransactionSigner<T> {\n if (!value || !isTransactionSigner(value)) {\n throw new Error(\"Expected a TransactionSigner.\");\n }\n return value;\n}\n\n/**\n * Defines an instruction account to resolve.\n * @internal\n */\nexport type ResolvedAccount<\n T extends string = string,\n U extends\n | Address<T>\n | ProgramDerivedAddress<T>\n | TransactionSigner<T>\n | null =\n | Address<T>\n | ProgramDerivedAddress<T>\n | TransactionSigner<T>\n | null,\n> = {\n isWritable: boolean;\n value: U;\n};\n\n/**\n * Defines an instruction that stores additional bytes on-chain.\n * @internal\n */\nexport type InstructionWithByteDelta = {\n byteDelta: number;\n};\n\n/**\n * Get account metas and signers from resolved accounts.\n * @internal\n */\nexport function getAccountMetaFactory(\n programAddress: Address,\n optionalAccountStrategy: \"omitted\" | \"programId\"\n) {\n return (\n account: ResolvedAccount\n ): AccountMeta | AccountSignerMeta | undefined => {\n if (!account.value) {\n if (optionalAccountStrategy === \"omitted\") return;\n return Object.freeze({\n address: programAddress,\n role: AccountRole.READONLY,\n });\n }\n\n const writableRole = account.isWritable\n ? AccountRole.WRITABLE\n : AccountRole.READONLY;\n return Object.freeze({\n address: expectAddress(account.value),\n role: isTransactionSigner(account.value)\n ? upgradeRoleToSigner(writableRole)\n : writableRole,\n ...(isTransactionSigner(account.value) ? { signer: account.value } : {}),\n });\n };\n}\n\nexport function isTransactionSigner<TAddress extends string = string>(\n value:\n | Address<TAddress>\n | ProgramDerivedAddress<TAddress>\n | TransactionSigner<TAddress>\n): value is TransactionSigner<TAddress> {\n return (\n !!value &&\n typeof value === \"object\" &&\n \"address\" in value &&\n kitIsTransactionSigner(value)\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 getOptionDecoder,\n getOptionEncoder,\n getProgramDerivedAddress,\n getStructDecoder,\n getStructEncoder,\n getU128Decoder,\n getU128Encoder,\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 type WritableSignerAccount,\n} from \"gill\";\nimport { parseRemainingAccounts } from \"../../hooked\";\nimport { MULTI_WALLET_PROGRAM_ADDRESS } from \"../programs\";\nimport {\n expectAddress,\n expectSome,\n getAccountMetaFactory,\n type ResolvedAccount,\n} from \"../shared\";\nimport {\n getConfigActionDecoder,\n getConfigActionEncoder,\n getProofArgsDecoder,\n getProofArgsEncoder,\n type ConfigAction,\n type ConfigActionArgs,\n type ProofArgs,\n type ProofArgsArgs,\n} from \"../types\";\n\nexport const CHANGE_CONFIG_DISCRIMINATOR = new Uint8Array([8]);\n\nexport function getChangeConfigDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 1).encode(\n CHANGE_CONFIG_DISCRIMINATOR\n );\n}\n\nexport type ChangeConfigInstruction<\n TProgram extends string = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n TAccountSettings extends string | AccountMeta<string> = string,\n TAccountPayer extends string | AccountMeta<string> = string,\n TAccountAuthority extends string | AccountMeta<string> = string,\n TAccountSystemProgram extends\n | string\n | AccountMeta<string> = \"11111111111111111111111111111111\",\n TAccountSlotHashSysvar extends\n | string\n | AccountMeta<string> = \"SysvarS1otHashes111111111111111111111111111\",\n TAccountInstructionsSysvar extends\n | string\n | AccountMeta<string> = \"Sysvar1nstructions1111111111111111111111111\",\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountSettings extends string\n ? WritableAccount<TAccountSettings>\n : TAccountSettings,\n TAccountPayer extends string\n ? WritableSignerAccount<TAccountPayer> &\n AccountSignerMeta<TAccountPayer>\n : TAccountPayer,\n TAccountAuthority extends string\n ? ReadonlySignerAccount<TAccountAuthority> &\n AccountSignerMeta<TAccountAuthority>\n : TAccountAuthority,\n TAccountSystemProgram extends string\n ? ReadonlyAccount<TAccountSystemProgram>\n : TAccountSystemProgram,\n TAccountSlotHashSysvar extends string\n ? ReadonlyAccount<TAccountSlotHashSysvar>\n : TAccountSlotHashSysvar,\n TAccountInstructionsSysvar extends string\n ? ReadonlyAccount<TAccountInstructionsSysvar>\n : TAccountInstructionsSysvar,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type ChangeConfigInstructionData = {\n discriminator: ReadonlyUint8Array;\n settingsIndex: bigint;\n configActions: Array<ConfigAction>;\n compressedProofArgs: Option<ProofArgs>;\n};\n\nexport type ChangeConfigInstructionDataArgs = {\n settingsIndex: number | bigint;\n configActions: Array<ConfigActionArgs>;\n compressedProofArgs: OptionOrNullable<ProofArgsArgs>;\n};\n\nexport function getChangeConfigInstructionDataEncoder(): Encoder<ChangeConfigInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n [\"discriminator\", fixEncoderSize(getBytesEncoder(), 1)],\n [\"settingsIndex\", getU128Encoder()],\n [\"configActions\", getArrayEncoder(getConfigActionEncoder())],\n [\"compressedProofArgs\", getOptionEncoder(getProofArgsEncoder())],\n ]),\n (value) => ({ ...value, discriminator: CHANGE_CONFIG_DISCRIMINATOR })\n );\n}\n\nexport function getChangeConfigInstructionDataDecoder(): Decoder<ChangeConfigInstructionData> {\n return getStructDecoder([\n [\"discriminator\", fixDecoderSize(getBytesDecoder(), 1)],\n [\"settingsIndex\", getU128Decoder()],\n [\"configActions\", getArrayDecoder(getConfigActionDecoder())],\n [\"compressedProofArgs\", getOptionDecoder(getProofArgsDecoder())],\n ]);\n}\n\nexport function getChangeConfigInstructionDataCodec(): Codec<\n ChangeConfigInstructionDataArgs,\n ChangeConfigInstructionData\n> {\n return combineCodec(\n getChangeConfigInstructionDataEncoder(),\n getChangeConfigInstructionDataDecoder()\n );\n}\n\nexport type ChangeConfigInstructionExtraArgs = {\n remainingAccounts: Array<{ address: Address; role: number }>;\n};\n\nexport type ChangeConfigAsyncInput<\n TAccountSettings extends string = string,\n TAccountPayer extends string = string,\n TAccountAuthority extends string = string,\n TAccountSystemProgram extends string = string,\n TAccountSlotHashSysvar extends string = string,\n TAccountInstructionsSysvar extends string = string,\n> = {\n settings?: Address<TAccountSettings>;\n payer: TransactionSigner<TAccountPayer>;\n authority?: TransactionSigner<TAccountAuthority>;\n systemProgram?: Address<TAccountSystemProgram>;\n slotHashSysvar?: Address<TAccountSlotHashSysvar>;\n instructionsSysvar?: Address<TAccountInstructionsSysvar>;\n settingsIndex: ChangeConfigInstructionDataArgs[\"settingsIndex\"];\n configActions: ChangeConfigInstructionDataArgs[\"configActions\"];\n compressedProofArgs: ChangeConfigInstructionDataArgs[\"compressedProofArgs\"];\n remainingAccounts: ChangeConfigInstructionExtraArgs[\"remainingAccounts\"];\n};\n\nexport async function getChangeConfigInstructionAsync<\n TAccountSettings extends string,\n TAccountPayer extends string,\n TAccountAuthority extends string,\n TAccountSystemProgram extends string,\n TAccountSlotHashSysvar extends string,\n TAccountInstructionsSysvar extends string,\n TProgramAddress extends Address = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n>(\n input: ChangeConfigAsyncInput<\n TAccountSettings,\n TAccountPayer,\n TAccountAuthority,\n TAccountSystemProgram,\n TAccountSlotHashSysvar,\n TAccountInstructionsSysvar\n >,\n config?: { programAddress?: TProgramAddress }\n): Promise<\n ChangeConfigInstruction<\n TProgramAddress,\n TAccountSettings,\n TAccountPayer,\n TAccountAuthority,\n TAccountSystemProgram,\n TAccountSlotHashSysvar,\n TAccountInstructionsSysvar\n >\n> {\n // Program address.\n const programAddress = config?.programAddress ?? MULTI_WALLET_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n settings: { value: input.settings ?? null, isWritable: true },\n payer: { value: input.payer ?? null, isWritable: true },\n authority: { value: input.authority ?? null, isWritable: false },\n systemProgram: { value: input.systemProgram ?? null, isWritable: false },\n slotHashSysvar: { value: input.slotHashSysvar ?? null, isWritable: false },\n instructionsSysvar: {\n value: input.instructionsSysvar ?? null,\n isWritable: false,\n },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolver scope.\n const resolverScope = { programAddress, accounts, args };\n\n // Resolve default values.\n if (!accounts.settings.value) {\n accounts.settings.value = await getProgramDerivedAddress({\n programAddress,\n seeds: [\n getBytesEncoder().encode(\n new Uint8Array([\n 109, 117, 108, 116, 105, 95, 119, 97, 108, 108, 101, 116,\n ])\n ),\n getU128Encoder().encode(expectSome(args.settingsIndex)),\n ],\n });\n }\n if (!accounts.authority.value) {\n accounts.authority.value = await getProgramDerivedAddress({\n programAddress,\n seeds: [\n getBytesEncoder().encode(\n new Uint8Array([\n 109, 117, 108, 116, 105, 95, 119, 97, 108, 108, 101, 116,\n ])\n ),\n getAddressEncoder().encode(expectAddress(accounts.settings.value)),\n getBytesEncoder().encode(new Uint8Array([118, 97, 117, 108, 116])),\n ],\n });\n }\n if (!accounts.systemProgram.value) {\n accounts.systemProgram.value =\n \"11111111111111111111111111111111\" as Address<\"11111111111111111111111111111111\">;\n }\n if (!accounts.slotHashSysvar.value) {\n accounts.slotHashSysvar.value =\n \"SysvarS1otHashes111111111111111111111111111\" as Address<\"SysvarS1otHashes111111111111111111111111111\">;\n }\n if (!accounts.instructionsSysvar.value) {\n accounts.instructionsSysvar.value =\n \"Sysvar1nstructions1111111111111111111111111\" as Address<\"Sysvar1nstructions1111111111111111111111111\">;\n }\n\n // Remaining accounts.\n const remainingAccounts: AccountMeta[] =\n parseRemainingAccounts(resolverScope);\n\n const getAccountMeta = getAccountMetaFactory(programAddress, \"programId\");\n return Object.freeze({\n accounts: [\n getAccountMeta(accounts.settings),\n getAccountMeta(accounts.payer),\n getAccountMeta(accounts.authority),\n getAccountMeta(accounts.systemProgram),\n getAccountMeta(accounts.slotHashSysvar),\n getAccountMeta(accounts.instructionsSysvar),\n ...remainingAccounts,\n ],\n data: getChangeConfigInstructionDataEncoder().encode(\n args as ChangeConfigInstructionDataArgs\n ),\n programAddress,\n } as ChangeConfigInstruction<\n TProgramAddress,\n TAccountSettings,\n TAccountPayer,\n TAccountAuthority,\n TAccountSystemProgram,\n TAccountSlotHashSysvar,\n TAccountInstructionsSysvar\n >);\n}\n\nexport type ChangeConfigInput<\n TAccountSettings extends string = string,\n TAccountPayer extends string = string,\n TAccountAuthority extends string = string,\n TAccountSystemProgram extends string = string,\n TAccountSlotHashSysvar extends string = string,\n TAccountInstructionsSysvar extends string = string,\n> = {\n settings: Address<TAccountSettings>;\n payer: TransactionSigner<TAccountPayer>;\n authority: TransactionSigner<TAccountAuthority>;\n systemProgram?: Address<TAccountSystemProgram>;\n slotHashSysvar?: Address<TAccountSlotHashSysvar>;\n instructionsSysvar?: Address<TAccountInstructionsSysvar>;\n settingsIndex: ChangeConfigInstructionDataArgs[\"settingsIndex\"];\n configActions: ChangeConfigInstructionDataArgs[\"configActions\"];\n compressedProofArgs: ChangeConfigInstructionDataArgs[\"compressedProofArgs\"];\n remainingAccounts: ChangeConfigInstructionExtraArgs[\"remainingAccounts\"];\n};\n\nexport function getChangeConfigInstruction<\n TAccountSettings extends string,\n TAccountPayer extends string,\n TAccountAuthority extends string,\n TAccountSystemProgram extends string,\n TAccountSlotHashSysvar extends string,\n TAccountInstructionsSysvar extends string,\n TProgramAddress extends Address = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n>(\n input: ChangeConfigInput<\n TAccountSettings,\n TAccountPayer,\n TAccountAuthority,\n TAccountSystemProgram,\n TAccountSlotHashSysvar,\n TAccountInstructionsSysvar\n >,\n config?: { programAddress?: TProgramAddress }\n): ChangeConfigInstruction<\n TProgramAddress,\n TAccountSettings,\n TAccountPayer,\n TAccountAuthority,\n TAccountSystemProgram,\n TAccountSlotHashSysvar,\n TAccountInstructionsSysvar\n> {\n // Program address.\n const programAddress = config?.programAddress ?? MULTI_WALLET_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n settings: { value: input.settings ?? null, isWritable: true },\n payer: { value: input.payer ?? null, isWritable: true },\n authority: { value: input.authority ?? null, isWritable: false },\n systemProgram: { value: input.systemProgram ?? null, isWritable: false },\n slotHashSysvar: { value: input.slotHashSysvar ?? null, isWritable: false },\n instructionsSysvar: {\n value: input.instructionsSysvar ?? null,\n isWritable: false,\n },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolver scope.\n const resolverScope = { programAddress, accounts, args };\n\n // Resolve default values.\n if (!accounts.systemProgram.value) {\n accounts.systemProgram.value =\n \"11111111111111111111111111111111\" as Address<\"11111111111111111111111111111111\">;\n }\n if (!accounts.slotHashSysvar.value) {\n accounts.slotHashSysvar.value =\n \"SysvarS1otHashes111111111111111111111111111\" as Address<\"SysvarS1otHashes111111111111111111111111111\">;\n }\n if (!accounts.instructionsSysvar.value) {\n accounts.instructionsSysvar.value =\n \"Sysvar1nstructions1111111111111111111111111\" as Address<\"Sysvar1nstructions1111111111111111111111111\">;\n }\n\n // Remaining accounts.\n const remainingAccounts: AccountMeta[] =\n parseRemainingAccounts(resolverScope);\n\n const getAccountMeta = getAccountMetaFactory(programAddress, \"programId\");\n return Object.freeze({\n accounts: [\n getAccountMeta(accounts.settings),\n getAccountMeta(accounts.payer),\n getAccountMeta(accounts.authority),\n getAccountMeta(accounts.systemProgram),\n getAccountMeta(accounts.slotHashSysvar),\n getAccountMeta(accounts.instructionsSysvar),\n ...remainingAccounts,\n ],\n data: getChangeConfigInstructionDataEncoder().encode(\n args as ChangeConfigInstructionDataArgs\n ),\n programAddress,\n } as ChangeConfigInstruction<\n TProgramAddress,\n TAccountSettings,\n TAccountPayer,\n TAccountAuthority,\n TAccountSystemProgram,\n TAccountSlotHashSysvar,\n TAccountInstructionsSysvar\n >);\n}\n\nexport type ParsedChangeConfigInstruction<\n TProgram extends string = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n settings: TAccountMetas[0];\n payer: TAccountMetas[1];\n authority: TAccountMetas[2];\n systemProgram: TAccountMetas[3];\n slotHashSysvar?: TAccountMetas[4] | undefined;\n instructionsSysvar?: TAccountMetas[5] | undefined;\n };\n data: ChangeConfigInstructionData;\n};\n\nexport function parseChangeConfigInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>\n): ParsedChangeConfigInstruction<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 const getNextOptionalAccount = () => {\n const accountMeta = getNextAccount();\n return accountMeta.address === MULTI_WALLET_PROGRAM_ADDRESS\n ? undefined\n : accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n settings: getNextAccount(),\n payer: getNextAccount(),\n authority: getNextAccount(),\n systemProgram: getNextAccount(),\n slotHashSysvar: getNextOptionalAccount(),\n instructionsSysvar: getNextOptionalAccount(),\n },\n data: getChangeConfigInstructionDataDecoder().decode(instruction.data),\n };\n}\n","/**\n * This code was AUTOGENERATED using the Codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun Codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n combineCodec,\n fixDecoderSize,\n fixEncoderSize,\n getArrayDecoder,\n getArrayEncoder,\n getBytesDecoder,\n getBytesEncoder,\n getStructDecoder,\n getStructEncoder,\n 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 WritableSignerAccount,\n} from \"gill\";\nimport { parseRemainingAccounts } from \"../../hooked\";\nimport { MULTI_WALLET_PROGRAM_ADDRESS } from \"../programs\";\nimport { getAccountMetaFactory, type ResolvedAccount } from \"../shared\";\nimport {\n getConfigActionDecoder,\n getConfigActionEncoder,\n getProofArgsDecoder,\n getProofArgsEncoder,\n getSettingsMutArgsDecoder,\n getSettingsMutArgsEncoder,\n type ConfigAction,\n type ConfigActionArgs,\n type ProofArgs,\n type ProofArgsArgs,\n type SettingsMutArgs,\n type SettingsMutArgsArgs,\n} from \"../types\";\n\nexport const CHANGE_CONFIG_COMPRESSED_DISCRIMINATOR = new Uint8Array([19]);\n\nexport function getChangeConfigCompressedDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 1).encode(\n CHANGE_CONFIG_COMPRESSED_DISCRIMINATOR\n );\n}\n\nexport type ChangeConfigCompressedInstruction<\n TProgram extends string = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n TAccountPayer extends string | AccountMeta<string> = string,\n TAccountAuthority extends string | AccountMeta<string> = string,\n TAccountSlotHashSysvar extends\n | string\n | AccountMeta<string> = \"SysvarS1otHashes111111111111111111111111111\",\n TAccountInstructionsSysvar extends\n | string\n | AccountMeta<string> = \"Sysvar1nstructions1111111111111111111111111\",\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountPayer extends string\n ? WritableSignerAccount<TAccountPayer> &\n AccountSignerMeta<TAccountPayer>\n : TAccountPayer,\n TAccountAuthority extends string\n ? ReadonlySignerAccount<TAccountAuthority> &\n AccountSignerMeta<TAccountAuthority>\n : TAccountAuthority,\n TAccountSlotHashSysvar extends string\n ? ReadonlyAccount<TAccountSlotHashSysvar>\n : TAccountSlotHashSysvar,\n TAccountInstructionsSysvar extends string\n ? ReadonlyAccount<TAccountInstructionsSysvar>\n : TAccountInstructionsSysvar,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type ChangeConfigCompressedInstructionData = {\n discriminator: ReadonlyUint8Array;\n configActions: Array<ConfigAction>;\n settingsMut: SettingsMutArgs;\n compressedProofArgs: ProofArgs;\n};\n\nexport type ChangeConfigCompressedInstructionDataArgs = {\n configActions: Array<ConfigActionArgs>;\n settingsMut: SettingsMutArgsArgs;\n compressedProofArgs: ProofArgsArgs;\n};\n\nexport function getChangeConfigCompressedInstructionDataEncoder(): Encoder<ChangeConfigCompressedInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n [\"discriminator\", fixEncoderSize(getBytesEncoder(), 1)],\n [\"configActions\", getArrayEncoder(getConfigActionEncoder())],\n [\"settingsMut\", getSettingsMutArgsEncoder()],\n [\"compressedProofArgs\", getProofArgsEncoder()],\n ]),\n (value) => ({\n ...value,\n discriminator: CHANGE_CONFIG_COMPRESSED_DISCRIMINATOR,\n })\n );\n}\n\nexport function getChangeConfigCompressedInstructionDataDecoder(): Decoder<ChangeConfigCompressedInstructionData> {\n return getStructDecoder([\n [\"discriminator\", fixDecoderSize(getBytesDecoder(), 1)],\n [\"configActions\", getArrayDecoder(getConfigActionDecoder())],\n [\"settingsMut\", getSettingsMutArgsDecoder()],\n [\"compressedProofArgs\", getProofArgsDecoder()],\n ]);\n}\n\nexport function getChangeConfigCompressedInstructionDataCodec(): Codec<\n ChangeConfigCompressedInstructionDataArgs,\n ChangeConfigCompressedInstructionData\n> {\n return combineCodec(\n getChangeConfigCompressedInstructionDataEncoder(),\n getChangeConfigCompressedInstructionDataDecoder()\n );\n}\n\nexport type ChangeConfigCompressedInstructionExtraArgs = {\n remainingAccounts: Array<{ address: Address; role: number }>;\n};\n\nexport type ChangeConfigCompressedInput<\n TAccountPayer extends string = string,\n TAccountAuthority extends string = string,\n TAccountSlotHashSysvar extends string = string,\n TAccountInstructionsSysvar extends string = string,\n> = {\n payer: TransactionSigner<TAccountPayer>;\n authority: TransactionSigner<TAccountAuthority>;\n slotHashSysvar?: Address<TAccountSlotHashSysvar>;\n instructionsSysvar?: Address<TAccountInstructionsSysvar>;\n configActions: ChangeConfigCompressedInstructionDataArgs[\"configActions\"];\n settingsMut: ChangeConfigCompressedInstructionDataArgs[\"settingsMut\"];\n compressedProofArgs: ChangeConfigCompressedInstructionDataArgs[\"compressedProofArgs\"];\n remainingAccounts: ChangeConfigCompressedInstructionExtraArgs[\"remainingAccounts\"];\n};\n\nexport function getChangeConfigCompressedInstruction<\n TAccountPayer extends string,\n TAccountAuthority extends string,\n TAccountSlotHashSysvar extends string,\n TAccountInstructionsSysvar extends string,\n TProgramAddress extends Address = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n>(\n input: ChangeConfigCompressedInput<\n TAccountPayer,\n TAccountAuthority,\n TAccountSlotHashSysvar,\n TAccountInstructionsSysvar\n >,\n config?: { programAddress?: TProgramAddress }\n): ChangeConfigCompressedInstruction<\n TProgramAddress,\n TAccountPayer,\n TAccountAuthority,\n TAccountSlotHashSysvar,\n TAccountInstructionsSysvar\n> {\n // Program address.\n const programAddress = config?.programAddress ?? MULTI_WALLET_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n payer: { value: input.payer ?? null, isWritable: true },\n authority: { value: input.authority ?? null, isWritable: false },\n slotHashSysvar: { value: input.slotHashSysvar ?? null, isWritable: false },\n instructionsSysvar: {\n value: input.instructionsSysvar ?? null,\n isWritable: false,\n },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolver scope.\n const resolverScope = { programAddress, accounts, args };\n\n // Resolve default values.\n if (!accounts.slotHashSysvar.value) {\n accounts.slotHashSysvar.value =\n \"SysvarS1otHashes111111111111111111111111111\" as Address<\"SysvarS1otHashes111111111111111111111111111\">;\n }\n if (!accounts.instructionsSysvar.value) {\n accounts.instructionsSysvar.value =\n \"Sysvar1nstructions1111111111111111111111111\" as Address<\"Sysvar1nstructions1111111111111111111111111\">;\n }\n\n // Remaining accounts.\n const remainingAccounts: AccountMeta[] =\n parseRemainingAccounts(resolverScope);\n\n const getAccountMeta = getAccountMetaFactory(programAddress, \"programId\");\n return Object.freeze({\n accounts: [\n getAccountMeta(accounts.payer),\n getAccountMeta(accounts.authority),\n getAccountMeta(accounts.slotHashSysvar),\n getAccountMeta(accounts.instructionsSysvar),\n ...remainingAccounts,\n ],\n data: getChangeConfigCompressedInstructionDataEncoder().encode(\n args as ChangeConfigCompressedInstructionDataArgs\n ),\n programAddress,\n } as ChangeConfigCompressedInstruction<\n TProgramAddress,\n TAccountPayer,\n TAccountAuthority,\n TAccountSlotHashSysvar,\n TAccountInstructionsSysvar\n >);\n}\n\nexport type ParsedChangeConfigCompressedInstruction<\n TProgram extends string = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n payer: TAccountMetas[0];\n authority: TAccountMetas[1];\n slotHashSysvar?: TAccountMetas[2] | undefined;\n instructionsSysvar?: TAccountMetas[3] | undefined;\n };\n data: ChangeConfigCompressedInstructionData;\n};\n\nexport function parseChangeConfigCompressedInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>\n): ParsedChangeConfigCompressedInstruction<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 const getNextOptionalAccount = () => {\n const accountMeta = getNextAccount();\n return accountMeta.address === MULTI_WALLET_PROGRAM_ADDRESS\n ? undefined\n : accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n payer: getNextAccount(),\n authority: getNextAccount(),\n slotHashSysvar: getNextOptionalAccount(),\n instructionsSysvar: getNextOptionalAccount(),\n },\n data: getChangeConfigCompressedInstructionDataDecoder().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 getArrayDecoder,\n getArrayEncoder,\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 ReadonlyUint8Array,\n type TransactionSigner,\n type WritableAccount,\n type WritableSignerAccount,\n} from \"gill\";\nimport { parseRemainingAccounts } from \"../../hooked\";\nimport { MULTI_WALLET_PROGRAM_ADDRESS } from \"../programs\";\nimport { getAccountMetaFactory, type ResolvedAccount } from \"../shared\";\nimport {\n getProofArgsDecoder,\n getProofArgsEncoder,\n getSecp256r1VerifyArgsWithDomainAddressDecoder,\n getSecp256r1VerifyArgsWithDomainAddressEncoder,\n getSettingsCreateOrMutateArgsDecoder,\n getSettingsCreateOrMutateArgsEncoder,\n type ProofArgs,\n type ProofArgsArgs,\n type Secp256r1VerifyArgsWithDomainAddress,\n type Secp256r1VerifyArgsWithDomainAddressArgs,\n type SettingsCreateOrMutateArgs,\n type SettingsCreateOrMutateArgsArgs,\n} from \"../types\";\n\nexport const COMPRESS_SETTINGS_ACCOUNT_DISCRIMINATOR = new Uint8Array([16]);\n\nexport function getCompressSettingsAccountDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 1).encode(\n COMPRESS_SETTINGS_ACCOUNT_DISCRIMINATOR\n );\n}\n\nexport type CompressSettingsAccountInstruction<\n TProgram extends string = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n TAccountSettings extends string | AccountMeta<string> = string,\n TAccountPayer extends string | AccountMeta<string> = string,\n TAccountSlotHashSysvar extends\n | string\n | AccountMeta<string> = \"SysvarS1otHashes111111111111111111111111111\",\n TAccountInstructionsSysvar extends\n | string\n | AccountMeta<string> = \"Sysvar1nstructions1111111111111111111111111\",\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountSettings extends string\n ? WritableAccount<TAccountSettings>\n : TAccountSettings,\n TAccountPayer extends string\n ? WritableSignerAccount<TAccountPayer> &\n AccountSignerMeta<TAccountPayer>\n : TAccountPayer,\n TAccountSlotHashSysvar extends string\n ? ReadonlyAccount<TAccountSlotHashSysvar>\n : TAccountSlotHashSysvar,\n TAccountInstructionsSysvar extends string\n ? ReadonlyAccount<TAccountInstructionsSysvar>\n : TAccountInstructionsSysvar,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type CompressSettingsAccountInstructionData = {\n discriminator: ReadonlyUint8Array;\n compressedProofArgs: ProofArgs;\n settingsArg: SettingsCreateOrMutateArgs;\n secp256r1VerifyArgs: Array<Secp256r1VerifyArgsWithDomainAddress>;\n};\n\nexport type CompressSettingsAccountInstructionDataArgs = {\n compressedProofArgs: ProofArgsArgs;\n settingsArg: SettingsCreateOrMutateArgsArgs;\n secp256r1VerifyArgs: Array<Secp256r1VerifyArgsWithDomainAddressArgs>;\n};\n\nexport function getCompressSettingsAccountInstructionDataEncoder(): Encoder<CompressSettingsAccountInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n [\"discriminator\", fixEncoderSize(getBytesEncoder(), 1)],\n [\"compressedProofArgs\", getProofArgsEncoder()],\n [\"settingsArg\", getSettingsCreateOrMutateArgsEncoder()],\n [\n \"secp256r1VerifyArgs\",\n getArrayEncoder(getSecp256r1VerifyArgsWithDomainAddressEncoder()),\n ],\n ]),\n (value) => ({\n ...value,\n discriminator: COMPRESS_SETTINGS_ACCOUNT_DISCRIMINATOR,\n })\n );\n}\n\nexport function getCompressSettingsAccountInstructionDataDecoder(): Decoder<CompressSettingsAccountInstructionData> {\n return getStructDecoder([\n [\"discriminator\", fixDecoderSize(getBytesDecoder(), 1)],\n [\"compressedProofArgs\", getProofArgsDecoder()],\n [\"settingsArg\", getSettingsCreateOrMutateArgsDecoder()],\n [\n \"secp256r1VerifyArgs\",\n getArrayDecoder(getSecp256r1VerifyArgsWithDomainAddressDecoder()),\n ],\n ]);\n}\n\nexport function getCompressSettingsAccountInstructionDataCodec(): Codec<\n CompressSettingsAccountInstructionDataArgs,\n CompressSettingsAccountInstructionData\n> {\n return combineCodec(\n getCompressSettingsAccountInstructionDataEncoder(),\n getCompressSettingsAccountInstructionDataDecoder()\n );\n}\n\nexport type CompressSettingsAccountInstructionExtraArgs = {\n remainingAccounts: Array<{ address: Address; role: number }>;\n};\n\nexport type CompressSettingsAccountInput<\n TAccountSettings extends string = string,\n TAccountPayer extends string = string,\n TAccountSlotHashSysvar extends string = string,\n TAccountInstructionsSysvar extends string = string,\n> = {\n settings: Address<TAccountSettings>;\n payer: TransactionSigner<TAccountPayer>;\n slotHashSysvar?: Address<TAccountSlotHashSysvar>;\n instructionsSysvar?: Address<TAccountInstructionsSysvar>;\n compressedProofArgs: CompressSettingsAccountInstructionDataArgs[\"compressedProofArgs\"];\n settingsArg: CompressSettingsAccountInstructionDataArgs[\"settingsArg\"];\n secp256r1VerifyArgs: CompressSettingsAccountInstructionDataArgs[\"secp256r1VerifyArgs\"];\n remainingAccounts: CompressSettingsAccountInstructionExtraArgs[\"remainingAccounts\"];\n};\n\nexport function getCompressSettingsAccountInstruction<\n TAccountSettings extends string,\n TAccountPayer extends string,\n TAccountSlotHashSysvar extends string,\n TAccountInstructionsSysvar extends string,\n TProgramAddress extends Address = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n>(\n input: CompressSettingsAccountInput<\n TAccountSettings,\n TAccountPayer,\n TAccountSlotHashSysvar,\n TAccountInstructionsSysvar\n >,\n config?: { programAddress?: TProgramAddress }\n): CompressSettingsAccountInstruction<\n TProgramAddress,\n TAccountSettings,\n TAccountPayer,\n TAccountSlotHashSysvar,\n TAccountInstructionsSysvar\n> {\n // Program address.\n const programAddress = config?.programAddress ?? MULTI_WALLET_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n settings: { value: input.settings ?? null, isWritable: true },\n payer: { value: input.payer ?? null, isWritable: true },\n slotHashSysvar: { value: input.slotHashSysvar ?? null, isWritable: false },\n instructionsSysvar: {\n value: input.instructionsSysvar ?? null,\n isWritable: false,\n },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolver scope.\n const resolverScope = { programAddress, accounts, args };\n\n // Resolve default values.\n if (!accounts.slotHashSysvar.value) {\n accounts.slotHashSysvar.value =\n \"SysvarS1otHashes111111111111111111111111111\" as Address<\"SysvarS1otHashes111111111111111111111111111\">;\n }\n if (!accounts.instructionsSysvar.value) {\n accounts.instructionsSysvar.value =\n \"Sysvar1nstructions1111111111111111111111111\" as Address<\"Sysvar1nstructions1111111111111111111111111\">;\n }\n\n // Remaining accounts.\n const remainingAccounts: AccountMeta[] =\n parseRemainingAccounts(resolverScope);\n\n const getAccountMeta = getAccountMetaFactory(programAddress, \"programId\");\n return Object.freeze({\n accounts: [\n getAccountMeta(accounts.settings),\n getAccountMeta(accounts.payer),\n getAccountMeta(accounts.slotHashSysvar),\n getAccountMeta(accounts.instructionsSysvar),\n ...remainingAccounts,\n ],\n data: getCompressSettingsAccountInstructionDataEncoder().encode(\n args as CompressSettingsAccountInstructionDataArgs\n ),\n programAddress,\n } as CompressSettingsAccountInstruction<\n TProgramAddress,\n TAccountSettings,\n TAccountPayer,\n TAccountSlotHashSysvar,\n TAccountInstructionsSysvar\n >);\n}\n\nexport type ParsedCompressSettingsAccountInstruction<\n TProgram extends string = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n settings: TAccountMetas[0];\n payer: TAccountMetas[1];\n slotHashSysvar?: TAccountMetas[2] | undefined;\n instructionsSysvar: TAccountMetas[3];\n };\n data: CompressSettingsAccountInstructionData;\n};\n\nexport function parseCompressSettingsAccountInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>\n): ParsedCompressSettingsAccountInstruction<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 const getNextOptionalAccount = () => {\n const accountMeta = getNextAccount();\n return accountMeta.address === MULTI_WALLET_PROGRAM_ADDRESS\n ? undefined\n : accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n settings: getNextAccount(),\n payer: getNextAccount(),\n slotHashSysvar: getNextOptionalAccount(),\n instructionsSysvar: getNextAccount(),\n },\n data: getCompressSettingsAccountInstructionDataDecoder().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 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 \"gill\";\nimport { parseRemainingAccounts } from \"../../hooked\";\nimport { MULTI_WALLET_PROGRAM_ADDRESS } from \"../programs\";\nimport { getAccountMetaFactory, type ResolvedAccount } from \"../shared\";\n\nexport const CREATE_DOMAIN_CONFIG_DISCRIMINATOR = new Uint8Array([0]);\n\nexport function getCreateDomainConfigDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 1).encode(\n CREATE_DOMAIN_CONFIG_DISCRIMINATOR\n );\n}\n\nexport type CreateDomainConfigInstruction<\n TProgram extends string = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n TAccountDomainConfig extends string | AccountMeta<string> = string,\n TAccountPayer extends string | AccountMeta<string> = string,\n TAccountSystemProgram extends\n | string\n | AccountMeta<string> = \"11111111111111111111111111111111\",\n TAccountAdminDomainConfig extends string | AccountMeta<string> = string,\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountDomainConfig extends string\n ? WritableAccount<TAccountDomainConfig>\n : TAccountDomainConfig,\n TAccountPayer extends string\n ? WritableSignerAccount<TAccountPayer> &\n AccountSignerMeta<TAccountPayer>\n : TAccountPayer,\n TAccountSystemProgram extends string\n ? ReadonlyAccount<TAccountSystemProgram>\n : TAccountSystemProgram,\n TAccountAdminDomainConfig extends string\n ? ReadonlyAccount<TAccountAdminDomainConfig>\n : TAccountAdminDomainConfig,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type CreateDomainConfigInstructionData = {\n discriminator: ReadonlyUint8Array;\n rpId: string;\n origins: Array<string>;\n authority: Address;\n metadataUrl: string;\n};\n\nexport type CreateDomainConfigInstructionDataArgs = {\n rpId: string;\n origins: Array<string>;\n authority: Address;\n metadataUrl: string;\n};\n\nexport function getCreateDomainConfigInstructionDataEncoder(): Encoder<CreateDomainConfigInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n [\"discriminator\", fixEncoderSize(getBytesEncoder(), 1)],\n [\"rpId\", addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder())],\n [\n \"origins\",\n getArrayEncoder(\n addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder())\n ),\n ],\n [\"authority\", getAddressEncoder()],\n [\"metadataUrl\", addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder())],\n ]),\n (value) => ({ ...value, discriminator: CREATE_DOMAIN_CONFIG_DISCRIMINATOR })\n );\n}\n\nexport function getCreateDomainConfigInstructionDataDecoder(): Decoder<CreateDomainConfigInstructionData> {\n return getStructDecoder([\n [\"discriminator\", fixDecoderSize(getBytesDecoder(), 1)],\n [\"rpId\", addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())],\n [\n \"origins\",\n getArrayDecoder(addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())),\n ],\n [\"authority\", getAddressDecoder()],\n [\"metadataUrl\", addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())],\n ]);\n}\n\nexport function getCreateDomainConfigInstructionDataCodec(): Codec<\n CreateDomainConfigInstructionDataArgs,\n CreateDomainConfigInstructionData\n> {\n return combineCodec(\n getCreateDomainConfigInstructionDataEncoder(),\n getCreateDomainConfigInstructionDataDecoder()\n );\n}\n\nexport type CreateDomainConfigInstructionExtraArgs = {\n remainingAccounts: Array<{ address: Address; role: number }>;\n};\n\nexport type CreateDomainConfigInput<\n TAccountDomainConfig extends string = string,\n TAccountPayer extends string = string,\n TAccountSystemProgram extends string = string,\n TAccountAdminDomainConfig extends string = string,\n> = {\n domainConfig: Address<TAccountDomainConfig>;\n payer: TransactionSigner<TAccountPayer>;\n systemProgram?: Address<TAccountSystemProgram>;\n adminDomainConfig?: Address<TAccountAdminDomainConfig>;\n rpId: CreateDomainConfigInstructionDataArgs[\"rpId\"];\n origins: CreateDomainConfigInstructionDataArgs[\"origins\"];\n authority: CreateDomainConfigInstructionDataArgs[\"authority\"];\n metadataUrl: CreateDomainConfigInstructionDataArgs[\"metadataUrl\"];\n remainingAccounts: CreateDomainConfigInstructionExtraArgs[\"remainingAccounts\"];\n};\n\nexport function getCreateDomainConfigInstruction<\n TAccountDomainConfig extends string,\n TAccountPayer extends string,\n TAccountSystemProgram extends string,\n TAccountAdminDomainConfig extends string,\n TProgramAddress extends Address = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n>(\n input: CreateDomainConfigInput<\n TAccountDomainConfig,\n TAccountPayer,\n TAccountSystemProgram,\n TAccountAdminDomainConfig\n >,\n config?: { programAddress?: TProgramAddress }\n): CreateDomainConfigInstruction<\n TProgramAddress,\n TAccountDomainConfig,\n TAccountPayer,\n TAccountSystemProgram,\n TAccountAdminDomainConfig\n> {\n // Program address.\n const programAddress = config?.programAddress ?? MULTI_WALLET_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n domainConfig: { value: input.domainConfig ?? null, isWritable: true },\n payer: { value: input.payer ?? null, isWritable: true },\n systemProgram: { value: input.systemProgram ?? null, isWritable: false },\n adminDomainConfig: {\n value: input.adminDomainConfig ?? null,\n isWritable: false,\n },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolver scope.\n const resolverScope = { programAddress, accounts, args };\n\n // Resolve default values.\n if (!accounts.systemProgram.value) {\n accounts.systemProgram.value =\n \"11111111111111111111111111111111\" as Address<\"11111111111111111111111111111111\">;\n }\n\n // Remaining accounts.\n const remainingAccounts: AccountMeta[] =\n parseRemainingAccounts(resolverScope);\n\n const getAccountMeta = getAccountMetaFactory(programAddress, \"programId\");\n return Object.freeze({\n accounts: [\n getAccountMeta(accounts.domainConfig),\n getAccountMeta(accounts.payer),\n getAccountMeta(accounts.systemProgram),\n getAccountMeta(accounts.adminDomainConfig),\n ...remainingAccounts,\n ],\n data: getCreateDomainConfigInstructionDataEncoder().encode(\n args as CreateDomainConfigInstructionDataArgs\n ),\n programAddress,\n } as CreateDomainConfigInstruction<\n TProgramAddress,\n TAccountDomainConfig,\n TAccountPayer,\n TAccountSystemProgram,\n TAccountAdminDomainConfig\n >);\n}\n\nexport type ParsedCreateDomainConfigInstruction<\n TProgram extends string = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n domainConfig: TAccountMetas[0];\n payer: TAccountMetas[1];\n systemProgram: TAccountMetas[2];\n adminDomainConfig?: TAccountMetas[3] | undefined;\n };\n data: CreateDomainConfigInstructionData;\n};\n\nexport function parseCreateDomainConfigInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>\n): ParsedCreateDomainConfigInstruction<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 const getNextOptionalAccount = () => {\n const accountMeta = getNextAccount();\n return accountMeta.address === MULTI_WALLET_PROGRAM_ADDRESS\n ? undefined\n : accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n domainConfig: getNextAccount(),\n payer: getNextAccount(),\n systemProgram: getNextAccount(),\n adminDomainConfig: getNextOptionalAccount(),\n },\n data: getCreateDomainConfigInstructionDataDecoder().decode(\n instruction.data\n ),\n };\n}\n","/**\n * This code was AUTOGENERATED using the Codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun Codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n combineCodec,\n fixDecoderSize,\n fixEncoderSize,\n getBooleanDecoder,\n getBooleanEncoder,\n getBytesDecoder,\n getBytesEncoder,\n getOptionDecoder,\n getOptionEncoder,\n getStructDecoder,\n getStructEncoder,\n transformEncoder,\n type AccountMeta,\n type AccountSignerMeta,\n type Address,\n type Codec,\n type Decoder,\n type Encoder,\n type Instruction,\n type InstructionWithAccounts,\n type InstructionWithData,\n type Option,\n type OptionOrNullable,\n type ReadonlyAccount,\n type ReadonlySignerAccount,\n type ReadonlyUint8Array,\n type TransactionSigner,\n type WritableSignerAccount,\n} from \"gill\";\nimport { parseRemainingAccounts } from \"../../hooked\";\nimport { MULTI_WALLET_PROGRAM_ADDRESS } from \"../programs\";\nimport { getAccountMetaFactory, type ResolvedAccount } from \"../shared\";\nimport {\n getLinkWalletArgsDecoder,\n getLinkWalletArgsEncoder,\n getProofArgsDecoder,\n getProofArgsEncoder,\n getSecp256r1PubkeyDecoder,\n getSecp256r1PubkeyEncoder,\n getUserCreationArgsDecoder,\n getUserCreationArgsEncoder,\n type LinkWalletArgs,\n type LinkWalletArgsArgs,\n type ProofArgs,\n type ProofArgsArgs,\n type Secp256r1Pubkey,\n type Secp256r1PubkeyArgs,\n type UserCreationArgs,\n type UserCreationArgsArgs,\n} from \"../types\";\n\nexport const CREATE_DOMAIN_USER_ACCOUNT_DISCRIMINATOR = new Uint8Array([4]);\n\nexport function getCreateDomainUserAccountDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 1).encode(\n CREATE_DOMAIN_USER_ACCOUNT_DISCRIMINATOR\n );\n}\n\nexport type CreateDomainUserAccountInstruction<\n TProgram extends string = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n TAccountPayer extends string | AccountMeta<string> = string,\n TAccountDomainConfig 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 TAccountPayer extends string\n ? WritableSignerAccount<TAccountPayer> &\n AccountSignerMeta<TAccountPayer>\n : TAccountPayer,\n TAccountDomainConfig extends string\n ? ReadonlyAccount<TAccountDomainConfig>\n : TAccountDomainConfig,\n TAccountAuthority extends string\n ? ReadonlySignerAccount<TAccountAuthority> &\n AccountSignerMeta<TAccountAuthority>\n : TAccountAuthority,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type CreateDomainUserAccountInstructionData = {\n discriminator: ReadonlyUint8Array;\n compressedProofArgs: ProofArgs;\n member: Secp256r1Pubkey;\n isPermanentMember: boolean;\n userAccountCreationArgs: UserCreationArgs;\n linkWalletArgs: Option<LinkWalletArgs>;\n};\n\nexport type CreateDomainUserAccountInstructionDataArgs = {\n compressedProofArgs: ProofArgsArgs;\n member: Secp256r1PubkeyArgs;\n isPermanentMember: boolean;\n userAccountCreationArgs: UserCreationArgsArgs;\n linkWalletArgs: OptionOrNullable<LinkWalletArgsArgs>;\n};\n\nexport function getCreateDomainUserAccountInstructionDataEncoder(): Encoder<CreateDomainUserAccountInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n [\"discriminator\", fixEncoderSize(getBytesEncoder(), 1)],\n [\"compressedProofArgs\", getProofArgsEncoder()],\n [\"member\", getSecp256r1PubkeyEncoder()],\n [\"isPermanentMember\", getBooleanEncoder()],\n [\"userAccountCreationArgs\", getUserCreationArgsEncoder()],\n [\"linkWalletArgs\", getOptionEncoder(getLinkWalletArgsEncoder())],\n ]),\n (value) => ({\n ...value,\n discriminator: CREATE_DOMAIN_USER_ACCOUNT_DISCRIMINATOR,\n })\n );\n}\n\nexport function getCreateDomainUserAccountInstructionDataDecoder(): Decoder<CreateDomainUserAccountInstructionData> {\n return getStructDecoder([\n [\"discriminator\", fixDecoderSize(getBytesDecoder(), 1)],\n [\"compressedProofArgs\", getProofArgsDecoder()],\n [\"member\", getSecp256r1PubkeyDecoder()],\n [\"isPermanentMember\", getBooleanDecoder()],\n [\"userAccountCreationArgs\", getUserCreationArgsDecoder()],\n [\"linkWalletArgs\", getOptionDecoder(getLinkWalletArgsDecoder())],\n ]);\n}\n\nexport function getCreateDomainUserAccountInstructionDataCodec(): Codec<\n CreateDomainUserAccountInstructionDataArgs,\n CreateDomainUserAccountInstructionData\n> {\n return combineCodec(\n getCreateDomainUserAccountInstructionDataEncoder(),\n getCreateDomainUserAccountInstructionDataDecoder()\n );\n}\n\nexport type CreateDomainUserAccountInstructionExtraArgs = {\n remainingAccounts: Array<{ address: Address; role: number }>;\n};\n\nexport type CreateDomainUserAccountInput<\n TAccountPayer extends string = string,\n TAccountDomainConfig extends string = string,\n TAccountAuthority extends string = string,\n> = {\n payer: TransactionSigner<TAccountPayer>;\n domainConfig: Address<TAccountDomainConfig>;\n authority: TransactionSigner<TAccountAuthority>;\n compressedProofArgs: CreateDomainUserAccountInstructionDataArgs[\"compressedProofArgs\"];\n member: CreateDomainUserAccountInstructionDataArgs[\"member\"];\n isPermanentMember: CreateDomainUserAccountInstructionDataArgs[\"isPermanentMember\"];\n userAccountCreationArgs: CreateDomainUserAccountInstructionDataArgs[\"userAccountCreationArgs\"];\n linkWalletArgs: CreateDomainUserAccountInstructionDataArgs[\"linkWalletArgs\"];\n remainingAccounts: CreateDomainUserAccountInstructionExtraArgs[\"remainingAccounts\"];\n};\n\nexport function getCreateDomainUserAccountInstruction<\n TAccountPayer extends string,\n TAccountDomainConfig extends string,\n TAccountAuthority extends string,\n TProgramAddress extends Address = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n>(\n input: CreateDomainUserAccountInput<\n TAccountPayer,\n TAccountDomainConfig,\n TAccountAuthority\n >,\n config?: { programAddress?: TProgramAddress }\n): CreateDomainUserAccountInstruction<\n TProgramAddress,\n TAccountPayer,\n TAccountDomainConfig,\n TAccountAuthority\n> {\n // Program address.\n const programAddress = config?.programAddress ?? MULTI_WALLET_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n payer: { value: input.payer ?? null, isWritable: true },\n domainConfig: { value: input.domainConfig ?? null, isWritable: false },\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 // Resolver scope.\n const resolverScope = { programAddress, accounts, args };\n\n // Remaining accounts.\n const remainingAccounts: AccountMeta[] =\n parseRemainingAccounts(resolverScope);\n\n const getAccountMeta = getAccountMetaFactory(programAddress, \"programId\");\n return Object.freeze({\n accounts: [\n getAccountMeta(accounts.payer),\n getAccountMeta(accounts.domainConfig),\n getAccountMeta(accounts.authority),\n ...remainingAccounts,\n ],\n data: getCreateDomainUserAccountInstructionDataEncoder().encode(\n args as CreateDomainUserAccountInstructionDataArgs\n ),\n programAddress,\n } as CreateDomainUserAccountInstruction<\n TProgramAddress,\n TAccountPayer,\n TAccountDomainConfig,\n TAccountAuthority\n >);\n}\n\nexport type ParsedCreateDomainUserAccountInstruction<\n TProgram extends string = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n payer: TAccountMetas[0];\n domainConfig: TAccountMetas[1];\n authority: TAccountMetas[2];\n };\n data: CreateDomainUserAccountInstructionData;\n};\n\nexport function parseCreateDomainUserAccountInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>\n): ParsedCreateDomainUserAccountInstruction<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 payer: getNextAccount(),\n domainConfig: getNextAccount(),\n authority: getNextAccount(),\n },\n data: getCreateDomainUserAccountInstructionDataDecoder().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 \"gill\";\nimport { parseRemainingAccounts } from \"../../hooked\";\nimport { MULTI_WALLET_PROGRAM_ADDRESS } from \"../programs\";\nimport { getAccountMetaFactory, type ResolvedAccount } from \"../shared\";\n\nexport const CREATE_GLOBAL_COUNTER_DISCRIMINATOR = new Uint8Array([3]);\n\nexport function getCreateGlobalCounterDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 1).encode(\n CREATE_GLOBAL_COUNTER_DISCRIMINATOR\n );\n}\n\nexport type CreateGlobalCounterInstruction<\n TProgram extends string = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n TAccountGlobalCounter extends string | AccountMeta<string> = string,\n TAccountPayer extends string | AccountMeta<string> = string,\n TAccountSystemProgram extends\n | string\n | AccountMeta<string> = \"11111111111111111111111111111111\",\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountGlobalCounter extends string\n ? WritableAccount<TAccountGlobalCounter>\n : TAccountGlobalCounter,\n TAccountPayer extends string\n ? WritableSignerAccount<TAccountPayer> &\n AccountSignerMeta<TAccountPayer>\n : TAccountPayer,\n TAccountSystemProgram extends string\n ? ReadonlyAccount<TAccountSystemProgram>\n : TAccountSystemProgram,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type CreateGlobalCounterInstructionData = {\n discriminator: ReadonlyUint8Array;\n};\n\nexport type CreateGlobalCounterInstructionDataArgs = {};\n\nexport function getCreateGlobalCounterInstructionDataEncoder(): FixedSizeEncoder<CreateGlobalCounterInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([[\"discriminator\", fixEncoderSize(getBytesEncoder(), 1)]]),\n (value) => ({\n ...value,\n discriminator: CREATE_GLOBAL_COUNTER_DISCRIMINATOR,\n })\n );\n}\n\nexport function getCreateGlobalCounterInstructionDataDecoder(): FixedSizeDecoder<CreateGlobalCounterInstructionData> {\n return getStructDecoder([\n [\"discriminator\", fixDecoderSize(getBytesDecoder(), 1)],\n ]);\n}\n\nexport function getCreateGlobalCounterInstructionDataCodec(): FixedSizeCodec<\n CreateGlobalCounterInstructionDataArgs,\n CreateGlobalCounterInstructionData\n> {\n return combineCodec(\n getCreateGlobalCounterInstructionDataEncoder(),\n getCreateGlobalCounterInstructionDataDecoder()\n );\n}\n\nexport type CreateGlobalCounterInstructionExtraArgs = {\n remainingAccounts: Array<{ address: Address; role: number }>;\n};\n\nexport type CreateGlobalCounterAsyncInput<\n TAccountGlobalCounter extends string = string,\n TAccountPayer extends string = string,\n TAccountSystemProgram extends string = string,\n> = {\n globalCounter?: Address<TAccountGlobalCounter>;\n payer: TransactionSigner<TAccountPayer>;\n systemProgram?: Address<TAccountSystemProgram>;\n remainingAccounts: CreateGlobalCounterInstructionExtraArgs[\"remainingAccounts\"];\n};\n\nexport async function getCreateGlobalCounterInstructionAsync<\n TAccountGlobalCounter extends string,\n TAccountPayer extends string,\n TAccountSystemProgram extends string,\n TProgramAddress extends Address = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n>(\n input: CreateGlobalCounterAsyncInput<\n TAccountGlobalCounter,\n TAccountPayer,\n TAccountSystemProgram\n >,\n config?: { programAddress?: TProgramAddress }\n): Promise<\n CreateGlobalCounterInstruction<\n TProgramAddress,\n TAccountGlobalCounter,\n TAccountPayer,\n TAccountSystemProgram\n >\n> {\n // Program address.\n const programAddress = config?.programAddress ?? MULTI_WALLET_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n globalCounter: { value: input.globalCounter ?? null, isWritable: true },\n payer: { value: input.payer ?? 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 // Resolver scope.\n const resolverScope = { programAddress, accounts };\n\n // Resolve default values.\n if (!accounts.globalCounter.value) {\n accounts.globalCounter.value = await getProgramDerivedAddress({\n programAddress,\n seeds: [\n getBytesEncoder().encode(\n new Uint8Array([\n 103, 108, 111, 98, 97, 108, 95, 99, 111, 117, 110, 116, 101, 114,\n ])\n ),\n ],\n });\n }\n if (!accounts.systemProgram.value) {\n accounts.systemProgram.value =\n \"11111111111111111111111111111111\" as Address<\"11111111111111111111111111111111\">;\n }\n\n // Remaining accounts.\n const remainingAccounts: AccountMeta[] =\n parseRemainingAccounts(resolverScope);\n\n const getAccountMeta = getAccountMetaFactory(programAddress, \"programId\");\n return Object.freeze({\n accounts: [\n getAccountMeta(accounts.globalCounter),\n getAccountMeta(accounts.payer),\n getAccountMeta(accounts.systemProgram),\n ...remainingAccounts,\n ],\n data: getCreateGlobalCounterInstructionDataEncoder().encode({}),\n programAddress,\n } as CreateGlobalCounterInstruction<\n TProgramAddress,\n TAccountGlobalCounter,\n TAccountPayer,\n TAccountSystemProgram\n >);\n}\n\nexport type CreateGlobalCounterInput<\n TAccountGlobalCounter extends string = string,\n TAccountPayer extends string = string,\n TAccountSystemProgram extends string = string,\n> = {\n globalCounter: Address<TAccountGlobalCounter>;\n payer: TransactionSigner<TAccountPayer>;\n systemProgram?: Address<TAccountSystemProgram>;\n remainingAccounts: CreateGlobalCounterInstructionExtraArgs[\"remainingAccounts\"];\n};\n\nexport function getCreateGlobalCounterInstruction<\n TAccountGlobalCounter extends string,\n TAccountPayer extends string,\n TAccountSystemProgram extends string,\n TProgramAddress extends Address = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n>(\n input: CreateGlobalCounterInput<\n TAccountGlobalCounter,\n TAccountPayer,\n TAccountSystemProgram\n >,\n config?: { programAddress?: TProgramAddress }\n): CreateGlobalCounterInstruction<\n TProgramAddress,\n TAccountGlobalCounter,\n TAccountPayer,\n TAccountSystemProgram\n> {\n // Program address.\n const programAddress = config?.programAddress ?? MULTI_WALLET_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n globalCounter: { value: input.globalCounter ?? null, isWritable: true },\n payer: { value: input.payer ?? 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 // Resolver scope.\n const resolverScope = { programAddress, accounts };\n\n // Resolve default values.\n if (!accounts.systemProgram.value) {\n accounts.systemProgram.value =\n \"11111111111111111111111111111111\" as Address<\"11111111111111111111111111111111\">;\n }\n\n // Remaining accounts.\n const remainingAccounts: AccountMeta[] =\n parseRemainingAccounts(resolverScope);\n\n const getAccountMeta = getAccountMetaFactory(programAddress, \"programId\");\n return Object.freeze({\n accounts: [\n getAccountMeta(accounts.globalCounter),\n getAccountMeta(accounts.payer),\n getAccountMeta(accounts.systemProgram),\n ...remainingAccounts,\n ],\n data: getCreateGlobalCounterInstructionDataEncoder().encode({}),\n programAddress,\n } as CreateGlobalCounterInstruction<\n TProgramAddress,\n TAccountGlobalCounter,\n TAccountPayer,\n TAccountSystemProgram\n >);\n}\n\nexport type ParsedCreateGlobalCounterInstruction<\n TProgram extends string = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n globalCounter: TAccountMetas[0];\n payer: TAccountMetas[1];\n systemProgram: TAccountMetas[2];\n };\n data: CreateGlobalCounterInstructionData;\n};\n\nexport function parseCreateGlobalCounterInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>\n): ParsedCreateGlobalCounterInstruction<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 globalCounter: getNextAccount(),\n payer: getNextAccount(),\n systemProgram: getNextAccount(),\n },\n data: getCreateGlobalCounterInstructionDataDecoder().decode(\n instruction.data\n ),\n };\n}\n","/**\n * This code was AUTOGENERATED using the Codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun Codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n combineCodec,\n fixDecoderSize,\n fixEncoderSize,\n getBooleanDecoder,\n getBooleanEncoder,\n getBytesDecoder,\n getBytesEncoder,\n getOptionDecoder,\n getOptionEncoder,\n getProgramDerivedAddress,\n getStructDecoder,\n getStructEncoder,\n getU128Decoder,\n getU128Encoder,\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 type WritableSignerAccount,\n} from \"gill\";\nimport { parseRemainingAccounts } from \"../../hooked\";\nimport { MULTI_WALLET_PROGRAM_ADDRESS } from \"../programs\";\nimport {\n expectSome,\n getAccountMetaFactory,\n type ResolvedAccount,\n} from \"../shared\";\nimport {\n getProofArgsDecoder,\n getProofArgsEncoder,\n getSecp256r1VerifyArgsDecoder,\n getSecp256r1VerifyArgsEncoder,\n getUserMutArgsDecoder,\n getUserMutArgsEncoder,\n type ProofArgs,\n type ProofArgsArgs,\n type Secp256r1VerifyArgs,\n type Secp256r1VerifyArgsArgs,\n type UserMutArgs,\n type UserMutArgsArgs,\n} from \"../types\";\n\nexport const CREATE_MULTI_WALLET_DISCRIMINATOR = new Uint8Array([7]);\n\nexport function getCreateMultiWalletDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 1).encode(\n CREATE_MULTI_WALLET_DISCRIMINATOR\n );\n}\n\nexport type CreateMultiWalletInstruction<\n TProgram extends string = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n TAccountSettings extends string | AccountMeta<string> = string,\n TAccountPayer extends string | AccountMeta<string> = string,\n TAccountInitialMember extends string | AccountMeta<string> = string,\n TAccountSystemProgram extends\n | string\n | AccountMeta<string> = \"11111111111111111111111111111111\",\n TAccountSlotHashSysvar extends\n | string\n | AccountMeta<string> = \"SysvarS1otHashes111111111111111111111111111\",\n TAccountInstructionsSysvar extends\n | string\n | AccountMeta<string> = \"Sysvar1nstructions1111111111111111111111111\",\n TAccountDomainConfig extends string | AccountMeta<string> = string,\n TAccountGlobalCounter extends string | AccountMeta<string> = string,\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountSettings extends string\n ? WritableAccount<TAccountSettings>\n : TAccountSettings,\n TAccountPayer extends string\n ? WritableSignerAccount<TAccountPayer> &\n AccountSignerMeta<TAccountPayer>\n : TAccountPayer,\n TAccountInitialMember extends string\n ? ReadonlySignerAccount<TAccountInitialMember> &\n AccountSignerMeta<TAccountInitialMember>\n : TAccountInitialMember,\n TAccountSystemProgram extends string\n ? ReadonlyAccount<TAccountSystemProgram>\n : TAccountSystemProgram,\n TAccountSlotHashSysvar extends string\n ? ReadonlyAccount<TAccountSlotHashSysvar>\n : TAccountSlotHashSysvar,\n TAccountInstructionsSysvar extends string\n ? ReadonlyAccount<TAccountInstructionsSysvar>\n : TAccountInstructionsSysvar,\n TAccountDomainConfig extends string\n ? ReadonlyAccount<TAccountDomainConfig>\n : TAccountDomainConfig,\n TAccountGlobalCounter extends string\n ? WritableAccount<TAccountGlobalCounter>\n : TAccountGlobalCounter,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type CreateMultiWalletInstructionData = {\n discriminator: ReadonlyUint8Array;\n settingsIndex: bigint;\n secp256r1VerifyArgs: Option<Secp256r1VerifyArgs>;\n userMutArgs: UserMutArgs;\n compressedProofArgs: ProofArgs;\n setAsDelegate: boolean;\n};\n\nexport type CreateMultiWalletInstructionDataArgs = {\n settingsIndex: number | bigint;\n secp256r1VerifyArgs: OptionOrNullable<Secp256r1VerifyArgsArgs>;\n userMutArgs: UserMutArgsArgs;\n compressedProofArgs: ProofArgsArgs;\n setAsDelegate: boolean;\n};\n\nexport function getCreateMultiWalletInstructionDataEncoder(): Encoder<CreateMultiWalletInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n [\"discriminator\", fixEncoderSize(getBytesEncoder(), 1)],\n [\"settingsIndex\", getU128Encoder()],\n [\n \"secp256r1VerifyArgs\",\n getOptionEncoder(getSecp256r1VerifyArgsEncoder()),\n ],\n [\"userMutArgs\", getUserMutArgsEncoder()],\n [\"compressedProofArgs\", getProofArgsEncoder()],\n [\"setAsDelegate\", getBooleanEncoder()],\n ]),\n (value) => ({ ...value, discriminator: CREATE_MULTI_WALLET_DISCRIMINATOR })\n );\n}\n\nexport function getCreateMultiWalletInstructionDataDecoder(): Decoder<CreateMultiWalletInstructionData> {\n return getStructDecoder([\n [\"discriminator\", fixDecoderSize(getBytesDecoder(), 1)],\n [\"settingsIndex\", getU128Decoder()],\n [\"secp256r1VerifyArgs\", getOptionDecoder(getSecp256r1VerifyArgsDecoder())],\n [\"userMutArgs\", getUserMutArgsDecoder()],\n [\"compressedProofArgs\", getProofArgsDecoder()],\n [\"setAsDelegate\", getBooleanDecoder()],\n ]);\n}\n\nexport function getCreateMultiWalletInstructionDataCodec(): Codec<\n CreateMultiWalletInstructionDataArgs,\n CreateMultiWalletInstructionData\n> {\n return combineCodec(\n getCreateMultiWalletInstructionDataEncoder(),\n getCreateMultiWalletInstructionDataDecoder()\n );\n}\n\nexport type CreateMultiWalletInstructionExtraArgs = {\n remainingAccounts: Array<{ address: Address; role: number }>;\n};\n\nexport type CreateMultiWalletAsyncInput<\n TAccountSettings extends string = string,\n TAccountPayer extends string = string,\n TAccountInitialMember extends string = string,\n TAccountSystemProgram extends string = string,\n TAccountSlotHashSysvar extends string = string,\n TAccountInstructionsSysvar extends string = string,\n TAccountDomainConfig extends string = string,\n TAccountGlobalCounter extends string = string,\n> = {\n settings?: Address<TAccountSettings>;\n payer: TransactionSigner<TAccountPayer>;\n initialMember?: TransactionSigner<TAccountInitialMember>;\n systemProgram?: Address<TAccountSystemProgram>;\n slotHashSysvar?: Address<TAccountSlotHashSysvar>;\n instructionsSysvar?: Address<TAccountInstructionsSysvar>;\n domainConfig?: Address<TAccountDomainConfig>;\n globalCounter: Address<TAccountGlobalCounter>;\n settingsIndex: CreateMultiWalletInstructionDataArgs[\"settingsIndex\"];\n secp256r1VerifyArgs: CreateMultiWalletInstructionDataArgs[\"secp256r1VerifyArgs\"];\n userMutArgs: CreateMultiWalletInstructionDataArgs[\"userMutArgs\"];\n compressedProofArgs: CreateMultiWalletInstructionDataArgs[\"compressedProofArgs\"];\n setAsDelegate: CreateMultiWalletInstructionDataArgs[\"setAsDelegate\"];\n remainingAccounts: CreateMultiWalletInstructionExtraArgs[\"remainingAccounts\"];\n};\n\nexport async function getCreateMultiWalletInstructionAsync<\n TAccountSettings extends string,\n TAccountPayer extends string,\n TAccountInitialMember extends string,\n TAccountSystemProgram extends string,\n TAccountSlotHashSysvar extends string,\n TAccountInstructionsSysvar extends string,\n TAccountDomainConfig extends string,\n TAccountGlobalCounter extends string,\n TProgramAddress extends Address = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n>(\n input: CreateMultiWalletAsyncInput<\n TAccountSettings,\n TAccountPayer,\n TAccountInitialMember,\n TAccountSystemProgram,\n TAccountSlotHashSysvar,\n TAccountInstructionsSysvar,\n TAccountDomainConfig,\n TAccountGlobalCounter\n >,\n config?: { programAddress?: TProgramAddress }\n): Promise<\n CreateMultiWalletInstruction<\n TProgramAddress,\n TAccountSettings,\n TAccountPayer,\n TAccountInitialMember,\n TAccountSystemProgram,\n TAccountSlotHashSysvar,\n TAccountInstructionsSysvar,\n TAccountDomainConfig,\n TAccountGlobalCounter\n >\n> {\n // Program address.\n const programAddress = config?.programAddress ?? MULTI_WALLET_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n settings: { value: input.settings ?? null, isWritable: true },\n payer: { value: input.payer ?? null, isWritable: true },\n initialMember: { value: input.initialMember ?? null, isWritable: false },\n systemProgram: { value: input.systemProgram ?? null, isWritable: false },\n slotHashSysvar: { value: input.slotHashSysvar ?? null, isWritable: false },\n instructionsSysvar: {\n value: input.instructionsSysvar ?? null,\n isWritable: false,\n },\n domainConfig: { value: input.domainConfig ?? null, isWritable: false },\n globalCounter: { value: input.globalCounter ?? 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 // Resolver scope.\n const resolverScope = { programAddress, accounts, args };\n\n // Resolve default values.\n if (!accounts.settings.value) {\n accounts.settings.value = await getProgramDerivedAddress({\n programAddress,\n seeds: [\n getBytesEncoder().encode(\n new Uint8Array([\n 109, 117, 108, 116, 105, 95, 119, 97, 108, 108, 101, 116,\n ])\n ),\n getU128Encoder().encode(expectSome(args.settingsIndex)),\n ],\n });\n }\n if (!accounts.systemProgram.value) {\n accounts.systemProgram.value =\n \"11111111111111111111111111111111\" as Address<\"11111111111111111111111111111111\">;\n }\n if (!accounts.slotHashSysvar.value) {\n accounts.slotHashSysvar.value =\n \"SysvarS1otHashes111111111111111111111111111\" as Address<\"SysvarS1otHashes111111111111111111111111111\">;\n }\n if (!accounts.instructionsSysvar.value) {\n accounts.instructionsSysvar.value =\n \"Sysvar1nstructions1111111111111111111111111\" as Address<\"Sysvar1nstructions1111111111111111111111111\">;\n }\n\n // Remaining accounts.\n const remainingAccounts: AccountMeta[] =\n parseRemainingAccounts(resolverScope);\n\n const getAccountMeta = getAccountMetaFactory(programAddress, \"programId\");\n return Object.freeze({\n accounts: [\n getAccountMeta(accounts.settings),\n getAccountMeta(accounts.payer),\n getAccountMeta(accounts.initialMember),\n getAccountMeta(accounts.systemProgram),\n getAccountMeta(accounts.slotHashSysvar),\n getAccountMeta(accounts.instructionsSysvar),\n getAccountMeta(accounts.domainConfig),\n getAccountMeta(accounts.globalCounter),\n ...remainingAccounts,\n ],\n data: getCreateMultiWalletInstructionDataEncoder().encode(\n args as CreateMultiWalletInstructionDataArgs\n ),\n programAddress,\n } as CreateMultiWalletInstruction<\n TProgramAddress,\n TAccountSettings,\n TAccountPayer,\n TAccountInitialMember,\n TAccountSystemProgram,\n TAccountSlotHashSysvar,\n TAccountInstructionsSysvar,\n TAccountDomainConfig,\n TAccountGlobalCounter\n >);\n}\n\nexport type CreateMultiWalletInput<\n TAccountSettings extends string = string,\n TAccountPayer extends string = string,\n TAccountInitialMember extends string = string,\n TAccountSystemProgram extends string = string,\n TAccountSlotHashSysvar extends string = string,\n TAccountInstructionsSysvar extends string = string,\n TAccountDomainConfig extends string = string,\n TAccountGlobalCounter extends string = string,\n> = {\n settings: Address<TAccountSettings>;\n payer: TransactionSigner<TAccountPayer>;\n initialMember?: TransactionSigner<TAccountInitialMember>;\n systemProgram?: Address<TAccountSystemProgram>;\n slotHashSysvar?: Address<TAccountSlotHashSysvar>;\n instructionsSysvar?: Address<TAccountInstructionsSysvar>;\n domainConfig?: Address<TAccountDomainConfig>;\n globalCounter: Address<TAccountGlobalCounter>;\n settingsIndex: CreateMultiWalletInstructionDataArgs[\"settingsIndex\"];\n secp256r1VerifyArgs: CreateMultiWalletInstructionDataArgs[\"secp256r1VerifyArgs\"];\n userMutArgs: CreateMultiWalletInstructionDataArgs[\"userMutArgs\"];\n compressedProofArgs: CreateMultiWalletInstructionDataArgs[\"compressedProofArgs\"];\n setAsDelegate: CreateMultiWalletInstructionDataArgs[\"setAsDelegate\"];\n remainingAccounts: CreateMultiWalletInstructionExtraArgs[\"remainingAccounts\"];\n};\n\nexport function getCreateMultiWalletInstruction<\n TAccountSettings extends string,\n TAccountPayer extends string,\n TAccountInitialMember extends string,\n TAccountSystemProgram extends string,\n TAccountSlotHashSysvar extends string,\n TAccountInstructionsSysvar extends string,\n TAccountDomainConfig extends string,\n TAccountGlobalCounter extends string,\n TProgramAddress extends Address = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n>(\n input: CreateMultiWalletInput<\n TAccountSettings,\n TAccountPayer,\n TAccountInitialMember,\n TAccountSystemProgram,\n TAccountSlotHashSysvar,\n TAccountInstructionsSysvar,\n TAccountDomainConfig,\n TAccountGlobalCounter\n >,\n config?: { programAddress?: TProgramAddress }\n): CreateMultiWalletInstruction<\n TProgramAddress,\n TAccountSettings,\n TAccountPayer,\n TAccountInitialMember,\n TAccountSystemProgram,\n TAccountSlotHashSysvar,\n TAccountInstructionsSysvar,\n TAccountDomainConfig,\n TAccountGlobalCounter\n> {\n // Program address.\n const programAddress = config?.programAddress ?? MULTI_WALLET_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n settings: { value: input.settings ?? null, isWritable: true },\n payer: { value: input.payer ?? null, isWritable: true },\n initialMember: { value: input.initialMember ?? null, isWritable: false },\n systemProgram: { value: input.systemProgram ?? null, isWritable: false },\n slotHashSysvar: { value: input.slotHashSysvar ?? null, isWritable: false },\n instructionsSysvar: {\n value: input.instructionsSysvar ?? null,\n isWritable: false,\n },\n domainConfig: { value: input.domainConfig ?? null, isWritable: false },\n globalCounter: { value: input.globalCounter ?? 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 // Resolver scope.\n const resolverScope = { programAddress, accounts, args };\n\n // Resolve default values.\n if (!accounts.systemProgram.value) {\n accounts.systemProgram.value =\n \"11111111111111111111111111111111\" as Address<\"11111111111111111111111111111111\">;\n }\n if (!accounts.slotHashSysvar.value) {\n accounts.slotHashSysvar.value =\n \"SysvarS1otHashes111111111111111111111111111\" as Address<\"SysvarS1otHashes111111111111111111111111111\">;\n }\n if (!accounts.instructionsSysvar.value) {\n accounts.instructionsSysvar.value =\n \"Sysvar1nstructions1111111111111111111111111\" as Address<\"Sysvar1nstructions1111111111111111111111111\">;\n }\n\n // Remaining accounts.\n const remainingAccounts: AccountMeta[] =\n parseRemainingAccounts(resolverScope);\n\n const getAccountMeta = getAccountMetaFactory(programAddress, \"programId\");\n return Object.freeze({\n accounts: [\n getAccountMeta(accounts.settings),\n getAccountMeta(accounts.payer),\n getAccountMeta(accounts.initialMember),\n getAccountMeta(accounts.systemProgram),\n getAccountMeta(accounts.slotHashSysvar),\n getAccountMeta(accounts.instructionsSysvar),\n getAccountMeta(accounts.domainConfig),\n getAccountMeta(accounts.globalCounter),\n ...remainingAccounts,\n ],\n data: getCreateMultiWalletInstructionDataEncoder().encode(\n args as CreateMultiWalletInstructionDataArgs\n ),\n programAddress,\n } as CreateMultiWalletInstruction<\n TProgramAddress,\n TAccountSettings,\n TAccountPayer,\n TAccountInitialMember,\n TAccountSystemProgram,\n TAccountSlotHashSysvar,\n TAccountInstructionsSysvar,\n TAccountDomainConfig,\n TAccountGlobalCounter\n >);\n}\n\nexport type ParsedCreateMultiWalletInstruction<\n TProgram extends string = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n settings: TAccountMetas[0];\n payer: TAccountMetas[1];\n initialMember?: TAccountMetas[2] | undefined;\n systemProgram: TAccountMetas[3];\n slotHashSysvar?: TAccountMetas[4] | undefined;\n instructionsSysvar?: TAccountMetas[5] | undefined;\n domainConfig?: TAccountMetas[6] | undefined;\n globalCounter: TAccountMetas[7];\n };\n data: CreateMultiWalletInstructionData;\n};\n\nexport function parseCreateMultiWalletInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>\n): ParsedCreateMultiWalletInstruction<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 const getNextOptionalAccount = () => {\n const accountMeta = getNextAccount();\n return accountMeta.address === MULTI_WALLET_PROGRAM_ADDRESS\n ? undefined\n : accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n settings: getNextAccount(),\n payer: getNextAccount(),\n initialMember: getNextOptionalAccount(),\n systemProgram: getNextAccount(),\n slotHashSysvar: getNextOptionalAccount(),\n instructionsSysvar: getNextOptionalAccount(),\n domainConfig: getNextOptionalAccount(),\n globalCounter: getNextAccount(),\n },\n data: getCreateMultiWalletInstructionDataDecoder().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 getBooleanDecoder,\n getBooleanEncoder,\n getBytesDecoder,\n getBytesEncoder,\n getOptionDecoder,\n getOptionEncoder,\n getStructDecoder,\n getStructEncoder,\n getU128Decoder,\n getU128Encoder,\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 type WritableSignerAccount,\n} from \"gill\";\nimport { parseRemainingAccounts } from \"../../hooked\";\nimport { MULTI_WALLET_PROGRAM_ADDRESS } from \"../programs\";\nimport { getAccountMetaFactory, type ResolvedAccount } from \"../shared\";\nimport {\n getProofArgsDecoder,\n getProofArgsEncoder,\n getSecp256r1VerifyArgsDecoder,\n getSecp256r1VerifyArgsEncoder,\n getSettingsCreationArgsDecoder,\n getSettingsCreationArgsEncoder,\n getUserMutArgsDecoder,\n getUserMutArgsEncoder,\n type ProofArgs,\n type ProofArgsArgs,\n type Secp256r1VerifyArgs,\n type Secp256r1VerifyArgsArgs,\n type SettingsCreationArgs,\n type SettingsCreationArgsArgs,\n type UserMutArgs,\n type UserMutArgsArgs,\n} from \"../types\";\n\nexport const CREATE_MULTI_WALLET_COMPRESSED_DISCRIMINATOR = new Uint8Array([\n 18,\n]);\n\nexport function getCreateMultiWalletCompressedDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 1).encode(\n CREATE_MULTI_WALLET_COMPRESSED_DISCRIMINATOR\n );\n}\n\nexport type CreateMultiWalletCompressedInstruction<\n TProgram extends string = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n TAccountPayer extends string | AccountMeta<string> = string,\n TAccountInitialMember extends string | AccountMeta<string> = string,\n TAccountSystemProgram extends\n | string\n | AccountMeta<string> = \"11111111111111111111111111111111\",\n TAccountSlotHashSysvar extends\n | string\n | AccountMeta<string> = \"SysvarS1otHashes111111111111111111111111111\",\n TAccountInstructionsSysvar extends\n | string\n | AccountMeta<string> = \"Sysvar1nstructions1111111111111111111111111\",\n TAccountDomainConfig extends string | AccountMeta<string> = string,\n TAccountGlobalCounter extends string | AccountMeta<string> = string,\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountPayer extends string\n ? WritableSignerAccount<TAccountPayer> &\n AccountSignerMeta<TAccountPayer>\n : TAccountPayer,\n TAccountInitialMember extends string\n ? ReadonlySignerAccount<TAccountInitialMember> &\n AccountSignerMeta<TAccountInitialMember>\n : TAccountInitialMember,\n TAccountSystemProgram extends string\n ? ReadonlyAccount<TAccountSystemProgram>\n : TAccountSystemProgram,\n TAccountSlotHashSysvar extends string\n ? ReadonlyAccount<TAccountSlotHashSysvar>\n : TAccountSlotHashSysvar,\n TAccountInstructionsSysvar extends string\n ? ReadonlyAccount<TAccountInstructionsSysvar>\n : TAccountInstructionsSysvar,\n TAccountDomainConfig extends string\n ? ReadonlyAccount<TAccountDomainConfig>\n : TAccountDomainConfig,\n TAccountGlobalCounter extends string\n ? WritableAccount<TAccountGlobalCounter>\n : TAccountGlobalCounter,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type CreateMultiWalletCompressedInstructionData = {\n discriminator: ReadonlyUint8Array;\n secp256r1VerifyArgs: Option<Secp256r1VerifyArgs>;\n compressedProofArgs: ProofArgs;\n settingsCreation: SettingsCreationArgs;\n userMutArgs: UserMutArgs;\n settingsIndex: bigint;\n setAsDelegate: boolean;\n};\n\nexport type CreateMultiWalletCompressedInstructionDataArgs = {\n secp256r1VerifyArgs: OptionOrNullable<Secp256r1VerifyArgsArgs>;\n compressedProofArgs: ProofArgsArgs;\n settingsCreation: SettingsCreationArgsArgs;\n userMutArgs: UserMutArgsArgs;\n settingsIndex: number | bigint;\n setAsDelegate: boolean;\n};\n\nexport function getCreateMultiWalletCompressedInstructionDataEncoder(): Encoder<CreateMultiWalletCompressedInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n [\"discriminator\", fixEncoderSize(getBytesEncoder(), 1)],\n [\n \"secp256r1VerifyArgs\",\n getOptionEncoder(getSecp256r1VerifyArgsEncoder()),\n ],\n [\"compressedProofArgs\", getProofArgsEncoder()],\n [\"settingsCreation\", getSettingsCreationArgsEncoder()],\n [\"userMutArgs\", getUserMutArgsEncoder()],\n [\"settingsIndex\", getU128Encoder()],\n [\"setAsDelegate\", getBooleanEncoder()],\n ]),\n (value) => ({\n ...value,\n discriminator: CREATE_MULTI_WALLET_COMPRESSED_DISCRIMINATOR,\n })\n );\n}\n\nexport function getCreateMultiWalletCompressedInstructionDataDecoder(): Decoder<CreateMultiWalletCompressedInstructionData> {\n return getStructDecoder([\n [\"discriminator\", fixDecoderSize(getBytesDecoder(), 1)],\n [\"secp256r1VerifyArgs\", getOptionDecoder(getSecp256r1VerifyArgsDecoder())],\n [\"compressedProofArgs\", getProofArgsDecoder()],\n [\"settingsCreation\", getSettingsCreationArgsDecoder()],\n [\"userMutArgs\", getUserMutArgsDecoder()],\n [\"settingsIndex\", getU128Decoder()],\n [\"setAsDelegate\", getBooleanDecoder()],\n ]);\n}\n\nexport function getCreateMultiWalletCompressedInstructionDataCodec(): Codec<\n CreateMultiWalletCompressedInstructionDataArgs,\n CreateMultiWalletCompressedInstructionData\n> {\n return combineCodec(\n getCreateMultiWalletCompressedInstructionDataEncoder(),\n getCreateMultiWalletCompressedInstructionDataDecoder()\n );\n}\n\nexport type CreateMultiWalletCompressedInstructionExtraArgs = {\n remainingAccounts: Array<{ address: Address; role: number }>;\n};\n\nexport type CreateMultiWalletCompressedInput<\n TAccountPayer extends string = string,\n TAccountInitialMember extends string = string,\n TAccountSystemProgram extends string = string,\n TAccountSlotHashSysvar extends string = string,\n TAccountInstructionsSysvar extends string = string,\n TAccountDomainConfig extends string = string,\n TAccountGlobalCounter extends string = string,\n> = {\n payer: TransactionSigner<TAccountPayer>;\n initialMember?: TransactionSigner<TAccountInitialMember>;\n systemProgram?: Address<TAccountSystemProgram>;\n slotHashSysvar?: Address<TAccountSlotHashSysvar>;\n instructionsSysvar?: Address<TAccountInstructionsSysvar>;\n domainConfig?: Address<TAccountDomainConfig>;\n globalCounter: Address<TAccountGlobalCounter>;\n secp256r1VerifyArgs: CreateMultiWalletCompressedInstructionDataArgs[\"secp256r1VerifyArgs\"];\n compressedProofArgs: CreateMultiWalletCompressedInstructionDataArgs[\"compressedProofArgs\"];\n settingsCreation: CreateMultiWalletCompressedInstructionDataArgs[\"settingsCreation\"];\n userMutArgs: CreateMultiWalletCompressedInstructionDataArgs[\"userMutArgs\"];\n settingsIndex: CreateMultiWalletCompressedInstructionDataArgs[\"settingsIndex\"];\n setAsDelegate: CreateMultiWalletCompressedInstructionDataArgs[\"setAsDelegate\"];\n remainingAccounts: CreateMultiWalletCompressedInstructionExtraArgs[\"remainingAccounts\"];\n};\n\nexport function getCreateMultiWalletCompressedInstruction<\n TAccountPayer extends string,\n TAccountInitialMember extends string,\n TAccountSystemProgram extends string,\n TAccountSlotHashSysvar extends string,\n TAccountInstructionsSysvar extends string,\n TAccountDomainConfig extends string,\n TAccountGlobalCounter extends string,\n TProgramAddress extends Address = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n>(\n input: CreateMultiWalletCompressedInput<\n TAccountPayer,\n TAccountInitialMember,\n TAccountSystemProgram,\n TAccountSlotHashSysvar,\n TAccountInstructionsSysvar,\n TAccountDomainConfig,\n TAccountGlobalCounter\n >,\n config?: { programAddress?: TProgramAddress }\n): CreateMultiWalletCompressedInstruction<\n TProgramAddress,\n TAccountPayer,\n TAccountInitialMember,\n TAccountSystemProgram,\n TAccountSlotHashSysvar,\n TAccountInstructionsSysvar,\n TAccountDomainConfig,\n TAccountGlobalCounter\n> {\n // Program address.\n const programAddress = config?.programAddress ?? MULTI_WALLET_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n payer: { value: input.payer ?? null, isWritable: true },\n initialMember: { value: input.initialMember ?? null, isWritable: false },\n systemProgram: { value: input.systemProgram ?? null, isWritable: false },\n slotHashSysvar: { value: input.slotHashSysvar ?? null, isWritable: false },\n instructionsSysvar: {\n value: input.instructionsSysvar ?? null,\n isWritable: false,\n },\n domainConfig: { value: input.domainConfig ?? null, isWritable: false },\n globalCounter: { value: input.globalCounter ?? 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 // Resolver scope.\n const resolverScope = { programAddress, accounts, args };\n\n // Resolve default values.\n if (!accounts.systemProgram.value) {\n accounts.systemProgram.value =\n \"11111111111111111111111111111111\" as Address<\"11111111111111111111111111111111\">;\n }\n if (!accounts.slotHashSysvar.value) {\n accounts.slotHashSysvar.value =\n \"SysvarS1otHashes111111111111111111111111111\" as Address<\"SysvarS1otHashes111111111111111111111111111\">;\n }\n if (!accounts.instructionsSysvar.value) {\n accounts.instructionsSysvar.value =\n \"Sysvar1nstructions1111111111111111111111111\" as Address<\"Sysvar1nstructions1111111111111111111111111\">;\n }\n\n // Remaining accounts.\n const remainingAccounts: AccountMeta[] =\n parseRemainingAccounts(resolverScope);\n\n const getAccountMeta = getAccountMetaFactory(programAddress, \"programId\");\n return Object.freeze({\n accounts: [\n getAccountMeta(accounts.payer),\n getAccountMeta(accounts.initialMember),\n getAccountMeta(accounts.systemProgram),\n getAccountMeta(accounts.slotHashSysvar),\n getAccountMeta(accounts.instructionsSysvar),\n getAccountMeta(accounts.domainConfig),\n getAccountMeta(accounts.globalCounter),\n ...remainingAccounts,\n ],\n data: getCreateMultiWalletCompressedInstructionDataEncoder().encode(\n args as CreateMultiWalletCompressedInstructionDataArgs\n ),\n programAddress,\n } as CreateMultiWalletCompressedInstruction<\n TProgramAddress,\n TAccountPayer,\n TAccountInitialMember,\n TAccountSystemProgram,\n TAccountSlotHashSysvar,\n TAccountInstructionsSysvar,\n TAccountDomainConfig,\n TAccountGlobalCounter\n >);\n}\n\nexport type ParsedCreateMultiWalletCompressedInstruction<\n TProgram extends string = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n payer: TAccountMetas[0];\n initialMember?: TAccountMetas[1] | undefined;\n systemProgram: TAccountMetas[2];\n slotHashSysvar?: TAccountMetas[3] | undefined;\n instructionsSysvar?: TAccountMetas[4] | undefined;\n domainConfig?: TAccountMetas[5] | undefined;\n globalCounter: TAccountMetas[6];\n };\n data: CreateMultiWalletCompressedInstructionData;\n};\n\nexport function parseCreateMultiWalletCompressedInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>\n): ParsedCreateMultiWalletCompressedInstruction<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 const getNextOptionalAccount = () => {\n const accountMeta = getNextAccount();\n return accountMeta.address === MULTI_WALLET_PROGRAM_ADDRESS\n ? undefined\n : accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n payer: getNextAccount(),\n initialMember: getNextOptionalAccount(),\n systemProgram: getNextAccount(),\n slotHashSysvar: getNextOptionalAccount(),\n instructionsSysvar: getNextOptionalAccount(),\n domainConfig: getNextOptionalAccount(),\n globalCounter: getNextAccount(),\n },\n data: getCreateMultiWalletCompressedInstructionDataDecoder().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 getArrayDecoder,\n getArrayEncoder,\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 ReadonlyUint8Array,\n type TransactionSigner,\n type WritableSignerAccount,\n} from \"gill\";\nimport { parseRemainingAccounts } from \"../../hooked\";\nimport { MULTI_WALLET_PROGRAM_ADDRESS } from \"../programs\";\nimport { getAccountMetaFactory, type ResolvedAccount } from \"../shared\";\nimport {\n getCreateUserAccountArgsDecoder,\n getCreateUserAccountArgsEncoder,\n getProofArgsDecoder,\n getProofArgsEncoder,\n type CreateUserAccountArgs,\n type CreateUserAccountArgsArgs,\n type ProofArgs,\n type ProofArgsArgs,\n} from \"../types\";\n\nexport const CREATE_USER_ACCOUNTS_DISCRIMINATOR = new Uint8Array([5]);\n\nexport function getCreateUserAccountsDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 1).encode(\n CREATE_USER_ACCOUNTS_DISCRIMINATOR\n );\n}\n\nexport type CreateUserAccountsInstruction<\n TProgram extends string = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n TAccountPayer extends string | AccountMeta<string> = string,\n TAccountSystemProgram extends\n | string\n | AccountMeta<string> = \"11111111111111111111111111111111\",\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountPayer extends string\n ? WritableSignerAccount<TAccountPayer> &\n AccountSignerMeta<TAccountPayer>\n : TAccountPayer,\n TAccountSystemProgram extends string\n ? ReadonlyAccount<TAccountSystemProgram>\n : TAccountSystemProgram,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type CreateUserAccountsInstructionData = {\n discriminator: ReadonlyUint8Array;\n compressedProofArgs: ProofArgs;\n createUserArgs: Array<CreateUserAccountArgs>;\n};\n\nexport type CreateUserAccountsInstructionDataArgs = {\n compressedProofArgs: ProofArgsArgs;\n createUserArgs: Array<CreateUserAccountArgsArgs>;\n};\n\nexport function getCreateUserAccountsInstructionDataEncoder(): Encoder<CreateUserAccountsInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n [\"discriminator\", fixEncoderSize(getBytesEncoder(), 1)],\n [\"compressedProofArgs\", getProofArgsEncoder()],\n [\"createUserArgs\", getArrayEncoder(getCreateUserAccountArgsEncoder())],\n ]),\n (value) => ({ ...value, discriminator: CREATE_USER_ACCOUNTS_DISCRIMINATOR })\n );\n}\n\nexport function getCreateUserAccountsInstructionDataDecoder(): Decoder<CreateUserAccountsInstructionData> {\n return getStructDecoder([\n [\"discriminator\", fixDecoderSize(getBytesDecoder(), 1)],\n [\"compressedProofArgs\", getProofArgsDecoder()],\n [\"createUserArgs\", getArrayDecoder(getCreateUserAccountArgsDecoder())],\n ]);\n}\n\nexport function getCreateUserAccountsInstructionDataCodec(): Codec<\n CreateUserAccountsInstructionDataArgs,\n CreateUserAccountsInstructionData\n> {\n return combineCodec(\n getCreateUserAccountsInstructionDataEncoder(),\n getCreateUserAccountsInstructionDataDecoder()\n );\n}\n\nexport type CreateUserAccountsInstructionExtraArgs = {\n remainingAccounts: Array<{ address: Address; role: number }>;\n};\n\nexport type CreateUserAccountsInput<\n TAccountPayer extends string = string,\n TAccountSystemProgram extends string = string,\n> = {\n payer: TransactionSigner<TAccountPayer>;\n systemProgram?: Address<TAccountSystemProgram>;\n compressedProofArgs: CreateUserAccountsInstructionDataArgs[\"compressedProofArgs\"];\n createUserArgs: CreateUserAccountsInstructionDataArgs[\"createUserArgs\"];\n remainingAccounts: CreateUserAccountsInstructionExtraArgs[\"remainingAccounts\"];\n};\n\nexport function getCreateUserAccountsInstruction<\n TAccountPayer extends string,\n TAccountSystemProgram extends string,\n TProgramAddress extends Address = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n>(\n input: CreateUserAccountsInput<TAccountPayer, TAccountSystemProgram>,\n config?: { programAddress?: TProgramAddress }\n): CreateUserAccountsInstruction<\n TProgramAddress,\n TAccountPayer,\n TAccountSystemProgram\n> {\n // Program address.\n const programAddress = config?.programAddress ?? MULTI_WALLET_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n payer: { value: input.payer ?? 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 // Resolver scope.\n const resolverScope = { programAddress, accounts, args };\n\n // Resolve default values.\n if (!accounts.systemProgram.value) {\n accounts.systemProgram.value =\n \"11111111111111111111111111111111\" as Address<\"11111111111111111111111111111111\">;\n }\n\n // Remaining accounts.\n const remainingAccounts: AccountMeta[] =\n parseRemainingAccounts(resolverScope);\n\n const getAccountMeta = getAccountMetaFactory(programAddress, \"programId\");\n return Object.freeze({\n accounts: [\n getAccountMeta(accounts.payer),\n getAccountMeta(accounts.systemProgram),\n ...remainingAccounts,\n ],\n data: getCreateUserAccountsInstructionDataEncoder().encode(\n args as CreateUserAccountsInstructionDataArgs\n ),\n programAddress,\n } as CreateUserAccountsInstruction<\n TProgramAddress,\n TAccountPayer,\n TAccountSystemProgram\n >);\n}\n\nexport type ParsedCreateUserAccountsInstruction<\n TProgram extends string = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n payer: TAccountMetas[0];\n systemProgram: TAccountMetas[1];\n };\n data: CreateUserAccountsInstructionData;\n};\n\nexport function parseCreateUserAccountsInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>\n): ParsedCreateUserAccountsInstruction<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: { payer: getNextAccount(), systemProgram: getNextAccount() },\n data: getCreateUserAccountsInstructionDataDecoder().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 getArrayDecoder,\n getArrayEncoder,\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 ReadonlyUint8Array,\n type TransactionSigner,\n type WritableAccount,\n type WritableSignerAccount,\n} from \"gill\";\nimport { parseRemainingAccounts } from \"../../hooked\";\nimport { MULTI_WALLET_PROGRAM_ADDRESS } from \"../programs\";\nimport { getAccountMetaFactory, type ResolvedAccount } from \"../shared\";\nimport {\n getProofArgsDecoder,\n getProofArgsEncoder,\n getSecp256r1VerifyArgsWithDomainAddressDecoder,\n getSecp256r1VerifyArgsWithDomainAddressEncoder,\n getSettingsMutArgsDecoder,\n getSettingsMutArgsEncoder,\n type ProofArgs,\n type ProofArgsArgs,\n type Secp256r1VerifyArgsWithDomainAddress,\n type Secp256r1VerifyArgsWithDomainAddressArgs,\n type SettingsMutArgs,\n type SettingsMutArgsArgs,\n} from \"../types\";\n\nexport const DECOMPRESS_SETTINGS_ACCOUNT_DISCRIMINATOR = new Uint8Array([17]);\n\nexport function getDecompressSettingsAccountDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 1).encode(\n DECOMPRESS_SETTINGS_ACCOUNT_DISCRIMINATOR\n );\n}\n\nexport type DecompressSettingsAccountInstruction<\n TProgram extends string = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n TAccountSettings extends string | AccountMeta<string> = string,\n TAccountPayer extends string | AccountMeta<string> = string,\n TAccountSystemProgram extends\n | string\n | AccountMeta<string> = \"11111111111111111111111111111111\",\n TAccountSlotHashSysvar extends\n | string\n | AccountMeta<string> = \"SysvarS1otHashes111111111111111111111111111\",\n TAccountInstructionsSysvar extends\n | string\n | AccountMeta<string> = \"Sysvar1nstructions1111111111111111111111111\",\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountSettings extends string\n ? WritableAccount<TAccountSettings>\n : TAccountSettings,\n TAccountPayer extends string\n ? WritableSignerAccount<TAccountPayer> &\n AccountSignerMeta<TAccountPayer>\n : TAccountPayer,\n TAccountSystemProgram extends string\n ? ReadonlyAccount<TAccountSystemProgram>\n : TAccountSystemProgram,\n TAccountSlotHashSysvar extends string\n ? ReadonlyAccount<TAccountSlotHashSysvar>\n : TAccountSlotHashSysvar,\n TAccountInstructionsSysvar extends string\n ? ReadonlyAccount<TAccountInstructionsSysvar>\n : TAccountInstructionsSysvar,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type DecompressSettingsAccountInstructionData = {\n discriminator: ReadonlyUint8Array;\n settingsMut: SettingsMutArgs;\n compressedProofArgs: ProofArgs;\n secp256r1VerifyArgs: Array<Secp256r1VerifyArgsWithDomainAddress>;\n};\n\nexport type DecompressSettingsAccountInstructionDataArgs = {\n settingsMut: SettingsMutArgsArgs;\n compressedProofArgs: ProofArgsArgs;\n secp256r1VerifyArgs: Array<Secp256r1VerifyArgsWithDomainAddressArgs>;\n};\n\nexport function getDecompressSettingsAccountInstructionDataEncoder(): Encoder<DecompressSettingsAccountInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n [\"discriminator\", fixEncoderSize(getBytesEncoder(), 1)],\n [\"settingsMut\", getSettingsMutArgsEncoder()],\n [\"compressedProofArgs\", getProofArgsEncoder()],\n [\n \"secp256r1VerifyArgs\",\n getArrayEncoder(getSecp256r1VerifyArgsWithDomainAddressEncoder()),\n ],\n ]),\n (value) => ({\n ...value,\n discriminator: DECOMPRESS_SETTINGS_ACCOUNT_DISCRIMINATOR,\n })\n );\n}\n\nexport function getDecompressSettingsAccountInstructionDataDecoder(): Decoder<DecompressSettingsAccountInstructionData> {\n return getStructDecoder([\n [\"discriminator\", fixDecoderSize(getBytesDecoder(), 1)],\n [\"settingsMut\", getSettingsMutArgsDecoder()],\n [\"compressedProofArgs\", getProofArgsDecoder()],\n [\n \"secp256r1VerifyArgs\",\n getArrayDecoder(getSecp256r1VerifyArgsWithDomainAddressDecoder()),\n ],\n ]);\n}\n\nexport function getDecompressSettingsAccountInstructionDataCodec(): Codec<\n DecompressSettingsAccountInstructionDataArgs,\n DecompressSettingsAccountInstructionData\n> {\n return combineCodec(\n getDecompressSettingsAccountInstructionDataEncoder(),\n getDecompressSettingsAccountInstructionDataDecoder()\n );\n}\n\nexport type DecompressSettingsAccountInstructionExtraArgs = {\n remainingAccounts: Array<{ address: Address; role: number }>;\n};\n\nexport type DecompressSettingsAccountInput<\n TAccountSettings extends string = string,\n TAccountPayer extends string = string,\n TAccountSystemProgram extends string = string,\n TAccountSlotHashSysvar extends string = string,\n TAccountInstructionsSysvar extends string = string,\n> = {\n settings: Address<TAccountSettings>;\n payer: TransactionSigner<TAccountPayer>;\n systemProgram?: Address<TAccountSystemProgram>;\n slotHashSysvar?: Address<TAccountSlotHashSysvar>;\n instructionsSysvar?: Address<TAccountInstructionsSysvar>;\n settingsMut: DecompressSettingsAccountInstructionDataArgs[\"settingsMut\"];\n compressedProofArgs: DecompressSettingsAccountInstructionDataArgs[\"compressedProofArgs\"];\n secp256r1VerifyArgs: DecompressSettingsAccountInstructionDataArgs[\"secp256r1VerifyArgs\"];\n remainingAccounts: DecompressSettingsAccountInstructionExtraArgs[\"remainingAccounts\"];\n};\n\nexport function getDecompressSettingsAccountInstruction<\n TAccountSettings extends string,\n TAccountPayer extends string,\n TAccountSystemProgram extends string,\n TAccountSlotHashSysvar extends string,\n TAccountInstructionsSysvar extends string,\n TProgramAddress extends Address = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n>(\n input: DecompressSettingsAccountInput<\n TAccountSettings,\n TAccountPayer,\n TAccountSystemProgram,\n TAccountSlotHashSysvar,\n TAccountInstructionsSysvar\n >,\n config?: { programAddress?: TProgramAddress }\n): DecompressSettingsAccountInstruction<\n TProgramAddress,\n TAccountSettings,\n TAccountPayer,\n TAccountSystemProgram,\n TAccountSlotHashSysvar,\n TAccountInstructionsSysvar\n> {\n // Program address.\n const programAddress = config?.programAddress ?? MULTI_WALLET_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n settings: { value: input.settings ?? null, isWritable: true },\n payer: { value: input.payer ?? null, isWritable: true },\n systemProgram: { value: input.systemProgram ?? null, isWritable: false },\n slotHashSysvar: { value: input.slotHashSysvar ?? null, isWritable: false },\n instructionsSysvar: {\n value: input.instructionsSysvar ?? null,\n isWritable: false,\n },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolver scope.\n const resolverScope = { programAddress, accounts, args };\n\n // Resolve default values.\n if (!accounts.systemProgram.value) {\n accounts.systemProgram.value =\n \"11111111111111111111111111111111\" as Address<\"11111111111111111111111111111111\">;\n }\n if (!accounts.slotHashSysvar.value) {\n accounts.slotHashSysvar.value =\n \"SysvarS1otHashes111111111111111111111111111\" as Address<\"SysvarS1otHashes111111111111111111111111111\">;\n }\n if (!accounts.instructionsSysvar.value) {\n accounts.instructionsSysvar.value =\n \"Sysvar1nstructions1111111111111111111111111\" as Address<\"Sysvar1nstructions1111111111111111111111111\">;\n }\n\n // Remaining accounts.\n const remainingAccounts: AccountMeta[] =\n parseRemainingAccounts(resolverScope);\n\n const getAccountMeta = getAccountMetaFactory(programAddress, \"programId\");\n return Object.freeze({\n accounts: [\n getAccountMeta(accounts.settings),\n getAccountMeta(accounts.payer),\n getAccountMeta(accounts.systemProgram),\n getAccountMeta(accounts.slotHashSysvar),\n getAccountMeta(accounts.instructionsSysvar),\n ...remainingAccounts,\n ],\n data: getDecompressSettingsAccountInstructionDataEncoder().encode(\n args as DecompressSettingsAccountInstructionDataArgs\n ),\n programAddress,\n } as DecompressSettingsAccountInstruction<\n TProgramAddress,\n TAccountSettings,\n TAccountPayer,\n TAccountSystemProgram,\n TAccountSlotHashSysvar,\n TAccountInstructionsSysvar\n >);\n}\n\nexport type ParsedDecompressSettingsAccountInstruction<\n TProgram extends string = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n settings: TAccountMetas[0];\n payer: TAccountMetas[1];\n systemProgram: TAccountMetas[2];\n slotHashSysvar?: TAccountMetas[3] | undefined;\n instructionsSysvar: TAccountMetas[4];\n };\n data: DecompressSettingsAccountInstructionData;\n};\n\nexport function parseDecompressSettingsAccountInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>\n): ParsedDecompressSettingsAccountInstruction<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 const getNextOptionalAccount = () => {\n const accountMeta = getNextAccount();\n return accountMeta.address === MULTI_WALLET_PROGRAM_ADDRESS\n ? undefined\n : accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n settings: getNextAccount(),\n payer: getNextAccount(),\n systemProgram: getNextAccount(),\n slotHashSysvar: getNextOptionalAccount(),\n instructionsSysvar: getNextAccount(),\n },\n data: getDecompressSettingsAccountInstructionDataDecoder().decode(\n instruction.data\n ),\n };\n}\n","/**\n * This code was AUTOGENERATED using the Codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun Codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n combineCodec,\n fixDecoderSize,\n fixEncoderSize,\n getBooleanDecoder,\n getBooleanEncoder,\n getBytesDecoder,\n getBytesEncoder,\n getStructDecoder,\n getStructEncoder,\n 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 \"gill\";\nimport { parseRemainingAccounts } from \"../../hooked\";\nimport { MULTI_WALLET_PROGRAM_ADDRESS } from \"../programs\";\nimport { getAccountMetaFactory, type ResolvedAccount } from \"../shared\";\n\nexport const DISABLE_DOMAIN_CONFIG_DISCRIMINATOR = new Uint8Array([2]);\n\nexport function getDisableDomainConfigDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 1).encode(\n DISABLE_DOMAIN_CONFIG_DISCRIMINATOR\n );\n}\n\nexport type DisableDomainConfigInstruction<\n TProgram extends string = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n TAccountDomainConfig extends string | AccountMeta<string> = string,\n TAccountAdmin extends string | AccountMeta<string> = string,\n TAccountAdminDomainConfig extends\n | string\n | AccountMeta<string> = \"5tgzUZaVtfnnSEBgmBDtJj6PdgYCnA1uaEGEUi3y5Njg\",\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountDomainConfig extends string\n ? WritableAccount<TAccountDomainConfig>\n : TAccountDomainConfig,\n TAccountAdmin extends string\n ? ReadonlySignerAccount<TAccountAdmin> &\n AccountSignerMeta<TAccountAdmin>\n : TAccountAdmin,\n TAccountAdminDomainConfig extends string\n ? ReadonlyAccount<TAccountAdminDomainConfig>\n : TAccountAdminDomainConfig,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type DisableDomainConfigInstructionData = {\n discriminator: ReadonlyUint8Array;\n disable: boolean;\n};\n\nexport type DisableDomainConfigInstructionDataArgs = { disable: boolean };\n\nexport function getDisableDomainConfigInstructionDataEncoder(): FixedSizeEncoder<DisableDomainConfigInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n [\"discriminator\", fixEncoderSize(getBytesEncoder(), 1)],\n [\"disable\", getBooleanEncoder()],\n ]),\n (value) => ({\n ...value,\n discriminator: DISABLE_DOMAIN_CONFIG_DISCRIMINATOR,\n })\n );\n}\n\nexport function getDisableDomainConfigInstructionDataDecoder(): FixedSizeDecoder<DisableDomainConfigInstructionData> {\n return getStructDecoder([\n [\"discriminator\", fixDecoderSize(getBytesDecoder(), 1)],\n [\"disable\", getBooleanDecoder()],\n ]);\n}\n\nexport function getDisableDomainConfigInstructionDataCodec(): FixedSizeCodec<\n DisableDomainConfigInstructionDataArgs,\n DisableDomainConfigInstructionData\n> {\n return combineCodec(\n getDisableDomainConfigInstructionDataEncoder(),\n getDisableDomainConfigInstructionDataDecoder()\n );\n}\n\nexport type DisableDomainConfigInstructionExtraArgs = {\n remainingAccounts: Array<{ address: Address; role: number }>;\n};\n\nexport type DisableDomainConfigInput<\n TAccountDomainConfig extends string = string,\n TAccountAdmin extends string = string,\n TAccountAdminDomainConfig extends string = string,\n> = {\n domainConfig: Address<TAccountDomainConfig>;\n admin: TransactionSigner<TAccountAdmin>;\n adminDomainConfig?: Address<TAccountAdminDomainConfig>;\n disable: DisableDomainConfigInstructionDataArgs[\"disable\"];\n remainingAccounts: DisableDomainConfigInstructionExtraArgs[\"remainingAccounts\"];\n};\n\nexport function getDisableDomainConfigInstruction<\n TAccountDomainConfig extends string,\n TAccountAdmin extends string,\n TAccountAdminDomainConfig extends string,\n TProgramAddress extends Address = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n>(\n input: DisableDomainConfigInput<\n TAccountDomainConfig,\n TAccountAdmin,\n TAccountAdminDomainConfig\n >,\n config?: { programAddress?: TProgramAddress }\n): DisableDomainConfigInstruction<\n TProgramAddress,\n TAccountDomainConfig,\n TAccountAdmin,\n TAccountAdminDomainConfig\n> {\n // Program address.\n const programAddress = config?.programAddress ?? MULTI_WALLET_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n domainConfig: { value: input.domainConfig ?? null, isWritable: true },\n admin: { value: input.admin ?? null, isWritable: false },\n adminDomainConfig: {\n value: input.adminDomainConfig ?? null,\n isWritable: false,\n },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolver scope.\n const resolverScope = { programAddress, accounts, args };\n\n // Resolve default values.\n if (!accounts.adminDomainConfig.value) {\n accounts.adminDomainConfig.value =\n \"5tgzUZaVtfnnSEBgmBDtJj6PdgYCnA1uaEGEUi3y5Njg\" as Address<\"5tgzUZaVtfnnSEBgmBDtJj6PdgYCnA1uaEGEUi3y5Njg\">;\n }\n\n // Remaining accounts.\n const remainingAccounts: AccountMeta[] =\n parseRemainingAccounts(resolverScope);\n\n const getAccountMeta = getAccountMetaFactory(programAddress, \"programId\");\n return Object.freeze({\n accounts: [\n getAccountMeta(accounts.domainConfig),\n getAccountMeta(accounts.admin),\n getAccountMeta(accounts.adminDomainConfig),\n ...remainingAccounts,\n ],\n data: getDisableDomainConfigInstructionDataEncoder().encode(\n args as DisableDomainConfigInstructionDataArgs\n ),\n programAddress,\n } as DisableDomainConfigInstruction<\n TProgramAddress,\n TAccountDomainConfig,\n TAccountAdmin,\n TAccountAdminDomainConfig\n >);\n}\n\nexport type ParsedDisableDomainConfigInstruction<\n TProgram extends string = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n domainConfig: TAccountMetas[0];\n admin: TAccountMetas[1];\n adminDomainConfig: TAccountMetas[2];\n };\n data: DisableDomainConfigInstructionData;\n};\n\nexport function parseDisableDomainConfigInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>\n): ParsedDisableDomainConfigInstruction<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 domainConfig: getNextAccount(),\n admin: getNextAccount(),\n adminDomainConfig: getNextAccount(),\n },\n data: getDisableDomainConfigInstructionDataDecoder().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 getOptionDecoder,\n getOptionEncoder,\n getStructDecoder,\n getStructEncoder,\n getU32Decoder,\n getU32Encoder,\n getUtf8Decoder,\n getUtf8Encoder,\n transformEncoder,\n type AccountMeta,\n type AccountSignerMeta,\n type Address,\n type Codec,\n type Decoder,\n type Encoder,\n type Instruction,\n type InstructionWithAccounts,\n type InstructionWithData,\n type Option,\n type OptionOrNullable,\n type ReadonlyAccount,\n type ReadonlySignerAccount,\n type ReadonlyUint8Array,\n type TransactionSigner,\n type WritableAccount,\n} from \"gill\";\nimport { parseRemainingAccounts } from \"../../hooked\";\nimport { MULTI_WALLET_PROGRAM_ADDRESS } from \"../programs\";\nimport { getAccountMetaFactory, type ResolvedAccount } from \"../shared\";\n\nexport const EDIT_DOMAIN_CONFIG_DISCRIMINATOR = new Uint8Array([1]);\n\nexport function getEditDomainConfigDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 1).encode(\n EDIT_DOMAIN_CONFIG_DISCRIMINATOR\n );\n}\n\nexport type EditDomainConfigInstruction<\n TProgram extends string = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n TAccountDomainConfig extends string | AccountMeta<string> = string,\n TAccountAuthority extends string | AccountMeta<string> = string,\n TAccountSystemProgram extends\n | string\n | AccountMeta<string> = \"11111111111111111111111111111111\",\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountDomainConfig extends string\n ? WritableAccount<TAccountDomainConfig>\n : TAccountDomainConfig,\n TAccountAuthority extends string\n ? ReadonlySignerAccount<TAccountAuthority> &\n AccountSignerMeta<TAccountAuthority>\n : TAccountAuthority,\n TAccountSystemProgram extends string\n ? ReadonlyAccount<TAccountSystemProgram>\n : TAccountSystemProgram,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type EditDomainConfigInstructionData = {\n discriminator: ReadonlyUint8Array;\n newOrigins: Option<Array<string>>;\n newAuthority: Option<Address>;\n newMetadataUrl: Option<string>;\n};\n\nexport type EditDomainConfigInstructionDataArgs = {\n newOrigins: OptionOrNullable<Array<string>>;\n newAuthority: OptionOrNullable<Address>;\n newMetadataUrl: OptionOrNullable<string>;\n};\n\nexport function getEditDomainConfigInstructionDataEncoder(): Encoder<EditDomainConfigInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n [\"discriminator\", fixEncoderSize(getBytesEncoder(), 1)],\n [\n \"newOrigins\",\n getOptionEncoder(\n getArrayEncoder(\n addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder())\n )\n ),\n ],\n [\"newAuthority\", getOptionEncoder(getAddressEncoder())],\n [\n \"newMetadataUrl\",\n getOptionEncoder(\n addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder())\n ),\n ],\n ]),\n (value) => ({ ...value, discriminator: EDIT_DOMAIN_CONFIG_DISCRIMINATOR })\n );\n}\n\nexport function getEditDomainConfigInstructionDataDecoder(): Decoder<EditDomainConfigInstructionData> {\n return getStructDecoder([\n [\"discriminator\", fixDecoderSize(getBytesDecoder(), 1)],\n [\n \"newOrigins\",\n getOptionDecoder(\n getArrayDecoder(addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder()))\n ),\n ],\n [\"newAuthority\", getOptionDecoder(getAddressDecoder())],\n [\n \"newMetadataUrl\",\n getOptionDecoder(addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())),\n ],\n ]);\n}\n\nexport function getEditDomainConfigInstructionDataCodec(): Codec<\n EditDomainConfigInstructionDataArgs,\n EditDomainConfigInstructionData\n> {\n return combineCodec(\n getEditDomainConfigInstructionDataEncoder(),\n getEditDomainConfigInstructionDataDecoder()\n );\n}\n\nexport type EditDomainConfigInstructionExtraArgs = {\n remainingAccounts: Array<{ address: Address; role: number }>;\n};\n\nexport type EditDomainConfigInput<\n TAccountDomainConfig extends string = string,\n TAccountAuthority extends string = string,\n TAccountSystemProgram extends string = string,\n> = {\n domainConfig: Address<TAccountDomainConfig>;\n authority: TransactionSigner<TAccountAuthority>;\n systemProgram?: Address<TAccountSystemProgram>;\n newOrigins: EditDomainConfigInstructionDataArgs[\"newOrigins\"];\n newAuthority: EditDomainConfigInstructionDataArgs[\"newAuthority\"];\n newMetadataUrl: EditDomainConfigInstructionDataArgs[\"newMetadataUrl\"];\n remainingAccounts: EditDomainConfigInstructionExtraArgs[\"remainingAccounts\"];\n};\n\nexport function getEditDomainConfigInstruction<\n TAccountDomainConfig extends string,\n TAccountAuthority extends string,\n TAccountSystemProgram extends string,\n TProgramAddress extends Address = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n>(\n input: EditDomainConfigInput<\n TAccountDomainConfig,\n TAccountAuthority,\n TAccountSystemProgram\n >,\n config?: { programAddress?: TProgramAddress }\n): EditDomainConfigInstruction<\n TProgramAddress,\n TAccountDomainConfig,\n TAccountAuthority,\n TAccountSystemProgram\n> {\n // Program address.\n const programAddress = config?.programAddress ?? MULTI_WALLET_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n domainConfig: { value: input.domainConfig ?? null, isWritable: true },\n authority: { value: input.authority ?? 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 // Resolver scope.\n const resolverScope = { programAddress, accounts, args };\n\n // Resolve default values.\n if (!accounts.systemProgram.value) {\n accounts.systemProgram.value =\n \"11111111111111111111111111111111\" as Address<\"11111111111111111111111111111111\">;\n }\n\n // Remaining accounts.\n const remainingAccounts: AccountMeta[] =\n parseRemainingAccounts(resolverScope);\n\n const getAccountMeta = getAccountMetaFactory(programAddress, \"programId\");\n return Object.freeze({\n accounts: [\n getAccountMeta(accounts.domainConfig),\n getAccountMeta(accounts.authority),\n getAccountMeta(accounts.systemProgram),\n ...remainingAccounts,\n ],\n data: getEditDomainConfigInstructionDataEncoder().encode(\n args as EditDomainConfigInstructionDataArgs\n ),\n programAddress,\n } as EditDomainConfigInstruction<\n TProgramAddress,\n TAccountDomainConfig,\n TAccountAuthority,\n TAccountSystemProgram\n >);\n}\n\nexport type ParsedEditDomainConfigInstruction<\n TProgram extends string = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n domainConfig: TAccountMetas[0];\n authority: TAccountMetas[1];\n systemProgram: TAccountMetas[2];\n };\n data: EditDomainConfigInstructionData;\n};\n\nexport function parseEditDomainConfigInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>\n): ParsedEditDomainConfigInstruction<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 domainConfig: getNextAccount(),\n authority: getNextAccount(),\n systemProgram: getNextAccount(),\n },\n data: getEditDomainConfigInstructionDataDecoder().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 ReadonlySignerAccount,\n type ReadonlyUint8Array,\n type TransactionSigner,\n} from \"gill\";\nimport { parseRemainingAccounts } from \"../../hooked\";\nimport { MULTI_WALLET_PROGRAM_ADDRESS } from \"../programs\";\nimport { getAccountMetaFactory, type ResolvedAccount } from \"../shared\";\nimport {\n getProofArgsDecoder,\n getProofArgsEncoder,\n getUserMutArgsDecoder,\n getUserMutArgsEncoder,\n type ProofArgs,\n type ProofArgsArgs,\n type UserMutArgs,\n type UserMutArgsArgs,\n} from \"../types\";\n\nexport const EDIT_TRANSACTION_MANAGER_URL_DISCRIMINATOR = new Uint8Array([6]);\n\nexport function getEditTransactionManagerUrlDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 1).encode(\n EDIT_TRANSACTION_MANAGER_URL_DISCRIMINATOR\n );\n}\n\nexport type EditTransactionManagerUrlInstruction<\n TProgram extends string = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n TAccountAuthority extends string | AccountMeta<string> = string,\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountAuthority extends string\n ? ReadonlySignerAccount<TAccountAuthority> &\n AccountSignerMeta<TAccountAuthority>\n : TAccountAuthority,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type EditTransactionManagerUrlInstructionData = {\n discriminator: ReadonlyUint8Array;\n userMutArgs: UserMutArgs;\n transactionManagerUrl: string;\n compressedProofArgs: ProofArgs;\n};\n\nexport type EditTransactionManagerUrlInstructionDataArgs = {\n userMutArgs: UserMutArgsArgs;\n transactionManagerUrl: string;\n compressedProofArgs: ProofArgsArgs;\n};\n\nexport function getEditTransactionManagerUrlInstructionDataEncoder(): Encoder<EditTransactionManagerUrlInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n [\"discriminator\", fixEncoderSize(getBytesEncoder(), 1)],\n [\"userMutArgs\", getUserMutArgsEncoder()],\n [\n \"transactionManagerUrl\",\n addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder()),\n ],\n [\"compressedProofArgs\", getProofArgsEncoder()],\n ]),\n (value) => ({\n ...value,\n discriminator: EDIT_TRANSACTION_MANAGER_URL_DISCRIMINATOR,\n })\n );\n}\n\nexport function getEditTransactionManagerUrlInstructionDataDecoder(): Decoder<EditTransactionManagerUrlInstructionData> {\n return getStructDecoder([\n [\"discriminator\", fixDecoderSize(getBytesDecoder(), 1)],\n [\"userMutArgs\", getUserMutArgsDecoder()],\n [\n \"transactionManagerUrl\",\n addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder()),\n ],\n [\"compressedProofArgs\", getProofArgsDecoder()],\n ]);\n}\n\nexport function getEditTransactionManagerUrlInstructionDataCodec(): Codec<\n EditTransactionManagerUrlInstructionDataArgs,\n EditTransactionManagerUrlInstructionData\n> {\n return combineCodec(\n getEditTransactionManagerUrlInstructionDataEncoder(),\n getEditTransactionManagerUrlInstructionDataDecoder()\n );\n}\n\nexport type EditTransactionManagerUrlInstructionExtraArgs = {\n remainingAccounts: Array<{ address: Address; role: number }>;\n};\n\nexport type EditTransactionManagerUrlInput<\n TAccountAuthority extends string = string,\n> = {\n authority: TransactionSigner<TAccountAuthority>;\n userMutArgs: EditTransactionManagerUrlInstructionDataArgs[\"userMutArgs\"];\n transactionManagerUrl: EditTransactionManagerUrlInstructionDataArgs[\"transactionManagerUrl\"];\n compressedProofArgs: EditTransactionManagerUrlInstructionDataArgs[\"compressedProofArgs\"];\n remainingAccounts: EditTransactionManagerUrlInstructionExtraArgs[\"remainingAccounts\"];\n};\n\nexport function getEditTransactionManagerUrlInstruction<\n TAccountAuthority extends string,\n TProgramAddress extends Address = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n>(\n input: EditTransactionManagerUrlInput<TAccountAuthority>,\n config?: { programAddress?: TProgramAddress }\n): EditTransactionManagerUrlInstruction<TProgramAddress, TAccountAuthority> {\n // Program address.\n const programAddress = config?.programAddress ?? MULTI_WALLET_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\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 // Resolver scope.\n const resolverScope = { programAddress, accounts, args };\n\n // Remaining accounts.\n const remainingAccounts: AccountMeta[] =\n parseRemainingAccounts(resolverScope);\n\n const getAccountMeta = getAccountMetaFactory(programAddress, \"programId\");\n return Object.freeze({\n accounts: [getAccountMeta(accounts.authority), ...remainingAccounts],\n data: getEditTransactionManagerUrlInstructionDataEncoder().encode(\n args as EditTransactionManagerUrlInstructionDataArgs\n ),\n programAddress,\n } as EditTransactionManagerUrlInstruction<\n TProgramAddress,\n TAccountAuthority\n >);\n}\n\nexport type ParsedEditTransactionManagerUrlInstruction<\n TProgram extends string = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n authority: TAccountMetas[0];\n };\n data: EditTransactionManagerUrlInstructionData;\n};\n\nexport function parseEditTransactionManagerUrlInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>\n): ParsedEditTransactionManagerUrlInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 1) {\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: { authority: getNextAccount() },\n data: getEditTransactionManagerUrlInstructionDataDecoder().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 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 WritableSignerAccount,\n} from \"gill\";\nimport { parseRemainingAccounts } from \"../../hooked\";\nimport { MULTI_WALLET_PROGRAM_ADDRESS } from \"../programs\";\nimport { getAccountMetaFactory, type ResolvedAccount } from \"../shared\";\nimport {\n getCompressedSettingsDataDecoder,\n getCompressedSettingsDataEncoder,\n getProofArgsDecoder,\n getProofArgsEncoder,\n getSettingsCreationArgsDecoder,\n getSettingsCreationArgsEncoder,\n type CompressedSettingsData,\n type CompressedSettingsDataArgs,\n type ProofArgs,\n type ProofArgsArgs,\n type SettingsCreationArgs,\n type SettingsCreationArgsArgs,\n} from \"../types\";\n\nexport const MIGRATE_COMPRESSED_SETTINGS_DISCRIMINATOR = new Uint8Array([32]);\n\nexport function getMigrateCompressedSettingsDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 1).encode(\n MIGRATE_COMPRESSED_SETTINGS_DISCRIMINATOR\n );\n}\n\nexport type MigrateCompressedSettingsInstruction<\n TProgram extends string = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n TAccountAuthority extends string | AccountMeta<string> = string,\n TAccountAdminDomainConfig extends\n | string\n | AccountMeta<string> = \"5tgzUZaVtfnnSEBgmBDtJj6PdgYCnA1uaEGEUi3y5Njg\",\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountAuthority extends string\n ? WritableSignerAccount<TAccountAuthority> &\n AccountSignerMeta<TAccountAuthority>\n : TAccountAuthority,\n TAccountAdminDomainConfig extends string\n ? ReadonlyAccount<TAccountAdminDomainConfig>\n : TAccountAdminDomainConfig,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type MigrateCompressedSettingsInstructionData = {\n discriminator: ReadonlyUint8Array;\n args: CompressedSettingsData;\n compressedProofArgs: ProofArgs;\n settingsCreationArgs: SettingsCreationArgs;\n};\n\nexport type MigrateCompressedSettingsInstructionDataArgs = {\n args: CompressedSettingsDataArgs;\n compressedProofArgs: ProofArgsArgs;\n settingsCreationArgs: SettingsCreationArgsArgs;\n};\n\nexport function getMigrateCompressedSettingsInstructionDataEncoder(): Encoder<MigrateCompressedSettingsInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n [\"discriminator\", fixEncoderSize(getBytesEncoder(), 1)],\n [\"args\", getCompressedSettingsDataEncoder()],\n [\"compressedProofArgs\", getProofArgsEncoder()],\n [\"settingsCreationArgs\", getSettingsCreationArgsEncoder()],\n ]),\n (value) => ({\n ...value,\n discriminator: MIGRATE_COMPRESSED_SETTINGS_DISCRIMINATOR,\n })\n );\n}\n\nexport function getMigrateCompressedSettingsInstructionDataDecoder(): Decoder<MigrateCompressedSettingsInstructionData> {\n return getStructDecoder([\n [\"discriminator\", fixDecoderSize(getBytesDecoder(), 1)],\n [\"args\", getCompressedSettingsDataDecoder()],\n [\"compressedProofArgs\", getProofArgsDecoder()],\n [\"settingsCreationArgs\", getSettingsCreationArgsDecoder()],\n ]);\n}\n\nexport function getMigrateCompressedSettingsInstructionDataCodec(): Codec<\n MigrateCompressedSettingsInstructionDataArgs,\n MigrateCompressedSettingsInstructionData\n> {\n return combineCodec(\n getMigrateCompressedSettingsInstructionDataEncoder(),\n getMigrateCompressedSettingsInstructionDataDecoder()\n );\n}\n\nexport type MigrateCompressedSettingsInstructionExtraArgs = {\n remainingAccounts: Array<{ address: Address; role: number }>;\n};\n\nexport type MigrateCompressedSettingsInput<\n TAccountAuthority extends string = string,\n TAccountAdminDomainConfig extends string = string,\n> = {\n authority: TransactionSigner<TAccountAuthority>;\n adminDomainConfig?: Address<TAccountAdminDomainConfig>;\n args: MigrateCompressedSettingsInstructionDataArgs[\"args\"];\n compressedProofArgs: MigrateCompressedSettingsInstructionDataArgs[\"compressedProofArgs\"];\n settingsCreationArgs: MigrateCompressedSettingsInstructionDataArgs[\"settingsCreationArgs\"];\n remainingAccounts: MigrateCompressedSettingsInstructionExtraArgs[\"remainingAccounts\"];\n};\n\nexport function getMigrateCompressedSettingsInstruction<\n TAccountAuthority extends string,\n TAccountAdminDomainConfig extends string,\n TProgramAddress extends Address = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n>(\n input: MigrateCompressedSettingsInput<\n TAccountAuthority,\n TAccountAdminDomainConfig\n >,\n config?: { programAddress?: TProgramAddress }\n): MigrateCompressedSettingsInstruction<\n TProgramAddress,\n TAccountAuthority,\n TAccountAdminDomainConfig\n> {\n // Program address.\n const programAddress = config?.programAddress ?? MULTI_WALLET_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n authority: { value: input.authority ?? null, isWritable: true },\n adminDomainConfig: {\n value: input.adminDomainConfig ?? null,\n isWritable: false,\n },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolver scope.\n const resolverScope = { programAddress, accounts, args };\n\n // Resolve default values.\n if (!accounts.adminDomainConfig.value) {\n accounts.adminDomainConfig.value =\n \"5tgzUZaVtfnnSEBgmBDtJj6PdgYCnA1uaEGEUi3y5Njg\" as Address<\"5tgzUZaVtfnnSEBgmBDtJj6PdgYCnA1uaEGEUi3y5Njg\">;\n }\n\n // Remaining accounts.\n const remainingAccounts: AccountMeta[] =\n parseRemainingAccounts(resolverScope);\n\n const getAccountMeta = getAccountMetaFactory(programAddress, \"programId\");\n return Object.freeze({\n accounts: [\n getAccountMeta(accounts.authority),\n getAccountMeta(accounts.adminDomainConfig),\n ...remainingAccounts,\n ],\n data: getMigrateCompressedSettingsInstructionDataEncoder().encode(\n args as MigrateCompressedSettingsInstructionDataArgs\n ),\n programAddress,\n } as MigrateCompressedSettingsInstruction<\n TProgramAddress,\n TAccountAuthority,\n TAccountAdminDomainConfig\n >);\n}\n\nexport type ParsedMigrateCompressedSettingsInstruction<\n TProgram extends string = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n authority: TAccountMetas[0];\n adminDomainConfig: TAccountMetas[1];\n };\n data: MigrateCompressedSettingsInstructionData;\n};\n\nexport function parseMigrateCompressedSettingsInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>\n): ParsedMigrateCompressedSettingsInstruction<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 authority: getNextAccount(),\n adminDomainConfig: getNextAccount(),\n },\n data: getMigrateCompressedSettingsInstructionDataDecoder().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 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 WritableSignerAccount,\n} from \"gill\";\nimport { parseRemainingAccounts } from \"../../hooked\";\nimport { MULTI_WALLET_PROGRAM_ADDRESS } from \"../programs\";\nimport { getAccountMetaFactory, type ResolvedAccount } from \"../shared\";\nimport {\n getProofArgsDecoder,\n getProofArgsEncoder,\n getUserCreationArgsDecoder,\n getUserCreationArgsEncoder,\n getUserDecoder,\n getUserEncoder,\n type ProofArgs,\n type ProofArgsArgs,\n type User,\n type UserArgs,\n type UserCreationArgs,\n type UserCreationArgsArgs,\n} from \"../types\";\n\nexport const MIGRATE_COMPRESSED_USERS_DISCRIMINATOR = new Uint8Array([31]);\n\nexport function getMigrateCompressedUsersDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 1).encode(\n MIGRATE_COMPRESSED_USERS_DISCRIMINATOR\n );\n}\n\nexport type MigrateCompressedUsersInstruction<\n TProgram extends string = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n TAccountAuthority extends string | AccountMeta<string> = string,\n TAccountAdminDomainConfig extends\n | string\n | AccountMeta<string> = \"5tgzUZaVtfnnSEBgmBDtJj6PdgYCnA1uaEGEUi3y5Njg\",\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountAuthority extends string\n ? WritableSignerAccount<TAccountAuthority> &\n AccountSignerMeta<TAccountAuthority>\n : TAccountAuthority,\n TAccountAdminDomainConfig extends string\n ? ReadonlyAccount<TAccountAdminDomainConfig>\n : TAccountAdminDomainConfig,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type MigrateCompressedUsersInstructionData = {\n discriminator: ReadonlyUint8Array;\n args: User;\n compressedProofArgs: ProofArgs;\n userCreationArgs: UserCreationArgs;\n};\n\nexport type MigrateCompressedUsersInstructionDataArgs = {\n args: UserArgs;\n compressedProofArgs: ProofArgsArgs;\n userCreationArgs: UserCreationArgsArgs;\n};\n\nexport function getMigrateCompressedUsersInstructionDataEncoder(): Encoder<MigrateCompressedUsersInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n [\"discriminator\", fixEncoderSize(getBytesEncoder(), 1)],\n [\"args\", getUserEncoder()],\n [\"compressedProofArgs\", getProofArgsEncoder()],\n [\"userCreationArgs\", getUserCreationArgsEncoder()],\n ]),\n (value) => ({\n ...value,\n discriminator: MIGRATE_COMPRESSED_USERS_DISCRIMINATOR,\n })\n );\n}\n\nexport function getMigrateCompressedUsersInstructionDataDecoder(): Decoder<MigrateCompressedUsersInstructionData> {\n return getStructDecoder([\n [\"discriminator\", fixDecoderSize(getBytesDecoder(), 1)],\n [\"args\", getUserDecoder()],\n [\"compressedProofArgs\", getProofArgsDecoder()],\n [\"userCreationArgs\", getUserCreationArgsDecoder()],\n ]);\n}\n\nexport function getMigrateCompressedUsersInstructionDataCodec(): Codec<\n MigrateCompressedUsersInstructionDataArgs,\n MigrateCompressedUsersInstructionData\n> {\n return combineCodec(\n getMigrateCompressedUsersInstructionDataEncoder(),\n getMigrateCompressedUsersInstructionDataDecoder()\n );\n}\n\nexport type MigrateCompressedUsersInstructionExtraArgs = {\n remainingAccounts: Array<{ address: Address; role: number }>;\n};\n\nexport type MigrateCompressedUsersInput<\n TAccountAuthority extends string = string,\n TAccountAdminDomainConfig extends string = string,\n> = {\n authority: TransactionSigner<TAccountAuthority>;\n adminDomainConfig?: Address<TAccountAdminDomainConfig>;\n args: MigrateCompressedUsersInstructionDataArgs[\"args\"];\n compressedProofArgs: MigrateCompressedUsersInstructionDataArgs[\"compressedProofArgs\"];\n userCreationArgs: MigrateCompressedUsersInstructionDataArgs[\"userCreationArgs\"];\n remainingAccounts: MigrateCompressedUsersInstructionExtraArgs[\"remainingAccounts\"];\n};\n\nexport function getMigrateCompressedUsersInstruction<\n TAccountAuthority extends string,\n TAccountAdminDomainConfig extends string,\n TProgramAddress extends Address = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n>(\n input: MigrateCompressedUsersInput<\n TAccountAuthority,\n TAccountAdminDomainConfig\n >,\n config?: { programAddress?: TProgramAddress }\n): MigrateCompressedUsersInstruction<\n TProgramAddress,\n TAccountAuthority,\n TAccountAdminDomainConfig\n> {\n // Program address.\n const programAddress = config?.programAddress ?? MULTI_WALLET_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n authority: { value: input.authority ?? null, isWritable: true },\n adminDomainConfig: {\n value: input.adminDomainConfig ?? null,\n isWritable: false,\n },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolver scope.\n const resolverScope = { programAddress, accounts, args };\n\n // Resolve default values.\n if (!accounts.adminDomainConfig.value) {\n accounts.adminDomainConfig.value =\n \"5tgzUZaVtfnnSEBgmBDtJj6PdgYCnA1uaEGEUi3y5Njg\" as Address<\"5tgzUZaVtfnnSEBgmBDtJj6PdgYCnA1uaEGEUi3y5Njg\">;\n }\n\n // Remaining accounts.\n const remainingAccounts: AccountMeta[] =\n parseRemainingAccounts(resolverScope);\n\n const getAccountMeta = getAccountMetaFactory(programAddress, \"programId\");\n return Object.freeze({\n accounts: [\n getAccountMeta(accounts.authority),\n getAccountMeta(accounts.adminDomainConfig),\n ...remainingAccounts,\n ],\n data: getMigrateCompressedUsersInstructionDataEncoder().encode(\n args as MigrateCompressedUsersInstructionDataArgs\n ),\n programAddress,\n } as MigrateCompressedUsersInstruction<\n TProgramAddress,\n TAccountAuthority,\n TAccountAdminDomainConfig\n >);\n}\n\nexport type ParsedMigrateCompressedUsersInstruction<\n TProgram extends string = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n authority: TAccountMetas[0];\n adminDomainConfig: TAccountMetas[1];\n };\n data: MigrateCompressedUsersInstructionData;\n};\n\nexport function parseMigrateCompressedUsersInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>\n): ParsedMigrateCompressedUsersInstruction<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 authority: getNextAccount(),\n adminDomainConfig: getNextAccount(),\n },\n data: getMigrateCompressedUsersInstructionDataDecoder().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 getU64Decoder,\n getU64Encoder,\n transformEncoder,\n type AccountMeta,\n type Address,\n type Codec,\n type Decoder,\n type Encoder,\n type Instruction,\n type InstructionWithAccounts,\n type InstructionWithData,\n type ReadonlyAccount,\n type ReadonlyUint8Array,\n type WritableAccount,\n} from \"gill\";\nimport { parseRemainingAccounts } from \"../../hooked\";\nimport { MULTI_WALLET_PROGRAM_ADDRESS } from \"../programs\";\nimport {\n expectAddress,\n getAccountMetaFactory,\n type ResolvedAccount,\n} from \"../shared\";\nimport {\n getSecp256r1VerifyArgsWithDomainAddressDecoder,\n getSecp256r1VerifyArgsWithDomainAddressEncoder,\n type Secp256r1VerifyArgsWithDomainAddress,\n type Secp256r1VerifyArgsWithDomainAddressArgs,\n} from \"../types\";\n\nexport const NATIVE_TRANSFER_INTENT_DISCRIMINATOR = new Uint8Array([29]);\n\nexport function getNativeTransferIntentDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 1).encode(\n NATIVE_TRANSFER_INTENT_DISCRIMINATOR\n );\n}\n\nexport type NativeTransferIntentInstruction<\n TProgram extends string = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n TAccountSettings extends string | AccountMeta<string> = string,\n TAccountSlotHashSysvar extends\n | string\n | AccountMeta<string> = \"SysvarS1otHashes111111111111111111111111111\",\n TAccountInstructionsSysvar extends\n | string\n | AccountMeta<string> = \"Sysvar1nstructions1111111111111111111111111\",\n TAccountSource extends string | AccountMeta<string> = string,\n TAccountDestination extends string | AccountMeta<string> = string,\n TAccountSystemProgram extends\n | string\n | AccountMeta<string> = \"11111111111111111111111111111111\",\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountSettings extends string\n ? ReadonlyAccount<TAccountSettings>\n : TAccountSettings,\n TAccountSlotHashSysvar extends string\n ? ReadonlyAccount<TAccountSlotHashSysvar>\n : TAccountSlotHashSysvar,\n TAccountInstructionsSysvar extends string\n ? ReadonlyAccount<TAccountInstructionsSysvar>\n : TAccountInstructionsSysvar,\n TAccountSource extends string\n ? WritableAccount<TAccountSource>\n : TAccountSource,\n TAccountDestination extends string\n ? WritableAccount<TAccountDestination>\n : TAccountDestination,\n TAccountSystemProgram extends string\n ? ReadonlyAccount<TAccountSystemProgram>\n : TAccountSystemProgram,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type NativeTransferIntentInstructionData = {\n discriminator: ReadonlyUint8Array;\n amount: bigint;\n secp256r1VerifyArgs: Array<Secp256r1VerifyArgsWithDomainAddress>;\n};\n\nexport type NativeTransferIntentInstructionDataArgs = {\n amount: number | bigint;\n secp256r1VerifyArgs: Array<Secp256r1VerifyArgsWithDomainAddressArgs>;\n};\n\nexport function getNativeTransferIntentInstructionDataEncoder(): Encoder<NativeTransferIntentInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n [\"discriminator\", fixEncoderSize(getBytesEncoder(), 1)],\n [\"amount\", getU64Encoder()],\n [\n \"secp256r1VerifyArgs\",\n getArrayEncoder(getSecp256r1VerifyArgsWithDomainAddressEncoder()),\n ],\n ]),\n (value) => ({\n ...value,\n discriminator: NATIVE_TRANSFER_INTENT_DISCRIMINATOR,\n })\n );\n}\n\nexport function getNativeTransferIntentInstructionDataDecoder(): Decoder<NativeTransferIntentInstructionData> {\n return getStructDecoder([\n [\"discriminator\", fixDecoderSize(getBytesDecoder(), 1)],\n [\"amount\", getU64Decoder()],\n [\n \"secp256r1VerifyArgs\",\n getArrayDecoder(getSecp256r1VerifyArgsWithDomainAddressDecoder()),\n ],\n ]);\n}\n\nexport function getNativeTransferIntentInstructionDataCodec(): Codec<\n NativeTransferIntentInstructionDataArgs,\n NativeTransferIntentInstructionData\n> {\n return combineCodec(\n getNativeTransferIntentInstructionDataEncoder(),\n getNativeTransferIntentInstructionDataDecoder()\n );\n}\n\nexport type NativeTransferIntentInstructionExtraArgs = {\n remainingAccounts: Array<{ address: Address; role: number }>;\n};\n\nexport type NativeTransferIntentAsyncInput<\n TAccountSettings extends string = string,\n TAccountSlotHashSysvar extends string = string,\n TAccountInstructionsSysvar extends string = string,\n TAccountSource extends string = string,\n TAccountDestination extends string = string,\n TAccountSystemProgram extends string = string,\n> = {\n settings: Address<TAccountSettings>;\n slotHashSysvar?: Address<TAccountSlotHashSysvar>;\n instructionsSysvar?: Address<TAccountInstructionsSysvar>;\n source?: Address<TAccountSource>;\n destination: Address<TAccountDestination>;\n systemProgram?: Address<TAccountSystemProgram>;\n amount: NativeTransferIntentInstructionDataArgs[\"amount\"];\n secp256r1VerifyArgs: NativeTransferIntentInstructionDataArgs[\"secp256r1VerifyArgs\"];\n remainingAccounts: NativeTransferIntentInstructionExtraArgs[\"remainingAccounts\"];\n};\n\nexport async function getNativeTransferIntentInstructionAsync<\n TAccountSettings extends string,\n TAccountSlotHashSysvar extends string,\n TAccountInstructionsSysvar extends string,\n TAccountSource extends string,\n TAccountDestination extends string,\n TAccountSystemProgram extends string,\n TProgramAddress extends Address = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n>(\n input: NativeTransferIntentAsyncInput<\n TAccountSettings,\n TAccountSlotHashSysvar,\n TAccountInstructionsSysvar,\n TAccountSource,\n TAccountDestination,\n TAccountSystemProgram\n >,\n config?: { programAddress?: TProgramAddress }\n): Promise<\n NativeTransferIntentInstruction<\n TProgramAddress,\n TAccountSettings,\n TAccountSlotHashSysvar,\n TAccountInstructionsSysvar,\n TAccountSource,\n TAccountDestination,\n TAccountSystemProgram\n >\n> {\n // Program address.\n const programAddress = config?.programAddress ?? MULTI_WALLET_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n settings: { value: input.settings ?? null, isWritable: false },\n slotHashSysvar: { value: input.slotHashSysvar ?? null, isWritable: false },\n instructionsSysvar: {\n value: input.instructionsSysvar ?? null,\n isWritable: false,\n },\n source: { value: input.source ?? null, isWritable: true },\n destination: { value: input.destination ?? 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 // Resolver scope.\n const resolverScope = { programAddress, accounts, args };\n\n // Resolve default values.\n if (!accounts.slotHashSysvar.value) {\n accounts.slotHashSysvar.value =\n \"SysvarS1otHashes111111111111111111111111111\" as Address<\"SysvarS1otHashes111111111111111111111111111\">;\n }\n if (!accounts.instructionsSysvar.value) {\n accounts.instructionsSysvar.value =\n \"Sysvar1nstructions1111111111111111111111111\" as Address<\"Sysvar1nstructions1111111111111111111111111\">;\n }\n if (!accounts.source.value) {\n accounts.source.value = await getProgramDerivedAddress({\n programAddress,\n seeds: [\n getBytesEncoder().encode(\n new Uint8Array([\n 109, 117, 108, 116, 105, 95, 119, 97, 108, 108, 101, 116,\n ])\n ),\n getAddressEncoder().encode(expectAddress(accounts.settings.value)),\n getBytesEncoder().encode(new Uint8Array([118, 97, 117, 108, 116])),\n ],\n });\n }\n if (!accounts.systemProgram.value) {\n accounts.systemProgram.value =\n \"11111111111111111111111111111111\" as Address<\"11111111111111111111111111111111\">;\n }\n\n // Remaining accounts.\n const remainingAccounts: AccountMeta[] =\n parseRemainingAccounts(resolverScope);\n\n const getAccountMeta = getAccountMetaFactory(programAddress, \"programId\");\n return Object.freeze({\n accounts: [\n getAccountMeta(accounts.settings),\n getAccountMeta(accounts.slotHashSysvar),\n getAccountMeta(accounts.instructionsSysvar),\n getAccountMeta(accounts.source),\n getAccountMeta(accounts.destination),\n getAccountMeta(accounts.systemProgram),\n ...remainingAccounts,\n ],\n data: getNativeTransferIntentInstructionDataEncoder().encode(\n args as NativeTransferIntentInstructionDataArgs\n ),\n programAddress,\n } as NativeTransferIntentInstruction<\n TProgramAddress,\n TAccountSettings,\n TAccountSlotHashSysvar,\n TAccountInstructionsSysvar,\n TAccountSource,\n TAccountDestination,\n TAccountSystemProgram\n >);\n}\n\nexport type NativeTransferIntentInput<\n TAccountSettings extends string = string,\n TAccountSlotHashSysvar extends string = string,\n TAccountInstructionsSysvar extends string = string,\n TAccountSource extends string = string,\n TAccountDestination extends string = string,\n TAccountSystemProgram extends string = string,\n> = {\n settings: Address<TAccountSettings>;\n slotHashSysvar?: Address<TAccountSlotHashSysvar>;\n instructionsSysvar?: Address<TAccountInstructionsSysvar>;\n source: Address<TAccountSource>;\n destination: Address<TAccountDestination>;\n systemProgram?: Address<TAccountSystemProgram>;\n amount: NativeTransferIntentInstructionDataArgs[\"amount\"];\n secp256r1VerifyArgs: NativeTransferIntentInstructionDataArgs[\"secp256r1VerifyArgs\"];\n remainingAccounts: NativeTransferIntentInstructionExtraArgs[\"remainingAccounts\"];\n};\n\nexport function getNativeTransferIntentInstruction<\n TAccountSettings extends string,\n TAccountSlotHashSysvar extends string,\n TAccountInstructionsSysvar extends string,\n TAccountSource extends string,\n TAccountDestination extends string,\n TAccountSystemProgram extends string,\n TProgramAddress extends Address = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n>(\n input: NativeTransferIntentInput<\n TAccountSettings,\n TAccountSlotHashSysvar,\n TAccountInstructionsSysvar,\n TAccountSource,\n TAccountDestination,\n TAccountSystemProgram\n >,\n config?: { programAddress?: TProgramAddress }\n): NativeTransferIntentInstruction<\n TProgramAddress,\n TAccountSettings,\n TAccountSlotHashSysvar,\n TAccountInstructionsSysvar,\n TAccountSource,\n TAccountDestination,\n TAccountSystemProgram\n> {\n // Program address.\n const programAddress = config?.programAddress ?? MULTI_WALLET_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n settings: { value: input.settings ?? null, isWritable: false },\n slotHashSysvar: { value: input.slotHashSysvar ?? null, isWritable: false },\n instructionsSysvar: {\n value: input.instructionsSysvar ?? null,\n isWritable: false,\n },\n source: { value: input.source ?? null, isWritable: true },\n destination: { value: input.destination ?? 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 // Resolver scope.\n const resolverScope = { programAddress, accounts, args };\n\n // Resolve default values.\n if (!accounts.slotHashSysvar.value) {\n accounts.slotHashSysvar.value =\n \"SysvarS1otHashes111111111111111111111111111\" as Address<\"SysvarS1otHashes111111111111111111111111111\">;\n }\n if (!accounts.instructionsSysvar.value) {\n accounts.instructionsSysvar.value =\n \"Sysvar1nstructions1111111111111111111111111\" as Address<\"Sysvar1nstructions1111111111111111111111111\">;\n }\n if (!accounts.systemProgram.value) {\n accounts.systemProgram.value =\n \"11111111111111111111111111111111\" as Address<\"11111111111111111111111111111111\">;\n }\n\n // Remaining accounts.\n const remainingAccounts: AccountMeta[] =\n parseRemainingAccounts(resolverScope);\n\n const getAccountMeta = getAccountMetaFactory(programAddress, \"programId\");\n return Object.freeze({\n accounts: [\n getAccountMeta(accounts.settings),\n getAccountMeta(accounts.slotHashSysvar),\n getAccountMeta(accounts.instructionsSysvar),\n getAccountMeta(accounts.source),\n getAccountMeta(accounts.destination),\n getAccountMeta(accounts.systemProgram),\n ...remainingAccounts,\n ],\n data: getNativeTransferIntentInstructionDataEncoder().encode(\n args as NativeTransferIntentInstructionDataArgs\n ),\n programAddress,\n } as NativeTransferIntentInstruction<\n TProgramAddress,\n TAccountSettings,\n TAccountSlotHashSysvar,\n TAccountInstructionsSysvar,\n TAccountSource,\n TAccountDestination,\n TAccountSystemProgram\n >);\n}\n\nexport type ParsedNativeTransferIntentInstruction<\n TProgram extends string = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n settings: TAccountMetas[0];\n slotHashSysvar?: TAccountMetas[1] | undefined;\n instructionsSysvar: TAccountMetas[2];\n source: TAccountMetas[3];\n destination: TAccountMetas[4];\n systemProgram: TAccountMetas[5];\n };\n data: NativeTransferIntentInstructionData;\n};\n\nexport function parseNativeTransferIntentInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>\n): ParsedNativeTransferIntentInstruction<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 const getNextOptionalAccount = () => {\n const accountMeta = getNextAccount();\n return accountMeta.address === MULTI_WALLET_PROGRAM_ADDRESS\n ? undefined\n : accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n settings: getNextAccount(),\n slotHashSysvar: getNextOptionalAccount(),\n instructionsSysvar: getNextAccount(),\n source: getNextAccount(),\n destination: getNextAccount(),\n systemProgram: getNextAccount(),\n },\n data: getNativeTransferIntentInstructionDataDecoder().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 getArrayDecoder,\n getArrayEncoder,\n getBytesDecoder,\n getBytesEncoder,\n getStructDecoder,\n getStructEncoder,\n getU64Decoder,\n getU64Encoder,\n transformEncoder,\n type AccountMeta,\n type AccountSignerMeta,\n type Address,\n type Codec,\n type Decoder,\n type Encoder,\n type Instruction,\n type InstructionWithAccounts,\n type InstructionWithData,\n type ReadonlyAccount,\n type ReadonlyUint8Array,\n type TransactionSigner,\n type WritableAccount,\n type WritableSignerAccount,\n} from \"gill\";\nimport { parseRemainingAccounts } from \"../../hooked\";\nimport { MULTI_WALLET_PROGRAM_ADDRESS } from \"../programs\";\nimport { getAccountMetaFactory, type ResolvedAccount } from \"../shared\";\nimport {\n getProofArgsDecoder,\n getProofArgsEncoder,\n getSecp256r1VerifyArgsWithDomainAddressDecoder,\n getSecp256r1VerifyArgsWithDomainAddressEncoder,\n getSettingsReadonlyArgsDecoder,\n getSettingsReadonlyArgsEncoder,\n type ProofArgs,\n type ProofArgsArgs,\n type Secp256r1VerifyArgsWithDomainAddress,\n type Secp256r1VerifyArgsWithDomainAddressArgs,\n type SettingsReadonlyArgs,\n type SettingsReadonlyArgsArgs,\n} from \"../types\";\n\nexport const NATIVE_TRANSFER_INTENT_COMPRESSED_DISCRIMINATOR = new Uint8Array([\n 27,\n]);\n\nexport function getNativeTransferIntentCompressedDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 1).encode(\n NATIVE_TRANSFER_INTENT_COMPRESSED_DISCRIMINATOR\n );\n}\n\nexport type NativeTransferIntentCompressedInstruction<\n TProgram extends string = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n TAccountPayer extends string | AccountMeta<string> = string,\n TAccountSlotHashSysvar extends\n | string\n | AccountMeta<string> = \"SysvarS1otHashes111111111111111111111111111\",\n TAccountInstructionsSysvar extends\n | string\n | AccountMeta<string> = \"Sysvar1nstructions1111111111111111111111111\",\n TAccountSource extends string | AccountMeta<string> = string,\n TAccountDestination extends string | AccountMeta<string> = string,\n TAccountSystemProgram extends\n | string\n | AccountMeta<string> = \"11111111111111111111111111111111\",\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountPayer extends string\n ? WritableSignerAccount<TAccountPayer> &\n AccountSignerMeta<TAccountPayer>\n : TAccountPayer,\n TAccountSlotHashSysvar extends string\n ? ReadonlyAccount<TAccountSlotHashSysvar>\n : TAccountSlotHashSysvar,\n TAccountInstructionsSysvar extends string\n ? ReadonlyAccount<TAccountInstructionsSysvar>\n : TAccountInstructionsSysvar,\n TAccountSource extends string\n ? WritableAccount<TAccountSource>\n : TAccountSource,\n TAccountDestination extends string\n ? WritableAccount<TAccountDestination>\n : TAccountDestination,\n TAccountSystemProgram extends string\n ? ReadonlyAccount<TAccountSystemProgram>\n : TAccountSystemProgram,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type NativeTransferIntentCompressedInstructionData = {\n discriminator: ReadonlyUint8Array;\n amount: bigint;\n secp256r1VerifyArgs: Array<Secp256r1VerifyArgsWithDomainAddress>;\n settingsReadonlyArgs: SettingsReadonlyArgs;\n compressedProofArgs: ProofArgs;\n};\n\nexport type NativeTransferIntentCompressedInstructionDataArgs = {\n amount: number | bigint;\n secp256r1VerifyArgs: Array<Secp256r1VerifyArgsWithDomainAddressArgs>;\n settingsReadonlyArgs: SettingsReadonlyArgsArgs;\n compressedProofArgs: ProofArgsArgs;\n};\n\nexport function getNativeTransferIntentCompressedInstructionDataEncoder(): Encoder<NativeTransferIntentCompressedInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n [\"discriminator\", fixEncoderSize(getBytesEncoder(), 1)],\n [\"amount\", getU64Encoder()],\n [\n \"secp256r1VerifyArgs\",\n getArrayEncoder(getSecp256r1VerifyArgsWithDomainAddressEncoder()),\n ],\n [\"settingsReadonlyArgs\", getSettingsReadonlyArgsEncoder()],\n [\"compressedProofArgs\", getProofArgsEncoder()],\n ]),\n (value) => ({\n ...value,\n discriminator: NATIVE_TRANSFER_INTENT_COMPRESSED_DISCRIMINATOR,\n })\n );\n}\n\nexport function getNativeTransferIntentCompressedInstructionDataDecoder(): Decoder<NativeTransferIntentCompressedInstructionData> {\n return getStructDecoder([\n [\"discriminator\", fixDecoderSize(getBytesDecoder(), 1)],\n [\"amount\", getU64Decoder()],\n [\n \"secp256r1VerifyArgs\",\n getArrayDecoder(getSecp256r1VerifyArgsWithDomainAddressDecoder()),\n ],\n [\"settingsReadonlyArgs\", getSettingsReadonlyArgsDecoder()],\n [\"compressedProofArgs\", getProofArgsDecoder()],\n ]);\n}\n\nexport function getNativeTransferIntentCompressedInstructionDataCodec(): Codec<\n NativeTransferIntentCompressedInstructionDataArgs,\n NativeTransferIntentCompressedInstructionData\n> {\n return combineCodec(\n getNativeTransferIntentCompressedInstructionDataEncoder(),\n getNativeTransferIntentCompressedInstructionDataDecoder()\n );\n}\n\nexport type NativeTransferIntentCompressedInstructionExtraArgs = {\n remainingAccounts: Array<{ address: Address; role: number }>;\n};\n\nexport type NativeTransferIntentCompressedInput<\n TAccountPayer extends string = string,\n TAccountSlotHashSysvar extends string = string,\n TAccountInstructionsSysvar extends string = string,\n TAccountSource extends string = string,\n TAccountDestination extends string = string,\n TAccountSystemProgram extends string = string,\n> = {\n payer: TransactionSigner<TAccountPayer>;\n slotHashSysvar?: Address<TAccountSlotHashSysvar>;\n instructionsSysvar?: Address<TAccountInstructionsSysvar>;\n source: Address<TAccountSource>;\n destination: Address<TAccountDestination>;\n systemProgram?: Address<TAccountSystemProgram>;\n amount: NativeTransferIntentCompressedInstructionDataArgs[\"amount\"];\n secp256r1VerifyArgs: NativeTransferIntentCompressedInstructionDataArgs[\"secp256r1VerifyArgs\"];\n settingsReadonlyArgs: NativeTransferIntentCompressedInstructionDataArgs[\"settingsReadonlyArgs\"];\n compressedProofArgs: NativeTransferIntentCompressedInstructionDataArgs[\"compressedProofArgs\"];\n remainingAccounts: NativeTransferIntentCompressedInstructionExtraArgs[\"remainingAccounts\"];\n};\n\nexport function getNativeTransferIntentCompressedInstruction<\n TAccountPayer extends string,\n TAccountSlotHashSysvar extends string,\n TAccountInstructionsSysvar extends string,\n TAccountSource extends string,\n TAccountDestination extends string,\n TAccountSystemProgram extends string,\n TProgramAddress extends Address = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n>(\n input: NativeTransferIntentCompressedInput<\n TAccountPayer,\n TAccountSlotHashSysvar,\n TAccountInstructionsSysvar,\n TAccountSource,\n TAccountDestination,\n TAccountSystemProgram\n >,\n config?: { programAddress?: TProgramAddress }\n): NativeTransferIntentCompressedInstruction<\n TProgramAddress,\n TAccountPayer,\n TAccountSlotHashSysvar,\n TAccountInstructionsSysvar,\n TAccountSource,\n TAccountDestination,\n TAccountSystemProgram\n> {\n // Program address.\n const programAddress = config?.programAddress ?? MULTI_WALLET_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n payer: { value: input.payer ?? null, isWritable: true },\n slotHashSysvar: { value: input.slotHashSysvar ?? null, isWritable: false },\n instructionsSysvar: {\n value: input.instructionsSysvar ?? null,\n isWritable: false,\n },\n source: { value: input.source ?? null, isWritable: true },\n destination: { value: input.destination ?? 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 // Resolver scope.\n const resolverScope = { programAddress, accounts, args };\n\n // Resolve default values.\n if (!accounts.slotHashSysvar.value) {\n accounts.slotHashSysvar.value =\n \"SysvarS1otHashes111111111111111111111111111\" as Address<\"SysvarS1otHashes111111111111111111111111111\">;\n }\n if (!accounts.instructionsSysvar.value) {\n accounts.instructionsSysvar.value =\n \"Sysvar1nstructions1111111111111111111111111\" as Address<\"Sysvar1nstructions1111111111111111111111111\">;\n }\n if (!accounts.systemProgram.value) {\n accounts.systemProgram.value =\n \"11111111111111111111111111111111\" as Address<\"11111111111111111111111111111111\">;\n }\n\n // Remaining accounts.\n const remainingAccounts: AccountMeta[] =\n parseRemainingAccounts(resolverScope);\n\n const getAccountMeta = getAccountMetaFactory(programAddress, \"programId\");\n return Object.freeze({\n accounts: [\n getAccountMeta(accounts.payer),\n getAccountMeta(accounts.slotHashSysvar),\n getAccountMeta(accounts.instructionsSysvar),\n getAccountMeta(accounts.source),\n getAccountMeta(accounts.destination),\n getAccountMeta(accounts.systemProgram),\n ...remainingAccounts,\n ],\n data: getNativeTransferIntentCompressedInstructionDataEncoder().encode(\n args as NativeTransferIntentCompressedInstructionDataArgs\n ),\n programAddress,\n } as NativeTransferIntentCompressedInstruction<\n TProgramAddress,\n TAccountPayer,\n TAccountSlotHashSysvar,\n TAccountInstructionsSysvar,\n TAccountSource,\n TAccountDestination,\n TAccountSystemProgram\n >);\n}\n\nexport type ParsedNativeTransferIntentCompressedInstruction<\n TProgram extends string = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n payer: TAccountMetas[0];\n slotHashSysvar?: TAccountMetas[1] | undefined;\n instructionsSysvar: TAccountMetas[2];\n source: TAccountMetas[3];\n destination: TAccountMetas[4];\n systemProgram: TAccountMetas[5];\n };\n data: NativeTransferIntentCompressedInstructionData;\n};\n\nexport function parseNativeTransferIntentCompressedInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>\n): ParsedNativeTransferIntentCompressedInstruction<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 const getNextOptionalAccount = () => {\n const accountMeta = getNextAccount();\n return accountMeta.address === MULTI_WALLET_PROGRAM_ADDRESS\n ? undefined\n : accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n payer: getNextAccount(),\n slotHashSysvar: getNextOptionalAccount(),\n instructionsSysvar: getNextAccount(),\n source: getNextAccount(),\n destination: getNextAccount(),\n systemProgram: getNextAccount(),\n },\n data: getNativeTransferIntentCompressedInstructionDataDecoder().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 getU64Decoder,\n getU64Encoder,\n transformEncoder,\n type AccountMeta,\n type Address,\n type Codec,\n type Decoder,\n type Encoder,\n type Instruction,\n type InstructionWithAccounts,\n type InstructionWithData,\n type ReadonlyAccount,\n type ReadonlyUint8Array,\n type WritableAccount,\n} from \"gill\";\nimport { parseRemainingAccounts } from \"../../hooked\";\nimport { MULTI_WALLET_PROGRAM_ADDRESS } from \"../programs\";\nimport {\n expectAddress,\n getAccountMetaFactory,\n type ResolvedAccount,\n} from \"../shared\";\nimport {\n getSecp256r1VerifyArgsWithDomainAddressDecoder,\n getSecp256r1VerifyArgsWithDomainAddressEncoder,\n type Secp256r1VerifyArgsWithDomainAddress,\n type Secp256r1VerifyArgsWithDomainAddressArgs,\n} from \"../types\";\n\nexport const TOKEN_TRANSFER_INTENT_DISCRIMINATOR = new Uint8Array([30]);\n\nexport function getTokenTransferIntentDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 1).encode(\n TOKEN_TRANSFER_INTENT_DISCRIMINATOR\n );\n}\n\nexport type TokenTransferIntentInstruction<\n TProgram extends string = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n TAccountSettings extends string | AccountMeta<string> = string,\n TAccountSlotHashSysvar extends\n | string\n | AccountMeta<string> = \"SysvarS1otHashes111111111111111111111111111\",\n TAccountInstructionsSysvar extends\n | string\n | AccountMeta<string> = \"Sysvar1nstructions1111111111111111111111111\",\n TAccountSource extends string | AccountMeta<string> = string,\n TAccountSourceTokenAccount extends string | AccountMeta<string> = string,\n TAccountDestination extends string | AccountMeta<string> = string,\n TAccountDestinationTokenAccount extends string | AccountMeta<string> = string,\n TAccountTokenProgram extends\n | string\n | AccountMeta<string> = \"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA\",\n TAccountMint extends string | AccountMeta<string> = string,\n TAccountSystemProgram extends\n | string\n | AccountMeta<string> = \"11111111111111111111111111111111\",\n TAccountAssociatedTokenProgram extends\n | string\n | AccountMeta<string> = \"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL\",\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountSettings extends string\n ? ReadonlyAccount<TAccountSettings>\n : TAccountSettings,\n TAccountSlotHashSysvar extends string\n ? ReadonlyAccount<TAccountSlotHashSysvar>\n : TAccountSlotHashSysvar,\n TAccountInstructionsSysvar extends string\n ? ReadonlyAccount<TAccountInstructionsSysvar>\n : TAccountInstructionsSysvar,\n TAccountSource extends string\n ? WritableAccount<TAccountSource>\n : TAccountSource,\n TAccountSourceTokenAccount extends string\n ? WritableAccount<TAccountSourceTokenAccount>\n : TAccountSourceTokenAccount,\n TAccountDestination extends string\n ? ReadonlyAccount<TAccountDestination>\n : TAccountDestination,\n TAccountDestinationTokenAccount extends string\n ? WritableAccount<TAccountDestinationTokenAccount>\n : TAccountDestinationTokenAccount,\n TAccountTokenProgram extends string\n ? ReadonlyAccount<TAccountTokenProgram>\n : TAccountTokenProgram,\n TAccountMint extends string\n ? ReadonlyAccount<TAccountMint>\n : TAccountMint,\n TAccountSystemProgram extends string\n ? ReadonlyAccount<TAccountSystemProgram>\n : TAccountSystemProgram,\n TAccountAssociatedTokenProgram extends string\n ? ReadonlyAccount<TAccountAssociatedTokenProgram>\n : TAccountAssociatedTokenProgram,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type TokenTransferIntentInstructionData = {\n discriminator: ReadonlyUint8Array;\n amount: bigint;\n secp256r1VerifyArgs: Array<Secp256r1VerifyArgsWithDomainAddress>;\n};\n\nexport type TokenTransferIntentInstructionDataArgs = {\n amount: number | bigint;\n secp256r1VerifyArgs: Array<Secp256r1VerifyArgsWithDomainAddressArgs>;\n};\n\nexport function getTokenTransferIntentInstructionDataEncoder(): Encoder<TokenTransferIntentInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n [\"discriminator\", fixEncoderSize(getBytesEncoder(), 1)],\n [\"amount\", getU64Encoder()],\n [\n \"secp256r1VerifyArgs\",\n getArrayEncoder(getSecp256r1VerifyArgsWithDomainAddressEncoder()),\n ],\n ]),\n (value) => ({\n ...value,\n discriminator: TOKEN_TRANSFER_INTENT_DISCRIMINATOR,\n })\n );\n}\n\nexport function getTokenTransferIntentInstructionDataDecoder(): Decoder<TokenTransferIntentInstructionData> {\n return getStructDecoder([\n [\"discriminator\", fixDecoderSize(getBytesDecoder(), 1)],\n [\"amount\", getU64Decoder()],\n [\n \"secp256r1VerifyArgs\",\n getArrayDecoder(getSecp256r1VerifyArgsWithDomainAddressDecoder()),\n ],\n ]);\n}\n\nexport function getTokenTransferIntentInstructionDataCodec(): Codec<\n TokenTransferIntentInstructionDataArgs,\n TokenTransferIntentInstructionData\n> {\n return combineCodec(\n getTokenTransferIntentInstructionDataEncoder(),\n getTokenTransferIntentInstructionDataDecoder()\n );\n}\n\nexport type TokenTransferIntentInstructionExtraArgs = {\n remainingAccounts: Array<{ address: Address; role: number }>;\n};\n\nexport type TokenTransferIntentAsyncInput<\n TAccountSettings extends string = string,\n TAccountSlotHashSysvar extends string = string,\n TAccountInstructionsSysvar extends string = string,\n TAccountSource extends string = string,\n TAccountSourceTokenAccount extends string = string,\n TAccountDestination extends string = string,\n TAccountDestinationTokenAccount extends string = string,\n TAccountTokenProgram extends string = string,\n TAccountMint extends string = string,\n TAccountSystemProgram extends string = string,\n TAccountAssociatedTokenProgram extends string = string,\n> = {\n settings: Address<TAccountSettings>;\n slotHashSysvar?: Address<TAccountSlotHashSysvar>;\n instructionsSysvar?: Address<TAccountInstructionsSysvar>;\n source?: Address<TAccountSource>;\n sourceTokenAccount?: Address<TAccountSourceTokenAccount>;\n destination: Address<TAccountDestination>;\n destinationTokenAccount?: Address<TAccountDestinationTokenAccount>;\n tokenProgram?: Address<TAccountTokenProgram>;\n mint: Address<TAccountMint>;\n systemProgram?: Address<TAccountSystemProgram>;\n associatedTokenProgram?: Address<TAccountAssociatedTokenProgram>;\n amount: TokenTransferIntentInstructionDataArgs[\"amount\"];\n secp256r1VerifyArgs: TokenTransferIntentInstructionDataArgs[\"secp256r1VerifyArgs\"];\n remainingAccounts: TokenTransferIntentInstructionExtraArgs[\"remainingAccounts\"];\n};\n\nexport async function getTokenTransferIntentInstructionAsync<\n TAccountSettings extends string,\n TAccountSlotHashSysvar extends string,\n TAccountInstructionsSysvar extends string,\n TAccountSource extends string,\n TAccountSourceTokenAccount extends string,\n TAccountDestination extends string,\n TAccountDestinationTokenAccount extends string,\n TAccountTokenProgram extends string,\n TAccountMint extends string,\n TAccountSystemProgram extends string,\n TAccountAssociatedTokenProgram extends string,\n TProgramAddress extends Address = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n>(\n input: TokenTransferIntentAsyncInput<\n TAccountSettings,\n TAccountSlotHashSysvar,\n TAccountInstructionsSysvar,\n TAccountSource,\n TAccountSourceTokenAccount,\n TAccountDestination,\n TAccountDestinationTokenAccount,\n TAccountTokenProgram,\n TAccountMint,\n TAccountSystemProgram,\n TAccountAssociatedTokenProgram\n >,\n config?: { programAddress?: TProgramAddress }\n): Promise<\n TokenTransferIntentInstruction<\n TProgramAddress,\n TAccountSettings,\n TAccountSlotHashSysvar,\n TAccountInstructionsSysvar,\n TAccountSource,\n TAccountSourceTokenAccount,\n TAccountDestination,\n TAccountDestinationTokenAccount,\n TAccountTokenProgram,\n TAccountMint,\n TAccountSystemProgram,\n TAccountAssociatedTokenProgram\n >\n> {\n // Program address.\n const programAddress = config?.programAddress ?? MULTI_WALLET_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n settings: { value: input.settings ?? null, isWritable: false },\n slotHashSysvar: { value: input.slotHashSysvar ?? null, isWritable: false },\n instructionsSysvar: {\n value: input.instructionsSysvar ?? null,\n isWritable: false,\n },\n source: { value: input.source ?? null, isWritable: true },\n sourceTokenAccount: {\n value: input.sourceTokenAccount ?? null,\n isWritable: true,\n },\n destination: { value: input.destination ?? null, isWritable: false },\n destinationTokenAccount: {\n value: input.destinationTokenAccount ?? null,\n isWritable: true,\n },\n tokenProgram: { value: input.tokenProgram ?? null, isWritable: false },\n mint: { value: input.mint ?? null, isWritable: false },\n systemProgram: { value: input.systemProgram ?? null, isWritable: false },\n associatedTokenProgram: {\n value: input.associatedTokenProgram ?? null,\n isWritable: false,\n },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolver scope.\n const resolverScope = { programAddress, accounts, args };\n\n // Resolve default values.\n if (!accounts.slotHashSysvar.value) {\n accounts.slotHashSysvar.value =\n \"SysvarS1otHashes111111111111111111111111111\" as Address<\"SysvarS1otHashes111111111111111111111111111\">;\n }\n if (!accounts.instructionsSysvar.value) {\n accounts.instructionsSysvar.value =\n \"Sysvar1nstructions1111111111111111111111111\" as Address<\"Sysvar1nstructions1111111111111111111111111\">;\n }\n if (!accounts.source.value) {\n accounts.source.value = await getProgramDerivedAddress({\n programAddress,\n seeds: [\n getBytesEncoder().encode(\n new Uint8Array([\n 109, 117, 108, 116, 105, 95, 119, 97, 108, 108, 101, 116,\n ])\n ),\n getAddressEncoder().encode(expectAddress(accounts.settings.value)),\n getBytesEncoder().encode(new Uint8Array([118, 97, 117, 108, 116])),\n ],\n });\n }\n if (!accounts.tokenProgram.value) {\n accounts.tokenProgram.value =\n \"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA\" as Address<\"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA\">;\n }\n if (!accounts.sourceTokenAccount.value) {\n accounts.sourceTokenAccount.value = await getProgramDerivedAddress({\n programAddress:\n \"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL\" as Address<\"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL\">,\n seeds: [\n getAddressEncoder().encode(expectAddress(accounts.source.value)),\n getAddressEncoder().encode(expectAddress(accounts.tokenProgram.value)),\n getAddressEncoder().encode(expectAddress(accounts.mint.value)),\n ],\n });\n }\n if (!accounts.destinationTokenAccount.value) {\n accounts.destinationTokenAccount.value = await getProgramDerivedAddress({\n programAddress:\n \"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL\" as Address<\"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL\">,\n seeds: [\n getAddressEncoder().encode(expectAddress(accounts.destination.value)),\n getAddressEncoder().encode(expectAddress(accounts.tokenProgram.value)),\n getAddressEncoder().encode(expectAddress(accounts.mint.value)),\n ],\n });\n }\n if (!accounts.systemProgram.value) {\n accounts.systemProgram.value =\n \"11111111111111111111111111111111\" as Address<\"11111111111111111111111111111111\">;\n }\n if (!accounts.associatedTokenProgram.value) {\n accounts.associatedTokenProgram.value =\n \"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL\" as Address<\"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL\">;\n }\n\n // Remaining accounts.\n const remainingAccounts: AccountMeta[] =\n parseRemainingAccounts(resolverScope);\n\n const getAccountMeta = getAccountMetaFactory(programAddress, \"programId\");\n return Object.freeze({\n accounts: [\n getAccountMeta(accounts.settings),\n getAccountMeta(accounts.slotHashSysvar),\n getAccountMeta(accounts.instructionsSysvar),\n getAccountMeta(accounts.source),\n getAccountMeta(accounts.sourceTokenAccount),\n getAccountMeta(accounts.destination),\n getAccountMeta(accounts.destinationTokenAccount),\n getAccountMeta(accounts.tokenProgram),\n getAccountMeta(accounts.mint),\n getAccountMeta(accounts.systemProgram),\n getAccountMeta(accounts.associatedTokenProgram),\n ...remainingAccounts,\n ],\n data: getTokenTransferIntentInstructionDataEncoder().encode(\n args as TokenTransferIntentInstructionDataArgs\n ),\n programAddress,\n } as TokenTransferIntentInstruction<\n TProgramAddress,\n TAccountSettings,\n TAccountSlotHashSysvar,\n TAccountInstructionsSysvar,\n TAccountSource,\n TAccountSourceTokenAccount,\n TAccountDestination,\n TAccountDestinationTokenAccount,\n TAccountTokenProgram,\n TAccountMint,\n TAccountSystemProgram,\n TAccountAssociatedTokenProgram\n >);\n}\n\nexport type TokenTransferIntentInput<\n TAccountSettings extends string = string,\n TAccountSlotHashSysvar extends string = string,\n TAccountInstructionsSysvar extends string = string,\n TAccountSource extends string = string,\n TAccountSourceTokenAccount extends string = string,\n TAccountDestination extends string = string,\n TAccountDestinationTokenAccount extends string = string,\n TAccountTokenProgram extends string = string,\n TAccountMint extends string = string,\n TAccountSystemProgram extends string = string,\n TAccountAssociatedTokenProgram extends string = string,\n> = {\n settings: Address<TAccountSettings>;\n slotHashSysvar?: Address<TAccountSlotHashSysvar>;\n instructionsSysvar?: Address<TAccountInstructionsSysvar>;\n source: Address<TAccountSource>;\n sourceTokenAccount: Address<TAccountSourceTokenAccount>;\n destination: Address<TAccountDestination>;\n destinationTokenAccount: Address<TAccountDestinationTokenAccount>;\n tokenProgram?: Address<TAccountTokenProgram>;\n mint: Address<TAccountMint>;\n systemProgram?: Address<TAccountSystemProgram>;\n associatedTokenProgram?: Address<TAccountAssociatedTokenProgram>;\n amount: TokenTransferIntentInstructionDataArgs[\"amount\"];\n secp256r1VerifyArgs: TokenTransferIntentInstructionDataArgs[\"secp256r1VerifyArgs\"];\n remainingAccounts: TokenTransferIntentInstructionExtraArgs[\"remainingAccounts\"];\n};\n\nexport function getTokenTransferIntentInstruction<\n TAccountSettings extends string,\n TAccountSlotHashSysvar extends string,\n TAccountInstructionsSysvar extends string,\n TAccountSource extends string,\n TAccountSourceTokenAccount extends string,\n TAccountDestination extends string,\n TAccountDestinationTokenAccount extends string,\n TAccountTokenProgram extends string,\n TAccountMint extends string,\n TAccountSystemProgram extends string,\n TAccountAssociatedTokenProgram extends string,\n TProgramAddress extends Address = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n>(\n input: TokenTransferIntentInput<\n TAccountSettings,\n TAccountSlotHashSysvar,\n TAccountInstructionsSysvar,\n TAccountSource,\n TAccountSourceTokenAccount,\n TAccountDestination,\n TAccountDestinationTokenAccount,\n TAccountTokenProgram,\n TAccountMint,\n TAccountSystemProgram,\n TAccountAssociatedTokenProgram\n >,\n config?: { programAddress?: TProgramAddress }\n): TokenTransferIntentInstruction<\n TProgramAddress,\n TAccountSettings,\n TAccountSlotHashSysvar,\n TAccountInstructionsSysvar,\n TAccountSource,\n TAccountSourceTokenAccount,\n TAccountDestination,\n TAccountDestinationTokenAccount,\n TAccountTokenProgram,\n TAccountMint,\n TAccountSystemProgram,\n TAccountAssociatedTokenProgram\n> {\n // Program address.\n const programAddress = config?.programAddress ?? MULTI_WALLET_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n settings: { value: input.settings ?? null, isWritable: false },\n slotHashSysvar: { value: input.slotHashSysvar ?? null, isWritable: false },\n instructionsSysvar: {\n value: input.instructionsSysvar ?? null,\n isWritable: false,\n },\n source: { value: input.source ?? null, isWritable: true },\n sourceTokenAccount: {\n value: input.sourceTokenAccount ?? null,\n isWritable: true,\n },\n destination: { value: input.destination ?? null, isWritable: false },\n destinationTokenAccount: {\n value: input.destinationTokenAccount ?? null,\n isWritable: true,\n },\n tokenProgram: { value: input.tokenProgram ?? null, isWritable: false },\n mint: { value: input.mint ?? null, isWritable: false },\n systemProgram: { value: input.systemProgram ?? null, isWritable: false },\n associatedTokenProgram: {\n value: input.associatedTokenProgram ?? null,\n isWritable: false,\n },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolver scope.\n const resolverScope = { programAddress, accounts, args };\n\n // Resolve default values.\n if (!accounts.slotHashSysvar.value) {\n accounts.slotHashSysvar.value =\n \"SysvarS1otHashes111111111111111111111111111\" as Address<\"SysvarS1otHashes111111111111111111111111111\">;\n }\n if (!accounts.instructionsSysvar.value) {\n accounts.instructionsSysvar.value =\n \"Sysvar1nstructions1111111111111111111111111\" as Address<\"Sysvar1nstructions1111111111111111111111111\">;\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.associatedTokenProgram.value) {\n accounts.associatedTokenProgram.value =\n \"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL\" as Address<\"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL\">;\n }\n\n // Remaining accounts.\n const remainingAccounts: AccountMeta[] =\n parseRemainingAccounts(resolverScope);\n\n const getAccountMeta = getAccountMetaFactory(programAddress, \"programId\");\n return Object.freeze({\n accounts: [\n getAccountMeta(accounts.settings),\n getAccountMeta(accounts.slotHashSysvar),\n getAccountMeta(accounts.instructionsSysvar),\n getAccountMeta(accounts.source),\n getAccountMeta(accounts.sourceTokenAccount),\n getAccountMeta(accounts.destination),\n getAccountMeta(accounts.destinationTokenAccount),\n getAccountMeta(accounts.tokenProgram),\n getAccountMeta(accounts.mint),\n getAccountMeta(accounts.systemProgram),\n getAccountMeta(accounts.associatedTokenProgram),\n ...remainingAccounts,\n ],\n data: getTokenTransferIntentInstructionDataEncoder().encode(\n args as TokenTransferIntentInstructionDataArgs\n ),\n programAddress,\n } as TokenTransferIntentInstruction<\n TProgramAddress,\n TAccountSettings,\n TAccountSlotHashSysvar,\n TAccountInstructionsSysvar,\n TAccountSource,\n TAccountSourceTokenAccount,\n TAccountDestination,\n TAccountDestinationTokenAccount,\n TAccountTokenProgram,\n TAccountMint,\n TAccountSystemProgram,\n TAccountAssociatedTokenProgram\n >);\n}\n\nexport type ParsedTokenTransferIntentInstruction<\n TProgram extends string = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n settings: TAccountMetas[0];\n slotHashSysvar?: TAccountMetas[1] | undefined;\n instructionsSysvar: TAccountMetas[2];\n source: TAccountMetas[3];\n sourceTokenAccount: TAccountMetas[4];\n destination: TAccountMetas[5];\n destinationTokenAccount: TAccountMetas[6];\n tokenProgram: TAccountMetas[7];\n mint: TAccountMetas[8];\n systemProgram: TAccountMetas[9];\n associatedTokenProgram: TAccountMetas[10];\n };\n data: TokenTransferIntentInstructionData;\n};\n\nexport function parseTokenTransferIntentInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>\n): ParsedTokenTransferIntentInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 11) {\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 const getNextOptionalAccount = () => {\n const accountMeta = getNextAccount();\n return accountMeta.address === MULTI_WALLET_PROGRAM_ADDRESS\n ? undefined\n : accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n settings: getNextAccount(),\n slotHashSysvar: getNextOptionalAccount(),\n instructionsSysvar: getNextAccount(),\n source: getNextAccount(),\n sourceTokenAccount: getNextAccount(),\n destination: getNextAccount(),\n destinationTokenAccount: getNextAccount(),\n tokenProgram: getNextAccount(),\n mint: getNextAccount(),\n systemProgram: getNextAccount(),\n associatedTokenProgram: getNextAccount(),\n },\n data: getTokenTransferIntentInstructionDataDecoder().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 getU64Decoder,\n getU64Encoder,\n transformEncoder,\n type AccountMeta,\n type AccountSignerMeta,\n type Address,\n type Codec,\n type Decoder,\n type Encoder,\n type Instruction,\n type InstructionWithAccounts,\n type InstructionWithData,\n type ReadonlyAccount,\n type ReadonlyUint8Array,\n type TransactionSigner,\n type WritableAccount,\n type WritableSignerAccount,\n} from \"gill\";\nimport { parseRemainingAccounts } from \"../../hooked\";\nimport { MULTI_WALLET_PROGRAM_ADDRESS } from \"../programs\";\nimport {\n expectAddress,\n getAccountMetaFactory,\n type ResolvedAccount,\n} from \"../shared\";\nimport {\n getProofArgsDecoder,\n getProofArgsEncoder,\n getSecp256r1VerifyArgsWithDomainAddressDecoder,\n getSecp256r1VerifyArgsWithDomainAddressEncoder,\n getSettingsReadonlyArgsDecoder,\n getSettingsReadonlyArgsEncoder,\n type ProofArgs,\n type ProofArgsArgs,\n type Secp256r1VerifyArgsWithDomainAddress,\n type Secp256r1VerifyArgsWithDomainAddressArgs,\n type SettingsReadonlyArgs,\n type SettingsReadonlyArgsArgs,\n} from \"../types\";\n\nexport const TOKEN_TRANSFER_INTENT_COMPRESSED_DISCRIMINATOR = new Uint8Array([\n 28,\n]);\n\nexport function getTokenTransferIntentCompressedDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 1).encode(\n TOKEN_TRANSFER_INTENT_COMPRESSED_DISCRIMINATOR\n );\n}\n\nexport type TokenTransferIntentCompressedInstruction<\n TProgram extends string = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n TAccountPayer extends string | AccountMeta<string> = string,\n TAccountSlotHashSysvar extends\n | string\n | AccountMeta<string> = \"SysvarS1otHashes111111111111111111111111111\",\n TAccountInstructionsSysvar extends\n | string\n | AccountMeta<string> = \"Sysvar1nstructions1111111111111111111111111\",\n TAccountSource extends string | AccountMeta<string> = string,\n TAccountSourceTokenAccount extends string | AccountMeta<string> = string,\n TAccountDestination extends string | AccountMeta<string> = string,\n TAccountDestinationTokenAccount extends string | AccountMeta<string> = string,\n TAccountTokenProgram extends\n | string\n | AccountMeta<string> = \"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA\",\n TAccountMint extends string | AccountMeta<string> = string,\n TAccountSystemProgram extends\n | string\n | AccountMeta<string> = \"11111111111111111111111111111111\",\n TAccountAssociatedTokenProgram extends\n | string\n | AccountMeta<string> = \"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL\",\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountPayer extends string\n ? WritableSignerAccount<TAccountPayer> &\n AccountSignerMeta<TAccountPayer>\n : TAccountPayer,\n TAccountSlotHashSysvar extends string\n ? ReadonlyAccount<TAccountSlotHashSysvar>\n : TAccountSlotHashSysvar,\n TAccountInstructionsSysvar extends string\n ? ReadonlyAccount<TAccountInstructionsSysvar>\n : TAccountInstructionsSysvar,\n TAccountSource extends string\n ? WritableAccount<TAccountSource>\n : TAccountSource,\n TAccountSourceTokenAccount extends string\n ? WritableAccount<TAccountSourceTokenAccount>\n : TAccountSourceTokenAccount,\n TAccountDestination extends string\n ? ReadonlyAccount<TAccountDestination>\n : TAccountDestination,\n TAccountDestinationTokenAccount extends string\n ? WritableAccount<TAccountDestinationTokenAccount>\n : TAccountDestinationTokenAccount,\n TAccountTokenProgram extends string\n ? ReadonlyAccount<TAccountTokenProgram>\n : TAccountTokenProgram,\n TAccountMint extends string\n ? ReadonlyAccount<TAccountMint>\n : TAccountMint,\n TAccountSystemProgram extends string\n ? ReadonlyAccount<TAccountSystemProgram>\n : TAccountSystemProgram,\n TAccountAssociatedTokenProgram extends string\n ? ReadonlyAccount<TAccountAssociatedTokenProgram>\n : TAccountAssociatedTokenProgram,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type TokenTransferIntentCompressedInstructionData = {\n discriminator: ReadonlyUint8Array;\n amount: bigint;\n secp256r1VerifyArgs: Array<Secp256r1VerifyArgsWithDomainAddress>;\n settingsReadonlyArgs: SettingsReadonlyArgs;\n compressedProofArgs: ProofArgs;\n};\n\nexport type TokenTransferIntentCompressedInstructionDataArgs = {\n amount: number | bigint;\n secp256r1VerifyArgs: Array<Secp256r1VerifyArgsWithDomainAddressArgs>;\n settingsReadonlyArgs: SettingsReadonlyArgsArgs;\n compressedProofArgs: ProofArgsArgs;\n};\n\nexport function getTokenTransferIntentCompressedInstructionDataEncoder(): Encoder<TokenTransferIntentCompressedInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n [\"discriminator\", fixEncoderSize(getBytesEncoder(), 1)],\n [\"amount\", getU64Encoder()],\n [\n \"secp256r1VerifyArgs\",\n getArrayEncoder(getSecp256r1VerifyArgsWithDomainAddressEncoder()),\n ],\n [\"settingsReadonlyArgs\", getSettingsReadonlyArgsEncoder()],\n [\"compressedProofArgs\", getProofArgsEncoder()],\n ]),\n (value) => ({\n ...value,\n discriminator: TOKEN_TRANSFER_INTENT_COMPRESSED_DISCRIMINATOR,\n })\n );\n}\n\nexport function getTokenTransferIntentCompressedInstructionDataDecoder(): Decoder<TokenTransferIntentCompressedInstructionData> {\n return getStructDecoder([\n [\"discriminator\", fixDecoderSize(getBytesDecoder(), 1)],\n [\"amount\", getU64Decoder()],\n [\n \"secp256r1VerifyArgs\",\n getArrayDecoder(getSecp256r1VerifyArgsWithDomainAddressDecoder()),\n ],\n [\"settingsReadonlyArgs\", getSettingsReadonlyArgsDecoder()],\n [\"compressedProofArgs\", getProofArgsDecoder()],\n ]);\n}\n\nexport function getTokenTransferIntentCompressedInstructionDataCodec(): Codec<\n TokenTransferIntentCompressedInstructionDataArgs,\n TokenTransferIntentCompressedInstructionData\n> {\n return combineCodec(\n getTokenTransferIntentCompressedInstructionDataEncoder(),\n getTokenTransferIntentCompressedInstructionDataDecoder()\n );\n}\n\nexport type TokenTransferIntentCompressedInstructionExtraArgs = {\n remainingAccounts: Array<{ address: Address; role: number }>;\n};\n\nexport type TokenTransferIntentCompressedAsyncInput<\n TAccountPayer extends string = string,\n TAccountSlotHashSysvar extends string = string,\n TAccountInstructionsSysvar extends string = string,\n TAccountSource extends string = string,\n TAccountSourceTokenAccount extends string = string,\n TAccountDestination extends string = string,\n TAccountDestinationTokenAccount extends string = string,\n TAccountTokenProgram extends string = string,\n TAccountMint extends string = string,\n TAccountSystemProgram extends string = string,\n TAccountAssociatedTokenProgram extends string = string,\n> = {\n payer: TransactionSigner<TAccountPayer>;\n slotHashSysvar?: Address<TAccountSlotHashSysvar>;\n instructionsSysvar?: Address<TAccountInstructionsSysvar>;\n source: Address<TAccountSource>;\n sourceTokenAccount?: Address<TAccountSourceTokenAccount>;\n destination: Address<TAccountDestination>;\n destinationTokenAccount?: Address<TAccountDestinationTokenAccount>;\n tokenProgram?: Address<TAccountTokenProgram>;\n mint: Address<TAccountMint>;\n systemProgram?: Address<TAccountSystemProgram>;\n associatedTokenProgram?: Address<TAccountAssociatedTokenProgram>;\n amount: TokenTransferIntentCompressedInstructionDataArgs[\"amount\"];\n secp256r1VerifyArgs: TokenTransferIntentCompressedInstructionDataArgs[\"secp256r1VerifyArgs\"];\n settingsReadonlyArgs: TokenTransferIntentCompressedInstructionDataArgs[\"settingsReadonlyArgs\"];\n compressedProofArgs: TokenTransferIntentCompressedInstructionDataArgs[\"compressedProofArgs\"];\n remainingAccounts: TokenTransferIntentCompressedInstructionExtraArgs[\"remainingAccounts\"];\n};\n\nexport async function getTokenTransferIntentCompressedInstructionAsync<\n TAccountPayer extends string,\n TAccountSlotHashSysvar extends string,\n TAccountInstructionsSysvar extends string,\n TAccountSource extends string,\n TAccountSourceTokenAccount extends string,\n TAccountDestination extends string,\n TAccountDestinationTokenAccount extends string,\n TAccountTokenProgram extends string,\n TAccountMint extends string,\n TAccountSystemProgram extends string,\n TAccountAssociatedTokenProgram extends string,\n TProgramAddress extends Address = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n>(\n input: TokenTransferIntentCompressedAsyncInput<\n TAccountPayer,\n TAccountSlotHashSysvar,\n TAccountInstructionsSysvar,\n TAccountSource,\n TAccountSourceTokenAccount,\n TAccountDestination,\n TAccountDestinationTokenAccount,\n TAccountTokenProgram,\n TAccountMint,\n TAccountSystemProgram,\n TAccountAssociatedTokenProgram\n >,\n config?: { programAddress?: TProgramAddress }\n): Promise<\n TokenTransferIntentCompressedInstruction<\n TProgramAddress,\n TAccountPayer,\n TAccountSlotHashSysvar,\n TAccountInstructionsSysvar,\n TAccountSource,\n TAccountSourceTokenAccount,\n TAccountDestination,\n TAccountDestinationTokenAccount,\n TAccountTokenProgram,\n TAccountMint,\n TAccountSystemProgram,\n TAccountAssociatedTokenProgram\n >\n> {\n // Program address.\n const programAddress = config?.programAddress ?? MULTI_WALLET_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n payer: { value: input.payer ?? null, isWritable: true },\n slotHashSysvar: { value: input.slotHashSysvar ?? null, isWritable: false },\n instructionsSysvar: {\n value: input.instructionsSysvar ?? null,\n isWritable: false,\n },\n source: { value: input.source ?? null, isWritable: true },\n sourceTokenAccount: {\n value: input.sourceTokenAccount ?? null,\n isWritable: true,\n },\n destination: { value: input.destination ?? null, isWritable: false },\n destinationTokenAccount: {\n value: input.destinationTokenAccount ?? null,\n isWritable: true,\n },\n tokenProgram: { value: input.tokenProgram ?? null, isWritable: false },\n mint: { value: input.mint ?? null, isWritable: false },\n systemProgram: { value: input.systemProgram ?? null, isWritable: false },\n associatedTokenProgram: {\n value: input.associatedTokenProgram ?? null,\n isWritable: false,\n },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolver scope.\n const resolverScope = { programAddress, accounts, args };\n\n // Resolve default values.\n if (!accounts.slotHashSysvar.value) {\n accounts.slotHashSysvar.value =\n \"SysvarS1otHashes111111111111111111111111111\" as Address<\"SysvarS1otHashes111111111111111111111111111\">;\n }\n if (!accounts.instructionsSysvar.value) {\n accounts.instructionsSysvar.value =\n \"Sysvar1nstructions1111111111111111111111111\" as Address<\"Sysvar1nstructions1111111111111111111111111\">;\n }\n if (!accounts.tokenProgram.value) {\n accounts.tokenProgram.value =\n \"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA\" as Address<\"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA\">;\n }\n if (!accounts.sourceTokenAccount.value) {\n accounts.sourceTokenAccount.value = await getProgramDerivedAddress({\n programAddress:\n \"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL\" as Address<\"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL\">,\n seeds: [\n getAddressEncoder().encode(expectAddress(accounts.source.value)),\n getAddressEncoder().encode(expectAddress(accounts.tokenProgram.value)),\n getAddressEncoder().encode(expectAddress(accounts.mint.value)),\n ],\n });\n }\n if (!accounts.destinationTokenAccount.value) {\n accounts.destinationTokenAccount.value = await getProgramDerivedAddress({\n programAddress:\n \"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL\" as Address<\"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL\">,\n seeds: [\n getAddressEncoder().encode(expectAddress(accounts.destination.value)),\n getAddressEncoder().encode(expectAddress(accounts.tokenProgram.value)),\n getAddressEncoder().encode(expectAddress(accounts.mint.value)),\n ],\n });\n }\n if (!accounts.systemProgram.value) {\n accounts.systemProgram.value =\n \"11111111111111111111111111111111\" as Address<\"11111111111111111111111111111111\">;\n }\n if (!accounts.associatedTokenProgram.value) {\n accounts.associatedTokenProgram.value =\n \"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL\" as Address<\"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL\">;\n }\n\n // Remaining accounts.\n const remainingAccounts: AccountMeta[] =\n parseRemainingAccounts(resolverScope);\n\n const getAccountMeta = getAccountMetaFactory(programAddress, \"programId\");\n return Object.freeze({\n accounts: [\n getAccountMeta(accounts.payer),\n getAccountMeta(accounts.slotHashSysvar),\n getAccountMeta(accounts.instructionsSysvar),\n getAccountMeta(accounts.source),\n getAccountMeta(accounts.sourceTokenAccount),\n getAccountMeta(accounts.destination),\n getAccountMeta(accounts.destinationTokenAccount),\n getAccountMeta(accounts.tokenProgram),\n getAccountMeta(accounts.mint),\n getAccountMeta(accounts.systemProgram),\n getAccountMeta(accounts.associatedTokenProgram),\n ...remainingAccounts,\n ],\n data: getTokenTransferIntentCompressedInstructionDataEncoder().encode(\n args as TokenTransferIntentCompressedInstructionDataArgs\n ),\n programAddress,\n } as TokenTransferIntentCompressedInstruction<\n TProgramAddress,\n TAccountPayer,\n TAccountSlotHashSysvar,\n TAccountInstructionsSysvar,\n TAccountSource,\n TAccountSourceTokenAccount,\n TAccountDestination,\n TAccountDestinationTokenAccount,\n TAccountTokenProgram,\n TAccountMint,\n TAccountSystemProgram,\n TAccountAssociatedTokenProgram\n >);\n}\n\nexport type TokenTransferIntentCompressedInput<\n TAccountPayer extends string = string,\n TAccountSlotHashSysvar extends string = string,\n TAccountInstructionsSysvar extends string = string,\n TAccountSource extends string = string,\n TAccountSourceTokenAccount extends string = string,\n TAccountDestination extends string = string,\n TAccountDestinationTokenAccount extends string = string,\n TAccountTokenProgram extends string = string,\n TAccountMint extends string = string,\n TAccountSystemProgram extends string = string,\n TAccountAssociatedTokenProgram extends string = string,\n> = {\n payer: TransactionSigner<TAccountPayer>;\n slotHashSysvar?: Address<TAccountSlotHashSysvar>;\n instructionsSysvar?: Address<TAccountInstructionsSysvar>;\n source: Address<TAccountSource>;\n sourceTokenAccount: Address<TAccountSourceTokenAccount>;\n destination: Address<TAccountDestination>;\n destinationTokenAccount: Address<TAccountDestinationTokenAccount>;\n tokenProgram?: Address<TAccountTokenProgram>;\n mint: Address<TAccountMint>;\n systemProgram?: Address<TAccountSystemProgram>;\n associatedTokenProgram?: Address<TAccountAssociatedTokenProgram>;\n amount: TokenTransferIntentCompressedInstructionDataArgs[\"amount\"];\n secp256r1VerifyArgs: TokenTransferIntentCompressedInstructionDataArgs[\"secp256r1VerifyArgs\"];\n settingsReadonlyArgs: TokenTransferIntentCompressedInstructionDataArgs[\"settingsReadonlyArgs\"];\n compressedProofArgs: TokenTransferIntentCompressedInstructionDataArgs[\"compressedProofArgs\"];\n remainingAccounts: TokenTransferIntentCompressedInstructionExtraArgs[\"remainingAccounts\"];\n};\n\nexport function getTokenTransferIntentCompressedInstruction<\n TAccountPayer extends string,\n TAccountSlotHashSysvar extends string,\n TAccountInstructionsSysvar extends string,\n TAccountSource extends string,\n TAccountSourceTokenAccount extends string,\n TAccountDestination extends string,\n TAccountDestinationTokenAccount extends string,\n TAccountTokenProgram extends string,\n TAccountMint extends string,\n TAccountSystemProgram extends string,\n TAccountAssociatedTokenProgram extends string,\n TProgramAddress extends Address = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n>(\n input: TokenTransferIntentCompressedInput<\n TAccountPayer,\n TAccountSlotHashSysvar,\n TAccountInstructionsSysvar,\n TAccountSource,\n TAccountSourceTokenAccount,\n TAccountDestination,\n TAccountDestinationTokenAccount,\n TAccountTokenProgram,\n TAccountMint,\n TAccountSystemProgram,\n TAccountAssociatedTokenProgram\n >,\n config?: { programAddress?: TProgramAddress }\n): TokenTransferIntentCompressedInstruction<\n TProgramAddress,\n TAccountPayer,\n TAccountSlotHashSysvar,\n TAccountInstructionsSysvar,\n TAccountSource,\n TAccountSourceTokenAccount,\n TAccountDestination,\n TAccountDestinationTokenAccount,\n TAccountTokenProgram,\n TAccountMint,\n TAccountSystemProgram,\n TAccountAssociatedTokenProgram\n> {\n // Program address.\n const programAddress = config?.programAddress ?? MULTI_WALLET_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n payer: { value: input.payer ?? null, isWritable: true },\n slotHashSysvar: { value: input.slotHashSysvar ?? null, isWritable: false },\n instructionsSysvar: {\n value: input.instructionsSysvar ?? null,\n isWritable: false,\n },\n source: { value: input.source ?? null, isWritable: true },\n sourceTokenAccount: {\n value: input.sourceTokenAccount ?? null,\n isWritable: true,\n },\n destination: { value: input.destination ?? null, isWritable: false },\n destinationTokenAccount: {\n value: input.destinationTokenAccount ?? null,\n isWritable: true,\n },\n tokenProgram: { value: input.tokenProgram ?? null, isWritable: false },\n mint: { value: input.mint ?? null, isWritable: false },\n systemProgram: { value: input.systemProgram ?? null, isWritable: false },\n associatedTokenProgram: {\n value: input.associatedTokenProgram ?? null,\n isWritable: false,\n },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolver scope.\n const resolverScope = { programAddress, accounts, args };\n\n // Resolve default values.\n if (!accounts.slotHashSysvar.value) {\n accounts.slotHashSysvar.value =\n \"SysvarS1otHashes111111111111111111111111111\" as Address<\"SysvarS1otHashes111111111111111111111111111\">;\n }\n if (!accounts.instructionsSysvar.value) {\n accounts.instructionsSysvar.value =\n \"Sysvar1nstructions1111111111111111111111111\" as Address<\"Sysvar1nstructions1111111111111111111111111\">;\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.associatedTokenProgram.value) {\n accounts.associatedTokenProgram.value =\n \"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL\" as Address<\"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL\">;\n }\n\n // Remaining accounts.\n const remainingAccounts: AccountMeta[] =\n parseRemainingAccounts(resolverScope);\n\n const getAccountMeta = getAccountMetaFactory(programAddress, \"programId\");\n return Object.freeze({\n accounts: [\n getAccountMeta(accounts.payer),\n getAccountMeta(accounts.slotHashSysvar),\n getAccountMeta(accounts.instructionsSysvar),\n getAccountMeta(accounts.source),\n getAccountMeta(accounts.sourceTokenAccount),\n getAccountMeta(accounts.destination),\n getAccountMeta(accounts.destinationTokenAccount),\n getAccountMeta(accounts.tokenProgram),\n getAccountMeta(accounts.mint),\n getAccountMeta(accounts.systemProgram),\n getAccountMeta(accounts.associatedTokenProgram),\n ...remainingAccounts,\n ],\n data: getTokenTransferIntentCompressedInstructionDataEncoder().encode(\n args as TokenTransferIntentCompressedInstructionDataArgs\n ),\n programAddress,\n } as TokenTransferIntentCompressedInstruction<\n TProgramAddress,\n TAccountPayer,\n TAccountSlotHashSysvar,\n TAccountInstructionsSysvar,\n TAccountSource,\n TAccountSourceTokenAccount,\n TAccountDestination,\n TAccountDestinationTokenAccount,\n TAccountTokenProgram,\n TAccountMint,\n TAccountSystemProgram,\n TAccountAssociatedTokenProgram\n >);\n}\n\nexport type ParsedTokenTransferIntentCompressedInstruction<\n TProgram extends string = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n payer: TAccountMetas[0];\n slotHashSysvar?: TAccountMetas[1] | undefined;\n instructionsSysvar: TAccountMetas[2];\n source: TAccountMetas[3];\n sourceTokenAccount: TAccountMetas[4];\n destination: TAccountMetas[5];\n destinationTokenAccount: TAccountMetas[6];\n tokenProgram: TAccountMetas[7];\n mint: TAccountMetas[8];\n systemProgram: TAccountMetas[9];\n associatedTokenProgram: TAccountMetas[10];\n };\n data: TokenTransferIntentCompressedInstructionData;\n};\n\nexport function parseTokenTransferIntentCompressedInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>\n): ParsedTokenTransferIntentCompressedInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 11) {\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 const getNextOptionalAccount = () => {\n const accountMeta = getNextAccount();\n return accountMeta.address === MULTI_WALLET_PROGRAM_ADDRESS\n ? undefined\n : accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n payer: getNextAccount(),\n slotHashSysvar: getNextOptionalAccount(),\n instructionsSysvar: getNextAccount(),\n source: getNextAccount(),\n sourceTokenAccount: getNextAccount(),\n destination: getNextAccount(),\n destinationTokenAccount: getNextAccount(),\n tokenProgram: getNextAccount(),\n mint: getNextAccount(),\n systemProgram: getNextAccount(),\n associatedTokenProgram: getNextAccount(),\n },\n data: getTokenTransferIntentCompressedInstructionDataDecoder().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 getOptionDecoder,\n getOptionEncoder,\n getStructDecoder,\n getStructEncoder,\n transformEncoder,\n type AccountMeta,\n type AccountSignerMeta,\n type Address,\n type Codec,\n type Decoder,\n type Encoder,\n type Instruction,\n type InstructionWithAccounts,\n type InstructionWithData,\n type Option,\n type OptionOrNullable,\n type ReadonlyAccount,\n type ReadonlySignerAccount,\n type ReadonlyUint8Array,\n type TransactionSigner,\n type WritableAccount,\n} from \"gill\";\nimport { parseRemainingAccounts } from \"../../hooked\";\nimport { MULTI_WALLET_PROGRAM_ADDRESS } from \"../programs\";\nimport { getAccountMetaFactory, type ResolvedAccount } from \"../shared\";\nimport {\n getSecp256r1VerifyArgsDecoder,\n getSecp256r1VerifyArgsEncoder,\n type Secp256r1VerifyArgs,\n type Secp256r1VerifyArgsArgs,\n} from \"../types\";\n\nexport const TRANSACTION_BUFFER_CLOSE_DISCRIMINATOR = new Uint8Array([12]);\n\nexport function getTransactionBufferCloseDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 1).encode(\n TRANSACTION_BUFFER_CLOSE_DISCRIMINATOR\n );\n}\n\nexport type TransactionBufferCloseInstruction<\n TProgram extends string = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n TAccountSettings extends string | AccountMeta<string> = string,\n TAccountPayer extends string | AccountMeta<string> = string,\n TAccountDomainConfig extends string | AccountMeta<string> = string,\n TAccountTransactionBuffer extends string | AccountMeta<string> = string,\n TAccountCloser extends string | AccountMeta<string> = string,\n TAccountSlotHashSysvar extends\n | string\n | AccountMeta<string> = \"SysvarS1otHashes111111111111111111111111111\",\n TAccountInstructionsSysvar extends\n | string\n | AccountMeta<string> = \"Sysvar1nstructions1111111111111111111111111\",\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountSettings extends string\n ? ReadonlyAccount<TAccountSettings>\n : TAccountSettings,\n TAccountPayer extends string\n ? WritableAccount<TAccountPayer>\n : TAccountPayer,\n TAccountDomainConfig extends string\n ? ReadonlyAccount<TAccountDomainConfig>\n : TAccountDomainConfig,\n TAccountTransactionBuffer extends string\n ? WritableAccount<TAccountTransactionBuffer>\n : TAccountTransactionBuffer,\n TAccountCloser extends string\n ? ReadonlySignerAccount<TAccountCloser> &\n AccountSignerMeta<TAccountCloser>\n : TAccountCloser,\n TAccountSlotHashSysvar extends string\n ? ReadonlyAccount<TAccountSlotHashSysvar>\n : TAccountSlotHashSysvar,\n TAccountInstructionsSysvar extends string\n ? ReadonlyAccount<TAccountInstructionsSysvar>\n : TAccountInstructionsSysvar,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type TransactionBufferCloseInstructionData = {\n discriminator: ReadonlyUint8Array;\n secp256r1VerifyArgs: Option<Secp256r1VerifyArgs>;\n};\n\nexport type TransactionBufferCloseInstructionDataArgs = {\n secp256r1VerifyArgs: OptionOrNullable<Secp256r1VerifyArgsArgs>;\n};\n\nexport function getTransactionBufferCloseInstructionDataEncoder(): Encoder<TransactionBufferCloseInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n [\"discriminator\", fixEncoderSize(getBytesEncoder(), 1)],\n [\n \"secp256r1VerifyArgs\",\n getOptionEncoder(getSecp256r1VerifyArgsEncoder()),\n ],\n ]),\n (value) => ({\n ...value,\n discriminator: TRANSACTION_BUFFER_CLOSE_DISCRIMINATOR,\n })\n );\n}\n\nexport function getTransactionBufferCloseInstructionDataDecoder(): Decoder<TransactionBufferCloseInstructionData> {\n return getStructDecoder([\n [\"discriminator\", fixDecoderSize(getBytesDecoder(), 1)],\n [\"secp256r1VerifyArgs\", getOptionDecoder(getSecp256r1VerifyArgsDecoder())],\n ]);\n}\n\nexport function getTransactionBufferCloseInstructionDataCodec(): Codec<\n TransactionBufferCloseInstructionDataArgs,\n TransactionBufferCloseInstructionData\n> {\n return combineCodec(\n getTransactionBufferCloseInstructionDataEncoder(),\n getTransactionBufferCloseInstructionDataDecoder()\n );\n}\n\nexport type TransactionBufferCloseInstructionExtraArgs = {\n remainingAccounts: Array<{ address: Address; role: number }>;\n};\n\nexport type TransactionBufferCloseInput<\n TAccountSettings extends string = string,\n TAccountPayer extends string = string,\n TAccountDomainConfig extends string = string,\n TAccountTransactionBuffer extends string = string,\n TAccountCloser extends string = string,\n TAccountSlotHashSysvar extends string = string,\n TAccountInstructionsSysvar extends string = string,\n> = {\n settings: Address<TAccountSettings>;\n payer: Address<TAccountPayer>;\n domainConfig?: Address<TAccountDomainConfig>;\n transactionBuffer: Address<TAccountTransactionBuffer>;\n closer?: TransactionSigner<TAccountCloser>;\n slotHashSysvar?: Address<TAccountSlotHashSysvar>;\n instructionsSysvar?: Address<TAccountInstructionsSysvar>;\n secp256r1VerifyArgs: TransactionBufferCloseInstructionDataArgs[\"secp256r1VerifyArgs\"];\n remainingAccounts: TransactionBufferCloseInstructionExtraArgs[\"remainingAccounts\"];\n};\n\nexport function getTransactionBufferCloseInstruction<\n TAccountSettings extends string,\n TAccountPayer extends string,\n TAccountDomainConfig extends string,\n TAccountTransactionBuffer extends string,\n TAccountCloser extends string,\n TAccountSlotHashSysvar extends string,\n TAccountInstructionsSysvar extends string,\n TProgramAddress extends Address = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n>(\n input: TransactionBufferCloseInput<\n TAccountSettings,\n TAccountPayer,\n TAccountDomainConfig,\n TAccountTransactionBuffer,\n TAccountCloser,\n TAccountSlotHashSysvar,\n TAccountInstructionsSysvar\n >,\n config?: { programAddress?: TProgramAddress }\n): TransactionBufferCloseInstruction<\n TProgramAddress,\n TAccountSettings,\n TAccountPayer,\n TAccountDomainConfig,\n TAccountTransactionBuffer,\n TAccountCloser,\n TAccountSlotHashSysvar,\n TAccountInstructionsSysvar\n> {\n // Program address.\n const programAddress = config?.programAddress ?? MULTI_WALLET_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n settings: { value: input.settings ?? null, isWritable: false },\n payer: { value: input.payer ?? null, isWritable: true },\n domainConfig: { value: input.domainConfig ?? null, isWritable: false },\n transactionBuffer: {\n value: input.transactionBuffer ?? null,\n isWritable: true,\n },\n closer: { value: input.closer ?? null, isWritable: false },\n slotHashSysvar: { value: input.slotHashSysvar ?? null, isWritable: false },\n instructionsSysvar: {\n value: input.instructionsSysvar ?? null,\n isWritable: false,\n },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolver scope.\n const resolverScope = { programAddress, accounts, args };\n\n // Resolve default values.\n if (!accounts.slotHashSysvar.value) {\n accounts.slotHashSysvar.value =\n \"SysvarS1otHashes111111111111111111111111111\" as Address<\"SysvarS1otHashes111111111111111111111111111\">;\n }\n if (!accounts.instructionsSysvar.value) {\n accounts.instructionsSysvar.value =\n \"Sysvar1nstructions1111111111111111111111111\" as Address<\"Sysvar1nstructions1111111111111111111111111\">;\n }\n\n // Remaining accounts.\n const remainingAccounts: AccountMeta[] =\n parseRemainingAccounts(resolverScope);\n\n const getAccountMeta = getAccountMetaFactory(programAddress, \"programId\");\n return Object.freeze({\n accounts: [\n getAccountMeta(accounts.settings),\n getAccountMeta(accounts.payer),\n getAccountMeta(accounts.domainConfig),\n getAccountMeta(accounts.transactionBuffer),\n getAccountMeta(accounts.closer),\n getAccountMeta(accounts.slotHashSysvar),\n getAccountMeta(accounts.instructionsSysvar),\n ...remainingAccounts,\n ],\n data: getTransactionBufferCloseInstructionDataEncoder().encode(\n args as TransactionBufferCloseInstructionDataArgs\n ),\n programAddress,\n } as TransactionBufferCloseInstruction<\n TProgramAddress,\n TAccountSettings,\n TAccountPayer,\n TAccountDomainConfig,\n TAccountTransactionBuffer,\n TAccountCloser,\n TAccountSlotHashSysvar,\n TAccountInstructionsSysvar\n >);\n}\n\nexport type ParsedTransactionBufferCloseInstruction<\n TProgram extends string = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n settings: TAccountMetas[0];\n payer: TAccountMetas[1];\n domainConfig?: TAccountMetas[2] | undefined;\n transactionBuffer: TAccountMetas[3];\n closer?: TAccountMetas[4] | undefined;\n slotHashSysvar?: TAccountMetas[5] | undefined;\n instructionsSysvar?: TAccountMetas[6] | undefined;\n };\n data: TransactionBufferCloseInstructionData;\n};\n\nexport function parseTransactionBufferCloseInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>\n): ParsedTransactionBufferCloseInstruction<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 const getNextOptionalAccount = () => {\n const accountMeta = getNextAccount();\n return accountMeta.address === MULTI_WALLET_PROGRAM_ADDRESS\n ? undefined\n : accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n settings: getNextAccount(),\n payer: getNextAccount(),\n domainConfig: getNextOptionalAccount(),\n transactionBuffer: getNextAccount(),\n closer: getNextOptionalAccount(),\n slotHashSysvar: getNextOptionalAccount(),\n instructionsSysvar: getNextOptionalAccount(),\n },\n data: getTransactionBufferCloseInstructionDataDecoder().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 getOptionDecoder,\n getOptionEncoder,\n getStructDecoder,\n getStructEncoder,\n transformEncoder,\n type AccountMeta,\n type AccountSignerMeta,\n type Address,\n type Codec,\n type Decoder,\n type Encoder,\n type Instruction,\n type InstructionWithAccounts,\n type InstructionWithData,\n type Option,\n type OptionOrNullable,\n type ReadonlyAccount,\n type ReadonlySignerAccount,\n type ReadonlyUint8Array,\n type TransactionSigner,\n type WritableAccount,\n type WritableSignerAccount,\n} from \"gill\";\nimport { parseRemainingAccounts } from \"../../hooked\";\nimport { MULTI_WALLET_PROGRAM_ADDRESS } from \"../programs\";\nimport { getAccountMetaFactory, type ResolvedAccount } from \"../shared\";\nimport {\n getProofArgsDecoder,\n getProofArgsEncoder,\n getSecp256r1VerifyArgsDecoder,\n getSecp256r1VerifyArgsEncoder,\n getSettingsReadonlyArgsDecoder,\n getSettingsReadonlyArgsEncoder,\n type ProofArgs,\n type ProofArgsArgs,\n type Secp256r1VerifyArgs,\n type Secp256r1VerifyArgsArgs,\n type SettingsReadonlyArgs,\n type SettingsReadonlyArgsArgs,\n} from \"../types\";\n\nexport const TRANSACTION_BUFFER_CLOSE_COMPRESSED_DISCRIMINATOR = new Uint8Array(\n [23]\n);\n\nexport function getTransactionBufferCloseCompressedDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 1).encode(\n TRANSACTION_BUFFER_CLOSE_COMPRESSED_DISCRIMINATOR\n );\n}\n\nexport type TransactionBufferCloseCompressedInstruction<\n TProgram extends string = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n TAccountPayer extends string | AccountMeta<string> = string,\n TAccountRentCollector extends string | AccountMeta<string> = string,\n TAccountDomainConfig extends string | AccountMeta<string> = string,\n TAccountTransactionBuffer extends string | AccountMeta<string> = string,\n TAccountCloser extends string | AccountMeta<string> = string,\n TAccountSlotHashSysvar extends\n | string\n | AccountMeta<string> = \"SysvarS1otHashes111111111111111111111111111\",\n TAccountInstructionsSysvar extends\n | string\n | AccountMeta<string> = \"Sysvar1nstructions1111111111111111111111111\",\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountPayer extends string\n ? WritableSignerAccount<TAccountPayer> &\n AccountSignerMeta<TAccountPayer>\n : TAccountPayer,\n TAccountRentCollector extends string\n ? WritableAccount<TAccountRentCollector>\n : TAccountRentCollector,\n TAccountDomainConfig extends string\n ? ReadonlyAccount<TAccountDomainConfig>\n : TAccountDomainConfig,\n TAccountTransactionBuffer extends string\n ? WritableAccount<TAccountTransactionBuffer>\n : TAccountTransactionBuffer,\n TAccountCloser extends string\n ? ReadonlySignerAccount<TAccountCloser> &\n AccountSignerMeta<TAccountCloser>\n : TAccountCloser,\n TAccountSlotHashSysvar extends string\n ? ReadonlyAccount<TAccountSlotHashSysvar>\n : TAccountSlotHashSysvar,\n TAccountInstructionsSysvar extends string\n ? ReadonlyAccount<TAccountInstructionsSysvar>\n : TAccountInstructionsSysvar,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type TransactionBufferCloseCompressedInstructionData = {\n discriminator: ReadonlyUint8Array;\n secp256r1VerifyArgs: Option<Secp256r1VerifyArgs>;\n settingsReadonlyArgs: SettingsReadonlyArgs;\n compressedProofArgs: ProofArgs;\n};\n\nexport type TransactionBufferCloseCompressedInstructionDataArgs = {\n secp256r1VerifyArgs: OptionOrNullable<Secp256r1VerifyArgsArgs>;\n settingsReadonlyArgs: SettingsReadonlyArgsArgs;\n compressedProofArgs: ProofArgsArgs;\n};\n\nexport function getTransactionBufferCloseCompressedInstructionDataEncoder(): Encoder<TransactionBufferCloseCompressedInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n [\"discriminator\", fixEncoderSize(getBytesEncoder(), 1)],\n [\n \"secp256r1VerifyArgs\",\n getOptionEncoder(getSecp256r1VerifyArgsEncoder()),\n ],\n [\"settingsReadonlyArgs\", getSettingsReadonlyArgsEncoder()],\n [\"compressedProofArgs\", getProofArgsEncoder()],\n ]),\n (value) => ({\n ...value,\n discriminator: TRANSACTION_BUFFER_CLOSE_COMPRESSED_DISCRIMINATOR,\n })\n );\n}\n\nexport function getTransactionBufferCloseCompressedInstructionDataDecoder(): Decoder<TransactionBufferCloseCompressedInstructionData> {\n return getStructDecoder([\n [\"discriminator\", fixDecoderSize(getBytesDecoder(), 1)],\n [\"secp256r1VerifyArgs\", getOptionDecoder(getSecp256r1VerifyArgsDecoder())],\n [\"settingsReadonlyArgs\", getSettingsReadonlyArgsDecoder()],\n [\"compressedProofArgs\", getProofArgsDecoder()],\n ]);\n}\n\nexport function getTransactionBufferCloseCompressedInstructionDataCodec(): Codec<\n TransactionBufferCloseCompressedInstructionDataArgs,\n TransactionBufferCloseCompressedInstructionData\n> {\n return combineCodec(\n getTransactionBufferCloseCompressedInstructionDataEncoder(),\n getTransactionBufferCloseCompressedInstructionDataDecoder()\n );\n}\n\nexport type TransactionBufferCloseCompressedInstructionExtraArgs = {\n remainingAccounts: Array<{ address: Address; role: number }>;\n};\n\nexport type TransactionBufferCloseCompressedInput<\n TAccountPayer extends string = string,\n TAccountRentCollector extends string = string,\n TAccountDomainConfig extends string = string,\n TAccountTransactionBuffer extends string = string,\n TAccountCloser extends string = string,\n TAccountSlotHashSysvar extends string = string,\n TAccountInstructionsSysvar extends string = string,\n> = {\n payer: TransactionSigner<TAccountPayer>;\n rentCollector: Address<TAccountRentCollector>;\n domainConfig?: Address<TAccountDomainConfig>;\n transactionBuffer: Address<TAccountTransactionBuffer>;\n closer?: TransactionSigner<TAccountCloser>;\n slotHashSysvar?: Address<TAccountSlotHashSysvar>;\n instructionsSysvar?: Address<TAccountInstructionsSysvar>;\n secp256r1VerifyArgs: TransactionBufferCloseCompressedInstructionDataArgs[\"secp256r1VerifyArgs\"];\n settingsReadonlyArgs: TransactionBufferCloseCompressedInstructionDataArgs[\"settingsReadonlyArgs\"];\n compressedProofArgs: TransactionBufferCloseCompressedInstructionDataArgs[\"compressedProofArgs\"];\n remainingAccounts: TransactionBufferCloseCompressedInstructionExtraArgs[\"remainingAccounts\"];\n};\n\nexport function getTransactionBufferCloseCompressedInstruction<\n TAccountPayer extends string,\n TAccountRentCollector extends string,\n TAccountDomainConfig extends string,\n TAccountTransactionBuffer extends string,\n TAccountCloser extends string,\n TAccountSlotHashSysvar extends string,\n TAccountInstructionsSysvar extends string,\n TProgramAddress extends Address = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n>(\n input: TransactionBufferCloseCompressedInput<\n TAccountPayer,\n TAccountRentCollector,\n TAccountDomainConfig,\n TAccountTransactionBuffer,\n TAccountCloser,\n TAccountSlotHashSysvar,\n TAccountInstructionsSysvar\n >,\n config?: { programAddress?: TProgramAddress }\n): TransactionBufferCloseCompressedInstruction<\n TProgramAddress,\n TAccountPayer,\n TAccountRentCollector,\n TAccountDomainConfig,\n TAccountTransactionBuffer,\n TAccountCloser,\n TAccountSlotHashSysvar,\n TAccountInstructionsSysvar\n> {\n // Program address.\n const programAddress = config?.programAddress ?? MULTI_WALLET_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n payer: { value: input.payer ?? null, isWritable: true },\n rentCollector: { value: input.rentCollector ?? null, isWritable: true },\n domainConfig: { value: input.domainConfig ?? null, isWritable: false },\n transactionBuffer: {\n value: input.transactionBuffer ?? null,\n isWritable: true,\n },\n closer: { value: input.closer ?? null, isWritable: false },\n slotHashSysvar: { value: input.slotHashSysvar ?? null, isWritable: false },\n instructionsSysvar: {\n value: input.instructionsSysvar ?? null,\n isWritable: false,\n },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolver scope.\n const resolverScope = { programAddress, accounts, args };\n\n // Resolve default values.\n if (!accounts.slotHashSysvar.value) {\n accounts.slotHashSysvar.value =\n \"SysvarS1otHashes111111111111111111111111111\" as Address<\"SysvarS1otHashes111111111111111111111111111\">;\n }\n if (!accounts.instructionsSysvar.value) {\n accounts.instructionsSysvar.value =\n \"Sysvar1nstructions1111111111111111111111111\" as Address<\"Sysvar1nstructions1111111111111111111111111\">;\n }\n\n // Remaining accounts.\n const remainingAccounts: AccountMeta[] =\n parseRemainingAccounts(resolverScope);\n\n const getAccountMeta = getAccountMetaFactory(programAddress, \"programId\");\n return Object.freeze({\n accounts: [\n getAccountMeta(accounts.payer),\n getAccountMeta(accounts.rentCollector),\n getAccountMeta(accounts.domainConfig),\n getAccountMeta(accounts.transactionBuffer),\n getAccountMeta(accounts.closer),\n getAccountMeta(accounts.slotHashSysvar),\n getAccountMeta(accounts.instructionsSysvar),\n ...remainingAccounts,\n ],\n data: getTransactionBufferCloseCompressedInstructionDataEncoder().encode(\n args as TransactionBufferCloseCompressedInstructionDataArgs\n ),\n programAddress,\n } as TransactionBufferCloseCompressedInstruction<\n TProgramAddress,\n TAccountPayer,\n TAccountRentCollector,\n TAccountDomainConfig,\n TAccountTransactionBuffer,\n TAccountCloser,\n TAccountSlotHashSysvar,\n TAccountInstructionsSysvar\n >);\n}\n\nexport type ParsedTransactionBufferCloseCompressedInstruction<\n TProgram extends string = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n payer: TAccountMetas[0];\n rentCollector: TAccountMetas[1];\n domainConfig?: TAccountMetas[2] | undefined;\n transactionBuffer: TAccountMetas[3];\n closer?: TAccountMetas[4] | undefined;\n slotHashSysvar?: TAccountMetas[5] | undefined;\n instructionsSysvar?: TAccountMetas[6] | undefined;\n };\n data: TransactionBufferCloseCompressedInstructionData;\n};\n\nexport function parseTransactionBufferCloseCompressedInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>\n): ParsedTransactionBufferCloseCompressedInstruction<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 const getNextOptionalAccount = () => {\n const accountMeta = getNextAccount();\n return accountMeta.address === MULTI_WALLET_PROGRAM_ADDRESS\n ? undefined\n : accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n payer: getNextAccount(),\n rentCollector: getNextAccount(),\n domainConfig: getNextOptionalAccount(),\n transactionBuffer: getNextAccount(),\n closer: getNextOptionalAccount(),\n slotHashSysvar: getNextOptionalAccount(),\n instructionsSysvar: getNextOptionalAccount(),\n },\n data: getTransactionBufferCloseCompressedInstructionDataDecoder().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 getOptionDecoder,\n getOptionEncoder,\n getStructDecoder,\n getStructEncoder,\n transformEncoder,\n type AccountMeta,\n type AccountSignerMeta,\n type Address,\n type Codec,\n type Decoder,\n type Encoder,\n type Instruction,\n type InstructionWithAccounts,\n type InstructionWithData,\n type Option,\n type OptionOrNullable,\n type ReadonlyAccount,\n type ReadonlySignerAccount,\n type ReadonlyUint8Array,\n type TransactionSigner,\n type WritableAccount,\n type WritableSignerAccount,\n} from \"gill\";\nimport { parseRemainingAccounts } from \"../../hooked\";\nimport { MULTI_WALLET_PROGRAM_ADDRESS } from \"../programs\";\nimport { getAccountMetaFactory, type ResolvedAccount } from \"../shared\";\nimport {\n getSecp256r1VerifyArgsDecoder,\n getSecp256r1VerifyArgsEncoder,\n getTransactionBufferCreateArgsDecoder,\n getTransactionBufferCreateArgsEncoder,\n type Secp256r1VerifyArgs,\n type Secp256r1VerifyArgsArgs,\n type TransactionBufferCreateArgs,\n type TransactionBufferCreateArgsArgs,\n} from \"../types\";\n\nexport const TRANSACTION_BUFFER_CREATE_DISCRIMINATOR = new Uint8Array([9]);\n\nexport function getTransactionBufferCreateDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 1).encode(\n TRANSACTION_BUFFER_CREATE_DISCRIMINATOR\n );\n}\n\nexport type TransactionBufferCreateInstruction<\n TProgram extends string = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n TAccountSettings extends string | AccountMeta<string> = string,\n TAccountPayer extends string | AccountMeta<string> = string,\n TAccountDomainConfig extends string | AccountMeta<string> = string,\n TAccountTransactionBuffer extends string | AccountMeta<string> = string,\n TAccountCreator extends string | AccountMeta<string> = string,\n TAccountSystemProgram extends\n | string\n | AccountMeta<string> = \"11111111111111111111111111111111\",\n TAccountInstructionsSysvar extends\n | string\n | AccountMeta<string> = \"Sysvar1nstructions1111111111111111111111111\",\n TAccountSlotHashSysvar extends\n | string\n | AccountMeta<string> = \"SysvarS1otHashes111111111111111111111111111\",\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountSettings extends string\n ? ReadonlyAccount<TAccountSettings>\n : TAccountSettings,\n TAccountPayer extends string\n ? WritableSignerAccount<TAccountPayer> &\n AccountSignerMeta<TAccountPayer>\n : TAccountPayer,\n TAccountDomainConfig extends string\n ? ReadonlyAccount<TAccountDomainConfig>\n : TAccountDomainConfig,\n TAccountTransactionBuffer extends string\n ? WritableAccount<TAccountTransactionBuffer>\n : TAccountTransactionBuffer,\n TAccountCreator extends string\n ? ReadonlySignerAccount<TAccountCreator> &\n AccountSignerMeta<TAccountCreator>\n : TAccountCreator,\n TAccountSystemProgram extends string\n ? ReadonlyAccount<TAccountSystemProgram>\n : TAccountSystemProgram,\n TAccountInstructionsSysvar extends string\n ? ReadonlyAccount<TAccountInstructionsSysvar>\n : TAccountInstructionsSysvar,\n TAccountSlotHashSysvar extends string\n ? ReadonlyAccount<TAccountSlotHashSysvar>\n : TAccountSlotHashSysvar,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type TransactionBufferCreateInstructionData = {\n discriminator: ReadonlyUint8Array;\n args: TransactionBufferCreateArgs;\n secp256r1VerifyArgs: Option<Secp256r1VerifyArgs>;\n};\n\nexport type TransactionBufferCreateInstructionDataArgs = {\n args: TransactionBufferCreateArgsArgs;\n secp256r1VerifyArgs: OptionOrNullable<Secp256r1VerifyArgsArgs>;\n};\n\nexport function getTransactionBufferCreateInstructionDataEncoder(): Encoder<TransactionBufferCreateInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n [\"discriminator\", fixEncoderSize(getBytesEncoder(), 1)],\n [\"args\", getTransactionBufferCreateArgsEncoder()],\n [\n \"secp256r1VerifyArgs\",\n getOptionEncoder(getSecp256r1VerifyArgsEncoder()),\n ],\n ]),\n (value) => ({\n ...value,\n discriminator: TRANSACTION_BUFFER_CREATE_DISCRIMINATOR,\n })\n );\n}\n\nexport function getTransactionBufferCreateInstructionDataDecoder(): Decoder<TransactionBufferCreateInstructionData> {\n return getStructDecoder([\n [\"discriminator\", fixDecoderSize(getBytesDecoder(), 1)],\n [\"args\", getTransactionBufferCreateArgsDecoder()],\n [\"secp256r1VerifyArgs\", getOptionDecoder(getSecp256r1VerifyArgsDecoder())],\n ]);\n}\n\nexport function getTransactionBufferCreateInstructionDataCodec(): Codec<\n TransactionBufferCreateInstructionDataArgs,\n TransactionBufferCreateInstructionData\n> {\n return combineCodec(\n getTransactionBufferCreateInstructionDataEncoder(),\n getTransactionBufferCreateInstructionDataDecoder()\n );\n}\n\nexport type TransactionBufferCreateInstructionExtraArgs = {\n remainingAccounts: Array<{ address: Address; role: number }>;\n};\n\nexport type TransactionBufferCreateInput<\n TAccountSettings extends string = string,\n TAccountPayer extends string = string,\n TAccountDomainConfig extends string = string,\n TAccountTransactionBuffer extends string = string,\n TAccountCreator extends string = string,\n TAccountSystemProgram extends string = string,\n TAccountInstructionsSysvar extends string = string,\n TAccountSlotHashSysvar extends string = string,\n> = {\n settings: Address<TAccountSettings>;\n payer: TransactionSigner<TAccountPayer>;\n domainConfig?: Address<TAccountDomainConfig>;\n transactionBuffer: Address<TAccountTransactionBuffer>;\n creator?: TransactionSigner<TAccountCreator>;\n systemProgram?: Address<TAccountSystemProgram>;\n instructionsSysvar?: Address<TAccountInstructionsSysvar>;\n slotHashSysvar?: Address<TAccountSlotHashSysvar>;\n args: TransactionBufferCreateInstructionDataArgs[\"args\"];\n secp256r1VerifyArgs: TransactionBufferCreateInstructionDataArgs[\"secp256r1VerifyArgs\"];\n remainingAccounts: TransactionBufferCreateInstructionExtraArgs[\"remainingAccounts\"];\n};\n\nexport function getTransactionBufferCreateInstruction<\n TAccountSettings extends string,\n TAccountPayer extends string,\n TAccountDomainConfig extends string,\n TAccountTransactionBuffer extends string,\n TAccountCreator extends string,\n TAccountSystemProgram extends string,\n TAccountInstructionsSysvar extends string,\n TAccountSlotHashSysvar extends string,\n TProgramAddress extends Address = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n>(\n input: TransactionBufferCreateInput<\n TAccountSettings,\n TAccountPayer,\n TAccountDomainConfig,\n TAccountTransactionBuffer,\n TAccountCreator,\n TAccountSystemProgram,\n TAccountInstructionsSysvar,\n TAccountSlotHashSysvar\n >,\n config?: { programAddress?: TProgramAddress }\n): TransactionBufferCreateInstruction<\n TProgramAddress,\n TAccountSettings,\n TAccountPayer,\n TAccountDomainConfig,\n TAccountTransactionBuffer,\n TAccountCreator,\n TAccountSystemProgram,\n TAccountInstructionsSysvar,\n TAccountSlotHashSysvar\n> {\n // Program address.\n const programAddress = config?.programAddress ?? MULTI_WALLET_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n settings: { value: input.settings ?? null, isWritable: false },\n payer: { value: input.payer ?? null, isWritable: true },\n domainConfig: { value: input.domainConfig ?? null, isWritable: false },\n transactionBuffer: {\n value: input.transactionBuffer ?? null,\n isWritable: true,\n },\n creator: { value: input.creator ?? null, isWritable: false },\n systemProgram: { value: input.systemProgram ?? null, isWritable: false },\n instructionsSysvar: {\n value: input.instructionsSysvar ?? null,\n isWritable: false,\n },\n slotHashSysvar: { value: input.slotHashSysvar ?? 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 // Resolver scope.\n const resolverScope = { programAddress, accounts, args };\n\n // Resolve default values.\n if (!accounts.systemProgram.value) {\n accounts.systemProgram.value =\n \"11111111111111111111111111111111\" as Address<\"11111111111111111111111111111111\">;\n }\n if (!accounts.instructionsSysvar.value) {\n accounts.instructionsSysvar.value =\n \"Sysvar1nstructions1111111111111111111111111\" as Address<\"Sysvar1nstructions1111111111111111111111111\">;\n }\n if (!accounts.slotHashSysvar.value) {\n accounts.slotHashSysvar.value =\n \"SysvarS1otHashes111111111111111111111111111\" as Address<\"SysvarS1otHashes111111111111111111111111111\">;\n }\n\n // Remaining accounts.\n const remainingAccounts: AccountMeta[] =\n parseRemainingAccounts(resolverScope);\n\n const getAccountMeta = getAccountMetaFactory(programAddress, \"programId\");\n return Object.freeze({\n accounts: [\n getAccountMeta(accounts.settings),\n getAccountMeta(accounts.payer),\n getAccountMeta(accounts.domainConfig),\n getAccountMeta(accounts.transactionBuffer),\n getAccountMeta(accounts.creator),\n getAccountMeta(accounts.systemProgram),\n getAccountMeta(accounts.instructionsSysvar),\n getAccountMeta(accounts.slotHashSysvar),\n ...remainingAccounts,\n ],\n data: getTransactionBufferCreateInstructionDataEncoder().encode(\n args as TransactionBufferCreateInstructionDataArgs\n ),\n programAddress,\n } as TransactionBufferCreateInstruction<\n TProgramAddress,\n TAccountSettings,\n TAccountPayer,\n TAccountDomainConfig,\n TAccountTransactionBuffer,\n TAccountCreator,\n TAccountSystemProgram,\n TAccountInstructionsSysvar,\n TAccountSlotHashSysvar\n >);\n}\n\nexport type ParsedTransactionBufferCreateInstruction<\n TProgram extends string = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n settings: TAccountMetas[0];\n payer: TAccountMetas[1];\n domainConfig?: TAccountMetas[2] | undefined;\n transactionBuffer: TAccountMetas[3];\n creator?: TAccountMetas[4] | undefined;\n systemProgram: TAccountMetas[5];\n instructionsSysvar: TAccountMetas[6];\n slotHashSysvar?: TAccountMetas[7] | undefined;\n };\n data: TransactionBufferCreateInstructionData;\n};\n\nexport function parseTransactionBufferCreateInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>\n): ParsedTransactionBufferCreateInstruction<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 const getNextOptionalAccount = () => {\n const accountMeta = getNextAccount();\n return accountMeta.address === MULTI_WALLET_PROGRAM_ADDRESS\n ? undefined\n : accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n settings: getNextAccount(),\n payer: getNextAccount(),\n domainConfig: getNextOptionalAccount(),\n transactionBuffer: getNextAccount(),\n creator: getNextOptionalAccount(),\n systemProgram: getNextAccount(),\n instructionsSysvar: getNextAccount(),\n slotHashSysvar: getNextOptionalAccount(),\n },\n data: getTransactionBufferCreateInstructionDataDecoder().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 getOptionDecoder,\n getOptionEncoder,\n getStructDecoder,\n getStructEncoder,\n transformEncoder,\n type AccountMeta,\n type AccountSignerMeta,\n type Address,\n type Codec,\n type Decoder,\n type Encoder,\n type Instruction,\n type InstructionWithAccounts,\n type InstructionWithData,\n type Option,\n type OptionOrNullable,\n type ReadonlyAccount,\n type ReadonlySignerAccount,\n type ReadonlyUint8Array,\n type TransactionSigner,\n type WritableAccount,\n type WritableSignerAccount,\n} from \"gill\";\nimport { parseRemainingAccounts } from \"../../hooked\";\nimport { MULTI_WALLET_PROGRAM_ADDRESS } from \"../programs\";\nimport { getAccountMetaFactory, type ResolvedAccount } from \"../shared\";\nimport {\n getProofArgsDecoder,\n getProofArgsEncoder,\n getSecp256r1VerifyArgsDecoder,\n getSecp256r1VerifyArgsEncoder,\n getSettingsReadonlyArgsDecoder,\n getSettingsReadonlyArgsEncoder,\n getTransactionBufferCreateArgsDecoder,\n getTransactionBufferCreateArgsEncoder,\n type ProofArgs,\n type ProofArgsArgs,\n type Secp256r1VerifyArgs,\n type Secp256r1VerifyArgsArgs,\n type SettingsReadonlyArgs,\n type SettingsReadonlyArgsArgs,\n type TransactionBufferCreateArgs,\n type TransactionBufferCreateArgsArgs,\n} from \"../types\";\n\nexport const TRANSACTION_BUFFER_CREATE_COMPRESSED_DISCRIMINATOR =\n new Uint8Array([20]);\n\nexport function getTransactionBufferCreateCompressedDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 1).encode(\n TRANSACTION_BUFFER_CREATE_COMPRESSED_DISCRIMINATOR\n );\n}\n\nexport type TransactionBufferCreateCompressedInstruction<\n TProgram extends string = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n TAccountPayer extends string | AccountMeta<string> = string,\n TAccountDomainConfig extends string | AccountMeta<string> = string,\n TAccountTransactionBuffer extends string | AccountMeta<string> = string,\n TAccountCreator extends string | AccountMeta<string> = string,\n TAccountSystemProgram extends\n | string\n | AccountMeta<string> = \"11111111111111111111111111111111\",\n TAccountInstructionsSysvar extends\n | string\n | AccountMeta<string> = \"Sysvar1nstructions1111111111111111111111111\",\n TAccountSlotHashSysvar extends\n | string\n | AccountMeta<string> = \"SysvarS1otHashes111111111111111111111111111\",\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountPayer extends string\n ? WritableSignerAccount<TAccountPayer> &\n AccountSignerMeta<TAccountPayer>\n : TAccountPayer,\n TAccountDomainConfig extends string\n ? ReadonlyAccount<TAccountDomainConfig>\n : TAccountDomainConfig,\n TAccountTransactionBuffer extends string\n ? WritableAccount<TAccountTransactionBuffer>\n : TAccountTransactionBuffer,\n TAccountCreator extends string\n ? ReadonlySignerAccount<TAccountCreator> &\n AccountSignerMeta<TAccountCreator>\n : TAccountCreator,\n TAccountSystemProgram extends string\n ? ReadonlyAccount<TAccountSystemProgram>\n : TAccountSystemProgram,\n TAccountInstructionsSysvar extends string\n ? ReadonlyAccount<TAccountInstructionsSysvar>\n : TAccountInstructionsSysvar,\n TAccountSlotHashSysvar extends string\n ? ReadonlyAccount<TAccountSlotHashSysvar>\n : TAccountSlotHashSysvar,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type TransactionBufferCreateCompressedInstructionData = {\n discriminator: ReadonlyUint8Array;\n args: TransactionBufferCreateArgs;\n secp256r1VerifyArgs: Option<Secp256r1VerifyArgs>;\n settingsReadonlyArgs: SettingsReadonlyArgs;\n compressedProofArgs: ProofArgs;\n};\n\nexport type TransactionBufferCreateCompressedInstructionDataArgs = {\n args: TransactionBufferCreateArgsArgs;\n secp256r1VerifyArgs: OptionOrNullable<Secp256r1VerifyArgsArgs>;\n settingsReadonlyArgs: SettingsReadonlyArgsArgs;\n compressedProofArgs: ProofArgsArgs;\n};\n\nexport function getTransactionBufferCreateCompressedInstructionDataEncoder(): Encoder<TransactionBufferCreateCompressedInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n [\"discriminator\", fixEncoderSize(getBytesEncoder(), 1)],\n [\"args\", getTransactionBufferCreateArgsEncoder()],\n [\n \"secp256r1VerifyArgs\",\n getOptionEncoder(getSecp256r1VerifyArgsEncoder()),\n ],\n [\"settingsReadonlyArgs\", getSettingsReadonlyArgsEncoder()],\n [\"compressedProofArgs\", getProofArgsEncoder()],\n ]),\n (value) => ({\n ...value,\n discriminator: TRANSACTION_BUFFER_CREATE_COMPRESSED_DISCRIMINATOR,\n })\n );\n}\n\nexport function getTransactionBufferCreateCompressedInstructionDataDecoder(): Decoder<TransactionBufferCreateCompressedInstructionData> {\n return getStructDecoder([\n [\"discriminator\", fixDecoderSize(getBytesDecoder(), 1)],\n [\"args\", getTransactionBufferCreateArgsDecoder()],\n [\"secp256r1VerifyArgs\", getOptionDecoder(getSecp256r1VerifyArgsDecoder())],\n [\"settingsReadonlyArgs\", getSettingsReadonlyArgsDecoder()],\n [\"compressedProofArgs\", getProofArgsDecoder()],\n ]);\n}\n\nexport function getTransactionBufferCreateCompressedInstructionDataCodec(): Codec<\n TransactionBufferCreateCompressedInstructionDataArgs,\n TransactionBufferCreateCompressedInstructionData\n> {\n return combineCodec(\n getTransactionBufferCreateCompressedInstructionDataEncoder(),\n getTransactionBufferCreateCompressedInstructionDataDecoder()\n );\n}\n\nexport type TransactionBufferCreateCompressedInstructionExtraArgs = {\n remainingAccounts: Array<{ address: Address; role: number }>;\n};\n\nexport type TransactionBufferCreateCompressedInput<\n TAccountPayer extends string = string,\n TAccountDomainConfig extends string = string,\n TAccountTransactionBuffer extends string = string,\n TAccountCreator extends string = string,\n TAccountSystemProgram extends string = string,\n TAccountInstructionsSysvar extends string = string,\n TAccountSlotHashSysvar extends string = string,\n> = {\n payer: TransactionSigner<TAccountPayer>;\n domainConfig?: Address<TAccountDomainConfig>;\n transactionBuffer: Address<TAccountTransactionBuffer>;\n creator?: TransactionSigner<TAccountCreator>;\n systemProgram?: Address<TAccountSystemProgram>;\n instructionsSysvar?: Address<TAccountInstructionsSysvar>;\n slotHashSysvar?: Address<TAccountSlotHashSysvar>;\n args: TransactionBufferCreateCompressedInstructionDataArgs[\"args\"];\n secp256r1VerifyArgs: TransactionBufferCreateCompressedInstructionDataArgs[\"secp256r1VerifyArgs\"];\n settingsReadonlyArgs: TransactionBufferCreateCompressedInstructionDataArgs[\"settingsReadonlyArgs\"];\n compressedProofArgs: TransactionBufferCreateCompressedInstructionDataArgs[\"compressedProofArgs\"];\n remainingAccounts: TransactionBufferCreateCompressedInstructionExtraArgs[\"remainingAccounts\"];\n};\n\nexport function getTransactionBufferCreateCompressedInstruction<\n TAccountPayer extends string,\n TAccountDomainConfig extends string,\n TAccountTransactionBuffer extends string,\n TAccountCreator extends string,\n TAccountSystemProgram extends string,\n TAccountInstructionsSysvar extends string,\n TAccountSlotHashSysvar extends string,\n TProgramAddress extends Address = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n>(\n input: TransactionBufferCreateCompressedInput<\n TAccountPayer,\n TAccountDomainConfig,\n TAccountTransactionBuffer,\n TAccountCreator,\n TAccountSystemProgram,\n TAccountInstructionsSysvar,\n TAccountSlotHashSysvar\n >,\n config?: { programAddress?: TProgramAddress }\n): TransactionBufferCreateCompressedInstruction<\n TProgramAddress,\n TAccountPayer,\n TAccountDomainConfig,\n TAccountTransactionBuffer,\n TAccountCreator,\n TAccountSystemProgram,\n TAccountInstructionsSysvar,\n TAccountSlotHashSysvar\n> {\n // Program address.\n const programAddress = config?.programAddress ?? MULTI_WALLET_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n payer: { value: input.payer ?? null, isWritable: true },\n domainConfig: { value: input.domainConfig ?? null, isWritable: false },\n transactionBuffer: {\n value: input.transactionBuffer ?? null,\n isWritable: true,\n },\n creator: { value: input.creator ?? null, isWritable: false },\n systemProgram: { value: input.systemProgram ?? null, isWritable: false },\n instructionsSysvar: {\n value: input.instructionsSysvar ?? null,\n isWritable: false,\n },\n slotHashSysvar: { value: input.slotHashSysvar ?? 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 // Resolver scope.\n const resolverScope = { programAddress, accounts, args };\n\n // Resolve default values.\n if (!accounts.systemProgram.value) {\n accounts.systemProgram.value =\n \"11111111111111111111111111111111\" as Address<\"11111111111111111111111111111111\">;\n }\n if (!accounts.instructionsSysvar.value) {\n accounts.instructionsSysvar.value =\n \"Sysvar1nstructions1111111111111111111111111\" as Address<\"Sysvar1nstructions1111111111111111111111111\">;\n }\n if (!accounts.slotHashSysvar.value) {\n accounts.slotHashSysvar.value =\n \"SysvarS1otHashes111111111111111111111111111\" as Address<\"SysvarS1otHashes111111111111111111111111111\">;\n }\n\n // Remaining accounts.\n const remainingAccounts: AccountMeta[] =\n parseRemainingAccounts(resolverScope);\n\n const getAccountMeta = getAccountMetaFactory(programAddress, \"programId\");\n return Object.freeze({\n accounts: [\n getAccountMeta(accounts.payer),\n getAccountMeta(accounts.domainConfig),\n getAccountMeta(accounts.transactionBuffer),\n getAccountMeta(accounts.creator),\n getAccountMeta(accounts.systemProgram),\n getAccountMeta(accounts.instructionsSysvar),\n getAccountMeta(accounts.slotHashSysvar),\n ...remainingAccounts,\n ],\n data: getTransactionBufferCreateCompressedInstructionDataEncoder().encode(\n args as TransactionBufferCreateCompressedInstructionDataArgs\n ),\n programAddress,\n } as TransactionBufferCreateCompressedInstruction<\n TProgramAddress,\n TAccountPayer,\n TAccountDomainConfig,\n TAccountTransactionBuffer,\n TAccountCreator,\n TAccountSystemProgram,\n TAccountInstructionsSysvar,\n TAccountSlotHashSysvar\n >);\n}\n\nexport type ParsedTransactionBufferCreateCompressedInstruction<\n TProgram extends string = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n payer: TAccountMetas[0];\n domainConfig?: TAccountMetas[1] | undefined;\n transactionBuffer: TAccountMetas[2];\n creator?: TAccountMetas[3] | undefined;\n systemProgram: TAccountMetas[4];\n instructionsSysvar: TAccountMetas[5];\n slotHashSysvar?: TAccountMetas[6] | undefined;\n };\n data: TransactionBufferCreateCompressedInstructionData;\n};\n\nexport function parseTransactionBufferCreateCompressedInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>\n): ParsedTransactionBufferCreateCompressedInstruction<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 const getNextOptionalAccount = () => {\n const accountMeta = getNextAccount();\n return accountMeta.address === MULTI_WALLET_PROGRAM_ADDRESS\n ? undefined\n : accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n payer: getNextAccount(),\n domainConfig: getNextOptionalAccount(),\n transactionBuffer: getNextAccount(),\n creator: getNextOptionalAccount(),\n systemProgram: getNextAccount(),\n instructionsSysvar: getNextAccount(),\n slotHashSysvar: getNextOptionalAccount(),\n },\n data: getTransactionBufferCreateCompressedInstructionDataDecoder().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 getOptionDecoder,\n getOptionEncoder,\n getStructDecoder,\n getStructEncoder,\n transformEncoder,\n type AccountMeta,\n type AccountSignerMeta,\n type Address,\n type Codec,\n type Decoder,\n type Encoder,\n type Instruction,\n type InstructionWithAccounts,\n type InstructionWithData,\n type Option,\n type OptionOrNullable,\n type ReadonlyAccount,\n type ReadonlySignerAccount,\n type ReadonlyUint8Array,\n type TransactionSigner,\n type WritableAccount,\n} from \"gill\";\nimport { parseRemainingAccounts } from \"../../hooked\";\nimport { MULTI_WALLET_PROGRAM_ADDRESS } from \"../programs\";\nimport { getAccountMetaFactory, type ResolvedAccount } from \"../shared\";\nimport {\n getSecp256r1VerifyArgsDecoder,\n getSecp256r1VerifyArgsEncoder,\n type Secp256r1VerifyArgs,\n type Secp256r1VerifyArgsArgs,\n} from \"../types\";\n\nexport const TRANSACTION_BUFFER_EXECUTE_DISCRIMINATOR = new Uint8Array([13]);\n\nexport function getTransactionBufferExecuteDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 1).encode(\n TRANSACTION_BUFFER_EXECUTE_DISCRIMINATOR\n );\n}\n\nexport type TransactionBufferExecuteInstruction<\n TProgram extends string = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n TAccountSettings extends string | AccountMeta<string> = string,\n TAccountDomainConfig extends string | AccountMeta<string> = string,\n TAccountExecutor extends string | AccountMeta<string> = string,\n TAccountTransactionBuffer extends string | AccountMeta<string> = string,\n TAccountSlotHashSysvar extends\n | string\n | AccountMeta<string> = \"SysvarS1otHashes111111111111111111111111111\",\n TAccountInstructionsSysvar extends\n | string\n | AccountMeta<string> = \"Sysvar1nstructions1111111111111111111111111\",\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountSettings extends string\n ? ReadonlyAccount<TAccountSettings>\n : TAccountSettings,\n TAccountDomainConfig extends string\n ? ReadonlyAccount<TAccountDomainConfig>\n : TAccountDomainConfig,\n TAccountExecutor extends string\n ? ReadonlySignerAccount<TAccountExecutor> &\n AccountSignerMeta<TAccountExecutor>\n : TAccountExecutor,\n TAccountTransactionBuffer extends string\n ? WritableAccount<TAccountTransactionBuffer>\n : TAccountTransactionBuffer,\n TAccountSlotHashSysvar extends string\n ? ReadonlyAccount<TAccountSlotHashSysvar>\n : TAccountSlotHashSysvar,\n TAccountInstructionsSysvar extends string\n ? ReadonlyAccount<TAccountInstructionsSysvar>\n : TAccountInstructionsSysvar,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type TransactionBufferExecuteInstructionData = {\n discriminator: ReadonlyUint8Array;\n secp256r1VerifyArgs: Option<Secp256r1VerifyArgs>;\n};\n\nexport type TransactionBufferExecuteInstructionDataArgs = {\n secp256r1VerifyArgs: OptionOrNullable<Secp256r1VerifyArgsArgs>;\n};\n\nexport function getTransactionBufferExecuteInstructionDataEncoder(): Encoder<TransactionBufferExecuteInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n [\"discriminator\", fixEncoderSize(getBytesEncoder(), 1)],\n [\n \"secp256r1VerifyArgs\",\n getOptionEncoder(getSecp256r1VerifyArgsEncoder()),\n ],\n ]),\n (value) => ({\n ...value,\n discriminator: TRANSACTION_BUFFER_EXECUTE_DISCRIMINATOR,\n })\n );\n}\n\nexport function getTransactionBufferExecuteInstructionDataDecoder(): Decoder<TransactionBufferExecuteInstructionData> {\n return getStructDecoder([\n [\"discriminator\", fixDecoderSize(getBytesDecoder(), 1)],\n [\"secp256r1VerifyArgs\", getOptionDecoder(getSecp256r1VerifyArgsDecoder())],\n ]);\n}\n\nexport function getTransactionBufferExecuteInstructionDataCodec(): Codec<\n TransactionBufferExecuteInstructionDataArgs,\n TransactionBufferExecuteInstructionData\n> {\n return combineCodec(\n getTransactionBufferExecuteInstructionDataEncoder(),\n getTransactionBufferExecuteInstructionDataDecoder()\n );\n}\n\nexport type TransactionBufferExecuteInstructionExtraArgs = {\n remainingAccounts: Array<{ address: Address; role: number }>;\n};\n\nexport type TransactionBufferExecuteInput<\n TAccountSettings extends string = string,\n TAccountDomainConfig extends string = string,\n TAccountExecutor extends string = string,\n TAccountTransactionBuffer extends string = string,\n TAccountSlotHashSysvar extends string = string,\n TAccountInstructionsSysvar extends string = string,\n> = {\n settings: Address<TAccountSettings>;\n domainConfig?: Address<TAccountDomainConfig>;\n executor?: TransactionSigner<TAccountExecutor>;\n transactionBuffer: Address<TAccountTransactionBuffer>;\n slotHashSysvar?: Address<TAccountSlotHashSysvar>;\n instructionsSysvar?: Address<TAccountInstructionsSysvar>;\n secp256r1VerifyArgs: TransactionBufferExecuteInstructionDataArgs[\"secp256r1VerifyArgs\"];\n remainingAccounts: TransactionBufferExecuteInstructionExtraArgs[\"remainingAccounts\"];\n};\n\nexport function getTransactionBufferExecuteInstruction<\n TAccountSettings extends string,\n TAccountDomainConfig extends string,\n TAccountExecutor extends string,\n TAccountTransactionBuffer extends string,\n TAccountSlotHashSysvar extends string,\n TAccountInstructionsSysvar extends string,\n TProgramAddress extends Address = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n>(\n input: TransactionBufferExecuteInput<\n TAccountSettings,\n TAccountDomainConfig,\n TAccountExecutor,\n TAccountTransactionBuffer,\n TAccountSlotHashSysvar,\n TAccountInstructionsSysvar\n >,\n config?: { programAddress?: TProgramAddress }\n): TransactionBufferExecuteInstruction<\n TProgramAddress,\n TAccountSettings,\n TAccountDomainConfig,\n TAccountExecutor,\n TAccountTransactionBuffer,\n TAccountSlotHashSysvar,\n TAccountInstructionsSysvar\n> {\n // Program address.\n const programAddress = config?.programAddress ?? MULTI_WALLET_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n settings: { value: input.settings ?? null, isWritable: false },\n domainConfig: { value: input.domainConfig ?? null, isWritable: false },\n executor: { value: input.executor ?? null, isWritable: false },\n transactionBuffer: {\n value: input.transactionBuffer ?? null,\n isWritable: true,\n },\n slotHashSysvar: { value: input.slotHashSysvar ?? null, isWritable: false },\n instructionsSysvar: {\n value: input.instructionsSysvar ?? null,\n isWritable: false,\n },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolver scope.\n const resolverScope = { programAddress, accounts, args };\n\n // Resolve default values.\n if (!accounts.slotHashSysvar.value) {\n accounts.slotHashSysvar.value =\n \"SysvarS1otHashes111111111111111111111111111\" as Address<\"SysvarS1otHashes111111111111111111111111111\">;\n }\n if (!accounts.instructionsSysvar.value) {\n accounts.instructionsSysvar.value =\n \"Sysvar1nstructions1111111111111111111111111\" as Address<\"Sysvar1nstructions1111111111111111111111111\">;\n }\n\n // Remaining accounts.\n const remainingAccounts: AccountMeta[] =\n parseRemainingAccounts(resolverScope);\n\n const getAccountMeta = getAccountMetaFactory(programAddress, \"programId\");\n return Object.freeze({\n accounts: [\n getAccountMeta(accounts.settings),\n getAccountMeta(accounts.domainConfig),\n getAccountMeta(accounts.executor),\n getAccountMeta(accounts.transactionBuffer),\n getAccountMeta(accounts.slotHashSysvar),\n getAccountMeta(accounts.instructionsSysvar),\n ...remainingAccounts,\n ],\n data: getTransactionBufferExecuteInstructionDataEncoder().encode(\n args as TransactionBufferExecuteInstructionDataArgs\n ),\n programAddress,\n } as TransactionBufferExecuteInstruction<\n TProgramAddress,\n TAccountSettings,\n TAccountDomainConfig,\n TAccountExecutor,\n TAccountTransactionBuffer,\n TAccountSlotHashSysvar,\n TAccountInstructionsSysvar\n >);\n}\n\nexport type ParsedTransactionBufferExecuteInstruction<\n TProgram extends string = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n settings: TAccountMetas[0];\n domainConfig?: TAccountMetas[1] | undefined;\n executor?: TAccountMetas[2] | undefined;\n transactionBuffer: TAccountMetas[3];\n slotHashSysvar?: TAccountMetas[4] | undefined;\n instructionsSysvar?: TAccountMetas[5] | undefined;\n };\n data: TransactionBufferExecuteInstructionData;\n};\n\nexport function parseTransactionBufferExecuteInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>\n): ParsedTransactionBufferExecuteInstruction<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 const getNextOptionalAccount = () => {\n const accountMeta = getNextAccount();\n return accountMeta.address === MULTI_WALLET_PROGRAM_ADDRESS\n ? undefined\n : accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n settings: getNextAccount(),\n domainConfig: getNextOptionalAccount(),\n executor: getNextOptionalAccount(),\n transactionBuffer: getNextAccount(),\n slotHashSysvar: getNextOptionalAccount(),\n instructionsSysvar: getNextOptionalAccount(),\n },\n data: getTransactionBufferExecuteInstructionDataDecoder().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 getOptionDecoder,\n getOptionEncoder,\n getStructDecoder,\n getStructEncoder,\n transformEncoder,\n type AccountMeta,\n type AccountSignerMeta,\n type Address,\n type Codec,\n type Decoder,\n type Encoder,\n type Instruction,\n type InstructionWithAccounts,\n type InstructionWithData,\n type Option,\n type OptionOrNullable,\n type ReadonlyAccount,\n type ReadonlySignerAccount,\n type ReadonlyUint8Array,\n type TransactionSigner,\n type WritableAccount,\n type WritableSignerAccount,\n} from \"gill\";\nimport { parseRemainingAccounts } from \"../../hooked\";\nimport { MULTI_WALLET_PROGRAM_ADDRESS } from \"../programs\";\nimport { getAccountMetaFactory, type ResolvedAccount } from \"../shared\";\nimport {\n getProofArgsDecoder,\n getProofArgsEncoder,\n getSecp256r1VerifyArgsDecoder,\n getSecp256r1VerifyArgsEncoder,\n getSettingsReadonlyArgsDecoder,\n getSettingsReadonlyArgsEncoder,\n type ProofArgs,\n type ProofArgsArgs,\n type Secp256r1VerifyArgs,\n type Secp256r1VerifyArgsArgs,\n type SettingsReadonlyArgs,\n type SettingsReadonlyArgsArgs,\n} from \"../types\";\n\nexport const TRANSACTION_BUFFER_EXECUTE_COMPRESSED_DISCRIMINATOR =\n new Uint8Array([24]);\n\nexport function getTransactionBufferExecuteCompressedDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 1).encode(\n TRANSACTION_BUFFER_EXECUTE_COMPRESSED_DISCRIMINATOR\n );\n}\n\nexport type TransactionBufferExecuteCompressedInstruction<\n TProgram extends string = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n TAccountPayer extends string | AccountMeta<string> = string,\n TAccountDomainConfig extends string | AccountMeta<string> = string,\n TAccountExecutor extends string | AccountMeta<string> = string,\n TAccountTransactionBuffer extends string | AccountMeta<string> = string,\n TAccountSlotHashSysvar extends\n | string\n | AccountMeta<string> = \"SysvarS1otHashes111111111111111111111111111\",\n TAccountInstructionsSysvar extends\n | string\n | AccountMeta<string> = \"Sysvar1nstructions1111111111111111111111111\",\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountPayer extends string\n ? WritableSignerAccount<TAccountPayer> &\n AccountSignerMeta<TAccountPayer>\n : TAccountPayer,\n TAccountDomainConfig extends string\n ? ReadonlyAccount<TAccountDomainConfig>\n : TAccountDomainConfig,\n TAccountExecutor extends string\n ? ReadonlySignerAccount<TAccountExecutor> &\n AccountSignerMeta<TAccountExecutor>\n : TAccountExecutor,\n TAccountTransactionBuffer extends string\n ? WritableAccount<TAccountTransactionBuffer>\n : TAccountTransactionBuffer,\n TAccountSlotHashSysvar extends string\n ? ReadonlyAccount<TAccountSlotHashSysvar>\n : TAccountSlotHashSysvar,\n TAccountInstructionsSysvar extends string\n ? ReadonlyAccount<TAccountInstructionsSysvar>\n : TAccountInstructionsSysvar,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type TransactionBufferExecuteCompressedInstructionData = {\n discriminator: ReadonlyUint8Array;\n secp256r1VerifyArgs: Option<Secp256r1VerifyArgs>;\n settingsReadonlyArgs: SettingsReadonlyArgs;\n compressedProofArgs: ProofArgs;\n};\n\nexport type TransactionBufferExecuteCompressedInstructionDataArgs = {\n secp256r1VerifyArgs: OptionOrNullable<Secp256r1VerifyArgsArgs>;\n settingsReadonlyArgs: SettingsReadonlyArgsArgs;\n compressedProofArgs: ProofArgsArgs;\n};\n\nexport function getTransactionBufferExecuteCompressedInstructionDataEncoder(): Encoder<TransactionBufferExecuteCompressedInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n [\"discriminator\", fixEncoderSize(getBytesEncoder(), 1)],\n [\n \"secp256r1VerifyArgs\",\n getOptionEncoder(getSecp256r1VerifyArgsEncoder()),\n ],\n [\"settingsReadonlyArgs\", getSettingsReadonlyArgsEncoder()],\n [\"compressedProofArgs\", getProofArgsEncoder()],\n ]),\n (value) => ({\n ...value,\n discriminator: TRANSACTION_BUFFER_EXECUTE_COMPRESSED_DISCRIMINATOR,\n })\n );\n}\n\nexport function getTransactionBufferExecuteCompressedInstructionDataDecoder(): Decoder<TransactionBufferExecuteCompressedInstructionData> {\n return getStructDecoder([\n [\"discriminator\", fixDecoderSize(getBytesDecoder(), 1)],\n [\"secp256r1VerifyArgs\", getOptionDecoder(getSecp256r1VerifyArgsDecoder())],\n [\"settingsReadonlyArgs\", getSettingsReadonlyArgsDecoder()],\n [\"compressedProofArgs\", getProofArgsDecoder()],\n ]);\n}\n\nexport function getTransactionBufferExecuteCompressedInstructionDataCodec(): Codec<\n TransactionBufferExecuteCompressedInstructionDataArgs,\n TransactionBufferExecuteCompressedInstructionData\n> {\n return combineCodec(\n getTransactionBufferExecuteCompressedInstructionDataEncoder(),\n getTransactionBufferExecuteCompressedInstructionDataDecoder()\n );\n}\n\nexport type TransactionBufferExecuteCompressedInstructionExtraArgs = {\n remainingAccounts: Array<{ address: Address; role: number }>;\n};\n\nexport type TransactionBufferExecuteCompressedInput<\n TAccountPayer extends string = string,\n TAccountDomainConfig extends string = string,\n TAccountExecutor extends string = string,\n TAccountTransactionBuffer extends string = string,\n TAccountSlotHashSysvar extends string = string,\n TAccountInstructionsSysvar extends string = string,\n> = {\n payer: TransactionSigner<TAccountPayer>;\n domainConfig?: Address<TAccountDomainConfig>;\n executor?: TransactionSigner<TAccountExecutor>;\n transactionBuffer: Address<TAccountTransactionBuffer>;\n slotHashSysvar?: Address<TAccountSlotHashSysvar>;\n instructionsSysvar?: Address<TAccountInstructionsSysvar>;\n secp256r1VerifyArgs: TransactionBufferExecuteCompressedInstructionDataArgs[\"secp256r1VerifyArgs\"];\n settingsReadonlyArgs: TransactionBufferExecuteCompressedInstructionDataArgs[\"settingsReadonlyArgs\"];\n compressedProofArgs: TransactionBufferExecuteCompressedInstructionDataArgs[\"compressedProofArgs\"];\n remainingAccounts: TransactionBufferExecuteCompressedInstructionExtraArgs[\"remainingAccounts\"];\n};\n\nexport function getTransactionBufferExecuteCompressedInstruction<\n TAccountPayer extends string,\n TAccountDomainConfig extends string,\n TAccountExecutor extends string,\n TAccountTransactionBuffer extends string,\n TAccountSlotHashSysvar extends string,\n TAccountInstructionsSysvar extends string,\n TProgramAddress extends Address = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n>(\n input: TransactionBufferExecuteCompressedInput<\n TAccountPayer,\n TAccountDomainConfig,\n TAccountExecutor,\n TAccountTransactionBuffer,\n TAccountSlotHashSysvar,\n TAccountInstructionsSysvar\n >,\n config?: { programAddress?: TProgramAddress }\n): TransactionBufferExecuteCompressedInstruction<\n TProgramAddress,\n TAccountPayer,\n TAccountDomainConfig,\n TAccountExecutor,\n TAccountTransactionBuffer,\n TAccountSlotHashSysvar,\n TAccountInstructionsSysvar\n> {\n // Program address.\n const programAddress = config?.programAddress ?? MULTI_WALLET_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n payer: { value: input.payer ?? null, isWritable: true },\n domainConfig: { value: input.domainConfig ?? null, isWritable: false },\n executor: { value: input.executor ?? null, isWritable: false },\n transactionBuffer: {\n value: input.transactionBuffer ?? null,\n isWritable: true,\n },\n slotHashSysvar: { value: input.slotHashSysvar ?? null, isWritable: false },\n instructionsSysvar: {\n value: input.instructionsSysvar ?? null,\n isWritable: false,\n },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolver scope.\n const resolverScope = { programAddress, accounts, args };\n\n // Resolve default values.\n if (!accounts.slotHashSysvar.value) {\n accounts.slotHashSysvar.value =\n \"SysvarS1otHashes111111111111111111111111111\" as Address<\"SysvarS1otHashes111111111111111111111111111\">;\n }\n if (!accounts.instructionsSysvar.value) {\n accounts.instructionsSysvar.value =\n \"Sysvar1nstructions1111111111111111111111111\" as Address<\"Sysvar1nstructions1111111111111111111111111\">;\n }\n\n // Remaining accounts.\n const remainingAccounts: AccountMeta[] =\n parseRemainingAccounts(resolverScope);\n\n const getAccountMeta = getAccountMetaFactory(programAddress, \"programId\");\n return Object.freeze({\n accounts: [\n getAccountMeta(accounts.payer),\n getAccountMeta(accounts.domainConfig),\n getAccountMeta(accounts.executor),\n getAccountMeta(accounts.transactionBuffer),\n getAccountMeta(accounts.slotHashSysvar),\n getAccountMeta(accounts.instructionsSysvar),\n ...remainingAccounts,\n ],\n data: getTransactionBufferExecuteCompressedInstructionDataEncoder().encode(\n args as TransactionBufferExecuteCompressedInstructionDataArgs\n ),\n programAddress,\n } as TransactionBufferExecuteCompressedInstruction<\n TProgramAddress,\n TAccountPayer,\n TAccountDomainConfig,\n TAccountExecutor,\n TAccountTransactionBuffer,\n TAccountSlotHashSysvar,\n TAccountInstructionsSysvar\n >);\n}\n\nexport type ParsedTransactionBufferExecuteCompressedInstruction<\n TProgram extends string = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n payer: TAccountMetas[0];\n domainConfig?: TAccountMetas[1] | undefined;\n executor?: TAccountMetas[2] | undefined;\n transactionBuffer: TAccountMetas[3];\n slotHashSysvar?: TAccountMetas[4] | undefined;\n instructionsSysvar?: TAccountMetas[5] | undefined;\n };\n data: TransactionBufferExecuteCompressedInstructionData;\n};\n\nexport function parseTransactionBufferExecuteCompressedInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>\n): ParsedTransactionBufferExecuteCompressedInstruction<\n TProgram,\n TAccountMetas\n> {\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 const getNextOptionalAccount = () => {\n const accountMeta = getNextAccount();\n return accountMeta.address === MULTI_WALLET_PROGRAM_ADDRESS\n ? undefined\n : accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n payer: getNextAccount(),\n domainConfig: getNextOptionalAccount(),\n executor: getNextOptionalAccount(),\n transactionBuffer: getNextAccount(),\n slotHashSysvar: getNextOptionalAccount(),\n instructionsSysvar: getNextOptionalAccount(),\n },\n data: getTransactionBufferExecuteCompressedInstructionDataDecoder().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 transformEncoder,\n type AccountMeta,\n type Address,\n type Codec,\n type Decoder,\n type Encoder,\n type Instruction,\n type InstructionWithAccounts,\n type InstructionWithData,\n type ReadonlyAccount,\n type ReadonlyUint8Array,\n type WritableAccount,\n} from \"gill\";\nimport { parseRemainingAccounts } from \"../../hooked\";\nimport { MULTI_WALLET_PROGRAM_ADDRESS } from \"../programs\";\nimport { getAccountMetaFactory, type ResolvedAccount } from \"../shared\";\n\nexport const TRANSACTION_BUFFER_EXTEND_DISCRIMINATOR = new Uint8Array([11]);\n\nexport function getTransactionBufferExtendDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 1).encode(\n TRANSACTION_BUFFER_EXTEND_DISCRIMINATOR\n );\n}\n\nexport type TransactionBufferExtendInstruction<\n TProgram extends string = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n TAccountSettings extends string | AccountMeta<string> = string,\n TAccountTransactionBuffer extends string | AccountMeta<string> = string,\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountSettings extends string\n ? ReadonlyAccount<TAccountSettings>\n : TAccountSettings,\n TAccountTransactionBuffer extends string\n ? WritableAccount<TAccountTransactionBuffer>\n : TAccountTransactionBuffer,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type TransactionBufferExtendInstructionData = {\n discriminator: ReadonlyUint8Array;\n buffer: ReadonlyUint8Array;\n};\n\nexport type TransactionBufferExtendInstructionDataArgs = {\n buffer: ReadonlyUint8Array;\n};\n\nexport function getTransactionBufferExtendInstructionDataEncoder(): Encoder<TransactionBufferExtendInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n [\"discriminator\", fixEncoderSize(getBytesEncoder(), 1)],\n [\"buffer\", addEncoderSizePrefix(getBytesEncoder(), getU32Encoder())],\n ]),\n (value) => ({\n ...value,\n discriminator: TRANSACTION_BUFFER_EXTEND_DISCRIMINATOR,\n })\n );\n}\n\nexport function getTransactionBufferExtendInstructionDataDecoder(): Decoder<TransactionBufferExtendInstructionData> {\n return getStructDecoder([\n [\"discriminator\", fixDecoderSize(getBytesDecoder(), 1)],\n [\"buffer\", addDecoderSizePrefix(getBytesDecoder(), getU32Decoder())],\n ]);\n}\n\nexport function getTransactionBufferExtendInstructionDataCodec(): Codec<\n TransactionBufferExtendInstructionDataArgs,\n TransactionBufferExtendInstructionData\n> {\n return combineCodec(\n getTransactionBufferExtendInstructionDataEncoder(),\n getTransactionBufferExtendInstructionDataDecoder()\n );\n}\n\nexport type TransactionBufferExtendInstructionExtraArgs = {\n remainingAccounts: Array<{ address: Address; role: number }>;\n};\n\nexport type TransactionBufferExtendInput<\n TAccountSettings extends string = string,\n TAccountTransactionBuffer extends string = string,\n> = {\n settings: Address<TAccountSettings>;\n transactionBuffer: Address<TAccountTransactionBuffer>;\n buffer: TransactionBufferExtendInstructionDataArgs[\"buffer\"];\n remainingAccounts: TransactionBufferExtendInstructionExtraArgs[\"remainingAccounts\"];\n};\n\nexport function getTransactionBufferExtendInstruction<\n TAccountSettings extends string,\n TAccountTransactionBuffer extends string,\n TProgramAddress extends Address = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n>(\n input: TransactionBufferExtendInput<\n TAccountSettings,\n TAccountTransactionBuffer\n >,\n config?: { programAddress?: TProgramAddress }\n): TransactionBufferExtendInstruction<\n TProgramAddress,\n TAccountSettings,\n TAccountTransactionBuffer\n> {\n // Program address.\n const programAddress = config?.programAddress ?? MULTI_WALLET_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n settings: { value: input.settings ?? null, isWritable: false },\n transactionBuffer: {\n value: input.transactionBuffer ?? null,\n isWritable: true,\n },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolver scope.\n const resolverScope = { programAddress, accounts, args };\n\n // Remaining accounts.\n const remainingAccounts: AccountMeta[] =\n parseRemainingAccounts(resolverScope);\n\n const getAccountMeta = getAccountMetaFactory(programAddress, \"programId\");\n return Object.freeze({\n accounts: [\n getAccountMeta(accounts.settings),\n getAccountMeta(accounts.transactionBuffer),\n ...remainingAccounts,\n ],\n data: getTransactionBufferExtendInstructionDataEncoder().encode(\n args as TransactionBufferExtendInstructionDataArgs\n ),\n programAddress,\n } as TransactionBufferExtendInstruction<\n TProgramAddress,\n TAccountSettings,\n TAccountTransactionBuffer\n >);\n}\n\nexport type ParsedTransactionBufferExtendInstruction<\n TProgram extends string = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n settings: TAccountMetas[0];\n transactionBuffer: TAccountMetas[1];\n };\n data: TransactionBufferExtendInstructionData;\n};\n\nexport function parseTransactionBufferExtendInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>\n): ParsedTransactionBufferExtendInstruction<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 settings: getNextAccount(),\n transactionBuffer: getNextAccount(),\n },\n data: getTransactionBufferExtendInstructionDataDecoder().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 getStructDecoder,\n getStructEncoder,\n getU32Decoder,\n getU32Encoder,\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 ReadonlyUint8Array,\n type WritableAccount,\n} from \"gill\";\nimport { parseRemainingAccounts } from \"../../hooked\";\nimport { MULTI_WALLET_PROGRAM_ADDRESS } from \"../programs\";\nimport { getAccountMetaFactory, type ResolvedAccount } from \"../shared\";\n\nexport const TRANSACTION_BUFFER_EXTEND_COMPRESSED_DISCRIMINATOR =\n new Uint8Array([22]);\n\nexport function getTransactionBufferExtendCompressedDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 1).encode(\n TRANSACTION_BUFFER_EXTEND_COMPRESSED_DISCRIMINATOR\n );\n}\n\nexport type TransactionBufferExtendCompressedInstruction<\n TProgram extends string = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n TAccountTransactionBuffer extends string | AccountMeta<string> = string,\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountTransactionBuffer extends string\n ? WritableAccount<TAccountTransactionBuffer>\n : TAccountTransactionBuffer,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type TransactionBufferExtendCompressedInstructionData = {\n discriminator: ReadonlyUint8Array;\n buffer: ReadonlyUint8Array;\n settingsKey: Address;\n};\n\nexport type TransactionBufferExtendCompressedInstructionDataArgs = {\n buffer: ReadonlyUint8Array;\n settingsKey: Address;\n};\n\nexport function getTransactionBufferExtendCompressedInstructionDataEncoder(): Encoder<TransactionBufferExtendCompressedInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n [\"discriminator\", fixEncoderSize(getBytesEncoder(), 1)],\n [\"buffer\", addEncoderSizePrefix(getBytesEncoder(), getU32Encoder())],\n [\"settingsKey\", getAddressEncoder()],\n ]),\n (value) => ({\n ...value,\n discriminator: TRANSACTION_BUFFER_EXTEND_COMPRESSED_DISCRIMINATOR,\n })\n );\n}\n\nexport function getTransactionBufferExtendCompressedInstructionDataDecoder(): Decoder<TransactionBufferExtendCompressedInstructionData> {\n return getStructDecoder([\n [\"discriminator\", fixDecoderSize(getBytesDecoder(), 1)],\n [\"buffer\", addDecoderSizePrefix(getBytesDecoder(), getU32Decoder())],\n [\"settingsKey\", getAddressDecoder()],\n ]);\n}\n\nexport function getTransactionBufferExtendCompressedInstructionDataCodec(): Codec<\n TransactionBufferExtendCompressedInstructionDataArgs,\n TransactionBufferExtendCompressedInstructionData\n> {\n return combineCodec(\n getTransactionBufferExtendCompressedInstructionDataEncoder(),\n getTransactionBufferExtendCompressedInstructionDataDecoder()\n );\n}\n\nexport type TransactionBufferExtendCompressedInstructionExtraArgs = {\n remainingAccounts: Array<{ address: Address; role: number }>;\n};\n\nexport type TransactionBufferExtendCompressedInput<\n TAccountTransactionBuffer extends string = string,\n> = {\n transactionBuffer: Address<TAccountTransactionBuffer>;\n buffer: TransactionBufferExtendCompressedInstructionDataArgs[\"buffer\"];\n settingsKey: TransactionBufferExtendCompressedInstructionDataArgs[\"settingsKey\"];\n remainingAccounts: TransactionBufferExtendCompressedInstructionExtraArgs[\"remainingAccounts\"];\n};\n\nexport function getTransactionBufferExtendCompressedInstruction<\n TAccountTransactionBuffer extends string,\n TProgramAddress extends Address = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n>(\n input: TransactionBufferExtendCompressedInput<TAccountTransactionBuffer>,\n config?: { programAddress?: TProgramAddress }\n): TransactionBufferExtendCompressedInstruction<\n TProgramAddress,\n TAccountTransactionBuffer\n> {\n // Program address.\n const programAddress = config?.programAddress ?? MULTI_WALLET_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n transactionBuffer: {\n value: input.transactionBuffer ?? null,\n isWritable: true,\n },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolver scope.\n const resolverScope = { programAddress, accounts, args };\n\n // Remaining accounts.\n const remainingAccounts: AccountMeta[] =\n parseRemainingAccounts(resolverScope);\n\n const getAccountMeta = getAccountMetaFactory(programAddress, \"programId\");\n return Object.freeze({\n accounts: [\n getAccountMeta(accounts.transactionBuffer),\n ...remainingAccounts,\n ],\n data: getTransactionBufferExtendCompressedInstructionDataEncoder().encode(\n args as TransactionBufferExtendCompressedInstructionDataArgs\n ),\n programAddress,\n } as TransactionBufferExtendCompressedInstruction<\n TProgramAddress,\n TAccountTransactionBuffer\n >);\n}\n\nexport type ParsedTransactionBufferExtendCompressedInstruction<\n TProgram extends string = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n transactionBuffer: TAccountMetas[0];\n };\n data: TransactionBufferExtendCompressedInstructionData;\n};\n\nexport function parseTransactionBufferExtendCompressedInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>\n): ParsedTransactionBufferExtendCompressedInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 1) {\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: { transactionBuffer: getNextAccount() },\n data: getTransactionBufferExtendCompressedInstructionDataDecoder().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 getOptionDecoder,\n getOptionEncoder,\n getStructDecoder,\n getStructEncoder,\n transformEncoder,\n type AccountMeta,\n type AccountSignerMeta,\n type Address,\n type Codec,\n type Decoder,\n type Encoder,\n type Instruction,\n type InstructionWithAccounts,\n type InstructionWithData,\n type Option,\n type OptionOrNullable,\n type ReadonlyAccount,\n type ReadonlySignerAccount,\n type ReadonlyUint8Array,\n type TransactionSigner,\n type WritableAccount,\n} from \"gill\";\nimport { parseRemainingAccounts } from \"../../hooked\";\nimport { MULTI_WALLET_PROGRAM_ADDRESS } from \"../programs\";\nimport { getAccountMetaFactory, type ResolvedAccount } from \"../shared\";\nimport {\n getSecp256r1VerifyArgsDecoder,\n getSecp256r1VerifyArgsEncoder,\n type Secp256r1VerifyArgs,\n type Secp256r1VerifyArgsArgs,\n} from \"../types\";\n\nexport const TRANSACTION_BUFFER_VOTE_DISCRIMINATOR = new Uint8Array([10]);\n\nexport function getTransactionBufferVoteDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 1).encode(\n TRANSACTION_BUFFER_VOTE_DISCRIMINATOR\n );\n}\n\nexport type TransactionBufferVoteInstruction<\n TProgram extends string = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n TAccountSettings extends string | AccountMeta<string> = string,\n TAccountDomainConfig extends string | AccountMeta<string> = string,\n TAccountTransactionBuffer extends string | AccountMeta<string> = string,\n TAccountVoter extends string | AccountMeta<string> = string,\n TAccountSystemProgram extends\n | string\n | AccountMeta<string> = \"11111111111111111111111111111111\",\n TAccountSlotHashSysvar extends\n | string\n | AccountMeta<string> = \"SysvarS1otHashes111111111111111111111111111\",\n TAccountInstructionsSysvar extends\n | string\n | AccountMeta<string> = \"Sysvar1nstructions1111111111111111111111111\",\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountSettings extends string\n ? ReadonlyAccount<TAccountSettings>\n : TAccountSettings,\n TAccountDomainConfig extends string\n ? ReadonlyAccount<TAccountDomainConfig>\n : TAccountDomainConfig,\n TAccountTransactionBuffer extends string\n ? WritableAccount<TAccountTransactionBuffer>\n : TAccountTransactionBuffer,\n TAccountVoter extends string\n ? ReadonlySignerAccount<TAccountVoter> &\n AccountSignerMeta<TAccountVoter>\n : TAccountVoter,\n TAccountSystemProgram extends string\n ? ReadonlyAccount<TAccountSystemProgram>\n : TAccountSystemProgram,\n TAccountSlotHashSysvar extends string\n ? ReadonlyAccount<TAccountSlotHashSysvar>\n : TAccountSlotHashSysvar,\n TAccountInstructionsSysvar extends string\n ? ReadonlyAccount<TAccountInstructionsSysvar>\n : TAccountInstructionsSysvar,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type TransactionBufferVoteInstructionData = {\n discriminator: ReadonlyUint8Array;\n secp256r1VerifyArgs: Option<Secp256r1VerifyArgs>;\n};\n\nexport type TransactionBufferVoteInstructionDataArgs = {\n secp256r1VerifyArgs: OptionOrNullable<Secp256r1VerifyArgsArgs>;\n};\n\nexport function getTransactionBufferVoteInstructionDataEncoder(): Encoder<TransactionBufferVoteInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n [\"discriminator\", fixEncoderSize(getBytesEncoder(), 1)],\n [\n \"secp256r1VerifyArgs\",\n getOptionEncoder(getSecp256r1VerifyArgsEncoder()),\n ],\n ]),\n (value) => ({\n ...value,\n discriminator: TRANSACTION_BUFFER_VOTE_DISCRIMINATOR,\n })\n );\n}\n\nexport function getTransactionBufferVoteInstructionDataDecoder(): Decoder<TransactionBufferVoteInstructionData> {\n return getStructDecoder([\n [\"discriminator\", fixDecoderSize(getBytesDecoder(), 1)],\n [\"secp256r1VerifyArgs\", getOptionDecoder(getSecp256r1VerifyArgsDecoder())],\n ]);\n}\n\nexport function getTransactionBufferVoteInstructionDataCodec(): Codec<\n TransactionBufferVoteInstructionDataArgs,\n TransactionBufferVoteInstructionData\n> {\n return combineCodec(\n getTransactionBufferVoteInstructionDataEncoder(),\n getTransactionBufferVoteInstructionDataDecoder()\n );\n}\n\nexport type TransactionBufferVoteInstructionExtraArgs = {\n remainingAccounts: Array<{ address: Address; role: number }>;\n};\n\nexport type TransactionBufferVoteInput<\n TAccountSettings extends string = string,\n TAccountDomainConfig extends string = string,\n TAccountTransactionBuffer extends string = string,\n TAccountVoter extends string = string,\n TAccountSystemProgram extends string = string,\n TAccountSlotHashSysvar extends string = string,\n TAccountInstructionsSysvar extends string = string,\n> = {\n settings: Address<TAccountSettings>;\n domainConfig?: Address<TAccountDomainConfig>;\n transactionBuffer: Address<TAccountTransactionBuffer>;\n voter?: TransactionSigner<TAccountVoter>;\n systemProgram?: Address<TAccountSystemProgram>;\n slotHashSysvar?: Address<TAccountSlotHashSysvar>;\n instructionsSysvar?: Address<TAccountInstructionsSysvar>;\n secp256r1VerifyArgs: TransactionBufferVoteInstructionDataArgs[\"secp256r1VerifyArgs\"];\n remainingAccounts: TransactionBufferVoteInstructionExtraArgs[\"remainingAccounts\"];\n};\n\nexport function getTransactionBufferVoteInstruction<\n TAccountSettings extends string,\n TAccountDomainConfig extends string,\n TAccountTransactionBuffer extends string,\n TAccountVoter extends string,\n TAccountSystemProgram extends string,\n TAccountSlotHashSysvar extends string,\n TAccountInstructionsSysvar extends string,\n TProgramAddress extends Address = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n>(\n input: TransactionBufferVoteInput<\n TAccountSettings,\n TAccountDomainConfig,\n TAccountTransactionBuffer,\n TAccountVoter,\n TAccountSystemProgram,\n TAccountSlotHashSysvar,\n TAccountInstructionsSysvar\n >,\n config?: { programAddress?: TProgramAddress }\n): TransactionBufferVoteInstruction<\n TProgramAddress,\n TAccountSettings,\n TAccountDomainConfig,\n TAccountTransactionBuffer,\n TAccountVoter,\n TAccountSystemProgram,\n TAccountSlotHashSysvar,\n TAccountInstructionsSysvar\n> {\n // Program address.\n const programAddress = config?.programAddress ?? MULTI_WALLET_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n settings: { value: input.settings ?? null, isWritable: false },\n domainConfig: { value: input.domainConfig ?? null, isWritable: false },\n transactionBuffer: {\n value: input.transactionBuffer ?? null,\n isWritable: true,\n },\n voter: { value: input.voter ?? null, isWritable: false },\n systemProgram: { value: input.systemProgram ?? null, isWritable: false },\n slotHashSysvar: { value: input.slotHashSysvar ?? null, isWritable: false },\n instructionsSysvar: {\n value: input.instructionsSysvar ?? null,\n isWritable: false,\n },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolver scope.\n const resolverScope = { programAddress, accounts, args };\n\n // Resolve default values.\n if (!accounts.systemProgram.value) {\n accounts.systemProgram.value =\n \"11111111111111111111111111111111\" as Address<\"11111111111111111111111111111111\">;\n }\n if (!accounts.slotHashSysvar.value) {\n accounts.slotHashSysvar.value =\n \"SysvarS1otHashes111111111111111111111111111\" as Address<\"SysvarS1otHashes111111111111111111111111111\">;\n }\n if (!accounts.instructionsSysvar.value) {\n accounts.instructionsSysvar.value =\n \"Sysvar1nstructions1111111111111111111111111\" as Address<\"Sysvar1nstructions1111111111111111111111111\">;\n }\n\n // Remaining accounts.\n const remainingAccounts: AccountMeta[] =\n parseRemainingAccounts(resolverScope);\n\n const getAccountMeta = getAccountMetaFactory(programAddress, \"programId\");\n return Object.freeze({\n accounts: [\n getAccountMeta(accounts.settings),\n getAccountMeta(accounts.domainConfig),\n getAccountMeta(accounts.transactionBuffer),\n getAccountMeta(accounts.voter),\n getAccountMeta(accounts.systemProgram),\n getAccountMeta(accounts.slotHashSysvar),\n getAccountMeta(accounts.instructionsSysvar),\n ...remainingAccounts,\n ],\n data: getTransactionBufferVoteInstructionDataEncoder().encode(\n args as TransactionBufferVoteInstructionDataArgs\n ),\n programAddress,\n } as TransactionBufferVoteInstruction<\n TProgramAddress,\n TAccountSettings,\n TAccountDomainConfig,\n TAccountTransactionBuffer,\n TAccountVoter,\n TAccountSystemProgram,\n TAccountSlotHashSysvar,\n TAccountInstructionsSysvar\n >);\n}\n\nexport type ParsedTransactionBufferVoteInstruction<\n TProgram extends string = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n settings: TAccountMetas[0];\n domainConfig?: TAccountMetas[1] | undefined;\n transactionBuffer: TAccountMetas[2];\n voter?: TAccountMetas[3] | undefined;\n systemProgram: TAccountMetas[4];\n slotHashSysvar?: TAccountMetas[5] | undefined;\n instructionsSysvar?: TAccountMetas[6] | undefined;\n };\n data: TransactionBufferVoteInstructionData;\n};\n\nexport function parseTransactionBufferVoteInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>\n): ParsedTransactionBufferVoteInstruction<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 const getNextOptionalAccount = () => {\n const accountMeta = getNextAccount();\n return accountMeta.address === MULTI_WALLET_PROGRAM_ADDRESS\n ? undefined\n : accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n settings: getNextAccount(),\n domainConfig: getNextOptionalAccount(),\n transactionBuffer: getNextAccount(),\n voter: getNextOptionalAccount(),\n systemProgram: getNextAccount(),\n slotHashSysvar: getNextOptionalAccount(),\n instructionsSysvar: getNextOptionalAccount(),\n },\n data: getTransactionBufferVoteInstructionDataDecoder().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 getOptionDecoder,\n getOptionEncoder,\n getStructDecoder,\n getStructEncoder,\n transformEncoder,\n type AccountMeta,\n type AccountSignerMeta,\n type Address,\n type Codec,\n type Decoder,\n type Encoder,\n type Instruction,\n type InstructionWithAccounts,\n type InstructionWithData,\n type Option,\n type OptionOrNullable,\n type ReadonlyAccount,\n type ReadonlySignerAccount,\n type ReadonlyUint8Array,\n type TransactionSigner,\n type WritableAccount,\n type WritableSignerAccount,\n} from \"gill\";\nimport { parseRemainingAccounts } from \"../../hooked\";\nimport { MULTI_WALLET_PROGRAM_ADDRESS } from \"../programs\";\nimport { getAccountMetaFactory, type ResolvedAccount } from \"../shared\";\nimport {\n getProofArgsDecoder,\n getProofArgsEncoder,\n getSecp256r1VerifyArgsDecoder,\n getSecp256r1VerifyArgsEncoder,\n getSettingsReadonlyArgsDecoder,\n getSettingsReadonlyArgsEncoder,\n type ProofArgs,\n type ProofArgsArgs,\n type Secp256r1VerifyArgs,\n type Secp256r1VerifyArgsArgs,\n type SettingsReadonlyArgs,\n type SettingsReadonlyArgsArgs,\n} from \"../types\";\n\nexport const TRANSACTION_BUFFER_VOTE_COMPRESSED_DISCRIMINATOR = new Uint8Array([\n 21,\n]);\n\nexport function getTransactionBufferVoteCompressedDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 1).encode(\n TRANSACTION_BUFFER_VOTE_COMPRESSED_DISCRIMINATOR\n );\n}\n\nexport type TransactionBufferVoteCompressedInstruction<\n TProgram extends string = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n TAccountPayer extends string | AccountMeta<string> = string,\n TAccountDomainConfig extends string | AccountMeta<string> = string,\n TAccountTransactionBuffer extends string | AccountMeta<string> = string,\n TAccountVoter extends string | AccountMeta<string> = string,\n TAccountSystemProgram extends\n | string\n | AccountMeta<string> = \"11111111111111111111111111111111\",\n TAccountSlotHashSysvar extends\n | string\n | AccountMeta<string> = \"SysvarS1otHashes111111111111111111111111111\",\n TAccountInstructionsSysvar extends\n | string\n | AccountMeta<string> = \"Sysvar1nstructions1111111111111111111111111\",\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountPayer extends string\n ? WritableSignerAccount<TAccountPayer> &\n AccountSignerMeta<TAccountPayer>\n : TAccountPayer,\n TAccountDomainConfig extends string\n ? ReadonlyAccount<TAccountDomainConfig>\n : TAccountDomainConfig,\n TAccountTransactionBuffer extends string\n ? WritableAccount<TAccountTransactionBuffer>\n : TAccountTransactionBuffer,\n TAccountVoter extends string\n ? ReadonlySignerAccount<TAccountVoter> &\n AccountSignerMeta<TAccountVoter>\n : TAccountVoter,\n TAccountSystemProgram extends string\n ? ReadonlyAccount<TAccountSystemProgram>\n : TAccountSystemProgram,\n TAccountSlotHashSysvar extends string\n ? ReadonlyAccount<TAccountSlotHashSysvar>\n : TAccountSlotHashSysvar,\n TAccountInstructionsSysvar extends string\n ? ReadonlyAccount<TAccountInstructionsSysvar>\n : TAccountInstructionsSysvar,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type TransactionBufferVoteCompressedInstructionData = {\n discriminator: ReadonlyUint8Array;\n secp256r1VerifyArgs: Option<Secp256r1VerifyArgs>;\n settingsReadonlyArgs: SettingsReadonlyArgs;\n compressedProofArgs: ProofArgs;\n};\n\nexport type TransactionBufferVoteCompressedInstructionDataArgs = {\n secp256r1VerifyArgs: OptionOrNullable<Secp256r1VerifyArgsArgs>;\n settingsReadonlyArgs: SettingsReadonlyArgsArgs;\n compressedProofArgs: ProofArgsArgs;\n};\n\nexport function getTransactionBufferVoteCompressedInstructionDataEncoder(): Encoder<TransactionBufferVoteCompressedInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n [\"discriminator\", fixEncoderSize(getBytesEncoder(), 1)],\n [\n \"secp256r1VerifyArgs\",\n getOptionEncoder(getSecp256r1VerifyArgsEncoder()),\n ],\n [\"settingsReadonlyArgs\", getSettingsReadonlyArgsEncoder()],\n [\"compressedProofArgs\", getProofArgsEncoder()],\n ]),\n (value) => ({\n ...value,\n discriminator: TRANSACTION_BUFFER_VOTE_COMPRESSED_DISCRIMINATOR,\n })\n );\n}\n\nexport function getTransactionBufferVoteCompressedInstructionDataDecoder(): Decoder<TransactionBufferVoteCompressedInstructionData> {\n return getStructDecoder([\n [\"discriminator\", fixDecoderSize(getBytesDecoder(), 1)],\n [\"secp256r1VerifyArgs\", getOptionDecoder(getSecp256r1VerifyArgsDecoder())],\n [\"settingsReadonlyArgs\", getSettingsReadonlyArgsDecoder()],\n [\"compressedProofArgs\", getProofArgsDecoder()],\n ]);\n}\n\nexport function getTransactionBufferVoteCompressedInstructionDataCodec(): Codec<\n TransactionBufferVoteCompressedInstructionDataArgs,\n TransactionBufferVoteCompressedInstructionData\n> {\n return combineCodec(\n getTransactionBufferVoteCompressedInstructionDataEncoder(),\n getTransactionBufferVoteCompressedInstructionDataDecoder()\n );\n}\n\nexport type TransactionBufferVoteCompressedInstructionExtraArgs = {\n remainingAccounts: Array<{ address: Address; role: number }>;\n};\n\nexport type TransactionBufferVoteCompressedInput<\n TAccountPayer extends string = string,\n TAccountDomainConfig extends string = string,\n TAccountTransactionBuffer extends string = string,\n TAccountVoter extends string = string,\n TAccountSystemProgram extends string = string,\n TAccountSlotHashSysvar extends string = string,\n TAccountInstructionsSysvar extends string = string,\n> = {\n payer: TransactionSigner<TAccountPayer>;\n domainConfig?: Address<TAccountDomainConfig>;\n transactionBuffer: Address<TAccountTransactionBuffer>;\n voter?: TransactionSigner<TAccountVoter>;\n systemProgram?: Address<TAccountSystemProgram>;\n slotHashSysvar?: Address<TAccountSlotHashSysvar>;\n instructionsSysvar?: Address<TAccountInstructionsSysvar>;\n secp256r1VerifyArgs: TransactionBufferVoteCompressedInstructionDataArgs[\"secp256r1VerifyArgs\"];\n settingsReadonlyArgs: TransactionBufferVoteCompressedInstructionDataArgs[\"settingsReadonlyArgs\"];\n compressedProofArgs: TransactionBufferVoteCompressedInstructionDataArgs[\"compressedProofArgs\"];\n remainingAccounts: TransactionBufferVoteCompressedInstructionExtraArgs[\"remainingAccounts\"];\n};\n\nexport function getTransactionBufferVoteCompressedInstruction<\n TAccountPayer extends string,\n TAccountDomainConfig extends string,\n TAccountTransactionBuffer extends string,\n TAccountVoter extends string,\n TAccountSystemProgram extends string,\n TAccountSlotHashSysvar extends string,\n TAccountInstructionsSysvar extends string,\n TProgramAddress extends Address = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n>(\n input: TransactionBufferVoteCompressedInput<\n TAccountPayer,\n TAccountDomainConfig,\n TAccountTransactionBuffer,\n TAccountVoter,\n TAccountSystemProgram,\n TAccountSlotHashSysvar,\n TAccountInstructionsSysvar\n >,\n config?: { programAddress?: TProgramAddress }\n): TransactionBufferVoteCompressedInstruction<\n TProgramAddress,\n TAccountPayer,\n TAccountDomainConfig,\n TAccountTransactionBuffer,\n TAccountVoter,\n TAccountSystemProgram,\n TAccountSlotHashSysvar,\n TAccountInstructionsSysvar\n> {\n // Program address.\n const programAddress = config?.programAddress ?? MULTI_WALLET_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n payer: { value: input.payer ?? null, isWritable: true },\n domainConfig: { value: input.domainConfig ?? null, isWritable: false },\n transactionBuffer: {\n value: input.transactionBuffer ?? null,\n isWritable: true,\n },\n voter: { value: input.voter ?? null, isWritable: false },\n systemProgram: { value: input.systemProgram ?? null, isWritable: false },\n slotHashSysvar: { value: input.slotHashSysvar ?? null, isWritable: false },\n instructionsSysvar: {\n value: input.instructionsSysvar ?? null,\n isWritable: false,\n },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolver scope.\n const resolverScope = { programAddress, accounts, args };\n\n // Resolve default values.\n if (!accounts.systemProgram.value) {\n accounts.systemProgram.value =\n \"11111111111111111111111111111111\" as Address<\"11111111111111111111111111111111\">;\n }\n if (!accounts.slotHashSysvar.value) {\n accounts.slotHashSysvar.value =\n \"SysvarS1otHashes111111111111111111111111111\" as Address<\"SysvarS1otHashes111111111111111111111111111\">;\n }\n if (!accounts.instructionsSysvar.value) {\n accounts.instructionsSysvar.value =\n \"Sysvar1nstructions1111111111111111111111111\" as Address<\"Sysvar1nstructions1111111111111111111111111\">;\n }\n\n // Remaining accounts.\n const remainingAccounts: AccountMeta[] =\n parseRemainingAccounts(resolverScope);\n\n const getAccountMeta = getAccountMetaFactory(programAddress, \"programId\");\n return Object.freeze({\n accounts: [\n getAccountMeta(accounts.payer),\n getAccountMeta(accounts.domainConfig),\n getAccountMeta(accounts.transactionBuffer),\n getAccountMeta(accounts.voter),\n getAccountMeta(accounts.systemProgram),\n getAccountMeta(accounts.slotHashSysvar),\n getAccountMeta(accounts.instructionsSysvar),\n ...remainingAccounts,\n ],\n data: getTransactionBufferVoteCompressedInstructionDataEncoder().encode(\n args as TransactionBufferVoteCompressedInstructionDataArgs\n ),\n programAddress,\n } as TransactionBufferVoteCompressedInstruction<\n TProgramAddress,\n TAccountPayer,\n TAccountDomainConfig,\n TAccountTransactionBuffer,\n TAccountVoter,\n TAccountSystemProgram,\n TAccountSlotHashSysvar,\n TAccountInstructionsSysvar\n >);\n}\n\nexport type ParsedTransactionBufferVoteCompressedInstruction<\n TProgram extends string = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n payer: TAccountMetas[0];\n domainConfig?: TAccountMetas[1] | undefined;\n transactionBuffer: TAccountMetas[2];\n voter?: TAccountMetas[3] | undefined;\n systemProgram: TAccountMetas[4];\n slotHashSysvar?: TAccountMetas[5] | undefined;\n instructionsSysvar?: TAccountMetas[6] | undefined;\n };\n data: TransactionBufferVoteCompressedInstructionData;\n};\n\nexport function parseTransactionBufferVoteCompressedInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>\n): ParsedTransactionBufferVoteCompressedInstruction<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 const getNextOptionalAccount = () => {\n const accountMeta = getNextAccount();\n return accountMeta.address === MULTI_WALLET_PROGRAM_ADDRESS\n ? undefined\n : accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n payer: getNextAccount(),\n domainConfig: getNextOptionalAccount(),\n transactionBuffer: getNextAccount(),\n voter: getNextOptionalAccount(),\n systemProgram: getNextAccount(),\n slotHashSysvar: getNextOptionalAccount(),\n instructionsSysvar: getNextOptionalAccount(),\n },\n data: getTransactionBufferVoteCompressedInstructionDataDecoder().decode(\n instruction.data\n ),\n };\n}\n","/**\n * This code was AUTOGENERATED using the Codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun Codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n combineCodec,\n fixDecoderSize,\n fixEncoderSize,\n getBytesDecoder,\n getBytesEncoder,\n getStructDecoder,\n getStructEncoder,\n transformEncoder,\n type AccountMeta,\n type Address,\n type FixedSizeCodec,\n type FixedSizeDecoder,\n type FixedSizeEncoder,\n type Instruction,\n type InstructionWithAccounts,\n type InstructionWithData,\n type ReadonlyUint8Array,\n type WritableAccount,\n} from \"gill\";\nimport { parseRemainingAccounts } from \"../../hooked\";\nimport { MULTI_WALLET_PROGRAM_ADDRESS } from \"../programs\";\nimport { getAccountMetaFactory, type ResolvedAccount } from \"../shared\";\n\nexport const TRANSACTION_EXECUTE_DISCRIMINATOR = new Uint8Array([14]);\n\nexport function getTransactionExecuteDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 1).encode(\n TRANSACTION_EXECUTE_DISCRIMINATOR\n );\n}\n\nexport type TransactionExecuteInstruction<\n TProgram extends string = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n TAccountSettings extends string | AccountMeta<string> = string,\n TAccountPayer extends string | AccountMeta<string> = string,\n TAccountTransactionBuffer extends string | AccountMeta<string> = string,\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountSettings extends string\n ? WritableAccount<TAccountSettings>\n : TAccountSettings,\n TAccountPayer extends string\n ? WritableAccount<TAccountPayer>\n : TAccountPayer,\n TAccountTransactionBuffer extends string\n ? WritableAccount<TAccountTransactionBuffer>\n : TAccountTransactionBuffer,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type TransactionExecuteInstructionData = {\n discriminator: ReadonlyUint8Array;\n};\n\nexport type TransactionExecuteInstructionDataArgs = {};\n\nexport function getTransactionExecuteInstructionDataEncoder(): FixedSizeEncoder<TransactionExecuteInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([[\"discriminator\", fixEncoderSize(getBytesEncoder(), 1)]]),\n (value) => ({ ...value, discriminator: TRANSACTION_EXECUTE_DISCRIMINATOR })\n );\n}\n\nexport function getTransactionExecuteInstructionDataDecoder(): FixedSizeDecoder<TransactionExecuteInstructionData> {\n return getStructDecoder([\n [\"discriminator\", fixDecoderSize(getBytesDecoder(), 1)],\n ]);\n}\n\nexport function getTransactionExecuteInstructionDataCodec(): FixedSizeCodec<\n TransactionExecuteInstructionDataArgs,\n TransactionExecuteInstructionData\n> {\n return combineCodec(\n getTransactionExecuteInstructionDataEncoder(),\n getTransactionExecuteInstructionDataDecoder()\n );\n}\n\nexport type TransactionExecuteInstructionExtraArgs = {\n remainingAccounts: Array<{ address: Address; role: number }>;\n};\n\nexport type TransactionExecuteInput<\n TAccountSettings extends string = string,\n TAccountPayer extends string = string,\n TAccountTransactionBuffer extends string = string,\n> = {\n settings: Address<TAccountSettings>;\n payer: Address<TAccountPayer>;\n transactionBuffer: Address<TAccountTransactionBuffer>;\n remainingAccounts: TransactionExecuteInstructionExtraArgs[\"remainingAccounts\"];\n};\n\nexport function getTransactionExecuteInstruction<\n TAccountSettings extends string,\n TAccountPayer extends string,\n TAccountTransactionBuffer extends string,\n TProgramAddress extends Address = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n>(\n input: TransactionExecuteInput<\n TAccountSettings,\n TAccountPayer,\n TAccountTransactionBuffer\n >,\n config?: { programAddress?: TProgramAddress }\n): TransactionExecuteInstruction<\n TProgramAddress,\n TAccountSettings,\n TAccountPayer,\n TAccountTransactionBuffer\n> {\n // Program address.\n const programAddress = config?.programAddress ?? MULTI_WALLET_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n settings: { value: input.settings ?? null, isWritable: true },\n payer: { value: input.payer ?? null, isWritable: true },\n transactionBuffer: {\n value: input.transactionBuffer ?? null,\n isWritable: true,\n },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Resolver scope.\n const resolverScope = { programAddress, accounts };\n\n // Remaining accounts.\n const remainingAccounts: AccountMeta[] =\n parseRemainingAccounts(resolverScope);\n\n const getAccountMeta = getAccountMetaFactory(programAddress, \"programId\");\n return Object.freeze({\n accounts: [\n getAccountMeta(accounts.settings),\n getAccountMeta(accounts.payer),\n getAccountMeta(accounts.transactionBuffer),\n ...remainingAccounts,\n ],\n data: getTransactionExecuteInstructionDataEncoder().encode({}),\n programAddress,\n } as TransactionExecuteInstruction<\n TProgramAddress,\n TAccountSettings,\n TAccountPayer,\n TAccountTransactionBuffer\n >);\n}\n\nexport type ParsedTransactionExecuteInstruction<\n TProgram extends string = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n settings: TAccountMetas[0];\n payer: TAccountMetas[1];\n transactionBuffer: TAccountMetas[2];\n };\n data: TransactionExecuteInstructionData;\n};\n\nexport function parseTransactionExecuteInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>\n): ParsedTransactionExecuteInstruction<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 settings: getNextAccount(),\n payer: getNextAccount(),\n transactionBuffer: getNextAccount(),\n },\n data: getTransactionExecuteInstructionDataDecoder().decode(\n instruction.data\n ),\n };\n}\n","/**\n * This code was AUTOGENERATED using the Codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun Codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n combineCodec,\n fixDecoderSize,\n fixEncoderSize,\n getAddressDecoder,\n getAddressEncoder,\n getBytesDecoder,\n getBytesEncoder,\n getStructDecoder,\n getStructEncoder,\n transformEncoder,\n type AccountMeta,\n type Address,\n type FixedSizeCodec,\n type FixedSizeDecoder,\n type FixedSizeEncoder,\n type Instruction,\n type InstructionWithAccounts,\n type InstructionWithData,\n type ReadonlyUint8Array,\n type WritableAccount,\n} from \"gill\";\nimport { parseRemainingAccounts } from \"../../hooked\";\nimport { MULTI_WALLET_PROGRAM_ADDRESS } from \"../programs\";\nimport { getAccountMetaFactory, type ResolvedAccount } from \"../shared\";\n\nexport const TRANSACTION_EXECUTE_COMPRESSED_DISCRIMINATOR = new Uint8Array([\n 25,\n]);\n\nexport function getTransactionExecuteCompressedDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 1).encode(\n TRANSACTION_EXECUTE_COMPRESSED_DISCRIMINATOR\n );\n}\n\nexport type TransactionExecuteCompressedInstruction<\n TProgram extends string = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n TAccountPayer extends string | AccountMeta<string> = string,\n TAccountTransactionBuffer extends string | AccountMeta<string> = string,\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountPayer extends string\n ? WritableAccount<TAccountPayer>\n : TAccountPayer,\n TAccountTransactionBuffer extends string\n ? WritableAccount<TAccountTransactionBuffer>\n : TAccountTransactionBuffer,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type TransactionExecuteCompressedInstructionData = {\n discriminator: ReadonlyUint8Array;\n settingsKey: Address;\n};\n\nexport type TransactionExecuteCompressedInstructionDataArgs = {\n settingsKey: Address;\n};\n\nexport function getTransactionExecuteCompressedInstructionDataEncoder(): FixedSizeEncoder<TransactionExecuteCompressedInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n [\"discriminator\", fixEncoderSize(getBytesEncoder(), 1)],\n [\"settingsKey\", getAddressEncoder()],\n ]),\n (value) => ({\n ...value,\n discriminator: TRANSACTION_EXECUTE_COMPRESSED_DISCRIMINATOR,\n })\n );\n}\n\nexport function getTransactionExecuteCompressedInstructionDataDecoder(): FixedSizeDecoder<TransactionExecuteCompressedInstructionData> {\n return getStructDecoder([\n [\"discriminator\", fixDecoderSize(getBytesDecoder(), 1)],\n [\"settingsKey\", getAddressDecoder()],\n ]);\n}\n\nexport function getTransactionExecuteCompressedInstructionDataCodec(): FixedSizeCodec<\n TransactionExecuteCompressedInstructionDataArgs,\n TransactionExecuteCompressedInstructionData\n> {\n return combineCodec(\n getTransactionExecuteCompressedInstructionDataEncoder(),\n getTransactionExecuteCompressedInstructionDataDecoder()\n );\n}\n\nexport type TransactionExecuteCompressedInstructionExtraArgs = {\n remainingAccounts: Array<{ address: Address; role: number }>;\n};\n\nexport type TransactionExecuteCompressedInput<\n TAccountPayer extends string = string,\n TAccountTransactionBuffer extends string = string,\n> = {\n payer: Address<TAccountPayer>;\n transactionBuffer: Address<TAccountTransactionBuffer>;\n settingsKey: TransactionExecuteCompressedInstructionDataArgs[\"settingsKey\"];\n remainingAccounts: TransactionExecuteCompressedInstructionExtraArgs[\"remainingAccounts\"];\n};\n\nexport function getTransactionExecuteCompressedInstruction<\n TAccountPayer extends string,\n TAccountTransactionBuffer extends string,\n TProgramAddress extends Address = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n>(\n input: TransactionExecuteCompressedInput<\n TAccountPayer,\n TAccountTransactionBuffer\n >,\n config?: { programAddress?: TProgramAddress }\n): TransactionExecuteCompressedInstruction<\n TProgramAddress,\n TAccountPayer,\n TAccountTransactionBuffer\n> {\n // Program address.\n const programAddress = config?.programAddress ?? MULTI_WALLET_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n payer: { value: input.payer ?? null, isWritable: true },\n transactionBuffer: {\n value: input.transactionBuffer ?? null,\n isWritable: true,\n },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolver scope.\n const resolverScope = { programAddress, accounts, args };\n\n // Remaining accounts.\n const remainingAccounts: AccountMeta[] =\n parseRemainingAccounts(resolverScope);\n\n const getAccountMeta = getAccountMetaFactory(programAddress, \"programId\");\n return Object.freeze({\n accounts: [\n getAccountMeta(accounts.payer),\n getAccountMeta(accounts.transactionBuffer),\n ...remainingAccounts,\n ],\n data: getTransactionExecuteCompressedInstructionDataEncoder().encode(\n args as TransactionExecuteCompressedInstructionDataArgs\n ),\n programAddress,\n } as TransactionExecuteCompressedInstruction<\n TProgramAddress,\n TAccountPayer,\n TAccountTransactionBuffer\n >);\n}\n\nexport type ParsedTransactionExecuteCompressedInstruction<\n TProgram extends string = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n payer: TAccountMetas[0];\n transactionBuffer: TAccountMetas[1];\n };\n data: TransactionExecuteCompressedInstructionData;\n};\n\nexport function parseTransactionExecuteCompressedInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>\n): ParsedTransactionExecuteCompressedInstruction<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: { payer: getNextAccount(), transactionBuffer: getNextAccount() },\n data: getTransactionExecuteCompressedInstructionDataDecoder().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 getArrayDecoder,\n getArrayEncoder,\n getBytesDecoder,\n getBytesEncoder,\n getStructDecoder,\n getStructEncoder,\n transformEncoder,\n type AccountMeta,\n type Address,\n type Codec,\n type Decoder,\n type Encoder,\n type Instruction,\n type InstructionWithAccounts,\n type InstructionWithData,\n type ReadonlyAccount,\n type ReadonlyUint8Array,\n type WritableAccount,\n} from \"gill\";\nimport { parseRemainingAccounts } from \"../../hooked\";\nimport { MULTI_WALLET_PROGRAM_ADDRESS } from \"../programs\";\nimport { getAccountMetaFactory, type ResolvedAccount } from \"../shared\";\nimport {\n getSecp256r1VerifyArgsWithDomainAddressDecoder,\n getSecp256r1VerifyArgsWithDomainAddressEncoder,\n getTransactionMessageDecoder,\n getTransactionMessageEncoder,\n type Secp256r1VerifyArgsWithDomainAddress,\n type Secp256r1VerifyArgsWithDomainAddressArgs,\n type TransactionMessage,\n type TransactionMessageArgs,\n} from \"../types\";\n\nexport const TRANSACTION_EXECUTE_SYNC_DISCRIMINATOR = new Uint8Array([15]);\n\nexport function getTransactionExecuteSyncDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 1).encode(\n TRANSACTION_EXECUTE_SYNC_DISCRIMINATOR\n );\n}\n\nexport type TransactionExecuteSyncInstruction<\n TProgram extends string = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n TAccountSettings extends string | AccountMeta<string> = string,\n TAccountSlotHashSysvar extends\n | string\n | AccountMeta<string> = \"SysvarS1otHashes111111111111111111111111111\",\n TAccountInstructionsSysvar extends\n | string\n | AccountMeta<string> = \"Sysvar1nstructions1111111111111111111111111\",\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountSettings extends string\n ? WritableAccount<TAccountSettings>\n : TAccountSettings,\n TAccountSlotHashSysvar extends string\n ? ReadonlyAccount<TAccountSlotHashSysvar>\n : TAccountSlotHashSysvar,\n TAccountInstructionsSysvar extends string\n ? ReadonlyAccount<TAccountInstructionsSysvar>\n : TAccountInstructionsSysvar,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type TransactionExecuteSyncInstructionData = {\n discriminator: ReadonlyUint8Array;\n transactionMessage: TransactionMessage;\n secp256r1VerifyArgs: Array<Secp256r1VerifyArgsWithDomainAddress>;\n};\n\nexport type TransactionExecuteSyncInstructionDataArgs = {\n transactionMessage: TransactionMessageArgs;\n secp256r1VerifyArgs: Array<Secp256r1VerifyArgsWithDomainAddressArgs>;\n};\n\nexport function getTransactionExecuteSyncInstructionDataEncoder(): Encoder<TransactionExecuteSyncInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n [\"discriminator\", fixEncoderSize(getBytesEncoder(), 1)],\n [\"transactionMessage\", getTransactionMessageEncoder()],\n [\n \"secp256r1VerifyArgs\",\n getArrayEncoder(getSecp256r1VerifyArgsWithDomainAddressEncoder()),\n ],\n ]),\n (value) => ({\n ...value,\n discriminator: TRANSACTION_EXECUTE_SYNC_DISCRIMINATOR,\n })\n );\n}\n\nexport function getTransactionExecuteSyncInstructionDataDecoder(): Decoder<TransactionExecuteSyncInstructionData> {\n return getStructDecoder([\n [\"discriminator\", fixDecoderSize(getBytesDecoder(), 1)],\n [\"transactionMessage\", getTransactionMessageDecoder()],\n [\n \"secp256r1VerifyArgs\",\n getArrayDecoder(getSecp256r1VerifyArgsWithDomainAddressDecoder()),\n ],\n ]);\n}\n\nexport function getTransactionExecuteSyncInstructionDataCodec(): Codec<\n TransactionExecuteSyncInstructionDataArgs,\n TransactionExecuteSyncInstructionData\n> {\n return combineCodec(\n getTransactionExecuteSyncInstructionDataEncoder(),\n getTransactionExecuteSyncInstructionDataDecoder()\n );\n}\n\nexport type TransactionExecuteSyncInstructionExtraArgs = {\n remainingAccounts: Array<{ address: Address; role: number }>;\n};\n\nexport type TransactionExecuteSyncInput<\n TAccountSettings extends string = string,\n TAccountSlotHashSysvar extends string = string,\n TAccountInstructionsSysvar extends string = string,\n> = {\n settings: Address<TAccountSettings>;\n slotHashSysvar?: Address<TAccountSlotHashSysvar>;\n instructionsSysvar?: Address<TAccountInstructionsSysvar>;\n transactionMessage: TransactionExecuteSyncInstructionDataArgs[\"transactionMessage\"];\n secp256r1VerifyArgs: TransactionExecuteSyncInstructionDataArgs[\"secp256r1VerifyArgs\"];\n remainingAccounts: TransactionExecuteSyncInstructionExtraArgs[\"remainingAccounts\"];\n};\n\nexport function getTransactionExecuteSyncInstruction<\n TAccountSettings extends string,\n TAccountSlotHashSysvar extends string,\n TAccountInstructionsSysvar extends string,\n TProgramAddress extends Address = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n>(\n input: TransactionExecuteSyncInput<\n TAccountSettings,\n TAccountSlotHashSysvar,\n TAccountInstructionsSysvar\n >,\n config?: { programAddress?: TProgramAddress }\n): TransactionExecuteSyncInstruction<\n TProgramAddress,\n TAccountSettings,\n TAccountSlotHashSysvar,\n TAccountInstructionsSysvar\n> {\n // Program address.\n const programAddress = config?.programAddress ?? MULTI_WALLET_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n settings: { value: input.settings ?? null, isWritable: true },\n slotHashSysvar: { value: input.slotHashSysvar ?? null, isWritable: false },\n instructionsSysvar: {\n value: input.instructionsSysvar ?? null,\n isWritable: false,\n },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolver scope.\n const resolverScope = { programAddress, accounts, args };\n\n // Resolve default values.\n if (!accounts.slotHashSysvar.value) {\n accounts.slotHashSysvar.value =\n \"SysvarS1otHashes111111111111111111111111111\" as Address<\"SysvarS1otHashes111111111111111111111111111\">;\n }\n if (!accounts.instructionsSysvar.value) {\n accounts.instructionsSysvar.value =\n \"Sysvar1nstructions1111111111111111111111111\" as Address<\"Sysvar1nstructions1111111111111111111111111\">;\n }\n\n // Remaining accounts.\n const remainingAccounts: AccountMeta[] =\n parseRemainingAccounts(resolverScope);\n\n const getAccountMeta = getAccountMetaFactory(programAddress, \"programId\");\n return Object.freeze({\n accounts: [\n getAccountMeta(accounts.settings),\n getAccountMeta(accounts.slotHashSysvar),\n getAccountMeta(accounts.instructionsSysvar),\n ...remainingAccounts,\n ],\n data: getTransactionExecuteSyncInstructionDataEncoder().encode(\n args as TransactionExecuteSyncInstructionDataArgs\n ),\n programAddress,\n } as TransactionExecuteSyncInstruction<\n TProgramAddress,\n TAccountSettings,\n TAccountSlotHashSysvar,\n TAccountInstructionsSysvar\n >);\n}\n\nexport type ParsedTransactionExecuteSyncInstruction<\n TProgram extends string = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n settings: TAccountMetas[0];\n slotHashSysvar?: TAccountMetas[1] | undefined;\n instructionsSysvar: TAccountMetas[2];\n };\n data: TransactionExecuteSyncInstructionData;\n};\n\nexport function parseTransactionExecuteSyncInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>\n): ParsedTransactionExecuteSyncInstruction<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 const getNextOptionalAccount = () => {\n const accountMeta = getNextAccount();\n return accountMeta.address === MULTI_WALLET_PROGRAM_ADDRESS\n ? undefined\n : accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n settings: getNextAccount(),\n slotHashSysvar: getNextOptionalAccount(),\n instructionsSysvar: getNextAccount(),\n },\n data: getTransactionExecuteSyncInstructionDataDecoder().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 getArrayDecoder,\n getArrayEncoder,\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 ReadonlyUint8Array,\n type TransactionSigner,\n type WritableSignerAccount,\n} from \"gill\";\nimport { parseRemainingAccounts } from \"../../hooked\";\nimport { MULTI_WALLET_PROGRAM_ADDRESS } from \"../programs\";\nimport { getAccountMetaFactory, type ResolvedAccount } from \"../shared\";\nimport {\n getProofArgsDecoder,\n getProofArgsEncoder,\n getSecp256r1VerifyArgsWithDomainAddressDecoder,\n getSecp256r1VerifyArgsWithDomainAddressEncoder,\n getSettingsReadonlyArgsDecoder,\n getSettingsReadonlyArgsEncoder,\n getTransactionMessageDecoder,\n getTransactionMessageEncoder,\n type ProofArgs,\n type ProofArgsArgs,\n type Secp256r1VerifyArgsWithDomainAddress,\n type Secp256r1VerifyArgsWithDomainAddressArgs,\n type SettingsReadonlyArgs,\n type SettingsReadonlyArgsArgs,\n type TransactionMessage,\n type TransactionMessageArgs,\n} from \"../types\";\n\nexport const TRANSACTION_EXECUTE_SYNC_COMPRESSED_DISCRIMINATOR = new Uint8Array(\n [26]\n);\n\nexport function getTransactionExecuteSyncCompressedDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 1).encode(\n TRANSACTION_EXECUTE_SYNC_COMPRESSED_DISCRIMINATOR\n );\n}\n\nexport type TransactionExecuteSyncCompressedInstruction<\n TProgram extends string = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n TAccountPayer extends string | AccountMeta<string> = string,\n TAccountSlotHashSysvar extends\n | string\n | AccountMeta<string> = \"SysvarS1otHashes111111111111111111111111111\",\n TAccountInstructionsSysvar extends\n | string\n | AccountMeta<string> = \"Sysvar1nstructions1111111111111111111111111\",\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountPayer extends string\n ? WritableSignerAccount<TAccountPayer> &\n AccountSignerMeta<TAccountPayer>\n : TAccountPayer,\n TAccountSlotHashSysvar extends string\n ? ReadonlyAccount<TAccountSlotHashSysvar>\n : TAccountSlotHashSysvar,\n TAccountInstructionsSysvar extends string\n ? ReadonlyAccount<TAccountInstructionsSysvar>\n : TAccountInstructionsSysvar,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type TransactionExecuteSyncCompressedInstructionData = {\n discriminator: ReadonlyUint8Array;\n transactionMessage: TransactionMessage;\n secp256r1VerifyArgs: Array<Secp256r1VerifyArgsWithDomainAddress>;\n settingsReadonlyArgs: SettingsReadonlyArgs;\n compressedProofArgs: ProofArgs;\n};\n\nexport type TransactionExecuteSyncCompressedInstructionDataArgs = {\n transactionMessage: TransactionMessageArgs;\n secp256r1VerifyArgs: Array<Secp256r1VerifyArgsWithDomainAddressArgs>;\n settingsReadonlyArgs: SettingsReadonlyArgsArgs;\n compressedProofArgs: ProofArgsArgs;\n};\n\nexport function getTransactionExecuteSyncCompressedInstructionDataEncoder(): Encoder<TransactionExecuteSyncCompressedInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n [\"discriminator\", fixEncoderSize(getBytesEncoder(), 1)],\n [\"transactionMessage\", getTransactionMessageEncoder()],\n [\n \"secp256r1VerifyArgs\",\n getArrayEncoder(getSecp256r1VerifyArgsWithDomainAddressEncoder()),\n ],\n [\"settingsReadonlyArgs\", getSettingsReadonlyArgsEncoder()],\n [\"compressedProofArgs\", getProofArgsEncoder()],\n ]),\n (value) => ({\n ...value,\n discriminator: TRANSACTION_EXECUTE_SYNC_COMPRESSED_DISCRIMINATOR,\n })\n );\n}\n\nexport function getTransactionExecuteSyncCompressedInstructionDataDecoder(): Decoder<TransactionExecuteSyncCompressedInstructionData> {\n return getStructDecoder([\n [\"discriminator\", fixDecoderSize(getBytesDecoder(), 1)],\n [\"transactionMessage\", getTransactionMessageDecoder()],\n [\n \"secp256r1VerifyArgs\",\n getArrayDecoder(getSecp256r1VerifyArgsWithDomainAddressDecoder()),\n ],\n [\"settingsReadonlyArgs\", getSettingsReadonlyArgsDecoder()],\n [\"compressedProofArgs\", getProofArgsDecoder()],\n ]);\n}\n\nexport function getTransactionExecuteSyncCompressedInstructionDataCodec(): Codec<\n TransactionExecuteSyncCompressedInstructionDataArgs,\n TransactionExecuteSyncCompressedInstructionData\n> {\n return combineCodec(\n getTransactionExecuteSyncCompressedInstructionDataEncoder(),\n getTransactionExecuteSyncCompressedInstructionDataDecoder()\n );\n}\n\nexport type TransactionExecuteSyncCompressedInstructionExtraArgs = {\n remainingAccounts: Array<{ address: Address; role: number }>;\n};\n\nexport type TransactionExecuteSyncCompressedInput<\n TAccountPayer extends string = string,\n TAccountSlotHashSysvar extends string = string,\n TAccountInstructionsSysvar extends string = string,\n> = {\n payer: TransactionSigner<TAccountPayer>;\n slotHashSysvar?: Address<TAccountSlotHashSysvar>;\n instructionsSysvar?: Address<TAccountInstructionsSysvar>;\n transactionMessage: TransactionExecuteSyncCompressedInstructionDataArgs[\"transactionMessage\"];\n secp256r1VerifyArgs: TransactionExecuteSyncCompressedInstructionDataArgs[\"secp256r1VerifyArgs\"];\n settingsReadonlyArgs: TransactionExecuteSyncCompressedInstructionDataArgs[\"settingsReadonlyArgs\"];\n compressedProofArgs: TransactionExecuteSyncCompressedInstructionDataArgs[\"compressedProofArgs\"];\n remainingAccounts: TransactionExecuteSyncCompressedInstructionExtraArgs[\"remainingAccounts\"];\n};\n\nexport function getTransactionExecuteSyncCompressedInstruction<\n TAccountPayer extends string,\n TAccountSlotHashSysvar extends string,\n TAccountInstructionsSysvar extends string,\n TProgramAddress extends Address = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n>(\n input: TransactionExecuteSyncCompressedInput<\n TAccountPayer,\n TAccountSlotHashSysvar,\n TAccountInstructionsSysvar\n >,\n config?: { programAddress?: TProgramAddress }\n): TransactionExecuteSyncCompressedInstruction<\n TProgramAddress,\n TAccountPayer,\n TAccountSlotHashSysvar,\n TAccountInstructionsSysvar\n> {\n // Program address.\n const programAddress = config?.programAddress ?? MULTI_WALLET_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n payer: { value: input.payer ?? null, isWritable: true },\n slotHashSysvar: { value: input.slotHashSysvar ?? null, isWritable: false },\n instructionsSysvar: {\n value: input.instructionsSysvar ?? null,\n isWritable: false,\n },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolver scope.\n const resolverScope = { programAddress, accounts, args };\n\n // Resolve default values.\n if (!accounts.slotHashSysvar.value) {\n accounts.slotHashSysvar.value =\n \"SysvarS1otHashes111111111111111111111111111\" as Address<\"SysvarS1otHashes111111111111111111111111111\">;\n }\n if (!accounts.instructionsSysvar.value) {\n accounts.instructionsSysvar.value =\n \"Sysvar1nstructions1111111111111111111111111\" as Address<\"Sysvar1nstructions1111111111111111111111111\">;\n }\n\n // Remaining accounts.\n const remainingAccounts: AccountMeta[] =\n parseRemainingAccounts(resolverScope);\n\n const getAccountMeta = getAccountMetaFactory(programAddress, \"programId\");\n return Object.freeze({\n accounts: [\n getAccountMeta(accounts.payer),\n getAccountMeta(accounts.slotHashSysvar),\n getAccountMeta(accounts.instructionsSysvar),\n ...remainingAccounts,\n ],\n data: getTransactionExecuteSyncCompressedInstructionDataEncoder().encode(\n args as TransactionExecuteSyncCompressedInstructionDataArgs\n ),\n programAddress,\n } as TransactionExecuteSyncCompressedInstruction<\n TProgramAddress,\n TAccountPayer,\n TAccountSlotHashSysvar,\n TAccountInstructionsSysvar\n >);\n}\n\nexport type ParsedTransactionExecuteSyncCompressedInstruction<\n TProgram extends string = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n payer: TAccountMetas[0];\n slotHashSysvar?: TAccountMetas[1] | undefined;\n instructionsSysvar: TAccountMetas[2];\n };\n data: TransactionExecuteSyncCompressedInstructionData;\n};\n\nexport function parseTransactionExecuteSyncCompressedInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>\n): ParsedTransactionExecuteSyncCompressedInstruction<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 const getNextOptionalAccount = () => {\n const accountMeta = getNextAccount();\n return accountMeta.address === MULTI_WALLET_PROGRAM_ADDRESS\n ? undefined\n : accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n payer: getNextAccount(),\n slotHashSysvar: getNextOptionalAccount(),\n instructionsSysvar: getNextAccount(),\n },\n data: getTransactionExecuteSyncCompressedInstructionDataDecoder().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 containsBytes,\n fixEncoderSize,\n getBytesEncoder,\n type Address,\n type ReadonlyUint8Array,\n} from \"gill\";\nimport {\n type ParsedChangeConfigCompressedInstruction,\n type ParsedChangeConfigInstruction,\n type ParsedCompressSettingsAccountInstruction,\n type ParsedCreateDomainConfigInstruction,\n type ParsedCreateDomainUserAccountInstruction,\n type ParsedCreateGlobalCounterInstruction,\n type ParsedCreateMultiWalletCompressedInstruction,\n type ParsedCreateMultiWalletInstruction,\n type ParsedCreateUserAccountsInstruction,\n type ParsedDecompressSettingsAccountInstruction,\n type ParsedDisableDomainConfigInstruction,\n type ParsedEditDomainConfigInstruction,\n type ParsedEditTransactionManagerUrlInstruction,\n type ParsedMigrateCompressedSettingsInstruction,\n type ParsedMigrateCompressedUsersInstruction,\n type ParsedNativeTransferIntentCompressedInstruction,\n type ParsedNativeTransferIntentInstruction,\n type ParsedTokenTransferIntentCompressedInstruction,\n type ParsedTokenTransferIntentInstruction,\n type ParsedTransactionBufferCloseCompressedInstruction,\n type ParsedTransactionBufferCloseInstruction,\n type ParsedTransactionBufferCreateCompressedInstruction,\n type ParsedTransactionBufferCreateInstruction,\n type ParsedTransactionBufferExecuteCompressedInstruction,\n type ParsedTransactionBufferExecuteInstruction,\n type ParsedTransactionBufferExtendCompressedInstruction,\n type ParsedTransactionBufferExtendInstruction,\n type ParsedTransactionBufferVoteCompressedInstruction,\n type ParsedTransactionBufferVoteInstruction,\n type ParsedTransactionExecuteCompressedInstruction,\n type ParsedTransactionExecuteInstruction,\n type ParsedTransactionExecuteSyncCompressedInstruction,\n type ParsedTransactionExecuteSyncInstruction,\n} from \"../instructions\";\n\nexport const MULTI_WALLET_PROGRAM_ADDRESS =\n \"reviR1xysEChySVSWGa43a6oJ2boJYTJhwRjo8KJhhT\" as Address<\"reviR1xysEChySVSWGa43a6oJ2boJYTJhwRjo8KJhhT\">;\n\nexport enum MultiWalletAccount {\n DomainConfig,\n GlobalCounter,\n Settings,\n TransactionBuffer,\n}\n\nexport function identifyMultiWalletAccount(\n account: { data: ReadonlyUint8Array } | ReadonlyUint8Array\n): MultiWalletAccount {\n const data = \"data\" in account ? account.data : account;\n if (\n containsBytes(\n data,\n fixEncoderSize(getBytesEncoder(), 8).encode(\n new Uint8Array([201, 232, 212, 229, 59, 241, 106, 197])\n ),\n 0\n )\n ) {\n return MultiWalletAccount.DomainConfig;\n }\n if (\n containsBytes(\n data,\n fixEncoderSize(getBytesEncoder(), 8).encode(\n new Uint8Array([42, 206, 176, 58, 175, 129, 130, 233])\n ),\n 0\n )\n ) {\n return MultiWalletAccount.GlobalCounter;\n }\n if (\n containsBytes(\n data,\n fixEncoderSize(getBytesEncoder(), 8).encode(\n new Uint8Array([223, 179, 163, 190, 177, 224, 67, 173])\n ),\n 0\n )\n ) {\n return MultiWalletAccount.Settings;\n }\n if (\n containsBytes(\n data,\n fixEncoderSize(getBytesEncoder(), 8).encode(\n new Uint8Array([90, 36, 35, 219, 93, 225, 110, 96])\n ),\n 0\n )\n ) {\n return MultiWalletAccount.TransactionBuffer;\n }\n throw new Error(\n \"The provided account could not be identified as a multiWallet account.\"\n );\n}\n\nexport enum MultiWalletInstruction {\n ChangeConfig,\n ChangeConfigCompressed,\n CompressSettingsAccount,\n CreateDomainConfig,\n CreateDomainUserAccount,\n CreateGlobalCounter,\n CreateMultiWallet,\n CreateMultiWalletCompressed,\n CreateUserAccounts,\n DecompressSettingsAccount,\n DisableDomainConfig,\n EditDomainConfig,\n EditTransactionManagerUrl,\n MigrateCompressedSettings,\n MigrateCompressedUsers,\n NativeTransferIntent,\n NativeTransferIntentCompressed,\n TokenTransferIntent,\n TokenTransferIntentCompressed,\n TransactionBufferClose,\n TransactionBufferCloseCompressed,\n TransactionBufferCreate,\n TransactionBufferCreateCompressed,\n TransactionBufferExecute,\n TransactionBufferExecuteCompressed,\n TransactionBufferExtend,\n TransactionBufferExtendCompressed,\n TransactionBufferVote,\n TransactionBufferVoteCompressed,\n TransactionExecute,\n TransactionExecuteCompressed,\n TransactionExecuteSync,\n TransactionExecuteSyncCompressed,\n}\n\nexport function identifyMultiWalletInstruction(\n instruction: { data: ReadonlyUint8Array } | ReadonlyUint8Array\n): MultiWalletInstruction {\n const data = \"data\" in instruction ? instruction.data : instruction;\n if (\n containsBytes(\n data,\n fixEncoderSize(getBytesEncoder(), 1).encode(new Uint8Array([8])),\n 0\n )\n ) {\n return MultiWalletInstruction.ChangeConfig;\n }\n if (\n containsBytes(\n data,\n fixEncoderSize(getBytesEncoder(), 1).encode(new Uint8Array([19])),\n 0\n )\n ) {\n return MultiWalletInstruction.ChangeConfigCompressed;\n }\n if (\n containsBytes(\n data,\n fixEncoderSize(getBytesEncoder(), 1).encode(new Uint8Array([16])),\n 0\n )\n ) {\n return MultiWalletInstruction.CompressSettingsAccount;\n }\n if (\n containsBytes(\n data,\n fixEncoderSize(getBytesEncoder(), 1).encode(new Uint8Array([0])),\n 0\n )\n ) {\n return MultiWalletInstruction.CreateDomainConfig;\n }\n if (\n containsBytes(\n data,\n fixEncoderSize(getBytesEncoder(), 1).encode(new Uint8Array([4])),\n 0\n )\n ) {\n return MultiWalletInstruction.CreateDomainUserAccount;\n }\n if (\n containsBytes(\n data,\n fixEncoderSize(getBytesEncoder(), 1).encode(new Uint8Array([3])),\n 0\n )\n ) {\n return MultiWalletInstruction.CreateGlobalCounter;\n }\n if (\n containsBytes(\n data,\n fixEncoderSize(getBytesEncoder(), 1).encode(new Uint8Array([7])),\n 0\n )\n ) {\n return MultiWalletInstruction.CreateMultiWallet;\n }\n if (\n containsBytes(\n data,\n fixEncoderSize(getBytesEncoder(), 1).encode(new Uint8Array([18])),\n 0\n )\n ) {\n return MultiWalletInstruction.CreateMultiWalletCompressed;\n }\n if (\n containsBytes(\n data,\n fixEncoderSize(getBytesEncoder(), 1).encode(new Uint8Array([5])),\n 0\n )\n ) {\n return MultiWalletInstruction.CreateUserAccounts;\n }\n if (\n containsBytes(\n data,\n fixEncoderSize(getBytesEncoder(), 1).encode(new Uint8Array([17])),\n 0\n )\n ) {\n return MultiWalletInstruction.DecompressSettingsAccount;\n }\n if (\n containsBytes(\n data,\n fixEncoderSize(getBytesEncoder(), 1).encode(new Uint8Array([2])),\n 0\n )\n ) {\n return MultiWalletInstruction.DisableDomainConfig;\n }\n if (\n containsBytes(\n data,\n fixEncoderSize(getBytesEncoder(), 1).encode(new Uint8Array([1])),\n 0\n )\n ) {\n return MultiWalletInstruction.EditDomainConfig;\n }\n if (\n containsBytes(\n data,\n fixEncoderSize(getBytesEncoder(), 1).encode(new Uint8Array([6])),\n 0\n )\n ) {\n return MultiWalletInstruction.EditTransactionManagerUrl;\n }\n if (\n containsBytes(\n data,\n fixEncoderSize(getBytesEncoder(), 1).encode(new Uint8Array([32])),\n 0\n )\n ) {\n return MultiWalletInstruction.MigrateCompressedSettings;\n }\n if (\n containsBytes(\n data,\n fixEncoderSize(getBytesEncoder(), 1).encode(new Uint8Array([31])),\n 0\n )\n ) {\n return MultiWalletInstruction.MigrateCompressedUsers;\n }\n if (\n containsBytes(\n data,\n fixEncoderSize(getBytesEncoder(), 1).encode(new Uint8Array([29])),\n 0\n )\n ) {\n return MultiWalletInstruction.NativeTransferIntent;\n }\n if (\n containsBytes(\n data,\n fixEncoderSize(getBytesEncoder(), 1).encode(new Uint8Array([27])),\n 0\n )\n ) {\n return MultiWalletInstruction.NativeTransferIntentCompressed;\n }\n if (\n containsBytes(\n data,\n fixEncoderSize(getBytesEncoder(), 1).encode(new Uint8Array([30])),\n 0\n )\n ) {\n return MultiWalletInstruction.TokenTransferIntent;\n }\n if (\n containsBytes(\n data,\n fixEncoderSize(getBytesEncoder(), 1).encode(new Uint8Array([28])),\n 0\n )\n ) {\n return MultiWalletInstruction.TokenTransferIntentCompressed;\n }\n if (\n containsBytes(\n data,\n fixEncoderSize(getBytesEncoder(), 1).encode(new Uint8Array([12])),\n 0\n )\n ) {\n return MultiWalletInstruction.TransactionBufferClose;\n }\n if (\n containsBytes(\n data,\n fixEncoderSize(getBytesEncoder(), 1).encode(new Uint8Array([23])),\n 0\n )\n ) {\n return MultiWalletInstruction.TransactionBufferCloseCompressed;\n }\n if (\n containsBytes(\n data,\n fixEncoderSize(getBytesEncoder(), 1).encode(new Uint8Array([9])),\n 0\n )\n ) {\n return MultiWalletInstruction.TransactionBufferCreate;\n }\n if (\n containsBytes(\n data,\n fixEncoderSize(getBytesEncoder(), 1).encode(new Uint8Array([20])),\n 0\n )\n ) {\n return MultiWalletInstruction.TransactionBufferCreateCompressed;\n }\n if (\n containsBytes(\n data,\n fixEncoderSize(getBytesEncoder(), 1).encode(new Uint8Array([13])),\n 0\n )\n ) {\n return MultiWalletInstruction.TransactionBufferExecute;\n }\n if (\n containsBytes(\n data,\n fixEncoderSize(getBytesEncoder(), 1).encode(new Uint8Array([24])),\n 0\n )\n ) {\n return MultiWalletInstruction.TransactionBufferExecuteCompressed;\n }\n if (\n containsBytes(\n data,\n fixEncoderSize(getBytesEncoder(), 1).encode(new Uint8Array([11])),\n 0\n )\n ) {\n return MultiWalletInstruction.TransactionBufferExtend;\n }\n if (\n containsBytes(\n data,\n fixEncoderSize(getBytesEncoder(), 1).encode(new Uint8Array([22])),\n 0\n )\n ) {\n return MultiWalletInstruction.TransactionBufferExtendCompressed;\n }\n if (\n containsBytes(\n data,\n fixEncoderSize(getBytesEncoder(), 1).encode(new Uint8Array([10])),\n 0\n )\n ) {\n return MultiWalletInstruction.TransactionBufferVote;\n }\n if (\n containsBytes(\n data,\n fixEncoderSize(getBytesEncoder(), 1).encode(new Uint8Array([21])),\n 0\n )\n ) {\n return MultiWalletInstruction.TransactionBufferVoteCompressed;\n }\n if (\n containsBytes(\n data,\n fixEncoderSize(getBytesEncoder(), 1).encode(new Uint8Array([14])),\n 0\n )\n ) {\n return MultiWalletInstruction.TransactionExecute;\n }\n if (\n containsBytes(\n data,\n fixEncoderSize(getBytesEncoder(), 1).encode(new Uint8Array([25])),\n 0\n )\n ) {\n return MultiWalletInstruction.TransactionExecuteCompressed;\n }\n if (\n containsBytes(\n data,\n fixEncoderSize(getBytesEncoder(), 1).encode(new Uint8Array([15])),\n 0\n )\n ) {\n return MultiWalletInstruction.TransactionExecuteSync;\n }\n if (\n containsBytes(\n data,\n fixEncoderSize(getBytesEncoder(), 1).encode(new Uint8Array([26])),\n 0\n )\n ) {\n return MultiWalletInstruction.TransactionExecuteSyncCompressed;\n }\n throw new Error(\n \"The provided instruction could not be identified as a multiWallet instruction.\"\n );\n}\n\nexport type ParsedMultiWalletInstruction<\n TProgram extends string = \"reviR1xysEChySVSWGa43a6oJ2boJYTJhwRjo8KJhhT\",\n> =\n | ({\n instructionType: MultiWalletInstruction.ChangeConfig;\n } & ParsedChangeConfigInstruction<TProgram>)\n | ({\n instructionType: MultiWalletInstruction.ChangeConfigCompressed;\n } & ParsedChangeConfigCompressedInstruction<TProgram>)\n | ({\n instructionType: MultiWalletInstruction.CompressSettingsAccount;\n } & ParsedCompressSettingsAccountInstruction<TProgram>)\n | ({\n instructionType: MultiWalletInstruction.CreateDomainConfig;\n } & ParsedCreateDomainConfigInstruction<TProgram>)\n | ({\n instructionType: MultiWalletInstruction.CreateDomainUserAccount;\n } & ParsedCreateDomainUserAccountInstruction<TProgram>)\n | ({\n instructionType: MultiWalletInstruction.CreateGlobalCounter;\n } & ParsedCreateGlobalCounterInstruction<TProgram>)\n | ({\n instructionType: MultiWalletInstruction.CreateMultiWallet;\n } & ParsedCreateMultiWalletInstruction<TProgram>)\n | ({\n instructionType: MultiWalletInstruction.CreateMultiWalletCompressed;\n } & ParsedCreateMultiWalletCompressedInstruction<TProgram>)\n | ({\n instructionType: MultiWalletInstruction.CreateUserAccounts;\n } & ParsedCreateUserAccountsInstruction<TProgram>)\n | ({\n instructionType: MultiWalletInstruction.DecompressSettingsAccount;\n } & ParsedDecompressSettingsAccountInstruction<TProgram>)\n | ({\n instructionType: MultiWalletInstruction.DisableDomainConfig;\n } & ParsedDisableDomainConfigInstruction<TProgram>)\n | ({\n instructionType: MultiWalletInstruction.EditDomainConfig;\n } & ParsedEditDomainConfigInstruction<TProgram>)\n | ({\n instructionType: MultiWalletInstruction.EditTransactionManagerUrl;\n } & ParsedEditTransactionManagerUrlInstruction<TProgram>)\n | ({\n instructionType: MultiWalletInstruction.MigrateCompressedSettings;\n } & ParsedMigrateCompressedSettingsInstruction<TProgram>)\n | ({\n instructionType: MultiWalletInstruction.MigrateCompressedUsers;\n } & ParsedMigrateCompressedUsersInstruction<TProgram>)\n | ({\n instructionType: MultiWalletInstruction.NativeTransferIntent;\n } & ParsedNativeTransferIntentInstruction<TProgram>)\n | ({\n instructionType: MultiWalletInstruction.NativeTransferIntentCompressed;\n } & ParsedNativeTransferIntentCompressedInstruction<TProgram>)\n | ({\n instructionType: MultiWalletInstruction.TokenTransferIntent;\n } & ParsedTokenTransferIntentInstruction<TProgram>)\n | ({\n instructionType: MultiWalletInstruction.TokenTransferIntentCompressed;\n } & ParsedTokenTransferIntentCompressedInstruction<TProgram>)\n | ({\n instructionType: MultiWalletInstruction.TransactionBufferClose;\n } & ParsedTransactionBufferCloseInstruction<TProgram>)\n | ({\n instructionType: MultiWalletInstruction.TransactionBufferCloseCompressed;\n } & ParsedTransactionBufferCloseCompressedInstruction<TProgram>)\n | ({\n instructionType: MultiWalletInstruction.TransactionBufferCreate;\n } & ParsedTransactionBufferCreateInstruction<TProgram>)\n | ({\n instructionType: MultiWalletInstruction.TransactionBufferCreateCompressed;\n } & ParsedTransactionBufferCreateCompressedInstruction<TProgram>)\n | ({\n instructionType: MultiWalletInstruction.TransactionBufferExecute;\n } & ParsedTransactionBufferExecuteInstruction<TProgram>)\n | ({\n instructionType: MultiWalletInstruction.TransactionBufferExecuteCompressed;\n } & ParsedTransactionBufferExecuteCompressedInstruction<TProgram>)\n | ({\n instructionType: MultiWalletInstruction.TransactionBufferExtend;\n } & ParsedTransactionBufferExtendInstruction<TProgram>)\n | ({\n instructionType: MultiWalletInstruction.TransactionBufferExtendCompressed;\n } & ParsedTransactionBufferExtendCompressedInstruction<TProgram>)\n | ({\n instructionType: MultiWalletInstruction.TransactionBufferVote;\n } & ParsedTransactionBufferVoteInstruction<TProgram>)\n | ({\n instructionType: MultiWalletInstruction.TransactionBufferVoteCompressed;\n } & ParsedTransactionBufferVoteCompressedInstruction<TProgram>)\n | ({\n instructionType: MultiWalletInstruction.TransactionExecute;\n } & ParsedTransactionExecuteInstruction<TProgram>)\n | ({\n instructionType: MultiWalletInstruction.TransactionExecuteCompressed;\n } & ParsedTransactionExecuteCompressedInstruction<TProgram>)\n | ({\n instructionType: MultiWalletInstruction.TransactionExecuteSync;\n } & ParsedTransactionExecuteSyncInstruction<TProgram>)\n | ({\n instructionType: MultiWalletInstruction.TransactionExecuteSyncCompressed;\n } & ParsedTransactionExecuteSyncCompressedInstruction<TProgram>);\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 \"gill\";\nimport { MULTI_WALLET_PROGRAM_ADDRESS } from \"../programs\";\n\n/** InvalidSignedMessage: Invalid signature: the provided signature does not match the expected message payload. */\nexport const MULTI_WALLET_ERROR__INVALID_SIGNED_MESSAGE = 0x1770; // 6000\n/** InvalidSecp256r1VerifyArg: Malformed or missing WebAuthn verification parameters. Please provide valid secp256r1 signature arguments. */\nexport const MULTI_WALLET_ERROR__INVALID_SECP256R1_VERIFY_ARG = 0x1771; // 6001\n/** DurableNonceDetected: Durable nonce detected: this program does not support transactions using a durable nonce. */\nexport const MULTI_WALLET_ERROR__DURABLE_NONCE_DETECTED = 0x1772; // 6002\n/** DuplicateMember: Duplicate public keys detected among members. Each member must have a unique key. */\nexport const MULTI_WALLET_ERROR__DUPLICATE_MEMBER = 0x1773; // 6003\n/** PermanentMember: Permanent members cannot be removed from a wallet. */\nexport const MULTI_WALLET_ERROR__PERMANENT_MEMBER = 0x1774; // 6004\n/** PermanentMemberNotAllowed: This operation cannot assign a permanent member. */\nexport const MULTI_WALLET_ERROR__PERMANENT_MEMBER_NOT_ALLOWED = 0x1775; // 6005\n/** OnlyOnePermanentMemberAllowed: Only one permanent member is allowed per wallet. */\nexport const MULTI_WALLET_ERROR__ONLY_ONE_PERMANENT_MEMBER_ALLOWED = 0x1776; // 6006\n/** OnlyOneTransactionManagerAllowed: Only one transaction manager is allowed per wallet. */\nexport const MULTI_WALLET_ERROR__ONLY_ONE_TRANSACTION_MANAGER_ALLOWED = 0x1777; // 6007\n/** TransactionManagerNotAllowed: This operation cannot assign a transaction manager. */\nexport const MULTI_WALLET_ERROR__TRANSACTION_MANAGER_NOT_ALLOWED = 0x1778; // 6008\n/** EmptyMembers: No members provided. A multisig wallet must contain at least one member. */\nexport const MULTI_WALLET_ERROR__EMPTY_MEMBERS = 0x1779; // 6009\n/** TooManyMembers: Too many members: a maximum of 4 members are supported. */\nexport const MULTI_WALLET_ERROR__TOO_MANY_MEMBERS = 0x177a; // 6010\n/** InvalidThreshold: Invalid threshold: must be at least 1 and cannot exceed the number of voting-eligible members. */\nexport const MULTI_WALLET_ERROR__INVALID_THRESHOLD = 0x177b; // 6011\n/** InvalidTransactionMessage: Malformed transaction message: structure or formatting does not match the expected layout. */\nexport const MULTI_WALLET_ERROR__INVALID_TRANSACTION_MESSAGE = 0x177c; // 6012\n/** InvalidNumberOfAccounts: Unexpected number of accounts provided for this instruction. */\nexport const MULTI_WALLET_ERROR__INVALID_NUMBER_OF_ACCOUNTS = 0x177d; // 6013\n/** InvalidAccount: One or more provided accounts failed validation. Verify that all required accounts are included and correct. */\nexport const MULTI_WALLET_ERROR__INVALID_ACCOUNT = 0x177e; // 6014\n/** InvalidArguments: Invalid or missing instruction arguments. Ensure all required arguments are correctly provided. */\nexport const MULTI_WALLET_ERROR__INVALID_ARGUMENTS = 0x177f; // 6015\n/** MissingAccount: A required account is missing from the instruction context. */\nexport const MULTI_WALLET_ERROR__MISSING_ACCOUNT = 0x1780; // 6016\n/** MissingUserArgs: User mutation arguments are required when performing add or remove delegate operations. */\nexport const MULTI_WALLET_ERROR__MISSING_USER_ARGS = 0x1781; // 6017\n/** AlreadyDelegated: This member is already delegated to another wallet. */\nexport const MULTI_WALLET_ERROR__ALREADY_DELEGATED = 0x1782; // 6018\n/** InsufficientSignerWithExecutePermission: At least one signer with execute permission is required to proceed. */\nexport const MULTI_WALLET_ERROR__INSUFFICIENT_SIGNER_WITH_EXECUTE_PERMISSION = 0x1783; // 6019\n/** InsufficientSignerWithInitiatePermission: At least one signer with initiate permission is required to perform this action. */\nexport const MULTI_WALLET_ERROR__INSUFFICIENT_SIGNER_WITH_INITIATE_PERMISSION = 0x1784; // 6020\n/** InsufficientSignersWithVotePermission: Not enough members with vote permission to meet the approval threshold. */\nexport const MULTI_WALLET_ERROR__INSUFFICIENT_SIGNERS_WITH_VOTE_PERMISSION = 0x1785; // 6021\n/** NoSignerFound: No valid signer found in this transaction. */\nexport const MULTI_WALLET_ERROR__NO_SIGNER_FOUND = 0x1786; // 6022\n/** UnauthorisedToCloseTransactionBuffer: Only the transaction creator or rent payer may close this transaction buffer. */\nexport const MULTI_WALLET_ERROR__UNAUTHORISED_TO_CLOSE_TRANSACTION_BUFFER = 0x1787; // 6023\n/** InvalidBuffer: Buffer validation failed: contents do not match the expected hash (possible tampering detected). */\nexport const MULTI_WALLET_ERROR__INVALID_BUFFER = 0x1788; // 6024\n/** FinalBufferHashMismatch: Final buffer hash mismatch: the serialized data may be corrupted or altered. */\nexport const MULTI_WALLET_ERROR__FINAL_BUFFER_HASH_MISMATCH = 0x1789; // 6025\n/** FinalBufferSizeExceeded: The serialized transaction buffer exceeds the maximum size of 10,128 bytes. */\nexport const MULTI_WALLET_ERROR__FINAL_BUFFER_SIZE_EXCEEDED = 0x178a; // 6026\n/** FinalBufferSizeMismatch: Declared buffer size does not match the actual serialized size. */\nexport const MULTI_WALLET_ERROR__FINAL_BUFFER_SIZE_MISMATCH = 0x178b; // 6027\n/** TransactionHasExpired: This transaction has expired. It must be executed within 3 minutes of approval. */\nexport const MULTI_WALLET_ERROR__TRANSACTION_HAS_EXPIRED = 0x178c; // 6028\n/** TransactionNotApproved: This transaction has not yet reached the required approval threshold. */\nexport const MULTI_WALLET_ERROR__TRANSACTION_NOT_APPROVED = 0x178d; // 6029\n/** ProtectedAccount: Writable CPI calls to protected accounts are not permitted. */\nexport const MULTI_WALLET_ERROR__PROTECTED_ACCOUNT = 0x178e; // 6030\n/** MaxLengthExceeded: An input string exceeds the maximum allowed character length. */\nexport const MULTI_WALLET_ERROR__MAX_LENGTH_EXCEEDED = 0x178f; // 6031\n/** MissingSysvarSlotHistory: Missing required sysvar: Slot History must be included as an account in this instruction. */\nexport const MULTI_WALLET_ERROR__MISSING_SYSVAR_SLOT_HISTORY = 0x1790; // 6032\n/** InvalidSysvarDataFormat: Failed to parse the Slot History sysvar: data format is invalid or corrupted. */\nexport const MULTI_WALLET_ERROR__INVALID_SYSVAR_DATA_FORMAT = 0x1791; // 6033\n/** SlotNumberNotFound: The specified slot number was not found in the provided slot history. */\nexport const MULTI_WALLET_ERROR__SLOT_NUMBER_NOT_FOUND = 0x1792; // 6034\n/** DomainConfigIsDisabled: The domain configuration account is disabled. Please contact support or try again later. */\nexport const MULTI_WALLET_ERROR__DOMAIN_CONFIG_IS_DISABLED = 0x1793; // 6035\n/** DomainConfigIsMissing: Missing domain configuration account. Include it as a required account in this instruction. */\nexport const MULTI_WALLET_ERROR__DOMAIN_CONFIG_IS_MISSING = 0x1794; // 6036\n/** MemberDoesNotBelongToDomainConfig: This member is not registered under the provided domain configuration. */\nexport const MULTI_WALLET_ERROR__MEMBER_DOES_NOT_BELONG_TO_DOMAIN_CONFIG = 0x1795; // 6037\n/** RpIdHashMismatch: The relying party ID hash does not match the one defined in the domain configuration. */\nexport const MULTI_WALLET_ERROR__RP_ID_HASH_MISMATCH = 0x1796; // 6038\n/** OriginIndexOutOfBounds: The given origin index is not in the whitelisted origins. */\nexport const MULTI_WALLET_ERROR__ORIGIN_INDEX_OUT_OF_BOUNDS = 0x1797; // 6039\n\nexport type MultiWalletError =\n | typeof MULTI_WALLET_ERROR__ALREADY_DELEGATED\n | typeof MULTI_WALLET_ERROR__DOMAIN_CONFIG_IS_DISABLED\n | typeof MULTI_WALLET_ERROR__DOMAIN_CONFIG_IS_MISSING\n | typeof MULTI_WALLET_ERROR__DUPLICATE_MEMBER\n | typeof MULTI_WALLET_ERROR__DURABLE_NONCE_DETECTED\n | typeof MULTI_WALLET_ERROR__EMPTY_MEMBERS\n | typeof MULTI_WALLET_ERROR__FINAL_BUFFER_HASH_MISMATCH\n | typeof MULTI_WALLET_ERROR__FINAL_BUFFER_SIZE_EXCEEDED\n | typeof MULTI_WALLET_ERROR__FINAL_BUFFER_SIZE_MISMATCH\n | typeof MULTI_WALLET_ERROR__INSUFFICIENT_SIGNERS_WITH_VOTE_PERMISSION\n | typeof MULTI_WALLET_ERROR__INSUFFICIENT_SIGNER_WITH_EXECUTE_PERMISSION\n | typeof MULTI_WALLET_ERROR__INSUFFICIENT_SIGNER_WITH_INITIATE_PERMISSION\n | typeof MULTI_WALLET_ERROR__INVALID_ACCOUNT\n | typeof MULTI_WALLET_ERROR__INVALID_ARGUMENTS\n | typeof MULTI_WALLET_ERROR__INVALID_BUFFER\n | typeof MULTI_WALLET_ERROR__INVALID_NUMBER_OF_ACCOUNTS\n | typeof MULTI_WALLET_ERROR__INVALID_SECP256R1_VERIFY_ARG\n | typeof MULTI_WALLET_ERROR__INVALID_SIGNED_MESSAGE\n | typeof MULTI_WALLET_ERROR__INVALID_SYSVAR_DATA_FORMAT\n | typeof MULTI_WALLET_ERROR__INVALID_THRESHOLD\n | typeof MULTI_WALLET_ERROR__INVALID_TRANSACTION_MESSAGE\n | typeof MULTI_WALLET_ERROR__MAX_LENGTH_EXCEEDED\n | typeof MULTI_WALLET_ERROR__MEMBER_DOES_NOT_BELONG_TO_DOMAIN_CONFIG\n | typeof MULTI_WALLET_ERROR__MISSING_ACCOUNT\n | typeof MULTI_WALLET_ERROR__MISSING_SYSVAR_SLOT_HISTORY\n | typeof MULTI_WALLET_ERROR__MISSING_USER_ARGS\n | typeof MULTI_WALLET_ERROR__NO_SIGNER_FOUND\n | typeof MULTI_WALLET_ERROR__ONLY_ONE_PERMANENT_MEMBER_ALLOWED\n | typeof MULTI_WALLET_ERROR__ONLY_ONE_TRANSACTION_MANAGER_ALLOWED\n | typeof MULTI_WALLET_ERROR__ORIGIN_INDEX_OUT_OF_BOUNDS\n | typeof MULTI_WALLET_ERROR__PERMANENT_MEMBER\n | typeof MULTI_WALLET_ERROR__PERMANENT_MEMBER_NOT_ALLOWED\n | typeof MULTI_WALLET_ERROR__PROTECTED_ACCOUNT\n | typeof MULTI_WALLET_ERROR__RP_ID_HASH_MISMATCH\n | typeof MULTI_WALLET_ERROR__SLOT_NUMBER_NOT_FOUND\n | typeof MULTI_WALLET_ERROR__TOO_MANY_MEMBERS\n | typeof MULTI_WALLET_ERROR__TRANSACTION_HAS_EXPIRED\n | typeof MULTI_WALLET_ERROR__TRANSACTION_MANAGER_NOT_ALLOWED\n | typeof MULTI_WALLET_ERROR__TRANSACTION_NOT_APPROVED\n | typeof MULTI_WALLET_ERROR__UNAUTHORISED_TO_CLOSE_TRANSACTION_BUFFER;\n\nlet multiWalletErrorMessages: Record<MultiWalletError, string> | undefined;\nif (process.env.NODE_ENV !== \"production\") {\n multiWalletErrorMessages = {\n [MULTI_WALLET_ERROR__ALREADY_DELEGATED]: `This member is already delegated to another wallet.`,\n [MULTI_WALLET_ERROR__DOMAIN_CONFIG_IS_DISABLED]: `The domain configuration account is disabled. Please contact support or try again later.`,\n [MULTI_WALLET_ERROR__DOMAIN_CONFIG_IS_MISSING]: `Missing domain configuration account. Include it as a required account in this instruction.`,\n [MULTI_WALLET_ERROR__DUPLICATE_MEMBER]: `Duplicate public keys detected among members. Each member must have a unique key.`,\n [MULTI_WALLET_ERROR__DURABLE_NONCE_DETECTED]: `Durable nonce detected: this program does not support transactions using a durable nonce.`,\n [MULTI_WALLET_ERROR__EMPTY_MEMBERS]: `No members provided. A multisig wallet must contain at least one member.`,\n [MULTI_WALLET_ERROR__FINAL_BUFFER_HASH_MISMATCH]: `Final buffer hash mismatch: the serialized data may be corrupted or altered.`,\n [MULTI_WALLET_ERROR__FINAL_BUFFER_SIZE_EXCEEDED]: `The serialized transaction buffer exceeds the maximum size of 10,128 bytes.`,\n [MULTI_WALLET_ERROR__FINAL_BUFFER_SIZE_MISMATCH]: `Declared buffer size does not match the actual serialized size.`,\n [MULTI_WALLET_ERROR__INSUFFICIENT_SIGNERS_WITH_VOTE_PERMISSION]: `Not enough members with vote permission to meet the approval threshold.`,\n [MULTI_WALLET_ERROR__INSUFFICIENT_SIGNER_WITH_EXECUTE_PERMISSION]: `At least one signer with execute permission is required to proceed.`,\n [MULTI_WALLET_ERROR__INSUFFICIENT_SIGNER_WITH_INITIATE_PERMISSION]: `At least one signer with initiate permission is required to perform this action.`,\n [MULTI_WALLET_ERROR__INVALID_ACCOUNT]: `One or more provided accounts failed validation. Verify that all required accounts are included and correct.`,\n [MULTI_WALLET_ERROR__INVALID_ARGUMENTS]: `Invalid or missing instruction arguments. Ensure all required arguments are correctly provided.`,\n [MULTI_WALLET_ERROR__INVALID_BUFFER]: `Buffer validation failed: contents do not match the expected hash (possible tampering detected).`,\n [MULTI_WALLET_ERROR__INVALID_NUMBER_OF_ACCOUNTS]: `Unexpected number of accounts provided for this instruction.`,\n [MULTI_WALLET_ERROR__INVALID_SECP256R1_VERIFY_ARG]: `Malformed or missing WebAuthn verification parameters. Please provide valid secp256r1 signature arguments.`,\n [MULTI_WALLET_ERROR__INVALID_SIGNED_MESSAGE]: `Invalid signature: the provided signature does not match the expected message payload.`,\n [MULTI_WALLET_ERROR__INVALID_SYSVAR_DATA_FORMAT]: `Failed to parse the Slot History sysvar: data format is invalid or corrupted.`,\n [MULTI_WALLET_ERROR__INVALID_THRESHOLD]: `Invalid threshold: must be at least 1 and cannot exceed the number of voting-eligible members.`,\n [MULTI_WALLET_ERROR__INVALID_TRANSACTION_MESSAGE]: `Malformed transaction message: structure or formatting does not match the expected layout.`,\n [MULTI_WALLET_ERROR__MAX_LENGTH_EXCEEDED]: `An input string exceeds the maximum allowed character length.`,\n [MULTI_WALLET_ERROR__MEMBER_DOES_NOT_BELONG_TO_DOMAIN_CONFIG]: `This member is not registered under the provided domain configuration.`,\n [MULTI_WALLET_ERROR__MISSING_ACCOUNT]: `A required account is missing from the instruction context.`,\n [MULTI_WALLET_ERROR__MISSING_SYSVAR_SLOT_HISTORY]: `Missing required sysvar: Slot History must be included as an account in this instruction.`,\n [MULTI_WALLET_ERROR__MISSING_USER_ARGS]: `User mutation arguments are required when performing add or remove delegate operations.`,\n [MULTI_WALLET_ERROR__NO_SIGNER_FOUND]: `No valid signer found in this transaction.`,\n [MULTI_WALLET_ERROR__ONLY_ONE_PERMANENT_MEMBER_ALLOWED]: `Only one permanent member is allowed per wallet.`,\n [MULTI_WALLET_ERROR__ONLY_ONE_TRANSACTION_MANAGER_ALLOWED]: `Only one transaction manager is allowed per wallet.`,\n [MULTI_WALLET_ERROR__ORIGIN_INDEX_OUT_OF_BOUNDS]: `The given origin index is not in the whitelisted origins.`,\n [MULTI_WALLET_ERROR__PERMANENT_MEMBER]: `Permanent members cannot be removed from a wallet.`,\n [MULTI_WALLET_ERROR__PERMANENT_MEMBER_NOT_ALLOWED]: `This operation cannot assign a permanent member.`,\n [MULTI_WALLET_ERROR__PROTECTED_ACCOUNT]: `Writable CPI calls to protected accounts are not permitted.`,\n [MULTI_WALLET_ERROR__RP_ID_HASH_MISMATCH]: `The relying party ID hash does not match the one defined in the domain configuration.`,\n [MULTI_WALLET_ERROR__SLOT_NUMBER_NOT_FOUND]: `The specified slot number was not found in the provided slot history.`,\n [MULTI_WALLET_ERROR__TOO_MANY_MEMBERS]: `Too many members: a maximum of 4 members are supported.`,\n [MULTI_WALLET_ERROR__TRANSACTION_HAS_EXPIRED]: `This transaction has expired. It must be executed within 3 minutes of approval.`,\n [MULTI_WALLET_ERROR__TRANSACTION_MANAGER_NOT_ALLOWED]: `This operation cannot assign a transaction manager.`,\n [MULTI_WALLET_ERROR__TRANSACTION_NOT_APPROVED]: `This transaction has not yet reached the required approval threshold.`,\n [MULTI_WALLET_ERROR__UNAUTHORISED_TO_CLOSE_TRANSACTION_BUFFER]: `Only the transaction creator or rent payer may close this transaction buffer.`,\n };\n}\n\nexport function getMultiWalletErrorMessage(code: MultiWalletError): string {\n if (process.env.NODE_ENV !== \"production\") {\n return (multiWalletErrorMessages as Record<MultiWalletError, string>)[code];\n }\n\n return \"Error message not available in production bundles.\";\n}\n\nexport function isMultiWalletError<TProgramErrorCode extends MultiWalletError>(\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 MULTI_WALLET_PROGRAM_ADDRESS,\n code\n );\n}\n","export type IKeyType = {\n keyType: number;\n};\n\nexport const KeyType = {\n Ed25519: 1 << 0,\n Secp256r1: 1 << 1,\n} as const;\n\nexport type KeyType = (typeof KeyType)[keyof typeof KeyType];\n","import type { IPermissions } from \"../generated\";\n\nexport const Permission = {\n InitiateTransaction: 1 << 0,\n VoteTransaction: 1 << 1,\n ExecuteTransaction: 1 << 2,\n} as const;\n\nexport const PermanentMemberPermission: IPermission = 1 << 3;\n\nexport const TransactionManagerPermission: IPermission = 1 << 4;\n\nexport type IPermission = (typeof Permission)[keyof typeof Permission];\n\nexport class Permissions implements IPermissions {\n private constructor(readonly mask: number) {}\n\n static fromPermissions(permissions: IPermission[]) {\n return new Permissions(\n permissions.reduce((mask, permission) => mask | permission, 0)\n );\n }\n\n static all() {\n return new Permissions(\n Object.values(Permission).reduce(\n (mask, permission) => mask | permission,\n 0\n )\n );\n }\n\n static has(permissions: IPermissions, permission: IPermission) {\n return (permissions.mask & permission) === permission;\n }\n}\n","import { getBase58Decoder, getBase58Encoder, type Address } from \"gill\";\n\nconst SECP256R1_PUBLIC_KEY_LENGTH = 33;\ntype Secp256r1KeyInitData = string | Uint8Array | Array<number>;\ntype SignedMessageDetails = {\n verifyArgs: {\n clientDataJson: Uint8Array;\n truncatedClientDataJson: Uint8Array;\n slotNumber: bigint;\n slotHash: Uint8Array;\n };\n domainConfig: Address;\n authData: Uint8Array;\n signature: Uint8Array;\n originIndex: number;\n crossOrigin: boolean;\n};\n\nexport class Secp256r1Key {\n protected _bn: Uint8Array | undefined;\n\n constructor(value: Secp256r1KeyInitData) {\n if (typeof value === \"string\") {\n this._bn = new Uint8Array(getBase58Encoder().encode(value));\n } else {\n this._bn = new Uint8Array(value);\n }\n this.validateKeyLength(this._bn);\n }\n\n protected validateKeyLength(key: Uint8Array | Array<number>) {\n if (key.length !== SECP256R1_PUBLIC_KEY_LENGTH) {\n throw new Error(\n `Invalid public key length, expected ${SECP256R1_PUBLIC_KEY_LENGTH} bytes but got ${key.length}`\n );\n }\n }\n\n toBase58() {\n return getBase58Decoder().decode(this.toBytes());\n }\n\n toTruncatedBuffer() {\n const buf = this.toBuffer();\n return buf.subarray(1, buf.length);\n }\n\n toBuffer() {\n if (!this._bn) {\n throw new Error(`Invalid public key input`);\n }\n const buf = this._bn;\n if (buf.byteLength === SECP256R1_PUBLIC_KEY_LENGTH) {\n return buf;\n } else {\n throw new Error(`Invalid public key input`);\n }\n }\n\n toBytes() {\n const buf = this.toBuffer();\n return new Uint8Array(buf.buffer, buf.byteOffset, buf.byteLength);\n }\n\n toString() {\n return this.toBase58();\n }\n\n toJSON() {\n return this.toBase58();\n }\n}\n\nexport class SignedSecp256r1Key extends Secp256r1Key {\n verifyArgs: SignedMessageDetails[\"verifyArgs\"];\n domainConfig: SignedMessageDetails[\"domainConfig\"];\n authData: SignedMessageDetails[\"authData\"];\n signature: SignedMessageDetails[\"signature\"];\n originIndex: SignedMessageDetails[\"originIndex\"];\n crossOrigin: SignedMessageDetails[\"crossOrigin\"];\n\n constructor(value: Secp256r1KeyInitData, signed: SignedMessageDetails) {\n super(value);\n this.verifyArgs = signed.verifyArgs;\n this.domainConfig = signed.domainConfig;\n this.authData = signed.authData;\n this.signature = signed.signature;\n this.originIndex = signed.originIndex;\n this.crossOrigin = signed.crossOrigin;\n }\n}\n","import {\n type CompiledTransactionMessage,\n getAddressCodec,\n getArrayCodec,\n getStructCodec,\n getU8Codec,\n type ReadonlyUint8Array,\n} from \"gill\";\nimport { MULTI_WALLET_PROGRAM_ADDRESS } from \"../generated\";\n\nfunction getCompiledInstructionCodec() {\n return getStructCodec([\n [\"programAddressIndex\", getU8Codec()],\n [\"accountIndices\", getArrayCodec(getU8Codec())],\n [\"data\", getArrayCodec(getU8Codec())],\n ]);\n}\n\nfunction getMessageAddressTableLookupCodec() {\n return getStructCodec([\n [\"lookupTableAddress\", getAddressCodec()],\n [\"writableIndexes\", getArrayCodec(getU8Codec())],\n [\"readonlyIndexes\", getArrayCodec(getU8Codec())],\n ]);\n}\n\nconst vaultTransactionMessageCodec = getStructCodec([\n [\"numSigners\", getU8Codec()],\n [\"numWritableSigners\", getU8Codec()],\n [\"numWritableNonSigners\", getU8Codec()],\n [\"accountKeys\", getArrayCodec(getAddressCodec())],\n [\"instructions\", getArrayCodec(getCompiledInstructionCodec())],\n [\"addressTableLookups\", getArrayCodec(getMessageAddressTableLookupCodec())],\n]);\n\nexport function vaultTransactionMessageSerialize(\n compiledMessage: CompiledTransactionMessage\n) {\n const transactionMessageBytes = vaultTransactionMessageCodec.encode({\n numSigners: compiledMessage.header.numSignerAccounts,\n numWritableSigners:\n compiledMessage.header.numSignerAccounts -\n compiledMessage.header.numReadonlySignerAccounts,\n numWritableNonSigners:\n compiledMessage.staticAccounts.length -\n compiledMessage.header.numSignerAccounts -\n compiledMessage.header.numReadonlyNonSignerAccounts,\n accountKeys: compiledMessage.staticAccounts,\n instructions: compiledMessage.instructions.map((ix) => {\n return {\n programAddressIndex: ix.programAddressIndex,\n accountIndices: ix.accountIndices ?? [],\n data: Array.from(ix.data ?? []),\n };\n }),\n addressTableLookups:\n compiledMessage.version !== \"legacy\"\n ? (compiledMessage.addressTableLookups?.map((x) => ({\n lookupTableAddress: x.lookupTableAddress,\n readonlyIndexes: x.readonlyIndexes as number[],\n writableIndexes: x.writableIndexes as number[],\n })) ?? [])\n : [],\n });\n\n return transactionMessageBytes;\n}\n\nexport function vaultTransactionMessageDeserialize(\n transactionMessageBytes: ReadonlyUint8Array\n): CompiledTransactionMessage {\n const vaultTransactionMessage = vaultTransactionMessageCodec.decode(\n transactionMessageBytes\n );\n return {\n header: {\n numSignerAccounts: vaultTransactionMessage.numSigners,\n numReadonlySignerAccounts:\n vaultTransactionMessage.numSigners -\n vaultTransactionMessage.numWritableSigners,\n numReadonlyNonSignerAccounts:\n vaultTransactionMessage.accountKeys.length -\n vaultTransactionMessage.numSigners -\n vaultTransactionMessage.numWritableNonSigners,\n },\n addressTableLookups: vaultTransactionMessage.addressTableLookups.map(\n (x) => ({\n lookupTableAddress: x.lookupTableAddress,\n readonlyIndexes: x.readonlyIndexes.map(Number),\n writableIndexes: x.writableIndexes.map(Number),\n readableIndices: x.readonlyIndexes.map(Number),\n writableIndices: x.writableIndexes.map(Number),\n })\n ),\n instructions: vaultTransactionMessage.instructions.map((x) => ({\n accountIndices: x.accountIndices.map(Number),\n data: new Uint8Array(x.data),\n programAddressIndex: x.programAddressIndex,\n })),\n lifetimeToken: MULTI_WALLET_PROGRAM_ADDRESS,\n staticAccounts: vaultTransactionMessage.accountKeys,\n version: 0,\n };\n}\n","import { featureFlags, VERSION } from \"@lightprotocol/stateless.js\";\n\nfeatureFlags.version = VERSION.V2;\nexport const ADDRESS_TREE_VERSION = \"v2\";\n\nexport const REVIBASE_RP_ID = \"revibase.com\";\n/**\n * Can be overriden during initialization\n */\nexport const REVIBASE_AUTH_ENDPOINT = \"https://auth.revibase.com\";\n\n/**\n * Can be overriden during initialization\n */\nexport const REVIBASE_API_ENDPOINT = \"https://api.revibase.com\";\n","import {\n batchAddressTree,\n createBN254,\n deriveAddressSeedV2,\n deriveAddressV2,\n} from \"@lightprotocol/stateless.js\";\nimport { sha256 } from \"@noble/hashes/sha256\";\nimport { PublicKey } from \"@solana/web3.js\";\nimport {\n getAddressEncoder,\n getProgramDerivedAddress,\n getU128Encoder,\n getU8Encoder,\n getUtf8Encoder,\n type Address,\n} from \"gill\";\nimport { MULTI_WALLET_PROGRAM_ADDRESS } from \"../../generated\";\nimport { Secp256r1Key } from \"../../types\";\nimport { ADDRESS_TREE_VERSION } from \"../consts\";\n\nexport function getCompressedSettingsAddressFromIndex(index: number | bigint) {\n const addressSeed = deriveAddressSeedV2([\n new Uint8Array(getUtf8Encoder().encode(\"multi_wallet\")),\n new Uint8Array(getU128Encoder().encode(index)),\n new Uint8Array(getUtf8Encoder().encode(ADDRESS_TREE_VERSION)),\n ]);\n const addressTree = new PublicKey(batchAddressTree); //default v2 public tree\n return {\n address: createBN254(\n deriveAddressV2(\n addressSeed,\n addressTree,\n new PublicKey(MULTI_WALLET_PROGRAM_ADDRESS)\n ).toString(),\n \"base58\"\n ),\n addressTree,\n };\n}\nexport function getUserAccountAddress(member: Address | Secp256r1Key) {\n const addressSeed = deriveAddressSeedV2([\n new Uint8Array(getUtf8Encoder().encode(\"user\")),\n member instanceof Secp256r1Key\n ? member.toTruncatedBuffer()\n : new Uint8Array(getAddressEncoder().encode(member)),\n new Uint8Array(getUtf8Encoder().encode(ADDRESS_TREE_VERSION)),\n ]);\n\n const addressTree = new PublicKey(batchAddressTree); // default v2 public tree\n return {\n address: createBN254(\n deriveAddressV2(\n addressSeed,\n addressTree,\n new PublicKey(MULTI_WALLET_PROGRAM_ADDRESS.toString())\n ).toString(),\n \"base58\"\n ),\n addressTree,\n };\n}\n\nexport async function getDomainConfigAddress({\n rpIdHash,\n rpId,\n}: {\n rpIdHash?: Uint8Array;\n rpId?: string;\n}) {\n if (!rpIdHash) {\n if (rpId) {\n rpIdHash = sha256(new Uint8Array(getUtf8Encoder().encode(rpId)));\n } else {\n throw new Error(\"RpId not found.\");\n }\n }\n if (!rpIdHash) {\n throw new Error(\"RpIdHash not found.\");\n }\n const [domainConfig] = await getProgramDerivedAddress({\n programAddress: MULTI_WALLET_PROGRAM_ADDRESS,\n seeds: [getUtf8Encoder().encode(\"domain_config\"), rpIdHash],\n });\n\n return domainConfig;\n}\n\nexport async function getGlobalCounterAddress() {\n const [globalCounter] = await getProgramDerivedAddress({\n programAddress: MULTI_WALLET_PROGRAM_ADDRESS,\n seeds: [getUtf8Encoder().encode(\"global_counter\")],\n });\n\n return globalCounter;\n}\nexport async function getTransactionBufferAddress(\n settings: Address,\n creator: Address | Secp256r1Key,\n buffer_index: number\n) {\n if (buffer_index > 255) {\n throw new Error(\"Index cannot be greater than 255.\");\n }\n const [transactionBuffer] = await getProgramDerivedAddress({\n programAddress: MULTI_WALLET_PROGRAM_ADDRESS,\n seeds: [\n getUtf8Encoder().encode(\"multi_wallet\"),\n getAddressEncoder().encode(settings),\n getUtf8Encoder().encode(\"transaction_buffer\"),\n creator instanceof Secp256r1Key\n ? creator.toTruncatedBuffer()\n : getAddressEncoder().encode(creator),\n getU8Encoder().encode(buffer_index),\n ],\n });\n\n return transactionBuffer;\n}\nexport async function getWalletAddressFromSettings(settings: Address) {\n const [address] = await getProgramDerivedAddress({\n programAddress: MULTI_WALLET_PROGRAM_ADDRESS,\n seeds: [\n getUtf8Encoder().encode(\"multi_wallet\"),\n getAddressEncoder().encode(settings),\n getUtf8Encoder().encode(\"vault\"),\n ],\n });\n\n return address;\n}\nexport async function getSettingsFromIndex(index: number | bigint) {\n const [settings] = await getProgramDerivedAddress({\n programAddress: MULTI_WALLET_PROGRAM_ADDRESS,\n seeds: [\n getUtf8Encoder().encode(\"multi_wallet\"),\n getU128Encoder().encode(index),\n ],\n });\n\n return settings;\n}\nexport async function getWalletAddressFromIndex(index: number | bigint) {\n const settings = await getSettingsFromIndex(index);\n const address = await getWalletAddressFromSettings(settings);\n return address;\n}\n\nexport async function getLightCpiSigner() {\n const [lightCpiSigner] = await getProgramDerivedAddress({\n programAddress: MULTI_WALLET_PROGRAM_ADDRESS,\n seeds: [getUtf8Encoder().encode(\"cpi_authority\")],\n });\n return lightCpiSigner;\n}\n","import { sha256 } from \"@noble/hashes/sha256\";\nimport {\n type AccountMeta,\n AccountRole,\n address,\n appendTransactionMessageInstructions,\n compileTransaction,\n compressTransactionMessageUsingAddressLookupTables,\n createTransactionMessage,\n getBase58Encoder,\n getBase64Decoder,\n getBlockhashDecoder,\n getTransactionEncoder,\n type Instruction,\n type OptionOrNullable,\n pipe,\n prependTransactionMessageInstructions,\n type Rpc,\n setTransactionMessageFeePayerSigner,\n setTransactionMessageLifetimeUsingBlockhash,\n type SignatureBytes,\n signTransactionMessageWithSigners,\n type SolanaRpcApi,\n some,\n type TransactionSigner,\n} from \"gill\";\nimport {\n getSetComputeUnitLimitInstruction,\n getTransferSolInstruction,\n} from \"gill/programs\";\nimport type { Secp256r1VerifyArgs } from \"../../generated\";\nimport { SignedSecp256r1Key, type TransactionDetails } from \"../../types\";\nimport { getSolanaRpc } from \"../initialize\";\n\nexport async function createEncodedBundle(\n bundle: (TransactionDetails & { unitsConsumed?: number })[],\n isSimulate = false\n) {\n const latestBlockHash = isSimulate\n ? {\n blockhash: getBlockhashDecoder().decode(\n crypto.getRandomValues(new Uint8Array(32))\n ),\n lastValidBlockHeight: BigInt(Number.MAX_SAFE_INTEGER),\n }\n : (await getSolanaRpc().getLatestBlockhash().send()).value;\n return await Promise.all(\n bundle.map(async (x) => {\n const tx = await pipe(\n createTransactionMessage({ version: 0 }),\n (tx) => appendTransactionMessageInstructions(x.instructions, tx),\n (tx) => setTransactionMessageFeePayerSigner(x.payer, tx),\n (tx) =>\n setTransactionMessageLifetimeUsingBlockhash(latestBlockHash, tx),\n (tx) =>\n x.addressesByLookupTableAddress\n ? compressTransactionMessageUsingAddressLookupTables(\n tx,\n x.addressesByLookupTableAddress\n )\n : tx,\n async (tx) => {\n const computeUnits =\n Math.ceil((x.unitsConsumed ?? 0) * 1.1) || 800000;\n return computeUnits > 200000\n ? prependTransactionMessageInstructions(\n [\n getSetComputeUnitLimitInstruction({\n units: computeUnits,\n }),\n ],\n tx\n )\n : tx;\n },\n async (tx) =>\n isSimulate\n ? compileTransaction(await tx)\n : await signTransactionMessageWithSigners(await tx)\n );\n return tx;\n })\n );\n}\nexport async function getMedianPriorityFees(\n connection: Rpc<SolanaRpcApi>,\n accounts: AccountMeta[]\n) {\n const recentFees = await connection\n .getRecentPrioritizationFees(\n accounts\n .filter(\n (x) =>\n x.role === AccountRole.WRITABLE ||\n x.role === AccountRole.WRITABLE_SIGNER\n )\n .map((x) => x.address)\n )\n .send();\n const fees = recentFees.map((f) => Number(f.prioritizationFee));\n fees.sort((a, b) => a - b);\n const mid = Math.floor(fees.length / 2);\n\n if (fees.length % 2 === 0) {\n return Math.round((fees[mid - 1] + fees[mid]) / 2);\n } else {\n return fees[mid];\n }\n}\n\nexport async function simulateBundle(bundle: string[], connectionUrl: string) {\n if (bundle.length === 0) {\n throw new Error(\"Bundle is empty.\");\n }\n\n for (let i = 0; i < bundle.length; i++) {\n if (bundle[i].length > 1644) {\n throw new Error(\n `Transaction ${i} exceeds maximum length, ${bundle[i].length}. Retry again.`\n );\n }\n console.log(`Transaction ${i} length: ${bundle[i].length}`);\n }\n\n const response = await fetch(connectionUrl, {\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n },\n body: JSON.stringify({\n jsonrpc: \"2.0\",\n id: \"2\",\n method: \"simulateBundle\",\n params: [\n {\n encodedTransactions: bundle,\n },\n {\n skipSigVerify: true,\n replaceRecentBlockhash: true,\n preExecutionAccountsConfigs: bundle.map(() => ({\n encoding: \"base64\",\n addresses: [],\n })),\n postExecutionAccountsConfigs: bundle.map(() => ({\n encoding: \"base64\",\n addresses: [],\n })),\n },\n ],\n }),\n });\n\n if (!response.ok) {\n console.error(await response.json());\n throw new Error(\"Failed to simulate bundle\");\n }\n const { result, error } = await response.json();\n\n if (!result || error) {\n console.error(error ?? result);\n throw new Error(\n `Unable to simulate bundle: ${JSON.stringify(error ?? result)}`\n );\n }\n if (typeof result.value.summary !== \"string\" && result.value.summary.failed) {\n const { TransactionFailure } = result.value.summary.failed.error;\n const [, programError] = TransactionFailure;\n console.error(error ?? result);\n throw new Error(`Simulation failed: ${programError}`);\n }\n\n return result.value.transactionResults.map((x: any) => x.unitsConsumed);\n}\n\nexport function extractSecp256r1VerificationArgs(\n signer?: SignedSecp256r1Key | TransactionSigner,\n index = 0\n) {\n const secp256r1PublicKey =\n signer instanceof SignedSecp256r1Key ? signer : undefined;\n const verifyArgs: OptionOrNullable<Secp256r1VerifyArgs> =\n secp256r1PublicKey?.verifyArgs && index !== -1\n ? some({\n signedMessageIndex: index,\n truncatedClientDataJson:\n secp256r1PublicKey.verifyArgs.truncatedClientDataJson,\n slotNumber: secp256r1PublicKey.verifyArgs.slotNumber,\n originIndex: secp256r1PublicKey.originIndex,\n crossOrigin: secp256r1PublicKey.crossOrigin,\n })\n : null;\n\n const domainConfig = secp256r1PublicKey?.domainConfig\n ? secp256r1PublicKey.domainConfig\n : undefined;\n const signature = secp256r1PublicKey?.verifyArgs\n ? secp256r1PublicKey.signature\n : undefined;\n const message =\n secp256r1PublicKey?.authData &&\n secp256r1PublicKey.verifyArgs?.clientDataJson\n ? new Uint8Array([\n ...secp256r1PublicKey.authData,\n ...sha256(secp256r1PublicKey.verifyArgs.clientDataJson),\n ])\n : undefined;\n const publicKey = secp256r1PublicKey?.toBuffer();\n\n return {\n domainConfig,\n verifyArgs,\n signature,\n message,\n publicKey,\n };\n}\nexport function getDeduplicatedSigners(\n signers: (SignedSecp256r1Key | TransactionSigner)[]\n) {\n function getPubkeyString(pubkey: TransactionSigner | SignedSecp256r1Key) {\n if (pubkey instanceof SignedSecp256r1Key) {\n return pubkey.toString();\n } else {\n return pubkey.address.toString();\n }\n }\n const hashSet = new Set();\n const dedupSigners: (SignedSecp256r1Key | TransactionSigner)[] = [];\n for (const signer of signers) {\n if (!hashSet.has(getPubkeyString(signer))) {\n dedupSigners.push(signer);\n hashSet.add(getPubkeyString(signer));\n }\n }\n\n // due to current tx size limit (can be removed once tx size limit increases)\n if (dedupSigners.filter((x) => x instanceof SignedSecp256r1Key).length > 1) {\n throw new Error(\n \"More than 1 Secp256r1 signers in an instruction is not supported.\"\n );\n }\n return dedupSigners;\n}\n\nexport function addJitoTip({\n payer,\n tipAmount,\n}: {\n payer: TransactionSigner;\n tipAmount: number;\n}): Instruction {\n const JITO_TIP_ACCOUNTS = [\n \"HFqU5x63VTqvQss8hp11i4wVV8bD44PvwucfZ2bU7gRe\",\n \"ADaUMid9yfUytqMBgopwjb2DTLSokTSzL1zt6iGPaS49\",\n \"96gYZGLnJYVFmbjzopPSU6QiEV5fGqZNyN9nmNhvrZU5\",\n \"Cw8CFyM9FkoMi7K7Crf6HNQqf4uEMzpKw6QNghXLvLkY\",\n \"DfXygSm4jCyNCybVYYK6DwvWqjKee8pbDmJGcLWNDXjh\",\n \"ADuUkR4vqLUMWXxW9gh6D6L8pMSawimctcNZ5pGwDcEt\",\n \"3AVi9Tg9Uo68tJfuvoKvqKNWKkC5wPdSSdeBnizKZ6jT\",\n \"DttWaMuVvTiduZRnguLF7jNxTgiMBZ1hyAumKUiL2KRL\",\n ];\n const tipAccount =\n JITO_TIP_ACCOUNTS[Math.floor(Math.random() * JITO_TIP_ACCOUNTS.length)];\n return getTransferSolInstruction({\n source: payer,\n destination: address(tipAccount),\n amount: tipAmount,\n });\n}\nexport async function getRandomPayer(\n payerEndpoint: string\n): Promise<TransactionSigner> {\n const response = await fetch(`${payerEndpoint}/getRandomPayer`);\n const { randomPayer } = (await response.json()) as { randomPayer: string };\n\n return {\n address: address(randomPayer),\n async signTransactions(transactions) {\n const payload = {\n publicKey: randomPayer,\n transactions: transactions.map((tx) =>\n getBase64Decoder().decode(getTransactionEncoder().encode(tx))\n ),\n };\n\n const response = await fetch(`${payerEndpoint}/sign`, {\n method: \"POST\",\n headers: { \"Content-Type\": \"application/json\" },\n body: JSON.stringify(payload),\n });\n\n const data = (await response.json()) as\n | { signatures: string[] }\n | { error: string };\n\n if (\"error\" in data) {\n throw new Error(data.error);\n }\n\n return data.signatures.map((sig) => ({\n [address(randomPayer)]: getBase58Encoder().encode(\n sig\n ) as SignatureBytes,\n }));\n },\n };\n}\n","import {\n createRpc,\n Rpc as LightProtocolRpc,\n} from \"@lightprotocol/stateless.js\";\nimport {\n createSolanaClient,\n type CompilableTransactionMessage,\n type Rpc,\n type SendAndConfirmTransactionWithSignersFunction,\n type SolanaRpcApi,\n type TransactionMessage,\n type TransactionMessageWithFeePayer,\n type TransactionSigner,\n} from \"gill\";\nimport { estimateComputeUnitLimitFactory } from \"gill/programs\";\nimport type { JitoTipsConfig } from \"../types\";\nimport { REVIBASE_API_ENDPOINT, REVIBASE_AUTH_ENDPOINT } from \"./consts\";\nimport { getRandomPayer } from \"./transaction/internal\";\n\nlet globalSolanaRpcEndpoint: string | null = null;\nlet lightProtocolRpc: LightProtocolRpc | null = null;\nlet globalSolanaRpc: Rpc<SolanaRpcApi> | null = null;\nlet globalSendAndConfirmTransaction: SendAndConfirmTransactionWithSignersFunction | null =\n null;\nlet globalComputeBudgetEstimate:\n | ((\n transactionMessage:\n | CompilableTransactionMessage\n | (TransactionMessage & TransactionMessageWithFeePayer),\n config?: any\n ) => Promise<number>)\n | null = null;\n\nlet globalFeePayer: TransactionSigner | null = null;\nlet globalApiEndpoint: string | null = null;\nlet globalJitoTipsConfig: JitoTipsConfig | null = null;\nlet globalAuthEndpoint: string | null = null;\nlet globalAuthorizedClient: { publicKey: string; url: string } | null = null;\nlet globalAdditionalInfo: any | null = null;\n\nexport function getSolanaRpcEndpoint() {\n if (!globalSolanaRpcEndpoint) throw new Error(\"Rpc is not initialized yet.\");\n return globalSolanaRpcEndpoint;\n}\n\nexport function getLightProtocolRpc() {\n if (!lightProtocolRpc) throw new Error(\"Rpc is not initialized yet\");\n return lightProtocolRpc;\n}\n\nexport function getSolanaRpc() {\n if (!globalSolanaRpc) throw new Error(\"Rpc is not initialized yet\");\n return globalSolanaRpc;\n}\n\nexport function getSendAndConfirmTransaction() {\n if (!globalSendAndConfirmTransaction)\n throw new Error(\"Rpc is not initialized yet.\");\n return globalSendAndConfirmTransaction;\n}\n\nexport function getComputeBudgetEstimate() {\n if (!globalComputeBudgetEstimate)\n throw new Error(\"Rpc is not initialized yet\");\n return globalComputeBudgetEstimate;\n}\n\nexport async function getFeePayer() {\n if (!globalFeePayer) {\n globalFeePayer = await getRandomPayer(\n globalApiEndpoint ?? REVIBASE_API_ENDPOINT\n );\n }\n return globalFeePayer;\n}\n\nexport function getJitoTipsConfig() {\n if (!globalJitoTipsConfig) throw new Error(\"Jito Bundle Config is not set.\");\n return globalJitoTipsConfig;\n}\n\nexport function getAuthEndpoint() {\n return globalAuthEndpoint ?? REVIBASE_AUTH_ENDPOINT;\n}\n\nexport function getGlobalAuthorizedClient() {\n return globalAuthorizedClient;\n}\n\nexport function getGlobalAdditonalInfo() {\n return globalAdditionalInfo;\n}\n\nexport function uninitialize() {\n lightProtocolRpc = null;\n globalSolanaRpc = null;\n globalSolanaRpcEndpoint = null;\n globalFeePayer = null;\n globalApiEndpoint = null;\n globalJitoTipsConfig = null;\n globalAuthEndpoint = null;\n globalSendAndConfirmTransaction = null;\n globalComputeBudgetEstimate = null;\n globalAuthorizedClient = null;\n}\n\nexport function initialize({\n rpcEndpoint,\n proverEndpoint,\n compressionApiEndpoint,\n jitoTipsConfig,\n apiEndpoint,\n authEndpoint,\n authorizedClient,\n additionalInfo,\n}: {\n rpcEndpoint: string;\n proverEndpoint?: string;\n compressionApiEndpoint?: string;\n jitoTipsConfig?: JitoTipsConfig;\n apiEndpoint?: string;\n authEndpoint?: string;\n authorizedClient?: { publicKey: string; url: string };\n additionalInfo?: any;\n}) {\n globalSolanaRpcEndpoint = rpcEndpoint;\n lightProtocolRpc = createRpc(\n globalSolanaRpcEndpoint,\n compressionApiEndpoint,\n proverEndpoint\n );\n const { rpc, sendAndConfirmTransaction } = createSolanaClient({\n urlOrMoniker: globalSolanaRpcEndpoint,\n });\n globalSolanaRpc = rpc;\n globalSendAndConfirmTransaction = sendAndConfirmTransaction;\n globalComputeBudgetEstimate = estimateComputeUnitLimitFactory({\n rpc,\n });\n\n globalApiEndpoint = apiEndpoint ?? null;\n globalJitoTipsConfig = jitoTipsConfig ?? null;\n globalAuthEndpoint = authEndpoint ?? null;\n globalAuthorizedClient = authorizedClient ?? null;\n globalAdditionalInfo = additionalInfo ?? null;\n}\n","import {\n type AccountProofInput,\n getLightSystemAccountMetasV2,\n type NewAddressProofInput,\n type PackedAddressTreeInfo,\n type PackedStateTreeInfo,\n type PackedTreeInfos,\n selectStateTreeInfo,\n type TreeInfo,\n TreeType,\n} from \"@lightprotocol/stateless.js\";\nimport { PublicKey } from \"@solana/web3.js\";\nimport {\n type AccountMeta,\n AccountRole,\n type AccountSignerMeta,\n address,\n} from \"gill\";\nimport { MULTI_WALLET_PROGRAM_ADDRESS } from \"../../generated\";\nimport { getLightProtocolRpc } from \"../initialize\";\n\ninterface MapData {\n index: number;\n accountMeta: AccountMeta;\n}\n\nexport class PackedAccounts {\n preAccounts: AccountMeta[];\n systemAccounts: AccountMeta[];\n nextIndex: number;\n map: Map<string, MapData>;\n outputTreeIndex: number;\n\n constructor() {\n this.preAccounts = [];\n this.systemAccounts = [];\n this.nextIndex = 0;\n this.map = new Map();\n this.outputTreeIndex = -1;\n }\n\n addPreAccounts(accounts: (AccountMeta | AccountSignerMeta)[]): void {\n this.preAccounts.push(...accounts);\n }\n\n getAccountRole(isSigner: boolean, isWritable: boolean): AccountRole {\n if (isSigner) {\n return isWritable\n ? AccountRole.WRITABLE_SIGNER\n : AccountRole.READONLY_SIGNER;\n } else {\n return isWritable ? AccountRole.WRITABLE : AccountRole.READONLY;\n }\n }\n\n async addSystemAccounts(): Promise<void> {\n this.systemAccounts.push(\n ...getLightSystemAccountMetasV2({\n selfProgram: new PublicKey(MULTI_WALLET_PROGRAM_ADDRESS.toString()),\n }).map((x) => ({\n address: address(x.pubkey.toString()),\n role: this.getAccountRole(x.isSigner, x.isWritable),\n }))\n );\n }\n\n insertOrGet(pubkey: string): number {\n return this.insertOrGetConfig(pubkey, AccountRole.WRITABLE);\n }\n\n insertOrGetConfig(pubkey: string, role: AccountRole): number {\n if (!this.map.has(pubkey)) {\n const index = this.nextIndex++;\n const accountMeta: AccountMeta = {\n address: address(pubkey),\n role,\n };\n this.map.set(pubkey, { index, accountMeta });\n }\n return this.map.get(pubkey)!.index;\n }\n\n packOutputTreeIndex(outputStateTreeInfo: TreeInfo) {\n if (outputStateTreeInfo.treeType === TreeType.StateV1) {\n return this.insertOrGet(outputStateTreeInfo.tree.toString());\n } else if (outputStateTreeInfo.treeType === TreeType.StateV2) {\n return this.insertOrGet(outputStateTreeInfo.queue.toString());\n }\n throw new Error(\"Tree type not supported\");\n }\n\n async getOutputTreeIndex() {\n if (this.outputTreeIndex !== -1) {\n return this.outputTreeIndex;\n }\n\n const stateTreeInfos = await getLightProtocolRpc().getStateTreeInfos();\n const outputStateTreeIndex = this.packOutputTreeIndex(\n selectStateTreeInfo(stateTreeInfos)\n );\n return outputStateTreeIndex;\n }\n\n packTreeInfos(\n accountProofInputs: AccountProofInput[],\n newAddressProofInputs: NewAddressProofInput[]\n ): PackedTreeInfos {\n const stateTreeInfos: PackedStateTreeInfo[] = [];\n const addressTreeInfos: PackedAddressTreeInfo[] = [];\n\n for (const account of accountProofInputs) {\n const merkleTreePubkeyIndex = this.insertOrGet(\n account.treeInfo.tree.toString()\n );\n const queuePubkeyIndex = this.insertOrGet(\n account.treeInfo.queue.toString()\n );\n\n stateTreeInfos.push({\n rootIndex: account.rootIndex,\n merkleTreePubkeyIndex,\n queuePubkeyIndex,\n leafIndex: account.leafIndex,\n proveByIndex: account.proveByIndex,\n });\n\n const treeToUse = account.treeInfo.nextTreeInfo ?? account.treeInfo;\n const index = this.packOutputTreeIndex(treeToUse);\n if (this.outputTreeIndex === -1) {\n this.outputTreeIndex = index;\n }\n }\n\n for (const account of newAddressProofInputs) {\n const addressMerkleTreePubkeyIndex = this.insertOrGet(\n account.treeInfo.tree.toString()\n );\n const addressQueuePubkeyIndex = this.insertOrGet(\n account.treeInfo.queue.toString()\n );\n\n addressTreeInfos.push({\n rootIndex: account.rootIndex,\n addressMerkleTreePubkeyIndex,\n addressQueuePubkeyIndex,\n });\n }\n\n return {\n stateTrees:\n stateTreeInfos.length > 0\n ? {\n packedTreeInfos: stateTreeInfos,\n outputTreeIndex: this.outputTreeIndex,\n }\n : undefined,\n addressTrees: addressTreeInfos,\n };\n }\n\n hashSetAccountsToMetas(): AccountMeta[] {\n const packedAccounts: AccountMeta[] = Array.from(this.map.entries())\n .sort((a, b) => a[1].index - b[1].index)\n .map(([, { accountMeta }]) => ({ ...accountMeta }));\n return packedAccounts;\n }\n\n getOffsets(): [number, number] {\n const systemAccountsStartOffset = this.preAccounts.length;\n const packedAccountsStartOffset =\n systemAccountsStartOffset + this.systemAccounts.length;\n return [systemAccountsStartOffset, packedAccountsStartOffset];\n }\n\n toAccountMetas(): {\n remainingAccounts: AccountMeta[];\n systemOffset: number;\n packedOffset: number;\n } {\n const packedAccounts = this.hashSetAccountsToMetas();\n const [systemOffset, packedOffset] = this.getOffsets();\n const remainingAccounts = [\n ...this.preAccounts,\n ...this.systemAccounts,\n ...packedAccounts,\n ];\n return { remainingAccounts, systemOffset, packedOffset };\n }\n}\n","import {\n type AccountProofInput,\n type AddressWithTree,\n type BN254,\n type CompressedAccount,\n type HashWithTree,\n type TreeInfo,\n type ValidityProofWithContext,\n} from \"@lightprotocol/stateless.js\";\nimport BN from \"bn.js\";\nimport { some, type Decoder, type OptionOrNullable } from \"gill\";\nimport {\n getCompressedSettingsDecoder,\n type CompressedProof,\n type SettingsReadonlyArgs,\n} from \"../../generated\";\nimport { getCompressedSettingsAddressFromIndex } from \"../addresses\";\nimport { getLightProtocolRpc } from \"../initialize\";\nimport { PackedAccounts } from \"./packedAccounts\";\n\nexport async function getCompressedAccount(\n address: BN,\n cachedAccounts?: Map<string, any>\n): Promise<CompressedAccount | null> {\n let result = cachedAccounts?.get(address.toString());\n if (result) {\n return result;\n } else {\n const compressedAccount =\n await getLightProtocolRpc().getCompressedAccount(address);\n if (compressedAccount) {\n cachedAccounts?.set(address.toString(), compressedAccount);\n }\n return compressedAccount;\n }\n}\n\nexport async function getCompressedAccountHashes(\n addresses: { address: BN254; type: \"Settings\" | \"User\" }[],\n cachedAccounts?: Map<string, any>\n) {\n const compressedAccounts = await Promise.all(\n addresses.map(async (x) => getCompressedAccount(x.address, cachedAccounts))\n );\n\n const filtered = compressedAccounts\n .filter((x) => x !== null)\n .filter((x) => x.data !== null && x.address !== null);\n\n if (filtered.length !== addresses.length) {\n throw new Error(\"Unable to find compressed account.\");\n }\n\n return filtered.map((x, index) => ({\n ...x,\n type: addresses[index].type,\n tree: x.treeInfo.tree,\n queue: x.treeInfo.queue,\n }));\n}\n\nexport function convertToCompressedProofArgs(\n validityProof: ValidityProofWithContext | null,\n offset: number\n) {\n const proof: OptionOrNullable<CompressedProof> =\n validityProof?.compressedProof\n ? some({\n a: new Uint8Array(validityProof.compressedProof.a),\n b: new Uint8Array(validityProof.compressedProof.b),\n c: new Uint8Array(validityProof.compressedProof.c),\n })\n : null;\n return {\n proof,\n lightCpiAccountsStartIndex: offset,\n };\n}\n\nexport async function getCompressedAccountInitArgs(\n packedAccounts: PackedAccounts,\n treeInfos: TreeInfo[],\n roots: BN[],\n rootIndices: number[],\n newAddresses: (AddressWithTree & { type: \"User\" | \"Settings\" })[]\n) {\n if (newAddresses.length === 0) return [];\n const newAddressProofInputs = newAddresses.map((x, index) => ({\n treeInfo: treeInfos[index],\n root: roots[index],\n rootIndex: rootIndices[index],\n address: x.address.toArray(),\n }));\n\n const { addressTrees } = packedAccounts.packTreeInfos(\n [],\n newAddressProofInputs\n );\n const outputStateTreeIndex = await packedAccounts.getOutputTreeIndex();\n\n const creationArgs = newAddresses.map((addressWithTree, i) => ({\n addressTreeInfo: addressTrees[i],\n outputStateTreeIndex,\n address: addressWithTree.address,\n type: addressWithTree.type,\n }));\n\n return creationArgs;\n}\n\nexport function getCompressedAccountMutArgs<T>(\n packedAccounts: PackedAccounts,\n treeInfos: TreeInfo[],\n leafIndices: number[],\n rootIndices: number[],\n proveByIndices: boolean[],\n hashes: (HashWithTree & CompressedAccount)[],\n decoder: Decoder<T>\n) {\n const accountProofInputs: AccountProofInput[] = [];\n for (let index = 0; index < treeInfos.length; index++) {\n accountProofInputs.push({\n treeInfo: treeInfos[index],\n rootIndex: rootIndices[index],\n leafIndex: leafIndices[index],\n proveByIndex: proveByIndices[index],\n hash: hashes[index].hash,\n });\n }\n\n const stateTreeInfo = packedAccounts.packTreeInfos(\n accountProofInputs,\n []\n ).stateTrees;\n\n if (!stateTreeInfo) {\n throw new Error(\"Unable to parsed data.\");\n }\n\n const mutArgs = hashes.map((x, index) => ({\n data: decoder.decode(x.data!.data),\n accountMeta: {\n treeInfo: stateTreeInfo.packedTreeInfos[index],\n address: new Uint8Array(x.address!),\n outputStateTreeIndex: stateTreeInfo.outputTreeIndex,\n },\n }));\n\n return mutArgs;\n}\n\nexport async function constructSettingsProofArgs(\n compressed: boolean,\n index: bigint | number,\n simulateProof?: boolean,\n cachedAccounts?: Map<string, any>\n) {\n let settingsReadonlyArgs: SettingsReadonlyArgs | null = null;\n let proof: ValidityProofWithContext | null = null;\n const packedAccounts = new PackedAccounts();\n if (compressed) {\n await packedAccounts.addSystemAccounts();\n const { address } = getCompressedSettingsAddressFromIndex(index);\n const settings = (\n await getCompressedAccountHashes(\n [{ address, type: \"Settings\" }],\n cachedAccounts\n )\n )[0];\n if (simulateProof) {\n proof = {\n rootIndices: [0],\n roots: [],\n leafIndices: [settings.leafIndex],\n leaves: [],\n treeInfos: [settings.treeInfo],\n proveByIndices: [settings.proveByIndex],\n compressedProof: {\n a: Array.from(crypto.getRandomValues(new Uint8Array(32))),\n b: Array.from(crypto.getRandomValues(new Uint8Array(32))),\n c: Array.from(crypto.getRandomValues(new Uint8Array(32))),\n },\n };\n } else {\n proof = await getValidityProofWithRetry([settings], []);\n }\n\n const stateTreeInfo = packedAccounts.packTreeInfos(\n [\n {\n treeInfo: proof.treeInfos[0],\n rootIndex: proof.rootIndices[0],\n leafIndex: proof.leafIndices[0],\n proveByIndex: proof.proveByIndices[0],\n hash: settings.hash,\n },\n ],\n []\n ).stateTrees;\n\n if (!stateTreeInfo) {\n throw new Error(\"Unable to parsed data.\");\n }\n\n settingsReadonlyArgs = {\n accountMeta: {\n address: new Uint8Array(settings.address!),\n treeInfo: stateTreeInfo.packedTreeInfos[0],\n },\n data: getCompressedSettingsDecoder().decode(settings.data?.data!),\n };\n }\n return { settingsReadonlyArgs, proof, packedAccounts };\n}\n\nexport async function getValidityProofWithRetry(\n hashes?: HashWithTree[] | undefined,\n newAddresses?: AddressWithTree[],\n retry = 10,\n delay = 400\n) {\n let attempt = 1;\n while (attempt < retry) {\n try {\n const proof = await getLightProtocolRpc().getValidityProofV0(\n hashes,\n newAddresses\n );\n return proof;\n } catch (error) {\n console.error(`Attempt ${attempt}, Get Validity Proof failed. ${error}`);\n attempt++;\n if (attempt >= retry) {\n throw new Error(\n `Failed to get validity proof after ${retry} attempts: ${error}`\n );\n }\n await new Promise((resolve) => setTimeout(resolve, delay));\n }\n }\n throw new Error(`Failed to get validity proof after ${retry} attempts`);\n}\n","import { type Address } from \"gill\";\nimport {\n type CompressedSettingsData,\n fetchMaybeSettings,\n getCompressedSettingsAddressFromIndex,\n getCompressedSettingsDecoder,\n getUserAccountAddress,\n getUserDecoder,\n Secp256r1Key,\n type User,\n} from \"../..\";\nimport { getSettingsFromIndex } from \"../addresses\";\nimport { getSolanaRpc } from \"../initialize\";\nimport { getCompressedAccount } from \"./internal\";\n\nexport async function fetchUserAccountData(\n member: Address | Secp256r1Key,\n cachedAccounts?: Map<string, any>\n): Promise<User> {\n const result = await fetchMaybeUserAccountData(member, cachedAccounts);\n if (!result) {\n throw new Error(\"User cannot be found.\");\n }\n return result;\n}\n\nexport async function fetchMaybeUserAccountData(\n member: Address | Secp256r1Key,\n cachedAccounts?: Map<string, any>\n): Promise<User | null> {\n const { address } = getUserAccountAddress(member);\n const result = await getCompressedAccount(address, cachedAccounts);\n if (!result?.data?.data) {\n return null;\n }\n return getUserDecoder().decode(result.data.data);\n}\n\nexport async function fetchSettingsAccountData(\n index: number | bigint,\n cachedAccounts?: Map<string, any>\n): Promise<CompressedSettingsData & { isCompressed: boolean }> {\n const settingsData = await fetchMaybeSettingsAccountData(\n index,\n cachedAccounts\n );\n if (!settingsData) {\n throw new Error(\"Settings cannot be found.\");\n }\n return settingsData;\n}\n\nexport async function fetchMaybeSettingsAccountData(\n index: number | bigint,\n cachedAccounts?: Map<string, any>\n): Promise<(CompressedSettingsData & { isCompressed: boolean }) | null> {\n try {\n const { address } = getCompressedSettingsAddressFromIndex(index);\n const result = await getCompressedAccount(address, cachedAccounts);\n if (!result?.data?.data) {\n return null;\n }\n const data = getCompressedSettingsDecoder().decode(result.data.data);\n if (data.data.__option === \"None\") {\n return null;\n }\n return { ...data.data.value, isCompressed: true };\n } catch {\n const result = await fetchMaybeSettings(\n getSolanaRpc(),\n await getSettingsFromIndex(index)\n );\n if (!result.exists) {\n return null;\n }\n return {\n ...result.data,\n members: result.data.members.slice(0, result.data.membersLen),\n isCompressed: false,\n };\n }\n}\n","import { p256 } from \"@noble/curves/p256\";\nimport { Secp256r1Key } from \"../../types\";\nimport { createPopUp } from \"./helper\";\n\nlet activeMessageHandler: ((event: MessageEvent) => void) | null = null;\nconst HEARTBEAT_INTERVAL = 2000;\nconst TIMEOUT_BUFFER = 3000;\nconst DEFAULT_TIMEOUT = 5 * 60 * 1000;\n\nexport async function openAuthUrl({\n authUrl,\n additionalInfo,\n signer,\n popUp = null,\n data,\n}: {\n authUrl: string;\n additionalInfo?: any;\n data?: {\n type: \"transaction\" | \"message\";\n payload: string;\n };\n signer?: Secp256r1Key;\n popUp?: Window | null;\n}) {\n if (typeof window === \"undefined\") {\n throw new Error(\"Function can only be called in a browser environment\");\n }\n return new Promise((resolve, reject) => {\n const origin = new URL(authUrl).origin;\n\n let heartbeatTimeout: NodeJS.Timeout | null = null;\n\n const closeCheckInterval = setInterval(() => {\n if (popUp && popUp.closed) {\n cleanUp();\n reject(new Error(\"User closed the authentication window\"));\n }\n }, 500);\n\n const globalTimeout = setTimeout(() => {\n log(\"Authentication timeout.\");\n cleanUp();\n reject(new Error(\"Authentication timed out\"));\n }, DEFAULT_TIMEOUT);\n\n function cleanUp() {\n clearInterval(closeCheckInterval);\n clearTimeout(globalTimeout);\n if (heartbeatTimeout) clearTimeout(heartbeatTimeout);\n if (activeMessageHandler)\n window.removeEventListener(\"message\", activeMessageHandler);\n if (popUp) popUp.close();\n }\n\n if (popUp) {\n popUp.location.replace(authUrl);\n } else {\n popUp = createPopUp(authUrl);\n }\n\n if (!popUp) {\n reject(new Error(\"Disable your popup blocker to continue.\"));\n return;\n }\n\n function log(...args: any[]) {\n if (additionalInfo?.debug) console.debug(\"[Popup]\", ...args);\n }\n\n const messageReceivedHandler = (event: MessageEvent) => {\n const isSameOrigin = event.origin === origin;\n const isSameWindow = event.source === popUp;\n\n if (!isSameOrigin || !isSameWindow || !event.isTrusted || !popUp) {\n log(\"Ignored message from unknown source\", event);\n return;\n }\n\n switch (event.data.type) {\n case \"popup-ready\":\n log(\"Popup is ready, sending auth data\");\n popUp.postMessage(\n {\n type: \"popup-init\",\n payload: {\n signer: signer?.toString(),\n data,\n additionalInfo,\n },\n },\n origin\n );\n heartbeatTimeout = setTimeout(() => {\n cleanUp();\n reject(new Error(\"User closed the authentication window\"));\n }, HEARTBEAT_INTERVAL + TIMEOUT_BUFFER);\n break;\n case \"popup-complete\":\n log(\"Received completion message\");\n try {\n const payload = JSON.parse(event.data.payload as string);\n cleanUp();\n resolve(payload);\n } catch (error) {\n reject(new Error(\"Failed to parse response payload\"));\n }\n break;\n case \"popup-heartbeat\":\n log(\"Received heartbeat\");\n if (heartbeatTimeout) {\n clearTimeout(heartbeatTimeout);\n heartbeatTimeout = setTimeout(() => {\n cleanUp();\n reject(new Error(\"User closed the authentication window\"));\n }, HEARTBEAT_INTERVAL + TIMEOUT_BUFFER);\n }\n break;\n\n case \"popup-closed\":\n log(\"Popup explicitly closed\");\n cleanUp();\n reject(new Error(\"User closed the authentication window\"));\n break;\n\n default:\n log(\"Unknown message type\", event.data.type);\n }\n };\n\n if (activeMessageHandler) {\n window.removeEventListener(\"message\", activeMessageHandler);\n }\n activeMessageHandler = messageReceivedHandler;\n window.addEventListener(\"message\", activeMessageHandler);\n });\n}\n\nexport function bufferToBase64URLString(buffer: Uint8Array) {\n let str = \"\";\n for (const charCode of buffer) {\n str += String.fromCharCode(charCode);\n }\n const base64String = btoa(str);\n return base64String.replace(/\\+/g, \"-\").replace(/\\//g, \"_\").replace(/=/g, \"\");\n}\n\nexport function base64URLStringToBuffer(base64URLString: string) {\n // Convert from Base64URL to Base64\n const base64 = base64URLString.replace(/-/g, \"+\").replace(/_/g, \"/\");\n /**\n * Pad with '=' until it's a multiple of four\n * (4 - (85 % 4 = 1) = 3) % 4 = 3 padding\n * (4 - (86 % 4 = 2) = 2) % 4 = 2 padding\n * (4 - (87 % 4 = 3) = 1) % 4 = 1 padding\n * (4 - (88 % 4 = 0) = 4) % 4 = 0 padding\n */\n const padLength = (4 - (base64.length % 4)) % 4;\n const padded = base64.padEnd(base64.length + padLength, \"=\");\n // Convert to a binary string\n const binary = atob(padded);\n // Convert binary string to buffer\n const buffer = new ArrayBuffer(binary.length);\n const bytes = new Uint8Array(buffer);\n for (let i = 0; i < binary.length; i++) {\n bytes[i] = binary.charCodeAt(i);\n }\n return buffer;\n}\n\nexport function uint8ArrayToHex(bytes: Uint8Array) {\n return Array.from(bytes)\n .map((b) => b.toString(16).padStart(2, \"0\"))\n .join(\"\");\n}\n\nexport function hexToUint8Array(hex: string): Uint8Array {\n const bytes = new Uint8Array(hex.length / 2);\n for (let i = 0; i < bytes.length; i++) {\n bytes[i] = parseInt(hex.slice(i * 2, i * 2 + 2), 16);\n }\n return bytes;\n}\nexport function extractAdditionalFields(\n clientData: Record<string, any>\n): Uint8Array {\n const knownKeys = new Set([\"type\", \"challenge\", \"origin\", \"crossOrigin\"]);\n\n const remaining: Record<string, any> = {};\n for (const key in clientData) {\n if (!knownKeys.has(key)) {\n remaining[key] = clientData[key];\n }\n }\n\n if (Object.keys(remaining).length === 0) {\n return new Uint8Array([]);\n }\n\n // Serialize remaining fields\n const serialized = JSON.stringify(remaining);\n\n // Remove leading '{' and trailing '}' so it can be appended after a comma\n return new TextEncoder().encode(serialized.slice(1, -1));\n}\n\nexport function parseOrigins(\n originsBytes: Uint8Array,\n numOrigins: number\n): string[] {\n const origins: string[] = [];\n let cursor = 0;\n const decoder = new TextDecoder();\n\n for (let i = 0; i < numOrigins; i++) {\n if (cursor + 2 > originsBytes.length) {\n throw new Error(\"MaxLengthExceeded\");\n }\n\n // Read 2-byte little-endian length\n const strLen = originsBytes[cursor] | (originsBytes[cursor + 1] << 8);\n cursor += 2;\n\n if (cursor + strLen > originsBytes.length) {\n throw new Error(\"MaxLengthExceeded\");\n }\n\n const strBytes = originsBytes.slice(cursor, cursor + strLen);\n const origin = decoder.decode(strBytes);\n origins.push(origin);\n\n cursor += strLen;\n }\n\n return origins;\n}\nexport function convertSignatureDERtoRS(signature: Uint8Array): Uint8Array {\n // already in compact format\n if (signature.length === 64) {\n return signature;\n }\n\n if (signature[0] !== 0x30) throw new Error(\"Invalid DER sequence\");\n\n const totalLength = signature[1];\n let offset = 2;\n\n // Handle long-form length (uncommon, but DER allows it)\n if (totalLength > 0x80) {\n const lengthBytes = totalLength & 0x7f;\n offset += lengthBytes;\n }\n\n if (signature[offset] !== 0x02) throw new Error(\"Expected INTEGER for r\");\n const rLen = signature[offset + 1];\n const rStart = offset + 2;\n const r = signature.slice(rStart, rStart + rLen);\n\n offset = rStart + rLen;\n if (signature[offset] !== 0x02) throw new Error(\"Expected INTEGER for s\");\n const sLen = signature[offset + 1];\n const sStart = offset + 2;\n const s = signature.slice(sStart, sStart + sLen);\n\n // Strip any leading 0x00 padding from r/s if necessary\n const rStripped = r[0] === 0x00 && r.length > 32 ? r.slice(1) : r;\n const sStripped = s[0] === 0x00 && s.length > 32 ? s.slice(1) : s;\n\n if (rStripped.length > 32 || sStripped.length > 32) {\n throw new Error(\"r or s length > 32 bytes\");\n }\n\n // Pad to 32 bytes\n const rPad = new Uint8Array(32);\n rPad.set(rStripped, 32 - rStripped.length);\n\n // Convert s to low-s\n const HALF_ORDER = p256.Point.CURVE().n >> 1n;\n const sBig = BigInt(\"0x\" + uint8ArrayToHex(sStripped));\n const sLow = sBig > HALF_ORDER ? p256.Point.CURVE().n - sBig : sBig;\n const sHex = sLow.toString(16).padStart(64, \"0\");\n const sPad = hexToUint8Array(sHex);\n\n return new Uint8Array([...rPad, ...sPad]);\n}\n","import { type CBORType, decodeCBOR, encodeCBOR } from \"@levischuck/tiny-cbor\";\nimport { p256 } from \"@noble/curves/p256\";\nimport type { AuthenticationResponseJSON } from \"@simplewebauthn/server\";\nimport { type Address, getBase58Decoder, getBase58Encoder } from \"gill\";\nimport { fetchDomainConfig } from \"../../generated\";\nimport {\n type TransactionAuthenticationResponse,\n SignedSecp256r1Key,\n} from \"../../types\";\nimport { getDomainConfigAddress } from \"../addresses\";\nimport { getAuthEndpoint, getSolanaRpc } from \"../initialize\";\nimport {\n base64URLStringToBuffer,\n convertSignatureDERtoRS,\n extractAdditionalFields,\n parseOrigins,\n uint8ArrayToHex,\n} from \"./internal\";\n\n/**\n * Opens a popup window for WebAuthn or authentication workflows.\n *\n * This helper creates a centered, resizable popup on desktop, and a full-screen view on mobile.\n * It defaults to the `/loading` route of your configured authentication origin.\n *\n * @param url - The URL to load in the popup. Defaults to `https://auth.revibase.com/loading`.\n * @returns A reference to the newly created popup window, or `null` if blocked by the browser.\n *\n * @throws {Error} If called outside a browser environment.\n *\n */\nexport function createPopUp(url = `${getAuthEndpoint()}/loading`) {\n if (typeof window === \"undefined\") {\n throw new Error(\"Function can only be called in a browser environment\");\n }\n\n const screenWidth = window.innerWidth || screen.availWidth;\n const screenHeight = window.innerHeight || screen.availHeight;\n const isMobile = screenWidth <= 768;\n\n let width: number;\n let height: number;\n let top: number;\n let left: number;\n\n if (isMobile) {\n width = screenWidth;\n height = screenHeight;\n top = 0;\n left = 0;\n } else {\n const currentScreenLeft = window.screenLeft ?? window.screenX;\n const currentScreenTop = window.screenTop ?? window.screenY;\n const screenWidth =\n window.innerWidth ?? document.documentElement.clientWidth ?? screen.width;\n const screenHeight =\n window.innerHeight ??\n document.documentElement.clientHeight ??\n screen.height;\n width = 500;\n height = 600;\n left = currentScreenLeft + (screenWidth - width) / 2;\n top = currentScreenTop + (screenHeight - height) / 2;\n }\n\n const features = [\n `width=${width}`,\n `height=${height}`,\n `top=${top}`,\n `left=${left}`,\n `toolbar=no`,\n `location=no`,\n `status=no`,\n `menubar=no`,\n `scrollbars=yes`,\n `resizable=yes`,\n ].join(\",\");\n\n const passKeyPopup = window.open(url, \"_blank\", features);\n\n if (passKeyPopup) {\n passKeyPopup.focus();\n }\n\n return passKeyPopup;\n}\n\n/**\n * Converts a COSE-encoded P-256 public key (from WebAuthn) into a compressed 33-byte key.\n *\n * The COSE format (RFC 8152) includes separate `x` and `y` coordinates. This function decodes\n * those coordinates, reconstructs the elliptic curve point, and re-encodes it into compressed format.\n *\n * @param publicKey - The COSE-encoded public key as a `Uint8Array` buffer.\n * @returns The compressed public key as a Base58-decoded `Uint8Array`.\n *\n * @example\n * const compressed = convertPubkeyCoseToCompressed(coseKey);\n */\nexport function convertPubkeyCoseToCompressed(\n publicKey: Uint8Array<ArrayBufferLike>\n) {\n const decodedPublicKey = decodeCBOR(publicKey) as Map<number, CBORType>;\n const uncompressedPublicKey = p256.Point.fromAffine({\n x: BigInt(\"0x\" + uint8ArrayToHex(decodedPublicKey.get(-2) as Uint8Array)),\n y: BigInt(\"0x\" + uint8ArrayToHex(decodedPublicKey.get(-3) as Uint8Array)),\n });\n const compressedPubKey = getBase58Decoder().decode(\n uncompressedPublicKey.toBytes(true)\n );\n return compressedPubKey;\n}\n\n/**\n * Converts a compressed P-256 public key into COSE format for WebAuthn compatibility.\n *\n * This function decompresses the 33-byte public key, extracts `x` and `y` coordinates,\n * and encodes them into a COSE-structured CBOR map.\n *\n * @param publicKey - The compressed public key as a Base58 string.\n * @returns The COSE-encoded public key as a `Uint8Array`.\n *\n * @example\n * const coseKey = convertPubkeyCompressedToCose(\"2vMsnB7P5E7EwXj1LbcfLp...\");\n */\nexport function convertPubkeyCompressedToCose(\n publicKey: string\n): Uint8Array<ArrayBuffer> {\n const compressedPublicKey = p256.Point.fromBytes(\n new Uint8Array(getBase58Encoder().encode(publicKey))\n );\n const uncompressedPublicKey = compressedPublicKey.toBytes(false);\n\n const coseDecodedPublicKey = new Map<string | number, CBORType>();\n coseDecodedPublicKey.set(1, 2);\n coseDecodedPublicKey.set(3, -7);\n coseDecodedPublicKey.set(-1, 1);\n coseDecodedPublicKey.set(-2, uncompressedPublicKey.slice(1, 33));\n coseDecodedPublicKey.set(-3, uncompressedPublicKey.slice(33, 65));\n\n return new Uint8Array(encodeCBOR(coseDecodedPublicKey));\n}\n\n/**\n * Constructs a `SignedSecp256r1Key` object from a WebAuthn authentication response.\n *\n * This function extracts, validates, and converts all fields required for on-chain\n * secp256r1 signature verification, including:\n * - Converting signature format (DER → r||s)\n * - Extracting and truncating `clientDataJSON` to ensure deterministic hashing\n * - Computing the domain configuration address (via RP ID hash)\n *\n * Used as the main transformation step before submitting to Solana programs.\n *\n * @param payload - A `TransactionAuthenticationResponse` containing WebAuthn response data.\n * @param originIndex - The index of the origin that initiated the request (retrievable via `getOriginIndex`).\n * @param crossOrigin - Indicates whether the request originated from a different origin (per WebAuthn spec).\n * @returns A `SignedSecp256r1Key` ready for Solana transaction verification.\n *\n * @example\n * const signedKey = await getSignedSecp256r1Key(response, originIndex);\n */\nexport async function getSignedSecp256r1Key(\n payload: TransactionAuthenticationResponse,\n originIndex = 0,\n crossOrigin = false\n): Promise<SignedSecp256r1Key> {\n const { authenticatorData, clientDataJSON, signature } = (\n payload.authResponse as AuthenticationResponseJSON\n ).response;\n\n const authData = new Uint8Array(base64URLStringToBuffer(authenticatorData));\n\n const clientDataJsonParsed = JSON.parse(\n new TextDecoder().decode(base64URLStringToBuffer(clientDataJSON))\n ) as Record<string, any>;\n\n const truncatedClientDataJson = extractAdditionalFields(clientDataJsonParsed);\n\n const convertedSignature = convertSignatureDERtoRS(\n new Uint8Array(base64URLStringToBuffer(signature))\n );\n\n const domainConfig = await getDomainConfigAddress({\n rpIdHash: authData.subarray(0, 32),\n });\n\n return new SignedSecp256r1Key(payload.signer.toString(), {\n verifyArgs: {\n clientDataJson: new Uint8Array(base64URLStringToBuffer(clientDataJSON)),\n truncatedClientDataJson,\n slotNumber: BigInt(payload.slotNumber),\n slotHash: new Uint8Array(getBase58Encoder().encode(payload.slotHash)),\n },\n domainConfig,\n authData,\n signature: convertedSignature,\n originIndex,\n crossOrigin,\n });\n}\n\n/**\n * Retrieves the index of a given origin within a domain configuration account.\n *\n * This index is used on-chain to verify that a WebAuthn request originated from\n * an authorized origin associated with a specific domain configuration.\n *\n * @param domainConfig - The on-chain address of the domain configuration (see `getDomainConfigAddress`).\n * @param origin - The full origin URL (e.g., \"https://auth.example.com\").\n * @returns The 0-based index of the origin within the domain config.\n *\n * @throws {Error} If the origin is not found in the configuration.\n *\n * @example\n * const index = await getOriginIndex(domainConfigAddress, \"https://auth.example.com\");\n */\nexport async function getOriginIndex(domainConfig: Address, origin: string) {\n const { data } = await fetchDomainConfig(getSolanaRpc(), domainConfig);\n const origins = parseOrigins(new Uint8Array(data.origins), data.numOrigins);\n const index = origins.findIndex((x) => x === origin);\n if (index === -1) {\n throw new Error(\"Origin not found in domain config\");\n }\n return index;\n}\n","import {\n address,\n appendTransactionMessageInstructions,\n compressTransactionMessageUsingAddressLookupTables,\n createTransactionMessage,\n getBase58Decoder,\n getBase58Encoder,\n getBase64Decoder,\n getBase64EncodedWireTransaction,\n getSignatureFromTransaction,\n pipe,\n prependTransactionMessageInstructions,\n setTransactionMessageFeePayerSigner,\n setTransactionMessageLifetimeUsingBlockhash,\n signTransactionMessageWithSigners,\n type Address,\n type ReadonlyUint8Array,\n type SignatureBytes,\n type TransactionSigner,\n} from \"gill\";\nimport {\n getSetComputeUnitLimitInstruction,\n getSetComputeUnitPriceInstruction,\n} from \"gill/programs\";\nimport type { MemberKey } from \"../../generated\";\nimport {\n KeyType,\n Permission,\n Permissions,\n Secp256r1Key,\n TransactionManagerPermission,\n type TransactionDetails,\n} from \"../../types\";\nimport { fetchSettingsAccountData, fetchUserAccountData } from \"../compressed\";\nimport {\n getComputeBudgetEstimate,\n getGlobalAuthorizedClient,\n getJitoTipsConfig,\n getSendAndConfirmTransaction,\n getSolanaRpc,\n getSolanaRpcEndpoint,\n} from \"../initialize\";\nimport {\n createEncodedBundle,\n getMedianPriorityFees,\n simulateBundle,\n} from \"./internal\";\n\nexport async function signAndSendBundledTransactions(\n bundle: TransactionDetails[]\n) {\n const simulationBundle = await createEncodedBundle(bundle, true);\n const computeUnits = await simulateBundle(\n simulationBundle.map(getBase64EncodedWireTransaction),\n getSolanaRpcEndpoint()\n );\n const encodedBundle = await createEncodedBundle(\n bundle.map((x, index) => ({\n ...x,\n unitsConsumed: computeUnits[index],\n }))\n );\n const bundleId = await sendJitoBundle(\n encodedBundle.map(getBase64EncodedWireTransaction)\n );\n return bundleId;\n}\n\n/**\n * By default, median priority fees are added to the transaction\n */\nexport async function signAndSendTransaction({\n instructions,\n payer,\n addressesByLookupTableAddress,\n}: TransactionDetails) {\n const latestBlockHash = await getSolanaRpc().getLatestBlockhash().send();\n const tx = await pipe(\n createTransactionMessage({ version: 0 }),\n (tx) => appendTransactionMessageInstructions([...instructions], tx),\n (tx) => setTransactionMessageFeePayerSigner(payer, tx),\n (tx) =>\n setTransactionMessageLifetimeUsingBlockhash(latestBlockHash.value, tx),\n (tx) =>\n addressesByLookupTableAddress\n ? compressTransactionMessageUsingAddressLookupTables(\n tx,\n addressesByLookupTableAddress\n )\n : tx,\n async (tx) => {\n const [estimatedUnits, priorityFees] = await Promise.all([\n getComputeBudgetEstimate()(tx),\n getMedianPriorityFees(\n getSolanaRpc(),\n tx.instructions.flatMap((x) => x.accounts ?? [])\n ),\n ]);\n const computeUnits = Math.ceil(estimatedUnits * 1.1);\n return prependTransactionMessageInstructions(\n [\n ...(computeUnits > 200000\n ? [\n getSetComputeUnitLimitInstruction({\n units: computeUnits,\n }),\n ]\n : []),\n ...(priorityFees > 0\n ? [\n getSetComputeUnitPriceInstruction({\n microLamports: priorityFees,\n }),\n ]\n : []),\n ],\n tx\n );\n },\n async (tx) => await signTransactionMessageWithSigners(await tx)\n );\n await getSendAndConfirmTransaction()(tx, {\n commitment: \"confirmed\",\n skipPreflight: true,\n });\n\n return getSignatureFromTransaction(tx);\n}\n\nexport async function sendJitoBundle(\n serializedTransactions: string[],\n maxRetries = 10,\n delayMs = 1000,\n jitoTipsConfig = getJitoTipsConfig()\n): Promise<string> {\n const { blockEngineUrl: jitoBlockEngineUrl } = jitoTipsConfig;\n for (let attempt = 1; attempt <= maxRetries; attempt++) {\n const response = await fetch(`${jitoBlockEngineUrl}/bundles`, {\n method: \"POST\",\n headers: { \"Content-Type\": \"application/json\" },\n body: JSON.stringify({\n jsonrpc: \"2.0\",\n id: 1,\n method: \"sendBundle\",\n params: [\n serializedTransactions,\n {\n encoding: \"base64\",\n },\n ],\n }),\n });\n\n if (response.status === 429) {\n if (attempt < maxRetries) {\n await new Promise((resolve) => setTimeout(resolve, delayMs));\n continue;\n }\n }\n\n const data = await response.json();\n\n if (data.error) {\n throw new Error(\n `Error sending bundles: ${JSON.stringify(data.error, null, 2)}`\n );\n }\n\n return data.result as string;\n }\n\n throw new Error(\"Failed to send bundle after retries.\");\n}\nexport async function pollJitoBundleConfirmation(\n bundleId: string,\n maxRetries = 30,\n delayMs = 3000,\n jitoTipsConfig = getJitoTipsConfig()\n): Promise<string> {\n const { blockEngineUrl: jitoBlockEngineUrl } = jitoTipsConfig;\n for (let attempt = 1; attempt <= maxRetries; attempt++) {\n const response = await fetch(`${jitoBlockEngineUrl}/getBundleStatuses`, {\n method: \"POST\",\n headers: { \"Content-Type\": \"application/json\" },\n body: JSON.stringify({\n jsonrpc: \"2.0\",\n id: 1,\n method: \"getBundleStatuses\",\n params: [[bundleId]],\n }),\n });\n\n if (response.status === 429) {\n if (attempt < maxRetries) {\n await new Promise((resolve) => setTimeout(resolve, delayMs));\n continue;\n }\n }\n\n const data = await response.json();\n\n if (data.error) {\n throw new Error(\n `Error sending bundles: ${JSON.stringify(data.error, null, 2)}`\n );\n }\n\n const results = data.result as {\n context: {\n slot: number;\n };\n value: {\n bundle_id: string;\n transactions: string[];\n slot: number;\n confirmation_status: \"processed\" | \"confirmed\" | \"finalized\";\n err: {\n Ok: null;\n };\n }[];\n };\n\n if (results.value.length) {\n const value = results.value[0];\n if (\n value.confirmation_status === \"confirmed\" ||\n value.confirmation_status === \"finalized\"\n ) {\n return value.transactions[value.transactions.length - 1];\n }\n }\n\n if (attempt < maxRetries) {\n await new Promise((resolve) => setTimeout(resolve, delayMs));\n continue;\n }\n }\n\n throw new Error(\"Failed to get bundle status after retries.\");\n}\nexport async function resolveTransactionManagerSigner({\n signer,\n index,\n transactionMessageBytes,\n cachedAccounts,\n}: {\n signer: Secp256r1Key | Address;\n index: number | bigint;\n transactionMessageBytes?: ReadonlyUint8Array;\n cachedAccounts?: Map<string, any>;\n}) {\n const settingsData = await fetchSettingsAccountData(index, cachedAccounts);\n if (settingsData.threshold > 1) {\n throw new Error(\n \"Multi-signature transactions with threshold > 1 are not supported yet.\"\n );\n }\n const { permissions } =\n settingsData.members.find(\n (m) => convertMemberKeyToString(m.pubkey) === signer.toString()\n ) ?? {};\n if (!permissions) {\n throw new Error(\"No permissions found for the current member.\");\n }\n const hasInitiate = Permissions.has(\n permissions,\n Permission.InitiateTransaction\n );\n const hasVote = Permissions.has(permissions, Permission.VoteTransaction);\n const hasExecute = Permissions.has(\n permissions,\n Permission.ExecuteTransaction\n );\n // If signer has full signing rights, no transaction manager is needed\n if (hasInitiate && hasVote && hasExecute) {\n return null;\n }\n if (!hasVote || !hasExecute) {\n throw new Error(\"Signer lacks the required Vote/Execute permissions.\");\n }\n\n // Otherwise, require a transaction manager + vote + execute rights\n const transactionManager = settingsData.members.find((m) =>\n Permissions.has(m.permissions, TransactionManagerPermission)\n );\n if (!transactionManager) {\n throw new Error(\"No transaction manager available in wallet.\");\n }\n\n const transactionManagerAddress = address(\n convertMemberKeyToString(transactionManager.pubkey)\n );\n\n const userAccountData = await fetchUserAccountData(\n transactionManagerAddress,\n cachedAccounts\n );\n\n if (userAccountData.transactionManagerUrl.__option === \"None\") {\n throw new Error(\n \"Transaction manager endpoint is missing for this account.\"\n );\n }\n\n return createTransactionManagerSigner(\n transactionManagerAddress,\n userAccountData.transactionManagerUrl.value,\n transactionMessageBytes\n );\n}\n\nexport function createTransactionManagerSigner(\n address: Address,\n url: string,\n transactionMessageBytes?: ReadonlyUint8Array\n): TransactionSigner {\n return {\n address,\n async signTransactions(transactions) {\n const payload: Record<\n string,\n string | string[] | { publicKey: string; signatures: string[] }\n > = {\n publicKey: address.toString(),\n transactions: transactions.map(getBase64EncodedWireTransaction),\n };\n\n if (transactionMessageBytes) {\n payload.transactionMessageBytes = getBase64Decoder().decode(\n transactionMessageBytes\n );\n }\n\n const authorizedClient = getGlobalAuthorizedClient();\n if (authorizedClient) {\n const { url, publicKey } = authorizedClient;\n const response = await fetch(url, {\n method: \"POST\",\n headers: { \"Content-Type\": \"application/json\" },\n body: JSON.stringify({\n transactions: payload.transactions,\n publicKey,\n }),\n });\n const data = (await response.json()) as\n | { signatures: string[] }\n | { error: string };\n if (\"error\" in data) {\n throw new Error(data.error);\n }\n payload.authorizedClient = {\n publicKey,\n signatures: data.signatures,\n };\n }\n\n const response = await fetch(url, {\n method: \"POST\",\n headers: { \"Content-Type\": \"application/json\" },\n body: JSON.stringify(payload),\n });\n\n const data = (await response.json()) as\n | { signatures: string[] }\n | { error: string };\n\n if (\"error\" in data) {\n throw new Error(data.error);\n }\n\n return data.signatures.map((sig) => ({\n [address]: getBase58Encoder().encode(sig) as SignatureBytes,\n }));\n },\n };\n}\nexport function convertMemberKeyToString(memberKey: MemberKey) {\n if (memberKey.keyType === KeyType.Ed25519) {\n return getBase58Decoder().decode(memberKey.key.subarray(1, 33));\n } else {\n return getBase58Decoder().decode(memberKey.key);\n }\n}\n","import type { ValidityProofWithContext } from \"@lightprotocol/stateless.js\";\nimport BN from \"bn.js\";\nimport {\n AccountRole,\n type AccountSignerMeta,\n type Address,\n createNoopSigner,\n getAddressEncoder,\n none,\n some,\n type TransactionSigner,\n} from \"gill\";\nimport {\n type AddMemberArgs,\n type CompressedSettings,\n type ConfigAction,\n DelegateOp,\n type DelegateOpArgs,\n type EditMemberArgs,\n getChangeConfigCompressedInstruction,\n getChangeConfigInstructionAsync,\n getCompressedSettingsDecoder,\n getUserDecoder,\n type IPermissions,\n type MemberKey,\n type RemoveMemberArgs,\n type SettingsMutArgs,\n type User,\n type UserMutArgs,\n} from \"../generated\";\nimport {\n type ConfigurationArgs,\n type IPermission,\n KeyType,\n PermanentMemberPermission,\n Permission,\n type PermissionArgs,\n Permissions,\n Secp256r1Key,\n SignedSecp256r1Key,\n TransactionManagerPermission,\n} from \"../types\";\nimport {\n convertMemberKeyToString,\n fetchSettingsAccountData,\n getCompressedSettingsAddressFromIndex,\n getUserAccountAddress,\n getWalletAddressFromIndex,\n} from \"../utils\";\nimport {\n convertToCompressedProofArgs,\n getCompressedAccountHashes,\n getCompressedAccountMutArgs,\n getValidityProofWithRetry,\n} from \"../utils/compressed/internal\";\nimport { PackedAccounts } from \"../utils/compressed/packedAccounts\";\nimport { extractSecp256r1VerificationArgs } from \"../utils/transaction/internal\";\nimport type { Secp256r1VerifyInput } from \"./secp256r1Verify\";\n\nexport async function changeConfig({\n index,\n configActionsArgs,\n payer,\n compressed = false,\n cachedAccounts,\n}: {\n index: bigint | number;\n configActionsArgs: ConfigurationArgs[];\n payer: TransactionSigner;\n compressed?: boolean;\n cachedAccounts?: Map<string, any>;\n}) {\n // --- Stage 1: Setup Addresses---\n const authority = await getWalletAddressFromIndex(index);\n\n const addDelegates: { address: BN; type: \"User\" }[] = [];\n const removeDelegates: { address: BN; type: \"User\" }[] = [];\n\n for (const action of configActionsArgs) {\n if (action.type === \"AddMembers\") {\n addDelegates.push(\n ...action.members.map((m) =>\n m.pubkey instanceof SignedSecp256r1Key\n ? {\n address: getUserAccountAddress(m.pubkey).address,\n type: \"User\" as const,\n }\n : m.setAsDelegate\n ? {\n address: getUserAccountAddress(m.pubkey.address).address,\n type: \"User\" as const,\n }\n : {\n address: getUserAccountAddress(m.pubkey).address,\n type: \"User\" as const,\n }\n )\n );\n } else if (action.type === \"RemoveMembers\") {\n removeDelegates.push(\n ...action.members.map((m) => ({\n address: getUserAccountAddress(m.pubkey).address,\n type: \"User\" as const,\n }))\n );\n } else if (action.type === \"EditPermissions\") {\n for (const m of action.members) {\n if (m.delegateOperation !== DelegateOp.Ignore) {\n (m.delegateOperation === DelegateOp.Add\n ? addDelegates\n : removeDelegates\n ).push({\n address: getUserAccountAddress(m.pubkey).address,\n type: \"User\" as const,\n });\n }\n }\n }\n }\n\n // --- Stage 2: Proof preparation ---\n const packedAccounts = new PackedAccounts();\n let proof: ValidityProofWithContext | null = null;\n let settingsMutArgs: SettingsMutArgs | null = null;\n let userMutArgs: UserMutArgs[] = [];\n\n if (addDelegates.length || removeDelegates.length || compressed) {\n await packedAccounts.addSystemAccounts();\n\n const addresses = [\n ...(compressed\n ? [\n {\n address: getCompressedSettingsAddressFromIndex(index).address,\n type: \"Settings\" as const,\n },\n ]\n : []),\n ...removeDelegates,\n ...addDelegates,\n ];\n\n const hashesWithTree = addresses.length\n ? await getCompressedAccountHashes(addresses, cachedAccounts)\n : [];\n\n if (hashesWithTree.length) {\n proof = await getValidityProofWithRetry(hashesWithTree, []);\n\n const settingsHashes = hashesWithTree.filter(\n (x) => x.type === \"Settings\"\n );\n const userHashes = hashesWithTree.filter((x) => x.type === \"User\");\n\n if (compressed && proof) {\n settingsMutArgs = getCompressedAccountMutArgs<CompressedSettings>(\n packedAccounts,\n proof.treeInfos.slice(0, 1),\n proof.leafIndices.slice(0, 1),\n proof.rootIndices.slice(0, 1),\n proof.proveByIndices.slice(0, 1),\n settingsHashes,\n getCompressedSettingsDecoder()\n )[0];\n }\n\n if (userHashes.length && proof) {\n userMutArgs = getCompressedAccountMutArgs<User>(\n packedAccounts,\n proof.treeInfos.slice(compressed ? 1 : 0),\n proof.leafIndices.slice(compressed ? 1 : 0),\n proof.rootIndices.slice(compressed ? 1 : 0),\n proof.proveByIndices.slice(compressed ? 1 : 0),\n userHashes,\n getUserDecoder()\n );\n }\n }\n }\n // --- Stage 3: Build config actions ---\n const secp256r1VerifyInput: Secp256r1VerifyInput = [];\n const configActions: ConfigAction[] = [];\n\n for (const action of configActionsArgs) {\n switch (action.type) {\n case \"AddMembers\": {\n const field: AddMemberArgs[] = [];\n for (const m of action.members) {\n if (m.pubkey instanceof SignedSecp256r1Key) {\n const index = secp256r1VerifyInput.length;\n const { message, signature, publicKey, domainConfig } =\n extractSecp256r1VerificationArgs(m.pubkey, index);\n\n if (message && signature && publicKey) {\n secp256r1VerifyInput.push({ message, signature, publicKey });\n }\n\n if (domainConfig) {\n packedAccounts.addPreAccounts([\n { address: domainConfig, role: AccountRole.READONLY },\n ]);\n }\n\n const userArgs = await getUserArgs(m.pubkey, userMutArgs);\n if (userArgs) {\n field.push(\n convertAddMember({\n ...m,\n permissionArgs: m.permissions,\n index,\n userMutArgs: userArgs,\n })\n );\n }\n } else {\n if (m.setAsDelegate) {\n packedAccounts.addPreAccounts([\n {\n address: m.pubkey.address,\n role: AccountRole.READONLY_SIGNER,\n signer: m.pubkey,\n } as AccountSignerMeta,\n ]);\n }\n\n const userArgs = await getUserArgs(\n m.setAsDelegate ? m.pubkey.address : m.pubkey,\n userMutArgs\n );\n if (userArgs) {\n field.push(\n convertAddMember({\n ...m,\n permissionArgs: m.permissions,\n index: -1,\n userMutArgs: userArgs,\n })\n );\n }\n }\n }\n configActions.push({ __kind: action.type, fields: [field] });\n break;\n }\n\n case \"RemoveMembers\": {\n const field = await Promise.all(\n action.members.map(async (m) => {\n const userArgs = await getUserArgs(m.pubkey, userMutArgs);\n if (!userArgs) throw new Error(\"User account not found\");\n return convertRemoveMember({ ...m, userMutArgs: userArgs });\n })\n );\n configActions.push({\n __kind: action.type,\n fields: [field],\n });\n break;\n }\n\n case \"EditPermissions\": {\n const settingsData = await fetchSettingsAccountData(\n index,\n cachedAccounts\n );\n const permanentMember = settingsData.members.find((x) =>\n Permissions.has(x.permissions, PermanentMemberPermission)\n );\n const transactionManager = settingsData.members.find((x) =>\n Permissions.has(x.permissions, TransactionManagerPermission)\n );\n const field = await Promise.all(\n action.members.map(async (m) => {\n const isPermanentMember =\n !!permanentMember?.pubkey &&\n convertMemberKeyToString(permanentMember.pubkey) ===\n m.pubkey.toString();\n const isTransactionManager =\n !!transactionManager?.pubkey &&\n convertMemberKeyToString(transactionManager.pubkey) ===\n m.pubkey.toString();\n\n if (isTransactionManager) {\n throw new Error(\n \"Transaction Manager's permission cannot be changed.\"\n );\n }\n\n const userArgs =\n m.delegateOperation !== DelegateOp.Ignore\n ? await getUserArgs(m.pubkey, userMutArgs)\n : undefined;\n\n return convertEditMember({\n ...m,\n permissionArgs: m.permissions,\n isPermanentMember,\n userMutArgs: userArgs,\n });\n })\n );\n configActions.push({ __kind: action.type, fields: [field] });\n break;\n }\n\n default:\n configActions.push({ __kind: action.type, fields: [action.threshold] });\n }\n }\n\n // --- Stage 4: Instruction assembly ---\n const { remainingAccounts, systemOffset } = packedAccounts.toAccountMetas();\n const compressedProofArgs = convertToCompressedProofArgs(proof, systemOffset);\n const instructions = compressed\n ? [\n getChangeConfigCompressedInstruction({\n configActions,\n payer,\n authority: createNoopSigner(authority),\n compressedProofArgs,\n settingsMut: settingsMutArgs!,\n remainingAccounts,\n }),\n ]\n : [\n await getChangeConfigInstructionAsync({\n settingsIndex: index,\n configActions,\n payer,\n compressedProofArgs,\n remainingAccounts,\n }),\n ];\n\n return { instructions, secp256r1VerifyInput };\n}\n\nasync function getUserArgs(\n pubkey: Address | Secp256r1Key,\n userMutArgs: UserMutArgs[]\n): Promise<UserMutArgs | undefined> {\n const { address } = getUserAccountAddress(pubkey);\n const mutArg = userMutArgs.find((arg) =>\n new BN(new Uint8Array(arg.accountMeta.address)).eq(address)\n );\n return mutArg;\n}\n\nfunction convertEditMember({\n pubkey,\n permissionArgs,\n userMutArgs,\n delegateOperation,\n isPermanentMember,\n}: {\n pubkey: Address | Secp256r1Key;\n permissionArgs: PermissionArgs;\n isPermanentMember: boolean;\n userMutArgs?: UserMutArgs;\n delegateOperation: DelegateOpArgs;\n}): EditMemberArgs {\n if (isPermanentMember) {\n if (userMutArgs || delegateOperation !== DelegateOp.Ignore) {\n throw new Error(\"Delegation cannot be modified for a permanent member.\");\n }\n }\n const permissions = convertPermissions(permissionArgs, isPermanentMember);\n\n return {\n memberKey: convertPubkeyToMemberkey(pubkey),\n permissions,\n userArgs: userMutArgs ? some(userMutArgs) : none(),\n delegateOperation,\n };\n}\n\nfunction convertRemoveMember({\n pubkey,\n userMutArgs,\n}: {\n pubkey: Address | Secp256r1Key;\n userMutArgs: UserMutArgs;\n}): RemoveMemberArgs {\n const userAccountData = userMutArgs.data;\n const isPermanentMember = userAccountData.isPermanentMember;\n if (isPermanentMember) {\n throw new Error(\"Permanent Member cannot be removed from the wallet.\");\n }\n return {\n memberKey: convertPubkeyToMemberkey(pubkey),\n userArgs:\n userMutArgs.data.settingsIndex.__option === \"Some\"\n ? { __kind: \"Mutate\", fields: [userMutArgs] }\n : { __kind: \"Read\", fields: [userMutArgs] },\n };\n}\n\nfunction convertAddMember({\n pubkey,\n permissionArgs,\n index,\n userMutArgs,\n setAsDelegate,\n isTransactionManager,\n}: {\n pubkey: TransactionSigner | SignedSecp256r1Key | Address;\n permissionArgs: PermissionArgs;\n index: number;\n userMutArgs: UserMutArgs;\n setAsDelegate: boolean;\n isTransactionManager: boolean;\n}): AddMemberArgs {\n const permissions = getAddMemberPermission(\n userMutArgs,\n setAsDelegate,\n permissionArgs,\n isTransactionManager\n );\n return {\n member: {\n permissions,\n pubkey: convertPubkeyToMemberkey(\n pubkey instanceof SignedSecp256r1Key\n ? pubkey\n : setAsDelegate\n ? (pubkey as TransactionSigner).address\n : (pubkey as Address)\n ),\n },\n verifyArgs:\n pubkey instanceof SignedSecp256r1Key && pubkey.verifyArgs && index !== -1\n ? some({\n truncatedClientDataJson: pubkey.verifyArgs.truncatedClientDataJson,\n slotNumber: pubkey.verifyArgs.slotNumber,\n signedMessageIndex: index,\n originIndex: pubkey.originIndex,\n crossOrigin: pubkey.crossOrigin,\n })\n : none(),\n userArgs: setAsDelegate\n ? { __kind: \"Mutate\", fields: [userMutArgs] }\n : { __kind: \"Read\", fields: [userMutArgs] },\n setAsDelegate,\n };\n}\n\nfunction convertPubkeyToMemberkey(pubkey: Address | Secp256r1Key): MemberKey {\n if (pubkey instanceof Secp256r1Key) {\n return { keyType: KeyType.Secp256r1, key: pubkey.toBytes() };\n } else {\n return {\n keyType: KeyType.Ed25519,\n key: new Uint8Array([\n 0, // pad start with zero to make it 33 bytes\n ...getAddressEncoder().encode(pubkey),\n ]),\n };\n }\n}\n\nfunction getAddMemberPermission(\n userMutArgs: UserMutArgs,\n setAsDelegate: boolean,\n permissionArgs: PermissionArgs,\n isTransactionManager: boolean\n) {\n const userAccountData = userMutArgs.data;\n const isPermanentMember = userAccountData.isPermanentMember;\n if (isPermanentMember) {\n if (!setAsDelegate) {\n throw new Error(\n \"Permanent members must also be delegates. Please set `setAsDelegate = true`.\"\n );\n }\n if (userAccountData.settingsIndex.__option === \"Some\") {\n throw new Error(\n \"This user is already registered as a permanent member in another wallet. A permanent member can only belong to one wallet.\"\n );\n }\n }\n\n if (isTransactionManager) {\n if (permissionArgs.execute || permissionArgs.vote) {\n throw new Error(\"Transaction Manager can only have initiate permission\");\n }\n if (setAsDelegate) {\n throw new Error(\n \"Transaction Manager cannot be a delegate. Please set `setAsDelegate = false`.\"\n );\n }\n }\n\n const permissions = convertPermissions(\n permissionArgs,\n isPermanentMember,\n isTransactionManager\n );\n return permissions;\n}\n\nfunction convertPermissions(\n p: PermissionArgs,\n isPermanentMember = false,\n isTransactionManager = false\n): IPermissions {\n const perms: IPermission[] = [];\n if (p.initiate) perms.push(Permission.InitiateTransaction);\n if (p.vote) perms.push(Permission.VoteTransaction);\n if (p.execute) perms.push(Permission.ExecuteTransaction);\n if (isPermanentMember) perms.push(PermanentMemberPermission);\n if (isTransactionManager) perms.push(TransactionManagerPermission);\n\n return Permissions.fromPermissions(perms);\n}\n","import {\n address,\n combineCodec,\n createDecoder,\n createEncoder,\n fixDecoderSize,\n fixEncoderSize,\n getBytesDecoder,\n getBytesEncoder,\n getStructDecoder,\n getStructEncoder,\n getU16Decoder,\n getU16Encoder,\n getU8Decoder,\n getU8Encoder,\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} from \"gill\";\n\nconst COMPRESSED_PUBKEY_SERIALIZED_SIZE = 33;\nconst SIGNATURE_SERIALIZED_SIZE = 64;\nconst SIGNATURE_OFFSETS_SERIALIZED_SIZE = 14;\nconst SIGNATURE_OFFSETS_START = 2;\nconst SECP256R1_PROGRAM_ADDRESS = address(\n \"Secp256r1SigVerify1111111111111111111111111\"\n);\n\nexport type Secp256r1VerifyInput = {\n publicKey: ReadonlyUint8Array;\n signature: ReadonlyUint8Array;\n message: ReadonlyUint8Array;\n}[];\n\nexport type Secp256r1VerifyInstruction<\n TProgram extends string = typeof SECP256R1_PROGRAM_ADDRESS,\n> = Instruction<TProgram> &\n InstructionWithData<Uint8Array> &\n InstructionWithAccounts<[]>;\n\nexport type Secp256r1VerifyInstructionData = {\n numSignatures: number;\n padding: number;\n offsets: Secp256r1SignatureOffsetsDataArgs[];\n payload: Secp256r1VerifyInput;\n};\n\nexport type Secp256r1SignatureOffsetsDataArgs = {\n signatureOffset: number;\n signatureInstructionIndex: number;\n publicKeyOffset: number;\n publicKeyInstructionIndex: number;\n messageDataOffset: number;\n messageDataSize: number;\n messageInstructionIndex: number;\n};\n\nexport function getSecp256r1SignatureOffsetsDataEncoder(): Encoder<Secp256r1SignatureOffsetsDataArgs> {\n return getStructEncoder([\n [\"signatureOffset\", getU16Encoder()],\n [\"signatureInstructionIndex\", getU16Encoder()],\n [\"publicKeyOffset\", getU16Encoder()],\n [\"publicKeyInstructionIndex\", getU16Encoder()],\n [\"messageDataOffset\", getU16Encoder()],\n [\"messageDataSize\", getU16Encoder()],\n [\"messageInstructionIndex\", getU16Encoder()],\n ]);\n}\n\nexport function getSecp256r1SignatureOffsetsDataDecoder(): Decoder<Secp256r1SignatureOffsetsDataArgs> {\n return getStructDecoder([\n [\"signatureOffset\", getU16Decoder()],\n [\"signatureInstructionIndex\", getU16Decoder()],\n [\"publicKeyOffset\", getU16Decoder()],\n [\"publicKeyInstructionIndex\", getU16Decoder()],\n [\"messageDataOffset\", getU16Decoder()],\n [\"messageDataSize\", getU16Decoder()],\n [\"messageInstructionIndex\", getU16Decoder()],\n ]);\n}\n\nexport function getSecp256r1VerifyInstructionDataDecoder(): Decoder<Secp256r1VerifyInstructionData> {\n return createDecoder({\n read: (bytes, offset = 0) => {\n const numSignatures = getU8Decoder().decode(bytes, offset);\n offset += 1;\n\n const padding = getU8Decoder().decode(bytes, offset);\n offset += 1;\n\n const offsets: Secp256r1SignatureOffsetsDataArgs[] = [];\n const offsetDecoder = getSecp256r1SignatureOffsetsDataDecoder();\n for (let i = 0; i < numSignatures; i++) {\n offsets.push(offsetDecoder.decode(bytes, offset));\n offset += SIGNATURE_OFFSETS_SERIALIZED_SIZE;\n }\n const payload: Secp256r1VerifyInput = [];\n\n for (let i = 0; i < numSignatures; i++) {\n const publicKey = fixDecoderSize(\n getBytesDecoder(),\n COMPRESSED_PUBKEY_SERIALIZED_SIZE\n ).decode(bytes, offset);\n offset += COMPRESSED_PUBKEY_SERIALIZED_SIZE;\n\n const signature = fixDecoderSize(\n getBytesDecoder(),\n SIGNATURE_SERIALIZED_SIZE\n ).decode(bytes, offset);\n offset += SIGNATURE_SERIALIZED_SIZE;\n\n const messageSize = offsets[i].messageDataSize;\n const message = fixDecoderSize(getBytesDecoder(), messageSize).decode(\n bytes,\n offset\n );\n offset += messageSize;\n\n payload.push({ publicKey, signature, message });\n }\n return [\n {\n numSignatures,\n padding,\n offsets,\n payload,\n },\n offset,\n ];\n },\n });\n}\n\nexport function getSecp256r1VerifyInstructionDataEncoder(): Encoder<Secp256r1VerifyInstructionDataArgs> {\n return createEncoder({\n getSizeFromValue: (value: Secp256r1VerifyInstructionData) => {\n const offsetSize =\n SIGNATURE_OFFSETS_SERIALIZED_SIZE * value.offsets.length;\n const payloadSize = value.payload.reduce((sum, p) => {\n return (\n sum +\n COMPRESSED_PUBKEY_SERIALIZED_SIZE +\n SIGNATURE_SERIALIZED_SIZE +\n p.message.length\n );\n }, 0);\n return 2 + offsetSize + payloadSize; // 1 byte for numSignatures, 1 for padding\n },\n write: (value: Secp256r1VerifyInstructionData, bytes, offset = 0) => {\n offset = getU8Encoder().write(value.numSignatures, bytes, offset);\n offset = getU8Encoder().write(value.padding, bytes, offset);\n\n const offsetEncoder = getSecp256r1SignatureOffsetsDataEncoder();\n for (const offsetEntry of value.offsets) {\n offset = offsetEncoder.write(offsetEntry, bytes, offset);\n }\n\n for (const entry of value.payload) {\n offset = fixEncoderSize(\n getBytesEncoder(),\n COMPRESSED_PUBKEY_SERIALIZED_SIZE\n ).write(entry.publicKey, bytes, offset);\n\n offset = fixEncoderSize(\n getBytesEncoder(),\n SIGNATURE_SERIALIZED_SIZE\n ).write(entry.signature, bytes, offset);\n\n offset = getBytesEncoder().write(entry.message, bytes, offset);\n }\n\n return offset;\n },\n });\n}\n\nexport type Secp256r1VerifyInstructionDataArgs = {\n numSignatures: number;\n padding: number;\n offsets: Secp256r1SignatureOffsetsDataArgs[];\n payload: Secp256r1VerifyInput;\n};\n\nexport function getSecp256r1VerifyInstructionDataCodec(): Codec<\n Secp256r1VerifyInstructionDataArgs,\n Secp256r1VerifyInstructionData\n> {\n return combineCodec(\n getSecp256r1VerifyInstructionDataEncoder(),\n getSecp256r1VerifyInstructionDataDecoder()\n );\n}\n\nexport function getSecp256r1VerifyInstruction<\n TProgramAddress extends Address = typeof SECP256R1_PROGRAM_ADDRESS,\n>(\n input: Secp256r1VerifyInput,\n config?: { programAddress?: TProgramAddress }\n): Secp256r1VerifyInstruction<TProgramAddress> {\n let numSignatures = input.length;\n let currentOffset =\n SIGNATURE_OFFSETS_START + numSignatures * SIGNATURE_OFFSETS_SERIALIZED_SIZE;\n const offsets = [];\n for (let i = 0; i < numSignatures; i++) {\n const { message } = input[i];\n const publicKeyOffset = currentOffset;\n const signatureOffset = publicKeyOffset + COMPRESSED_PUBKEY_SERIALIZED_SIZE;\n const messageDataOffset = signatureOffset + SIGNATURE_SERIALIZED_SIZE;\n offsets.push({\n publicKeyOffset,\n publicKeyInstructionIndex: 0xffff,\n signatureOffset,\n signatureInstructionIndex: 0xffff,\n messageDataOffset,\n messageDataSize: message.length,\n messageInstructionIndex: 0xffff,\n } as Secp256r1SignatureOffsetsDataArgs);\n currentOffset +=\n COMPRESSED_PUBKEY_SERIALIZED_SIZE +\n SIGNATURE_SERIALIZED_SIZE +\n message.length;\n }\n\n // Program address.\n const programAddress = config?.programAddress ?? SECP256R1_PROGRAM_ADDRESS;\n\n // Original args.\n const args = {\n numSignatures,\n padding: 0,\n offsets,\n payload: input,\n };\n\n // Resolve default values.\n const instruction = {\n accounts: [],\n programAddress,\n data: getSecp256r1VerifyInstructionDataEncoder().encode(\n args as Secp256r1VerifyInstructionDataArgs\n ),\n } as Secp256r1VerifyInstruction<TProgramAddress>;\n\n return instruction;\n}\n\nexport type ParsedSecp256r1VerifyInstruction<\n TProgram extends string = typeof SECP256R1_PROGRAM_ADDRESS,\n> = {\n programAddress: Address<TProgram>;\n accounts: {};\n data: Secp256r1VerifyInstructionData;\n};\n\nexport function parseSecp256r1VerifyInstruction<TProgram extends string>(\n instruction: Instruction<TProgram> & InstructionWithData<Uint8Array>\n): ParsedSecp256r1VerifyInstruction<TProgram> {\n return {\n programAddress: instruction.programAddress,\n accounts: {},\n data: getSecp256r1VerifyInstructionDataDecoder().decode(instruction.data),\n };\n}\n","import type { ValidityProofWithContext } from \"@lightprotocol/stateless.js\";\nimport {\n AccountRole,\n type AccountSignerMeta,\n type TransactionSigner,\n} from \"gill\";\nimport {\n type CompressedSettings,\n getCompressedSettingsDecoder,\n getCompressSettingsAccountInstruction,\n type Secp256r1VerifyArgsWithDomainAddressArgs,\n type SettingsCreateOrMutateArgs,\n} from \"../generated\";\nimport { SignedSecp256r1Key } from \"../types\";\nimport {\n getCompressedSettingsAddressFromIndex,\n getSettingsFromIndex,\n} from \"../utils\";\nimport {\n convertToCompressedProofArgs,\n getCompressedAccount,\n getCompressedAccountHashes,\n getCompressedAccountInitArgs,\n getCompressedAccountMutArgs,\n getValidityProofWithRetry,\n} from \"../utils/compressed/internal\";\nimport { PackedAccounts } from \"../utils/compressed/packedAccounts\";\nimport {\n extractSecp256r1VerificationArgs,\n getDeduplicatedSigners,\n} from \"../utils/transaction/internal\";\nimport {\n getSecp256r1VerifyInstruction,\n type Secp256r1VerifyInput,\n} from \"./secp256r1Verify\";\n\nexport async function compressSettingsAccount({\n index,\n payer,\n signers,\n cachedAccounts,\n}: {\n index: number | bigint;\n payer: TransactionSigner;\n signers: (SignedSecp256r1Key | TransactionSigner)[];\n cachedAccounts?: Map<string, any>;\n}) {\n const packedAccounts = new PackedAccounts();\n await packedAccounts.addSystemAccounts();\n\n const settings = await getSettingsFromIndex(index);\n const { address: settingsAddress, addressTree } =\n getCompressedSettingsAddressFromIndex(index);\n const result = await getCompressedAccount(settingsAddress, cachedAccounts);\n\n let settingsArg: SettingsCreateOrMutateArgs;\n let proof: ValidityProofWithContext;\n if (!result?.data?.data) {\n const newAddressParams = [\n {\n address: settingsAddress,\n tree: addressTree,\n queue: addressTree,\n type: \"Settings\" as const,\n },\n ];\n\n proof = await getValidityProofWithRetry([], newAddressParams);\n const settingsInitArgs = (\n await getCompressedAccountInitArgs(\n packedAccounts,\n proof.treeInfos,\n proof.roots,\n proof.rootIndices,\n newAddressParams\n )\n )[0];\n settingsArg = {\n __kind: \"Create\",\n fields: [settingsInitArgs] as const,\n };\n } else {\n const data = getCompressedSettingsDecoder().decode(result.data.data);\n if (data.data.__option === \"None\") {\n const hashesWithTree = await getCompressedAccountHashes(\n [{ address: settingsAddress, type: \"Settings\" }],\n cachedAccounts\n );\n\n proof = await getValidityProofWithRetry(hashesWithTree, []);\n const settingsMutArgs = getCompressedAccountMutArgs<CompressedSettings>(\n packedAccounts,\n proof.treeInfos,\n proof.leafIndices,\n proof.rootIndices,\n proof.proveByIndices,\n hashesWithTree.filter((x) => x.type === \"Settings\"),\n getCompressedSettingsDecoder()\n )[0];\n settingsArg = {\n __kind: \"Mutate\",\n fields: [settingsMutArgs] as const,\n };\n } else {\n throw new Error(\"Settings account is already compressed.\");\n }\n }\n\n const dedupSigners = getDeduplicatedSigners(signers);\n\n const secp256r1Signers = dedupSigners.filter(\n (x) => x instanceof SignedSecp256r1Key\n );\n\n const secp256r1VerifyInput: Secp256r1VerifyInput = [];\n const secp256r1VerifyArgs: Secp256r1VerifyArgsWithDomainAddressArgs[] = [];\n for (const x of secp256r1Signers) {\n const index = secp256r1VerifyInput.length;\n const { domainConfig, verifyArgs, signature, publicKey, message } =\n extractSecp256r1VerificationArgs(x, index);\n if (message && signature && publicKey) {\n secp256r1VerifyInput.push({ message, signature, publicKey });\n }\n if (domainConfig) {\n packedAccounts.addPreAccounts([\n { address: domainConfig, role: AccountRole.READONLY },\n ]);\n if (verifyArgs?.__option === \"Some\") {\n secp256r1VerifyArgs.push({\n domainConfigKey: domainConfig,\n verifyArgs: verifyArgs.value,\n });\n }\n }\n }\n\n packedAccounts.addPreAccounts(\n dedupSigners\n .filter((x) => \"address\" in x)\n .map(\n (x) =>\n ({\n address: x.address,\n role: AccountRole.READONLY_SIGNER,\n signer: x,\n }) as AccountSignerMeta\n )\n );\n\n const { remainingAccounts, systemOffset } = packedAccounts.toAccountMetas();\n const compressedProofArgs = convertToCompressedProofArgs(proof, systemOffset);\n\n const instructions = [];\n if (secp256r1VerifyInput.length > 0) {\n instructions.push(getSecp256r1VerifyInstruction(secp256r1VerifyInput));\n }\n instructions.push(\n getCompressSettingsAccountInstruction({\n settings,\n settingsArg,\n compressedProofArgs,\n payer,\n secp256r1VerifyArgs,\n remainingAccounts,\n })\n );\n\n return instructions;\n}\n","import { type Address, type TransactionSigner } from \"gill\";\nimport { getCreateDomainConfigInstruction } from \"../../generated\";\nimport { getDomainConfigAddress } from \"../../utils\";\n\nexport async function createDomainConfig({\n payer,\n rpId,\n origins,\n authority,\n metadataUrl,\n adminDomainConfig,\n}: {\n metadataUrl: string;\n payer: TransactionSigner;\n rpId: string;\n origins: string[];\n authority: Address;\n adminDomainConfig?: Address;\n}) {\n const domainConfig = await getDomainConfigAddress({ rpId });\n return getCreateDomainConfigInstruction({\n origins,\n authority,\n payer,\n domainConfig,\n rpId,\n metadataUrl,\n adminDomainConfig,\n remainingAccounts: [],\n });\n}\n","import { type Address, none, some, type TransactionSigner } from \"gill\";\nimport {\n type CompressedSettings,\n getCompressedSettingsDecoder,\n getCreateDomainUserAccountInstruction,\n getSecp256r1PubkeyDecoder,\n getUserDecoder,\n type SettingsMutArgs,\n type User,\n type UserMutArgs,\n} from \"../../generated\";\nimport { Secp256r1Key } from \"../../types\";\nimport {\n getCompressedSettingsAddressFromIndex,\n getUserAccountAddress,\n} from \"../../utils\";\nimport {\n convertToCompressedProofArgs,\n getCompressedAccountHashes,\n getCompressedAccountInitArgs,\n getCompressedAccountMutArgs,\n getValidityProofWithRetry,\n} from \"../../utils/compressed/internal\";\nimport { PackedAccounts } from \"../../utils/compressed/packedAccounts\";\n\ninterface UserCreationArgs {\n member: Secp256r1Key;\n isPermanentMember: boolean;\n settingsIndex?: number | bigint;\n transactionManager?: Address;\n}\n\nexport async function createDomainUserAccounts({\n authority,\n payer,\n createUserArgs,\n domainConfig,\n cachedAccounts,\n}: {\n domainConfig: Address;\n authority: TransactionSigner;\n payer: TransactionSigner;\n createUserArgs: UserCreationArgs;\n cachedAccounts?: Map<string, any>;\n}) {\n const packedAccounts = new PackedAccounts();\n await packedAccounts.addSystemAccounts();\n\n const addresses = [];\n\n if (createUserArgs.settingsIndex) {\n addresses.push({\n address: getCompressedSettingsAddressFromIndex(\n createUserArgs.settingsIndex\n ).address,\n type: \"Settings\" as const,\n });\n if (createUserArgs.transactionManager) {\n addresses.push({\n address: getUserAccountAddress(createUserArgs.transactionManager)\n .address,\n type: \"User\" as const,\n });\n }\n }\n\n const hashesWithTree = addresses.length\n ? await getCompressedAccountHashes(addresses, cachedAccounts)\n : [];\n const { address, addressTree } = getUserAccountAddress(createUserArgs.member);\n const newAddressParams = [\n {\n address,\n type: \"User\" as const,\n tree: addressTree,\n queue: addressTree,\n },\n ];\n\n const proof = await getValidityProofWithRetry(\n hashesWithTree,\n newAddressParams\n );\n\n let settingsMutArgs: SettingsMutArgs | null = null;\n let transactionManagerMutArgs: UserMutArgs | null = null;\n const settingsHash = hashesWithTree.filter((x) => x.type === \"Settings\");\n const transactionManagerHash = hashesWithTree.filter(\n (x) => x.type === \"User\"\n );\n if (settingsHash.length) {\n settingsMutArgs = getCompressedAccountMutArgs<CompressedSettings>(\n packedAccounts,\n proof.treeInfos.slice(0, 1),\n proof.leafIndices.slice(0, 1),\n proof.rootIndices.slice(0, 1),\n proof.proveByIndices.slice(0, 1),\n settingsHash,\n getCompressedSettingsDecoder()\n )[0];\n }\n if (transactionManagerHash.length) {\n transactionManagerMutArgs = getCompressedAccountMutArgs<User>(\n packedAccounts,\n proof.treeInfos.slice(1, 2),\n proof.leafIndices.slice(1, 2),\n proof.rootIndices.slice(1, 2),\n proof.proveByIndices.slice(1, 2),\n transactionManagerHash,\n getUserDecoder()\n )[0];\n }\n\n const userCreationArgs = await getCompressedAccountInitArgs(\n packedAccounts,\n proof.treeInfos.slice(hashesWithTree.length),\n proof.roots.slice(hashesWithTree.length),\n proof.rootIndices.slice(hashesWithTree.length),\n newAddressParams\n );\n\n const { remainingAccounts, systemOffset } = packedAccounts.toAccountMetas();\n const compressedProofArgs = convertToCompressedProofArgs(proof, systemOffset);\n\n return getCreateDomainUserAccountInstruction({\n payer,\n authority,\n compressedProofArgs,\n member: getSecp256r1PubkeyDecoder().decode(\n createUserArgs.member.toBuffer()\n ),\n isPermanentMember: createUserArgs.isPermanentMember,\n linkWalletArgs: settingsMutArgs\n ? some({\n settingsMutArgs,\n transactionManager: transactionManagerMutArgs\n ? some(transactionManagerMutArgs)\n : none(),\n })\n : none(),\n userAccountCreationArgs: userCreationArgs[0],\n domainConfig,\n remainingAccounts,\n });\n}\n","import type { TransactionSigner } from \"gill\";\nimport { getCreateGlobalCounterInstructionAsync as getCreateGlobalCounterInstruction } from \"../../generated\";\nimport { getGlobalCounterAddress } from \"../../utils\";\n\nexport async function createGlobalCounter({\n payer,\n}: {\n payer: TransactionSigner;\n}) {\n const globalCounter = await getGlobalCounterAddress();\n return getCreateGlobalCounterInstruction({\n payer,\n globalCounter,\n remainingAccounts: [],\n });\n}\n","import { AccountRole, type TransactionSigner } from \"gill\";\nimport { getCreateUserAccountsInstruction } from \"../../generated\";\nimport { getUserAccountAddress } from \"../../utils\";\nimport {\n convertToCompressedProofArgs,\n getCompressedAccountInitArgs,\n getValidityProofWithRetry,\n} from \"../../utils/compressed/internal\";\nimport { PackedAccounts } from \"../../utils/compressed/packedAccounts\";\n\ntype UserCreationArgs =\n | {\n member: TransactionSigner;\n isPermanentMember: true;\n transactionManagerUrl: undefined;\n }\n | {\n member: TransactionSigner;\n isPermanentMember: false;\n transactionManagerUrl?: string;\n };\n\nexport async function createUserAccounts({\n createUserArgs,\n payer,\n}: {\n payer: TransactionSigner;\n createUserArgs: UserCreationArgs[];\n}) {\n const packedAccounts = new PackedAccounts();\n await packedAccounts.addSystemAccounts();\n packedAccounts.addPreAccounts(\n createUserArgs.map((x) => ({\n address: x.member.address,\n role: AccountRole.READONLY_SIGNER,\n signer: x.member,\n }))\n );\n const newAddressParams = createUserArgs.map((x) => {\n const { address, addressTree } = getUserAccountAddress(x.member.address);\n return {\n address,\n tree: addressTree,\n queue: addressTree,\n type: \"User\" as const,\n };\n });\n const proof = await getValidityProofWithRetry([], newAddressParams);\n const userCreationArgs = await getCompressedAccountInitArgs(\n packedAccounts,\n proof.treeInfos,\n proof.roots,\n proof.rootIndices,\n newAddressParams\n );\n\n const { remainingAccounts, systemOffset } = packedAccounts.toAccountMetas();\n\n const compressedProofArgs = convertToCompressedProofArgs(proof, systemOffset);\n\n return getCreateUserAccountsInstruction({\n compressedProofArgs,\n payer,\n createUserArgs: createUserArgs.map((x, index) => ({\n member: x.member.address,\n isPermanentMember: x.isPermanentMember,\n userCreationArgs: userCreationArgs[index],\n transactionManagerUrl: x.transactionManagerUrl ?? null,\n })),\n remainingAccounts,\n });\n}\n","import type { TransactionSigner } from \"gill\";\nimport { getDisableDomainConfigInstruction } from \"../../generated\";\nimport { getDomainConfigAddress } from \"../../utils\";\n\nexport async function disableDomainConfig({\n admin,\n rpId,\n disable,\n}: {\n admin: TransactionSigner;\n disable: boolean;\n rpId: string;\n}) {\n const domainConfig = await getDomainConfigAddress({ rpId });\n return getDisableDomainConfigInstruction({\n domainConfig,\n admin,\n disable,\n remainingAccounts: [],\n });\n}\n","import { type Address, none, some, type TransactionSigner } from \"gill\";\nimport { getEditDomainConfigInstruction } from \"../../generated\";\n\nexport async function editDomainConfig({\n authority,\n domainConfig,\n newAuthority,\n newOrigins,\n newMetadataUrl,\n}: {\n domainConfig: Address;\n authority: TransactionSigner;\n newAuthority?: Address;\n newOrigins?: string[];\n newMetadataUrl?: string;\n}) {\n return getEditDomainConfigInstruction({\n domainConfig,\n authority,\n newOrigins: newOrigins ? some(newOrigins) : none(),\n newAuthority: newAuthority ? some(newAuthority) : none(),\n newMetadataUrl: newMetadataUrl ? some(newMetadataUrl) : none(),\n remainingAccounts: [],\n });\n}\n","import type { TransactionSigner } from \"gill\";\nimport {\n getEditTransactionManagerUrlInstruction,\n getUserDecoder,\n type User,\n} from \"../../generated\";\nimport { getUserAccountAddress } from \"../../utils\";\nimport {\n convertToCompressedProofArgs,\n getCompressedAccountHashes,\n getCompressedAccountMutArgs,\n getValidityProofWithRetry,\n} from \"../../utils/compressed/internal\";\nimport { PackedAccounts } from \"../../utils/compressed/packedAccounts\";\n\nexport async function editTransactionManagerUrl({\n authority,\n transactionManagerUrl,\n}: {\n authority: TransactionSigner;\n transactionManagerUrl: string;\n}) {\n const packedAccounts = new PackedAccounts();\n await packedAccounts.addSystemAccounts();\n const hashesWithTree = await getCompressedAccountHashes([\n { address: getUserAccountAddress(authority.address).address, type: \"User\" },\n ]);\n const proof = await getValidityProofWithRetry(hashesWithTree, []);\n const userMutArgs = getCompressedAccountMutArgs<User>(\n packedAccounts,\n proof.treeInfos,\n proof.leafIndices,\n proof.rootIndices,\n proof.proveByIndices,\n hashesWithTree,\n getUserDecoder()\n )[0];\n const { remainingAccounts, systemOffset } = packedAccounts.toAccountMetas();\n const compressedProofArgs = convertToCompressedProofArgs(proof, systemOffset);\n return getEditTransactionManagerUrlInstruction({\n authority,\n transactionManagerUrl,\n compressedProofArgs,\n userMutArgs,\n remainingAccounts,\n });\n}\n","import { AccountRole, type Instruction, type TransactionSigner } from \"gill\";\nimport {\n getCreateMultiWalletCompressedInstruction,\n getCreateMultiWalletInstruction,\n getUserDecoder,\n type User,\n} from \"../generated\";\nimport { SignedSecp256r1Key } from \"../types\";\nimport {\n getCompressedSettingsAddressFromIndex,\n getGlobalCounterAddress,\n getSettingsFromIndex,\n getUserAccountAddress,\n} from \"../utils\";\nimport {\n convertToCompressedProofArgs,\n getCompressedAccountHashes,\n getCompressedAccountInitArgs,\n getCompressedAccountMutArgs,\n getValidityProofWithRetry,\n} from \"../utils/compressed/internal\";\nimport { PackedAccounts } from \"../utils/compressed/packedAccounts\";\nimport { extractSecp256r1VerificationArgs } from \"../utils/transaction/internal\";\nimport type { Secp256r1VerifyInput } from \"./secp256r1Verify\";\n\ntype CreateWalletArgs = {\n index: bigint | number;\n payer: TransactionSigner;\n compressed?: boolean;\n cachedAccounts?: Map<string, any>;\n initialMember: TransactionSigner | SignedSecp256r1Key;\n setAsDelegate: boolean;\n};\nexport async function createWallet({\n index,\n payer,\n initialMember,\n setAsDelegate,\n compressed = false,\n cachedAccounts,\n}: CreateWalletArgs) {\n const globalCounter = await getGlobalCounterAddress();\n const { domainConfig, verifyArgs, message, signature, publicKey } =\n extractSecp256r1VerificationArgs(initialMember);\n\n const secp256r1VerifyInput: Secp256r1VerifyInput = [];\n if (message && signature && publicKey) {\n secp256r1VerifyInput.push({\n message,\n signature,\n publicKey,\n });\n }\n\n const packedAccounts = new PackedAccounts();\n await packedAccounts.addSystemAccounts();\n\n const newAddressParams = [];\n const hashesWithTree = [];\n\n hashesWithTree.push(\n ...(await getCompressedAccountHashes(\n [\n {\n address: getUserAccountAddress(\n \"address\" in initialMember ? initialMember.address : initialMember\n ).address,\n type: \"User\" as const,\n },\n ],\n cachedAccounts\n ))\n );\n\n if (compressed) {\n const { address: settingsAddress, addressTree } =\n getCompressedSettingsAddressFromIndex(index);\n newAddressParams.push({\n address: settingsAddress,\n queue: addressTree,\n tree: addressTree,\n type: \"Settings\" as const,\n });\n }\n const hashesWithTreeEndIndex = hashesWithTree.length;\n\n const proof = await getValidityProofWithRetry(\n hashesWithTree,\n newAddressParams\n );\n\n const userMutArgs = getCompressedAccountMutArgs<User>(\n packedAccounts,\n proof.treeInfos.slice(0, hashesWithTreeEndIndex),\n proof.leafIndices.slice(0, hashesWithTreeEndIndex),\n proof.rootIndices.slice(0, hashesWithTreeEndIndex),\n proof.proveByIndices.slice(0, hashesWithTreeEndIndex),\n hashesWithTree.filter((x) => x.type === \"User\"),\n getUserDecoder()\n )[0];\n\n const initArgs = await getCompressedAccountInitArgs(\n packedAccounts,\n proof.treeInfos.slice(hashesWithTreeEndIndex),\n proof.roots.slice(hashesWithTreeEndIndex),\n proof.rootIndices.slice(hashesWithTreeEndIndex),\n newAddressParams\n );\n\n const settingsCreationArgs =\n initArgs.find((x) => x.type === \"Settings\") ?? null;\n\n if (domainConfig) {\n packedAccounts.addPreAccounts([\n { address: domainConfig, role: AccountRole.READONLY },\n ]);\n } else if (\"address\" in initialMember) {\n packedAccounts.addPreAccounts([\n {\n address: initialMember.address,\n role: AccountRole.READONLY_SIGNER,\n signer: initialMember,\n },\n ]);\n }\n\n const { remainingAccounts, systemOffset } = packedAccounts.toAccountMetas();\n\n const compressedProofArgs = convertToCompressedProofArgs(proof, systemOffset);\n\n const instructions: Instruction[] = [];\n if (compressed) {\n if (!settingsCreationArgs) {\n throw new Error(\"Settings creation args is missing.\");\n }\n\n instructions.push(\n getCreateMultiWalletCompressedInstruction({\n settingsIndex: index,\n payer: payer,\n initialMember:\n initialMember instanceof SignedSecp256r1Key\n ? undefined\n : initialMember,\n secp256r1VerifyArgs: verifyArgs,\n domainConfig,\n userMutArgs,\n globalCounter,\n compressedProofArgs,\n settingsCreation: settingsCreationArgs,\n setAsDelegate,\n remainingAccounts,\n })\n );\n } else {\n const settings = await getSettingsFromIndex(index);\n instructions.push(\n getCreateMultiWalletInstruction({\n settingsIndex: index,\n settings,\n payer,\n initialMember:\n initialMember instanceof SignedSecp256r1Key\n ? undefined\n : initialMember,\n secp256r1VerifyArgs: verifyArgs,\n domainConfig,\n userMutArgs,\n globalCounter,\n compressedProofArgs,\n setAsDelegate,\n remainingAccounts,\n })\n );\n }\n\n return { instructions, secp256r1VerifyInput };\n}\n","import {\n AccountRole,\n type AccountSignerMeta,\n type TransactionSigner,\n} from \"gill\";\nimport {\n type CompressedSettings,\n getCompressedSettingsDecoder,\n getDecompressSettingsAccountInstruction,\n type Secp256r1VerifyArgsWithDomainAddressArgs,\n} from \"../generated\";\nimport { SignedSecp256r1Key } from \"../types\";\nimport {\n getCompressedSettingsAddressFromIndex,\n getSettingsFromIndex,\n} from \"../utils\";\nimport {\n convertToCompressedProofArgs,\n getCompressedAccountHashes,\n getCompressedAccountMutArgs,\n getValidityProofWithRetry,\n} from \"../utils/compressed/internal\";\nimport { PackedAccounts } from \"../utils/compressed/packedAccounts\";\nimport {\n extractSecp256r1VerificationArgs,\n getDeduplicatedSigners,\n} from \"../utils/transaction/internal\";\nimport {\n getSecp256r1VerifyInstruction,\n type Secp256r1VerifyInput,\n} from \"./secp256r1Verify\";\n\nexport async function decompressSettingsAccount({\n index,\n payer,\n signers,\n cachedAccounts,\n}: {\n index: number | bigint;\n payer: TransactionSigner;\n signers: (SignedSecp256r1Key | TransactionSigner)[];\n cachedAccounts?: Map<string, any>;\n}) {\n const packedAccounts = new PackedAccounts();\n await packedAccounts.addSystemAccounts();\n\n const hashesWithTree = await getCompressedAccountHashes(\n [\n {\n address: getCompressedSettingsAddressFromIndex(index).address,\n type: \"Settings\" as const,\n },\n ],\n cachedAccounts\n );\n const proof = await getValidityProofWithRetry(hashesWithTree, []);\n const settingsMutArgs = getCompressedAccountMutArgs<CompressedSettings>(\n packedAccounts,\n proof.treeInfos,\n proof.leafIndices,\n proof.rootIndices,\n proof.proveByIndices,\n hashesWithTree.filter((x) => x.type === \"Settings\"),\n getCompressedSettingsDecoder()\n )[0];\n\n const dedupSigners = getDeduplicatedSigners(signers);\n\n const secp256r1Signers = dedupSigners.filter(\n (x) => x instanceof SignedSecp256r1Key\n );\n\n const secp256r1VerifyInput: Secp256r1VerifyInput = [];\n const secp256r1VerifyArgs: Secp256r1VerifyArgsWithDomainAddressArgs[] = [];\n for (const x of secp256r1Signers) {\n const index = secp256r1VerifyInput.length;\n const { domainConfig, verifyArgs, signature, publicKey, message } =\n extractSecp256r1VerificationArgs(x, index);\n if (message && signature && publicKey) {\n secp256r1VerifyInput.push({ message, signature, publicKey });\n }\n if (domainConfig) {\n packedAccounts.addPreAccounts([\n { address: domainConfig, role: AccountRole.READONLY },\n ]);\n if (verifyArgs?.__option === \"Some\") {\n secp256r1VerifyArgs.push({\n domainConfigKey: domainConfig,\n verifyArgs: verifyArgs.value,\n });\n }\n }\n }\n packedAccounts.addPreAccounts(\n dedupSigners\n .filter((x) => \"address\" in x)\n .map(\n (x) =>\n ({\n address: x.address,\n role: AccountRole.READONLY_SIGNER,\n signer: x,\n }) as AccountSignerMeta\n )\n );\n\n const { remainingAccounts, systemOffset } = packedAccounts.toAccountMetas();\n const compressedProofArgs = convertToCompressedProofArgs(proof, systemOffset);\n const instructions = [];\n if (secp256r1VerifyInput.length > 0) {\n instructions.push(getSecp256r1VerifyInstruction(secp256r1VerifyInput));\n }\n\n const settings = await getSettingsFromIndex(index);\n instructions.push(\n getDecompressSettingsAccountInstruction({\n settings,\n payer,\n settingsMut: settingsMutArgs,\n compressedProofArgs,\n secp256r1VerifyArgs,\n remainingAccounts,\n })\n );\n return instructions;\n}\n","import {\n type AccountMeta,\n AccountRole,\n type AccountSignerMeta,\n type Address,\n type AddressesByLookupTableAddress,\n type CompiledTransactionMessage,\n fetchAddressesForLookupTables,\n type ReadonlyUint8Array,\n type TransactionSigner,\n} from \"gill\";\nimport { getSolanaRpc } from \"..\";\nimport { vaultTransactionMessageDeserialize } from \"../../types\";\n\nfunction getAccountRole(\n message: CompiledTransactionMessage,\n index: number,\n accountKey: Address,\n vaultPda: Address\n) {\n const isWritable = isStaticWritableIndex(message, index);\n const isSigner = isSignerIndex(message, index) && accountKey !== vaultPda;\n if (isWritable && isSigner) {\n return AccountRole.WRITABLE_SIGNER;\n } else if (isWritable && !isSigner) {\n return AccountRole.WRITABLE;\n } else if (!isWritable && isSigner) {\n return AccountRole.READONLY_SIGNER;\n } else {\n return AccountRole.READONLY;\n }\n}\nfunction isStaticWritableIndex(\n message: CompiledTransactionMessage,\n index: number\n) {\n const numAccountKeys = message.staticAccounts.length;\n const {\n numSignerAccounts,\n numReadonlySignerAccounts,\n numReadonlyNonSignerAccounts,\n } = message.header;\n\n const numWritableSigners = numSignerAccounts - numReadonlySignerAccounts;\n const numWritableNonSigners =\n numAccountKeys - numSignerAccounts - numReadonlyNonSignerAccounts;\n\n if (index >= numAccountKeys) {\n // `index` is not a part of static `accountKeys`.\n return false;\n }\n\n if (index < numWritableSigners) {\n // `index` is within the range of writable signer keys.\n return true;\n }\n\n if (index >= numSignerAccounts) {\n // `index` is within the range of non-signer keys.\n const indexIntoNonSigners = index - numSignerAccounts;\n // Whether `index` is within the range of writable non-signer keys.\n return indexIntoNonSigners < numWritableNonSigners;\n }\n\n return false;\n}\nfunction isSignerIndex(message: CompiledTransactionMessage, index: number) {\n return index < message.header.numSignerAccounts;\n}\n/** Populate remaining accounts required for execution of the transaction. */\n\nexport async function accountsForTransactionExecute({\n walletAddress,\n transactionMessageBytes,\n addressesByLookupTableAddress,\n additionalSigners,\n}: {\n transactionMessageBytes: ReadonlyUint8Array;\n walletAddress: Address;\n addressesByLookupTableAddress?: AddressesByLookupTableAddress;\n additionalSigners?: TransactionSigner[];\n}) {\n const transactionMessage = vaultTransactionMessageDeserialize(\n transactionMessageBytes\n );\n\n if (transactionMessage.version === \"legacy\") {\n throw new Error(\"Only versioned transaction is allowed.\");\n }\n\n const addressLookupTableAccounts =\n addressesByLookupTableAddress ??\n (transactionMessage.addressTableLookups\n ? await fetchAddressesForLookupTables(\n transactionMessage.addressTableLookups.map(\n (x) => x.lookupTableAddress\n ),\n getSolanaRpc()\n )\n : {});\n\n // Populate account metas required for execution of the transaction.\n const accountMetas: (AccountMeta | AccountSignerMeta)[] = [];\n // First add the lookup table accounts used by the transaction. They are needed for on-chain validation.\n\n accountMetas.push(\n ...(transactionMessage.addressTableLookups?.map((lookup) => {\n return {\n role: AccountRole.READONLY,\n address: lookup.lookupTableAddress,\n };\n }) ?? [])\n );\n\n // Then add static account keys included into the message.\n for (const [\n accountIndex,\n accountKey,\n ] of transactionMessage.staticAccounts.entries()) {\n accountMetas.push({\n address: accountKey,\n role: getAccountRole(\n transactionMessage,\n accountIndex,\n accountKey,\n walletAddress\n ),\n });\n }\n\n // Then add accounts that will be loaded with address lookup tables.\n if (transactionMessage.addressTableLookups) {\n for (const lookup of transactionMessage.addressTableLookups) {\n const lookupTableAccount =\n addressLookupTableAccounts[lookup.lookupTableAddress];\n if (!lookupTableAccount) {\n throw new Error(\n `Address lookup table account ${lookup.lookupTableAddress} not found`\n );\n }\n\n for (const accountIndex of lookup.writableIndexes) {\n const address = lookupTableAccount[accountIndex];\n if (!address) {\n throw new Error(\n `Address lookup table account ${lookup.lookupTableAddress} does not contain address at index ${accountIndex}`\n );\n }\n\n accountMetas.push({\n address,\n role: AccountRole.WRITABLE,\n });\n }\n for (const accountIndex of lookup.readonlyIndexes) {\n const address = lookupTableAccount[accountIndex];\n if (!address) {\n throw new Error(\n `Address lookup table account ${lookup.lookupTableAddress} does not contain address at index ${accountIndex}`\n );\n }\n accountMetas.push({\n address,\n role: AccountRole.READONLY,\n });\n }\n }\n }\n\n for (const signer of additionalSigners?.filter(\n (x) => x.address !== walletAddress\n ) ?? []) {\n const index = accountMetas.findIndex(\n (meta) => meta.address === signer.address\n );\n if (index === -1) {\n accountMetas.push({\n address: signer.address,\n role: AccountRole.READONLY_SIGNER,\n signer,\n });\n } else {\n if (\n accountMetas[index].role === AccountRole.READONLY ||\n accountMetas[index].role === AccountRole.READONLY_SIGNER\n ) {\n accountMetas[index] = {\n address: signer.address,\n role: AccountRole.READONLY_SIGNER,\n signer,\n };\n } else if (\n accountMetas[index].role === AccountRole.WRITABLE ||\n accountMetas[index].role === AccountRole.WRITABLE_SIGNER\n ) {\n accountMetas[index] = {\n address: signer.address,\n role: AccountRole.WRITABLE_SIGNER,\n signer,\n };\n }\n }\n }\n return {\n accountMetas,\n addressLookupTableAccounts,\n transactionMessage,\n };\n}\n","import type {\n Address,\n AddressesByLookupTableAddress,\n Instruction,\n ReadonlyUint8Array,\n TransactionSigner,\n} from \"gill\";\nimport {\n getTransactionExecuteCompressedInstruction,\n getTransactionExecuteInstruction,\n} from \"../generated\";\nimport { getWalletAddressFromSettings } from \"../utils\";\nimport { addJitoTip } from \"../utils/transaction/internal\";\nimport { accountsForTransactionExecute } from \"../utils/transactionMessage/internal\";\nimport {\n getSecp256r1VerifyInstruction,\n type Secp256r1VerifyInput,\n} from \"./secp256r1Verify\";\n\nexport async function executeTransaction({\n settings,\n transactionBufferAddress,\n transactionMessageBytes,\n payer,\n addressesByLookupTableAddress,\n secp256r1VerifyInput = [],\n additionalSigners = [],\n jitoBundlesTipAmount,\n compressed = false,\n}: {\n settings: Address;\n payer: TransactionSigner;\n transactionBufferAddress: Address;\n transactionMessageBytes: ReadonlyUint8Array;\n addressesByLookupTableAddress?: AddressesByLookupTableAddress;\n secp256r1VerifyInput?: Secp256r1VerifyInput;\n additionalSigners?: TransactionSigner[];\n jitoBundlesTipAmount?: number;\n compressed?: boolean;\n}) {\n const walletAddress = await getWalletAddressFromSettings(settings);\n\n const { accountMetas, addressLookupTableAccounts } =\n await accountsForTransactionExecute({\n transactionMessageBytes,\n walletAddress,\n additionalSigners,\n addressesByLookupTableAddress,\n });\n\n const instructions: Instruction[] = [];\n if (secp256r1VerifyInput.length > 0) {\n instructions.push(getSecp256r1VerifyInstruction(secp256r1VerifyInput));\n }\n\n instructions.push(\n compressed\n ? getTransactionExecuteCompressedInstruction({\n transactionBuffer: transactionBufferAddress,\n payer: payer.address,\n remainingAccounts: accountMetas,\n settingsKey: settings,\n })\n : getTransactionExecuteInstruction({\n transactionBuffer: transactionBufferAddress,\n payer: payer.address,\n remainingAccounts: accountMetas,\n settings,\n })\n );\n\n if (jitoBundlesTipAmount) {\n instructions.push(addJitoTip({ payer, tipAmount: jitoBundlesTipAmount }));\n }\n\n return {\n instructions,\n addressLookupTableAccounts,\n };\n}\n","import {\n AccountRole,\n type AccountMeta,\n type AddressesByLookupTableAddress,\n type CompiledTransactionMessage,\n type Instruction,\n type ReadonlyUint8Array,\n type TransactionSigner,\n} from \"gill\";\nimport {\n getTransactionExecuteSyncCompressedInstruction,\n getTransactionExecuteSyncInstruction,\n type Secp256r1VerifyArgsWithDomainAddressArgs,\n} from \"../generated\";\nimport { SignedSecp256r1Key } from \"../types\";\nimport { getSettingsFromIndex, getWalletAddressFromSettings } from \"../utils\";\nimport {\n constructSettingsProofArgs,\n convertToCompressedProofArgs,\n} from \"../utils/compressed/internal\";\nimport {\n extractSecp256r1VerificationArgs,\n getDeduplicatedSigners,\n} from \"../utils/transaction/internal\";\nimport { accountsForTransactionExecute } from \"../utils/transactionMessage/internal\";\nimport {\n getSecp256r1VerifyInstruction,\n type Secp256r1VerifyInput,\n} from \"./secp256r1Verify\";\n\nexport async function executeTransactionSync({\n index,\n transactionMessageBytes,\n signers,\n payer,\n addressesByLookupTableAddress,\n secp256r1VerifyInput = [],\n compressed = false,\n simulateProof = false,\n cachedAccounts,\n}: {\n index: bigint | number;\n signers: (TransactionSigner | SignedSecp256r1Key)[];\n transactionMessageBytes: ReadonlyUint8Array;\n secp256r1VerifyInput?: Secp256r1VerifyInput;\n compressed?: boolean;\n addressesByLookupTableAddress?: AddressesByLookupTableAddress;\n payer?: TransactionSigner;\n simulateProof?: boolean;\n cachedAccounts?: Map<string, any>;\n}) {\n const dedupSigners = getDeduplicatedSigners(signers);\n const settings = await getSettingsFromIndex(index);\n const walletAddress = await getWalletAddressFromSettings(settings);\n const [\n { accountMetas, addressLookupTableAccounts, transactionMessage },\n { settingsReadonlyArgs, proof, packedAccounts },\n ] = await Promise.all([\n accountsForTransactionExecute({\n transactionMessageBytes,\n walletAddress,\n additionalSigners: dedupSigners.filter(\n (x) => !(x instanceof SignedSecp256r1Key)\n ) as TransactionSigner[],\n addressesByLookupTableAddress,\n }),\n constructSettingsProofArgs(\n compressed,\n index,\n simulateProof,\n cachedAccounts\n ),\n ]);\n\n packedAccounts.addPreAccounts(accountMetas);\n\n const secp256r1Signers = dedupSigners.filter(\n (x) => x instanceof SignedSecp256r1Key\n );\n\n const secp256r1VerifyArgs: Secp256r1VerifyArgsWithDomainAddressArgs[] = [];\n for (const x of secp256r1Signers) {\n const index = secp256r1VerifyInput.length;\n const { domainConfig, verifyArgs, signature, publicKey, message } =\n extractSecp256r1VerificationArgs(x, index);\n if (message && signature && publicKey) {\n secp256r1VerifyInput.push({ message, signature, publicKey });\n }\n if (domainConfig) {\n packedAccounts.addPreAccounts([\n { address: domainConfig, role: AccountRole.READONLY },\n ]);\n if (verifyArgs?.__option === \"Some\") {\n secp256r1VerifyArgs.push({\n domainConfigKey: domainConfig,\n verifyArgs: verifyArgs.value,\n });\n }\n }\n }\n\n const { remainingAccounts, systemOffset } = packedAccounts.toAccountMetas();\n\n const instructions: Instruction[] = [];\n\n if (secp256r1VerifyInput.length > 0) {\n instructions.push(getSecp256r1VerifyInstruction(secp256r1VerifyInput));\n }\n const customTransactionMessage = parseTransactionMessage(\n transactionMessage,\n accountMetas\n );\n\n if (compressed) {\n if (!payer || !settingsReadonlyArgs) {\n throw new Error(\"Payer not found or proof args is missing.\");\n }\n const compressedProofArgs = convertToCompressedProofArgs(\n proof,\n systemOffset\n );\n\n instructions.push(\n getTransactionExecuteSyncCompressedInstruction({\n secp256r1VerifyArgs,\n transactionMessage: customTransactionMessage,\n settingsReadonlyArgs,\n compressedProofArgs,\n payer,\n remainingAccounts,\n })\n );\n } else {\n instructions.push(\n getTransactionExecuteSyncInstruction({\n secp256r1VerifyArgs,\n settings,\n transactionMessage: customTransactionMessage,\n remainingAccounts,\n })\n );\n }\n\n return {\n instructions,\n addressLookupTableAccounts,\n };\n}\nfunction parseTransactionMessage(\n transactionMessage: CompiledTransactionMessage,\n accountMetas: AccountMeta[]\n) {\n if (transactionMessage.version === \"legacy\") {\n throw new Error(\"Only versioned transaction is allowed.\");\n }\n return {\n numSigners: transactionMessage.header.numSignerAccounts,\n numWritableNonSigners:\n transactionMessage.staticAccounts.length -\n transactionMessage.header.numSignerAccounts -\n transactionMessage.header.numReadonlyNonSignerAccounts,\n numWritableSigners:\n transactionMessage.header.numSignerAccounts -\n transactionMessage.header.numReadonlySignerAccounts,\n numAccountKeys: transactionMessage.staticAccounts.length,\n instructions: transactionMessage.instructions.map((x) => ({\n ...x,\n accountIndices: new Uint8Array(x.accountIndices ?? []),\n data: new Uint8Array(x.data ?? []),\n })),\n addressTableLookups:\n transactionMessage.addressTableLookups?.map((x) => ({\n lookupTableAddressIndex: accountMetas.findIndex(\n (y) => y.address === x.lookupTableAddress\n ),\n writableIndexes: new Uint8Array(x.writableIndexes),\n readonlyIndexes: new Uint8Array(x.readonlyIndexes),\n })) ?? [],\n };\n}\n","import {\n AccountRole,\n type Address,\n type Instruction,\n type TransactionSigner,\n} from \"gill\";\nimport {\n getNativeTransferIntentCompressedInstruction,\n getNativeTransferIntentInstruction,\n type Secp256r1VerifyArgsWithDomainAddressArgs,\n} from \"../../generated\";\nimport { SignedSecp256r1Key } from \"../../types\";\nimport {\n getSettingsFromIndex,\n getWalletAddressFromSettings,\n} from \"../../utils\";\nimport {\n constructSettingsProofArgs,\n convertToCompressedProofArgs,\n} from \"../../utils/compressed/internal\";\nimport {\n extractSecp256r1VerificationArgs,\n getDeduplicatedSigners,\n} from \"../../utils/transaction/internal\";\nimport {\n getSecp256r1VerifyInstruction,\n type Secp256r1VerifyInput,\n} from \"../secp256r1Verify\";\n\nexport async function nativeTransferIntent({\n index,\n destination,\n signers,\n cachedAccounts,\n amount,\n payer,\n compressed = false,\n}: {\n index: number | bigint;\n destination: Address;\n amount: number | bigint;\n signers: (TransactionSigner | SignedSecp256r1Key)[];\n payer?: TransactionSigner;\n compressed?: boolean;\n cachedAccounts?: Map<string, any>;\n}) {\n const dedupSigners = getDeduplicatedSigners(signers);\n const settings = await getSettingsFromIndex(index);\n const walletAddress = await getWalletAddressFromSettings(settings);\n const { settingsReadonlyArgs, proof, packedAccounts } =\n await constructSettingsProofArgs(compressed, index, false, cachedAccounts);\n\n const secp256r1VerifyInput: Secp256r1VerifyInput = [];\n const secp256r1VerifyArgs: Secp256r1VerifyArgsWithDomainAddressArgs[] = [];\n for (const x of dedupSigners) {\n if (x instanceof SignedSecp256r1Key) {\n const index = secp256r1VerifyInput.length;\n const { domainConfig, verifyArgs, signature, publicKey, message } =\n extractSecp256r1VerificationArgs(x, index);\n if (message && signature && publicKey) {\n secp256r1VerifyInput.push({ message, signature, publicKey });\n }\n if (domainConfig) {\n packedAccounts.addPreAccounts([\n { address: domainConfig, role: AccountRole.READONLY },\n ]);\n if (verifyArgs?.__option === \"Some\") {\n secp256r1VerifyArgs.push({\n domainConfigKey: domainConfig,\n verifyArgs: verifyArgs.value,\n });\n }\n }\n } else {\n packedAccounts.addPreAccounts([\n { address: x.address, role: AccountRole.READONLY_SIGNER, signer: x },\n ]);\n }\n }\n\n const { remainingAccounts, systemOffset } = packedAccounts.toAccountMetas();\n\n const instructions: Instruction[] = [];\n\n if (secp256r1VerifyInput.length > 0) {\n instructions.push(getSecp256r1VerifyInstruction(secp256r1VerifyInput));\n }\n\n if (compressed) {\n if (!payer || !settingsReadonlyArgs) {\n throw new Error(\"Payer not found or proof args is missing.\");\n }\n const compressedProofArgs = convertToCompressedProofArgs(\n proof,\n systemOffset\n );\n instructions.push(\n getNativeTransferIntentCompressedInstruction({\n amount,\n settingsReadonlyArgs,\n compressedProofArgs,\n payer,\n secp256r1VerifyArgs,\n source: walletAddress,\n destination,\n remainingAccounts,\n })\n );\n } else {\n instructions.push(\n getNativeTransferIntentInstruction({\n amount,\n secp256r1VerifyArgs,\n source: walletAddress,\n destination,\n settings,\n remainingAccounts,\n })\n );\n }\n\n return instructions;\n}\n","import {\n AccountRole,\n type Address,\n type Instruction,\n type TransactionSigner,\n} from \"gill\";\nimport { getAssociatedTokenAccountAddress } from \"gill/programs\";\nimport {\n getTokenTransferIntentCompressedInstruction,\n getTokenTransferIntentInstruction,\n type Secp256r1VerifyArgsWithDomainAddressArgs,\n} from \"../../generated\";\nimport { SignedSecp256r1Key } from \"../../types\";\nimport {\n getSettingsFromIndex,\n getWalletAddressFromSettings,\n} from \"../../utils\";\nimport {\n constructSettingsProofArgs,\n convertToCompressedProofArgs,\n} from \"../../utils/compressed/internal\";\nimport {\n extractSecp256r1VerificationArgs,\n getDeduplicatedSigners,\n} from \"../../utils/transaction/internal\";\nimport {\n getSecp256r1VerifyInstruction,\n type Secp256r1VerifyInput,\n} from \"../secp256r1Verify\";\n\nexport async function tokenTransferIntent({\n index,\n destination,\n mint,\n signers,\n cachedAccounts,\n amount,\n payer,\n tokenProgram,\n compressed = false,\n}: {\n index: number | bigint;\n destination: Address;\n mint: Address;\n amount: number | bigint;\n signers: (TransactionSigner | SignedSecp256r1Key)[];\n tokenProgram: Address;\n payer?: TransactionSigner;\n compressed?: boolean;\n cachedAccounts?: Map<string, any>;\n}) {\n const dedupSigners = getDeduplicatedSigners(signers);\n const settings = await getSettingsFromIndex(index);\n const walletAddress = await getWalletAddressFromSettings(settings);\n const [sourceTokenAccount, destinationTokenAccount] = await Promise.all([\n getAssociatedTokenAccountAddress(mint, walletAddress, tokenProgram),\n getAssociatedTokenAccountAddress(mint, destination, tokenProgram),\n ]);\n const { settingsReadonlyArgs, proof, packedAccounts } =\n await constructSettingsProofArgs(compressed, index, false, cachedAccounts);\n\n const secp256r1VerifyInput: Secp256r1VerifyInput = [];\n const secp256r1VerifyArgs: Secp256r1VerifyArgsWithDomainAddressArgs[] = [];\n for (const x of dedupSigners) {\n if (x instanceof SignedSecp256r1Key) {\n const index = secp256r1VerifyInput.length;\n const { domainConfig, verifyArgs, signature, publicKey, message } =\n extractSecp256r1VerificationArgs(x, index);\n if (message && signature && publicKey) {\n secp256r1VerifyInput.push({ message, signature, publicKey });\n }\n if (domainConfig) {\n packedAccounts.addPreAccounts([\n { address: domainConfig, role: AccountRole.READONLY },\n ]);\n if (verifyArgs?.__option === \"Some\") {\n secp256r1VerifyArgs.push({\n domainConfigKey: domainConfig,\n verifyArgs: verifyArgs.value,\n });\n }\n }\n } else {\n packedAccounts.addPreAccounts([\n { address: x.address, role: AccountRole.READONLY_SIGNER, signer: x },\n ]);\n }\n }\n\n const { remainingAccounts, systemOffset } = packedAccounts.toAccountMetas();\n\n const instructions: Instruction[] = [];\n\n if (secp256r1VerifyInput.length > 0) {\n instructions.push(getSecp256r1VerifyInstruction(secp256r1VerifyInput));\n }\n\n if (compressed) {\n if (!payer || !settingsReadonlyArgs) {\n throw new Error(\"Payer not found or proof args is missing.\");\n }\n const compressedProofArgs = convertToCompressedProofArgs(\n proof,\n systemOffset\n );\n instructions.push(\n getTokenTransferIntentCompressedInstruction({\n amount,\n settingsReadonlyArgs,\n compressedProofArgs,\n payer,\n secp256r1VerifyArgs,\n source: walletAddress,\n sourceTokenAccount,\n destination,\n destinationTokenAccount,\n mint,\n tokenProgram,\n remainingAccounts,\n })\n );\n } else {\n instructions.push(\n getTokenTransferIntentInstruction({\n amount,\n secp256r1VerifyArgs,\n source: walletAddress,\n sourceTokenAccount,\n destination,\n destinationTokenAccount,\n settings,\n mint,\n tokenProgram,\n remainingAccounts,\n })\n );\n }\n\n return instructions;\n}\n","import type { Address, TransactionSigner } from \"gill\";\nimport {\n fetchTransactionBuffer,\n getTransactionBufferCloseCompressedInstruction,\n getTransactionBufferCloseInstruction,\n} from \"../../generated\";\nimport { SignedSecp256r1Key } from \"../../types\";\nimport { getSolanaRpc } from \"../../utils\";\nimport {\n constructSettingsProofArgs,\n convertToCompressedProofArgs,\n} from \"../../utils/compressed/internal\";\nimport { extractSecp256r1VerificationArgs } from \"../../utils/transaction/internal\";\nimport { getSecp256r1VerifyInstruction } from \"../secp256r1Verify\";\n\nexport async function closeTransactionBuffer({\n index,\n closer,\n transactionBufferAddress,\n payer,\n compressed = false,\n cachedAccounts,\n}: {\n index: bigint | number;\n closer: TransactionSigner | SignedSecp256r1Key;\n transactionBufferAddress: Address;\n payer?: TransactionSigner;\n compressed?: boolean;\n cachedAccounts?: Map<string, any>;\n}) {\n const transactionBuffer = await fetchTransactionBuffer(\n getSolanaRpc(),\n transactionBufferAddress\n );\n const settings = transactionBuffer.data.multiWalletSettings;\n const { settingsReadonlyArgs, proof, packedAccounts } =\n await constructSettingsProofArgs(compressed, index, false, cachedAccounts);\n\n const { remainingAccounts, systemOffset } = packedAccounts.toAccountMetas();\n const { domainConfig, verifyArgs, message, signature, publicKey } =\n extractSecp256r1VerificationArgs(closer);\n\n const instructions = [];\n if (message && signature && publicKey) {\n instructions.push(\n getSecp256r1VerifyInstruction([\n {\n message,\n signature,\n publicKey,\n },\n ])\n );\n }\n\n if (compressed) {\n if (!payer || !settingsReadonlyArgs) {\n throw new Error(\"Payer not found or proof args is missing.\");\n }\n const compressedProofArgs = convertToCompressedProofArgs(\n proof,\n systemOffset\n );\n\n instructions.push(\n getTransactionBufferCloseCompressedInstruction({\n transactionBuffer: transactionBufferAddress,\n domainConfig,\n closer: closer instanceof SignedSecp256r1Key ? undefined : closer,\n rentCollector: transactionBuffer.data.payer,\n secp256r1VerifyArgs: verifyArgs,\n settingsReadonlyArgs,\n payer,\n compressedProofArgs,\n remainingAccounts,\n })\n );\n } else {\n instructions.push(\n getTransactionBufferCloseInstruction({\n transactionBuffer: transactionBufferAddress,\n domainConfig,\n closer: closer instanceof SignedSecp256r1Key ? undefined : closer,\n settings,\n payer: transactionBuffer.data.payer,\n secp256r1VerifyArgs: verifyArgs,\n remainingAccounts: [],\n })\n );\n }\n\n return instructions;\n}\n","import type { AccountMeta, Address, TransactionSigner } from \"gill\";\nimport {\n getTransactionBufferCreateCompressedInstruction,\n getTransactionBufferCreateInstruction,\n type ProofArgsArgs,\n type SettingsReadonlyArgs,\n} from \"../../generated\";\nimport { SignedSecp256r1Key } from \"../../types\";\nimport { extractSecp256r1VerificationArgs } from \"../../utils/transaction/internal\";\nimport { getSecp256r1VerifyInstruction } from \"../secp256r1Verify\";\n\nexport function createTransactionBuffer({\n payer,\n creator,\n bufferIndex,\n settings,\n transactionBufferAddress,\n finalBufferHash,\n finalBufferSize,\n preauthorizeExecution,\n bufferExtendHashes,\n compressedArgs,\n}: {\n finalBufferHash: Uint8Array;\n finalBufferSize: number;\n payer: TransactionSigner;\n creator: TransactionSigner | SignedSecp256r1Key;\n settings: Address;\n bufferIndex: number;\n transactionBufferAddress: Address;\n preauthorizeExecution: boolean;\n bufferExtendHashes: Uint8Array[];\n compressedArgs: {\n settingsReadonlyArgs: SettingsReadonlyArgs;\n compressedProofArgs: ProofArgsArgs;\n remainingAccounts: AccountMeta[];\n } | null;\n}) {\n const { domainConfig, verifyArgs, message, signature, publicKey } =\n extractSecp256r1VerificationArgs(creator);\n const instructions = [];\n if (message && signature && publicKey) {\n instructions.push(\n getSecp256r1VerifyInstruction([\n {\n message,\n signature,\n publicKey,\n },\n ])\n );\n }\n\n if (compressedArgs) {\n const { settingsReadonlyArgs, compressedProofArgs, remainingAccounts } =\n compressedArgs;\n instructions.push(\n getTransactionBufferCreateCompressedInstruction({\n transactionBuffer: transactionBufferAddress,\n payer,\n secp256r1VerifyArgs: verifyArgs,\n creator: creator instanceof SignedSecp256r1Key ? undefined : creator,\n domainConfig,\n args: {\n bufferIndex,\n finalBufferHash,\n finalBufferSize,\n bufferExtendHashes,\n preauthorizeExecution,\n },\n settingsReadonlyArgs,\n compressedProofArgs,\n remainingAccounts,\n })\n );\n } else {\n instructions.push(\n getTransactionBufferCreateInstruction({\n settings,\n transactionBuffer: transactionBufferAddress,\n payer,\n secp256r1VerifyArgs: verifyArgs,\n creator: creator instanceof SignedSecp256r1Key ? undefined : creator,\n domainConfig,\n args: {\n bufferIndex,\n finalBufferHash,\n finalBufferSize,\n bufferExtendHashes,\n preauthorizeExecution,\n },\n remainingAccounts: [],\n })\n );\n }\n\n return instructions;\n}\n","import type { AccountMeta, Address, TransactionSigner } from \"gill\";\nimport {\n getTransactionBufferExecuteCompressedInstruction,\n getTransactionBufferExecuteInstruction,\n type ProofArgsArgs,\n type SettingsReadonlyArgs,\n} from \"../../generated\";\nimport { SignedSecp256r1Key } from \"../../types\";\nimport { extractSecp256r1VerificationArgs } from \"../../utils/transaction/internal\";\nimport { getSecp256r1VerifyInstruction } from \"../secp256r1Verify\";\n\nexport function executeTransactionBuffer({\n executor,\n transactionBufferAddress,\n settings,\n compressedArgs,\n}: {\n executor?: TransactionSigner | SignedSecp256r1Key;\n transactionBufferAddress: Address;\n settings: Address;\n compressedArgs: {\n settingsReadonlyArgs: SettingsReadonlyArgs;\n compressedProofArgs: ProofArgsArgs;\n remainingAccounts: AccountMeta[];\n payer: TransactionSigner;\n } | null;\n}) {\n const { domainConfig, verifyArgs, signature, message, publicKey } =\n extractSecp256r1VerificationArgs(executor);\n const instructions = [];\n if (message && signature && publicKey) {\n instructions.push(\n getSecp256r1VerifyInstruction([\n {\n message,\n signature,\n publicKey,\n },\n ])\n );\n }\n\n if (compressedArgs) {\n instructions.push(\n getTransactionBufferExecuteCompressedInstruction({\n transactionBuffer: transactionBufferAddress,\n secp256r1VerifyArgs: verifyArgs,\n domainConfig,\n executor: executor instanceof SignedSecp256r1Key ? undefined : executor,\n settingsReadonlyArgs: compressedArgs.settingsReadonlyArgs,\n payer: compressedArgs.payer,\n compressedProofArgs: compressedArgs.compressedProofArgs,\n remainingAccounts: compressedArgs.remainingAccounts,\n })\n );\n } else {\n instructions.push(\n getTransactionBufferExecuteInstruction({\n settings,\n transactionBuffer: transactionBufferAddress,\n secp256r1VerifyArgs: verifyArgs,\n domainConfig,\n executor: executor instanceof SignedSecp256r1Key ? undefined : executor,\n remainingAccounts: [],\n })\n );\n }\n\n return instructions;\n}\n","import type { Address } from \"gill\";\nimport {\n getTransactionBufferExtendCompressedInstruction,\n getTransactionBufferExtendInstruction,\n} from \"../../generated\";\n\nexport function extendTransactionBuffer({\n transactionMessageBytes,\n transactionBufferAddress,\n settings,\n compressed = false,\n}: {\n transactionMessageBytes: Uint8Array;\n transactionBufferAddress: Address;\n settings: Address;\n compressed?: boolean;\n}) {\n if (compressed) {\n return getTransactionBufferExtendCompressedInstruction({\n transactionBuffer: transactionBufferAddress,\n buffer: transactionMessageBytes,\n settingsKey: settings,\n remainingAccounts: [],\n });\n } else {\n return getTransactionBufferExtendInstruction({\n transactionBuffer: transactionBufferAddress,\n buffer: transactionMessageBytes,\n settings,\n remainingAccounts: [],\n });\n }\n}\n","import type {\n AccountMeta,\n Address,\n Instruction,\n TransactionSigner,\n} from \"gill\";\nimport {\n getTransactionBufferVoteCompressedInstruction,\n getTransactionBufferVoteInstruction,\n type ProofArgsArgs,\n type SettingsReadonlyArgs,\n} from \"../../generated\";\nimport { SignedSecp256r1Key } from \"../../types\";\nimport { extractSecp256r1VerificationArgs } from \"../../utils/transaction/internal\";\nimport { getSecp256r1VerifyInstruction } from \"../secp256r1Verify\";\n\nexport function voteTransactionBuffer({\n settings,\n voter,\n transactionBufferAddress,\n compressedArgs,\n}: {\n settings: Address;\n voter: TransactionSigner | SignedSecp256r1Key;\n transactionBufferAddress: Address;\n compressedArgs: {\n settingsReadonlyArgs: SettingsReadonlyArgs;\n compressedProofArgs: ProofArgsArgs;\n remainingAccounts: AccountMeta[];\n payer: TransactionSigner;\n } | null;\n}) {\n const { domainConfig, verifyArgs, signature, publicKey, message } =\n extractSecp256r1VerificationArgs(voter);\n const instructions: Instruction[] = [];\n if (message && signature && publicKey) {\n instructions.push(\n getSecp256r1VerifyInstruction([\n {\n message,\n signature,\n publicKey,\n },\n ])\n );\n }\n\n if (compressedArgs) {\n instructions.push(\n getTransactionBufferVoteCompressedInstruction({\n transactionBuffer: transactionBufferAddress,\n secp256r1VerifyArgs: verifyArgs,\n domainConfig,\n voter: voter instanceof SignedSecp256r1Key ? undefined : voter,\n settingsReadonlyArgs: compressedArgs.settingsReadonlyArgs,\n payer: compressedArgs.payer,\n compressedProofArgs: compressedArgs.compressedProofArgs,\n remainingAccounts: compressedArgs.remainingAccounts,\n })\n );\n } else {\n instructions.push(\n getTransactionBufferVoteInstruction({\n settings,\n transactionBuffer: transactionBufferAddress,\n secp256r1VerifyArgs: verifyArgs,\n domainConfig,\n voter: voter instanceof SignedSecp256r1Key ? undefined : voter,\n remainingAccounts: [],\n })\n );\n }\n\n return instructions;\n}\n","import {\n Secp256r1Key,\n type BasePayload,\n type MessageAuthenticationResponse,\n type MessagePayload,\n} from \"../types\";\nimport { getAuthEndpoint, getGlobalAdditonalInfo } from \"../utils\";\nimport { openAuthUrl } from \"../utils/passkeys/internal\";\n\nexport async function signMessageWithPasskey({\n message,\n signer,\n popUp,\n}: MessagePayload & BasePayload) {\n const authResponse = (await openAuthUrl({\n authUrl: `${getAuthEndpoint()}/?redirectUrl=${encodeURIComponent(window.origin)}`,\n data: { type: \"message\", payload: message },\n signer,\n popUp,\n additionalInfo: getGlobalAdditonalInfo(),\n })) as any;\n return {\n ...authResponse,\n signer: new Secp256r1Key(authResponse.signer),\n } as MessageAuthenticationResponse;\n}\n","import {\n Secp256r1Key,\n type BasePayload,\n type TransactionAuthenticationResponse,\n type TransactionPayload,\n} from \"../types\";\nimport { getAuthEndpoint, getGlobalAdditonalInfo } from \"../utils\";\nimport {\n bufferToBase64URLString,\n openAuthUrl,\n} from \"../utils/passkeys/internal\";\n\nexport async function signTransactionWithPasskey({\n transactionActionType,\n transactionAddress,\n transactionMessageBytes,\n signer,\n popUp,\n}: TransactionPayload & BasePayload) {\n const authResponse = (await openAuthUrl({\n authUrl: `${getAuthEndpoint()}/?redirectUrl=${encodeURIComponent(window.origin)}`,\n data: {\n type: \"transaction\",\n payload: JSON.stringify({\n transactionActionType,\n transactionAddress,\n transactionMessageBytes: bufferToBase64URLString(\n transactionMessageBytes\n ),\n }),\n },\n additionalInfo: getGlobalAdditonalInfo(),\n signer,\n popUp,\n })) as any;\n return {\n ...authResponse,\n signer: new Secp256r1Key(authResponse.signer),\n } as TransactionAuthenticationResponse;\n}\n","import { verifyAuthenticationResponse } from \"@simplewebauthn/server\";\nimport type { MessageAuthenticationResponse } from \"../types\";\nimport { convertPubkeyCompressedToCose, getAuthEndpoint } from \"../utils\";\nimport { REVIBASE_RP_ID } from \"../utils/consts\";\nimport { bufferToBase64URLString } from \"../utils/passkeys/internal\";\n\nexport async function verifyMessage({\n message,\n response,\n expectedOrigin = getAuthEndpoint(),\n}: {\n message: string;\n response: MessageAuthenticationResponse;\n expectedOrigin?: string;\n}): Promise<boolean> {\n const { verified } = await verifyAuthenticationResponse({\n response: response.authResponse,\n expectedChallenge: bufferToBase64URLString(\n new TextEncoder().encode(message)\n ),\n expectedOrigin,\n expectedRPID: REVIBASE_RP_ID,\n requireUserVerification: false,\n credential: {\n id: response.authResponse.id,\n publicKey: convertPubkeyCompressedToCose(response.signer.toString()),\n counter: 0,\n },\n });\n\n return verified;\n}\n","import { sha256 } from \"@noble/hashes/sha256\";\nimport type {\n AddressesByLookupTableAddress,\n Instruction,\n ReadonlyUint8Array,\n TransactionSigner,\n} from \"gill\";\nimport {\n createTransactionBuffer,\n executeTransaction,\n executeTransactionBuffer,\n extendTransactionBuffer,\n type Secp256r1VerifyInput,\n voteTransactionBuffer,\n} from \"../instructions\";\nimport { SignedSecp256r1Key } from \"../types\";\nimport type { TransactionDetails } from \"../types/transaction\";\nimport { getSettingsFromIndex, getTransactionBufferAddress } from \"../utils\";\nimport {\n constructSettingsProofArgs,\n convertToCompressedProofArgs,\n} from \"../utils/compressed/internal\";\n\ninterface CreateTransactionBundleArgs {\n payer: TransactionSigner;\n index: bigint | number;\n transactionMessageBytes: ReadonlyUint8Array;\n bufferIndex?: number;\n creator: TransactionSigner | SignedSecp256r1Key;\n additionalVoters?: (TransactionSigner | SignedSecp256r1Key)[];\n executor?: TransactionSigner | SignedSecp256r1Key;\n additionalSigners?: TransactionSigner[];\n secp256r1VerifyInput?: Secp256r1VerifyInput;\n jitoBundlesTipAmount?: number;\n chunkSize?: number;\n compressed?: boolean;\n addressesByLookupTableAddress?: AddressesByLookupTableAddress;\n cachedAccounts?: Map<string, any>;\n}\n\nexport async function prepareTransactionBundle({\n payer,\n index,\n transactionMessageBytes,\n creator,\n executor,\n secp256r1VerifyInput,\n jitoBundlesTipAmount,\n addressesByLookupTableAddress,\n bufferIndex = Math.floor(Math.random() * 255),\n additionalVoters = [],\n additionalSigners = [],\n compressed = false,\n chunkSize = Math.ceil(transactionMessageBytes.length / 2),\n cachedAccounts,\n}: CreateTransactionBundleArgs): Promise<TransactionDetails[]> {\n // --- Stage 1: Setup Addresses ---\n const [settings, transactionBufferAddress] = await Promise.all([\n getSettingsFromIndex(index),\n getTransactionBufferAddress(\n await getSettingsFromIndex(index),\n creator instanceof SignedSecp256r1Key ? creator : creator.address,\n bufferIndex\n ),\n ]);\n\n // --- Stage 2: Split Transaction Message into chunks + hashing ---\n const chunks: Uint8Array[] = [];\n const chunksHash: Uint8Array[] = [];\n for (let i = 0; i < transactionMessageBytes.length; i += chunkSize) {\n const chunk = transactionMessageBytes.subarray(i, i + chunkSize);\n chunks.push(chunk);\n chunksHash.push(sha256(chunk));\n }\n const finalBufferHash = sha256(new Uint8Array(transactionMessageBytes));\n\n // --- Stage 3: Derive readonly compressed proof args if necessary---\n const { settingsReadonlyArgs, proof, packedAccounts } =\n await constructSettingsProofArgs(compressed, index, false, cachedAccounts);\n const { remainingAccounts, systemOffset } = packedAccounts.toAccountMetas();\n const compressedArgs = settingsReadonlyArgs\n ? {\n settingsReadonlyArgs,\n compressedProofArgs: convertToCompressedProofArgs(proof, systemOffset),\n remainingAccounts,\n payer,\n }\n : null;\n\n // --- Stage 4: Instruction groups ---\n const createIxs = createTransactionBuffer({\n finalBufferHash,\n finalBufferSize: transactionMessageBytes.length,\n bufferIndex,\n payer,\n transactionBufferAddress,\n settings,\n creator,\n preauthorizeExecution: !executor,\n bufferExtendHashes: chunksHash,\n compressedArgs,\n });\n\n const extendIxs = chunks.map((bytes) =>\n extendTransactionBuffer({\n transactionMessageBytes: bytes,\n transactionBufferAddress,\n settings,\n compressed,\n })\n );\n\n const voteIxs = additionalVoters.map((voter) =>\n voteTransactionBuffer({\n voter,\n transactionBufferAddress,\n settings,\n compressedArgs,\n })\n );\n\n const executeApprovalIxs = executeTransactionBuffer({\n compressedArgs,\n settings,\n executor,\n transactionBufferAddress,\n });\n\n const { instructions: executeIxs, addressLookupTableAccounts } =\n await executeTransaction({\n compressed,\n settings,\n transactionMessageBytes,\n transactionBufferAddress,\n payer,\n additionalSigners,\n secp256r1VerifyInput,\n jitoBundlesTipAmount,\n addressesByLookupTableAddress,\n });\n\n // --- Stage 5: Assemble transactions ---\n const buildTx = (instructions: Instruction[]): TransactionDetails => ({\n payer,\n instructions,\n addressesByLookupTableAddress: addressLookupTableAccounts,\n });\n\n const txs = [\n buildTx(createIxs),\n ...extendIxs.map((ix) => buildTx([ix])),\n ...(voteIxs.length ? [buildTx(voteIxs.flat())] : []),\n buildTx(executeApprovalIxs),\n buildTx(executeIxs),\n ];\n\n return txs;\n}\n","import { AccountRole, type Address, type Instruction } from \"gill\";\n\nexport type CompiledKeyMeta = {\n isSigner: boolean;\n isWritable: boolean;\n isInvoked: boolean;\n};\n\ntype KeyMetaMap = Map<Address, CompiledKeyMeta>;\n\n/**\n * This is almost completely copy-pasted from solana-web3.js and slightly adapted to work with \"wrapped\" transaction messaged such as in VaultTransaction.\n * @see https://github.com/solana-labs/solana-web3.js/blob/87d33ac68e2453b8a01cf8c425aa7623888434e8/packages/library-legacy/src/message/compiled-keys.ts\n */\nexport class CompiledKeys {\n payer: Address;\n keyMetaMap: KeyMetaMap;\n\n constructor(payer: Address, keyMetaMap: KeyMetaMap) {\n this.payer = payer;\n this.keyMetaMap = keyMetaMap;\n }\n\n /**\n * The only difference between this and the original is that we don't mark the instruction programIds as invoked.\n * It makes sense to do because the instructions will be called via CPI, so the programIds can come from Address Lookup Tables.\n * This allows to compress the message size and avoid hitting the tx size limit during vault_transaction_create instruction calls.\n */\n static compile(\n instructions: Array<Instruction>,\n payer: Address\n ): CompiledKeys {\n const keyMetaMap: KeyMetaMap = new Map();\n const getOrInsertDefault = (address: Address): CompiledKeyMeta => {\n let keyMeta = keyMetaMap.get(address);\n if (keyMeta === undefined) {\n keyMeta = {\n isSigner: false,\n isWritable: false,\n isInvoked: false,\n };\n keyMetaMap.set(address, keyMeta);\n }\n return keyMeta;\n };\n\n const payerKeyMeta = getOrInsertDefault(payer);\n payerKeyMeta.isSigner = true;\n payerKeyMeta.isWritable = true;\n\n for (const ix of instructions) {\n // This is the only difference from the original.\n // getOrInsertDefault(ix.programId).isInvoked = true;\n getOrInsertDefault(ix.programAddress).isInvoked = false;\n for (const accountMeta of ix.accounts ?? []) {\n const keyMeta = getOrInsertDefault(accountMeta.address);\n keyMeta.isSigner ||=\n accountMeta.role === AccountRole.READONLY_SIGNER ||\n accountMeta.role === AccountRole.WRITABLE_SIGNER;\n keyMeta.isWritable ||=\n accountMeta.role === AccountRole.WRITABLE ||\n accountMeta.role === AccountRole.WRITABLE_SIGNER;\n }\n }\n\n return new CompiledKeys(payer, keyMetaMap);\n }\n\n getMessageComponents(): [\n {\n numReadonlyNonSignerAccounts: number;\n numReadonlySignerAccounts: number;\n numSignerAccounts: number;\n },\n Array<Address>,\n ] {\n const mapEntries = [...this.keyMetaMap.entries()];\n if (mapEntries.length > 256) {\n throw new Error(\"Max static account keys length exceeded\");\n }\n\n const writableSigners = mapEntries.filter(\n ([, meta]) => meta.isSigner && meta.isWritable\n );\n const readonlySigners = mapEntries.filter(\n ([, meta]) => meta.isSigner && !meta.isWritable\n );\n const writableNonSigners = mapEntries.filter(\n ([, meta]) => !meta.isSigner && meta.isWritable\n );\n const readonlyNonSigners = mapEntries.filter(\n ([, meta]) => !meta.isSigner && !meta.isWritable\n );\n\n const header = {\n numSignerAccounts: writableSigners.length + readonlySigners.length,\n numReadonlySignerAccounts: readonlySigners.length,\n numReadonlyNonSignerAccounts: readonlyNonSigners.length,\n };\n\n // sanity checks\n {\n if (writableSigners.length === 0) {\n throw new Error(\"Expected at least one writable signer key\");\n }\n\n const [payerAddress] = writableSigners[0];\n\n if (payerAddress !== this.payer) {\n throw new Error(\n \"Expected first writable signer key to be the fee payer\"\n );\n }\n }\n\n const staticAccountKeys = [\n ...writableSigners.map(([key]) => key),\n ...readonlySigners.map(([key]) => key),\n ...writableNonSigners.map(([key]) => key),\n ...readonlyNonSigners.map(([key]) => key),\n ];\n\n return [header, staticAccountKeys];\n }\n\n extractTableLookup(lookupTableAddresses: [string, Address[]]) {\n const [writableIndexes, drainedWritableKeys] =\n this.drainKeysFoundInLookupTable(\n lookupTableAddresses[1],\n (keyMeta) =>\n !keyMeta.isSigner && !keyMeta.isInvoked && keyMeta.isWritable\n );\n const [readonlyIndexes, drainedReadonlyKeys] =\n this.drainKeysFoundInLookupTable(\n lookupTableAddresses[1],\n (keyMeta) =>\n !keyMeta.isSigner && !keyMeta.isInvoked && !keyMeta.isWritable\n );\n\n // Don't extract lookup if no keys were found\n if (writableIndexes.length === 0 && readonlyIndexes.length === 0) {\n return;\n }\n\n return {\n addressTableLookup: {\n lookupTableAddress: lookupTableAddresses[0],\n writableIndexes,\n readonlyIndexes,\n },\n drainedKeys: {\n writable: drainedWritableKeys,\n readonly: drainedReadonlyKeys,\n },\n };\n }\n\n /** @internal */\n private drainKeysFoundInLookupTable(\n lookupTableEntries: Array<Address>,\n keyMetaFilter: (keyMeta: CompiledKeyMeta) => boolean\n ): [Array<number>, Array<Address>] {\n const lookupTableIndexes = new Array();\n const drainedKeys = new Array();\n\n for (const [addressKey, keyMeta] of this.keyMetaMap.entries()) {\n if (keyMetaFilter(keyMeta)) {\n const key = addressKey;\n const lookupTableIndex = lookupTableEntries.findIndex(\n (entry) => entry === key\n );\n if (lookupTableIndex >= 0) {\n if (lookupTableIndex >= 256) {\n throw new Error(\"Max lookup table index exceeded\");\n }\n lookupTableIndexes.push(lookupTableIndex);\n drainedKeys.push(key);\n this.keyMetaMap.delete(addressKey);\n }\n }\n }\n\n return [lookupTableIndexes, drainedKeys];\n }\n}\n","import type { Address, Instruction } from \"gill\";\n\nexport class MessageAccountKeys {\n private staticAccountKeys: Address[];\n private accountKeysFromLookups: {\n writable: Address[];\n readonly: Address[];\n };\n constructor(\n staticAccountKeys: Address[],\n accountKeysFromLookups: {\n writable: Address[];\n readonly: Address[];\n }\n ) {\n this.staticAccountKeys = staticAccountKeys;\n this.accountKeysFromLookups = accountKeysFromLookups;\n }\n keySegments() {\n const keySegments = [this.staticAccountKeys];\n if (this.accountKeysFromLookups) {\n keySegments.push(this.accountKeysFromLookups.writable);\n keySegments.push(this.accountKeysFromLookups.readonly);\n }\n return keySegments;\n }\n get(index: number) {\n for (const keySegment of this.keySegments()) {\n if (index < keySegment.length) {\n return keySegment[index];\n } else {\n index -= keySegment.length;\n }\n }\n return;\n }\n get length() {\n return this.keySegments().flat().length;\n }\n compileInstructions(instructions: Instruction[]) {\n // Bail early if any account indexes would overflow a u8\n const U8_MAX = 255;\n if (this.length > U8_MAX + 1) {\n throw new Error(\"Account index overflow encountered during compilation\");\n }\n const keyIndexMap = new Map<Address, number>();\n this.keySegments()\n .flat()\n .forEach((key, index) => {\n keyIndexMap.set(key, index);\n });\n const findKeyIndex = (key: Address) => {\n const keyIndex = keyIndexMap.get(key);\n if (keyIndex === undefined)\n throw new Error(\n \"Encountered an unknown instruction account key during compilation\"\n );\n return keyIndex;\n };\n return instructions.map((instruction) => {\n return {\n programAddressIndex: findKeyIndex(instruction.programAddress),\n accountIndices:\n instruction.accounts?.map((meta) => findKeyIndex(meta.address)) ?? [],\n data: instruction.data,\n };\n });\n }\n}\n","import {\n address,\n type Address,\n type AddressesByLookupTableAddress,\n type CompiledTransactionMessage,\n type Instruction,\n} from \"gill\";\nimport { CompiledKeys } from \"./compiled-keys\";\nimport { MessageAccountKeys } from \"./message-account-keys\";\n\nexport function compileToWrappedMessageV0({\n payer,\n recentBlockhash,\n instructions,\n addressesByLookupTableAddress,\n}: {\n payer: Address;\n recentBlockhash: string;\n instructions: Instruction[];\n addressesByLookupTableAddress?: AddressesByLookupTableAddress;\n}) {\n const compiledKeys = CompiledKeys.compile(instructions, payer);\n\n const addressTableLookups: {\n /** The address of the address lookup table account. */\n lookupTableAddress: Address;\n /** @deprecated Use `readonlyIndexes` */\n readableIndices: readonly number[];\n /** Indexes of accounts in a lookup table to load as read-only. */\n readonlyIndexes: readonly number[];\n /** Indexes of accounts in a lookup table to load as writable. */\n writableIndexes: readonly number[];\n /** @deprecated Use `writableIndexes` */\n writableIndices: readonly number[];\n }[] = new Array();\n const accountKeysFromLookups: { writable: Address[]; readonly: Address[] } = {\n writable: [],\n readonly: [],\n };\n const lookupTableAccounts = Object.entries(\n addressesByLookupTableAddress ?? {}\n );\n\n for (const lookupTable of lookupTableAccounts) {\n const extractResult = compiledKeys.extractTableLookup(lookupTable);\n if (extractResult !== undefined) {\n const { addressTableLookup, drainedKeys } = extractResult;\n addressTableLookups.push({\n readonlyIndexes: addressTableLookup.readonlyIndexes,\n readableIndices: addressTableLookup.readonlyIndexes,\n writableIndexes: addressTableLookup.writableIndexes,\n writableIndices: addressTableLookup.writableIndexes,\n lookupTableAddress: address(addressTableLookup.lookupTableAddress),\n });\n accountKeysFromLookups.writable.push(...drainedKeys.writable);\n accountKeysFromLookups.readonly.push(...drainedKeys.readonly);\n }\n }\n\n const [header, staticAccounts] = compiledKeys.getMessageComponents();\n\n const accountKeys = new MessageAccountKeys(\n staticAccounts,\n accountKeysFromLookups\n );\n\n const compiledInstructions = accountKeys.compileInstructions(instructions);\n return {\n version: 0,\n header,\n instructions: compiledInstructions,\n lifetimeToken: recentBlockhash,\n staticAccounts,\n addressTableLookups,\n } as CompiledTransactionMessage;\n}\n","import {\n type Address,\n type AddressesByLookupTableAddress,\n type Instruction,\n} from \"gill\";\nimport { MULTI_WALLET_PROGRAM_ADDRESS } from \"../generated\";\nimport { vaultTransactionMessageSerialize } from \"../types\";\nimport { compileToWrappedMessageV0 } from \"../utils/transactionMessage/compileToWrappedMessageV0\";\ninterface PrepareTransactionMessageArgs {\n instructions: Instruction[];\n payer: Address;\n addressesByLookupTableAddress?: AddressesByLookupTableAddress;\n}\nexport function prepareTransactionMessage({\n instructions,\n payer,\n addressesByLookupTableAddress,\n}: PrepareTransactionMessageArgs) {\n const compiledMessage = compileToWrappedMessageV0({\n instructions,\n payer,\n recentBlockhash: MULTI_WALLET_PROGRAM_ADDRESS,\n addressesByLookupTableAddress,\n });\n\n return vaultTransactionMessageSerialize(compiledMessage);\n}\n","import type {\n AddressesByLookupTableAddress,\n ReadonlyUint8Array,\n TransactionSigner,\n} from \"gill\";\nimport {\n executeTransactionSync,\n type Secp256r1VerifyInput,\n} from \"../instructions\";\nimport { SignedSecp256r1Key, type TransactionDetails } from \"../types\";\n\ninterface CreateTransactionSyncArgs {\n payer: TransactionSigner;\n index: number | bigint;\n transactionMessageBytes: ReadonlyUint8Array;\n signers: (TransactionSigner | SignedSecp256r1Key)[];\n addressesByLookupTableAddress?: AddressesByLookupTableAddress;\n secp256r1VerifyInput?: Secp256r1VerifyInput;\n compressed?: boolean;\n simulateProof?: boolean;\n cachedAccounts?: Map<string, any>;\n}\n\nexport async function prepareTransactionSync({\n payer,\n index,\n transactionMessageBytes,\n signers,\n secp256r1VerifyInput,\n addressesByLookupTableAddress,\n cachedAccounts,\n compressed = false,\n simulateProof = false,\n}: CreateTransactionSyncArgs): Promise<TransactionDetails> {\n const { instructions, addressLookupTableAccounts } =\n await executeTransactionSync({\n index,\n payer,\n signers,\n transactionMessageBytes,\n secp256r1VerifyInput,\n compressed,\n addressesByLookupTableAddress,\n simulateProof,\n cachedAccounts,\n });\n\n return {\n payer,\n instructions,\n addressesByLookupTableAddress: addressLookupTableAccounts,\n };\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/generated/accounts/domainConfig.ts","../src/generated/accounts/globalCounter.ts","../src/generated/types/addMemberArgs.ts","../src/generated/types/compiledInstruction.ts","../src/generated/types/compressedAccountMeta.ts","../src/generated/types/compressedAccountMetaReadOnly.ts","../src/generated/types/compressedProof.ts","../src/generated/types/compressedSettings.ts","../src/generated/types/compressedSettingsData.ts","../src/generated/types/configAction.ts","../src/generated/types/createUserAccountArgs.ts","../src/generated/types/delegateOp.ts","../src/generated/types/editMemberArgs.ts","../src/generated/types/linkWalletArgs.ts","../src/generated/types/member.ts","../src/generated/types/memberKey.ts","../src/generated/types/packedAddressTreeInfo.ts","../src/generated/types/packedStateTreeInfo.ts","../src/generated/types/permissions.ts","../src/generated/types/proofArgs.ts","../src/generated/types/removeMemberArgs.ts","../src/generated/types/secp256r1Pubkey.ts","../src/generated/types/secp256r1VerifyArgs.ts","../src/generated/types/secp256r1VerifyArgsWithDomainAddress.ts","../src/generated/types/settingsCreateOrMutateArgs.ts","../src/generated/types/settingsCreationArgs.ts","../src/generated/types/settingsMutArgs.ts","../src/generated/types/settingsReadonlyArgs.ts","../src/generated/types/transactionBufferCreateArgs.ts","../src/generated/types/transactionMessage.ts","../src/generated/types/transactionMessageAddressTableLookup.ts","../src/generated/types/user.ts","../src/generated/types/userCreationArgs.ts","../src/generated/types/userMutArgs.ts","../src/generated/types/userReadOnlyArgs.ts","../src/generated/types/userReadOnlyOrMutateArgs.ts","../src/generated/accounts/settings.ts","../src/generated/accounts/transactionBuffer.ts","../src/hooked/index.ts","../src/generated/shared/index.ts","../src/generated/instructions/changeConfig.ts","../src/generated/instructions/changeConfigCompressed.ts","../src/generated/instructions/compressSettingsAccount.ts","../src/generated/instructions/createDomainConfig.ts","../src/generated/instructions/createDomainUserAccount.ts","../src/generated/instructions/createGlobalCounter.ts","../src/generated/instructions/createMultiWallet.ts","../src/generated/instructions/createMultiWalletCompressed.ts","../src/generated/instructions/createUserAccounts.ts","../src/generated/instructions/decompressSettingsAccount.ts","../src/generated/instructions/disableDomainConfig.ts","../src/generated/instructions/editDomainConfig.ts","../src/generated/instructions/editTransactionManagerUrl.ts","../src/generated/instructions/migrateCompressedSettings.ts","../src/generated/instructions/migrateCompressedUsers.ts","../src/generated/instructions/nativeTransferIntent.ts","../src/generated/instructions/nativeTransferIntentCompressed.ts","../src/generated/instructions/tokenTransferIntent.ts","../src/generated/instructions/tokenTransferIntentCompressed.ts","../src/generated/instructions/transactionBufferClose.ts","../src/generated/instructions/transactionBufferCloseCompressed.ts","../src/generated/instructions/transactionBufferCreate.ts","../src/generated/instructions/transactionBufferCreateCompressed.ts","../src/generated/instructions/transactionBufferExecute.ts","../src/generated/instructions/transactionBufferExecuteCompressed.ts","../src/generated/instructions/transactionBufferExtend.ts","../src/generated/instructions/transactionBufferExtendCompressed.ts","../src/generated/instructions/transactionBufferVote.ts","../src/generated/instructions/transactionBufferVoteCompressed.ts","../src/generated/instructions/transactionExecute.ts","../src/generated/instructions/transactionExecuteCompressed.ts","../src/generated/instructions/transactionExecuteSync.ts","../src/generated/instructions/transactionExecuteSyncCompressed.ts","../src/generated/programs/multiWallet.ts","../src/generated/errors/multiWallet.ts","../src/types/keyType.ts","../src/types/permissions.ts","../src/types/secp256r1.ts","../src/types/vaultTransactionMessage.ts","../src/utils/consts.ts","../src/utils/addresses/index.ts","../src/utils/transaction/internal.ts","../src/utils/initialize.ts","../src/utils/compressed/packedAccounts.ts","../src/utils/compressed/internal.ts","../src/utils/compressed/helper.ts","../src/utils/passkeys/internal.ts","../src/utils/passkeys/helper.ts","../src/utils/transaction/helper.ts","../src/instructions/changeConfig.ts","../src/instructions/secp256r1Verify.ts","../src/instructions/compressSettingsAccount.ts","../src/instructions/configuration/createDomainConfig.ts","../src/instructions/configuration/createDomainUserAccounts.ts","../src/instructions/configuration/createGlobalCounter.ts","../src/instructions/configuration/createUserAccounts.ts","../src/instructions/configuration/disableDomainConfig.ts","../src/instructions/configuration/editDomainConfig.ts","../src/instructions/configuration/editTransactionManagerUrl.ts","../src/instructions/createWallet.ts","../src/instructions/decompressSettingsAccount.ts","../src/utils/transactionMessage/internal.ts","../src/instructions/executeTransaction.ts","../src/instructions/executeTransactionSync.ts","../src/instructions/intents/nativeTransferIntent.ts","../src/instructions/intents/tokenTransferIntent.ts","../src/instructions/transactionBuffers/closeTransactionBuffer.ts","../src/instructions/transactionBuffers/createTransactionBuffer.ts","../src/instructions/transactionBuffers/executeTransactionBuffer.ts","../src/instructions/transactionBuffers/extendTransactionBuffer.ts","../src/instructions/transactionBuffers/voteTransactionBuffer.ts","../src/passkeys/signMessage.ts","../src/passkeys/signTransaction.ts","../src/passkeys/verifyMessage.ts","../src/transaction/prepareTransactionBundle.ts","../src/utils/transactionMessage/compiled-keys.ts","../src/utils/transactionMessage/message-account-keys.ts","../src/utils/transactionMessage/compileToWrappedMessageV0.ts","../src/transaction/prepareTransactionMessage.ts","../src/transaction/prepareTransactionSync.ts"],"names":["DOMAIN_CONFIG_DISCRIMINATOR","getDomainConfigDiscriminatorBytes","fixEncoderSize","getBytesEncoder","getDomainConfigEncoder","transformEncoder","getStructEncoder","getU16Encoder","getAddressEncoder","getU8Encoder","value","getDomainConfigDecoder","getStructDecoder","fixDecoderSize","getBytesDecoder","getU16Decoder","getAddressDecoder","getU8Decoder","getDomainConfigCodec","combineCodec","decodeDomainConfig","encodedAccount","decodeAccount","fetchDomainConfig","rpc","address","config","maybeAccount","fetchMaybeDomainConfig","assertAccountExists","fetchEncodedAccount","fetchAllDomainConfig","addresses","maybeAccounts","fetchAllMaybeDomainConfig","assertAccountsExist","fetchEncodedAccounts","getDomainConfigSize","GLOBAL_COUNTER_DISCRIMINATOR","getGlobalCounterDiscriminatorBytes","getGlobalCounterEncoder","getU128Encoder","getGlobalCounterDecoder","getU128Decoder","getGlobalCounterCodec","decodeGlobalCounter","fetchGlobalCounter","fetchMaybeGlobalCounter","fetchAllGlobalCounter","fetchAllMaybeGlobalCounter","getGlobalCounterSize","getAddMemberArgsEncoder","getMemberEncoder","getOptionEncoder","getSecp256r1VerifyArgsEncoder","getUserReadOnlyOrMutateArgsEncoder","getBooleanEncoder","getAddMemberArgsDecoder","getMemberDecoder","getOptionDecoder","getSecp256r1VerifyArgsDecoder","getUserReadOnlyOrMutateArgsDecoder","getBooleanDecoder","getAddMemberArgsCodec","getCompiledInstructionEncoder","addEncoderSizePrefix","getU32Encoder","getCompiledInstructionDecoder","addDecoderSizePrefix","getU32Decoder","getCompiledInstructionCodec","getCompressedAccountMetaEncoder","getPackedStateTreeInfoEncoder","getCompressedAccountMetaDecoder","getPackedStateTreeInfoDecoder","getCompressedAccountMetaCodec","getCompressedAccountMetaReadOnlyEncoder","getCompressedAccountMetaReadOnlyDecoder","getCompressedAccountMetaReadOnlyCodec","getCompressedProofEncoder","getCompressedProofDecoder","getCompressedProofCodec","getCompressedSettingsEncoder","getCompressedSettingsDataEncoder","getCompressedSettingsDecoder","getCompressedSettingsDataDecoder","getCompressedSettingsCodec","getArrayEncoder","getArrayDecoder","getCompressedSettingsDataCodec","getConfigActionEncoder","getDiscriminatedUnionEncoder","getTupleEncoder","getEditMemberArgsEncoder","getRemoveMemberArgsEncoder","getConfigActionDecoder","getDiscriminatedUnionDecoder","getTupleDecoder","getEditMemberArgsDecoder","getRemoveMemberArgsDecoder","getConfigActionCodec","configAction","kind","data","isConfigAction","getCreateUserAccountArgsEncoder","getUtf8Encoder","getUserCreationArgsEncoder","getCreateUserAccountArgsDecoder","getUtf8Decoder","getUserCreationArgsDecoder","getCreateUserAccountArgsCodec","DelegateOp","getDelegateOpEncoder","getEnumEncoder","getDelegateOpDecoder","getEnumDecoder","getDelegateOpCodec","getMemberKeyEncoder","getPermissionsEncoder","getUserMutArgsEncoder","getMemberKeyDecoder","getPermissionsDecoder","getUserMutArgsDecoder","getEditMemberArgsCodec","getLinkWalletArgsEncoder","getSettingsMutArgsEncoder","getLinkWalletArgsDecoder","getSettingsMutArgsDecoder","getLinkWalletArgsCodec","getMemberCodec","getMemberKeyCodec","getPackedAddressTreeInfoEncoder","getPackedAddressTreeInfoDecoder","getPackedAddressTreeInfoCodec","getPackedStateTreeInfoCodec","getPermissionsCodec","getProofArgsEncoder","getProofArgsDecoder","getProofArgsCodec","getRemoveMemberArgsCodec","getSecp256r1PubkeyEncoder","getSecp256r1PubkeyDecoder","getSecp256r1PubkeyCodec","getU64Encoder","getU64Decoder","getSecp256r1VerifyArgsCodec","getSecp256r1VerifyArgsWithDomainAddressEncoder","getSecp256r1VerifyArgsWithDomainAddressDecoder","getSecp256r1VerifyArgsWithDomainAddressCodec","getSettingsCreateOrMutateArgsEncoder","getSettingsCreationArgsEncoder","getSettingsCreateOrMutateArgsDecoder","getSettingsCreationArgsDecoder","getSettingsCreateOrMutateArgsCodec","settingsCreateOrMutateArgs","isSettingsCreateOrMutateArgs","getSettingsCreationArgsCodec","getSettingsMutArgsCodec","getSettingsReadonlyArgsEncoder","getSettingsReadonlyArgsDecoder","getSettingsReadonlyArgsCodec","getTransactionBufferCreateArgsEncoder","getTransactionBufferCreateArgsDecoder","getTransactionBufferCreateArgsCodec","getTransactionMessageEncoder","getTransactionMessageAddressTableLookupEncoder","getTransactionMessageDecoder","getTransactionMessageAddressTableLookupDecoder","getTransactionMessageCodec","getTransactionMessageAddressTableLookupCodec","getUserEncoder","getUserDecoder","getUserCodec","getUserCreationArgsCodec","getUserMutArgsCodec","getUserReadOnlyArgsEncoder","getUserReadOnlyArgsDecoder","getUserReadOnlyArgsCodec","getUserReadOnlyOrMutateArgsCodec","userReadOnlyOrMutateArgs","isUserReadOnlyOrMutateArgs","SETTINGS_DISCRIMINATOR","getSettingsDiscriminatorBytes","getSettingsEncoder","getSettingsDecoder","getSettingsCodec","decodeSettings","fetchSettings","fetchMaybeSettings","fetchAllSettings","fetchAllMaybeSettings","getSettingsSize","TRANSACTION_BUFFER_DISCRIMINATOR","getTransactionBufferDiscriminatorBytes","getTransactionBufferEncoder","getTransactionBufferDecoder","getTransactionBufferCodec","decodeTransactionBuffer","fetchTransactionBuffer","fetchMaybeTransactionBuffer","fetchAllTransactionBuffer","fetchAllMaybeTransactionBuffer","parseRemainingAccounts","args","remainingAccounts","x","expectSome","expectAddress","getAccountMetaFactory","programAddress","optionalAccountStrategy","account","AccountRole","writableRole","isTransactionSigner","upgradeRoleToSigner","kitIsTransactionSigner","CHANGE_CONFIG_DISCRIMINATOR","getChangeConfigDiscriminatorBytes","getChangeConfigInstructionDataEncoder","getChangeConfigInstructionDataDecoder","getChangeConfigInstructionDataCodec","getChangeConfigInstructionAsync","input","MULTI_WALLET_PROGRAM_ADDRESS","accounts","resolverScope","getProgramDerivedAddress","getAccountMeta","getChangeConfigInstruction","parseChangeConfigInstruction","instruction","accountIndex","getNextAccount","accountMeta","getNextOptionalAccount","CHANGE_CONFIG_COMPRESSED_DISCRIMINATOR","getChangeConfigCompressedDiscriminatorBytes","getChangeConfigCompressedInstructionDataEncoder","getChangeConfigCompressedInstructionDataDecoder","getChangeConfigCompressedInstructionDataCodec","getChangeConfigCompressedInstruction","parseChangeConfigCompressedInstruction","COMPRESS_SETTINGS_ACCOUNT_DISCRIMINATOR","getCompressSettingsAccountDiscriminatorBytes","getCompressSettingsAccountInstructionDataEncoder","getCompressSettingsAccountInstructionDataDecoder","getCompressSettingsAccountInstructionDataCodec","getCompressSettingsAccountInstruction","parseCompressSettingsAccountInstruction","CREATE_DOMAIN_CONFIG_DISCRIMINATOR","getCreateDomainConfigDiscriminatorBytes","getCreateDomainConfigInstructionDataEncoder","getCreateDomainConfigInstructionDataDecoder","getCreateDomainConfigInstructionDataCodec","getCreateDomainConfigInstruction","parseCreateDomainConfigInstruction","CREATE_DOMAIN_USER_ACCOUNT_DISCRIMINATOR","getCreateDomainUserAccountDiscriminatorBytes","getCreateDomainUserAccountInstructionDataEncoder","getCreateDomainUserAccountInstructionDataDecoder","getCreateDomainUserAccountInstructionDataCodec","getCreateDomainUserAccountInstruction","parseCreateDomainUserAccountInstruction","CREATE_GLOBAL_COUNTER_DISCRIMINATOR","getCreateGlobalCounterDiscriminatorBytes","getCreateGlobalCounterInstructionDataEncoder","getCreateGlobalCounterInstructionDataDecoder","getCreateGlobalCounterInstructionDataCodec","getCreateGlobalCounterInstructionAsync","getCreateGlobalCounterInstruction","parseCreateGlobalCounterInstruction","CREATE_MULTI_WALLET_DISCRIMINATOR","getCreateMultiWalletDiscriminatorBytes","getCreateMultiWalletInstructionDataEncoder","getCreateMultiWalletInstructionDataDecoder","getCreateMultiWalletInstructionDataCodec","getCreateMultiWalletInstructionAsync","getCreateMultiWalletInstruction","parseCreateMultiWalletInstruction","CREATE_MULTI_WALLET_COMPRESSED_DISCRIMINATOR","getCreateMultiWalletCompressedDiscriminatorBytes","getCreateMultiWalletCompressedInstructionDataEncoder","getCreateMultiWalletCompressedInstructionDataDecoder","getCreateMultiWalletCompressedInstructionDataCodec","getCreateMultiWalletCompressedInstruction","parseCreateMultiWalletCompressedInstruction","CREATE_USER_ACCOUNTS_DISCRIMINATOR","getCreateUserAccountsDiscriminatorBytes","getCreateUserAccountsInstructionDataEncoder","getCreateUserAccountsInstructionDataDecoder","getCreateUserAccountsInstructionDataCodec","getCreateUserAccountsInstruction","parseCreateUserAccountsInstruction","DECOMPRESS_SETTINGS_ACCOUNT_DISCRIMINATOR","getDecompressSettingsAccountDiscriminatorBytes","getDecompressSettingsAccountInstructionDataEncoder","getDecompressSettingsAccountInstructionDataDecoder","getDecompressSettingsAccountInstructionDataCodec","getDecompressSettingsAccountInstruction","parseDecompressSettingsAccountInstruction","DISABLE_DOMAIN_CONFIG_DISCRIMINATOR","getDisableDomainConfigDiscriminatorBytes","getDisableDomainConfigInstructionDataEncoder","getDisableDomainConfigInstructionDataDecoder","getDisableDomainConfigInstructionDataCodec","getDisableDomainConfigInstruction","parseDisableDomainConfigInstruction","EDIT_DOMAIN_CONFIG_DISCRIMINATOR","getEditDomainConfigDiscriminatorBytes","getEditDomainConfigInstructionDataEncoder","getEditDomainConfigInstructionDataDecoder","getEditDomainConfigInstructionDataCodec","getEditDomainConfigInstruction","parseEditDomainConfigInstruction","EDIT_TRANSACTION_MANAGER_URL_DISCRIMINATOR","getEditTransactionManagerUrlDiscriminatorBytes","getEditTransactionManagerUrlInstructionDataEncoder","getEditTransactionManagerUrlInstructionDataDecoder","getEditTransactionManagerUrlInstructionDataCodec","getEditTransactionManagerUrlInstruction","parseEditTransactionManagerUrlInstruction","MIGRATE_COMPRESSED_SETTINGS_DISCRIMINATOR","getMigrateCompressedSettingsDiscriminatorBytes","getMigrateCompressedSettingsInstructionDataEncoder","getMigrateCompressedSettingsInstructionDataDecoder","getMigrateCompressedSettingsInstructionDataCodec","getMigrateCompressedSettingsInstruction","parseMigrateCompressedSettingsInstruction","MIGRATE_COMPRESSED_USERS_DISCRIMINATOR","getMigrateCompressedUsersDiscriminatorBytes","getMigrateCompressedUsersInstructionDataEncoder","getMigrateCompressedUsersInstructionDataDecoder","getMigrateCompressedUsersInstructionDataCodec","getMigrateCompressedUsersInstruction","parseMigrateCompressedUsersInstruction","NATIVE_TRANSFER_INTENT_DISCRIMINATOR","getNativeTransferIntentDiscriminatorBytes","getNativeTransferIntentInstructionDataEncoder","getNativeTransferIntentInstructionDataDecoder","getNativeTransferIntentInstructionDataCodec","getNativeTransferIntentInstructionAsync","getNativeTransferIntentInstruction","parseNativeTransferIntentInstruction","NATIVE_TRANSFER_INTENT_COMPRESSED_DISCRIMINATOR","getNativeTransferIntentCompressedDiscriminatorBytes","getNativeTransferIntentCompressedInstructionDataEncoder","getNativeTransferIntentCompressedInstructionDataDecoder","getNativeTransferIntentCompressedInstructionDataCodec","getNativeTransferIntentCompressedInstruction","parseNativeTransferIntentCompressedInstruction","TOKEN_TRANSFER_INTENT_DISCRIMINATOR","getTokenTransferIntentDiscriminatorBytes","getTokenTransferIntentInstructionDataEncoder","getTokenTransferIntentInstructionDataDecoder","getTokenTransferIntentInstructionDataCodec","getTokenTransferIntentInstructionAsync","getTokenTransferIntentInstruction","parseTokenTransferIntentInstruction","TOKEN_TRANSFER_INTENT_COMPRESSED_DISCRIMINATOR","getTokenTransferIntentCompressedDiscriminatorBytes","getTokenTransferIntentCompressedInstructionDataEncoder","getTokenTransferIntentCompressedInstructionDataDecoder","getTokenTransferIntentCompressedInstructionDataCodec","getTokenTransferIntentCompressedInstructionAsync","getTokenTransferIntentCompressedInstruction","parseTokenTransferIntentCompressedInstruction","TRANSACTION_BUFFER_CLOSE_DISCRIMINATOR","getTransactionBufferCloseDiscriminatorBytes","getTransactionBufferCloseInstructionDataEncoder","getTransactionBufferCloseInstructionDataDecoder","getTransactionBufferCloseInstructionDataCodec","getTransactionBufferCloseInstruction","parseTransactionBufferCloseInstruction","TRANSACTION_BUFFER_CLOSE_COMPRESSED_DISCRIMINATOR","getTransactionBufferCloseCompressedDiscriminatorBytes","getTransactionBufferCloseCompressedInstructionDataEncoder","getTransactionBufferCloseCompressedInstructionDataDecoder","getTransactionBufferCloseCompressedInstructionDataCodec","getTransactionBufferCloseCompressedInstruction","parseTransactionBufferCloseCompressedInstruction","TRANSACTION_BUFFER_CREATE_DISCRIMINATOR","getTransactionBufferCreateDiscriminatorBytes","getTransactionBufferCreateInstructionDataEncoder","getTransactionBufferCreateInstructionDataDecoder","getTransactionBufferCreateInstructionDataCodec","getTransactionBufferCreateInstruction","parseTransactionBufferCreateInstruction","TRANSACTION_BUFFER_CREATE_COMPRESSED_DISCRIMINATOR","getTransactionBufferCreateCompressedDiscriminatorBytes","getTransactionBufferCreateCompressedInstructionDataEncoder","getTransactionBufferCreateCompressedInstructionDataDecoder","getTransactionBufferCreateCompressedInstructionDataCodec","getTransactionBufferCreateCompressedInstruction","parseTransactionBufferCreateCompressedInstruction","TRANSACTION_BUFFER_EXECUTE_DISCRIMINATOR","getTransactionBufferExecuteDiscriminatorBytes","getTransactionBufferExecuteInstructionDataEncoder","getTransactionBufferExecuteInstructionDataDecoder","getTransactionBufferExecuteInstructionDataCodec","getTransactionBufferExecuteInstruction","parseTransactionBufferExecuteInstruction","TRANSACTION_BUFFER_EXECUTE_COMPRESSED_DISCRIMINATOR","getTransactionBufferExecuteCompressedDiscriminatorBytes","getTransactionBufferExecuteCompressedInstructionDataEncoder","getTransactionBufferExecuteCompressedInstructionDataDecoder","getTransactionBufferExecuteCompressedInstructionDataCodec","getTransactionBufferExecuteCompressedInstruction","parseTransactionBufferExecuteCompressedInstruction","TRANSACTION_BUFFER_EXTEND_DISCRIMINATOR","getTransactionBufferExtendDiscriminatorBytes","getTransactionBufferExtendInstructionDataEncoder","getTransactionBufferExtendInstructionDataDecoder","getTransactionBufferExtendInstructionDataCodec","getTransactionBufferExtendInstruction","parseTransactionBufferExtendInstruction","TRANSACTION_BUFFER_EXTEND_COMPRESSED_DISCRIMINATOR","getTransactionBufferExtendCompressedDiscriminatorBytes","getTransactionBufferExtendCompressedInstructionDataEncoder","getTransactionBufferExtendCompressedInstructionDataDecoder","getTransactionBufferExtendCompressedInstructionDataCodec","getTransactionBufferExtendCompressedInstruction","parseTransactionBufferExtendCompressedInstruction","TRANSACTION_BUFFER_VOTE_DISCRIMINATOR","getTransactionBufferVoteDiscriminatorBytes","getTransactionBufferVoteInstructionDataEncoder","getTransactionBufferVoteInstructionDataDecoder","getTransactionBufferVoteInstructionDataCodec","getTransactionBufferVoteInstruction","parseTransactionBufferVoteInstruction","TRANSACTION_BUFFER_VOTE_COMPRESSED_DISCRIMINATOR","getTransactionBufferVoteCompressedDiscriminatorBytes","getTransactionBufferVoteCompressedInstructionDataEncoder","getTransactionBufferVoteCompressedInstructionDataDecoder","getTransactionBufferVoteCompressedInstructionDataCodec","getTransactionBufferVoteCompressedInstruction","parseTransactionBufferVoteCompressedInstruction","TRANSACTION_EXECUTE_DISCRIMINATOR","getTransactionExecuteDiscriminatorBytes","getTransactionExecuteInstructionDataEncoder","getTransactionExecuteInstructionDataDecoder","getTransactionExecuteInstructionDataCodec","getTransactionExecuteInstruction","parseTransactionExecuteInstruction","TRANSACTION_EXECUTE_COMPRESSED_DISCRIMINATOR","getTransactionExecuteCompressedDiscriminatorBytes","getTransactionExecuteCompressedInstructionDataEncoder","getTransactionExecuteCompressedInstructionDataDecoder","getTransactionExecuteCompressedInstructionDataCodec","getTransactionExecuteCompressedInstruction","parseTransactionExecuteCompressedInstruction","TRANSACTION_EXECUTE_SYNC_DISCRIMINATOR","getTransactionExecuteSyncDiscriminatorBytes","getTransactionExecuteSyncInstructionDataEncoder","getTransactionExecuteSyncInstructionDataDecoder","getTransactionExecuteSyncInstructionDataCodec","getTransactionExecuteSyncInstruction","parseTransactionExecuteSyncInstruction","TRANSACTION_EXECUTE_SYNC_COMPRESSED_DISCRIMINATOR","getTransactionExecuteSyncCompressedDiscriminatorBytes","getTransactionExecuteSyncCompressedInstructionDataEncoder","getTransactionExecuteSyncCompressedInstructionDataDecoder","getTransactionExecuteSyncCompressedInstructionDataCodec","getTransactionExecuteSyncCompressedInstruction","parseTransactionExecuteSyncCompressedInstruction","MultiWalletAccount","identifyMultiWalletAccount","containsBytes","MultiWalletInstruction","identifyMultiWalletInstruction","MULTI_WALLET_ERROR__INVALID_SIGNED_MESSAGE","MULTI_WALLET_ERROR__INVALID_SECP256R1_VERIFY_ARG","MULTI_WALLET_ERROR__DURABLE_NONCE_DETECTED","MULTI_WALLET_ERROR__DUPLICATE_MEMBER","MULTI_WALLET_ERROR__PERMANENT_MEMBER","MULTI_WALLET_ERROR__PERMANENT_MEMBER_NOT_ALLOWED","MULTI_WALLET_ERROR__ONLY_ONE_PERMANENT_MEMBER_ALLOWED","MULTI_WALLET_ERROR__ONLY_ONE_TRANSACTION_MANAGER_ALLOWED","MULTI_WALLET_ERROR__TRANSACTION_MANAGER_NOT_ALLOWED","MULTI_WALLET_ERROR__EMPTY_MEMBERS","MULTI_WALLET_ERROR__TOO_MANY_MEMBERS","MULTI_WALLET_ERROR__INVALID_THRESHOLD","MULTI_WALLET_ERROR__INVALID_TRANSACTION_MESSAGE","MULTI_WALLET_ERROR__INVALID_NUMBER_OF_ACCOUNTS","MULTI_WALLET_ERROR__INVALID_ACCOUNT","MULTI_WALLET_ERROR__INVALID_ARGUMENTS","MULTI_WALLET_ERROR__MISSING_ACCOUNT","MULTI_WALLET_ERROR__MISSING_USER_ARGS","MULTI_WALLET_ERROR__ALREADY_DELEGATED","MULTI_WALLET_ERROR__INSUFFICIENT_SIGNER_WITH_EXECUTE_PERMISSION","MULTI_WALLET_ERROR__INSUFFICIENT_SIGNER_WITH_INITIATE_PERMISSION","MULTI_WALLET_ERROR__INSUFFICIENT_SIGNERS_WITH_VOTE_PERMISSION","MULTI_WALLET_ERROR__UNEXPECTED_SIGNER","MULTI_WALLET_ERROR__NO_SIGNER_FOUND","MULTI_WALLET_ERROR__UNAUTHORISED_TO_CLOSE_TRANSACTION_BUFFER","MULTI_WALLET_ERROR__INVALID_BUFFER","MULTI_WALLET_ERROR__FINAL_BUFFER_HASH_MISMATCH","MULTI_WALLET_ERROR__FINAL_BUFFER_SIZE_EXCEEDED","MULTI_WALLET_ERROR__FINAL_BUFFER_SIZE_MISMATCH","MULTI_WALLET_ERROR__TRANSACTION_HAS_EXPIRED","MULTI_WALLET_ERROR__TRANSACTION_NOT_APPROVED","MULTI_WALLET_ERROR__PROTECTED_ACCOUNT","MULTI_WALLET_ERROR__MAX_LENGTH_EXCEEDED","MULTI_WALLET_ERROR__MISSING_SYSVAR_SLOT_HISTORY","MULTI_WALLET_ERROR__INVALID_SYSVAR_DATA_FORMAT","MULTI_WALLET_ERROR__SLOT_NUMBER_NOT_FOUND","MULTI_WALLET_ERROR__DOMAIN_CONFIG_IS_DISABLED","MULTI_WALLET_ERROR__DOMAIN_CONFIG_IS_MISSING","MULTI_WALLET_ERROR__MEMBER_DOES_NOT_BELONG_TO_DOMAIN_CONFIG","MULTI_WALLET_ERROR__RP_ID_HASH_MISMATCH","MULTI_WALLET_ERROR__ORIGIN_INDEX_OUT_OF_BOUNDS","multiWalletErrorMessages","getMultiWalletErrorMessage","code","isMultiWalletError","error","transactionMessage","isProgramError","KeyType","Permission","PermanentMemberPermission","TransactionManagerPermission","Permissions","_Permissions","mask","permissions","permission","SECP256R1_PUBLIC_KEY_LENGTH","Secp256r1Key","getBase58Encoder","key","getBase58Decoder","buf","SignedSecp256r1Key","signed","getStructCodec","getU8Codec","getArrayCodec","getMessageAddressTableLookupCodec","getAddressCodec","vaultTransactionMessageCodec","vaultTransactionMessageSerialize","compiledMessage","ix","vaultTransactionMessageDeserialize","transactionMessageBytes","vaultTransactionMessage","featureFlags","VERSION","ADDRESS_TREE_VERSION","REVIBASE_RP_ID","REVIBASE_AUTH_ENDPOINT","REVIBASE_API_ENDPOINT","getCompressedSettingsAddressFromIndex","index","addressSeed","deriveAddressSeedV2","addressTree","PublicKey","batchAddressTree","createBN254","deriveAddressV2","getUserAccountAddress","member","getDomainConfigAddress","rpIdHash","rpId","sha256","domainConfig","getGlobalCounterAddress","globalCounter","getTransactionBufferAddress","settings","creator","buffer_index","transactionBuffer","getWalletAddressFromSettings","getSettingsFromIndex","getWalletAddressFromIndex","getLightCpiSigner","lightCpiSigner","createEncodedBundle","bundle","isSimulate","latestBlockHash","getBlockhashDecoder","getSolanaRpc","pipe","createTransactionMessage","tx","appendTransactionMessageInstructions","setTransactionMessageFeePayerSigner","setTransactionMessageLifetimeUsingBlockhash","compressTransactionMessageUsingAddressLookupTables","computeUnits","prependTransactionMessageInstructions","getSetComputeUnitLimitInstruction","compileTransaction","signTransactionMessageWithSigners","getMedianPriorityFees","connection","fees","f","a","b","mid","simulateBundle","connectionUrl","i","response","result","TransactionFailure","programError","extractSecp256r1VerificationArgs","signer","secp256r1PublicKey","verifyArgs","some","signature","message","publicKey","convertPubkeyToMemberkey","pubkey","getPubkeyString","getDeduplicatedSigners","signers","hashSet","dedupSigners","addJitoTip","payer","tipAmount","JITO_TIP_ACCOUNTS","tipAccount","getTransferSolInstruction","getRandomPayer","payerEndpoint","randomPayer","transactions","payload","getBase64Decoder","getTransactionEncoder","sig","globalSolanaRpcEndpoint","lightProtocolRpc","globalSolanaRpc","globalSendAndConfirmTransaction","globalComputeBudgetEstimate","globalFeePayer","globalApiEndpoint","globalJitoTipsConfig","globalAuthEndpoint","globalAuthorizedClient","globalAdditionalInfo","getSolanaRpcEndpoint","getLightProtocolRpc","getSendAndConfirmTransaction","getComputeBudgetEstimate","getFeePayer","getJitoTipsConfig","getAuthEndpoint","getGlobalAuthorizedClient","getGlobalAdditonalInfo","uninitialize","initialize","rpcEndpoint","proverEndpoint","compressionApiEndpoint","jitoTipsConfig","apiEndpoint","authEndpoint","authorizedClient","additionalInfo","createRpc","sendAndConfirmTransaction","createSolanaClient","estimateComputeUnitLimitFactory","PackedAccounts","isSigner","isWritable","getLightSystemAccountMetasV2","role","outputStateTreeInfo","TreeType","stateTreeInfos","selectStateTreeInfo","accountProofInputs","newAddressProofInputs","addressTreeInfos","merkleTreePubkeyIndex","queuePubkeyIndex","treeToUse","addressMerkleTreePubkeyIndex","addressQueuePubkeyIndex","systemAccountsStartOffset","packedAccountsStartOffset","packedAccounts","systemOffset","packedOffset","getCompressedAccount","cachedAccounts","compressedAccount","getCompressedAccountHashes","filtered","convertToCompressedProofArgs","validityProof","offset","getCompressedAccountInitArgs","treeInfos","roots","rootIndices","newAddresses","addressTrees","outputStateTreeIndex","addressWithTree","getCompressedAccountMutArgs","leafIndices","proveByIndices","hashes","decoder","stateTreeInfo","constructSettingsProofArgs","compressed","simulateProof","settingsReadonlyArgs","proof","getValidityProofWithRetry","retry","delay","attempt","resolve","fetchUserAccountData","fetchMaybeUserAccountData","fetchSettingsAccountData","settingsData","fetchMaybeSettingsAccountData","activeMessageHandler","HEARTBEAT_INTERVAL","TIMEOUT_BUFFER","DEFAULT_TIMEOUT","openAuthUrl","authUrl","popUp","reject","origin","heartbeatTimeout","closeCheckInterval","cleanUp","globalTimeout","log","createPopUp","messageReceivedHandler","event","isSameOrigin","isSameWindow","bufferToBase64URLString","buffer","str","charCode","base64URLStringToBuffer","base64URLString","base64","padLength","padded","binary","bytes","uint8ArrayToHex","hexToUint8Array","hex","extractAdditionalFields","clientData","knownKeys","remaining","serialized","parseOrigins","originsBytes","numOrigins","origins","cursor","strLen","strBytes","convertSignatureDERtoRS","totalLength","lengthBytes","rLen","rStart","r","sLen","sStart","s","rStripped","sStripped","rPad","HALF_ORDER","p256","sBig","sHex","sPad","url","screenWidth","screenHeight","isMobile","width","height","top","left","currentScreenLeft","currentScreenTop","features","passKeyPopup","convertPubkeyCoseToCompressed","decodedPublicKey","decodeCBOR","uncompressedPublicKey","convertPubkeyCompressedToCose","coseDecodedPublicKey","encodeCBOR","getSignedSecp256r1Key","originIndex","crossOrigin","authenticatorData","clientDataJSON","authData","clientDataJsonParsed","truncatedClientDataJson","convertedSignature","getOriginIndex","signAndSendBundledTransactions","simulationBundle","getBase64EncodedWireTransaction","encodedBundle","sendJitoBundle","signAndSendTransaction","instructions","addressesByLookupTableAddress","estimatedUnits","priorityFees","getSetComputeUnitPriceInstruction","getSignatureFromTransaction","serializedTransactions","maxRetries","delayMs","jitoBlockEngineUrl","pollJitoBundleConfirmation","bundleId","results","resolveTransactionManagerSigner","m","convertMemberKeyToString","hasInitiate","hasVote","hasExecute","transactionManager","transactionManagerAddress","userAccountData","createTransactionManagerSigner","memberKey","changeConfig","configActionsArgs","authority","addDelegates","removeDelegates","action","settingsMutArgs","userMutArgs","hashesWithTree","settingsHashes","userHashes","secp256r1VerifyInput","configActions","field","userArgs","getUserArgs","convertAddMember","convertRemoveMember","permanentMember","isPermanentMember","convertEditMember","compressedProofArgs","createNoopSigner","arg","BN","permissionArgs","delegateOperation","convertPermissions","none","setAsDelegate","isTransactionManager","getAddMemberPermission","p","perms","COMPRESSED_PUBKEY_SERIALIZED_SIZE","SIGNATURE_SERIALIZED_SIZE","SIGNATURE_OFFSETS_SERIALIZED_SIZE","SIGNATURE_OFFSETS_START","SECP256R1_PROGRAM_ADDRESS","getSecp256r1SignatureOffsetsDataEncoder","getSecp256r1SignatureOffsetsDataDecoder","getSecp256r1VerifyInstructionDataDecoder","createDecoder","numSignatures","padding","offsets","offsetDecoder","messageSize","getSecp256r1VerifyInstructionDataEncoder","createEncoder","offsetSize","payloadSize","sum","offsetEncoder","offsetEntry","entry","getSecp256r1VerifyInstructionDataCodec","getSecp256r1VerifyInstruction","currentOffset","publicKeyOffset","signatureOffset","messageDataOffset","parseSecp256r1VerifyInstruction","compressSettingsAccount","settingsAddress","settingsArg","newAddressParams","secp256r1Signers","secp256r1VerifyArgs","createDomainConfig","metadataUrl","adminDomainConfig","createDomainUserAccounts","createUserArgs","transactionManagerMutArgs","settingsHash","transactionManagerHash","userCreationArgs","createGlobalCounter","createUserAccounts","disableDomainConfig","admin","disable","editDomainConfig","newAuthority","newOrigins","newMetadataUrl","editTransactionManagerUrl","transactionManagerUrl","createWallet","initialMember","hashesWithTreeEndIndex","settingsCreationArgs","decompressSettingsAccount","getAccountRole","accountKey","vaultPda","isStaticWritableIndex","isSignerIndex","numAccountKeys","numSignerAccounts","numReadonlySignerAccounts","numReadonlyNonSignerAccounts","numWritableSigners","numWritableNonSigners","accountsForTransactionExecute","walletAddress","additionalSigners","addressLookupTableAccounts","fetchAddressesForLookupTables","accountMetas","lookup","lookupTableAccount","meta","executeTransaction","transactionBufferAddress","jitoBundlesTipAmount","executeTransactionSync","customTransactionMessage","parseTransactionMessage","y","nativeTransferIntent","destination","amount","tokenTransferIntent","mint","tokenProgram","sourceTokenAccount","destinationTokenAccount","getAssociatedTokenAccountAddress","closeTransactionBuffer","closer","createTransactionBuffer","bufferIndex","finalBufferHash","finalBufferSize","preauthorizeExecution","bufferExtendHashes","compressedArgs","expectedSigners","executeTransactionBuffer","executor","extendTransactionBuffer","voteTransactionBuffer","voter","signMessageWithPasskey","authResponse","signTransactionWithPasskey","transactionActionType","transactionAddress","verifyMessage","expectedOrigin","verified","verifyAuthenticationResponse","prepareTransactionBundle","additionalVoters","chunkSize","chunks","chunksHash","chunk","createIxs","extendIxs","voteIxs","executeApprovalIxs","executeIxs","buildTx","CompiledKeys","_CompiledKeys","keyMetaMap","getOrInsertDefault","keyMeta","payerKeyMeta","mapEntries","writableSigners","readonlySigners","writableNonSigners","readonlyNonSigners","header","payerAddress","staticAccountKeys","lookupTableAddresses","writableIndexes","drainedWritableKeys","readonlyIndexes","drainedReadonlyKeys","lookupTableEntries","keyMetaFilter","lookupTableIndexes","drainedKeys","addressKey","lookupTableIndex","MessageAccountKeys","accountKeysFromLookups","keySegments","keySegment","keyIndexMap","findKeyIndex","keyIndex","compileToWrappedMessageV0","recentBlockhash","compiledKeys","addressTableLookups","lookupTableAccounts","lookupTable","extractResult","addressTableLookup","staticAccounts","compiledInstructions","prepareTransactionMessage","prepareTransactionSync"],"mappings":"kcAyCO,IAAMA,EAAAA,CAA8B,IAAI,UAAA,CAAW,CACxD,GAAA,CAAK,GAAA,CAAK,GAAA,CAAK,GAAA,CAAK,EAAA,CAAI,GAAA,CAAK,GAAA,CAAK,GACpC,CAAC,EAEM,SAASC,EAAAA,EAAoC,CAClD,OAAOC,mBAAAA,CAAeC,oBAAAA,EAAgB,CAAG,CAAC,CAAA,CAAE,OAC1CH,EACF,CACF,CA6BO,SAASI,EAAAA,EAA6D,CAC3E,OAAOC,qBAAAA,CACLC,qBAAAA,CAAiB,CACf,CAAC,eAAA,CAAiBJ,mBAAAA,CAAeC,oBAAAA,EAAgB,CAAG,CAAC,CAAC,CAAA,CACtD,CAAC,YAAA,CAAcI,kBAAAA,EAAe,CAAA,CAC9B,CAAC,WAAA,CAAaC,sBAAAA,EAAmB,CAAA,CACjC,CAAC,UAAA,CAAYN,mBAAAA,CAAeC,oBAAAA,EAAgB,CAAG,EAAE,CAAC,EAClD,CAAC,MAAA,CAAQM,iBAAAA,EAAc,CAAA,CACvB,CAAC,YAAA,CAAcA,iBAAAA,EAAc,CAAA,CAC7B,CAAC,YAAA,CAAcA,iBAAAA,EAAc,EAC7B,CAAC,MAAA,CAAQP,mBAAAA,CAAeC,oBAAAA,EAAgB,CAAG,GAAG,CAAC,CAAA,CAC/C,CAAC,SAAA,CAAWD,mBAAAA,CAAeC,oBAAAA,EAAgB,CAAG,GAAG,CAAC,CAAA,CAClD,CAAC,mBAAA,CAAqBM,iBAAAA,EAAc,CAAA,CACpC,CAAC,aAAA,CAAeP,mBAAAA,CAAeC,oBAAAA,EAAgB,CAAG,GAAG,CAAC,CACxD,CAAC,CAAA,CACAO,CAAAA,GAAW,CAAE,GAAGA,CAAAA,CAAO,cAAeV,EAA4B,CAAA,CACrE,CACF,CAEO,SAASW,EAAAA,EAAyD,C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CACA,cAAA,CAAAtI,CAAAA,CACA,UAAA,CAAAsB,CAAAA,CAAa,KAAA,CACb,cAAAC,CAAAA,CAAgB,KAClB,CAAA,CAA2D,CACzD,GAAM,CAAE,YAAA,CAAA8G,CAAAA,CAAc,0BAAA,CAAAoI,CAA2B,CAAA,CAC/C,MAAMS,EAAAA,CAAuB,CAC3B,MAAAna,CAAAA,CACA,KAAA,CAAA2E,CAAAA,CACA,OAAA,CAAAJ,CAAAA,CACA,uBAAA,CAAAhF,CAAAA,CACA,oBAAA,CAAAkU,CAAAA,CACA,UAAA,CAAAlJ,CAAAA,CACA,6BAAA,CAAAgH,CAAAA,CACA,aAAA,CAAA/G,EACA,cAAA,CAAAvB,CACF,CAAC,CAAA,CAEH,OAAO,CACL,KAAA,CAAAtE,CAAAA,CACA,YAAA,CAAA2M,CAAAA,CACA,6BAAA,CAA+BoI,CACjC,CACF","file":"index.cjs","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 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 getU16Decoder,\n getU16Encoder,\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 \"gill\";\n\nexport const DOMAIN_CONFIG_DISCRIMINATOR = new Uint8Array([\n 201, 232, 212, 229, 59, 241, 106, 197,\n]);\n\nexport function getDomainConfigDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 8).encode(\n DOMAIN_CONFIG_DISCRIMINATOR\n );\n}\n\nexport type DomainConfig = {\n discriminator: ReadonlyUint8Array;\n numOrigins: number;\n authority: Address;\n rpIdHash: ReadonlyUint8Array;\n bump: number;\n isDisabled: number;\n rpIdLength: number;\n rpId: ReadonlyUint8Array;\n origins: ReadonlyUint8Array;\n metadataUrlLength: number;\n metadataUrl: ReadonlyUint8Array;\n};\n\nexport type DomainConfigArgs = {\n numOrigins: number;\n authority: Address;\n rpIdHash: ReadonlyUint8Array;\n bump: number;\n isDisabled: number;\n rpIdLength: number;\n rpId: ReadonlyUint8Array;\n origins: ReadonlyUint8Array;\n metadataUrlLength: number;\n metadataUrl: ReadonlyUint8Array;\n};\n\nexport function getDomainConfigEncoder(): FixedSizeEncoder<DomainConfigArgs> {\n return transformEncoder(\n getStructEncoder([\n [\"discriminator\", fixEncoderSize(getBytesEncoder(), 8)],\n [\"numOrigins\", getU16Encoder()],\n [\"authority\", getAddressEncoder()],\n [\"rpIdHash\", fixEncoderSize(getBytesEncoder(), 32)],\n [\"bump\", getU8Encoder()],\n [\"isDisabled\", getU8Encoder()],\n [\"rpIdLength\", getU8Encoder()],\n [\"rpId\", fixEncoderSize(getBytesEncoder(), 255)],\n [\"origins\", fixEncoderSize(getBytesEncoder(), 413)],\n [\"metadataUrlLength\", getU8Encoder()],\n [\"metadataUrl\", fixEncoderSize(getBytesEncoder(), 100)],\n ]),\n (value) => ({ ...value, discriminator: DOMAIN_CONFIG_DISCRIMINATOR })\n );\n}\n\nexport function getDomainConfigDecoder(): FixedSizeDecoder<DomainConfig> {\n return getStructDecoder([\n [\"discriminator\", fixDecoderSize(getBytesDecoder(), 8)],\n [\"numOrigins\", getU16Decoder()],\n [\"authority\", getAddressDecoder()],\n [\"rpIdHash\", fixDecoderSize(getBytesDecoder(), 32)],\n [\"bump\", getU8Decoder()],\n [\"isDisabled\", getU8Decoder()],\n [\"rpIdLength\", getU8Decoder()],\n [\"rpId\", fixDecoderSize(getBytesDecoder(), 255)],\n [\"origins\", fixDecoderSize(getBytesDecoder(), 413)],\n [\"metadataUrlLength\", getU8Decoder()],\n [\"metadataUrl\", fixDecoderSize(getBytesDecoder(), 100)],\n ]);\n}\n\nexport function getDomainConfigCodec(): FixedSizeCodec<\n DomainConfigArgs,\n DomainConfig\n> {\n return combineCodec(getDomainConfigEncoder(), getDomainConfigDecoder());\n}\n\nexport function decodeDomainConfig<TAddress extends string = string>(\n encodedAccount: EncodedAccount<TAddress>\n): Account<DomainConfig, TAddress>;\nexport function decodeDomainConfig<TAddress extends string = string>(\n encodedAccount: MaybeEncodedAccount<TAddress>\n): MaybeAccount<DomainConfig, TAddress>;\nexport function decodeDomainConfig<TAddress extends string = string>(\n encodedAccount: EncodedAccount<TAddress> | MaybeEncodedAccount<TAddress>\n): Account<DomainConfig, TAddress> | MaybeAccount<DomainConfig, TAddress> {\n return decodeAccount(\n encodedAccount as MaybeEncodedAccount<TAddress>,\n getDomainConfigDecoder()\n );\n}\n\nexport async function fetchDomainConfig<TAddress extends string = string>(\n rpc: Parameters<typeof fetchEncodedAccount>[0],\n address: Address<TAddress>,\n config?: FetchAccountConfig\n): Promise<Account<DomainConfig, TAddress>> {\n const maybeAccount = await fetchMaybeDomainConfig(rpc, address, config);\n assertAccountExists(maybeAccount);\n return maybeAccount;\n}\n\nexport async function fetchMaybeDomainConfig<TAddress extends string = string>(\n rpc: Parameters<typeof fetchEncodedAccount>[0],\n address: Address<TAddress>,\n config?: FetchAccountConfig\n): Promise<MaybeAccount<DomainConfig, TAddress>> {\n const maybeAccount = await fetchEncodedAccount(rpc, address, config);\n return decodeDomainConfig(maybeAccount);\n}\n\nexport async function fetchAllDomainConfig(\n rpc: Parameters<typeof fetchEncodedAccounts>[0],\n addresses: Array<Address>,\n config?: FetchAccountsConfig\n): Promise<Account<DomainConfig>[]> {\n const maybeAccounts = await fetchAllMaybeDomainConfig(rpc, addresses, config);\n assertAccountsExist(maybeAccounts);\n return maybeAccounts;\n}\n\nexport async function fetchAllMaybeDomainConfig(\n rpc: Parameters<typeof fetchEncodedAccounts>[0],\n addresses: Array<Address>,\n config?: FetchAccountsConfig\n): Promise<MaybeAccount<DomainConfig>[]> {\n const maybeAccounts = await fetchEncodedAccounts(rpc, addresses, config);\n return maybeAccounts.map((maybeAccount) => decodeDomainConfig(maybeAccount));\n}\n\nexport function getDomainConfigSize(): number {\n return 846;\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 getStructDecoder,\n getStructEncoder,\n getU128Decoder,\n getU128Encoder,\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 \"gill\";\n\nexport const GLOBAL_COUNTER_DISCRIMINATOR = new Uint8Array([\n 42, 206, 176, 58, 175, 129, 130, 233,\n]);\n\nexport function getGlobalCounterDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 8).encode(\n GLOBAL_COUNTER_DISCRIMINATOR\n );\n}\n\nexport type GlobalCounter = {\n discriminator: ReadonlyUint8Array;\n index: bigint;\n};\n\nexport type GlobalCounterArgs = { index: number | bigint };\n\nexport function getGlobalCounterEncoder(): FixedSizeEncoder<GlobalCounterArgs> {\n return transformEncoder(\n getStructEncoder([\n [\"discriminator\", fixEncoderSize(getBytesEncoder(), 8)],\n [\"index\", getU128Encoder()],\n ]),\n (value) => ({ ...value, discriminator: GLOBAL_COUNTER_DISCRIMINATOR })\n );\n}\n\nexport function getGlobalCounterDecoder(): FixedSizeDecoder<GlobalCounter> {\n return getStructDecoder([\n [\"discriminator\", fixDecoderSize(getBytesDecoder(), 8)],\n [\"index\", getU128Decoder()],\n ]);\n}\n\nexport function getGlobalCounterCodec(): FixedSizeCodec<\n GlobalCounterArgs,\n GlobalCounter\n> {\n return combineCodec(getGlobalCounterEncoder(), getGlobalCounterDecoder());\n}\n\nexport function decodeGlobalCounter<TAddress extends string = string>(\n encodedAccount: EncodedAccount<TAddress>\n): Account<GlobalCounter, TAddress>;\nexport function decodeGlobalCounter<TAddress extends string = string>(\n encodedAccount: MaybeEncodedAccount<TAddress>\n): MaybeAccount<GlobalCounter, TAddress>;\nexport function decodeGlobalCounter<TAddress extends string = string>(\n encodedAccount: EncodedAccount<TAddress> | MaybeEncodedAccount<TAddress>\n): Account<GlobalCounter, TAddress> | MaybeAccount<GlobalCounter, TAddress> {\n return decodeAccount(\n encodedAccount as MaybeEncodedAccount<TAddress>,\n getGlobalCounterDecoder()\n );\n}\n\nexport async function fetchGlobalCounter<TAddress extends string = string>(\n rpc: Parameters<typeof fetchEncodedAccount>[0],\n address: Address<TAddress>,\n config?: FetchAccountConfig\n): Promise<Account<GlobalCounter, TAddress>> {\n const maybeAccount = await fetchMaybeGlobalCounter(rpc, address, config);\n assertAccountExists(maybeAccount);\n return maybeAccount;\n}\n\nexport async function fetchMaybeGlobalCounter<TAddress extends string = string>(\n rpc: Parameters<typeof fetchEncodedAccount>[0],\n address: Address<TAddress>,\n config?: FetchAccountConfig\n): Promise<MaybeAccount<GlobalCounter, TAddress>> {\n const maybeAccount = await fetchEncodedAccount(rpc, address, config);\n return decodeGlobalCounter(maybeAccount);\n}\n\nexport async function fetchAllGlobalCounter(\n rpc: Parameters<typeof fetchEncodedAccounts>[0],\n addresses: Array<Address>,\n config?: FetchAccountsConfig\n): Promise<Account<GlobalCounter>[]> {\n const maybeAccounts = await fetchAllMaybeGlobalCounter(\n rpc,\n addresses,\n config\n );\n assertAccountsExist(maybeAccounts);\n return maybeAccounts;\n}\n\nexport async function fetchAllMaybeGlobalCounter(\n rpc: Parameters<typeof fetchEncodedAccounts>[0],\n addresses: Array<Address>,\n config?: FetchAccountsConfig\n): Promise<MaybeAccount<GlobalCounter>[]> {\n const maybeAccounts = await fetchEncodedAccounts(rpc, addresses, config);\n return maybeAccounts.map((maybeAccount) => decodeGlobalCounter(maybeAccount));\n}\n\nexport function getGlobalCounterSize(): number {\n return 24;\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 getBooleanDecoder,\n getBooleanEncoder,\n getOptionDecoder,\n getOptionEncoder,\n getStructDecoder,\n getStructEncoder,\n type Codec,\n type Decoder,\n type Encoder,\n type Option,\n type OptionOrNullable,\n} from \"gill\";\nimport {\n getMemberDecoder,\n getMemberEncoder,\n getSecp256r1VerifyArgsDecoder,\n getSecp256r1VerifyArgsEncoder,\n getUserReadOnlyOrMutateArgsDecoder,\n getUserReadOnlyOrMutateArgsEncoder,\n type Member,\n type MemberArgs,\n type Secp256r1VerifyArgs,\n type Secp256r1VerifyArgsArgs,\n type UserReadOnlyOrMutateArgs,\n type UserReadOnlyOrMutateArgsArgs,\n} from \".\";\n\nexport type AddMemberArgs = {\n member: Member;\n verifyArgs: Option<Secp256r1VerifyArgs>;\n userArgs: UserReadOnlyOrMutateArgs;\n setAsDelegate: boolean;\n};\n\nexport type AddMemberArgsArgs = {\n member: MemberArgs;\n verifyArgs: OptionOrNullable<Secp256r1VerifyArgsArgs>;\n userArgs: UserReadOnlyOrMutateArgsArgs;\n setAsDelegate: boolean;\n};\n\nexport function getAddMemberArgsEncoder(): Encoder<AddMemberArgsArgs> {\n return getStructEncoder([\n [\"member\", getMemberEncoder()],\n [\"verifyArgs\", getOptionEncoder(getSecp256r1VerifyArgsEncoder())],\n [\"userArgs\", getUserReadOnlyOrMutateArgsEncoder()],\n [\"setAsDelegate\", getBooleanEncoder()],\n ]);\n}\n\nexport function getAddMemberArgsDecoder(): Decoder<AddMemberArgs> {\n return getStructDecoder([\n [\"member\", getMemberDecoder()],\n [\"verifyArgs\", getOptionDecoder(getSecp256r1VerifyArgsDecoder())],\n [\"userArgs\", getUserReadOnlyOrMutateArgsDecoder()],\n [\"setAsDelegate\", getBooleanDecoder()],\n ]);\n}\n\nexport function getAddMemberArgsCodec(): Codec<\n AddMemberArgsArgs,\n AddMemberArgs\n> {\n return combineCodec(getAddMemberArgsEncoder(), getAddMemberArgsDecoder());\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 getBytesDecoder,\n getBytesEncoder,\n getStructDecoder,\n getStructEncoder,\n getU32Decoder,\n getU32Encoder,\n getU8Decoder,\n getU8Encoder,\n type Codec,\n type Decoder,\n type Encoder,\n type ReadonlyUint8Array,\n} from \"gill\";\n\nexport type CompiledInstruction = {\n programAddressIndex: number;\n accountIndices: ReadonlyUint8Array;\n data: ReadonlyUint8Array;\n};\n\nexport type CompiledInstructionArgs = CompiledInstruction;\n\nexport function getCompiledInstructionEncoder(): Encoder<CompiledInstructionArgs> {\n return getStructEncoder([\n [\"programAddressIndex\", getU8Encoder()],\n [\n \"accountIndices\",\n addEncoderSizePrefix(getBytesEncoder(), getU32Encoder()),\n ],\n [\"data\", addEncoderSizePrefix(getBytesEncoder(), getU32Encoder())],\n ]);\n}\n\nexport function getCompiledInstructionDecoder(): Decoder<CompiledInstruction> {\n return getStructDecoder([\n [\"programAddressIndex\", getU8Decoder()],\n [\n \"accountIndices\",\n addDecoderSizePrefix(getBytesDecoder(), getU32Decoder()),\n ],\n [\"data\", addDecoderSizePrefix(getBytesDecoder(), getU32Decoder())],\n ]);\n}\n\nexport function getCompiledInstructionCodec(): Codec<\n CompiledInstructionArgs,\n CompiledInstruction\n> {\n return combineCodec(\n getCompiledInstructionEncoder(),\n getCompiledInstructionDecoder()\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 getU8Decoder,\n getU8Encoder,\n type FixedSizeCodec,\n type FixedSizeDecoder,\n type FixedSizeEncoder,\n type ReadonlyUint8Array,\n} from \"gill\";\nimport {\n getPackedStateTreeInfoDecoder,\n getPackedStateTreeInfoEncoder,\n type PackedStateTreeInfo,\n type PackedStateTreeInfoArgs,\n} from \".\";\n\nexport type CompressedAccountMeta = {\n /** Merkle tree context. */\n treeInfo: PackedStateTreeInfo;\n /** Address. */\n address: ReadonlyUint8Array;\n /** Output merkle tree index. */\n outputStateTreeIndex: number;\n};\n\nexport type CompressedAccountMetaArgs = {\n /** Merkle tree context. */\n treeInfo: PackedStateTreeInfoArgs;\n /** Address. */\n address: ReadonlyUint8Array;\n /** Output merkle tree index. */\n outputStateTreeIndex: number;\n};\n\nexport function getCompressedAccountMetaEncoder(): FixedSizeEncoder<CompressedAccountMetaArgs> {\n return getStructEncoder([\n [\"treeInfo\", getPackedStateTreeInfoEncoder()],\n [\"address\", fixEncoderSize(getBytesEncoder(), 32)],\n [\"outputStateTreeIndex\", getU8Encoder()],\n ]);\n}\n\nexport function getCompressedAccountMetaDecoder(): FixedSizeDecoder<CompressedAccountMeta> {\n return getStructDecoder([\n [\"treeInfo\", getPackedStateTreeInfoDecoder()],\n [\"address\", fixDecoderSize(getBytesDecoder(), 32)],\n [\"outputStateTreeIndex\", getU8Decoder()],\n ]);\n}\n\nexport function getCompressedAccountMetaCodec(): FixedSizeCodec<\n CompressedAccountMetaArgs,\n CompressedAccountMeta\n> {\n return combineCodec(\n getCompressedAccountMetaEncoder(),\n getCompressedAccountMetaDecoder()\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 type FixedSizeCodec,\n type FixedSizeDecoder,\n type FixedSizeEncoder,\n type ReadonlyUint8Array,\n} from \"gill\";\nimport {\n getPackedStateTreeInfoDecoder,\n getPackedStateTreeInfoEncoder,\n type PackedStateTreeInfo,\n type PackedStateTreeInfoArgs,\n} from \".\";\n\nexport type CompressedAccountMetaReadOnly = {\n /** State Merkle tree context. */\n treeInfo: PackedStateTreeInfo;\n /** Address. */\n address: ReadonlyUint8Array;\n};\n\nexport type CompressedAccountMetaReadOnlyArgs = {\n /** State Merkle tree context. */\n treeInfo: PackedStateTreeInfoArgs;\n /** Address. */\n address: ReadonlyUint8Array;\n};\n\nexport function getCompressedAccountMetaReadOnlyEncoder(): FixedSizeEncoder<CompressedAccountMetaReadOnlyArgs> {\n return getStructEncoder([\n [\"treeInfo\", getPackedStateTreeInfoEncoder()],\n [\"address\", fixEncoderSize(getBytesEncoder(), 32)],\n ]);\n}\n\nexport function getCompressedAccountMetaReadOnlyDecoder(): FixedSizeDecoder<CompressedAccountMetaReadOnly> {\n return getStructDecoder([\n [\"treeInfo\", getPackedStateTreeInfoDecoder()],\n [\"address\", fixDecoderSize(getBytesDecoder(), 32)],\n ]);\n}\n\nexport function getCompressedAccountMetaReadOnlyCodec(): FixedSizeCodec<\n CompressedAccountMetaReadOnlyArgs,\n CompressedAccountMetaReadOnly\n> {\n return combineCodec(\n getCompressedAccountMetaReadOnlyEncoder(),\n getCompressedAccountMetaReadOnlyDecoder()\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 type FixedSizeCodec,\n type FixedSizeDecoder,\n type FixedSizeEncoder,\n type ReadonlyUint8Array,\n} from \"gill\";\n\nexport type CompressedProof = {\n a: ReadonlyUint8Array;\n b: ReadonlyUint8Array;\n c: ReadonlyUint8Array;\n};\n\nexport type CompressedProofArgs = CompressedProof;\n\nexport function getCompressedProofEncoder(): FixedSizeEncoder<CompressedProofArgs> {\n return getStructEncoder([\n [\"a\", fixEncoderSize(getBytesEncoder(), 32)],\n [\"b\", fixEncoderSize(getBytesEncoder(), 64)],\n [\"c\", fixEncoderSize(getBytesEncoder(), 32)],\n ]);\n}\n\nexport function getCompressedProofDecoder(): FixedSizeDecoder<CompressedProof> {\n return getStructDecoder([\n [\"a\", fixDecoderSize(getBytesDecoder(), 32)],\n [\"b\", fixDecoderSize(getBytesDecoder(), 64)],\n [\"c\", fixDecoderSize(getBytesDecoder(), 32)],\n ]);\n}\n\nexport function getCompressedProofCodec(): FixedSizeCodec<\n CompressedProofArgs,\n CompressedProof\n> {\n return combineCodec(getCompressedProofEncoder(), getCompressedProofDecoder());\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 getOptionDecoder,\n getOptionEncoder,\n getStructDecoder,\n getStructEncoder,\n type Codec,\n type Decoder,\n type Encoder,\n type Option,\n type OptionOrNullable,\n} from \"gill\";\nimport {\n getCompressedSettingsDataDecoder,\n getCompressedSettingsDataEncoder,\n type CompressedSettingsData,\n type CompressedSettingsDataArgs,\n} from \".\";\n\nexport type CompressedSettings = { data: Option<CompressedSettingsData> };\n\nexport type CompressedSettingsArgs = {\n data: OptionOrNullable<CompressedSettingsDataArgs>;\n};\n\nexport function getCompressedSettingsEncoder(): Encoder<CompressedSettingsArgs> {\n return getStructEncoder([\n [\"data\", getOptionEncoder(getCompressedSettingsDataEncoder())],\n ]);\n}\n\nexport function getCompressedSettingsDecoder(): Decoder<CompressedSettings> {\n return getStructDecoder([\n [\"data\", getOptionDecoder(getCompressedSettingsDataDecoder())],\n ]);\n}\n\nexport function getCompressedSettingsCodec(): Codec<\n CompressedSettingsArgs,\n CompressedSettings\n> {\n return combineCodec(\n getCompressedSettingsEncoder(),\n getCompressedSettingsDecoder()\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 getArrayDecoder,\n getArrayEncoder,\n getStructDecoder,\n getStructEncoder,\n getU128Decoder,\n getU128Encoder,\n getU8Decoder,\n getU8Encoder,\n type Codec,\n type Decoder,\n type Encoder,\n} from \"gill\";\nimport {\n getMemberDecoder,\n getMemberEncoder,\n type Member,\n type MemberArgs,\n} from \".\";\n\nexport type CompressedSettingsData = {\n threshold: number;\n bump: number;\n index: bigint;\n multiWalletBump: number;\n members: Array<Member>;\n};\n\nexport type CompressedSettingsDataArgs = {\n threshold: number;\n bump: number;\n index: number | bigint;\n multiWalletBump: number;\n members: Array<MemberArgs>;\n};\n\nexport function getCompressedSettingsDataEncoder(): Encoder<CompressedSettingsDataArgs> {\n return getStructEncoder([\n [\"threshold\", getU8Encoder()],\n [\"bump\", getU8Encoder()],\n [\"index\", getU128Encoder()],\n [\"multiWalletBump\", getU8Encoder()],\n [\"members\", getArrayEncoder(getMemberEncoder())],\n ]);\n}\n\nexport function getCompressedSettingsDataDecoder(): Decoder<CompressedSettingsData> {\n return getStructDecoder([\n [\"threshold\", getU8Decoder()],\n [\"bump\", getU8Decoder()],\n [\"index\", getU128Decoder()],\n [\"multiWalletBump\", getU8Decoder()],\n [\"members\", getArrayDecoder(getMemberDecoder())],\n ]);\n}\n\nexport function getCompressedSettingsDataCodec(): Codec<\n CompressedSettingsDataArgs,\n CompressedSettingsData\n> {\n return combineCodec(\n getCompressedSettingsDataEncoder(),\n getCompressedSettingsDataDecoder()\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 getArrayDecoder,\n getArrayEncoder,\n getDiscriminatedUnionDecoder,\n getDiscriminatedUnionEncoder,\n getStructDecoder,\n getStructEncoder,\n getTupleDecoder,\n getTupleEncoder,\n getU8Decoder,\n getU8Encoder,\n type Codec,\n type Decoder,\n type Encoder,\n type GetDiscriminatedUnionVariant,\n type GetDiscriminatedUnionVariantContent,\n} from \"gill\";\nimport {\n getAddMemberArgsDecoder,\n getAddMemberArgsEncoder,\n getEditMemberArgsDecoder,\n getEditMemberArgsEncoder,\n getRemoveMemberArgsDecoder,\n getRemoveMemberArgsEncoder,\n type AddMemberArgs,\n type AddMemberArgsArgs,\n type EditMemberArgs,\n type EditMemberArgsArgs,\n type RemoveMemberArgs,\n type RemoveMemberArgsArgs,\n} from \".\";\n\nexport type ConfigAction =\n | { __kind: \"EditPermissions\"; fields: readonly [Array<EditMemberArgs>] }\n | { __kind: \"AddMembers\"; fields: readonly [Array<AddMemberArgs>] }\n | { __kind: \"RemoveMembers\"; fields: readonly [Array<RemoveMemberArgs>] }\n | { __kind: \"SetThreshold\"; fields: readonly [number] };\n\nexport type ConfigActionArgs =\n | { __kind: \"EditPermissions\"; fields: readonly [Array<EditMemberArgsArgs>] }\n | { __kind: \"AddMembers\"; fields: readonly [Array<AddMemberArgsArgs>] }\n | { __kind: \"RemoveMembers\"; fields: readonly [Array<RemoveMemberArgsArgs>] }\n | { __kind: \"SetThreshold\"; fields: readonly [number] };\n\nexport function getConfigActionEncoder(): Encoder<ConfigActionArgs> {\n return getDiscriminatedUnionEncoder([\n [\n \"EditPermissions\",\n getStructEncoder([\n [\n \"fields\",\n getTupleEncoder([getArrayEncoder(getEditMemberArgsEncoder())]),\n ],\n ]),\n ],\n [\n \"AddMembers\",\n getStructEncoder([\n [\n \"fields\",\n getTupleEncoder([getArrayEncoder(getAddMemberArgsEncoder())]),\n ],\n ]),\n ],\n [\n \"RemoveMembers\",\n getStructEncoder([\n [\n \"fields\",\n getTupleEncoder([getArrayEncoder(getRemoveMemberArgsEncoder())]),\n ],\n ]),\n ],\n [\n \"SetThreshold\",\n getStructEncoder([[\"fields\", getTupleEncoder([getU8Encoder()])]]),\n ],\n ]);\n}\n\nexport function getConfigActionDecoder(): Decoder<ConfigAction> {\n return getDiscriminatedUnionDecoder([\n [\n \"EditPermissions\",\n getStructDecoder([\n [\n \"fields\",\n getTupleDecoder([getArrayDecoder(getEditMemberArgsDecoder())]),\n ],\n ]),\n ],\n [\n \"AddMembers\",\n getStructDecoder([\n [\n \"fields\",\n getTupleDecoder([getArrayDecoder(getAddMemberArgsDecoder())]),\n ],\n ]),\n ],\n [\n \"RemoveMembers\",\n getStructDecoder([\n [\n \"fields\",\n getTupleDecoder([getArrayDecoder(getRemoveMemberArgsDecoder())]),\n ],\n ]),\n ],\n [\n \"SetThreshold\",\n getStructDecoder([[\"fields\", getTupleDecoder([getU8Decoder()])]]),\n ],\n ]);\n}\n\nexport function getConfigActionCodec(): Codec<ConfigActionArgs, ConfigAction> {\n return combineCodec(getConfigActionEncoder(), getConfigActionDecoder());\n}\n\n// Data Enum Helpers.\nexport function configAction(\n kind: \"EditPermissions\",\n data: GetDiscriminatedUnionVariantContent<\n ConfigActionArgs,\n \"__kind\",\n \"EditPermissions\"\n >[\"fields\"]\n): GetDiscriminatedUnionVariant<ConfigActionArgs, \"__kind\", \"EditPermissions\">;\nexport function configAction(\n kind: \"AddMembers\",\n data: GetDiscriminatedUnionVariantContent<\n ConfigActionArgs,\n \"__kind\",\n \"AddMembers\"\n >[\"fields\"]\n): GetDiscriminatedUnionVariant<ConfigActionArgs, \"__kind\", \"AddMembers\">;\nexport function configAction(\n kind: \"RemoveMembers\",\n data: GetDiscriminatedUnionVariantContent<\n ConfigActionArgs,\n \"__kind\",\n \"RemoveMembers\"\n >[\"fields\"]\n): GetDiscriminatedUnionVariant<ConfigActionArgs, \"__kind\", \"RemoveMembers\">;\nexport function configAction(\n kind: \"SetThreshold\",\n data: GetDiscriminatedUnionVariantContent<\n ConfigActionArgs,\n \"__kind\",\n \"SetThreshold\"\n >[\"fields\"]\n): GetDiscriminatedUnionVariant<ConfigActionArgs, \"__kind\", \"SetThreshold\">;\nexport function configAction<K extends ConfigActionArgs[\"__kind\"], Data>(\n kind: K,\n data?: Data\n) {\n return Array.isArray(data)\n ? { __kind: kind, fields: data }\n : { __kind: kind, ...(data ?? {}) };\n}\n\nexport function isConfigAction<K extends ConfigAction[\"__kind\"]>(\n kind: K,\n value: ConfigAction\n): value is ConfigAction & { __kind: K } {\n return value.__kind === kind;\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 getAddressDecoder,\n getAddressEncoder,\n getBooleanDecoder,\n getBooleanEncoder,\n getOptionDecoder,\n getOptionEncoder,\n getStructDecoder,\n getStructEncoder,\n getU32Decoder,\n getU32Encoder,\n getUtf8Decoder,\n getUtf8Encoder,\n type Address,\n type Codec,\n type Decoder,\n type Encoder,\n type Option,\n type OptionOrNullable,\n} from \"gill\";\nimport {\n getUserCreationArgsDecoder,\n getUserCreationArgsEncoder,\n type UserCreationArgs,\n type UserCreationArgsArgs,\n} from \".\";\n\nexport type CreateUserAccountArgs = {\n member: Address;\n isPermanentMember: boolean;\n transactionManagerUrl: Option<string>;\n userCreationArgs: UserCreationArgs;\n};\n\nexport type CreateUserAccountArgsArgs = {\n member: Address;\n isPermanentMember: boolean;\n transactionManagerUrl: OptionOrNullable<string>;\n userCreationArgs: UserCreationArgsArgs;\n};\n\nexport function getCreateUserAccountArgsEncoder(): Encoder<CreateUserAccountArgsArgs> {\n return getStructEncoder([\n [\"member\", getAddressEncoder()],\n [\"isPermanentMember\", getBooleanEncoder()],\n [\n \"transactionManagerUrl\",\n getOptionEncoder(addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder())),\n ],\n [\"userCreationArgs\", getUserCreationArgsEncoder()],\n ]);\n}\n\nexport function getCreateUserAccountArgsDecoder(): Decoder<CreateUserAccountArgs> {\n return getStructDecoder([\n [\"member\", getAddressDecoder()],\n [\"isPermanentMember\", getBooleanDecoder()],\n [\n \"transactionManagerUrl\",\n getOptionDecoder(addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())),\n ],\n [\"userCreationArgs\", getUserCreationArgsDecoder()],\n ]);\n}\n\nexport function getCreateUserAccountArgsCodec(): Codec<\n CreateUserAccountArgsArgs,\n CreateUserAccountArgs\n> {\n return combineCodec(\n getCreateUserAccountArgsEncoder(),\n getCreateUserAccountArgsDecoder()\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 getEnumDecoder,\n getEnumEncoder,\n type FixedSizeCodec,\n type FixedSizeDecoder,\n type FixedSizeEncoder,\n} from \"gill\";\n\nexport enum DelegateOp {\n Add,\n Remove,\n Ignore,\n}\n\nexport type DelegateOpArgs = DelegateOp;\n\nexport function getDelegateOpEncoder(): FixedSizeEncoder<DelegateOpArgs> {\n return getEnumEncoder(DelegateOp);\n}\n\nexport function getDelegateOpDecoder(): FixedSizeDecoder<DelegateOp> {\n return getEnumDecoder(DelegateOp);\n}\n\nexport function getDelegateOpCodec(): FixedSizeCodec<\n DelegateOpArgs,\n DelegateOp\n> {\n return combineCodec(getDelegateOpEncoder(), getDelegateOpDecoder());\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 getOptionDecoder,\n getOptionEncoder,\n getStructDecoder,\n getStructEncoder,\n type Codec,\n type Decoder,\n type Encoder,\n type Option,\n type OptionOrNullable,\n} from \"gill\";\nimport {\n getDelegateOpDecoder,\n getDelegateOpEncoder,\n getMemberKeyDecoder,\n getMemberKeyEncoder,\n getPermissionsDecoder,\n getPermissionsEncoder,\n getUserMutArgsDecoder,\n getUserMutArgsEncoder,\n type DelegateOp,\n type DelegateOpArgs,\n type IPermissions,\n type MemberKey,\n type MemberKeyArgs,\n type PermissionsArgs,\n type UserMutArgs,\n type UserMutArgsArgs,\n} from \".\";\n\nexport type EditMemberArgs = {\n memberKey: MemberKey;\n permissions: IPermissions;\n userArgs: Option<UserMutArgs>;\n delegateOperation: DelegateOp;\n};\n\nexport type EditMemberArgsArgs = {\n memberKey: MemberKeyArgs;\n permissions: PermissionsArgs;\n userArgs: OptionOrNullable<UserMutArgsArgs>;\n delegateOperation: DelegateOpArgs;\n};\n\nexport function getEditMemberArgsEncoder(): Encoder<EditMemberArgsArgs> {\n return getStructEncoder([\n [\"memberKey\", getMemberKeyEncoder()],\n [\"permissions\", getPermissionsEncoder()],\n [\"userArgs\", getOptionEncoder(getUserMutArgsEncoder())],\n [\"delegateOperation\", getDelegateOpEncoder()],\n ]);\n}\n\nexport function getEditMemberArgsDecoder(): Decoder<EditMemberArgs> {\n return getStructDecoder([\n [\"memberKey\", getMemberKeyDecoder()],\n [\"permissions\", getPermissionsDecoder()],\n [\"userArgs\", getOptionDecoder(getUserMutArgsDecoder())],\n [\"delegateOperation\", getDelegateOpDecoder()],\n ]);\n}\n\nexport function getEditMemberArgsCodec(): Codec<\n EditMemberArgsArgs,\n EditMemberArgs\n> {\n return combineCodec(getEditMemberArgsEncoder(), getEditMemberArgsDecoder());\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 getOptionDecoder,\n getOptionEncoder,\n getStructDecoder,\n getStructEncoder,\n type Codec,\n type Decoder,\n type Encoder,\n type Option,\n type OptionOrNullable,\n} from \"gill\";\nimport {\n getSettingsMutArgsDecoder,\n getSettingsMutArgsEncoder,\n getUserMutArgsDecoder,\n getUserMutArgsEncoder,\n type SettingsMutArgs,\n type SettingsMutArgsArgs,\n type UserMutArgs,\n type UserMutArgsArgs,\n} from \".\";\n\nexport type LinkWalletArgs = {\n settingsMutArgs: SettingsMutArgs;\n transactionManager: Option<UserMutArgs>;\n};\n\nexport type LinkWalletArgsArgs = {\n settingsMutArgs: SettingsMutArgsArgs;\n transactionManager: OptionOrNullable<UserMutArgsArgs>;\n};\n\nexport function getLinkWalletArgsEncoder(): Encoder<LinkWalletArgsArgs> {\n return getStructEncoder([\n [\"settingsMutArgs\", getSettingsMutArgsEncoder()],\n [\"transactionManager\", getOptionEncoder(getUserMutArgsEncoder())],\n ]);\n}\n\nexport function getLinkWalletArgsDecoder(): Decoder<LinkWalletArgs> {\n return getStructDecoder([\n [\"settingsMutArgs\", getSettingsMutArgsDecoder()],\n [\"transactionManager\", getOptionDecoder(getUserMutArgsDecoder())],\n ]);\n}\n\nexport function getLinkWalletArgsCodec(): Codec<\n LinkWalletArgsArgs,\n LinkWalletArgs\n> {\n return combineCodec(getLinkWalletArgsEncoder(), getLinkWalletArgsDecoder());\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 getStructDecoder,\n getStructEncoder,\n type FixedSizeCodec,\n type FixedSizeDecoder,\n type FixedSizeEncoder,\n} from \"gill\";\nimport {\n getMemberKeyDecoder,\n getMemberKeyEncoder,\n getPermissionsDecoder,\n getPermissionsEncoder,\n type IPermissions,\n type MemberKey,\n type MemberKeyArgs,\n type PermissionsArgs,\n} from \".\";\n\nexport type Member = { pubkey: MemberKey; permissions: IPermissions };\n\nexport type MemberArgs = {\n pubkey: MemberKeyArgs;\n permissions: PermissionsArgs;\n};\n\nexport function getMemberEncoder(): FixedSizeEncoder<MemberArgs> {\n return getStructEncoder([\n [\"pubkey\", getMemberKeyEncoder()],\n [\"permissions\", getPermissionsEncoder()],\n ]);\n}\n\nexport function getMemberDecoder(): FixedSizeDecoder<Member> {\n return getStructDecoder([\n [\"pubkey\", getMemberKeyDecoder()],\n [\"permissions\", getPermissionsDecoder()],\n ]);\n}\n\nexport function getMemberCodec(): FixedSizeCodec<MemberArgs, Member> {\n return combineCodec(getMemberEncoder(), getMemberDecoder());\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 getU8Decoder,\n getU8Encoder,\n type FixedSizeCodec,\n type FixedSizeDecoder,\n type FixedSizeEncoder,\n type ReadonlyUint8Array,\n} from \"gill\";\n\nexport type MemberKey = { keyType: number; key: ReadonlyUint8Array };\n\nexport type MemberKeyArgs = MemberKey;\n\nexport function getMemberKeyEncoder(): FixedSizeEncoder<MemberKeyArgs> {\n return getStructEncoder([\n [\"keyType\", getU8Encoder()],\n [\"key\", fixEncoderSize(getBytesEncoder(), 33)],\n ]);\n}\n\nexport function getMemberKeyDecoder(): FixedSizeDecoder<MemberKey> {\n return getStructDecoder([\n [\"keyType\", getU8Decoder()],\n [\"key\", fixDecoderSize(getBytesDecoder(), 33)],\n ]);\n}\n\nexport function getMemberKeyCodec(): FixedSizeCodec<MemberKeyArgs, MemberKey> {\n return combineCodec(getMemberKeyEncoder(), getMemberKeyDecoder());\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 getStructDecoder,\n getStructEncoder,\n getU16Decoder,\n getU16Encoder,\n getU8Decoder,\n getU8Encoder,\n type FixedSizeCodec,\n type FixedSizeDecoder,\n type FixedSizeEncoder,\n} from \"gill\";\n\nexport type PackedAddressTreeInfo = {\n addressMerkleTreePubkeyIndex: number;\n addressQueuePubkeyIndex: number;\n rootIndex: number;\n};\n\nexport type PackedAddressTreeInfoArgs = PackedAddressTreeInfo;\n\nexport function getPackedAddressTreeInfoEncoder(): FixedSizeEncoder<PackedAddressTreeInfoArgs> {\n return getStructEncoder([\n [\"addressMerkleTreePubkeyIndex\", getU8Encoder()],\n [\"addressQueuePubkeyIndex\", getU8Encoder()],\n [\"rootIndex\", getU16Encoder()],\n ]);\n}\n\nexport function getPackedAddressTreeInfoDecoder(): FixedSizeDecoder<PackedAddressTreeInfo> {\n return getStructDecoder([\n [\"addressMerkleTreePubkeyIndex\", getU8Decoder()],\n [\"addressQueuePubkeyIndex\", getU8Decoder()],\n [\"rootIndex\", getU16Decoder()],\n ]);\n}\n\nexport function getPackedAddressTreeInfoCodec(): FixedSizeCodec<\n PackedAddressTreeInfoArgs,\n PackedAddressTreeInfo\n> {\n return combineCodec(\n getPackedAddressTreeInfoEncoder(),\n getPackedAddressTreeInfoDecoder()\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 getBooleanDecoder,\n getBooleanEncoder,\n getStructDecoder,\n getStructEncoder,\n getU16Decoder,\n getU16Encoder,\n getU32Decoder,\n getU32Encoder,\n getU8Decoder,\n getU8Encoder,\n type FixedSizeCodec,\n type FixedSizeDecoder,\n type FixedSizeEncoder,\n} from \"gill\";\n\nexport type PackedStateTreeInfo = {\n rootIndex: number;\n proveByIndex: boolean;\n merkleTreePubkeyIndex: number;\n queuePubkeyIndex: number;\n leafIndex: number;\n};\n\nexport type PackedStateTreeInfoArgs = PackedStateTreeInfo;\n\nexport function getPackedStateTreeInfoEncoder(): FixedSizeEncoder<PackedStateTreeInfoArgs> {\n return getStructEncoder([\n [\"rootIndex\", getU16Encoder()],\n [\"proveByIndex\", getBooleanEncoder()],\n [\"merkleTreePubkeyIndex\", getU8Encoder()],\n [\"queuePubkeyIndex\", getU8Encoder()],\n [\"leafIndex\", getU32Encoder()],\n ]);\n}\n\nexport function getPackedStateTreeInfoDecoder(): FixedSizeDecoder<PackedStateTreeInfo> {\n return getStructDecoder([\n [\"rootIndex\", getU16Decoder()],\n [\"proveByIndex\", getBooleanDecoder()],\n [\"merkleTreePubkeyIndex\", getU8Decoder()],\n [\"queuePubkeyIndex\", getU8Decoder()],\n [\"leafIndex\", getU32Decoder()],\n ]);\n}\n\nexport function getPackedStateTreeInfoCodec(): FixedSizeCodec<\n PackedStateTreeInfoArgs,\n PackedStateTreeInfo\n> {\n return combineCodec(\n getPackedStateTreeInfoEncoder(),\n getPackedStateTreeInfoDecoder()\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 getStructDecoder,\n getStructEncoder,\n getU8Decoder,\n getU8Encoder,\n type FixedSizeCodec,\n type FixedSizeDecoder,\n type FixedSizeEncoder,\n} from \"gill\";\n\n/** Bitmask for permissions. */\nexport type IPermissions = { mask: number };\n\nexport type PermissionsArgs = IPermissions;\n\nexport function getPermissionsEncoder(): FixedSizeEncoder<PermissionsArgs> {\n return getStructEncoder([[\"mask\", getU8Encoder()]]);\n}\n\nexport function getPermissionsDecoder(): FixedSizeDecoder<IPermissions> {\n return getStructDecoder([[\"mask\", getU8Decoder()]]);\n}\n\nexport function getPermissionsCodec(): FixedSizeCodec<\n PermissionsArgs,\n IPermissions\n> {\n return combineCodec(getPermissionsEncoder(), getPermissionsDecoder());\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 getOptionDecoder,\n getOptionEncoder,\n getStructDecoder,\n getStructEncoder,\n getU8Decoder,\n getU8Encoder,\n type Codec,\n type Decoder,\n type Encoder,\n type Option,\n type OptionOrNullable,\n} from \"gill\";\nimport {\n getCompressedProofDecoder,\n getCompressedProofEncoder,\n type CompressedProof,\n type CompressedProofArgs,\n} from \".\";\n\nexport type ProofArgs = {\n proof: Option<CompressedProof>;\n lightCpiAccountsStartIndex: number;\n};\n\nexport type ProofArgsArgs = {\n proof: OptionOrNullable<CompressedProofArgs>;\n lightCpiAccountsStartIndex: number;\n};\n\nexport function getProofArgsEncoder(): Encoder<ProofArgsArgs> {\n return getStructEncoder([\n [\"proof\", getOptionEncoder(getCompressedProofEncoder())],\n [\"lightCpiAccountsStartIndex\", getU8Encoder()],\n ]);\n}\n\nexport function getProofArgsDecoder(): Decoder<ProofArgs> {\n return getStructDecoder([\n [\"proof\", getOptionDecoder(getCompressedProofDecoder())],\n [\"lightCpiAccountsStartIndex\", getU8Decoder()],\n ]);\n}\n\nexport function getProofArgsCodec(): Codec<ProofArgsArgs, ProofArgs> {\n return combineCodec(getProofArgsEncoder(), getProofArgsDecoder());\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 getStructDecoder,\n getStructEncoder,\n type Codec,\n type Decoder,\n type Encoder,\n} from \"gill\";\nimport {\n getMemberKeyDecoder,\n getMemberKeyEncoder,\n getUserReadOnlyOrMutateArgsDecoder,\n getUserReadOnlyOrMutateArgsEncoder,\n type MemberKey,\n type MemberKeyArgs,\n type UserReadOnlyOrMutateArgs,\n type UserReadOnlyOrMutateArgsArgs,\n} from \".\";\n\nexport type RemoveMemberArgs = {\n memberKey: MemberKey;\n userArgs: UserReadOnlyOrMutateArgs;\n};\n\nexport type RemoveMemberArgsArgs = {\n memberKey: MemberKeyArgs;\n userArgs: UserReadOnlyOrMutateArgsArgs;\n};\n\nexport function getRemoveMemberArgsEncoder(): Encoder<RemoveMemberArgsArgs> {\n return getStructEncoder([\n [\"memberKey\", getMemberKeyEncoder()],\n [\"userArgs\", getUserReadOnlyOrMutateArgsEncoder()],\n ]);\n}\n\nexport function getRemoveMemberArgsDecoder(): Decoder<RemoveMemberArgs> {\n return getStructDecoder([\n [\"memberKey\", getMemberKeyDecoder()],\n [\"userArgs\", getUserReadOnlyOrMutateArgsDecoder()],\n ]);\n}\n\nexport function getRemoveMemberArgsCodec(): Codec<\n RemoveMemberArgsArgs,\n RemoveMemberArgs\n> {\n return combineCodec(\n getRemoveMemberArgsEncoder(),\n getRemoveMemberArgsDecoder()\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 getTupleDecoder,\n getTupleEncoder,\n type FixedSizeCodec,\n type FixedSizeDecoder,\n type FixedSizeEncoder,\n type ReadonlyUint8Array,\n} from \"gill\";\n\nexport type Secp256r1Pubkey = readonly [ReadonlyUint8Array];\n\nexport type Secp256r1PubkeyArgs = Secp256r1Pubkey;\n\nexport function getSecp256r1PubkeyEncoder(): FixedSizeEncoder<Secp256r1PubkeyArgs> {\n return getTupleEncoder([fixEncoderSize(getBytesEncoder(), 33)]);\n}\n\nexport function getSecp256r1PubkeyDecoder(): FixedSizeDecoder<Secp256r1Pubkey> {\n return getTupleDecoder([fixDecoderSize(getBytesDecoder(), 33)]);\n}\n\nexport function getSecp256r1PubkeyCodec(): FixedSizeCodec<\n Secp256r1PubkeyArgs,\n Secp256r1Pubkey\n> {\n return combineCodec(getSecp256r1PubkeyEncoder(), getSecp256r1PubkeyDecoder());\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 getBooleanDecoder,\n getBooleanEncoder,\n getBytesDecoder,\n getBytesEncoder,\n getStructDecoder,\n getStructEncoder,\n getU32Decoder,\n getU32Encoder,\n getU64Decoder,\n getU64Encoder,\n getU8Decoder,\n getU8Encoder,\n type Codec,\n type Decoder,\n type Encoder,\n type ReadonlyUint8Array,\n} from \"gill\";\n\nexport type Secp256r1VerifyArgs = {\n signedMessageIndex: number;\n slotNumber: bigint;\n originIndex: number;\n crossOrigin: boolean;\n truncatedClientDataJson: ReadonlyUint8Array;\n};\n\nexport type Secp256r1VerifyArgsArgs = {\n signedMessageIndex: number;\n slotNumber: number | bigint;\n originIndex: number;\n crossOrigin: boolean;\n truncatedClientDataJson: ReadonlyUint8Array;\n};\n\nexport function getSecp256r1VerifyArgsEncoder(): Encoder<Secp256r1VerifyArgsArgs> {\n return getStructEncoder([\n [\"signedMessageIndex\", getU8Encoder()],\n [\"slotNumber\", getU64Encoder()],\n [\"originIndex\", getU8Encoder()],\n [\"crossOrigin\", getBooleanEncoder()],\n [\n \"truncatedClientDataJson\",\n addEncoderSizePrefix(getBytesEncoder(), getU32Encoder()),\n ],\n ]);\n}\n\nexport function getSecp256r1VerifyArgsDecoder(): Decoder<Secp256r1VerifyArgs> {\n return getStructDecoder([\n [\"signedMessageIndex\", getU8Decoder()],\n [\"slotNumber\", getU64Decoder()],\n [\"originIndex\", getU8Decoder()],\n [\"crossOrigin\", getBooleanDecoder()],\n [\n \"truncatedClientDataJson\",\n addDecoderSizePrefix(getBytesDecoder(), getU32Decoder()),\n ],\n ]);\n}\n\nexport function getSecp256r1VerifyArgsCodec(): Codec<\n Secp256r1VerifyArgsArgs,\n Secp256r1VerifyArgs\n> {\n return combineCodec(\n getSecp256r1VerifyArgsEncoder(),\n getSecp256r1VerifyArgsDecoder()\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 getAddressDecoder,\n getAddressEncoder,\n getStructDecoder,\n getStructEncoder,\n type Address,\n type Codec,\n type Decoder,\n type Encoder,\n} from \"gill\";\nimport {\n getSecp256r1VerifyArgsDecoder,\n getSecp256r1VerifyArgsEncoder,\n type Secp256r1VerifyArgs,\n type Secp256r1VerifyArgsArgs,\n} from \".\";\n\nexport type Secp256r1VerifyArgsWithDomainAddress = {\n domainConfigKey: Address;\n verifyArgs: Secp256r1VerifyArgs;\n};\n\nexport type Secp256r1VerifyArgsWithDomainAddressArgs = {\n domainConfigKey: Address;\n verifyArgs: Secp256r1VerifyArgsArgs;\n};\n\nexport function getSecp256r1VerifyArgsWithDomainAddressEncoder(): Encoder<Secp256r1VerifyArgsWithDomainAddressArgs> {\n return getStructEncoder([\n [\"domainConfigKey\", getAddressEncoder()],\n [\"verifyArgs\", getSecp256r1VerifyArgsEncoder()],\n ]);\n}\n\nexport function getSecp256r1VerifyArgsWithDomainAddressDecoder(): Decoder<Secp256r1VerifyArgsWithDomainAddress> {\n return getStructDecoder([\n [\"domainConfigKey\", getAddressDecoder()],\n [\"verifyArgs\", getSecp256r1VerifyArgsDecoder()],\n ]);\n}\n\nexport function getSecp256r1VerifyArgsWithDomainAddressCodec(): Codec<\n Secp256r1VerifyArgsWithDomainAddressArgs,\n Secp256r1VerifyArgsWithDomainAddress\n> {\n return combineCodec(\n getSecp256r1VerifyArgsWithDomainAddressEncoder(),\n getSecp256r1VerifyArgsWithDomainAddressDecoder()\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 getDiscriminatedUnionDecoder,\n getDiscriminatedUnionEncoder,\n getStructDecoder,\n getStructEncoder,\n getTupleDecoder,\n getTupleEncoder,\n type Codec,\n type Decoder,\n type Encoder,\n type GetDiscriminatedUnionVariant,\n type GetDiscriminatedUnionVariantContent,\n} from \"gill\";\nimport {\n getSettingsCreationArgsDecoder,\n getSettingsCreationArgsEncoder,\n getSettingsMutArgsDecoder,\n getSettingsMutArgsEncoder,\n type SettingsCreationArgs,\n type SettingsCreationArgsArgs,\n type SettingsMutArgs,\n type SettingsMutArgsArgs,\n} from \".\";\n\nexport type SettingsCreateOrMutateArgs =\n | { __kind: \"Create\"; fields: readonly [SettingsCreationArgs] }\n | { __kind: \"Mutate\"; fields: readonly [SettingsMutArgs] };\n\nexport type SettingsCreateOrMutateArgsArgs =\n | { __kind: \"Create\"; fields: readonly [SettingsCreationArgsArgs] }\n | { __kind: \"Mutate\"; fields: readonly [SettingsMutArgsArgs] };\n\nexport function getSettingsCreateOrMutateArgsEncoder(): Encoder<SettingsCreateOrMutateArgsArgs> {\n return getDiscriminatedUnionEncoder([\n [\n \"Create\",\n getStructEncoder([\n [\"fields\", getTupleEncoder([getSettingsCreationArgsEncoder()])],\n ]),\n ],\n [\n \"Mutate\",\n getStructEncoder([\n [\"fields\", getTupleEncoder([getSettingsMutArgsEncoder()])],\n ]),\n ],\n ]);\n}\n\nexport function getSettingsCreateOrMutateArgsDecoder(): Decoder<SettingsCreateOrMutateArgs> {\n return getDiscriminatedUnionDecoder([\n [\n \"Create\",\n getStructDecoder([\n [\"fields\", getTupleDecoder([getSettingsCreationArgsDecoder()])],\n ]),\n ],\n [\n \"Mutate\",\n getStructDecoder([\n [\"fields\", getTupleDecoder([getSettingsMutArgsDecoder()])],\n ]),\n ],\n ]);\n}\n\nexport function getSettingsCreateOrMutateArgsCodec(): Codec<\n SettingsCreateOrMutateArgsArgs,\n SettingsCreateOrMutateArgs\n> {\n return combineCodec(\n getSettingsCreateOrMutateArgsEncoder(),\n getSettingsCreateOrMutateArgsDecoder()\n );\n}\n\n// Data Enum Helpers.\nexport function settingsCreateOrMutateArgs(\n kind: \"Create\",\n data: GetDiscriminatedUnionVariantContent<\n SettingsCreateOrMutateArgsArgs,\n \"__kind\",\n \"Create\"\n >[\"fields\"]\n): GetDiscriminatedUnionVariant<\n SettingsCreateOrMutateArgsArgs,\n \"__kind\",\n \"Create\"\n>;\nexport function settingsCreateOrMutateArgs(\n kind: \"Mutate\",\n data: GetDiscriminatedUnionVariantContent<\n SettingsCreateOrMutateArgsArgs,\n \"__kind\",\n \"Mutate\"\n >[\"fields\"]\n): GetDiscriminatedUnionVariant<\n SettingsCreateOrMutateArgsArgs,\n \"__kind\",\n \"Mutate\"\n>;\nexport function settingsCreateOrMutateArgs<\n K extends SettingsCreateOrMutateArgsArgs[\"__kind\"],\n Data,\n>(kind: K, data?: Data) {\n return Array.isArray(data)\n ? { __kind: kind, fields: data }\n : { __kind: kind, ...(data ?? {}) };\n}\n\nexport function isSettingsCreateOrMutateArgs<\n K extends SettingsCreateOrMutateArgs[\"__kind\"],\n>(\n kind: K,\n value: SettingsCreateOrMutateArgs\n): value is SettingsCreateOrMutateArgs & { __kind: K } {\n return value.__kind === kind;\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 getStructDecoder,\n getStructEncoder,\n getU8Decoder,\n getU8Encoder,\n type FixedSizeCodec,\n type FixedSizeDecoder,\n type FixedSizeEncoder,\n} from \"gill\";\nimport {\n getPackedAddressTreeInfoDecoder,\n getPackedAddressTreeInfoEncoder,\n type PackedAddressTreeInfo,\n type PackedAddressTreeInfoArgs,\n} from \".\";\n\nexport type SettingsCreationArgs = {\n addressTreeInfo: PackedAddressTreeInfo;\n outputStateTreeIndex: number;\n};\n\nexport type SettingsCreationArgsArgs = {\n addressTreeInfo: PackedAddressTreeInfoArgs;\n outputStateTreeIndex: number;\n};\n\nexport function getSettingsCreationArgsEncoder(): FixedSizeEncoder<SettingsCreationArgsArgs> {\n return getStructEncoder([\n [\"addressTreeInfo\", getPackedAddressTreeInfoEncoder()],\n [\"outputStateTreeIndex\", getU8Encoder()],\n ]);\n}\n\nexport function getSettingsCreationArgsDecoder(): FixedSizeDecoder<SettingsCreationArgs> {\n return getStructDecoder([\n [\"addressTreeInfo\", getPackedAddressTreeInfoDecoder()],\n [\"outputStateTreeIndex\", getU8Decoder()],\n ]);\n}\n\nexport function getSettingsCreationArgsCodec(): FixedSizeCodec<\n SettingsCreationArgsArgs,\n SettingsCreationArgs\n> {\n return combineCodec(\n getSettingsCreationArgsEncoder(),\n getSettingsCreationArgsDecoder()\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 getStructDecoder,\n getStructEncoder,\n type Codec,\n type Decoder,\n type Encoder,\n} from \"gill\";\nimport {\n getCompressedAccountMetaDecoder,\n getCompressedAccountMetaEncoder,\n getCompressedSettingsDecoder,\n getCompressedSettingsEncoder,\n type CompressedAccountMeta,\n type CompressedAccountMetaArgs,\n type CompressedSettings,\n type CompressedSettingsArgs,\n} from \".\";\n\nexport type SettingsMutArgs = {\n accountMeta: CompressedAccountMeta;\n data: CompressedSettings;\n};\n\nexport type SettingsMutArgsArgs = {\n accountMeta: CompressedAccountMetaArgs;\n data: CompressedSettingsArgs;\n};\n\nexport function getSettingsMutArgsEncoder(): Encoder<SettingsMutArgsArgs> {\n return getStructEncoder([\n [\"accountMeta\", getCompressedAccountMetaEncoder()],\n [\"data\", getCompressedSettingsEncoder()],\n ]);\n}\n\nexport function getSettingsMutArgsDecoder(): Decoder<SettingsMutArgs> {\n return getStructDecoder([\n [\"accountMeta\", getCompressedAccountMetaDecoder()],\n [\"data\", getCompressedSettingsDecoder()],\n ]);\n}\n\nexport function getSettingsMutArgsCodec(): Codec<\n SettingsMutArgsArgs,\n SettingsMutArgs\n> {\n return combineCodec(getSettingsMutArgsEncoder(), getSettingsMutArgsDecoder());\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 getStructDecoder,\n getStructEncoder,\n type Codec,\n type Decoder,\n type Encoder,\n} from \"gill\";\nimport {\n getCompressedAccountMetaReadOnlyDecoder,\n getCompressedAccountMetaReadOnlyEncoder,\n getCompressedSettingsDecoder,\n getCompressedSettingsEncoder,\n type CompressedAccountMetaReadOnly,\n type CompressedAccountMetaReadOnlyArgs,\n type CompressedSettings,\n type CompressedSettingsArgs,\n} from \".\";\n\nexport type SettingsReadonlyArgs = {\n accountMeta: CompressedAccountMetaReadOnly;\n data: CompressedSettings;\n};\n\nexport type SettingsReadonlyArgsArgs = {\n accountMeta: CompressedAccountMetaReadOnlyArgs;\n data: CompressedSettingsArgs;\n};\n\nexport function getSettingsReadonlyArgsEncoder(): Encoder<SettingsReadonlyArgsArgs> {\n return getStructEncoder([\n [\"accountMeta\", getCompressedAccountMetaReadOnlyEncoder()],\n [\"data\", getCompressedSettingsEncoder()],\n ]);\n}\n\nexport function getSettingsReadonlyArgsDecoder(): Decoder<SettingsReadonlyArgs> {\n return getStructDecoder([\n [\"accountMeta\", getCompressedAccountMetaReadOnlyDecoder()],\n [\"data\", getCompressedSettingsDecoder()],\n ]);\n}\n\nexport function getSettingsReadonlyArgsCodec(): Codec<\n SettingsReadonlyArgsArgs,\n SettingsReadonlyArgs\n> {\n return combineCodec(\n getSettingsReadonlyArgsEncoder(),\n getSettingsReadonlyArgsDecoder()\n );\n}\n","/**\n * This code was AUTOGENERATED using the Codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun Codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n combineCodec,\n fixDecoderSize,\n fixEncoderSize,\n getArrayDecoder,\n getArrayEncoder,\n getBooleanDecoder,\n getBooleanEncoder,\n getBytesDecoder,\n getBytesEncoder,\n getStructDecoder,\n getStructEncoder,\n getU16Decoder,\n getU16Encoder,\n getU8Decoder,\n getU8Encoder,\n type Codec,\n type Decoder,\n type Encoder,\n type ReadonlyUint8Array,\n} from \"gill\";\nimport {\n getMemberKeyDecoder,\n getMemberKeyEncoder,\n type MemberKey,\n type MemberKeyArgs,\n} from \".\";\n\nexport type TransactionBufferCreateArgs = {\n bufferIndex: number;\n preauthorizeExecution: boolean;\n bufferExtendHashes: Array<ReadonlyUint8Array>;\n finalBufferHash: ReadonlyUint8Array;\n finalBufferSize: number;\n expectedSigners: Array<MemberKey>;\n};\n\nexport type TransactionBufferCreateArgsArgs = {\n bufferIndex: number;\n preauthorizeExecution: boolean;\n bufferExtendHashes: Array<ReadonlyUint8Array>;\n finalBufferHash: ReadonlyUint8Array;\n finalBufferSize: number;\n expectedSigners: Array<MemberKeyArgs>;\n};\n\nexport function getTransactionBufferCreateArgsEncoder(): Encoder<TransactionBufferCreateArgsArgs> {\n return getStructEncoder([\n [\"bufferIndex\", getU8Encoder()],\n [\"preauthorizeExecution\", getBooleanEncoder()],\n [\n \"bufferExtendHashes\",\n getArrayEncoder(fixEncoderSize(getBytesEncoder(), 32)),\n ],\n [\"finalBufferHash\", fixEncoderSize(getBytesEncoder(), 32)],\n [\"finalBufferSize\", getU16Encoder()],\n [\"expectedSigners\", getArrayEncoder(getMemberKeyEncoder())],\n ]);\n}\n\nexport function getTransactionBufferCreateArgsDecoder(): Decoder<TransactionBufferCreateArgs> {\n return getStructDecoder([\n [\"bufferIndex\", getU8Decoder()],\n [\"preauthorizeExecution\", getBooleanDecoder()],\n [\n \"bufferExtendHashes\",\n getArrayDecoder(fixDecoderSize(getBytesDecoder(), 32)),\n ],\n [\"finalBufferHash\", fixDecoderSize(getBytesDecoder(), 32)],\n [\"finalBufferSize\", getU16Decoder()],\n [\"expectedSigners\", getArrayDecoder(getMemberKeyDecoder())],\n ]);\n}\n\nexport function getTransactionBufferCreateArgsCodec(): Codec<\n TransactionBufferCreateArgsArgs,\n TransactionBufferCreateArgs\n> {\n return combineCodec(\n getTransactionBufferCreateArgsEncoder(),\n getTransactionBufferCreateArgsDecoder()\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 getArrayDecoder,\n getArrayEncoder,\n getStructDecoder,\n getStructEncoder,\n getU8Decoder,\n getU8Encoder,\n type Codec,\n type Decoder,\n type Encoder,\n} from \"gill\";\nimport {\n getCompiledInstructionDecoder,\n getCompiledInstructionEncoder,\n getTransactionMessageAddressTableLookupDecoder,\n getTransactionMessageAddressTableLookupEncoder,\n type CompiledInstruction,\n type CompiledInstructionArgs,\n type TransactionMessageAddressTableLookup,\n type TransactionMessageAddressTableLookupArgs,\n} from \".\";\n\nexport type TransactionMessage = {\n numSigners: number;\n numWritableSigners: number;\n numWritableNonSigners: number;\n numAccountKeys: number;\n instructions: Array<CompiledInstruction>;\n addressTableLookups: Array<TransactionMessageAddressTableLookup>;\n};\n\nexport type TransactionMessageArgs = {\n numSigners: number;\n numWritableSigners: number;\n numWritableNonSigners: number;\n numAccountKeys: number;\n instructions: Array<CompiledInstructionArgs>;\n addressTableLookups: Array<TransactionMessageAddressTableLookupArgs>;\n};\n\nexport function getTransactionMessageEncoder(): Encoder<TransactionMessageArgs> {\n return getStructEncoder([\n [\"numSigners\", getU8Encoder()],\n [\"numWritableSigners\", getU8Encoder()],\n [\"numWritableNonSigners\", getU8Encoder()],\n [\"numAccountKeys\", getU8Encoder()],\n [\"instructions\", getArrayEncoder(getCompiledInstructionEncoder())],\n [\n \"addressTableLookups\",\n getArrayEncoder(getTransactionMessageAddressTableLookupEncoder()),\n ],\n ]);\n}\n\nexport function getTransactionMessageDecoder(): Decoder<TransactionMessage> {\n return getStructDecoder([\n [\"numSigners\", getU8Decoder()],\n [\"numWritableSigners\", getU8Decoder()],\n [\"numWritableNonSigners\", getU8Decoder()],\n [\"numAccountKeys\", getU8Decoder()],\n [\"instructions\", getArrayDecoder(getCompiledInstructionDecoder())],\n [\n \"addressTableLookups\",\n getArrayDecoder(getTransactionMessageAddressTableLookupDecoder()),\n ],\n ]);\n}\n\nexport function getTransactionMessageCodec(): Codec<\n TransactionMessageArgs,\n TransactionMessage\n> {\n return combineCodec(\n getTransactionMessageEncoder(),\n getTransactionMessageDecoder()\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 getBytesDecoder,\n getBytesEncoder,\n getStructDecoder,\n getStructEncoder,\n getU32Decoder,\n getU32Encoder,\n getU8Decoder,\n getU8Encoder,\n type Codec,\n type Decoder,\n type Encoder,\n type ReadonlyUint8Array,\n} from \"gill\";\n\nexport type TransactionMessageAddressTableLookup = {\n lookupTableAddressIndex: number;\n writableIndexes: ReadonlyUint8Array;\n readonlyIndexes: ReadonlyUint8Array;\n};\n\nexport type TransactionMessageAddressTableLookupArgs =\n TransactionMessageAddressTableLookup;\n\nexport function getTransactionMessageAddressTableLookupEncoder(): Encoder<TransactionMessageAddressTableLookupArgs> {\n return getStructEncoder([\n [\"lookupTableAddressIndex\", getU8Encoder()],\n [\n \"writableIndexes\",\n addEncoderSizePrefix(getBytesEncoder(), getU32Encoder()),\n ],\n [\n \"readonlyIndexes\",\n addEncoderSizePrefix(getBytesEncoder(), getU32Encoder()),\n ],\n ]);\n}\n\nexport function getTransactionMessageAddressTableLookupDecoder(): Decoder<TransactionMessageAddressTableLookup> {\n return getStructDecoder([\n [\"lookupTableAddressIndex\", getU8Decoder()],\n [\n \"writableIndexes\",\n addDecoderSizePrefix(getBytesDecoder(), getU32Decoder()),\n ],\n [\n \"readonlyIndexes\",\n addDecoderSizePrefix(getBytesDecoder(), getU32Decoder()),\n ],\n ]);\n}\n\nexport function getTransactionMessageAddressTableLookupCodec(): Codec<\n TransactionMessageAddressTableLookupArgs,\n TransactionMessageAddressTableLookup\n> {\n return combineCodec(\n getTransactionMessageAddressTableLookupEncoder(),\n getTransactionMessageAddressTableLookupDecoder()\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 getAddressDecoder,\n getAddressEncoder,\n getBooleanDecoder,\n getBooleanEncoder,\n getOptionDecoder,\n getOptionEncoder,\n getStructDecoder,\n getStructEncoder,\n getU128Decoder,\n getU128Encoder,\n getU32Decoder,\n getU32Encoder,\n getUtf8Decoder,\n getUtf8Encoder,\n type Address,\n type Codec,\n type Decoder,\n type Encoder,\n type Option,\n type OptionOrNullable,\n} from \"gill\";\nimport {\n getMemberKeyDecoder,\n getMemberKeyEncoder,\n type MemberKey,\n type MemberKeyArgs,\n} from \".\";\n\nexport type User = {\n member: MemberKey;\n domainConfig: Option<Address>;\n isPermanentMember: boolean;\n settingsIndex: Option<bigint>;\n transactionManagerUrl: Option<string>;\n};\n\nexport type UserArgs = {\n member: MemberKeyArgs;\n domainConfig: OptionOrNullable<Address>;\n isPermanentMember: boolean;\n settingsIndex: OptionOrNullable<number | bigint>;\n transactionManagerUrl: OptionOrNullable<string>;\n};\n\nexport function getUserEncoder(): Encoder<UserArgs> {\n return getStructEncoder([\n [\"member\", getMemberKeyEncoder()],\n [\"domainConfig\", getOptionEncoder(getAddressEncoder())],\n [\"isPermanentMember\", getBooleanEncoder()],\n [\"settingsIndex\", getOptionEncoder(getU128Encoder())],\n [\n \"transactionManagerUrl\",\n getOptionEncoder(addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder())),\n ],\n ]);\n}\n\nexport function getUserDecoder(): Decoder<User> {\n return getStructDecoder([\n [\"member\", getMemberKeyDecoder()],\n [\"domainConfig\", getOptionDecoder(getAddressDecoder())],\n [\"isPermanentMember\", getBooleanDecoder()],\n [\"settingsIndex\", getOptionDecoder(getU128Decoder())],\n [\n \"transactionManagerUrl\",\n getOptionDecoder(addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())),\n ],\n ]);\n}\n\nexport function getUserCodec(): Codec<UserArgs, User> {\n return combineCodec(getUserEncoder(), getUserDecoder());\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 getStructDecoder,\n getStructEncoder,\n getU8Decoder,\n getU8Encoder,\n type FixedSizeCodec,\n type FixedSizeDecoder,\n type FixedSizeEncoder,\n} from \"gill\";\nimport {\n getPackedAddressTreeInfoDecoder,\n getPackedAddressTreeInfoEncoder,\n type PackedAddressTreeInfo,\n type PackedAddressTreeInfoArgs,\n} from \".\";\n\nexport type UserCreationArgs = {\n addressTreeInfo: PackedAddressTreeInfo;\n outputStateTreeIndex: number;\n};\n\nexport type UserCreationArgsArgs = {\n addressTreeInfo: PackedAddressTreeInfoArgs;\n outputStateTreeIndex: number;\n};\n\nexport function getUserCreationArgsEncoder(): FixedSizeEncoder<UserCreationArgsArgs> {\n return getStructEncoder([\n [\"addressTreeInfo\", getPackedAddressTreeInfoEncoder()],\n [\"outputStateTreeIndex\", getU8Encoder()],\n ]);\n}\n\nexport function getUserCreationArgsDecoder(): FixedSizeDecoder<UserCreationArgs> {\n return getStructDecoder([\n [\"addressTreeInfo\", getPackedAddressTreeInfoDecoder()],\n [\"outputStateTreeIndex\", getU8Decoder()],\n ]);\n}\n\nexport function getUserCreationArgsCodec(): FixedSizeCodec<\n UserCreationArgsArgs,\n UserCreationArgs\n> {\n return combineCodec(\n getUserCreationArgsEncoder(),\n getUserCreationArgsDecoder()\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 getStructDecoder,\n getStructEncoder,\n type Codec,\n type Decoder,\n type Encoder,\n} from \"gill\";\nimport {\n getCompressedAccountMetaDecoder,\n getCompressedAccountMetaEncoder,\n getUserDecoder,\n getUserEncoder,\n type CompressedAccountMeta,\n type CompressedAccountMetaArgs,\n type User,\n type UserArgs,\n} from \".\";\n\nexport type UserMutArgs = { accountMeta: CompressedAccountMeta; data: User };\n\nexport type UserMutArgsArgs = {\n accountMeta: CompressedAccountMetaArgs;\n data: UserArgs;\n};\n\nexport function getUserMutArgsEncoder(): Encoder<UserMutArgsArgs> {\n return getStructEncoder([\n [\"accountMeta\", getCompressedAccountMetaEncoder()],\n [\"data\", getUserEncoder()],\n ]);\n}\n\nexport function getUserMutArgsDecoder(): Decoder<UserMutArgs> {\n return getStructDecoder([\n [\"accountMeta\", getCompressedAccountMetaDecoder()],\n [\"data\", getUserDecoder()],\n ]);\n}\n\nexport function getUserMutArgsCodec(): Codec<UserMutArgsArgs, UserMutArgs> {\n return combineCodec(getUserMutArgsEncoder(), getUserMutArgsDecoder());\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 getStructDecoder,\n getStructEncoder,\n type Codec,\n type Decoder,\n type Encoder,\n} from \"gill\";\nimport {\n getCompressedAccountMetaReadOnlyDecoder,\n getCompressedAccountMetaReadOnlyEncoder,\n getUserDecoder,\n getUserEncoder,\n type CompressedAccountMetaReadOnly,\n type CompressedAccountMetaReadOnlyArgs,\n type User,\n type UserArgs,\n} from \".\";\n\nexport type UserReadOnlyArgs = {\n accountMeta: CompressedAccountMetaReadOnly;\n data: User;\n};\n\nexport type UserReadOnlyArgsArgs = {\n accountMeta: CompressedAccountMetaReadOnlyArgs;\n data: UserArgs;\n};\n\nexport function getUserReadOnlyArgsEncoder(): Encoder<UserReadOnlyArgsArgs> {\n return getStructEncoder([\n [\"accountMeta\", getCompressedAccountMetaReadOnlyEncoder()],\n [\"data\", getUserEncoder()],\n ]);\n}\n\nexport function getUserReadOnlyArgsDecoder(): Decoder<UserReadOnlyArgs> {\n return getStructDecoder([\n [\"accountMeta\", getCompressedAccountMetaReadOnlyDecoder()],\n [\"data\", getUserDecoder()],\n ]);\n}\n\nexport function getUserReadOnlyArgsCodec(): Codec<\n UserReadOnlyArgsArgs,\n UserReadOnlyArgs\n> {\n return combineCodec(\n getUserReadOnlyArgsEncoder(),\n getUserReadOnlyArgsDecoder()\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 getDiscriminatedUnionDecoder,\n getDiscriminatedUnionEncoder,\n getStructDecoder,\n getStructEncoder,\n getTupleDecoder,\n getTupleEncoder,\n type Codec,\n type Decoder,\n type Encoder,\n type GetDiscriminatedUnionVariant,\n type GetDiscriminatedUnionVariantContent,\n} from \"gill\";\nimport {\n getUserMutArgsDecoder,\n getUserMutArgsEncoder,\n getUserReadOnlyArgsDecoder,\n getUserReadOnlyArgsEncoder,\n type UserMutArgs,\n type UserMutArgsArgs,\n type UserReadOnlyArgs,\n type UserReadOnlyArgsArgs,\n} from \".\";\n\nexport type UserReadOnlyOrMutateArgs =\n | { __kind: \"Read\"; fields: readonly [UserReadOnlyArgs] }\n | { __kind: \"Mutate\"; fields: readonly [UserMutArgs] };\n\nexport type UserReadOnlyOrMutateArgsArgs =\n | { __kind: \"Read\"; fields: readonly [UserReadOnlyArgsArgs] }\n | { __kind: \"Mutate\"; fields: readonly [UserMutArgsArgs] };\n\nexport function getUserReadOnlyOrMutateArgsEncoder(): Encoder<UserReadOnlyOrMutateArgsArgs> {\n return getDiscriminatedUnionEncoder([\n [\n \"Read\",\n getStructEncoder([\n [\"fields\", getTupleEncoder([getUserReadOnlyArgsEncoder()])],\n ]),\n ],\n [\n \"Mutate\",\n getStructEncoder([\n [\"fields\", getTupleEncoder([getUserMutArgsEncoder()])],\n ]),\n ],\n ]);\n}\n\nexport function getUserReadOnlyOrMutateArgsDecoder(): Decoder<UserReadOnlyOrMutateArgs> {\n return getDiscriminatedUnionDecoder([\n [\n \"Read\",\n getStructDecoder([\n [\"fields\", getTupleDecoder([getUserReadOnlyArgsDecoder()])],\n ]),\n ],\n [\n \"Mutate\",\n getStructDecoder([\n [\"fields\", getTupleDecoder([getUserMutArgsDecoder()])],\n ]),\n ],\n ]);\n}\n\nexport function getUserReadOnlyOrMutateArgsCodec(): Codec<\n UserReadOnlyOrMutateArgsArgs,\n UserReadOnlyOrMutateArgs\n> {\n return combineCodec(\n getUserReadOnlyOrMutateArgsEncoder(),\n getUserReadOnlyOrMutateArgsDecoder()\n );\n}\n\n// Data Enum Helpers.\nexport function userReadOnlyOrMutateArgs(\n kind: \"Read\",\n data: GetDiscriminatedUnionVariantContent<\n UserReadOnlyOrMutateArgsArgs,\n \"__kind\",\n \"Read\"\n >[\"fields\"]\n): GetDiscriminatedUnionVariant<UserReadOnlyOrMutateArgsArgs, \"__kind\", \"Read\">;\nexport function userReadOnlyOrMutateArgs(\n kind: \"Mutate\",\n data: GetDiscriminatedUnionVariantContent<\n UserReadOnlyOrMutateArgsArgs,\n \"__kind\",\n \"Mutate\"\n >[\"fields\"]\n): GetDiscriminatedUnionVariant<\n UserReadOnlyOrMutateArgsArgs,\n \"__kind\",\n \"Mutate\"\n>;\nexport function userReadOnlyOrMutateArgs<\n K extends UserReadOnlyOrMutateArgsArgs[\"__kind\"],\n Data,\n>(kind: K, data?: Data) {\n return Array.isArray(data)\n ? { __kind: kind, fields: data }\n : { __kind: kind, ...(data ?? {}) };\n}\n\nexport function isUserReadOnlyOrMutateArgs<\n K extends UserReadOnlyOrMutateArgs[\"__kind\"],\n>(\n kind: K,\n value: UserReadOnlyOrMutateArgs\n): value is UserReadOnlyOrMutateArgs & { __kind: K } {\n return value.__kind === kind;\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 getArrayDecoder,\n getArrayEncoder,\n getBytesDecoder,\n getBytesEncoder,\n getStructDecoder,\n getStructEncoder,\n getU128Decoder,\n getU128Encoder,\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 \"gill\";\nimport {\n getMemberDecoder,\n getMemberEncoder,\n type Member,\n type MemberArgs,\n} from \"../types\";\n\nexport const SETTINGS_DISCRIMINATOR = new Uint8Array([\n 223, 179, 163, 190, 177, 224, 67, 173,\n]);\n\nexport function getSettingsDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 8).encode(SETTINGS_DISCRIMINATOR);\n}\n\nexport type Settings = {\n discriminator: ReadonlyUint8Array;\n index: bigint;\n members: Array<Member>;\n membersLen: number;\n threshold: number;\n multiWalletBump: number;\n bump: number;\n};\n\nexport type SettingsArgs = {\n index: number | bigint;\n members: Array<MemberArgs>;\n membersLen: number;\n threshold: number;\n multiWalletBump: number;\n bump: number;\n};\n\nexport function getSettingsEncoder(): FixedSizeEncoder<SettingsArgs> {\n return transformEncoder(\n getStructEncoder([\n [\"discriminator\", fixEncoderSize(getBytesEncoder(), 8)],\n [\"index\", getU128Encoder()],\n [\"members\", getArrayEncoder(getMemberEncoder(), { size: 4 })],\n [\"membersLen\", getU8Encoder()],\n [\"threshold\", getU8Encoder()],\n [\"multiWalletBump\", getU8Encoder()],\n [\"bump\", getU8Encoder()],\n ]),\n (value) => ({ ...value, discriminator: SETTINGS_DISCRIMINATOR })\n );\n}\n\nexport function getSettingsDecoder(): FixedSizeDecoder<Settings> {\n return getStructDecoder([\n [\"discriminator\", fixDecoderSize(getBytesDecoder(), 8)],\n [\"index\", getU128Decoder()],\n [\"members\", getArrayDecoder(getMemberDecoder(), { size: 4 })],\n [\"membersLen\", getU8Decoder()],\n [\"threshold\", getU8Decoder()],\n [\"multiWalletBump\", getU8Decoder()],\n [\"bump\", getU8Decoder()],\n ]);\n}\n\nexport function getSettingsCodec(): FixedSizeCodec<SettingsArgs, Settings> {\n return combineCodec(getSettingsEncoder(), getSettingsDecoder());\n}\n\nexport function decodeSettings<TAddress extends string = string>(\n encodedAccount: EncodedAccount<TAddress>\n): Account<Settings, TAddress>;\nexport function decodeSettings<TAddress extends string = string>(\n encodedAccount: MaybeEncodedAccount<TAddress>\n): MaybeAccount<Settings, TAddress>;\nexport function decodeSettings<TAddress extends string = string>(\n encodedAccount: EncodedAccount<TAddress> | MaybeEncodedAccount<TAddress>\n): Account<Settings, TAddress> | MaybeAccount<Settings, TAddress> {\n return decodeAccount(\n encodedAccount as MaybeEncodedAccount<TAddress>,\n getSettingsDecoder()\n );\n}\n\nexport async function fetchSettings<TAddress extends string = string>(\n rpc: Parameters<typeof fetchEncodedAccount>[0],\n address: Address<TAddress>,\n config?: FetchAccountConfig\n): Promise<Account<Settings, TAddress>> {\n const maybeAccount = await fetchMaybeSettings(rpc, address, config);\n assertAccountExists(maybeAccount);\n return maybeAccount;\n}\n\nexport async function fetchMaybeSettings<TAddress extends string = string>(\n rpc: Parameters<typeof fetchEncodedAccount>[0],\n address: Address<TAddress>,\n config?: FetchAccountConfig\n): Promise<MaybeAccount<Settings, TAddress>> {\n const maybeAccount = await fetchEncodedAccount(rpc, address, config);\n return decodeSettings(maybeAccount);\n}\n\nexport async function fetchAllSettings(\n rpc: Parameters<typeof fetchEncodedAccounts>[0],\n addresses: Array<Address>,\n config?: FetchAccountsConfig\n): Promise<Account<Settings>[]> {\n const maybeAccounts = await fetchAllMaybeSettings(rpc, addresses, config);\n assertAccountsExist(maybeAccounts);\n return maybeAccounts;\n}\n\nexport async function fetchAllMaybeSettings(\n rpc: Parameters<typeof fetchEncodedAccounts>[0],\n addresses: Array<Address>,\n config?: FetchAccountsConfig\n): Promise<MaybeAccount<Settings>[]> {\n const maybeAccounts = await fetchEncodedAccounts(rpc, addresses, config);\n return maybeAccounts.map((maybeAccount) => decodeSettings(maybeAccount));\n}\n\nexport function getSettingsSize(): number {\n return 168;\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 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 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 \"gill\";\nimport {\n getMemberKeyDecoder,\n getMemberKeyEncoder,\n type MemberKey,\n type MemberKeyArgs,\n} from \"../types\";\n\nexport const TRANSACTION_BUFFER_DISCRIMINATOR = new Uint8Array([\n 90, 36, 35, 219, 93, 225, 110, 96,\n]);\n\nexport function getTransactionBufferDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 8).encode(\n TRANSACTION_BUFFER_DISCRIMINATOR\n );\n}\n\nexport type TransactionBuffer = {\n discriminator: ReadonlyUint8Array;\n /** The multisig settings this belongs to. */\n multiWalletSettings: Address;\n /** The bump for the multi_wallet */\n multiWalletBump: number;\n /** Flag to allow transaction to be executed */\n canExecute: boolean;\n /** Flag to preauthorize execution before sufficient threshold is met */\n preauthorizeExecution: boolean;\n validTill: bigint;\n /** Payer for the transaction buffer */\n payer: Address;\n /** transaction bump */\n bump: number;\n /** Index to seed address derivation */\n bufferIndex: number;\n /** Hash of the final assembled transaction message. */\n finalBufferHash: ReadonlyUint8Array;\n /** The size of the final assembled transaction message. */\n finalBufferSize: number;\n /** Member of the Multisig who created the TransactionBuffer. */\n creator: MemberKey;\n /** Member of the Multisig who executed the TransactionBuffer. */\n executor: MemberKey;\n /** Buffer hash for all the buffer extend instruction */\n bufferExtendHashes: Array<ReadonlyUint8Array>;\n /** Members that voted for this transaction */\n voters: Array<MemberKey>;\n /** Members that are expected to initiate / vote / execute this transaction */\n expectedSigners: Array<MemberKey>;\n /** The buffer of the transaction message. */\n buffer: ReadonlyUint8Array;\n};\n\nexport type TransactionBufferArgs = {\n /** The multisig settings this belongs to. */\n multiWalletSettings: Address;\n /** The bump for the multi_wallet */\n multiWalletBump: number;\n /** Flag to allow transaction to be executed */\n canExecute: boolean;\n /** Flag to preauthorize execution before sufficient threshold is met */\n preauthorizeExecution: boolean;\n validTill: number | bigint;\n /** Payer for the transaction buffer */\n payer: Address;\n /** transaction bump */\n bump: number;\n /** Index to seed address derivation */\n bufferIndex: number;\n /** Hash of the final assembled transaction message. */\n finalBufferHash: ReadonlyUint8Array;\n /** The size of the final assembled transaction message. */\n finalBufferSize: number;\n /** Member of the Multisig who created the TransactionBuffer. */\n creator: MemberKeyArgs;\n /** Member of the Multisig who executed the TransactionBuffer. */\n executor: MemberKeyArgs;\n /** Buffer hash for all the buffer extend instruction */\n bufferExtendHashes: Array<ReadonlyUint8Array>;\n /** Members that voted for this transaction */\n voters: Array<MemberKeyArgs>;\n /** Members that are expected to initiate / vote / execute this transaction */\n expectedSigners: Array<MemberKeyArgs>;\n /** The buffer of the transaction message. */\n buffer: ReadonlyUint8Array;\n};\n\nexport function getTransactionBufferEncoder(): Encoder<TransactionBufferArgs> {\n return transformEncoder(\n getStructEncoder([\n [\"discriminator\", fixEncoderSize(getBytesEncoder(), 8)],\n [\"multiWalletSettings\", getAddressEncoder()],\n [\"multiWalletBump\", getU8Encoder()],\n [\"canExecute\", getBooleanEncoder()],\n [\"preauthorizeExecution\", getBooleanEncoder()],\n [\"validTill\", getU64Encoder()],\n [\"payer\", getAddressEncoder()],\n [\"bump\", getU8Encoder()],\n [\"bufferIndex\", getU8Encoder()],\n [\"finalBufferHash\", fixEncoderSize(getBytesEncoder(), 32)],\n [\"finalBufferSize\", getU16Encoder()],\n [\"creator\", getMemberKeyEncoder()],\n [\"executor\", getMemberKeyEncoder()],\n [\n \"bufferExtendHashes\",\n getArrayEncoder(fixEncoderSize(getBytesEncoder(), 32)),\n ],\n [\"voters\", getArrayEncoder(getMemberKeyEncoder())],\n [\"expectedSigners\", getArrayEncoder(getMemberKeyEncoder())],\n [\"buffer\", addEncoderSizePrefix(getBytesEncoder(), getU32Encoder())],\n ]),\n (value) => ({ ...value, discriminator: TRANSACTION_BUFFER_DISCRIMINATOR })\n );\n}\n\nexport function getTransactionBufferDecoder(): Decoder<TransactionBuffer> {\n return getStructDecoder([\n [\"discriminator\", fixDecoderSize(getBytesDecoder(), 8)],\n [\"multiWalletSettings\", getAddressDecoder()],\n [\"multiWalletBump\", getU8Decoder()],\n [\"canExecute\", getBooleanDecoder()],\n [\"preauthorizeExecution\", getBooleanDecoder()],\n [\"validTill\", getU64Decoder()],\n [\"payer\", getAddressDecoder()],\n [\"bump\", getU8Decoder()],\n [\"bufferIndex\", getU8Decoder()],\n [\"finalBufferHash\", fixDecoderSize(getBytesDecoder(), 32)],\n [\"finalBufferSize\", getU16Decoder()],\n [\"creator\", getMemberKeyDecoder()],\n [\"executor\", getMemberKeyDecoder()],\n [\n \"bufferExtendHashes\",\n getArrayDecoder(fixDecoderSize(getBytesDecoder(), 32)),\n ],\n [\"voters\", getArrayDecoder(getMemberKeyDecoder())],\n [\"expectedSigners\", getArrayDecoder(getMemberKeyDecoder())],\n [\"buffer\", addDecoderSizePrefix(getBytesDecoder(), getU32Decoder())],\n ]);\n}\n\nexport function getTransactionBufferCodec(): Codec<\n TransactionBufferArgs,\n TransactionBuffer\n> {\n return combineCodec(\n getTransactionBufferEncoder(),\n getTransactionBufferDecoder()\n );\n}\n\nexport function decodeTransactionBuffer<TAddress extends string = string>(\n encodedAccount: EncodedAccount<TAddress>\n): Account<TransactionBuffer, TAddress>;\nexport function decodeTransactionBuffer<TAddress extends string = string>(\n encodedAccount: MaybeEncodedAccount<TAddress>\n): MaybeAccount<TransactionBuffer, TAddress>;\nexport function decodeTransactionBuffer<TAddress extends string = string>(\n encodedAccount: EncodedAccount<TAddress> | MaybeEncodedAccount<TAddress>\n):\n | Account<TransactionBuffer, TAddress>\n | MaybeAccount<TransactionBuffer, TAddress> {\n return decodeAccount(\n encodedAccount as MaybeEncodedAccount<TAddress>,\n getTransactionBufferDecoder()\n );\n}\n\nexport async function fetchTransactionBuffer<TAddress extends string = string>(\n rpc: Parameters<typeof fetchEncodedAccount>[0],\n address: Address<TAddress>,\n config?: FetchAccountConfig\n): Promise<Account<TransactionBuffer, TAddress>> {\n const maybeAccount = await fetchMaybeTransactionBuffer(rpc, address, config);\n assertAccountExists(maybeAccount);\n return maybeAccount;\n}\n\nexport async function fetchMaybeTransactionBuffer<\n TAddress extends string = string,\n>(\n rpc: Parameters<typeof fetchEncodedAccount>[0],\n address: Address<TAddress>,\n config?: FetchAccountConfig\n): Promise<MaybeAccount<TransactionBuffer, TAddress>> {\n const maybeAccount = await fetchEncodedAccount(rpc, address, config);\n return decodeTransactionBuffer(maybeAccount);\n}\n\nexport async function fetchAllTransactionBuffer(\n rpc: Parameters<typeof fetchEncodedAccounts>[0],\n addresses: Array<Address>,\n config?: FetchAccountsConfig\n): Promise<Account<TransactionBuffer>[]> {\n const maybeAccounts = await fetchAllMaybeTransactionBuffer(\n rpc,\n addresses,\n config\n );\n assertAccountsExist(maybeAccounts);\n return maybeAccounts;\n}\n\nexport async function fetchAllMaybeTransactionBuffer(\n rpc: Parameters<typeof fetchEncodedAccounts>[0],\n addresses: Array<Address>,\n config?: FetchAccountsConfig\n): Promise<MaybeAccount<TransactionBuffer>[]> {\n const maybeAccounts = await fetchEncodedAccounts(rpc, addresses, config);\n return maybeAccounts.map((maybeAccount) =>\n decodeTransactionBuffer(maybeAccount)\n );\n}\n","import {\n type AccountMeta,\n type AccountSignerMeta,\n type Address,\n type TransactionSigner,\n} from \"gill\";\n\nexport function parseRemainingAccounts({\n args,\n}: {\n programAddress: Address;\n accounts?: any;\n args?: {\n remainingAccounts: {\n address: Address;\n role: number;\n signer?: TransactionSigner;\n }[];\n };\n}): AccountMeta[] {\n if (!args) {\n return [];\n }\n const { remainingAccounts } = args;\n return remainingAccounts.map((x) =>\n x.signer\n ? ({\n address: x.address,\n role: x.role,\n signer: x.signer,\n } as AccountSignerMeta)\n : ({ address: x.address, role: x.role } as AccountMeta)\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 AccountRole,\n isProgramDerivedAddress,\n isTransactionSigner as kitIsTransactionSigner,\n upgradeRoleToSigner,\n type AccountMeta,\n type AccountSignerMeta,\n type Address,\n type ProgramDerivedAddress,\n type TransactionSigner,\n} from \"gill\";\n\n/**\n * Asserts that the given value is not null or undefined.\n * @internal\n */\nexport function expectSome<T>(value: T | null | undefined): T {\n if (value === null || value === undefined) {\n throw new Error(\"Expected a value but received null or undefined.\");\n }\n return value;\n}\n\n/**\n * Asserts that the given value is a PublicKey.\n * @internal\n */\nexport function expectAddress<T extends string = string>(\n value:\n | Address<T>\n | ProgramDerivedAddress<T>\n | TransactionSigner<T>\n | null\n | undefined\n): Address<T> {\n if (!value) {\n throw new Error(\"Expected a Address.\");\n }\n if (typeof value === \"object\" && \"address\" in value) {\n return value.address;\n }\n if (Array.isArray(value)) {\n return value[0] as Address<T>;\n }\n return value as Address<T>;\n}\n\n/**\n * Asserts that the given value is a PDA.\n * @internal\n */\nexport function expectProgramDerivedAddress<T extends string = string>(\n value:\n | Address<T>\n | ProgramDerivedAddress<T>\n | TransactionSigner<T>\n | null\n | undefined\n): ProgramDerivedAddress<T> {\n if (!value || !Array.isArray(value) || !isProgramDerivedAddress(value)) {\n throw new Error(\"Expected a ProgramDerivedAddress.\");\n }\n return value;\n}\n\n/**\n * Asserts that the given value is a TransactionSigner.\n * @internal\n */\nexport function expectTransactionSigner<T extends string = string>(\n value:\n | Address<T>\n | ProgramDerivedAddress<T>\n | TransactionSigner<T>\n | null\n | undefined\n): TransactionSigner<T> {\n if (!value || !isTransactionSigner(value)) {\n throw new Error(\"Expected a TransactionSigner.\");\n }\n return value;\n}\n\n/**\n * Defines an instruction account to resolve.\n * @internal\n */\nexport type ResolvedAccount<\n T extends string = string,\n U extends\n | Address<T>\n | ProgramDerivedAddress<T>\n | TransactionSigner<T>\n | null =\n | Address<T>\n | ProgramDerivedAddress<T>\n | TransactionSigner<T>\n | null,\n> = {\n isWritable: boolean;\n value: U;\n};\n\n/**\n * Defines an instruction that stores additional bytes on-chain.\n * @internal\n */\nexport type InstructionWithByteDelta = {\n byteDelta: number;\n};\n\n/**\n * Get account metas and signers from resolved accounts.\n * @internal\n */\nexport function getAccountMetaFactory(\n programAddress: Address,\n optionalAccountStrategy: \"omitted\" | \"programId\"\n) {\n return (\n account: ResolvedAccount\n ): AccountMeta | AccountSignerMeta | undefined => {\n if (!account.value) {\n if (optionalAccountStrategy === \"omitted\") return;\n return Object.freeze({\n address: programAddress,\n role: AccountRole.READONLY,\n });\n }\n\n const writableRole = account.isWritable\n ? AccountRole.WRITABLE\n : AccountRole.READONLY;\n return Object.freeze({\n address: expectAddress(account.value),\n role: isTransactionSigner(account.value)\n ? upgradeRoleToSigner(writableRole)\n : writableRole,\n ...(isTransactionSigner(account.value) ? { signer: account.value } : {}),\n });\n };\n}\n\nexport function isTransactionSigner<TAddress extends string = string>(\n value:\n | Address<TAddress>\n | ProgramDerivedAddress<TAddress>\n | TransactionSigner<TAddress>\n): value is TransactionSigner<TAddress> {\n return (\n !!value &&\n typeof value === \"object\" &&\n \"address\" in value &&\n kitIsTransactionSigner(value)\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 getOptionDecoder,\n getOptionEncoder,\n getProgramDerivedAddress,\n getStructDecoder,\n getStructEncoder,\n getU128Decoder,\n getU128Encoder,\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 type WritableSignerAccount,\n} from \"gill\";\nimport { parseRemainingAccounts } from \"../../hooked\";\nimport { MULTI_WALLET_PROGRAM_ADDRESS } from \"../programs\";\nimport {\n expectAddress,\n expectSome,\n getAccountMetaFactory,\n type ResolvedAccount,\n} from \"../shared\";\nimport {\n getConfigActionDecoder,\n getConfigActionEncoder,\n getProofArgsDecoder,\n getProofArgsEncoder,\n type ConfigAction,\n type ConfigActionArgs,\n type ProofArgs,\n type ProofArgsArgs,\n} from \"../types\";\n\nexport const CHANGE_CONFIG_DISCRIMINATOR = new Uint8Array([8]);\n\nexport function getChangeConfigDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 1).encode(\n CHANGE_CONFIG_DISCRIMINATOR\n );\n}\n\nexport type ChangeConfigInstruction<\n TProgram extends string = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n TAccountSettings extends string | AccountMeta<string> = string,\n TAccountPayer extends string | AccountMeta<string> = string,\n TAccountAuthority extends string | AccountMeta<string> = string,\n TAccountSystemProgram extends\n | string\n | AccountMeta<string> = \"11111111111111111111111111111111\",\n TAccountSlotHashSysvar extends\n | string\n | AccountMeta<string> = \"SysvarS1otHashes111111111111111111111111111\",\n TAccountInstructionsSysvar extends\n | string\n | AccountMeta<string> = \"Sysvar1nstructions1111111111111111111111111\",\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountSettings extends string\n ? WritableAccount<TAccountSettings>\n : TAccountSettings,\n TAccountPayer extends string\n ? WritableSignerAccount<TAccountPayer> &\n AccountSignerMeta<TAccountPayer>\n : TAccountPayer,\n TAccountAuthority extends string\n ? ReadonlySignerAccount<TAccountAuthority> &\n AccountSignerMeta<TAccountAuthority>\n : TAccountAuthority,\n TAccountSystemProgram extends string\n ? ReadonlyAccount<TAccountSystemProgram>\n : TAccountSystemProgram,\n TAccountSlotHashSysvar extends string\n ? ReadonlyAccount<TAccountSlotHashSysvar>\n : TAccountSlotHashSysvar,\n TAccountInstructionsSysvar extends string\n ? ReadonlyAccount<TAccountInstructionsSysvar>\n : TAccountInstructionsSysvar,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type ChangeConfigInstructionData = {\n discriminator: ReadonlyUint8Array;\n settingsIndex: bigint;\n configActions: Array<ConfigAction>;\n compressedProofArgs: Option<ProofArgs>;\n};\n\nexport type ChangeConfigInstructionDataArgs = {\n settingsIndex: number | bigint;\n configActions: Array<ConfigActionArgs>;\n compressedProofArgs: OptionOrNullable<ProofArgsArgs>;\n};\n\nexport function getChangeConfigInstructionDataEncoder(): Encoder<ChangeConfigInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n [\"discriminator\", fixEncoderSize(getBytesEncoder(), 1)],\n [\"settingsIndex\", getU128Encoder()],\n [\"configActions\", getArrayEncoder(getConfigActionEncoder())],\n [\"compressedProofArgs\", getOptionEncoder(getProofArgsEncoder())],\n ]),\n (value) => ({ ...value, discriminator: CHANGE_CONFIG_DISCRIMINATOR })\n );\n}\n\nexport function getChangeConfigInstructionDataDecoder(): Decoder<ChangeConfigInstructionData> {\n return getStructDecoder([\n [\"discriminator\", fixDecoderSize(getBytesDecoder(), 1)],\n [\"settingsIndex\", getU128Decoder()],\n [\"configActions\", getArrayDecoder(getConfigActionDecoder())],\n [\"compressedProofArgs\", getOptionDecoder(getProofArgsDecoder())],\n ]);\n}\n\nexport function getChangeConfigInstructionDataCodec(): Codec<\n ChangeConfigInstructionDataArgs,\n ChangeConfigInstructionData\n> {\n return combineCodec(\n getChangeConfigInstructionDataEncoder(),\n getChangeConfigInstructionDataDecoder()\n );\n}\n\nexport type ChangeConfigInstructionExtraArgs = {\n remainingAccounts: Array<{ address: Address; role: number }>;\n};\n\nexport type ChangeConfigAsyncInput<\n TAccountSettings extends string = string,\n TAccountPayer extends string = string,\n TAccountAuthority extends string = string,\n TAccountSystemProgram extends string = string,\n TAccountSlotHashSysvar extends string = string,\n TAccountInstructionsSysvar extends string = string,\n> = {\n settings?: Address<TAccountSettings>;\n payer: TransactionSigner<TAccountPayer>;\n authority?: TransactionSigner<TAccountAuthority>;\n systemProgram?: Address<TAccountSystemProgram>;\n slotHashSysvar?: Address<TAccountSlotHashSysvar>;\n instructionsSysvar?: Address<TAccountInstructionsSysvar>;\n settingsIndex: ChangeConfigInstructionDataArgs[\"settingsIndex\"];\n configActions: ChangeConfigInstructionDataArgs[\"configActions\"];\n compressedProofArgs: ChangeConfigInstructionDataArgs[\"compressedProofArgs\"];\n remainingAccounts: ChangeConfigInstructionExtraArgs[\"remainingAccounts\"];\n};\n\nexport async function getChangeConfigInstructionAsync<\n TAccountSettings extends string,\n TAccountPayer extends string,\n TAccountAuthority extends string,\n TAccountSystemProgram extends string,\n TAccountSlotHashSysvar extends string,\n TAccountInstructionsSysvar extends string,\n TProgramAddress extends Address = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n>(\n input: ChangeConfigAsyncInput<\n TAccountSettings,\n TAccountPayer,\n TAccountAuthority,\n TAccountSystemProgram,\n TAccountSlotHashSysvar,\n TAccountInstructionsSysvar\n >,\n config?: { programAddress?: TProgramAddress }\n): Promise<\n ChangeConfigInstruction<\n TProgramAddress,\n TAccountSettings,\n TAccountPayer,\n TAccountAuthority,\n TAccountSystemProgram,\n TAccountSlotHashSysvar,\n TAccountInstructionsSysvar\n >\n> {\n // Program address.\n const programAddress = config?.programAddress ?? MULTI_WALLET_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n settings: { value: input.settings ?? null, isWritable: true },\n payer: { value: input.payer ?? null, isWritable: true },\n authority: { value: input.authority ?? null, isWritable: false },\n systemProgram: { value: input.systemProgram ?? null, isWritable: false },\n slotHashSysvar: { value: input.slotHashSysvar ?? null, isWritable: false },\n instructionsSysvar: {\n value: input.instructionsSysvar ?? null,\n isWritable: false,\n },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolver scope.\n const resolverScope = { programAddress, accounts, args };\n\n // Resolve default values.\n if (!accounts.settings.value) {\n accounts.settings.value = await getProgramDerivedAddress({\n programAddress,\n seeds: [\n getBytesEncoder().encode(\n new Uint8Array([\n 109, 117, 108, 116, 105, 95, 119, 97, 108, 108, 101, 116,\n ])\n ),\n getU128Encoder().encode(expectSome(args.settingsIndex)),\n ],\n });\n }\n if (!accounts.authority.value) {\n accounts.authority.value = await getProgramDerivedAddress({\n programAddress,\n seeds: [\n getBytesEncoder().encode(\n new Uint8Array([\n 109, 117, 108, 116, 105, 95, 119, 97, 108, 108, 101, 116,\n ])\n ),\n getAddressEncoder().encode(expectAddress(accounts.settings.value)),\n getBytesEncoder().encode(new Uint8Array([118, 97, 117, 108, 116])),\n ],\n });\n }\n if (!accounts.systemProgram.value) {\n accounts.systemProgram.value =\n \"11111111111111111111111111111111\" as Address<\"11111111111111111111111111111111\">;\n }\n if (!accounts.slotHashSysvar.value) {\n accounts.slotHashSysvar.value =\n \"SysvarS1otHashes111111111111111111111111111\" as Address<\"SysvarS1otHashes111111111111111111111111111\">;\n }\n if (!accounts.instructionsSysvar.value) {\n accounts.instructionsSysvar.value =\n \"Sysvar1nstructions1111111111111111111111111\" as Address<\"Sysvar1nstructions1111111111111111111111111\">;\n }\n\n // Remaining accounts.\n const remainingAccounts: AccountMeta[] =\n parseRemainingAccounts(resolverScope);\n\n const getAccountMeta = getAccountMetaFactory(programAddress, \"programId\");\n return Object.freeze({\n accounts: [\n getAccountMeta(accounts.settings),\n getAccountMeta(accounts.payer),\n getAccountMeta(accounts.authority),\n getAccountMeta(accounts.systemProgram),\n getAccountMeta(accounts.slotHashSysvar),\n getAccountMeta(accounts.instructionsSysvar),\n ...remainingAccounts,\n ],\n data: getChangeConfigInstructionDataEncoder().encode(\n args as ChangeConfigInstructionDataArgs\n ),\n programAddress,\n } as ChangeConfigInstruction<\n TProgramAddress,\n TAccountSettings,\n TAccountPayer,\n TAccountAuthority,\n TAccountSystemProgram,\n TAccountSlotHashSysvar,\n TAccountInstructionsSysvar\n >);\n}\n\nexport type ChangeConfigInput<\n TAccountSettings extends string = string,\n TAccountPayer extends string = string,\n TAccountAuthority extends string = string,\n TAccountSystemProgram extends string = string,\n TAccountSlotHashSysvar extends string = string,\n TAccountInstructionsSysvar extends string = string,\n> = {\n settings: Address<TAccountSettings>;\n payer: TransactionSigner<TAccountPayer>;\n authority: TransactionSigner<TAccountAuthority>;\n systemProgram?: Address<TAccountSystemProgram>;\n slotHashSysvar?: Address<TAccountSlotHashSysvar>;\n instructionsSysvar?: Address<TAccountInstructionsSysvar>;\n settingsIndex: ChangeConfigInstructionDataArgs[\"settingsIndex\"];\n configActions: ChangeConfigInstructionDataArgs[\"configActions\"];\n compressedProofArgs: ChangeConfigInstructionDataArgs[\"compressedProofArgs\"];\n remainingAccounts: ChangeConfigInstructionExtraArgs[\"remainingAccounts\"];\n};\n\nexport function getChangeConfigInstruction<\n TAccountSettings extends string,\n TAccountPayer extends string,\n TAccountAuthority extends string,\n TAccountSystemProgram extends string,\n TAccountSlotHashSysvar extends string,\n TAccountInstructionsSysvar extends string,\n TProgramAddress extends Address = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n>(\n input: ChangeConfigInput<\n TAccountSettings,\n TAccountPayer,\n TAccountAuthority,\n TAccountSystemProgram,\n TAccountSlotHashSysvar,\n TAccountInstructionsSysvar\n >,\n config?: { programAddress?: TProgramAddress }\n): ChangeConfigInstruction<\n TProgramAddress,\n TAccountSettings,\n TAccountPayer,\n TAccountAuthority,\n TAccountSystemProgram,\n TAccountSlotHashSysvar,\n TAccountInstructionsSysvar\n> {\n // Program address.\n const programAddress = config?.programAddress ?? MULTI_WALLET_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n settings: { value: input.settings ?? null, isWritable: true },\n payer: { value: input.payer ?? null, isWritable: true },\n authority: { value: input.authority ?? null, isWritable: false },\n systemProgram: { value: input.systemProgram ?? null, isWritable: false },\n slotHashSysvar: { value: input.slotHashSysvar ?? null, isWritable: false },\n instructionsSysvar: {\n value: input.instructionsSysvar ?? null,\n isWritable: false,\n },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolver scope.\n const resolverScope = { programAddress, accounts, args };\n\n // Resolve default values.\n if (!accounts.systemProgram.value) {\n accounts.systemProgram.value =\n \"11111111111111111111111111111111\" as Address<\"11111111111111111111111111111111\">;\n }\n if (!accounts.slotHashSysvar.value) {\n accounts.slotHashSysvar.value =\n \"SysvarS1otHashes111111111111111111111111111\" as Address<\"SysvarS1otHashes111111111111111111111111111\">;\n }\n if (!accounts.instructionsSysvar.value) {\n accounts.instructionsSysvar.value =\n \"Sysvar1nstructions1111111111111111111111111\" as Address<\"Sysvar1nstructions1111111111111111111111111\">;\n }\n\n // Remaining accounts.\n const remainingAccounts: AccountMeta[] =\n parseRemainingAccounts(resolverScope);\n\n const getAccountMeta = getAccountMetaFactory(programAddress, \"programId\");\n return Object.freeze({\n accounts: [\n getAccountMeta(accounts.settings),\n getAccountMeta(accounts.payer),\n getAccountMeta(accounts.authority),\n getAccountMeta(accounts.systemProgram),\n getAccountMeta(accounts.slotHashSysvar),\n getAccountMeta(accounts.instructionsSysvar),\n ...remainingAccounts,\n ],\n data: getChangeConfigInstructionDataEncoder().encode(\n args as ChangeConfigInstructionDataArgs\n ),\n programAddress,\n } as ChangeConfigInstruction<\n TProgramAddress,\n TAccountSettings,\n TAccountPayer,\n TAccountAuthority,\n TAccountSystemProgram,\n TAccountSlotHashSysvar,\n TAccountInstructionsSysvar\n >);\n}\n\nexport type ParsedChangeConfigInstruction<\n TProgram extends string = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n settings: TAccountMetas[0];\n payer: TAccountMetas[1];\n authority: TAccountMetas[2];\n systemProgram: TAccountMetas[3];\n slotHashSysvar?: TAccountMetas[4] | undefined;\n instructionsSysvar?: TAccountMetas[5] | undefined;\n };\n data: ChangeConfigInstructionData;\n};\n\nexport function parseChangeConfigInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>\n): ParsedChangeConfigInstruction<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 const getNextOptionalAccount = () => {\n const accountMeta = getNextAccount();\n return accountMeta.address === MULTI_WALLET_PROGRAM_ADDRESS\n ? undefined\n : accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n settings: getNextAccount(),\n payer: getNextAccount(),\n authority: getNextAccount(),\n systemProgram: getNextAccount(),\n slotHashSysvar: getNextOptionalAccount(),\n instructionsSysvar: getNextOptionalAccount(),\n },\n data: getChangeConfigInstructionDataDecoder().decode(instruction.data),\n };\n}\n","/**\n * This code was AUTOGENERATED using the Codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun Codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n combineCodec,\n fixDecoderSize,\n fixEncoderSize,\n getArrayDecoder,\n getArrayEncoder,\n getBytesDecoder,\n getBytesEncoder,\n getStructDecoder,\n getStructEncoder,\n 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 WritableSignerAccount,\n} from \"gill\";\nimport { parseRemainingAccounts } from \"../../hooked\";\nimport { MULTI_WALLET_PROGRAM_ADDRESS } from \"../programs\";\nimport { getAccountMetaFactory, type ResolvedAccount } from \"../shared\";\nimport {\n getConfigActionDecoder,\n getConfigActionEncoder,\n getProofArgsDecoder,\n getProofArgsEncoder,\n getSettingsMutArgsDecoder,\n getSettingsMutArgsEncoder,\n type ConfigAction,\n type ConfigActionArgs,\n type ProofArgs,\n type ProofArgsArgs,\n type SettingsMutArgs,\n type SettingsMutArgsArgs,\n} from \"../types\";\n\nexport const CHANGE_CONFIG_COMPRESSED_DISCRIMINATOR = new Uint8Array([19]);\n\nexport function getChangeConfigCompressedDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 1).encode(\n CHANGE_CONFIG_COMPRESSED_DISCRIMINATOR\n );\n}\n\nexport type ChangeConfigCompressedInstruction<\n TProgram extends string = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n TAccountPayer extends string | AccountMeta<string> = string,\n TAccountAuthority extends string | AccountMeta<string> = string,\n TAccountSlotHashSysvar extends\n | string\n | AccountMeta<string> = \"SysvarS1otHashes111111111111111111111111111\",\n TAccountInstructionsSysvar extends\n | string\n | AccountMeta<string> = \"Sysvar1nstructions1111111111111111111111111\",\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountPayer extends string\n ? WritableSignerAccount<TAccountPayer> &\n AccountSignerMeta<TAccountPayer>\n : TAccountPayer,\n TAccountAuthority extends string\n ? ReadonlySignerAccount<TAccountAuthority> &\n AccountSignerMeta<TAccountAuthority>\n : TAccountAuthority,\n TAccountSlotHashSysvar extends string\n ? ReadonlyAccount<TAccountSlotHashSysvar>\n : TAccountSlotHashSysvar,\n TAccountInstructionsSysvar extends string\n ? ReadonlyAccount<TAccountInstructionsSysvar>\n : TAccountInstructionsSysvar,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type ChangeConfigCompressedInstructionData = {\n discriminator: ReadonlyUint8Array;\n configActions: Array<ConfigAction>;\n settingsMut: SettingsMutArgs;\n compressedProofArgs: ProofArgs;\n};\n\nexport type ChangeConfigCompressedInstructionDataArgs = {\n configActions: Array<ConfigActionArgs>;\n settingsMut: SettingsMutArgsArgs;\n compressedProofArgs: ProofArgsArgs;\n};\n\nexport function getChangeConfigCompressedInstructionDataEncoder(): Encoder<ChangeConfigCompressedInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n [\"discriminator\", fixEncoderSize(getBytesEncoder(), 1)],\n [\"configActions\", getArrayEncoder(getConfigActionEncoder())],\n [\"settingsMut\", getSettingsMutArgsEncoder()],\n [\"compressedProofArgs\", getProofArgsEncoder()],\n ]),\n (value) => ({\n ...value,\n discriminator: CHANGE_CONFIG_COMPRESSED_DISCRIMINATOR,\n })\n );\n}\n\nexport function getChangeConfigCompressedInstructionDataDecoder(): Decoder<ChangeConfigCompressedInstructionData> {\n return getStructDecoder([\n [\"discriminator\", fixDecoderSize(getBytesDecoder(), 1)],\n [\"configActions\", getArrayDecoder(getConfigActionDecoder())],\n [\"settingsMut\", getSettingsMutArgsDecoder()],\n [\"compressedProofArgs\", getProofArgsDecoder()],\n ]);\n}\n\nexport function getChangeConfigCompressedInstructionDataCodec(): Codec<\n ChangeConfigCompressedInstructionDataArgs,\n ChangeConfigCompressedInstructionData\n> {\n return combineCodec(\n getChangeConfigCompressedInstructionDataEncoder(),\n getChangeConfigCompressedInstructionDataDecoder()\n );\n}\n\nexport type ChangeConfigCompressedInstructionExtraArgs = {\n remainingAccounts: Array<{ address: Address; role: number }>;\n};\n\nexport type ChangeConfigCompressedInput<\n TAccountPayer extends string = string,\n TAccountAuthority extends string = string,\n TAccountSlotHashSysvar extends string = string,\n TAccountInstructionsSysvar extends string = string,\n> = {\n payer: TransactionSigner<TAccountPayer>;\n authority: TransactionSigner<TAccountAuthority>;\n slotHashSysvar?: Address<TAccountSlotHashSysvar>;\n instructionsSysvar?: Address<TAccountInstructionsSysvar>;\n configActions: ChangeConfigCompressedInstructionDataArgs[\"configActions\"];\n settingsMut: ChangeConfigCompressedInstructionDataArgs[\"settingsMut\"];\n compressedProofArgs: ChangeConfigCompressedInstructionDataArgs[\"compressedProofArgs\"];\n remainingAccounts: ChangeConfigCompressedInstructionExtraArgs[\"remainingAccounts\"];\n};\n\nexport function getChangeConfigCompressedInstruction<\n TAccountPayer extends string,\n TAccountAuthority extends string,\n TAccountSlotHashSysvar extends string,\n TAccountInstructionsSysvar extends string,\n TProgramAddress extends Address = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n>(\n input: ChangeConfigCompressedInput<\n TAccountPayer,\n TAccountAuthority,\n TAccountSlotHashSysvar,\n TAccountInstructionsSysvar\n >,\n config?: { programAddress?: TProgramAddress }\n): ChangeConfigCompressedInstruction<\n TProgramAddress,\n TAccountPayer,\n TAccountAuthority,\n TAccountSlotHashSysvar,\n TAccountInstructionsSysvar\n> {\n // Program address.\n const programAddress = config?.programAddress ?? MULTI_WALLET_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n payer: { value: input.payer ?? null, isWritable: true },\n authority: { value: input.authority ?? null, isWritable: false },\n slotHashSysvar: { value: input.slotHashSysvar ?? null, isWritable: false },\n instructionsSysvar: {\n value: input.instructionsSysvar ?? null,\n isWritable: false,\n },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolver scope.\n const resolverScope = { programAddress, accounts, args };\n\n // Resolve default values.\n if (!accounts.slotHashSysvar.value) {\n accounts.slotHashSysvar.value =\n \"SysvarS1otHashes111111111111111111111111111\" as Address<\"SysvarS1otHashes111111111111111111111111111\">;\n }\n if (!accounts.instructionsSysvar.value) {\n accounts.instructionsSysvar.value =\n \"Sysvar1nstructions1111111111111111111111111\" as Address<\"Sysvar1nstructions1111111111111111111111111\">;\n }\n\n // Remaining accounts.\n const remainingAccounts: AccountMeta[] =\n parseRemainingAccounts(resolverScope);\n\n const getAccountMeta = getAccountMetaFactory(programAddress, \"programId\");\n return Object.freeze({\n accounts: [\n getAccountMeta(accounts.payer),\n getAccountMeta(accounts.authority),\n getAccountMeta(accounts.slotHashSysvar),\n getAccountMeta(accounts.instructionsSysvar),\n ...remainingAccounts,\n ],\n data: getChangeConfigCompressedInstructionDataEncoder().encode(\n args as ChangeConfigCompressedInstructionDataArgs\n ),\n programAddress,\n } as ChangeConfigCompressedInstruction<\n TProgramAddress,\n TAccountPayer,\n TAccountAuthority,\n TAccountSlotHashSysvar,\n TAccountInstructionsSysvar\n >);\n}\n\nexport type ParsedChangeConfigCompressedInstruction<\n TProgram extends string = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n payer: TAccountMetas[0];\n authority: TAccountMetas[1];\n slotHashSysvar?: TAccountMetas[2] | undefined;\n instructionsSysvar?: TAccountMetas[3] | undefined;\n };\n data: ChangeConfigCompressedInstructionData;\n};\n\nexport function parseChangeConfigCompressedInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>\n): ParsedChangeConfigCompressedInstruction<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 const getNextOptionalAccount = () => {\n const accountMeta = getNextAccount();\n return accountMeta.address === MULTI_WALLET_PROGRAM_ADDRESS\n ? undefined\n : accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n payer: getNextAccount(),\n authority: getNextAccount(),\n slotHashSysvar: getNextOptionalAccount(),\n instructionsSysvar: getNextOptionalAccount(),\n },\n data: getChangeConfigCompressedInstructionDataDecoder().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 getArrayDecoder,\n getArrayEncoder,\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 ReadonlyUint8Array,\n type TransactionSigner,\n type WritableAccount,\n type WritableSignerAccount,\n} from \"gill\";\nimport { parseRemainingAccounts } from \"../../hooked\";\nimport { MULTI_WALLET_PROGRAM_ADDRESS } from \"../programs\";\nimport { getAccountMetaFactory, type ResolvedAccount } from \"../shared\";\nimport {\n getProofArgsDecoder,\n getProofArgsEncoder,\n getSecp256r1VerifyArgsWithDomainAddressDecoder,\n getSecp256r1VerifyArgsWithDomainAddressEncoder,\n getSettingsCreateOrMutateArgsDecoder,\n getSettingsCreateOrMutateArgsEncoder,\n type ProofArgs,\n type ProofArgsArgs,\n type Secp256r1VerifyArgsWithDomainAddress,\n type Secp256r1VerifyArgsWithDomainAddressArgs,\n type SettingsCreateOrMutateArgs,\n type SettingsCreateOrMutateArgsArgs,\n} from \"../types\";\n\nexport const COMPRESS_SETTINGS_ACCOUNT_DISCRIMINATOR = new Uint8Array([16]);\n\nexport function getCompressSettingsAccountDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 1).encode(\n COMPRESS_SETTINGS_ACCOUNT_DISCRIMINATOR\n );\n}\n\nexport type CompressSettingsAccountInstruction<\n TProgram extends string = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n TAccountSettings extends string | AccountMeta<string> = string,\n TAccountPayer extends string | AccountMeta<string> = string,\n TAccountSlotHashSysvar extends\n | string\n | AccountMeta<string> = \"SysvarS1otHashes111111111111111111111111111\",\n TAccountInstructionsSysvar extends\n | string\n | AccountMeta<string> = \"Sysvar1nstructions1111111111111111111111111\",\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountSettings extends string\n ? WritableAccount<TAccountSettings>\n : TAccountSettings,\n TAccountPayer extends string\n ? WritableSignerAccount<TAccountPayer> &\n AccountSignerMeta<TAccountPayer>\n : TAccountPayer,\n TAccountSlotHashSysvar extends string\n ? ReadonlyAccount<TAccountSlotHashSysvar>\n : TAccountSlotHashSysvar,\n TAccountInstructionsSysvar extends string\n ? ReadonlyAccount<TAccountInstructionsSysvar>\n : TAccountInstructionsSysvar,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type CompressSettingsAccountInstructionData = {\n discriminator: ReadonlyUint8Array;\n compressedProofArgs: ProofArgs;\n settingsArg: SettingsCreateOrMutateArgs;\n secp256r1VerifyArgs: Array<Secp256r1VerifyArgsWithDomainAddress>;\n};\n\nexport type CompressSettingsAccountInstructionDataArgs = {\n compressedProofArgs: ProofArgsArgs;\n settingsArg: SettingsCreateOrMutateArgsArgs;\n secp256r1VerifyArgs: Array<Secp256r1VerifyArgsWithDomainAddressArgs>;\n};\n\nexport function getCompressSettingsAccountInstructionDataEncoder(): Encoder<CompressSettingsAccountInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n [\"discriminator\", fixEncoderSize(getBytesEncoder(), 1)],\n [\"compressedProofArgs\", getProofArgsEncoder()],\n [\"settingsArg\", getSettingsCreateOrMutateArgsEncoder()],\n [\n \"secp256r1VerifyArgs\",\n getArrayEncoder(getSecp256r1VerifyArgsWithDomainAddressEncoder()),\n ],\n ]),\n (value) => ({\n ...value,\n discriminator: COMPRESS_SETTINGS_ACCOUNT_DISCRIMINATOR,\n })\n );\n}\n\nexport function getCompressSettingsAccountInstructionDataDecoder(): Decoder<CompressSettingsAccountInstructionData> {\n return getStructDecoder([\n [\"discriminator\", fixDecoderSize(getBytesDecoder(), 1)],\n [\"compressedProofArgs\", getProofArgsDecoder()],\n [\"settingsArg\", getSettingsCreateOrMutateArgsDecoder()],\n [\n \"secp256r1VerifyArgs\",\n getArrayDecoder(getSecp256r1VerifyArgsWithDomainAddressDecoder()),\n ],\n ]);\n}\n\nexport function getCompressSettingsAccountInstructionDataCodec(): Codec<\n CompressSettingsAccountInstructionDataArgs,\n CompressSettingsAccountInstructionData\n> {\n return combineCodec(\n getCompressSettingsAccountInstructionDataEncoder(),\n getCompressSettingsAccountInstructionDataDecoder()\n );\n}\n\nexport type CompressSettingsAccountInstructionExtraArgs = {\n remainingAccounts: Array<{ address: Address; role: number }>;\n};\n\nexport type CompressSettingsAccountInput<\n TAccountSettings extends string = string,\n TAccountPayer extends string = string,\n TAccountSlotHashSysvar extends string = string,\n TAccountInstructionsSysvar extends string = string,\n> = {\n settings: Address<TAccountSettings>;\n payer: TransactionSigner<TAccountPayer>;\n slotHashSysvar?: Address<TAccountSlotHashSysvar>;\n instructionsSysvar?: Address<TAccountInstructionsSysvar>;\n compressedProofArgs: CompressSettingsAccountInstructionDataArgs[\"compressedProofArgs\"];\n settingsArg: CompressSettingsAccountInstructionDataArgs[\"settingsArg\"];\n secp256r1VerifyArgs: CompressSettingsAccountInstructionDataArgs[\"secp256r1VerifyArgs\"];\n remainingAccounts: CompressSettingsAccountInstructionExtraArgs[\"remainingAccounts\"];\n};\n\nexport function getCompressSettingsAccountInstruction<\n TAccountSettings extends string,\n TAccountPayer extends string,\n TAccountSlotHashSysvar extends string,\n TAccountInstructionsSysvar extends string,\n TProgramAddress extends Address = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n>(\n input: CompressSettingsAccountInput<\n TAccountSettings,\n TAccountPayer,\n TAccountSlotHashSysvar,\n TAccountInstructionsSysvar\n >,\n config?: { programAddress?: TProgramAddress }\n): CompressSettingsAccountInstruction<\n TProgramAddress,\n TAccountSettings,\n TAccountPayer,\n TAccountSlotHashSysvar,\n TAccountInstructionsSysvar\n> {\n // Program address.\n const programAddress = config?.programAddress ?? MULTI_WALLET_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n settings: { value: input.settings ?? null, isWritable: true },\n payer: { value: input.payer ?? null, isWritable: true },\n slotHashSysvar: { value: input.slotHashSysvar ?? null, isWritable: false },\n instructionsSysvar: {\n value: input.instructionsSysvar ?? null,\n isWritable: false,\n },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolver scope.\n const resolverScope = { programAddress, accounts, args };\n\n // Resolve default values.\n if (!accounts.slotHashSysvar.value) {\n accounts.slotHashSysvar.value =\n \"SysvarS1otHashes111111111111111111111111111\" as Address<\"SysvarS1otHashes111111111111111111111111111\">;\n }\n if (!accounts.instructionsSysvar.value) {\n accounts.instructionsSysvar.value =\n \"Sysvar1nstructions1111111111111111111111111\" as Address<\"Sysvar1nstructions1111111111111111111111111\">;\n }\n\n // Remaining accounts.\n const remainingAccounts: AccountMeta[] =\n parseRemainingAccounts(resolverScope);\n\n const getAccountMeta = getAccountMetaFactory(programAddress, \"programId\");\n return Object.freeze({\n accounts: [\n getAccountMeta(accounts.settings),\n getAccountMeta(accounts.payer),\n getAccountMeta(accounts.slotHashSysvar),\n getAccountMeta(accounts.instructionsSysvar),\n ...remainingAccounts,\n ],\n data: getCompressSettingsAccountInstructionDataEncoder().encode(\n args as CompressSettingsAccountInstructionDataArgs\n ),\n programAddress,\n } as CompressSettingsAccountInstruction<\n TProgramAddress,\n TAccountSettings,\n TAccountPayer,\n TAccountSlotHashSysvar,\n TAccountInstructionsSysvar\n >);\n}\n\nexport type ParsedCompressSettingsAccountInstruction<\n TProgram extends string = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n settings: TAccountMetas[0];\n payer: TAccountMetas[1];\n slotHashSysvar?: TAccountMetas[2] | undefined;\n instructionsSysvar: TAccountMetas[3];\n };\n data: CompressSettingsAccountInstructionData;\n};\n\nexport function parseCompressSettingsAccountInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>\n): ParsedCompressSettingsAccountInstruction<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 const getNextOptionalAccount = () => {\n const accountMeta = getNextAccount();\n return accountMeta.address === MULTI_WALLET_PROGRAM_ADDRESS\n ? undefined\n : accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n settings: getNextAccount(),\n payer: getNextAccount(),\n slotHashSysvar: getNextOptionalAccount(),\n instructionsSysvar: getNextAccount(),\n },\n data: getCompressSettingsAccountInstructionDataDecoder().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 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 \"gill\";\nimport { parseRemainingAccounts } from \"../../hooked\";\nimport { MULTI_WALLET_PROGRAM_ADDRESS } from \"../programs\";\nimport { getAccountMetaFactory, type ResolvedAccount } from \"../shared\";\n\nexport const CREATE_DOMAIN_CONFIG_DISCRIMINATOR = new Uint8Array([0]);\n\nexport function getCreateDomainConfigDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 1).encode(\n CREATE_DOMAIN_CONFIG_DISCRIMINATOR\n );\n}\n\nexport type CreateDomainConfigInstruction<\n TProgram extends string = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n TAccountDomainConfig extends string | AccountMeta<string> = string,\n TAccountPayer extends string | AccountMeta<string> = string,\n TAccountSystemProgram extends\n | string\n | AccountMeta<string> = \"11111111111111111111111111111111\",\n TAccountAdminDomainConfig extends string | AccountMeta<string> = string,\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountDomainConfig extends string\n ? WritableAccount<TAccountDomainConfig>\n : TAccountDomainConfig,\n TAccountPayer extends string\n ? WritableSignerAccount<TAccountPayer> &\n AccountSignerMeta<TAccountPayer>\n : TAccountPayer,\n TAccountSystemProgram extends string\n ? ReadonlyAccount<TAccountSystemProgram>\n : TAccountSystemProgram,\n TAccountAdminDomainConfig extends string\n ? ReadonlyAccount<TAccountAdminDomainConfig>\n : TAccountAdminDomainConfig,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type CreateDomainConfigInstructionData = {\n discriminator: ReadonlyUint8Array;\n rpId: string;\n origins: Array<string>;\n authority: Address;\n metadataUrl: string;\n};\n\nexport type CreateDomainConfigInstructionDataArgs = {\n rpId: string;\n origins: Array<string>;\n authority: Address;\n metadataUrl: string;\n};\n\nexport function getCreateDomainConfigInstructionDataEncoder(): Encoder<CreateDomainConfigInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n [\"discriminator\", fixEncoderSize(getBytesEncoder(), 1)],\n [\"rpId\", addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder())],\n [\n \"origins\",\n getArrayEncoder(\n addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder())\n ),\n ],\n [\"authority\", getAddressEncoder()],\n [\"metadataUrl\", addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder())],\n ]),\n (value) => ({ ...value, discriminator: CREATE_DOMAIN_CONFIG_DISCRIMINATOR })\n );\n}\n\nexport function getCreateDomainConfigInstructionDataDecoder(): Decoder<CreateDomainConfigInstructionData> {\n return getStructDecoder([\n [\"discriminator\", fixDecoderSize(getBytesDecoder(), 1)],\n [\"rpId\", addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())],\n [\n \"origins\",\n getArrayDecoder(addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())),\n ],\n [\"authority\", getAddressDecoder()],\n [\"metadataUrl\", addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())],\n ]);\n}\n\nexport function getCreateDomainConfigInstructionDataCodec(): Codec<\n CreateDomainConfigInstructionDataArgs,\n CreateDomainConfigInstructionData\n> {\n return combineCodec(\n getCreateDomainConfigInstructionDataEncoder(),\n getCreateDomainConfigInstructionDataDecoder()\n );\n}\n\nexport type CreateDomainConfigInstructionExtraArgs = {\n remainingAccounts: Array<{ address: Address; role: number }>;\n};\n\nexport type CreateDomainConfigInput<\n TAccountDomainConfig extends string = string,\n TAccountPayer extends string = string,\n TAccountSystemProgram extends string = string,\n TAccountAdminDomainConfig extends string = string,\n> = {\n domainConfig: Address<TAccountDomainConfig>;\n payer: TransactionSigner<TAccountPayer>;\n systemProgram?: Address<TAccountSystemProgram>;\n adminDomainConfig?: Address<TAccountAdminDomainConfig>;\n rpId: CreateDomainConfigInstructionDataArgs[\"rpId\"];\n origins: CreateDomainConfigInstructionDataArgs[\"origins\"];\n authority: CreateDomainConfigInstructionDataArgs[\"authority\"];\n metadataUrl: CreateDomainConfigInstructionDataArgs[\"metadataUrl\"];\n remainingAccounts: CreateDomainConfigInstructionExtraArgs[\"remainingAccounts\"];\n};\n\nexport function getCreateDomainConfigInstruction<\n TAccountDomainConfig extends string,\n TAccountPayer extends string,\n TAccountSystemProgram extends string,\n TAccountAdminDomainConfig extends string,\n TProgramAddress extends Address = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n>(\n input: CreateDomainConfigInput<\n TAccountDomainConfig,\n TAccountPayer,\n TAccountSystemProgram,\n TAccountAdminDomainConfig\n >,\n config?: { programAddress?: TProgramAddress }\n): CreateDomainConfigInstruction<\n TProgramAddress,\n TAccountDomainConfig,\n TAccountPayer,\n TAccountSystemProgram,\n TAccountAdminDomainConfig\n> {\n // Program address.\n const programAddress = config?.programAddress ?? MULTI_WALLET_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n domainConfig: { value: input.domainConfig ?? null, isWritable: true },\n payer: { value: input.payer ?? null, isWritable: true },\n systemProgram: { value: input.systemProgram ?? null, isWritable: false },\n adminDomainConfig: {\n value: input.adminDomainConfig ?? null,\n isWritable: false,\n },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolver scope.\n const resolverScope = { programAddress, accounts, args };\n\n // Resolve default values.\n if (!accounts.systemProgram.value) {\n accounts.systemProgram.value =\n \"11111111111111111111111111111111\" as Address<\"11111111111111111111111111111111\">;\n }\n\n // Remaining accounts.\n const remainingAccounts: AccountMeta[] =\n parseRemainingAccounts(resolverScope);\n\n const getAccountMeta = getAccountMetaFactory(programAddress, \"programId\");\n return Object.freeze({\n accounts: [\n getAccountMeta(accounts.domainConfig),\n getAccountMeta(accounts.payer),\n getAccountMeta(accounts.systemProgram),\n getAccountMeta(accounts.adminDomainConfig),\n ...remainingAccounts,\n ],\n data: getCreateDomainConfigInstructionDataEncoder().encode(\n args as CreateDomainConfigInstructionDataArgs\n ),\n programAddress,\n } as CreateDomainConfigInstruction<\n TProgramAddress,\n TAccountDomainConfig,\n TAccountPayer,\n TAccountSystemProgram,\n TAccountAdminDomainConfig\n >);\n}\n\nexport type ParsedCreateDomainConfigInstruction<\n TProgram extends string = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n domainConfig: TAccountMetas[0];\n payer: TAccountMetas[1];\n systemProgram: TAccountMetas[2];\n adminDomainConfig?: TAccountMetas[3] | undefined;\n };\n data: CreateDomainConfigInstructionData;\n};\n\nexport function parseCreateDomainConfigInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>\n): ParsedCreateDomainConfigInstruction<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 const getNextOptionalAccount = () => {\n const accountMeta = getNextAccount();\n return accountMeta.address === MULTI_WALLET_PROGRAM_ADDRESS\n ? undefined\n : accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n domainConfig: getNextAccount(),\n payer: getNextAccount(),\n systemProgram: getNextAccount(),\n adminDomainConfig: getNextOptionalAccount(),\n },\n data: getCreateDomainConfigInstructionDataDecoder().decode(\n instruction.data\n ),\n };\n}\n","/**\n * This code was AUTOGENERATED using the Codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun Codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n combineCodec,\n fixDecoderSize,\n fixEncoderSize,\n getBooleanDecoder,\n getBooleanEncoder,\n getBytesDecoder,\n getBytesEncoder,\n getOptionDecoder,\n getOptionEncoder,\n getStructDecoder,\n getStructEncoder,\n transformEncoder,\n type AccountMeta,\n type AccountSignerMeta,\n type Address,\n type Codec,\n type Decoder,\n type Encoder,\n type Instruction,\n type InstructionWithAccounts,\n type InstructionWithData,\n type Option,\n type OptionOrNullable,\n type ReadonlyAccount,\n type ReadonlySignerAccount,\n type ReadonlyUint8Array,\n type TransactionSigner,\n type WritableSignerAccount,\n} from \"gill\";\nimport { parseRemainingAccounts } from \"../../hooked\";\nimport { MULTI_WALLET_PROGRAM_ADDRESS } from \"../programs\";\nimport { getAccountMetaFactory, type ResolvedAccount } from \"../shared\";\nimport {\n getLinkWalletArgsDecoder,\n getLinkWalletArgsEncoder,\n getProofArgsDecoder,\n getProofArgsEncoder,\n getSecp256r1PubkeyDecoder,\n getSecp256r1PubkeyEncoder,\n getUserCreationArgsDecoder,\n getUserCreationArgsEncoder,\n type LinkWalletArgs,\n type LinkWalletArgsArgs,\n type ProofArgs,\n type ProofArgsArgs,\n type Secp256r1Pubkey,\n type Secp256r1PubkeyArgs,\n type UserCreationArgs,\n type UserCreationArgsArgs,\n} from \"../types\";\n\nexport const CREATE_DOMAIN_USER_ACCOUNT_DISCRIMINATOR = new Uint8Array([4]);\n\nexport function getCreateDomainUserAccountDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 1).encode(\n CREATE_DOMAIN_USER_ACCOUNT_DISCRIMINATOR\n );\n}\n\nexport type CreateDomainUserAccountInstruction<\n TProgram extends string = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n TAccountPayer extends string | AccountMeta<string> = string,\n TAccountDomainConfig 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 TAccountPayer extends string\n ? WritableSignerAccount<TAccountPayer> &\n AccountSignerMeta<TAccountPayer>\n : TAccountPayer,\n TAccountDomainConfig extends string\n ? ReadonlyAccount<TAccountDomainConfig>\n : TAccountDomainConfig,\n TAccountAuthority extends string\n ? ReadonlySignerAccount<TAccountAuthority> &\n AccountSignerMeta<TAccountAuthority>\n : TAccountAuthority,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type CreateDomainUserAccountInstructionData = {\n discriminator: ReadonlyUint8Array;\n compressedProofArgs: ProofArgs;\n member: Secp256r1Pubkey;\n isPermanentMember: boolean;\n userAccountCreationArgs: UserCreationArgs;\n linkWalletArgs: Option<LinkWalletArgs>;\n};\n\nexport type CreateDomainUserAccountInstructionDataArgs = {\n compressedProofArgs: ProofArgsArgs;\n member: Secp256r1PubkeyArgs;\n isPermanentMember: boolean;\n userAccountCreationArgs: UserCreationArgsArgs;\n linkWalletArgs: OptionOrNullable<LinkWalletArgsArgs>;\n};\n\nexport function getCreateDomainUserAccountInstructionDataEncoder(): Encoder<CreateDomainUserAccountInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n [\"discriminator\", fixEncoderSize(getBytesEncoder(), 1)],\n [\"compressedProofArgs\", getProofArgsEncoder()],\n [\"member\", getSecp256r1PubkeyEncoder()],\n [\"isPermanentMember\", getBooleanEncoder()],\n [\"userAccountCreationArgs\", getUserCreationArgsEncoder()],\n [\"linkWalletArgs\", getOptionEncoder(getLinkWalletArgsEncoder())],\n ]),\n (value) => ({\n ...value,\n discriminator: CREATE_DOMAIN_USER_ACCOUNT_DISCRIMINATOR,\n })\n );\n}\n\nexport function getCreateDomainUserAccountInstructionDataDecoder(): Decoder<CreateDomainUserAccountInstructionData> {\n return getStructDecoder([\n [\"discriminator\", fixDecoderSize(getBytesDecoder(), 1)],\n [\"compressedProofArgs\", getProofArgsDecoder()],\n [\"member\", getSecp256r1PubkeyDecoder()],\n [\"isPermanentMember\", getBooleanDecoder()],\n [\"userAccountCreationArgs\", getUserCreationArgsDecoder()],\n [\"linkWalletArgs\", getOptionDecoder(getLinkWalletArgsDecoder())],\n ]);\n}\n\nexport function getCreateDomainUserAccountInstructionDataCodec(): Codec<\n CreateDomainUserAccountInstructionDataArgs,\n CreateDomainUserAccountInstructionData\n> {\n return combineCodec(\n getCreateDomainUserAccountInstructionDataEncoder(),\n getCreateDomainUserAccountInstructionDataDecoder()\n );\n}\n\nexport type CreateDomainUserAccountInstructionExtraArgs = {\n remainingAccounts: Array<{ address: Address; role: number }>;\n};\n\nexport type CreateDomainUserAccountInput<\n TAccountPayer extends string = string,\n TAccountDomainConfig extends string = string,\n TAccountAuthority extends string = string,\n> = {\n payer: TransactionSigner<TAccountPayer>;\n domainConfig: Address<TAccountDomainConfig>;\n authority: TransactionSigner<TAccountAuthority>;\n compressedProofArgs: CreateDomainUserAccountInstructionDataArgs[\"compressedProofArgs\"];\n member: CreateDomainUserAccountInstructionDataArgs[\"member\"];\n isPermanentMember: CreateDomainUserAccountInstructionDataArgs[\"isPermanentMember\"];\n userAccountCreationArgs: CreateDomainUserAccountInstructionDataArgs[\"userAccountCreationArgs\"];\n linkWalletArgs: CreateDomainUserAccountInstructionDataArgs[\"linkWalletArgs\"];\n remainingAccounts: CreateDomainUserAccountInstructionExtraArgs[\"remainingAccounts\"];\n};\n\nexport function getCreateDomainUserAccountInstruction<\n TAccountPayer extends string,\n TAccountDomainConfig extends string,\n TAccountAuthority extends string,\n TProgramAddress extends Address = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n>(\n input: CreateDomainUserAccountInput<\n TAccountPayer,\n TAccountDomainConfig,\n TAccountAuthority\n >,\n config?: { programAddress?: TProgramAddress }\n): CreateDomainUserAccountInstruction<\n TProgramAddress,\n TAccountPayer,\n TAccountDomainConfig,\n TAccountAuthority\n> {\n // Program address.\n const programAddress = config?.programAddress ?? MULTI_WALLET_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n payer: { value: input.payer ?? null, isWritable: true },\n domainConfig: { value: input.domainConfig ?? null, isWritable: false },\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 // Resolver scope.\n const resolverScope = { programAddress, accounts, args };\n\n // Remaining accounts.\n const remainingAccounts: AccountMeta[] =\n parseRemainingAccounts(resolverScope);\n\n const getAccountMeta = getAccountMetaFactory(programAddress, \"programId\");\n return Object.freeze({\n accounts: [\n getAccountMeta(accounts.payer),\n getAccountMeta(accounts.domainConfig),\n getAccountMeta(accounts.authority),\n ...remainingAccounts,\n ],\n data: getCreateDomainUserAccountInstructionDataEncoder().encode(\n args as CreateDomainUserAccountInstructionDataArgs\n ),\n programAddress,\n } as CreateDomainUserAccountInstruction<\n TProgramAddress,\n TAccountPayer,\n TAccountDomainConfig,\n TAccountAuthority\n >);\n}\n\nexport type ParsedCreateDomainUserAccountInstruction<\n TProgram extends string = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n payer: TAccountMetas[0];\n domainConfig: TAccountMetas[1];\n authority: TAccountMetas[2];\n };\n data: CreateDomainUserAccountInstructionData;\n};\n\nexport function parseCreateDomainUserAccountInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>\n): ParsedCreateDomainUserAccountInstruction<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 payer: getNextAccount(),\n domainConfig: getNextAccount(),\n authority: getNextAccount(),\n },\n data: getCreateDomainUserAccountInstructionDataDecoder().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 \"gill\";\nimport { parseRemainingAccounts } from \"../../hooked\";\nimport { MULTI_WALLET_PROGRAM_ADDRESS } from \"../programs\";\nimport { getAccountMetaFactory, type ResolvedAccount } from \"../shared\";\n\nexport const CREATE_GLOBAL_COUNTER_DISCRIMINATOR = new Uint8Array([3]);\n\nexport function getCreateGlobalCounterDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 1).encode(\n CREATE_GLOBAL_COUNTER_DISCRIMINATOR\n );\n}\n\nexport type CreateGlobalCounterInstruction<\n TProgram extends string = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n TAccountGlobalCounter extends string | AccountMeta<string> = string,\n TAccountPayer extends string | AccountMeta<string> = string,\n TAccountSystemProgram extends\n | string\n | AccountMeta<string> = \"11111111111111111111111111111111\",\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountGlobalCounter extends string\n ? WritableAccount<TAccountGlobalCounter>\n : TAccountGlobalCounter,\n TAccountPayer extends string\n ? WritableSignerAccount<TAccountPayer> &\n AccountSignerMeta<TAccountPayer>\n : TAccountPayer,\n TAccountSystemProgram extends string\n ? ReadonlyAccount<TAccountSystemProgram>\n : TAccountSystemProgram,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type CreateGlobalCounterInstructionData = {\n discriminator: ReadonlyUint8Array;\n};\n\nexport type CreateGlobalCounterInstructionDataArgs = {};\n\nexport function getCreateGlobalCounterInstructionDataEncoder(): FixedSizeEncoder<CreateGlobalCounterInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([[\"discriminator\", fixEncoderSize(getBytesEncoder(), 1)]]),\n (value) => ({\n ...value,\n discriminator: CREATE_GLOBAL_COUNTER_DISCRIMINATOR,\n })\n );\n}\n\nexport function getCreateGlobalCounterInstructionDataDecoder(): FixedSizeDecoder<CreateGlobalCounterInstructionData> {\n return getStructDecoder([\n [\"discriminator\", fixDecoderSize(getBytesDecoder(), 1)],\n ]);\n}\n\nexport function getCreateGlobalCounterInstructionDataCodec(): FixedSizeCodec<\n CreateGlobalCounterInstructionDataArgs,\n CreateGlobalCounterInstructionData\n> {\n return combineCodec(\n getCreateGlobalCounterInstructionDataEncoder(),\n getCreateGlobalCounterInstructionDataDecoder()\n );\n}\n\nexport type CreateGlobalCounterInstructionExtraArgs = {\n remainingAccounts: Array<{ address: Address; role: number }>;\n};\n\nexport type CreateGlobalCounterAsyncInput<\n TAccountGlobalCounter extends string = string,\n TAccountPayer extends string = string,\n TAccountSystemProgram extends string = string,\n> = {\n globalCounter?: Address<TAccountGlobalCounter>;\n payer: TransactionSigner<TAccountPayer>;\n systemProgram?: Address<TAccountSystemProgram>;\n remainingAccounts: CreateGlobalCounterInstructionExtraArgs[\"remainingAccounts\"];\n};\n\nexport async function getCreateGlobalCounterInstructionAsync<\n TAccountGlobalCounter extends string,\n TAccountPayer extends string,\n TAccountSystemProgram extends string,\n TProgramAddress extends Address = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n>(\n input: CreateGlobalCounterAsyncInput<\n TAccountGlobalCounter,\n TAccountPayer,\n TAccountSystemProgram\n >,\n config?: { programAddress?: TProgramAddress }\n): Promise<\n CreateGlobalCounterInstruction<\n TProgramAddress,\n TAccountGlobalCounter,\n TAccountPayer,\n TAccountSystemProgram\n >\n> {\n // Program address.\n const programAddress = config?.programAddress ?? MULTI_WALLET_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n globalCounter: { value: input.globalCounter ?? null, isWritable: true },\n payer: { value: input.payer ?? 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 // Resolver scope.\n const resolverScope = { programAddress, accounts };\n\n // Resolve default values.\n if (!accounts.globalCounter.value) {\n accounts.globalCounter.value = await getProgramDerivedAddress({\n programAddress,\n seeds: [\n getBytesEncoder().encode(\n new Uint8Array([\n 103, 108, 111, 98, 97, 108, 95, 99, 111, 117, 110, 116, 101, 114,\n ])\n ),\n ],\n });\n }\n if (!accounts.systemProgram.value) {\n accounts.systemProgram.value =\n \"11111111111111111111111111111111\" as Address<\"11111111111111111111111111111111\">;\n }\n\n // Remaining accounts.\n const remainingAccounts: AccountMeta[] =\n parseRemainingAccounts(resolverScope);\n\n const getAccountMeta = getAccountMetaFactory(programAddress, \"programId\");\n return Object.freeze({\n accounts: [\n getAccountMeta(accounts.globalCounter),\n getAccountMeta(accounts.payer),\n getAccountMeta(accounts.systemProgram),\n ...remainingAccounts,\n ],\n data: getCreateGlobalCounterInstructionDataEncoder().encode({}),\n programAddress,\n } as CreateGlobalCounterInstruction<\n TProgramAddress,\n TAccountGlobalCounter,\n TAccountPayer,\n TAccountSystemProgram\n >);\n}\n\nexport type CreateGlobalCounterInput<\n TAccountGlobalCounter extends string = string,\n TAccountPayer extends string = string,\n TAccountSystemProgram extends string = string,\n> = {\n globalCounter: Address<TAccountGlobalCounter>;\n payer: TransactionSigner<TAccountPayer>;\n systemProgram?: Address<TAccountSystemProgram>;\n remainingAccounts: CreateGlobalCounterInstructionExtraArgs[\"remainingAccounts\"];\n};\n\nexport function getCreateGlobalCounterInstruction<\n TAccountGlobalCounter extends string,\n TAccountPayer extends string,\n TAccountSystemProgram extends string,\n TProgramAddress extends Address = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n>(\n input: CreateGlobalCounterInput<\n TAccountGlobalCounter,\n TAccountPayer,\n TAccountSystemProgram\n >,\n config?: { programAddress?: TProgramAddress }\n): CreateGlobalCounterInstruction<\n TProgramAddress,\n TAccountGlobalCounter,\n TAccountPayer,\n TAccountSystemProgram\n> {\n // Program address.\n const programAddress = config?.programAddress ?? MULTI_WALLET_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n globalCounter: { value: input.globalCounter ?? null, isWritable: true },\n payer: { value: input.payer ?? 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 // Resolver scope.\n const resolverScope = { programAddress, accounts };\n\n // Resolve default values.\n if (!accounts.systemProgram.value) {\n accounts.systemProgram.value =\n \"11111111111111111111111111111111\" as Address<\"11111111111111111111111111111111\">;\n }\n\n // Remaining accounts.\n const remainingAccounts: AccountMeta[] =\n parseRemainingAccounts(resolverScope);\n\n const getAccountMeta = getAccountMetaFactory(programAddress, \"programId\");\n return Object.freeze({\n accounts: [\n getAccountMeta(accounts.globalCounter),\n getAccountMeta(accounts.payer),\n getAccountMeta(accounts.systemProgram),\n ...remainingAccounts,\n ],\n data: getCreateGlobalCounterInstructionDataEncoder().encode({}),\n programAddress,\n } as CreateGlobalCounterInstruction<\n TProgramAddress,\n TAccountGlobalCounter,\n TAccountPayer,\n TAccountSystemProgram\n >);\n}\n\nexport type ParsedCreateGlobalCounterInstruction<\n TProgram extends string = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n globalCounter: TAccountMetas[0];\n payer: TAccountMetas[1];\n systemProgram: TAccountMetas[2];\n };\n data: CreateGlobalCounterInstructionData;\n};\n\nexport function parseCreateGlobalCounterInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>\n): ParsedCreateGlobalCounterInstruction<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 globalCounter: getNextAccount(),\n payer: getNextAccount(),\n systemProgram: getNextAccount(),\n },\n data: getCreateGlobalCounterInstructionDataDecoder().decode(\n instruction.data\n ),\n };\n}\n","/**\n * This code was AUTOGENERATED using the Codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun Codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n combineCodec,\n fixDecoderSize,\n fixEncoderSize,\n getBooleanDecoder,\n getBooleanEncoder,\n getBytesDecoder,\n getBytesEncoder,\n getOptionDecoder,\n getOptionEncoder,\n getProgramDerivedAddress,\n getStructDecoder,\n getStructEncoder,\n getU128Decoder,\n getU128Encoder,\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 type WritableSignerAccount,\n} from \"gill\";\nimport { parseRemainingAccounts } from \"../../hooked\";\nimport { MULTI_WALLET_PROGRAM_ADDRESS } from \"../programs\";\nimport {\n expectSome,\n getAccountMetaFactory,\n type ResolvedAccount,\n} from \"../shared\";\nimport {\n getProofArgsDecoder,\n getProofArgsEncoder,\n getSecp256r1VerifyArgsDecoder,\n getSecp256r1VerifyArgsEncoder,\n getUserMutArgsDecoder,\n getUserMutArgsEncoder,\n type ProofArgs,\n type ProofArgsArgs,\n type Secp256r1VerifyArgs,\n type Secp256r1VerifyArgsArgs,\n type UserMutArgs,\n type UserMutArgsArgs,\n} from \"../types\";\n\nexport const CREATE_MULTI_WALLET_DISCRIMINATOR = new Uint8Array([7]);\n\nexport function getCreateMultiWalletDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 1).encode(\n CREATE_MULTI_WALLET_DISCRIMINATOR\n );\n}\n\nexport type CreateMultiWalletInstruction<\n TProgram extends string = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n TAccountSettings extends string | AccountMeta<string> = string,\n TAccountPayer extends string | AccountMeta<string> = string,\n TAccountInitialMember extends string | AccountMeta<string> = string,\n TAccountSystemProgram extends\n | string\n | AccountMeta<string> = \"11111111111111111111111111111111\",\n TAccountSlotHashSysvar extends\n | string\n | AccountMeta<string> = \"SysvarS1otHashes111111111111111111111111111\",\n TAccountInstructionsSysvar extends\n | string\n | AccountMeta<string> = \"Sysvar1nstructions1111111111111111111111111\",\n TAccountDomainConfig extends string | AccountMeta<string> = string,\n TAccountGlobalCounter extends string | AccountMeta<string> = string,\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountSettings extends string\n ? WritableAccount<TAccountSettings>\n : TAccountSettings,\n TAccountPayer extends string\n ? WritableSignerAccount<TAccountPayer> &\n AccountSignerMeta<TAccountPayer>\n : TAccountPayer,\n TAccountInitialMember extends string\n ? ReadonlySignerAccount<TAccountInitialMember> &\n AccountSignerMeta<TAccountInitialMember>\n : TAccountInitialMember,\n TAccountSystemProgram extends string\n ? ReadonlyAccount<TAccountSystemProgram>\n : TAccountSystemProgram,\n TAccountSlotHashSysvar extends string\n ? ReadonlyAccount<TAccountSlotHashSysvar>\n : TAccountSlotHashSysvar,\n TAccountInstructionsSysvar extends string\n ? ReadonlyAccount<TAccountInstructionsSysvar>\n : TAccountInstructionsSysvar,\n TAccountDomainConfig extends string\n ? ReadonlyAccount<TAccountDomainConfig>\n : TAccountDomainConfig,\n TAccountGlobalCounter extends string\n ? WritableAccount<TAccountGlobalCounter>\n : TAccountGlobalCounter,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type CreateMultiWalletInstructionData = {\n discriminator: ReadonlyUint8Array;\n settingsIndex: bigint;\n secp256r1VerifyArgs: Option<Secp256r1VerifyArgs>;\n userMutArgs: UserMutArgs;\n compressedProofArgs: ProofArgs;\n setAsDelegate: boolean;\n};\n\nexport type CreateMultiWalletInstructionDataArgs = {\n settingsIndex: number | bigint;\n secp256r1VerifyArgs: OptionOrNullable<Secp256r1VerifyArgsArgs>;\n userMutArgs: UserMutArgsArgs;\n compressedProofArgs: ProofArgsArgs;\n setAsDelegate: boolean;\n};\n\nexport function getCreateMultiWalletInstructionDataEncoder(): Encoder<CreateMultiWalletInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n [\"discriminator\", fixEncoderSize(getBytesEncoder(), 1)],\n [\"settingsIndex\", getU128Encoder()],\n [\n \"secp256r1VerifyArgs\",\n getOptionEncoder(getSecp256r1VerifyArgsEncoder()),\n ],\n [\"userMutArgs\", getUserMutArgsEncoder()],\n [\"compressedProofArgs\", getProofArgsEncoder()],\n [\"setAsDelegate\", getBooleanEncoder()],\n ]),\n (value) => ({ ...value, discriminator: CREATE_MULTI_WALLET_DISCRIMINATOR })\n );\n}\n\nexport function getCreateMultiWalletInstructionDataDecoder(): Decoder<CreateMultiWalletInstructionData> {\n return getStructDecoder([\n [\"discriminator\", fixDecoderSize(getBytesDecoder(), 1)],\n [\"settingsIndex\", getU128Decoder()],\n [\"secp256r1VerifyArgs\", getOptionDecoder(getSecp256r1VerifyArgsDecoder())],\n [\"userMutArgs\", getUserMutArgsDecoder()],\n [\"compressedProofArgs\", getProofArgsDecoder()],\n [\"setAsDelegate\", getBooleanDecoder()],\n ]);\n}\n\nexport function getCreateMultiWalletInstructionDataCodec(): Codec<\n CreateMultiWalletInstructionDataArgs,\n CreateMultiWalletInstructionData\n> {\n return combineCodec(\n getCreateMultiWalletInstructionDataEncoder(),\n getCreateMultiWalletInstructionDataDecoder()\n );\n}\n\nexport type CreateMultiWalletInstructionExtraArgs = {\n remainingAccounts: Array<{ address: Address; role: number }>;\n};\n\nexport type CreateMultiWalletAsyncInput<\n TAccountSettings extends string = string,\n TAccountPayer extends string = string,\n TAccountInitialMember extends string = string,\n TAccountSystemProgram extends string = string,\n TAccountSlotHashSysvar extends string = string,\n TAccountInstructionsSysvar extends string = string,\n TAccountDomainConfig extends string = string,\n TAccountGlobalCounter extends string = string,\n> = {\n settings?: Address<TAccountSettings>;\n payer: TransactionSigner<TAccountPayer>;\n initialMember?: TransactionSigner<TAccountInitialMember>;\n systemProgram?: Address<TAccountSystemProgram>;\n slotHashSysvar?: Address<TAccountSlotHashSysvar>;\n instructionsSysvar?: Address<TAccountInstructionsSysvar>;\n domainConfig?: Address<TAccountDomainConfig>;\n globalCounter: Address<TAccountGlobalCounter>;\n settingsIndex: CreateMultiWalletInstructionDataArgs[\"settingsIndex\"];\n secp256r1VerifyArgs: CreateMultiWalletInstructionDataArgs[\"secp256r1VerifyArgs\"];\n userMutArgs: CreateMultiWalletInstructionDataArgs[\"userMutArgs\"];\n compressedProofArgs: CreateMultiWalletInstructionDataArgs[\"compressedProofArgs\"];\n setAsDelegate: CreateMultiWalletInstructionDataArgs[\"setAsDelegate\"];\n remainingAccounts: CreateMultiWalletInstructionExtraArgs[\"remainingAccounts\"];\n};\n\nexport async function getCreateMultiWalletInstructionAsync<\n TAccountSettings extends string,\n TAccountPayer extends string,\n TAccountInitialMember extends string,\n TAccountSystemProgram extends string,\n TAccountSlotHashSysvar extends string,\n TAccountInstructionsSysvar extends string,\n TAccountDomainConfig extends string,\n TAccountGlobalCounter extends string,\n TProgramAddress extends Address = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n>(\n input: CreateMultiWalletAsyncInput<\n TAccountSettings,\n TAccountPayer,\n TAccountInitialMember,\n TAccountSystemProgram,\n TAccountSlotHashSysvar,\n TAccountInstructionsSysvar,\n TAccountDomainConfig,\n TAccountGlobalCounter\n >,\n config?: { programAddress?: TProgramAddress }\n): Promise<\n CreateMultiWalletInstruction<\n TProgramAddress,\n TAccountSettings,\n TAccountPayer,\n TAccountInitialMember,\n TAccountSystemProgram,\n TAccountSlotHashSysvar,\n TAccountInstructionsSysvar,\n TAccountDomainConfig,\n TAccountGlobalCounter\n >\n> {\n // Program address.\n const programAddress = config?.programAddress ?? MULTI_WALLET_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n settings: { value: input.settings ?? null, isWritable: true },\n payer: { value: input.payer ?? null, isWritable: true },\n initialMember: { value: input.initialMember ?? null, isWritable: false },\n systemProgram: { value: input.systemProgram ?? null, isWritable: false },\n slotHashSysvar: { value: input.slotHashSysvar ?? null, isWritable: false },\n instructionsSysvar: {\n value: input.instructionsSysvar ?? null,\n isWritable: false,\n },\n domainConfig: { value: input.domainConfig ?? null, isWritable: false },\n globalCounter: { value: input.globalCounter ?? 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 // Resolver scope.\n const resolverScope = { programAddress, accounts, args };\n\n // Resolve default values.\n if (!accounts.settings.value) {\n accounts.settings.value = await getProgramDerivedAddress({\n programAddress,\n seeds: [\n getBytesEncoder().encode(\n new Uint8Array([\n 109, 117, 108, 116, 105, 95, 119, 97, 108, 108, 101, 116,\n ])\n ),\n getU128Encoder().encode(expectSome(args.settingsIndex)),\n ],\n });\n }\n if (!accounts.systemProgram.value) {\n accounts.systemProgram.value =\n \"11111111111111111111111111111111\" as Address<\"11111111111111111111111111111111\">;\n }\n if (!accounts.slotHashSysvar.value) {\n accounts.slotHashSysvar.value =\n \"SysvarS1otHashes111111111111111111111111111\" as Address<\"SysvarS1otHashes111111111111111111111111111\">;\n }\n if (!accounts.instructionsSysvar.value) {\n accounts.instructionsSysvar.value =\n \"Sysvar1nstructions1111111111111111111111111\" as Address<\"Sysvar1nstructions1111111111111111111111111\">;\n }\n\n // Remaining accounts.\n const remainingAccounts: AccountMeta[] =\n parseRemainingAccounts(resolverScope);\n\n const getAccountMeta = getAccountMetaFactory(programAddress, \"programId\");\n return Object.freeze({\n accounts: [\n getAccountMeta(accounts.settings),\n getAccountMeta(accounts.payer),\n getAccountMeta(accounts.initialMember),\n getAccountMeta(accounts.systemProgram),\n getAccountMeta(accounts.slotHashSysvar),\n getAccountMeta(accounts.instructionsSysvar),\n getAccountMeta(accounts.domainConfig),\n getAccountMeta(accounts.globalCounter),\n ...remainingAccounts,\n ],\n data: getCreateMultiWalletInstructionDataEncoder().encode(\n args as CreateMultiWalletInstructionDataArgs\n ),\n programAddress,\n } as CreateMultiWalletInstruction<\n TProgramAddress,\n TAccountSettings,\n TAccountPayer,\n TAccountInitialMember,\n TAccountSystemProgram,\n TAccountSlotHashSysvar,\n TAccountInstructionsSysvar,\n TAccountDomainConfig,\n TAccountGlobalCounter\n >);\n}\n\nexport type CreateMultiWalletInput<\n TAccountSettings extends string = string,\n TAccountPayer extends string = string,\n TAccountInitialMember extends string = string,\n TAccountSystemProgram extends string = string,\n TAccountSlotHashSysvar extends string = string,\n TAccountInstructionsSysvar extends string = string,\n TAccountDomainConfig extends string = string,\n TAccountGlobalCounter extends string = string,\n> = {\n settings: Address<TAccountSettings>;\n payer: TransactionSigner<TAccountPayer>;\n initialMember?: TransactionSigner<TAccountInitialMember>;\n systemProgram?: Address<TAccountSystemProgram>;\n slotHashSysvar?: Address<TAccountSlotHashSysvar>;\n instructionsSysvar?: Address<TAccountInstructionsSysvar>;\n domainConfig?: Address<TAccountDomainConfig>;\n globalCounter: Address<TAccountGlobalCounter>;\n settingsIndex: CreateMultiWalletInstructionDataArgs[\"settingsIndex\"];\n secp256r1VerifyArgs: CreateMultiWalletInstructionDataArgs[\"secp256r1VerifyArgs\"];\n userMutArgs: CreateMultiWalletInstructionDataArgs[\"userMutArgs\"];\n compressedProofArgs: CreateMultiWalletInstructionDataArgs[\"compressedProofArgs\"];\n setAsDelegate: CreateMultiWalletInstructionDataArgs[\"setAsDelegate\"];\n remainingAccounts: CreateMultiWalletInstructionExtraArgs[\"remainingAccounts\"];\n};\n\nexport function getCreateMultiWalletInstruction<\n TAccountSettings extends string,\n TAccountPayer extends string,\n TAccountInitialMember extends string,\n TAccountSystemProgram extends string,\n TAccountSlotHashSysvar extends string,\n TAccountInstructionsSysvar extends string,\n TAccountDomainConfig extends string,\n TAccountGlobalCounter extends string,\n TProgramAddress extends Address = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n>(\n input: CreateMultiWalletInput<\n TAccountSettings,\n TAccountPayer,\n TAccountInitialMember,\n TAccountSystemProgram,\n TAccountSlotHashSysvar,\n TAccountInstructionsSysvar,\n TAccountDomainConfig,\n TAccountGlobalCounter\n >,\n config?: { programAddress?: TProgramAddress }\n): CreateMultiWalletInstruction<\n TProgramAddress,\n TAccountSettings,\n TAccountPayer,\n TAccountInitialMember,\n TAccountSystemProgram,\n TAccountSlotHashSysvar,\n TAccountInstructionsSysvar,\n TAccountDomainConfig,\n TAccountGlobalCounter\n> {\n // Program address.\n const programAddress = config?.programAddress ?? MULTI_WALLET_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n settings: { value: input.settings ?? null, isWritable: true },\n payer: { value: input.payer ?? null, isWritable: true },\n initialMember: { value: input.initialMember ?? null, isWritable: false },\n systemProgram: { value: input.systemProgram ?? null, isWritable: false },\n slotHashSysvar: { value: input.slotHashSysvar ?? null, isWritable: false },\n instructionsSysvar: {\n value: input.instructionsSysvar ?? null,\n isWritable: false,\n },\n domainConfig: { value: input.domainConfig ?? null, isWritable: false },\n globalCounter: { value: input.globalCounter ?? 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 // Resolver scope.\n const resolverScope = { programAddress, accounts, args };\n\n // Resolve default values.\n if (!accounts.systemProgram.value) {\n accounts.systemProgram.value =\n \"11111111111111111111111111111111\" as Address<\"11111111111111111111111111111111\">;\n }\n if (!accounts.slotHashSysvar.value) {\n accounts.slotHashSysvar.value =\n \"SysvarS1otHashes111111111111111111111111111\" as Address<\"SysvarS1otHashes111111111111111111111111111\">;\n }\n if (!accounts.instructionsSysvar.value) {\n accounts.instructionsSysvar.value =\n \"Sysvar1nstructions1111111111111111111111111\" as Address<\"Sysvar1nstructions1111111111111111111111111\">;\n }\n\n // Remaining accounts.\n const remainingAccounts: AccountMeta[] =\n parseRemainingAccounts(resolverScope);\n\n const getAccountMeta = getAccountMetaFactory(programAddress, \"programId\");\n return Object.freeze({\n accounts: [\n getAccountMeta(accounts.settings),\n getAccountMeta(accounts.payer),\n getAccountMeta(accounts.initialMember),\n getAccountMeta(accounts.systemProgram),\n getAccountMeta(accounts.slotHashSysvar),\n getAccountMeta(accounts.instructionsSysvar),\n getAccountMeta(accounts.domainConfig),\n getAccountMeta(accounts.globalCounter),\n ...remainingAccounts,\n ],\n data: getCreateMultiWalletInstructionDataEncoder().encode(\n args as CreateMultiWalletInstructionDataArgs\n ),\n programAddress,\n } as CreateMultiWalletInstruction<\n TProgramAddress,\n TAccountSettings,\n TAccountPayer,\n TAccountInitialMember,\n TAccountSystemProgram,\n TAccountSlotHashSysvar,\n TAccountInstructionsSysvar,\n TAccountDomainConfig,\n TAccountGlobalCounter\n >);\n}\n\nexport type ParsedCreateMultiWalletInstruction<\n TProgram extends string = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n settings: TAccountMetas[0];\n payer: TAccountMetas[1];\n initialMember?: TAccountMetas[2] | undefined;\n systemProgram: TAccountMetas[3];\n slotHashSysvar?: TAccountMetas[4] | undefined;\n instructionsSysvar?: TAccountMetas[5] | undefined;\n domainConfig?: TAccountMetas[6] | undefined;\n globalCounter: TAccountMetas[7];\n };\n data: CreateMultiWalletInstructionData;\n};\n\nexport function parseCreateMultiWalletInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>\n): ParsedCreateMultiWalletInstruction<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 const getNextOptionalAccount = () => {\n const accountMeta = getNextAccount();\n return accountMeta.address === MULTI_WALLET_PROGRAM_ADDRESS\n ? undefined\n : accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n settings: getNextAccount(),\n payer: getNextAccount(),\n initialMember: getNextOptionalAccount(),\n systemProgram: getNextAccount(),\n slotHashSysvar: getNextOptionalAccount(),\n instructionsSysvar: getNextOptionalAccount(),\n domainConfig: getNextOptionalAccount(),\n globalCounter: getNextAccount(),\n },\n data: getCreateMultiWalletInstructionDataDecoder().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 getBooleanDecoder,\n getBooleanEncoder,\n getBytesDecoder,\n getBytesEncoder,\n getOptionDecoder,\n getOptionEncoder,\n getStructDecoder,\n getStructEncoder,\n getU128Decoder,\n getU128Encoder,\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 type WritableSignerAccount,\n} from \"gill\";\nimport { parseRemainingAccounts } from \"../../hooked\";\nimport { MULTI_WALLET_PROGRAM_ADDRESS } from \"../programs\";\nimport { getAccountMetaFactory, type ResolvedAccount } from \"../shared\";\nimport {\n getProofArgsDecoder,\n getProofArgsEncoder,\n getSecp256r1VerifyArgsDecoder,\n getSecp256r1VerifyArgsEncoder,\n getSettingsCreationArgsDecoder,\n getSettingsCreationArgsEncoder,\n getUserMutArgsDecoder,\n getUserMutArgsEncoder,\n type ProofArgs,\n type ProofArgsArgs,\n type Secp256r1VerifyArgs,\n type Secp256r1VerifyArgsArgs,\n type SettingsCreationArgs,\n type SettingsCreationArgsArgs,\n type UserMutArgs,\n type UserMutArgsArgs,\n} from \"../types\";\n\nexport const CREATE_MULTI_WALLET_COMPRESSED_DISCRIMINATOR = new Uint8Array([\n 18,\n]);\n\nexport function getCreateMultiWalletCompressedDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 1).encode(\n CREATE_MULTI_WALLET_COMPRESSED_DISCRIMINATOR\n );\n}\n\nexport type CreateMultiWalletCompressedInstruction<\n TProgram extends string = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n TAccountPayer extends string | AccountMeta<string> = string,\n TAccountInitialMember extends string | AccountMeta<string> = string,\n TAccountSystemProgram extends\n | string\n | AccountMeta<string> = \"11111111111111111111111111111111\",\n TAccountSlotHashSysvar extends\n | string\n | AccountMeta<string> = \"SysvarS1otHashes111111111111111111111111111\",\n TAccountInstructionsSysvar extends\n | string\n | AccountMeta<string> = \"Sysvar1nstructions1111111111111111111111111\",\n TAccountDomainConfig extends string | AccountMeta<string> = string,\n TAccountGlobalCounter extends string | AccountMeta<string> = string,\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountPayer extends string\n ? WritableSignerAccount<TAccountPayer> &\n AccountSignerMeta<TAccountPayer>\n : TAccountPayer,\n TAccountInitialMember extends string\n ? ReadonlySignerAccount<TAccountInitialMember> &\n AccountSignerMeta<TAccountInitialMember>\n : TAccountInitialMember,\n TAccountSystemProgram extends string\n ? ReadonlyAccount<TAccountSystemProgram>\n : TAccountSystemProgram,\n TAccountSlotHashSysvar extends string\n ? ReadonlyAccount<TAccountSlotHashSysvar>\n : TAccountSlotHashSysvar,\n TAccountInstructionsSysvar extends string\n ? ReadonlyAccount<TAccountInstructionsSysvar>\n : TAccountInstructionsSysvar,\n TAccountDomainConfig extends string\n ? ReadonlyAccount<TAccountDomainConfig>\n : TAccountDomainConfig,\n TAccountGlobalCounter extends string\n ? WritableAccount<TAccountGlobalCounter>\n : TAccountGlobalCounter,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type CreateMultiWalletCompressedInstructionData = {\n discriminator: ReadonlyUint8Array;\n secp256r1VerifyArgs: Option<Secp256r1VerifyArgs>;\n compressedProofArgs: ProofArgs;\n settingsCreation: SettingsCreationArgs;\n userMutArgs: UserMutArgs;\n settingsIndex: bigint;\n setAsDelegate: boolean;\n};\n\nexport type CreateMultiWalletCompressedInstructionDataArgs = {\n secp256r1VerifyArgs: OptionOrNullable<Secp256r1VerifyArgsArgs>;\n compressedProofArgs: ProofArgsArgs;\n settingsCreation: SettingsCreationArgsArgs;\n userMutArgs: UserMutArgsArgs;\n settingsIndex: number | bigint;\n setAsDelegate: boolean;\n};\n\nexport function getCreateMultiWalletCompressedInstructionDataEncoder(): Encoder<CreateMultiWalletCompressedInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n [\"discriminator\", fixEncoderSize(getBytesEncoder(), 1)],\n [\n \"secp256r1VerifyArgs\",\n getOptionEncoder(getSecp256r1VerifyArgsEncoder()),\n ],\n [\"compressedProofArgs\", getProofArgsEncoder()],\n [\"settingsCreation\", getSettingsCreationArgsEncoder()],\n [\"userMutArgs\", getUserMutArgsEncoder()],\n [\"settingsIndex\", getU128Encoder()],\n [\"setAsDelegate\", getBooleanEncoder()],\n ]),\n (value) => ({\n ...value,\n discriminator: CREATE_MULTI_WALLET_COMPRESSED_DISCRIMINATOR,\n })\n );\n}\n\nexport function getCreateMultiWalletCompressedInstructionDataDecoder(): Decoder<CreateMultiWalletCompressedInstructionData> {\n return getStructDecoder([\n [\"discriminator\", fixDecoderSize(getBytesDecoder(), 1)],\n [\"secp256r1VerifyArgs\", getOptionDecoder(getSecp256r1VerifyArgsDecoder())],\n [\"compressedProofArgs\", getProofArgsDecoder()],\n [\"settingsCreation\", getSettingsCreationArgsDecoder()],\n [\"userMutArgs\", getUserMutArgsDecoder()],\n [\"settingsIndex\", getU128Decoder()],\n [\"setAsDelegate\", getBooleanDecoder()],\n ]);\n}\n\nexport function getCreateMultiWalletCompressedInstructionDataCodec(): Codec<\n CreateMultiWalletCompressedInstructionDataArgs,\n CreateMultiWalletCompressedInstructionData\n> {\n return combineCodec(\n getCreateMultiWalletCompressedInstructionDataEncoder(),\n getCreateMultiWalletCompressedInstructionDataDecoder()\n );\n}\n\nexport type CreateMultiWalletCompressedInstructionExtraArgs = {\n remainingAccounts: Array<{ address: Address; role: number }>;\n};\n\nexport type CreateMultiWalletCompressedInput<\n TAccountPayer extends string = string,\n TAccountInitialMember extends string = string,\n TAccountSystemProgram extends string = string,\n TAccountSlotHashSysvar extends string = string,\n TAccountInstructionsSysvar extends string = string,\n TAccountDomainConfig extends string = string,\n TAccountGlobalCounter extends string = string,\n> = {\n payer: TransactionSigner<TAccountPayer>;\n initialMember?: TransactionSigner<TAccountInitialMember>;\n systemProgram?: Address<TAccountSystemProgram>;\n slotHashSysvar?: Address<TAccountSlotHashSysvar>;\n instructionsSysvar?: Address<TAccountInstructionsSysvar>;\n domainConfig?: Address<TAccountDomainConfig>;\n globalCounter: Address<TAccountGlobalCounter>;\n secp256r1VerifyArgs: CreateMultiWalletCompressedInstructionDataArgs[\"secp256r1VerifyArgs\"];\n compressedProofArgs: CreateMultiWalletCompressedInstructionDataArgs[\"compressedProofArgs\"];\n settingsCreation: CreateMultiWalletCompressedInstructionDataArgs[\"settingsCreation\"];\n userMutArgs: CreateMultiWalletCompressedInstructionDataArgs[\"userMutArgs\"];\n settingsIndex: CreateMultiWalletCompressedInstructionDataArgs[\"settingsIndex\"];\n setAsDelegate: CreateMultiWalletCompressedInstructionDataArgs[\"setAsDelegate\"];\n remainingAccounts: CreateMultiWalletCompressedInstructionExtraArgs[\"remainingAccounts\"];\n};\n\nexport function getCreateMultiWalletCompressedInstruction<\n TAccountPayer extends string,\n TAccountInitialMember extends string,\n TAccountSystemProgram extends string,\n TAccountSlotHashSysvar extends string,\n TAccountInstructionsSysvar extends string,\n TAccountDomainConfig extends string,\n TAccountGlobalCounter extends string,\n TProgramAddress extends Address = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n>(\n input: CreateMultiWalletCompressedInput<\n TAccountPayer,\n TAccountInitialMember,\n TAccountSystemProgram,\n TAccountSlotHashSysvar,\n TAccountInstructionsSysvar,\n TAccountDomainConfig,\n TAccountGlobalCounter\n >,\n config?: { programAddress?: TProgramAddress }\n): CreateMultiWalletCompressedInstruction<\n TProgramAddress,\n TAccountPayer,\n TAccountInitialMember,\n TAccountSystemProgram,\n TAccountSlotHashSysvar,\n TAccountInstructionsSysvar,\n TAccountDomainConfig,\n TAccountGlobalCounter\n> {\n // Program address.\n const programAddress = config?.programAddress ?? MULTI_WALLET_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n payer: { value: input.payer ?? null, isWritable: true },\n initialMember: { value: input.initialMember ?? null, isWritable: false },\n systemProgram: { value: input.systemProgram ?? null, isWritable: false },\n slotHashSysvar: { value: input.slotHashSysvar ?? null, isWritable: false },\n instructionsSysvar: {\n value: input.instructionsSysvar ?? null,\n isWritable: false,\n },\n domainConfig: { value: input.domainConfig ?? null, isWritable: false },\n globalCounter: { value: input.globalCounter ?? 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 // Resolver scope.\n const resolverScope = { programAddress, accounts, args };\n\n // Resolve default values.\n if (!accounts.systemProgram.value) {\n accounts.systemProgram.value =\n \"11111111111111111111111111111111\" as Address<\"11111111111111111111111111111111\">;\n }\n if (!accounts.slotHashSysvar.value) {\n accounts.slotHashSysvar.value =\n \"SysvarS1otHashes111111111111111111111111111\" as Address<\"SysvarS1otHashes111111111111111111111111111\">;\n }\n if (!accounts.instructionsSysvar.value) {\n accounts.instructionsSysvar.value =\n \"Sysvar1nstructions1111111111111111111111111\" as Address<\"Sysvar1nstructions1111111111111111111111111\">;\n }\n\n // Remaining accounts.\n const remainingAccounts: AccountMeta[] =\n parseRemainingAccounts(resolverScope);\n\n const getAccountMeta = getAccountMetaFactory(programAddress, \"programId\");\n return Object.freeze({\n accounts: [\n getAccountMeta(accounts.payer),\n getAccountMeta(accounts.initialMember),\n getAccountMeta(accounts.systemProgram),\n getAccountMeta(accounts.slotHashSysvar),\n getAccountMeta(accounts.instructionsSysvar),\n getAccountMeta(accounts.domainConfig),\n getAccountMeta(accounts.globalCounter),\n ...remainingAccounts,\n ],\n data: getCreateMultiWalletCompressedInstructionDataEncoder().encode(\n args as CreateMultiWalletCompressedInstructionDataArgs\n ),\n programAddress,\n } as CreateMultiWalletCompressedInstruction<\n TProgramAddress,\n TAccountPayer,\n TAccountInitialMember,\n TAccountSystemProgram,\n TAccountSlotHashSysvar,\n TAccountInstructionsSysvar,\n TAccountDomainConfig,\n TAccountGlobalCounter\n >);\n}\n\nexport type ParsedCreateMultiWalletCompressedInstruction<\n TProgram extends string = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n payer: TAccountMetas[0];\n initialMember?: TAccountMetas[1] | undefined;\n systemProgram: TAccountMetas[2];\n slotHashSysvar?: TAccountMetas[3] | undefined;\n instructionsSysvar?: TAccountMetas[4] | undefined;\n domainConfig?: TAccountMetas[5] | undefined;\n globalCounter: TAccountMetas[6];\n };\n data: CreateMultiWalletCompressedInstructionData;\n};\n\nexport function parseCreateMultiWalletCompressedInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>\n): ParsedCreateMultiWalletCompressedInstruction<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 const getNextOptionalAccount = () => {\n const accountMeta = getNextAccount();\n return accountMeta.address === MULTI_WALLET_PROGRAM_ADDRESS\n ? undefined\n : accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n payer: getNextAccount(),\n initialMember: getNextOptionalAccount(),\n systemProgram: getNextAccount(),\n slotHashSysvar: getNextOptionalAccount(),\n instructionsSysvar: getNextOptionalAccount(),\n domainConfig: getNextOptionalAccount(),\n globalCounter: getNextAccount(),\n },\n data: getCreateMultiWalletCompressedInstructionDataDecoder().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 getArrayDecoder,\n getArrayEncoder,\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 ReadonlyUint8Array,\n type TransactionSigner,\n type WritableSignerAccount,\n} from \"gill\";\nimport { parseRemainingAccounts } from \"../../hooked\";\nimport { MULTI_WALLET_PROGRAM_ADDRESS } from \"../programs\";\nimport { getAccountMetaFactory, type ResolvedAccount } from \"../shared\";\nimport {\n getCreateUserAccountArgsDecoder,\n getCreateUserAccountArgsEncoder,\n getProofArgsDecoder,\n getProofArgsEncoder,\n type CreateUserAccountArgs,\n type CreateUserAccountArgsArgs,\n type ProofArgs,\n type ProofArgsArgs,\n} from \"../types\";\n\nexport const CREATE_USER_ACCOUNTS_DISCRIMINATOR = new Uint8Array([5]);\n\nexport function getCreateUserAccountsDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 1).encode(\n CREATE_USER_ACCOUNTS_DISCRIMINATOR\n );\n}\n\nexport type CreateUserAccountsInstruction<\n TProgram extends string = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n TAccountPayer extends string | AccountMeta<string> = string,\n TAccountSystemProgram extends\n | string\n | AccountMeta<string> = \"11111111111111111111111111111111\",\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountPayer extends string\n ? WritableSignerAccount<TAccountPayer> &\n AccountSignerMeta<TAccountPayer>\n : TAccountPayer,\n TAccountSystemProgram extends string\n ? ReadonlyAccount<TAccountSystemProgram>\n : TAccountSystemProgram,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type CreateUserAccountsInstructionData = {\n discriminator: ReadonlyUint8Array;\n compressedProofArgs: ProofArgs;\n createUserArgs: Array<CreateUserAccountArgs>;\n};\n\nexport type CreateUserAccountsInstructionDataArgs = {\n compressedProofArgs: ProofArgsArgs;\n createUserArgs: Array<CreateUserAccountArgsArgs>;\n};\n\nexport function getCreateUserAccountsInstructionDataEncoder(): Encoder<CreateUserAccountsInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n [\"discriminator\", fixEncoderSize(getBytesEncoder(), 1)],\n [\"compressedProofArgs\", getProofArgsEncoder()],\n [\"createUserArgs\", getArrayEncoder(getCreateUserAccountArgsEncoder())],\n ]),\n (value) => ({ ...value, discriminator: CREATE_USER_ACCOUNTS_DISCRIMINATOR })\n );\n}\n\nexport function getCreateUserAccountsInstructionDataDecoder(): Decoder<CreateUserAccountsInstructionData> {\n return getStructDecoder([\n [\"discriminator\", fixDecoderSize(getBytesDecoder(), 1)],\n [\"compressedProofArgs\", getProofArgsDecoder()],\n [\"createUserArgs\", getArrayDecoder(getCreateUserAccountArgsDecoder())],\n ]);\n}\n\nexport function getCreateUserAccountsInstructionDataCodec(): Codec<\n CreateUserAccountsInstructionDataArgs,\n CreateUserAccountsInstructionData\n> {\n return combineCodec(\n getCreateUserAccountsInstructionDataEncoder(),\n getCreateUserAccountsInstructionDataDecoder()\n );\n}\n\nexport type CreateUserAccountsInstructionExtraArgs = {\n remainingAccounts: Array<{ address: Address; role: number }>;\n};\n\nexport type CreateUserAccountsInput<\n TAccountPayer extends string = string,\n TAccountSystemProgram extends string = string,\n> = {\n payer: TransactionSigner<TAccountPayer>;\n systemProgram?: Address<TAccountSystemProgram>;\n compressedProofArgs: CreateUserAccountsInstructionDataArgs[\"compressedProofArgs\"];\n createUserArgs: CreateUserAccountsInstructionDataArgs[\"createUserArgs\"];\n remainingAccounts: CreateUserAccountsInstructionExtraArgs[\"remainingAccounts\"];\n};\n\nexport function getCreateUserAccountsInstruction<\n TAccountPayer extends string,\n TAccountSystemProgram extends string,\n TProgramAddress extends Address = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n>(\n input: CreateUserAccountsInput<TAccountPayer, TAccountSystemProgram>,\n config?: { programAddress?: TProgramAddress }\n): CreateUserAccountsInstruction<\n TProgramAddress,\n TAccountPayer,\n TAccountSystemProgram\n> {\n // Program address.\n const programAddress = config?.programAddress ?? MULTI_WALLET_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n payer: { value: input.payer ?? 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 // Resolver scope.\n const resolverScope = { programAddress, accounts, args };\n\n // Resolve default values.\n if (!accounts.systemProgram.value) {\n accounts.systemProgram.value =\n \"11111111111111111111111111111111\" as Address<\"11111111111111111111111111111111\">;\n }\n\n // Remaining accounts.\n const remainingAccounts: AccountMeta[] =\n parseRemainingAccounts(resolverScope);\n\n const getAccountMeta = getAccountMetaFactory(programAddress, \"programId\");\n return Object.freeze({\n accounts: [\n getAccountMeta(accounts.payer),\n getAccountMeta(accounts.systemProgram),\n ...remainingAccounts,\n ],\n data: getCreateUserAccountsInstructionDataEncoder().encode(\n args as CreateUserAccountsInstructionDataArgs\n ),\n programAddress,\n } as CreateUserAccountsInstruction<\n TProgramAddress,\n TAccountPayer,\n TAccountSystemProgram\n >);\n}\n\nexport type ParsedCreateUserAccountsInstruction<\n TProgram extends string = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n payer: TAccountMetas[0];\n systemProgram: TAccountMetas[1];\n };\n data: CreateUserAccountsInstructionData;\n};\n\nexport function parseCreateUserAccountsInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>\n): ParsedCreateUserAccountsInstruction<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: { payer: getNextAccount(), systemProgram: getNextAccount() },\n data: getCreateUserAccountsInstructionDataDecoder().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 getArrayDecoder,\n getArrayEncoder,\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 ReadonlyUint8Array,\n type TransactionSigner,\n type WritableAccount,\n type WritableSignerAccount,\n} from \"gill\";\nimport { parseRemainingAccounts } from \"../../hooked\";\nimport { MULTI_WALLET_PROGRAM_ADDRESS } from \"../programs\";\nimport { getAccountMetaFactory, type ResolvedAccount } from \"../shared\";\nimport {\n getProofArgsDecoder,\n getProofArgsEncoder,\n getSecp256r1VerifyArgsWithDomainAddressDecoder,\n getSecp256r1VerifyArgsWithDomainAddressEncoder,\n getSettingsMutArgsDecoder,\n getSettingsMutArgsEncoder,\n type ProofArgs,\n type ProofArgsArgs,\n type Secp256r1VerifyArgsWithDomainAddress,\n type Secp256r1VerifyArgsWithDomainAddressArgs,\n type SettingsMutArgs,\n type SettingsMutArgsArgs,\n} from \"../types\";\n\nexport const DECOMPRESS_SETTINGS_ACCOUNT_DISCRIMINATOR = new Uint8Array([17]);\n\nexport function getDecompressSettingsAccountDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 1).encode(\n DECOMPRESS_SETTINGS_ACCOUNT_DISCRIMINATOR\n );\n}\n\nexport type DecompressSettingsAccountInstruction<\n TProgram extends string = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n TAccountSettings extends string | AccountMeta<string> = string,\n TAccountPayer extends string | AccountMeta<string> = string,\n TAccountSystemProgram extends\n | string\n | AccountMeta<string> = \"11111111111111111111111111111111\",\n TAccountSlotHashSysvar extends\n | string\n | AccountMeta<string> = \"SysvarS1otHashes111111111111111111111111111\",\n TAccountInstructionsSysvar extends\n | string\n | AccountMeta<string> = \"Sysvar1nstructions1111111111111111111111111\",\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountSettings extends string\n ? WritableAccount<TAccountSettings>\n : TAccountSettings,\n TAccountPayer extends string\n ? WritableSignerAccount<TAccountPayer> &\n AccountSignerMeta<TAccountPayer>\n : TAccountPayer,\n TAccountSystemProgram extends string\n ? ReadonlyAccount<TAccountSystemProgram>\n : TAccountSystemProgram,\n TAccountSlotHashSysvar extends string\n ? ReadonlyAccount<TAccountSlotHashSysvar>\n : TAccountSlotHashSysvar,\n TAccountInstructionsSysvar extends string\n ? ReadonlyAccount<TAccountInstructionsSysvar>\n : TAccountInstructionsSysvar,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type DecompressSettingsAccountInstructionData = {\n discriminator: ReadonlyUint8Array;\n settingsMut: SettingsMutArgs;\n compressedProofArgs: ProofArgs;\n secp256r1VerifyArgs: Array<Secp256r1VerifyArgsWithDomainAddress>;\n};\n\nexport type DecompressSettingsAccountInstructionDataArgs = {\n settingsMut: SettingsMutArgsArgs;\n compressedProofArgs: ProofArgsArgs;\n secp256r1VerifyArgs: Array<Secp256r1VerifyArgsWithDomainAddressArgs>;\n};\n\nexport function getDecompressSettingsAccountInstructionDataEncoder(): Encoder<DecompressSettingsAccountInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n [\"discriminator\", fixEncoderSize(getBytesEncoder(), 1)],\n [\"settingsMut\", getSettingsMutArgsEncoder()],\n [\"compressedProofArgs\", getProofArgsEncoder()],\n [\n \"secp256r1VerifyArgs\",\n getArrayEncoder(getSecp256r1VerifyArgsWithDomainAddressEncoder()),\n ],\n ]),\n (value) => ({\n ...value,\n discriminator: DECOMPRESS_SETTINGS_ACCOUNT_DISCRIMINATOR,\n })\n );\n}\n\nexport function getDecompressSettingsAccountInstructionDataDecoder(): Decoder<DecompressSettingsAccountInstructionData> {\n return getStructDecoder([\n [\"discriminator\", fixDecoderSize(getBytesDecoder(), 1)],\n [\"settingsMut\", getSettingsMutArgsDecoder()],\n [\"compressedProofArgs\", getProofArgsDecoder()],\n [\n \"secp256r1VerifyArgs\",\n getArrayDecoder(getSecp256r1VerifyArgsWithDomainAddressDecoder()),\n ],\n ]);\n}\n\nexport function getDecompressSettingsAccountInstructionDataCodec(): Codec<\n DecompressSettingsAccountInstructionDataArgs,\n DecompressSettingsAccountInstructionData\n> {\n return combineCodec(\n getDecompressSettingsAccountInstructionDataEncoder(),\n getDecompressSettingsAccountInstructionDataDecoder()\n );\n}\n\nexport type DecompressSettingsAccountInstructionExtraArgs = {\n remainingAccounts: Array<{ address: Address; role: number }>;\n};\n\nexport type DecompressSettingsAccountInput<\n TAccountSettings extends string = string,\n TAccountPayer extends string = string,\n TAccountSystemProgram extends string = string,\n TAccountSlotHashSysvar extends string = string,\n TAccountInstructionsSysvar extends string = string,\n> = {\n settings: Address<TAccountSettings>;\n payer: TransactionSigner<TAccountPayer>;\n systemProgram?: Address<TAccountSystemProgram>;\n slotHashSysvar?: Address<TAccountSlotHashSysvar>;\n instructionsSysvar?: Address<TAccountInstructionsSysvar>;\n settingsMut: DecompressSettingsAccountInstructionDataArgs[\"settingsMut\"];\n compressedProofArgs: DecompressSettingsAccountInstructionDataArgs[\"compressedProofArgs\"];\n secp256r1VerifyArgs: DecompressSettingsAccountInstructionDataArgs[\"secp256r1VerifyArgs\"];\n remainingAccounts: DecompressSettingsAccountInstructionExtraArgs[\"remainingAccounts\"];\n};\n\nexport function getDecompressSettingsAccountInstruction<\n TAccountSettings extends string,\n TAccountPayer extends string,\n TAccountSystemProgram extends string,\n TAccountSlotHashSysvar extends string,\n TAccountInstructionsSysvar extends string,\n TProgramAddress extends Address = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n>(\n input: DecompressSettingsAccountInput<\n TAccountSettings,\n TAccountPayer,\n TAccountSystemProgram,\n TAccountSlotHashSysvar,\n TAccountInstructionsSysvar\n >,\n config?: { programAddress?: TProgramAddress }\n): DecompressSettingsAccountInstruction<\n TProgramAddress,\n TAccountSettings,\n TAccountPayer,\n TAccountSystemProgram,\n TAccountSlotHashSysvar,\n TAccountInstructionsSysvar\n> {\n // Program address.\n const programAddress = config?.programAddress ?? MULTI_WALLET_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n settings: { value: input.settings ?? null, isWritable: true },\n payer: { value: input.payer ?? null, isWritable: true },\n systemProgram: { value: input.systemProgram ?? null, isWritable: false },\n slotHashSysvar: { value: input.slotHashSysvar ?? null, isWritable: false },\n instructionsSysvar: {\n value: input.instructionsSysvar ?? null,\n isWritable: false,\n },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolver scope.\n const resolverScope = { programAddress, accounts, args };\n\n // Resolve default values.\n if (!accounts.systemProgram.value) {\n accounts.systemProgram.value =\n \"11111111111111111111111111111111\" as Address<\"11111111111111111111111111111111\">;\n }\n if (!accounts.slotHashSysvar.value) {\n accounts.slotHashSysvar.value =\n \"SysvarS1otHashes111111111111111111111111111\" as Address<\"SysvarS1otHashes111111111111111111111111111\">;\n }\n if (!accounts.instructionsSysvar.value) {\n accounts.instructionsSysvar.value =\n \"Sysvar1nstructions1111111111111111111111111\" as Address<\"Sysvar1nstructions1111111111111111111111111\">;\n }\n\n // Remaining accounts.\n const remainingAccounts: AccountMeta[] =\n parseRemainingAccounts(resolverScope);\n\n const getAccountMeta = getAccountMetaFactory(programAddress, \"programId\");\n return Object.freeze({\n accounts: [\n getAccountMeta(accounts.settings),\n getAccountMeta(accounts.payer),\n getAccountMeta(accounts.systemProgram),\n getAccountMeta(accounts.slotHashSysvar),\n getAccountMeta(accounts.instructionsSysvar),\n ...remainingAccounts,\n ],\n data: getDecompressSettingsAccountInstructionDataEncoder().encode(\n args as DecompressSettingsAccountInstructionDataArgs\n ),\n programAddress,\n } as DecompressSettingsAccountInstruction<\n TProgramAddress,\n TAccountSettings,\n TAccountPayer,\n TAccountSystemProgram,\n TAccountSlotHashSysvar,\n TAccountInstructionsSysvar\n >);\n}\n\nexport type ParsedDecompressSettingsAccountInstruction<\n TProgram extends string = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n settings: TAccountMetas[0];\n payer: TAccountMetas[1];\n systemProgram: TAccountMetas[2];\n slotHashSysvar?: TAccountMetas[3] | undefined;\n instructionsSysvar: TAccountMetas[4];\n };\n data: DecompressSettingsAccountInstructionData;\n};\n\nexport function parseDecompressSettingsAccountInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>\n): ParsedDecompressSettingsAccountInstruction<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 const getNextOptionalAccount = () => {\n const accountMeta = getNextAccount();\n return accountMeta.address === MULTI_WALLET_PROGRAM_ADDRESS\n ? undefined\n : accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n settings: getNextAccount(),\n payer: getNextAccount(),\n systemProgram: getNextAccount(),\n slotHashSysvar: getNextOptionalAccount(),\n instructionsSysvar: getNextAccount(),\n },\n data: getDecompressSettingsAccountInstructionDataDecoder().decode(\n instruction.data\n ),\n };\n}\n","/**\n * This code was AUTOGENERATED using the Codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun Codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n combineCodec,\n fixDecoderSize,\n fixEncoderSize,\n getBooleanDecoder,\n getBooleanEncoder,\n getBytesDecoder,\n getBytesEncoder,\n getStructDecoder,\n getStructEncoder,\n 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 \"gill\";\nimport { parseRemainingAccounts } from \"../../hooked\";\nimport { MULTI_WALLET_PROGRAM_ADDRESS } from \"../programs\";\nimport { getAccountMetaFactory, type ResolvedAccount } from \"../shared\";\n\nexport const DISABLE_DOMAIN_CONFIG_DISCRIMINATOR = new Uint8Array([2]);\n\nexport function getDisableDomainConfigDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 1).encode(\n DISABLE_DOMAIN_CONFIG_DISCRIMINATOR\n );\n}\n\nexport type DisableDomainConfigInstruction<\n TProgram extends string = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n TAccountDomainConfig extends string | AccountMeta<string> = string,\n TAccountAdmin extends string | AccountMeta<string> = string,\n TAccountAdminDomainConfig extends\n | string\n | AccountMeta<string> = \"5tgzUZaVtfnnSEBgmBDtJj6PdgYCnA1uaEGEUi3y5Njg\",\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountDomainConfig extends string\n ? WritableAccount<TAccountDomainConfig>\n : TAccountDomainConfig,\n TAccountAdmin extends string\n ? ReadonlySignerAccount<TAccountAdmin> &\n AccountSignerMeta<TAccountAdmin>\n : TAccountAdmin,\n TAccountAdminDomainConfig extends string\n ? ReadonlyAccount<TAccountAdminDomainConfig>\n : TAccountAdminDomainConfig,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type DisableDomainConfigInstructionData = {\n discriminator: ReadonlyUint8Array;\n disable: boolean;\n};\n\nexport type DisableDomainConfigInstructionDataArgs = { disable: boolean };\n\nexport function getDisableDomainConfigInstructionDataEncoder(): FixedSizeEncoder<DisableDomainConfigInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n [\"discriminator\", fixEncoderSize(getBytesEncoder(), 1)],\n [\"disable\", getBooleanEncoder()],\n ]),\n (value) => ({\n ...value,\n discriminator: DISABLE_DOMAIN_CONFIG_DISCRIMINATOR,\n })\n );\n}\n\nexport function getDisableDomainConfigInstructionDataDecoder(): FixedSizeDecoder<DisableDomainConfigInstructionData> {\n return getStructDecoder([\n [\"discriminator\", fixDecoderSize(getBytesDecoder(), 1)],\n [\"disable\", getBooleanDecoder()],\n ]);\n}\n\nexport function getDisableDomainConfigInstructionDataCodec(): FixedSizeCodec<\n DisableDomainConfigInstructionDataArgs,\n DisableDomainConfigInstructionData\n> {\n return combineCodec(\n getDisableDomainConfigInstructionDataEncoder(),\n getDisableDomainConfigInstructionDataDecoder()\n );\n}\n\nexport type DisableDomainConfigInstructionExtraArgs = {\n remainingAccounts: Array<{ address: Address; role: number }>;\n};\n\nexport type DisableDomainConfigInput<\n TAccountDomainConfig extends string = string,\n TAccountAdmin extends string = string,\n TAccountAdminDomainConfig extends string = string,\n> = {\n domainConfig: Address<TAccountDomainConfig>;\n admin: TransactionSigner<TAccountAdmin>;\n adminDomainConfig?: Address<TAccountAdminDomainConfig>;\n disable: DisableDomainConfigInstructionDataArgs[\"disable\"];\n remainingAccounts: DisableDomainConfigInstructionExtraArgs[\"remainingAccounts\"];\n};\n\nexport function getDisableDomainConfigInstruction<\n TAccountDomainConfig extends string,\n TAccountAdmin extends string,\n TAccountAdminDomainConfig extends string,\n TProgramAddress extends Address = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n>(\n input: DisableDomainConfigInput<\n TAccountDomainConfig,\n TAccountAdmin,\n TAccountAdminDomainConfig\n >,\n config?: { programAddress?: TProgramAddress }\n): DisableDomainConfigInstruction<\n TProgramAddress,\n TAccountDomainConfig,\n TAccountAdmin,\n TAccountAdminDomainConfig\n> {\n // Program address.\n const programAddress = config?.programAddress ?? MULTI_WALLET_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n domainConfig: { value: input.domainConfig ?? null, isWritable: true },\n admin: { value: input.admin ?? null, isWritable: false },\n adminDomainConfig: {\n value: input.adminDomainConfig ?? null,\n isWritable: false,\n },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolver scope.\n const resolverScope = { programAddress, accounts, args };\n\n // Resolve default values.\n if (!accounts.adminDomainConfig.value) {\n accounts.adminDomainConfig.value =\n \"5tgzUZaVtfnnSEBgmBDtJj6PdgYCnA1uaEGEUi3y5Njg\" as Address<\"5tgzUZaVtfnnSEBgmBDtJj6PdgYCnA1uaEGEUi3y5Njg\">;\n }\n\n // Remaining accounts.\n const remainingAccounts: AccountMeta[] =\n parseRemainingAccounts(resolverScope);\n\n const getAccountMeta = getAccountMetaFactory(programAddress, \"programId\");\n return Object.freeze({\n accounts: [\n getAccountMeta(accounts.domainConfig),\n getAccountMeta(accounts.admin),\n getAccountMeta(accounts.adminDomainConfig),\n ...remainingAccounts,\n ],\n data: getDisableDomainConfigInstructionDataEncoder().encode(\n args as DisableDomainConfigInstructionDataArgs\n ),\n programAddress,\n } as DisableDomainConfigInstruction<\n TProgramAddress,\n TAccountDomainConfig,\n TAccountAdmin,\n TAccountAdminDomainConfig\n >);\n}\n\nexport type ParsedDisableDomainConfigInstruction<\n TProgram extends string = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n domainConfig: TAccountMetas[0];\n admin: TAccountMetas[1];\n adminDomainConfig: TAccountMetas[2];\n };\n data: DisableDomainConfigInstructionData;\n};\n\nexport function parseDisableDomainConfigInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>\n): ParsedDisableDomainConfigInstruction<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 domainConfig: getNextAccount(),\n admin: getNextAccount(),\n adminDomainConfig: getNextAccount(),\n },\n data: getDisableDomainConfigInstructionDataDecoder().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 getOptionDecoder,\n getOptionEncoder,\n getStructDecoder,\n getStructEncoder,\n getU32Decoder,\n getU32Encoder,\n getUtf8Decoder,\n getUtf8Encoder,\n transformEncoder,\n type AccountMeta,\n type AccountSignerMeta,\n type Address,\n type Codec,\n type Decoder,\n type Encoder,\n type Instruction,\n type InstructionWithAccounts,\n type InstructionWithData,\n type Option,\n type OptionOrNullable,\n type ReadonlyAccount,\n type ReadonlySignerAccount,\n type ReadonlyUint8Array,\n type TransactionSigner,\n type WritableAccount,\n} from \"gill\";\nimport { parseRemainingAccounts } from \"../../hooked\";\nimport { MULTI_WALLET_PROGRAM_ADDRESS } from \"../programs\";\nimport { getAccountMetaFactory, type ResolvedAccount } from \"../shared\";\n\nexport const EDIT_DOMAIN_CONFIG_DISCRIMINATOR = new Uint8Array([1]);\n\nexport function getEditDomainConfigDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 1).encode(\n EDIT_DOMAIN_CONFIG_DISCRIMINATOR\n );\n}\n\nexport type EditDomainConfigInstruction<\n TProgram extends string = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n TAccountDomainConfig extends string | AccountMeta<string> = string,\n TAccountAuthority extends string | AccountMeta<string> = string,\n TAccountSystemProgram extends\n | string\n | AccountMeta<string> = \"11111111111111111111111111111111\",\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountDomainConfig extends string\n ? WritableAccount<TAccountDomainConfig>\n : TAccountDomainConfig,\n TAccountAuthority extends string\n ? ReadonlySignerAccount<TAccountAuthority> &\n AccountSignerMeta<TAccountAuthority>\n : TAccountAuthority,\n TAccountSystemProgram extends string\n ? ReadonlyAccount<TAccountSystemProgram>\n : TAccountSystemProgram,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type EditDomainConfigInstructionData = {\n discriminator: ReadonlyUint8Array;\n newOrigins: Option<Array<string>>;\n newAuthority: Option<Address>;\n newMetadataUrl: Option<string>;\n};\n\nexport type EditDomainConfigInstructionDataArgs = {\n newOrigins: OptionOrNullable<Array<string>>;\n newAuthority: OptionOrNullable<Address>;\n newMetadataUrl: OptionOrNullable<string>;\n};\n\nexport function getEditDomainConfigInstructionDataEncoder(): Encoder<EditDomainConfigInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n [\"discriminator\", fixEncoderSize(getBytesEncoder(), 1)],\n [\n \"newOrigins\",\n getOptionEncoder(\n getArrayEncoder(\n addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder())\n )\n ),\n ],\n [\"newAuthority\", getOptionEncoder(getAddressEncoder())],\n [\n \"newMetadataUrl\",\n getOptionEncoder(\n addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder())\n ),\n ],\n ]),\n (value) => ({ ...value, discriminator: EDIT_DOMAIN_CONFIG_DISCRIMINATOR })\n );\n}\n\nexport function getEditDomainConfigInstructionDataDecoder(): Decoder<EditDomainConfigInstructionData> {\n return getStructDecoder([\n [\"discriminator\", fixDecoderSize(getBytesDecoder(), 1)],\n [\n \"newOrigins\",\n getOptionDecoder(\n getArrayDecoder(addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder()))\n ),\n ],\n [\"newAuthority\", getOptionDecoder(getAddressDecoder())],\n [\n \"newMetadataUrl\",\n getOptionDecoder(addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder())),\n ],\n ]);\n}\n\nexport function getEditDomainConfigInstructionDataCodec(): Codec<\n EditDomainConfigInstructionDataArgs,\n EditDomainConfigInstructionData\n> {\n return combineCodec(\n getEditDomainConfigInstructionDataEncoder(),\n getEditDomainConfigInstructionDataDecoder()\n );\n}\n\nexport type EditDomainConfigInstructionExtraArgs = {\n remainingAccounts: Array<{ address: Address; role: number }>;\n};\n\nexport type EditDomainConfigInput<\n TAccountDomainConfig extends string = string,\n TAccountAuthority extends string = string,\n TAccountSystemProgram extends string = string,\n> = {\n domainConfig: Address<TAccountDomainConfig>;\n authority: TransactionSigner<TAccountAuthority>;\n systemProgram?: Address<TAccountSystemProgram>;\n newOrigins: EditDomainConfigInstructionDataArgs[\"newOrigins\"];\n newAuthority: EditDomainConfigInstructionDataArgs[\"newAuthority\"];\n newMetadataUrl: EditDomainConfigInstructionDataArgs[\"newMetadataUrl\"];\n remainingAccounts: EditDomainConfigInstructionExtraArgs[\"remainingAccounts\"];\n};\n\nexport function getEditDomainConfigInstruction<\n TAccountDomainConfig extends string,\n TAccountAuthority extends string,\n TAccountSystemProgram extends string,\n TProgramAddress extends Address = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n>(\n input: EditDomainConfigInput<\n TAccountDomainConfig,\n TAccountAuthority,\n TAccountSystemProgram\n >,\n config?: { programAddress?: TProgramAddress }\n): EditDomainConfigInstruction<\n TProgramAddress,\n TAccountDomainConfig,\n TAccountAuthority,\n TAccountSystemProgram\n> {\n // Program address.\n const programAddress = config?.programAddress ?? MULTI_WALLET_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n domainConfig: { value: input.domainConfig ?? null, isWritable: true },\n authority: { value: input.authority ?? 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 // Resolver scope.\n const resolverScope = { programAddress, accounts, args };\n\n // Resolve default values.\n if (!accounts.systemProgram.value) {\n accounts.systemProgram.value =\n \"11111111111111111111111111111111\" as Address<\"11111111111111111111111111111111\">;\n }\n\n // Remaining accounts.\n const remainingAccounts: AccountMeta[] =\n parseRemainingAccounts(resolverScope);\n\n const getAccountMeta = getAccountMetaFactory(programAddress, \"programId\");\n return Object.freeze({\n accounts: [\n getAccountMeta(accounts.domainConfig),\n getAccountMeta(accounts.authority),\n getAccountMeta(accounts.systemProgram),\n ...remainingAccounts,\n ],\n data: getEditDomainConfigInstructionDataEncoder().encode(\n args as EditDomainConfigInstructionDataArgs\n ),\n programAddress,\n } as EditDomainConfigInstruction<\n TProgramAddress,\n TAccountDomainConfig,\n TAccountAuthority,\n TAccountSystemProgram\n >);\n}\n\nexport type ParsedEditDomainConfigInstruction<\n TProgram extends string = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n domainConfig: TAccountMetas[0];\n authority: TAccountMetas[1];\n systemProgram: TAccountMetas[2];\n };\n data: EditDomainConfigInstructionData;\n};\n\nexport function parseEditDomainConfigInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>\n): ParsedEditDomainConfigInstruction<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 domainConfig: getNextAccount(),\n authority: getNextAccount(),\n systemProgram: getNextAccount(),\n },\n data: getEditDomainConfigInstructionDataDecoder().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 ReadonlySignerAccount,\n type ReadonlyUint8Array,\n type TransactionSigner,\n} from \"gill\";\nimport { parseRemainingAccounts } from \"../../hooked\";\nimport { MULTI_WALLET_PROGRAM_ADDRESS } from \"../programs\";\nimport { getAccountMetaFactory, type ResolvedAccount } from \"../shared\";\nimport {\n getProofArgsDecoder,\n getProofArgsEncoder,\n getUserMutArgsDecoder,\n getUserMutArgsEncoder,\n type ProofArgs,\n type ProofArgsArgs,\n type UserMutArgs,\n type UserMutArgsArgs,\n} from \"../types\";\n\nexport const EDIT_TRANSACTION_MANAGER_URL_DISCRIMINATOR = new Uint8Array([6]);\n\nexport function getEditTransactionManagerUrlDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 1).encode(\n EDIT_TRANSACTION_MANAGER_URL_DISCRIMINATOR\n );\n}\n\nexport type EditTransactionManagerUrlInstruction<\n TProgram extends string = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n TAccountAuthority extends string | AccountMeta<string> = string,\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountAuthority extends string\n ? ReadonlySignerAccount<TAccountAuthority> &\n AccountSignerMeta<TAccountAuthority>\n : TAccountAuthority,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type EditTransactionManagerUrlInstructionData = {\n discriminator: ReadonlyUint8Array;\n userMutArgs: UserMutArgs;\n transactionManagerUrl: string;\n compressedProofArgs: ProofArgs;\n};\n\nexport type EditTransactionManagerUrlInstructionDataArgs = {\n userMutArgs: UserMutArgsArgs;\n transactionManagerUrl: string;\n compressedProofArgs: ProofArgsArgs;\n};\n\nexport function getEditTransactionManagerUrlInstructionDataEncoder(): Encoder<EditTransactionManagerUrlInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n [\"discriminator\", fixEncoderSize(getBytesEncoder(), 1)],\n [\"userMutArgs\", getUserMutArgsEncoder()],\n [\n \"transactionManagerUrl\",\n addEncoderSizePrefix(getUtf8Encoder(), getU32Encoder()),\n ],\n [\"compressedProofArgs\", getProofArgsEncoder()],\n ]),\n (value) => ({\n ...value,\n discriminator: EDIT_TRANSACTION_MANAGER_URL_DISCRIMINATOR,\n })\n );\n}\n\nexport function getEditTransactionManagerUrlInstructionDataDecoder(): Decoder<EditTransactionManagerUrlInstructionData> {\n return getStructDecoder([\n [\"discriminator\", fixDecoderSize(getBytesDecoder(), 1)],\n [\"userMutArgs\", getUserMutArgsDecoder()],\n [\n \"transactionManagerUrl\",\n addDecoderSizePrefix(getUtf8Decoder(), getU32Decoder()),\n ],\n [\"compressedProofArgs\", getProofArgsDecoder()],\n ]);\n}\n\nexport function getEditTransactionManagerUrlInstructionDataCodec(): Codec<\n EditTransactionManagerUrlInstructionDataArgs,\n EditTransactionManagerUrlInstructionData\n> {\n return combineCodec(\n getEditTransactionManagerUrlInstructionDataEncoder(),\n getEditTransactionManagerUrlInstructionDataDecoder()\n );\n}\n\nexport type EditTransactionManagerUrlInstructionExtraArgs = {\n remainingAccounts: Array<{ address: Address; role: number }>;\n};\n\nexport type EditTransactionManagerUrlInput<\n TAccountAuthority extends string = string,\n> = {\n authority: TransactionSigner<TAccountAuthority>;\n userMutArgs: EditTransactionManagerUrlInstructionDataArgs[\"userMutArgs\"];\n transactionManagerUrl: EditTransactionManagerUrlInstructionDataArgs[\"transactionManagerUrl\"];\n compressedProofArgs: EditTransactionManagerUrlInstructionDataArgs[\"compressedProofArgs\"];\n remainingAccounts: EditTransactionManagerUrlInstructionExtraArgs[\"remainingAccounts\"];\n};\n\nexport function getEditTransactionManagerUrlInstruction<\n TAccountAuthority extends string,\n TProgramAddress extends Address = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n>(\n input: EditTransactionManagerUrlInput<TAccountAuthority>,\n config?: { programAddress?: TProgramAddress }\n): EditTransactionManagerUrlInstruction<TProgramAddress, TAccountAuthority> {\n // Program address.\n const programAddress = config?.programAddress ?? MULTI_WALLET_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\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 // Resolver scope.\n const resolverScope = { programAddress, accounts, args };\n\n // Remaining accounts.\n const remainingAccounts: AccountMeta[] =\n parseRemainingAccounts(resolverScope);\n\n const getAccountMeta = getAccountMetaFactory(programAddress, \"programId\");\n return Object.freeze({\n accounts: [getAccountMeta(accounts.authority), ...remainingAccounts],\n data: getEditTransactionManagerUrlInstructionDataEncoder().encode(\n args as EditTransactionManagerUrlInstructionDataArgs\n ),\n programAddress,\n } as EditTransactionManagerUrlInstruction<\n TProgramAddress,\n TAccountAuthority\n >);\n}\n\nexport type ParsedEditTransactionManagerUrlInstruction<\n TProgram extends string = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n authority: TAccountMetas[0];\n };\n data: EditTransactionManagerUrlInstructionData;\n};\n\nexport function parseEditTransactionManagerUrlInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>\n): ParsedEditTransactionManagerUrlInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 1) {\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: { authority: getNextAccount() },\n data: getEditTransactionManagerUrlInstructionDataDecoder().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 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 WritableSignerAccount,\n} from \"gill\";\nimport { parseRemainingAccounts } from \"../../hooked\";\nimport { MULTI_WALLET_PROGRAM_ADDRESS } from \"../programs\";\nimport { getAccountMetaFactory, type ResolvedAccount } from \"../shared\";\nimport {\n getCompressedSettingsDataDecoder,\n getCompressedSettingsDataEncoder,\n getProofArgsDecoder,\n getProofArgsEncoder,\n getSettingsCreationArgsDecoder,\n getSettingsCreationArgsEncoder,\n type CompressedSettingsData,\n type CompressedSettingsDataArgs,\n type ProofArgs,\n type ProofArgsArgs,\n type SettingsCreationArgs,\n type SettingsCreationArgsArgs,\n} from \"../types\";\n\nexport const MIGRATE_COMPRESSED_SETTINGS_DISCRIMINATOR = new Uint8Array([32]);\n\nexport function getMigrateCompressedSettingsDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 1).encode(\n MIGRATE_COMPRESSED_SETTINGS_DISCRIMINATOR\n );\n}\n\nexport type MigrateCompressedSettingsInstruction<\n TProgram extends string = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n TAccountAuthority extends string | AccountMeta<string> = string,\n TAccountAdminDomainConfig extends\n | string\n | AccountMeta<string> = \"5tgzUZaVtfnnSEBgmBDtJj6PdgYCnA1uaEGEUi3y5Njg\",\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountAuthority extends string\n ? WritableSignerAccount<TAccountAuthority> &\n AccountSignerMeta<TAccountAuthority>\n : TAccountAuthority,\n TAccountAdminDomainConfig extends string\n ? ReadonlyAccount<TAccountAdminDomainConfig>\n : TAccountAdminDomainConfig,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type MigrateCompressedSettingsInstructionData = {\n discriminator: ReadonlyUint8Array;\n args: CompressedSettingsData;\n compressedProofArgs: ProofArgs;\n settingsCreationArgs: SettingsCreationArgs;\n};\n\nexport type MigrateCompressedSettingsInstructionDataArgs = {\n args: CompressedSettingsDataArgs;\n compressedProofArgs: ProofArgsArgs;\n settingsCreationArgs: SettingsCreationArgsArgs;\n};\n\nexport function getMigrateCompressedSettingsInstructionDataEncoder(): Encoder<MigrateCompressedSettingsInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n [\"discriminator\", fixEncoderSize(getBytesEncoder(), 1)],\n [\"args\", getCompressedSettingsDataEncoder()],\n [\"compressedProofArgs\", getProofArgsEncoder()],\n [\"settingsCreationArgs\", getSettingsCreationArgsEncoder()],\n ]),\n (value) => ({\n ...value,\n discriminator: MIGRATE_COMPRESSED_SETTINGS_DISCRIMINATOR,\n })\n );\n}\n\nexport function getMigrateCompressedSettingsInstructionDataDecoder(): Decoder<MigrateCompressedSettingsInstructionData> {\n return getStructDecoder([\n [\"discriminator\", fixDecoderSize(getBytesDecoder(), 1)],\n [\"args\", getCompressedSettingsDataDecoder()],\n [\"compressedProofArgs\", getProofArgsDecoder()],\n [\"settingsCreationArgs\", getSettingsCreationArgsDecoder()],\n ]);\n}\n\nexport function getMigrateCompressedSettingsInstructionDataCodec(): Codec<\n MigrateCompressedSettingsInstructionDataArgs,\n MigrateCompressedSettingsInstructionData\n> {\n return combineCodec(\n getMigrateCompressedSettingsInstructionDataEncoder(),\n getMigrateCompressedSettingsInstructionDataDecoder()\n );\n}\n\nexport type MigrateCompressedSettingsInstructionExtraArgs = {\n remainingAccounts: Array<{ address: Address; role: number }>;\n};\n\nexport type MigrateCompressedSettingsInput<\n TAccountAuthority extends string = string,\n TAccountAdminDomainConfig extends string = string,\n> = {\n authority: TransactionSigner<TAccountAuthority>;\n adminDomainConfig?: Address<TAccountAdminDomainConfig>;\n args: MigrateCompressedSettingsInstructionDataArgs[\"args\"];\n compressedProofArgs: MigrateCompressedSettingsInstructionDataArgs[\"compressedProofArgs\"];\n settingsCreationArgs: MigrateCompressedSettingsInstructionDataArgs[\"settingsCreationArgs\"];\n remainingAccounts: MigrateCompressedSettingsInstructionExtraArgs[\"remainingAccounts\"];\n};\n\nexport function getMigrateCompressedSettingsInstruction<\n TAccountAuthority extends string,\n TAccountAdminDomainConfig extends string,\n TProgramAddress extends Address = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n>(\n input: MigrateCompressedSettingsInput<\n TAccountAuthority,\n TAccountAdminDomainConfig\n >,\n config?: { programAddress?: TProgramAddress }\n): MigrateCompressedSettingsInstruction<\n TProgramAddress,\n TAccountAuthority,\n TAccountAdminDomainConfig\n> {\n // Program address.\n const programAddress = config?.programAddress ?? MULTI_WALLET_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n authority: { value: input.authority ?? null, isWritable: true },\n adminDomainConfig: {\n value: input.adminDomainConfig ?? null,\n isWritable: false,\n },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolver scope.\n const resolverScope = { programAddress, accounts, args };\n\n // Resolve default values.\n if (!accounts.adminDomainConfig.value) {\n accounts.adminDomainConfig.value =\n \"5tgzUZaVtfnnSEBgmBDtJj6PdgYCnA1uaEGEUi3y5Njg\" as Address<\"5tgzUZaVtfnnSEBgmBDtJj6PdgYCnA1uaEGEUi3y5Njg\">;\n }\n\n // Remaining accounts.\n const remainingAccounts: AccountMeta[] =\n parseRemainingAccounts(resolverScope);\n\n const getAccountMeta = getAccountMetaFactory(programAddress, \"programId\");\n return Object.freeze({\n accounts: [\n getAccountMeta(accounts.authority),\n getAccountMeta(accounts.adminDomainConfig),\n ...remainingAccounts,\n ],\n data: getMigrateCompressedSettingsInstructionDataEncoder().encode(\n args as MigrateCompressedSettingsInstructionDataArgs\n ),\n programAddress,\n } as MigrateCompressedSettingsInstruction<\n TProgramAddress,\n TAccountAuthority,\n TAccountAdminDomainConfig\n >);\n}\n\nexport type ParsedMigrateCompressedSettingsInstruction<\n TProgram extends string = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n authority: TAccountMetas[0];\n adminDomainConfig: TAccountMetas[1];\n };\n data: MigrateCompressedSettingsInstructionData;\n};\n\nexport function parseMigrateCompressedSettingsInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>\n): ParsedMigrateCompressedSettingsInstruction<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 authority: getNextAccount(),\n adminDomainConfig: getNextAccount(),\n },\n data: getMigrateCompressedSettingsInstructionDataDecoder().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 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 WritableSignerAccount,\n} from \"gill\";\nimport { parseRemainingAccounts } from \"../../hooked\";\nimport { MULTI_WALLET_PROGRAM_ADDRESS } from \"../programs\";\nimport { getAccountMetaFactory, type ResolvedAccount } from \"../shared\";\nimport {\n getProofArgsDecoder,\n getProofArgsEncoder,\n getUserCreationArgsDecoder,\n getUserCreationArgsEncoder,\n getUserDecoder,\n getUserEncoder,\n type ProofArgs,\n type ProofArgsArgs,\n type User,\n type UserArgs,\n type UserCreationArgs,\n type UserCreationArgsArgs,\n} from \"../types\";\n\nexport const MIGRATE_COMPRESSED_USERS_DISCRIMINATOR = new Uint8Array([31]);\n\nexport function getMigrateCompressedUsersDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 1).encode(\n MIGRATE_COMPRESSED_USERS_DISCRIMINATOR\n );\n}\n\nexport type MigrateCompressedUsersInstruction<\n TProgram extends string = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n TAccountAuthority extends string | AccountMeta<string> = string,\n TAccountAdminDomainConfig extends\n | string\n | AccountMeta<string> = \"5tgzUZaVtfnnSEBgmBDtJj6PdgYCnA1uaEGEUi3y5Njg\",\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountAuthority extends string\n ? WritableSignerAccount<TAccountAuthority> &\n AccountSignerMeta<TAccountAuthority>\n : TAccountAuthority,\n TAccountAdminDomainConfig extends string\n ? ReadonlyAccount<TAccountAdminDomainConfig>\n : TAccountAdminDomainConfig,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type MigrateCompressedUsersInstructionData = {\n discriminator: ReadonlyUint8Array;\n args: User;\n compressedProofArgs: ProofArgs;\n userCreationArgs: UserCreationArgs;\n};\n\nexport type MigrateCompressedUsersInstructionDataArgs = {\n args: UserArgs;\n compressedProofArgs: ProofArgsArgs;\n userCreationArgs: UserCreationArgsArgs;\n};\n\nexport function getMigrateCompressedUsersInstructionDataEncoder(): Encoder<MigrateCompressedUsersInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n [\"discriminator\", fixEncoderSize(getBytesEncoder(), 1)],\n [\"args\", getUserEncoder()],\n [\"compressedProofArgs\", getProofArgsEncoder()],\n [\"userCreationArgs\", getUserCreationArgsEncoder()],\n ]),\n (value) => ({\n ...value,\n discriminator: MIGRATE_COMPRESSED_USERS_DISCRIMINATOR,\n })\n );\n}\n\nexport function getMigrateCompressedUsersInstructionDataDecoder(): Decoder<MigrateCompressedUsersInstructionData> {\n return getStructDecoder([\n [\"discriminator\", fixDecoderSize(getBytesDecoder(), 1)],\n [\"args\", getUserDecoder()],\n [\"compressedProofArgs\", getProofArgsDecoder()],\n [\"userCreationArgs\", getUserCreationArgsDecoder()],\n ]);\n}\n\nexport function getMigrateCompressedUsersInstructionDataCodec(): Codec<\n MigrateCompressedUsersInstructionDataArgs,\n MigrateCompressedUsersInstructionData\n> {\n return combineCodec(\n getMigrateCompressedUsersInstructionDataEncoder(),\n getMigrateCompressedUsersInstructionDataDecoder()\n );\n}\n\nexport type MigrateCompressedUsersInstructionExtraArgs = {\n remainingAccounts: Array<{ address: Address; role: number }>;\n};\n\nexport type MigrateCompressedUsersInput<\n TAccountAuthority extends string = string,\n TAccountAdminDomainConfig extends string = string,\n> = {\n authority: TransactionSigner<TAccountAuthority>;\n adminDomainConfig?: Address<TAccountAdminDomainConfig>;\n args: MigrateCompressedUsersInstructionDataArgs[\"args\"];\n compressedProofArgs: MigrateCompressedUsersInstructionDataArgs[\"compressedProofArgs\"];\n userCreationArgs: MigrateCompressedUsersInstructionDataArgs[\"userCreationArgs\"];\n remainingAccounts: MigrateCompressedUsersInstructionExtraArgs[\"remainingAccounts\"];\n};\n\nexport function getMigrateCompressedUsersInstruction<\n TAccountAuthority extends string,\n TAccountAdminDomainConfig extends string,\n TProgramAddress extends Address = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n>(\n input: MigrateCompressedUsersInput<\n TAccountAuthority,\n TAccountAdminDomainConfig\n >,\n config?: { programAddress?: TProgramAddress }\n): MigrateCompressedUsersInstruction<\n TProgramAddress,\n TAccountAuthority,\n TAccountAdminDomainConfig\n> {\n // Program address.\n const programAddress = config?.programAddress ?? MULTI_WALLET_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n authority: { value: input.authority ?? null, isWritable: true },\n adminDomainConfig: {\n value: input.adminDomainConfig ?? null,\n isWritable: false,\n },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolver scope.\n const resolverScope = { programAddress, accounts, args };\n\n // Resolve default values.\n if (!accounts.adminDomainConfig.value) {\n accounts.adminDomainConfig.value =\n \"5tgzUZaVtfnnSEBgmBDtJj6PdgYCnA1uaEGEUi3y5Njg\" as Address<\"5tgzUZaVtfnnSEBgmBDtJj6PdgYCnA1uaEGEUi3y5Njg\">;\n }\n\n // Remaining accounts.\n const remainingAccounts: AccountMeta[] =\n parseRemainingAccounts(resolverScope);\n\n const getAccountMeta = getAccountMetaFactory(programAddress, \"programId\");\n return Object.freeze({\n accounts: [\n getAccountMeta(accounts.authority),\n getAccountMeta(accounts.adminDomainConfig),\n ...remainingAccounts,\n ],\n data: getMigrateCompressedUsersInstructionDataEncoder().encode(\n args as MigrateCompressedUsersInstructionDataArgs\n ),\n programAddress,\n } as MigrateCompressedUsersInstruction<\n TProgramAddress,\n TAccountAuthority,\n TAccountAdminDomainConfig\n >);\n}\n\nexport type ParsedMigrateCompressedUsersInstruction<\n TProgram extends string = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n authority: TAccountMetas[0];\n adminDomainConfig: TAccountMetas[1];\n };\n data: MigrateCompressedUsersInstructionData;\n};\n\nexport function parseMigrateCompressedUsersInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>\n): ParsedMigrateCompressedUsersInstruction<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 authority: getNextAccount(),\n adminDomainConfig: getNextAccount(),\n },\n data: getMigrateCompressedUsersInstructionDataDecoder().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 getU64Decoder,\n getU64Encoder,\n transformEncoder,\n type AccountMeta,\n type Address,\n type Codec,\n type Decoder,\n type Encoder,\n type Instruction,\n type InstructionWithAccounts,\n type InstructionWithData,\n type ReadonlyAccount,\n type ReadonlyUint8Array,\n type WritableAccount,\n} from \"gill\";\nimport { parseRemainingAccounts } from \"../../hooked\";\nimport { MULTI_WALLET_PROGRAM_ADDRESS } from \"../programs\";\nimport {\n expectAddress,\n getAccountMetaFactory,\n type ResolvedAccount,\n} from \"../shared\";\nimport {\n getSecp256r1VerifyArgsWithDomainAddressDecoder,\n getSecp256r1VerifyArgsWithDomainAddressEncoder,\n type Secp256r1VerifyArgsWithDomainAddress,\n type Secp256r1VerifyArgsWithDomainAddressArgs,\n} from \"../types\";\n\nexport const NATIVE_TRANSFER_INTENT_DISCRIMINATOR = new Uint8Array([29]);\n\nexport function getNativeTransferIntentDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 1).encode(\n NATIVE_TRANSFER_INTENT_DISCRIMINATOR\n );\n}\n\nexport type NativeTransferIntentInstruction<\n TProgram extends string = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n TAccountSettings extends string | AccountMeta<string> = string,\n TAccountSlotHashSysvar extends\n | string\n | AccountMeta<string> = \"SysvarS1otHashes111111111111111111111111111\",\n TAccountInstructionsSysvar extends\n | string\n | AccountMeta<string> = \"Sysvar1nstructions1111111111111111111111111\",\n TAccountSource extends string | AccountMeta<string> = string,\n TAccountDestination extends string | AccountMeta<string> = string,\n TAccountSystemProgram extends\n | string\n | AccountMeta<string> = \"11111111111111111111111111111111\",\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountSettings extends string\n ? ReadonlyAccount<TAccountSettings>\n : TAccountSettings,\n TAccountSlotHashSysvar extends string\n ? ReadonlyAccount<TAccountSlotHashSysvar>\n : TAccountSlotHashSysvar,\n TAccountInstructionsSysvar extends string\n ? ReadonlyAccount<TAccountInstructionsSysvar>\n : TAccountInstructionsSysvar,\n TAccountSource extends string\n ? WritableAccount<TAccountSource>\n : TAccountSource,\n TAccountDestination extends string\n ? WritableAccount<TAccountDestination>\n : TAccountDestination,\n TAccountSystemProgram extends string\n ? ReadonlyAccount<TAccountSystemProgram>\n : TAccountSystemProgram,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type NativeTransferIntentInstructionData = {\n discriminator: ReadonlyUint8Array;\n amount: bigint;\n secp256r1VerifyArgs: Array<Secp256r1VerifyArgsWithDomainAddress>;\n};\n\nexport type NativeTransferIntentInstructionDataArgs = {\n amount: number | bigint;\n secp256r1VerifyArgs: Array<Secp256r1VerifyArgsWithDomainAddressArgs>;\n};\n\nexport function getNativeTransferIntentInstructionDataEncoder(): Encoder<NativeTransferIntentInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n [\"discriminator\", fixEncoderSize(getBytesEncoder(), 1)],\n [\"amount\", getU64Encoder()],\n [\n \"secp256r1VerifyArgs\",\n getArrayEncoder(getSecp256r1VerifyArgsWithDomainAddressEncoder()),\n ],\n ]),\n (value) => ({\n ...value,\n discriminator: NATIVE_TRANSFER_INTENT_DISCRIMINATOR,\n })\n );\n}\n\nexport function getNativeTransferIntentInstructionDataDecoder(): Decoder<NativeTransferIntentInstructionData> {\n return getStructDecoder([\n [\"discriminator\", fixDecoderSize(getBytesDecoder(), 1)],\n [\"amount\", getU64Decoder()],\n [\n \"secp256r1VerifyArgs\",\n getArrayDecoder(getSecp256r1VerifyArgsWithDomainAddressDecoder()),\n ],\n ]);\n}\n\nexport function getNativeTransferIntentInstructionDataCodec(): Codec<\n NativeTransferIntentInstructionDataArgs,\n NativeTransferIntentInstructionData\n> {\n return combineCodec(\n getNativeTransferIntentInstructionDataEncoder(),\n getNativeTransferIntentInstructionDataDecoder()\n );\n}\n\nexport type NativeTransferIntentInstructionExtraArgs = {\n remainingAccounts: Array<{ address: Address; role: number }>;\n};\n\nexport type NativeTransferIntentAsyncInput<\n TAccountSettings extends string = string,\n TAccountSlotHashSysvar extends string = string,\n TAccountInstructionsSysvar extends string = string,\n TAccountSource extends string = string,\n TAccountDestination extends string = string,\n TAccountSystemProgram extends string = string,\n> = {\n settings: Address<TAccountSettings>;\n slotHashSysvar?: Address<TAccountSlotHashSysvar>;\n instructionsSysvar?: Address<TAccountInstructionsSysvar>;\n source?: Address<TAccountSource>;\n destination: Address<TAccountDestination>;\n systemProgram?: Address<TAccountSystemProgram>;\n amount: NativeTransferIntentInstructionDataArgs[\"amount\"];\n secp256r1VerifyArgs: NativeTransferIntentInstructionDataArgs[\"secp256r1VerifyArgs\"];\n remainingAccounts: NativeTransferIntentInstructionExtraArgs[\"remainingAccounts\"];\n};\n\nexport async function getNativeTransferIntentInstructionAsync<\n TAccountSettings extends string,\n TAccountSlotHashSysvar extends string,\n TAccountInstructionsSysvar extends string,\n TAccountSource extends string,\n TAccountDestination extends string,\n TAccountSystemProgram extends string,\n TProgramAddress extends Address = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n>(\n input: NativeTransferIntentAsyncInput<\n TAccountSettings,\n TAccountSlotHashSysvar,\n TAccountInstructionsSysvar,\n TAccountSource,\n TAccountDestination,\n TAccountSystemProgram\n >,\n config?: { programAddress?: TProgramAddress }\n): Promise<\n NativeTransferIntentInstruction<\n TProgramAddress,\n TAccountSettings,\n TAccountSlotHashSysvar,\n TAccountInstructionsSysvar,\n TAccountSource,\n TAccountDestination,\n TAccountSystemProgram\n >\n> {\n // Program address.\n const programAddress = config?.programAddress ?? MULTI_WALLET_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n settings: { value: input.settings ?? null, isWritable: false },\n slotHashSysvar: { value: input.slotHashSysvar ?? null, isWritable: false },\n instructionsSysvar: {\n value: input.instructionsSysvar ?? null,\n isWritable: false,\n },\n source: { value: input.source ?? null, isWritable: true },\n destination: { value: input.destination ?? 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 // Resolver scope.\n const resolverScope = { programAddress, accounts, args };\n\n // Resolve default values.\n if (!accounts.slotHashSysvar.value) {\n accounts.slotHashSysvar.value =\n \"SysvarS1otHashes111111111111111111111111111\" as Address<\"SysvarS1otHashes111111111111111111111111111\">;\n }\n if (!accounts.instructionsSysvar.value) {\n accounts.instructionsSysvar.value =\n \"Sysvar1nstructions1111111111111111111111111\" as Address<\"Sysvar1nstructions1111111111111111111111111\">;\n }\n if (!accounts.source.value) {\n accounts.source.value = await getProgramDerivedAddress({\n programAddress,\n seeds: [\n getBytesEncoder().encode(\n new Uint8Array([\n 109, 117, 108, 116, 105, 95, 119, 97, 108, 108, 101, 116,\n ])\n ),\n getAddressEncoder().encode(expectAddress(accounts.settings.value)),\n getBytesEncoder().encode(new Uint8Array([118, 97, 117, 108, 116])),\n ],\n });\n }\n if (!accounts.systemProgram.value) {\n accounts.systemProgram.value =\n \"11111111111111111111111111111111\" as Address<\"11111111111111111111111111111111\">;\n }\n\n // Remaining accounts.\n const remainingAccounts: AccountMeta[] =\n parseRemainingAccounts(resolverScope);\n\n const getAccountMeta = getAccountMetaFactory(programAddress, \"programId\");\n return Object.freeze({\n accounts: [\n getAccountMeta(accounts.settings),\n getAccountMeta(accounts.slotHashSysvar),\n getAccountMeta(accounts.instructionsSysvar),\n getAccountMeta(accounts.source),\n getAccountMeta(accounts.destination),\n getAccountMeta(accounts.systemProgram),\n ...remainingAccounts,\n ],\n data: getNativeTransferIntentInstructionDataEncoder().encode(\n args as NativeTransferIntentInstructionDataArgs\n ),\n programAddress,\n } as NativeTransferIntentInstruction<\n TProgramAddress,\n TAccountSettings,\n TAccountSlotHashSysvar,\n TAccountInstructionsSysvar,\n TAccountSource,\n TAccountDestination,\n TAccountSystemProgram\n >);\n}\n\nexport type NativeTransferIntentInput<\n TAccountSettings extends string = string,\n TAccountSlotHashSysvar extends string = string,\n TAccountInstructionsSysvar extends string = string,\n TAccountSource extends string = string,\n TAccountDestination extends string = string,\n TAccountSystemProgram extends string = string,\n> = {\n settings: Address<TAccountSettings>;\n slotHashSysvar?: Address<TAccountSlotHashSysvar>;\n instructionsSysvar?: Address<TAccountInstructionsSysvar>;\n source: Address<TAccountSource>;\n destination: Address<TAccountDestination>;\n systemProgram?: Address<TAccountSystemProgram>;\n amount: NativeTransferIntentInstructionDataArgs[\"amount\"];\n secp256r1VerifyArgs: NativeTransferIntentInstructionDataArgs[\"secp256r1VerifyArgs\"];\n remainingAccounts: NativeTransferIntentInstructionExtraArgs[\"remainingAccounts\"];\n};\n\nexport function getNativeTransferIntentInstruction<\n TAccountSettings extends string,\n TAccountSlotHashSysvar extends string,\n TAccountInstructionsSysvar extends string,\n TAccountSource extends string,\n TAccountDestination extends string,\n TAccountSystemProgram extends string,\n TProgramAddress extends Address = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n>(\n input: NativeTransferIntentInput<\n TAccountSettings,\n TAccountSlotHashSysvar,\n TAccountInstructionsSysvar,\n TAccountSource,\n TAccountDestination,\n TAccountSystemProgram\n >,\n config?: { programAddress?: TProgramAddress }\n): NativeTransferIntentInstruction<\n TProgramAddress,\n TAccountSettings,\n TAccountSlotHashSysvar,\n TAccountInstructionsSysvar,\n TAccountSource,\n TAccountDestination,\n TAccountSystemProgram\n> {\n // Program address.\n const programAddress = config?.programAddress ?? MULTI_WALLET_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n settings: { value: input.settings ?? null, isWritable: false },\n slotHashSysvar: { value: input.slotHashSysvar ?? null, isWritable: false },\n instructionsSysvar: {\n value: input.instructionsSysvar ?? null,\n isWritable: false,\n },\n source: { value: input.source ?? null, isWritable: true },\n destination: { value: input.destination ?? 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 // Resolver scope.\n const resolverScope = { programAddress, accounts, args };\n\n // Resolve default values.\n if (!accounts.slotHashSysvar.value) {\n accounts.slotHashSysvar.value =\n \"SysvarS1otHashes111111111111111111111111111\" as Address<\"SysvarS1otHashes111111111111111111111111111\">;\n }\n if (!accounts.instructionsSysvar.value) {\n accounts.instructionsSysvar.value =\n \"Sysvar1nstructions1111111111111111111111111\" as Address<\"Sysvar1nstructions1111111111111111111111111\">;\n }\n if (!accounts.systemProgram.value) {\n accounts.systemProgram.value =\n \"11111111111111111111111111111111\" as Address<\"11111111111111111111111111111111\">;\n }\n\n // Remaining accounts.\n const remainingAccounts: AccountMeta[] =\n parseRemainingAccounts(resolverScope);\n\n const getAccountMeta = getAccountMetaFactory(programAddress, \"programId\");\n return Object.freeze({\n accounts: [\n getAccountMeta(accounts.settings),\n getAccountMeta(accounts.slotHashSysvar),\n getAccountMeta(accounts.instructionsSysvar),\n getAccountMeta(accounts.source),\n getAccountMeta(accounts.destination),\n getAccountMeta(accounts.systemProgram),\n ...remainingAccounts,\n ],\n data: getNativeTransferIntentInstructionDataEncoder().encode(\n args as NativeTransferIntentInstructionDataArgs\n ),\n programAddress,\n } as NativeTransferIntentInstruction<\n TProgramAddress,\n TAccountSettings,\n TAccountSlotHashSysvar,\n TAccountInstructionsSysvar,\n TAccountSource,\n TAccountDestination,\n TAccountSystemProgram\n >);\n}\n\nexport type ParsedNativeTransferIntentInstruction<\n TProgram extends string = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n settings: TAccountMetas[0];\n slotHashSysvar?: TAccountMetas[1] | undefined;\n instructionsSysvar: TAccountMetas[2];\n source: TAccountMetas[3];\n destination: TAccountMetas[4];\n systemProgram: TAccountMetas[5];\n };\n data: NativeTransferIntentInstructionData;\n};\n\nexport function parseNativeTransferIntentInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>\n): ParsedNativeTransferIntentInstruction<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 const getNextOptionalAccount = () => {\n const accountMeta = getNextAccount();\n return accountMeta.address === MULTI_WALLET_PROGRAM_ADDRESS\n ? undefined\n : accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n settings: getNextAccount(),\n slotHashSysvar: getNextOptionalAccount(),\n instructionsSysvar: getNextAccount(),\n source: getNextAccount(),\n destination: getNextAccount(),\n systemProgram: getNextAccount(),\n },\n data: getNativeTransferIntentInstructionDataDecoder().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 getArrayDecoder,\n getArrayEncoder,\n getBytesDecoder,\n getBytesEncoder,\n getStructDecoder,\n getStructEncoder,\n getU64Decoder,\n getU64Encoder,\n transformEncoder,\n type AccountMeta,\n type AccountSignerMeta,\n type Address,\n type Codec,\n type Decoder,\n type Encoder,\n type Instruction,\n type InstructionWithAccounts,\n type InstructionWithData,\n type ReadonlyAccount,\n type ReadonlyUint8Array,\n type TransactionSigner,\n type WritableAccount,\n type WritableSignerAccount,\n} from \"gill\";\nimport { parseRemainingAccounts } from \"../../hooked\";\nimport { MULTI_WALLET_PROGRAM_ADDRESS } from \"../programs\";\nimport { getAccountMetaFactory, type ResolvedAccount } from \"../shared\";\nimport {\n getProofArgsDecoder,\n getProofArgsEncoder,\n getSecp256r1VerifyArgsWithDomainAddressDecoder,\n getSecp256r1VerifyArgsWithDomainAddressEncoder,\n getSettingsReadonlyArgsDecoder,\n getSettingsReadonlyArgsEncoder,\n type ProofArgs,\n type ProofArgsArgs,\n type Secp256r1VerifyArgsWithDomainAddress,\n type Secp256r1VerifyArgsWithDomainAddressArgs,\n type SettingsReadonlyArgs,\n type SettingsReadonlyArgsArgs,\n} from \"../types\";\n\nexport const NATIVE_TRANSFER_INTENT_COMPRESSED_DISCRIMINATOR = new Uint8Array([\n 27,\n]);\n\nexport function getNativeTransferIntentCompressedDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 1).encode(\n NATIVE_TRANSFER_INTENT_COMPRESSED_DISCRIMINATOR\n );\n}\n\nexport type NativeTransferIntentCompressedInstruction<\n TProgram extends string = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n TAccountPayer extends string | AccountMeta<string> = string,\n TAccountSlotHashSysvar extends\n | string\n | AccountMeta<string> = \"SysvarS1otHashes111111111111111111111111111\",\n TAccountInstructionsSysvar extends\n | string\n | AccountMeta<string> = \"Sysvar1nstructions1111111111111111111111111\",\n TAccountSource extends string | AccountMeta<string> = string,\n TAccountDestination extends string | AccountMeta<string> = string,\n TAccountSystemProgram extends\n | string\n | AccountMeta<string> = \"11111111111111111111111111111111\",\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountPayer extends string\n ? WritableSignerAccount<TAccountPayer> &\n AccountSignerMeta<TAccountPayer>\n : TAccountPayer,\n TAccountSlotHashSysvar extends string\n ? ReadonlyAccount<TAccountSlotHashSysvar>\n : TAccountSlotHashSysvar,\n TAccountInstructionsSysvar extends string\n ? ReadonlyAccount<TAccountInstructionsSysvar>\n : TAccountInstructionsSysvar,\n TAccountSource extends string\n ? WritableAccount<TAccountSource>\n : TAccountSource,\n TAccountDestination extends string\n ? WritableAccount<TAccountDestination>\n : TAccountDestination,\n TAccountSystemProgram extends string\n ? ReadonlyAccount<TAccountSystemProgram>\n : TAccountSystemProgram,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type NativeTransferIntentCompressedInstructionData = {\n discriminator: ReadonlyUint8Array;\n amount: bigint;\n secp256r1VerifyArgs: Array<Secp256r1VerifyArgsWithDomainAddress>;\n settingsReadonlyArgs: SettingsReadonlyArgs;\n compressedProofArgs: ProofArgs;\n};\n\nexport type NativeTransferIntentCompressedInstructionDataArgs = {\n amount: number | bigint;\n secp256r1VerifyArgs: Array<Secp256r1VerifyArgsWithDomainAddressArgs>;\n settingsReadonlyArgs: SettingsReadonlyArgsArgs;\n compressedProofArgs: ProofArgsArgs;\n};\n\nexport function getNativeTransferIntentCompressedInstructionDataEncoder(): Encoder<NativeTransferIntentCompressedInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n [\"discriminator\", fixEncoderSize(getBytesEncoder(), 1)],\n [\"amount\", getU64Encoder()],\n [\n \"secp256r1VerifyArgs\",\n getArrayEncoder(getSecp256r1VerifyArgsWithDomainAddressEncoder()),\n ],\n [\"settingsReadonlyArgs\", getSettingsReadonlyArgsEncoder()],\n [\"compressedProofArgs\", getProofArgsEncoder()],\n ]),\n (value) => ({\n ...value,\n discriminator: NATIVE_TRANSFER_INTENT_COMPRESSED_DISCRIMINATOR,\n })\n );\n}\n\nexport function getNativeTransferIntentCompressedInstructionDataDecoder(): Decoder<NativeTransferIntentCompressedInstructionData> {\n return getStructDecoder([\n [\"discriminator\", fixDecoderSize(getBytesDecoder(), 1)],\n [\"amount\", getU64Decoder()],\n [\n \"secp256r1VerifyArgs\",\n getArrayDecoder(getSecp256r1VerifyArgsWithDomainAddressDecoder()),\n ],\n [\"settingsReadonlyArgs\", getSettingsReadonlyArgsDecoder()],\n [\"compressedProofArgs\", getProofArgsDecoder()],\n ]);\n}\n\nexport function getNativeTransferIntentCompressedInstructionDataCodec(): Codec<\n NativeTransferIntentCompressedInstructionDataArgs,\n NativeTransferIntentCompressedInstructionData\n> {\n return combineCodec(\n getNativeTransferIntentCompressedInstructionDataEncoder(),\n getNativeTransferIntentCompressedInstructionDataDecoder()\n );\n}\n\nexport type NativeTransferIntentCompressedInstructionExtraArgs = {\n remainingAccounts: Array<{ address: Address; role: number }>;\n};\n\nexport type NativeTransferIntentCompressedInput<\n TAccountPayer extends string = string,\n TAccountSlotHashSysvar extends string = string,\n TAccountInstructionsSysvar extends string = string,\n TAccountSource extends string = string,\n TAccountDestination extends string = string,\n TAccountSystemProgram extends string = string,\n> = {\n payer: TransactionSigner<TAccountPayer>;\n slotHashSysvar?: Address<TAccountSlotHashSysvar>;\n instructionsSysvar?: Address<TAccountInstructionsSysvar>;\n source: Address<TAccountSource>;\n destination: Address<TAccountDestination>;\n systemProgram?: Address<TAccountSystemProgram>;\n amount: NativeTransferIntentCompressedInstructionDataArgs[\"amount\"];\n secp256r1VerifyArgs: NativeTransferIntentCompressedInstructionDataArgs[\"secp256r1VerifyArgs\"];\n settingsReadonlyArgs: NativeTransferIntentCompressedInstructionDataArgs[\"settingsReadonlyArgs\"];\n compressedProofArgs: NativeTransferIntentCompressedInstructionDataArgs[\"compressedProofArgs\"];\n remainingAccounts: NativeTransferIntentCompressedInstructionExtraArgs[\"remainingAccounts\"];\n};\n\nexport function getNativeTransferIntentCompressedInstruction<\n TAccountPayer extends string,\n TAccountSlotHashSysvar extends string,\n TAccountInstructionsSysvar extends string,\n TAccountSource extends string,\n TAccountDestination extends string,\n TAccountSystemProgram extends string,\n TProgramAddress extends Address = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n>(\n input: NativeTransferIntentCompressedInput<\n TAccountPayer,\n TAccountSlotHashSysvar,\n TAccountInstructionsSysvar,\n TAccountSource,\n TAccountDestination,\n TAccountSystemProgram\n >,\n config?: { programAddress?: TProgramAddress }\n): NativeTransferIntentCompressedInstruction<\n TProgramAddress,\n TAccountPayer,\n TAccountSlotHashSysvar,\n TAccountInstructionsSysvar,\n TAccountSource,\n TAccountDestination,\n TAccountSystemProgram\n> {\n // Program address.\n const programAddress = config?.programAddress ?? MULTI_WALLET_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n payer: { value: input.payer ?? null, isWritable: true },\n slotHashSysvar: { value: input.slotHashSysvar ?? null, isWritable: false },\n instructionsSysvar: {\n value: input.instructionsSysvar ?? null,\n isWritable: false,\n },\n source: { value: input.source ?? null, isWritable: true },\n destination: { value: input.destination ?? 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 // Resolver scope.\n const resolverScope = { programAddress, accounts, args };\n\n // Resolve default values.\n if (!accounts.slotHashSysvar.value) {\n accounts.slotHashSysvar.value =\n \"SysvarS1otHashes111111111111111111111111111\" as Address<\"SysvarS1otHashes111111111111111111111111111\">;\n }\n if (!accounts.instructionsSysvar.value) {\n accounts.instructionsSysvar.value =\n \"Sysvar1nstructions1111111111111111111111111\" as Address<\"Sysvar1nstructions1111111111111111111111111\">;\n }\n if (!accounts.systemProgram.value) {\n accounts.systemProgram.value =\n \"11111111111111111111111111111111\" as Address<\"11111111111111111111111111111111\">;\n }\n\n // Remaining accounts.\n const remainingAccounts: AccountMeta[] =\n parseRemainingAccounts(resolverScope);\n\n const getAccountMeta = getAccountMetaFactory(programAddress, \"programId\");\n return Object.freeze({\n accounts: [\n getAccountMeta(accounts.payer),\n getAccountMeta(accounts.slotHashSysvar),\n getAccountMeta(accounts.instructionsSysvar),\n getAccountMeta(accounts.source),\n getAccountMeta(accounts.destination),\n getAccountMeta(accounts.systemProgram),\n ...remainingAccounts,\n ],\n data: getNativeTransferIntentCompressedInstructionDataEncoder().encode(\n args as NativeTransferIntentCompressedInstructionDataArgs\n ),\n programAddress,\n } as NativeTransferIntentCompressedInstruction<\n TProgramAddress,\n TAccountPayer,\n TAccountSlotHashSysvar,\n TAccountInstructionsSysvar,\n TAccountSource,\n TAccountDestination,\n TAccountSystemProgram\n >);\n}\n\nexport type ParsedNativeTransferIntentCompressedInstruction<\n TProgram extends string = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n payer: TAccountMetas[0];\n slotHashSysvar?: TAccountMetas[1] | undefined;\n instructionsSysvar: TAccountMetas[2];\n source: TAccountMetas[3];\n destination: TAccountMetas[4];\n systemProgram: TAccountMetas[5];\n };\n data: NativeTransferIntentCompressedInstructionData;\n};\n\nexport function parseNativeTransferIntentCompressedInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>\n): ParsedNativeTransferIntentCompressedInstruction<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 const getNextOptionalAccount = () => {\n const accountMeta = getNextAccount();\n return accountMeta.address === MULTI_WALLET_PROGRAM_ADDRESS\n ? undefined\n : accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n payer: getNextAccount(),\n slotHashSysvar: getNextOptionalAccount(),\n instructionsSysvar: getNextAccount(),\n source: getNextAccount(),\n destination: getNextAccount(),\n systemProgram: getNextAccount(),\n },\n data: getNativeTransferIntentCompressedInstructionDataDecoder().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 getU64Decoder,\n getU64Encoder,\n transformEncoder,\n type AccountMeta,\n type Address,\n type Codec,\n type Decoder,\n type Encoder,\n type Instruction,\n type InstructionWithAccounts,\n type InstructionWithData,\n type ReadonlyAccount,\n type ReadonlyUint8Array,\n type WritableAccount,\n} from \"gill\";\nimport { parseRemainingAccounts } from \"../../hooked\";\nimport { MULTI_WALLET_PROGRAM_ADDRESS } from \"../programs\";\nimport {\n expectAddress,\n getAccountMetaFactory,\n type ResolvedAccount,\n} from \"../shared\";\nimport {\n getSecp256r1VerifyArgsWithDomainAddressDecoder,\n getSecp256r1VerifyArgsWithDomainAddressEncoder,\n type Secp256r1VerifyArgsWithDomainAddress,\n type Secp256r1VerifyArgsWithDomainAddressArgs,\n} from \"../types\";\n\nexport const TOKEN_TRANSFER_INTENT_DISCRIMINATOR = new Uint8Array([30]);\n\nexport function getTokenTransferIntentDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 1).encode(\n TOKEN_TRANSFER_INTENT_DISCRIMINATOR\n );\n}\n\nexport type TokenTransferIntentInstruction<\n TProgram extends string = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n TAccountSettings extends string | AccountMeta<string> = string,\n TAccountSlotHashSysvar extends\n | string\n | AccountMeta<string> = \"SysvarS1otHashes111111111111111111111111111\",\n TAccountInstructionsSysvar extends\n | string\n | AccountMeta<string> = \"Sysvar1nstructions1111111111111111111111111\",\n TAccountSource extends string | AccountMeta<string> = string,\n TAccountSourceTokenAccount extends string | AccountMeta<string> = string,\n TAccountDestination extends string | AccountMeta<string> = string,\n TAccountDestinationTokenAccount extends string | AccountMeta<string> = string,\n TAccountTokenProgram extends\n | string\n | AccountMeta<string> = \"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA\",\n TAccountMint extends string | AccountMeta<string> = string,\n TAccountSystemProgram extends\n | string\n | AccountMeta<string> = \"11111111111111111111111111111111\",\n TAccountAssociatedTokenProgram extends\n | string\n | AccountMeta<string> = \"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL\",\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountSettings extends string\n ? ReadonlyAccount<TAccountSettings>\n : TAccountSettings,\n TAccountSlotHashSysvar extends string\n ? ReadonlyAccount<TAccountSlotHashSysvar>\n : TAccountSlotHashSysvar,\n TAccountInstructionsSysvar extends string\n ? ReadonlyAccount<TAccountInstructionsSysvar>\n : TAccountInstructionsSysvar,\n TAccountSource extends string\n ? WritableAccount<TAccountSource>\n : TAccountSource,\n TAccountSourceTokenAccount extends string\n ? WritableAccount<TAccountSourceTokenAccount>\n : TAccountSourceTokenAccount,\n TAccountDestination extends string\n ? ReadonlyAccount<TAccountDestination>\n : TAccountDestination,\n TAccountDestinationTokenAccount extends string\n ? WritableAccount<TAccountDestinationTokenAccount>\n : TAccountDestinationTokenAccount,\n TAccountTokenProgram extends string\n ? ReadonlyAccount<TAccountTokenProgram>\n : TAccountTokenProgram,\n TAccountMint extends string\n ? ReadonlyAccount<TAccountMint>\n : TAccountMint,\n TAccountSystemProgram extends string\n ? ReadonlyAccount<TAccountSystemProgram>\n : TAccountSystemProgram,\n TAccountAssociatedTokenProgram extends string\n ? ReadonlyAccount<TAccountAssociatedTokenProgram>\n : TAccountAssociatedTokenProgram,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type TokenTransferIntentInstructionData = {\n discriminator: ReadonlyUint8Array;\n amount: bigint;\n secp256r1VerifyArgs: Array<Secp256r1VerifyArgsWithDomainAddress>;\n};\n\nexport type TokenTransferIntentInstructionDataArgs = {\n amount: number | bigint;\n secp256r1VerifyArgs: Array<Secp256r1VerifyArgsWithDomainAddressArgs>;\n};\n\nexport function getTokenTransferIntentInstructionDataEncoder(): Encoder<TokenTransferIntentInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n [\"discriminator\", fixEncoderSize(getBytesEncoder(), 1)],\n [\"amount\", getU64Encoder()],\n [\n \"secp256r1VerifyArgs\",\n getArrayEncoder(getSecp256r1VerifyArgsWithDomainAddressEncoder()),\n ],\n ]),\n (value) => ({\n ...value,\n discriminator: TOKEN_TRANSFER_INTENT_DISCRIMINATOR,\n })\n );\n}\n\nexport function getTokenTransferIntentInstructionDataDecoder(): Decoder<TokenTransferIntentInstructionData> {\n return getStructDecoder([\n [\"discriminator\", fixDecoderSize(getBytesDecoder(), 1)],\n [\"amount\", getU64Decoder()],\n [\n \"secp256r1VerifyArgs\",\n getArrayDecoder(getSecp256r1VerifyArgsWithDomainAddressDecoder()),\n ],\n ]);\n}\n\nexport function getTokenTransferIntentInstructionDataCodec(): Codec<\n TokenTransferIntentInstructionDataArgs,\n TokenTransferIntentInstructionData\n> {\n return combineCodec(\n getTokenTransferIntentInstructionDataEncoder(),\n getTokenTransferIntentInstructionDataDecoder()\n );\n}\n\nexport type TokenTransferIntentInstructionExtraArgs = {\n remainingAccounts: Array<{ address: Address; role: number }>;\n};\n\nexport type TokenTransferIntentAsyncInput<\n TAccountSettings extends string = string,\n TAccountSlotHashSysvar extends string = string,\n TAccountInstructionsSysvar extends string = string,\n TAccountSource extends string = string,\n TAccountSourceTokenAccount extends string = string,\n TAccountDestination extends string = string,\n TAccountDestinationTokenAccount extends string = string,\n TAccountTokenProgram extends string = string,\n TAccountMint extends string = string,\n TAccountSystemProgram extends string = string,\n TAccountAssociatedTokenProgram extends string = string,\n> = {\n settings: Address<TAccountSettings>;\n slotHashSysvar?: Address<TAccountSlotHashSysvar>;\n instructionsSysvar?: Address<TAccountInstructionsSysvar>;\n source?: Address<TAccountSource>;\n sourceTokenAccount?: Address<TAccountSourceTokenAccount>;\n destination: Address<TAccountDestination>;\n destinationTokenAccount?: Address<TAccountDestinationTokenAccount>;\n tokenProgram?: Address<TAccountTokenProgram>;\n mint: Address<TAccountMint>;\n systemProgram?: Address<TAccountSystemProgram>;\n associatedTokenProgram?: Address<TAccountAssociatedTokenProgram>;\n amount: TokenTransferIntentInstructionDataArgs[\"amount\"];\n secp256r1VerifyArgs: TokenTransferIntentInstructionDataArgs[\"secp256r1VerifyArgs\"];\n remainingAccounts: TokenTransferIntentInstructionExtraArgs[\"remainingAccounts\"];\n};\n\nexport async function getTokenTransferIntentInstructionAsync<\n TAccountSettings extends string,\n TAccountSlotHashSysvar extends string,\n TAccountInstructionsSysvar extends string,\n TAccountSource extends string,\n TAccountSourceTokenAccount extends string,\n TAccountDestination extends string,\n TAccountDestinationTokenAccount extends string,\n TAccountTokenProgram extends string,\n TAccountMint extends string,\n TAccountSystemProgram extends string,\n TAccountAssociatedTokenProgram extends string,\n TProgramAddress extends Address = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n>(\n input: TokenTransferIntentAsyncInput<\n TAccountSettings,\n TAccountSlotHashSysvar,\n TAccountInstructionsSysvar,\n TAccountSource,\n TAccountSourceTokenAccount,\n TAccountDestination,\n TAccountDestinationTokenAccount,\n TAccountTokenProgram,\n TAccountMint,\n TAccountSystemProgram,\n TAccountAssociatedTokenProgram\n >,\n config?: { programAddress?: TProgramAddress }\n): Promise<\n TokenTransferIntentInstruction<\n TProgramAddress,\n TAccountSettings,\n TAccountSlotHashSysvar,\n TAccountInstructionsSysvar,\n TAccountSource,\n TAccountSourceTokenAccount,\n TAccountDestination,\n TAccountDestinationTokenAccount,\n TAccountTokenProgram,\n TAccountMint,\n TAccountSystemProgram,\n TAccountAssociatedTokenProgram\n >\n> {\n // Program address.\n const programAddress = config?.programAddress ?? MULTI_WALLET_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n settings: { value: input.settings ?? null, isWritable: false },\n slotHashSysvar: { value: input.slotHashSysvar ?? null, isWritable: false },\n instructionsSysvar: {\n value: input.instructionsSysvar ?? null,\n isWritable: false,\n },\n source: { value: input.source ?? null, isWritable: true },\n sourceTokenAccount: {\n value: input.sourceTokenAccount ?? null,\n isWritable: true,\n },\n destination: { value: input.destination ?? null, isWritable: false },\n destinationTokenAccount: {\n value: input.destinationTokenAccount ?? null,\n isWritable: true,\n },\n tokenProgram: { value: input.tokenProgram ?? null, isWritable: false },\n mint: { value: input.mint ?? null, isWritable: false },\n systemProgram: { value: input.systemProgram ?? null, isWritable: false },\n associatedTokenProgram: {\n value: input.associatedTokenProgram ?? null,\n isWritable: false,\n },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolver scope.\n const resolverScope = { programAddress, accounts, args };\n\n // Resolve default values.\n if (!accounts.slotHashSysvar.value) {\n accounts.slotHashSysvar.value =\n \"SysvarS1otHashes111111111111111111111111111\" as Address<\"SysvarS1otHashes111111111111111111111111111\">;\n }\n if (!accounts.instructionsSysvar.value) {\n accounts.instructionsSysvar.value =\n \"Sysvar1nstructions1111111111111111111111111\" as Address<\"Sysvar1nstructions1111111111111111111111111\">;\n }\n if (!accounts.source.value) {\n accounts.source.value = await getProgramDerivedAddress({\n programAddress,\n seeds: [\n getBytesEncoder().encode(\n new Uint8Array([\n 109, 117, 108, 116, 105, 95, 119, 97, 108, 108, 101, 116,\n ])\n ),\n getAddressEncoder().encode(expectAddress(accounts.settings.value)),\n getBytesEncoder().encode(new Uint8Array([118, 97, 117, 108, 116])),\n ],\n });\n }\n if (!accounts.tokenProgram.value) {\n accounts.tokenProgram.value =\n \"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA\" as Address<\"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA\">;\n }\n if (!accounts.sourceTokenAccount.value) {\n accounts.sourceTokenAccount.value = await getProgramDerivedAddress({\n programAddress:\n \"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL\" as Address<\"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL\">,\n seeds: [\n getAddressEncoder().encode(expectAddress(accounts.source.value)),\n getAddressEncoder().encode(expectAddress(accounts.tokenProgram.value)),\n getAddressEncoder().encode(expectAddress(accounts.mint.value)),\n ],\n });\n }\n if (!accounts.destinationTokenAccount.value) {\n accounts.destinationTokenAccount.value = await getProgramDerivedAddress({\n programAddress:\n \"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL\" as Address<\"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL\">,\n seeds: [\n getAddressEncoder().encode(expectAddress(accounts.destination.value)),\n getAddressEncoder().encode(expectAddress(accounts.tokenProgram.value)),\n getAddressEncoder().encode(expectAddress(accounts.mint.value)),\n ],\n });\n }\n if (!accounts.systemProgram.value) {\n accounts.systemProgram.value =\n \"11111111111111111111111111111111\" as Address<\"11111111111111111111111111111111\">;\n }\n if (!accounts.associatedTokenProgram.value) {\n accounts.associatedTokenProgram.value =\n \"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL\" as Address<\"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL\">;\n }\n\n // Remaining accounts.\n const remainingAccounts: AccountMeta[] =\n parseRemainingAccounts(resolverScope);\n\n const getAccountMeta = getAccountMetaFactory(programAddress, \"programId\");\n return Object.freeze({\n accounts: [\n getAccountMeta(accounts.settings),\n getAccountMeta(accounts.slotHashSysvar),\n getAccountMeta(accounts.instructionsSysvar),\n getAccountMeta(accounts.source),\n getAccountMeta(accounts.sourceTokenAccount),\n getAccountMeta(accounts.destination),\n getAccountMeta(accounts.destinationTokenAccount),\n getAccountMeta(accounts.tokenProgram),\n getAccountMeta(accounts.mint),\n getAccountMeta(accounts.systemProgram),\n getAccountMeta(accounts.associatedTokenProgram),\n ...remainingAccounts,\n ],\n data: getTokenTransferIntentInstructionDataEncoder().encode(\n args as TokenTransferIntentInstructionDataArgs\n ),\n programAddress,\n } as TokenTransferIntentInstruction<\n TProgramAddress,\n TAccountSettings,\n TAccountSlotHashSysvar,\n TAccountInstructionsSysvar,\n TAccountSource,\n TAccountSourceTokenAccount,\n TAccountDestination,\n TAccountDestinationTokenAccount,\n TAccountTokenProgram,\n TAccountMint,\n TAccountSystemProgram,\n TAccountAssociatedTokenProgram\n >);\n}\n\nexport type TokenTransferIntentInput<\n TAccountSettings extends string = string,\n TAccountSlotHashSysvar extends string = string,\n TAccountInstructionsSysvar extends string = string,\n TAccountSource extends string = string,\n TAccountSourceTokenAccount extends string = string,\n TAccountDestination extends string = string,\n TAccountDestinationTokenAccount extends string = string,\n TAccountTokenProgram extends string = string,\n TAccountMint extends string = string,\n TAccountSystemProgram extends string = string,\n TAccountAssociatedTokenProgram extends string = string,\n> = {\n settings: Address<TAccountSettings>;\n slotHashSysvar?: Address<TAccountSlotHashSysvar>;\n instructionsSysvar?: Address<TAccountInstructionsSysvar>;\n source: Address<TAccountSource>;\n sourceTokenAccount: Address<TAccountSourceTokenAccount>;\n destination: Address<TAccountDestination>;\n destinationTokenAccount: Address<TAccountDestinationTokenAccount>;\n tokenProgram?: Address<TAccountTokenProgram>;\n mint: Address<TAccountMint>;\n systemProgram?: Address<TAccountSystemProgram>;\n associatedTokenProgram?: Address<TAccountAssociatedTokenProgram>;\n amount: TokenTransferIntentInstructionDataArgs[\"amount\"];\n secp256r1VerifyArgs: TokenTransferIntentInstructionDataArgs[\"secp256r1VerifyArgs\"];\n remainingAccounts: TokenTransferIntentInstructionExtraArgs[\"remainingAccounts\"];\n};\n\nexport function getTokenTransferIntentInstruction<\n TAccountSettings extends string,\n TAccountSlotHashSysvar extends string,\n TAccountInstructionsSysvar extends string,\n TAccountSource extends string,\n TAccountSourceTokenAccount extends string,\n TAccountDestination extends string,\n TAccountDestinationTokenAccount extends string,\n TAccountTokenProgram extends string,\n TAccountMint extends string,\n TAccountSystemProgram extends string,\n TAccountAssociatedTokenProgram extends string,\n TProgramAddress extends Address = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n>(\n input: TokenTransferIntentInput<\n TAccountSettings,\n TAccountSlotHashSysvar,\n TAccountInstructionsSysvar,\n TAccountSource,\n TAccountSourceTokenAccount,\n TAccountDestination,\n TAccountDestinationTokenAccount,\n TAccountTokenProgram,\n TAccountMint,\n TAccountSystemProgram,\n TAccountAssociatedTokenProgram\n >,\n config?: { programAddress?: TProgramAddress }\n): TokenTransferIntentInstruction<\n TProgramAddress,\n TAccountSettings,\n TAccountSlotHashSysvar,\n TAccountInstructionsSysvar,\n TAccountSource,\n TAccountSourceTokenAccount,\n TAccountDestination,\n TAccountDestinationTokenAccount,\n TAccountTokenProgram,\n TAccountMint,\n TAccountSystemProgram,\n TAccountAssociatedTokenProgram\n> {\n // Program address.\n const programAddress = config?.programAddress ?? MULTI_WALLET_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n settings: { value: input.settings ?? null, isWritable: false },\n slotHashSysvar: { value: input.slotHashSysvar ?? null, isWritable: false },\n instructionsSysvar: {\n value: input.instructionsSysvar ?? null,\n isWritable: false,\n },\n source: { value: input.source ?? null, isWritable: true },\n sourceTokenAccount: {\n value: input.sourceTokenAccount ?? null,\n isWritable: true,\n },\n destination: { value: input.destination ?? null, isWritable: false },\n destinationTokenAccount: {\n value: input.destinationTokenAccount ?? null,\n isWritable: true,\n },\n tokenProgram: { value: input.tokenProgram ?? null, isWritable: false },\n mint: { value: input.mint ?? null, isWritable: false },\n systemProgram: { value: input.systemProgram ?? null, isWritable: false },\n associatedTokenProgram: {\n value: input.associatedTokenProgram ?? null,\n isWritable: false,\n },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolver scope.\n const resolverScope = { programAddress, accounts, args };\n\n // Resolve default values.\n if (!accounts.slotHashSysvar.value) {\n accounts.slotHashSysvar.value =\n \"SysvarS1otHashes111111111111111111111111111\" as Address<\"SysvarS1otHashes111111111111111111111111111\">;\n }\n if (!accounts.instructionsSysvar.value) {\n accounts.instructionsSysvar.value =\n \"Sysvar1nstructions1111111111111111111111111\" as Address<\"Sysvar1nstructions1111111111111111111111111\">;\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.associatedTokenProgram.value) {\n accounts.associatedTokenProgram.value =\n \"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL\" as Address<\"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL\">;\n }\n\n // Remaining accounts.\n const remainingAccounts: AccountMeta[] =\n parseRemainingAccounts(resolverScope);\n\n const getAccountMeta = getAccountMetaFactory(programAddress, \"programId\");\n return Object.freeze({\n accounts: [\n getAccountMeta(accounts.settings),\n getAccountMeta(accounts.slotHashSysvar),\n getAccountMeta(accounts.instructionsSysvar),\n getAccountMeta(accounts.source),\n getAccountMeta(accounts.sourceTokenAccount),\n getAccountMeta(accounts.destination),\n getAccountMeta(accounts.destinationTokenAccount),\n getAccountMeta(accounts.tokenProgram),\n getAccountMeta(accounts.mint),\n getAccountMeta(accounts.systemProgram),\n getAccountMeta(accounts.associatedTokenProgram),\n ...remainingAccounts,\n ],\n data: getTokenTransferIntentInstructionDataEncoder().encode(\n args as TokenTransferIntentInstructionDataArgs\n ),\n programAddress,\n } as TokenTransferIntentInstruction<\n TProgramAddress,\n TAccountSettings,\n TAccountSlotHashSysvar,\n TAccountInstructionsSysvar,\n TAccountSource,\n TAccountSourceTokenAccount,\n TAccountDestination,\n TAccountDestinationTokenAccount,\n TAccountTokenProgram,\n TAccountMint,\n TAccountSystemProgram,\n TAccountAssociatedTokenProgram\n >);\n}\n\nexport type ParsedTokenTransferIntentInstruction<\n TProgram extends string = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n settings: TAccountMetas[0];\n slotHashSysvar?: TAccountMetas[1] | undefined;\n instructionsSysvar: TAccountMetas[2];\n source: TAccountMetas[3];\n sourceTokenAccount: TAccountMetas[4];\n destination: TAccountMetas[5];\n destinationTokenAccount: TAccountMetas[6];\n tokenProgram: TAccountMetas[7];\n mint: TAccountMetas[8];\n systemProgram: TAccountMetas[9];\n associatedTokenProgram: TAccountMetas[10];\n };\n data: TokenTransferIntentInstructionData;\n};\n\nexport function parseTokenTransferIntentInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>\n): ParsedTokenTransferIntentInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 11) {\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 const getNextOptionalAccount = () => {\n const accountMeta = getNextAccount();\n return accountMeta.address === MULTI_WALLET_PROGRAM_ADDRESS\n ? undefined\n : accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n settings: getNextAccount(),\n slotHashSysvar: getNextOptionalAccount(),\n instructionsSysvar: getNextAccount(),\n source: getNextAccount(),\n sourceTokenAccount: getNextAccount(),\n destination: getNextAccount(),\n destinationTokenAccount: getNextAccount(),\n tokenProgram: getNextAccount(),\n mint: getNextAccount(),\n systemProgram: getNextAccount(),\n associatedTokenProgram: getNextAccount(),\n },\n data: getTokenTransferIntentInstructionDataDecoder().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 getU64Decoder,\n getU64Encoder,\n transformEncoder,\n type AccountMeta,\n type AccountSignerMeta,\n type Address,\n type Codec,\n type Decoder,\n type Encoder,\n type Instruction,\n type InstructionWithAccounts,\n type InstructionWithData,\n type ReadonlyAccount,\n type ReadonlyUint8Array,\n type TransactionSigner,\n type WritableAccount,\n type WritableSignerAccount,\n} from \"gill\";\nimport { parseRemainingAccounts } from \"../../hooked\";\nimport { MULTI_WALLET_PROGRAM_ADDRESS } from \"../programs\";\nimport {\n expectAddress,\n getAccountMetaFactory,\n type ResolvedAccount,\n} from \"../shared\";\nimport {\n getProofArgsDecoder,\n getProofArgsEncoder,\n getSecp256r1VerifyArgsWithDomainAddressDecoder,\n getSecp256r1VerifyArgsWithDomainAddressEncoder,\n getSettingsReadonlyArgsDecoder,\n getSettingsReadonlyArgsEncoder,\n type ProofArgs,\n type ProofArgsArgs,\n type Secp256r1VerifyArgsWithDomainAddress,\n type Secp256r1VerifyArgsWithDomainAddressArgs,\n type SettingsReadonlyArgs,\n type SettingsReadonlyArgsArgs,\n} from \"../types\";\n\nexport const TOKEN_TRANSFER_INTENT_COMPRESSED_DISCRIMINATOR = new Uint8Array([\n 28,\n]);\n\nexport function getTokenTransferIntentCompressedDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 1).encode(\n TOKEN_TRANSFER_INTENT_COMPRESSED_DISCRIMINATOR\n );\n}\n\nexport type TokenTransferIntentCompressedInstruction<\n TProgram extends string = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n TAccountPayer extends string | AccountMeta<string> = string,\n TAccountSlotHashSysvar extends\n | string\n | AccountMeta<string> = \"SysvarS1otHashes111111111111111111111111111\",\n TAccountInstructionsSysvar extends\n | string\n | AccountMeta<string> = \"Sysvar1nstructions1111111111111111111111111\",\n TAccountSource extends string | AccountMeta<string> = string,\n TAccountSourceTokenAccount extends string | AccountMeta<string> = string,\n TAccountDestination extends string | AccountMeta<string> = string,\n TAccountDestinationTokenAccount extends string | AccountMeta<string> = string,\n TAccountTokenProgram extends\n | string\n | AccountMeta<string> = \"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA\",\n TAccountMint extends string | AccountMeta<string> = string,\n TAccountSystemProgram extends\n | string\n | AccountMeta<string> = \"11111111111111111111111111111111\",\n TAccountAssociatedTokenProgram extends\n | string\n | AccountMeta<string> = \"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL\",\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountPayer extends string\n ? WritableSignerAccount<TAccountPayer> &\n AccountSignerMeta<TAccountPayer>\n : TAccountPayer,\n TAccountSlotHashSysvar extends string\n ? ReadonlyAccount<TAccountSlotHashSysvar>\n : TAccountSlotHashSysvar,\n TAccountInstructionsSysvar extends string\n ? ReadonlyAccount<TAccountInstructionsSysvar>\n : TAccountInstructionsSysvar,\n TAccountSource extends string\n ? WritableAccount<TAccountSource>\n : TAccountSource,\n TAccountSourceTokenAccount extends string\n ? WritableAccount<TAccountSourceTokenAccount>\n : TAccountSourceTokenAccount,\n TAccountDestination extends string\n ? ReadonlyAccount<TAccountDestination>\n : TAccountDestination,\n TAccountDestinationTokenAccount extends string\n ? WritableAccount<TAccountDestinationTokenAccount>\n : TAccountDestinationTokenAccount,\n TAccountTokenProgram extends string\n ? ReadonlyAccount<TAccountTokenProgram>\n : TAccountTokenProgram,\n TAccountMint extends string\n ? ReadonlyAccount<TAccountMint>\n : TAccountMint,\n TAccountSystemProgram extends string\n ? ReadonlyAccount<TAccountSystemProgram>\n : TAccountSystemProgram,\n TAccountAssociatedTokenProgram extends string\n ? ReadonlyAccount<TAccountAssociatedTokenProgram>\n : TAccountAssociatedTokenProgram,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type TokenTransferIntentCompressedInstructionData = {\n discriminator: ReadonlyUint8Array;\n amount: bigint;\n secp256r1VerifyArgs: Array<Secp256r1VerifyArgsWithDomainAddress>;\n settingsReadonlyArgs: SettingsReadonlyArgs;\n compressedProofArgs: ProofArgs;\n};\n\nexport type TokenTransferIntentCompressedInstructionDataArgs = {\n amount: number | bigint;\n secp256r1VerifyArgs: Array<Secp256r1VerifyArgsWithDomainAddressArgs>;\n settingsReadonlyArgs: SettingsReadonlyArgsArgs;\n compressedProofArgs: ProofArgsArgs;\n};\n\nexport function getTokenTransferIntentCompressedInstructionDataEncoder(): Encoder<TokenTransferIntentCompressedInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n [\"discriminator\", fixEncoderSize(getBytesEncoder(), 1)],\n [\"amount\", getU64Encoder()],\n [\n \"secp256r1VerifyArgs\",\n getArrayEncoder(getSecp256r1VerifyArgsWithDomainAddressEncoder()),\n ],\n [\"settingsReadonlyArgs\", getSettingsReadonlyArgsEncoder()],\n [\"compressedProofArgs\", getProofArgsEncoder()],\n ]),\n (value) => ({\n ...value,\n discriminator: TOKEN_TRANSFER_INTENT_COMPRESSED_DISCRIMINATOR,\n })\n );\n}\n\nexport function getTokenTransferIntentCompressedInstructionDataDecoder(): Decoder<TokenTransferIntentCompressedInstructionData> {\n return getStructDecoder([\n [\"discriminator\", fixDecoderSize(getBytesDecoder(), 1)],\n [\"amount\", getU64Decoder()],\n [\n \"secp256r1VerifyArgs\",\n getArrayDecoder(getSecp256r1VerifyArgsWithDomainAddressDecoder()),\n ],\n [\"settingsReadonlyArgs\", getSettingsReadonlyArgsDecoder()],\n [\"compressedProofArgs\", getProofArgsDecoder()],\n ]);\n}\n\nexport function getTokenTransferIntentCompressedInstructionDataCodec(): Codec<\n TokenTransferIntentCompressedInstructionDataArgs,\n TokenTransferIntentCompressedInstructionData\n> {\n return combineCodec(\n getTokenTransferIntentCompressedInstructionDataEncoder(),\n getTokenTransferIntentCompressedInstructionDataDecoder()\n );\n}\n\nexport type TokenTransferIntentCompressedInstructionExtraArgs = {\n remainingAccounts: Array<{ address: Address; role: number }>;\n};\n\nexport type TokenTransferIntentCompressedAsyncInput<\n TAccountPayer extends string = string,\n TAccountSlotHashSysvar extends string = string,\n TAccountInstructionsSysvar extends string = string,\n TAccountSource extends string = string,\n TAccountSourceTokenAccount extends string = string,\n TAccountDestination extends string = string,\n TAccountDestinationTokenAccount extends string = string,\n TAccountTokenProgram extends string = string,\n TAccountMint extends string = string,\n TAccountSystemProgram extends string = string,\n TAccountAssociatedTokenProgram extends string = string,\n> = {\n payer: TransactionSigner<TAccountPayer>;\n slotHashSysvar?: Address<TAccountSlotHashSysvar>;\n instructionsSysvar?: Address<TAccountInstructionsSysvar>;\n source: Address<TAccountSource>;\n sourceTokenAccount?: Address<TAccountSourceTokenAccount>;\n destination: Address<TAccountDestination>;\n destinationTokenAccount?: Address<TAccountDestinationTokenAccount>;\n tokenProgram?: Address<TAccountTokenProgram>;\n mint: Address<TAccountMint>;\n systemProgram?: Address<TAccountSystemProgram>;\n associatedTokenProgram?: Address<TAccountAssociatedTokenProgram>;\n amount: TokenTransferIntentCompressedInstructionDataArgs[\"amount\"];\n secp256r1VerifyArgs: TokenTransferIntentCompressedInstructionDataArgs[\"secp256r1VerifyArgs\"];\n settingsReadonlyArgs: TokenTransferIntentCompressedInstructionDataArgs[\"settingsReadonlyArgs\"];\n compressedProofArgs: TokenTransferIntentCompressedInstructionDataArgs[\"compressedProofArgs\"];\n remainingAccounts: TokenTransferIntentCompressedInstructionExtraArgs[\"remainingAccounts\"];\n};\n\nexport async function getTokenTransferIntentCompressedInstructionAsync<\n TAccountPayer extends string,\n TAccountSlotHashSysvar extends string,\n TAccountInstructionsSysvar extends string,\n TAccountSource extends string,\n TAccountSourceTokenAccount extends string,\n TAccountDestination extends string,\n TAccountDestinationTokenAccount extends string,\n TAccountTokenProgram extends string,\n TAccountMint extends string,\n TAccountSystemProgram extends string,\n TAccountAssociatedTokenProgram extends string,\n TProgramAddress extends Address = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n>(\n input: TokenTransferIntentCompressedAsyncInput<\n TAccountPayer,\n TAccountSlotHashSysvar,\n TAccountInstructionsSysvar,\n TAccountSource,\n TAccountSourceTokenAccount,\n TAccountDestination,\n TAccountDestinationTokenAccount,\n TAccountTokenProgram,\n TAccountMint,\n TAccountSystemProgram,\n TAccountAssociatedTokenProgram\n >,\n config?: { programAddress?: TProgramAddress }\n): Promise<\n TokenTransferIntentCompressedInstruction<\n TProgramAddress,\n TAccountPayer,\n TAccountSlotHashSysvar,\n TAccountInstructionsSysvar,\n TAccountSource,\n TAccountSourceTokenAccount,\n TAccountDestination,\n TAccountDestinationTokenAccount,\n TAccountTokenProgram,\n TAccountMint,\n TAccountSystemProgram,\n TAccountAssociatedTokenProgram\n >\n> {\n // Program address.\n const programAddress = config?.programAddress ?? MULTI_WALLET_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n payer: { value: input.payer ?? null, isWritable: true },\n slotHashSysvar: { value: input.slotHashSysvar ?? null, isWritable: false },\n instructionsSysvar: {\n value: input.instructionsSysvar ?? null,\n isWritable: false,\n },\n source: { value: input.source ?? null, isWritable: true },\n sourceTokenAccount: {\n value: input.sourceTokenAccount ?? null,\n isWritable: true,\n },\n destination: { value: input.destination ?? null, isWritable: false },\n destinationTokenAccount: {\n value: input.destinationTokenAccount ?? null,\n isWritable: true,\n },\n tokenProgram: { value: input.tokenProgram ?? null, isWritable: false },\n mint: { value: input.mint ?? null, isWritable: false },\n systemProgram: { value: input.systemProgram ?? null, isWritable: false },\n associatedTokenProgram: {\n value: input.associatedTokenProgram ?? null,\n isWritable: false,\n },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolver scope.\n const resolverScope = { programAddress, accounts, args };\n\n // Resolve default values.\n if (!accounts.slotHashSysvar.value) {\n accounts.slotHashSysvar.value =\n \"SysvarS1otHashes111111111111111111111111111\" as Address<\"SysvarS1otHashes111111111111111111111111111\">;\n }\n if (!accounts.instructionsSysvar.value) {\n accounts.instructionsSysvar.value =\n \"Sysvar1nstructions1111111111111111111111111\" as Address<\"Sysvar1nstructions1111111111111111111111111\">;\n }\n if (!accounts.tokenProgram.value) {\n accounts.tokenProgram.value =\n \"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA\" as Address<\"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA\">;\n }\n if (!accounts.sourceTokenAccount.value) {\n accounts.sourceTokenAccount.value = await getProgramDerivedAddress({\n programAddress:\n \"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL\" as Address<\"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL\">,\n seeds: [\n getAddressEncoder().encode(expectAddress(accounts.source.value)),\n getAddressEncoder().encode(expectAddress(accounts.tokenProgram.value)),\n getAddressEncoder().encode(expectAddress(accounts.mint.value)),\n ],\n });\n }\n if (!accounts.destinationTokenAccount.value) {\n accounts.destinationTokenAccount.value = await getProgramDerivedAddress({\n programAddress:\n \"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL\" as Address<\"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL\">,\n seeds: [\n getAddressEncoder().encode(expectAddress(accounts.destination.value)),\n getAddressEncoder().encode(expectAddress(accounts.tokenProgram.value)),\n getAddressEncoder().encode(expectAddress(accounts.mint.value)),\n ],\n });\n }\n if (!accounts.systemProgram.value) {\n accounts.systemProgram.value =\n \"11111111111111111111111111111111\" as Address<\"11111111111111111111111111111111\">;\n }\n if (!accounts.associatedTokenProgram.value) {\n accounts.associatedTokenProgram.value =\n \"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL\" as Address<\"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL\">;\n }\n\n // Remaining accounts.\n const remainingAccounts: AccountMeta[] =\n parseRemainingAccounts(resolverScope);\n\n const getAccountMeta = getAccountMetaFactory(programAddress, \"programId\");\n return Object.freeze({\n accounts: [\n getAccountMeta(accounts.payer),\n getAccountMeta(accounts.slotHashSysvar),\n getAccountMeta(accounts.instructionsSysvar),\n getAccountMeta(accounts.source),\n getAccountMeta(accounts.sourceTokenAccount),\n getAccountMeta(accounts.destination),\n getAccountMeta(accounts.destinationTokenAccount),\n getAccountMeta(accounts.tokenProgram),\n getAccountMeta(accounts.mint),\n getAccountMeta(accounts.systemProgram),\n getAccountMeta(accounts.associatedTokenProgram),\n ...remainingAccounts,\n ],\n data: getTokenTransferIntentCompressedInstructionDataEncoder().encode(\n args as TokenTransferIntentCompressedInstructionDataArgs\n ),\n programAddress,\n } as TokenTransferIntentCompressedInstruction<\n TProgramAddress,\n TAccountPayer,\n TAccountSlotHashSysvar,\n TAccountInstructionsSysvar,\n TAccountSource,\n TAccountSourceTokenAccount,\n TAccountDestination,\n TAccountDestinationTokenAccount,\n TAccountTokenProgram,\n TAccountMint,\n TAccountSystemProgram,\n TAccountAssociatedTokenProgram\n >);\n}\n\nexport type TokenTransferIntentCompressedInput<\n TAccountPayer extends string = string,\n TAccountSlotHashSysvar extends string = string,\n TAccountInstructionsSysvar extends string = string,\n TAccountSource extends string = string,\n TAccountSourceTokenAccount extends string = string,\n TAccountDestination extends string = string,\n TAccountDestinationTokenAccount extends string = string,\n TAccountTokenProgram extends string = string,\n TAccountMint extends string = string,\n TAccountSystemProgram extends string = string,\n TAccountAssociatedTokenProgram extends string = string,\n> = {\n payer: TransactionSigner<TAccountPayer>;\n slotHashSysvar?: Address<TAccountSlotHashSysvar>;\n instructionsSysvar?: Address<TAccountInstructionsSysvar>;\n source: Address<TAccountSource>;\n sourceTokenAccount: Address<TAccountSourceTokenAccount>;\n destination: Address<TAccountDestination>;\n destinationTokenAccount: Address<TAccountDestinationTokenAccount>;\n tokenProgram?: Address<TAccountTokenProgram>;\n mint: Address<TAccountMint>;\n systemProgram?: Address<TAccountSystemProgram>;\n associatedTokenProgram?: Address<TAccountAssociatedTokenProgram>;\n amount: TokenTransferIntentCompressedInstructionDataArgs[\"amount\"];\n secp256r1VerifyArgs: TokenTransferIntentCompressedInstructionDataArgs[\"secp256r1VerifyArgs\"];\n settingsReadonlyArgs: TokenTransferIntentCompressedInstructionDataArgs[\"settingsReadonlyArgs\"];\n compressedProofArgs: TokenTransferIntentCompressedInstructionDataArgs[\"compressedProofArgs\"];\n remainingAccounts: TokenTransferIntentCompressedInstructionExtraArgs[\"remainingAccounts\"];\n};\n\nexport function getTokenTransferIntentCompressedInstruction<\n TAccountPayer extends string,\n TAccountSlotHashSysvar extends string,\n TAccountInstructionsSysvar extends string,\n TAccountSource extends string,\n TAccountSourceTokenAccount extends string,\n TAccountDestination extends string,\n TAccountDestinationTokenAccount extends string,\n TAccountTokenProgram extends string,\n TAccountMint extends string,\n TAccountSystemProgram extends string,\n TAccountAssociatedTokenProgram extends string,\n TProgramAddress extends Address = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n>(\n input: TokenTransferIntentCompressedInput<\n TAccountPayer,\n TAccountSlotHashSysvar,\n TAccountInstructionsSysvar,\n TAccountSource,\n TAccountSourceTokenAccount,\n TAccountDestination,\n TAccountDestinationTokenAccount,\n TAccountTokenProgram,\n TAccountMint,\n TAccountSystemProgram,\n TAccountAssociatedTokenProgram\n >,\n config?: { programAddress?: TProgramAddress }\n): TokenTransferIntentCompressedInstruction<\n TProgramAddress,\n TAccountPayer,\n TAccountSlotHashSysvar,\n TAccountInstructionsSysvar,\n TAccountSource,\n TAccountSourceTokenAccount,\n TAccountDestination,\n TAccountDestinationTokenAccount,\n TAccountTokenProgram,\n TAccountMint,\n TAccountSystemProgram,\n TAccountAssociatedTokenProgram\n> {\n // Program address.\n const programAddress = config?.programAddress ?? MULTI_WALLET_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n payer: { value: input.payer ?? null, isWritable: true },\n slotHashSysvar: { value: input.slotHashSysvar ?? null, isWritable: false },\n instructionsSysvar: {\n value: input.instructionsSysvar ?? null,\n isWritable: false,\n },\n source: { value: input.source ?? null, isWritable: true },\n sourceTokenAccount: {\n value: input.sourceTokenAccount ?? null,\n isWritable: true,\n },\n destination: { value: input.destination ?? null, isWritable: false },\n destinationTokenAccount: {\n value: input.destinationTokenAccount ?? null,\n isWritable: true,\n },\n tokenProgram: { value: input.tokenProgram ?? null, isWritable: false },\n mint: { value: input.mint ?? null, isWritable: false },\n systemProgram: { value: input.systemProgram ?? null, isWritable: false },\n associatedTokenProgram: {\n value: input.associatedTokenProgram ?? null,\n isWritable: false,\n },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolver scope.\n const resolverScope = { programAddress, accounts, args };\n\n // Resolve default values.\n if (!accounts.slotHashSysvar.value) {\n accounts.slotHashSysvar.value =\n \"SysvarS1otHashes111111111111111111111111111\" as Address<\"SysvarS1otHashes111111111111111111111111111\">;\n }\n if (!accounts.instructionsSysvar.value) {\n accounts.instructionsSysvar.value =\n \"Sysvar1nstructions1111111111111111111111111\" as Address<\"Sysvar1nstructions1111111111111111111111111\">;\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.associatedTokenProgram.value) {\n accounts.associatedTokenProgram.value =\n \"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL\" as Address<\"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL\">;\n }\n\n // Remaining accounts.\n const remainingAccounts: AccountMeta[] =\n parseRemainingAccounts(resolverScope);\n\n const getAccountMeta = getAccountMetaFactory(programAddress, \"programId\");\n return Object.freeze({\n accounts: [\n getAccountMeta(accounts.payer),\n getAccountMeta(accounts.slotHashSysvar),\n getAccountMeta(accounts.instructionsSysvar),\n getAccountMeta(accounts.source),\n getAccountMeta(accounts.sourceTokenAccount),\n getAccountMeta(accounts.destination),\n getAccountMeta(accounts.destinationTokenAccount),\n getAccountMeta(accounts.tokenProgram),\n getAccountMeta(accounts.mint),\n getAccountMeta(accounts.systemProgram),\n getAccountMeta(accounts.associatedTokenProgram),\n ...remainingAccounts,\n ],\n data: getTokenTransferIntentCompressedInstructionDataEncoder().encode(\n args as TokenTransferIntentCompressedInstructionDataArgs\n ),\n programAddress,\n } as TokenTransferIntentCompressedInstruction<\n TProgramAddress,\n TAccountPayer,\n TAccountSlotHashSysvar,\n TAccountInstructionsSysvar,\n TAccountSource,\n TAccountSourceTokenAccount,\n TAccountDestination,\n TAccountDestinationTokenAccount,\n TAccountTokenProgram,\n TAccountMint,\n TAccountSystemProgram,\n TAccountAssociatedTokenProgram\n >);\n}\n\nexport type ParsedTokenTransferIntentCompressedInstruction<\n TProgram extends string = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n payer: TAccountMetas[0];\n slotHashSysvar?: TAccountMetas[1] | undefined;\n instructionsSysvar: TAccountMetas[2];\n source: TAccountMetas[3];\n sourceTokenAccount: TAccountMetas[4];\n destination: TAccountMetas[5];\n destinationTokenAccount: TAccountMetas[6];\n tokenProgram: TAccountMetas[7];\n mint: TAccountMetas[8];\n systemProgram: TAccountMetas[9];\n associatedTokenProgram: TAccountMetas[10];\n };\n data: TokenTransferIntentCompressedInstructionData;\n};\n\nexport function parseTokenTransferIntentCompressedInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>\n): ParsedTokenTransferIntentCompressedInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 11) {\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 const getNextOptionalAccount = () => {\n const accountMeta = getNextAccount();\n return accountMeta.address === MULTI_WALLET_PROGRAM_ADDRESS\n ? undefined\n : accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n payer: getNextAccount(),\n slotHashSysvar: getNextOptionalAccount(),\n instructionsSysvar: getNextAccount(),\n source: getNextAccount(),\n sourceTokenAccount: getNextAccount(),\n destination: getNextAccount(),\n destinationTokenAccount: getNextAccount(),\n tokenProgram: getNextAccount(),\n mint: getNextAccount(),\n systemProgram: getNextAccount(),\n associatedTokenProgram: getNextAccount(),\n },\n data: getTokenTransferIntentCompressedInstructionDataDecoder().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 getOptionDecoder,\n getOptionEncoder,\n getStructDecoder,\n getStructEncoder,\n transformEncoder,\n type AccountMeta,\n type AccountSignerMeta,\n type Address,\n type Codec,\n type Decoder,\n type Encoder,\n type Instruction,\n type InstructionWithAccounts,\n type InstructionWithData,\n type Option,\n type OptionOrNullable,\n type ReadonlyAccount,\n type ReadonlySignerAccount,\n type ReadonlyUint8Array,\n type TransactionSigner,\n type WritableAccount,\n} from \"gill\";\nimport { parseRemainingAccounts } from \"../../hooked\";\nimport { MULTI_WALLET_PROGRAM_ADDRESS } from \"../programs\";\nimport { getAccountMetaFactory, type ResolvedAccount } from \"../shared\";\nimport {\n getSecp256r1VerifyArgsDecoder,\n getSecp256r1VerifyArgsEncoder,\n type Secp256r1VerifyArgs,\n type Secp256r1VerifyArgsArgs,\n} from \"../types\";\n\nexport const TRANSACTION_BUFFER_CLOSE_DISCRIMINATOR = new Uint8Array([12]);\n\nexport function getTransactionBufferCloseDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 1).encode(\n TRANSACTION_BUFFER_CLOSE_DISCRIMINATOR\n );\n}\n\nexport type TransactionBufferCloseInstruction<\n TProgram extends string = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n TAccountSettings extends string | AccountMeta<string> = string,\n TAccountPayer extends string | AccountMeta<string> = string,\n TAccountDomainConfig extends string | AccountMeta<string> = string,\n TAccountTransactionBuffer extends string | AccountMeta<string> = string,\n TAccountCloser extends string | AccountMeta<string> = string,\n TAccountSlotHashSysvar extends\n | string\n | AccountMeta<string> = \"SysvarS1otHashes111111111111111111111111111\",\n TAccountInstructionsSysvar extends\n | string\n | AccountMeta<string> = \"Sysvar1nstructions1111111111111111111111111\",\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountSettings extends string\n ? ReadonlyAccount<TAccountSettings>\n : TAccountSettings,\n TAccountPayer extends string\n ? WritableAccount<TAccountPayer>\n : TAccountPayer,\n TAccountDomainConfig extends string\n ? ReadonlyAccount<TAccountDomainConfig>\n : TAccountDomainConfig,\n TAccountTransactionBuffer extends string\n ? WritableAccount<TAccountTransactionBuffer>\n : TAccountTransactionBuffer,\n TAccountCloser extends string\n ? ReadonlySignerAccount<TAccountCloser> &\n AccountSignerMeta<TAccountCloser>\n : TAccountCloser,\n TAccountSlotHashSysvar extends string\n ? ReadonlyAccount<TAccountSlotHashSysvar>\n : TAccountSlotHashSysvar,\n TAccountInstructionsSysvar extends string\n ? ReadonlyAccount<TAccountInstructionsSysvar>\n : TAccountInstructionsSysvar,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type TransactionBufferCloseInstructionData = {\n discriminator: ReadonlyUint8Array;\n secp256r1VerifyArgs: Option<Secp256r1VerifyArgs>;\n};\n\nexport type TransactionBufferCloseInstructionDataArgs = {\n secp256r1VerifyArgs: OptionOrNullable<Secp256r1VerifyArgsArgs>;\n};\n\nexport function getTransactionBufferCloseInstructionDataEncoder(): Encoder<TransactionBufferCloseInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n [\"discriminator\", fixEncoderSize(getBytesEncoder(), 1)],\n [\n \"secp256r1VerifyArgs\",\n getOptionEncoder(getSecp256r1VerifyArgsEncoder()),\n ],\n ]),\n (value) => ({\n ...value,\n discriminator: TRANSACTION_BUFFER_CLOSE_DISCRIMINATOR,\n })\n );\n}\n\nexport function getTransactionBufferCloseInstructionDataDecoder(): Decoder<TransactionBufferCloseInstructionData> {\n return getStructDecoder([\n [\"discriminator\", fixDecoderSize(getBytesDecoder(), 1)],\n [\"secp256r1VerifyArgs\", getOptionDecoder(getSecp256r1VerifyArgsDecoder())],\n ]);\n}\n\nexport function getTransactionBufferCloseInstructionDataCodec(): Codec<\n TransactionBufferCloseInstructionDataArgs,\n TransactionBufferCloseInstructionData\n> {\n return combineCodec(\n getTransactionBufferCloseInstructionDataEncoder(),\n getTransactionBufferCloseInstructionDataDecoder()\n );\n}\n\nexport type TransactionBufferCloseInstructionExtraArgs = {\n remainingAccounts: Array<{ address: Address; role: number }>;\n};\n\nexport type TransactionBufferCloseInput<\n TAccountSettings extends string = string,\n TAccountPayer extends string = string,\n TAccountDomainConfig extends string = string,\n TAccountTransactionBuffer extends string = string,\n TAccountCloser extends string = string,\n TAccountSlotHashSysvar extends string = string,\n TAccountInstructionsSysvar extends string = string,\n> = {\n settings: Address<TAccountSettings>;\n payer: Address<TAccountPayer>;\n domainConfig?: Address<TAccountDomainConfig>;\n transactionBuffer: Address<TAccountTransactionBuffer>;\n closer?: TransactionSigner<TAccountCloser>;\n slotHashSysvar?: Address<TAccountSlotHashSysvar>;\n instructionsSysvar?: Address<TAccountInstructionsSysvar>;\n secp256r1VerifyArgs: TransactionBufferCloseInstructionDataArgs[\"secp256r1VerifyArgs\"];\n remainingAccounts: TransactionBufferCloseInstructionExtraArgs[\"remainingAccounts\"];\n};\n\nexport function getTransactionBufferCloseInstruction<\n TAccountSettings extends string,\n TAccountPayer extends string,\n TAccountDomainConfig extends string,\n TAccountTransactionBuffer extends string,\n TAccountCloser extends string,\n TAccountSlotHashSysvar extends string,\n TAccountInstructionsSysvar extends string,\n TProgramAddress extends Address = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n>(\n input: TransactionBufferCloseInput<\n TAccountSettings,\n TAccountPayer,\n TAccountDomainConfig,\n TAccountTransactionBuffer,\n TAccountCloser,\n TAccountSlotHashSysvar,\n TAccountInstructionsSysvar\n >,\n config?: { programAddress?: TProgramAddress }\n): TransactionBufferCloseInstruction<\n TProgramAddress,\n TAccountSettings,\n TAccountPayer,\n TAccountDomainConfig,\n TAccountTransactionBuffer,\n TAccountCloser,\n TAccountSlotHashSysvar,\n TAccountInstructionsSysvar\n> {\n // Program address.\n const programAddress = config?.programAddress ?? MULTI_WALLET_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n settings: { value: input.settings ?? null, isWritable: false },\n payer: { value: input.payer ?? null, isWritable: true },\n domainConfig: { value: input.domainConfig ?? null, isWritable: false },\n transactionBuffer: {\n value: input.transactionBuffer ?? null,\n isWritable: true,\n },\n closer: { value: input.closer ?? null, isWritable: false },\n slotHashSysvar: { value: input.slotHashSysvar ?? null, isWritable: false },\n instructionsSysvar: {\n value: input.instructionsSysvar ?? null,\n isWritable: false,\n },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolver scope.\n const resolverScope = { programAddress, accounts, args };\n\n // Resolve default values.\n if (!accounts.slotHashSysvar.value) {\n accounts.slotHashSysvar.value =\n \"SysvarS1otHashes111111111111111111111111111\" as Address<\"SysvarS1otHashes111111111111111111111111111\">;\n }\n if (!accounts.instructionsSysvar.value) {\n accounts.instructionsSysvar.value =\n \"Sysvar1nstructions1111111111111111111111111\" as Address<\"Sysvar1nstructions1111111111111111111111111\">;\n }\n\n // Remaining accounts.\n const remainingAccounts: AccountMeta[] =\n parseRemainingAccounts(resolverScope);\n\n const getAccountMeta = getAccountMetaFactory(programAddress, \"programId\");\n return Object.freeze({\n accounts: [\n getAccountMeta(accounts.settings),\n getAccountMeta(accounts.payer),\n getAccountMeta(accounts.domainConfig),\n getAccountMeta(accounts.transactionBuffer),\n getAccountMeta(accounts.closer),\n getAccountMeta(accounts.slotHashSysvar),\n getAccountMeta(accounts.instructionsSysvar),\n ...remainingAccounts,\n ],\n data: getTransactionBufferCloseInstructionDataEncoder().encode(\n args as TransactionBufferCloseInstructionDataArgs\n ),\n programAddress,\n } as TransactionBufferCloseInstruction<\n TProgramAddress,\n TAccountSettings,\n TAccountPayer,\n TAccountDomainConfig,\n TAccountTransactionBuffer,\n TAccountCloser,\n TAccountSlotHashSysvar,\n TAccountInstructionsSysvar\n >);\n}\n\nexport type ParsedTransactionBufferCloseInstruction<\n TProgram extends string = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n settings: TAccountMetas[0];\n payer: TAccountMetas[1];\n domainConfig?: TAccountMetas[2] | undefined;\n transactionBuffer: TAccountMetas[3];\n closer?: TAccountMetas[4] | undefined;\n slotHashSysvar?: TAccountMetas[5] | undefined;\n instructionsSysvar?: TAccountMetas[6] | undefined;\n };\n data: TransactionBufferCloseInstructionData;\n};\n\nexport function parseTransactionBufferCloseInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>\n): ParsedTransactionBufferCloseInstruction<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 const getNextOptionalAccount = () => {\n const accountMeta = getNextAccount();\n return accountMeta.address === MULTI_WALLET_PROGRAM_ADDRESS\n ? undefined\n : accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n settings: getNextAccount(),\n payer: getNextAccount(),\n domainConfig: getNextOptionalAccount(),\n transactionBuffer: getNextAccount(),\n closer: getNextOptionalAccount(),\n slotHashSysvar: getNextOptionalAccount(),\n instructionsSysvar: getNextOptionalAccount(),\n },\n data: getTransactionBufferCloseInstructionDataDecoder().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 getOptionDecoder,\n getOptionEncoder,\n getStructDecoder,\n getStructEncoder,\n transformEncoder,\n type AccountMeta,\n type AccountSignerMeta,\n type Address,\n type Codec,\n type Decoder,\n type Encoder,\n type Instruction,\n type InstructionWithAccounts,\n type InstructionWithData,\n type Option,\n type OptionOrNullable,\n type ReadonlyAccount,\n type ReadonlySignerAccount,\n type ReadonlyUint8Array,\n type TransactionSigner,\n type WritableAccount,\n type WritableSignerAccount,\n} from \"gill\";\nimport { parseRemainingAccounts } from \"../../hooked\";\nimport { MULTI_WALLET_PROGRAM_ADDRESS } from \"../programs\";\nimport { getAccountMetaFactory, type ResolvedAccount } from \"../shared\";\nimport {\n getProofArgsDecoder,\n getProofArgsEncoder,\n getSecp256r1VerifyArgsDecoder,\n getSecp256r1VerifyArgsEncoder,\n getSettingsReadonlyArgsDecoder,\n getSettingsReadonlyArgsEncoder,\n type ProofArgs,\n type ProofArgsArgs,\n type Secp256r1VerifyArgs,\n type Secp256r1VerifyArgsArgs,\n type SettingsReadonlyArgs,\n type SettingsReadonlyArgsArgs,\n} from \"../types\";\n\nexport const TRANSACTION_BUFFER_CLOSE_COMPRESSED_DISCRIMINATOR = new Uint8Array(\n [23]\n);\n\nexport function getTransactionBufferCloseCompressedDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 1).encode(\n TRANSACTION_BUFFER_CLOSE_COMPRESSED_DISCRIMINATOR\n );\n}\n\nexport type TransactionBufferCloseCompressedInstruction<\n TProgram extends string = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n TAccountPayer extends string | AccountMeta<string> = string,\n TAccountRentCollector extends string | AccountMeta<string> = string,\n TAccountDomainConfig extends string | AccountMeta<string> = string,\n TAccountTransactionBuffer extends string | AccountMeta<string> = string,\n TAccountCloser extends string | AccountMeta<string> = string,\n TAccountSlotHashSysvar extends\n | string\n | AccountMeta<string> = \"SysvarS1otHashes111111111111111111111111111\",\n TAccountInstructionsSysvar extends\n | string\n | AccountMeta<string> = \"Sysvar1nstructions1111111111111111111111111\",\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountPayer extends string\n ? WritableSignerAccount<TAccountPayer> &\n AccountSignerMeta<TAccountPayer>\n : TAccountPayer,\n TAccountRentCollector extends string\n ? WritableAccount<TAccountRentCollector>\n : TAccountRentCollector,\n TAccountDomainConfig extends string\n ? ReadonlyAccount<TAccountDomainConfig>\n : TAccountDomainConfig,\n TAccountTransactionBuffer extends string\n ? WritableAccount<TAccountTransactionBuffer>\n : TAccountTransactionBuffer,\n TAccountCloser extends string\n ? ReadonlySignerAccount<TAccountCloser> &\n AccountSignerMeta<TAccountCloser>\n : TAccountCloser,\n TAccountSlotHashSysvar extends string\n ? ReadonlyAccount<TAccountSlotHashSysvar>\n : TAccountSlotHashSysvar,\n TAccountInstructionsSysvar extends string\n ? ReadonlyAccount<TAccountInstructionsSysvar>\n : TAccountInstructionsSysvar,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type TransactionBufferCloseCompressedInstructionData = {\n discriminator: ReadonlyUint8Array;\n secp256r1VerifyArgs: Option<Secp256r1VerifyArgs>;\n settingsReadonlyArgs: SettingsReadonlyArgs;\n compressedProofArgs: ProofArgs;\n};\n\nexport type TransactionBufferCloseCompressedInstructionDataArgs = {\n secp256r1VerifyArgs: OptionOrNullable<Secp256r1VerifyArgsArgs>;\n settingsReadonlyArgs: SettingsReadonlyArgsArgs;\n compressedProofArgs: ProofArgsArgs;\n};\n\nexport function getTransactionBufferCloseCompressedInstructionDataEncoder(): Encoder<TransactionBufferCloseCompressedInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n [\"discriminator\", fixEncoderSize(getBytesEncoder(), 1)],\n [\n \"secp256r1VerifyArgs\",\n getOptionEncoder(getSecp256r1VerifyArgsEncoder()),\n ],\n [\"settingsReadonlyArgs\", getSettingsReadonlyArgsEncoder()],\n [\"compressedProofArgs\", getProofArgsEncoder()],\n ]),\n (value) => ({\n ...value,\n discriminator: TRANSACTION_BUFFER_CLOSE_COMPRESSED_DISCRIMINATOR,\n })\n );\n}\n\nexport function getTransactionBufferCloseCompressedInstructionDataDecoder(): Decoder<TransactionBufferCloseCompressedInstructionData> {\n return getStructDecoder([\n [\"discriminator\", fixDecoderSize(getBytesDecoder(), 1)],\n [\"secp256r1VerifyArgs\", getOptionDecoder(getSecp256r1VerifyArgsDecoder())],\n [\"settingsReadonlyArgs\", getSettingsReadonlyArgsDecoder()],\n [\"compressedProofArgs\", getProofArgsDecoder()],\n ]);\n}\n\nexport function getTransactionBufferCloseCompressedInstructionDataCodec(): Codec<\n TransactionBufferCloseCompressedInstructionDataArgs,\n TransactionBufferCloseCompressedInstructionData\n> {\n return combineCodec(\n getTransactionBufferCloseCompressedInstructionDataEncoder(),\n getTransactionBufferCloseCompressedInstructionDataDecoder()\n );\n}\n\nexport type TransactionBufferCloseCompressedInstructionExtraArgs = {\n remainingAccounts: Array<{ address: Address; role: number }>;\n};\n\nexport type TransactionBufferCloseCompressedInput<\n TAccountPayer extends string = string,\n TAccountRentCollector extends string = string,\n TAccountDomainConfig extends string = string,\n TAccountTransactionBuffer extends string = string,\n TAccountCloser extends string = string,\n TAccountSlotHashSysvar extends string = string,\n TAccountInstructionsSysvar extends string = string,\n> = {\n payer: TransactionSigner<TAccountPayer>;\n rentCollector: Address<TAccountRentCollector>;\n domainConfig?: Address<TAccountDomainConfig>;\n transactionBuffer: Address<TAccountTransactionBuffer>;\n closer?: TransactionSigner<TAccountCloser>;\n slotHashSysvar?: Address<TAccountSlotHashSysvar>;\n instructionsSysvar?: Address<TAccountInstructionsSysvar>;\n secp256r1VerifyArgs: TransactionBufferCloseCompressedInstructionDataArgs[\"secp256r1VerifyArgs\"];\n settingsReadonlyArgs: TransactionBufferCloseCompressedInstructionDataArgs[\"settingsReadonlyArgs\"];\n compressedProofArgs: TransactionBufferCloseCompressedInstructionDataArgs[\"compressedProofArgs\"];\n remainingAccounts: TransactionBufferCloseCompressedInstructionExtraArgs[\"remainingAccounts\"];\n};\n\nexport function getTransactionBufferCloseCompressedInstruction<\n TAccountPayer extends string,\n TAccountRentCollector extends string,\n TAccountDomainConfig extends string,\n TAccountTransactionBuffer extends string,\n TAccountCloser extends string,\n TAccountSlotHashSysvar extends string,\n TAccountInstructionsSysvar extends string,\n TProgramAddress extends Address = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n>(\n input: TransactionBufferCloseCompressedInput<\n TAccountPayer,\n TAccountRentCollector,\n TAccountDomainConfig,\n TAccountTransactionBuffer,\n TAccountCloser,\n TAccountSlotHashSysvar,\n TAccountInstructionsSysvar\n >,\n config?: { programAddress?: TProgramAddress }\n): TransactionBufferCloseCompressedInstruction<\n TProgramAddress,\n TAccountPayer,\n TAccountRentCollector,\n TAccountDomainConfig,\n TAccountTransactionBuffer,\n TAccountCloser,\n TAccountSlotHashSysvar,\n TAccountInstructionsSysvar\n> {\n // Program address.\n const programAddress = config?.programAddress ?? MULTI_WALLET_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n payer: { value: input.payer ?? null, isWritable: true },\n rentCollector: { value: input.rentCollector ?? null, isWritable: true },\n domainConfig: { value: input.domainConfig ?? null, isWritable: false },\n transactionBuffer: {\n value: input.transactionBuffer ?? null,\n isWritable: true,\n },\n closer: { value: input.closer ?? null, isWritable: false },\n slotHashSysvar: { value: input.slotHashSysvar ?? null, isWritable: false },\n instructionsSysvar: {\n value: input.instructionsSysvar ?? null,\n isWritable: false,\n },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolver scope.\n const resolverScope = { programAddress, accounts, args };\n\n // Resolve default values.\n if (!accounts.slotHashSysvar.value) {\n accounts.slotHashSysvar.value =\n \"SysvarS1otHashes111111111111111111111111111\" as Address<\"SysvarS1otHashes111111111111111111111111111\">;\n }\n if (!accounts.instructionsSysvar.value) {\n accounts.instructionsSysvar.value =\n \"Sysvar1nstructions1111111111111111111111111\" as Address<\"Sysvar1nstructions1111111111111111111111111\">;\n }\n\n // Remaining accounts.\n const remainingAccounts: AccountMeta[] =\n parseRemainingAccounts(resolverScope);\n\n const getAccountMeta = getAccountMetaFactory(programAddress, \"programId\");\n return Object.freeze({\n accounts: [\n getAccountMeta(accounts.payer),\n getAccountMeta(accounts.rentCollector),\n getAccountMeta(accounts.domainConfig),\n getAccountMeta(accounts.transactionBuffer),\n getAccountMeta(accounts.closer),\n getAccountMeta(accounts.slotHashSysvar),\n getAccountMeta(accounts.instructionsSysvar),\n ...remainingAccounts,\n ],\n data: getTransactionBufferCloseCompressedInstructionDataEncoder().encode(\n args as TransactionBufferCloseCompressedInstructionDataArgs\n ),\n programAddress,\n } as TransactionBufferCloseCompressedInstruction<\n TProgramAddress,\n TAccountPayer,\n TAccountRentCollector,\n TAccountDomainConfig,\n TAccountTransactionBuffer,\n TAccountCloser,\n TAccountSlotHashSysvar,\n TAccountInstructionsSysvar\n >);\n}\n\nexport type ParsedTransactionBufferCloseCompressedInstruction<\n TProgram extends string = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n payer: TAccountMetas[0];\n rentCollector: TAccountMetas[1];\n domainConfig?: TAccountMetas[2] | undefined;\n transactionBuffer: TAccountMetas[3];\n closer?: TAccountMetas[4] | undefined;\n slotHashSysvar?: TAccountMetas[5] | undefined;\n instructionsSysvar?: TAccountMetas[6] | undefined;\n };\n data: TransactionBufferCloseCompressedInstructionData;\n};\n\nexport function parseTransactionBufferCloseCompressedInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>\n): ParsedTransactionBufferCloseCompressedInstruction<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 const getNextOptionalAccount = () => {\n const accountMeta = getNextAccount();\n return accountMeta.address === MULTI_WALLET_PROGRAM_ADDRESS\n ? undefined\n : accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n payer: getNextAccount(),\n rentCollector: getNextAccount(),\n domainConfig: getNextOptionalAccount(),\n transactionBuffer: getNextAccount(),\n closer: getNextOptionalAccount(),\n slotHashSysvar: getNextOptionalAccount(),\n instructionsSysvar: getNextOptionalAccount(),\n },\n data: getTransactionBufferCloseCompressedInstructionDataDecoder().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 getOptionDecoder,\n getOptionEncoder,\n getStructDecoder,\n getStructEncoder,\n transformEncoder,\n type AccountMeta,\n type AccountSignerMeta,\n type Address,\n type Codec,\n type Decoder,\n type Encoder,\n type Instruction,\n type InstructionWithAccounts,\n type InstructionWithData,\n type Option,\n type OptionOrNullable,\n type ReadonlyAccount,\n type ReadonlySignerAccount,\n type ReadonlyUint8Array,\n type TransactionSigner,\n type WritableAccount,\n type WritableSignerAccount,\n} from \"gill\";\nimport { parseRemainingAccounts } from \"../../hooked\";\nimport { MULTI_WALLET_PROGRAM_ADDRESS } from \"../programs\";\nimport { getAccountMetaFactory, type ResolvedAccount } from \"../shared\";\nimport {\n getSecp256r1VerifyArgsDecoder,\n getSecp256r1VerifyArgsEncoder,\n getTransactionBufferCreateArgsDecoder,\n getTransactionBufferCreateArgsEncoder,\n type Secp256r1VerifyArgs,\n type Secp256r1VerifyArgsArgs,\n type TransactionBufferCreateArgs,\n type TransactionBufferCreateArgsArgs,\n} from \"../types\";\n\nexport const TRANSACTION_BUFFER_CREATE_DISCRIMINATOR = new Uint8Array([9]);\n\nexport function getTransactionBufferCreateDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 1).encode(\n TRANSACTION_BUFFER_CREATE_DISCRIMINATOR\n );\n}\n\nexport type TransactionBufferCreateInstruction<\n TProgram extends string = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n TAccountSettings extends string | AccountMeta<string> = string,\n TAccountPayer extends string | AccountMeta<string> = string,\n TAccountDomainConfig extends string | AccountMeta<string> = string,\n TAccountTransactionBuffer extends string | AccountMeta<string> = string,\n TAccountCreator extends string | AccountMeta<string> = string,\n TAccountSystemProgram extends\n | string\n | AccountMeta<string> = \"11111111111111111111111111111111\",\n TAccountInstructionsSysvar extends\n | string\n | AccountMeta<string> = \"Sysvar1nstructions1111111111111111111111111\",\n TAccountSlotHashSysvar extends\n | string\n | AccountMeta<string> = \"SysvarS1otHashes111111111111111111111111111\",\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountSettings extends string\n ? ReadonlyAccount<TAccountSettings>\n : TAccountSettings,\n TAccountPayer extends string\n ? WritableSignerAccount<TAccountPayer> &\n AccountSignerMeta<TAccountPayer>\n : TAccountPayer,\n TAccountDomainConfig extends string\n ? ReadonlyAccount<TAccountDomainConfig>\n : TAccountDomainConfig,\n TAccountTransactionBuffer extends string\n ? WritableAccount<TAccountTransactionBuffer>\n : TAccountTransactionBuffer,\n TAccountCreator extends string\n ? ReadonlySignerAccount<TAccountCreator> &\n AccountSignerMeta<TAccountCreator>\n : TAccountCreator,\n TAccountSystemProgram extends string\n ? ReadonlyAccount<TAccountSystemProgram>\n : TAccountSystemProgram,\n TAccountInstructionsSysvar extends string\n ? ReadonlyAccount<TAccountInstructionsSysvar>\n : TAccountInstructionsSysvar,\n TAccountSlotHashSysvar extends string\n ? ReadonlyAccount<TAccountSlotHashSysvar>\n : TAccountSlotHashSysvar,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type TransactionBufferCreateInstructionData = {\n discriminator: ReadonlyUint8Array;\n args: TransactionBufferCreateArgs;\n secp256r1VerifyArgs: Option<Secp256r1VerifyArgs>;\n};\n\nexport type TransactionBufferCreateInstructionDataArgs = {\n args: TransactionBufferCreateArgsArgs;\n secp256r1VerifyArgs: OptionOrNullable<Secp256r1VerifyArgsArgs>;\n};\n\nexport function getTransactionBufferCreateInstructionDataEncoder(): Encoder<TransactionBufferCreateInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n [\"discriminator\", fixEncoderSize(getBytesEncoder(), 1)],\n [\"args\", getTransactionBufferCreateArgsEncoder()],\n [\n \"secp256r1VerifyArgs\",\n getOptionEncoder(getSecp256r1VerifyArgsEncoder()),\n ],\n ]),\n (value) => ({\n ...value,\n discriminator: TRANSACTION_BUFFER_CREATE_DISCRIMINATOR,\n })\n );\n}\n\nexport function getTransactionBufferCreateInstructionDataDecoder(): Decoder<TransactionBufferCreateInstructionData> {\n return getStructDecoder([\n [\"discriminator\", fixDecoderSize(getBytesDecoder(), 1)],\n [\"args\", getTransactionBufferCreateArgsDecoder()],\n [\"secp256r1VerifyArgs\", getOptionDecoder(getSecp256r1VerifyArgsDecoder())],\n ]);\n}\n\nexport function getTransactionBufferCreateInstructionDataCodec(): Codec<\n TransactionBufferCreateInstructionDataArgs,\n TransactionBufferCreateInstructionData\n> {\n return combineCodec(\n getTransactionBufferCreateInstructionDataEncoder(),\n getTransactionBufferCreateInstructionDataDecoder()\n );\n}\n\nexport type TransactionBufferCreateInstructionExtraArgs = {\n remainingAccounts: Array<{ address: Address; role: number }>;\n};\n\nexport type TransactionBufferCreateInput<\n TAccountSettings extends string = string,\n TAccountPayer extends string = string,\n TAccountDomainConfig extends string = string,\n TAccountTransactionBuffer extends string = string,\n TAccountCreator extends string = string,\n TAccountSystemProgram extends string = string,\n TAccountInstructionsSysvar extends string = string,\n TAccountSlotHashSysvar extends string = string,\n> = {\n settings: Address<TAccountSettings>;\n payer: TransactionSigner<TAccountPayer>;\n domainConfig?: Address<TAccountDomainConfig>;\n transactionBuffer: Address<TAccountTransactionBuffer>;\n creator?: TransactionSigner<TAccountCreator>;\n systemProgram?: Address<TAccountSystemProgram>;\n instructionsSysvar?: Address<TAccountInstructionsSysvar>;\n slotHashSysvar?: Address<TAccountSlotHashSysvar>;\n args: TransactionBufferCreateInstructionDataArgs[\"args\"];\n secp256r1VerifyArgs: TransactionBufferCreateInstructionDataArgs[\"secp256r1VerifyArgs\"];\n remainingAccounts: TransactionBufferCreateInstructionExtraArgs[\"remainingAccounts\"];\n};\n\nexport function getTransactionBufferCreateInstruction<\n TAccountSettings extends string,\n TAccountPayer extends string,\n TAccountDomainConfig extends string,\n TAccountTransactionBuffer extends string,\n TAccountCreator extends string,\n TAccountSystemProgram extends string,\n TAccountInstructionsSysvar extends string,\n TAccountSlotHashSysvar extends string,\n TProgramAddress extends Address = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n>(\n input: TransactionBufferCreateInput<\n TAccountSettings,\n TAccountPayer,\n TAccountDomainConfig,\n TAccountTransactionBuffer,\n TAccountCreator,\n TAccountSystemProgram,\n TAccountInstructionsSysvar,\n TAccountSlotHashSysvar\n >,\n config?: { programAddress?: TProgramAddress }\n): TransactionBufferCreateInstruction<\n TProgramAddress,\n TAccountSettings,\n TAccountPayer,\n TAccountDomainConfig,\n TAccountTransactionBuffer,\n TAccountCreator,\n TAccountSystemProgram,\n TAccountInstructionsSysvar,\n TAccountSlotHashSysvar\n> {\n // Program address.\n const programAddress = config?.programAddress ?? MULTI_WALLET_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n settings: { value: input.settings ?? null, isWritable: false },\n payer: { value: input.payer ?? null, isWritable: true },\n domainConfig: { value: input.domainConfig ?? null, isWritable: false },\n transactionBuffer: {\n value: input.transactionBuffer ?? null,\n isWritable: true,\n },\n creator: { value: input.creator ?? null, isWritable: false },\n systemProgram: { value: input.systemProgram ?? null, isWritable: false },\n instructionsSysvar: {\n value: input.instructionsSysvar ?? null,\n isWritable: false,\n },\n slotHashSysvar: { value: input.slotHashSysvar ?? 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 // Resolver scope.\n const resolverScope = { programAddress, accounts, args };\n\n // Resolve default values.\n if (!accounts.systemProgram.value) {\n accounts.systemProgram.value =\n \"11111111111111111111111111111111\" as Address<\"11111111111111111111111111111111\">;\n }\n if (!accounts.instructionsSysvar.value) {\n accounts.instructionsSysvar.value =\n \"Sysvar1nstructions1111111111111111111111111\" as Address<\"Sysvar1nstructions1111111111111111111111111\">;\n }\n if (!accounts.slotHashSysvar.value) {\n accounts.slotHashSysvar.value =\n \"SysvarS1otHashes111111111111111111111111111\" as Address<\"SysvarS1otHashes111111111111111111111111111\">;\n }\n\n // Remaining accounts.\n const remainingAccounts: AccountMeta[] =\n parseRemainingAccounts(resolverScope);\n\n const getAccountMeta = getAccountMetaFactory(programAddress, \"programId\");\n return Object.freeze({\n accounts: [\n getAccountMeta(accounts.settings),\n getAccountMeta(accounts.payer),\n getAccountMeta(accounts.domainConfig),\n getAccountMeta(accounts.transactionBuffer),\n getAccountMeta(accounts.creator),\n getAccountMeta(accounts.systemProgram),\n getAccountMeta(accounts.instructionsSysvar),\n getAccountMeta(accounts.slotHashSysvar),\n ...remainingAccounts,\n ],\n data: getTransactionBufferCreateInstructionDataEncoder().encode(\n args as TransactionBufferCreateInstructionDataArgs\n ),\n programAddress,\n } as TransactionBufferCreateInstruction<\n TProgramAddress,\n TAccountSettings,\n TAccountPayer,\n TAccountDomainConfig,\n TAccountTransactionBuffer,\n TAccountCreator,\n TAccountSystemProgram,\n TAccountInstructionsSysvar,\n TAccountSlotHashSysvar\n >);\n}\n\nexport type ParsedTransactionBufferCreateInstruction<\n TProgram extends string = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n settings: TAccountMetas[0];\n payer: TAccountMetas[1];\n domainConfig?: TAccountMetas[2] | undefined;\n transactionBuffer: TAccountMetas[3];\n creator?: TAccountMetas[4] | undefined;\n systemProgram: TAccountMetas[5];\n instructionsSysvar: TAccountMetas[6];\n slotHashSysvar?: TAccountMetas[7] | undefined;\n };\n data: TransactionBufferCreateInstructionData;\n};\n\nexport function parseTransactionBufferCreateInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>\n): ParsedTransactionBufferCreateInstruction<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 const getNextOptionalAccount = () => {\n const accountMeta = getNextAccount();\n return accountMeta.address === MULTI_WALLET_PROGRAM_ADDRESS\n ? undefined\n : accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n settings: getNextAccount(),\n payer: getNextAccount(),\n domainConfig: getNextOptionalAccount(),\n transactionBuffer: getNextAccount(),\n creator: getNextOptionalAccount(),\n systemProgram: getNextAccount(),\n instructionsSysvar: getNextAccount(),\n slotHashSysvar: getNextOptionalAccount(),\n },\n data: getTransactionBufferCreateInstructionDataDecoder().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 getOptionDecoder,\n getOptionEncoder,\n getStructDecoder,\n getStructEncoder,\n transformEncoder,\n type AccountMeta,\n type AccountSignerMeta,\n type Address,\n type Codec,\n type Decoder,\n type Encoder,\n type Instruction,\n type InstructionWithAccounts,\n type InstructionWithData,\n type Option,\n type OptionOrNullable,\n type ReadonlyAccount,\n type ReadonlySignerAccount,\n type ReadonlyUint8Array,\n type TransactionSigner,\n type WritableAccount,\n type WritableSignerAccount,\n} from \"gill\";\nimport { parseRemainingAccounts } from \"../../hooked\";\nimport { MULTI_WALLET_PROGRAM_ADDRESS } from \"../programs\";\nimport { getAccountMetaFactory, type ResolvedAccount } from \"../shared\";\nimport {\n getProofArgsDecoder,\n getProofArgsEncoder,\n getSecp256r1VerifyArgsDecoder,\n getSecp256r1VerifyArgsEncoder,\n getSettingsReadonlyArgsDecoder,\n getSettingsReadonlyArgsEncoder,\n getTransactionBufferCreateArgsDecoder,\n getTransactionBufferCreateArgsEncoder,\n type ProofArgs,\n type ProofArgsArgs,\n type Secp256r1VerifyArgs,\n type Secp256r1VerifyArgsArgs,\n type SettingsReadonlyArgs,\n type SettingsReadonlyArgsArgs,\n type TransactionBufferCreateArgs,\n type TransactionBufferCreateArgsArgs,\n} from \"../types\";\n\nexport const TRANSACTION_BUFFER_CREATE_COMPRESSED_DISCRIMINATOR =\n new Uint8Array([20]);\n\nexport function getTransactionBufferCreateCompressedDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 1).encode(\n TRANSACTION_BUFFER_CREATE_COMPRESSED_DISCRIMINATOR\n );\n}\n\nexport type TransactionBufferCreateCompressedInstruction<\n TProgram extends string = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n TAccountPayer extends string | AccountMeta<string> = string,\n TAccountDomainConfig extends string | AccountMeta<string> = string,\n TAccountTransactionBuffer extends string | AccountMeta<string> = string,\n TAccountCreator extends string | AccountMeta<string> = string,\n TAccountSystemProgram extends\n | string\n | AccountMeta<string> = \"11111111111111111111111111111111\",\n TAccountInstructionsSysvar extends\n | string\n | AccountMeta<string> = \"Sysvar1nstructions1111111111111111111111111\",\n TAccountSlotHashSysvar extends\n | string\n | AccountMeta<string> = \"SysvarS1otHashes111111111111111111111111111\",\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountPayer extends string\n ? WritableSignerAccount<TAccountPayer> &\n AccountSignerMeta<TAccountPayer>\n : TAccountPayer,\n TAccountDomainConfig extends string\n ? ReadonlyAccount<TAccountDomainConfig>\n : TAccountDomainConfig,\n TAccountTransactionBuffer extends string\n ? WritableAccount<TAccountTransactionBuffer>\n : TAccountTransactionBuffer,\n TAccountCreator extends string\n ? ReadonlySignerAccount<TAccountCreator> &\n AccountSignerMeta<TAccountCreator>\n : TAccountCreator,\n TAccountSystemProgram extends string\n ? ReadonlyAccount<TAccountSystemProgram>\n : TAccountSystemProgram,\n TAccountInstructionsSysvar extends string\n ? ReadonlyAccount<TAccountInstructionsSysvar>\n : TAccountInstructionsSysvar,\n TAccountSlotHashSysvar extends string\n ? ReadonlyAccount<TAccountSlotHashSysvar>\n : TAccountSlotHashSysvar,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type TransactionBufferCreateCompressedInstructionData = {\n discriminator: ReadonlyUint8Array;\n args: TransactionBufferCreateArgs;\n secp256r1VerifyArgs: Option<Secp256r1VerifyArgs>;\n settingsReadonlyArgs: SettingsReadonlyArgs;\n compressedProofArgs: ProofArgs;\n};\n\nexport type TransactionBufferCreateCompressedInstructionDataArgs = {\n args: TransactionBufferCreateArgsArgs;\n secp256r1VerifyArgs: OptionOrNullable<Secp256r1VerifyArgsArgs>;\n settingsReadonlyArgs: SettingsReadonlyArgsArgs;\n compressedProofArgs: ProofArgsArgs;\n};\n\nexport function getTransactionBufferCreateCompressedInstructionDataEncoder(): Encoder<TransactionBufferCreateCompressedInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n [\"discriminator\", fixEncoderSize(getBytesEncoder(), 1)],\n [\"args\", getTransactionBufferCreateArgsEncoder()],\n [\n \"secp256r1VerifyArgs\",\n getOptionEncoder(getSecp256r1VerifyArgsEncoder()),\n ],\n [\"settingsReadonlyArgs\", getSettingsReadonlyArgsEncoder()],\n [\"compressedProofArgs\", getProofArgsEncoder()],\n ]),\n (value) => ({\n ...value,\n discriminator: TRANSACTION_BUFFER_CREATE_COMPRESSED_DISCRIMINATOR,\n })\n );\n}\n\nexport function getTransactionBufferCreateCompressedInstructionDataDecoder(): Decoder<TransactionBufferCreateCompressedInstructionData> {\n return getStructDecoder([\n [\"discriminator\", fixDecoderSize(getBytesDecoder(), 1)],\n [\"args\", getTransactionBufferCreateArgsDecoder()],\n [\"secp256r1VerifyArgs\", getOptionDecoder(getSecp256r1VerifyArgsDecoder())],\n [\"settingsReadonlyArgs\", getSettingsReadonlyArgsDecoder()],\n [\"compressedProofArgs\", getProofArgsDecoder()],\n ]);\n}\n\nexport function getTransactionBufferCreateCompressedInstructionDataCodec(): Codec<\n TransactionBufferCreateCompressedInstructionDataArgs,\n TransactionBufferCreateCompressedInstructionData\n> {\n return combineCodec(\n getTransactionBufferCreateCompressedInstructionDataEncoder(),\n getTransactionBufferCreateCompressedInstructionDataDecoder()\n );\n}\n\nexport type TransactionBufferCreateCompressedInstructionExtraArgs = {\n remainingAccounts: Array<{ address: Address; role: number }>;\n};\n\nexport type TransactionBufferCreateCompressedInput<\n TAccountPayer extends string = string,\n TAccountDomainConfig extends string = string,\n TAccountTransactionBuffer extends string = string,\n TAccountCreator extends string = string,\n TAccountSystemProgram extends string = string,\n TAccountInstructionsSysvar extends string = string,\n TAccountSlotHashSysvar extends string = string,\n> = {\n payer: TransactionSigner<TAccountPayer>;\n domainConfig?: Address<TAccountDomainConfig>;\n transactionBuffer: Address<TAccountTransactionBuffer>;\n creator?: TransactionSigner<TAccountCreator>;\n systemProgram?: Address<TAccountSystemProgram>;\n instructionsSysvar?: Address<TAccountInstructionsSysvar>;\n slotHashSysvar?: Address<TAccountSlotHashSysvar>;\n args: TransactionBufferCreateCompressedInstructionDataArgs[\"args\"];\n secp256r1VerifyArgs: TransactionBufferCreateCompressedInstructionDataArgs[\"secp256r1VerifyArgs\"];\n settingsReadonlyArgs: TransactionBufferCreateCompressedInstructionDataArgs[\"settingsReadonlyArgs\"];\n compressedProofArgs: TransactionBufferCreateCompressedInstructionDataArgs[\"compressedProofArgs\"];\n remainingAccounts: TransactionBufferCreateCompressedInstructionExtraArgs[\"remainingAccounts\"];\n};\n\nexport function getTransactionBufferCreateCompressedInstruction<\n TAccountPayer extends string,\n TAccountDomainConfig extends string,\n TAccountTransactionBuffer extends string,\n TAccountCreator extends string,\n TAccountSystemProgram extends string,\n TAccountInstructionsSysvar extends string,\n TAccountSlotHashSysvar extends string,\n TProgramAddress extends Address = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n>(\n input: TransactionBufferCreateCompressedInput<\n TAccountPayer,\n TAccountDomainConfig,\n TAccountTransactionBuffer,\n TAccountCreator,\n TAccountSystemProgram,\n TAccountInstructionsSysvar,\n TAccountSlotHashSysvar\n >,\n config?: { programAddress?: TProgramAddress }\n): TransactionBufferCreateCompressedInstruction<\n TProgramAddress,\n TAccountPayer,\n TAccountDomainConfig,\n TAccountTransactionBuffer,\n TAccountCreator,\n TAccountSystemProgram,\n TAccountInstructionsSysvar,\n TAccountSlotHashSysvar\n> {\n // Program address.\n const programAddress = config?.programAddress ?? MULTI_WALLET_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n payer: { value: input.payer ?? null, isWritable: true },\n domainConfig: { value: input.domainConfig ?? null, isWritable: false },\n transactionBuffer: {\n value: input.transactionBuffer ?? null,\n isWritable: true,\n },\n creator: { value: input.creator ?? null, isWritable: false },\n systemProgram: { value: input.systemProgram ?? null, isWritable: false },\n instructionsSysvar: {\n value: input.instructionsSysvar ?? null,\n isWritable: false,\n },\n slotHashSysvar: { value: input.slotHashSysvar ?? 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 // Resolver scope.\n const resolverScope = { programAddress, accounts, args };\n\n // Resolve default values.\n if (!accounts.systemProgram.value) {\n accounts.systemProgram.value =\n \"11111111111111111111111111111111\" as Address<\"11111111111111111111111111111111\">;\n }\n if (!accounts.instructionsSysvar.value) {\n accounts.instructionsSysvar.value =\n \"Sysvar1nstructions1111111111111111111111111\" as Address<\"Sysvar1nstructions1111111111111111111111111\">;\n }\n if (!accounts.slotHashSysvar.value) {\n accounts.slotHashSysvar.value =\n \"SysvarS1otHashes111111111111111111111111111\" as Address<\"SysvarS1otHashes111111111111111111111111111\">;\n }\n\n // Remaining accounts.\n const remainingAccounts: AccountMeta[] =\n parseRemainingAccounts(resolverScope);\n\n const getAccountMeta = getAccountMetaFactory(programAddress, \"programId\");\n return Object.freeze({\n accounts: [\n getAccountMeta(accounts.payer),\n getAccountMeta(accounts.domainConfig),\n getAccountMeta(accounts.transactionBuffer),\n getAccountMeta(accounts.creator),\n getAccountMeta(accounts.systemProgram),\n getAccountMeta(accounts.instructionsSysvar),\n getAccountMeta(accounts.slotHashSysvar),\n ...remainingAccounts,\n ],\n data: getTransactionBufferCreateCompressedInstructionDataEncoder().encode(\n args as TransactionBufferCreateCompressedInstructionDataArgs\n ),\n programAddress,\n } as TransactionBufferCreateCompressedInstruction<\n TProgramAddress,\n TAccountPayer,\n TAccountDomainConfig,\n TAccountTransactionBuffer,\n TAccountCreator,\n TAccountSystemProgram,\n TAccountInstructionsSysvar,\n TAccountSlotHashSysvar\n >);\n}\n\nexport type ParsedTransactionBufferCreateCompressedInstruction<\n TProgram extends string = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n payer: TAccountMetas[0];\n domainConfig?: TAccountMetas[1] | undefined;\n transactionBuffer: TAccountMetas[2];\n creator?: TAccountMetas[3] | undefined;\n systemProgram: TAccountMetas[4];\n instructionsSysvar: TAccountMetas[5];\n slotHashSysvar?: TAccountMetas[6] | undefined;\n };\n data: TransactionBufferCreateCompressedInstructionData;\n};\n\nexport function parseTransactionBufferCreateCompressedInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>\n): ParsedTransactionBufferCreateCompressedInstruction<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 const getNextOptionalAccount = () => {\n const accountMeta = getNextAccount();\n return accountMeta.address === MULTI_WALLET_PROGRAM_ADDRESS\n ? undefined\n : accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n payer: getNextAccount(),\n domainConfig: getNextOptionalAccount(),\n transactionBuffer: getNextAccount(),\n creator: getNextOptionalAccount(),\n systemProgram: getNextAccount(),\n instructionsSysvar: getNextAccount(),\n slotHashSysvar: getNextOptionalAccount(),\n },\n data: getTransactionBufferCreateCompressedInstructionDataDecoder().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 getOptionDecoder,\n getOptionEncoder,\n getStructDecoder,\n getStructEncoder,\n transformEncoder,\n type AccountMeta,\n type AccountSignerMeta,\n type Address,\n type Codec,\n type Decoder,\n type Encoder,\n type Instruction,\n type InstructionWithAccounts,\n type InstructionWithData,\n type Option,\n type OptionOrNullable,\n type ReadonlyAccount,\n type ReadonlySignerAccount,\n type ReadonlyUint8Array,\n type TransactionSigner,\n type WritableAccount,\n} from \"gill\";\nimport { parseRemainingAccounts } from \"../../hooked\";\nimport { MULTI_WALLET_PROGRAM_ADDRESS } from \"../programs\";\nimport { getAccountMetaFactory, type ResolvedAccount } from \"../shared\";\nimport {\n getSecp256r1VerifyArgsDecoder,\n getSecp256r1VerifyArgsEncoder,\n type Secp256r1VerifyArgs,\n type Secp256r1VerifyArgsArgs,\n} from \"../types\";\n\nexport const TRANSACTION_BUFFER_EXECUTE_DISCRIMINATOR = new Uint8Array([13]);\n\nexport function getTransactionBufferExecuteDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 1).encode(\n TRANSACTION_BUFFER_EXECUTE_DISCRIMINATOR\n );\n}\n\nexport type TransactionBufferExecuteInstruction<\n TProgram extends string = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n TAccountSettings extends string | AccountMeta<string> = string,\n TAccountDomainConfig extends string | AccountMeta<string> = string,\n TAccountExecutor extends string | AccountMeta<string> = string,\n TAccountTransactionBuffer extends string | AccountMeta<string> = string,\n TAccountSlotHashSysvar extends\n | string\n | AccountMeta<string> = \"SysvarS1otHashes111111111111111111111111111\",\n TAccountInstructionsSysvar extends\n | string\n | AccountMeta<string> = \"Sysvar1nstructions1111111111111111111111111\",\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountSettings extends string\n ? ReadonlyAccount<TAccountSettings>\n : TAccountSettings,\n TAccountDomainConfig extends string\n ? ReadonlyAccount<TAccountDomainConfig>\n : TAccountDomainConfig,\n TAccountExecutor extends string\n ? ReadonlySignerAccount<TAccountExecutor> &\n AccountSignerMeta<TAccountExecutor>\n : TAccountExecutor,\n TAccountTransactionBuffer extends string\n ? WritableAccount<TAccountTransactionBuffer>\n : TAccountTransactionBuffer,\n TAccountSlotHashSysvar extends string\n ? ReadonlyAccount<TAccountSlotHashSysvar>\n : TAccountSlotHashSysvar,\n TAccountInstructionsSysvar extends string\n ? ReadonlyAccount<TAccountInstructionsSysvar>\n : TAccountInstructionsSysvar,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type TransactionBufferExecuteInstructionData = {\n discriminator: ReadonlyUint8Array;\n secp256r1VerifyArgs: Option<Secp256r1VerifyArgs>;\n};\n\nexport type TransactionBufferExecuteInstructionDataArgs = {\n secp256r1VerifyArgs: OptionOrNullable<Secp256r1VerifyArgsArgs>;\n};\n\nexport function getTransactionBufferExecuteInstructionDataEncoder(): Encoder<TransactionBufferExecuteInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n [\"discriminator\", fixEncoderSize(getBytesEncoder(), 1)],\n [\n \"secp256r1VerifyArgs\",\n getOptionEncoder(getSecp256r1VerifyArgsEncoder()),\n ],\n ]),\n (value) => ({\n ...value,\n discriminator: TRANSACTION_BUFFER_EXECUTE_DISCRIMINATOR,\n })\n );\n}\n\nexport function getTransactionBufferExecuteInstructionDataDecoder(): Decoder<TransactionBufferExecuteInstructionData> {\n return getStructDecoder([\n [\"discriminator\", fixDecoderSize(getBytesDecoder(), 1)],\n [\"secp256r1VerifyArgs\", getOptionDecoder(getSecp256r1VerifyArgsDecoder())],\n ]);\n}\n\nexport function getTransactionBufferExecuteInstructionDataCodec(): Codec<\n TransactionBufferExecuteInstructionDataArgs,\n TransactionBufferExecuteInstructionData\n> {\n return combineCodec(\n getTransactionBufferExecuteInstructionDataEncoder(),\n getTransactionBufferExecuteInstructionDataDecoder()\n );\n}\n\nexport type TransactionBufferExecuteInstructionExtraArgs = {\n remainingAccounts: Array<{ address: Address; role: number }>;\n};\n\nexport type TransactionBufferExecuteInput<\n TAccountSettings extends string = string,\n TAccountDomainConfig extends string = string,\n TAccountExecutor extends string = string,\n TAccountTransactionBuffer extends string = string,\n TAccountSlotHashSysvar extends string = string,\n TAccountInstructionsSysvar extends string = string,\n> = {\n settings: Address<TAccountSettings>;\n domainConfig?: Address<TAccountDomainConfig>;\n executor?: TransactionSigner<TAccountExecutor>;\n transactionBuffer: Address<TAccountTransactionBuffer>;\n slotHashSysvar?: Address<TAccountSlotHashSysvar>;\n instructionsSysvar?: Address<TAccountInstructionsSysvar>;\n secp256r1VerifyArgs: TransactionBufferExecuteInstructionDataArgs[\"secp256r1VerifyArgs\"];\n remainingAccounts: TransactionBufferExecuteInstructionExtraArgs[\"remainingAccounts\"];\n};\n\nexport function getTransactionBufferExecuteInstruction<\n TAccountSettings extends string,\n TAccountDomainConfig extends string,\n TAccountExecutor extends string,\n TAccountTransactionBuffer extends string,\n TAccountSlotHashSysvar extends string,\n TAccountInstructionsSysvar extends string,\n TProgramAddress extends Address = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n>(\n input: TransactionBufferExecuteInput<\n TAccountSettings,\n TAccountDomainConfig,\n TAccountExecutor,\n TAccountTransactionBuffer,\n TAccountSlotHashSysvar,\n TAccountInstructionsSysvar\n >,\n config?: { programAddress?: TProgramAddress }\n): TransactionBufferExecuteInstruction<\n TProgramAddress,\n TAccountSettings,\n TAccountDomainConfig,\n TAccountExecutor,\n TAccountTransactionBuffer,\n TAccountSlotHashSysvar,\n TAccountInstructionsSysvar\n> {\n // Program address.\n const programAddress = config?.programAddress ?? MULTI_WALLET_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n settings: { value: input.settings ?? null, isWritable: false },\n domainConfig: { value: input.domainConfig ?? null, isWritable: false },\n executor: { value: input.executor ?? null, isWritable: false },\n transactionBuffer: {\n value: input.transactionBuffer ?? null,\n isWritable: true,\n },\n slotHashSysvar: { value: input.slotHashSysvar ?? null, isWritable: false },\n instructionsSysvar: {\n value: input.instructionsSysvar ?? null,\n isWritable: false,\n },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolver scope.\n const resolverScope = { programAddress, accounts, args };\n\n // Resolve default values.\n if (!accounts.slotHashSysvar.value) {\n accounts.slotHashSysvar.value =\n \"SysvarS1otHashes111111111111111111111111111\" as Address<\"SysvarS1otHashes111111111111111111111111111\">;\n }\n if (!accounts.instructionsSysvar.value) {\n accounts.instructionsSysvar.value =\n \"Sysvar1nstructions1111111111111111111111111\" as Address<\"Sysvar1nstructions1111111111111111111111111\">;\n }\n\n // Remaining accounts.\n const remainingAccounts: AccountMeta[] =\n parseRemainingAccounts(resolverScope);\n\n const getAccountMeta = getAccountMetaFactory(programAddress, \"programId\");\n return Object.freeze({\n accounts: [\n getAccountMeta(accounts.settings),\n getAccountMeta(accounts.domainConfig),\n getAccountMeta(accounts.executor),\n getAccountMeta(accounts.transactionBuffer),\n getAccountMeta(accounts.slotHashSysvar),\n getAccountMeta(accounts.instructionsSysvar),\n ...remainingAccounts,\n ],\n data: getTransactionBufferExecuteInstructionDataEncoder().encode(\n args as TransactionBufferExecuteInstructionDataArgs\n ),\n programAddress,\n } as TransactionBufferExecuteInstruction<\n TProgramAddress,\n TAccountSettings,\n TAccountDomainConfig,\n TAccountExecutor,\n TAccountTransactionBuffer,\n TAccountSlotHashSysvar,\n TAccountInstructionsSysvar\n >);\n}\n\nexport type ParsedTransactionBufferExecuteInstruction<\n TProgram extends string = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n settings: TAccountMetas[0];\n domainConfig?: TAccountMetas[1] | undefined;\n executor?: TAccountMetas[2] | undefined;\n transactionBuffer: TAccountMetas[3];\n slotHashSysvar?: TAccountMetas[4] | undefined;\n instructionsSysvar?: TAccountMetas[5] | undefined;\n };\n data: TransactionBufferExecuteInstructionData;\n};\n\nexport function parseTransactionBufferExecuteInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>\n): ParsedTransactionBufferExecuteInstruction<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 const getNextOptionalAccount = () => {\n const accountMeta = getNextAccount();\n return accountMeta.address === MULTI_WALLET_PROGRAM_ADDRESS\n ? undefined\n : accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n settings: getNextAccount(),\n domainConfig: getNextOptionalAccount(),\n executor: getNextOptionalAccount(),\n transactionBuffer: getNextAccount(),\n slotHashSysvar: getNextOptionalAccount(),\n instructionsSysvar: getNextOptionalAccount(),\n },\n data: getTransactionBufferExecuteInstructionDataDecoder().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 getOptionDecoder,\n getOptionEncoder,\n getStructDecoder,\n getStructEncoder,\n transformEncoder,\n type AccountMeta,\n type AccountSignerMeta,\n type Address,\n type Codec,\n type Decoder,\n type Encoder,\n type Instruction,\n type InstructionWithAccounts,\n type InstructionWithData,\n type Option,\n type OptionOrNullable,\n type ReadonlyAccount,\n type ReadonlySignerAccount,\n type ReadonlyUint8Array,\n type TransactionSigner,\n type WritableAccount,\n type WritableSignerAccount,\n} from \"gill\";\nimport { parseRemainingAccounts } from \"../../hooked\";\nimport { MULTI_WALLET_PROGRAM_ADDRESS } from \"../programs\";\nimport { getAccountMetaFactory, type ResolvedAccount } from \"../shared\";\nimport {\n getProofArgsDecoder,\n getProofArgsEncoder,\n getSecp256r1VerifyArgsDecoder,\n getSecp256r1VerifyArgsEncoder,\n getSettingsReadonlyArgsDecoder,\n getSettingsReadonlyArgsEncoder,\n type ProofArgs,\n type ProofArgsArgs,\n type Secp256r1VerifyArgs,\n type Secp256r1VerifyArgsArgs,\n type SettingsReadonlyArgs,\n type SettingsReadonlyArgsArgs,\n} from \"../types\";\n\nexport const TRANSACTION_BUFFER_EXECUTE_COMPRESSED_DISCRIMINATOR =\n new Uint8Array([24]);\n\nexport function getTransactionBufferExecuteCompressedDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 1).encode(\n TRANSACTION_BUFFER_EXECUTE_COMPRESSED_DISCRIMINATOR\n );\n}\n\nexport type TransactionBufferExecuteCompressedInstruction<\n TProgram extends string = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n TAccountPayer extends string | AccountMeta<string> = string,\n TAccountDomainConfig extends string | AccountMeta<string> = string,\n TAccountExecutor extends string | AccountMeta<string> = string,\n TAccountTransactionBuffer extends string | AccountMeta<string> = string,\n TAccountSlotHashSysvar extends\n | string\n | AccountMeta<string> = \"SysvarS1otHashes111111111111111111111111111\",\n TAccountInstructionsSysvar extends\n | string\n | AccountMeta<string> = \"Sysvar1nstructions1111111111111111111111111\",\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountPayer extends string\n ? WritableSignerAccount<TAccountPayer> &\n AccountSignerMeta<TAccountPayer>\n : TAccountPayer,\n TAccountDomainConfig extends string\n ? ReadonlyAccount<TAccountDomainConfig>\n : TAccountDomainConfig,\n TAccountExecutor extends string\n ? ReadonlySignerAccount<TAccountExecutor> &\n AccountSignerMeta<TAccountExecutor>\n : TAccountExecutor,\n TAccountTransactionBuffer extends string\n ? WritableAccount<TAccountTransactionBuffer>\n : TAccountTransactionBuffer,\n TAccountSlotHashSysvar extends string\n ? ReadonlyAccount<TAccountSlotHashSysvar>\n : TAccountSlotHashSysvar,\n TAccountInstructionsSysvar extends string\n ? ReadonlyAccount<TAccountInstructionsSysvar>\n : TAccountInstructionsSysvar,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type TransactionBufferExecuteCompressedInstructionData = {\n discriminator: ReadonlyUint8Array;\n secp256r1VerifyArgs: Option<Secp256r1VerifyArgs>;\n settingsReadonlyArgs: SettingsReadonlyArgs;\n compressedProofArgs: ProofArgs;\n};\n\nexport type TransactionBufferExecuteCompressedInstructionDataArgs = {\n secp256r1VerifyArgs: OptionOrNullable<Secp256r1VerifyArgsArgs>;\n settingsReadonlyArgs: SettingsReadonlyArgsArgs;\n compressedProofArgs: ProofArgsArgs;\n};\n\nexport function getTransactionBufferExecuteCompressedInstructionDataEncoder(): Encoder<TransactionBufferExecuteCompressedInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n [\"discriminator\", fixEncoderSize(getBytesEncoder(), 1)],\n [\n \"secp256r1VerifyArgs\",\n getOptionEncoder(getSecp256r1VerifyArgsEncoder()),\n ],\n [\"settingsReadonlyArgs\", getSettingsReadonlyArgsEncoder()],\n [\"compressedProofArgs\", getProofArgsEncoder()],\n ]),\n (value) => ({\n ...value,\n discriminator: TRANSACTION_BUFFER_EXECUTE_COMPRESSED_DISCRIMINATOR,\n })\n );\n}\n\nexport function getTransactionBufferExecuteCompressedInstructionDataDecoder(): Decoder<TransactionBufferExecuteCompressedInstructionData> {\n return getStructDecoder([\n [\"discriminator\", fixDecoderSize(getBytesDecoder(), 1)],\n [\"secp256r1VerifyArgs\", getOptionDecoder(getSecp256r1VerifyArgsDecoder())],\n [\"settingsReadonlyArgs\", getSettingsReadonlyArgsDecoder()],\n [\"compressedProofArgs\", getProofArgsDecoder()],\n ]);\n}\n\nexport function getTransactionBufferExecuteCompressedInstructionDataCodec(): Codec<\n TransactionBufferExecuteCompressedInstructionDataArgs,\n TransactionBufferExecuteCompressedInstructionData\n> {\n return combineCodec(\n getTransactionBufferExecuteCompressedInstructionDataEncoder(),\n getTransactionBufferExecuteCompressedInstructionDataDecoder()\n );\n}\n\nexport type TransactionBufferExecuteCompressedInstructionExtraArgs = {\n remainingAccounts: Array<{ address: Address; role: number }>;\n};\n\nexport type TransactionBufferExecuteCompressedInput<\n TAccountPayer extends string = string,\n TAccountDomainConfig extends string = string,\n TAccountExecutor extends string = string,\n TAccountTransactionBuffer extends string = string,\n TAccountSlotHashSysvar extends string = string,\n TAccountInstructionsSysvar extends string = string,\n> = {\n payer: TransactionSigner<TAccountPayer>;\n domainConfig?: Address<TAccountDomainConfig>;\n executor?: TransactionSigner<TAccountExecutor>;\n transactionBuffer: Address<TAccountTransactionBuffer>;\n slotHashSysvar?: Address<TAccountSlotHashSysvar>;\n instructionsSysvar?: Address<TAccountInstructionsSysvar>;\n secp256r1VerifyArgs: TransactionBufferExecuteCompressedInstructionDataArgs[\"secp256r1VerifyArgs\"];\n settingsReadonlyArgs: TransactionBufferExecuteCompressedInstructionDataArgs[\"settingsReadonlyArgs\"];\n compressedProofArgs: TransactionBufferExecuteCompressedInstructionDataArgs[\"compressedProofArgs\"];\n remainingAccounts: TransactionBufferExecuteCompressedInstructionExtraArgs[\"remainingAccounts\"];\n};\n\nexport function getTransactionBufferExecuteCompressedInstruction<\n TAccountPayer extends string,\n TAccountDomainConfig extends string,\n TAccountExecutor extends string,\n TAccountTransactionBuffer extends string,\n TAccountSlotHashSysvar extends string,\n TAccountInstructionsSysvar extends string,\n TProgramAddress extends Address = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n>(\n input: TransactionBufferExecuteCompressedInput<\n TAccountPayer,\n TAccountDomainConfig,\n TAccountExecutor,\n TAccountTransactionBuffer,\n TAccountSlotHashSysvar,\n TAccountInstructionsSysvar\n >,\n config?: { programAddress?: TProgramAddress }\n): TransactionBufferExecuteCompressedInstruction<\n TProgramAddress,\n TAccountPayer,\n TAccountDomainConfig,\n TAccountExecutor,\n TAccountTransactionBuffer,\n TAccountSlotHashSysvar,\n TAccountInstructionsSysvar\n> {\n // Program address.\n const programAddress = config?.programAddress ?? MULTI_WALLET_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n payer: { value: input.payer ?? null, isWritable: true },\n domainConfig: { value: input.domainConfig ?? null, isWritable: false },\n executor: { value: input.executor ?? null, isWritable: false },\n transactionBuffer: {\n value: input.transactionBuffer ?? null,\n isWritable: true,\n },\n slotHashSysvar: { value: input.slotHashSysvar ?? null, isWritable: false },\n instructionsSysvar: {\n value: input.instructionsSysvar ?? null,\n isWritable: false,\n },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolver scope.\n const resolverScope = { programAddress, accounts, args };\n\n // Resolve default values.\n if (!accounts.slotHashSysvar.value) {\n accounts.slotHashSysvar.value =\n \"SysvarS1otHashes111111111111111111111111111\" as Address<\"SysvarS1otHashes111111111111111111111111111\">;\n }\n if (!accounts.instructionsSysvar.value) {\n accounts.instructionsSysvar.value =\n \"Sysvar1nstructions1111111111111111111111111\" as Address<\"Sysvar1nstructions1111111111111111111111111\">;\n }\n\n // Remaining accounts.\n const remainingAccounts: AccountMeta[] =\n parseRemainingAccounts(resolverScope);\n\n const getAccountMeta = getAccountMetaFactory(programAddress, \"programId\");\n return Object.freeze({\n accounts: [\n getAccountMeta(accounts.payer),\n getAccountMeta(accounts.domainConfig),\n getAccountMeta(accounts.executor),\n getAccountMeta(accounts.transactionBuffer),\n getAccountMeta(accounts.slotHashSysvar),\n getAccountMeta(accounts.instructionsSysvar),\n ...remainingAccounts,\n ],\n data: getTransactionBufferExecuteCompressedInstructionDataEncoder().encode(\n args as TransactionBufferExecuteCompressedInstructionDataArgs\n ),\n programAddress,\n } as TransactionBufferExecuteCompressedInstruction<\n TProgramAddress,\n TAccountPayer,\n TAccountDomainConfig,\n TAccountExecutor,\n TAccountTransactionBuffer,\n TAccountSlotHashSysvar,\n TAccountInstructionsSysvar\n >);\n}\n\nexport type ParsedTransactionBufferExecuteCompressedInstruction<\n TProgram extends string = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n payer: TAccountMetas[0];\n domainConfig?: TAccountMetas[1] | undefined;\n executor?: TAccountMetas[2] | undefined;\n transactionBuffer: TAccountMetas[3];\n slotHashSysvar?: TAccountMetas[4] | undefined;\n instructionsSysvar?: TAccountMetas[5] | undefined;\n };\n data: TransactionBufferExecuteCompressedInstructionData;\n};\n\nexport function parseTransactionBufferExecuteCompressedInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>\n): ParsedTransactionBufferExecuteCompressedInstruction<\n TProgram,\n TAccountMetas\n> {\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 const getNextOptionalAccount = () => {\n const accountMeta = getNextAccount();\n return accountMeta.address === MULTI_WALLET_PROGRAM_ADDRESS\n ? undefined\n : accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n payer: getNextAccount(),\n domainConfig: getNextOptionalAccount(),\n executor: getNextOptionalAccount(),\n transactionBuffer: getNextAccount(),\n slotHashSysvar: getNextOptionalAccount(),\n instructionsSysvar: getNextOptionalAccount(),\n },\n data: getTransactionBufferExecuteCompressedInstructionDataDecoder().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 transformEncoder,\n type AccountMeta,\n type Address,\n type Codec,\n type Decoder,\n type Encoder,\n type Instruction,\n type InstructionWithAccounts,\n type InstructionWithData,\n type ReadonlyAccount,\n type ReadonlyUint8Array,\n type WritableAccount,\n} from \"gill\";\nimport { parseRemainingAccounts } from \"../../hooked\";\nimport { MULTI_WALLET_PROGRAM_ADDRESS } from \"../programs\";\nimport { getAccountMetaFactory, type ResolvedAccount } from \"../shared\";\n\nexport const TRANSACTION_BUFFER_EXTEND_DISCRIMINATOR = new Uint8Array([11]);\n\nexport function getTransactionBufferExtendDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 1).encode(\n TRANSACTION_BUFFER_EXTEND_DISCRIMINATOR\n );\n}\n\nexport type TransactionBufferExtendInstruction<\n TProgram extends string = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n TAccountSettings extends string | AccountMeta<string> = string,\n TAccountTransactionBuffer extends string | AccountMeta<string> = string,\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountSettings extends string\n ? ReadonlyAccount<TAccountSettings>\n : TAccountSettings,\n TAccountTransactionBuffer extends string\n ? WritableAccount<TAccountTransactionBuffer>\n : TAccountTransactionBuffer,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type TransactionBufferExtendInstructionData = {\n discriminator: ReadonlyUint8Array;\n buffer: ReadonlyUint8Array;\n};\n\nexport type TransactionBufferExtendInstructionDataArgs = {\n buffer: ReadonlyUint8Array;\n};\n\nexport function getTransactionBufferExtendInstructionDataEncoder(): Encoder<TransactionBufferExtendInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n [\"discriminator\", fixEncoderSize(getBytesEncoder(), 1)],\n [\"buffer\", addEncoderSizePrefix(getBytesEncoder(), getU32Encoder())],\n ]),\n (value) => ({\n ...value,\n discriminator: TRANSACTION_BUFFER_EXTEND_DISCRIMINATOR,\n })\n );\n}\n\nexport function getTransactionBufferExtendInstructionDataDecoder(): Decoder<TransactionBufferExtendInstructionData> {\n return getStructDecoder([\n [\"discriminator\", fixDecoderSize(getBytesDecoder(), 1)],\n [\"buffer\", addDecoderSizePrefix(getBytesDecoder(), getU32Decoder())],\n ]);\n}\n\nexport function getTransactionBufferExtendInstructionDataCodec(): Codec<\n TransactionBufferExtendInstructionDataArgs,\n TransactionBufferExtendInstructionData\n> {\n return combineCodec(\n getTransactionBufferExtendInstructionDataEncoder(),\n getTransactionBufferExtendInstructionDataDecoder()\n );\n}\n\nexport type TransactionBufferExtendInstructionExtraArgs = {\n remainingAccounts: Array<{ address: Address; role: number }>;\n};\n\nexport type TransactionBufferExtendInput<\n TAccountSettings extends string = string,\n TAccountTransactionBuffer extends string = string,\n> = {\n settings: Address<TAccountSettings>;\n transactionBuffer: Address<TAccountTransactionBuffer>;\n buffer: TransactionBufferExtendInstructionDataArgs[\"buffer\"];\n remainingAccounts: TransactionBufferExtendInstructionExtraArgs[\"remainingAccounts\"];\n};\n\nexport function getTransactionBufferExtendInstruction<\n TAccountSettings extends string,\n TAccountTransactionBuffer extends string,\n TProgramAddress extends Address = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n>(\n input: TransactionBufferExtendInput<\n TAccountSettings,\n TAccountTransactionBuffer\n >,\n config?: { programAddress?: TProgramAddress }\n): TransactionBufferExtendInstruction<\n TProgramAddress,\n TAccountSettings,\n TAccountTransactionBuffer\n> {\n // Program address.\n const programAddress = config?.programAddress ?? MULTI_WALLET_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n settings: { value: input.settings ?? null, isWritable: false },\n transactionBuffer: {\n value: input.transactionBuffer ?? null,\n isWritable: true,\n },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolver scope.\n const resolverScope = { programAddress, accounts, args };\n\n // Remaining accounts.\n const remainingAccounts: AccountMeta[] =\n parseRemainingAccounts(resolverScope);\n\n const getAccountMeta = getAccountMetaFactory(programAddress, \"programId\");\n return Object.freeze({\n accounts: [\n getAccountMeta(accounts.settings),\n getAccountMeta(accounts.transactionBuffer),\n ...remainingAccounts,\n ],\n data: getTransactionBufferExtendInstructionDataEncoder().encode(\n args as TransactionBufferExtendInstructionDataArgs\n ),\n programAddress,\n } as TransactionBufferExtendInstruction<\n TProgramAddress,\n TAccountSettings,\n TAccountTransactionBuffer\n >);\n}\n\nexport type ParsedTransactionBufferExtendInstruction<\n TProgram extends string = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n settings: TAccountMetas[0];\n transactionBuffer: TAccountMetas[1];\n };\n data: TransactionBufferExtendInstructionData;\n};\n\nexport function parseTransactionBufferExtendInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>\n): ParsedTransactionBufferExtendInstruction<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 settings: getNextAccount(),\n transactionBuffer: getNextAccount(),\n },\n data: getTransactionBufferExtendInstructionDataDecoder().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 getStructDecoder,\n getStructEncoder,\n getU32Decoder,\n getU32Encoder,\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 ReadonlyUint8Array,\n type WritableAccount,\n} from \"gill\";\nimport { parseRemainingAccounts } from \"../../hooked\";\nimport { MULTI_WALLET_PROGRAM_ADDRESS } from \"../programs\";\nimport { getAccountMetaFactory, type ResolvedAccount } from \"../shared\";\n\nexport const TRANSACTION_BUFFER_EXTEND_COMPRESSED_DISCRIMINATOR =\n new Uint8Array([22]);\n\nexport function getTransactionBufferExtendCompressedDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 1).encode(\n TRANSACTION_BUFFER_EXTEND_COMPRESSED_DISCRIMINATOR\n );\n}\n\nexport type TransactionBufferExtendCompressedInstruction<\n TProgram extends string = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n TAccountTransactionBuffer extends string | AccountMeta<string> = string,\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountTransactionBuffer extends string\n ? WritableAccount<TAccountTransactionBuffer>\n : TAccountTransactionBuffer,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type TransactionBufferExtendCompressedInstructionData = {\n discriminator: ReadonlyUint8Array;\n buffer: ReadonlyUint8Array;\n settingsKey: Address;\n};\n\nexport type TransactionBufferExtendCompressedInstructionDataArgs = {\n buffer: ReadonlyUint8Array;\n settingsKey: Address;\n};\n\nexport function getTransactionBufferExtendCompressedInstructionDataEncoder(): Encoder<TransactionBufferExtendCompressedInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n [\"discriminator\", fixEncoderSize(getBytesEncoder(), 1)],\n [\"buffer\", addEncoderSizePrefix(getBytesEncoder(), getU32Encoder())],\n [\"settingsKey\", getAddressEncoder()],\n ]),\n (value) => ({\n ...value,\n discriminator: TRANSACTION_BUFFER_EXTEND_COMPRESSED_DISCRIMINATOR,\n })\n );\n}\n\nexport function getTransactionBufferExtendCompressedInstructionDataDecoder(): Decoder<TransactionBufferExtendCompressedInstructionData> {\n return getStructDecoder([\n [\"discriminator\", fixDecoderSize(getBytesDecoder(), 1)],\n [\"buffer\", addDecoderSizePrefix(getBytesDecoder(), getU32Decoder())],\n [\"settingsKey\", getAddressDecoder()],\n ]);\n}\n\nexport function getTransactionBufferExtendCompressedInstructionDataCodec(): Codec<\n TransactionBufferExtendCompressedInstructionDataArgs,\n TransactionBufferExtendCompressedInstructionData\n> {\n return combineCodec(\n getTransactionBufferExtendCompressedInstructionDataEncoder(),\n getTransactionBufferExtendCompressedInstructionDataDecoder()\n );\n}\n\nexport type TransactionBufferExtendCompressedInstructionExtraArgs = {\n remainingAccounts: Array<{ address: Address; role: number }>;\n};\n\nexport type TransactionBufferExtendCompressedInput<\n TAccountTransactionBuffer extends string = string,\n> = {\n transactionBuffer: Address<TAccountTransactionBuffer>;\n buffer: TransactionBufferExtendCompressedInstructionDataArgs[\"buffer\"];\n settingsKey: TransactionBufferExtendCompressedInstructionDataArgs[\"settingsKey\"];\n remainingAccounts: TransactionBufferExtendCompressedInstructionExtraArgs[\"remainingAccounts\"];\n};\n\nexport function getTransactionBufferExtendCompressedInstruction<\n TAccountTransactionBuffer extends string,\n TProgramAddress extends Address = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n>(\n input: TransactionBufferExtendCompressedInput<TAccountTransactionBuffer>,\n config?: { programAddress?: TProgramAddress }\n): TransactionBufferExtendCompressedInstruction<\n TProgramAddress,\n TAccountTransactionBuffer\n> {\n // Program address.\n const programAddress = config?.programAddress ?? MULTI_WALLET_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n transactionBuffer: {\n value: input.transactionBuffer ?? null,\n isWritable: true,\n },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolver scope.\n const resolverScope = { programAddress, accounts, args };\n\n // Remaining accounts.\n const remainingAccounts: AccountMeta[] =\n parseRemainingAccounts(resolverScope);\n\n const getAccountMeta = getAccountMetaFactory(programAddress, \"programId\");\n return Object.freeze({\n accounts: [\n getAccountMeta(accounts.transactionBuffer),\n ...remainingAccounts,\n ],\n data: getTransactionBufferExtendCompressedInstructionDataEncoder().encode(\n args as TransactionBufferExtendCompressedInstructionDataArgs\n ),\n programAddress,\n } as TransactionBufferExtendCompressedInstruction<\n TProgramAddress,\n TAccountTransactionBuffer\n >);\n}\n\nexport type ParsedTransactionBufferExtendCompressedInstruction<\n TProgram extends string = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n transactionBuffer: TAccountMetas[0];\n };\n data: TransactionBufferExtendCompressedInstructionData;\n};\n\nexport function parseTransactionBufferExtendCompressedInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>\n): ParsedTransactionBufferExtendCompressedInstruction<TProgram, TAccountMetas> {\n if (instruction.accounts.length < 1) {\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: { transactionBuffer: getNextAccount() },\n data: getTransactionBufferExtendCompressedInstructionDataDecoder().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 getOptionDecoder,\n getOptionEncoder,\n getStructDecoder,\n getStructEncoder,\n transformEncoder,\n type AccountMeta,\n type AccountSignerMeta,\n type Address,\n type Codec,\n type Decoder,\n type Encoder,\n type Instruction,\n type InstructionWithAccounts,\n type InstructionWithData,\n type Option,\n type OptionOrNullable,\n type ReadonlyAccount,\n type ReadonlySignerAccount,\n type ReadonlyUint8Array,\n type TransactionSigner,\n type WritableAccount,\n} from \"gill\";\nimport { parseRemainingAccounts } from \"../../hooked\";\nimport { MULTI_WALLET_PROGRAM_ADDRESS } from \"../programs\";\nimport { getAccountMetaFactory, type ResolvedAccount } from \"../shared\";\nimport {\n getSecp256r1VerifyArgsDecoder,\n getSecp256r1VerifyArgsEncoder,\n type Secp256r1VerifyArgs,\n type Secp256r1VerifyArgsArgs,\n} from \"../types\";\n\nexport const TRANSACTION_BUFFER_VOTE_DISCRIMINATOR = new Uint8Array([10]);\n\nexport function getTransactionBufferVoteDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 1).encode(\n TRANSACTION_BUFFER_VOTE_DISCRIMINATOR\n );\n}\n\nexport type TransactionBufferVoteInstruction<\n TProgram extends string = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n TAccountSettings extends string | AccountMeta<string> = string,\n TAccountDomainConfig extends string | AccountMeta<string> = string,\n TAccountTransactionBuffer extends string | AccountMeta<string> = string,\n TAccountVoter extends string | AccountMeta<string> = string,\n TAccountSystemProgram extends\n | string\n | AccountMeta<string> = \"11111111111111111111111111111111\",\n TAccountSlotHashSysvar extends\n | string\n | AccountMeta<string> = \"SysvarS1otHashes111111111111111111111111111\",\n TAccountInstructionsSysvar extends\n | string\n | AccountMeta<string> = \"Sysvar1nstructions1111111111111111111111111\",\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountSettings extends string\n ? ReadonlyAccount<TAccountSettings>\n : TAccountSettings,\n TAccountDomainConfig extends string\n ? ReadonlyAccount<TAccountDomainConfig>\n : TAccountDomainConfig,\n TAccountTransactionBuffer extends string\n ? WritableAccount<TAccountTransactionBuffer>\n : TAccountTransactionBuffer,\n TAccountVoter extends string\n ? ReadonlySignerAccount<TAccountVoter> &\n AccountSignerMeta<TAccountVoter>\n : TAccountVoter,\n TAccountSystemProgram extends string\n ? ReadonlyAccount<TAccountSystemProgram>\n : TAccountSystemProgram,\n TAccountSlotHashSysvar extends string\n ? ReadonlyAccount<TAccountSlotHashSysvar>\n : TAccountSlotHashSysvar,\n TAccountInstructionsSysvar extends string\n ? ReadonlyAccount<TAccountInstructionsSysvar>\n : TAccountInstructionsSysvar,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type TransactionBufferVoteInstructionData = {\n discriminator: ReadonlyUint8Array;\n secp256r1VerifyArgs: Option<Secp256r1VerifyArgs>;\n};\n\nexport type TransactionBufferVoteInstructionDataArgs = {\n secp256r1VerifyArgs: OptionOrNullable<Secp256r1VerifyArgsArgs>;\n};\n\nexport function getTransactionBufferVoteInstructionDataEncoder(): Encoder<TransactionBufferVoteInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n [\"discriminator\", fixEncoderSize(getBytesEncoder(), 1)],\n [\n \"secp256r1VerifyArgs\",\n getOptionEncoder(getSecp256r1VerifyArgsEncoder()),\n ],\n ]),\n (value) => ({\n ...value,\n discriminator: TRANSACTION_BUFFER_VOTE_DISCRIMINATOR,\n })\n );\n}\n\nexport function getTransactionBufferVoteInstructionDataDecoder(): Decoder<TransactionBufferVoteInstructionData> {\n return getStructDecoder([\n [\"discriminator\", fixDecoderSize(getBytesDecoder(), 1)],\n [\"secp256r1VerifyArgs\", getOptionDecoder(getSecp256r1VerifyArgsDecoder())],\n ]);\n}\n\nexport function getTransactionBufferVoteInstructionDataCodec(): Codec<\n TransactionBufferVoteInstructionDataArgs,\n TransactionBufferVoteInstructionData\n> {\n return combineCodec(\n getTransactionBufferVoteInstructionDataEncoder(),\n getTransactionBufferVoteInstructionDataDecoder()\n );\n}\n\nexport type TransactionBufferVoteInstructionExtraArgs = {\n remainingAccounts: Array<{ address: Address; role: number }>;\n};\n\nexport type TransactionBufferVoteInput<\n TAccountSettings extends string = string,\n TAccountDomainConfig extends string = string,\n TAccountTransactionBuffer extends string = string,\n TAccountVoter extends string = string,\n TAccountSystemProgram extends string = string,\n TAccountSlotHashSysvar extends string = string,\n TAccountInstructionsSysvar extends string = string,\n> = {\n settings: Address<TAccountSettings>;\n domainConfig?: Address<TAccountDomainConfig>;\n transactionBuffer: Address<TAccountTransactionBuffer>;\n voter?: TransactionSigner<TAccountVoter>;\n systemProgram?: Address<TAccountSystemProgram>;\n slotHashSysvar?: Address<TAccountSlotHashSysvar>;\n instructionsSysvar?: Address<TAccountInstructionsSysvar>;\n secp256r1VerifyArgs: TransactionBufferVoteInstructionDataArgs[\"secp256r1VerifyArgs\"];\n remainingAccounts: TransactionBufferVoteInstructionExtraArgs[\"remainingAccounts\"];\n};\n\nexport function getTransactionBufferVoteInstruction<\n TAccountSettings extends string,\n TAccountDomainConfig extends string,\n TAccountTransactionBuffer extends string,\n TAccountVoter extends string,\n TAccountSystemProgram extends string,\n TAccountSlotHashSysvar extends string,\n TAccountInstructionsSysvar extends string,\n TProgramAddress extends Address = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n>(\n input: TransactionBufferVoteInput<\n TAccountSettings,\n TAccountDomainConfig,\n TAccountTransactionBuffer,\n TAccountVoter,\n TAccountSystemProgram,\n TAccountSlotHashSysvar,\n TAccountInstructionsSysvar\n >,\n config?: { programAddress?: TProgramAddress }\n): TransactionBufferVoteInstruction<\n TProgramAddress,\n TAccountSettings,\n TAccountDomainConfig,\n TAccountTransactionBuffer,\n TAccountVoter,\n TAccountSystemProgram,\n TAccountSlotHashSysvar,\n TAccountInstructionsSysvar\n> {\n // Program address.\n const programAddress = config?.programAddress ?? MULTI_WALLET_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n settings: { value: input.settings ?? null, isWritable: false },\n domainConfig: { value: input.domainConfig ?? null, isWritable: false },\n transactionBuffer: {\n value: input.transactionBuffer ?? null,\n isWritable: true,\n },\n voter: { value: input.voter ?? null, isWritable: false },\n systemProgram: { value: input.systemProgram ?? null, isWritable: false },\n slotHashSysvar: { value: input.slotHashSysvar ?? null, isWritable: false },\n instructionsSysvar: {\n value: input.instructionsSysvar ?? null,\n isWritable: false,\n },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolver scope.\n const resolverScope = { programAddress, accounts, args };\n\n // Resolve default values.\n if (!accounts.systemProgram.value) {\n accounts.systemProgram.value =\n \"11111111111111111111111111111111\" as Address<\"11111111111111111111111111111111\">;\n }\n if (!accounts.slotHashSysvar.value) {\n accounts.slotHashSysvar.value =\n \"SysvarS1otHashes111111111111111111111111111\" as Address<\"SysvarS1otHashes111111111111111111111111111\">;\n }\n if (!accounts.instructionsSysvar.value) {\n accounts.instructionsSysvar.value =\n \"Sysvar1nstructions1111111111111111111111111\" as Address<\"Sysvar1nstructions1111111111111111111111111\">;\n }\n\n // Remaining accounts.\n const remainingAccounts: AccountMeta[] =\n parseRemainingAccounts(resolverScope);\n\n const getAccountMeta = getAccountMetaFactory(programAddress, \"programId\");\n return Object.freeze({\n accounts: [\n getAccountMeta(accounts.settings),\n getAccountMeta(accounts.domainConfig),\n getAccountMeta(accounts.transactionBuffer),\n getAccountMeta(accounts.voter),\n getAccountMeta(accounts.systemProgram),\n getAccountMeta(accounts.slotHashSysvar),\n getAccountMeta(accounts.instructionsSysvar),\n ...remainingAccounts,\n ],\n data: getTransactionBufferVoteInstructionDataEncoder().encode(\n args as TransactionBufferVoteInstructionDataArgs\n ),\n programAddress,\n } as TransactionBufferVoteInstruction<\n TProgramAddress,\n TAccountSettings,\n TAccountDomainConfig,\n TAccountTransactionBuffer,\n TAccountVoter,\n TAccountSystemProgram,\n TAccountSlotHashSysvar,\n TAccountInstructionsSysvar\n >);\n}\n\nexport type ParsedTransactionBufferVoteInstruction<\n TProgram extends string = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n settings: TAccountMetas[0];\n domainConfig?: TAccountMetas[1] | undefined;\n transactionBuffer: TAccountMetas[2];\n voter?: TAccountMetas[3] | undefined;\n systemProgram: TAccountMetas[4];\n slotHashSysvar?: TAccountMetas[5] | undefined;\n instructionsSysvar?: TAccountMetas[6] | undefined;\n };\n data: TransactionBufferVoteInstructionData;\n};\n\nexport function parseTransactionBufferVoteInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>\n): ParsedTransactionBufferVoteInstruction<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 const getNextOptionalAccount = () => {\n const accountMeta = getNextAccount();\n return accountMeta.address === MULTI_WALLET_PROGRAM_ADDRESS\n ? undefined\n : accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n settings: getNextAccount(),\n domainConfig: getNextOptionalAccount(),\n transactionBuffer: getNextAccount(),\n voter: getNextOptionalAccount(),\n systemProgram: getNextAccount(),\n slotHashSysvar: getNextOptionalAccount(),\n instructionsSysvar: getNextOptionalAccount(),\n },\n data: getTransactionBufferVoteInstructionDataDecoder().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 getOptionDecoder,\n getOptionEncoder,\n getStructDecoder,\n getStructEncoder,\n transformEncoder,\n type AccountMeta,\n type AccountSignerMeta,\n type Address,\n type Codec,\n type Decoder,\n type Encoder,\n type Instruction,\n type InstructionWithAccounts,\n type InstructionWithData,\n type Option,\n type OptionOrNullable,\n type ReadonlyAccount,\n type ReadonlySignerAccount,\n type ReadonlyUint8Array,\n type TransactionSigner,\n type WritableAccount,\n type WritableSignerAccount,\n} from \"gill\";\nimport { parseRemainingAccounts } from \"../../hooked\";\nimport { MULTI_WALLET_PROGRAM_ADDRESS } from \"../programs\";\nimport { getAccountMetaFactory, type ResolvedAccount } from \"../shared\";\nimport {\n getProofArgsDecoder,\n getProofArgsEncoder,\n getSecp256r1VerifyArgsDecoder,\n getSecp256r1VerifyArgsEncoder,\n getSettingsReadonlyArgsDecoder,\n getSettingsReadonlyArgsEncoder,\n type ProofArgs,\n type ProofArgsArgs,\n type Secp256r1VerifyArgs,\n type Secp256r1VerifyArgsArgs,\n type SettingsReadonlyArgs,\n type SettingsReadonlyArgsArgs,\n} from \"../types\";\n\nexport const TRANSACTION_BUFFER_VOTE_COMPRESSED_DISCRIMINATOR = new Uint8Array([\n 21,\n]);\n\nexport function getTransactionBufferVoteCompressedDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 1).encode(\n TRANSACTION_BUFFER_VOTE_COMPRESSED_DISCRIMINATOR\n );\n}\n\nexport type TransactionBufferVoteCompressedInstruction<\n TProgram extends string = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n TAccountPayer extends string | AccountMeta<string> = string,\n TAccountDomainConfig extends string | AccountMeta<string> = string,\n TAccountTransactionBuffer extends string | AccountMeta<string> = string,\n TAccountVoter extends string | AccountMeta<string> = string,\n TAccountSystemProgram extends\n | string\n | AccountMeta<string> = \"11111111111111111111111111111111\",\n TAccountSlotHashSysvar extends\n | string\n | AccountMeta<string> = \"SysvarS1otHashes111111111111111111111111111\",\n TAccountInstructionsSysvar extends\n | string\n | AccountMeta<string> = \"Sysvar1nstructions1111111111111111111111111\",\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountPayer extends string\n ? WritableSignerAccount<TAccountPayer> &\n AccountSignerMeta<TAccountPayer>\n : TAccountPayer,\n TAccountDomainConfig extends string\n ? ReadonlyAccount<TAccountDomainConfig>\n : TAccountDomainConfig,\n TAccountTransactionBuffer extends string\n ? WritableAccount<TAccountTransactionBuffer>\n : TAccountTransactionBuffer,\n TAccountVoter extends string\n ? ReadonlySignerAccount<TAccountVoter> &\n AccountSignerMeta<TAccountVoter>\n : TAccountVoter,\n TAccountSystemProgram extends string\n ? ReadonlyAccount<TAccountSystemProgram>\n : TAccountSystemProgram,\n TAccountSlotHashSysvar extends string\n ? ReadonlyAccount<TAccountSlotHashSysvar>\n : TAccountSlotHashSysvar,\n TAccountInstructionsSysvar extends string\n ? ReadonlyAccount<TAccountInstructionsSysvar>\n : TAccountInstructionsSysvar,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type TransactionBufferVoteCompressedInstructionData = {\n discriminator: ReadonlyUint8Array;\n secp256r1VerifyArgs: Option<Secp256r1VerifyArgs>;\n settingsReadonlyArgs: SettingsReadonlyArgs;\n compressedProofArgs: ProofArgs;\n};\n\nexport type TransactionBufferVoteCompressedInstructionDataArgs = {\n secp256r1VerifyArgs: OptionOrNullable<Secp256r1VerifyArgsArgs>;\n settingsReadonlyArgs: SettingsReadonlyArgsArgs;\n compressedProofArgs: ProofArgsArgs;\n};\n\nexport function getTransactionBufferVoteCompressedInstructionDataEncoder(): Encoder<TransactionBufferVoteCompressedInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n [\"discriminator\", fixEncoderSize(getBytesEncoder(), 1)],\n [\n \"secp256r1VerifyArgs\",\n getOptionEncoder(getSecp256r1VerifyArgsEncoder()),\n ],\n [\"settingsReadonlyArgs\", getSettingsReadonlyArgsEncoder()],\n [\"compressedProofArgs\", getProofArgsEncoder()],\n ]),\n (value) => ({\n ...value,\n discriminator: TRANSACTION_BUFFER_VOTE_COMPRESSED_DISCRIMINATOR,\n })\n );\n}\n\nexport function getTransactionBufferVoteCompressedInstructionDataDecoder(): Decoder<TransactionBufferVoteCompressedInstructionData> {\n return getStructDecoder([\n [\"discriminator\", fixDecoderSize(getBytesDecoder(), 1)],\n [\"secp256r1VerifyArgs\", getOptionDecoder(getSecp256r1VerifyArgsDecoder())],\n [\"settingsReadonlyArgs\", getSettingsReadonlyArgsDecoder()],\n [\"compressedProofArgs\", getProofArgsDecoder()],\n ]);\n}\n\nexport function getTransactionBufferVoteCompressedInstructionDataCodec(): Codec<\n TransactionBufferVoteCompressedInstructionDataArgs,\n TransactionBufferVoteCompressedInstructionData\n> {\n return combineCodec(\n getTransactionBufferVoteCompressedInstructionDataEncoder(),\n getTransactionBufferVoteCompressedInstructionDataDecoder()\n );\n}\n\nexport type TransactionBufferVoteCompressedInstructionExtraArgs = {\n remainingAccounts: Array<{ address: Address; role: number }>;\n};\n\nexport type TransactionBufferVoteCompressedInput<\n TAccountPayer extends string = string,\n TAccountDomainConfig extends string = string,\n TAccountTransactionBuffer extends string = string,\n TAccountVoter extends string = string,\n TAccountSystemProgram extends string = string,\n TAccountSlotHashSysvar extends string = string,\n TAccountInstructionsSysvar extends string = string,\n> = {\n payer: TransactionSigner<TAccountPayer>;\n domainConfig?: Address<TAccountDomainConfig>;\n transactionBuffer: Address<TAccountTransactionBuffer>;\n voter?: TransactionSigner<TAccountVoter>;\n systemProgram?: Address<TAccountSystemProgram>;\n slotHashSysvar?: Address<TAccountSlotHashSysvar>;\n instructionsSysvar?: Address<TAccountInstructionsSysvar>;\n secp256r1VerifyArgs: TransactionBufferVoteCompressedInstructionDataArgs[\"secp256r1VerifyArgs\"];\n settingsReadonlyArgs: TransactionBufferVoteCompressedInstructionDataArgs[\"settingsReadonlyArgs\"];\n compressedProofArgs: TransactionBufferVoteCompressedInstructionDataArgs[\"compressedProofArgs\"];\n remainingAccounts: TransactionBufferVoteCompressedInstructionExtraArgs[\"remainingAccounts\"];\n};\n\nexport function getTransactionBufferVoteCompressedInstruction<\n TAccountPayer extends string,\n TAccountDomainConfig extends string,\n TAccountTransactionBuffer extends string,\n TAccountVoter extends string,\n TAccountSystemProgram extends string,\n TAccountSlotHashSysvar extends string,\n TAccountInstructionsSysvar extends string,\n TProgramAddress extends Address = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n>(\n input: TransactionBufferVoteCompressedInput<\n TAccountPayer,\n TAccountDomainConfig,\n TAccountTransactionBuffer,\n TAccountVoter,\n TAccountSystemProgram,\n TAccountSlotHashSysvar,\n TAccountInstructionsSysvar\n >,\n config?: { programAddress?: TProgramAddress }\n): TransactionBufferVoteCompressedInstruction<\n TProgramAddress,\n TAccountPayer,\n TAccountDomainConfig,\n TAccountTransactionBuffer,\n TAccountVoter,\n TAccountSystemProgram,\n TAccountSlotHashSysvar,\n TAccountInstructionsSysvar\n> {\n // Program address.\n const programAddress = config?.programAddress ?? MULTI_WALLET_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n payer: { value: input.payer ?? null, isWritable: true },\n domainConfig: { value: input.domainConfig ?? null, isWritable: false },\n transactionBuffer: {\n value: input.transactionBuffer ?? null,\n isWritable: true,\n },\n voter: { value: input.voter ?? null, isWritable: false },\n systemProgram: { value: input.systemProgram ?? null, isWritable: false },\n slotHashSysvar: { value: input.slotHashSysvar ?? null, isWritable: false },\n instructionsSysvar: {\n value: input.instructionsSysvar ?? null,\n isWritable: false,\n },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolver scope.\n const resolverScope = { programAddress, accounts, args };\n\n // Resolve default values.\n if (!accounts.systemProgram.value) {\n accounts.systemProgram.value =\n \"11111111111111111111111111111111\" as Address<\"11111111111111111111111111111111\">;\n }\n if (!accounts.slotHashSysvar.value) {\n accounts.slotHashSysvar.value =\n \"SysvarS1otHashes111111111111111111111111111\" as Address<\"SysvarS1otHashes111111111111111111111111111\">;\n }\n if (!accounts.instructionsSysvar.value) {\n accounts.instructionsSysvar.value =\n \"Sysvar1nstructions1111111111111111111111111\" as Address<\"Sysvar1nstructions1111111111111111111111111\">;\n }\n\n // Remaining accounts.\n const remainingAccounts: AccountMeta[] =\n parseRemainingAccounts(resolverScope);\n\n const getAccountMeta = getAccountMetaFactory(programAddress, \"programId\");\n return Object.freeze({\n accounts: [\n getAccountMeta(accounts.payer),\n getAccountMeta(accounts.domainConfig),\n getAccountMeta(accounts.transactionBuffer),\n getAccountMeta(accounts.voter),\n getAccountMeta(accounts.systemProgram),\n getAccountMeta(accounts.slotHashSysvar),\n getAccountMeta(accounts.instructionsSysvar),\n ...remainingAccounts,\n ],\n data: getTransactionBufferVoteCompressedInstructionDataEncoder().encode(\n args as TransactionBufferVoteCompressedInstructionDataArgs\n ),\n programAddress,\n } as TransactionBufferVoteCompressedInstruction<\n TProgramAddress,\n TAccountPayer,\n TAccountDomainConfig,\n TAccountTransactionBuffer,\n TAccountVoter,\n TAccountSystemProgram,\n TAccountSlotHashSysvar,\n TAccountInstructionsSysvar\n >);\n}\n\nexport type ParsedTransactionBufferVoteCompressedInstruction<\n TProgram extends string = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n payer: TAccountMetas[0];\n domainConfig?: TAccountMetas[1] | undefined;\n transactionBuffer: TAccountMetas[2];\n voter?: TAccountMetas[3] | undefined;\n systemProgram: TAccountMetas[4];\n slotHashSysvar?: TAccountMetas[5] | undefined;\n instructionsSysvar?: TAccountMetas[6] | undefined;\n };\n data: TransactionBufferVoteCompressedInstructionData;\n};\n\nexport function parseTransactionBufferVoteCompressedInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>\n): ParsedTransactionBufferVoteCompressedInstruction<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 const getNextOptionalAccount = () => {\n const accountMeta = getNextAccount();\n return accountMeta.address === MULTI_WALLET_PROGRAM_ADDRESS\n ? undefined\n : accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n payer: getNextAccount(),\n domainConfig: getNextOptionalAccount(),\n transactionBuffer: getNextAccount(),\n voter: getNextOptionalAccount(),\n systemProgram: getNextAccount(),\n slotHashSysvar: getNextOptionalAccount(),\n instructionsSysvar: getNextOptionalAccount(),\n },\n data: getTransactionBufferVoteCompressedInstructionDataDecoder().decode(\n instruction.data\n ),\n };\n}\n","/**\n * This code was AUTOGENERATED using the Codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun Codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n combineCodec,\n fixDecoderSize,\n fixEncoderSize,\n getBytesDecoder,\n getBytesEncoder,\n getStructDecoder,\n getStructEncoder,\n transformEncoder,\n type AccountMeta,\n type Address,\n type FixedSizeCodec,\n type FixedSizeDecoder,\n type FixedSizeEncoder,\n type Instruction,\n type InstructionWithAccounts,\n type InstructionWithData,\n type ReadonlyUint8Array,\n type WritableAccount,\n} from \"gill\";\nimport { parseRemainingAccounts } from \"../../hooked\";\nimport { MULTI_WALLET_PROGRAM_ADDRESS } from \"../programs\";\nimport { getAccountMetaFactory, type ResolvedAccount } from \"../shared\";\n\nexport const TRANSACTION_EXECUTE_DISCRIMINATOR = new Uint8Array([14]);\n\nexport function getTransactionExecuteDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 1).encode(\n TRANSACTION_EXECUTE_DISCRIMINATOR\n );\n}\n\nexport type TransactionExecuteInstruction<\n TProgram extends string = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n TAccountSettings extends string | AccountMeta<string> = string,\n TAccountPayer extends string | AccountMeta<string> = string,\n TAccountTransactionBuffer extends string | AccountMeta<string> = string,\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountSettings extends string\n ? WritableAccount<TAccountSettings>\n : TAccountSettings,\n TAccountPayer extends string\n ? WritableAccount<TAccountPayer>\n : TAccountPayer,\n TAccountTransactionBuffer extends string\n ? WritableAccount<TAccountTransactionBuffer>\n : TAccountTransactionBuffer,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type TransactionExecuteInstructionData = {\n discriminator: ReadonlyUint8Array;\n};\n\nexport type TransactionExecuteInstructionDataArgs = {};\n\nexport function getTransactionExecuteInstructionDataEncoder(): FixedSizeEncoder<TransactionExecuteInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([[\"discriminator\", fixEncoderSize(getBytesEncoder(), 1)]]),\n (value) => ({ ...value, discriminator: TRANSACTION_EXECUTE_DISCRIMINATOR })\n );\n}\n\nexport function getTransactionExecuteInstructionDataDecoder(): FixedSizeDecoder<TransactionExecuteInstructionData> {\n return getStructDecoder([\n [\"discriminator\", fixDecoderSize(getBytesDecoder(), 1)],\n ]);\n}\n\nexport function getTransactionExecuteInstructionDataCodec(): FixedSizeCodec<\n TransactionExecuteInstructionDataArgs,\n TransactionExecuteInstructionData\n> {\n return combineCodec(\n getTransactionExecuteInstructionDataEncoder(),\n getTransactionExecuteInstructionDataDecoder()\n );\n}\n\nexport type TransactionExecuteInstructionExtraArgs = {\n remainingAccounts: Array<{ address: Address; role: number }>;\n};\n\nexport type TransactionExecuteInput<\n TAccountSettings extends string = string,\n TAccountPayer extends string = string,\n TAccountTransactionBuffer extends string = string,\n> = {\n settings: Address<TAccountSettings>;\n payer: Address<TAccountPayer>;\n transactionBuffer: Address<TAccountTransactionBuffer>;\n remainingAccounts: TransactionExecuteInstructionExtraArgs[\"remainingAccounts\"];\n};\n\nexport function getTransactionExecuteInstruction<\n TAccountSettings extends string,\n TAccountPayer extends string,\n TAccountTransactionBuffer extends string,\n TProgramAddress extends Address = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n>(\n input: TransactionExecuteInput<\n TAccountSettings,\n TAccountPayer,\n TAccountTransactionBuffer\n >,\n config?: { programAddress?: TProgramAddress }\n): TransactionExecuteInstruction<\n TProgramAddress,\n TAccountSettings,\n TAccountPayer,\n TAccountTransactionBuffer\n> {\n // Program address.\n const programAddress = config?.programAddress ?? MULTI_WALLET_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n settings: { value: input.settings ?? null, isWritable: true },\n payer: { value: input.payer ?? null, isWritable: true },\n transactionBuffer: {\n value: input.transactionBuffer ?? null,\n isWritable: true,\n },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Resolver scope.\n const resolverScope = { programAddress, accounts };\n\n // Remaining accounts.\n const remainingAccounts: AccountMeta[] =\n parseRemainingAccounts(resolverScope);\n\n const getAccountMeta = getAccountMetaFactory(programAddress, \"programId\");\n return Object.freeze({\n accounts: [\n getAccountMeta(accounts.settings),\n getAccountMeta(accounts.payer),\n getAccountMeta(accounts.transactionBuffer),\n ...remainingAccounts,\n ],\n data: getTransactionExecuteInstructionDataEncoder().encode({}),\n programAddress,\n } as TransactionExecuteInstruction<\n TProgramAddress,\n TAccountSettings,\n TAccountPayer,\n TAccountTransactionBuffer\n >);\n}\n\nexport type ParsedTransactionExecuteInstruction<\n TProgram extends string = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n settings: TAccountMetas[0];\n payer: TAccountMetas[1];\n transactionBuffer: TAccountMetas[2];\n };\n data: TransactionExecuteInstructionData;\n};\n\nexport function parseTransactionExecuteInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>\n): ParsedTransactionExecuteInstruction<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 settings: getNextAccount(),\n payer: getNextAccount(),\n transactionBuffer: getNextAccount(),\n },\n data: getTransactionExecuteInstructionDataDecoder().decode(\n instruction.data\n ),\n };\n}\n","/**\n * This code was AUTOGENERATED using the Codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun Codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport {\n combineCodec,\n fixDecoderSize,\n fixEncoderSize,\n getAddressDecoder,\n getAddressEncoder,\n getBytesDecoder,\n getBytesEncoder,\n getStructDecoder,\n getStructEncoder,\n transformEncoder,\n type AccountMeta,\n type Address,\n type FixedSizeCodec,\n type FixedSizeDecoder,\n type FixedSizeEncoder,\n type Instruction,\n type InstructionWithAccounts,\n type InstructionWithData,\n type ReadonlyUint8Array,\n type WritableAccount,\n} from \"gill\";\nimport { parseRemainingAccounts } from \"../../hooked\";\nimport { MULTI_WALLET_PROGRAM_ADDRESS } from \"../programs\";\nimport { getAccountMetaFactory, type ResolvedAccount } from \"../shared\";\n\nexport const TRANSACTION_EXECUTE_COMPRESSED_DISCRIMINATOR = new Uint8Array([\n 25,\n]);\n\nexport function getTransactionExecuteCompressedDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 1).encode(\n TRANSACTION_EXECUTE_COMPRESSED_DISCRIMINATOR\n );\n}\n\nexport type TransactionExecuteCompressedInstruction<\n TProgram extends string = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n TAccountPayer extends string | AccountMeta<string> = string,\n TAccountTransactionBuffer extends string | AccountMeta<string> = string,\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountPayer extends string\n ? WritableAccount<TAccountPayer>\n : TAccountPayer,\n TAccountTransactionBuffer extends string\n ? WritableAccount<TAccountTransactionBuffer>\n : TAccountTransactionBuffer,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type TransactionExecuteCompressedInstructionData = {\n discriminator: ReadonlyUint8Array;\n settingsKey: Address;\n};\n\nexport type TransactionExecuteCompressedInstructionDataArgs = {\n settingsKey: Address;\n};\n\nexport function getTransactionExecuteCompressedInstructionDataEncoder(): FixedSizeEncoder<TransactionExecuteCompressedInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n [\"discriminator\", fixEncoderSize(getBytesEncoder(), 1)],\n [\"settingsKey\", getAddressEncoder()],\n ]),\n (value) => ({\n ...value,\n discriminator: TRANSACTION_EXECUTE_COMPRESSED_DISCRIMINATOR,\n })\n );\n}\n\nexport function getTransactionExecuteCompressedInstructionDataDecoder(): FixedSizeDecoder<TransactionExecuteCompressedInstructionData> {\n return getStructDecoder([\n [\"discriminator\", fixDecoderSize(getBytesDecoder(), 1)],\n [\"settingsKey\", getAddressDecoder()],\n ]);\n}\n\nexport function getTransactionExecuteCompressedInstructionDataCodec(): FixedSizeCodec<\n TransactionExecuteCompressedInstructionDataArgs,\n TransactionExecuteCompressedInstructionData\n> {\n return combineCodec(\n getTransactionExecuteCompressedInstructionDataEncoder(),\n getTransactionExecuteCompressedInstructionDataDecoder()\n );\n}\n\nexport type TransactionExecuteCompressedInstructionExtraArgs = {\n remainingAccounts: Array<{ address: Address; role: number }>;\n};\n\nexport type TransactionExecuteCompressedInput<\n TAccountPayer extends string = string,\n TAccountTransactionBuffer extends string = string,\n> = {\n payer: Address<TAccountPayer>;\n transactionBuffer: Address<TAccountTransactionBuffer>;\n settingsKey: TransactionExecuteCompressedInstructionDataArgs[\"settingsKey\"];\n remainingAccounts: TransactionExecuteCompressedInstructionExtraArgs[\"remainingAccounts\"];\n};\n\nexport function getTransactionExecuteCompressedInstruction<\n TAccountPayer extends string,\n TAccountTransactionBuffer extends string,\n TProgramAddress extends Address = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n>(\n input: TransactionExecuteCompressedInput<\n TAccountPayer,\n TAccountTransactionBuffer\n >,\n config?: { programAddress?: TProgramAddress }\n): TransactionExecuteCompressedInstruction<\n TProgramAddress,\n TAccountPayer,\n TAccountTransactionBuffer\n> {\n // Program address.\n const programAddress = config?.programAddress ?? MULTI_WALLET_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n payer: { value: input.payer ?? null, isWritable: true },\n transactionBuffer: {\n value: input.transactionBuffer ?? null,\n isWritable: true,\n },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolver scope.\n const resolverScope = { programAddress, accounts, args };\n\n // Remaining accounts.\n const remainingAccounts: AccountMeta[] =\n parseRemainingAccounts(resolverScope);\n\n const getAccountMeta = getAccountMetaFactory(programAddress, \"programId\");\n return Object.freeze({\n accounts: [\n getAccountMeta(accounts.payer),\n getAccountMeta(accounts.transactionBuffer),\n ...remainingAccounts,\n ],\n data: getTransactionExecuteCompressedInstructionDataEncoder().encode(\n args as TransactionExecuteCompressedInstructionDataArgs\n ),\n programAddress,\n } as TransactionExecuteCompressedInstruction<\n TProgramAddress,\n TAccountPayer,\n TAccountTransactionBuffer\n >);\n}\n\nexport type ParsedTransactionExecuteCompressedInstruction<\n TProgram extends string = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n payer: TAccountMetas[0];\n transactionBuffer: TAccountMetas[1];\n };\n data: TransactionExecuteCompressedInstructionData;\n};\n\nexport function parseTransactionExecuteCompressedInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>\n): ParsedTransactionExecuteCompressedInstruction<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: { payer: getNextAccount(), transactionBuffer: getNextAccount() },\n data: getTransactionExecuteCompressedInstructionDataDecoder().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 getArrayDecoder,\n getArrayEncoder,\n getBytesDecoder,\n getBytesEncoder,\n getStructDecoder,\n getStructEncoder,\n transformEncoder,\n type AccountMeta,\n type Address,\n type Codec,\n type Decoder,\n type Encoder,\n type Instruction,\n type InstructionWithAccounts,\n type InstructionWithData,\n type ReadonlyAccount,\n type ReadonlyUint8Array,\n type WritableAccount,\n} from \"gill\";\nimport { parseRemainingAccounts } from \"../../hooked\";\nimport { MULTI_WALLET_PROGRAM_ADDRESS } from \"../programs\";\nimport { getAccountMetaFactory, type ResolvedAccount } from \"../shared\";\nimport {\n getSecp256r1VerifyArgsWithDomainAddressDecoder,\n getSecp256r1VerifyArgsWithDomainAddressEncoder,\n getTransactionMessageDecoder,\n getTransactionMessageEncoder,\n type Secp256r1VerifyArgsWithDomainAddress,\n type Secp256r1VerifyArgsWithDomainAddressArgs,\n type TransactionMessage,\n type TransactionMessageArgs,\n} from \"../types\";\n\nexport const TRANSACTION_EXECUTE_SYNC_DISCRIMINATOR = new Uint8Array([15]);\n\nexport function getTransactionExecuteSyncDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 1).encode(\n TRANSACTION_EXECUTE_SYNC_DISCRIMINATOR\n );\n}\n\nexport type TransactionExecuteSyncInstruction<\n TProgram extends string = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n TAccountSettings extends string | AccountMeta<string> = string,\n TAccountSlotHashSysvar extends\n | string\n | AccountMeta<string> = \"SysvarS1otHashes111111111111111111111111111\",\n TAccountInstructionsSysvar extends\n | string\n | AccountMeta<string> = \"Sysvar1nstructions1111111111111111111111111\",\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountSettings extends string\n ? WritableAccount<TAccountSettings>\n : TAccountSettings,\n TAccountSlotHashSysvar extends string\n ? ReadonlyAccount<TAccountSlotHashSysvar>\n : TAccountSlotHashSysvar,\n TAccountInstructionsSysvar extends string\n ? ReadonlyAccount<TAccountInstructionsSysvar>\n : TAccountInstructionsSysvar,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type TransactionExecuteSyncInstructionData = {\n discriminator: ReadonlyUint8Array;\n transactionMessage: TransactionMessage;\n secp256r1VerifyArgs: Array<Secp256r1VerifyArgsWithDomainAddress>;\n};\n\nexport type TransactionExecuteSyncInstructionDataArgs = {\n transactionMessage: TransactionMessageArgs;\n secp256r1VerifyArgs: Array<Secp256r1VerifyArgsWithDomainAddressArgs>;\n};\n\nexport function getTransactionExecuteSyncInstructionDataEncoder(): Encoder<TransactionExecuteSyncInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n [\"discriminator\", fixEncoderSize(getBytesEncoder(), 1)],\n [\"transactionMessage\", getTransactionMessageEncoder()],\n [\n \"secp256r1VerifyArgs\",\n getArrayEncoder(getSecp256r1VerifyArgsWithDomainAddressEncoder()),\n ],\n ]),\n (value) => ({\n ...value,\n discriminator: TRANSACTION_EXECUTE_SYNC_DISCRIMINATOR,\n })\n );\n}\n\nexport function getTransactionExecuteSyncInstructionDataDecoder(): Decoder<TransactionExecuteSyncInstructionData> {\n return getStructDecoder([\n [\"discriminator\", fixDecoderSize(getBytesDecoder(), 1)],\n [\"transactionMessage\", getTransactionMessageDecoder()],\n [\n \"secp256r1VerifyArgs\",\n getArrayDecoder(getSecp256r1VerifyArgsWithDomainAddressDecoder()),\n ],\n ]);\n}\n\nexport function getTransactionExecuteSyncInstructionDataCodec(): Codec<\n TransactionExecuteSyncInstructionDataArgs,\n TransactionExecuteSyncInstructionData\n> {\n return combineCodec(\n getTransactionExecuteSyncInstructionDataEncoder(),\n getTransactionExecuteSyncInstructionDataDecoder()\n );\n}\n\nexport type TransactionExecuteSyncInstructionExtraArgs = {\n remainingAccounts: Array<{ address: Address; role: number }>;\n};\n\nexport type TransactionExecuteSyncInput<\n TAccountSettings extends string = string,\n TAccountSlotHashSysvar extends string = string,\n TAccountInstructionsSysvar extends string = string,\n> = {\n settings: Address<TAccountSettings>;\n slotHashSysvar?: Address<TAccountSlotHashSysvar>;\n instructionsSysvar?: Address<TAccountInstructionsSysvar>;\n transactionMessage: TransactionExecuteSyncInstructionDataArgs[\"transactionMessage\"];\n secp256r1VerifyArgs: TransactionExecuteSyncInstructionDataArgs[\"secp256r1VerifyArgs\"];\n remainingAccounts: TransactionExecuteSyncInstructionExtraArgs[\"remainingAccounts\"];\n};\n\nexport function getTransactionExecuteSyncInstruction<\n TAccountSettings extends string,\n TAccountSlotHashSysvar extends string,\n TAccountInstructionsSysvar extends string,\n TProgramAddress extends Address = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n>(\n input: TransactionExecuteSyncInput<\n TAccountSettings,\n TAccountSlotHashSysvar,\n TAccountInstructionsSysvar\n >,\n config?: { programAddress?: TProgramAddress }\n): TransactionExecuteSyncInstruction<\n TProgramAddress,\n TAccountSettings,\n TAccountSlotHashSysvar,\n TAccountInstructionsSysvar\n> {\n // Program address.\n const programAddress = config?.programAddress ?? MULTI_WALLET_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n settings: { value: input.settings ?? null, isWritable: true },\n slotHashSysvar: { value: input.slotHashSysvar ?? null, isWritable: false },\n instructionsSysvar: {\n value: input.instructionsSysvar ?? null,\n isWritable: false,\n },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolver scope.\n const resolverScope = { programAddress, accounts, args };\n\n // Resolve default values.\n if (!accounts.slotHashSysvar.value) {\n accounts.slotHashSysvar.value =\n \"SysvarS1otHashes111111111111111111111111111\" as Address<\"SysvarS1otHashes111111111111111111111111111\">;\n }\n if (!accounts.instructionsSysvar.value) {\n accounts.instructionsSysvar.value =\n \"Sysvar1nstructions1111111111111111111111111\" as Address<\"Sysvar1nstructions1111111111111111111111111\">;\n }\n\n // Remaining accounts.\n const remainingAccounts: AccountMeta[] =\n parseRemainingAccounts(resolverScope);\n\n const getAccountMeta = getAccountMetaFactory(programAddress, \"programId\");\n return Object.freeze({\n accounts: [\n getAccountMeta(accounts.settings),\n getAccountMeta(accounts.slotHashSysvar),\n getAccountMeta(accounts.instructionsSysvar),\n ...remainingAccounts,\n ],\n data: getTransactionExecuteSyncInstructionDataEncoder().encode(\n args as TransactionExecuteSyncInstructionDataArgs\n ),\n programAddress,\n } as TransactionExecuteSyncInstruction<\n TProgramAddress,\n TAccountSettings,\n TAccountSlotHashSysvar,\n TAccountInstructionsSysvar\n >);\n}\n\nexport type ParsedTransactionExecuteSyncInstruction<\n TProgram extends string = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n settings: TAccountMetas[0];\n slotHashSysvar?: TAccountMetas[1] | undefined;\n instructionsSysvar: TAccountMetas[2];\n };\n data: TransactionExecuteSyncInstructionData;\n};\n\nexport function parseTransactionExecuteSyncInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>\n): ParsedTransactionExecuteSyncInstruction<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 const getNextOptionalAccount = () => {\n const accountMeta = getNextAccount();\n return accountMeta.address === MULTI_WALLET_PROGRAM_ADDRESS\n ? undefined\n : accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n settings: getNextAccount(),\n slotHashSysvar: getNextOptionalAccount(),\n instructionsSysvar: getNextAccount(),\n },\n data: getTransactionExecuteSyncInstructionDataDecoder().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 getArrayDecoder,\n getArrayEncoder,\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 ReadonlyUint8Array,\n type TransactionSigner,\n type WritableSignerAccount,\n} from \"gill\";\nimport { parseRemainingAccounts } from \"../../hooked\";\nimport { MULTI_WALLET_PROGRAM_ADDRESS } from \"../programs\";\nimport { getAccountMetaFactory, type ResolvedAccount } from \"../shared\";\nimport {\n getProofArgsDecoder,\n getProofArgsEncoder,\n getSecp256r1VerifyArgsWithDomainAddressDecoder,\n getSecp256r1VerifyArgsWithDomainAddressEncoder,\n getSettingsReadonlyArgsDecoder,\n getSettingsReadonlyArgsEncoder,\n getTransactionMessageDecoder,\n getTransactionMessageEncoder,\n type ProofArgs,\n type ProofArgsArgs,\n type Secp256r1VerifyArgsWithDomainAddress,\n type Secp256r1VerifyArgsWithDomainAddressArgs,\n type SettingsReadonlyArgs,\n type SettingsReadonlyArgsArgs,\n type TransactionMessage,\n type TransactionMessageArgs,\n} from \"../types\";\n\nexport const TRANSACTION_EXECUTE_SYNC_COMPRESSED_DISCRIMINATOR = new Uint8Array(\n [26]\n);\n\nexport function getTransactionExecuteSyncCompressedDiscriminatorBytes() {\n return fixEncoderSize(getBytesEncoder(), 1).encode(\n TRANSACTION_EXECUTE_SYNC_COMPRESSED_DISCRIMINATOR\n );\n}\n\nexport type TransactionExecuteSyncCompressedInstruction<\n TProgram extends string = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n TAccountPayer extends string | AccountMeta<string> = string,\n TAccountSlotHashSysvar extends\n | string\n | AccountMeta<string> = \"SysvarS1otHashes111111111111111111111111111\",\n TAccountInstructionsSysvar extends\n | string\n | AccountMeta<string> = \"Sysvar1nstructions1111111111111111111111111\",\n TRemainingAccounts extends readonly AccountMeta<string>[] = [],\n> = Instruction<TProgram> &\n InstructionWithData<ReadonlyUint8Array> &\n InstructionWithAccounts<\n [\n TAccountPayer extends string\n ? WritableSignerAccount<TAccountPayer> &\n AccountSignerMeta<TAccountPayer>\n : TAccountPayer,\n TAccountSlotHashSysvar extends string\n ? ReadonlyAccount<TAccountSlotHashSysvar>\n : TAccountSlotHashSysvar,\n TAccountInstructionsSysvar extends string\n ? ReadonlyAccount<TAccountInstructionsSysvar>\n : TAccountInstructionsSysvar,\n ...TRemainingAccounts,\n ]\n >;\n\nexport type TransactionExecuteSyncCompressedInstructionData = {\n discriminator: ReadonlyUint8Array;\n transactionMessage: TransactionMessage;\n secp256r1VerifyArgs: Array<Secp256r1VerifyArgsWithDomainAddress>;\n settingsReadonlyArgs: SettingsReadonlyArgs;\n compressedProofArgs: ProofArgs;\n};\n\nexport type TransactionExecuteSyncCompressedInstructionDataArgs = {\n transactionMessage: TransactionMessageArgs;\n secp256r1VerifyArgs: Array<Secp256r1VerifyArgsWithDomainAddressArgs>;\n settingsReadonlyArgs: SettingsReadonlyArgsArgs;\n compressedProofArgs: ProofArgsArgs;\n};\n\nexport function getTransactionExecuteSyncCompressedInstructionDataEncoder(): Encoder<TransactionExecuteSyncCompressedInstructionDataArgs> {\n return transformEncoder(\n getStructEncoder([\n [\"discriminator\", fixEncoderSize(getBytesEncoder(), 1)],\n [\"transactionMessage\", getTransactionMessageEncoder()],\n [\n \"secp256r1VerifyArgs\",\n getArrayEncoder(getSecp256r1VerifyArgsWithDomainAddressEncoder()),\n ],\n [\"settingsReadonlyArgs\", getSettingsReadonlyArgsEncoder()],\n [\"compressedProofArgs\", getProofArgsEncoder()],\n ]),\n (value) => ({\n ...value,\n discriminator: TRANSACTION_EXECUTE_SYNC_COMPRESSED_DISCRIMINATOR,\n })\n );\n}\n\nexport function getTransactionExecuteSyncCompressedInstructionDataDecoder(): Decoder<TransactionExecuteSyncCompressedInstructionData> {\n return getStructDecoder([\n [\"discriminator\", fixDecoderSize(getBytesDecoder(), 1)],\n [\"transactionMessage\", getTransactionMessageDecoder()],\n [\n \"secp256r1VerifyArgs\",\n getArrayDecoder(getSecp256r1VerifyArgsWithDomainAddressDecoder()),\n ],\n [\"settingsReadonlyArgs\", getSettingsReadonlyArgsDecoder()],\n [\"compressedProofArgs\", getProofArgsDecoder()],\n ]);\n}\n\nexport function getTransactionExecuteSyncCompressedInstructionDataCodec(): Codec<\n TransactionExecuteSyncCompressedInstructionDataArgs,\n TransactionExecuteSyncCompressedInstructionData\n> {\n return combineCodec(\n getTransactionExecuteSyncCompressedInstructionDataEncoder(),\n getTransactionExecuteSyncCompressedInstructionDataDecoder()\n );\n}\n\nexport type TransactionExecuteSyncCompressedInstructionExtraArgs = {\n remainingAccounts: Array<{ address: Address; role: number }>;\n};\n\nexport type TransactionExecuteSyncCompressedInput<\n TAccountPayer extends string = string,\n TAccountSlotHashSysvar extends string = string,\n TAccountInstructionsSysvar extends string = string,\n> = {\n payer: TransactionSigner<TAccountPayer>;\n slotHashSysvar?: Address<TAccountSlotHashSysvar>;\n instructionsSysvar?: Address<TAccountInstructionsSysvar>;\n transactionMessage: TransactionExecuteSyncCompressedInstructionDataArgs[\"transactionMessage\"];\n secp256r1VerifyArgs: TransactionExecuteSyncCompressedInstructionDataArgs[\"secp256r1VerifyArgs\"];\n settingsReadonlyArgs: TransactionExecuteSyncCompressedInstructionDataArgs[\"settingsReadonlyArgs\"];\n compressedProofArgs: TransactionExecuteSyncCompressedInstructionDataArgs[\"compressedProofArgs\"];\n remainingAccounts: TransactionExecuteSyncCompressedInstructionExtraArgs[\"remainingAccounts\"];\n};\n\nexport function getTransactionExecuteSyncCompressedInstruction<\n TAccountPayer extends string,\n TAccountSlotHashSysvar extends string,\n TAccountInstructionsSysvar extends string,\n TProgramAddress extends Address = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n>(\n input: TransactionExecuteSyncCompressedInput<\n TAccountPayer,\n TAccountSlotHashSysvar,\n TAccountInstructionsSysvar\n >,\n config?: { programAddress?: TProgramAddress }\n): TransactionExecuteSyncCompressedInstruction<\n TProgramAddress,\n TAccountPayer,\n TAccountSlotHashSysvar,\n TAccountInstructionsSysvar\n> {\n // Program address.\n const programAddress = config?.programAddress ?? MULTI_WALLET_PROGRAM_ADDRESS;\n\n // Original accounts.\n const originalAccounts = {\n payer: { value: input.payer ?? null, isWritable: true },\n slotHashSysvar: { value: input.slotHashSysvar ?? null, isWritable: false },\n instructionsSysvar: {\n value: input.instructionsSysvar ?? null,\n isWritable: false,\n },\n };\n const accounts = originalAccounts as Record<\n keyof typeof originalAccounts,\n ResolvedAccount\n >;\n\n // Original args.\n const args = { ...input };\n\n // Resolver scope.\n const resolverScope = { programAddress, accounts, args };\n\n // Resolve default values.\n if (!accounts.slotHashSysvar.value) {\n accounts.slotHashSysvar.value =\n \"SysvarS1otHashes111111111111111111111111111\" as Address<\"SysvarS1otHashes111111111111111111111111111\">;\n }\n if (!accounts.instructionsSysvar.value) {\n accounts.instructionsSysvar.value =\n \"Sysvar1nstructions1111111111111111111111111\" as Address<\"Sysvar1nstructions1111111111111111111111111\">;\n }\n\n // Remaining accounts.\n const remainingAccounts: AccountMeta[] =\n parseRemainingAccounts(resolverScope);\n\n const getAccountMeta = getAccountMetaFactory(programAddress, \"programId\");\n return Object.freeze({\n accounts: [\n getAccountMeta(accounts.payer),\n getAccountMeta(accounts.slotHashSysvar),\n getAccountMeta(accounts.instructionsSysvar),\n ...remainingAccounts,\n ],\n data: getTransactionExecuteSyncCompressedInstructionDataEncoder().encode(\n args as TransactionExecuteSyncCompressedInstructionDataArgs\n ),\n programAddress,\n } as TransactionExecuteSyncCompressedInstruction<\n TProgramAddress,\n TAccountPayer,\n TAccountSlotHashSysvar,\n TAccountInstructionsSysvar\n >);\n}\n\nexport type ParsedTransactionExecuteSyncCompressedInstruction<\n TProgram extends string = typeof MULTI_WALLET_PROGRAM_ADDRESS,\n TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],\n> = {\n programAddress: Address<TProgram>;\n accounts: {\n payer: TAccountMetas[0];\n slotHashSysvar?: TAccountMetas[1] | undefined;\n instructionsSysvar: TAccountMetas[2];\n };\n data: TransactionExecuteSyncCompressedInstructionData;\n};\n\nexport function parseTransactionExecuteSyncCompressedInstruction<\n TProgram extends string,\n TAccountMetas extends readonly AccountMeta[],\n>(\n instruction: Instruction<TProgram> &\n InstructionWithAccounts<TAccountMetas> &\n InstructionWithData<ReadonlyUint8Array>\n): ParsedTransactionExecuteSyncCompressedInstruction<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 const getNextOptionalAccount = () => {\n const accountMeta = getNextAccount();\n return accountMeta.address === MULTI_WALLET_PROGRAM_ADDRESS\n ? undefined\n : accountMeta;\n };\n return {\n programAddress: instruction.programAddress,\n accounts: {\n payer: getNextAccount(),\n slotHashSysvar: getNextOptionalAccount(),\n instructionsSysvar: getNextAccount(),\n },\n data: getTransactionExecuteSyncCompressedInstructionDataDecoder().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 containsBytes,\n fixEncoderSize,\n getBytesEncoder,\n type Address,\n type ReadonlyUint8Array,\n} from \"gill\";\nimport {\n type ParsedChangeConfigCompressedInstruction,\n type ParsedChangeConfigInstruction,\n type ParsedCompressSettingsAccountInstruction,\n type ParsedCreateDomainConfigInstruction,\n type ParsedCreateDomainUserAccountInstruction,\n type ParsedCreateGlobalCounterInstruction,\n type ParsedCreateMultiWalletCompressedInstruction,\n type ParsedCreateMultiWalletInstruction,\n type ParsedCreateUserAccountsInstruction,\n type ParsedDecompressSettingsAccountInstruction,\n type ParsedDisableDomainConfigInstruction,\n type ParsedEditDomainConfigInstruction,\n type ParsedEditTransactionManagerUrlInstruction,\n type ParsedMigrateCompressedSettingsInstruction,\n type ParsedMigrateCompressedUsersInstruction,\n type ParsedNativeTransferIntentCompressedInstruction,\n type ParsedNativeTransferIntentInstruction,\n type ParsedTokenTransferIntentCompressedInstruction,\n type ParsedTokenTransferIntentInstruction,\n type ParsedTransactionBufferCloseCompressedInstruction,\n type ParsedTransactionBufferCloseInstruction,\n type ParsedTransactionBufferCreateCompressedInstruction,\n type ParsedTransactionBufferCreateInstruction,\n type ParsedTransactionBufferExecuteCompressedInstruction,\n type ParsedTransactionBufferExecuteInstruction,\n type ParsedTransactionBufferExtendCompressedInstruction,\n type ParsedTransactionBufferExtendInstruction,\n type ParsedTransactionBufferVoteCompressedInstruction,\n type ParsedTransactionBufferVoteInstruction,\n type ParsedTransactionExecuteCompressedInstruction,\n type ParsedTransactionExecuteInstruction,\n type ParsedTransactionExecuteSyncCompressedInstruction,\n type ParsedTransactionExecuteSyncInstruction,\n} from \"../instructions\";\n\nexport const MULTI_WALLET_PROGRAM_ADDRESS =\n \"reviR1xysEChySVSWGa43a6oJ2boJYTJhwRjo8KJhhT\" as Address<\"reviR1xysEChySVSWGa43a6oJ2boJYTJhwRjo8KJhhT\">;\n\nexport enum MultiWalletAccount {\n DomainConfig,\n GlobalCounter,\n Settings,\n TransactionBuffer,\n}\n\nexport function identifyMultiWalletAccount(\n account: { data: ReadonlyUint8Array } | ReadonlyUint8Array\n): MultiWalletAccount {\n const data = \"data\" in account ? account.data : account;\n if (\n containsBytes(\n data,\n fixEncoderSize(getBytesEncoder(), 8).encode(\n new Uint8Array([201, 232, 212, 229, 59, 241, 106, 197])\n ),\n 0\n )\n ) {\n return MultiWalletAccount.DomainConfig;\n }\n if (\n containsBytes(\n data,\n fixEncoderSize(getBytesEncoder(), 8).encode(\n new Uint8Array([42, 206, 176, 58, 175, 129, 130, 233])\n ),\n 0\n )\n ) {\n return MultiWalletAccount.GlobalCounter;\n }\n if (\n containsBytes(\n data,\n fixEncoderSize(getBytesEncoder(), 8).encode(\n new Uint8Array([223, 179, 163, 190, 177, 224, 67, 173])\n ),\n 0\n )\n ) {\n return MultiWalletAccount.Settings;\n }\n if (\n containsBytes(\n data,\n fixEncoderSize(getBytesEncoder(), 8).encode(\n new Uint8Array([90, 36, 35, 219, 93, 225, 110, 96])\n ),\n 0\n )\n ) {\n return MultiWalletAccount.TransactionBuffer;\n }\n throw new Error(\n \"The provided account could not be identified as a multiWallet account.\"\n );\n}\n\nexport enum MultiWalletInstruction {\n ChangeConfig,\n ChangeConfigCompressed,\n CompressSettingsAccount,\n CreateDomainConfig,\n CreateDomainUserAccount,\n CreateGlobalCounter,\n CreateMultiWallet,\n CreateMultiWalletCompressed,\n CreateUserAccounts,\n DecompressSettingsAccount,\n DisableDomainConfig,\n EditDomainConfig,\n EditTransactionManagerUrl,\n MigrateCompressedSettings,\n MigrateCompressedUsers,\n NativeTransferIntent,\n NativeTransferIntentCompressed,\n TokenTransferIntent,\n TokenTransferIntentCompressed,\n TransactionBufferClose,\n TransactionBufferCloseCompressed,\n TransactionBufferCreate,\n TransactionBufferCreateCompressed,\n TransactionBufferExecute,\n TransactionBufferExecuteCompressed,\n TransactionBufferExtend,\n TransactionBufferExtendCompressed,\n TransactionBufferVote,\n TransactionBufferVoteCompressed,\n TransactionExecute,\n TransactionExecuteCompressed,\n TransactionExecuteSync,\n TransactionExecuteSyncCompressed,\n}\n\nexport function identifyMultiWalletInstruction(\n instruction: { data: ReadonlyUint8Array } | ReadonlyUint8Array\n): MultiWalletInstruction {\n const data = \"data\" in instruction ? instruction.data : instruction;\n if (\n containsBytes(\n data,\n fixEncoderSize(getBytesEncoder(), 1).encode(new Uint8Array([8])),\n 0\n )\n ) {\n return MultiWalletInstruction.ChangeConfig;\n }\n if (\n containsBytes(\n data,\n fixEncoderSize(getBytesEncoder(), 1).encode(new Uint8Array([19])),\n 0\n )\n ) {\n return MultiWalletInstruction.ChangeConfigCompressed;\n }\n if (\n containsBytes(\n data,\n fixEncoderSize(getBytesEncoder(), 1).encode(new Uint8Array([16])),\n 0\n )\n ) {\n return MultiWalletInstruction.CompressSettingsAccount;\n }\n if (\n containsBytes(\n data,\n fixEncoderSize(getBytesEncoder(), 1).encode(new Uint8Array([0])),\n 0\n )\n ) {\n return MultiWalletInstruction.CreateDomainConfig;\n }\n if (\n containsBytes(\n data,\n fixEncoderSize(getBytesEncoder(), 1).encode(new Uint8Array([4])),\n 0\n )\n ) {\n return MultiWalletInstruction.CreateDomainUserAccount;\n }\n if (\n containsBytes(\n data,\n fixEncoderSize(getBytesEncoder(), 1).encode(new Uint8Array([3])),\n 0\n )\n ) {\n return MultiWalletInstruction.CreateGlobalCounter;\n }\n if (\n containsBytes(\n data,\n fixEncoderSize(getBytesEncoder(), 1).encode(new Uint8Array([7])),\n 0\n )\n ) {\n return MultiWalletInstruction.CreateMultiWallet;\n }\n if (\n containsBytes(\n data,\n fixEncoderSize(getBytesEncoder(), 1).encode(new Uint8Array([18])),\n 0\n )\n ) {\n return MultiWalletInstruction.CreateMultiWalletCompressed;\n }\n if (\n containsBytes(\n data,\n fixEncoderSize(getBytesEncoder(), 1).encode(new Uint8Array([5])),\n 0\n )\n ) {\n return MultiWalletInstruction.CreateUserAccounts;\n }\n if (\n containsBytes(\n data,\n fixEncoderSize(getBytesEncoder(), 1).encode(new Uint8Array([17])),\n 0\n )\n ) {\n return MultiWalletInstruction.DecompressSettingsAccount;\n }\n if (\n containsBytes(\n data,\n fixEncoderSize(getBytesEncoder(), 1).encode(new Uint8Array([2])),\n 0\n )\n ) {\n return MultiWalletInstruction.DisableDomainConfig;\n }\n if (\n containsBytes(\n data,\n fixEncoderSize(getBytesEncoder(), 1).encode(new Uint8Array([1])),\n 0\n )\n ) {\n return MultiWalletInstruction.EditDomainConfig;\n }\n if (\n containsBytes(\n data,\n fixEncoderSize(getBytesEncoder(), 1).encode(new Uint8Array([6])),\n 0\n )\n ) {\n return MultiWalletInstruction.EditTransactionManagerUrl;\n }\n if (\n containsBytes(\n data,\n fixEncoderSize(getBytesEncoder(), 1).encode(new Uint8Array([32])),\n 0\n )\n ) {\n return MultiWalletInstruction.MigrateCompressedSettings;\n }\n if (\n containsBytes(\n data,\n fixEncoderSize(getBytesEncoder(), 1).encode(new Uint8Array([31])),\n 0\n )\n ) {\n return MultiWalletInstruction.MigrateCompressedUsers;\n }\n if (\n containsBytes(\n data,\n fixEncoderSize(getBytesEncoder(), 1).encode(new Uint8Array([29])),\n 0\n )\n ) {\n return MultiWalletInstruction.NativeTransferIntent;\n }\n if (\n containsBytes(\n data,\n fixEncoderSize(getBytesEncoder(), 1).encode(new Uint8Array([27])),\n 0\n )\n ) {\n return MultiWalletInstruction.NativeTransferIntentCompressed;\n }\n if (\n containsBytes(\n data,\n fixEncoderSize(getBytesEncoder(), 1).encode(new Uint8Array([30])),\n 0\n )\n ) {\n return MultiWalletInstruction.TokenTransferIntent;\n }\n if (\n containsBytes(\n data,\n fixEncoderSize(getBytesEncoder(), 1).encode(new Uint8Array([28])),\n 0\n )\n ) {\n return MultiWalletInstruction.TokenTransferIntentCompressed;\n }\n if (\n containsBytes(\n data,\n fixEncoderSize(getBytesEncoder(), 1).encode(new Uint8Array([12])),\n 0\n )\n ) {\n return MultiWalletInstruction.TransactionBufferClose;\n }\n if (\n containsBytes(\n data,\n fixEncoderSize(getBytesEncoder(), 1).encode(new Uint8Array([23])),\n 0\n )\n ) {\n return MultiWalletInstruction.TransactionBufferCloseCompressed;\n }\n if (\n containsBytes(\n data,\n fixEncoderSize(getBytesEncoder(), 1).encode(new Uint8Array([9])),\n 0\n )\n ) {\n return MultiWalletInstruction.TransactionBufferCreate;\n }\n if (\n containsBytes(\n data,\n fixEncoderSize(getBytesEncoder(), 1).encode(new Uint8Array([20])),\n 0\n )\n ) {\n return MultiWalletInstruction.TransactionBufferCreateCompressed;\n }\n if (\n containsBytes(\n data,\n fixEncoderSize(getBytesEncoder(), 1).encode(new Uint8Array([13])),\n 0\n )\n ) {\n return MultiWalletInstruction.TransactionBufferExecute;\n }\n if (\n containsBytes(\n data,\n fixEncoderSize(getBytesEncoder(), 1).encode(new Uint8Array([24])),\n 0\n )\n ) {\n return MultiWalletInstruction.TransactionBufferExecuteCompressed;\n }\n if (\n containsBytes(\n data,\n fixEncoderSize(getBytesEncoder(), 1).encode(new Uint8Array([11])),\n 0\n )\n ) {\n return MultiWalletInstruction.TransactionBufferExtend;\n }\n if (\n containsBytes(\n data,\n fixEncoderSize(getBytesEncoder(), 1).encode(new Uint8Array([22])),\n 0\n )\n ) {\n return MultiWalletInstruction.TransactionBufferExtendCompressed;\n }\n if (\n containsBytes(\n data,\n fixEncoderSize(getBytesEncoder(), 1).encode(new Uint8Array([10])),\n 0\n )\n ) {\n return MultiWalletInstruction.TransactionBufferVote;\n }\n if (\n containsBytes(\n data,\n fixEncoderSize(getBytesEncoder(), 1).encode(new Uint8Array([21])),\n 0\n )\n ) {\n return MultiWalletInstruction.TransactionBufferVoteCompressed;\n }\n if (\n containsBytes(\n data,\n fixEncoderSize(getBytesEncoder(), 1).encode(new Uint8Array([14])),\n 0\n )\n ) {\n return MultiWalletInstruction.TransactionExecute;\n }\n if (\n containsBytes(\n data,\n fixEncoderSize(getBytesEncoder(), 1).encode(new Uint8Array([25])),\n 0\n )\n ) {\n return MultiWalletInstruction.TransactionExecuteCompressed;\n }\n if (\n containsBytes(\n data,\n fixEncoderSize(getBytesEncoder(), 1).encode(new Uint8Array([15])),\n 0\n )\n ) {\n return MultiWalletInstruction.TransactionExecuteSync;\n }\n if (\n containsBytes(\n data,\n fixEncoderSize(getBytesEncoder(), 1).encode(new Uint8Array([26])),\n 0\n )\n ) {\n return MultiWalletInstruction.TransactionExecuteSyncCompressed;\n }\n throw new Error(\n \"The provided instruction could not be identified as a multiWallet instruction.\"\n );\n}\n\nexport type ParsedMultiWalletInstruction<\n TProgram extends string = \"reviR1xysEChySVSWGa43a6oJ2boJYTJhwRjo8KJhhT\",\n> =\n | ({\n instructionType: MultiWalletInstruction.ChangeConfig;\n } & ParsedChangeConfigInstruction<TProgram>)\n | ({\n instructionType: MultiWalletInstruction.ChangeConfigCompressed;\n } & ParsedChangeConfigCompressedInstruction<TProgram>)\n | ({\n instructionType: MultiWalletInstruction.CompressSettingsAccount;\n } & ParsedCompressSettingsAccountInstruction<TProgram>)\n | ({\n instructionType: MultiWalletInstruction.CreateDomainConfig;\n } & ParsedCreateDomainConfigInstruction<TProgram>)\n | ({\n instructionType: MultiWalletInstruction.CreateDomainUserAccount;\n } & ParsedCreateDomainUserAccountInstruction<TProgram>)\n | ({\n instructionType: MultiWalletInstruction.CreateGlobalCounter;\n } & ParsedCreateGlobalCounterInstruction<TProgram>)\n | ({\n instructionType: MultiWalletInstruction.CreateMultiWallet;\n } & ParsedCreateMultiWalletInstruction<TProgram>)\n | ({\n instructionType: MultiWalletInstruction.CreateMultiWalletCompressed;\n } & ParsedCreateMultiWalletCompressedInstruction<TProgram>)\n | ({\n instructionType: MultiWalletInstruction.CreateUserAccounts;\n } & ParsedCreateUserAccountsInstruction<TProgram>)\n | ({\n instructionType: MultiWalletInstruction.DecompressSettingsAccount;\n } & ParsedDecompressSettingsAccountInstruction<TProgram>)\n | ({\n instructionType: MultiWalletInstruction.DisableDomainConfig;\n } & ParsedDisableDomainConfigInstruction<TProgram>)\n | ({\n instructionType: MultiWalletInstruction.EditDomainConfig;\n } & ParsedEditDomainConfigInstruction<TProgram>)\n | ({\n instructionType: MultiWalletInstruction.EditTransactionManagerUrl;\n } & ParsedEditTransactionManagerUrlInstruction<TProgram>)\n | ({\n instructionType: MultiWalletInstruction.MigrateCompressedSettings;\n } & ParsedMigrateCompressedSettingsInstruction<TProgram>)\n | ({\n instructionType: MultiWalletInstruction.MigrateCompressedUsers;\n } & ParsedMigrateCompressedUsersInstruction<TProgram>)\n | ({\n instructionType: MultiWalletInstruction.NativeTransferIntent;\n } & ParsedNativeTransferIntentInstruction<TProgram>)\n | ({\n instructionType: MultiWalletInstruction.NativeTransferIntentCompressed;\n } & ParsedNativeTransferIntentCompressedInstruction<TProgram>)\n | ({\n instructionType: MultiWalletInstruction.TokenTransferIntent;\n } & ParsedTokenTransferIntentInstruction<TProgram>)\n | ({\n instructionType: MultiWalletInstruction.TokenTransferIntentCompressed;\n } & ParsedTokenTransferIntentCompressedInstruction<TProgram>)\n | ({\n instructionType: MultiWalletInstruction.TransactionBufferClose;\n } & ParsedTransactionBufferCloseInstruction<TProgram>)\n | ({\n instructionType: MultiWalletInstruction.TransactionBufferCloseCompressed;\n } & ParsedTransactionBufferCloseCompressedInstruction<TProgram>)\n | ({\n instructionType: MultiWalletInstruction.TransactionBufferCreate;\n } & ParsedTransactionBufferCreateInstruction<TProgram>)\n | ({\n instructionType: MultiWalletInstruction.TransactionBufferCreateCompressed;\n } & ParsedTransactionBufferCreateCompressedInstruction<TProgram>)\n | ({\n instructionType: MultiWalletInstruction.TransactionBufferExecute;\n } & ParsedTransactionBufferExecuteInstruction<TProgram>)\n | ({\n instructionType: MultiWalletInstruction.TransactionBufferExecuteCompressed;\n } & ParsedTransactionBufferExecuteCompressedInstruction<TProgram>)\n | ({\n instructionType: MultiWalletInstruction.TransactionBufferExtend;\n } & ParsedTransactionBufferExtendInstruction<TProgram>)\n | ({\n instructionType: MultiWalletInstruction.TransactionBufferExtendCompressed;\n } & ParsedTransactionBufferExtendCompressedInstruction<TProgram>)\n | ({\n instructionType: MultiWalletInstruction.TransactionBufferVote;\n } & ParsedTransactionBufferVoteInstruction<TProgram>)\n | ({\n instructionType: MultiWalletInstruction.TransactionBufferVoteCompressed;\n } & ParsedTransactionBufferVoteCompressedInstruction<TProgram>)\n | ({\n instructionType: MultiWalletInstruction.TransactionExecute;\n } & ParsedTransactionExecuteInstruction<TProgram>)\n | ({\n instructionType: MultiWalletInstruction.TransactionExecuteCompressed;\n } & ParsedTransactionExecuteCompressedInstruction<TProgram>)\n | ({\n instructionType: MultiWalletInstruction.TransactionExecuteSync;\n } & ParsedTransactionExecuteSyncInstruction<TProgram>)\n | ({\n instructionType: MultiWalletInstruction.TransactionExecuteSyncCompressed;\n } & ParsedTransactionExecuteSyncCompressedInstruction<TProgram>);\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 \"gill\";\nimport { MULTI_WALLET_PROGRAM_ADDRESS } from \"../programs\";\n\n/** InvalidSignedMessage: Invalid signature: the provided signature does not match the expected message payload. */\nexport const MULTI_WALLET_ERROR__INVALID_SIGNED_MESSAGE = 0x1770; // 6000\n/** InvalidSecp256r1VerifyArg: Malformed or missing WebAuthn verification parameters. Please provide valid secp256r1 signature arguments. */\nexport const MULTI_WALLET_ERROR__INVALID_SECP256R1_VERIFY_ARG = 0x1771; // 6001\n/** DurableNonceDetected: Durable nonce detected: this program does not support transactions using a durable nonce. */\nexport const MULTI_WALLET_ERROR__DURABLE_NONCE_DETECTED = 0x1772; // 6002\n/** DuplicateMember: Duplicate public keys detected among members. Each member must have a unique key. */\nexport const MULTI_WALLET_ERROR__DUPLICATE_MEMBER = 0x1773; // 6003\n/** PermanentMember: Permanent members cannot be removed from a wallet. */\nexport const MULTI_WALLET_ERROR__PERMANENT_MEMBER = 0x1774; // 6004\n/** PermanentMemberNotAllowed: This operation cannot assign a permanent member. */\nexport const MULTI_WALLET_ERROR__PERMANENT_MEMBER_NOT_ALLOWED = 0x1775; // 6005\n/** OnlyOnePermanentMemberAllowed: Only one permanent member is allowed per wallet. */\nexport const MULTI_WALLET_ERROR__ONLY_ONE_PERMANENT_MEMBER_ALLOWED = 0x1776; // 6006\n/** OnlyOneTransactionManagerAllowed: Only one transaction manager is allowed per wallet. */\nexport const MULTI_WALLET_ERROR__ONLY_ONE_TRANSACTION_MANAGER_ALLOWED = 0x1777; // 6007\n/** TransactionManagerNotAllowed: This operation cannot assign a transaction manager. */\nexport const MULTI_WALLET_ERROR__TRANSACTION_MANAGER_NOT_ALLOWED = 0x1778; // 6008\n/** EmptyMembers: No members provided. A multisig wallet must contain at least one member. */\nexport const MULTI_WALLET_ERROR__EMPTY_MEMBERS = 0x1779; // 6009\n/** TooManyMembers: Too many members: a maximum of 4 members are supported. */\nexport const MULTI_WALLET_ERROR__TOO_MANY_MEMBERS = 0x177a; // 6010\n/** InvalidThreshold: Invalid threshold: must be at least 1 and cannot exceed the number of voting-eligible members. */\nexport const MULTI_WALLET_ERROR__INVALID_THRESHOLD = 0x177b; // 6011\n/** InvalidTransactionMessage: Malformed transaction message: structure or formatting does not match the expected layout. */\nexport const MULTI_WALLET_ERROR__INVALID_TRANSACTION_MESSAGE = 0x177c; // 6012\n/** InvalidNumberOfAccounts: Unexpected number of accounts provided for this instruction. */\nexport const MULTI_WALLET_ERROR__INVALID_NUMBER_OF_ACCOUNTS = 0x177d; // 6013\n/** InvalidAccount: One or more provided accounts failed validation. Verify that all required accounts are included and correct. */\nexport const MULTI_WALLET_ERROR__INVALID_ACCOUNT = 0x177e; // 6014\n/** InvalidArguments: Invalid or missing instruction arguments. Ensure all required arguments are correctly provided. */\nexport const MULTI_WALLET_ERROR__INVALID_ARGUMENTS = 0x177f; // 6015\n/** MissingAccount: A required account is missing from the instruction context. */\nexport const MULTI_WALLET_ERROR__MISSING_ACCOUNT = 0x1780; // 6016\n/** MissingUserArgs: User mutation arguments are required when performing add or remove delegate operations. */\nexport const MULTI_WALLET_ERROR__MISSING_USER_ARGS = 0x1781; // 6017\n/** AlreadyDelegated: This member is already delegated to another wallet. */\nexport const MULTI_WALLET_ERROR__ALREADY_DELEGATED = 0x1782; // 6018\n/** InsufficientSignerWithExecutePermission: At least one signer with execute permission is required to proceed. */\nexport const MULTI_WALLET_ERROR__INSUFFICIENT_SIGNER_WITH_EXECUTE_PERMISSION = 0x1783; // 6019\n/** InsufficientSignerWithInitiatePermission: At least one signer with initiate permission is required to perform this action. */\nexport const MULTI_WALLET_ERROR__INSUFFICIENT_SIGNER_WITH_INITIATE_PERMISSION = 0x1784; // 6020\n/** InsufficientSignersWithVotePermission: Not enough members with vote permission to meet the approval threshold. */\nexport const MULTI_WALLET_ERROR__INSUFFICIENT_SIGNERS_WITH_VOTE_PERMISSION = 0x1785; // 6021\n/** UnexpectedSigner: Member is not part of the expected signers for this transaction. */\nexport const MULTI_WALLET_ERROR__UNEXPECTED_SIGNER = 0x1786; // 6022\n/** NoSignerFound: No valid signer found in this transaction. */\nexport const MULTI_WALLET_ERROR__NO_SIGNER_FOUND = 0x1787; // 6023\n/** UnauthorisedToCloseTransactionBuffer: Only the transaction creator or rent payer may close this transaction buffer. */\nexport const MULTI_WALLET_ERROR__UNAUTHORISED_TO_CLOSE_TRANSACTION_BUFFER = 0x1788; // 6024\n/** InvalidBuffer: Buffer validation failed: contents do not match the expected hash (possible tampering detected). */\nexport const MULTI_WALLET_ERROR__INVALID_BUFFER = 0x1789; // 6025\n/** FinalBufferHashMismatch: Final buffer hash mismatch: the serialized data may be corrupted or altered. */\nexport const MULTI_WALLET_ERROR__FINAL_BUFFER_HASH_MISMATCH = 0x178a; // 6026\n/** FinalBufferSizeExceeded: The serialized transaction buffer exceeds the maximum size of 10,128 bytes. */\nexport const MULTI_WALLET_ERROR__FINAL_BUFFER_SIZE_EXCEEDED = 0x178b; // 6027\n/** FinalBufferSizeMismatch: Declared buffer size does not match the actual serialized size. */\nexport const MULTI_WALLET_ERROR__FINAL_BUFFER_SIZE_MISMATCH = 0x178c; // 6028\n/** TransactionHasExpired: This transaction has expired. It must be executed within 3 minutes of approval. */\nexport const MULTI_WALLET_ERROR__TRANSACTION_HAS_EXPIRED = 0x178d; // 6029\n/** TransactionNotApproved: This transaction has not yet reached the required approval threshold. */\nexport const MULTI_WALLET_ERROR__TRANSACTION_NOT_APPROVED = 0x178e; // 6030\n/** ProtectedAccount: Writable CPI calls to protected accounts are not permitted. */\nexport const MULTI_WALLET_ERROR__PROTECTED_ACCOUNT = 0x178f; // 6031\n/** MaxLengthExceeded: An input string exceeds the maximum allowed character length. */\nexport const MULTI_WALLET_ERROR__MAX_LENGTH_EXCEEDED = 0x1790; // 6032\n/** MissingSysvarSlotHistory: Missing required sysvar: Slot History must be included as an account in this instruction. */\nexport const MULTI_WALLET_ERROR__MISSING_SYSVAR_SLOT_HISTORY = 0x1791; // 6033\n/** InvalidSysvarDataFormat: Failed to parse the Slot History sysvar: data format is invalid or corrupted. */\nexport const MULTI_WALLET_ERROR__INVALID_SYSVAR_DATA_FORMAT = 0x1792; // 6034\n/** SlotNumberNotFound: The specified slot number was not found in the provided slot history. */\nexport const MULTI_WALLET_ERROR__SLOT_NUMBER_NOT_FOUND = 0x1793; // 6035\n/** DomainConfigIsDisabled: The domain configuration account is disabled. Please contact support or try again later. */\nexport const MULTI_WALLET_ERROR__DOMAIN_CONFIG_IS_DISABLED = 0x1794; // 6036\n/** DomainConfigIsMissing: Missing domain configuration account. Include it as a required account in this instruction. */\nexport const MULTI_WALLET_ERROR__DOMAIN_CONFIG_IS_MISSING = 0x1795; // 6037\n/** MemberDoesNotBelongToDomainConfig: This member is not registered under the provided domain configuration. */\nexport const MULTI_WALLET_ERROR__MEMBER_DOES_NOT_BELONG_TO_DOMAIN_CONFIG = 0x1796; // 6038\n/** RpIdHashMismatch: The relying party ID hash does not match the one defined in the domain configuration. */\nexport const MULTI_WALLET_ERROR__RP_ID_HASH_MISMATCH = 0x1797; // 6039\n/** OriginIndexOutOfBounds: The given origin index is not in the whitelisted origins. */\nexport const MULTI_WALLET_ERROR__ORIGIN_INDEX_OUT_OF_BOUNDS = 0x1798; // 6040\n\nexport type MultiWalletError =\n | typeof MULTI_WALLET_ERROR__ALREADY_DELEGATED\n | typeof MULTI_WALLET_ERROR__DOMAIN_CONFIG_IS_DISABLED\n | typeof MULTI_WALLET_ERROR__DOMAIN_CONFIG_IS_MISSING\n | typeof MULTI_WALLET_ERROR__DUPLICATE_MEMBER\n | typeof MULTI_WALLET_ERROR__DURABLE_NONCE_DETECTED\n | typeof MULTI_WALLET_ERROR__EMPTY_MEMBERS\n | typeof MULTI_WALLET_ERROR__FINAL_BUFFER_HASH_MISMATCH\n | typeof MULTI_WALLET_ERROR__FINAL_BUFFER_SIZE_EXCEEDED\n | typeof MULTI_WALLET_ERROR__FINAL_BUFFER_SIZE_MISMATCH\n | typeof MULTI_WALLET_ERROR__INSUFFICIENT_SIGNERS_WITH_VOTE_PERMISSION\n | typeof MULTI_WALLET_ERROR__INSUFFICIENT_SIGNER_WITH_EXECUTE_PERMISSION\n | typeof MULTI_WALLET_ERROR__INSUFFICIENT_SIGNER_WITH_INITIATE_PERMISSION\n | typeof MULTI_WALLET_ERROR__INVALID_ACCOUNT\n | typeof MULTI_WALLET_ERROR__INVALID_ARGUMENTS\n | typeof MULTI_WALLET_ERROR__INVALID_BUFFER\n | typeof MULTI_WALLET_ERROR__INVALID_NUMBER_OF_ACCOUNTS\n | typeof MULTI_WALLET_ERROR__INVALID_SECP256R1_VERIFY_ARG\n | typeof MULTI_WALLET_ERROR__INVALID_SIGNED_MESSAGE\n | typeof MULTI_WALLET_ERROR__INVALID_SYSVAR_DATA_FORMAT\n | typeof MULTI_WALLET_ERROR__INVALID_THRESHOLD\n | typeof MULTI_WALLET_ERROR__INVALID_TRANSACTION_MESSAGE\n | typeof MULTI_WALLET_ERROR__MAX_LENGTH_EXCEEDED\n | typeof MULTI_WALLET_ERROR__MEMBER_DOES_NOT_BELONG_TO_DOMAIN_CONFIG\n | typeof MULTI_WALLET_ERROR__MISSING_ACCOUNT\n | typeof MULTI_WALLET_ERROR__MISSING_SYSVAR_SLOT_HISTORY\n | typeof MULTI_WALLET_ERROR__MISSING_USER_ARGS\n | typeof MULTI_WALLET_ERROR__NO_SIGNER_FOUND\n | typeof MULTI_WALLET_ERROR__ONLY_ONE_PERMANENT_MEMBER_ALLOWED\n | typeof MULTI_WALLET_ERROR__ONLY_ONE_TRANSACTION_MANAGER_ALLOWED\n | typeof MULTI_WALLET_ERROR__ORIGIN_INDEX_OUT_OF_BOUNDS\n | typeof MULTI_WALLET_ERROR__PERMANENT_MEMBER\n | typeof MULTI_WALLET_ERROR__PERMANENT_MEMBER_NOT_ALLOWED\n | typeof MULTI_WALLET_ERROR__PROTECTED_ACCOUNT\n | typeof MULTI_WALLET_ERROR__RP_ID_HASH_MISMATCH\n | typeof MULTI_WALLET_ERROR__SLOT_NUMBER_NOT_FOUND\n | typeof MULTI_WALLET_ERROR__TOO_MANY_MEMBERS\n | typeof MULTI_WALLET_ERROR__TRANSACTION_HAS_EXPIRED\n | typeof MULTI_WALLET_ERROR__TRANSACTION_MANAGER_NOT_ALLOWED\n | typeof MULTI_WALLET_ERROR__TRANSACTION_NOT_APPROVED\n | typeof MULTI_WALLET_ERROR__UNAUTHORISED_TO_CLOSE_TRANSACTION_BUFFER\n | typeof MULTI_WALLET_ERROR__UNEXPECTED_SIGNER;\n\nlet multiWalletErrorMessages: Record<MultiWalletError, string> | undefined;\nif (process.env.NODE_ENV !== \"production\") {\n multiWalletErrorMessages = {\n [MULTI_WALLET_ERROR__ALREADY_DELEGATED]: `This member is already delegated to another wallet.`,\n [MULTI_WALLET_ERROR__DOMAIN_CONFIG_IS_DISABLED]: `The domain configuration account is disabled. Please contact support or try again later.`,\n [MULTI_WALLET_ERROR__DOMAIN_CONFIG_IS_MISSING]: `Missing domain configuration account. Include it as a required account in this instruction.`,\n [MULTI_WALLET_ERROR__DUPLICATE_MEMBER]: `Duplicate public keys detected among members. Each member must have a unique key.`,\n [MULTI_WALLET_ERROR__DURABLE_NONCE_DETECTED]: `Durable nonce detected: this program does not support transactions using a durable nonce.`,\n [MULTI_WALLET_ERROR__EMPTY_MEMBERS]: `No members provided. A multisig wallet must contain at least one member.`,\n [MULTI_WALLET_ERROR__FINAL_BUFFER_HASH_MISMATCH]: `Final buffer hash mismatch: the serialized data may be corrupted or altered.`,\n [MULTI_WALLET_ERROR__FINAL_BUFFER_SIZE_EXCEEDED]: `The serialized transaction buffer exceeds the maximum size of 10,128 bytes.`,\n [MULTI_WALLET_ERROR__FINAL_BUFFER_SIZE_MISMATCH]: `Declared buffer size does not match the actual serialized size.`,\n [MULTI_WALLET_ERROR__INSUFFICIENT_SIGNERS_WITH_VOTE_PERMISSION]: `Not enough members with vote permission to meet the approval threshold.`,\n [MULTI_WALLET_ERROR__INSUFFICIENT_SIGNER_WITH_EXECUTE_PERMISSION]: `At least one signer with execute permission is required to proceed.`,\n [MULTI_WALLET_ERROR__INSUFFICIENT_SIGNER_WITH_INITIATE_PERMISSION]: `At least one signer with initiate permission is required to perform this action.`,\n [MULTI_WALLET_ERROR__INVALID_ACCOUNT]: `One or more provided accounts failed validation. Verify that all required accounts are included and correct.`,\n [MULTI_WALLET_ERROR__INVALID_ARGUMENTS]: `Invalid or missing instruction arguments. Ensure all required arguments are correctly provided.`,\n [MULTI_WALLET_ERROR__INVALID_BUFFER]: `Buffer validation failed: contents do not match the expected hash (possible tampering detected).`,\n [MULTI_WALLET_ERROR__INVALID_NUMBER_OF_ACCOUNTS]: `Unexpected number of accounts provided for this instruction.`,\n [MULTI_WALLET_ERROR__INVALID_SECP256R1_VERIFY_ARG]: `Malformed or missing WebAuthn verification parameters. Please provide valid secp256r1 signature arguments.`,\n [MULTI_WALLET_ERROR__INVALID_SIGNED_MESSAGE]: `Invalid signature: the provided signature does not match the expected message payload.`,\n [MULTI_WALLET_ERROR__INVALID_SYSVAR_DATA_FORMAT]: `Failed to parse the Slot History sysvar: data format is invalid or corrupted.`,\n [MULTI_WALLET_ERROR__INVALID_THRESHOLD]: `Invalid threshold: must be at least 1 and cannot exceed the number of voting-eligible members.`,\n [MULTI_WALLET_ERROR__INVALID_TRANSACTION_MESSAGE]: `Malformed transaction message: structure or formatting does not match the expected layout.`,\n [MULTI_WALLET_ERROR__MAX_LENGTH_EXCEEDED]: `An input string exceeds the maximum allowed character length.`,\n [MULTI_WALLET_ERROR__MEMBER_DOES_NOT_BELONG_TO_DOMAIN_CONFIG]: `This member is not registered under the provided domain configuration.`,\n [MULTI_WALLET_ERROR__MISSING_ACCOUNT]: `A required account is missing from the instruction context.`,\n [MULTI_WALLET_ERROR__MISSING_SYSVAR_SLOT_HISTORY]: `Missing required sysvar: Slot History must be included as an account in this instruction.`,\n [MULTI_WALLET_ERROR__MISSING_USER_ARGS]: `User mutation arguments are required when performing add or remove delegate operations.`,\n [MULTI_WALLET_ERROR__NO_SIGNER_FOUND]: `No valid signer found in this transaction.`,\n [MULTI_WALLET_ERROR__ONLY_ONE_PERMANENT_MEMBER_ALLOWED]: `Only one permanent member is allowed per wallet.`,\n [MULTI_WALLET_ERROR__ONLY_ONE_TRANSACTION_MANAGER_ALLOWED]: `Only one transaction manager is allowed per wallet.`,\n [MULTI_WALLET_ERROR__ORIGIN_INDEX_OUT_OF_BOUNDS]: `The given origin index is not in the whitelisted origins.`,\n [MULTI_WALLET_ERROR__PERMANENT_MEMBER]: `Permanent members cannot be removed from a wallet.`,\n [MULTI_WALLET_ERROR__PERMANENT_MEMBER_NOT_ALLOWED]: `This operation cannot assign a permanent member.`,\n [MULTI_WALLET_ERROR__PROTECTED_ACCOUNT]: `Writable CPI calls to protected accounts are not permitted.`,\n [MULTI_WALLET_ERROR__RP_ID_HASH_MISMATCH]: `The relying party ID hash does not match the one defined in the domain configuration.`,\n [MULTI_WALLET_ERROR__SLOT_NUMBER_NOT_FOUND]: `The specified slot number was not found in the provided slot history.`,\n [MULTI_WALLET_ERROR__TOO_MANY_MEMBERS]: `Too many members: a maximum of 4 members are supported.`,\n [MULTI_WALLET_ERROR__TRANSACTION_HAS_EXPIRED]: `This transaction has expired. It must be executed within 3 minutes of approval.`,\n [MULTI_WALLET_ERROR__TRANSACTION_MANAGER_NOT_ALLOWED]: `This operation cannot assign a transaction manager.`,\n [MULTI_WALLET_ERROR__TRANSACTION_NOT_APPROVED]: `This transaction has not yet reached the required approval threshold.`,\n [MULTI_WALLET_ERROR__UNAUTHORISED_TO_CLOSE_TRANSACTION_BUFFER]: `Only the transaction creator or rent payer may close this transaction buffer.`,\n [MULTI_WALLET_ERROR__UNEXPECTED_SIGNER]: `Member is not part of the expected signers for this transaction.`,\n };\n}\n\nexport function getMultiWalletErrorMessage(code: MultiWalletError): string {\n if (process.env.NODE_ENV !== \"production\") {\n return (multiWalletErrorMessages as Record<MultiWalletError, string>)[code];\n }\n\n return \"Error message not available in production bundles.\";\n}\n\nexport function isMultiWalletError<TProgramErrorCode extends MultiWalletError>(\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 MULTI_WALLET_PROGRAM_ADDRESS,\n code\n );\n}\n","export type IKeyType = {\n keyType: number;\n};\n\nexport const KeyType = {\n Ed25519: 1 << 0,\n Secp256r1: 1 << 1,\n} as const;\n\nexport type KeyType = (typeof KeyType)[keyof typeof KeyType];\n","import type { IPermissions } from \"../generated\";\n\nexport const Permission = {\n InitiateTransaction: 1 << 0,\n VoteTransaction: 1 << 1,\n ExecuteTransaction: 1 << 2,\n} as const;\n\nexport const PermanentMemberPermission: IPermission = 1 << 3;\n\nexport const TransactionManagerPermission: IPermission = 1 << 4;\n\nexport type IPermission = (typeof Permission)[keyof typeof Permission];\n\nexport class Permissions implements IPermissions {\n private constructor(readonly mask: number) {}\n\n static fromPermissions(permissions: IPermission[]) {\n return new Permissions(\n permissions.reduce((mask, permission) => mask | permission, 0)\n );\n }\n\n static all() {\n return new Permissions(\n Object.values(Permission).reduce(\n (mask, permission) => mask | permission,\n 0\n )\n );\n }\n\n static has(permissions: IPermissions, permission: IPermission) {\n return (permissions.mask & permission) === permission;\n }\n}\n","import { getBase58Decoder, getBase58Encoder, type Address } from \"gill\";\n\nconst SECP256R1_PUBLIC_KEY_LENGTH = 33;\ntype Secp256r1KeyInitData = string | Uint8Array | Array<number>;\ntype SignedMessageDetails = {\n verifyArgs: {\n clientDataJson: Uint8Array;\n truncatedClientDataJson: Uint8Array;\n slotNumber: bigint;\n slotHash: Uint8Array;\n };\n domainConfig: Address;\n authData: Uint8Array;\n signature: Uint8Array;\n originIndex: number;\n crossOrigin: boolean;\n};\n\nexport class Secp256r1Key {\n protected _bn: Uint8Array | undefined;\n\n constructor(value: Secp256r1KeyInitData) {\n if (typeof value === \"string\") {\n this._bn = new Uint8Array(getBase58Encoder().encode(value));\n } else {\n this._bn = new Uint8Array(value);\n }\n this.validateKeyLength(this._bn);\n }\n\n protected validateKeyLength(key: Uint8Array | Array<number>) {\n if (key.length !== SECP256R1_PUBLIC_KEY_LENGTH) {\n throw new Error(\n `Invalid public key length, expected ${SECP256R1_PUBLIC_KEY_LENGTH} bytes but got ${key.length}`\n );\n }\n }\n\n toBase58() {\n return getBase58Decoder().decode(this.toBytes());\n }\n\n toTruncatedBuffer() {\n const buf = this.toBuffer();\n return buf.subarray(1, buf.length);\n }\n\n toBuffer() {\n if (!this._bn) {\n throw new Error(`Invalid public key input`);\n }\n const buf = this._bn;\n if (buf.byteLength === SECP256R1_PUBLIC_KEY_LENGTH) {\n return buf;\n } else {\n throw new Error(`Invalid public key input`);\n }\n }\n\n toBytes() {\n const buf = this.toBuffer();\n return new Uint8Array(buf.buffer, buf.byteOffset, buf.byteLength);\n }\n\n toString() {\n return this.toBase58();\n }\n\n toJSON() {\n return this.toBase58();\n }\n}\n\nexport class SignedSecp256r1Key extends Secp256r1Key {\n verifyArgs: SignedMessageDetails[\"verifyArgs\"];\n domainConfig: SignedMessageDetails[\"domainConfig\"];\n authData: SignedMessageDetails[\"authData\"];\n signature: SignedMessageDetails[\"signature\"];\n originIndex: SignedMessageDetails[\"originIndex\"];\n crossOrigin: SignedMessageDetails[\"crossOrigin\"];\n\n constructor(value: Secp256r1KeyInitData, signed: SignedMessageDetails) {\n super(value);\n this.verifyArgs = signed.verifyArgs;\n this.domainConfig = signed.domainConfig;\n this.authData = signed.authData;\n this.signature = signed.signature;\n this.originIndex = signed.originIndex;\n this.crossOrigin = signed.crossOrigin;\n }\n}\n","import {\n type CompiledTransactionMessage,\n getAddressCodec,\n getArrayCodec,\n getStructCodec,\n getU8Codec,\n type ReadonlyUint8Array,\n} from \"gill\";\nimport { MULTI_WALLET_PROGRAM_ADDRESS } from \"../generated\";\n\nfunction getCompiledInstructionCodec() {\n return getStructCodec([\n [\"programAddressIndex\", getU8Codec()],\n [\"accountIndices\", getArrayCodec(getU8Codec())],\n [\"data\", getArrayCodec(getU8Codec())],\n ]);\n}\n\nfunction getMessageAddressTableLookupCodec() {\n return getStructCodec([\n [\"lookupTableAddress\", getAddressCodec()],\n [\"writableIndexes\", getArrayCodec(getU8Codec())],\n [\"readonlyIndexes\", getArrayCodec(getU8Codec())],\n ]);\n}\n\nconst vaultTransactionMessageCodec = getStructCodec([\n [\"numSigners\", getU8Codec()],\n [\"numWritableSigners\", getU8Codec()],\n [\"numWritableNonSigners\", getU8Codec()],\n [\"accountKeys\", getArrayCodec(getAddressCodec())],\n [\"instructions\", getArrayCodec(getCompiledInstructionCodec())],\n [\"addressTableLookups\", getArrayCodec(getMessageAddressTableLookupCodec())],\n]);\n\nexport function vaultTransactionMessageSerialize(\n compiledMessage: CompiledTransactionMessage\n) {\n const transactionMessageBytes = vaultTransactionMessageCodec.encode({\n numSigners: compiledMessage.header.numSignerAccounts,\n numWritableSigners:\n compiledMessage.header.numSignerAccounts -\n compiledMessage.header.numReadonlySignerAccounts,\n numWritableNonSigners:\n compiledMessage.staticAccounts.length -\n compiledMessage.header.numSignerAccounts -\n compiledMessage.header.numReadonlyNonSignerAccounts,\n accountKeys: compiledMessage.staticAccounts,\n instructions: compiledMessage.instructions.map((ix) => {\n return {\n programAddressIndex: ix.programAddressIndex,\n accountIndices: ix.accountIndices ?? [],\n data: Array.from(ix.data ?? []),\n };\n }),\n addressTableLookups:\n compiledMessage.version !== \"legacy\"\n ? (compiledMessage.addressTableLookups?.map((x) => ({\n lookupTableAddress: x.lookupTableAddress,\n readonlyIndexes: x.readonlyIndexes as number[],\n writableIndexes: x.writableIndexes as number[],\n })) ?? [])\n : [],\n });\n\n return transactionMessageBytes;\n}\n\nexport function vaultTransactionMessageDeserialize(\n transactionMessageBytes: ReadonlyUint8Array\n): CompiledTransactionMessage {\n const vaultTransactionMessage = vaultTransactionMessageCodec.decode(\n transactionMessageBytes\n );\n return {\n header: {\n numSignerAccounts: vaultTransactionMessage.numSigners,\n numReadonlySignerAccounts:\n vaultTransactionMessage.numSigners -\n vaultTransactionMessage.numWritableSigners,\n numReadonlyNonSignerAccounts:\n vaultTransactionMessage.accountKeys.length -\n vaultTransactionMessage.numSigners -\n vaultTransactionMessage.numWritableNonSigners,\n },\n addressTableLookups: vaultTransactionMessage.addressTableLookups.map(\n (x) => ({\n lookupTableAddress: x.lookupTableAddress,\n readonlyIndexes: x.readonlyIndexes.map(Number),\n writableIndexes: x.writableIndexes.map(Number),\n readableIndices: x.readonlyIndexes.map(Number),\n writableIndices: x.writableIndexes.map(Number),\n })\n ),\n instructions: vaultTransactionMessage.instructions.map((x) => ({\n accountIndices: x.accountIndices.map(Number),\n data: new Uint8Array(x.data),\n programAddressIndex: x.programAddressIndex,\n })),\n lifetimeToken: MULTI_WALLET_PROGRAM_ADDRESS,\n staticAccounts: vaultTransactionMessage.accountKeys,\n version: 0,\n };\n}\n","import { featureFlags, VERSION } from \"@lightprotocol/stateless.js\";\n\nfeatureFlags.version = VERSION.V2;\nexport const ADDRESS_TREE_VERSION = \"v2\";\n\nexport const REVIBASE_RP_ID = \"revibase.com\";\n/**\n * Can be overriden during initialization\n */\nexport const REVIBASE_AUTH_ENDPOINT = \"https://auth.revibase.com\";\n\n/**\n * Can be overriden during initialization\n */\nexport const REVIBASE_API_ENDPOINT = \"https://api.revibase.com\";\n","import {\n batchAddressTree,\n createBN254,\n deriveAddressSeedV2,\n deriveAddressV2,\n} from \"@lightprotocol/stateless.js\";\nimport { sha256 } from \"@noble/hashes/sha256\";\nimport { PublicKey } from \"@solana/web3.js\";\nimport {\n getAddressEncoder,\n getProgramDerivedAddress,\n getU128Encoder,\n getU8Encoder,\n getUtf8Encoder,\n type Address,\n} from \"gill\";\nimport { MULTI_WALLET_PROGRAM_ADDRESS } from \"../../generated\";\nimport { Secp256r1Key } from \"../../types\";\nimport { ADDRESS_TREE_VERSION } from \"../consts\";\n\nexport function getCompressedSettingsAddressFromIndex(index: number | bigint) {\n const addressSeed = deriveAddressSeedV2([\n new Uint8Array(getUtf8Encoder().encode(\"multi_wallet\")),\n new Uint8Array(getU128Encoder().encode(index)),\n new Uint8Array(getUtf8Encoder().encode(ADDRESS_TREE_VERSION)),\n ]);\n const addressTree = new PublicKey(batchAddressTree); //default v2 public tree\n return {\n address: createBN254(\n deriveAddressV2(\n addressSeed,\n addressTree,\n new PublicKey(MULTI_WALLET_PROGRAM_ADDRESS)\n ).toString(),\n \"base58\"\n ),\n addressTree,\n };\n}\nexport function getUserAccountAddress(member: Address | Secp256r1Key) {\n const addressSeed = deriveAddressSeedV2([\n new Uint8Array(getUtf8Encoder().encode(\"user\")),\n member instanceof Secp256r1Key\n ? member.toTruncatedBuffer()\n : new Uint8Array(getAddressEncoder().encode(member)),\n new Uint8Array(getUtf8Encoder().encode(ADDRESS_TREE_VERSION)),\n ]);\n\n const addressTree = new PublicKey(batchAddressTree); // default v2 public tree\n return {\n address: createBN254(\n deriveAddressV2(\n addressSeed,\n addressTree,\n new PublicKey(MULTI_WALLET_PROGRAM_ADDRESS.toString())\n ).toString(),\n \"base58\"\n ),\n addressTree,\n };\n}\n\nexport async function getDomainConfigAddress({\n rpIdHash,\n rpId,\n}: {\n rpIdHash?: Uint8Array;\n rpId?: string;\n}) {\n if (!rpIdHash) {\n if (rpId) {\n rpIdHash = sha256(new Uint8Array(getUtf8Encoder().encode(rpId)));\n } else {\n throw new Error(\"RpId not found.\");\n }\n }\n if (!rpIdHash) {\n throw new Error(\"RpIdHash not found.\");\n }\n const [domainConfig] = await getProgramDerivedAddress({\n programAddress: MULTI_WALLET_PROGRAM_ADDRESS,\n seeds: [getUtf8Encoder().encode(\"domain_config\"), rpIdHash],\n });\n\n return domainConfig;\n}\n\nexport async function getGlobalCounterAddress() {\n const [globalCounter] = await getProgramDerivedAddress({\n programAddress: MULTI_WALLET_PROGRAM_ADDRESS,\n seeds: [getUtf8Encoder().encode(\"global_counter\")],\n });\n\n return globalCounter;\n}\nexport async function getTransactionBufferAddress(\n settings: Address,\n creator: Address | Secp256r1Key,\n buffer_index: number\n) {\n if (buffer_index > 255) {\n throw new Error(\"Index cannot be greater than 255.\");\n }\n const [transactionBuffer] = await getProgramDerivedAddress({\n programAddress: MULTI_WALLET_PROGRAM_ADDRESS,\n seeds: [\n getUtf8Encoder().encode(\"multi_wallet\"),\n getAddressEncoder().encode(settings),\n getUtf8Encoder().encode(\"transaction_buffer\"),\n creator instanceof Secp256r1Key\n ? creator.toTruncatedBuffer()\n : getAddressEncoder().encode(creator),\n getU8Encoder().encode(buffer_index),\n ],\n });\n\n return transactionBuffer;\n}\nexport async function getWalletAddressFromSettings(settings: Address) {\n const [address] = await getProgramDerivedAddress({\n programAddress: MULTI_WALLET_PROGRAM_ADDRESS,\n seeds: [\n getUtf8Encoder().encode(\"multi_wallet\"),\n getAddressEncoder().encode(settings),\n getUtf8Encoder().encode(\"vault\"),\n ],\n });\n\n return address;\n}\nexport async function getSettingsFromIndex(index: number | bigint) {\n const [settings] = await getProgramDerivedAddress({\n programAddress: MULTI_WALLET_PROGRAM_ADDRESS,\n seeds: [\n getUtf8Encoder().encode(\"multi_wallet\"),\n getU128Encoder().encode(index),\n ],\n });\n\n return settings;\n}\nexport async function getWalletAddressFromIndex(index: number | bigint) {\n const settings = await getSettingsFromIndex(index);\n const address = await getWalletAddressFromSettings(settings);\n return address;\n}\n\nexport async function getLightCpiSigner() {\n const [lightCpiSigner] = await getProgramDerivedAddress({\n programAddress: MULTI_WALLET_PROGRAM_ADDRESS,\n seeds: [getUtf8Encoder().encode(\"cpi_authority\")],\n });\n return lightCpiSigner;\n}\n","import { sha256 } from \"@noble/hashes/sha256\";\nimport {\n type AccountMeta,\n AccountRole,\n type Address,\n address,\n appendTransactionMessageInstructions,\n compileTransaction,\n compressTransactionMessageUsingAddressLookupTables,\n createTransactionMessage,\n getAddressEncoder,\n getBase58Encoder,\n getBase64Decoder,\n getBlockhashDecoder,\n getTransactionEncoder,\n type Instruction,\n type OptionOrNullable,\n pipe,\n prependTransactionMessageInstructions,\n type Rpc,\n setTransactionMessageFeePayerSigner,\n setTransactionMessageLifetimeUsingBlockhash,\n type SignatureBytes,\n signTransactionMessageWithSigners,\n type SolanaRpcApi,\n some,\n type TransactionSigner,\n} from \"gill\";\nimport {\n getSetComputeUnitLimitInstruction,\n getTransferSolInstruction,\n} from \"gill/programs\";\nimport type { MemberKey, Secp256r1VerifyArgs } from \"../../generated\";\nimport {\n KeyType,\n Secp256r1Key,\n SignedSecp256r1Key,\n type TransactionDetails,\n} from \"../../types\";\nimport { getSolanaRpc } from \"../initialize\";\n\nexport async function createEncodedBundle(\n bundle: (TransactionDetails & { unitsConsumed?: number })[],\n isSimulate = false\n) {\n const latestBlockHash = isSimulate\n ? {\n blockhash: getBlockhashDecoder().decode(\n crypto.getRandomValues(new Uint8Array(32))\n ),\n lastValidBlockHeight: BigInt(Number.MAX_SAFE_INTEGER),\n }\n : (await getSolanaRpc().getLatestBlockhash().send()).value;\n return await Promise.all(\n bundle.map(async (x) => {\n const tx = await pipe(\n createTransactionMessage({ version: 0 }),\n (tx) => appendTransactionMessageInstructions(x.instructions, tx),\n (tx) => setTransactionMessageFeePayerSigner(x.payer, tx),\n (tx) =>\n setTransactionMessageLifetimeUsingBlockhash(latestBlockHash, tx),\n (tx) =>\n x.addressesByLookupTableAddress\n ? compressTransactionMessageUsingAddressLookupTables(\n tx,\n x.addressesByLookupTableAddress\n )\n : tx,\n async (tx) => {\n const computeUnits =\n Math.ceil((x.unitsConsumed ?? 0) * 1.1) || 800000;\n return computeUnits > 200000\n ? prependTransactionMessageInstructions(\n [\n getSetComputeUnitLimitInstruction({\n units: computeUnits,\n }),\n ],\n tx\n )\n : tx;\n },\n async (tx) =>\n isSimulate\n ? compileTransaction(await tx)\n : await signTransactionMessageWithSigners(await tx)\n );\n return tx;\n })\n );\n}\nexport async function getMedianPriorityFees(\n connection: Rpc<SolanaRpcApi>,\n accounts: AccountMeta[]\n) {\n const recentFees = await connection\n .getRecentPrioritizationFees(\n accounts\n .filter(\n (x) =>\n x.role === AccountRole.WRITABLE ||\n x.role === AccountRole.WRITABLE_SIGNER\n )\n .map((x) => x.address)\n )\n .send();\n const fees = recentFees.map((f) => Number(f.prioritizationFee));\n fees.sort((a, b) => a - b);\n const mid = Math.floor(fees.length / 2);\n\n if (fees.length % 2 === 0) {\n return Math.round((fees[mid - 1] + fees[mid]) / 2);\n } else {\n return fees[mid];\n }\n}\n\nexport async function simulateBundle(bundle: string[], connectionUrl: string) {\n if (bundle.length === 0) {\n throw new Error(\"Bundle is empty.\");\n }\n\n for (let i = 0; i < bundle.length; i++) {\n if (bundle[i].length > 1644) {\n throw new Error(\n `Transaction ${i} exceeds maximum length, ${bundle[i].length}. Retry again.`\n );\n }\n console.log(`Transaction ${i} length: ${bundle[i].length}`);\n }\n\n const response = await fetch(connectionUrl, {\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n },\n body: JSON.stringify({\n jsonrpc: \"2.0\",\n id: \"2\",\n method: \"simulateBundle\",\n params: [\n {\n encodedTransactions: bundle,\n },\n {\n skipSigVerify: true,\n replaceRecentBlockhash: true,\n preExecutionAccountsConfigs: bundle.map(() => ({\n encoding: \"base64\",\n addresses: [],\n })),\n postExecutionAccountsConfigs: bundle.map(() => ({\n encoding: \"base64\",\n addresses: [],\n })),\n },\n ],\n }),\n });\n\n if (!response.ok) {\n console.error(await response.json());\n throw new Error(\"Failed to simulate bundle\");\n }\n const { result, error } = await response.json();\n\n if (!result || error) {\n console.error(error ?? result);\n throw new Error(\n `Unable to simulate bundle: ${JSON.stringify(error ?? result)}`\n );\n }\n if (typeof result.value.summary !== \"string\" && result.value.summary.failed) {\n const { TransactionFailure } = result.value.summary.failed.error;\n const [, programError] = TransactionFailure;\n console.error(error ?? result);\n throw new Error(`Simulation failed: ${programError}`);\n }\n\n return result.value.transactionResults.map((x: any) => x.unitsConsumed);\n}\n\nexport function extractSecp256r1VerificationArgs(\n signer?: SignedSecp256r1Key | TransactionSigner,\n index = 0\n) {\n const secp256r1PublicKey =\n signer instanceof SignedSecp256r1Key ? signer : undefined;\n const verifyArgs: OptionOrNullable<Secp256r1VerifyArgs> =\n secp256r1PublicKey?.verifyArgs && index !== -1\n ? some({\n signedMessageIndex: index,\n truncatedClientDataJson:\n secp256r1PublicKey.verifyArgs.truncatedClientDataJson,\n slotNumber: secp256r1PublicKey.verifyArgs.slotNumber,\n originIndex: secp256r1PublicKey.originIndex,\n crossOrigin: secp256r1PublicKey.crossOrigin,\n })\n : null;\n\n const domainConfig = secp256r1PublicKey?.domainConfig\n ? secp256r1PublicKey.domainConfig\n : undefined;\n const signature = secp256r1PublicKey?.verifyArgs\n ? secp256r1PublicKey.signature\n : undefined;\n const message =\n secp256r1PublicKey?.authData &&\n secp256r1PublicKey.verifyArgs?.clientDataJson\n ? new Uint8Array([\n ...secp256r1PublicKey.authData,\n ...sha256(secp256r1PublicKey.verifyArgs.clientDataJson),\n ])\n : undefined;\n const publicKey = secp256r1PublicKey?.toBuffer();\n\n return {\n domainConfig,\n verifyArgs,\n signature,\n message,\n publicKey,\n };\n}\nexport function convertPubkeyToMemberkey(\n pubkey: TransactionSigner | Address | Secp256r1Key\n): MemberKey {\n if (pubkey instanceof Secp256r1Key) {\n return { keyType: KeyType.Secp256r1, key: pubkey.toBytes() };\n } else {\n let address;\n try {\n address = \"address\" in pubkey ? pubkey.address : pubkey;\n } catch {\n address = pubkey as Address;\n }\n return {\n keyType: KeyType.Ed25519,\n key: new Uint8Array([\n 0, // pad start with zero to make it 33 bytes\n ...getAddressEncoder().encode(address),\n ]),\n };\n }\n}\nfunction getPubkeyString(pubkey: TransactionSigner | SignedSecp256r1Key) {\n if (pubkey instanceof SignedSecp256r1Key) {\n return pubkey.toString();\n } else {\n return pubkey.address.toString();\n }\n}\nexport function getDeduplicatedSigners(\n signers: (SignedSecp256r1Key | TransactionSigner)[]\n) {\n const hashSet = new Set();\n const dedupSigners: (SignedSecp256r1Key | TransactionSigner)[] = [];\n for (const signer of signers) {\n if (!hashSet.has(getPubkeyString(signer))) {\n dedupSigners.push(signer);\n hashSet.add(getPubkeyString(signer));\n }\n }\n\n // due to current tx size limit (can be removed once tx size limit increases)\n if (dedupSigners.filter((x) => x instanceof SignedSecp256r1Key).length > 1) {\n throw new Error(\n \"More than 1 Secp256r1 signers in an instruction is not supported.\"\n );\n }\n return dedupSigners;\n}\n\nexport function addJitoTip({\n payer,\n tipAmount,\n}: {\n payer: TransactionSigner;\n tipAmount: number;\n}): Instruction {\n const JITO_TIP_ACCOUNTS = [\n \"HFqU5x63VTqvQss8hp11i4wVV8bD44PvwucfZ2bU7gRe\",\n \"ADaUMid9yfUytqMBgopwjb2DTLSokTSzL1zt6iGPaS49\",\n \"96gYZGLnJYVFmbjzopPSU6QiEV5fGqZNyN9nmNhvrZU5\",\n \"Cw8CFyM9FkoMi7K7Crf6HNQqf4uEMzpKw6QNghXLvLkY\",\n \"DfXygSm4jCyNCybVYYK6DwvWqjKee8pbDmJGcLWNDXjh\",\n \"ADuUkR4vqLUMWXxW9gh6D6L8pMSawimctcNZ5pGwDcEt\",\n \"3AVi9Tg9Uo68tJfuvoKvqKNWKkC5wPdSSdeBnizKZ6jT\",\n \"DttWaMuVvTiduZRnguLF7jNxTgiMBZ1hyAumKUiL2KRL\",\n ];\n const tipAccount =\n JITO_TIP_ACCOUNTS[Math.floor(Math.random() * JITO_TIP_ACCOUNTS.length)];\n return getTransferSolInstruction({\n source: payer,\n destination: address(tipAccount),\n amount: tipAmount,\n });\n}\nexport async function getRandomPayer(\n payerEndpoint: string\n): Promise<TransactionSigner> {\n const response = await fetch(`${payerEndpoint}/getRandomPayer`);\n const { randomPayer } = (await response.json()) as { randomPayer: string };\n\n return {\n address: address(randomPayer),\n async signTransactions(transactions) {\n const payload = {\n publicKey: randomPayer,\n transactions: transactions.map((tx) =>\n getBase64Decoder().decode(getTransactionEncoder().encode(tx))\n ),\n };\n\n const response = await fetch(`${payerEndpoint}/sign`, {\n method: \"POST\",\n headers: { \"Content-Type\": \"application/json\" },\n body: JSON.stringify(payload),\n });\n\n const data = (await response.json()) as\n | { signatures: string[] }\n | { error: string };\n\n if (\"error\" in data) {\n throw new Error(data.error);\n }\n\n return data.signatures.map((sig) => ({\n [address(randomPayer)]: getBase58Encoder().encode(\n sig\n ) as SignatureBytes,\n }));\n },\n };\n}\n","import {\n createRpc,\n Rpc as LightProtocolRpc,\n} from \"@lightprotocol/stateless.js\";\nimport {\n createSolanaClient,\n type CompilableTransactionMessage,\n type Rpc,\n type SendAndConfirmTransactionWithSignersFunction,\n type SolanaRpcApi,\n type TransactionMessage,\n type TransactionMessageWithFeePayer,\n type TransactionSigner,\n} from \"gill\";\nimport { estimateComputeUnitLimitFactory } from \"gill/programs\";\nimport type { JitoTipsConfig } from \"../types\";\nimport { REVIBASE_API_ENDPOINT, REVIBASE_AUTH_ENDPOINT } from \"./consts\";\nimport { getRandomPayer } from \"./transaction/internal\";\n\nlet globalSolanaRpcEndpoint: string | null = null;\nlet lightProtocolRpc: LightProtocolRpc | null = null;\nlet globalSolanaRpc: Rpc<SolanaRpcApi> | null = null;\nlet globalSendAndConfirmTransaction: SendAndConfirmTransactionWithSignersFunction | null =\n null;\nlet globalComputeBudgetEstimate:\n | ((\n transactionMessage:\n | CompilableTransactionMessage\n | (TransactionMessage & TransactionMessageWithFeePayer),\n config?: any\n ) => Promise<number>)\n | null = null;\n\nlet globalFeePayer: TransactionSigner | null = null;\nlet globalApiEndpoint: string | null = null;\nlet globalJitoTipsConfig: JitoTipsConfig | null = null;\nlet globalAuthEndpoint: string | null = null;\nlet globalAuthorizedClient: { publicKey: string; url: string } | null = null;\nlet globalAdditionalInfo: any | null = null;\n\nexport function getSolanaRpcEndpoint() {\n if (!globalSolanaRpcEndpoint) throw new Error(\"Rpc is not initialized yet.\");\n return globalSolanaRpcEndpoint;\n}\n\nexport function getLightProtocolRpc() {\n if (!lightProtocolRpc) throw new Error(\"Rpc is not initialized yet\");\n return lightProtocolRpc;\n}\n\nexport function getSolanaRpc() {\n if (!globalSolanaRpc) throw new Error(\"Rpc is not initialized yet\");\n return globalSolanaRpc;\n}\n\nexport function getSendAndConfirmTransaction() {\n if (!globalSendAndConfirmTransaction)\n throw new Error(\"Rpc is not initialized yet.\");\n return globalSendAndConfirmTransaction;\n}\n\nexport function getComputeBudgetEstimate() {\n if (!globalComputeBudgetEstimate)\n throw new Error(\"Rpc is not initialized yet\");\n return globalComputeBudgetEstimate;\n}\n\nexport async function getFeePayer() {\n if (!globalFeePayer) {\n globalFeePayer = await getRandomPayer(\n globalApiEndpoint ?? REVIBASE_API_ENDPOINT\n );\n }\n return globalFeePayer;\n}\n\nexport function getJitoTipsConfig() {\n if (!globalJitoTipsConfig) throw new Error(\"Jito Bundle Config is not set.\");\n return globalJitoTipsConfig;\n}\n\nexport function getAuthEndpoint() {\n return globalAuthEndpoint ?? REVIBASE_AUTH_ENDPOINT;\n}\n\nexport function getGlobalAuthorizedClient() {\n return globalAuthorizedClient;\n}\n\nexport function getGlobalAdditonalInfo() {\n return globalAdditionalInfo;\n}\n\nexport function uninitialize() {\n lightProtocolRpc = null;\n globalSolanaRpc = null;\n globalSolanaRpcEndpoint = null;\n globalFeePayer = null;\n globalApiEndpoint = null;\n globalJitoTipsConfig = null;\n globalAuthEndpoint = null;\n globalSendAndConfirmTransaction = null;\n globalComputeBudgetEstimate = null;\n globalAuthorizedClient = null;\n}\n\nexport function initialize({\n rpcEndpoint,\n proverEndpoint,\n compressionApiEndpoint,\n jitoTipsConfig,\n apiEndpoint,\n authEndpoint,\n authorizedClient,\n additionalInfo,\n}: {\n rpcEndpoint: string;\n proverEndpoint?: string;\n compressionApiEndpoint?: string;\n jitoTipsConfig?: JitoTipsConfig;\n apiEndpoint?: string;\n authEndpoint?: string;\n authorizedClient?: { publicKey: string; url: string };\n additionalInfo?: any;\n}) {\n globalSolanaRpcEndpoint = rpcEndpoint;\n lightProtocolRpc = createRpc(\n globalSolanaRpcEndpoint,\n compressionApiEndpoint,\n proverEndpoint\n );\n const { rpc, sendAndConfirmTransaction } = createSolanaClient({\n urlOrMoniker: globalSolanaRpcEndpoint,\n });\n globalSolanaRpc = rpc;\n globalSendAndConfirmTransaction = sendAndConfirmTransaction;\n globalComputeBudgetEstimate = estimateComputeUnitLimitFactory({\n rpc,\n });\n\n globalApiEndpoint = apiEndpoint ?? null;\n globalJitoTipsConfig = jitoTipsConfig ?? null;\n globalAuthEndpoint = authEndpoint ?? null;\n globalAuthorizedClient = authorizedClient ?? null;\n globalAdditionalInfo = additionalInfo ?? null;\n}\n","import {\n type AccountProofInput,\n getLightSystemAccountMetasV2,\n type NewAddressProofInput,\n type PackedAddressTreeInfo,\n type PackedStateTreeInfo,\n type PackedTreeInfos,\n selectStateTreeInfo,\n type TreeInfo,\n TreeType,\n} from \"@lightprotocol/stateless.js\";\nimport { PublicKey } from \"@solana/web3.js\";\nimport {\n type AccountMeta,\n AccountRole,\n type AccountSignerMeta,\n address,\n} from \"gill\";\nimport { MULTI_WALLET_PROGRAM_ADDRESS } from \"../../generated\";\nimport { getLightProtocolRpc } from \"../initialize\";\n\ninterface MapData {\n index: number;\n accountMeta: AccountMeta;\n}\n\nexport class PackedAccounts {\n preAccounts: AccountMeta[];\n systemAccounts: AccountMeta[];\n nextIndex: number;\n map: Map<string, MapData>;\n outputTreeIndex: number;\n\n constructor() {\n this.preAccounts = [];\n this.systemAccounts = [];\n this.nextIndex = 0;\n this.map = new Map();\n this.outputTreeIndex = -1;\n }\n\n addPreAccounts(accounts: (AccountMeta | AccountSignerMeta)[]): void {\n this.preAccounts.push(...accounts);\n }\n\n getAccountRole(isSigner: boolean, isWritable: boolean): AccountRole {\n if (isSigner) {\n return isWritable\n ? AccountRole.WRITABLE_SIGNER\n : AccountRole.READONLY_SIGNER;\n } else {\n return isWritable ? AccountRole.WRITABLE : AccountRole.READONLY;\n }\n }\n\n async addSystemAccounts(): Promise<void> {\n this.systemAccounts.push(\n ...getLightSystemAccountMetasV2({\n selfProgram: new PublicKey(MULTI_WALLET_PROGRAM_ADDRESS.toString()),\n }).map((x) => ({\n address: address(x.pubkey.toString()),\n role: this.getAccountRole(x.isSigner, x.isWritable),\n }))\n );\n }\n\n insertOrGet(pubkey: string): number {\n return this.insertOrGetConfig(pubkey, AccountRole.WRITABLE);\n }\n\n insertOrGetConfig(pubkey: string, role: AccountRole): number {\n if (!this.map.has(pubkey)) {\n const index = this.nextIndex++;\n const accountMeta: AccountMeta = {\n address: address(pubkey),\n role,\n };\n this.map.set(pubkey, { index, accountMeta });\n }\n return this.map.get(pubkey)!.index;\n }\n\n packOutputTreeIndex(outputStateTreeInfo: TreeInfo) {\n if (outputStateTreeInfo.treeType === TreeType.StateV1) {\n return this.insertOrGet(outputStateTreeInfo.tree.toString());\n } else if (outputStateTreeInfo.treeType === TreeType.StateV2) {\n return this.insertOrGet(outputStateTreeInfo.queue.toString());\n }\n throw new Error(\"Tree type not supported\");\n }\n\n async getOutputTreeIndex() {\n if (this.outputTreeIndex !== -1) {\n return this.outputTreeIndex;\n }\n\n const stateTreeInfos = await getLightProtocolRpc().getStateTreeInfos();\n const outputStateTreeIndex = this.packOutputTreeIndex(\n selectStateTreeInfo(stateTreeInfos)\n );\n return outputStateTreeIndex;\n }\n\n packTreeInfos(\n accountProofInputs: AccountProofInput[],\n newAddressProofInputs: NewAddressProofInput[]\n ): PackedTreeInfos {\n const stateTreeInfos: PackedStateTreeInfo[] = [];\n const addressTreeInfos: PackedAddressTreeInfo[] = [];\n\n for (const account of accountProofInputs) {\n const merkleTreePubkeyIndex = this.insertOrGet(\n account.treeInfo.tree.toString()\n );\n const queuePubkeyIndex = this.insertOrGet(\n account.treeInfo.queue.toString()\n );\n\n stateTreeInfos.push({\n rootIndex: account.rootIndex,\n merkleTreePubkeyIndex,\n queuePubkeyIndex,\n leafIndex: account.leafIndex,\n proveByIndex: account.proveByIndex,\n });\n\n const treeToUse = account.treeInfo.nextTreeInfo ?? account.treeInfo;\n const index = this.packOutputTreeIndex(treeToUse);\n if (this.outputTreeIndex === -1) {\n this.outputTreeIndex = index;\n }\n }\n\n for (const account of newAddressProofInputs) {\n const addressMerkleTreePubkeyIndex = this.insertOrGet(\n account.treeInfo.tree.toString()\n );\n const addressQueuePubkeyIndex = this.insertOrGet(\n account.treeInfo.queue.toString()\n );\n\n addressTreeInfos.push({\n rootIndex: account.rootIndex,\n addressMerkleTreePubkeyIndex,\n addressQueuePubkeyIndex,\n });\n }\n\n return {\n stateTrees:\n stateTreeInfos.length > 0\n ? {\n packedTreeInfos: stateTreeInfos,\n outputTreeIndex: this.outputTreeIndex,\n }\n : undefined,\n addressTrees: addressTreeInfos,\n };\n }\n\n hashSetAccountsToMetas(): AccountMeta[] {\n const packedAccounts: AccountMeta[] = Array.from(this.map.entries())\n .sort((a, b) => a[1].index - b[1].index)\n .map(([, { accountMeta }]) => ({ ...accountMeta }));\n return packedAccounts;\n }\n\n getOffsets(): [number, number] {\n const systemAccountsStartOffset = this.preAccounts.length;\n const packedAccountsStartOffset =\n systemAccountsStartOffset + this.systemAccounts.length;\n return [systemAccountsStartOffset, packedAccountsStartOffset];\n }\n\n toAccountMetas(): {\n remainingAccounts: AccountMeta[];\n systemOffset: number;\n packedOffset: number;\n } {\n const packedAccounts = this.hashSetAccountsToMetas();\n const [systemOffset, packedOffset] = this.getOffsets();\n const remainingAccounts = [\n ...this.preAccounts,\n ...this.systemAccounts,\n ...packedAccounts,\n ];\n return { remainingAccounts, systemOffset, packedOffset };\n }\n}\n","import {\n type AccountProofInput,\n type AddressWithTree,\n type BN254,\n type CompressedAccount,\n type HashWithTree,\n type TreeInfo,\n type ValidityProofWithContext,\n} from \"@lightprotocol/stateless.js\";\nimport BN from \"bn.js\";\nimport { some, type Decoder, type OptionOrNullable } from \"gill\";\nimport {\n getCompressedSettingsDecoder,\n type CompressedProof,\n type SettingsReadonlyArgs,\n} from \"../../generated\";\nimport { getCompressedSettingsAddressFromIndex } from \"../addresses\";\nimport { getLightProtocolRpc } from \"../initialize\";\nimport { PackedAccounts } from \"./packedAccounts\";\n\nexport async function getCompressedAccount(\n address: BN,\n cachedAccounts?: Map<string, any>\n): Promise<CompressedAccount | null> {\n let result = cachedAccounts?.get(address.toString());\n if (result) {\n return result;\n } else {\n const compressedAccount =\n await getLightProtocolRpc().getCompressedAccount(address);\n if (compressedAccount) {\n cachedAccounts?.set(address.toString(), compressedAccount);\n }\n return compressedAccount;\n }\n}\n\nexport async function getCompressedAccountHashes(\n addresses: { address: BN254; type: \"Settings\" | \"User\" }[],\n cachedAccounts?: Map<string, any>\n) {\n const compressedAccounts = await Promise.all(\n addresses.map(async (x) => getCompressedAccount(x.address, cachedAccounts))\n );\n\n const filtered = compressedAccounts\n .filter((x) => x !== null)\n .filter((x) => x.data !== null && x.address !== null);\n\n if (filtered.length !== addresses.length) {\n throw new Error(\"Unable to find compressed account.\");\n }\n\n return filtered.map((x, index) => ({\n ...x,\n type: addresses[index].type,\n tree: x.treeInfo.tree,\n queue: x.treeInfo.queue,\n }));\n}\n\nexport function convertToCompressedProofArgs(\n validityProof: ValidityProofWithContext | null,\n offset: number\n) {\n const proof: OptionOrNullable<CompressedProof> =\n validityProof?.compressedProof\n ? some({\n a: new Uint8Array(validityProof.compressedProof.a),\n b: new Uint8Array(validityProof.compressedProof.b),\n c: new Uint8Array(validityProof.compressedProof.c),\n })\n : null;\n return {\n proof,\n lightCpiAccountsStartIndex: offset,\n };\n}\n\nexport async function getCompressedAccountInitArgs(\n packedAccounts: PackedAccounts,\n treeInfos: TreeInfo[],\n roots: BN[],\n rootIndices: number[],\n newAddresses: (AddressWithTree & { type: \"User\" | \"Settings\" })[]\n) {\n if (newAddresses.length === 0) return [];\n const newAddressProofInputs = newAddresses.map((x, index) => ({\n treeInfo: treeInfos[index],\n root: roots[index],\n rootIndex: rootIndices[index],\n address: x.address.toArray(),\n }));\n\n const { addressTrees } = packedAccounts.packTreeInfos(\n [],\n newAddressProofInputs\n );\n const outputStateTreeIndex = await packedAccounts.getOutputTreeIndex();\n\n const creationArgs = newAddresses.map((addressWithTree, i) => ({\n addressTreeInfo: addressTrees[i],\n outputStateTreeIndex,\n address: addressWithTree.address,\n type: addressWithTree.type,\n }));\n\n return creationArgs;\n}\n\nexport function getCompressedAccountMutArgs<T>(\n packedAccounts: PackedAccounts,\n treeInfos: TreeInfo[],\n leafIndices: number[],\n rootIndices: number[],\n proveByIndices: boolean[],\n hashes: (HashWithTree & CompressedAccount)[],\n decoder: Decoder<T>\n) {\n const accountProofInputs: AccountProofInput[] = [];\n for (let index = 0; index < treeInfos.length; index++) {\n accountProofInputs.push({\n treeInfo: treeInfos[index],\n rootIndex: rootIndices[index],\n leafIndex: leafIndices[index],\n proveByIndex: proveByIndices[index],\n hash: hashes[index].hash,\n });\n }\n\n const stateTreeInfo = packedAccounts.packTreeInfos(\n accountProofInputs,\n []\n ).stateTrees;\n\n if (!stateTreeInfo) {\n throw new Error(\"Unable to parsed data.\");\n }\n\n const mutArgs = hashes.map((x, index) => ({\n data: decoder.decode(x.data!.data),\n accountMeta: {\n treeInfo: stateTreeInfo.packedTreeInfos[index],\n address: new Uint8Array(x.address!),\n outputStateTreeIndex: stateTreeInfo.outputTreeIndex,\n },\n }));\n\n return mutArgs;\n}\n\nexport async function constructSettingsProofArgs(\n compressed: boolean,\n index: bigint | number,\n simulateProof?: boolean,\n cachedAccounts?: Map<string, any>\n) {\n let settingsReadonlyArgs: SettingsReadonlyArgs | null = null;\n let proof: ValidityProofWithContext | null = null;\n const packedAccounts = new PackedAccounts();\n if (compressed) {\n await packedAccounts.addSystemAccounts();\n const { address } = getCompressedSettingsAddressFromIndex(index);\n const settings = (\n await getCompressedAccountHashes(\n [{ address, type: \"Settings\" }],\n cachedAccounts\n )\n )[0];\n if (simulateProof) {\n proof = {\n rootIndices: [0],\n roots: [],\n leafIndices: [settings.leafIndex],\n leaves: [],\n treeInfos: [settings.treeInfo],\n proveByIndices: [settings.proveByIndex],\n compressedProof: {\n a: Array.from(crypto.getRandomValues(new Uint8Array(32))),\n b: Array.from(crypto.getRandomValues(new Uint8Array(32))),\n c: Array.from(crypto.getRandomValues(new Uint8Array(32))),\n },\n };\n } else {\n proof = await getValidityProofWithRetry([settings], []);\n }\n\n const stateTreeInfo = packedAccounts.packTreeInfos(\n [\n {\n treeInfo: proof.treeInfos[0],\n rootIndex: proof.rootIndices[0],\n leafIndex: proof.leafIndices[0],\n proveByIndex: proof.proveByIndices[0],\n hash: settings.hash,\n },\n ],\n []\n ).stateTrees;\n\n if (!stateTreeInfo) {\n throw new Error(\"Unable to parsed data.\");\n }\n\n settingsReadonlyArgs = {\n accountMeta: {\n address: new Uint8Array(settings.address!),\n treeInfo: stateTreeInfo.packedTreeInfos[0],\n },\n data: getCompressedSettingsDecoder().decode(settings.data?.data!),\n };\n }\n return { settingsReadonlyArgs, proof, packedAccounts };\n}\n\nexport async function getValidityProofWithRetry(\n hashes?: HashWithTree[] | undefined,\n newAddresses?: AddressWithTree[],\n retry = 10,\n delay = 400\n) {\n let attempt = 1;\n while (attempt < retry) {\n try {\n const proof = await getLightProtocolRpc().getValidityProofV0(\n hashes,\n newAddresses\n );\n return proof;\n } catch (error) {\n console.error(`Attempt ${attempt}, Get Validity Proof failed. ${error}`);\n attempt++;\n if (attempt >= retry) {\n throw new Error(\n `Failed to get validity proof after ${retry} attempts: ${error}`\n );\n }\n await new Promise((resolve) => setTimeout(resolve, delay));\n }\n }\n throw new Error(`Failed to get validity proof after ${retry} attempts`);\n}\n","import { type Address } from \"gill\";\nimport {\n type CompressedSettingsData,\n fetchMaybeSettings,\n getCompressedSettingsAddressFromIndex,\n getCompressedSettingsDecoder,\n getUserAccountAddress,\n getUserDecoder,\n Secp256r1Key,\n type User,\n} from \"../..\";\nimport { getSettingsFromIndex } from \"../addresses\";\nimport { getSolanaRpc } from \"../initialize\";\nimport { getCompressedAccount } from \"./internal\";\n\nexport async function fetchUserAccountData(\n member: Address | Secp256r1Key,\n cachedAccounts?: Map<string, any>\n): Promise<User> {\n const result = await fetchMaybeUserAccountData(member, cachedAccounts);\n if (!result) {\n throw new Error(\"User cannot be found.\");\n }\n return result;\n}\n\nexport async function fetchMaybeUserAccountData(\n member: Address | Secp256r1Key,\n cachedAccounts?: Map<string, any>\n): Promise<User | null> {\n const { address } = getUserAccountAddress(member);\n const result = await getCompressedAccount(address, cachedAccounts);\n if (!result?.data?.data) {\n return null;\n }\n return getUserDecoder().decode(result.data.data);\n}\n\nexport async function fetchSettingsAccountData(\n index: number | bigint,\n cachedAccounts?: Map<string, any>\n): Promise<CompressedSettingsData & { isCompressed: boolean }> {\n const settingsData = await fetchMaybeSettingsAccountData(\n index,\n cachedAccounts\n );\n if (!settingsData) {\n throw new Error(\"Settings cannot be found.\");\n }\n return settingsData;\n}\n\nexport async function fetchMaybeSettingsAccountData(\n index: number | bigint,\n cachedAccounts?: Map<string, any>\n): Promise<(CompressedSettingsData & { isCompressed: boolean }) | null> {\n try {\n const { address } = getCompressedSettingsAddressFromIndex(index);\n const result = await getCompressedAccount(address, cachedAccounts);\n if (!result?.data?.data) {\n return null;\n }\n const data = getCompressedSettingsDecoder().decode(result.data.data);\n if (data.data.__option === \"None\") {\n return null;\n }\n return { ...data.data.value, isCompressed: true };\n } catch {\n const result = await fetchMaybeSettings(\n getSolanaRpc(),\n await getSettingsFromIndex(index)\n );\n if (!result.exists) {\n return null;\n }\n return {\n ...result.data,\n members: result.data.members.slice(0, result.data.membersLen),\n isCompressed: false,\n };\n }\n}\n","import { p256 } from \"@noble/curves/p256\";\nimport { Secp256r1Key } from \"../../types\";\nimport { createPopUp } from \"./helper\";\n\nlet activeMessageHandler: ((event: MessageEvent) => void) | null = null;\nconst HEARTBEAT_INTERVAL = 2000;\nconst TIMEOUT_BUFFER = 3000;\nconst DEFAULT_TIMEOUT = 5 * 60 * 1000;\n\nexport async function openAuthUrl({\n authUrl,\n additionalInfo,\n signer,\n popUp = null,\n data,\n}: {\n authUrl: string;\n additionalInfo?: any;\n data?: {\n type: \"transaction\" | \"message\";\n payload: string;\n };\n signer?: Secp256r1Key;\n popUp?: Window | null;\n}) {\n if (typeof window === \"undefined\") {\n throw new Error(\"Function can only be called in a browser environment\");\n }\n return new Promise((resolve, reject) => {\n const origin = new URL(authUrl).origin;\n\n let heartbeatTimeout: NodeJS.Timeout | null = null;\n\n const closeCheckInterval = setInterval(() => {\n if (popUp && popUp.closed) {\n cleanUp();\n reject(new Error(\"User closed the authentication window\"));\n }\n }, 500);\n\n const globalTimeout = setTimeout(() => {\n log(\"Authentication timeout.\");\n cleanUp();\n reject(new Error(\"Authentication timed out\"));\n }, DEFAULT_TIMEOUT);\n\n function cleanUp() {\n clearInterval(closeCheckInterval);\n clearTimeout(globalTimeout);\n if (heartbeatTimeout) clearTimeout(heartbeatTimeout);\n if (activeMessageHandler)\n window.removeEventListener(\"message\", activeMessageHandler);\n if (popUp) popUp.close();\n }\n\n if (popUp) {\n popUp.location.replace(authUrl);\n } else {\n popUp = createPopUp(authUrl);\n }\n\n if (!popUp) {\n reject(new Error(\"Disable your popup blocker to continue.\"));\n return;\n }\n\n function log(...args: any[]) {\n if (additionalInfo?.debug) console.debug(\"[Popup]\", ...args);\n }\n\n const messageReceivedHandler = (event: MessageEvent) => {\n const isSameOrigin = event.origin === origin;\n const isSameWindow = event.source === popUp;\n\n if (!isSameOrigin || !isSameWindow || !event.isTrusted || !popUp) {\n log(\"Ignored message from unknown source\", event);\n return;\n }\n\n switch (event.data.type) {\n case \"popup-ready\":\n log(\"Popup is ready, sending auth data\");\n popUp.postMessage(\n {\n type: \"popup-init\",\n payload: {\n signer: signer?.toString(),\n data,\n additionalInfo,\n },\n },\n origin\n );\n heartbeatTimeout = setTimeout(() => {\n cleanUp();\n reject(new Error(\"User closed the authentication window\"));\n }, HEARTBEAT_INTERVAL + TIMEOUT_BUFFER);\n break;\n case \"popup-complete\":\n log(\"Received completion message\");\n try {\n const payload = JSON.parse(event.data.payload as string);\n cleanUp();\n resolve(payload);\n } catch (error) {\n reject(new Error(\"Failed to parse response payload\"));\n }\n break;\n case \"popup-heartbeat\":\n log(\"Received heartbeat\");\n if (heartbeatTimeout) {\n clearTimeout(heartbeatTimeout);\n heartbeatTimeout = setTimeout(() => {\n cleanUp();\n reject(new Error(\"User closed the authentication window\"));\n }, HEARTBEAT_INTERVAL + TIMEOUT_BUFFER);\n }\n break;\n\n case \"popup-closed\":\n log(\"Popup explicitly closed\");\n cleanUp();\n reject(new Error(\"User closed the authentication window\"));\n break;\n\n default:\n log(\"Unknown message type\", event.data.type);\n }\n };\n\n if (activeMessageHandler) {\n window.removeEventListener(\"message\", activeMessageHandler);\n }\n activeMessageHandler = messageReceivedHandler;\n window.addEventListener(\"message\", activeMessageHandler);\n });\n}\n\nexport function bufferToBase64URLString(buffer: Uint8Array) {\n let str = \"\";\n for (const charCode of buffer) {\n str += String.fromCharCode(charCode);\n }\n const base64String = btoa(str);\n return base64String.replace(/\\+/g, \"-\").replace(/\\//g, \"_\").replace(/=/g, \"\");\n}\n\nexport function base64URLStringToBuffer(base64URLString: string) {\n // Convert from Base64URL to Base64\n const base64 = base64URLString.replace(/-/g, \"+\").replace(/_/g, \"/\");\n /**\n * Pad with '=' until it's a multiple of four\n * (4 - (85 % 4 = 1) = 3) % 4 = 3 padding\n * (4 - (86 % 4 = 2) = 2) % 4 = 2 padding\n * (4 - (87 % 4 = 3) = 1) % 4 = 1 padding\n * (4 - (88 % 4 = 0) = 4) % 4 = 0 padding\n */\n const padLength = (4 - (base64.length % 4)) % 4;\n const padded = base64.padEnd(base64.length + padLength, \"=\");\n // Convert to a binary string\n const binary = atob(padded);\n // Convert binary string to buffer\n const buffer = new ArrayBuffer(binary.length);\n const bytes = new Uint8Array(buffer);\n for (let i = 0; i < binary.length; i++) {\n bytes[i] = binary.charCodeAt(i);\n }\n return buffer;\n}\n\nexport function uint8ArrayToHex(bytes: Uint8Array) {\n return Array.from(bytes)\n .map((b) => b.toString(16).padStart(2, \"0\"))\n .join(\"\");\n}\n\nexport function hexToUint8Array(hex: string): Uint8Array {\n const bytes = new Uint8Array(hex.length / 2);\n for (let i = 0; i < bytes.length; i++) {\n bytes[i] = parseInt(hex.slice(i * 2, i * 2 + 2), 16);\n }\n return bytes;\n}\nexport function extractAdditionalFields(\n clientData: Record<string, any>\n): Uint8Array {\n const knownKeys = new Set([\"type\", \"challenge\", \"origin\", \"crossOrigin\"]);\n\n const remaining: Record<string, any> = {};\n for (const key in clientData) {\n if (!knownKeys.has(key)) {\n remaining[key] = clientData[key];\n }\n }\n\n if (Object.keys(remaining).length === 0) {\n return new Uint8Array([]);\n }\n\n // Serialize remaining fields\n const serialized = JSON.stringify(remaining);\n\n // Remove leading '{' and trailing '}' so it can be appended after a comma\n return new TextEncoder().encode(serialized.slice(1, -1));\n}\n\nexport function parseOrigins(\n originsBytes: Uint8Array,\n numOrigins: number\n): string[] {\n const origins: string[] = [];\n let cursor = 0;\n const decoder = new TextDecoder();\n\n for (let i = 0; i < numOrigins; i++) {\n if (cursor + 2 > originsBytes.length) {\n throw new Error(\"MaxLengthExceeded\");\n }\n\n // Read 2-byte little-endian length\n const strLen = originsBytes[cursor] | (originsBytes[cursor + 1] << 8);\n cursor += 2;\n\n if (cursor + strLen > originsBytes.length) {\n throw new Error(\"MaxLengthExceeded\");\n }\n\n const strBytes = originsBytes.slice(cursor, cursor + strLen);\n const origin = decoder.decode(strBytes);\n origins.push(origin);\n\n cursor += strLen;\n }\n\n return origins;\n}\nexport function convertSignatureDERtoRS(signature: Uint8Array): Uint8Array {\n // already in compact format\n if (signature.length === 64) {\n return signature;\n }\n\n if (signature[0] !== 0x30) throw new Error(\"Invalid DER sequence\");\n\n const totalLength = signature[1];\n let offset = 2;\n\n // Handle long-form length (uncommon, but DER allows it)\n if (totalLength > 0x80) {\n const lengthBytes = totalLength & 0x7f;\n offset += lengthBytes;\n }\n\n if (signature[offset] !== 0x02) throw new Error(\"Expected INTEGER for r\");\n const rLen = signature[offset + 1];\n const rStart = offset + 2;\n const r = signature.slice(rStart, rStart + rLen);\n\n offset = rStart + rLen;\n if (signature[offset] !== 0x02) throw new Error(\"Expected INTEGER for s\");\n const sLen = signature[offset + 1];\n const sStart = offset + 2;\n const s = signature.slice(sStart, sStart + sLen);\n\n // Strip any leading 0x00 padding from r/s if necessary\n const rStripped = r[0] === 0x00 && r.length > 32 ? r.slice(1) : r;\n const sStripped = s[0] === 0x00 && s.length > 32 ? s.slice(1) : s;\n\n if (rStripped.length > 32 || sStripped.length > 32) {\n throw new Error(\"r or s length > 32 bytes\");\n }\n\n // Pad to 32 bytes\n const rPad = new Uint8Array(32);\n rPad.set(rStripped, 32 - rStripped.length);\n\n // Convert s to low-s\n const HALF_ORDER = p256.Point.CURVE().n >> 1n;\n const sBig = BigInt(\"0x\" + uint8ArrayToHex(sStripped));\n const sLow = sBig > HALF_ORDER ? p256.Point.CURVE().n - sBig : sBig;\n const sHex = sLow.toString(16).padStart(64, \"0\");\n const sPad = hexToUint8Array(sHex);\n\n return new Uint8Array([...rPad, ...sPad]);\n}\n","import { type CBORType, decodeCBOR, encodeCBOR } from \"@levischuck/tiny-cbor\";\nimport { p256 } from \"@noble/curves/p256\";\nimport type { AuthenticationResponseJSON } from \"@simplewebauthn/server\";\nimport { type Address, getBase58Decoder, getBase58Encoder } from \"gill\";\nimport { fetchDomainConfig } from \"../../generated\";\nimport {\n type TransactionAuthenticationResponse,\n SignedSecp256r1Key,\n} from \"../../types\";\nimport { getDomainConfigAddress } from \"../addresses\";\nimport { getAuthEndpoint, getSolanaRpc } from \"../initialize\";\nimport {\n base64URLStringToBuffer,\n convertSignatureDERtoRS,\n extractAdditionalFields,\n parseOrigins,\n uint8ArrayToHex,\n} from \"./internal\";\n\n/**\n * Opens a popup window for WebAuthn or authentication workflows.\n *\n * This helper creates a centered, resizable popup on desktop, and a full-screen view on mobile.\n * It defaults to the `/loading` route of your configured authentication origin.\n *\n * @param url - The URL to load in the popup. Defaults to `https://auth.revibase.com/loading`.\n * @returns A reference to the newly created popup window, or `null` if blocked by the browser.\n *\n * @throws {Error} If called outside a browser environment.\n *\n */\nexport function createPopUp(url = `${getAuthEndpoint()}/loading`) {\n if (typeof window === \"undefined\") {\n throw new Error(\"Function can only be called in a browser environment\");\n }\n\n const screenWidth = window.innerWidth || screen.availWidth;\n const screenHeight = window.innerHeight || screen.availHeight;\n const isMobile = screenWidth <= 768;\n\n let width: number;\n let height: number;\n let top: number;\n let left: number;\n\n if (isMobile) {\n width = screenWidth;\n height = screenHeight;\n top = 0;\n left = 0;\n } else {\n const currentScreenLeft = window.screenLeft ?? window.screenX;\n const currentScreenTop = window.screenTop ?? window.screenY;\n const screenWidth =\n window.innerWidth ?? document.documentElement.clientWidth ?? screen.width;\n const screenHeight =\n window.innerHeight ??\n document.documentElement.clientHeight ??\n screen.height;\n width = 500;\n height = 600;\n left = currentScreenLeft + (screenWidth - width) / 2;\n top = currentScreenTop + (screenHeight - height) / 2;\n }\n\n const features = [\n `width=${width}`,\n `height=${height}`,\n `top=${top}`,\n `left=${left}`,\n `toolbar=no`,\n `location=no`,\n `status=no`,\n `menubar=no`,\n `scrollbars=yes`,\n `resizable=yes`,\n ].join(\",\");\n\n const passKeyPopup = window.open(url, \"_blank\", features);\n\n if (passKeyPopup) {\n passKeyPopup.focus();\n }\n\n return passKeyPopup;\n}\n\n/**\n * Converts a COSE-encoded P-256 public key (from WebAuthn) into a compressed 33-byte key.\n *\n * The COSE format (RFC 8152) includes separate `x` and `y` coordinates. This function decodes\n * those coordinates, reconstructs the elliptic curve point, and re-encodes it into compressed format.\n *\n * @param publicKey - The COSE-encoded public key as a `Uint8Array` buffer.\n * @returns The compressed public key as a Base58-decoded `Uint8Array`.\n *\n * @example\n * const compressed = convertPubkeyCoseToCompressed(coseKey);\n */\nexport function convertPubkeyCoseToCompressed(\n publicKey: Uint8Array<ArrayBufferLike>\n) {\n const decodedPublicKey = decodeCBOR(publicKey) as Map<number, CBORType>;\n const uncompressedPublicKey = p256.Point.fromAffine({\n x: BigInt(\"0x\" + uint8ArrayToHex(decodedPublicKey.get(-2) as Uint8Array)),\n y: BigInt(\"0x\" + uint8ArrayToHex(decodedPublicKey.get(-3) as Uint8Array)),\n });\n const compressedPubKey = getBase58Decoder().decode(\n uncompressedPublicKey.toBytes(true)\n );\n return compressedPubKey;\n}\n\n/**\n * Converts a compressed P-256 public key into COSE format for WebAuthn compatibility.\n *\n * This function decompresses the 33-byte public key, extracts `x` and `y` coordinates,\n * and encodes them into a COSE-structured CBOR map.\n *\n * @param publicKey - The compressed public key as a Base58 string.\n * @returns The COSE-encoded public key as a `Uint8Array`.\n *\n * @example\n * const coseKey = convertPubkeyCompressedToCose(\"2vMsnB7P5E7EwXj1LbcfLp...\");\n */\nexport function convertPubkeyCompressedToCose(\n publicKey: string\n): Uint8Array<ArrayBuffer> {\n const compressedPublicKey = p256.Point.fromBytes(\n new Uint8Array(getBase58Encoder().encode(publicKey))\n );\n const uncompressedPublicKey = compressedPublicKey.toBytes(false);\n\n const coseDecodedPublicKey = new Map<string | number, CBORType>();\n coseDecodedPublicKey.set(1, 2);\n coseDecodedPublicKey.set(3, -7);\n coseDecodedPublicKey.set(-1, 1);\n coseDecodedPublicKey.set(-2, uncompressedPublicKey.slice(1, 33));\n coseDecodedPublicKey.set(-3, uncompressedPublicKey.slice(33, 65));\n\n return new Uint8Array(encodeCBOR(coseDecodedPublicKey));\n}\n\n/**\n * Constructs a `SignedSecp256r1Key` object from a WebAuthn authentication response.\n *\n * This function extracts, validates, and converts all fields required for on-chain\n * secp256r1 signature verification, including:\n * - Converting signature format (DER → r||s)\n * - Extracting and truncating `clientDataJSON` to ensure deterministic hashing\n * - Computing the domain configuration address (via RP ID hash)\n *\n * Used as the main transformation step before submitting to Solana programs.\n *\n * @param payload - A `TransactionAuthenticationResponse` containing WebAuthn response data.\n * @param originIndex - The index of the origin that initiated the request (retrievable via `getOriginIndex`).\n * @param crossOrigin - Indicates whether the request originated from a different origin (per WebAuthn spec).\n * @returns A `SignedSecp256r1Key` ready for Solana transaction verification.\n *\n * @example\n * const signedKey = await getSignedSecp256r1Key(response, originIndex);\n */\nexport async function getSignedSecp256r1Key(\n payload: TransactionAuthenticationResponse,\n originIndex = 0,\n crossOrigin = false\n): Promise<SignedSecp256r1Key> {\n const { authenticatorData, clientDataJSON, signature } = (\n payload.authResponse as AuthenticationResponseJSON\n ).response;\n\n const authData = new Uint8Array(base64URLStringToBuffer(authenticatorData));\n\n const clientDataJsonParsed = JSON.parse(\n new TextDecoder().decode(base64URLStringToBuffer(clientDataJSON))\n ) as Record<string, any>;\n\n const truncatedClientDataJson = extractAdditionalFields(clientDataJsonParsed);\n\n const convertedSignature = convertSignatureDERtoRS(\n new Uint8Array(base64URLStringToBuffer(signature))\n );\n\n const domainConfig = await getDomainConfigAddress({\n rpIdHash: authData.subarray(0, 32),\n });\n\n return new SignedSecp256r1Key(payload.signer.toString(), {\n verifyArgs: {\n clientDataJson: new Uint8Array(base64URLStringToBuffer(clientDataJSON)),\n truncatedClientDataJson,\n slotNumber: BigInt(payload.slotNumber),\n slotHash: new Uint8Array(getBase58Encoder().encode(payload.slotHash)),\n },\n domainConfig,\n authData,\n signature: convertedSignature,\n originIndex,\n crossOrigin,\n });\n}\n\n/**\n * Retrieves the index of a given origin within a domain configuration account.\n *\n * This index is used on-chain to verify that a WebAuthn request originated from\n * an authorized origin associated with a specific domain configuration.\n *\n * @param domainConfig - The on-chain address of the domain configuration (see `getDomainConfigAddress`).\n * @param origin - The full origin URL (e.g., \"https://auth.example.com\").\n * @returns The 0-based index of the origin within the domain config.\n *\n * @throws {Error} If the origin is not found in the configuration.\n *\n * @example\n * const index = await getOriginIndex(domainConfigAddress, \"https://auth.example.com\");\n */\nexport async function getOriginIndex(domainConfig: Address, origin: string) {\n const { data } = await fetchDomainConfig(getSolanaRpc(), domainConfig);\n const origins = parseOrigins(new Uint8Array(data.origins), data.numOrigins);\n const index = origins.findIndex((x) => x === origin);\n if (index === -1) {\n throw new Error(\"Origin not found in domain config\");\n }\n return index;\n}\n","import {\n address,\n appendTransactionMessageInstructions,\n compressTransactionMessageUsingAddressLookupTables,\n createTransactionMessage,\n getBase58Decoder,\n getBase58Encoder,\n getBase64Decoder,\n getBase64EncodedWireTransaction,\n getSignatureFromTransaction,\n pipe,\n prependTransactionMessageInstructions,\n setTransactionMessageFeePayerSigner,\n setTransactionMessageLifetimeUsingBlockhash,\n signTransactionMessageWithSigners,\n type Address,\n type ReadonlyUint8Array,\n type SignatureBytes,\n type TransactionSigner,\n} from \"gill\";\nimport {\n getSetComputeUnitLimitInstruction,\n getSetComputeUnitPriceInstruction,\n} from \"gill/programs\";\nimport type { MemberKey } from \"../../generated\";\nimport {\n KeyType,\n Permission,\n Permissions,\n Secp256r1Key,\n TransactionManagerPermission,\n type TransactionDetails,\n} from \"../../types\";\nimport { fetchSettingsAccountData, fetchUserAccountData } from \"../compressed\";\nimport {\n getComputeBudgetEstimate,\n getGlobalAuthorizedClient,\n getJitoTipsConfig,\n getSendAndConfirmTransaction,\n getSolanaRpc,\n getSolanaRpcEndpoint,\n} from \"../initialize\";\nimport {\n createEncodedBundle,\n getMedianPriorityFees,\n simulateBundle,\n} from \"./internal\";\n\nexport async function signAndSendBundledTransactions(\n bundle: TransactionDetails[]\n) {\n const simulationBundle = await createEncodedBundle(bundle, true);\n const computeUnits = await simulateBundle(\n simulationBundle.map(getBase64EncodedWireTransaction),\n getSolanaRpcEndpoint()\n );\n const encodedBundle = await createEncodedBundle(\n bundle.map((x, index) => ({\n ...x,\n unitsConsumed: computeUnits[index],\n }))\n );\n const bundleId = await sendJitoBundle(\n encodedBundle.map(getBase64EncodedWireTransaction)\n );\n return bundleId;\n}\n\n/**\n * By default, median priority fees are added to the transaction\n */\nexport async function signAndSendTransaction({\n instructions,\n payer,\n addressesByLookupTableAddress,\n}: TransactionDetails) {\n const latestBlockHash = await getSolanaRpc().getLatestBlockhash().send();\n const tx = await pipe(\n createTransactionMessage({ version: 0 }),\n (tx) => appendTransactionMessageInstructions([...instructions], tx),\n (tx) => setTransactionMessageFeePayerSigner(payer, tx),\n (tx) =>\n setTransactionMessageLifetimeUsingBlockhash(latestBlockHash.value, tx),\n (tx) =>\n addressesByLookupTableAddress\n ? compressTransactionMessageUsingAddressLookupTables(\n tx,\n addressesByLookupTableAddress\n )\n : tx,\n async (tx) => {\n const [estimatedUnits, priorityFees] = await Promise.all([\n getComputeBudgetEstimate()(tx),\n getMedianPriorityFees(\n getSolanaRpc(),\n tx.instructions.flatMap((x) => x.accounts ?? [])\n ),\n ]);\n const computeUnits = Math.ceil(estimatedUnits * 1.1);\n return prependTransactionMessageInstructions(\n [\n ...(computeUnits > 200000\n ? [\n getSetComputeUnitLimitInstruction({\n units: computeUnits,\n }),\n ]\n : []),\n ...(priorityFees > 0\n ? [\n getSetComputeUnitPriceInstruction({\n microLamports: priorityFees,\n }),\n ]\n : []),\n ],\n tx\n );\n },\n async (tx) => await signTransactionMessageWithSigners(await tx)\n );\n await getSendAndConfirmTransaction()(tx, {\n commitment: \"confirmed\",\n skipPreflight: true,\n });\n\n return getSignatureFromTransaction(tx);\n}\n\nexport async function sendJitoBundle(\n serializedTransactions: string[],\n maxRetries = 10,\n delayMs = 1000,\n jitoTipsConfig = getJitoTipsConfig()\n): Promise<string> {\n const { blockEngineUrl: jitoBlockEngineUrl } = jitoTipsConfig;\n for (let attempt = 1; attempt <= maxRetries; attempt++) {\n const response = await fetch(`${jitoBlockEngineUrl}/bundles`, {\n method: \"POST\",\n headers: { \"Content-Type\": \"application/json\" },\n body: JSON.stringify({\n jsonrpc: \"2.0\",\n id: 1,\n method: \"sendBundle\",\n params: [\n serializedTransactions,\n {\n encoding: \"base64\",\n },\n ],\n }),\n });\n\n if (response.status === 429) {\n if (attempt < maxRetries) {\n await new Promise((resolve) => setTimeout(resolve, delayMs));\n continue;\n }\n }\n\n const data = await response.json();\n\n if (data.error) {\n throw new Error(\n `Error sending bundles: ${JSON.stringify(data.error, null, 2)}`\n );\n }\n\n return data.result as string;\n }\n\n throw new Error(\"Failed to send bundle after retries.\");\n}\nexport async function pollJitoBundleConfirmation(\n bundleId: string,\n maxRetries = 30,\n delayMs = 3000,\n jitoTipsConfig = getJitoTipsConfig()\n): Promise<string> {\n const { blockEngineUrl: jitoBlockEngineUrl } = jitoTipsConfig;\n for (let attempt = 1; attempt <= maxRetries; attempt++) {\n const response = await fetch(`${jitoBlockEngineUrl}/getBundleStatuses`, {\n method: \"POST\",\n headers: { \"Content-Type\": \"application/json\" },\n body: JSON.stringify({\n jsonrpc: \"2.0\",\n id: 1,\n method: \"getBundleStatuses\",\n params: [[bundleId]],\n }),\n });\n\n if (response.status === 429) {\n if (attempt < maxRetries) {\n await new Promise((resolve) => setTimeout(resolve, delayMs));\n continue;\n }\n }\n\n const data = await response.json();\n\n if (data.error) {\n throw new Error(\n `Error sending bundles: ${JSON.stringify(data.error, null, 2)}`\n );\n }\n\n const results = data.result as {\n context: {\n slot: number;\n };\n value: {\n bundle_id: string;\n transactions: string[];\n slot: number;\n confirmation_status: \"processed\" | \"confirmed\" | \"finalized\";\n err: {\n Ok: null;\n };\n }[];\n };\n\n if (results.value.length) {\n const value = results.value[0];\n if (\n value.confirmation_status === \"confirmed\" ||\n value.confirmation_status === \"finalized\"\n ) {\n return value.transactions[value.transactions.length - 1];\n }\n }\n\n if (attempt < maxRetries) {\n await new Promise((resolve) => setTimeout(resolve, delayMs));\n continue;\n }\n }\n\n throw new Error(\"Failed to get bundle status after retries.\");\n}\nexport async function resolveTransactionManagerSigner({\n signer,\n index,\n transactionMessageBytes,\n cachedAccounts,\n}: {\n signer: Secp256r1Key | Address;\n index: number | bigint;\n transactionMessageBytes?: ReadonlyUint8Array;\n cachedAccounts?: Map<string, any>;\n}) {\n const settingsData = await fetchSettingsAccountData(index, cachedAccounts);\n if (settingsData.threshold > 1) {\n throw new Error(\n \"Multi-signature transactions with threshold > 1 are not supported yet.\"\n );\n }\n const { permissions } =\n settingsData.members.find(\n (m) => convertMemberKeyToString(m.pubkey) === signer.toString()\n ) ?? {};\n if (!permissions) {\n throw new Error(\"No permissions found for the current member.\");\n }\n const hasInitiate = Permissions.has(\n permissions,\n Permission.InitiateTransaction\n );\n const hasVote = Permissions.has(permissions, Permission.VoteTransaction);\n const hasExecute = Permissions.has(\n permissions,\n Permission.ExecuteTransaction\n );\n // If signer has full signing rights, no transaction manager is needed\n if (hasInitiate && hasVote && hasExecute) {\n return null;\n }\n if (!hasVote || !hasExecute) {\n throw new Error(\"Signer lacks the required Vote/Execute permissions.\");\n }\n\n // Otherwise, require a transaction manager + vote + execute rights\n const transactionManager = settingsData.members.find((m) =>\n Permissions.has(m.permissions, TransactionManagerPermission)\n );\n if (!transactionManager) {\n throw new Error(\"No transaction manager available in wallet.\");\n }\n\n const transactionManagerAddress = address(\n convertMemberKeyToString(transactionManager.pubkey)\n );\n\n const userAccountData = await fetchUserAccountData(\n transactionManagerAddress,\n cachedAccounts\n );\n\n if (userAccountData.transactionManagerUrl.__option === \"None\") {\n throw new Error(\n \"Transaction manager endpoint is missing for this account.\"\n );\n }\n\n return createTransactionManagerSigner(\n transactionManagerAddress,\n userAccountData.transactionManagerUrl.value,\n transactionMessageBytes\n );\n}\n\nexport function createTransactionManagerSigner(\n address: Address,\n url: string,\n transactionMessageBytes?: ReadonlyUint8Array\n): TransactionSigner {\n return {\n address,\n async signTransactions(transactions) {\n const payload: Record<\n string,\n string | string[] | { publicKey: string; signatures: string[] }\n > = {\n publicKey: address.toString(),\n transactions: transactions.map(getBase64EncodedWireTransaction),\n };\n\n if (transactionMessageBytes) {\n payload.transactionMessageBytes = getBase64Decoder().decode(\n transactionMessageBytes\n );\n }\n\n const authorizedClient = getGlobalAuthorizedClient();\n if (authorizedClient) {\n const { url, publicKey } = authorizedClient;\n const response = await fetch(url, {\n method: \"POST\",\n headers: { \"Content-Type\": \"application/json\" },\n body: JSON.stringify({\n transactions: payload.transactions,\n publicKey,\n }),\n });\n const data = (await response.json()) as\n | { signatures: string[] }\n | { error: string };\n if (\"error\" in data) {\n throw new Error(data.error);\n }\n payload.authorizedClient = {\n publicKey,\n signatures: data.signatures,\n };\n }\n\n const response = await fetch(url, {\n method: \"POST\",\n headers: { \"Content-Type\": \"application/json\" },\n body: JSON.stringify(payload),\n });\n\n const data = (await response.json()) as\n | { signatures: string[] }\n | { error: string };\n\n if (\"error\" in data) {\n throw new Error(data.error);\n }\n\n return data.signatures.map((sig) => ({\n [address]: getBase58Encoder().encode(sig) as SignatureBytes,\n }));\n },\n };\n}\nexport function convertMemberKeyToString(memberKey: MemberKey) {\n if (memberKey.keyType === KeyType.Ed25519) {\n return getBase58Decoder().decode(memberKey.key.subarray(1, 33));\n } else {\n return getBase58Decoder().decode(memberKey.key);\n }\n}\n","import type { ValidityProofWithContext } from \"@lightprotocol/stateless.js\";\nimport BN from \"bn.js\";\nimport {\n AccountRole,\n type AccountSignerMeta,\n type Address,\n createNoopSigner,\n none,\n some,\n type TransactionSigner,\n} from \"gill\";\nimport {\n type AddMemberArgs,\n type CompressedSettings,\n type ConfigAction,\n DelegateOp,\n type DelegateOpArgs,\n type EditMemberArgs,\n getChangeConfigCompressedInstruction,\n getChangeConfigInstructionAsync,\n getCompressedSettingsDecoder,\n getUserDecoder,\n type IPermissions,\n type RemoveMemberArgs,\n type SettingsMutArgs,\n type User,\n type UserMutArgs,\n} from \"../generated\";\nimport {\n type ConfigurationArgs,\n type IPermission,\n PermanentMemberPermission,\n Permission,\n type PermissionArgs,\n Permissions,\n Secp256r1Key,\n SignedSecp256r1Key,\n TransactionManagerPermission,\n} from \"../types\";\nimport {\n convertMemberKeyToString,\n fetchSettingsAccountData,\n getCompressedSettingsAddressFromIndex,\n getUserAccountAddress,\n getWalletAddressFromIndex,\n} from \"../utils\";\nimport {\n convertToCompressedProofArgs,\n getCompressedAccountHashes,\n getCompressedAccountMutArgs,\n getValidityProofWithRetry,\n} from \"../utils/compressed/internal\";\nimport { PackedAccounts } from \"../utils/compressed/packedAccounts\";\nimport {\n convertPubkeyToMemberkey,\n extractSecp256r1VerificationArgs,\n} from \"../utils/transaction/internal\";\nimport type { Secp256r1VerifyInput } from \"./secp256r1Verify\";\n\nexport async function changeConfig({\n index,\n configActionsArgs,\n payer,\n compressed = false,\n cachedAccounts,\n}: {\n index: bigint | number;\n configActionsArgs: ConfigurationArgs[];\n payer: TransactionSigner;\n compressed?: boolean;\n cachedAccounts?: Map<string, any>;\n}) {\n // --- Stage 1: Setup Addresses---\n const authority = await getWalletAddressFromIndex(index);\n\n const addDelegates: { address: BN; type: \"User\" }[] = [];\n const removeDelegates: { address: BN; type: \"User\" }[] = [];\n\n for (const action of configActionsArgs) {\n if (action.type === \"AddMembers\") {\n addDelegates.push(\n ...action.members.map((m) =>\n m.pubkey instanceof SignedSecp256r1Key\n ? {\n address: getUserAccountAddress(m.pubkey).address,\n type: \"User\" as const,\n }\n : m.setAsDelegate\n ? {\n address: getUserAccountAddress(m.pubkey.address).address,\n type: \"User\" as const,\n }\n : {\n address: getUserAccountAddress(m.pubkey).address,\n type: \"User\" as const,\n }\n )\n );\n } else if (action.type === \"RemoveMembers\") {\n removeDelegates.push(\n ...action.members.map((m) => ({\n address: getUserAccountAddress(m.pubkey).address,\n type: \"User\" as const,\n }))\n );\n } else if (action.type === \"EditPermissions\") {\n for (const m of action.members) {\n if (m.delegateOperation !== DelegateOp.Ignore) {\n (m.delegateOperation === DelegateOp.Add\n ? addDelegates\n : removeDelegates\n ).push({\n address: getUserAccountAddress(m.pubkey).address,\n type: \"User\" as const,\n });\n }\n }\n }\n }\n\n // --- Stage 2: Proof preparation ---\n const packedAccounts = new PackedAccounts();\n let proof: ValidityProofWithContext | null = null;\n let settingsMutArgs: SettingsMutArgs | null = null;\n let userMutArgs: UserMutArgs[] = [];\n\n if (addDelegates.length || removeDelegates.length || compressed) {\n await packedAccounts.addSystemAccounts();\n\n const addresses = [\n ...(compressed\n ? [\n {\n address: getCompressedSettingsAddressFromIndex(index).address,\n type: \"Settings\" as const,\n },\n ]\n : []),\n ...removeDelegates,\n ...addDelegates,\n ];\n\n const hashesWithTree = addresses.length\n ? await getCompressedAccountHashes(addresses, cachedAccounts)\n : [];\n\n if (hashesWithTree.length) {\n proof = await getValidityProofWithRetry(hashesWithTree, []);\n\n const settingsHashes = hashesWithTree.filter(\n (x) => x.type === \"Settings\"\n );\n const userHashes = hashesWithTree.filter((x) => x.type === \"User\");\n\n if (compressed && proof) {\n settingsMutArgs = getCompressedAccountMutArgs<CompressedSettings>(\n packedAccounts,\n proof.treeInfos.slice(0, 1),\n proof.leafIndices.slice(0, 1),\n proof.rootIndices.slice(0, 1),\n proof.proveByIndices.slice(0, 1),\n settingsHashes,\n getCompressedSettingsDecoder()\n )[0];\n }\n\n if (userHashes.length && proof) {\n userMutArgs = getCompressedAccountMutArgs<User>(\n packedAccounts,\n proof.treeInfos.slice(compressed ? 1 : 0),\n proof.leafIndices.slice(compressed ? 1 : 0),\n proof.rootIndices.slice(compressed ? 1 : 0),\n proof.proveByIndices.slice(compressed ? 1 : 0),\n userHashes,\n getUserDecoder()\n );\n }\n }\n }\n // --- Stage 3: Build config actions ---\n const secp256r1VerifyInput: Secp256r1VerifyInput = [];\n const configActions: ConfigAction[] = [];\n\n for (const action of configActionsArgs) {\n switch (action.type) {\n case \"AddMembers\": {\n const field: AddMemberArgs[] = [];\n for (const m of action.members) {\n if (m.pubkey instanceof SignedSecp256r1Key) {\n const index = secp256r1VerifyInput.length;\n const { message, signature, publicKey, domainConfig } =\n extractSecp256r1VerificationArgs(m.pubkey, index);\n\n if (message && signature && publicKey) {\n secp256r1VerifyInput.push({ message, signature, publicKey });\n }\n\n if (domainConfig) {\n packedAccounts.addPreAccounts([\n { address: domainConfig, role: AccountRole.READONLY },\n ]);\n }\n\n const userArgs = await getUserArgs(m.pubkey, userMutArgs);\n if (userArgs) {\n field.push(\n convertAddMember({\n ...m,\n permissionArgs: m.permissions,\n index,\n userMutArgs: userArgs,\n })\n );\n }\n } else {\n if (m.setAsDelegate) {\n packedAccounts.addPreAccounts([\n {\n address: m.pubkey.address,\n role: AccountRole.READONLY_SIGNER,\n signer: m.pubkey,\n } as AccountSignerMeta,\n ]);\n }\n\n const userArgs = await getUserArgs(\n m.setAsDelegate ? m.pubkey.address : m.pubkey,\n userMutArgs\n );\n if (userArgs) {\n field.push(\n convertAddMember({\n ...m,\n permissionArgs: m.permissions,\n index: -1,\n userMutArgs: userArgs,\n })\n );\n }\n }\n }\n configActions.push({ __kind: action.type, fields: [field] });\n break;\n }\n\n case \"RemoveMembers\": {\n const field = await Promise.all(\n action.members.map(async (m) => {\n const userArgs = await getUserArgs(m.pubkey, userMutArgs);\n if (!userArgs) throw new Error(\"User account not found\");\n return convertRemoveMember({ ...m, userMutArgs: userArgs });\n })\n );\n configActions.push({\n __kind: action.type,\n fields: [field],\n });\n break;\n }\n\n case \"EditPermissions\": {\n const settingsData = await fetchSettingsAccountData(\n index,\n cachedAccounts\n );\n const permanentMember = settingsData.members.find((x) =>\n Permissions.has(x.permissions, PermanentMemberPermission)\n );\n const transactionManager = settingsData.members.find((x) =>\n Permissions.has(x.permissions, TransactionManagerPermission)\n );\n const field = await Promise.all(\n action.members.map(async (m) => {\n const isPermanentMember =\n !!permanentMember?.pubkey &&\n convertMemberKeyToString(permanentMember.pubkey) ===\n m.pubkey.toString();\n const isTransactionManager =\n !!transactionManager?.pubkey &&\n convertMemberKeyToString(transactionManager.pubkey) ===\n m.pubkey.toString();\n\n if (isTransactionManager) {\n throw new Error(\n \"Transaction Manager's permission cannot be changed.\"\n );\n }\n\n const userArgs =\n m.delegateOperation !== DelegateOp.Ignore\n ? await getUserArgs(m.pubkey, userMutArgs)\n : undefined;\n\n return convertEditMember({\n ...m,\n permissionArgs: m.permissions,\n isPermanentMember,\n userMutArgs: userArgs,\n });\n })\n );\n configActions.push({ __kind: action.type, fields: [field] });\n break;\n }\n\n default:\n configActions.push({ __kind: action.type, fields: [action.threshold] });\n }\n }\n\n // --- Stage 4: Instruction assembly ---\n const { remainingAccounts, systemOffset } = packedAccounts.toAccountMetas();\n const compressedProofArgs = convertToCompressedProofArgs(proof, systemOffset);\n const instructions = compressed\n ? [\n getChangeConfigCompressedInstruction({\n configActions,\n payer,\n authority: createNoopSigner(authority),\n compressedProofArgs,\n settingsMut: settingsMutArgs!,\n remainingAccounts,\n }),\n ]\n : [\n await getChangeConfigInstructionAsync({\n settingsIndex: index,\n configActions,\n payer,\n compressedProofArgs,\n remainingAccounts,\n }),\n ];\n\n return { instructions, secp256r1VerifyInput };\n}\n\nasync function getUserArgs(\n pubkey: Address | Secp256r1Key,\n userMutArgs: UserMutArgs[]\n): Promise<UserMutArgs | undefined> {\n const { address } = getUserAccountAddress(pubkey);\n const mutArg = userMutArgs.find((arg) =>\n new BN(new Uint8Array(arg.accountMeta.address)).eq(address)\n );\n return mutArg;\n}\n\nfunction convertEditMember({\n pubkey,\n permissionArgs,\n userMutArgs,\n delegateOperation,\n isPermanentMember,\n}: {\n pubkey: Address | Secp256r1Key;\n permissionArgs: PermissionArgs;\n isPermanentMember: boolean;\n userMutArgs?: UserMutArgs;\n delegateOperation: DelegateOpArgs;\n}): EditMemberArgs {\n if (isPermanentMember) {\n if (userMutArgs || delegateOperation !== DelegateOp.Ignore) {\n throw new Error(\"Delegation cannot be modified for a permanent member.\");\n }\n }\n const permissions = convertPermissions(permissionArgs, isPermanentMember);\n\n return {\n memberKey: convertPubkeyToMemberkey(pubkey),\n permissions,\n userArgs: userMutArgs ? some(userMutArgs) : none(),\n delegateOperation,\n };\n}\n\nfunction convertRemoveMember({\n pubkey,\n userMutArgs,\n}: {\n pubkey: Address | Secp256r1Key;\n userMutArgs: UserMutArgs;\n}): RemoveMemberArgs {\n const userAccountData = userMutArgs.data;\n const isPermanentMember = userAccountData.isPermanentMember;\n if (isPermanentMember) {\n throw new Error(\"Permanent Member cannot be removed from the wallet.\");\n }\n return {\n memberKey: convertPubkeyToMemberkey(pubkey),\n userArgs:\n userMutArgs.data.settingsIndex.__option === \"Some\"\n ? { __kind: \"Mutate\", fields: [userMutArgs] }\n : { __kind: \"Read\", fields: [userMutArgs] },\n };\n}\n\nfunction convertAddMember({\n pubkey,\n permissionArgs,\n index,\n userMutArgs,\n setAsDelegate,\n isTransactionManager,\n}: {\n pubkey: TransactionSigner | SignedSecp256r1Key | Address;\n permissionArgs: PermissionArgs;\n index: number;\n userMutArgs: UserMutArgs;\n setAsDelegate: boolean;\n isTransactionManager: boolean;\n}): AddMemberArgs {\n const permissions = getAddMemberPermission(\n userMutArgs,\n setAsDelegate,\n permissionArgs,\n isTransactionManager\n );\n return {\n member: {\n permissions,\n pubkey: convertPubkeyToMemberkey(pubkey),\n },\n verifyArgs:\n pubkey instanceof SignedSecp256r1Key && pubkey.verifyArgs && index !== -1\n ? some({\n truncatedClientDataJson: pubkey.verifyArgs.truncatedClientDataJson,\n slotNumber: pubkey.verifyArgs.slotNumber,\n signedMessageIndex: index,\n originIndex: pubkey.originIndex,\n crossOrigin: pubkey.crossOrigin,\n })\n : none(),\n userArgs: setAsDelegate\n ? { __kind: \"Mutate\", fields: [userMutArgs] }\n : { __kind: \"Read\", fields: [userMutArgs] },\n setAsDelegate,\n };\n}\n\nfunction getAddMemberPermission(\n userMutArgs: UserMutArgs,\n setAsDelegate: boolean,\n permissionArgs: PermissionArgs,\n isTransactionManager: boolean\n) {\n const userAccountData = userMutArgs.data;\n const isPermanentMember = userAccountData.isPermanentMember;\n if (isPermanentMember) {\n if (!setAsDelegate) {\n throw new Error(\n \"Permanent members must also be delegates. Please set `setAsDelegate = true`.\"\n );\n }\n if (userAccountData.settingsIndex.__option === \"Some\") {\n throw new Error(\n \"This user is already registered as a permanent member in another wallet. A permanent member can only belong to one wallet.\"\n );\n }\n }\n\n if (isTransactionManager) {\n if (permissionArgs.execute || permissionArgs.vote) {\n throw new Error(\"Transaction Manager can only have initiate permission\");\n }\n if (setAsDelegate) {\n throw new Error(\n \"Transaction Manager cannot be a delegate. Please set `setAsDelegate = false`.\"\n );\n }\n }\n\n const permissions = convertPermissions(\n permissionArgs,\n isPermanentMember,\n isTransactionManager\n );\n return permissions;\n}\n\nfunction convertPermissions(\n p: PermissionArgs,\n isPermanentMember = false,\n isTransactionManager = false\n): IPermissions {\n const perms: IPermission[] = [];\n if (p.initiate) perms.push(Permission.InitiateTransaction);\n if (p.vote) perms.push(Permission.VoteTransaction);\n if (p.execute) perms.push(Permission.ExecuteTransaction);\n if (isPermanentMember) perms.push(PermanentMemberPermission);\n if (isTransactionManager) perms.push(TransactionManagerPermission);\n\n return Permissions.fromPermissions(perms);\n}\n","import {\n address,\n combineCodec,\n createDecoder,\n createEncoder,\n fixDecoderSize,\n fixEncoderSize,\n getBytesDecoder,\n getBytesEncoder,\n getStructDecoder,\n getStructEncoder,\n getU16Decoder,\n getU16Encoder,\n getU8Decoder,\n getU8Encoder,\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} from \"gill\";\n\nconst COMPRESSED_PUBKEY_SERIALIZED_SIZE = 33;\nconst SIGNATURE_SERIALIZED_SIZE = 64;\nconst SIGNATURE_OFFSETS_SERIALIZED_SIZE = 14;\nconst SIGNATURE_OFFSETS_START = 2;\nconst SECP256R1_PROGRAM_ADDRESS = address(\n \"Secp256r1SigVerify1111111111111111111111111\"\n);\n\nexport type Secp256r1VerifyInput = {\n publicKey: ReadonlyUint8Array;\n signature: ReadonlyUint8Array;\n message: ReadonlyUint8Array;\n}[];\n\nexport type Secp256r1VerifyInstruction<\n TProgram extends string = typeof SECP256R1_PROGRAM_ADDRESS,\n> = Instruction<TProgram> &\n InstructionWithData<Uint8Array> &\n InstructionWithAccounts<[]>;\n\nexport type Secp256r1VerifyInstructionData = {\n numSignatures: number;\n padding: number;\n offsets: Secp256r1SignatureOffsetsDataArgs[];\n payload: Secp256r1VerifyInput;\n};\n\nexport type Secp256r1SignatureOffsetsDataArgs = {\n signatureOffset: number;\n signatureInstructionIndex: number;\n publicKeyOffset: number;\n publicKeyInstructionIndex: number;\n messageDataOffset: number;\n messageDataSize: number;\n messageInstructionIndex: number;\n};\n\nexport function getSecp256r1SignatureOffsetsDataEncoder(): Encoder<Secp256r1SignatureOffsetsDataArgs> {\n return getStructEncoder([\n [\"signatureOffset\", getU16Encoder()],\n [\"signatureInstructionIndex\", getU16Encoder()],\n [\"publicKeyOffset\", getU16Encoder()],\n [\"publicKeyInstructionIndex\", getU16Encoder()],\n [\"messageDataOffset\", getU16Encoder()],\n [\"messageDataSize\", getU16Encoder()],\n [\"messageInstructionIndex\", getU16Encoder()],\n ]);\n}\n\nexport function getSecp256r1SignatureOffsetsDataDecoder(): Decoder<Secp256r1SignatureOffsetsDataArgs> {\n return getStructDecoder([\n [\"signatureOffset\", getU16Decoder()],\n [\"signatureInstructionIndex\", getU16Decoder()],\n [\"publicKeyOffset\", getU16Decoder()],\n [\"publicKeyInstructionIndex\", getU16Decoder()],\n [\"messageDataOffset\", getU16Decoder()],\n [\"messageDataSize\", getU16Decoder()],\n [\"messageInstructionIndex\", getU16Decoder()],\n ]);\n}\n\nexport function getSecp256r1VerifyInstructionDataDecoder(): Decoder<Secp256r1VerifyInstructionData> {\n return createDecoder({\n read: (bytes, offset = 0) => {\n const numSignatures = getU8Decoder().decode(bytes, offset);\n offset += 1;\n\n const padding = getU8Decoder().decode(bytes, offset);\n offset += 1;\n\n const offsets: Secp256r1SignatureOffsetsDataArgs[] = [];\n const offsetDecoder = getSecp256r1SignatureOffsetsDataDecoder();\n for (let i = 0; i < numSignatures; i++) {\n offsets.push(offsetDecoder.decode(bytes, offset));\n offset += SIGNATURE_OFFSETS_SERIALIZED_SIZE;\n }\n const payload: Secp256r1VerifyInput = [];\n\n for (let i = 0; i < numSignatures; i++) {\n const publicKey = fixDecoderSize(\n getBytesDecoder(),\n COMPRESSED_PUBKEY_SERIALIZED_SIZE\n ).decode(bytes, offset);\n offset += COMPRESSED_PUBKEY_SERIALIZED_SIZE;\n\n const signature = fixDecoderSize(\n getBytesDecoder(),\n SIGNATURE_SERIALIZED_SIZE\n ).decode(bytes, offset);\n offset += SIGNATURE_SERIALIZED_SIZE;\n\n const messageSize = offsets[i].messageDataSize;\n const message = fixDecoderSize(getBytesDecoder(), messageSize).decode(\n bytes,\n offset\n );\n offset += messageSize;\n\n payload.push({ publicKey, signature, message });\n }\n return [\n {\n numSignatures,\n padding,\n offsets,\n payload,\n },\n offset,\n ];\n },\n });\n}\n\nexport function getSecp256r1VerifyInstructionDataEncoder(): Encoder<Secp256r1VerifyInstructionDataArgs> {\n return createEncoder({\n getSizeFromValue: (value: Secp256r1VerifyInstructionData) => {\n const offsetSize =\n SIGNATURE_OFFSETS_SERIALIZED_SIZE * value.offsets.length;\n const payloadSize = value.payload.reduce((sum, p) => {\n return (\n sum +\n COMPRESSED_PUBKEY_SERIALIZED_SIZE +\n SIGNATURE_SERIALIZED_SIZE +\n p.message.length\n );\n }, 0);\n return 2 + offsetSize + payloadSize; // 1 byte for numSignatures, 1 for padding\n },\n write: (value: Secp256r1VerifyInstructionData, bytes, offset = 0) => {\n offset = getU8Encoder().write(value.numSignatures, bytes, offset);\n offset = getU8Encoder().write(value.padding, bytes, offset);\n\n const offsetEncoder = getSecp256r1SignatureOffsetsDataEncoder();\n for (const offsetEntry of value.offsets) {\n offset = offsetEncoder.write(offsetEntry, bytes, offset);\n }\n\n for (const entry of value.payload) {\n offset = fixEncoderSize(\n getBytesEncoder(),\n COMPRESSED_PUBKEY_SERIALIZED_SIZE\n ).write(entry.publicKey, bytes, offset);\n\n offset = fixEncoderSize(\n getBytesEncoder(),\n SIGNATURE_SERIALIZED_SIZE\n ).write(entry.signature, bytes, offset);\n\n offset = getBytesEncoder().write(entry.message, bytes, offset);\n }\n\n return offset;\n },\n });\n}\n\nexport type Secp256r1VerifyInstructionDataArgs = {\n numSignatures: number;\n padding: number;\n offsets: Secp256r1SignatureOffsetsDataArgs[];\n payload: Secp256r1VerifyInput;\n};\n\nexport function getSecp256r1VerifyInstructionDataCodec(): Codec<\n Secp256r1VerifyInstructionDataArgs,\n Secp256r1VerifyInstructionData\n> {\n return combineCodec(\n getSecp256r1VerifyInstructionDataEncoder(),\n getSecp256r1VerifyInstructionDataDecoder()\n );\n}\n\nexport function getSecp256r1VerifyInstruction<\n TProgramAddress extends Address = typeof SECP256R1_PROGRAM_ADDRESS,\n>(\n input: Secp256r1VerifyInput,\n config?: { programAddress?: TProgramAddress }\n): Secp256r1VerifyInstruction<TProgramAddress> {\n let numSignatures = input.length;\n let currentOffset =\n SIGNATURE_OFFSETS_START + numSignatures * SIGNATURE_OFFSETS_SERIALIZED_SIZE;\n const offsets = [];\n for (let i = 0; i < numSignatures; i++) {\n const { message } = input[i];\n const publicKeyOffset = currentOffset;\n const signatureOffset = publicKeyOffset + COMPRESSED_PUBKEY_SERIALIZED_SIZE;\n const messageDataOffset = signatureOffset + SIGNATURE_SERIALIZED_SIZE;\n offsets.push({\n publicKeyOffset,\n publicKeyInstructionIndex: 0xffff,\n signatureOffset,\n signatureInstructionIndex: 0xffff,\n messageDataOffset,\n messageDataSize: message.length,\n messageInstructionIndex: 0xffff,\n } as Secp256r1SignatureOffsetsDataArgs);\n currentOffset +=\n COMPRESSED_PUBKEY_SERIALIZED_SIZE +\n SIGNATURE_SERIALIZED_SIZE +\n message.length;\n }\n\n // Program address.\n const programAddress = config?.programAddress ?? SECP256R1_PROGRAM_ADDRESS;\n\n // Original args.\n const args = {\n numSignatures,\n padding: 0,\n offsets,\n payload: input,\n };\n\n // Resolve default values.\n const instruction = {\n accounts: [],\n programAddress,\n data: getSecp256r1VerifyInstructionDataEncoder().encode(\n args as Secp256r1VerifyInstructionDataArgs\n ),\n } as Secp256r1VerifyInstruction<TProgramAddress>;\n\n return instruction;\n}\n\nexport type ParsedSecp256r1VerifyInstruction<\n TProgram extends string = typeof SECP256R1_PROGRAM_ADDRESS,\n> = {\n programAddress: Address<TProgram>;\n accounts: {};\n data: Secp256r1VerifyInstructionData;\n};\n\nexport function parseSecp256r1VerifyInstruction<TProgram extends string>(\n instruction: Instruction<TProgram> & InstructionWithData<Uint8Array>\n): ParsedSecp256r1VerifyInstruction<TProgram> {\n return {\n programAddress: instruction.programAddress,\n accounts: {},\n data: getSecp256r1VerifyInstructionDataDecoder().decode(instruction.data),\n };\n}\n","import type { ValidityProofWithContext } from \"@lightprotocol/stateless.js\";\nimport {\n AccountRole,\n type AccountSignerMeta,\n type TransactionSigner,\n} from \"gill\";\nimport {\n type CompressedSettings,\n getCompressedSettingsDecoder,\n getCompressSettingsAccountInstruction,\n type Secp256r1VerifyArgsWithDomainAddressArgs,\n type SettingsCreateOrMutateArgs,\n} from \"../generated\";\nimport { SignedSecp256r1Key } from \"../types\";\nimport {\n getCompressedSettingsAddressFromIndex,\n getSettingsFromIndex,\n} from \"../utils\";\nimport {\n convertToCompressedProofArgs,\n getCompressedAccount,\n getCompressedAccountHashes,\n getCompressedAccountInitArgs,\n getCompressedAccountMutArgs,\n getValidityProofWithRetry,\n} from \"../utils/compressed/internal\";\nimport { PackedAccounts } from \"../utils/compressed/packedAccounts\";\nimport {\n extractSecp256r1VerificationArgs,\n getDeduplicatedSigners,\n} from \"../utils/transaction/internal\";\nimport {\n getSecp256r1VerifyInstruction,\n type Secp256r1VerifyInput,\n} from \"./secp256r1Verify\";\n\nexport async function compressSettingsAccount({\n index,\n payer,\n signers,\n cachedAccounts,\n}: {\n index: number | bigint;\n payer: TransactionSigner;\n signers: (SignedSecp256r1Key | TransactionSigner)[];\n cachedAccounts?: Map<string, any>;\n}) {\n const packedAccounts = new PackedAccounts();\n await packedAccounts.addSystemAccounts();\n\n const settings = await getSettingsFromIndex(index);\n const { address: settingsAddress, addressTree } =\n getCompressedSettingsAddressFromIndex(index);\n const result = await getCompressedAccount(settingsAddress, cachedAccounts);\n\n let settingsArg: SettingsCreateOrMutateArgs;\n let proof: ValidityProofWithContext;\n if (!result?.data?.data) {\n const newAddressParams = [\n {\n address: settingsAddress,\n tree: addressTree,\n queue: addressTree,\n type: \"Settings\" as const,\n },\n ];\n\n proof = await getValidityProofWithRetry([], newAddressParams);\n const settingsInitArgs = (\n await getCompressedAccountInitArgs(\n packedAccounts,\n proof.treeInfos,\n proof.roots,\n proof.rootIndices,\n newAddressParams\n )\n )[0];\n settingsArg = {\n __kind: \"Create\",\n fields: [settingsInitArgs] as const,\n };\n } else {\n const data = getCompressedSettingsDecoder().decode(result.data.data);\n if (data.data.__option === \"None\") {\n const hashesWithTree = await getCompressedAccountHashes(\n [{ address: settingsAddress, type: \"Settings\" }],\n cachedAccounts\n );\n\n proof = await getValidityProofWithRetry(hashesWithTree, []);\n const settingsMutArgs = getCompressedAccountMutArgs<CompressedSettings>(\n packedAccounts,\n proof.treeInfos,\n proof.leafIndices,\n proof.rootIndices,\n proof.proveByIndices,\n hashesWithTree.filter((x) => x.type === \"Settings\"),\n getCompressedSettingsDecoder()\n )[0];\n settingsArg = {\n __kind: \"Mutate\",\n fields: [settingsMutArgs] as const,\n };\n } else {\n throw new Error(\"Settings account is already compressed.\");\n }\n }\n\n const dedupSigners = getDeduplicatedSigners(signers);\n\n const secp256r1Signers = dedupSigners.filter(\n (x) => x instanceof SignedSecp256r1Key\n );\n\n const secp256r1VerifyInput: Secp256r1VerifyInput = [];\n const secp256r1VerifyArgs: Secp256r1VerifyArgsWithDomainAddressArgs[] = [];\n for (const x of secp256r1Signers) {\n const index = secp256r1VerifyInput.length;\n const { domainConfig, verifyArgs, signature, publicKey, message } =\n extractSecp256r1VerificationArgs(x, index);\n if (message && signature && publicKey) {\n secp256r1VerifyInput.push({ message, signature, publicKey });\n }\n if (domainConfig) {\n packedAccounts.addPreAccounts([\n { address: domainConfig, role: AccountRole.READONLY },\n ]);\n if (verifyArgs?.__option === \"Some\") {\n secp256r1VerifyArgs.push({\n domainConfigKey: domainConfig,\n verifyArgs: verifyArgs.value,\n });\n }\n }\n }\n\n packedAccounts.addPreAccounts(\n dedupSigners\n .filter((x) => \"address\" in x)\n .map(\n (x) =>\n ({\n address: x.address,\n role: AccountRole.READONLY_SIGNER,\n signer: x,\n }) as AccountSignerMeta\n )\n );\n\n const { remainingAccounts, systemOffset } = packedAccounts.toAccountMetas();\n const compressedProofArgs = convertToCompressedProofArgs(proof, systemOffset);\n\n const instructions = [];\n if (secp256r1VerifyInput.length > 0) {\n instructions.push(getSecp256r1VerifyInstruction(secp256r1VerifyInput));\n }\n instructions.push(\n getCompressSettingsAccountInstruction({\n settings,\n settingsArg,\n compressedProofArgs,\n payer,\n secp256r1VerifyArgs,\n remainingAccounts,\n })\n );\n\n return instructions;\n}\n","import { type Address, type TransactionSigner } from \"gill\";\nimport { getCreateDomainConfigInstruction } from \"../../generated\";\nimport { getDomainConfigAddress } from \"../../utils\";\n\nexport async function createDomainConfig({\n payer,\n rpId,\n origins,\n authority,\n metadataUrl,\n adminDomainConfig,\n}: {\n metadataUrl: string;\n payer: TransactionSigner;\n rpId: string;\n origins: string[];\n authority: Address;\n adminDomainConfig?: Address;\n}) {\n const domainConfig = await getDomainConfigAddress({ rpId });\n return getCreateDomainConfigInstruction({\n origins,\n authority,\n payer,\n domainConfig,\n rpId,\n metadataUrl,\n adminDomainConfig,\n remainingAccounts: [],\n });\n}\n","import { type Address, none, some, type TransactionSigner } from \"gill\";\nimport {\n type CompressedSettings,\n getCompressedSettingsDecoder,\n getCreateDomainUserAccountInstruction,\n getSecp256r1PubkeyDecoder,\n getUserDecoder,\n type SettingsMutArgs,\n type User,\n type UserMutArgs,\n} from \"../../generated\";\nimport { Secp256r1Key } from \"../../types\";\nimport {\n getCompressedSettingsAddressFromIndex,\n getUserAccountAddress,\n} from \"../../utils\";\nimport {\n convertToCompressedProofArgs,\n getCompressedAccountHashes,\n getCompressedAccountInitArgs,\n getCompressedAccountMutArgs,\n getValidityProofWithRetry,\n} from \"../../utils/compressed/internal\";\nimport { PackedAccounts } from \"../../utils/compressed/packedAccounts\";\n\ninterface UserCreationArgs {\n member: Secp256r1Key;\n isPermanentMember: boolean;\n settingsIndex?: number | bigint;\n transactionManager?: Address;\n}\n\nexport async function createDomainUserAccounts({\n authority,\n payer,\n createUserArgs,\n domainConfig,\n cachedAccounts,\n}: {\n domainConfig: Address;\n authority: TransactionSigner;\n payer: TransactionSigner;\n createUserArgs: UserCreationArgs;\n cachedAccounts?: Map<string, any>;\n}) {\n const packedAccounts = new PackedAccounts();\n await packedAccounts.addSystemAccounts();\n\n const addresses = [];\n\n if (createUserArgs.settingsIndex) {\n addresses.push({\n address: getCompressedSettingsAddressFromIndex(\n createUserArgs.settingsIndex\n ).address,\n type: \"Settings\" as const,\n });\n if (createUserArgs.transactionManager) {\n addresses.push({\n address: getUserAccountAddress(createUserArgs.transactionManager)\n .address,\n type: \"User\" as const,\n });\n }\n }\n\n const hashesWithTree = addresses.length\n ? await getCompressedAccountHashes(addresses, cachedAccounts)\n : [];\n const { address, addressTree } = getUserAccountAddress(createUserArgs.member);\n const newAddressParams = [\n {\n address,\n type: \"User\" as const,\n tree: addressTree,\n queue: addressTree,\n },\n ];\n\n const proof = await getValidityProofWithRetry(\n hashesWithTree,\n newAddressParams\n );\n\n let settingsMutArgs: SettingsMutArgs | null = null;\n let transactionManagerMutArgs: UserMutArgs | null = null;\n const settingsHash = hashesWithTree.filter((x) => x.type === \"Settings\");\n const transactionManagerHash = hashesWithTree.filter(\n (x) => x.type === \"User\"\n );\n if (settingsHash.length) {\n settingsMutArgs = getCompressedAccountMutArgs<CompressedSettings>(\n packedAccounts,\n proof.treeInfos.slice(0, 1),\n proof.leafIndices.slice(0, 1),\n proof.rootIndices.slice(0, 1),\n proof.proveByIndices.slice(0, 1),\n settingsHash,\n getCompressedSettingsDecoder()\n )[0];\n }\n if (transactionManagerHash.length) {\n transactionManagerMutArgs = getCompressedAccountMutArgs<User>(\n packedAccounts,\n proof.treeInfos.slice(1, 2),\n proof.leafIndices.slice(1, 2),\n proof.rootIndices.slice(1, 2),\n proof.proveByIndices.slice(1, 2),\n transactionManagerHash,\n getUserDecoder()\n )[0];\n }\n\n const userCreationArgs = await getCompressedAccountInitArgs(\n packedAccounts,\n proof.treeInfos.slice(hashesWithTree.length),\n proof.roots.slice(hashesWithTree.length),\n proof.rootIndices.slice(hashesWithTree.length),\n newAddressParams\n );\n\n const { remainingAccounts, systemOffset } = packedAccounts.toAccountMetas();\n const compressedProofArgs = convertToCompressedProofArgs(proof, systemOffset);\n\n return getCreateDomainUserAccountInstruction({\n payer,\n authority,\n compressedProofArgs,\n member: getSecp256r1PubkeyDecoder().decode(\n createUserArgs.member.toBuffer()\n ),\n isPermanentMember: createUserArgs.isPermanentMember,\n linkWalletArgs: settingsMutArgs\n ? some({\n settingsMutArgs,\n transactionManager: transactionManagerMutArgs\n ? some(transactionManagerMutArgs)\n : none(),\n })\n : none(),\n userAccountCreationArgs: userCreationArgs[0],\n domainConfig,\n remainingAccounts,\n });\n}\n","import type { TransactionSigner } from \"gill\";\nimport { getCreateGlobalCounterInstructionAsync as getCreateGlobalCounterInstruction } from \"../../generated\";\nimport { getGlobalCounterAddress } from \"../../utils\";\n\nexport async function createGlobalCounter({\n payer,\n}: {\n payer: TransactionSigner;\n}) {\n const globalCounter = await getGlobalCounterAddress();\n return getCreateGlobalCounterInstruction({\n payer,\n globalCounter,\n remainingAccounts: [],\n });\n}\n","import { AccountRole, type TransactionSigner } from \"gill\";\nimport { getCreateUserAccountsInstruction } from \"../../generated\";\nimport { getUserAccountAddress } from \"../../utils\";\nimport {\n convertToCompressedProofArgs,\n getCompressedAccountInitArgs,\n getValidityProofWithRetry,\n} from \"../../utils/compressed/internal\";\nimport { PackedAccounts } from \"../../utils/compressed/packedAccounts\";\n\ntype UserCreationArgs =\n | {\n member: TransactionSigner;\n isPermanentMember: true;\n transactionManagerUrl: undefined;\n }\n | {\n member: TransactionSigner;\n isPermanentMember: false;\n transactionManagerUrl?: string;\n };\n\nexport async function createUserAccounts({\n createUserArgs,\n payer,\n}: {\n payer: TransactionSigner;\n createUserArgs: UserCreationArgs[];\n}) {\n const packedAccounts = new PackedAccounts();\n await packedAccounts.addSystemAccounts();\n packedAccounts.addPreAccounts(\n createUserArgs.map((x) => ({\n address: x.member.address,\n role: AccountRole.READONLY_SIGNER,\n signer: x.member,\n }))\n );\n const newAddressParams = createUserArgs.map((x) => {\n const { address, addressTree } = getUserAccountAddress(x.member.address);\n return {\n address,\n tree: addressTree,\n queue: addressTree,\n type: \"User\" as const,\n };\n });\n const proof = await getValidityProofWithRetry([], newAddressParams);\n const userCreationArgs = await getCompressedAccountInitArgs(\n packedAccounts,\n proof.treeInfos,\n proof.roots,\n proof.rootIndices,\n newAddressParams\n );\n\n const { remainingAccounts, systemOffset } = packedAccounts.toAccountMetas();\n\n const compressedProofArgs = convertToCompressedProofArgs(proof, systemOffset);\n\n return getCreateUserAccountsInstruction({\n compressedProofArgs,\n payer,\n createUserArgs: createUserArgs.map((x, index) => ({\n member: x.member.address,\n isPermanentMember: x.isPermanentMember,\n userCreationArgs: userCreationArgs[index],\n transactionManagerUrl: x.transactionManagerUrl ?? null,\n })),\n remainingAccounts,\n });\n}\n","import type { TransactionSigner } from \"gill\";\nimport { getDisableDomainConfigInstruction } from \"../../generated\";\nimport { getDomainConfigAddress } from \"../../utils\";\n\nexport async function disableDomainConfig({\n admin,\n rpId,\n disable,\n}: {\n admin: TransactionSigner;\n disable: boolean;\n rpId: string;\n}) {\n const domainConfig = await getDomainConfigAddress({ rpId });\n return getDisableDomainConfigInstruction({\n domainConfig,\n admin,\n disable,\n remainingAccounts: [],\n });\n}\n","import { type Address, none, some, type TransactionSigner } from \"gill\";\nimport { getEditDomainConfigInstruction } from \"../../generated\";\n\nexport async function editDomainConfig({\n authority,\n domainConfig,\n newAuthority,\n newOrigins,\n newMetadataUrl,\n}: {\n domainConfig: Address;\n authority: TransactionSigner;\n newAuthority?: Address;\n newOrigins?: string[];\n newMetadataUrl?: string;\n}) {\n return getEditDomainConfigInstruction({\n domainConfig,\n authority,\n newOrigins: newOrigins ? some(newOrigins) : none(),\n newAuthority: newAuthority ? some(newAuthority) : none(),\n newMetadataUrl: newMetadataUrl ? some(newMetadataUrl) : none(),\n remainingAccounts: [],\n });\n}\n","import type { TransactionSigner } from \"gill\";\nimport {\n getEditTransactionManagerUrlInstruction,\n getUserDecoder,\n type User,\n} from \"../../generated\";\nimport { getUserAccountAddress } from \"../../utils\";\nimport {\n convertToCompressedProofArgs,\n getCompressedAccountHashes,\n getCompressedAccountMutArgs,\n getValidityProofWithRetry,\n} from \"../../utils/compressed/internal\";\nimport { PackedAccounts } from \"../../utils/compressed/packedAccounts\";\n\nexport async function editTransactionManagerUrl({\n authority,\n transactionManagerUrl,\n}: {\n authority: TransactionSigner;\n transactionManagerUrl: string;\n}) {\n const packedAccounts = new PackedAccounts();\n await packedAccounts.addSystemAccounts();\n const hashesWithTree = await getCompressedAccountHashes([\n { address: getUserAccountAddress(authority.address).address, type: \"User\" },\n ]);\n const proof = await getValidityProofWithRetry(hashesWithTree, []);\n const userMutArgs = getCompressedAccountMutArgs<User>(\n packedAccounts,\n proof.treeInfos,\n proof.leafIndices,\n proof.rootIndices,\n proof.proveByIndices,\n hashesWithTree,\n getUserDecoder()\n )[0];\n const { remainingAccounts, systemOffset } = packedAccounts.toAccountMetas();\n const compressedProofArgs = convertToCompressedProofArgs(proof, systemOffset);\n return getEditTransactionManagerUrlInstruction({\n authority,\n transactionManagerUrl,\n compressedProofArgs,\n userMutArgs,\n remainingAccounts,\n });\n}\n","import { AccountRole, type Instruction, type TransactionSigner } from \"gill\";\nimport {\n getCreateMultiWalletCompressedInstruction,\n getCreateMultiWalletInstruction,\n getUserDecoder,\n type User,\n} from \"../generated\";\nimport { SignedSecp256r1Key } from \"../types\";\nimport {\n getCompressedSettingsAddressFromIndex,\n getGlobalCounterAddress,\n getSettingsFromIndex,\n getUserAccountAddress,\n} from \"../utils\";\nimport {\n convertToCompressedProofArgs,\n getCompressedAccountHashes,\n getCompressedAccountInitArgs,\n getCompressedAccountMutArgs,\n getValidityProofWithRetry,\n} from \"../utils/compressed/internal\";\nimport { PackedAccounts } from \"../utils/compressed/packedAccounts\";\nimport { extractSecp256r1VerificationArgs } from \"../utils/transaction/internal\";\nimport type { Secp256r1VerifyInput } from \"./secp256r1Verify\";\n\ntype CreateWalletArgs = {\n index: bigint | number;\n payer: TransactionSigner;\n compressed?: boolean;\n cachedAccounts?: Map<string, any>;\n initialMember: TransactionSigner | SignedSecp256r1Key;\n setAsDelegate: boolean;\n};\nexport async function createWallet({\n index,\n payer,\n initialMember,\n setAsDelegate,\n compressed = false,\n cachedAccounts,\n}: CreateWalletArgs) {\n const globalCounter = await getGlobalCounterAddress();\n const { domainConfig, verifyArgs, message, signature, publicKey } =\n extractSecp256r1VerificationArgs(initialMember);\n\n const secp256r1VerifyInput: Secp256r1VerifyInput = [];\n if (message && signature && publicKey) {\n secp256r1VerifyInput.push({\n message,\n signature,\n publicKey,\n });\n }\n\n const packedAccounts = new PackedAccounts();\n await packedAccounts.addSystemAccounts();\n\n const newAddressParams = [];\n const hashesWithTree = [];\n\n hashesWithTree.push(\n ...(await getCompressedAccountHashes(\n [\n {\n address: getUserAccountAddress(\n \"address\" in initialMember ? initialMember.address : initialMember\n ).address,\n type: \"User\" as const,\n },\n ],\n cachedAccounts\n ))\n );\n\n if (compressed) {\n const { address: settingsAddress, addressTree } =\n getCompressedSettingsAddressFromIndex(index);\n newAddressParams.push({\n address: settingsAddress,\n queue: addressTree,\n tree: addressTree,\n type: \"Settings\" as const,\n });\n }\n const hashesWithTreeEndIndex = hashesWithTree.length;\n\n const proof = await getValidityProofWithRetry(\n hashesWithTree,\n newAddressParams\n );\n\n const userMutArgs = getCompressedAccountMutArgs<User>(\n packedAccounts,\n proof.treeInfos.slice(0, hashesWithTreeEndIndex),\n proof.leafIndices.slice(0, hashesWithTreeEndIndex),\n proof.rootIndices.slice(0, hashesWithTreeEndIndex),\n proof.proveByIndices.slice(0, hashesWithTreeEndIndex),\n hashesWithTree.filter((x) => x.type === \"User\"),\n getUserDecoder()\n )[0];\n\n const initArgs = await getCompressedAccountInitArgs(\n packedAccounts,\n proof.treeInfos.slice(hashesWithTreeEndIndex),\n proof.roots.slice(hashesWithTreeEndIndex),\n proof.rootIndices.slice(hashesWithTreeEndIndex),\n newAddressParams\n );\n\n const settingsCreationArgs =\n initArgs.find((x) => x.type === \"Settings\") ?? null;\n\n if (domainConfig) {\n packedAccounts.addPreAccounts([\n { address: domainConfig, role: AccountRole.READONLY },\n ]);\n } else if (\"address\" in initialMember) {\n packedAccounts.addPreAccounts([\n {\n address: initialMember.address,\n role: AccountRole.READONLY_SIGNER,\n signer: initialMember,\n },\n ]);\n }\n\n const { remainingAccounts, systemOffset } = packedAccounts.toAccountMetas();\n\n const compressedProofArgs = convertToCompressedProofArgs(proof, systemOffset);\n\n const instructions: Instruction[] = [];\n if (compressed) {\n if (!settingsCreationArgs) {\n throw new Error(\"Settings creation args is missing.\");\n }\n\n instructions.push(\n getCreateMultiWalletCompressedInstruction({\n settingsIndex: index,\n payer: payer,\n initialMember:\n initialMember instanceof SignedSecp256r1Key\n ? undefined\n : initialMember,\n secp256r1VerifyArgs: verifyArgs,\n domainConfig,\n userMutArgs,\n globalCounter,\n compressedProofArgs,\n settingsCreation: settingsCreationArgs,\n setAsDelegate,\n remainingAccounts,\n })\n );\n } else {\n const settings = await getSettingsFromIndex(index);\n instructions.push(\n getCreateMultiWalletInstruction({\n settingsIndex: index,\n settings,\n payer,\n initialMember:\n initialMember instanceof SignedSecp256r1Key\n ? undefined\n : initialMember,\n secp256r1VerifyArgs: verifyArgs,\n domainConfig,\n userMutArgs,\n globalCounter,\n compressedProofArgs,\n setAsDelegate,\n remainingAccounts,\n })\n );\n }\n\n return { instructions, secp256r1VerifyInput };\n}\n","import {\n AccountRole,\n type AccountSignerMeta,\n type TransactionSigner,\n} from \"gill\";\nimport {\n type CompressedSettings,\n getCompressedSettingsDecoder,\n getDecompressSettingsAccountInstruction,\n type Secp256r1VerifyArgsWithDomainAddressArgs,\n} from \"../generated\";\nimport { SignedSecp256r1Key } from \"../types\";\nimport {\n getCompressedSettingsAddressFromIndex,\n getSettingsFromIndex,\n} from \"../utils\";\nimport {\n convertToCompressedProofArgs,\n getCompressedAccountHashes,\n getCompressedAccountMutArgs,\n getValidityProofWithRetry,\n} from \"../utils/compressed/internal\";\nimport { PackedAccounts } from \"../utils/compressed/packedAccounts\";\nimport {\n extractSecp256r1VerificationArgs,\n getDeduplicatedSigners,\n} from \"../utils/transaction/internal\";\nimport {\n getSecp256r1VerifyInstruction,\n type Secp256r1VerifyInput,\n} from \"./secp256r1Verify\";\n\nexport async function decompressSettingsAccount({\n index,\n payer,\n signers,\n cachedAccounts,\n}: {\n index: number | bigint;\n payer: TransactionSigner;\n signers: (SignedSecp256r1Key | TransactionSigner)[];\n cachedAccounts?: Map<string, any>;\n}) {\n const packedAccounts = new PackedAccounts();\n await packedAccounts.addSystemAccounts();\n\n const hashesWithTree = await getCompressedAccountHashes(\n [\n {\n address: getCompressedSettingsAddressFromIndex(index).address,\n type: \"Settings\" as const,\n },\n ],\n cachedAccounts\n );\n const proof = await getValidityProofWithRetry(hashesWithTree, []);\n const settingsMutArgs = getCompressedAccountMutArgs<CompressedSettings>(\n packedAccounts,\n proof.treeInfos,\n proof.leafIndices,\n proof.rootIndices,\n proof.proveByIndices,\n hashesWithTree.filter((x) => x.type === \"Settings\"),\n getCompressedSettingsDecoder()\n )[0];\n\n const dedupSigners = getDeduplicatedSigners(signers);\n\n const secp256r1Signers = dedupSigners.filter(\n (x) => x instanceof SignedSecp256r1Key\n );\n\n const secp256r1VerifyInput: Secp256r1VerifyInput = [];\n const secp256r1VerifyArgs: Secp256r1VerifyArgsWithDomainAddressArgs[] = [];\n for (const x of secp256r1Signers) {\n const index = secp256r1VerifyInput.length;\n const { domainConfig, verifyArgs, signature, publicKey, message } =\n extractSecp256r1VerificationArgs(x, index);\n if (message && signature && publicKey) {\n secp256r1VerifyInput.push({ message, signature, publicKey });\n }\n if (domainConfig) {\n packedAccounts.addPreAccounts([\n { address: domainConfig, role: AccountRole.READONLY },\n ]);\n if (verifyArgs?.__option === \"Some\") {\n secp256r1VerifyArgs.push({\n domainConfigKey: domainConfig,\n verifyArgs: verifyArgs.value,\n });\n }\n }\n }\n packedAccounts.addPreAccounts(\n dedupSigners\n .filter((x) => \"address\" in x)\n .map(\n (x) =>\n ({\n address: x.address,\n role: AccountRole.READONLY_SIGNER,\n signer: x,\n }) as AccountSignerMeta\n )\n );\n\n const { remainingAccounts, systemOffset } = packedAccounts.toAccountMetas();\n const compressedProofArgs = convertToCompressedProofArgs(proof, systemOffset);\n const instructions = [];\n if (secp256r1VerifyInput.length > 0) {\n instructions.push(getSecp256r1VerifyInstruction(secp256r1VerifyInput));\n }\n\n const settings = await getSettingsFromIndex(index);\n instructions.push(\n getDecompressSettingsAccountInstruction({\n settings,\n payer,\n settingsMut: settingsMutArgs,\n compressedProofArgs,\n secp256r1VerifyArgs,\n remainingAccounts,\n })\n );\n return instructions;\n}\n","import {\n type AccountMeta,\n AccountRole,\n type AccountSignerMeta,\n type Address,\n type AddressesByLookupTableAddress,\n type CompiledTransactionMessage,\n fetchAddressesForLookupTables,\n type ReadonlyUint8Array,\n type TransactionSigner,\n} from \"gill\";\nimport { getSolanaRpc } from \"..\";\nimport { vaultTransactionMessageDeserialize } from \"../../types\";\n\nfunction getAccountRole(\n message: CompiledTransactionMessage,\n index: number,\n accountKey: Address,\n vaultPda: Address\n) {\n const isWritable = isStaticWritableIndex(message, index);\n const isSigner = isSignerIndex(message, index) && accountKey !== vaultPda;\n if (isWritable && isSigner) {\n return AccountRole.WRITABLE_SIGNER;\n } else if (isWritable && !isSigner) {\n return AccountRole.WRITABLE;\n } else if (!isWritable && isSigner) {\n return AccountRole.READONLY_SIGNER;\n } else {\n return AccountRole.READONLY;\n }\n}\nfunction isStaticWritableIndex(\n message: CompiledTransactionMessage,\n index: number\n) {\n const numAccountKeys = message.staticAccounts.length;\n const {\n numSignerAccounts,\n numReadonlySignerAccounts,\n numReadonlyNonSignerAccounts,\n } = message.header;\n\n const numWritableSigners = numSignerAccounts - numReadonlySignerAccounts;\n const numWritableNonSigners =\n numAccountKeys - numSignerAccounts - numReadonlyNonSignerAccounts;\n\n if (index >= numAccountKeys) {\n // `index` is not a part of static `accountKeys`.\n return false;\n }\n\n if (index < numWritableSigners) {\n // `index` is within the range of writable signer keys.\n return true;\n }\n\n if (index >= numSignerAccounts) {\n // `index` is within the range of non-signer keys.\n const indexIntoNonSigners = index - numSignerAccounts;\n // Whether `index` is within the range of writable non-signer keys.\n return indexIntoNonSigners < numWritableNonSigners;\n }\n\n return false;\n}\nfunction isSignerIndex(message: CompiledTransactionMessage, index: number) {\n return index < message.header.numSignerAccounts;\n}\n/** Populate remaining accounts required for execution of the transaction. */\n\nexport async function accountsForTransactionExecute({\n walletAddress,\n transactionMessageBytes,\n addressesByLookupTableAddress,\n additionalSigners,\n}: {\n transactionMessageBytes: ReadonlyUint8Array;\n walletAddress: Address;\n addressesByLookupTableAddress?: AddressesByLookupTableAddress;\n additionalSigners?: TransactionSigner[];\n}) {\n const transactionMessage = vaultTransactionMessageDeserialize(\n transactionMessageBytes\n );\n\n if (transactionMessage.version === \"legacy\") {\n throw new Error(\"Only versioned transaction is allowed.\");\n }\n\n const addressLookupTableAccounts =\n addressesByLookupTableAddress ??\n (transactionMessage.addressTableLookups\n ? await fetchAddressesForLookupTables(\n transactionMessage.addressTableLookups.map(\n (x) => x.lookupTableAddress\n ),\n getSolanaRpc()\n )\n : {});\n\n // Populate account metas required for execution of the transaction.\n const accountMetas: (AccountMeta | AccountSignerMeta)[] = [];\n // First add the lookup table accounts used by the transaction. They are needed for on-chain validation.\n\n accountMetas.push(\n ...(transactionMessage.addressTableLookups?.map((lookup) => {\n return {\n role: AccountRole.READONLY,\n address: lookup.lookupTableAddress,\n };\n }) ?? [])\n );\n\n // Then add static account keys included into the message.\n for (const [\n accountIndex,\n accountKey,\n ] of transactionMessage.staticAccounts.entries()) {\n accountMetas.push({\n address: accountKey,\n role: getAccountRole(\n transactionMessage,\n accountIndex,\n accountKey,\n walletAddress\n ),\n });\n }\n\n // Then add accounts that will be loaded with address lookup tables.\n if (transactionMessage.addressTableLookups) {\n for (const lookup of transactionMessage.addressTableLookups) {\n const lookupTableAccount =\n addressLookupTableAccounts[lookup.lookupTableAddress];\n if (!lookupTableAccount) {\n throw new Error(\n `Address lookup table account ${lookup.lookupTableAddress} not found`\n );\n }\n\n for (const accountIndex of lookup.writableIndexes) {\n const address = lookupTableAccount[accountIndex];\n if (!address) {\n throw new Error(\n `Address lookup table account ${lookup.lookupTableAddress} does not contain address at index ${accountIndex}`\n );\n }\n\n accountMetas.push({\n address,\n role: AccountRole.WRITABLE,\n });\n }\n for (const accountIndex of lookup.readonlyIndexes) {\n const address = lookupTableAccount[accountIndex];\n if (!address) {\n throw new Error(\n `Address lookup table account ${lookup.lookupTableAddress} does not contain address at index ${accountIndex}`\n );\n }\n accountMetas.push({\n address,\n role: AccountRole.READONLY,\n });\n }\n }\n }\n\n for (const signer of additionalSigners?.filter(\n (x) => x.address !== walletAddress\n ) ?? []) {\n const index = accountMetas.findIndex(\n (meta) => meta.address === signer.address\n );\n if (index === -1) {\n accountMetas.push({\n address: signer.address,\n role: AccountRole.READONLY_SIGNER,\n signer,\n });\n } else {\n if (\n accountMetas[index].role === AccountRole.READONLY ||\n accountMetas[index].role === AccountRole.READONLY_SIGNER\n ) {\n accountMetas[index] = {\n address: signer.address,\n role: AccountRole.READONLY_SIGNER,\n signer,\n };\n } else if (\n accountMetas[index].role === AccountRole.WRITABLE ||\n accountMetas[index].role === AccountRole.WRITABLE_SIGNER\n ) {\n accountMetas[index] = {\n address: signer.address,\n role: AccountRole.WRITABLE_SIGNER,\n signer,\n };\n }\n }\n }\n return {\n accountMetas,\n addressLookupTableAccounts,\n transactionMessage,\n };\n}\n","import type {\n Address,\n AddressesByLookupTableAddress,\n Instruction,\n ReadonlyUint8Array,\n TransactionSigner,\n} from \"gill\";\nimport {\n getTransactionExecuteCompressedInstruction,\n getTransactionExecuteInstruction,\n} from \"../generated\";\nimport { getWalletAddressFromSettings } from \"../utils\";\nimport { addJitoTip } from \"../utils/transaction/internal\";\nimport { accountsForTransactionExecute } from \"../utils/transactionMessage/internal\";\nimport {\n getSecp256r1VerifyInstruction,\n type Secp256r1VerifyInput,\n} from \"./secp256r1Verify\";\n\nexport async function executeTransaction({\n settings,\n transactionBufferAddress,\n transactionMessageBytes,\n payer,\n addressesByLookupTableAddress,\n secp256r1VerifyInput = [],\n additionalSigners = [],\n jitoBundlesTipAmount,\n compressed = false,\n}: {\n settings: Address;\n payer: TransactionSigner;\n transactionBufferAddress: Address;\n transactionMessageBytes: ReadonlyUint8Array;\n addressesByLookupTableAddress?: AddressesByLookupTableAddress;\n secp256r1VerifyInput?: Secp256r1VerifyInput;\n additionalSigners?: TransactionSigner[];\n jitoBundlesTipAmount?: number;\n compressed?: boolean;\n}) {\n const walletAddress = await getWalletAddressFromSettings(settings);\n\n const { accountMetas, addressLookupTableAccounts } =\n await accountsForTransactionExecute({\n transactionMessageBytes,\n walletAddress,\n additionalSigners,\n addressesByLookupTableAddress,\n });\n\n const instructions: Instruction[] = [];\n if (secp256r1VerifyInput.length > 0) {\n instructions.push(getSecp256r1VerifyInstruction(secp256r1VerifyInput));\n }\n\n instructions.push(\n compressed\n ? getTransactionExecuteCompressedInstruction({\n transactionBuffer: transactionBufferAddress,\n payer: payer.address,\n remainingAccounts: accountMetas,\n settingsKey: settings,\n })\n : getTransactionExecuteInstruction({\n transactionBuffer: transactionBufferAddress,\n payer: payer.address,\n remainingAccounts: accountMetas,\n settings,\n })\n );\n\n if (jitoBundlesTipAmount) {\n instructions.push(addJitoTip({ payer, tipAmount: jitoBundlesTipAmount }));\n }\n\n return {\n instructions,\n addressLookupTableAccounts,\n };\n}\n","import {\n AccountRole,\n type AccountMeta,\n type AddressesByLookupTableAddress,\n type CompiledTransactionMessage,\n type Instruction,\n type ReadonlyUint8Array,\n type TransactionSigner,\n} from \"gill\";\nimport {\n getTransactionExecuteSyncCompressedInstruction,\n getTransactionExecuteSyncInstruction,\n type Secp256r1VerifyArgsWithDomainAddressArgs,\n} from \"../generated\";\nimport { SignedSecp256r1Key } from \"../types\";\nimport { getSettingsFromIndex, getWalletAddressFromSettings } from \"../utils\";\nimport {\n constructSettingsProofArgs,\n convertToCompressedProofArgs,\n} from \"../utils/compressed/internal\";\nimport {\n extractSecp256r1VerificationArgs,\n getDeduplicatedSigners,\n} from \"../utils/transaction/internal\";\nimport { accountsForTransactionExecute } from \"../utils/transactionMessage/internal\";\nimport {\n getSecp256r1VerifyInstruction,\n type Secp256r1VerifyInput,\n} from \"./secp256r1Verify\";\n\nexport async function executeTransactionSync({\n index,\n transactionMessageBytes,\n signers,\n payer,\n addressesByLookupTableAddress,\n secp256r1VerifyInput = [],\n compressed = false,\n simulateProof = false,\n cachedAccounts,\n}: {\n index: bigint | number;\n signers: (TransactionSigner | SignedSecp256r1Key)[];\n transactionMessageBytes: ReadonlyUint8Array;\n secp256r1VerifyInput?: Secp256r1VerifyInput;\n compressed?: boolean;\n addressesByLookupTableAddress?: AddressesByLookupTableAddress;\n payer?: TransactionSigner;\n simulateProof?: boolean;\n cachedAccounts?: Map<string, any>;\n}) {\n const dedupSigners = getDeduplicatedSigners(signers);\n const settings = await getSettingsFromIndex(index);\n const walletAddress = await getWalletAddressFromSettings(settings);\n const [\n { accountMetas, addressLookupTableAccounts, transactionMessage },\n { settingsReadonlyArgs, proof, packedAccounts },\n ] = await Promise.all([\n accountsForTransactionExecute({\n transactionMessageBytes,\n walletAddress,\n additionalSigners: dedupSigners.filter(\n (x) => !(x instanceof SignedSecp256r1Key)\n ) as TransactionSigner[],\n addressesByLookupTableAddress,\n }),\n constructSettingsProofArgs(\n compressed,\n index,\n simulateProof,\n cachedAccounts\n ),\n ]);\n\n packedAccounts.addPreAccounts(accountMetas);\n\n const secp256r1Signers = dedupSigners.filter(\n (x) => x instanceof SignedSecp256r1Key\n );\n\n const secp256r1VerifyArgs: Secp256r1VerifyArgsWithDomainAddressArgs[] = [];\n for (const x of secp256r1Signers) {\n const index = secp256r1VerifyInput.length;\n const { domainConfig, verifyArgs, signature, publicKey, message } =\n extractSecp256r1VerificationArgs(x, index);\n if (message && signature && publicKey) {\n secp256r1VerifyInput.push({ message, signature, publicKey });\n }\n if (domainConfig) {\n packedAccounts.addPreAccounts([\n { address: domainConfig, role: AccountRole.READONLY },\n ]);\n if (verifyArgs?.__option === \"Some\") {\n secp256r1VerifyArgs.push({\n domainConfigKey: domainConfig,\n verifyArgs: verifyArgs.value,\n });\n }\n }\n }\n\n const { remainingAccounts, systemOffset } = packedAccounts.toAccountMetas();\n\n const instructions: Instruction[] = [];\n\n if (secp256r1VerifyInput.length > 0) {\n instructions.push(getSecp256r1VerifyInstruction(secp256r1VerifyInput));\n }\n const customTransactionMessage = parseTransactionMessage(\n transactionMessage,\n accountMetas\n );\n\n if (compressed) {\n if (!payer || !settingsReadonlyArgs) {\n throw new Error(\"Payer not found or proof args is missing.\");\n }\n const compressedProofArgs = convertToCompressedProofArgs(\n proof,\n systemOffset\n );\n\n instructions.push(\n getTransactionExecuteSyncCompressedInstruction({\n secp256r1VerifyArgs,\n transactionMessage: customTransactionMessage,\n settingsReadonlyArgs,\n compressedProofArgs,\n payer,\n remainingAccounts,\n })\n );\n } else {\n instructions.push(\n getTransactionExecuteSyncInstruction({\n secp256r1VerifyArgs,\n settings,\n transactionMessage: customTransactionMessage,\n remainingAccounts,\n })\n );\n }\n\n return {\n instructions,\n addressLookupTableAccounts,\n };\n}\nfunction parseTransactionMessage(\n transactionMessage: CompiledTransactionMessage,\n accountMetas: AccountMeta[]\n) {\n if (transactionMessage.version === \"legacy\") {\n throw new Error(\"Only versioned transaction is allowed.\");\n }\n return {\n numSigners: transactionMessage.header.numSignerAccounts,\n numWritableNonSigners:\n transactionMessage.staticAccounts.length -\n transactionMessage.header.numSignerAccounts -\n transactionMessage.header.numReadonlyNonSignerAccounts,\n numWritableSigners:\n transactionMessage.header.numSignerAccounts -\n transactionMessage.header.numReadonlySignerAccounts,\n numAccountKeys: transactionMessage.staticAccounts.length,\n instructions: transactionMessage.instructions.map((x) => ({\n ...x,\n accountIndices: new Uint8Array(x.accountIndices ?? []),\n data: new Uint8Array(x.data ?? []),\n })),\n addressTableLookups:\n transactionMessage.addressTableLookups?.map((x) => ({\n lookupTableAddressIndex: accountMetas.findIndex(\n (y) => y.address === x.lookupTableAddress\n ),\n writableIndexes: new Uint8Array(x.writableIndexes),\n readonlyIndexes: new Uint8Array(x.readonlyIndexes),\n })) ?? [],\n };\n}\n","import {\n AccountRole,\n type Address,\n type Instruction,\n type TransactionSigner,\n} from \"gill\";\nimport {\n getNativeTransferIntentCompressedInstruction,\n getNativeTransferIntentInstruction,\n type Secp256r1VerifyArgsWithDomainAddressArgs,\n} from \"../../generated\";\nimport { SignedSecp256r1Key } from \"../../types\";\nimport {\n getSettingsFromIndex,\n getWalletAddressFromSettings,\n} from \"../../utils\";\nimport {\n constructSettingsProofArgs,\n convertToCompressedProofArgs,\n} from \"../../utils/compressed/internal\";\nimport {\n extractSecp256r1VerificationArgs,\n getDeduplicatedSigners,\n} from \"../../utils/transaction/internal\";\nimport {\n getSecp256r1VerifyInstruction,\n type Secp256r1VerifyInput,\n} from \"../secp256r1Verify\";\n\nexport async function nativeTransferIntent({\n index,\n destination,\n signers,\n cachedAccounts,\n amount,\n payer,\n compressed = false,\n}: {\n index: number | bigint;\n destination: Address;\n amount: number | bigint;\n signers: (TransactionSigner | SignedSecp256r1Key)[];\n payer?: TransactionSigner;\n compressed?: boolean;\n cachedAccounts?: Map<string, any>;\n}) {\n const dedupSigners = getDeduplicatedSigners(signers);\n const settings = await getSettingsFromIndex(index);\n const walletAddress = await getWalletAddressFromSettings(settings);\n const { settingsReadonlyArgs, proof, packedAccounts } =\n await constructSettingsProofArgs(compressed, index, false, cachedAccounts);\n\n const secp256r1VerifyInput: Secp256r1VerifyInput = [];\n const secp256r1VerifyArgs: Secp256r1VerifyArgsWithDomainAddressArgs[] = [];\n for (const x of dedupSigners) {\n if (x instanceof SignedSecp256r1Key) {\n const index = secp256r1VerifyInput.length;\n const { domainConfig, verifyArgs, signature, publicKey, message } =\n extractSecp256r1VerificationArgs(x, index);\n if (message && signature && publicKey) {\n secp256r1VerifyInput.push({ message, signature, publicKey });\n }\n if (domainConfig) {\n packedAccounts.addPreAccounts([\n { address: domainConfig, role: AccountRole.READONLY },\n ]);\n if (verifyArgs?.__option === \"Some\") {\n secp256r1VerifyArgs.push({\n domainConfigKey: domainConfig,\n verifyArgs: verifyArgs.value,\n });\n }\n }\n } else {\n packedAccounts.addPreAccounts([\n { address: x.address, role: AccountRole.READONLY_SIGNER, signer: x },\n ]);\n }\n }\n\n const { remainingAccounts, systemOffset } = packedAccounts.toAccountMetas();\n\n const instructions: Instruction[] = [];\n\n if (secp256r1VerifyInput.length > 0) {\n instructions.push(getSecp256r1VerifyInstruction(secp256r1VerifyInput));\n }\n\n if (compressed) {\n if (!payer || !settingsReadonlyArgs) {\n throw new Error(\"Payer not found or proof args is missing.\");\n }\n const compressedProofArgs = convertToCompressedProofArgs(\n proof,\n systemOffset\n );\n instructions.push(\n getNativeTransferIntentCompressedInstruction({\n amount,\n settingsReadonlyArgs,\n compressedProofArgs,\n payer,\n secp256r1VerifyArgs,\n source: walletAddress,\n destination,\n remainingAccounts,\n })\n );\n } else {\n instructions.push(\n getNativeTransferIntentInstruction({\n amount,\n secp256r1VerifyArgs,\n source: walletAddress,\n destination,\n settings,\n remainingAccounts,\n })\n );\n }\n\n return instructions;\n}\n","import {\n AccountRole,\n type Address,\n type Instruction,\n type TransactionSigner,\n} from \"gill\";\nimport { getAssociatedTokenAccountAddress } from \"gill/programs\";\nimport {\n getTokenTransferIntentCompressedInstruction,\n getTokenTransferIntentInstruction,\n type Secp256r1VerifyArgsWithDomainAddressArgs,\n} from \"../../generated\";\nimport { SignedSecp256r1Key } from \"../../types\";\nimport {\n getSettingsFromIndex,\n getWalletAddressFromSettings,\n} from \"../../utils\";\nimport {\n constructSettingsProofArgs,\n convertToCompressedProofArgs,\n} from \"../../utils/compressed/internal\";\nimport {\n extractSecp256r1VerificationArgs,\n getDeduplicatedSigners,\n} from \"../../utils/transaction/internal\";\nimport {\n getSecp256r1VerifyInstruction,\n type Secp256r1VerifyInput,\n} from \"../secp256r1Verify\";\n\nexport async function tokenTransferIntent({\n index,\n destination,\n mint,\n signers,\n cachedAccounts,\n amount,\n payer,\n tokenProgram,\n compressed = false,\n}: {\n index: number | bigint;\n destination: Address;\n mint: Address;\n amount: number | bigint;\n signers: (TransactionSigner | SignedSecp256r1Key)[];\n tokenProgram: Address;\n payer?: TransactionSigner;\n compressed?: boolean;\n cachedAccounts?: Map<string, any>;\n}) {\n const dedupSigners = getDeduplicatedSigners(signers);\n const settings = await getSettingsFromIndex(index);\n const walletAddress = await getWalletAddressFromSettings(settings);\n const [sourceTokenAccount, destinationTokenAccount] = await Promise.all([\n getAssociatedTokenAccountAddress(mint, walletAddress, tokenProgram),\n getAssociatedTokenAccountAddress(mint, destination, tokenProgram),\n ]);\n const { settingsReadonlyArgs, proof, packedAccounts } =\n await constructSettingsProofArgs(compressed, index, false, cachedAccounts);\n\n const secp256r1VerifyInput: Secp256r1VerifyInput = [];\n const secp256r1VerifyArgs: Secp256r1VerifyArgsWithDomainAddressArgs[] = [];\n for (const x of dedupSigners) {\n if (x instanceof SignedSecp256r1Key) {\n const index = secp256r1VerifyInput.length;\n const { domainConfig, verifyArgs, signature, publicKey, message } =\n extractSecp256r1VerificationArgs(x, index);\n if (message && signature && publicKey) {\n secp256r1VerifyInput.push({ message, signature, publicKey });\n }\n if (domainConfig) {\n packedAccounts.addPreAccounts([\n { address: domainConfig, role: AccountRole.READONLY },\n ]);\n if (verifyArgs?.__option === \"Some\") {\n secp256r1VerifyArgs.push({\n domainConfigKey: domainConfig,\n verifyArgs: verifyArgs.value,\n });\n }\n }\n } else {\n packedAccounts.addPreAccounts([\n { address: x.address, role: AccountRole.READONLY_SIGNER, signer: x },\n ]);\n }\n }\n\n const { remainingAccounts, systemOffset } = packedAccounts.toAccountMetas();\n\n const instructions: Instruction[] = [];\n\n if (secp256r1VerifyInput.length > 0) {\n instructions.push(getSecp256r1VerifyInstruction(secp256r1VerifyInput));\n }\n\n if (compressed) {\n if (!payer || !settingsReadonlyArgs) {\n throw new Error(\"Payer not found or proof args is missing.\");\n }\n const compressedProofArgs = convertToCompressedProofArgs(\n proof,\n systemOffset\n );\n instructions.push(\n getTokenTransferIntentCompressedInstruction({\n amount,\n settingsReadonlyArgs,\n compressedProofArgs,\n payer,\n secp256r1VerifyArgs,\n source: walletAddress,\n sourceTokenAccount,\n destination,\n destinationTokenAccount,\n mint,\n tokenProgram,\n remainingAccounts,\n })\n );\n } else {\n instructions.push(\n getTokenTransferIntentInstruction({\n amount,\n secp256r1VerifyArgs,\n source: walletAddress,\n sourceTokenAccount,\n destination,\n destinationTokenAccount,\n settings,\n mint,\n tokenProgram,\n remainingAccounts,\n })\n );\n }\n\n return instructions;\n}\n","import type { Address, TransactionSigner } from \"gill\";\nimport {\n fetchTransactionBuffer,\n getTransactionBufferCloseCompressedInstruction,\n getTransactionBufferCloseInstruction,\n} from \"../../generated\";\nimport { SignedSecp256r1Key } from \"../../types\";\nimport { getSolanaRpc } from \"../../utils\";\nimport {\n constructSettingsProofArgs,\n convertToCompressedProofArgs,\n} from \"../../utils/compressed/internal\";\nimport { extractSecp256r1VerificationArgs } from \"../../utils/transaction/internal\";\nimport { getSecp256r1VerifyInstruction } from \"../secp256r1Verify\";\n\nexport async function closeTransactionBuffer({\n index,\n closer,\n transactionBufferAddress,\n payer,\n compressed = false,\n cachedAccounts,\n}: {\n index: bigint | number;\n closer: TransactionSigner | SignedSecp256r1Key;\n transactionBufferAddress: Address;\n payer?: TransactionSigner;\n compressed?: boolean;\n cachedAccounts?: Map<string, any>;\n}) {\n const transactionBuffer = await fetchTransactionBuffer(\n getSolanaRpc(),\n transactionBufferAddress\n );\n const settings = transactionBuffer.data.multiWalletSettings;\n const { settingsReadonlyArgs, proof, packedAccounts } =\n await constructSettingsProofArgs(compressed, index, false, cachedAccounts);\n\n const { remainingAccounts, systemOffset } = packedAccounts.toAccountMetas();\n const { domainConfig, verifyArgs, message, signature, publicKey } =\n extractSecp256r1VerificationArgs(closer);\n\n const instructions = [];\n if (message && signature && publicKey) {\n instructions.push(\n getSecp256r1VerifyInstruction([\n {\n message,\n signature,\n publicKey,\n },\n ])\n );\n }\n\n if (compressed) {\n if (!payer || !settingsReadonlyArgs) {\n throw new Error(\"Payer not found or proof args is missing.\");\n }\n const compressedProofArgs = convertToCompressedProofArgs(\n proof,\n systemOffset\n );\n\n instructions.push(\n getTransactionBufferCloseCompressedInstruction({\n transactionBuffer: transactionBufferAddress,\n domainConfig,\n closer: closer instanceof SignedSecp256r1Key ? undefined : closer,\n rentCollector: transactionBuffer.data.payer,\n secp256r1VerifyArgs: verifyArgs,\n settingsReadonlyArgs,\n payer,\n compressedProofArgs,\n remainingAccounts,\n })\n );\n } else {\n instructions.push(\n getTransactionBufferCloseInstruction({\n transactionBuffer: transactionBufferAddress,\n domainConfig,\n closer: closer instanceof SignedSecp256r1Key ? undefined : closer,\n settings,\n payer: transactionBuffer.data.payer,\n secp256r1VerifyArgs: verifyArgs,\n remainingAccounts: [],\n })\n );\n }\n\n return instructions;\n}\n","import type { AccountMeta, Address, TransactionSigner } from \"gill\";\nimport {\n getTransactionBufferCreateCompressedInstruction,\n getTransactionBufferCreateInstruction,\n type MemberKey,\n type ProofArgsArgs,\n type SettingsReadonlyArgs,\n} from \"../../generated\";\nimport { SignedSecp256r1Key } from \"../../types\";\nimport { extractSecp256r1VerificationArgs } from \"../../utils/transaction/internal\";\nimport { getSecp256r1VerifyInstruction } from \"../secp256r1Verify\";\n\nexport function createTransactionBuffer({\n payer,\n creator,\n bufferIndex,\n settings,\n transactionBufferAddress,\n finalBufferHash,\n finalBufferSize,\n preauthorizeExecution,\n bufferExtendHashes,\n compressedArgs,\n expectedSigners,\n}: {\n finalBufferHash: Uint8Array;\n finalBufferSize: number;\n payer: TransactionSigner;\n creator: TransactionSigner | SignedSecp256r1Key;\n settings: Address;\n bufferIndex: number;\n transactionBufferAddress: Address;\n preauthorizeExecution: boolean;\n bufferExtendHashes: Uint8Array[];\n compressedArgs: {\n settingsReadonlyArgs: SettingsReadonlyArgs;\n compressedProofArgs: ProofArgsArgs;\n remainingAccounts: AccountMeta[];\n } | null;\n expectedSigners: MemberKey[];\n}) {\n const { domainConfig, verifyArgs, message, signature, publicKey } =\n extractSecp256r1VerificationArgs(creator);\n const instructions = [];\n if (message && signature && publicKey) {\n instructions.push(\n getSecp256r1VerifyInstruction([\n {\n message,\n signature,\n publicKey,\n },\n ])\n );\n }\n\n if (compressedArgs) {\n const { settingsReadonlyArgs, compressedProofArgs, remainingAccounts } =\n compressedArgs;\n instructions.push(\n getTransactionBufferCreateCompressedInstruction({\n transactionBuffer: transactionBufferAddress,\n payer,\n secp256r1VerifyArgs: verifyArgs,\n creator: creator instanceof SignedSecp256r1Key ? undefined : creator,\n domainConfig,\n args: {\n bufferIndex,\n finalBufferHash,\n finalBufferSize,\n bufferExtendHashes,\n preauthorizeExecution,\n expectedSigners,\n },\n settingsReadonlyArgs,\n compressedProofArgs,\n remainingAccounts,\n })\n );\n } else {\n instructions.push(\n getTransactionBufferCreateInstruction({\n settings,\n transactionBuffer: transactionBufferAddress,\n payer,\n secp256r1VerifyArgs: verifyArgs,\n creator: creator instanceof SignedSecp256r1Key ? undefined : creator,\n domainConfig,\n args: {\n bufferIndex,\n finalBufferHash,\n finalBufferSize,\n bufferExtendHashes,\n preauthorizeExecution,\n expectedSigners,\n },\n remainingAccounts: [],\n })\n );\n }\n\n return instructions;\n}\n","import type { AccountMeta, Address, TransactionSigner } from \"gill\";\nimport {\n getTransactionBufferExecuteCompressedInstruction,\n getTransactionBufferExecuteInstruction,\n type ProofArgsArgs,\n type SettingsReadonlyArgs,\n} from \"../../generated\";\nimport { SignedSecp256r1Key } from \"../../types\";\nimport { extractSecp256r1VerificationArgs } from \"../../utils/transaction/internal\";\nimport { getSecp256r1VerifyInstruction } from \"../secp256r1Verify\";\n\nexport function executeTransactionBuffer({\n executor,\n transactionBufferAddress,\n settings,\n compressedArgs,\n}: {\n executor?: TransactionSigner | SignedSecp256r1Key;\n transactionBufferAddress: Address;\n settings: Address;\n compressedArgs: {\n settingsReadonlyArgs: SettingsReadonlyArgs;\n compressedProofArgs: ProofArgsArgs;\n remainingAccounts: AccountMeta[];\n payer: TransactionSigner;\n } | null;\n}) {\n const { domainConfig, verifyArgs, signature, message, publicKey } =\n extractSecp256r1VerificationArgs(executor);\n const instructions = [];\n if (message && signature && publicKey) {\n instructions.push(\n getSecp256r1VerifyInstruction([\n {\n message,\n signature,\n publicKey,\n },\n ])\n );\n }\n\n if (compressedArgs) {\n instructions.push(\n getTransactionBufferExecuteCompressedInstruction({\n transactionBuffer: transactionBufferAddress,\n secp256r1VerifyArgs: verifyArgs,\n domainConfig,\n executor: executor instanceof SignedSecp256r1Key ? undefined : executor,\n settingsReadonlyArgs: compressedArgs.settingsReadonlyArgs,\n payer: compressedArgs.payer,\n compressedProofArgs: compressedArgs.compressedProofArgs,\n remainingAccounts: compressedArgs.remainingAccounts,\n })\n );\n } else {\n instructions.push(\n getTransactionBufferExecuteInstruction({\n settings,\n transactionBuffer: transactionBufferAddress,\n secp256r1VerifyArgs: verifyArgs,\n domainConfig,\n executor: executor instanceof SignedSecp256r1Key ? undefined : executor,\n remainingAccounts: [],\n })\n );\n }\n\n return instructions;\n}\n","import type { Address } from \"gill\";\nimport {\n getTransactionBufferExtendCompressedInstruction,\n getTransactionBufferExtendInstruction,\n} from \"../../generated\";\n\nexport function extendTransactionBuffer({\n transactionMessageBytes,\n transactionBufferAddress,\n settings,\n compressed = false,\n}: {\n transactionMessageBytes: Uint8Array;\n transactionBufferAddress: Address;\n settings: Address;\n compressed?: boolean;\n}) {\n if (compressed) {\n return getTransactionBufferExtendCompressedInstruction({\n transactionBuffer: transactionBufferAddress,\n buffer: transactionMessageBytes,\n settingsKey: settings,\n remainingAccounts: [],\n });\n } else {\n return getTransactionBufferExtendInstruction({\n transactionBuffer: transactionBufferAddress,\n buffer: transactionMessageBytes,\n settings,\n remainingAccounts: [],\n });\n }\n}\n","import type {\n AccountMeta,\n Address,\n Instruction,\n TransactionSigner,\n} from \"gill\";\nimport {\n getTransactionBufferVoteCompressedInstruction,\n getTransactionBufferVoteInstruction,\n type ProofArgsArgs,\n type SettingsReadonlyArgs,\n} from \"../../generated\";\nimport { SignedSecp256r1Key } from \"../../types\";\nimport { extractSecp256r1VerificationArgs } from \"../../utils/transaction/internal\";\nimport { getSecp256r1VerifyInstruction } from \"../secp256r1Verify\";\n\nexport function voteTransactionBuffer({\n settings,\n voter,\n transactionBufferAddress,\n compressedArgs,\n}: {\n settings: Address;\n voter: TransactionSigner | SignedSecp256r1Key;\n transactionBufferAddress: Address;\n compressedArgs: {\n settingsReadonlyArgs: SettingsReadonlyArgs;\n compressedProofArgs: ProofArgsArgs;\n remainingAccounts: AccountMeta[];\n payer: TransactionSigner;\n } | null;\n}) {\n const { domainConfig, verifyArgs, signature, publicKey, message } =\n extractSecp256r1VerificationArgs(voter);\n const instructions: Instruction[] = [];\n if (message && signature && publicKey) {\n instructions.push(\n getSecp256r1VerifyInstruction([\n {\n message,\n signature,\n publicKey,\n },\n ])\n );\n }\n\n if (compressedArgs) {\n instructions.push(\n getTransactionBufferVoteCompressedInstruction({\n transactionBuffer: transactionBufferAddress,\n secp256r1VerifyArgs: verifyArgs,\n domainConfig,\n voter: voter instanceof SignedSecp256r1Key ? undefined : voter,\n settingsReadonlyArgs: compressedArgs.settingsReadonlyArgs,\n payer: compressedArgs.payer,\n compressedProofArgs: compressedArgs.compressedProofArgs,\n remainingAccounts: compressedArgs.remainingAccounts,\n })\n );\n } else {\n instructions.push(\n getTransactionBufferVoteInstruction({\n settings,\n transactionBuffer: transactionBufferAddress,\n secp256r1VerifyArgs: verifyArgs,\n domainConfig,\n voter: voter instanceof SignedSecp256r1Key ? undefined : voter,\n remainingAccounts: [],\n })\n );\n }\n\n return instructions;\n}\n","import {\n Secp256r1Key,\n type BasePayload,\n type MessageAuthenticationResponse,\n type MessagePayload,\n} from \"../types\";\nimport { getAuthEndpoint, getGlobalAdditonalInfo } from \"../utils\";\nimport { openAuthUrl } from \"../utils/passkeys/internal\";\n\nexport async function signMessageWithPasskey({\n message,\n signer,\n popUp,\n}: MessagePayload & BasePayload) {\n const authResponse = (await openAuthUrl({\n authUrl: `${getAuthEndpoint()}/?redirectUrl=${encodeURIComponent(window.origin)}`,\n data: { type: \"message\", payload: message },\n signer,\n popUp,\n additionalInfo: getGlobalAdditonalInfo(),\n })) as any;\n return {\n ...authResponse,\n signer: new Secp256r1Key(authResponse.signer),\n } as MessageAuthenticationResponse;\n}\n","import {\n Secp256r1Key,\n type BasePayload,\n type TransactionAuthenticationResponse,\n type TransactionPayload,\n} from \"../types\";\nimport { getAuthEndpoint, getGlobalAdditonalInfo } from \"../utils\";\nimport {\n bufferToBase64URLString,\n openAuthUrl,\n} from \"../utils/passkeys/internal\";\n\nexport async function signTransactionWithPasskey({\n transactionActionType,\n transactionAddress,\n transactionMessageBytes,\n signer,\n popUp,\n}: TransactionPayload & BasePayload) {\n const authResponse = (await openAuthUrl({\n authUrl: `${getAuthEndpoint()}/?redirectUrl=${encodeURIComponent(window.origin)}`,\n data: {\n type: \"transaction\",\n payload: JSON.stringify({\n transactionActionType,\n transactionAddress,\n transactionMessageBytes: bufferToBase64URLString(\n transactionMessageBytes\n ),\n }),\n },\n additionalInfo: getGlobalAdditonalInfo(),\n signer,\n popUp,\n })) as any;\n return {\n ...authResponse,\n signer: new Secp256r1Key(authResponse.signer),\n } as TransactionAuthenticationResponse;\n}\n","import { verifyAuthenticationResponse } from \"@simplewebauthn/server\";\nimport type { MessageAuthenticationResponse } from \"../types\";\nimport { convertPubkeyCompressedToCose, getAuthEndpoint } from \"../utils\";\nimport { REVIBASE_RP_ID } from \"../utils/consts\";\nimport { bufferToBase64URLString } from \"../utils/passkeys/internal\";\n\nexport async function verifyMessage({\n message,\n response,\n expectedOrigin = getAuthEndpoint(),\n}: {\n message: string;\n response: MessageAuthenticationResponse;\n expectedOrigin?: string;\n}): Promise<boolean> {\n const { verified } = await verifyAuthenticationResponse({\n response: response.authResponse,\n expectedChallenge: bufferToBase64URLString(\n new TextEncoder().encode(message)\n ),\n expectedOrigin,\n expectedRPID: REVIBASE_RP_ID,\n requireUserVerification: false,\n credential: {\n id: response.authResponse.id,\n publicKey: convertPubkeyCompressedToCose(response.signer.toString()),\n counter: 0,\n },\n });\n\n return verified;\n}\n","import { sha256 } from \"@noble/hashes/sha256\";\nimport type {\n AddressesByLookupTableAddress,\n Instruction,\n ReadonlyUint8Array,\n TransactionSigner,\n} from \"gill\";\nimport {\n createTransactionBuffer,\n executeTransaction,\n executeTransactionBuffer,\n extendTransactionBuffer,\n type Secp256r1VerifyInput,\n voteTransactionBuffer,\n} from \"../instructions\";\nimport { SignedSecp256r1Key } from \"../types\";\nimport type { TransactionDetails } from \"../types/transaction\";\nimport { getSettingsFromIndex, getTransactionBufferAddress } from \"../utils\";\nimport {\n constructSettingsProofArgs,\n convertToCompressedProofArgs,\n} from \"../utils/compressed/internal\";\nimport { convertPubkeyToMemberkey } from \"../utils/transaction/internal\";\n\ninterface CreateTransactionBundleArgs {\n payer: TransactionSigner;\n index: bigint | number;\n transactionMessageBytes: ReadonlyUint8Array;\n bufferIndex?: number;\n creator: TransactionSigner | SignedSecp256r1Key;\n additionalVoters?: (TransactionSigner | SignedSecp256r1Key)[];\n executor?: TransactionSigner | SignedSecp256r1Key;\n additionalSigners?: TransactionSigner[];\n secp256r1VerifyInput?: Secp256r1VerifyInput;\n jitoBundlesTipAmount?: number;\n compressed?: boolean;\n chunkSize?: number;\n addressesByLookupTableAddress?: AddressesByLookupTableAddress;\n cachedAccounts?: Map<string, any>;\n}\n\nexport async function prepareTransactionBundle({\n payer,\n index,\n transactionMessageBytes,\n creator,\n executor,\n secp256r1VerifyInput,\n jitoBundlesTipAmount,\n addressesByLookupTableAddress,\n compressed = false,\n bufferIndex = Math.floor(Math.random() * 255),\n additionalVoters = [],\n additionalSigners = [],\n chunkSize = Math.ceil(transactionMessageBytes.length / 2),\n cachedAccounts,\n}: CreateTransactionBundleArgs): Promise<TransactionDetails[]> {\n // --- Stage 1: Setup Addresses ---\n const settings = await getSettingsFromIndex(index);\n const transactionBufferAddress = await getTransactionBufferAddress(\n settings,\n creator instanceof SignedSecp256r1Key ? creator : creator.address,\n bufferIndex\n );\n\n // --- Stage 2: Split Transaction Message into chunks + hashing ---\n const chunks: Uint8Array[] = [];\n const chunksHash: Uint8Array[] = [];\n for (let i = 0; i < transactionMessageBytes.length; i += chunkSize) {\n const chunk = transactionMessageBytes.subarray(i, i + chunkSize);\n chunks.push(chunk);\n chunksHash.push(sha256(chunk));\n }\n const finalBufferHash = sha256(new Uint8Array(transactionMessageBytes));\n\n // --- Stage 3: Derive readonly compressed proof args if necessary---\n const { settingsReadonlyArgs, proof, packedAccounts } =\n await constructSettingsProofArgs(compressed, index, false, cachedAccounts);\n const { remainingAccounts, systemOffset } = packedAccounts.toAccountMetas();\n const compressedArgs = settingsReadonlyArgs\n ? {\n settingsReadonlyArgs,\n compressedProofArgs: convertToCompressedProofArgs(proof, systemOffset),\n remainingAccounts,\n payer,\n }\n : null;\n\n // --- Stage 4: Instruction groups ---\n const expectedSigners = [\n creator,\n ...(executor ? [executor] : []),\n ...additionalVoters,\n ].map(convertPubkeyToMemberkey);\n\n const createIxs = createTransactionBuffer({\n finalBufferHash,\n finalBufferSize: transactionMessageBytes.length,\n bufferIndex,\n payer,\n transactionBufferAddress,\n settings,\n creator,\n preauthorizeExecution: !executor,\n bufferExtendHashes: chunksHash,\n compressedArgs,\n expectedSigners,\n });\n\n const extendIxs = chunks.map((bytes) =>\n extendTransactionBuffer({\n transactionMessageBytes: bytes,\n transactionBufferAddress,\n settings,\n compressed,\n })\n );\n\n const voteIxs = additionalVoters.map((voter) =>\n voteTransactionBuffer({\n voter,\n transactionBufferAddress,\n settings,\n compressedArgs,\n })\n );\n\n const executeApprovalIxs = executeTransactionBuffer({\n compressedArgs,\n settings,\n executor,\n transactionBufferAddress,\n });\n\n const { instructions: executeIxs, addressLookupTableAccounts } =\n await executeTransaction({\n compressed,\n settings,\n transactionMessageBytes,\n transactionBufferAddress,\n payer,\n additionalSigners,\n secp256r1VerifyInput,\n jitoBundlesTipAmount,\n addressesByLookupTableAddress,\n });\n\n // --- Stage 5: Assemble transactions ---\n const buildTx = (instructions: Instruction[]): TransactionDetails => ({\n payer,\n instructions,\n addressesByLookupTableAddress: addressLookupTableAccounts,\n });\n\n const txs = [\n buildTx(createIxs),\n ...extendIxs.map((ix) => buildTx([ix])),\n ...(voteIxs.length ? [buildTx(voteIxs.flat())] : []),\n buildTx(executeApprovalIxs),\n buildTx(executeIxs),\n ];\n\n return txs;\n}\n","import { AccountRole, type Address, type Instruction } from \"gill\";\n\nexport type CompiledKeyMeta = {\n isSigner: boolean;\n isWritable: boolean;\n isInvoked: boolean;\n};\n\ntype KeyMetaMap = Map<Address, CompiledKeyMeta>;\n\n/**\n * This is almost completely copy-pasted from solana-web3.js and slightly adapted to work with \"wrapped\" transaction messaged such as in VaultTransaction.\n * @see https://github.com/solana-labs/solana-web3.js/blob/87d33ac68e2453b8a01cf8c425aa7623888434e8/packages/library-legacy/src/message/compiled-keys.ts\n */\nexport class CompiledKeys {\n payer: Address;\n keyMetaMap: KeyMetaMap;\n\n constructor(payer: Address, keyMetaMap: KeyMetaMap) {\n this.payer = payer;\n this.keyMetaMap = keyMetaMap;\n }\n\n /**\n * The only difference between this and the original is that we don't mark the instruction programIds as invoked.\n * It makes sense to do because the instructions will be called via CPI, so the programIds can come from Address Lookup Tables.\n * This allows to compress the message size and avoid hitting the tx size limit during vault_transaction_create instruction calls.\n */\n static compile(\n instructions: Array<Instruction>,\n payer: Address\n ): CompiledKeys {\n const keyMetaMap: KeyMetaMap = new Map();\n const getOrInsertDefault = (address: Address): CompiledKeyMeta => {\n let keyMeta = keyMetaMap.get(address);\n if (keyMeta === undefined) {\n keyMeta = {\n isSigner: false,\n isWritable: false,\n isInvoked: false,\n };\n keyMetaMap.set(address, keyMeta);\n }\n return keyMeta;\n };\n\n const payerKeyMeta = getOrInsertDefault(payer);\n payerKeyMeta.isSigner = true;\n payerKeyMeta.isWritable = true;\n\n for (const ix of instructions) {\n // This is the only difference from the original.\n // getOrInsertDefault(ix.programId).isInvoked = true;\n getOrInsertDefault(ix.programAddress).isInvoked = false;\n for (const accountMeta of ix.accounts ?? []) {\n const keyMeta = getOrInsertDefault(accountMeta.address);\n keyMeta.isSigner ||=\n accountMeta.role === AccountRole.READONLY_SIGNER ||\n accountMeta.role === AccountRole.WRITABLE_SIGNER;\n keyMeta.isWritable ||=\n accountMeta.role === AccountRole.WRITABLE ||\n accountMeta.role === AccountRole.WRITABLE_SIGNER;\n }\n }\n\n return new CompiledKeys(payer, keyMetaMap);\n }\n\n getMessageComponents(): [\n {\n numReadonlyNonSignerAccounts: number;\n numReadonlySignerAccounts: number;\n numSignerAccounts: number;\n },\n Array<Address>,\n ] {\n const mapEntries = [...this.keyMetaMap.entries()];\n if (mapEntries.length > 256) {\n throw new Error(\"Max static account keys length exceeded\");\n }\n\n const writableSigners = mapEntries.filter(\n ([, meta]) => meta.isSigner && meta.isWritable\n );\n const readonlySigners = mapEntries.filter(\n ([, meta]) => meta.isSigner && !meta.isWritable\n );\n const writableNonSigners = mapEntries.filter(\n ([, meta]) => !meta.isSigner && meta.isWritable\n );\n const readonlyNonSigners = mapEntries.filter(\n ([, meta]) => !meta.isSigner && !meta.isWritable\n );\n\n const header = {\n numSignerAccounts: writableSigners.length + readonlySigners.length,\n numReadonlySignerAccounts: readonlySigners.length,\n numReadonlyNonSignerAccounts: readonlyNonSigners.length,\n };\n\n // sanity checks\n {\n if (writableSigners.length === 0) {\n throw new Error(\"Expected at least one writable signer key\");\n }\n\n const [payerAddress] = writableSigners[0];\n\n if (payerAddress !== this.payer) {\n throw new Error(\n \"Expected first writable signer key to be the fee payer\"\n );\n }\n }\n\n const staticAccountKeys = [\n ...writableSigners.map(([key]) => key),\n ...readonlySigners.map(([key]) => key),\n ...writableNonSigners.map(([key]) => key),\n ...readonlyNonSigners.map(([key]) => key),\n ];\n\n return [header, staticAccountKeys];\n }\n\n extractTableLookup(lookupTableAddresses: [string, Address[]]) {\n const [writableIndexes, drainedWritableKeys] =\n this.drainKeysFoundInLookupTable(\n lookupTableAddresses[1],\n (keyMeta) =>\n !keyMeta.isSigner && !keyMeta.isInvoked && keyMeta.isWritable\n );\n const [readonlyIndexes, drainedReadonlyKeys] =\n this.drainKeysFoundInLookupTable(\n lookupTableAddresses[1],\n (keyMeta) =>\n !keyMeta.isSigner && !keyMeta.isInvoked && !keyMeta.isWritable\n );\n\n // Don't extract lookup if no keys were found\n if (writableIndexes.length === 0 && readonlyIndexes.length === 0) {\n return;\n }\n\n return {\n addressTableLookup: {\n lookupTableAddress: lookupTableAddresses[0],\n writableIndexes,\n readonlyIndexes,\n },\n drainedKeys: {\n writable: drainedWritableKeys,\n readonly: drainedReadonlyKeys,\n },\n };\n }\n\n /** @internal */\n private drainKeysFoundInLookupTable(\n lookupTableEntries: Array<Address>,\n keyMetaFilter: (keyMeta: CompiledKeyMeta) => boolean\n ): [Array<number>, Array<Address>] {\n const lookupTableIndexes = new Array();\n const drainedKeys = new Array();\n\n for (const [addressKey, keyMeta] of this.keyMetaMap.entries()) {\n if (keyMetaFilter(keyMeta)) {\n const key = addressKey;\n const lookupTableIndex = lookupTableEntries.findIndex(\n (entry) => entry === key\n );\n if (lookupTableIndex >= 0) {\n if (lookupTableIndex >= 256) {\n throw new Error(\"Max lookup table index exceeded\");\n }\n lookupTableIndexes.push(lookupTableIndex);\n drainedKeys.push(key);\n this.keyMetaMap.delete(addressKey);\n }\n }\n }\n\n return [lookupTableIndexes, drainedKeys];\n }\n}\n","import type { Address, Instruction } from \"gill\";\n\nexport class MessageAccountKeys {\n private staticAccountKeys: Address[];\n private accountKeysFromLookups: {\n writable: Address[];\n readonly: Address[];\n };\n constructor(\n staticAccountKeys: Address[],\n accountKeysFromLookups: {\n writable: Address[];\n readonly: Address[];\n }\n ) {\n this.staticAccountKeys = staticAccountKeys;\n this.accountKeysFromLookups = accountKeysFromLookups;\n }\n keySegments() {\n const keySegments = [this.staticAccountKeys];\n if (this.accountKeysFromLookups) {\n keySegments.push(this.accountKeysFromLookups.writable);\n keySegments.push(this.accountKeysFromLookups.readonly);\n }\n return keySegments;\n }\n get(index: number) {\n for (const keySegment of this.keySegments()) {\n if (index < keySegment.length) {\n return keySegment[index];\n } else {\n index -= keySegment.length;\n }\n }\n return;\n }\n get length() {\n return this.keySegments().flat().length;\n }\n compileInstructions(instructions: Instruction[]) {\n // Bail early if any account indexes would overflow a u8\n const U8_MAX = 255;\n if (this.length > U8_MAX + 1) {\n throw new Error(\"Account index overflow encountered during compilation\");\n }\n const keyIndexMap = new Map<Address, number>();\n this.keySegments()\n .flat()\n .forEach((key, index) => {\n keyIndexMap.set(key, index);\n });\n const findKeyIndex = (key: Address) => {\n const keyIndex = keyIndexMap.get(key);\n if (keyIndex === undefined)\n throw new Error(\n \"Encountered an unknown instruction account key during compilation\"\n );\n return keyIndex;\n };\n return instructions.map((instruction) => {\n return {\n programAddressIndex: findKeyIndex(instruction.programAddress),\n accountIndices:\n instruction.accounts?.map((meta) => findKeyIndex(meta.address)) ?? [],\n data: instruction.data,\n };\n });\n }\n}\n","import {\n address,\n type Address,\n type AddressesByLookupTableAddress,\n type CompiledTransactionMessage,\n type Instruction,\n} from \"gill\";\nimport { CompiledKeys } from \"./compiled-keys\";\nimport { MessageAccountKeys } from \"./message-account-keys\";\n\nexport function compileToWrappedMessageV0({\n payer,\n recentBlockhash,\n instructions,\n addressesByLookupTableAddress,\n}: {\n payer: Address;\n recentBlockhash: string;\n instructions: Instruction[];\n addressesByLookupTableAddress?: AddressesByLookupTableAddress;\n}) {\n const compiledKeys = CompiledKeys.compile(instructions, payer);\n\n const addressTableLookups: {\n /** The address of the address lookup table account. */\n lookupTableAddress: Address;\n /** @deprecated Use `readonlyIndexes` */\n readableIndices: readonly number[];\n /** Indexes of accounts in a lookup table to load as read-only. */\n readonlyIndexes: readonly number[];\n /** Indexes of accounts in a lookup table to load as writable. */\n writableIndexes: readonly number[];\n /** @deprecated Use `writableIndexes` */\n writableIndices: readonly number[];\n }[] = new Array();\n const accountKeysFromLookups: { writable: Address[]; readonly: Address[] } = {\n writable: [],\n readonly: [],\n };\n const lookupTableAccounts = Object.entries(\n addressesByLookupTableAddress ?? {}\n );\n\n for (const lookupTable of lookupTableAccounts) {\n const extractResult = compiledKeys.extractTableLookup(lookupTable);\n if (extractResult !== undefined) {\n const { addressTableLookup, drainedKeys } = extractResult;\n addressTableLookups.push({\n readonlyIndexes: addressTableLookup.readonlyIndexes,\n readableIndices: addressTableLookup.readonlyIndexes,\n writableIndexes: addressTableLookup.writableIndexes,\n writableIndices: addressTableLookup.writableIndexes,\n lookupTableAddress: address(addressTableLookup.lookupTableAddress),\n });\n accountKeysFromLookups.writable.push(...drainedKeys.writable);\n accountKeysFromLookups.readonly.push(...drainedKeys.readonly);\n }\n }\n\n const [header, staticAccounts] = compiledKeys.getMessageComponents();\n\n const accountKeys = new MessageAccountKeys(\n staticAccounts,\n accountKeysFromLookups\n );\n\n const compiledInstructions = accountKeys.compileInstructions(instructions);\n return {\n version: 0,\n header,\n instructions: compiledInstructions,\n lifetimeToken: recentBlockhash,\n staticAccounts,\n addressTableLookups,\n } as CompiledTransactionMessage;\n}\n","import {\n type Address,\n type AddressesByLookupTableAddress,\n type Instruction,\n} from \"gill\";\nimport { MULTI_WALLET_PROGRAM_ADDRESS } from \"../generated\";\nimport { vaultTransactionMessageSerialize } from \"../types\";\nimport { compileToWrappedMessageV0 } from \"../utils/transactionMessage/compileToWrappedMessageV0\";\ninterface PrepareTransactionMessageArgs {\n instructions: Instruction[];\n payer: Address;\n addressesByLookupTableAddress?: AddressesByLookupTableAddress;\n}\nexport function prepareTransactionMessage({\n instructions,\n payer,\n addressesByLookupTableAddress,\n}: PrepareTransactionMessageArgs) {\n const compiledMessage = compileToWrappedMessageV0({\n instructions,\n payer,\n recentBlockhash: MULTI_WALLET_PROGRAM_ADDRESS,\n addressesByLookupTableAddress,\n });\n\n return vaultTransactionMessageSerialize(compiledMessage);\n}\n","import type {\n AddressesByLookupTableAddress,\n ReadonlyUint8Array,\n TransactionSigner,\n} from \"gill\";\nimport {\n executeTransactionSync,\n type Secp256r1VerifyInput,\n} from \"../instructions\";\nimport { SignedSecp256r1Key, type TransactionDetails } from \"../types\";\n\ninterface CreateTransactionSyncArgs {\n payer: TransactionSigner;\n index: number | bigint;\n transactionMessageBytes: ReadonlyUint8Array;\n signers: (TransactionSigner | SignedSecp256r1Key)[];\n addressesByLookupTableAddress?: AddressesByLookupTableAddress;\n secp256r1VerifyInput?: Secp256r1VerifyInput;\n compressed?: boolean;\n simulateProof?: boolean;\n cachedAccounts?: Map<string, any>;\n}\n\nexport async function prepareTransactionSync({\n payer,\n index,\n transactionMessageBytes,\n signers,\n secp256r1VerifyInput,\n addressesByLookupTableAddress,\n cachedAccounts,\n compressed = false,\n simulateProof = false,\n}: CreateTransactionSyncArgs): Promise<TransactionDetails> {\n const { instructions, addressLookupTableAccounts } =\n await executeTransactionSync({\n index,\n payer,\n signers,\n transactionMessageBytes,\n secp256r1VerifyInput,\n compressed,\n addressesByLookupTableAddress,\n simulateProof,\n cachedAccounts,\n });\n\n return {\n payer,\n instructions,\n addressesByLookupTableAddress: addressLookupTableAccounts,\n };\n}\n"]}
|