Huge News!Announcing our $40M Series B led by Abstract Ventures.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.7.0 to 1.8.0

4

dist/api.d.ts

@@ -8,3 +8,3 @@ import { RequestAsset, SwapAsset, Estimate, PreSwap, ContractWithEstimate, Swap, Limits, UserLimits, AssetList, ReferralCodes } from './types';

export declare function confirmSwap(swap: PreSwap, redeem: {
asset: SwapAsset.NIM | SwapAsset.BTC | SwapAsset.USDC;
asset: SwapAsset.NIM | SwapAsset.BTC | SwapAsset.USDC | SwapAsset.USDC_MATIC;
address: string;

@@ -18,3 +18,3 @@ } | {

}, refund?: {
asset: SwapAsset.NIM | SwapAsset.BTC | SwapAsset.USDC;
asset: SwapAsset.NIM | SwapAsset.BTC | SwapAsset.USDC | SwapAsset.USDC_MATIC;
address: string;

@@ -21,0 +21,0 @@ } | {

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

// Some fees for USDC are provided in MATIC, and must be converted accordingly
if (asset === SwapAsset.USDC && options.treatUsdcAsMatic)
if ((asset === SwapAsset.USDC || asset === SwapAsset.USDC_MATIC) && options.treatUsdcAsMatic)
decimals = 18;

@@ -44,2 +44,3 @@ if (typeof decimals === 'undefined')

case SwapAsset.USDC:
case SwapAsset.USDC_MATIC:
htlc = {

@@ -46,0 +47,0 @@ address: contract.id.substring(0, 2) === '0x' ? contract.id : `0x${contract.id}`,

@@ -5,2 +5,3 @@ export declare enum SwapAsset {

USDC = "USDC",
USDC_MATIC = "USDC_MATIC",
EUR = "EUR"

@@ -19,2 +20,3 @@ }

readonly USDC: 6;
readonly USDC_MATIC: 6;
readonly EUR: 2;

@@ -107,3 +109,3 @@ readonly USD: 2;

scriptBytes: string;
} : T extends SwapAsset.USDC ? {
} : T extends SwapAsset.USDC | SwapAsset.USDC_MATIC ? {
address: string;

@@ -219,3 +221,3 @@ data?: string;

status: ContractStatus;
htlc: T extends SwapAsset.NIM ? NimHtlcDetails : T extends SwapAsset.BTC ? BtcHtlcDetails : T extends SwapAsset.USDC ? UsdcHtlcDetails : T extends SwapAsset.EUR ? EurHtlcDetails : never;
htlc: T extends SwapAsset.NIM ? NimHtlcDetails : T extends SwapAsset.BTC ? BtcHtlcDetails : T extends SwapAsset.USDC | SwapAsset.USDC_MATIC ? UsdcHtlcDetails : T extends SwapAsset.EUR ? EurHtlcDetails : never;
};

@@ -222,0 +224,0 @@ export declare type ContractWithEstimate<T extends SwapAsset> = Estimate & {

@@ -6,2 +6,3 @@ export var SwapAsset;

SwapAsset["USDC"] = "USDC";
SwapAsset["USDC_MATIC"] = "USDC_MATIC";
SwapAsset["EUR"] = "EUR";

@@ -17,2 +18,3 @@ })(SwapAsset || (SwapAsset = {}));

[SwapAsset.USDC]: 6,
[SwapAsset.USDC_MATIC]: 6,
[SwapAsset.EUR]: 2,

@@ -19,0 +21,0 @@ [ReferenceAsset.USD]: 2,

{
"name": "@nimiq/fastspot-api",
"version": "1.7.0",
"version": "1.8.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