bitski-node
Advanced tools
Comparing version 0.7.1 to 0.7.2
import { AccessTokenProvider, BitskiEngine } from 'bitski-provider'; | ||
import { ProviderOptions } from './index'; | ||
import TransactionOperator from './transaction-operator'; | ||
/** | ||
@@ -9,2 +10,3 @@ * A Bitski powered web3 provider that is designed for use in Node | ||
clientId: string; | ||
transactionOperator: TransactionOperator; | ||
private tokenProvider; | ||
@@ -11,0 +13,0 @@ private headers; |
@@ -5,2 +5,17 @@ "use strict"; | ||
const fetch_1 = require("./subproviders/fetch"); | ||
const transaction_operator_1 = require("./transaction-operator"); | ||
function chainIdFromNetworkName(networkName) { | ||
switch (networkName) { | ||
case 'ropsten': | ||
return 3; | ||
case 'rinkeby': | ||
return 4; | ||
case 'goerli': | ||
return 5; | ||
case 'kovan': | ||
return 42; | ||
default: | ||
return 1; | ||
} | ||
} | ||
/** | ||
@@ -32,2 +47,3 @@ * A Bitski powered web3 provider that is designed for use in Node | ||
this.addSubproviders(); | ||
this.transactionOperator = new transaction_operator_1.default(tokenProvider, chainIdFromNetworkName(networkName)); | ||
} | ||
@@ -34,0 +50,0 @@ addSubproviders() { |
{ | ||
"name": "bitski-node", | ||
"version": "0.7.1", | ||
"version": "0.7.2", | ||
"description": "Bitski SDK for Node environments", | ||
@@ -22,14 +22,16 @@ "main": "dist/index.js", | ||
"dependencies": { | ||
"bitski-provider": "^0.10.1", | ||
"simple-oauth2": "^2.2.0" | ||
"bitski-provider": "^0.10.8", | ||
"simple-oauth2": "^3.4.0", | ||
"uuid": "^7.0.3" | ||
}, | ||
"devDependencies": { | ||
"@types/node": "^10.12.12", | ||
"@types/jest": "^23.3.2", | ||
"@types/jest": "^23.3.14", | ||
"@types/node": "^10.17.19", | ||
"@types/node-fetch": "^2.5.6", | ||
"jest": "^23.6.0", | ||
"typescript": "^3.0.1", | ||
"jest-fetch-mock": "^1.6.6", | ||
"jest-junit": "^5.1.0", | ||
"ts-jest": "^23.10.0", | ||
"tslint": "^5.11.0" | ||
"jest-fetch-mock": "^1.7.5", | ||
"jest-junit": "^5.2.0", | ||
"ts-jest": "^23.10.5", | ||
"tslint": "^5.20.1", | ||
"typescript": "^3.8.3" | ||
}, | ||
@@ -36,0 +38,0 @@ "jest": { |
import { AccessTokenProvider, BitskiEngine } from 'bitski-provider'; | ||
import { ProviderOptions } from './index'; | ||
import { NodeFetchSubprovider } from './subproviders/fetch'; | ||
import TransactionOperator from './transaction-operator'; | ||
function chainIdFromNetworkName(networkName?: string): number { | ||
switch (networkName) { | ||
case 'ropsten': | ||
return 3; | ||
case 'rinkeby': | ||
return 4; | ||
case 'goerli': | ||
return 5; | ||
case 'kovan': | ||
return 42; | ||
default: | ||
return 1; | ||
} | ||
} | ||
/** | ||
@@ -11,2 +27,3 @@ * A Bitski powered web3 provider that is designed for use in Node | ||
public clientId: string; | ||
public transactionOperator: TransactionOperator; | ||
private tokenProvider: AccessTokenProvider; | ||
@@ -40,2 +57,4 @@ private headers: object; | ||
this.addSubproviders(); | ||
this.transactionOperator = new TransactionOperator(tokenProvider, chainIdFromNetworkName(networkName)); | ||
} | ||
@@ -42,0 +61,0 @@ |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 2 instances in 1 package
41
854
2
44415
3
9
+ Addeduuid@^7.0.3
+ Added@hapi/formula@1.2.0(transitive)
+ Added@hapi/joi@16.1.8(transitive)
+ Added@hapi/pinpoint@1.0.2(transitive)
+ Addedsimple-oauth2@3.4.0(transitive)
+ Addeduuid@7.0.3(transitive)
- Removed@hapi/bourne@1.3.2(transitive)
- Removed@hapi/joi@15.1.1(transitive)
- Removedboom@7.3.0(transitive)
- Removedbourne@1.3.3(transitive)
- Removedhoek@6.1.3(transitive)
- Removedsimple-oauth2@2.5.2(transitive)
- Removedwreck@14.2.0(transitive)
Updatedbitski-provider@^0.10.8
Updatedsimple-oauth2@^3.4.0