UNPKG

@mak201010/bluefin-v2-client

Version:

The Bluefin client Library allows traders to sign, create, retrieve and listen to orders on Bluefin Exchange.

79 lines (78 loc) 2.3 kB
import { AxiosRequestConfig } from "axios"; import { ResponseSchema } from "./contractErrorHandling.service"; export declare class APIService { private apiService; private token; private apiToken; private walletAddress; private baseUrl; private uuid; constructor(url: string); get<T>(url: string, queryParams?: object, config?: AxiosRequestConfig & { isAuthenticationRequired?: boolean; }, baseUrl?: string): Promise<{ data: T; ok: boolean; status: number; response: { data: any; message: any; errorCode: any; }; }>; post<T>(url: string, data: object, config?: AxiosRequestConfig & { isAuthenticationRequired?: boolean; }, baseUrl?: string): Promise<{ data: T; ok: boolean; status: number; response: { data: any; message: any; errorCode: any; }; }>; put<T>(url: string, data: object, config?: AxiosRequestConfig & { isAuthenticationRequired?: boolean; }, baseUrl?: string): Promise<{ data: T; ok: boolean; status: number; response: { data: any; message: any; errorCode: any; }; }>; patch<T>(url: string, data: object, config?: AxiosRequestConfig & { isAuthenticationRequired?: boolean; }, baseUrl?: string): Promise<{ data: T; ok: boolean; status: number; response: { data: any; message: any; errorCode: any; }; }>; delete<T>(url: string, data: object, config?: AxiosRequestConfig & { isAuthenticationRequired?: boolean; }, baseUrl?: string): Promise<{ data: T; ok: boolean; status: number; response: { data: any; message: any; errorCode: any; }; }>; setAuthToken: (token: string) => Promise<void>; setUUID: (uuid: string) => Promise<void>; setApiToken: (apiToken: string) => Promise<void>; setWalletAddress: (address: string) => Promise<void>; private transformRequest; private handleResponse; transformAPItoResponseSchema(APIResponse: any): ResponseSchema; }