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

@nimiq/fastspot-api

Package Overview
Dependencies
Maintainers
8
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nimiq/fastspot-api - npm Package Compare versions

Comparing version 1.1.1 to 1.2.0

13

dist/api.js

@@ -14,3 +14,3 @@ import { SwapAsset, } from './types';

throw new Error('API URL and key not set, call init() first');
return fetch(`${API_URL}${path}`, {
const response = await fetch(`${API_URL}${path}`, {
method,

@@ -22,9 +22,8 @@ headers: {

...(body ? { body: JSON.stringify(body) } : {}),
}).then(async (res) => {
if (!res.ok) {
const error = await res.json();
throw new Error(error.detail);
}
return res.json();
});
if (!response.ok) {
const error = await response.json();
throw new Error(error.detail);
}
return response.json();
}

@@ -31,0 +30,0 @@ export async function getEstimate(from, to) {

@@ -32,2 +32,3 @@ import { SwapAsset, } from './types';

serviceNetworkFee: coinsToUnits(asset, from.finalizeNetworkFee.total, true),
serviceEscrowFee: coinsToUnits(asset, from.operatingNetworkFee.total, true),
};

@@ -43,2 +44,3 @@ }

serviceNetworkFee: coinsToUnits(asset, to.fundingNetworkFee.total, true),
serviceEscrowFee: coinsToUnits(asset, to.operatingNetworkFee.total, true),
};

@@ -45,0 +47,0 @@ }

@@ -36,3 +36,3 @@ export declare enum SwapAsset {

fundingNetworkFee: FastspotFee;
operatingNetworkFee: FastspotFee;
operatingNetworkFee: Omit<FastspotFee, 'perUnit'>;
finalizeNetworkFee: FastspotFee;

@@ -127,2 +127,3 @@ };

serviceNetworkFee: number;
serviceEscrowFee: number;
};

@@ -129,0 +130,0 @@ export declare type Estimate = {

{
"name": "@nimiq/fastspot-api",
"version": "1.1.1",
"version": "1.2.0",
"description": "Typescript library to interact with the Fastspot API",

@@ -5,0 +5,0 @@ "repository": "git@github.com:nimiq/fastspot-api.git",

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