@kamino-finance/kliquidity-sdk
Version:
Typescript SDK for interacting with the Kamino Liquidity (kliquidity) protocol
39 lines • 1.82 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 { type Codec, type Decoder, type Encoder, type GetDiscriminatedUnionVariant, type GetDiscriminatedUnionVariantContent } from '@solana/kit';
export type SwapLimit = {
__kind: "Bps";
fields: readonly [bigint];
} | {
__kind: "Absolute";
/** Amount of src token expected by the user to perform the swap */
srcAmountToSwap: bigint;
/** Amount of dst token the user provides in exchange */
dstAmountToVault: bigint;
aToB: boolean;
};
export type SwapLimitArgs = {
__kind: "Bps";
fields: readonly [number | bigint];
} | {
__kind: "Absolute";
/** Amount of src token expected by the user to perform the swap */
srcAmountToSwap: number | bigint;
/** Amount of dst token the user provides in exchange */
dstAmountToVault: number | bigint;
aToB: boolean;
};
export declare function getSwapLimitEncoder(): Encoder<SwapLimitArgs>;
export declare function getSwapLimitDecoder(): Decoder<SwapLimit>;
export declare function getSwapLimitCodec(): Codec<SwapLimitArgs, SwapLimit>;
export declare function swapLimit(kind: 'Bps', data: GetDiscriminatedUnionVariantContent<SwapLimitArgs, '__kind', 'Bps'>['fields']): GetDiscriminatedUnionVariant<SwapLimitArgs, '__kind', 'Bps'>;
export declare function swapLimit(kind: 'Absolute', data: GetDiscriminatedUnionVariantContent<SwapLimitArgs, '__kind', 'Absolute'>): GetDiscriminatedUnionVariant<SwapLimitArgs, '__kind', 'Absolute'>;
export declare function isSwapLimit<K extends SwapLimit['__kind']>(kind: K, value: SwapLimit): value is SwapLimit & {
__kind: K;
};
//# sourceMappingURL=swapLimit.d.ts.map