@dinolab/crypto-mm
Version:
Crypto Market Maker
53 lines • 3.34 kB
TypeScript
import { TokenInfo, WalletBalance } from "../models/models.js";
import { Keypair } from "@solana/web3.js";
import { BoostParams, LaunchExchangeParams, SellParams, TokenCreateParams, TradeVolumeParams } from "../models/params.js";
import { EventType, ExchangeType } from "../types/types.js";
import { LaunchTokenResult } from "../models/results.js";
export interface MarketMaker {
getBalance(walletAddresses: string[]): Promise<Record<string, WalletBalance>>;
getTokenInfo(tokenAddress: string): Promise<TokenInfo | undefined>;
transferBalance(fromKeypair: Keypair, toAddresses: string[], amount: bigint): Promise<Record<string, string>>;
createToken(tokenParams: TokenCreateParams, ownerKeypair: Keypair): Promise<string>;
launchToken(launchExchange: ExchangeType, tokenParams: TokenCreateParams, launchParams: LaunchExchangeParams, ownerKeypair: Keypair): Promise<LaunchTokenResult | undefined>;
startBoostToken(launchExchange: ExchangeType, boostParams: BoostParams, walletKeypaires: Keypair): Promise<string>;
pauseBoostToken(boostId: string): Promise<boolean>;
resumeBoostToken(boostId: string): Promise<boolean>;
stopBoostToken(boostId: string): Promise<boolean>;
startTradeVolume(launchExchange: ExchangeType, tradeParams: TradeVolumeParams, walletKeypaires: Keypair[]): Promise<string>;
pauseTradeVolume(tradeId: string): Promise<boolean>;
resumeTradeVolume(tradeId: string): Promise<boolean>;
stopTradeVolume(tradeId: string): Promise<boolean>;
sellToken(sellParams: SellParams, walletKeypaires: Keypair[], ownerKeypair: Keypair): Promise<string>;
pauseSellToken(sellId: string): Promise<boolean>;
resumeSellToken(sellId: string): Promise<boolean>;
stopSellToken(sellId: string): Promise<boolean>;
trackLiquidity(launchExchange: ExchangeType, pairAddress: string): boolean;
stopTrackingLiquidity(): boolean;
trackProfit(walletAddresses: string[]): boolean;
stopTrackingProfit(): boolean;
on(event: EventType, callback: (data: unknown) => void): void;
}
export interface MMHandler {
start(): Promise<boolean>;
pause(): Promise<boolean>;
resume(): Promise<boolean>;
stop(): Promise<boolean>;
}
export interface MMTracker {
track(params: unknown, onUpdate: (data: unknown) => void): void;
stop(): void;
}
export interface TokenCreator {
createToken(tokenInfo: TokenCreateParams, ownerKeypair: Keypair, revokeMintAuthority: boolean, revokeFreezeAuthority: boolean): Promise<any>;
}
export interface Dex {
createPool(tokenAddress: string, tokenAmount: bigint, nativeAmount: bigint, ownerKeypair: Keypair, testnet: boolean): Promise<string>;
addLiquidity(tokenAddress: string, tokenAmount: bigint, nativeAmount: bigint, ownerKeypair: Keypair, testnet: boolean): Promise<string>;
removeLiquidity(tokenAddress: string, percent: number, ownerKeypair: Keypair, testnet: boolean): Promise<string>;
swap(fromToken: string, toToken: string, fromAmount: bigint, ownerKeypair: Keypair, testnet: boolean): Promise<string>;
}
export interface Fun {
launchToken(tokenParams: TokenCreateParams, launchParam: LaunchExchangeParams, ownerKeypair: Keypair): Promise<string>;
swap(fromToken: string, toToken: string, fromAmount: bigint, ownerKeypair: Keypair): Promise<string>;
}
//# sourceMappingURL=interfaces.d.ts.map