New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@tatumio/shared-core

Package Overview
Dependencies
Maintainers
3
Versions
339
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tatumio/shared-core - npm Package Compare versions

Comparing version 2.1.14 to 2.1.15

4

package.json
{
"name": "@tatumio/shared-core",
"version": "2.1.14",
"version": "2.1.15",
"license": "MIT",

@@ -8,3 +8,3 @@ "main": "./src/index.js",

"dependencies": {
"@tatumio/api-client": "2.1.14",
"@tatumio/api-client": "2.1.15",
"axios": "^0.26.0",

@@ -11,0 +11,0 @@ "form-data": "^4.0.0",

import { AxiosRequestConfig } from 'axios';
import { Blockchain, EvmBasedBlockchain } from './models/Blockchain';
export declare const httpCommon: {
web3Endpoint: (blockchain: EvmBasedBlockchain, url: string, apiKey: string) => string;
rpcEndpoint: (blockchain: Blockchain, url: string, apiKey: string) => string;
};
export declare const httpAxios: {
web3Endpoint: (blockchain: EvmBasedBlockchain, url: string, apiKey: string) => string;
rpcEndpoint: (blockchain: Blockchain, url: string, apiKey: string) => string;
get: <T = any, R = import("axios").AxiosResponse<T, any>, D = any>(url: string, config?: AxiosRequestConfig<D>) => Promise<R>;
post: <T_1 = any, R_1 = import("axios").AxiosResponse<T_1, any>, D_1 = any>(url: string, data?: D_1, config?: AxiosRequestConfig<D_1>) => Promise<R_1>;
axios: import("axios").AxiosInstance;
CancelToken: import("axios").CancelTokenStatic;
};
export declare const httpFetch: {
web3Endpoint: (blockchain: EvmBasedBlockchain, url: string, apiKey: string) => string;
rpcEndpoint: (blockchain: Blockchain, url: string, apiKey: string) => string;
get: (url: string, config?: any) => Promise<any>;
post: (url: string, body: any, config?: any) => Promise<any>;
};
export declare const httpHelper: {
web3Endpoint: (blockchain: EvmBasedBlockchain, url: string, apiKey: string) => string;
rpcEndpoint: (blockchain: Blockchain, url: string, apiKey: string) => string;
get: <T = any, R = import("axios").AxiosResponse<T, any>, D = any>(url: string, config?: AxiosRequestConfig<D>) => Promise<R>;

@@ -8,4 +28,7 @@ post: <T_1 = any, R_1 = import("axios").AxiosResponse<T_1, any>, D_1 = any>(url: string, data?: D_1, config?: AxiosRequestConfig<D_1>) => Promise<R_1>;

CancelToken: import("axios").CancelTokenStatic;
} | {
web3Endpoint: (blockchain: EvmBasedBlockchain, url: string, apiKey: string) => string;
rpcEndpoint: (blockchain: Blockchain, url: string, apiKey: string) => string;
get: (url: string, config?: any) => Promise<any>;
post: (url: string, body: any, config?: any) => Promise<any>;
};
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.httpHelper = void 0;
exports.httpHelper = exports.httpFetch = exports.httpAxios = exports.httpCommon = void 0;
const tslib_1 = require("tslib");

@@ -36,7 +36,3 @@ const axios_1 = tslib_1.__importDefault(require("axios"));

['DedicatedWorkerGlobalScope', 'ServiceWorkerGlobalScope'].includes(self.constructor.name);
exports.httpHelper = {
get: axios_1.default.get,
post: axios_1.default.post,
axios: axios_1.default.create(),
CancelToken: axios_1.default.CancelToken,
exports.httpCommon = {
web3Endpoint: (blockchain, url, apiKey) => {

@@ -50,2 +46,18 @@ return `${url}/${api_client_1.TATUM_API_CONSTANTS.API_VERSION}/${EndpointsMapping[blockchain]}/web3/${apiKey}`;

};
exports.httpAxios = Object.assign({ get: axios_1.default.get, post: axios_1.default.post, axios: axios_1.default.create(), CancelToken: axios_1.default.CancelToken }, exports.httpCommon);
exports.httpFetch = Object.assign({ get: (url, config) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
const response = yield fetch(url, {
method: 'GET',
headers: Object.assign(Object.assign({}, config === null || config === void 0 ? void 0 : config.headers), { 'Content-Type': 'application/json' }),
});
return response.json();
}), post: (url, body, config) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
const response = yield fetch(url, {
method: 'POST',
headers: Object.assign(Object.assign({}, config === null || config === void 0 ? void 0 : config.headers), { 'Content-Type': 'application/json' }),
body: JSON.stringify(body),
});
return response.json();
}) }, exports.httpCommon);
exports.httpHelper = isWebWorker ? exports.httpFetch : exports.httpAxios;
//# sourceMappingURL=http.common.js.map

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc