UNPKG

@orca-so/wavebreak

Version:

The wavebreak JS client for interacting with the wavebreak program.

41 lines (40 loc) 3.34 kB
import { Address, Codec, Decoder, Encoder, IAccountMeta, IAccountSignerMeta, IInstruction, IInstructionWithAccounts, IInstructionWithData, ReadonlySignerAccount, TransactionSigner, WritableAccount } from '@solana/kit'; import { WAVEBREAK_PROGRAM_ADDRESS } from '../programs'; import { Privilege, PrivilegeArgs } from '../types'; export declare const AUTHORITY_CONFIG_GRANT_DISCRIMINATOR = 17; export declare function getAuthorityConfigGrantDiscriminatorBytes(): import('@solana/kit').ReadonlyUint8Array; export type AuthorityConfigGrantInstruction<TProgram extends string = typeof WAVEBREAK_PROGRAM_ADDRESS, TAccountAuthority extends string | IAccountMeta<string> = string, TAccountAuthorityConfig extends string | IAccountMeta<string> = string, TRemainingAccounts extends readonly IAccountMeta<string>[] = []> = IInstruction<TProgram> & IInstructionWithData<Uint8Array> & IInstructionWithAccounts<[ TAccountAuthority extends string ? ReadonlySignerAccount<TAccountAuthority> & IAccountSignerMeta<TAccountAuthority> : TAccountAuthority, TAccountAuthorityConfig extends string ? WritableAccount<TAccountAuthorityConfig> : TAccountAuthorityConfig, ...TRemainingAccounts ]>; export type AuthorityConfigGrantInstructionData = { discriminator: number; account: Address; privileges: Array<Privilege>; }; export type AuthorityConfigGrantInstructionDataArgs = { account: Address; privileges: Array<PrivilegeArgs>; }; export declare function getAuthorityConfigGrantInstructionDataEncoder(): Encoder<AuthorityConfigGrantInstructionDataArgs>; export declare function getAuthorityConfigGrantInstructionDataDecoder(): Decoder<AuthorityConfigGrantInstructionData>; export declare function getAuthorityConfigGrantInstructionDataCodec(): Codec<AuthorityConfigGrantInstructionDataArgs, AuthorityConfigGrantInstructionData>; export type AuthorityConfigGrantInput<TAccountAuthority extends string = string, TAccountAuthorityConfig extends string = string> = { authority: TransactionSigner<TAccountAuthority>; authorityConfig: Address<TAccountAuthorityConfig>; account: AuthorityConfigGrantInstructionDataArgs["account"]; privileges: AuthorityConfigGrantInstructionDataArgs["privileges"]; }; export declare function getAuthorityConfigGrantInstruction<TAccountAuthority extends string, TAccountAuthorityConfig extends string, TProgramAddress extends Address = typeof WAVEBREAK_PROGRAM_ADDRESS>(input: AuthorityConfigGrantInput<TAccountAuthority, TAccountAuthorityConfig>, config?: { programAddress?: TProgramAddress; }): AuthorityConfigGrantInstruction<TProgramAddress, TAccountAuthority, TAccountAuthorityConfig>; export type ParsedAuthorityConfigGrantInstruction<TProgram extends string = typeof WAVEBREAK_PROGRAM_ADDRESS, TAccountMetas extends readonly IAccountMeta[] = readonly IAccountMeta[]> = { programAddress: Address<TProgram>; accounts: { authority: TAccountMetas[0]; authorityConfig: TAccountMetas[1]; }; data: AuthorityConfigGrantInstructionData; }; export declare function parseAuthorityConfigGrantInstruction<TProgram extends string, TAccountMetas extends readonly IAccountMeta[]>(instruction: IInstruction<TProgram> & IInstructionWithAccounts<TAccountMetas> & IInstructionWithData<Uint8Array>): ParsedAuthorityConfigGrantInstruction<TProgram, TAccountMetas>;