/** * 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_DISCRIMINATOR = 27; export declare function getConfidentialTransferDiscriminatorBytes(): ReadonlyUint8Array; export declare const CONFIDENTIAL_TRANSFER_CONFIDENTIAL_TRANSFER_DISCRIMINATOR = 7; export declare function getConfidentialTransferConfidentialTransferDiscriminatorBytes(): ReadonlyUint8Array; export type ConfidentialTransferInstruction = string, TAccountMint extends string | AccountMeta = string, TAccountDestinationToken extends string | AccountMeta = string, TAccountInstructionsSysvar extends string | AccountMeta = string, TAccountEqualityRecord extends string | AccountMeta = string, TAccountCiphertextValidityRecord 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, TAccountCiphertextValidityRecord extends string ? ReadonlyAccount : TAccountCiphertextValidityRecord, TAccountRangeRecord extends string ? ReadonlyAccount : TAccountRangeRecord, TAccountAuthority extends string ? ReadonlyAccount : TAccountAuthority, ...TRemainingAccounts ]>; export type ConfidentialTransferInstructionData = { discriminator: number; confidentialTransferDiscriminator: number; /** The new source decryptable balance if the transfer succeeds. */ newSourceDecryptableAvailableBalance: DecryptableBalance; /** * Relative location of the * `ProofInstruction::VerifyCiphertextCommitmentEquality` instruction * to the `Transfer` 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 `Transfer` instruction in the transaction. If the * offset is `0`, then use a context state account for the proof. */ ciphertextValidityProofInstructionOffset: number; /** * Relative location of the `ProofInstruction::BatchedRangeProofU128Data` * instruction to the `Transfer` instruction in the transaction. If the * offset is `0`, then use a context state account for the proof. */ rangeProofInstructionOffset: number; }; export type ConfidentialTransferInstructionDataArgs = { /** The new source decryptable balance if the transfer succeeds. */ newSourceDecryptableAvailableBalance: DecryptableBalanceArgs; /** * Relative location of the * `ProofInstruction::VerifyCiphertextCommitmentEquality` instruction * to the `Transfer` 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 `Transfer` instruction in the transaction. If the * offset is `0`, then use a context state account for the proof. */ ciphertextValidityProofInstructionOffset: number; /** * Relative location of the `ProofInstruction::BatchedRangeProofU128Data` * instruction to the `Transfer` instruction in the transaction. If the * offset is `0`, then use a context state account for the proof. */ rangeProofInstructionOffset: number; }; export declare function getConfidentialTransferInstructionDataEncoder(): FixedSizeEncoder; export declare function getConfidentialTransferInstructionDataDecoder(): FixedSizeDecoder; export declare function getConfidentialTransferInstructionDataCodec(): FixedSizeCodec; export type ConfidentialTransferInput = { /** 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) Ciphertext validity proof record account or context state account. */ ciphertextValidityRecord?: 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: ConfidentialTransferInstructionDataArgs['newSourceDecryptableAvailableBalance']; equalityProofInstructionOffset: ConfidentialTransferInstructionDataArgs['equalityProofInstructionOffset']; ciphertextValidityProofInstructionOffset: ConfidentialTransferInstructionDataArgs['ciphertextValidityProofInstructionOffset']; rangeProofInstructionOffset: ConfidentialTransferInstructionDataArgs['rangeProofInstructionOffset']; multiSigners?: Array; }; export declare function getConfidentialTransferInstruction(input: ConfidentialTransferInput, config?: { programAddress?: TProgramAddress; }): ConfidentialTransferInstruction ? ReadonlySignerAccount & AccountSignerMeta : TAccountAuthority>; export type ParsedConfidentialTransferInstruction = { 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) Ciphertext validity proof record account or context state account. */ ciphertextValidityRecord?: TAccountMetas[5] | undefined; /** (Optional) Range proof record account or context state account. */ rangeRecord?: TAccountMetas[6] | undefined; /** The source account's owner/delegate or its multisignature account. */ authority: TAccountMetas[7]; }; data: ConfidentialTransferInstructionData; }; export declare function parseConfidentialTransferInstruction(instruction: Instruction & InstructionWithAccounts & InstructionWithData): ParsedConfidentialTransferInstruction; //# sourceMappingURL=confidentialTransfer.d.ts.map