/** * 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_WITHDRAW_DISCRIMINATOR = 27; export declare function getConfidentialWithdrawDiscriminatorBytes(): ReadonlyUint8Array; export declare const CONFIDENTIAL_WITHDRAW_CONFIDENTIAL_TRANSFER_DISCRIMINATOR = 6; export declare function getConfidentialWithdrawConfidentialTransferDiscriminatorBytes(): ReadonlyUint8Array; export type ConfidentialWithdrawInstruction = string, TAccountMint extends string | AccountMeta = string, TAccountInstructionsSysvar extends string | AccountMeta = string, TAccountEqualityRecord extends string | AccountMeta = string, TAccountRangeRecord extends string | AccountMeta = string, TAccountAuthority extends string | AccountMeta = string, TRemainingAccounts extends readonly AccountMeta[] = []> = Instruction & InstructionWithData & InstructionWithAccounts<[ TAccountToken extends string ? WritableAccount : TAccountToken, TAccountMint extends string ? ReadonlyAccount : TAccountMint, TAccountInstructionsSysvar extends string ? ReadonlyAccount : TAccountInstructionsSysvar, TAccountEqualityRecord extends string ? ReadonlyAccount : TAccountEqualityRecord, TAccountRangeRecord extends string ? ReadonlyAccount : TAccountRangeRecord, TAccountAuthority extends string ? ReadonlyAccount : TAccountAuthority, ...TRemainingAccounts ]>; export type ConfidentialWithdrawInstructionData = { discriminator: number; confidentialTransferDiscriminator: number; /** The amount of tokens to withdraw. */ amount: bigint; /** Expected number of base 10 digits to the right of the decimal place. */ decimals: number; /** The new decryptable balance if the withdrawal succeeds. */ newDecryptableAvailableBalance: DecryptableBalance; /** * Relative location of the * `ProofInstruction::VerifyCiphertextCommitmentEquality` instruction * to the `Withdraw` 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::BatchedRangeProofU64` * instruction to the `Withdraw` instruction in the transaction. If the * offset is `0`, then use a context state account for the proof. */ rangeProofInstructionOffset: number; }; export type ConfidentialWithdrawInstructionDataArgs = { /** The amount of tokens to withdraw. */ amount: number | bigint; /** Expected number of base 10 digits to the right of the decimal place. */ decimals: number; /** The new decryptable balance if the withdrawal succeeds. */ newDecryptableAvailableBalance: DecryptableBalanceArgs; /** * Relative location of the * `ProofInstruction::VerifyCiphertextCommitmentEquality` instruction * to the `Withdraw` 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::BatchedRangeProofU64` * instruction to the `Withdraw` instruction in the transaction. If the * offset is `0`, then use a context state account for the proof. */ rangeProofInstructionOffset: number; }; export declare function getConfidentialWithdrawInstructionDataEncoder(): FixedSizeEncoder; export declare function getConfidentialWithdrawInstructionDataDecoder(): FixedSizeDecoder; export declare function getConfidentialWithdrawInstructionDataCodec(): FixedSizeCodec; export type ConfidentialWithdrawInput = { /** The SPL Token account. */ token: Address; /** The corresponding SPL Token mint. */ mint: Address; /** * 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) Range proof record account or context state account. */ rangeRecord?: Address; /** The source account's owner/delegate or its multisignature account. */ authority: Address | TransactionSigner; amount: ConfidentialWithdrawInstructionDataArgs['amount']; decimals: ConfidentialWithdrawInstructionDataArgs['decimals']; newDecryptableAvailableBalance: ConfidentialWithdrawInstructionDataArgs['newDecryptableAvailableBalance']; equalityProofInstructionOffset: ConfidentialWithdrawInstructionDataArgs['equalityProofInstructionOffset']; rangeProofInstructionOffset: ConfidentialWithdrawInstructionDataArgs['rangeProofInstructionOffset']; multiSigners?: Array; }; export declare function getConfidentialWithdrawInstruction(input: ConfidentialWithdrawInput, config?: { programAddress?: TProgramAddress; }): ConfidentialWithdrawInstruction ? ReadonlySignerAccount & AccountSignerMeta : TAccountAuthority>; export type ParsedConfidentialWithdrawInstruction = { programAddress: Address; accounts: { /** The SPL Token account. */ token: TAccountMetas[0]; /** The corresponding SPL Token mint. */ mint: TAccountMetas[1]; /** * Instructions sysvar if at least one of the * `zk_elgamal_proof` instructions are included in the same * transaction. */ instructionsSysvar?: TAccountMetas[2] | undefined; /** (Optional) Equality proof record account or context state account. */ equalityRecord?: TAccountMetas[3] | undefined; /** (Optional) Range proof record account or context state account. */ rangeRecord?: TAccountMetas[4] | undefined; /** The source account's owner/delegate or its multisignature account. */ authority: TAccountMetas[5]; }; data: ConfidentialWithdrawInstructionData; }; export declare function parseConfidentialWithdrawInstruction(instruction: Instruction & InstructionWithAccounts & InstructionWithData): ParsedConfidentialWithdrawInstruction; //# sourceMappingURL=confidentialWithdraw.d.ts.map