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

@synonymdev/blocktank-lsp-http-client

Package Overview
Dependencies
Maintainers
5
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@synonymdev/blocktank-lsp-http-client - npm Package Compare versions

Comparing version 0.9.0 to 0.10.0

dist/shared/IBt0ConfMinTxFeeWindow.d.ts

12

dist/BlocktankClient.d.ts
import { IBtInfo, IBtOrder, ICJitEntry } from './shared';
import { IBtEstimateFeeResponse } from './shared/IBtEstimateFeeResponse';
import { IBt0ConfMinTxFeeWindow } from './shared/IBt0ConfMinTxFeeWindow';
export interface ICreateOrderOptions {

@@ -52,5 +54,3 @@ /**

*/
estimateOrderFee(lspBalanceSat: number, channelExpiryWeeks: number, options?: Partial<ICreateOrderOptions>): Promise<{
feeSat: number;
}>;
estimateOrderFee(lspBalanceSat: number, channelExpiryWeeks: number, options?: Partial<ICreateOrderOptions>): Promise<IBtEstimateFeeResponse>;
/**

@@ -84,7 +84,3 @@ * Create a new channel order.

openChannel(orderId: string, connectionStringOrPubkey: string, announceChannel: boolean): Promise<IBtOrder>;
getMin0ConfTxFee(orderId: string): Promise<{
id: string;
validityEndsAt: string;
satPerVByte: number;
}>;
getMin0ConfTxFee(orderId: string): Promise<IBt0ConfMinTxFeeWindow>;
/**

@@ -91,0 +87,0 @@ * Create a new CJIT entry for Just-In-Time channel open.

{
"name": "@synonymdev/blocktank-lsp-http-client",
"version": "0.9.0",
"version": "0.10.0",
"description": "Blocktank Http Api Client",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -19,3 +19,3 @@ import {BlocktankClient} from './BlocktankClient'

const firstNodeId = info.nodes[0].pubkey;
const {feeSat} = await client.estimateOrderFee(100*1000, 10, {
const estimate = await client.estimateOrderFee(100*1000, 10, {
clientBalanceSat: 20*1000,

@@ -26,3 +26,4 @@ couponCode: 'test',

})
expect(feeSat).toBeGreaterThan(0)
expect(estimate.feeSat).toBeGreaterThan(0)
expect(estimate.min0ConfTxFee.satPerVByte).toBeGreaterThan(0)
})

@@ -29,0 +30,0 @@

import axios from 'axios';
import { IBtInfo, IBtOrder, ICJitEntry } from './shared';
import { IBtEstimateFeeResponse } from './shared/IBtEstimateFeeResponse';
import { IBt0ConfMinTxFeeWindow } from './shared/IBt0ConfMinTxFeeWindow';

@@ -88,6 +90,7 @@ export interface ICreateOrderOptions {

*/
async estimateOrderFee(lspBalanceSat: number, channelExpiryWeeks: number, options: Partial<ICreateOrderOptions> = {}): Promise<{feeSat: number}> {
async estimateOrderFee(lspBalanceSat: number, channelExpiryWeeks: number, options: Partial<ICreateOrderOptions> = {}): Promise<IBtEstimateFeeResponse> {
const opts: any = Object.assign({}, defaultCreateOrderOptions, options)
opts.zeroConf = opts.turboChannel
delete opts.turboChannel
return await this.wrapErrorHandler(`Failed to estimate channel order fee.`, async () => {

@@ -169,3 +172,3 @@ const response = await axios.post(this.baseUrl + '/channels/estimate-fee', {

async getMin0ConfTxFee(orderId: string): Promise<{ id: string, validityEndsAt: string, satPerVByte: number }> {
async getMin0ConfTxFee(orderId: string): Promise<IBt0ConfMinTxFeeWindow> {
const window = await this.wrapErrorHandler(`Failed to fetch order ${orderId}.`, async () => {

@@ -172,0 +175,0 @@ const response = await axios.get(this.baseUrl + '/channels/' + orderId + '/min-0conf-tx-fee')

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