UNPKG

@solana-program/token-2022

Version:

JavaScript client for the Token 2022 program

52 lines 4.45 kB
/** * 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 Address, type Codec, type Decoder, type Encoder, type IAccountMeta, type IAccountSignerMeta, type IInstruction, type IInstructionWithAccounts, type IInstructionWithData, type ReadonlyAccount, type ReadonlySignerAccount, type TransactionSigner, type WritableAccount } from '@solana/kit'; import { TOKEN_2022_PROGRAM_ADDRESS } from '../programs'; export declare const APPROVE_CONFIDENTIAL_TRANSFER_ACCOUNT_DISCRIMINATOR = 27; export declare function getApproveConfidentialTransferAccountDiscriminatorBytes(): import("@solana/kit").ReadonlyUint8Array; export declare const APPROVE_CONFIDENTIAL_TRANSFER_ACCOUNT_CONFIDENTIAL_TRANSFER_DISCRIMINATOR = 3; export declare function getApproveConfidentialTransferAccountConfidentialTransferDiscriminatorBytes(): import("@solana/kit").ReadonlyUint8Array; export type ApproveConfidentialTransferAccountInstruction<TProgram extends string = typeof TOKEN_2022_PROGRAM_ADDRESS, TAccountToken extends string | IAccountMeta<string> = string, TAccountMint extends string | IAccountMeta<string> = string, TAccountAuthority extends string | IAccountMeta<string> = string, TRemainingAccounts extends readonly IAccountMeta<string>[] = []> = IInstruction<TProgram> & IInstructionWithData<Uint8Array> & IInstructionWithAccounts<[ TAccountToken extends string ? WritableAccount<TAccountToken> : TAccountToken, TAccountMint extends string ? ReadonlyAccount<TAccountMint> : TAccountMint, TAccountAuthority extends string ? ReadonlySignerAccount<TAccountAuthority> & IAccountSignerMeta<TAccountAuthority> : TAccountAuthority, ...TRemainingAccounts ]>; export type ApproveConfidentialTransferAccountInstructionData = { discriminator: number; confidentialTransferDiscriminator: number; }; export type ApproveConfidentialTransferAccountInstructionDataArgs = {}; export declare function getApproveConfidentialTransferAccountInstructionDataEncoder(): Encoder<ApproveConfidentialTransferAccountInstructionDataArgs>; export declare function getApproveConfidentialTransferAccountInstructionDataDecoder(): Decoder<ApproveConfidentialTransferAccountInstructionData>; export declare function getApproveConfidentialTransferAccountInstructionDataCodec(): Codec<ApproveConfidentialTransferAccountInstructionDataArgs, ApproveConfidentialTransferAccountInstructionData>; export type ApproveConfidentialTransferAccountInput<TAccountToken extends string = string, TAccountMint extends string = string, TAccountAuthority extends string = string> = { /** The SPL Token account to approve. */ token: Address<TAccountToken>; /** The corresponding SPL Token mint. */ mint: Address<TAccountMint>; /** Confidential transfer mint authority. */ authority: TransactionSigner<TAccountAuthority>; }; export declare function getApproveConfidentialTransferAccountInstruction<TAccountToken extends string, TAccountMint extends string, TAccountAuthority extends string, TProgramAddress extends Address = typeof TOKEN_2022_PROGRAM_ADDRESS>(input: ApproveConfidentialTransferAccountInput<TAccountToken, TAccountMint, TAccountAuthority>, config?: { programAddress?: TProgramAddress; }): ApproveConfidentialTransferAccountInstruction<TProgramAddress, TAccountToken, TAccountMint, TAccountAuthority>; export type ParsedApproveConfidentialTransferAccountInstruction<TProgram extends string = typeof TOKEN_2022_PROGRAM_ADDRESS, TAccountMetas extends readonly IAccountMeta[] = readonly IAccountMeta[]> = { programAddress: Address<TProgram>; accounts: { /** The SPL Token account to approve. */ token: TAccountMetas[0]; /** The corresponding SPL Token mint. */ mint: TAccountMetas[1]; /** Confidential transfer mint authority. */ authority: TAccountMetas[2]; }; data: ApproveConfidentialTransferAccountInstructionData; }; export declare function parseApproveConfidentialTransferAccountInstruction<TProgram extends string, TAccountMetas extends readonly IAccountMeta[]>(instruction: IInstruction<TProgram> & IInstructionWithAccounts<TAccountMetas> & IInstructionWithData<Uint8Array>): ParsedApproveConfidentialTransferAccountInstruction<TProgram, TAccountMetas>; //# sourceMappingURL=approveConfidentialTransferAccount.d.ts.map