myria-core-sdk
Version:
Latest version SDK
20 lines (19 loc) • 1.5 kB
TypeScript
import { APIResponseType } from "../../types/APIResponseType";
import { SettingNotificationResponse, SettingNotificationParam, UserApiInput, UserAssetERC20, UserAssetETH, UserDataResponse, UserLastEvaluatedKey, UserResponse } from "../../types/UserTypes";
import { EnvTypes } from "../../typesBundle";
import { PaginatedType } from '../../types/CommonTypes';
export declare class UserAPI {
private axiosInstance;
private axiosWrapper;
private axiosMyriaverseWrapper;
constructor(env: EnvTypes);
registerUser(payload: UserApiInput): Promise<APIResponseType<UserDataResponse>>;
patchRegisterUserOnchain(ethAddress: string, transactionHash: string): Promise<APIResponseType<UserDataResponse>>;
getUserByStarkKey(starkKey: string): Promise<APIResponseType<UserDataResponse>>;
getUserByWalletAddress(ethAddress: string): Promise<APIResponseType<UserDataResponse>>;
getUserByReferrerIdAndType(userType: string, referrerId: string, limit?: number, lastEvaluatedKey?: UserLastEvaluatedKey): Promise<APIResponseType<PaginatedType<UserDataResponse>>>;
getBalanceETH(starkKey: string): Promise<APIResponseType<UserAssetETH>>;
getBalanceERC20(starkKey: string, assetId?: string): Promise<APIResponseType<UserAssetERC20[]>>;
configEmailNotification(ethAddress: string, notificationConfigParam: SettingNotificationParam[]): Promise<APIResponseType<SettingNotificationResponse>>;
getUserIDInfo(walletAddress: string): Promise<APIResponseType<UserResponse>>;
}