UNPKG

@orca-so/wavebreak

Version:

The wavebreak JS client for interacting with the wavebreak program.

41 lines (40 loc) 3.54 kB
import { AccountMeta, AccountSignerMeta, Address, Codec, Decoder, Encoder, Instruction, InstructionWithAccounts, InstructionWithData, ReadonlyAccount, ReadonlySignerAccount, ReadonlyUint8Array, TransactionSigner, WritableAccount } from '@solana/kit'; import { WAVEBREAK_PROGRAM_ADDRESS } from '../programs'; import { MintConfigUpdateType, MintConfigUpdateTypeArgs } from '../types'; export declare const MINT_CONFIG_UPDATE_DISCRIMINATOR = 26; export declare function getMintConfigUpdateDiscriminatorBytes(): ReadonlyUint8Array; export type MintConfigUpdateInstruction<TProgram extends string = typeof WAVEBREAK_PROGRAM_ADDRESS, TAccountAuthority extends string | AccountMeta<string> = string, TAccountMintConfig extends string | AccountMeta<string> = string, TAccountAuthorityConfig extends string | AccountMeta<string> = string, TRemainingAccounts extends readonly AccountMeta<string>[] = []> = Instruction<TProgram> & InstructionWithData<ReadonlyUint8Array> & InstructionWithAccounts<[ TAccountAuthority extends string ? ReadonlySignerAccount<TAccountAuthority> & AccountSignerMeta<TAccountAuthority> : TAccountAuthority, TAccountMintConfig extends string ? WritableAccount<TAccountMintConfig> : TAccountMintConfig, TAccountAuthorityConfig extends string ? ReadonlyAccount<TAccountAuthorityConfig> : TAccountAuthorityConfig, ...TRemainingAccounts ]>; export type MintConfigUpdateInstructionData = { discriminator: number; update: MintConfigUpdateType; }; export type MintConfigUpdateInstructionDataArgs = { update: MintConfigUpdateTypeArgs; }; export declare function getMintConfigUpdateInstructionDataEncoder(): Encoder<MintConfigUpdateInstructionDataArgs>; export declare function getMintConfigUpdateInstructionDataDecoder(): Decoder<MintConfigUpdateInstructionData>; export declare function getMintConfigUpdateInstructionDataCodec(): Codec<MintConfigUpdateInstructionDataArgs, MintConfigUpdateInstructionData>; export type MintConfigUpdateInput<TAccountAuthority extends string = string, TAccountMintConfig extends string = string, TAccountAuthorityConfig extends string = string> = { authority: TransactionSigner<TAccountAuthority>; mintConfig: Address<TAccountMintConfig>; authorityConfig: Address<TAccountAuthorityConfig>; update: MintConfigUpdateInstructionDataArgs["update"]; }; export declare function getMintConfigUpdateInstruction<TAccountAuthority extends string, TAccountMintConfig extends string, TAccountAuthorityConfig extends string, TProgramAddress extends Address = typeof WAVEBREAK_PROGRAM_ADDRESS>(input: MintConfigUpdateInput<TAccountAuthority, TAccountMintConfig, TAccountAuthorityConfig>, config?: { programAddress?: TProgramAddress; }): MintConfigUpdateInstruction<TProgramAddress, TAccountAuthority, TAccountMintConfig, TAccountAuthorityConfig>; export type ParsedMintConfigUpdateInstruction<TProgram extends string = typeof WAVEBREAK_PROGRAM_ADDRESS, TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[]> = { programAddress: Address<TProgram>; accounts: { authority: TAccountMetas[0]; mintConfig: TAccountMetas[1]; authorityConfig: TAccountMetas[2]; }; data: MintConfigUpdateInstructionData; }; export declare function parseMintConfigUpdateInstruction<TProgram extends string, TAccountMetas extends readonly AccountMeta[]>(instruction: Instruction<TProgram> & InstructionWithAccounts<TAccountMetas> & InstructionWithData<ReadonlyUint8Array>): ParsedMintConfigUpdateInstruction<TProgram, TAccountMetas>;