/** * 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 Side, type SideArgs } from "../types"; export declare const POSITION_DISCRIMINATOR: Uint8Array; export declare function getPositionDiscriminatorBytes(): ReadonlyUint8Array; export type Position = { discriminator: ReadonlyUint8Array; owner: Address; pool: Address; custody: Address; collateralCustody: Address; openTime: bigint; updateTime: bigint; side: Side; price: bigint; sizeUsd: bigint; collateralUsd: bigint; realisedPnlUsd: bigint; cumulativeInterestSnapshot: bigint; lockedAmount: bigint; bump: number; }; export type PositionArgs = { owner: Address; pool: Address; custody: Address; collateralCustody: Address; openTime: number | bigint; updateTime: number | bigint; side: SideArgs; price: number | bigint; sizeUsd: number | bigint; collateralUsd: number | bigint; realisedPnlUsd: number | bigint; cumulativeInterestSnapshot: number | bigint; lockedAmount: number | bigint; bump: number; }; /** Gets the encoder for {@link PositionArgs} account data. */ export declare function getPositionEncoder(): FixedSizeEncoder; /** Gets the decoder for {@link Position} account data. */ export declare function getPositionDecoder(): FixedSizeDecoder; /** Gets the codec for {@link Position} account data. */ export declare function getPositionCodec(): FixedSizeCodec; export declare function decodePosition(encodedAccount: EncodedAccount): Account; export declare function decodePosition(encodedAccount: MaybeEncodedAccount): MaybeAccount; export declare function fetchPosition(rpc: Parameters[0], address: Address, config?: FetchAccountConfig): Promise>; export declare function fetchMaybePosition(rpc: Parameters[0], address: Address, config?: FetchAccountConfig): Promise>; export declare function fetchAllPosition(rpc: Parameters[0], addresses: Array
, config?: FetchAccountsConfig): Promise[]>; export declare function fetchAllMaybePosition(rpc: Parameters[0], addresses: Array
, config?: FetchAccountsConfig): Promise[]>; export declare function getPositionSize(): number; //# sourceMappingURL=position.d.ts.map