import { ValidateArgs, ValidateArgsArgs } from "../types/validateArgs.js"; import "../types/index.js"; import { MPL_TOKEN_AUTH_RULES_PROGRAM_ADDRESS } from "../programs/mplTokenAuthRules.js"; import "../programs/index.js"; import { AccountMeta, AccountSignerMeta, Address, Codec, Decoder, Encoder, Instruction, InstructionWithAccounts, InstructionWithData, ReadonlyAccount, ReadonlySignerAccount, ReadonlyUint8Array, TransactionSigner, WritableAccount, WritableSignerAccount } from "@solana/kit"; //#region src/generated/instructions/validate.d.ts export declare const VALIDATE_DISCRIMINATOR = 1; export declare function getValidateDiscriminatorBytes(): ReadonlyUint8Array; export type ValidateInstruction = string, TAccountMint extends string | AccountMeta = string, TAccountSystemProgram extends string | AccountMeta = "11111111111111111111111111111111", TAccountPayer extends string | AccountMeta = string, TAccountRuleAuthority extends string | AccountMeta = string, TAccountRuleSetStatePda extends string | AccountMeta = string, TRemainingAccounts extends readonly AccountMeta[] = []> = Instruction & InstructionWithData & InstructionWithAccounts<[TAccountRuleSetPda extends string ? ReadonlyAccount : TAccountRuleSetPda, TAccountMint extends string ? ReadonlyAccount : TAccountMint, TAccountSystemProgram extends string ? ReadonlyAccount : TAccountSystemProgram, TAccountPayer extends string ? WritableSignerAccount & AccountSignerMeta : TAccountPayer, TAccountRuleAuthority extends string ? ReadonlySignerAccount & AccountSignerMeta : TAccountRuleAuthority, TAccountRuleSetStatePda extends string ? WritableAccount : TAccountRuleSetStatePda, ...TRemainingAccounts]>; export type ValidateInstructionData = { discriminator: number; /** The operation to validate together with its rule payload. */ validateArgs: ValidateArgs; }; export type ValidateInstructionDataArgs = { /** The operation to validate together with its rule payload. */ validateArgs: ValidateArgsArgs; }; export declare function getValidateInstructionDataEncoder(): Encoder; export declare function getValidateInstructionDataDecoder(): Decoder; export declare function getValidateInstructionDataCodec(): Codec; export type ValidateInput = { /** The PDA account where the RuleSet is stored */ ruleSetPda: Address; /** Mint of token asset */ mint: Address; /** System program */ systemProgram?: Address; /** Payer for RuleSet state PDA account */ payer?: TransactionSigner; /** Signing authority for any Rule state updates */ ruleAuthority?: TransactionSigner; /** The PDA account where any RuleSet state is stored */ ruleSetStatePda?: Address; validateArgs: ValidateInstructionDataArgs["validateArgs"]; }; /** * Validates an operation against a stored RuleSet. * * Normally invoked via CPI by another program (e.g. Token Metadata) * to decide whether a token operation is permitted. Returns an error * if any rule for the operation fails. When `updateRuleState` is set, * stateful rules such as Frequency are advanced and persisted to the * rule-set state PDA. */ export declare function getValidateInstruction(input: ValidateInput, config?: { programAddress?: TProgramAddress; }): ValidateInstruction; export type ParsedValidateInstruction = { programAddress: Address; accounts: { /** The PDA account where the RuleSet is stored */ ruleSetPda: TAccountMetas[0]; /** Mint of token asset */ mint: TAccountMetas[1]; /** System program */ systemProgram: TAccountMetas[2]; /** Payer for RuleSet state PDA account */ payer?: TAccountMetas[3] | undefined; /** Signing authority for any Rule state updates */ ruleAuthority?: TAccountMetas[4] | undefined; /** The PDA account where any RuleSet state is stored */ ruleSetStatePda?: TAccountMetas[5] | undefined; }; data: ValidateInstructionData; }; export declare function parseValidateInstruction(instruction: Instruction & InstructionWithAccounts & InstructionWithData): ParsedValidateInstruction; //#endregion //# sourceMappingURL=validate.d.ts.map