Socket
Socket
Sign inDemoInstall

@mempool/mempool.js

Package Overview
Dependencies
Maintainers
2
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mempool/mempool.js - npm Package Compare versions

Comparing version 2.2.5 to 2.2.6

2

lib/app/bitcoin/websocket.d.ts
import { WsInstance } from '../../interfaces/bitcoin/websockets';
export declare const useWebsocket: (hostname: string) => WsInstance;
export declare const useWebsocket: (hostname: string, network: string) => WsInstance;

@@ -9,4 +9,4 @@ "use strict";

var server_1 = __importDefault(require("../../services/ws/server"));
var useWebsocket = function (hostname) {
var wsEndpoint = "wss://" + hostname + "/api/v1/ws";
var useWebsocket = function (hostname, network) {
var wsEndpoint = "wss://" + hostname + (network === 'main' ? '' : "/" + network) + "/api/v1/ws";
return {

@@ -13,0 +13,0 @@ initClient: function (_a) {

@@ -52,2 +52,13 @@ "use strict";

}); };
var getAssetIcon = function (params) { return __awaiter(void 0, void 0, void 0, function () {
var data;
return __generator(this, function (_a) {
switch (_a.label) {
case 0: return [4 /*yield*/, api.get("/v1/asset/" + params.asset_id + "/icon")];
case 1:
data = (_a.sent()).data;
return [2 /*return*/, data];
}
});
}); };
var getAssetTxs = function (params) { return __awaiter(void 0, void 0, void 0, function () {

@@ -79,8 +90,21 @@ var paramsMempools, data;

}); };
var getAssetsIcons = function () { return __awaiter(void 0, void 0, void 0, function () {
var data;
return __generator(this, function (_a) {
switch (_a.label) {
case 0: return [4 /*yield*/, api.get("/v1/assets/icons")];
case 1:
data = (_a.sent()).data;
return [2 /*return*/, data];
}
});
}); };
return {
getAsset: getAsset,
getAssetIcon: getAssetIcon,
getAssetTxs: getAssetTxs,
getAssetSupply: getAssetSupply,
getAssetsIcons: getAssetsIcons,
};
};
exports.useAssets = useAssets;

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

var markets_1 = require("./app/bisq/markets");
var hostnameEndpointDefault = 'mempool.space';
var hostnameEndpointDefault = 'bisq.market';
var networkEndpointDefault = 'bisq';

@@ -11,0 +11,0 @@ var mempool = function (_a) {

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

var websocket_1 = require("./app/liquid/websocket");
var hostnameEndpointDefault = 'mempool.space';
var hostnameEndpointDefault = 'liquid.network';
var networkEndpointDefault = 'liquid';

@@ -13,0 +13,0 @@ var mempool = function (_a) {

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

transactions: transactions_1.useTransactions(apiBitcoin),
websocket: websocket_1.useWebsocket(hostname),
websocket: websocket_1.useWebsocket(hostname, network),
},

@@ -48,0 +48,0 @@ bisq: {

@@ -19,2 +19,5 @@ export interface Asset {

}) => Promise<Asset>;
getAssetIcon: (params: {
asset_id: string;
}) => Promise<unknown>;
getAssetTxs: (params: {

@@ -28,3 +31,4 @@ asset_id: string;

}) => Promise<Asset>;
getAssetsIcons: () => Promise<string[]>;
}
export {};
{
"name": "@mempool/mempool.js",
"version": "2.2.5",
"version": "2.2.6",
"description": "NPM package module for Mempool APIs.",

@@ -5,0 +5,0 @@ "main": "lib/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