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
4
Versions
34
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.3.0 to 0.3.1

4

CHANGELOG.md
# Changelog
## 0.3.1 - 12.09.2023
- (fix) Made `BlocktankClient` urls consistent, removing `v2`.
## 0.3.0 - 12.09.2023

@@ -4,0 +8,0 @@

12

dist/BlocktankClient.js

@@ -54,3 +54,3 @@ "use strict";

return await this.wrapErrorHandler('Failed to get info.', async () => {
const response = await axios_1.default.get(this.baseUrl + '/v2/info');
const response = await axios_1.default.get(this.baseUrl + '/info');
return response.data;

@@ -69,3 +69,3 @@ });

return await this.wrapErrorHandler(`Failed to create order.`, async () => {
const response = await axios_1.default.post(this.baseUrl + '/v2/channels', {
const response = await axios_1.default.post(this.baseUrl + '/channels', {
...opts,

@@ -85,3 +85,3 @@ lspBalanceSat: lspBalanceSat,

return await this.wrapErrorHandler(`Failed to fetch order ${orderId}.`, async () => {
const response = await axios_1.default.get(this.baseUrl + '/v2/channels/' + orderId);
const response = await axios_1.default.get(this.baseUrl + '/channels/' + orderId);
return response.data;

@@ -97,3 +97,3 @@ });

return await this.wrapErrorHandler(`Failed to fetch orders ${JSON.stringify(orderIds)}.`, async () => {
const response = await axios_1.default.get(this.baseUrl + '/v2/channels', {
const response = await axios_1.default.get(this.baseUrl + '/channels', {
params: {

@@ -115,3 +115,3 @@ ids: orderIds

return await this.wrapErrorHandler(`Failed to open the channel for order ${orderId}.`, async () => {
const response = await axios_1.default.post(this.baseUrl + `/v2/channels/${orderId}/open`, {
const response = await axios_1.default.post(this.baseUrl + `/channels/${orderId}/open`, {
connectionStringOrPubkey: connectionStringOrPubkey,

@@ -125,3 +125,3 @@ announceChannel: announceChannel

const window = await this.wrapErrorHandler(`Failed to fetch order ${orderId}.`, async () => {
const response = await axios_1.default.get(this.baseUrl + '/v2/channels/' + orderId + '/min-0conf-tx-fee');
const response = await axios_1.default.get(this.baseUrl + '/channels/' + orderId + '/min-0conf-tx-fee');
return response.data;

@@ -128,0 +128,0 @@ });

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.BtBolt11PaymentState = void 0;
var BtBolt11PaymentState;
(function (BtBolt11PaymentState) {
/**
* Payment attempt is being done now.
*/
BtBolt11PaymentState["INFLIGHT"] = "inflight";
/**
* Payment confirmed
*/
BtBolt11PaymentState["PAID"] = "paid";
/**
* Payment failed.
*/
BtBolt11PaymentState["FAILED"] = "failed";
})(BtBolt11PaymentState = exports.BtBolt11PaymentState || (exports.BtBolt11PaymentState = {}));
//# sourceMappingURL=BtBolt11PaymentState.js.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.BtOpenChannelState = void 0;
var BtOpenChannelState;
(function (BtOpenChannelState) {
BtOpenChannelState["OPENING"] = "opening";
BtOpenChannelState["OPEN"] = "open";
BtOpenChannelState["CLOSED"] = "closed";
})(BtOpenChannelState = exports.BtOpenChannelState || (exports.BtOpenChannelState = {}));
//# sourceMappingURL=BtOpenChannelState.js.map

@@ -13,4 +13,3 @@ import { ILspNode } from './ILspNode';

max0ConfClientBalanceSat: number;
maxClientBalanceLspBalanceRatio: number;
};
}
{
"name": "@synonymdev/blocktank-lsp-http-client",
"version": "0.3.0",
"version": "0.3.1",
"description": "Blocktank Http Api Client",

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

@@ -87,3 +87,2 @@ # blocktank-lsp-http-client

max0ConfClientBalanceSat: 317000, // Max clientBalanceSat for orders with 0 payment confirmations.
maxClientBalanceLspBalanceRatio: 1, // Max ratio between clientBalanceSat and lspBalanceSat.
}

@@ -90,0 +89,0 @@ ```

@@ -66,3 +66,3 @@ import axios from 'axios';

return await this.wrapErrorHandler('Failed to get info.', async () => {
const response = await axios.get(this.baseUrl + '/v2/info')
const response = await axios.get(this.baseUrl + '/info')
return response.data

@@ -82,3 +82,3 @@ })

return await this.wrapErrorHandler(`Failed to create order.`, async () => {
const response = await axios.post(this.baseUrl + '/v2/channels', {
const response = await axios.post(this.baseUrl + '/channels', {
...opts,

@@ -99,3 +99,3 @@ lspBalanceSat: lspBalanceSat,

return await this.wrapErrorHandler(`Failed to fetch order ${orderId}.`, async () => {
const response = await axios.get(this.baseUrl + '/v2/channels/' + orderId)
const response = await axios.get(this.baseUrl + '/channels/' + orderId)
return response.data;

@@ -112,3 +112,3 @@ })

return await this.wrapErrorHandler(`Failed to fetch orders ${JSON.stringify(orderIds)}.`, async () => {
const response = await axios.get(this.baseUrl + '/v2/channels', {
const response = await axios.get(this.baseUrl + '/channels', {
params: {

@@ -131,3 +131,3 @@ ids: orderIds

return await this.wrapErrorHandler(`Failed to open the channel for order ${orderId}.`, async () => {
const response = await axios.post(this.baseUrl + `/v2/channels/${orderId}/open`, {
const response = await axios.post(this.baseUrl + `/channels/${orderId}/open`, {
connectionStringOrPubkey: connectionStringOrPubkey,

@@ -142,3 +142,3 @@ announceChannel: announceChannel

const window = await this.wrapErrorHandler(`Failed to fetch order ${orderId}.`, async () => {
const response = await axios.get(this.baseUrl + '/v2/channels/' + orderId + '/min-0conf-tx-fee')
const response = await axios.get(this.baseUrl + '/channels/' + orderId + '/min-0conf-tx-fee')
return response.data;

@@ -145,0 +145,0 @@ })

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