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

bitski-provider

Package Overview
Dependencies
Maintainers
1
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 0.4.1 to 0.4.2

6

dist/subproviders/authenticated-fetch.js

@@ -16,2 +16,5 @@ import retry from 'async/retry';

'eth_sendTransaction',
'eth_signTransaction',
'eth_signTypedData',
'personal_sign',
'eth_sign',

@@ -37,2 +40,3 @@ ];

super({ rpcUrl, debug });
this.authenticatedMethods = AUTHENTICATED_METHODS;
this.accessTokenProvider = accessTokenProvider;

@@ -62,3 +66,3 @@ this.defaultHeaders = defaultHeaders;

requiresAuthentication(payload) {
return AUTHENTICATED_METHODS.some((method) => method === payload.method);
return this.authenticatedMethods.some((method) => method === payload.method);
}

@@ -65,0 +69,0 @@ generateParameters(payload, accessToken) {

5

lib/subproviders/authenticated-fetch.d.ts
import FetchSubprovider from 'web3-provider-engine/subproviders/fetch';
import { AccessTokenProvider } from '../auth/access-token-provider';
export declare class AuthenticatedFetchSubprovider extends FetchSubprovider {
private accessTokenProvider;
private defaultHeaders;
protected authenticatedMethods: string[];
protected accessTokenProvider: AccessTokenProvider;
protected defaultHeaders: object;
constructor(rpcUrl: string, debug: boolean, accessTokenProvider: AccessTokenProvider, defaultHeaders?: object);

@@ -7,0 +8,0 @@ handleRequest(payload: any, next: any, end: any): void;

@@ -43,2 +43,5 @@ var __extends = (this && this.__extends) || (function () {

'eth_sendTransaction',
'eth_signTransaction',
'eth_signTypedData',
'personal_sign',
'eth_sign',

@@ -66,2 +69,3 @@ ];

var _this = _super.call(this, { rpcUrl: rpcUrl, debug: debug }) || this;
_this.authenticatedMethods = AUTHENTICATED_METHODS;
_this.accessTokenProvider = accessTokenProvider;

@@ -93,3 +97,3 @@ _this.defaultHeaders = defaultHeaders;

AuthenticatedFetchSubprovider.prototype.requiresAuthentication = function (payload) {
return AUTHENTICATED_METHODS.some(function (method) { return method === payload.method; });
return this.authenticatedMethods.some(function (method) { return method === payload.method; });
};

@@ -96,0 +100,0 @@ AuthenticatedFetchSubprovider.prototype.generateParameters = function (payload, accessToken) {

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

},
"version": "0.4.1",
"version": "0.4.2",
"scripts": {

@@ -50,3 +50,3 @@ "build": "tsc -p tsconfig.main.json && tsc -p tsconfig.module.json",

},
"gitHead": "7590499b0cc0ff973c875571ecb8ef70468a41f6"
"gitHead": "6bcd73a95417da50eadf64ce5ab092c15aa22d8c"
}

@@ -20,2 +20,5 @@ import retry from 'async/retry';

'eth_sendTransaction',
'eth_signTransaction',
'eth_signTypedData',
'personal_sign',
'eth_sign',

@@ -43,7 +46,9 @@ ];

export class AuthenticatedFetchSubprovider extends FetchSubprovider {
private accessTokenProvider: AccessTokenProvider;
private defaultHeaders: object;
protected authenticatedMethods: string[];
protected accessTokenProvider: AccessTokenProvider;
protected defaultHeaders: object;
constructor(rpcUrl: string, debug: boolean, accessTokenProvider: AccessTokenProvider, defaultHeaders: object = {}) {
super({ rpcUrl, debug });
this.authenticatedMethods = AUTHENTICATED_METHODS;
this.accessTokenProvider = accessTokenProvider;

@@ -76,3 +81,3 @@ this.defaultHeaders = defaultHeaders;

protected requiresAuthentication(payload) {
return AUTHENTICATED_METHODS.some((method) => method === payload.method);
return this.authenticatedMethods.some((method) => method === payload.method);
}

@@ -79,0 +84,0 @@

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