UNPKG

@solana-program/token-2022

Version:

JavaScript client for the Token 2022 program

82 lines 6.55 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 EMPTY_CONFIDENTIAL_TRANSFER_ACCOUNT_DISCRIMINATOR = 27; export declare function getEmptyConfidentialTransferAccountDiscriminatorBytes(): import("@solana/kit").ReadonlyUint8Array; export declare const EMPTY_CONFIDENTIAL_TRANSFER_ACCOUNT_CONFIDENTIAL_TRANSFER_DISCRIMINATOR = 4; export declare function getEmptyConfidentialTransferAccountConfidentialTransferDiscriminatorBytes(): import("@solana/kit").ReadonlyUint8Array; export type EmptyConfidentialTransferAccountInstruction<TProgram extends string = typeof TOKEN_2022_PROGRAM_ADDRESS, TAccountToken extends string | IAccountMeta<string> = string, TAccountInstructionsSysvarOrContextState extends string | IAccountMeta<string> = 'Sysvar1nstructions1111111111111111111111111', TAccountRecord 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, TAccountInstructionsSysvarOrContextState extends string ? ReadonlyAccount<TAccountInstructionsSysvarOrContextState> : TAccountInstructionsSysvarOrContextState, TAccountRecord extends string ? ReadonlyAccount<TAccountRecord> : TAccountRecord, TAccountAuthority extends string ? ReadonlyAccount<TAccountAuthority> : TAccountAuthority, ...TRemainingAccounts ]>; export type EmptyConfidentialTransferAccountInstructionData = { discriminator: number; confidentialTransferDiscriminator: number; /** * Relative location of the `ProofInstruction::VerifyCloseAccount` * instruction to the `EmptyAccount` instruction in the transaction. If * the offset is `0`, then use a context state account for the proof. */ proofInstructionOffset: number; }; export type EmptyConfidentialTransferAccountInstructionDataArgs = { /** * Relative location of the `ProofInstruction::VerifyCloseAccount` * instruction to the `EmptyAccount` instruction in the transaction. If * the offset is `0`, then use a context state account for the proof. */ proofInstructionOffset: number; }; export declare function getEmptyConfidentialTransferAccountInstructionDataEncoder(): Encoder<EmptyConfidentialTransferAccountInstructionDataArgs>; export declare function getEmptyConfidentialTransferAccountInstructionDataDecoder(): Decoder<EmptyConfidentialTransferAccountInstructionData>; export declare function getEmptyConfidentialTransferAccountInstructionDataCodec(): Codec<EmptyConfidentialTransferAccountInstructionDataArgs, EmptyConfidentialTransferAccountInstructionData>; export type EmptyConfidentialTransferAccountInput<TAccountToken extends string = string, TAccountInstructionsSysvarOrContextState extends string = string, TAccountRecord extends string = string, TAccountAuthority extends string = string> = { /** The SPL Token account. */ token: Address<TAccountToken>; /** * Instructions sysvar if `VerifyZeroCiphertext` is included in * the same transaction or context state account if * `VerifyZeroCiphertext` is pre-verified into a context state * account. */ instructionsSysvarOrContextState?: Address<TAccountInstructionsSysvarOrContextState>; /** (Optional) Record account if the accompanying proof is to be read from a record account. */ record?: Address<TAccountRecord>; /** The source account's owner/delegate or its multisignature account. */ authority: Address<TAccountAuthority> | TransactionSigner<TAccountAuthority>; proofInstructionOffset: EmptyConfidentialTransferAccountInstructionDataArgs['proofInstructionOffset']; multiSigners?: Array<TransactionSigner>; }; export declare function getEmptyConfidentialTransferAccountInstruction<TAccountToken extends string, TAccountInstructionsSysvarOrContextState extends string, TAccountRecord extends string, TAccountAuthority extends string, TProgramAddress extends Address = typeof TOKEN_2022_PROGRAM_ADDRESS>(input: EmptyConfidentialTransferAccountInput<TAccountToken, TAccountInstructionsSysvarOrContextState, TAccountRecord, TAccountAuthority>, config?: { programAddress?: TProgramAddress; }): EmptyConfidentialTransferAccountInstruction<TProgramAddress, TAccountToken, TAccountInstructionsSysvarOrContextState, TAccountRecord, (typeof input)['authority'] extends TransactionSigner<TAccountAuthority> ? ReadonlySignerAccount<TAccountAuthority> & IAccountSignerMeta<TAccountAuthority> : TAccountAuthority>; export type ParsedEmptyConfidentialTransferAccountInstruction<TProgram extends string = typeof TOKEN_2022_PROGRAM_ADDRESS, TAccountMetas extends readonly IAccountMeta[] = readonly IAccountMeta[]> = { programAddress: Address<TProgram>; accounts: { /** The SPL Token account. */ token: TAccountMetas[0]; /** * Instructions sysvar if `VerifyZeroCiphertext` is included in * the same transaction or context state account if * `VerifyZeroCiphertext` is pre-verified into a context state * account. */ instructionsSysvarOrContextState: TAccountMetas[1]; /** (Optional) Record account if the accompanying proof is to be read from a record account. */ record?: TAccountMetas[2] | undefined; /** The source account's owner/delegate or its multisignature account. */ authority: TAccountMetas[3]; }; data: EmptyConfidentialTransferAccountInstructionData; }; export declare function parseEmptyConfidentialTransferAccountInstruction<TProgram extends string, TAccountMetas extends readonly IAccountMeta[]>(instruction: IInstruction<TProgram> & IInstructionWithAccounts<TAccountMetas> & IInstructionWithData<Uint8Array>): ParsedEmptyConfidentialTransferAccountInstruction<TProgram, TAccountMetas>; //# sourceMappingURL=emptyConfidentialTransferAccount.d.ts.map