AccountHandlers
- development: https://account-api.wow3.dev
- production: https://account-api.wow3.app
Usage
const kyClient = new KyClieny({
baseUrl: "API_ENDPOINT",
getHeaders: async () => {
const headers = {};
headers["Authorization"] = "YOUR AUTHORIZATION TOKEN";
return headers;
},
});
const accountHandlers = new AccountHandlers(kyClient);
// updateProfile
const res = await accountHandlers.updateProfile({ ... });
//refreshAuth
const res = await accountHandlers.refreshAuth({ ... });
// explore more in the interface belowInterface
class AccountHandlers {
readonly client: KyClient;
constructor(client: KyClient);
updateProfile(payload: UpdateProfile): APIResponse<boolean>;
disconnectSocial(provider: TProvider): APIResponse<boolean>;
connectSocial(payload: ConnectSocial): APIResponse<Social>;
connectTelegram(payload: ConnectTelegramPayload): APIResponse<any>;
logoutByWallet(): APIResponse<boolean>;
loginByWallet(params: LoginByWalletParams): APIResponse<Auth>;
getNonce(address: string): APIResponse<GetNonce>;
refreshAuth(): APIResponse<Auth>;
getReferralDetail(): APIResponse<ReferralDetail>;
addReferralCode(payload: AddReferralCodePayload): APIResponse<boolean>;
getTVMNonce(): APIResponse<GetNonce>;
loginByTVMWallet(payload: LoginByTVMWalletPayload): APIResponse<Auth>;
}