axie-tools
Version:
TypeScript SDK for building Axie Infinity trading bots and AI agents on Ronin network. Programmatic marketplace operations for Axies, Materials, and Consumables (buy/sell/delist), batch transfers, floor price detection, and wallet management. Includes int
35 lines (34 loc) • 1.56 kB
TypeScript
import { JsonRpcProvider, Signer } from "ethers";
/**
* Options for gas price configuration
*/
export interface GasPriceOptions {
/** Custom gas price in wei. If provided, this value will be used instead of fetching from provider */
gasPrice?: bigint;
}
/**
* Get gas price - either uses custom provided value or fetches current price from provider
* @param signerOrProvider - A Signer or Provider instance to fetch gas price from
* @param options - Optional gas price configuration
* @returns Gas price as bigint
*/
export declare function getGasPrice(signerOrProvider: Signer | JsonRpcProvider, options?: GasPriceOptions): Promise<bigint>;
export declare function createProvider(_skyMavisApiKey: string, rpcUrl?: string): JsonRpcProvider;
export declare function getMarketplaceApi(skyMavisApiKey: string): {
graphqlUrl: string;
headers: Record<string, string>;
};
export declare function getAccountInfo(address: string, provider: JsonRpcProvider, skyMavisApiKey: string): Promise<{
address: string;
ronBalance: string;
wethBalance: string;
allowance: any;
isApprovedForAll: any;
isMaterialApprovedForAll: any;
axieIds: number[];
materials: import("./material").UserMaterial[];
}>;
export declare function apiRequest<T>(url: string, body?: BodyInit | null, headers?: Record<string, string>, method?: "GET" | "POST"): Promise<T>;
export declare const askToContinue: () => Promise<void>;
export declare function ensureMarketplaceToken(): Promise<string>;
export declare const getAxieId: () => Promise<any>;