From f33da44281ec83d1ff5fffade33ebe42bb91b71b Mon Sep 17 00:00:00 2001 From: Ana G <40721795+Bitcoinera@users.noreply.github.com> Date: Wed, 11 Mar 2020 17:11:56 +0100 Subject: [PATCH] Release, now for real (#439) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Fabo/fix gas (#250) * fix gas estimate * linted * fixed test * do not keep data sources (#251) * track failing transactions in Sentry (#249) * correctly set the tx schema for a failing tx (#248) * Fabo/remove per block caching as not working (#247) * remove per block caching as not working * fix memoized results Co-authored-by: Ana G. <40721795+Bitcoinera@users.noreply.github.com> * delete perblockcachedatasource (#253) * Ana/fix balances in actionmodal (#255) * fix action modal available balance * include regen * use dictionary for denomlookup * use correct events for received txs (#257) * enable account creation for some networks (#252) * network update time metric added (#256) * network update time metric added * added missing dep Co-authored-by: Fabian * Fix proposal deposit (#261) * Remove denom handling from getDeposit() * Revert undesired change * delete package-lock.json * localtestnet config change (#265) * Ana/handle "address not from this network" error (#263) * add check address function for all queries * apply suggestions * Ana/add fiatvalue to balances query (e-Money) (#262) * preparation * more preparation * add fiatvalue field to balances query * fix get account info * apply suggestions * apply one last suggestion * suggestions+ Co-authored-by: Fabian * Ana/emoney fix expected returns with inflation and totalbacked (#243) * fix expected returns with inflation and supply * minor fixes. dictionary * query exchange rates from emoney api * fix infinite expected returns * convert api url to const * add eur value to totalbackedvalue. totalngm gains * add important comment * finish calculation * lint * catch errors with sentry Co-authored-by: Fabian * readd coin conversion (#268) * delete amount field (#274) * Fabo/increase gas again (#271) * icrease gas again * fixed test * Fabo/load all txs (even if more then first page in response) (#270) * load all txs (even if more then first page in response) * improved handling of txs * missing renaming * fixed paginated load * add pagination fix also to cosmosV0-source Co-authored-by: iambeone Co-authored-by: Ana G. <40721795+Bitcoinera@users.noreply.github.com> * fixing issue with multiple senders in one event (#273) * fixing issue with multiple senders in one event * Update lib/source/cosmosV2-source.js Co-authored-by: Fabian * Fabo/allow signing for terra + emoney (#267) * allow signing for terra * readd coin conversion * enable actions for terra * fix correct terra testnet url * comments and guards * enabled more txs for emoney and fixed broadcasting * added a catch for wrongly formatted broadcast urls * recover default field. change some network titles (#277) * Fabo/add network data to API (#278) * non desctructive introduction of better address prefix wording * added address creator to API * adjusted test * added ledger app to networks config * add icon property to schema (#281) * add icon property to schema * fix network schema validation Co-authored-by: Ana G. <40721795+Bitcoinera@users.noreply.github.com> * filter out validator specific txs (#279) * Ana/balances coinreducer good fix (#269) * balances coinreducer good fix * refactored fiat value logic Co-authored-by: Fabian * Create network_integration.md * Update network_integration.md * Update network_integration.md * Fabo/avoid 500 errors (#288) * avoid using the latest query * cleanup * Ana/filter validator tx cross network and add txvalue reducer (#285) * filter validators cross network * add value reducer. necessary for multi claim txs * add validator txs filter also for cosmosv0 source * filter and make array only claim rewards msg value * filter txs by whitelist * change length in multi claim reward reducer * add withdrawvalidators * replace dictionary for set * refactor transaction snippet. avoid repetition * Ana/emoney upgrade (mergeable) (#282) * update emoney api_url * fix denom. add default fiat currency * fix rpc endpoint * fix value (my bad) (#293) * fix value (my bad) * trigger another ci flow * erase space * set correct new chain id (#294) * restart API * restart API * fix pr alert (#297) * Fabo/298 tendermint reconnect (#300) * reconnect on tendermint disconnect * cleanup * comments * Update cosmos-node-subscription.js * Fabo/299 trigger a chain hangup error (#301) * trigger a chain hangup error * increase chain hangup time * Apply suggestions from code review * Fabo/store validator addresses (#296) * add validator addresses to db * linted * ignore in local dev * revert * fixed fetch * comment * refactored db into constructor * cleanup * add clearTimeout to avoid reconnection hell (#306) * add clearTimeout to avoid reconnection hell * removed console.log * Aleksei/luniedb replaced (#303) * add validator addresses to db * linted * ignore in local dev * revert * fixed fetch * comment * refactored db into constructor * cleanup * replaced luniedb * linted Co-authored-by: Fabian * disable reconnection logic * clear polling interval for tendermint connection * simple api fixes (#310) * Fabo/remove tendermint (#311) * remove tendermint * fixed empty blockHeight issue * small refactoring * catch on fetches to get logging * delay block updates * add retry logic * refactored getBlockByHeight * remove pm2 dep * validator profiles were returned as array (#312) * remove pr github action (#316) * fixing caching issue and more (#315) * fixing caching issue and more * clear chain hangup timeout * timeout fixed * Update lib/block-listeners/cosmos-node-subscription.js Co-authored-by: Jordan Bibla * added terra_mainnet to networks (#309) * added terra_mainnet to networks * errors fix reverted * Ana/add multidenom rewards. necessary for emoney (#308) * add multidenom rewards. necessary for emoney * add rewards to overview. improve code location * lint * add filter rewards for multidenom * important fix * another important fix * fix cannot read propery constructor of undefined (#318) * change terra mainnet title * pushing something to trigger new build and to restart the node * trying out nylira's node * WIP: Ana/More Terra fixes (#323) * fixing my mess * move all rewards logic to terra * clearly signal single denom rewards * Revert "WIP: Ana/More Terra fixes (#323)" (#325) This reverts commit 408186a3ef743ca51d513eb91c937f49960e7492. * catch inside block polling function (#327) * Fabo/disable writing validator addresses for now (#329) * disable writing validator addresses for now * linted * flushing http cache (#332) * Transaction abstraction schema (#333) * tx abstraction proposal using union * Use Coin type * Cleanup, TransactionV2 * Cleanup, not multisend tx * Unsupported tx (like multisend) don't have details * Fabo/switch to docker swarm mode (#330) * swtich to docker swarm mode * typo * Update .github/workflows/development.yml * Ana/more terra fixes (***THE COMEBACK***) (#324) * fixing my mess * move all rewards logic to terra * clearly signal single denom rewards * error structure has changed. need to look into it * also return denom for single denom rewards * manage errors properly * delete comments * Update lib/reducers/terraV3-reducers.js * loop through transaction messages * doing crazy stuff * rewrite the crazy bit Co-authored-by: Fabian * cosmosv0 was missing the retry logic (#334) * add back validator to db logic (#335) * path_prefix added to network data (#338) * path_prefix added to network data * path_prefix replaced to slug * tests fixed * remove regen (#337) Co-authored-by: Jordan Bibla * Fabo+Mario/transaction abstraction (#336) * draft for transaction abstraction * use lunie message types * Add supported tx types * WIP * Draft new reducers * Fix msg types * Need to resolve type for TransactionDetails union * debug resolver * lint * Fix * Cleanup * fix some union issues * Almost done * Small fixes * Add userTransactionAddedV2 * Add userTransactionAddedV2 to resolvers Co-authored-by: Mario Pino * emoney fixes for fiatvalue (#345) * emoney fixes for fiatvalue * refactor with coinreducer * speaking functions are your friends * refactor ugly nested code * lint * add denoms lookups for terra and emoney (#346) * Ana/add only tokens gas prices 2nd attempt (#344) * add terra and emoney gas price. terra reducer * delete fiatvalue from get balances in cosmos * add emoney reducer * hyper important emoney fixes * fix for emoney denoms * change gas price to micro units * add emoney denoms to denomlookup * transform to microunit also for terra tokens * return null for emoney gas prices * add harcoded gas prices * correct emoney hardcoded values * hardcoded terra gas prices. not working * update hardcoded values to working ones * delete unrelated changes to gas prices * apply suggestions except coinreducer * they call me mr coinreducer * change amount for price. add gas price reducer * change naming in gas price reducer * add error message Co-authored-by: Fabian * fix rewards denoms (#351) * updating image on deploy (#352) * fix my mess once more (#353) * Ana/add gas prices to other networks (#350) * add gasprices to cosmos * format gas prices to three decimals * Apply suggestions from code review * Update lib/reducers/cosmosV0-reducers.js Co-authored-by: Fabian Co-authored-by: Jordan Bibla * added a tx success push, fallback (#354) * fix cosmos gas price (#355) * fix terra for new tmbalance (#358) * Fabo/new emoney rewards (#357) * intent to fix the emoney rewards * intent to fix emoney rewards * simplified code * comments * hack to fix reduce function * eligable -> eligible * correct reducer fix Co-authored-by: Ana G. <40721795+Bitcoinera@users.noreply.github.com> Co-authored-by: Jordan Bibla * Aleksei/prevent constant db calls (#304) * add validator addresses to db * linted * ignore in local dev * revert * fixed fetch * comment * refactored db into constructor * cleanup * prevent constant db interaction * stored object structure changed * remove nesting in validators * filter validators list Co-authored-by: Fabian * limit txs pages load by two pages per request (#314) * limit txs pages load by two pages per request * delete block from loadpaginatedtxs * small fixes * Update lib/source/cosmosV2-source.js * linted Co-authored-by: Ana G. <40721795+Bitcoinera@users.noreply.github.com> Co-authored-by: Fabian * linted * linted * Fabo/Use figment nodes (#362) * use api keys * add env variables for nodes * hard code api keys (#365) * fix ngm fiatvalue (#361) * hardcoded urls fix (#366) * WIP: Improve TransactionV2 implementation (#349) * Add from field to SendTx type * add amount to claim rewards transactions * convert to units in string coin reducer * fix typo * add multidenom string coinreducer for claim amount * Add UnknownTx to schema * Add BlockV2 type which returns TransactionV2 txs * Add blockV2 query that returns TransactionV2 txs * kill handling claim rewards amount * Update lib/reducers/cosmosV0-reducers.js Co-Authored-By: Fabian * Update lib/reducers/cosmosV0-reducers.js Co-Authored-By: Fabian * Cleanup * lint * Support claim rewards from multiple validators * Fix, cleanup Co-authored-by: Ana G. <40721795+Bitcoinera@users.noreply.github.com> Co-authored-by: Fabian * Aleksei/fix db insert (#367) * fixed insert function to allow empty schema * Aleksei/statistics in the api (#364) * collecting statistics in the API * small fixes * fixes * changing address to key in clearOverviewedAddresses Co-authored-by: Aleksey Rudometov * add pageNumber to schema (#370) * add pageNumber to schema * file wasn't saved * trigger ci * added pagination to tx v2 api (#372) * Together with 3584: Ana/change fiatvalue to object (#360) * change fiatvalue to object * handle when selected currency is eur * include ngm fiatvalue fix * Ana/amount in claim rewards in transactions v2 (#373) * bring amount in claim rewards back to life * change to regex * simplify * make the regex understandable * Ana/add powered to networks (#377) * add powered by * more logical powered * add provider address for avatar * fix powere validation * Fabo/add network-type for selecting addrss and signing (#378) * add network-type for selecting addrss and signing * adjust according to new network_type param * add network type to network schema Co-authored-by: Ana G. <40721795+Bitcoinera@users.noreply.github.com> * fix staking denom (#379) * fix terra balances and overview (#380) * Fabo/allow to query experimental networks (#382) * all to query experimental networks * fix old small typo Co-authored-by: Ana G. <40721795+Bitcoinera@users.noreply.github.com> * First steps to integrate Polkadot (#376) * Add polkadot-testnet in networks.js * Install polkadot-api, polkadot-node-sub. draft * lint * lint * lint * add polkadotV0 source * add address creator * Update data/networks.js Co-Authored-By: Jordan Bibla * Update data/networks.js Co-Authored-By: Jordan Bibla * blocks, events * Cleanup * polling instead subscription * husky * updateDBValidatorProfiles * no wait for block data fetching, kind of stable * Add reducers file * block subscription works! * Cleanup, fix memory leak * lint, node * comment * Handle polkadot chain reorgs * Cleanup * Optimization, cleanup * Optimization * fixes, validators query working, cleanup * comment * lint * fix block time * handle polkadot chain hangups * cleanup * validator reducer * lint * wip * calculate and include a bunch of validator fields * add bech32_prefix address_prefix to networks.js * add 1 space so we dont break tests * remove chain reorg handling, more stable Co-authored-by: Ana G. <40721795+Bitcoinera@users.noreply.github.com> Co-authored-by: Fabian Co-authored-by: Jordan Bibla * transactions loading time reduced (#383) * transactions loading time reduced * increased page number * add loki to docker-compose (#385) * add network type (#386) * removed livepeer from running in API (#390) * set polkadot to disabled (#392) * Ana/add totalstake-fiatvalue to Overview (#384) * add totalstake fiat value to overview * fix amount in totalstake fiatvalue * make new code more readable * Update lib/reducers/cosmosV0-reducers.js * refactor unit conversion Co-authored-by: Mario Pino * disable polkadot (#395) Co-authored-by: Fabian * Fabo/terra returns (#389) * better error logging * add result selector to query * split emoney getAllValidators from Terra * add expected returns querying to terra * filter out empty returns * remove not used code * missing return * limit decimals * fix not found in terra testnet * temporary hacks * Revert "temporary hacks" This reverts commit 88d0918af70489422d6d5d84909df1186a23fa1c. * Revert "fix not found in terra testnet" This reverts commit 19a4eca6eb4a9eb2050b368b270d4a39847e016a. * add terra testnet api * switch to show all decimals Co-authored-by: Ana G. <40721795+Bitcoinera@users.noreply.github.com> * fix all fiat values to 2 decimals (#399) * Ana/correct terra denoms (#398) * correct terra denoms * variable renaming Co-authored-by: Fabian * Ana/add fiatvalue in rewards (#396) * add fiatvalue to rewards * add fiatcurrency to rewards query * handle unsupported fiat currencies * apply suggestions * delete never used delegations parameter (#404) * fix terra getrewards and gas prices (#409) * reactivate kusama (#411) * Ana/fix repeated claim rewards transactions in transaction abstraction (#400) * fix terra repeated claim rewards transactions * much better fix * add claim rewards messages aggregator * try to apply suggestion * also not working * working 🎉 * change name and add comment * improved implementation by aggregating the claim messags correctly Co-authored-by: Fabian Weber * disable polkadot once more for release (#412) * readd memory limit (#413) * Use polling instead subscription in Kusama (#406) * uncomment polkadot * bug fixes * pollForNewBlock * mod getBlockHeight * add again commented api disconnect to not forget * enqueueAndPublishBlockAdded * re-subscribe on error * stringify error * stringify errors * api.isReady * Add delay to newBlockHandler * Ana/add balances to kusama (#405) * rudimentary balance * add some comment * Ana/switch polkadot to rest calls (#408) * add rewards and overview functions. not working * poll instead of subscribe to blocks * switch over to http provider * fix lint errors * use httpprovider * getting last block hash * get blockhash and header. but no height * back to normal. use mario node subscription * successfully get block height polling with http * get block hash from http. use polling * uncomment all other networks * pass the store to source classes * create the api only once * comment api.disconnect() * added polling fix and quick querying * fixed block height query * clean up * comment * cleanup and optimization Co-authored-by: Fabian Weber Co-authored-by: mariopino * remove unused dependency Co-authored-by: Bitcoinera Co-authored-by: Ana G <40721795+Bitcoinera@users.noreply.github.com> Co-authored-by: Fabian Weber * deactivate polkadot * trigger deploy * trigger CI * swtich to newer caddy version * activate polkadot again * deactivate again * Proposal to enable Kusama network (#424) * working state * cleanup * getBlockHeight() * update polkadot-api (#423) * fixing node_exporter call in Caddyfile (#418) * fixing send amount in statistics (#419) * fixing send amount in statistics * denom fixed * fix validator as selected fiat bug (#415) * Ana/correct terra denoms in activity (#425) * correct fix terra denoms in activity * delete correct terra denom as not needed * Ana/fix amount null in claim rewards (#416) * fix amount null in claim rewards * small refactor * apply suggestion * add release script to api (#426) * Add self stake to validators query (#433) * add self stake * Update lib/reducers/polkadotV0-reducers.js Co-Authored-By: Ana G. <40721795+Bitcoinera@users.noreply.github.com> * lint Co-authored-by: Ana G. <40721795+Bitcoinera@users.noreply.github.com> Co-authored-by: Bitcoinera * fix emoney balances denoms (#436) Co-authored-by: Fabian Co-authored-by: iambeone Co-authored-by: Mario Pino Co-authored-by: Jordan Bibla --- Caddyfile | 20 +- Caddyfile.prod | 22 +- data/networks.js | 71 +-- docker-compose.yml | 2 +- .../polkadot-node-subscription.js | 67 ++- lib/network-container.js | 2 +- lib/reducers/cosmosV0-reducers.js | 20 +- lib/reducers/polkadotV0-reducers.js | 25 +- lib/reducers/terraV3-reducers.js | 14 +- lib/resolvers.js | 5 +- lib/schema.js | 6 +- lib/source/cosmosV0-source.js | 8 +- lib/source/polkadotV0-source.js | 76 ++- lib/statistics.js | 8 +- package-lock.json | 252 +++----- package.json | 3 +- yarn.lock | 566 +++++++++++++++++- 17 files changed, 861 insertions(+), 306 deletions(-) diff --git a/Caddyfile b/Caddyfile index 2b20153e87..ef740241f1 100644 --- a/Caddyfile +++ b/Caddyfile @@ -1,11 +1,11 @@ -staging-api.lunie.io { - proxy / lunieapi:4000 { - transparent - header_downstream Access-Control-Allow-Origin "*" - websocket - } -} -:9100 { - basicauth / admin lunie1234 - proxy / node_exporter:9100 +staging-api.lunie.io { + proxy / lunieapi:4000 { + transparent + header_downstream Access-Control-Allow-Origin "*" + websocket + } +} +:9100 { + basicauth / admin lunie1234 + proxy / lunieapi_node-exporter:9100 } \ No newline at end of file diff --git a/Caddyfile.prod b/Caddyfile.prod index ce1107be20..36ee9d556e 100644 --- a/Caddyfile.prod +++ b/Caddyfile.prod @@ -1,11 +1,11 @@ -production-api.lunie.io { - proxy / lunieapi:4000 { - transparent - header_downstream Access-Control-Allow-Origin "*" - websocket - } -} -:9100 { - basicauth / admin lunie1234 - proxy / node_exporter:9100 -} +production-api.lunie.io { + proxy / lunieapi:4000 { + transparent + header_downstream Access-Control-Allow-Origin "*" + websocket + } +} +:9100 { + basicauth / admin lunie1234 + proxy / lunieapi_node-exporter:9100 +} diff --git a/data/networks.js b/data/networks.js index bb5e9eef5c..08ac97fc35 100644 --- a/data/networks.js +++ b/data/networks.js @@ -186,43 +186,44 @@ module.exports = [ enabled: true, icon: 'https://app.lunie.io/img/networks/emoney-testnet.png', slug: 'emoney-testnet' + }, + { + id: 'polkadot-testnet', + title: 'Kusama', + chain_id: 'kusama-cc3', + api_url: 'https://host-01.polkascan.io/kusama/api/v1/', + rpc_url: + 'wss://kusama-rpc.polkastats.io/apikey/HunRG7eUwMTjaBAkz1A6GU1MqBJapaYsYfmU5EVzpAebMr8/', + bech32_prefix: ' ', + address_prefix: ' ', + ledger_app: 'polkadot', + address_creator: 'polkadot', + network_type: 'polkadot', + source_class_name: 'source/polkadotV0-source', + block_listener_class_name: 'block-listeners/polkadot-node-subscription', + testnet: true, + feature_session: true, + feature_explore: true, + feature_portfolio: true, + feature_validators: true, + feature_proposals: false, + feature_activity: false, + feature_explorer: false, + action_send: true, + action_claim_rewards: false, + action_delegate: true, + action_redelegate: true, + action_undelegate: true, + action_deposit: false, + action_vote: false, + action_proposal: false, + default: false, + stakingDenom: 'KSM', + enabled: true, + icon: 'https://app.lunie.io/img/networks/polkadot-testnet.png', + slug: 'kusama' } // { - // id: 'polkadot-testnet', - // title: 'Kusama', - // chain_id: 'kusama-cc3', - // api_url: 'https://host-01.polkascan.io/kusama/api/v1/', - // rpc_url: 'wss://kusama-rpc.polkadot.io/', - // bech32_prefix: ' ', - // address_prefix: ' ', - // ledger_app: 'polkadot', - // address_creator: 'polkadot', - // network_type: 'polkadot', - // source_class_name: 'source/polkadotV0-source', - // block_listener_class_name: 'block-listeners/polkadot-node-subscription', - // testnet: true, - // feature_session: true, - // feature_explore: true, - // feature_portfolio: true, - // feature_validators: true, - // feature_proposals: false, - // feature_activity: false, - // feature_explorer: false, - // action_send: true, - // action_claim_rewards: false, - // action_delegate: true, - // action_redelegate: true, - // action_undelegate: true, - // action_deposit: false, - // action_vote: false, - // action_proposal: false, - // default: false, - // stakingDenom: 'KSM', - // enabled: true, - // icon: 'https://app.lunie.io/img/networks/polkadot-testnet.png', - // slug: 'kusama' - // } - // { // id: 'livepeer-mainnet', // title: 'Livepeer', // chain_id: 'ethereum-1', diff --git a/docker-compose.yml b/docker-compose.yml index 54f34e2057..55eeac3a2c 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -46,7 +46,7 @@ services: deploy: mode: global caddy: - image: abiosoft/caddy:0.11.0 + image: abiosoft/caddy:1.0.3-no-stats depends_on: - "lunieapi" restart: on-failure diff --git a/lib/block-listeners/polkadot-node-subscription.js b/lib/block-listeners/polkadot-node-subscription.js index 864830eded..99b1f96b2c 100644 --- a/lib/block-listeners/polkadot-node-subscription.js +++ b/lib/block-listeners/polkadot-node-subscription.js @@ -1,4 +1,5 @@ const _ = require('lodash') +const { ApiPromise, WsProvider } = require('@polkadot/api') const { publishBlockAdded // publishUserTransactionAdded, @@ -8,12 +9,15 @@ const Sentry = require('@sentry/node') const database = require('../database') const config = require('../../config.js') +const POLLING_INTERVAL = 1000 +// const NEW_BLOCK_DELAY = 2000 + // This class polls for new blocks // Used for listening to events, such as new blocks. class PolkadotNodeSubscription { constructor(network, PolkadotApiClass, store) { this.network = network - this.polkadotAPI = new PolkadotApiClass(network) + this.polkadotAPI = new PolkadotApiClass(network, store) this.store = store this.validators = [] this.sessionValidators = [] @@ -25,11 +29,24 @@ class PolkadotNodeSubscription { this.subscribeForNewBlock() } + // here we init the polkadot rpc once for all processes + // the class gets stored in the store to be used by all instances + async initPolkadotRPC() { + this.api = new ApiPromise({ + provider: new WsProvider(this.network.rpc_url) + }) + this.store.polkadotRPC = this.api + await this.api.isReady + } + async subscribeForNewBlock() { - const api = await this.polkadotAPI.getAPIPromise() + // here we init the polkadot rpc once for all processes + if (!this.api) { + await this.initPolkadotRPC() + } // Subscribe to new block headers - await api.rpc.chain.subscribeNewHeads(async blockHeader => { + await this.api.rpc.chain.subscribeNewHeads(async blockHeader => { const blockHeight = blockHeader.number.toNumber() if (this.height < blockHeight) { this.height = blockHeight @@ -44,16 +61,49 @@ class PolkadotNodeSubscription { enqueueAndPublishBlockAdded(newBlock) { this.blockQueue.push(newBlock) if (this.blockQueue.length > 2) { - this.blockQueue.sort((a, b) => - a.height > b.height ? 1 : b.height > a.height ? -1 : 0 - ) + this.blockQueue = this.blockQueue.sort((a, b) => a.height - b.height) console.log( - `\x1b[36mPublishing new kusama block #${newBlock.height}\x1b[0m` + `\x1b[36mPublishing new kusama block #${this.blockQueue[0].height}\x1b[0m` ) publishBlockAdded(this.network.id, this.blockQueue.shift()) } } + // poll latest block height and handle all blocks unknown to this API yet in order + async checkForNewBlock() { + try { + const blockHeight = await this.polkadotAPI.getBlockHeight() + + // if we get a newer block then expected query for all the outstanding blocks + while (blockHeight > this.height) { + this.height = this.height ? this.height++ : blockHeight + console.log(`New kusama block #${this.height}`) + this.newBlockHandler(this.height) + + // we are safe, that the chain produced a block so it didn't hang up + if (this.chainHangup) clearTimeout(this.chainHangup) + } + } catch (error) { + console.error('Failed to check for a new block', error) + Sentry.captureException(error) + } + } + + async pollForNewBlock() { + // here we init the polkadot rpc once for all processes + if (!this.api) { + await this.initPolkadotRPC() + } + + // immediatly check and not wait the polling delay + await this.checkForNewBlock() + + this.pollingTimeout = setTimeout(async () => { + await this.checkForNewBlock() + this.pollForNewBlock() + }, POLLING_INTERVAL) + } + // For each block event, we fetch the block information and publish a message. // A GraphQL resolver is listening for these messages and sends the block to // each subscribed user. @@ -64,7 +114,6 @@ class PolkadotNodeSubscription { }) const block = await this.polkadotAPI.getBlockByHeight(blockHeight) - // publishBlockAdded(this.network.id, block) this.enqueueAndPublishBlockAdded(block) // We dont need to fetch validators on every new block. @@ -106,7 +155,7 @@ class PolkadotNodeSubscription { // publishEvent(this.network.id, 'transaction', address, tx) // }) } catch (error) { - console.error(`newBlockHandler failed: ${error}`) + console.error(`newBlockHandler failed`, JSON.stringify(error, null, 2)) Sentry.captureException(error) } } diff --git a/lib/network-container.js b/lib/network-container.js index 235c5cb4d2..e2abe56f2a 100644 --- a/lib/network-container.js +++ b/lib/network-container.js @@ -44,7 +44,7 @@ class NetworkContainer { createDataSource() { if (this.sourceClass) { return { - api: new this.sourceClass(this.network), + api: new this.sourceClass(this.network, this.store), store: this.store } } diff --git a/lib/reducers/cosmosV0-reducers.js b/lib/reducers/cosmosV0-reducers.js index 08e12bcb6a..cea03d69f6 100644 --- a/lib/reducers/cosmosV0-reducers.js +++ b/lib/reducers/cosmosV0-reducers.js @@ -253,10 +253,10 @@ function denomLookup(denom) { uatom: 'ATOM', umuon: 'MUON', uluna: 'LUNA', - ukrw: 'KRW', + ukrw: 'KRT', umnt: 'MNT', - usdr: 'SDR', - uusd: 'USD', + usdr: 'SDT', + uusd: 'UST', seed: 'TREE', ungm: 'NGM', eeur: 'eEUR', @@ -318,9 +318,17 @@ function rewardCoinReducer(reward, stakingDenom) { const stringBit = reward.match(/[a-z]+/gi) const multiDenomRewardsArray = reward.split(`,`) if (multiDenomRewardsArray.length > 1) { - return multiDenomRewardsArray - .map(reward => rewardCoinReducer(reward)) - .filter(({ denom }) => denom === denomLookup(stakingDenom))[0] + const mappedMultiDenomRewardsArray = multiDenomRewardsArray.map(reward => + rewardCoinReducer(reward) + ) + let stakingDenomRewards = mappedMultiDenomRewardsArray.find( + ({ denom }) => denom === denomLookup(stakingDenom) + ) + // if there is no staking denom reward we will display the first alt-token reward + return ( + stakingDenomRewards || + mappedMultiDenomRewardsArray.find(({ amount }) => amount > 0) + ) } return { denom: denomLookup(stringBit), diff --git a/lib/reducers/polkadotV0-reducers.js b/lib/reducers/polkadotV0-reducers.js index 8acdebee36..b28fc745df 100644 --- a/lib/reducers/polkadotV0-reducers.js +++ b/lib/reducers/polkadotV0-reducers.js @@ -1,3 +1,7 @@ +const BigNumber = require('bignumber.js') + +const POLKADOT_CONVERSION = 1000000000000 + function blockReducer( networkId, blockHeight, @@ -45,11 +49,28 @@ function validatorReducer(network, validator) { maxChangeCommission: undefined, status: `ACTIVE`, // We are fetching current session active validators only (not intentions) statusDetailed: ``, // TODO: Include validator heartbeat messages - delegatorShares: undefined + delegatorShares: undefined, + selfStake: + ( + BigNumber(validator.exposure.own).toNumber() / POLKADOT_CONVERSION + ).toFixed(9) || 0 } } +function balanceReducer(balance) { + // hack. We convert the balance into an Array to make it an Iterable + return [ + { + amount: BigNumber(balance) + .div(POLKADOT_CONVERSION) + .toFixed(4), + denom: `KSM` // hardcoded for now. Looking how to do a more complete query + } + ] +} + module.exports = { blockReducer, - validatorReducer + validatorReducer, + balanceReducer } diff --git a/lib/reducers/terraV3-reducers.js b/lib/reducers/terraV3-reducers.js index 790c93e941..f98336b4f8 100644 --- a/lib/reducers/terraV3-reducers.js +++ b/lib/reducers/terraV3-reducers.js @@ -26,8 +26,7 @@ function undelegationEndTimeReducer(transaction) { function balanceReducer(coin, fiatValue, gasPrices) { return { - amount: coin.amount, - denom: correctTerraDenomsReducer(coin.denom), + ...coin, fiatValue: fiatValue ? { amount: fiatValue.amount || 0, @@ -53,7 +52,7 @@ function rewardReducer(rewards, validatorsDictionary) { formattedRewards.forEach(({ reward, validator }) => reward.forEach(denomReward => { multiDenomRewardsArray.push({ - denom: correctTerraDenomsReducer(denomLookup(denomReward.denom)), + denom: denomLookup(denomReward.denom), amount: atoms(denomReward.amount), fiatValue: denomReward.fiatValue, validator: validator @@ -63,15 +62,6 @@ function rewardReducer(rewards, validatorsDictionary) { return multiDenomRewardsArray } -function correctTerraDenomsReducer(viewDenom) { - const corrector = { - KRW: 'KRT', - SDR: 'SDT', - USD: 'UST' - } - return corrector[viewDenom] ? corrector[viewDenom] : viewDenom -} - module.exports = { ...cosmosV2Reducers, balanceReducer, diff --git a/lib/resolvers.js b/lib/resolvers.js index f06835336d..9319da45b3 100644 --- a/lib/resolvers.js +++ b/lib/resolvers.js @@ -317,13 +317,14 @@ const resolvers = { }, overview: async ( _, - { networkId, address }, + { networkId, address, fiatCurrency }, { dataSources, fingerprint } ) => { const validatorsDictionary = localStore(dataSources, networkId).validators const overview = await remoteFetch(dataSources, networkId).getOverview( address, - validatorsDictionary + validatorsDictionary, + fiatCurrency ) overview.networkId = networkId overview.address = address diff --git a/lib/schema.js b/lib/schema.js index 6aac137b80..1b32eb8de6 100644 --- a/lib/schema.js +++ b/lib/schema.js @@ -328,7 +328,11 @@ const typeDefs = gql` denom: String! fiatCurrency: String ): Balance - overview(networkId: String!, address: String!): Overview + overview( + networkId: String! + address: String! + fiatCurrency: String + ): Overview delegation( networkId: String! delegatorAddress: String! diff --git a/lib/source/cosmosV0-source.js b/lib/source/cosmosV0-source.js index b87d027e0e..c811aee2d7 100644 --- a/lib/source/cosmosV0-source.js +++ b/lib/source/cosmosV0-source.js @@ -486,7 +486,11 @@ class CosmosV0API extends RESTDataSource { ) } - async getOverview(delegatorAddress, validatorsDictionary) { + async getOverview( + delegatorAddress, + validatorsDictionary, + fiatCurrency = `EUR` + ) { this.checkAddress(delegatorAddress) const [ balances, @@ -508,7 +512,7 @@ class CosmosV0API extends RESTDataSource { const rewards = await this.getRewards( delegatorAddress, validatorsDictionary, - delegations + fiatCurrency ) const fiatValueAPI = this.calculateFiatValue ? this : null return this.reducers.overviewReducer( diff --git a/lib/source/polkadotV0-source.js b/lib/source/polkadotV0-source.js index 97cdfaea3f..7e8e5f124a 100644 --- a/lib/source/polkadotV0-source.js +++ b/lib/source/polkadotV0-source.js @@ -1,37 +1,48 @@ -const { ApiPromise, WsProvider } = require('@polkadot/api') const BigNumber = require('bignumber.js') class polkadotAPI { - constructor(network) { + constructor(network, store) { this.network = network this.setReducers() + this.store = store } setReducers() { this.reducers = require('../reducers/polkadotV0-reducers') } - async getAPIPromise() { - return await ApiPromise.create({ - provider: new WsProvider(this.network.rpc_url) - }) + // rpc initialization is async so we always need to assume we need to wait for it to be initialized + async getAPI() { + const api = this.store.polkadotRPC + await api.isReady + return api } - async getBlockByHeight(blockHeight) { - const api = await this.getAPIPromise() + async getBlockHeight() { + const api = await this.getAPI() + const block = await api.rpc.chain.getBlock() + return block.block.header.number.toNumber() + } - const [blockHash, sessionIndex] = await Promise.all([ - api.rpc.chain.getBlockHash(blockHeight), + async getBlockByHeight(blockHeight) { + const api = await this.getAPI() + + // heavy nesting to provide optimal parallelization here + const [ + [{ author }, blockEvents, blockHash], + sessionIndex + ] = await Promise.all([ + api.rpc.chain.getBlockHash(blockHeight).then(async blockHash => { + const [{ author }, blockEvents] = await Promise.all([ + api.derive.chain.getHeader(blockHash), + api.query.system.events.at(blockHash) + ]) + + return [{ author }, blockEvents, blockHash] + }), api.query.babe.epochIndex() ]) - const [{ author }, blockEvents] = await Promise.all([ - api.derive.chain.getHeader(blockHash), - api.query.system.events.at(blockHash) - ]) - - api.disconnect() - return this.reducers.blockReducer( this.networkId, blockHeight, @@ -99,7 +110,7 @@ class polkadotAPI { } async getAllValidators() { - const api = await this.getAPIPromise() + const api = await this.getAPI() // Fetch validator addresses for current session const validatorAddresses = await api.query.session.validators() @@ -129,8 +140,6 @@ class polkadotAPI { ) validatorIdentity = JSON.parse(JSON.stringify(validatorIdentity)) - // Add identity, voting power and tokens - // TODO: also include self stake validators.forEach(validator => { const identity = validatorIdentity.find( validatorIdentity => validatorIdentity.accountId === validator.accountId @@ -145,8 +154,6 @@ class polkadotAPI { } }) - api.disconnect() - return validators.map(validator => this.reducers.validatorReducer(this.network, validator) ) @@ -156,6 +163,31 @@ class polkadotAPI { async getExpectedReturns() { return 0 } + + async getSelfStake(validator) { + return validator.selfStake + } + + async getBalancesFromAddress(address) { + const api = await this.getAPI() + // the documentation points at api.query.system.account as the preferred query. Looking into it + const balance = await api.query.balances.freeBalance(address) + return this.reducers.balanceReducer(JSON.stringify(balance)) + } + + async getRewards(delegatorAddress) { + const api = await this.getAPI() + const rewards = api.derive.staking.stakerRewards(delegatorAddress) + // currently not working. It always returns [] + console.log('REWARDS', rewards) + return rewards + } + + async getOverview(delegatorAddress) { + const api = await this.getAPI() + const accountBalances = await api.query.staking.bonded(delegatorAddress) // or stashId? + console.log('ACCOUNT', JSON.stringify(accountBalances)) + } } module.exports = polkadotAPI diff --git a/lib/statistics.js b/lib/statistics.js index 9386ab8d14..a980f3c86f 100644 --- a/lib/statistics.js +++ b/lib/statistics.js @@ -63,13 +63,17 @@ const prestore = async (payload, hash) => { } const defineActionValue = msg => { if (msg.length == 1 && msg[0].value.amount) { - return msg[0].value.amount.amount + return Array.isArray(msg[0].value.amount) + ? msg[0].value.amount[0].amount + : msg[0].value.amount.amount } return 0 } const defineActionDenom = msg => { if (msg.length == 1 && msg[0].value.amount) { - return msg[0].value.amount.denom + return Array.isArray(msg[0].value.amount) + ? msg[0].value.amount[0].denom + : msg[0].value.amount.denom } return '' } diff --git a/package-lock.json b/package-lock.json index b30f7e08df..2ec68cd5dc 100644 --- a/package-lock.json +++ b/package-lock.json @@ -695,19 +695,19 @@ } }, "@polkadot/api": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/@polkadot/api/-/api-1.4.2.tgz", - "integrity": "sha512-jXpW8rvmGGEIyBv9+SC4VW4MtH4iV7C6K1oXOQyF6SIds+Tzub97JwlLJexbCvYFx6j5ABNHyDjp+EQ6LEvr2w==", + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/@polkadot/api/-/api-1.5.1.tgz", + "integrity": "sha512-cvqasyk91/lPB2YXCrQApvrVm0E/8aQcl/AO2iVNJQ1L+pHzR6rnd+94iKMmWFCtRZj86qguR813xsKwJ/PgLg==", "requires": { "@babel/runtime": "^7.8.4", - "@polkadot/api-derive": "1.4.2", - "@polkadot/keyring": "^2.5.1", - "@polkadot/metadata": "1.4.2", - "@polkadot/rpc-core": "1.4.2", - "@polkadot/rpc-provider": "1.4.2", - "@polkadot/types": "1.4.2", - "@polkadot/util": "^2.5.1", - "@polkadot/util-crypto": "^2.5.1", + "@polkadot/api-derive": "1.5.1", + "@polkadot/keyring": "^2.6.1", + "@polkadot/metadata": "1.5.1", + "@polkadot/rpc-core": "1.5.1", + "@polkadot/rpc-provider": "1.5.1", + "@polkadot/types": "1.5.1", + "@polkadot/util": "^2.6.1", + "@polkadot/util-crypto": "^2.6.1", "bn.js": "^5.1.1", "eventemitter3": "^4.0.0", "rxjs": "^6.5.4" @@ -729,17 +729,17 @@ } }, "@polkadot/api-derive": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/@polkadot/api-derive/-/api-derive-1.4.2.tgz", - "integrity": "sha512-0wDicrqizfaQhSC7PfwOWikoeMcJKuOIF4+UokX4Zl1211GUJso//+5tMge0oaBNBip1OgXpjHY1ElkgC+bn/Q==", + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/@polkadot/api-derive/-/api-derive-1.5.1.tgz", + "integrity": "sha512-KmN9UBZFv1v0Q0PMgHGgcZvEbgIYnnyj3mV7M0o7F/200VyvWCySaR+T7Tqu19zdGvQ7ocmQ6VnTw9E2cKqUrA==", "requires": { "@babel/runtime": "^7.8.4", - "@polkadot/api": "1.4.2", - "@polkadot/rpc-core": "1.4.2", - "@polkadot/rpc-provider": "1.4.2", - "@polkadot/types": "1.4.2", - "@polkadot/util": "^2.5.1", - "@polkadot/util-crypto": "^2.5.1", + "@polkadot/api": "1.5.1", + "@polkadot/rpc-core": "1.5.1", + "@polkadot/rpc-provider": "1.5.1", + "@polkadot/types": "1.5.1", + "@polkadot/util": "^2.6.1", + "@polkadot/util-crypto": "^2.6.1", "bn.js": "^5.1.1", "memoizee": "^0.4.14", "rxjs": "^6.5.4" @@ -756,107 +756,48 @@ } }, "@polkadot/jsonrpc": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/@polkadot/jsonrpc/-/jsonrpc-1.4.2.tgz", - "integrity": "sha512-XydE0ckR35S3no9Lt+XSkDN8PXMJO37TV0Y5wCnfrLkH5xYTsno/Cje8JKmAz4epnakeAf+qecGBAZ9RMpR6dQ==", + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/@polkadot/jsonrpc/-/jsonrpc-1.5.1.tgz", + "integrity": "sha512-Re9ibWzYXG44X05HyQPPHNXMurrOAxVwJaeSCjVJ3UN7DxXkXniIWohvupIoiRn0Ayp1/1QOK8YvEOjqxyqTMw==", "requires": { "@babel/runtime": "^7.8.4", - "@polkadot/types": "1.4.2", - "@polkadot/util": "^2.5.1" + "@polkadot/types": "1.5.1", + "@polkadot/util": "^2.6.1" } }, "@polkadot/keyring": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/@polkadot/keyring/-/keyring-2.5.1.tgz", - "integrity": "sha512-E6CdkHidW6CdP11sJv0Nq7sVPAAHSsIYdybPW34drVHjl11leho7WETIGkXGrbAFjj4bi6H2CFWfF4i0gh7qhg==", + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/@polkadot/keyring/-/keyring-2.6.1.tgz", + "integrity": "sha512-h12f5tWfqzJUmXTnjQ5fVrfSIiZH2ToRdPwEn467yHpeCDPWNCnKN/qHHoYOFQi8TkALiQk03NZbLX4QgoNRFw==", "requires": { "@babel/runtime": "^7.8.4", - "@polkadot/util": "2.5.1", - "@polkadot/util-crypto": "2.5.1" - }, - "dependencies": { - "@polkadot/util": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/@polkadot/util/-/util-2.5.1.tgz", - "integrity": "sha512-MVQPyxkhfERvV1uGyne0b7iekX9h7v892144bNB5VYZ7C2rTuJ5XpaWgx0V9DANeaEv+cqfjeW+8ngYQwYhQKw==", - "requires": { - "@babel/runtime": "^7.8.4", - "@types/bn.js": "^4.11.6", - "bn.js": "^5.1.1", - "camelcase": "^5.3.1", - "chalk": "^3.0.0", - "ip-regex": "^4.1.0" - } - }, - "ansi-styles": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz", - "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==", - "requires": { - "@types/color-name": "^1.1.1", - "color-convert": "^2.0.1" - } - }, - "chalk": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz", - "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==", - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" - }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" - }, - "supports-color": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz", - "integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==", - "requires": { - "has-flag": "^4.0.0" - } - } + "@polkadot/util": "2.6.1", + "@polkadot/util-crypto": "2.6.1" } }, "@polkadot/metadata": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/@polkadot/metadata/-/metadata-1.4.2.tgz", - "integrity": "sha512-E3adceNls4NlJm4ErK7GIu6el6Z3GiUVuZDMmY2iZoo4awcgMjhRyJS/7k8VotcSW0B1q3EU7qPaOoD6f9xHLQ==", + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/@polkadot/metadata/-/metadata-1.5.1.tgz", + "integrity": "sha512-Su7mdelNVn5fNUcM9qFlha6gayLoOnTjT7yWy21apt7bg11mrj5aiJ2J6YvKhnM+9xGpKYnTqAX2fFyDbPqiFg==", "requires": { "@babel/runtime": "^7.8.4", - "@polkadot/types": "1.4.2", - "@polkadot/util": "^2.5.1", - "@polkadot/util-crypto": "^2.5.1", + "@polkadot/types": "1.5.1", + "@polkadot/util": "^2.6.1", + "@polkadot/util-crypto": "^2.6.1", "bn.js": "^5.1.1" } }, "@polkadot/rpc-core": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/@polkadot/rpc-core/-/rpc-core-1.4.2.tgz", - "integrity": "sha512-teHT+psl5QoDHE6lPF/YUE0dpXrdSIZYfEG0sOkYzL/eS63WKcixXYYf8inaRvjNhbapPd/JvTof60a/PAHFqw==", + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/@polkadot/rpc-core/-/rpc-core-1.5.1.tgz", + "integrity": "sha512-SE0cAcTeLvZxJHnD8+saiksyjoBhMGRcVB9BkDLPPKZJ1+xZfZ/SItHhXCtCgL1Ur3UUTbrdLHVLNgE6Tb11lg==", "requires": { "@babel/runtime": "^7.8.4", - "@polkadot/jsonrpc": "1.4.2", - "@polkadot/metadata": "1.4.2", - "@polkadot/rpc-provider": "1.4.2", - "@polkadot/types": "1.4.2", - "@polkadot/util": "^2.5.1", + "@polkadot/jsonrpc": "1.5.1", + "@polkadot/metadata": "1.5.1", + "@polkadot/rpc-provider": "1.5.1", + "@polkadot/types": "1.5.1", + "@polkadot/util": "^2.6.1", "memoizee": "^0.4.14", "rxjs": "^6.5.4" }, @@ -872,16 +813,16 @@ } }, "@polkadot/rpc-provider": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/@polkadot/rpc-provider/-/rpc-provider-1.4.2.tgz", - "integrity": "sha512-v9D+q5YACa8SCHWiYmlOy7evaoc8a2mPH1Yh7DNOnfi5b51D9dA6vbZSDfWavB/M9E1tTMGdFNzt7j+sAsnwKw==", + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/@polkadot/rpc-provider/-/rpc-provider-1.5.1.tgz", + "integrity": "sha512-w81LZbo0r0vEGu72YdiKYgC3zvtVPqkopASTu6pyr3GjltVHmdXRsogdEoogveYCaJvEG8ul2CW/gFROzr53EA==", "requires": { "@babel/runtime": "^7.8.4", - "@polkadot/jsonrpc": "1.4.2", - "@polkadot/metadata": "1.4.2", - "@polkadot/types": "1.4.2", - "@polkadot/util": "^2.5.1", - "@polkadot/util-crypto": "^2.5.1", + "@polkadot/jsonrpc": "1.5.1", + "@polkadot/metadata": "1.5.1", + "@polkadot/types": "1.5.1", + "@polkadot/util": "^2.6.1", + "@polkadot/util-crypto": "^2.6.1", "bn.js": "^5.1.1", "eventemitter3": "^4.0.0", "isomorphic-fetch": "^2.2.1", @@ -908,14 +849,14 @@ } }, "@polkadot/types": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/@polkadot/types/-/types-1.4.2.tgz", - "integrity": "sha512-Zpn7NQbFla0LWIGyHoMw3Vg83EcCGsC9ABWkoG9OzJQpInM7XCo7hA/Q/kHMKPyoICfNKOaweqf8+gbBtlAj/g==", + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/@polkadot/types/-/types-1.5.1.tgz", + "integrity": "sha512-Iom607LqB7QT/+gPD1+n7lpq2fZ71Kfw1u7WASfrxGVO/K7LdzmC12rv1/hbsFP7vsiw8SKeEH16FIiU5/S5WA==", "requires": { "@babel/runtime": "^7.8.4", - "@polkadot/metadata": "1.4.2", - "@polkadot/util": "^2.5.1", - "@polkadot/util-crypto": "^2.5.1", + "@polkadot/metadata": "1.5.1", + "@polkadot/util": "^2.6.1", + "@polkadot/util-crypto": "^2.6.1", "@types/bn.js": "^4.11.6", "bn.js": "^5.1.1", "memoizee": "^0.4.14", @@ -992,82 +933,25 @@ } }, "@polkadot/util-crypto": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/@polkadot/util-crypto/-/util-crypto-2.5.1.tgz", - "integrity": "sha512-AhL37ffn8MkSNwg//uj/xYFYzdbR3h196UB7y3IN6CPhD+pOPZOqDpqdd0oT2xpksppctvWZqYEaT1k7l3R2Tw==", + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/@polkadot/util-crypto/-/util-crypto-2.6.1.tgz", + "integrity": "sha512-XYPWlmuilDl4Yo1p/toYUoEp583lt3iwKOb1haIyylUzzQPIhW0t+7ys1ZSarAhuSqhy+7jbi3+DX5b8K1lFBQ==", "requires": { "@babel/runtime": "^7.8.4", - "@polkadot/util": "2.5.1", - "@polkadot/wasm-crypto": "^1.0.1", - "base-x": "^3.0.7", + "@polkadot/util": "2.6.1", + "@polkadot/wasm-crypto": "^1.2.1", + "base-x": "^3.0.8", "bip39": "^3.0.2", "blakejs": "^1.1.0", "bn.js": "^5.1.1", "bs58": "^4.0.1", "elliptic": "^6.5.2", "js-sha3": "^0.8.0", - "pbkdf2": "^3.0.9", + "pbkdf2": "^3.0.17", "tweetnacl": "^1.0.3", "xxhashjs": "^0.2.2" }, "dependencies": { - "@polkadot/util": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/@polkadot/util/-/util-2.5.1.tgz", - "integrity": "sha512-MVQPyxkhfERvV1uGyne0b7iekX9h7v892144bNB5VYZ7C2rTuJ5XpaWgx0V9DANeaEv+cqfjeW+8ngYQwYhQKw==", - "requires": { - "@babel/runtime": "^7.8.4", - "@types/bn.js": "^4.11.6", - "bn.js": "^5.1.1", - "camelcase": "^5.3.1", - "chalk": "^3.0.0", - "ip-regex": "^4.1.0" - } - }, - "ansi-styles": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz", - "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==", - "requires": { - "@types/color-name": "^1.1.1", - "color-convert": "^2.0.1" - } - }, - "chalk": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz", - "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==", - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" - }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" - }, - "supports-color": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz", - "integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==", - "requires": { - "has-flag": "^4.0.0" - } - }, "tweetnacl": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-1.0.3.tgz", @@ -1076,9 +960,9 @@ } }, "@polkadot/wasm-crypto": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/@polkadot/wasm-crypto/-/wasm-crypto-1.1.1.tgz", - "integrity": "sha512-LMZA+KDnE2qKD7Un9/OJKuCmsf63vvhjGqM/lcb+2FZu5TpfjP1AMeTurDOt1ip3+qEukd5FkfUHXQIiFJLVBQ==" + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@polkadot/wasm-crypto/-/wasm-crypto-1.2.1.tgz", + "integrity": "sha512-nckIoZBV4nBZdeKwFwH5t7skS7L7GO5EFUl5B1F6uCjUfdNpDz3DtqbYQHcLdCZNmG4TDLg6w/1J+rkl2SiUZw==" }, "@protobufjs/aspromise": { "version": "1.1.2", diff --git a/package.json b/package.json index 3f0bfdc112..3e5dc18ffd 100644 --- a/package.json +++ b/package.json @@ -13,6 +13,7 @@ "dev-docker": "docker build -t lunie-api-dev . && docker run --init -it -p 4000:4000 lunie-api-dev", "lint": "eslint index.js config.js lib tests", "lint-fix": "yarn lint --fix", + "release": "git fetch --all && git checkout origin/develop -B develop && git pull && git merge origin/master && git push -u origin develop && git push origin develop:release", "start": "node index.js ", "test": "jest" }, @@ -25,7 +26,7 @@ "license": "ISC", "dependencies": { "@hapi/joi": "^16.1.8", - "@polkadot/api": "^1.4.2", + "@polkadot/api": "^1.5.1", "@polkadot/util": "^2.6.1", "@sentry/node": "^5.9.0", "apollo-datasource-rest": "^0.6.6", diff --git a/yarn.lock b/yarn.lock index ebcca297e5..1822fdced0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -128,6 +128,13 @@ dependencies: "@babel/helper-plugin-utils" "^7.0.0" +"@babel/runtime@^7.8.4": + version "7.8.7" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.8.7.tgz#8fefce9802db54881ba59f90bb28719b4996324d" + integrity sha512-+AATMUFppJDw6aiR5NVPHqIQBlV/Pj8wY/EZH+lmvRdUo9xBaz/rF3alAwFJQavvKfeOlPE7oaaDHVbcySbCsg== + dependencies: + regenerator-runtime "^0.13.4" + "@babel/template@^7.4.0", "@babel/template@^7.7.4": version "7.7.4" resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.7.4.tgz#428a7d9eecffe27deac0a98e23bf8e3675d2a77b" @@ -477,6 +484,149 @@ "@types/istanbul-reports" "^1.1.1" "@types/yargs" "^13.0.0" +"@polkadot/api-derive@1.5.1": + version "1.5.1" + resolved "https://registry.yarnpkg.com/@polkadot/api-derive/-/api-derive-1.5.1.tgz#2bc31c1943e8707d08854eae1b623b357d3bb118" + integrity sha512-KmN9UBZFv1v0Q0PMgHGgcZvEbgIYnnyj3mV7M0o7F/200VyvWCySaR+T7Tqu19zdGvQ7ocmQ6VnTw9E2cKqUrA== + dependencies: + "@babel/runtime" "^7.8.4" + "@polkadot/api" "1.5.1" + "@polkadot/rpc-core" "1.5.1" + "@polkadot/rpc-provider" "1.5.1" + "@polkadot/types" "1.5.1" + "@polkadot/util" "^2.6.1" + "@polkadot/util-crypto" "^2.6.1" + bn.js "^5.1.1" + memoizee "^0.4.14" + rxjs "^6.5.4" + +"@polkadot/api@1.5.1", "@polkadot/api@^1.4.2": + version "1.5.1" + resolved "https://registry.yarnpkg.com/@polkadot/api/-/api-1.5.1.tgz#2da9adddfa94fd693692239e717e307092767ffa" + integrity sha512-cvqasyk91/lPB2YXCrQApvrVm0E/8aQcl/AO2iVNJQ1L+pHzR6rnd+94iKMmWFCtRZj86qguR813xsKwJ/PgLg== + dependencies: + "@babel/runtime" "^7.8.4" + "@polkadot/api-derive" "1.5.1" + "@polkadot/keyring" "^2.6.1" + "@polkadot/metadata" "1.5.1" + "@polkadot/rpc-core" "1.5.1" + "@polkadot/rpc-provider" "1.5.1" + "@polkadot/types" "1.5.1" + "@polkadot/util" "^2.6.1" + "@polkadot/util-crypto" "^2.6.1" + bn.js "^5.1.1" + eventemitter3 "^4.0.0" + rxjs "^6.5.4" + +"@polkadot/jsonrpc@1.5.1": + version "1.5.1" + resolved "https://registry.yarnpkg.com/@polkadot/jsonrpc/-/jsonrpc-1.5.1.tgz#4259306678033be2dc4199e8baa0465946952c2b" + integrity sha512-Re9ibWzYXG44X05HyQPPHNXMurrOAxVwJaeSCjVJ3UN7DxXkXniIWohvupIoiRn0Ayp1/1QOK8YvEOjqxyqTMw== + dependencies: + "@babel/runtime" "^7.8.4" + "@polkadot/types" "1.5.1" + "@polkadot/util" "^2.6.1" + +"@polkadot/keyring@^2.6.1": + version "2.6.1" + resolved "https://registry.yarnpkg.com/@polkadot/keyring/-/keyring-2.6.1.tgz#dad4d2047ed94334aa509b404bf7d49374e219e6" + integrity sha512-h12f5tWfqzJUmXTnjQ5fVrfSIiZH2ToRdPwEn467yHpeCDPWNCnKN/qHHoYOFQi8TkALiQk03NZbLX4QgoNRFw== + dependencies: + "@babel/runtime" "^7.8.4" + "@polkadot/util" "2.6.1" + "@polkadot/util-crypto" "2.6.1" + +"@polkadot/metadata@1.5.1": + version "1.5.1" + resolved "https://registry.yarnpkg.com/@polkadot/metadata/-/metadata-1.5.1.tgz#4a859e73708f9ed1b627e155a7d7faea334fb805" + integrity sha512-Su7mdelNVn5fNUcM9qFlha6gayLoOnTjT7yWy21apt7bg11mrj5aiJ2J6YvKhnM+9xGpKYnTqAX2fFyDbPqiFg== + dependencies: + "@babel/runtime" "^7.8.4" + "@polkadot/types" "1.5.1" + "@polkadot/util" "^2.6.1" + "@polkadot/util-crypto" "^2.6.1" + bn.js "^5.1.1" + +"@polkadot/rpc-core@1.5.1": + version "1.5.1" + resolved "https://registry.yarnpkg.com/@polkadot/rpc-core/-/rpc-core-1.5.1.tgz#aa722e5b1348c1dd31899897a65c6a56f3695ad8" + integrity sha512-SE0cAcTeLvZxJHnD8+saiksyjoBhMGRcVB9BkDLPPKZJ1+xZfZ/SItHhXCtCgL1Ur3UUTbrdLHVLNgE6Tb11lg== + dependencies: + "@babel/runtime" "^7.8.4" + "@polkadot/jsonrpc" "1.5.1" + "@polkadot/metadata" "1.5.1" + "@polkadot/rpc-provider" "1.5.1" + "@polkadot/types" "1.5.1" + "@polkadot/util" "^2.6.1" + memoizee "^0.4.14" + rxjs "^6.5.4" + +"@polkadot/rpc-provider@1.5.1": + version "1.5.1" + resolved "https://registry.yarnpkg.com/@polkadot/rpc-provider/-/rpc-provider-1.5.1.tgz#48b463302f4ae153044e08fac79b9a75ffb370c4" + integrity sha512-w81LZbo0r0vEGu72YdiKYgC3zvtVPqkopASTu6pyr3GjltVHmdXRsogdEoogveYCaJvEG8ul2CW/gFROzr53EA== + dependencies: + "@babel/runtime" "^7.8.4" + "@polkadot/jsonrpc" "1.5.1" + "@polkadot/metadata" "1.5.1" + "@polkadot/types" "1.5.1" + "@polkadot/util" "^2.6.1" + "@polkadot/util-crypto" "^2.6.1" + bn.js "^5.1.1" + eventemitter3 "^4.0.0" + isomorphic-fetch "^2.2.1" + websocket "^1.0.31" + +"@polkadot/types@1.5.1": + version "1.5.1" + resolved "https://registry.yarnpkg.com/@polkadot/types/-/types-1.5.1.tgz#4e3acbd2e718536fad7e8874dfbf1957d4bb6fce" + integrity sha512-Iom607LqB7QT/+gPD1+n7lpq2fZ71Kfw1u7WASfrxGVO/K7LdzmC12rv1/hbsFP7vsiw8SKeEH16FIiU5/S5WA== + dependencies: + "@babel/runtime" "^7.8.4" + "@polkadot/metadata" "1.5.1" + "@polkadot/util" "^2.6.1" + "@polkadot/util-crypto" "^2.6.1" + "@types/bn.js" "^4.11.6" + bn.js "^5.1.1" + memoizee "^0.4.14" + rxjs "^6.5.4" + +"@polkadot/util-crypto@2.6.1", "@polkadot/util-crypto@^2.6.1": + version "2.6.1" + resolved "https://registry.yarnpkg.com/@polkadot/util-crypto/-/util-crypto-2.6.1.tgz#d5982e08d79e5315eb0ca8105ee0580f2284e572" + integrity sha512-XYPWlmuilDl4Yo1p/toYUoEp583lt3iwKOb1haIyylUzzQPIhW0t+7ys1ZSarAhuSqhy+7jbi3+DX5b8K1lFBQ== + dependencies: + "@babel/runtime" "^7.8.4" + "@polkadot/util" "2.6.1" + "@polkadot/wasm-crypto" "^1.2.1" + base-x "^3.0.8" + bip39 "^3.0.2" + blakejs "^1.1.0" + bn.js "^5.1.1" + bs58 "^4.0.1" + elliptic "^6.5.2" + js-sha3 "^0.8.0" + pbkdf2 "^3.0.17" + tweetnacl "^1.0.3" + xxhashjs "^0.2.2" + +"@polkadot/util@2.6.1", "@polkadot/util@^2.6.1": + version "2.6.1" + resolved "https://registry.yarnpkg.com/@polkadot/util/-/util-2.6.1.tgz#1b8b1d76a87072ad1099319031d278756215ee43" + integrity sha512-iaTqsCH6EEFm1yHSxLGCi/cplZS1lNFcs6QEb+FNgP418nG55NW/j+acpUf94JfZ3MPRB4228ooh45drsaUqPQ== + dependencies: + "@babel/runtime" "^7.8.4" + "@types/bn.js" "^4.11.6" + bn.js "^5.1.1" + camelcase "^5.3.1" + chalk "^3.0.0" + ip-regex "^4.1.0" + +"@polkadot/wasm-crypto@^1.2.1": + version "1.2.1" + resolved "https://registry.yarnpkg.com/@polkadot/wasm-crypto/-/wasm-crypto-1.2.1.tgz#2189702447acd28d763886359576c87562241767" + integrity sha512-nckIoZBV4nBZdeKwFwH5t7skS7L7GO5EFUl5B1F6uCjUfdNpDz3DtqbYQHcLdCZNmG4TDLg6w/1J+rkl2SiUZw== + "@protobufjs/aspromise@^1.1.1", "@protobufjs/aspromise@^1.1.2": version "1.1.2" resolved "https://registry.yarnpkg.com/@protobufjs/aspromise/-/aspromise-1.1.2.tgz#9b8b0cc663d669a7d8f6f5d0893a14d348f30fbf" @@ -626,6 +776,13 @@ dependencies: "@babel/types" "^7.3.0" +"@types/bn.js@^4.11.6": + version "4.11.6" + resolved "https://registry.yarnpkg.com/@types/bn.js/-/bn.js-4.11.6.tgz#c306c70d9358aaea33cd4eda092a742b9505967c" + integrity sha512-pqr857jrp2kPuO9uRjZ3PwnJTjoQy+fcdxvBTvHm6dkmEL9q+hDD/2j/0ELOBPtPnS8LjCX0gI9nbl8lVkadpg== + dependencies: + "@types/node" "*" + "@types/body-parser@*", "@types/body-parser@1.17.1": version "1.17.1" resolved "https://registry.yarnpkg.com/@types/body-parser/-/body-parser-1.17.1.tgz#18fcf61768fb5c30ccc508c21d6fd2e8b3bf7897" @@ -634,6 +791,11 @@ "@types/connect" "*" "@types/node" "*" +"@types/color-name@^1.1.1": + version "1.1.1" + resolved "https://registry.yarnpkg.com/@types/color-name/-/color-name-1.1.1.tgz#1c1261bbeaa10a8055bbc5d8ab84b7b2afc846a0" + integrity sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ== + "@types/connect@*": version "3.4.32" resolved "https://registry.yarnpkg.com/@types/connect/-/connect-3.4.32.tgz#aa0e9616b9435ccad02bc52b5b454ffc2c70ba28" @@ -765,6 +927,11 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-12.12.12.tgz#529bc3e73dbb35dd9e90b0a1c83606a9d3264bdb" integrity sha512-MGuvYJrPU0HUwqF7LqvIj50RZUX23Z+m583KBygKYUZLlZ88n6w28XRNJRJgsHukLEnLz6w6SvxZoLgbr5wLqQ== +"@types/node@11.11.6": + version "11.11.6" + resolved "https://registry.yarnpkg.com/@types/node/-/node-11.11.6.tgz#df929d1bb2eee5afdda598a41930fe50b43eaa6a" + integrity sha512-Exw4yUWMBXM3X+8oqzJNRqZSwUAaS4+7NdvHqQuFi/d+synz++xmX3QIf+BFqneW8N31R8Ky+sikfZUXq07ggQ== + "@types/node@^10.1.0": version "10.17.5" resolved "https://registry.yarnpkg.com/@types/node/-/node-10.17.5.tgz#c1920150f7b90708a7d0f3add12a06bc9123c055" @@ -945,6 +1112,14 @@ ansi-styles@^3.2.0, ansi-styles@^3.2.1: dependencies: color-convert "^1.9.0" +ansi-styles@^4.1.0: + version "4.2.1" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.2.1.tgz#90ae75c424d008d2624c5bf29ead3177ebfcf359" + integrity sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA== + dependencies: + "@types/color-name" "^1.1.1" + color-convert "^2.0.1" + anymatch@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-2.0.0.tgz#bcb24b4f37934d9aa7ac17b4adaf89e7c76ef2eb" @@ -1327,6 +1502,13 @@ balanced-match@^1.0.0: resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" integrity sha1-ibTRmasr7kneFk6gK4nORi1xt2c= +base-x@^3.0.2, base-x@^3.0.8: + version "3.0.8" + resolved "https://registry.yarnpkg.com/base-x/-/base-x-3.0.8.tgz#1e1106c2537f0162e8b52474a557ebb09000018d" + integrity sha512-Rl/1AWP4J/zRrk54hhlxH4drNxPJXYUaKffODVI53/dAsV4t9fBxyxYKAVPU1XBHxYwOWP9h9H0hM2MVw4YfJA== + dependencies: + safe-buffer "^5.0.1" + base64-js@^1.3.0: version "1.3.1" resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.3.1.tgz#58ece8cb75dd07e71ed08c736abc5fac4dbf8df1" @@ -1372,6 +1554,31 @@ binary-extensions@^1.0.0: resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-1.13.1.tgz#598afe54755b2868a5330d2aff9d4ebb53209b65" integrity sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw== +bip39@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/bip39/-/bip39-3.0.2.tgz#2baf42ff3071fc9ddd5103de92e8f80d9257ee32" + integrity sha512-J4E1r2N0tUylTKt07ibXvhpT2c5pyAFgvuA5q1H9uDy6dEGpjV8jmymh3MTYJDLCNbIVClSB9FbND49I6N24MQ== + dependencies: + "@types/node" "11.11.6" + create-hash "^1.1.0" + pbkdf2 "^3.0.9" + randombytes "^2.0.1" + +blakejs@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/blakejs/-/blakejs-1.1.0.tgz#69df92ef953aa88ca51a32df6ab1c54a155fc7a5" + integrity sha1-ad+S75U6qIylGjLfarHFShVfx6U= + +bn.js@^4.4.0: + version "4.11.8" + resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.8.tgz#2cde09eb5ee341f484746bb0309b3253b1b1442f" + integrity sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA== + +bn.js@^5.1.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-5.1.1.tgz#48efc4031a9c4041b9c99c6941d903463ab62eb5" + integrity sha512-IUTD/REb78Z2eodka1QZyyEk66pciRcP6Sroka0aI3tG/iwIdYLrBD62RsubR7vqdt3WyX8p4jxeatzmRSphtA== + body-parser@1.19.0, body-parser@^1.18.3: version "1.19.0" resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.19.0.tgz#96b2709e57c9c4e09a6fd66a8fd979844f69f08a" @@ -1425,6 +1632,11 @@ braces@^2.3.1, braces@^2.3.2: split-string "^3.0.2" to-regex "^3.0.1" +brorand@^1.0.1: + version "1.1.0" + resolved "https://registry.yarnpkg.com/brorand/-/brorand-1.1.0.tgz#12c25efe40a45e3c323eb8675a0a0ce57b22371f" + integrity sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8= + browser-process-hrtime@^0.1.2: version "0.1.3" resolved "https://registry.yarnpkg.com/browser-process-hrtime/-/browser-process-hrtime-0.1.3.tgz#616f00faef1df7ec1b5bf9cfe2bdc3170f26c7b4" @@ -1437,6 +1649,13 @@ browser-resolve@^1.11.3: dependencies: resolve "1.1.7" +bs58@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/bs58/-/bs58-4.0.1.tgz#be161e76c354f6f788ae4071f63f34e8c4f0a42a" + integrity sha1-vhYedsNU9veIrkBx9j806MTwpCo= + dependencies: + base-x "^3.0.2" + bser@^2.0.0: version "2.1.1" resolved "https://registry.yarnpkg.com/bser/-/bser-2.1.1.tgz#e6787da20ece9d07998533cfd9de6f5c38f4bc05" @@ -1560,6 +1779,14 @@ chalk@^2.0.0, chalk@^2.0.1, chalk@^2.1.0, chalk@^2.4.2: escape-string-regexp "^1.0.5" supports-color "^5.3.0" +chalk@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-3.0.0.tgz#3f73c2bf526591f574cc492c51e2456349f844e4" + integrity sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg== + dependencies: + ansi-styles "^4.1.0" + supports-color "^7.1.0" + chardet@^0.7.0: version "0.7.0" resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.7.0.tgz#90094849f0937f2eedc2425d0d28a9e5f0cbad9e" @@ -1604,6 +1831,14 @@ ci-info@^2.0.0: resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-2.0.0.tgz#67a9e964be31a51e15e5010d58e6f12834002f46" integrity sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ== +cipher-base@^1.0.1, cipher-base@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/cipher-base/-/cipher-base-1.0.4.tgz#8760e4ecc272f4c363532f926d874aae2c1397de" + integrity sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q== + dependencies: + inherits "^2.0.1" + safe-buffer "^5.0.1" + class-utils@^0.3.5: version "0.3.6" resolved "https://registry.yarnpkg.com/class-utils/-/class-utils-0.3.6.tgz#f93369ae8b9a7ce02fd41faad0ca83033190c463" @@ -1670,11 +1905,23 @@ color-convert@^1.9.0: dependencies: color-name "1.1.3" +color-convert@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3" + integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ== + dependencies: + color-name "~1.1.4" + color-name@1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" integrity sha1-p9BVi9icQveV3UIyj3QIMcpTvCU= +color-name@~1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" + integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== + combined-stream@^1.0.6, combined-stream@~1.0.6: version "1.0.8" resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f" @@ -1822,6 +2069,29 @@ create-error-class@^3.0.0: dependencies: capture-stack-trace "^1.0.0" +create-hash@^1.1.0, create-hash@^1.1.2: + version "1.2.0" + resolved "https://registry.yarnpkg.com/create-hash/-/create-hash-1.2.0.tgz#889078af11a63756bcfb59bd221996be3a9ef196" + integrity sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg== + dependencies: + cipher-base "^1.0.1" + inherits "^2.0.1" + md5.js "^1.3.4" + ripemd160 "^2.0.1" + sha.js "^2.4.0" + +create-hmac@^1.1.4: + version "1.1.7" + resolved "https://registry.yarnpkg.com/create-hmac/-/create-hmac-1.1.7.tgz#69170c78b3ab957147b2b8b04572e47ead2243ff" + integrity sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg== + dependencies: + cipher-base "^1.0.3" + create-hash "^1.1.0" + inherits "^2.0.1" + ripemd160 "^2.0.0" + safe-buffer "^5.0.1" + sha.js "^2.4.8" + cross-env@^6.0.3: version "6.0.3" resolved "https://registry.yarnpkg.com/cross-env/-/cross-env-6.0.3.tgz#4256b71e49b3a40637a0ce70768a6ef5c72ae941" @@ -1880,6 +2150,19 @@ cssstyle@^1.0.0: dependencies: cssom "0.3.x" +cuint@^0.2.2: + version "0.2.2" + resolved "https://registry.yarnpkg.com/cuint/-/cuint-0.2.2.tgz#408086d409550c2631155619e9fa7bcadc3b991b" + integrity sha1-QICG1AlVDCYxFVYZ6fp7ytw7mRs= + +d@1, d@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/d/-/d-1.0.1.tgz#8698095372d58dbee346ffd0c7093f99f8f9eb5a" + integrity sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA== + dependencies: + es5-ext "^0.10.50" + type "^1.0.1" + dashdash@^1.12.0: version "1.14.1" resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0" @@ -2132,6 +2415,19 @@ ee-first@1.1.1: resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" integrity sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0= +elliptic@^6.5.2: + version "6.5.2" + resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.2.tgz#05c5678d7173c049d8ca433552224a495d0e3762" + integrity sha512-f4x70okzZbIQl/NSRLkI/+tteV/9WqL98zx+SQ69KbXxmVrmjwsNUPn/gYJJ0sHvEak24cZgHIPegRePAtA/xw== + dependencies: + bn.js "^4.4.0" + brorand "^1.0.1" + hash.js "^1.0.0" + hmac-drbg "^1.0.0" + inherits "^2.0.1" + minimalistic-assert "^1.0.0" + minimalistic-crypto-utils "^1.0.0" + emoji-regex@^7.0.1: version "7.0.3" resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-7.0.3.tgz#933a04052860c85e83c122479c4748a8e4c72156" @@ -2147,6 +2443,13 @@ encodeurl@~1.0.2: resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59" integrity sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k= +encoding@^0.1.11: + version "0.1.12" + resolved "https://registry.yarnpkg.com/encoding/-/encoding-0.1.12.tgz#538b66f3ee62cd1ab51ec323829d1f9480c74beb" + integrity sha1-U4tm8+5izRq1HsMjgp0flIDHS+s= + dependencies: + iconv-lite "~0.4.13" + end-of-stream@^1.0.0, end-of-stream@^1.1.0, end-of-stream@^1.4.1: version "1.4.4" resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.4.tgz#5ae64a5f45057baf3626ec14da0ca5e4b2431eb0" @@ -2191,6 +2494,24 @@ es-to-primitive@^1.2.0: is-date-object "^1.0.1" is-symbol "^1.0.2" +es5-ext@^0.10.35, es5-ext@^0.10.45, es5-ext@^0.10.46, es5-ext@^0.10.50, es5-ext@~0.10.14, es5-ext@~0.10.2, es5-ext@~0.10.46: + version "0.10.53" + resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.53.tgz#93c5a3acfdbef275220ad72644ad02ee18368de1" + integrity sha512-Xs2Stw6NiNHWypzRTY1MtaG/uJlwCk8kH81920ma8mvN8Xq1gsfhZvpkImLQArw8AHnv8MT2I45J3c0R8slE+Q== + dependencies: + es6-iterator "~2.0.3" + es6-symbol "~3.1.3" + next-tick "~1.0.0" + +es6-iterator@^2.0.3, es6-iterator@~2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/es6-iterator/-/es6-iterator-2.0.3.tgz#a7de889141a05a94b0854403b2d0a0fbfa98f3b7" + integrity sha1-p96IkUGgWpSwhUQDstCg+/qY87c= + dependencies: + d "1" + es5-ext "^0.10.35" + es6-symbol "^3.1.1" + es6-promise@^4.0.3: version "4.2.8" resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-4.2.8.tgz#4eb21594c972bc40553d276e510539143db53e0a" @@ -2203,6 +2524,24 @@ es6-promisify@^5.0.0: dependencies: es6-promise "^4.0.3" +es6-symbol@^3.1.1, es6-symbol@~3.1.3: + version "3.1.3" + resolved "https://registry.yarnpkg.com/es6-symbol/-/es6-symbol-3.1.3.tgz#bad5d3c1bcdac28269f4cb331e431c78ac705d18" + integrity sha512-NJ6Yn3FuDinBaBRWl/q5X/s4koRHBrgKAu+yGI6JCBeiu3qrcbJhwT2GeR/EXVfylRk8dpQVJoLEFhK+Mu31NA== + dependencies: + d "^1.0.1" + ext "^1.1.2" + +es6-weak-map@^2.0.2: + version "2.0.3" + resolved "https://registry.yarnpkg.com/es6-weak-map/-/es6-weak-map-2.0.3.tgz#b6da1f16cc2cc0d9be43e6bdbfc5e7dfcdf31d53" + integrity sha512-p5um32HOTO1kP+w7PRnB+5lQ43Z6muuMuIMffvDN8ZB4GcnjLBV6zGStpbASIMk4DCAvEaamhe2zhyCb/QXXsA== + dependencies: + d "1" + es5-ext "^0.10.46" + es6-iterator "^2.0.3" + es6-symbol "^3.1.1" + escape-html@~1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988" @@ -2350,6 +2689,14 @@ etag@~1.8.1: resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887" integrity sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc= +event-emitter@^0.3.5: + version "0.3.5" + resolved "https://registry.yarnpkg.com/event-emitter/-/event-emitter-0.3.5.tgz#df8c69eef1647923c7157b9ce83840610b02cc39" + integrity sha1-34xp7vFkeSPHFXuc6DhAYQsCzDk= + dependencies: + d "1" + es5-ext "~0.10.14" + event-target-shim@^5.0.0: version "5.0.1" resolved "https://registry.yarnpkg.com/event-target-shim/-/event-target-shim-5.0.1.tgz#5d4d3ebdf9583d63a5333ce2deb7480ab2b05789" @@ -2360,6 +2707,11 @@ eventemitter3@^3.1.0: resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-3.1.2.tgz#2d3d48f9c346698fce83a85d7d664e98535df6e7" integrity sha512-tvtQIeLVHjDkJYnzf2dgVMxfuSGJeM/7UCG17TT4EumTfNtF+0nebF/4zWOIkCreAbtNqhGEboB6BWrwqNaw4Q== +eventemitter3@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-4.0.0.tgz#d65176163887ee59f386d64c82610b696a4a74eb" + integrity sha512-qerSRB0p+UDEssxTtm6EDKcE7W4OaoisfIMl4CngyEhjpYglocpNg6UEqCvemdGhosAsg4sO2dXJOdyBifPGCg== + exec-sh@^0.3.2: version "0.3.4" resolved "https://registry.yarnpkg.com/exec-sh/-/exec-sh-0.3.4.tgz#3a018ceb526cc6f6df2bb504b2bfe8e3a4934ec5" @@ -2457,6 +2809,13 @@ express@^4.0.0, express@^4.17.1: utils-merge "1.0.1" vary "~1.1.2" +ext@^1.1.2: + version "1.4.0" + resolved "https://registry.yarnpkg.com/ext/-/ext-1.4.0.tgz#89ae7a07158f79d35517882904324077e4379244" + integrity sha512-Key5NIsUxdqKg3vIsdw9dSuXpPCQ297y6wBjL30edxwPgt2E44WcWBZey/ZvUc6sERLTxKdyCu4gZFmUbk1Q7A== + dependencies: + type "^2.0.0" + extend-shallow@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-2.0.1.tgz#51af7d614ad9a9f610ea1bafbb989d6b1c56890f" @@ -3014,6 +3373,11 @@ has-flag@^3.0.0: resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" integrity sha1-tdRU3CGZriJWmfNGfloH87lVuv0= +has-flag@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" + integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== + has-symbols@^1.0.0, has-symbols@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.1.tgz#9f5214758a44196c406d9bd76cebf81ec2dd31e8" @@ -3062,6 +3426,14 @@ has@^1.0.1, has@^1.0.3: dependencies: function-bind "^1.1.1" +hash-base@^3.0.0: + version "3.0.4" + resolved "https://registry.yarnpkg.com/hash-base/-/hash-base-3.0.4.tgz#5fc8686847ecd73499403319a6b0a3f3f6ae4918" + integrity sha1-X8hoaEfs1zSZQDMZprCj8/auSRg= + dependencies: + inherits "^2.0.1" + safe-buffer "^5.0.1" + hash-stream-validation@^0.2.2: version "0.2.2" resolved "https://registry.yarnpkg.com/hash-stream-validation/-/hash-stream-validation-0.2.2.tgz#6b34c4fce5e9fce265f1d3380900049d92a10090" @@ -3069,6 +3441,23 @@ hash-stream-validation@^0.2.2: dependencies: through2 "^2.0.0" +hash.js@^1.0.0, hash.js@^1.0.3: + version "1.1.7" + resolved "https://registry.yarnpkg.com/hash.js/-/hash.js-1.1.7.tgz#0babca538e8d4ee4a0f8988d68866537a003cf42" + integrity sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA== + dependencies: + inherits "^2.0.3" + minimalistic-assert "^1.0.1" + +hmac-drbg@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/hmac-drbg/-/hmac-drbg-1.0.1.tgz#d2745701025a6c775a6c545793ed502fc0c649a1" + integrity sha1-0nRXAQJabHdabFRXk+1QL8DGSaE= + dependencies: + hash.js "^1.0.3" + minimalistic-assert "^1.0.0" + minimalistic-crypto-utils "^1.0.1" + hosted-git-info@^2.1.4: version "2.8.5" resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.8.5.tgz#759cfcf2c4d156ade59b0b2dfabddc42a6b9c70c" @@ -3155,7 +3544,7 @@ husky@^3.0.9: run-node "^1.0.0" slash "^3.0.0" -iconv-lite@0.4.24, iconv-lite@^0.4.24, iconv-lite@^0.4.4: +iconv-lite@0.4.24, iconv-lite@^0.4.24, iconv-lite@^0.4.4, iconv-lite@~0.4.13: version "0.4.24" resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA== @@ -3277,6 +3666,11 @@ ioredis@^4.0.0, ioredis@^4.6.3: redis-parser "^3.0.0" standard-as-callback "^2.0.1" +ip-regex@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/ip-regex/-/ip-regex-4.1.0.tgz#5ad62f685a14edb421abebc2fff8db94df67b455" + integrity sha512-pKnZpbgCTfH/1NLIlOduP/V+WRXzC2MOz3Qo8xmxk8C5GudJLgK5QyLVXOSWy3ParAH7Eemurl3xjv/WXYFvMA== + ipaddr.js@1.9.0: version "1.9.0" resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.9.0.tgz#37df74e430a0e47550fe54a2defe30d8acd95f65" @@ -3476,7 +3870,7 @@ is-plain-object@^2.0.3, is-plain-object@^2.0.4: dependencies: isobject "^3.0.1" -is-promise@^2.1.0: +is-promise@^2.1, is-promise@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/is-promise/-/is-promise-2.1.0.tgz#79a2a9ece7f096e80f36d2b2f3bc16c1ff4bf3fa" integrity sha1-eaKp7OfwlugPNtKy87wWwf9L8/o= @@ -3503,7 +3897,7 @@ is-stream-ended@^0.1.4: resolved "https://registry.yarnpkg.com/is-stream-ended/-/is-stream-ended-0.1.4.tgz#f50224e95e06bce0e356d440a4827cd35b267eda" integrity sha512-xj0XPvmr7bQFTvirqnFr50o0hQIh6ZItDqloxt5aJrR4NQsYeSsyFQERYGCAzfindAcnKjINnwEEgLx4IqVzQw== -is-stream@^1.0.0, is-stream@^1.1.0: +is-stream@^1.0.0, is-stream@^1.0.1, is-stream@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44" integrity sha1-EtSj3U5o4Lec6428hBc66A2RykQ= @@ -3562,6 +3956,14 @@ isobject@^3.0.0, isobject@^3.0.1: resolved "https://registry.yarnpkg.com/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df" integrity sha1-TkMekrEalzFjaqH5yNHMvP2reN8= +isomorphic-fetch@^2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/isomorphic-fetch/-/isomorphic-fetch-2.2.1.tgz#611ae1acf14f5e81f729507472819fe9733558a9" + integrity sha1-YRrhrPFPXoH3KVB0coGf6XM1WKk= + dependencies: + node-fetch "^1.0.1" + whatwg-fetch ">=0.10.0" + isstream@~0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" @@ -3971,6 +4373,11 @@ jest@^24.9.0: import-local "^2.0.0" jest-cli "^24.9.0" +js-sha3@^0.8.0: + version "0.8.0" + resolved "https://registry.yarnpkg.com/js-sha3/-/js-sha3-0.8.0.tgz#b9b7a5da73afad7dedd0f8c463954cbde6818840" + integrity sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q== + "js-tokens@^3.0.0 || ^4.0.0", js-tokens@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" @@ -4294,6 +4701,13 @@ lru-cache@^5.0.0: dependencies: yallist "^3.0.2" +lru-queue@0.1: + version "0.1.0" + resolved "https://registry.yarnpkg.com/lru-queue/-/lru-queue-0.1.0.tgz#2738bd9f0d3cf4f84490c5736c48699ac632cda3" + integrity sha1-Jzi9nw089PhEkMVzbEhpmsYyzaM= + dependencies: + es5-ext "~0.10.2" + lru_map@^0.3.3: version "0.3.3" resolved "https://registry.yarnpkg.com/lru_map/-/lru_map-0.3.3.tgz#b5c8351b9464cbd750335a79650a0ec0e56118dd" @@ -4340,11 +4754,34 @@ map-visit@^1.0.0: dependencies: object-visit "^1.0.0" +md5.js@^1.3.4: + version "1.3.5" + resolved "https://registry.yarnpkg.com/md5.js/-/md5.js-1.3.5.tgz#b5d07b8e3216e3e27cd728d72f70d1e6a342005f" + integrity sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg== + dependencies: + hash-base "^3.0.0" + inherits "^2.0.1" + safe-buffer "^5.1.2" + media-typer@0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748" integrity sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g= +memoizee@^0.4.14: + version "0.4.14" + resolved "https://registry.yarnpkg.com/memoizee/-/memoizee-0.4.14.tgz#07a00f204699f9a95c2d9e77218271c7cd610d57" + integrity sha512-/SWFvWegAIYAO4NQMpcX+gcra0yEZu4OntmUdrBaWrJncxOqAziGFlHxc7yjKVK2uu3lpPW27P27wkR82wA8mg== + dependencies: + d "1" + es5-ext "^0.10.45" + es6-weak-map "^2.0.2" + event-emitter "^0.3.5" + is-promise "^2.1" + lru-queue "0.1" + next-tick "1" + timers-ext "^0.1.5" + merge-descriptors@1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/merge-descriptors/-/merge-descriptors-1.0.1.tgz#b00aaa556dd8b44568150ec9d1b953f3f90cbb61" @@ -4406,6 +4843,16 @@ mimic-fn@^2.1.0: resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b" integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg== +minimalistic-assert@^1.0.0, minimalistic-assert@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz#2e194de044626d4a10e7f7fbc00ce73e83e4d5c7" + integrity sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A== + +minimalistic-crypto-utils@^1.0.0, minimalistic-crypto-utils@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz#f6c00c1c0b082246e5c4d99dfb8c7c083b2b582a" + integrity sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo= + minimatch@^3.0.4: version "3.0.4" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" @@ -4524,6 +4971,16 @@ neo-async@^2.6.0: resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.1.tgz#ac27ada66167fa8849a6addd837f6b189ad2081c" integrity sha512-iyam8fBuCUpWeKPGpaNMetEocMt364qkCsfL9JuhjXX6dRnguRVOfk2GZaDpPjcOKiiXCPINZC1GczQ7iTq3Zw== +next-tick@1: + version "1.1.0" + resolved "https://registry.yarnpkg.com/next-tick/-/next-tick-1.1.0.tgz#1836ee30ad56d67ef281b22bd199f709449b35eb" + integrity sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ== + +next-tick@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/next-tick/-/next-tick-1.0.0.tgz#ca86d1fe8828169b0120208e3dc8424b9db8342c" + integrity sha1-yobR/ogoFpsBICCOPchCS524NCw= + nice-try@^1.0.4: version "1.0.5" resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.5.tgz#a3378a7696ce7d223e88fc9b764bd7ef1089e366" @@ -4541,6 +4998,14 @@ nock@^11.7.0: mkdirp "^0.5.0" propagate "^2.0.0" +node-fetch@^1.0.1: + version "1.7.3" + resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-1.7.3.tgz#980f6f72d85211a5347c6b2bc18c5b84c3eb47ef" + integrity sha512-NhZ4CsKx7cYm2vSrBAr2PvFOe6sWDf0UYLRqA6svUYg7+/TSfVAu49jYC4BvQ4Sms9SZgdqGBgroqfDhJdTyKQ== + dependencies: + encoding "^0.1.11" + is-stream "^1.0.1" + node-fetch@^2.1.2, node-fetch@^2.2.0, node-fetch@^2.3.0, node-fetch@^2.6.0: version "2.6.0" resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.0.tgz#e633456386d4aa55863f676a7ab0daa8fdecb0fd" @@ -4961,6 +5426,17 @@ pathval@^1.1.0: resolved "https://registry.yarnpkg.com/pathval/-/pathval-1.1.0.tgz#b942e6d4bde653005ef6b71361def8727d0645e0" integrity sha1-uULm1L3mUwBe9rcTYd74cn0GReA= +pbkdf2@^3.0.17, pbkdf2@^3.0.9: + version "3.0.17" + resolved "https://registry.yarnpkg.com/pbkdf2/-/pbkdf2-3.0.17.tgz#976c206530617b14ebb32114239f7b09336e93a6" + integrity sha512-U/il5MsrZp7mGg3mSQfn742na2T+1/vHDCG5/iTI3X9MKUuYUZVLQhyRsg06mCgDBTd57TxzgZt7P+fYfjRLtA== + dependencies: + create-hash "^1.1.2" + create-hmac "^1.1.4" + ripemd160 "^2.0.1" + safe-buffer "^5.0.1" + sha.js "^2.4.8" + performance-now@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b" @@ -5153,6 +5629,13 @@ qs@~6.5.2: resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.2.tgz#cb3ae806e8740444584ef154ce8ee98d403f3e36" integrity sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA== +randombytes@^2.0.1: + version "2.1.0" + resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.1.0.tgz#df6f84372f0270dc65cdf6291349ab7a473d4f2a" + integrity sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ== + dependencies: + safe-buffer "^5.1.0" + range-parser@~1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.1.tgz#3cf37023d199e1c24d1a55b84800c2f3e6468031" @@ -5275,6 +5758,11 @@ redis-parser@^3.0.0: dependencies: redis-errors "^1.0.0" +regenerator-runtime@^0.13.4: + version "0.13.4" + resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.4.tgz#e96bf612a3362d12bb69f7e8f74ffeab25c7ac91" + integrity sha512-plpwicqEzfEyTQohIKktWigcLzmNStMGwbOUbykx51/29Z3JOGYldaaNGK7ngNXV+UcoqvIMmloZ48Sr74sd+g== + regex-not@^1.0.0, regex-not@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/regex-not/-/regex-not-1.0.2.tgz#1f4ece27e00b0b65e0247a6810e6a85d83a5752c" @@ -5451,6 +5939,14 @@ rimraf@^2.5.4, rimraf@^2.6.1, rimraf@^2.6.3: dependencies: glob "^7.1.3" +ripemd160@^2.0.0, ripemd160@^2.0.1: + version "2.0.2" + resolved "https://registry.yarnpkg.com/ripemd160/-/ripemd160-2.0.2.tgz#a1c1a6f624751577ba5d07914cbc92850585890c" + integrity sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA== + dependencies: + hash-base "^3.0.0" + inherits "^2.0.1" + rsvp@^4.8.4: version "4.8.5" resolved "https://registry.yarnpkg.com/rsvp/-/rsvp-4.8.5.tgz#c8f155311d167f68f21e168df71ec5b083113734" @@ -5475,12 +5971,19 @@ rxjs@^6.4.0: dependencies: tslib "^1.9.0" +rxjs@^6.5.4: + version "6.5.4" + resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.5.4.tgz#e0777fe0d184cec7872df147f303572d414e211c" + integrity sha512-naMQXcgEo3csAEGvw/NydRA0fuS2nDZJiw1YUWFKU7aPPAPGZEsD4Iimit96qwCieH6y614MCLYwdkrWx7z/7Q== + dependencies: + tslib "^1.9.0" + safe-buffer@5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1: version "5.1.2" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== -safe-buffer@>=5.1.0, safe-buffer@^5.0.1, safe-buffer@^5.1.2, safe-buffer@~5.2.0: +safe-buffer@>=5.1.0, safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.2, safe-buffer@~5.2.0: version "5.2.0" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.0.tgz#b74daec49b1148f88c64b68d49b1e815c1f2f519" integrity sha512-fZEwUGbVl7kouZs1jCdMLdt95hdIv0ZeHg6L7qPeciMZhZ+/gdesW4wgTARkrFWEpspjEATAzUGPG8N2jJiwbg== @@ -5588,7 +6091,7 @@ setprototypeof@1.1.1: resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.1.1.tgz#7e95acb24aa92f5885e0abef5ba131330d4ae683" integrity sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw== -sha.js@^2.4.11: +sha.js@^2.4.0, sha.js@^2.4.11, sha.js@^2.4.8: version "2.4.11" resolved "https://registry.yarnpkg.com/sha.js/-/sha.js-2.4.11.tgz#37a5cf0b81ecbc6943de109ba2960d1b26584ae7" integrity sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ== @@ -6045,6 +6548,13 @@ supports-color@^6.1.0: dependencies: has-flag "^3.0.0" +supports-color@^7.1.0: + version "7.1.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.1.0.tgz#68e32591df73e25ad1c4b49108a2ec507962bfd1" + integrity sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g== + dependencies: + has-flag "^4.0.0" + symbol-observable@^1.0.4: version "1.2.0" resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-1.2.0.tgz#c22688aed4eab3cdc2dfeacbb561660560a00804" @@ -6141,6 +6651,14 @@ timed-out@^4.0.0: resolved "https://registry.yarnpkg.com/timed-out/-/timed-out-4.0.1.tgz#f32eacac5a175bea25d7fab565ab3ed8741ef56f" integrity sha1-8y6srFoXW+ol1/q1Zas+2HQe9W8= +timers-ext@^0.1.5: + version "0.1.7" + resolved "https://registry.yarnpkg.com/timers-ext/-/timers-ext-0.1.7.tgz#6f57ad8578e07a3fb9f91d9387d65647555e25c6" + integrity sha512-b85NUNzTSdodShTIbky6ZF02e8STtVVfD+fu4aXXShEELpozH+bCpJLYMPZbsABN2wDH7fJpqIoXxJpzbf0NqQ== + dependencies: + es5-ext "~0.10.46" + next-tick "1" + tmp@^0.0.33: version "0.0.33" resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.33.tgz#6d34335889768d21b2bcda0aa277ced3b1bfadf9" @@ -6242,6 +6760,11 @@ tweetnacl@^0.14.3, tweetnacl@~0.14.0: resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64" integrity sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q= +tweetnacl@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-1.0.3.tgz#ac0af71680458d8a6378d0d0d050ab1407d35596" + integrity sha512-6rt+RN7aOi1nGMyC4Xa5DdYiukl2UWCbcJft7YhxReBGQD7OAM8Pbxw6YMo4r2diNEA8FEmu32YOn9rhaiE5yw== + type-check@~0.3.2: version "0.3.2" resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.3.2.tgz#5884cab512cf1d355e3fb784f30804b2b520db72" @@ -6272,6 +6795,16 @@ type-is@^1.6.16, type-is@~1.6.17, type-is@~1.6.18: media-typer "0.3.0" mime-types "~2.1.24" +type@^1.0.1: + version "1.2.0" + resolved "https://registry.yarnpkg.com/type/-/type-1.2.0.tgz#848dd7698dafa3e54a6c479e759c4bc3f18847a0" + integrity sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg== + +type@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/type/-/type-2.0.0.tgz#5f16ff6ef2eb44f260494dae271033b29c09a9c3" + integrity sha512-KBt58xCHry4Cejnc2ISQAF7QY+ORngsWfxezO68+12hKV6lQY8P/psIkcbjeHWn7MqcgciWJyCCevFMJdIXpow== + typedarray-to-buffer@^3.1.5: version "3.1.5" resolved "https://registry.yarnpkg.com/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz#a97ee7a9ff42691b9f783ff1bc5112fe3fca9080" @@ -6484,6 +7017,17 @@ websocket@^1.0.30: typedarray-to-buffer "^3.1.5" yaeti "^0.0.6" +websocket@^1.0.31: + version "1.0.31" + resolved "https://registry.yarnpkg.com/websocket/-/websocket-1.0.31.tgz#e5d0f16c3340ed87670e489ecae6144c79358730" + integrity sha512-VAouplvGKPiKFDTeCCO65vYHsyay8DqoBSlzIO3fayrfOgU94lQN5a1uWVnFrMLceTJw/+fQXR5PGbUVRaHshQ== + dependencies: + debug "^2.2.0" + es5-ext "^0.10.50" + nan "^2.14.0" + typedarray-to-buffer "^3.1.5" + yaeti "^0.0.6" + whatwg-encoding@^1.0.1, whatwg-encoding@^1.0.3: version "1.0.5" resolved "https://registry.yarnpkg.com/whatwg-encoding/-/whatwg-encoding-1.0.5.tgz#5abacf777c32166a51d085d6b4f3e7d27113ddb0" @@ -6491,6 +7035,11 @@ whatwg-encoding@^1.0.1, whatwg-encoding@^1.0.3: dependencies: iconv-lite "0.4.24" +whatwg-fetch@>=0.10.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/whatwg-fetch/-/whatwg-fetch-3.0.0.tgz#fc804e458cc460009b1a2b966bc8817d2578aefb" + integrity sha512-9GSJUgz1D4MfyKU7KRqwOjXCXTqWdFNvEr7eUBYchQiVc744mqK/MzXPNR2WsPkmkOa4ywfg8C2n8h+13Bey1Q== + whatwg-mimetype@^2.1.0, whatwg-mimetype@^2.2.0: version "2.3.0" resolved "https://registry.yarnpkg.com/whatwg-mimetype/-/whatwg-mimetype-2.3.0.tgz#3d4b1e0312d2079879f826aff18dbeeca5960fbf" @@ -6640,6 +7189,13 @@ xtend@^4.0.1, xtend@~4.0.1: resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.2.tgz#bb72779f5fa465186b1f438f674fa347fdb5db54" integrity sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ== +xxhashjs@^0.2.2: + version "0.2.2" + resolved "https://registry.yarnpkg.com/xxhashjs/-/xxhashjs-0.2.2.tgz#8a6251567621a1c46a5ae204da0249c7f8caa9d8" + integrity sha512-AkTuIuVTET12tpsVIQo+ZU6f/qDmKuRUcjaqR+OIvm+aCBsZ95i7UVY5WJ9TMsSaZ0DA2WxoZ4acu0sPH+OKAw== + dependencies: + cuint "^0.2.2" + y18n@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/y18n/-/y18n-4.0.0.tgz#95ef94f85ecc81d007c264e190a120f0a3c8566b"