UNPKG

@kamino-finance/kliquidity-sdk

Version:

Typescript SDK for interacting with the Kamino Liquidity (kliquidity) protocol

38 lines 2.92 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 { fetchEncodedAccount, fetchEncodedAccounts, type Account, type Address, type EncodedAccount, type FetchAccountConfig, type FetchAccountsConfig, type FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder, type MaybeAccount, type MaybeEncodedAccount, type ReadonlyUint8Array } from '@solana/kit'; import { type Observation, type ObservationArgs } from '../types'; export declare const OBSERVATION_STATE_DISCRIMINATOR: Uint8Array<ArrayBuffer>; export declare function getObservationStateDiscriminatorBytes(): ReadonlyUint8Array; export type ObservationState = { discriminator: ReadonlyUint8Array; initialized: boolean; poolId: Address; observations: Array<Observation>; padding: Array<bigint>; }; export type ObservationStateArgs = { initialized: boolean; poolId: Address; observations: Array<ObservationArgs>; padding: Array<number | bigint>; }; /** Gets the encoder for {@link ObservationStateArgs} account data. */ export declare function getObservationStateEncoder(): FixedSizeEncoder<ObservationStateArgs>; /** Gets the decoder for {@link ObservationState} account data. */ export declare function getObservationStateDecoder(): FixedSizeDecoder<ObservationState>; /** Gets the codec for {@link ObservationState} account data. */ export declare function getObservationStateCodec(): FixedSizeCodec<ObservationStateArgs, ObservationState>; export declare function decodeObservationState<TAddress extends string = string>(encodedAccount: EncodedAccount<TAddress>): Account<ObservationState, TAddress>; export declare function decodeObservationState<TAddress extends string = string>(encodedAccount: MaybeEncodedAccount<TAddress>): MaybeAccount<ObservationState, TAddress>; export declare function fetchObservationState<TAddress extends string = string>(rpc: Parameters<typeof fetchEncodedAccount>[0], address: Address<TAddress>, config?: FetchAccountConfig): Promise<Account<ObservationState, TAddress>>; export declare function fetchMaybeObservationState<TAddress extends string = string>(rpc: Parameters<typeof fetchEncodedAccount>[0], address: Address<TAddress>, config?: FetchAccountConfig): Promise<MaybeAccount<ObservationState, TAddress>>; export declare function fetchAllObservationState(rpc: Parameters<typeof fetchEncodedAccounts>[0], addresses: Array<Address>, config?: FetchAccountsConfig): Promise<Account<ObservationState>[]>; export declare function fetchAllMaybeObservationState(rpc: Parameters<typeof fetchEncodedAccounts>[0], addresses: Array<Address>, config?: FetchAccountsConfig): Promise<MaybeAccount<ObservationState>[]>; export declare function getObservationStateSize(): number; //# sourceMappingURL=observationState.d.ts.map