@perk.money/perk-swap-core
Version:
This npm package contains core logic of Perk Aggregator build on top of NEAR blockchain
26 lines (25 loc) • 1.03 kB
TypeScript
import { Transaction } from '@near-wallet-selector/core';
import { Provider } from 'near-api-js/lib/providers';
import { QuoteParams, Quote, SwapParams, CreateSwapRouteInstructionsParams } from '../common/types';
import { Amm } from '../types';
import { TonicMarketResponse } from './types';
export declare class TonicFoundationMarket implements Amm {
private market;
label: string;
id: string;
contractId: string;
instanceId: number;
reserveTokenMints: string[];
private orderBook;
constructor(market: TonicMarketResponse);
getPromiseForUpdate({ provider, }: {
provider: Provider;
}): Promise<void>;
private resolveQuote;
getQuote(quoteParams: QuoteParams): Quote;
createSwapInstructions(swapParams: SwapParams): Promise<Transaction[]>;
createSwapRouteInstructions(swapParams: CreateSwapRouteInstructionsParams): Promise<Transaction[]>;
static loadMarkets(params: {
provider: Provider;
}): Promise<TonicFoundationMarket[]>;
}