@synonymdev/blocktank-client
Advanced tools
Comparing version 0.0.12 to 0.0.14
@@ -60,2 +60,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var cross_fetch_1 = require("cross-fetch"); | ||
var Blocktank = /** @class */ (function () { | ||
@@ -89,13 +90,13 @@ function Blocktank() { | ||
case 450: | ||
return 'CLOSED'; | ||
return 'Channel closed'; | ||
case 0: | ||
return 'CREATED'; | ||
return 'Awaiting payment'; | ||
case 400: | ||
return 'GIVE_UP'; | ||
return 'Given up'; | ||
case 500: | ||
return 'OPEN'; | ||
return 'Channel open'; | ||
case 300: | ||
return 'OPENING'; | ||
return 'Channel opening'; | ||
case 100: | ||
return 'PAID'; | ||
return 'Order paid'; | ||
} | ||
@@ -111,5 +112,5 @@ return "Unknown code: " + code; | ||
url = "" + this.host + path; | ||
return [4 /*yield*/, fetch(url, { | ||
return [4 /*yield*/, (0, cross_fetch_1.default)(url, { | ||
method: method, | ||
headers: __assign({ Accept: 'application/json' }, this.additionalHeaders), | ||
headers: __assign({ Accept: 'application/json', 'Content-Type': 'application/json' }, this.additionalHeaders), | ||
body: request ? JSON.stringify(request) : undefined | ||
@@ -116,0 +117,0 @@ })]; |
@@ -45,2 +45,3 @@ export declare type IService = { | ||
lnurl_channel: string; | ||
order_expiry: number; | ||
}; | ||
@@ -86,2 +87,4 @@ declare type IOnchainPayment = { | ||
zero_conf_satvbyte?: number; | ||
zero_conf_satvbyte_expiry?: number; | ||
renewals: any[]; | ||
}; | ||
@@ -88,0 +91,0 @@ export declare type IHeaders = { |
{ | ||
"name": "@synonymdev/blocktank-client", | ||
"version": "0.0.12", | ||
"version": "0.0.14", | ||
"description": "LSP client library", | ||
@@ -40,3 +40,6 @@ "main": "./dist/index.js", | ||
"typescript": "^4.4.2" | ||
}, | ||
"dependencies": { | ||
"cross-fetch": "^3.1.4" | ||
} | ||
} |
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
13170
295
0
1
+ Addedcross-fetch@^3.1.4
+ Addedcross-fetch@3.2.0(transitive)
+ Addednode-fetch@2.7.0(transitive)
+ Addedtr46@0.0.3(transitive)
+ Addedwebidl-conversions@3.0.1(transitive)
+ Addedwhatwg-url@5.0.0(transitive)