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

fireblocks-sdk

Package Overview
Dependencies
Maintainers
6
Versions
138
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fireblocks-sdk - npm Package Compare versions

Comparing version 2.4.0 to 2.4.1

7

CHANGELOG.md

@@ -5,2 +5,8 @@ ### Changelog

#### [v2.4.1](https://github.com/fireblocks/fireblocks-sdk-js/compare/v2.4.0...v2.4.1)
> 21 November 2022
- add proxy support for axios instance [`#116`](https://github.com/fireblocks/fireblocks-sdk-js/pull/116)
#### [v2.4.0](https://github.com/fireblocks/fireblocks-sdk-js/compare/v2.3.2...v2.4.0)

@@ -11,2 +17,3 @@

- Add network related functionality [`#101`](https://github.com/fireblocks/fireblocks-sdk-js/pull/101)
- Added method to get all audits for selected time period [`#114`](https://github.com/fireblocks/fireblocks-sdk-js/pull/114)

@@ -13,0 +20,0 @@ #### [v2.3.2](https://github.com/fireblocks/fireblocks-sdk-js/compare/v2.3.1...v2.3.2)

2

dist/api-client.d.ts
import { IAuthProvider } from "./iauth-provider";
import { RequestOptions } from "./types";
import { AxiosProxyConfig } from "axios";
export declare class ApiClient {

@@ -10,2 +11,3 @@ private authProvider;

timeoutInMs?: number;
proxyConf?: AxiosProxyConfig | false;
});

@@ -12,0 +14,0 @@ issueGetRequest(path: string, pageMode?: boolean): Promise<any>;

3

dist/api-client.js

@@ -23,3 +23,4 @@ "use strict";

this.axiosInstance = axios_1.default.create({
baseURL: this.apiBaseUrl
baseURL: this.apiBaseUrl,
proxy: this.options.proxyConf,
});

@@ -26,0 +27,0 @@ }

"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.ApiTokenProvider = void 0;
const jsonwebtoken_1 = __importDefault(require("jsonwebtoken"));
const crypto_1 = __importDefault(require("crypto"));
const jwt = __importStar(require("jsonwebtoken"));
const crypto = __importStar(require("crypto"));
const uuid_1 = require("uuid");

@@ -16,3 +32,3 @@ class ApiTokenProvider {

signJwt(path, bodyJson) {
const token = jsonwebtoken_1.default.sign({
const token = jwt.sign({
uri: path,

@@ -23,3 +39,3 @@ nonce: uuid_1.v4(),

sub: this.apiKey,
bodyHash: crypto_1.default.createHash("sha256").update(JSON.stringify(bodyJson || "")).digest().toString("hex")
bodyHash: crypto.createHash("sha256").update(JSON.stringify(bodyJson || "")).digest().toString("hex")
}, this.privateKey, { algorithm: "RS256" });

@@ -26,0 +42,0 @@ return token;

import { IAuthProvider } from "./iauth-provider";
import { AllocateFundsRequest, AssetResponse, AssetTypeResponse, CancelTransactionResponse, ConvertExchangeAssetResponse, CreateTransactionResponse, CreateTransferTicketArgs, CreateTransferTicketResponse, DeallocateFundsRequest, DepositAddressResponse, EstimateFeeResponse, EstimateTransactionFeeResponse, ExchangeResponse, ExecuteTermArgs, ExternalWalletAsset, FiatAccountResponse, GasStationInfo, GenerateAddressResponse, InternalWalletAsset, MaxSpendableAmountResponse, NetworkConnectionResponse, OffExchangeEntityResponse, OperationSuccessResponse, PagedVaultAccountsRequestFilters, PagedVaultAccountsResponse, PublicKeyInfoArgs, PublicKeyInfoForVaultAccountArgs, RequestOptions, ResendWebhooksResponse, TermResponse, TransactionArguments, TransactionFilter, TransactionPageFilter, TransactionPageResponse, TransactionResponse, TransferTicketResponse, User, ValidateAddressResponse, VaultAccountResponse, VaultAccountsFilter, VaultAssetResponse, VaultBalancesFilter, WalletContainerResponse, SetFeePayerConfiguration, FeePayerConfiguration, NetworkConnectionRoutingPolicy, NetworkIdRoutingPolicy, NetworkIdResponse, TimePeriod, AuditsResponse } from "./types";
import { AxiosProxyConfig } from "axios";
export * from "./types";
export interface SDKOptions {
timeoutInMs: number;
proxy: AxiosProxyConfig | false;
}

@@ -7,0 +9,0 @@ export declare class FireblocksSDK {

@@ -40,7 +40,7 @@ "use strict";

constructor(privateKey, apiKey, apiBaseUrl = "https://api.fireblocks.io", authProvider = undefined, sdkOptions) {
this.authProvider = authProvider !== null && authProvider !== void 0 ? authProvider : new api_token_provider_1.ApiTokenProvider(privateKey, apiKey);
if (apiBaseUrl) {
this.authProvider = !!authProvider ? authProvider : new api_token_provider_1.ApiTokenProvider(privateKey, apiKey);
if (!!apiBaseUrl) {
this.apiBaseUrl = apiBaseUrl;
}
this.apiClient = new api_client_1.ApiClient(this.authProvider, this.apiBaseUrl, { timeoutInMs: sdkOptions === null || sdkOptions === void 0 ? void 0 : sdkOptions.timeoutInMs });
this.apiClient = new api_client_1.ApiClient(this.authProvider, this.apiBaseUrl, { timeoutInMs: sdkOptions === null || sdkOptions === void 0 ? void 0 : sdkOptions.timeoutInMs, proxyConf: sdkOptions === null || sdkOptions === void 0 ? void 0 : sdkOptions.proxy });
}

@@ -47,0 +47,0 @@ /**

{
"name": "fireblocks-sdk",
"version": "2.4.0",
"version": "2.4.1",
"main": "dist/fireblocks-sdk.js",

@@ -5,0 +5,0 @@ "types": "dist/fireblocks-sdk.d.ts",

Sorry, the diff of this file is not supported yet

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