/** * This code was AUTOGENERATED using the Codama library. * Please DO NOT EDIT THIS FILE, instead use visitors * to add features, then rerun Codama to update it. * * @see https://github.com/codama-idl/codama */ import { type AccountMeta, type AccountSignerMeta, type Address, type FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder, type Instruction, type InstructionWithAccounts, type InstructionWithData, type ReadonlyAccount, type ReadonlySignerAccount, type ReadonlyUint8Array, type TransactionSigner, type WritableAccount } from '@solana/kit'; import { TOKEN_2022_PROGRAM_ADDRESS } from '../programs'; import { type DecryptableBalance, type DecryptableBalanceArgs } from '../types'; export declare const CONFIDENTIAL_TRANSFER_WITH_FEE_DISCRIMINATOR = 27; export declare function getConfidentialTransferWithFeeDiscriminatorBytes(): ReadonlyUint8Array; export declare const CONFIDENTIAL_TRANSFER_WITH_FEE_CONFIDENTIAL_TRANSFER_DISCRIMINATOR = 13; export declare function getConfidentialTransferWithFeeConfidentialTransferDiscriminatorBytes(): ReadonlyUint8Array; export type ConfidentialTransferWithFeeInstruction = string, TAccountMint extends string | AccountMeta = string, TAccountDestinationToken extends string | AccountMeta = string, TAccountInstructionsSysvar extends string | AccountMeta = string, TAccountEqualityRecord extends string | AccountMeta = string, TAccountTransferAmountCiphertextValidityRecord extends string | AccountMeta = string, TAccountFeeSigmaRecord extends string | AccountMeta = string, TAccountFeeCiphertextValidityRecord extends string | AccountMeta = string, TAccountRangeRecord extends string | AccountMeta = string, TAccountAuthority extends string | AccountMeta = string, TRemainingAccounts extends readonly AccountMeta[] = []> = Instruction & InstructionWithData & InstructionWithAccounts<[ TAccountSourceToken extends string ? WritableAccount : TAccountSourceToken, TAccountMint extends string ? ReadonlyAccount : TAccountMint, TAccountDestinationToken extends string ? WritableAccount : TAccountDestinationToken, TAccountInstructionsSysvar extends string ? ReadonlyAccount : TAccountInstructionsSysvar, TAccountEqualityRecord extends string ? ReadonlyAccount : TAccountEqualityRecord, TAccountTransferAmountCiphertextValidityRecord extends string ? ReadonlyAccount : TAccountTransferAmountCiphertextValidityRecord, TAccountFeeSigmaRecord extends string ? ReadonlyAccount : TAccountFeeSigmaRecord, TAccountFeeCiphertextValidityRecord extends string ? ReadonlyAccount : TAccountFeeCiphertextValidityRecord, TAccountRangeRecord extends string ? ReadonlyAccount : TAccountRangeRecord, TAccountAuthority extends string ? ReadonlyAccount : TAccountAuthority, ...TRemainingAccounts ]>; export type ConfidentialTransferWithFeeInstructionData = { discriminator: number; confidentialTransferDiscriminator: number; /** The new source decryptable balance if the transfer succeeds. */ newSourceDecryptableAvailableBalance: DecryptableBalance; /** * Relative location of the * `ProofInstruction::VerifyCiphertextCommitmentEquality` instruction * to the `TransferWithFee` instruction in the transaction. If the offset * is `0`, then use a context state account for the proof. */ equalityProofInstructionOffset: number; /** * Relative location of the * `ProofInstruction::VerifyBatchedGroupedCiphertext3HandlesValidity` * instruction to the `TransferWithFee` instruction in the transaction. * If the offset is `0`, then use a context state account for the * proof. */ transferAmountCiphertextValidityProofInstructionOffset: number; /** * Relative location of the `ProofInstruction::VerifyPercentageWithFee` * instruction to the `TransferWithFee` instruction in the transaction. * If the offset is `0`, then use a context state account for the * proof. */ feeSigmaProofInstructionOffset: number; /** * Relative location of the * `ProofInstruction::VerifyBatchedGroupedCiphertext2HandlesValidity` * instruction to the `TransferWithFee` instruction in the transaction. * If the offset is `0`, then use a context state account for the * proof. */ feeCiphertextValidityProofInstructionOffset: number; /** * Relative location of the `ProofInstruction::BatchedRangeProofU256Data` * instruction to the `TransferWithFee` instruction in the transaction. * If the offset is `0`, then use a context state account for the * proof. */ rangeProofInstructionOffset: number; }; export type ConfidentialTransferWithFeeInstructionDataArgs = { /** The new source decryptable balance if the transfer succeeds. */ newSourceDecryptableAvailableBalance: DecryptableBalanceArgs; /** * Relative location of the * `ProofInstruction::VerifyCiphertextCommitmentEquality` instruction * to the `TransferWithFee` instruction in the transaction. If the offset * is `0`, then use a context state account for the proof. */ equalityProofInstructionOffset: number; /** * Relative location of the * `ProofInstruction::VerifyBatchedGroupedCiphertext3HandlesValidity` * instruction to the `TransferWithFee` instruction in the transaction. * If the offset is `0`, then use a context state account for the * proof. */ transferAmountCiphertextValidityProofInstructionOffset: number; /** * Relative location of the `ProofInstruction::VerifyPercentageWithFee` * instruction to the `TransferWithFee` instruction in the transaction. * If the offset is `0`, then use a context state account for the * proof. */ feeSigmaProofInstructionOffset: number; /** * Relative location of the * `ProofInstruction::VerifyBatchedGroupedCiphertext2HandlesValidity` * instruction to the `TransferWithFee` instruction in the transaction. * If the offset is `0`, then use a context state account for the * proof. */ feeCiphertextValidityProofInstructionOffset: number; /** * Relative location of the `ProofInstruction::BatchedRangeProofU256Data` * instruction to the `TransferWithFee` instruction in the transaction. * If the offset is `0`, then use a context state account for the * proof. */ rangeProofInstructionOffset: number; }; export declare function getConfidentialTransferWithFeeInstructionDataEncoder(): FixedSizeEncoder; export declare function getConfidentialTransferWithFeeInstructionDataDecoder(): FixedSizeDecoder; export declare function getConfidentialTransferWithFeeInstructionDataCodec(): FixedSizeCodec; export type ConfidentialTransferWithFeeInput = { /** The source SPL Token account. */ sourceToken: Address; /** The corresponding SPL Token mint. */ mint: Address; /** The destination SPL Token account. */ destinationToken: Address; /** * (Optional) Instructions sysvar if at least one of the * `zk_elgamal_proof` instructions are included in the same * transaction. */ instructionsSysvar?: Address; /** (Optional) Equality proof record account or context state account. */ equalityRecord?: Address; /** * (Optional) Transfer amount ciphertext validity proof record * account or context state account. */ transferAmountCiphertextValidityRecord?: Address; /** (Optional) Fee sigma proof record account or context state account. */ feeSigmaRecord?: Address; /** (Optional) Fee ciphertext validity proof record account or context state account. */ feeCiphertextValidityRecord?: Address; /** (Optional) Range proof record account or context state account. */ rangeRecord?: Address; /** The source account's owner/delegate or its multisignature account. */ authority: Address | TransactionSigner; newSourceDecryptableAvailableBalance: ConfidentialTransferWithFeeInstructionDataArgs['newSourceDecryptableAvailableBalance']; equalityProofInstructionOffset: ConfidentialTransferWithFeeInstructionDataArgs['equalityProofInstructionOffset']; transferAmountCiphertextValidityProofInstructionOffset: ConfidentialTransferWithFeeInstructionDataArgs['transferAmountCiphertextValidityProofInstructionOffset']; feeSigmaProofInstructionOffset: ConfidentialTransferWithFeeInstructionDataArgs['feeSigmaProofInstructionOffset']; feeCiphertextValidityProofInstructionOffset: ConfidentialTransferWithFeeInstructionDataArgs['feeCiphertextValidityProofInstructionOffset']; rangeProofInstructionOffset: ConfidentialTransferWithFeeInstructionDataArgs['rangeProofInstructionOffset']; multiSigners?: Array; }; export declare function getConfidentialTransferWithFeeInstruction(input: ConfidentialTransferWithFeeInput, config?: { programAddress?: TProgramAddress; }): ConfidentialTransferWithFeeInstruction ? ReadonlySignerAccount & AccountSignerMeta : TAccountAuthority>; export type ParsedConfidentialTransferWithFeeInstruction = { programAddress: Address; accounts: { /** The source SPL Token account. */ sourceToken: TAccountMetas[0]; /** The corresponding SPL Token mint. */ mint: TAccountMetas[1]; /** The destination SPL Token account. */ destinationToken: TAccountMetas[2]; /** * (Optional) Instructions sysvar if at least one of the * `zk_elgamal_proof` instructions are included in the same * transaction. */ instructionsSysvar?: TAccountMetas[3] | undefined; /** (Optional) Equality proof record account or context state account. */ equalityRecord?: TAccountMetas[4] | undefined; /** * (Optional) Transfer amount ciphertext validity proof record * account or context state account. */ transferAmountCiphertextValidityRecord?: TAccountMetas[5] | undefined; /** (Optional) Fee sigma proof record account or context state account. */ feeSigmaRecord?: TAccountMetas[6] | undefined; /** (Optional) Fee ciphertext validity proof record account or context state account. */ feeCiphertextValidityRecord?: TAccountMetas[7] | undefined; /** (Optional) Range proof record account or context state account. */ rangeRecord?: TAccountMetas[8] | undefined; /** The source account's owner/delegate or its multisignature account. */ authority: TAccountMetas[9]; }; data: ConfidentialTransferWithFeeInstructionData; }; export declare function parseConfidentialTransferWithFeeInstruction(instruction: Instruction & InstructionWithAccounts & InstructionWithData): ParsedConfidentialTransferWithFeeInstruction; //# sourceMappingURL=confidentialTransferWithFee.d.ts.map