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
42 lines (41 loc) • 1.62 kB
TypeScript
import { JsonRpcProvider } from "ethers";
import type { IOrder, IAsset, ICancellationResult, ICreateOrderResult, IOperationResult } from "./marketplace";
export type { IOrder, IAsset, ICancellationResult, ICreateOrderResult, IOperationResult, };
export type Order = IOrder;
export type Asset = IAsset;
export type CreateOrderResult = ICreateOrderResult;
export type OperationResult = IOperationResult;
export type CancellationResult = ICancellationResult;
export interface CreateOrderData {
address: string;
axieId?: string;
basePrice?: string;
endedPrice?: string;
startedAt: number;
endedAt: number;
expiredAt: number;
}
export interface ICreateOrderData {
address: string;
axieId: string;
basePrice: string;
endedPrice: string;
startedAt: number;
endedAt: number;
expiredAt: number;
}
export declare const AXIE_FRAGMENTS = "\n fragment AxieDetail on Axie {\n id\n order {\n ...OrderInfo\n __typename\n }\n __typename\n }\n";
export declare const AXIE_QUERIES: {
GET_AXIE_DETAIL: string;
};
export declare function getAxieIdsFromAccount(address: string, provider: JsonRpcProvider): Promise<number[]>;
/**
* Get axie details from the marketplace API
*/
export declare function getAxieDetails(axieId: number, accessToken: string, skyMavisApiKey: string): Promise<IOrder | null>;
/**
* Encode order data for Axie (ERC721) orders
*/
export declare function encodeAxieOrderData(order: IOrder): string;
export { isOrderValid } from "./marketplace";
export declare function getAxieFloorPrice(skyMavisApiKey: string): Promise<string | null>;