@orca-so/wavebreak
Version:
The wavebreak JS client for interacting with the wavebreak program.
41 lines (40 loc) • 3.33 kB
TypeScript
import { AccountMeta, AccountSignerMeta, Address, Codec, Decoder, Encoder, Instruction, InstructionWithAccounts, InstructionWithData, ReadonlySignerAccount, ReadonlyUint8Array, 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(): ReadonlyUint8Array;
export type AuthorityConfigGrantInstruction<TProgram extends string = typeof WAVEBREAK_PROGRAM_ADDRESS, TAccountAuthority 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,
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 AccountMeta[] = readonly AccountMeta[]> = {
programAddress: Address<TProgram>;
accounts: {
authority: TAccountMetas[0];
authorityConfig: TAccountMetas[1];
};
data: AuthorityConfigGrantInstructionData;
};
export declare function parseAuthorityConfigGrantInstruction<TProgram extends string, TAccountMetas extends readonly AccountMeta[]>(instruction: Instruction<TProgram> & InstructionWithAccounts<TAccountMetas> & InstructionWithData<ReadonlyUint8Array>): ParsedAuthorityConfigGrantInstruction<TProgram, TAccountMetas>;