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.82 kB
TypeScript
import type { IOrder } from "./marketplace";
export interface ConsumableInfo {
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 UserConsumable {
attributes: any[];
description: string;
imageUrl: string;
name: string;
tokenAddress: string;
tokenId: string;
tokenType: string;
quantity?: number;
minPrice?: string;
orders?: {
total: number;
};
}
export interface ICreateConsumableOrderData {
address: string;
consumableId: string;
quantity?: string;
unitPrice: string;
endedUnitPrice: string;
startedAt: number;
endedAt: number;
expiredAt: number;
}
export declare const CONSUMABLE_QUERIES: {
GET_CONSUMABLES: string;
GET_CONSUMABLE_DETAIL: string;
GET_CONSUMABLE_ORDERS: string;
GET_CONSUMABLE_BY_OWNER: string;
GET_CONSUMABLE_OWNERSHIP: string;
CREATE_ORDER: string;
};
export declare function checkConsumableOwnership(consumableId: string, address: string, skyMavisApiKey: string, accessToken: string): Promise<any>;
export declare function getUserConsumables(address: string, skyMavisApiKey: string): Promise<UserConsumable[]>;
export declare function validateConsumableToken(tokenId: string, skyMavisApiKey: string): Promise<ConsumableInfo | null>;
export declare function getConsumableFloorPrice(consumableId: string, skyMavisApiKey: string, requestedQuantity?: number): Promise<string | null>;
/**
* Encode order data for Consumable (ERC1155) orders
*/
export declare function encodeConsumableOrderData(order: IOrder): string;