@tatumio/shared-core
Advanced tools
Comparing version 2.1.3 to 2.1.4
{ | ||
"name": "@tatumio/shared-core", | ||
"version": "2.1.3", | ||
"version": "2.1.4", | ||
"license": "MIT", | ||
@@ -8,3 +8,3 @@ "main": "./src/index.js", | ||
"dependencies": { | ||
"@tatumio/api-client": "2.1.3", | ||
"@tatumio/api-client": "2.1.4", | ||
"axios": "^0.26.0", | ||
@@ -11,0 +11,0 @@ "form-data": "^4.0.0", |
@@ -5,4 +5,6 @@ import { Blockchain, EvmBasedBlockchain } from './models/Blockchain'; | ||
post: <T_1 = any, R_1 = import("axios").AxiosResponse<T_1, any>, D_1 = any>(url: string, data?: D_1, config?: import("axios").AxiosRequestConfig<D_1>) => Promise<R_1>; | ||
axios: import("axios").AxiosInstance; | ||
CancelToken: import("axios").CancelTokenStatic; | ||
web3Endpoint: (blockchain: EvmBasedBlockchain, url: string, apiKey: string) => string; | ||
rpcEndpoint: (blockchain: Blockchain, url: string, apiKey: string) => string; | ||
}; |
@@ -33,5 +33,10 @@ "use strict"; | ||
}; | ||
const isWebWorker = typeof self === 'object' && | ||
self.constructor && | ||
self.constructor.name === 'DedicatedWorkerGlobalScope'; | ||
exports.httpHelper = { | ||
get: axios_1.default.get, | ||
post: axios_1.default.post, | ||
axios: axios_1.default.create({ adapter: isWebWorker ? api_client_1.fetchAdapter : undefined }), | ||
CancelToken: axios_1.default.CancelToken, | ||
web3Endpoint: (blockchain, url, apiKey) => { | ||
@@ -38,0 +43,0 @@ return `${url}/${api_client_1.TATUM_API_CONSTANTS.API_VERSION}/${EndpointsMapping[blockchain]}/web3/${apiKey}`; |
Sorry, the diff of this file is not supported yet
40065
607
+ Added@tatumio/api-client@2.1.4(transitive)
- Removed@tatumio/api-client@2.1.3(transitive)
Updated@tatumio/api-client@2.1.4