@pioneer-platform/pioneer 8.2.3 → 8.2.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/index.d.ts CHANGED
@@ -4,8 +4,7 @@ declare const uuid: any;
4
4
  declare let blocknative: any;
5
5
  declare const blockbook: any;
6
6
  declare let zapper: any;
7
- declare let evmCaips: any;
8
- declare const shortListSymbolToCaip: any;
7
+ declare let shortListSymbolToCaip: any, evmCaips: any;
9
8
  declare const networks: any;
10
9
  declare let supportedBlockchains: any, supportedAssets: any, getPaths: any, get_address_from_xpub: any, getNativeAssetForBlockchain: any;
11
10
  declare var numbro: any;
package/lib/index.js CHANGED
@@ -83,24 +83,7 @@ var blockbook = require('@pioneer-platform/blockbook');
83
83
  // const foxitar = require("@pioneer-platform/foxitar-client")
84
84
  var zapper = require("@pioneer-platform/zapper-client");
85
85
  //@ts-ignore
86
- var evmCaips = require("@pioneer-platform/pioneer-caip").evmCaips;
87
- var shortListSymbolToCaip = {
88
- BTC: 'bip122:000000000019d6689c085ae165831e93/slip44:0',
89
- ATOM: 'cosmos:cosmoshub-4/slip44:118',
90
- OSMO: 'cosmos:osmosis-1/slip44:118',
91
- BCH: 'bip122:000000000000000000651ef99cb9fcbe/slip44:145',
92
- LTC: 'bip122:12a765e31ffd4059bada1e25190f6e98/slip44:2',
93
- DASH: 'bip122:dash-hash/slip44:5',
94
- DGB: 'bip122:digibytes-hash/slip44:20',
95
- DOGE: 'bip122:00000000001a91e3dace36e2be3bf030/slip44:3',
96
- RUNE: 'cosmos:thorchain-mainnet-v1/slip44:931',
97
- ETH: 'eip155:1/slip44:60',
98
- AVAX: 'placeholder:caip:avalanchec:native:avalanche-c-chain',
99
- ADA: 'placeholder:caip:cardano:native:cardano',
100
- BNB: 'placeholder:caip:binance:native:bnb-beacon-chain',
101
- EOS: 'eos:cf057bbfb72640471fd910bcb67639c22df9f92470936cddc1ade0e2f2e7dc4f/slip44:194',
102
- FIO: 'placeholder:caip:fio:native:fio-protocol'
103
- };
86
+ var _a = require("@pioneer-platform/pioneer-caip"), shortListSymbolToCaip = _a.shortListSymbolToCaip, evmCaips = _a.evmCaips;
104
87
  var networks = {
105
88
  'ETH': require('@pioneer-platform/eth-network'),
106
89
  'ATOM': require('@pioneer-platform/cosmos-network'),
@@ -111,11 +94,11 @@ var networks = {
111
94
  'ANY': require('@pioneer-platform/utxo-network'),
112
95
  'RUNE': require('@pioneer-platform/thor-network'),
113
96
  };
114
- var _a = require('@pioneer-platform/cointools'), supportedBlockchains = _a.supportedBlockchains, supportedAssets = _a.supportedAssets, getPaths = _a.getPaths, get_address_from_xpub = _a.get_address_from_xpub, getNativeAssetForBlockchain = _a.getNativeAssetForBlockchain;
97
+ var _b = require('@pioneer-platform/cointools'), supportedBlockchains = _b.supportedBlockchains, supportedAssets = _b.supportedAssets, getPaths = _b.getPaths, get_address_from_xpub = _b.get_address_from_xpub, getNativeAssetForBlockchain = _b.getNativeAssetForBlockchain;
115
98
  //const bcrypt = require('bcryptjs');
116
99
  var numbro = require("numbro");
117
100
  var log = require('@pioneer-platform/loggerdog')();
118
- var _b = require('@pioneer-platform/default-redis'), subscriber = _b.subscriber, publisher = _b.publisher, redis = _b.redis, redisQueue = _b.redisQueue;
101
+ var _c = require('@pioneer-platform/default-redis'), subscriber = _c.subscriber, publisher = _c.publisher, redis = _c.redis, redisQueue = _c.redisQueue;
119
102
  var connection = require("@pioneer-platform/default-mongo");
120
103
  var wait = require('wait-promise');
121
104
  var sleep = wait.sleep;
@@ -304,8 +287,8 @@ var get_pubkey_balances = function (pubkey) {
304
287
  // Update balance
305
288
  balances_1.push({
306
289
  network: pubkey.symbol,
307
- blockchainCaip: shortListSymbolToCaip(pubkey.symbol),
308
- assetCaip: shortListSymbolToCaip(pubkey.symbol),
290
+ blockchainCaip: shortListSymbolToCaip[pubkey.symbol],
291
+ assetCaip: shortListSymbolToCaip[pubkey.symbol],
309
292
  asset: pubkey.symbol,
310
293
  symbol: pubkey.symbol,
311
294
  pubkey: pubkey.pubkey,
@@ -345,7 +328,8 @@ var get_pubkey_balances = function (pubkey) {
345
328
  var balanceInfo = token.token;
346
329
  balanceInfo.network = token.network;
347
330
  //get caip for network
348
- balanceInfo.blockchainCaip = token.caip || 'caip:placeholder:' + token.network;
331
+ balanceInfo.blockchainCaip = token.blockchainCaip || 'caip:placeholder:' + token.network;
332
+ balanceInfo.assetCaip = token.assetCaip || 'caip:placeholder:' + token.network + ":" + token.token.symbol;
349
333
  balanceInfo.asset = token.token.symbol;
350
334
  balanceInfo.symbol = token.token.symbol;
351
335
  balanceInfo.pubkey = pubkey.pubkey;
@@ -357,7 +341,13 @@ var get_pubkey_balances = function (pubkey) {
357
341
  balanceInfo.protocal = 'erc20';
358
342
  }
359
343
  balanceInfo.lastUpdated = new Date().getTime();
344
+ balanceInfo.price = token.token.price.toString();
345
+ balanceInfo.coingeckoId = token.token.coingeckoId;
346
+ balanceInfo.dailyVolume = token.token.price.toString();
347
+ balanceInfo.marketCap = token.token.marketCap.toString();
360
348
  balanceInfo.balance = token.token.balance.toString();
349
+ balanceInfo.balanceUSD = token.token.balanceUSD.toString();
350
+ balanceInfo.balanceRaw = token.token.balanceRaw.toString();
361
351
  balances_1.push(balanceInfo);
362
352
  });
363
353
  }
@@ -401,6 +391,7 @@ var get_pubkey_balances = function (pubkey) {
401
391
  description: "Pioneer",
402
392
  source: "pioneer",
403
393
  blockchainCaip: 'eip155:1/slip44:60',
394
+ assetCaip: 'eip155:1/slip44:60:' + "",
404
395
  pubkey: pubkey.pubkey,
405
396
  context: pubkey.context,
406
397
  number: allPioneers.owners.indexOf(pubkey.pubkey.toLowerCase()),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pioneer-platform/pioneer",
3
- "version": "8.2.3",
3
+ "version": "8.2.5",
4
4
  "main": "./lib/index.js",
5
5
  "types": "./lib/index.d.ts",
6
6
  "scripts": {
@@ -25,7 +25,7 @@
25
25
  "@pioneer-platform/loggerdog": "^8.1.30",
26
26
  "@pioneer-platform/pioneer-caip": "^8.1.75",
27
27
  "@pioneer-platform/redis-queue": "^8.1.23",
28
- "@pioneer-platform/zapper-client": "^8.1.24",
28
+ "@pioneer-platform/zapper-client": "^8.1.25",
29
29
  "dotenv": "^8.2.0"
30
30
  },
31
31
  "devDependencies": {