@kamino-finance/kliquidity-sdk
Version:
Typescript SDK for interacting with the Kamino Liquidity (kliquidity) protocol
48 lines • 2.94 kB
TypeScript
/**
* 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 Bin, type BinArgs } from '../types';
export declare const BIN_ARRAY_DISCRIMINATOR: Uint8Array<ArrayBuffer>;
export declare function getBinArrayDiscriminatorBytes(): ReadonlyUint8Array<ArrayBuffer>;
/**
* An account to contain a range of bin. For example: Bin 100 <-> 200.
* For example:
* BinArray index: 0 contains bin 0 <-> 599
* index: 2 contains bin 600 <-> 1199, ...
*/
export type BinArray = {
discriminator: ReadonlyUint8Array;
index: bigint;
/** Version of binArray */
version: number;
padding: ReadonlyUint8Array;
lbPair: Address;
bins: Array<Bin>;
};
export type BinArrayArgs = {
index: number | bigint;
/** Version of binArray */
version: number;
padding: ReadonlyUint8Array;
lbPair: Address;
bins: Array<BinArgs>;
};
/** Gets the encoder for {@link BinArrayArgs} account data. */
export declare function getBinArrayEncoder(): FixedSizeEncoder<BinArrayArgs>;
/** Gets the decoder for {@link BinArray} account data. */
export declare function getBinArrayDecoder(): FixedSizeDecoder<BinArray>;
/** Gets the codec for {@link BinArray} account data. */
export declare function getBinArrayCodec(): FixedSizeCodec<BinArrayArgs, BinArray>;
export declare function decodeBinArray<TAddress extends string = string>(encodedAccount: EncodedAccount<TAddress>): Account<BinArray, TAddress>;
export declare function decodeBinArray<TAddress extends string = string>(encodedAccount: MaybeEncodedAccount<TAddress>): MaybeAccount<BinArray, TAddress>;
export declare function fetchBinArray<TAddress extends string = string>(rpc: Parameters<typeof fetchEncodedAccount>[0], address: Address<TAddress>, config?: FetchAccountConfig): Promise<Account<BinArray, TAddress>>;
export declare function fetchMaybeBinArray<TAddress extends string = string>(rpc: Parameters<typeof fetchEncodedAccount>[0], address: Address<TAddress>, config?: FetchAccountConfig): Promise<MaybeAccount<BinArray, TAddress>>;
export declare function fetchAllBinArray(rpc: Parameters<typeof fetchEncodedAccounts>[0], addresses: Array<Address>, config?: FetchAccountsConfig): Promise<Account<BinArray>[]>;
export declare function fetchAllMaybeBinArray(rpc: Parameters<typeof fetchEncodedAccounts>[0], addresses: Array<Address>, config?: FetchAccountsConfig): Promise<MaybeAccount<BinArray>[]>;
export declare function getBinArraySize(): number;
//# sourceMappingURL=binArray.d.ts.map