bitcore-wallet-client
Version:
Client for bitcore-wallet-service
64 lines • 1.74 kB
TypeScript
interface Headers {
'x-client-version': string;
'x-wallet-id'?: string;
'x-identity'?: string;
'x-session'?: string;
'x-signature'?: string;
}
export declare class Request {
baseUrl: any;
session: any;
r: any;
credentials: any;
supportStaffWalletId: any;
timeout: any;
constructor(url?: any, opts?: any);
setCredentials(credentials: any): void;
getHeaders(method: string, url: string, args: any, useSession?: boolean): Headers;
_populateAuth(headers: any, signingParams: {
method: string;
url: string;
args: any;
_requestPrivKey?: string;
}, useSession?: boolean): void;
_signRequest({ method, url, args, privKey }: {
method: any;
url: any;
args: any;
privKey: any;
}): any;
doRequest(method: any, url: any, args: any, useSession: any, cb?: any): Promise<{
body: any;
header: any;
}>;
static _parseError(body: any): any;
post(url: any, body?: any, cb?: any): Promise<{
body: any;
header: any;
}>;
put(url: any, body?: any, cb?: any): Promise<{
body: any;
header: any;
}>;
get(url: any, cb?: any): Promise<{
body: any;
header: any;
}>;
delete(url: any, cb?: any): Promise<{
body: any;
header: any;
}>;
getWithLogin(url: any, cb: any): any;
_login(cb?: any): Promise<{
body: any;
header: any;
}>;
logout(cb?: any): Promise<{
body: any;
header: any;
}>;
doRequestWithLogin(method: any, url: any, body: any, cb?: any, retry?: boolean): any;
doLogin(cb?: any): Promise<any>;
}
export {};
//# sourceMappingURL=request.d.ts.map