@sonarwatch/portfolio-plugins 0.12.106 → 0.12.108

Sign up to get free protection for your applications and to get access to all the features.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,14 @@
2
2
 
3
3
  This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
4
4
 
5
+ ## [0.12.108](https://github.com/sonarwatch/portfolio/compare/plugins-0.12.107...plugins-0.12.108) (2024-07-30)
6
+
7
+
8
+
9
+ ## [0.12.107](https://github.com/sonarwatch/portfolio/compare/plugins-0.12.106...plugins-0.12.107) (2024-07-30)
10
+
11
+
12
+
5
13
  ## [0.12.106](https://github.com/sonarwatch/portfolio/compare/plugins-0.12.105...plugins-0.12.106) (2024-07-30)
6
14
 
7
15
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sonarwatch/portfolio-plugins",
3
- "version": "0.12.106",
3
+ "version": "0.12.108",
4
4
  "type": "commonjs",
5
5
  "types": "./src/index.d.ts",
6
6
  "peerDependencies": {
@@ -18,8 +18,8 @@ const clients_1 = require("../../../utils/clients");
18
18
  const getBalance_1 = require("../../../utils/bitcoin/getBalance");
19
19
  const tokenPriceToAssetToken_1 = __importDefault(require("../../../utils/misc/tokenPriceToAssetToken"));
20
20
  const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* () {
21
- const esploraEndpoint = yield (0, clients_1.getEsploraEndpoint)();
22
- const amount = yield (0, getBalance_1.getBalance)(esploraEndpoint, owner);
21
+ const endpoint = yield (0, clients_1.getMempoolEndpoint)();
22
+ const amount = yield (0, getBalance_1.getBalance)(endpoint, owner);
23
23
  if (amount === 0)
24
24
  return [];
25
25
  const btcTokenPrice = yield cache.getTokenPrice(portfolio_core_1.bitcoinNetwork.native.address, portfolio_core_1.NetworkId.bitcoin);
@@ -1 +1 @@
1
- {"version":3,"file":"bitcoin.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/plugins/tokens/fetchers/bitcoin.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAKoC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AA4D;AAC5D,kEAA+D;AAC/D,wGAAgF;AAEhF,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,QAAQ,GAAG,MAAM,IAAA,4BAAkB,GAAE,CAAC;IAC5C,MAAM,MAAM,GAAG,MAAM,IAAA,uBAAU,EAAC,QAAQ,EAAE,KAAK,CAAC,CAAC;IACjD,IAAI,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IAE5B,MAAM,aAAa,GAAG,MAAM,KAAK,CAAC,aAAa,CAC7C,+BAAc,CAAC,MAAM,CAAC,OAAO,EAC7B,0BAAS,CAAC,OAAO,CAClB,CAAC;IAEF,MAAM,KAAK,GAAG,IAAA,gCAAsB,EAClC,+BAAc,CAAC,MAAM,CAAC,OAAO,EAC7B,MAAM,EACN,0BAAS,CAAC,OAAO,EACjB,aAAa,CACd,CAAC;IAEF,MAAM,OAAO,GAA6B;QACxC,IAAI,EAAE,qCAAoB,CAAC,QAAQ;QACnC,SAAS,EAAE,0BAAS,CAAC,OAAO;QAC5B,UAAU,EAAE,gCAAoB,CAAC,EAAE;QACnC,KAAK,EAAE,QAAQ;QACf,KAAK,EAAE,KAAK,CAAC,KAAK;QAClB,IAAI,EAAE;YACJ,MAAM,EAAE,CAAC,KAAK,CAAC;SAChB;KACF,CAAC;IACF,OAAO,CAAC,OAAO,CAAC,CAAC;AACnB,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,gCAAoB,CAAC,EAAE,UAAU;IACxC,SAAS,EAAE,0BAAS,CAAC,OAAO;IAC5B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
@@ -0,0 +1,2 @@
1
+ import { RpcEndpoint } from '@sonarwatch/portfolio-core';
2
+ export default function getMempoolEndpoint(): RpcEndpoint;
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const urlToRpcEndpoint_1 = __importDefault(require("./urlToRpcEndpoint"));
7
+ function getMempoolEndpoint() {
8
+ const endpoint = process.env['PORTFOLIO_MEMPOOL_ENDPOINT'] || 'https://mempool.space/api/';
9
+ return (0, urlToRpcEndpoint_1.default)(endpoint);
10
+ }
11
+ exports.default = getMempoolEndpoint;
12
+ //# sourceMappingURL=getMempoolEndpoint.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getMempoolEndpoint.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/utils/clients/getMempoolEndpoint.ts"],"names":[],"mappings":";;;;;AACA,0EAAkD;AAElD,SAAwB,kBAAkB;IACxC,MAAM,QAAQ,GACZ,OAAO,CAAC,GAAG,CAAC,4BAA4B,CAAC,IAAI,4BAA4B,CAAC;IAC5E,OAAO,IAAA,0BAAgB,EAAC,QAAQ,CAAC,CAAC;AACpC,CAAC;AAJD,qCAIC"}
@@ -11,3 +11,4 @@ export { default as getEvmWeb3V1Client } from './getEvmWeb3V1Client';
11
11
  export { default as getEvmClients } from './getEvmClients';
12
12
  export { default as urlToRpcEndpoint } from './urlToRpcEndpoint';
13
13
  export { default as getEsploraEndpoint } from './getEsploraEndpoint';
14
+ export { default as getMempoolEndpoint } from './getMempoolEndpoint';
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.getEsploraEndpoint = exports.urlToRpcEndpoint = exports.getEvmClients = exports.getEvmWeb3V1Client = exports.getEvmEthersClient = exports.getEvmClient = exports.getClientCosmWasm = exports.getClientIbc = exports.getClientCosmos = exports.getClientSei = exports.getClientSui = exports.getClientSolana = exports.getClientAptos = void 0;
6
+ exports.getMempoolEndpoint = exports.getEsploraEndpoint = exports.urlToRpcEndpoint = exports.getEvmClients = exports.getEvmWeb3V1Client = exports.getEvmEthersClient = exports.getEvmClient = exports.getClientCosmWasm = exports.getClientIbc = exports.getClientCosmos = exports.getClientSei = exports.getClientSui = exports.getClientSolana = exports.getClientAptos = void 0;
7
7
  var getClientAptos_1 = require("./getClientAptos");
8
8
  Object.defineProperty(exports, "getClientAptos", { enumerable: true, get: function () { return __importDefault(getClientAptos_1).default; } });
9
9
  var getClientSolana_1 = require("./getClientSolana");
@@ -30,4 +30,6 @@ var urlToRpcEndpoint_1 = require("./urlToRpcEndpoint");
30
30
  Object.defineProperty(exports, "urlToRpcEndpoint", { enumerable: true, get: function () { return __importDefault(urlToRpcEndpoint_1).default; } });
31
31
  var getEsploraEndpoint_1 = require("./getEsploraEndpoint");
32
32
  Object.defineProperty(exports, "getEsploraEndpoint", { enumerable: true, get: function () { return __importDefault(getEsploraEndpoint_1).default; } });
33
+ var getMempoolEndpoint_1 = require("./getMempoolEndpoint");
34
+ Object.defineProperty(exports, "getMempoolEndpoint", { enumerable: true, get: function () { return __importDefault(getMempoolEndpoint_1).default; } });
33
35
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/utils/clients/index.ts"],"names":[],"mappings":";;;;;;AAAA,mDAA6D;AAApD,iIAAA,OAAO,OAAkB;AAClC,qDAA+D;AAAtD,mIAAA,OAAO,OAAmB;AACnC,+CAAyD;AAAhD,6HAAA,OAAO,OAAgB;AAChC,+CAAyD;AAAhD,6HAAA,OAAO,OAAgB;AAChC,qDAA+D;AAAtD,mIAAA,OAAO,OAAmB;AACnC,+CAAyD;AAAhD,6HAAA,OAAO,OAAgB;AAChC,yDAAmE;AAA1D,uIAAA,OAAO,OAAqB;AACrC,+CAAyD;AAAhD,6HAAA,OAAO,OAAgB;AAChC,2DAAqE;AAA5D,yIAAA,OAAO,OAAsB;AACtC,2DAAqE;AAA5D,yIAAA,OAAO,OAAsB;AACtC,iDAA2D;AAAlD,+HAAA,OAAO,OAAiB;AACjC,uDAAiE;AAAxD,qIAAA,OAAO,OAAoB;AACpC,2DAAqE;AAA5D,yIAAA,OAAO,OAAsB"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/utils/clients/index.ts"],"names":[],"mappings":";;;;;;AAAA,mDAA6D;AAApD,iIAAA,OAAO,OAAkB;AAClC,qDAA+D;AAAtD,mIAAA,OAAO,OAAmB;AACnC,+CAAyD;AAAhD,6HAAA,OAAO,OAAgB;AAChC,+CAAyD;AAAhD,6HAAA,OAAO,OAAgB;AAChC,qDAA+D;AAAtD,mIAAA,OAAO,OAAmB;AACnC,+CAAyD;AAAhD,6HAAA,OAAO,OAAgB;AAChC,yDAAmE;AAA1D,uIAAA,OAAO,OAAqB;AACrC,+CAAyD;AAAhD,6HAAA,OAAO,OAAgB;AAChC,2DAAqE;AAA5D,yIAAA,OAAO,OAAsB;AACtC,2DAAqE;AAA5D,yIAAA,OAAO,OAAsB;AACtC,iDAA2D;AAAlD,+HAAA,OAAO,OAAiB;AACjC,uDAAiE;AAAxD,qIAAA,OAAO,OAAoB;AACpC,2DAAqE;AAA5D,yIAAA,OAAO,OAAsB;AACtC,2DAAqE;AAA5D,yIAAA,OAAO,OAAsB"}