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
58 lines (57 loc) • 1.78 kB
TypeScript
import type { IOrder } from "./marketplace";
export interface MaterialInfo {
attributes: any[];
description: string;
imageUrl: string;
name: string;
tokenAddress: string;
tokenId: string;
tokenType: string;
minPrice?: string;
totalSupply: string;
totalOwners: number;
orders?: {
totalListed: string;
totalOrders: number;
};
}
export interface UserMaterial {
attributes: any[];
description: string;
imageUrl: string;
name: string;
tokenAddress: string;
tokenId: string;
tokenType: string;
quantity?: number;
minPrice?: string;
orders?: {
total: number;
};
}
export interface ICreateMaterialOrderData {
address: string;
materialId: string;
quantity?: string;
unitPrice: string;
endedUnitPrice: string;
startedAt: number;
endedAt: number;
expiredAt: number;
}
export declare const MATERIAL_QUERIES: {
GET_MATERIALS: string;
GET_MATERIAL_DETAIL: string;
GET_MATERIAL_ORDERS: string;
GET_MATERIAL_BY_OWNER: string;
GET_MATERIAL_OWNERSHIP: string;
CREATE_ORDER: string;
};
export declare function checkMaterialOwnership(materialId: string, address: string, skyMavisApiKey: string, accessToken: string): Promise<any>;
export declare function getUserMaterials(address: string, skyMavisApiKey: string): Promise<UserMaterial[]>;
export declare function validateMaterialToken(tokenId: string, skyMavisApiKey: string): Promise<MaterialInfo | null>;
export declare function getMaterialFloorPrice(materialId: string, skyMavisApiKey: string, requestedQuantity?: number): Promise<string | null>;
/**
* Encode order data for Material (ERC1155) orders
*/
export declare function encodeMaterialOrderData(order: IOrder): string;