Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

bitski-provider

Package Overview
Dependencies
Maintainers
6
Versions
89
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bitski-provider - npm Package Compare versions

Comparing version 2.0.0-beta.4 to 2.0.0-beta.5

6

CHANGELOG.md
# bitski-provider
## 2.0.0-beta.5
### Patch Changes
- [#313](https://github.com/BitskiCo/bitski-js/pull/313) [`d75da8a`](https://github.com/BitskiCo/bitski-js/commit/d75da8ae09da9b834c519c7c7a87a10e3cc66b81) Thanks [@pzuraq](https://github.com/pzuraq)! - Always add params to RPC requests
## 2.0.0-beta.4

@@ -4,0 +10,0 @@

2

dist/bitski-provider.js

@@ -43,3 +43,3 @@ import { createAsyncMiddleware, JsonRpcEngine, } from 'json-rpc-engine';

this.activeSubs = new Set();
this.config = Object.assign(Object.assign({}, config), { fetch: (_a = config.fetch) !== null && _a !== void 0 ? _a : fetch, additionalHeaders: Object.assign({ 'X-API-KEY': config.clientId, 'X-CLIENT-ID': config.clientId, 'X-CLIENT-VERSION': "bitski-provider-v2.0.0-beta.4" }, ((_b = config.additionalHeaders) !== null && _b !== void 0 ? _b : {})), apiBaseUrl: (_c = config.apiBaseUrl) !== null && _c !== void 0 ? _c : BITSKI_API_BASE_URL, signerBaseUrl: (_d = config.signerBaseUrl) !== null && _d !== void 0 ? _d : BITSKI_SIGNER_BASE_URL, store: (_e = config.store) !== null && _e !== void 0 ? _e : new LocalStorageStore(), sign: (_f = config.sign) !== null && _f !== void 0 ? _f : createBrowserSigner() });
this.config = Object.assign(Object.assign({}, config), { fetch: (_a = config.fetch) !== null && _a !== void 0 ? _a : fetch, additionalHeaders: Object.assign({ 'X-API-KEY': config.clientId, 'X-CLIENT-ID': config.clientId, 'X-CLIENT-VERSION': "bitski-provider-v2.0.0-beta.5" }, ((_b = config.additionalHeaders) !== null && _b !== void 0 ? _b : {})), apiBaseUrl: (_c = config.apiBaseUrl) !== null && _c !== void 0 ? _c : BITSKI_API_BASE_URL, signerBaseUrl: (_d = config.signerBaseUrl) !== null && _d !== void 0 ? _d : BITSKI_SIGNER_BASE_URL, store: (_e = config.store) !== null && _e !== void 0 ? _e : new LocalStorageStore(), sign: (_f = config.sign) !== null && _f !== void 0 ? _f : createBrowserSigner() });
this.store = new BitskiProviderStateStore(this.config.store);

@@ -46,0 +46,0 @@ // Setup the engine

@@ -79,2 +79,5 @@ import { ethErrors, EthereumRpcError, EthereumProviderError } from 'eth-rpc-errors';

export const fetchJsonRpcWithRetry = async (fetchFn, retryCount, url, init) => {
if (init.body && !init.body.params) {
init.body.params = [];
}
const { result, error } = (await fetchJsonWithRetry(fetchFn, retryCount, url, init));

@@ -81,0 +84,0 @@ if (error) {

@@ -49,3 +49,3 @@ "use strict";

this.activeSubs = new Set();
this.config = Object.assign(Object.assign({}, config), { fetch: (_a = config.fetch) !== null && _a !== void 0 ? _a : fetch, additionalHeaders: Object.assign({ 'X-API-KEY': config.clientId, 'X-CLIENT-ID': config.clientId, 'X-CLIENT-VERSION': "bitski-provider-v2.0.0-beta.4" }, ((_b = config.additionalHeaders) !== null && _b !== void 0 ? _b : {})), apiBaseUrl: (_c = config.apiBaseUrl) !== null && _c !== void 0 ? _c : constants_1.BITSKI_API_BASE_URL, signerBaseUrl: (_d = config.signerBaseUrl) !== null && _d !== void 0 ? _d : constants_1.BITSKI_SIGNER_BASE_URL, store: (_e = config.store) !== null && _e !== void 0 ? _e : new store_1.LocalStorageStore(), sign: (_f = config.sign) !== null && _f !== void 0 ? _f : (0, browser_1.default)() });
this.config = Object.assign(Object.assign({}, config), { fetch: (_a = config.fetch) !== null && _a !== void 0 ? _a : fetch, additionalHeaders: Object.assign({ 'X-API-KEY': config.clientId, 'X-CLIENT-ID': config.clientId, 'X-CLIENT-VERSION': "bitski-provider-v2.0.0-beta.5" }, ((_b = config.additionalHeaders) !== null && _b !== void 0 ? _b : {})), apiBaseUrl: (_c = config.apiBaseUrl) !== null && _c !== void 0 ? _c : constants_1.BITSKI_API_BASE_URL, signerBaseUrl: (_d = config.signerBaseUrl) !== null && _d !== void 0 ? _d : constants_1.BITSKI_SIGNER_BASE_URL, store: (_e = config.store) !== null && _e !== void 0 ? _e : new store_1.LocalStorageStore(), sign: (_f = config.sign) !== null && _f !== void 0 ? _f : (0, browser_1.default)() });
this.store = new store_1.BitskiProviderStateStore(this.config.store);

@@ -52,0 +52,0 @@ // Setup the engine

@@ -11,4 +11,4 @@ import { JsonRpcRequest } from 'json-rpc-engine';

headers: Record<string, string>;
body?: JsonRpcRequest<unknown>;
body?: JsonRpcRequest<unknown[]>;
credentials?: string;
}) => Promise<unknown>;

@@ -83,2 +83,5 @@ "use strict";

const fetchJsonRpcWithRetry = async (fetchFn, retryCount, url, init) => {
if (init.body && !init.body.params) {
init.body.params = [];
}
const { result, error } = (await (0, exports.fetchJsonWithRetry)(fetchFn, retryCount, url, init));

@@ -85,0 +88,0 @@ if (error) {

@@ -12,3 +12,3 @@ {

},
"version": "2.0.0-beta.4",
"version": "2.0.0-beta.5",
"scripts": {

@@ -15,0 +15,0 @@ "test": "jest",

@@ -116,6 +116,10 @@ import { ethErrors, EthereumRpcError, EthereumProviderError } from 'eth-rpc-errors';

headers: Record<string, string>;
body?: JsonRpcRequest<unknown>;
body?: JsonRpcRequest<unknown[]>;
credentials?: string;
},
): Promise<unknown> => {
if (init.body && !init.body.params) {
init.body.params = [];
}
const { result, error } = (await fetchJsonWithRetry(fetchFn, retryCount, url, init)) as {

@@ -122,0 +126,0 @@ result: unknown;

@@ -81,2 +81,3 @@ import { EthMethod } from 'eth-provider-types';

method: 'eth_accounts',
params: [],
});

@@ -83,0 +84,0 @@

Sorry, the diff of this file is not supported yet

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