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

@synonymdev/blocktank-client

Package Overview
Dependencies
Maintainers
8
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@synonymdev/blocktank-client - npm Package Compare versions

Comparing version 0.0.5 to 0.0.6

4

dist/index.d.ts

@@ -1,6 +0,8 @@

import { IBuyChannelRequest, IBuyChannelResponse, IGetInfoResponse, IGetOrderResponse } from './types';
import { IBuyChannelRequest, IBuyChannelResponse, IGetInfoResponse, IGetOrderResponse, IHeaders } from './types';
declare class Blocktank {
private host;
private additionalHeaders;
constructor();
setNetwork(network: 'mainnet' | 'testnet' | 'regtest'): void;
setHeaders(headers: IHeaders): void;
static getStateMessage(code: number): string;

@@ -7,0 +9,0 @@ call(path: string, method: 'GET' | 'POST', request?: any): Promise<any>;

@@ -63,2 +63,3 @@ "use strict";

this.host = '';
this.additionalHeaders = {};
this.setNetwork('testnet');

@@ -82,2 +83,5 @@ }

};
Blocktank.prototype.setHeaders = function (headers) {
this.additionalHeaders = headers;
};
Blocktank.getStateMessage = function (code) {

@@ -102,3 +106,3 @@ switch (code) {

return __awaiter(this, void 0, void 0, function () {
var url, headers, fetchRes, body;
var url, fetchRes, body;
return __generator(this, function (_a) {

@@ -108,10 +112,5 @@ switch (_a.label) {

url = "" + this.host + path;
headers = { Accept: 'application/json' };
//Temp fix for cors error in browsers.
if (typeof window !== 'undefined' && typeof window.document !== 'undefined') {
headers['Content-Type'] = 'application/json';
}
return [4 /*yield*/, fetch(url, {
method: method,
headers: headers,
headers: __assign({ Accept: 'application/json' }, this.additionalHeaders),
body: request ? JSON.stringify(request) : undefined

@@ -118,0 +117,0 @@ })];

@@ -86,2 +86,5 @@ export declare type IService = {

};
export declare type IHeaders = {
[key: string]: string;
};
export {};
{
"name": "@synonymdev/blocktank-client",
"version": "0.0.5",
"version": "0.0.6",
"description": "LSP client library",

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

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