Reckless_Satoshi 741fba11d5 Add swappable baseurls (#316)
* Add swappable baseurls (network and coordinators)

* Add testnet bitcoin styles

* Small fixes

* Small fixes
2022-11-07 16:45:05 +00:00

14 lines
640 B
TypeScript

import ApiWebClient from './ApiWebClient';
import ApiNativeClient from './ApiNativeClient';
export interface ApiClient {
post: (baseUrl: string, path: string, body: object) => Promise<object | undefined>;
put: (baseUrl: string, path: string, body: object) => Promise<object | undefined>;
get: (baseUrl: string, path: string) => Promise<object | undefined>;
delete: (baseUrl: string, path: string) => Promise<object | undefined>;
fileImageUrl?: (baseUrl: string, path: string) => Promise<string | undefined>;
}
export const apiClient: ApiClient =
window.ReactNativeWebView != null ? new ApiNativeClient() : new ApiWebClient();