granite-dex-sdk
Version:
Utilities to query Stacks AMMs
43 lines (38 loc) • 1.83 kB
text/typescript
import * as _stacks_transactions from '@stacks/transactions';
declare function getVelarPoolData(velarContractAddress: string, tokenInName: string, tokenInAddress: string, tokenOutName: string, tokenOutAddress: string, network: "mainnet" | "testnet", sender: string): Promise<{
poolId: any;
flipped: boolean;
lpToken: any;
token0: any;
token1: any;
reserve0: any;
reserve1: any;
swapFee: {
num: any;
den: any;
};
shareFee: {
num: any;
den: any;
};
protocolFee: {
num: any;
den: any;
};
}>;
declare function velarQuoter(velarContractAddress: string, amtIn: bigint | number, tokenInName: string, tokenInAddress: string, tokenOutName: string, tokenOutAddress: string, network: "mainnet" | "testnet", sender: string): Promise<any>;
declare function getAlexPoolData(alexContractAddress: string, tokenInName: string, tokenInAddress: string, tokenOutName: string, tokenOutAddress: string, factor: bigint | number, network: "mainnet" | "testnet", sender: string): Promise<{
poolId: any;
balanceX: any;
balanceY: any;
}>;
declare function alexQuoter(alexContractAddress: string, amtIn: bigint | number, tokenInName: string, tokenInAddress: string, tokenOutName: string, tokenOutAddress: string, network: "mainnet" | "testnet", sender: string): Promise<{
amtOut: any;
factor: _stacks_transactions.ContractPrincipalCV | _stacks_transactions.UIntCV;
}>;
declare function getBestPath(velar: string, alex: string, amtIn: bigint | number, tokenInName: string, tokenInAddress: string, tokenOutName: string, tokenOutAddress: string, network: "mainnet" | "testnet", sender: string): Promise<{
dex: string;
amtOut: any;
data: any;
}>;
export { alexQuoter, getAlexPoolData, getBestPath, getVelarPoolData, velarQuoter };