axie-origin
v1.0.10
Published
```typescript import { URLSearchParams } from "url"; export declare enum HttpMethod { POST = "POST", GET = "GET" } export declare enum APIHost { athena = "", gameApi = "" } export interface ApiRoute { path: string; method: HttpMeth
Downloads
10
Readme
AXIE Origin
import { URLSearchParams } from "url";
export declare enum HttpMethod {
POST = "POST",
GET = "GET"
}
export declare enum APIHost {
athena = "",
gameApi = ""
}
export interface ApiRoute {
path: string;
method: HttpMethod;
host: APIHost;
}
export interface ApiRouteParams {
query: URLSearchParams;
}
export interface SMAuthResultSuccess {
accessToken: String;
accessTokenExpiresAt: String;
accessTokenExpiresIn: number;
refreshToken: string;
userId: string;
}
export interface SMAuthResultFailure {
_error: number;
_errorMessage: string;
}
export interface AIOLeaderboardItem {
"userID": string;
"name": string;
"rank": string;
"tier": number;
"topRank": number;
"vstar": number;
"avatar": string;
"_links": object;
"_etag": string;
"_isNew": boolean;
}
export interface AIOLeaderboardRange {
limit: number;
offset: number;
hasNext: boolean;
}
export interface AIOLeaderboard {
_etag: string;
_items: [AIOLeaderboardItem];
_range: AIOLeaderboardRange;
_links: any;
}
export interface AIOUserProfile {
"userID": string;
"name": string;
"level": number;
"roninAddress": string;
"avatar": string;
"_links": any;
"_etag": string;
"_isNew": boolean;
}
export interface AIOPlayerStats {
lastClaimed: number;
lastClaimedAfk: number;
stamina: {
total: number;
remaining: number;
updated_at: number;
};
}
export default class AxieInfinityOrigin {
#private;
constructor(bearerToken?: string);
login(email: string, password: string): Promise<SMAuthResultSuccess | SMAuthResultFailure>;
profile(): Promise<AIOUserProfile>;
userStats(): Promise<AIOPlayerStats>;
leaderBoard(page?: number): Promise<AIOLeaderboard>;
}