UNPKG

@pod-protocol/sdk

Version:

TypeScript SDK for PoD Protocol - AI agent communication on Solana

73 lines 5.5 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 ReadonlyUint8Array, type TransactionSigner, type WritableAccount, type WritableSignerAccount } from '@solana/kit'; import { POD_COM_PROGRAM_ADDRESS } from '../programs'; import { type ChannelVisibility, type ChannelVisibilityArgs } from '../types'; export declare const CREATE_CHANNEL_DISCRIMINATOR: Uint8Array<ArrayBuffer>; export declare function getCreateChannelDiscriminatorBytes(): ReadonlyUint8Array; export type CreateChannelInstruction<TProgram extends string = typeof POD_COM_PROGRAM_ADDRESS, TAccountChannelAccount extends string | IAccountMeta<string> = string, TAccountCreator extends string | IAccountMeta<string> = string, TAccountSystemProgram extends string | IAccountMeta<string> = '11111111111111111111111111111111', TRemainingAccounts extends readonly IAccountMeta<string>[] = []> = IInstruction<TProgram> & IInstructionWithData<Uint8Array> & IInstructionWithAccounts<[ TAccountChannelAccount extends string ? WritableAccount<TAccountChannelAccount> : TAccountChannelAccount, TAccountCreator extends string ? WritableSignerAccount<TAccountCreator> & IAccountSignerMeta<TAccountCreator> : TAccountCreator, TAccountSystemProgram extends string ? ReadonlyAccount<TAccountSystemProgram> : TAccountSystemProgram, ...TRemainingAccounts ]>; export type CreateChannelInstructionData = { discriminator: ReadonlyUint8Array; name: string; description: string; visibility: ChannelVisibility; maxParticipants: number; feePerMessage: bigint; }; export type CreateChannelInstructionDataArgs = { name: string; description: string; visibility: ChannelVisibilityArgs; maxParticipants: number; feePerMessage: number | bigint; }; export declare function getCreateChannelInstructionDataEncoder(): Encoder<CreateChannelInstructionDataArgs>; export declare function getCreateChannelInstructionDataDecoder(): Decoder<CreateChannelInstructionData>; export declare function getCreateChannelInstructionDataCodec(): Codec<CreateChannelInstructionDataArgs, CreateChannelInstructionData>; export type CreateChannelAsyncInput<TAccountChannelAccount extends string = string, TAccountCreator extends string = string, TAccountSystemProgram extends string = string> = { channelAccount?: Address<TAccountChannelAccount>; creator: TransactionSigner<TAccountCreator>; systemProgram?: Address<TAccountSystemProgram>; name: CreateChannelInstructionDataArgs['name']; description: CreateChannelInstructionDataArgs['description']; visibility: CreateChannelInstructionDataArgs['visibility']; maxParticipants: CreateChannelInstructionDataArgs['maxParticipants']; feePerMessage: CreateChannelInstructionDataArgs['feePerMessage']; }; export declare function getCreateChannelInstructionAsync<TAccountChannelAccount extends string, TAccountCreator extends string, TAccountSystemProgram extends string, TProgramAddress extends Address = typeof POD_COM_PROGRAM_ADDRESS>(input: CreateChannelAsyncInput<TAccountChannelAccount, TAccountCreator, TAccountSystemProgram>, config?: { programAddress?: TProgramAddress; }): Promise<CreateChannelInstruction<TProgramAddress, TAccountChannelAccount, TAccountCreator, TAccountSystemProgram>>; export type CreateChannelInput<TAccountChannelAccount extends string = string, TAccountCreator extends string = string, TAccountSystemProgram extends string = string> = { channelAccount: Address<TAccountChannelAccount>; creator: TransactionSigner<TAccountCreator>; systemProgram?: Address<TAccountSystemProgram>; name: CreateChannelInstructionDataArgs['name']; description: CreateChannelInstructionDataArgs['description']; visibility: CreateChannelInstructionDataArgs['visibility']; maxParticipants: CreateChannelInstructionDataArgs['maxParticipants']; feePerMessage: CreateChannelInstructionDataArgs['feePerMessage']; }; export declare function getCreateChannelInstruction<TAccountChannelAccount extends string, TAccountCreator extends string, TAccountSystemProgram extends string, TProgramAddress extends Address = typeof POD_COM_PROGRAM_ADDRESS>(input: CreateChannelInput<TAccountChannelAccount, TAccountCreator, TAccountSystemProgram>, config?: { programAddress?: TProgramAddress; }): CreateChannelInstruction<TProgramAddress, TAccountChannelAccount, TAccountCreator, TAccountSystemProgram>; export type ParsedCreateChannelInstruction<TProgram extends string = typeof POD_COM_PROGRAM_ADDRESS, TAccountMetas extends readonly IAccountMeta[] = readonly IAccountMeta[]> = { programAddress: Address<TProgram>; accounts: { channelAccount: TAccountMetas[0]; creator: TAccountMetas[1]; systemProgram: TAccountMetas[2]; }; data: CreateChannelInstructionData; }; export declare function parseCreateChannelInstruction<TProgram extends string, TAccountMetas extends readonly IAccountMeta[]>(instruction: IInstruction<TProgram> & IInstructionWithAccounts<TAccountMetas> & IInstructionWithData<Uint8Array>): ParsedCreateChannelInstruction<TProgram, TAccountMetas>; //# sourceMappingURL=createChannel.d.ts.map