Merge branch 'master' into nymkappa/feature/block-list-loading

This commit is contained in:
wiz 2022-05-27 18:38:36 +09:00 committed by GitHub
commit a8a5313eb4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
43 changed files with 763 additions and 988 deletions

176
README.md
View File

@ -10,14 +10,7 @@ It is an open-source project developed and operated for the benefit of the Bitco
Mempool can be self-hosted on a wide variety of your own hardware, ranging from a simple one-click installation on a Raspberry Pi full-node distro all the way to a robust production instance on a powerful FreeBSD server. Mempool can be self-hosted on a wide variety of your own hardware, ranging from a simple one-click installation on a Raspberry Pi full-node distro all the way to a robust production instance on a powerful FreeBSD server.
We support the following installation methods, ranked in order from simple to advanced: **Most people should use a one-click install method.** Other install methods are meant for developers and others with experience managing servers.
1) [One-click installation on full-node distros](#one-click-installation)
2) [Docker installation on Linux using docker-compose](./docker)
3) [Manual installation on Linux or FreeBSD](#manual-installation)
4) [Production installation on a powerful FreeBSD server](./production)
This doc offers install notes on the one-click method and manual install method. Follow the links above for install notes on Docker and production installations.
<a id="one-click-installation"></a> <a id="one-click-installation"></a>
## One-Click Installation ## One-Click Installation
@ -29,167 +22,12 @@ Mempool can be conveniently installed on the following full-node distros:
- [myNode](https://github.com/mynodebtc/mynode) - [myNode](https://github.com/mynodebtc/mynode)
- [Start9](https://github.com/Start9Labs/embassy-os) - [Start9](https://github.com/Start9Labs/embassy-os)
<a id="manual-installation"></a> **We highly recommend you deploy your own Mempool instance this way.** No matter which option you pick, you'll be able to get your own fully-sovereign instance of Mempool up quickly without needing to fiddle with any settings.
## Manual Installation
The following instructions are for a manual installation on Linux or FreeBSD. You may need to change file and directory paths to match your OS. ## Advanced Installation Methods
You will need [Bitcoin Core](https://github.com/bitcoin/bitcoin), [Electrum Server](https://github.com/romanz/electrs), [Node.js](https://github.com/nodejs/node), [MariaDB](https://github.com/mariadb/server), and [Nginx](https://github.com/nginx/nginx). Below, we walk through how to configure each of these. Mempool can be installed in other ways too, but we only recommend doing so if you're a developer, have experience managing servers, or otherwise know what you're doing.
### 1. Get Latest Mempool Release - See the [`docker/`](./docker/) directory for instructions on deploying Mempool with Docker.
- See the [`backend/`](./backend/) and [`frontend/`](./frontend/) directories for manual install instructions oriented for developers and small-scale deployments.
Clone the Mempool repo, and checkout the latest release tag: - See the [`production/`](./production/) directory for guidance on setting up a more serious Mempool instance designed for high performance at scale.
```bash
git clone https://github.com/mempool/mempool
cd mempool
latestrelease=$(curl -s https://api.github.com/repos/mempool/mempool/releases/latest|grep tag_name|head -1|cut -d '"' -f4)
git checkout $latestrelease
```
### 2. Configure Bitcoin Core
Enable RPC and txindex in `bitcoin.conf`:
```bash
rpcuser=mempool
rpcpassword=mempool
txindex=1
```
### 3. Get & Configure MySQL
Install MariaDB from your OS package manager:
```bash
# Debian, Ubuntu, etc.
apt-get install mariadb-server mariadb-client
# macOS
brew install mariadb
mysql.server start
```
Create a database and grant privileges:
```bash
MariaDB [(none)]> drop database mempool;
Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]> create database mempool;
Query OK, 1 row affected (0.00 sec)
MariaDB [(none)]> grant all privileges on mempool.* to 'mempool'@'%' identified by 'mempool';
Query OK, 0 rows affected (0.00 sec)
```
### 4. Build Mempool Backend
Install Mempool dependencies with npm and build the backend:
```bash
cd backend
npm install --prod
npm run build
```
In the `backend` folder, make a copy of the sample config:
```bash
cp mempool-config.sample.json mempool-config.json
```
Edit `mempool-config.json` with your Bitcoin Core node RPC credentials:
```bash
{
"MEMPOOL": {
"NETWORK": "mainnet",
"BACKEND": "electrum",
"HTTP_PORT": 8999
},
"CORE_RPC": {
"HOST": "127.0.0.1",
"PORT": 8332,
"USERNAME": "mempool",
"PASSWORD": "mempool"
},
"ELECTRUM": {
"HOST": "127.0.0.1",
"PORT": 50002,
"TLS_ENABLED": true
},
"DATABASE": {
"ENABLED": true,
"HOST": "127.0.0.1",
"PORT": 3306,
"USERNAME": "mempool",
"PASSWORD": "mempool",
"DATABASE": "mempool"
}
}
```
Start the backend:
```bash
npm run start
```
When it's running, you should see output like this:
```bash
Mempool updated in 0.189 seconds
Updating mempool
Mempool updated in 0.096 seconds
Updating mempool
Mempool updated in 0.099 seconds
Updating mempool
Calculated fee for transaction 1 / 10
Calculated fee for transaction 2 / 10
Calculated fee for transaction 3 / 10
Calculated fee for transaction 4 / 10
Calculated fee for transaction 5 / 10
Calculated fee for transaction 6 / 10
Calculated fee for transaction 7 / 10
Calculated fee for transaction 8 / 10
Calculated fee for transaction 9 / 10
Calculated fee for transaction 10 / 10
Mempool updated in 0.243 seconds
Updating mempool
```
### 5. Build Mempool Frontend
Install the Mempool dependencies with npm and build the frontend:
```bash
cd frontend
npm install --prod
npm run build
```
Install the output into the nginx webroot folder:
```bash
sudo rsync -av --delete dist/ /var/www/
```
### 6. `nginx` + `certbot`
Install the supplied `nginx.conf` and `nginx-mempool.conf` in `/etc/nginx`:
```bash
# install nginx and certbot
apt-get install -y nginx python3-certbot-nginx
# install the mempool configuration for nginx
cp nginx.conf nginx-mempool.conf /etc/nginx/
# replace example.com with your domain name
certbot --nginx -d example.com
```
If everything went well, you should see the beautiful mempool :grin:
If you get stuck on "loading blocks", this means the websocket can't connect. Check your nginx proxy setup, firewalls, etc. and open an issue if you need help.

View File

@ -1,22 +1,161 @@
# Setup backend watchers # Mempool Backend
The backend is static. Typescript scripts are compiled into the `dist` folder and served through a node web server. These instructions are mostly intended for developers, but can be used as a basis for personal or small-scale production setups.
You can avoid the manual shutdown/recompile/restart command line cycle by using a watcher. If you choose to use these instructions for a production setup, be aware that you will still probably need to do additional configuration for your specific OS, environment, use-case, etc. We do our best here to provide a good starting point, but only proceed if you know what you're doing. Mempool does not provide support for custom setups.
Make sure you are in the `backend` directory `cd backend`. See other ways to set up Mempool on [the main README](/../../#installation-methods).
1. Install nodemon and ts-node Jump to a section in this doc:
- [Set Up the Backend](#setup)
- [Development Tips](#development-tips)
## Setup
### 1. Clone Mempool Repository
Get the latest Mempool code:
``` ```
sudo npm install -g ts-node nodemon git clone https://github.com/mempool/mempool
cd mempool
``` ```
2. Run the watcher Check out the latest release:
> Note: You can find your npm global binary folder using `npm -g bin`, where nodemon will be installed. ```
latestrelease=$(curl -s https://api.github.com/repos/mempool/mempool/releases/latest|grep tag_name|head -1|cut -d '"' -f4)
git checkout $latestrelease
```
### 2. Configure Bitcoin Core
Turn on `txindex`, enable RPC, and set RPC credentials in `bitcoin.conf`:
```
txindex=1
server=1
rpcuser=mempool
rpcpassword=mempool
```
### 3. Configure Electrum Server
[Pick an Electrum Server implementation](https://mempool.space/docs/faq#address-lookup-issues), configure it, and make sure it's synced.
**This step is optional.** You can run Mempool without configuring an Electrum Server for it, but address lookups will be disabled.
### 4. Configure MariaDB
_Mempool needs MariaDB v10.5 or later. If you already have MySQL installed, make sure to migrate any existing databases **before** installing MariaDB._
Get MariaDB from your operating system's package manager:
```
# Debian, Ubuntu, etc.
apt-get install mariadb-server mariadb-client
# macOS
brew install mariadb
mysql.server start
```
Create a database and grant privileges:
```
MariaDB [(none)]> drop database mempool;
Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]> create database mempool;
Query OK, 1 row affected (0.00 sec)
MariaDB [(none)]> grant all privileges on mempool.* to 'mempool'@'%' identified by 'mempool';
Query OK, 0 rows affected (0.00 sec)
```
### 5. Prepare Mempool Backend
#### Build
_Node.js 16 and npm 7 are recommended._
Install dependencies with `npm` and build the backend:
```
cd backend
npm install # add --prod for production
npm run build
```
#### Configure
In the backend folder, make a copy of the sample config file:
```
cp mempool-config.sample.json mempool-config.json
```
Edit `mempool-config.json` as needed.
In particular, make sure:
- the correct Bitcoin Core RPC credentials are specified in `CORE_RPC`
- the correct `BACKEND` is specified in `MEMPOOL`:
- "electrum" if you're using [romanz/electrs](https://github.com/romanz/electrs) or [cculianu/Fulcrum](https://github.com/cculianu/Fulcrum)
- "esplora" if you're using [Blockstream/electrs](https://github.com/Blockstream/electrs)
- "none" if you're not using any Electrum Server
### 6. Run Mempool Backend
Run the Mempool backend:
```
npm run start
```
When it's running, you should see output like this:
```
Mempool updated in 0.189 seconds
Updating mempool
Mempool updated in 0.096 seconds
Updating mempool
Mempool updated in 0.099 seconds
Updating mempool
Calculated fee for transaction 1 / 10
Calculated fee for transaction 2 / 10
Calculated fee for transaction 3 / 10
Calculated fee for transaction 4 / 10
Calculated fee for transaction 5 / 10
Calculated fee for transaction 6 / 10
Calculated fee for transaction 7 / 10
Calculated fee for transaction 8 / 10
Calculated fee for transaction 9 / 10
Calculated fee for transaction 10 / 10
Mempool updated in 0.243 seconds
Updating mempool
```
### 7. Set Up Mempool Frontend
With the backend configured and running, proceed to set up the [Mempool frontend](../frontend#manual-setup).
## Development Tips
### Set Up Backend Watchers
The Mempool backend is static. TypeScript scripts are compiled into the `dist` folder and served through a Node.js web server.
As a result, for development purposes, you may find it helpful to set up backend watchers to avoid the manual shutdown/recompile/restart command-line cycle.
First, install `nodemon` and `ts-node`:
```
npm install -g ts-node nodemon
```
Then, run the watcher:
``` ```
nodemon src/index.ts --ignore cache/ --ignore pools.json nodemon src/index.ts --ignore cache/ --ignore pools.json
``` ```
`nodemon` should be in npm's global binary folder. If needed, you can determine where that is with `npm -g bin`.

View File

@ -417,10 +417,7 @@ class Blocks {
return blockExtended; return blockExtended;
} }
public async $getBlocksExtras(fromHeight?: number, limit: number = 15): Promise<BlockExtended[]> { public async $getBlocks(fromHeight?: number, limit: number = 15): Promise<BlockExtended[]> {
// Note - This API is breaking if indexing is not available. For now it is okay because we only
// use it for the mining pages, and mining pages should not be available if indexing is turned off.
// I'll need to fix it before we refactor the block(s) related pages
try { try {
let currentHeight = fromHeight !== undefined ? fromHeight : this.getCurrentBlockHeight(); let currentHeight = fromHeight !== undefined ? fromHeight : this.getCurrentBlockHeight();
const returnBlocks: BlockExtended[] = []; const returnBlocks: BlockExtended[] = [];

View File

@ -89,7 +89,6 @@ class Mining {
}); });
poolsStatistics['pools'] = poolsStats; poolsStatistics['pools'] = poolsStats;
poolsStatistics['oldestIndexedBlockTimestamp'] = await BlocksRepository.$oldestBlockTimestamp();
const blockCount: number = await BlocksRepository.$blockCount(null, interval); const blockCount: number = await BlocksRepository.$blockCount(null, interval);
poolsStatistics['blockCount'] = blockCount; poolsStatistics['blockCount'] = blockCount;

View File

@ -27,7 +27,6 @@ import icons from './api/liquid/icons';
import { Common } from './api/common'; import { Common } from './api/common';
import mining from './api/mining'; import mining from './api/mining';
import HashratesRepository from './repositories/HashratesRepository'; import HashratesRepository from './repositories/HashratesRepository';
import BlocksRepository from './repositories/BlocksRepository';
import poolsUpdater from './tasks/pools-updater'; import poolsUpdater from './tasks/pools-updater';
import indexer from './indexer'; import indexer from './indexer';
@ -315,8 +314,8 @@ class Server {
} }
this.app this.app
.get(config.MEMPOOL.API_URL_PREFIX + 'blocks-extras', routes.getBlocksExtras) .get(config.MEMPOOL.API_URL_PREFIX + 'blocks', routes.getBlocks.bind(routes))
.get(config.MEMPOOL.API_URL_PREFIX + 'blocks-extras/:height', routes.getBlocksExtras) .get(config.MEMPOOL.API_URL_PREFIX + 'blocks/:height', routes.getBlocks.bind(routes))
.get(config.MEMPOOL.API_URL_PREFIX + 'block/:hash', routes.getBlock); .get(config.MEMPOOL.API_URL_PREFIX + 'block/:hash', routes.getBlock);
if (config.MEMPOOL.BACKEND !== 'esplora') { if (config.MEMPOOL.BACKEND !== 'esplora') {
@ -330,8 +329,6 @@ class Server {
.get(config.MEMPOOL.API_URL_PREFIX + 'tx/:txId/status', routes.getTransactionStatus) .get(config.MEMPOOL.API_URL_PREFIX + 'tx/:txId/status', routes.getTransactionStatus)
.get(config.MEMPOOL.API_URL_PREFIX + 'tx/:txId/outspends', routes.getTransactionOutspends) .get(config.MEMPOOL.API_URL_PREFIX + 'tx/:txId/outspends', routes.getTransactionOutspends)
.get(config.MEMPOOL.API_URL_PREFIX + 'block/:hash/header', routes.getBlockHeader) .get(config.MEMPOOL.API_URL_PREFIX + 'block/:hash/header', routes.getBlockHeader)
.get(config.MEMPOOL.API_URL_PREFIX + 'blocks', routes.getBlocks)
.get(config.MEMPOOL.API_URL_PREFIX + 'blocks/:height', routes.getBlocks)
.get(config.MEMPOOL.API_URL_PREFIX + 'blocks/tip/height', routes.getBlockTipHeight) .get(config.MEMPOOL.API_URL_PREFIX + 'blocks/tip/height', routes.getBlockTipHeight)
.get(config.MEMPOOL.API_URL_PREFIX + 'block/:hash/txs', routes.getBlockTransactions) .get(config.MEMPOOL.API_URL_PREFIX + 'block/:hash/txs', routes.getBlockTransactions)
.get(config.MEMPOOL.API_URL_PREFIX + 'block/:hash/txs/:index', routes.getBlockTransactions) .get(config.MEMPOOL.API_URL_PREFIX + 'block/:hash/txs/:index', routes.getBlockTransactions)

View File

@ -81,7 +81,7 @@ export interface TransactionStripped {
export interface BlockExtension { export interface BlockExtension {
totalFees?: number; totalFees?: number;
medianFee?: number; // Actually the median fee rate that we compute ourself medianFee?: number;
feeRange?: number[]; feeRange?: number[];
reward?: number; reward?: number;
coinbaseTx?: TransactionMinerInfo; coinbaseTx?: TransactionMinerInfo;

View File

@ -475,9 +475,9 @@ class BlocksRepository {
public async $getHistoricalBlockFees(div: number, interval: string | null): Promise<any> { public async $getHistoricalBlockFees(div: number, interval: string | null): Promise<any> {
try { try {
let query = `SELECT let query = `SELECT
CAST(AVG(height) as INT) as avg_height, CAST(AVG(height) as INT) as avgHeight,
CAST(AVG(UNIX_TIMESTAMP(blockTimestamp)) as INT) as timestamp, CAST(AVG(UNIX_TIMESTAMP(blockTimestamp)) as INT) as timestamp,
CAST(AVG(fees) as INT) as avg_fees CAST(AVG(fees) as INT) as avgFees
FROM blocks`; FROM blocks`;
if (interval !== null) { if (interval !== null) {
@ -500,9 +500,9 @@ class BlocksRepository {
public async $getHistoricalBlockRewards(div: number, interval: string | null): Promise<any> { public async $getHistoricalBlockRewards(div: number, interval: string | null): Promise<any> {
try { try {
let query = `SELECT let query = `SELECT
CAST(AVG(height) as INT) as avg_height, CAST(AVG(height) as INT) as avgHeight,
CAST(AVG(UNIX_TIMESTAMP(blockTimestamp)) as INT) as timestamp, CAST(AVG(UNIX_TIMESTAMP(blockTimestamp)) as INT) as timestamp,
CAST(AVG(reward) as INT) as avg_rewards CAST(AVG(reward) as INT) as avgRewards
FROM blocks`; FROM blocks`;
if (interval !== null) { if (interval !== null) {
@ -525,15 +525,15 @@ class BlocksRepository {
public async $getHistoricalBlockFeeRates(div: number, interval: string | null): Promise<any> { public async $getHistoricalBlockFeeRates(div: number, interval: string | null): Promise<any> {
try { try {
let query = `SELECT let query = `SELECT
CAST(AVG(height) as INT) as avg_height, CAST(AVG(height) as INT) as avgHeight,
CAST(AVG(UNIX_TIMESTAMP(blockTimestamp)) as INT) as timestamp, CAST(AVG(UNIX_TIMESTAMP(blockTimestamp)) as INT) as timestamp,
CAST(AVG(JSON_EXTRACT(fee_span, '$[0]')) as INT) as avg_fee_0, CAST(AVG(JSON_EXTRACT(fee_span, '$[0]')) as INT) as avgFee_0,
CAST(AVG(JSON_EXTRACT(fee_span, '$[1]')) as INT) as avg_fee_10, CAST(AVG(JSON_EXTRACT(fee_span, '$[1]')) as INT) as avgFee_10,
CAST(AVG(JSON_EXTRACT(fee_span, '$[2]')) as INT) as avg_fee_25, CAST(AVG(JSON_EXTRACT(fee_span, '$[2]')) as INT) as avgFee_25,
CAST(AVG(JSON_EXTRACT(fee_span, '$[3]')) as INT) as avg_fee_50, CAST(AVG(JSON_EXTRACT(fee_span, '$[3]')) as INT) as avgFee_50,
CAST(AVG(JSON_EXTRACT(fee_span, '$[4]')) as INT) as avg_fee_75, CAST(AVG(JSON_EXTRACT(fee_span, '$[4]')) as INT) as avgFee_75,
CAST(AVG(JSON_EXTRACT(fee_span, '$[5]')) as INT) as avg_fee_90, CAST(AVG(JSON_EXTRACT(fee_span, '$[5]')) as INT) as avgFee_90,
CAST(AVG(JSON_EXTRACT(fee_span, '$[6]')) as INT) as avg_fee_100 CAST(AVG(JSON_EXTRACT(fee_span, '$[6]')) as INT) as avgFee_100
FROM blocks`; FROM blocks`;
if (interval !== null) { if (interval !== null) {
@ -556,9 +556,9 @@ class BlocksRepository {
public async $getHistoricalBlockSizes(div: number, interval: string | null): Promise<any> { public async $getHistoricalBlockSizes(div: number, interval: string | null): Promise<any> {
try { try {
let query = `SELECT let query = `SELECT
CAST(AVG(height) as INT) as avg_height, CAST(AVG(height) as INT) as avgHeight,
CAST(AVG(UNIX_TIMESTAMP(blockTimestamp)) as INT) as timestamp, CAST(AVG(UNIX_TIMESTAMP(blockTimestamp)) as INT) as timestamp,
CAST(AVG(size) as INT) as avg_size CAST(AVG(size) as INT) as avgSize
FROM blocks`; FROM blocks`;
if (interval !== null) { if (interval !== null) {
@ -581,9 +581,9 @@ class BlocksRepository {
public async $getHistoricalBlockWeights(div: number, interval: string | null): Promise<any> { public async $getHistoricalBlockWeights(div: number, interval: string | null): Promise<any> {
try { try {
let query = `SELECT let query = `SELECT
CAST(AVG(height) as INT) as avg_height, CAST(AVG(height) as INT) as avgHeight,
CAST(AVG(UNIX_TIMESTAMP(blockTimestamp)) as INT) as timestamp, CAST(AVG(UNIX_TIMESTAMP(blockTimestamp)) as INT) as timestamp,
CAST(AVG(weight) as INT) as avg_weight CAST(AVG(weight) as INT) as avgWeight
FROM blocks`; FROM blocks`;
if (interval !== null) { if (interval !== null) {

View File

@ -669,14 +669,12 @@ class Routes {
public async $getHistoricalBlockFeeRates(req: Request, res: Response) { public async $getHistoricalBlockFeeRates(req: Request, res: Response) {
try { try {
const blockFeeRates = await mining.$getHistoricalBlockFeeRates(req.params.interval); const blockFeeRates = await mining.$getHistoricalBlockFeeRates(req.params.interval);
const oldestIndexedBlockTimestamp = await BlocksRepository.$oldestBlockTimestamp(); const blockCount = await BlocksRepository.$blockCount(null, null);
res.header('Pragma', 'public'); res.header('Pragma', 'public');
res.header('Cache-control', 'public'); res.header('Cache-control', 'public');
res.header('X-total-count', blockCount.toString());
res.setHeader('Expires', new Date(Date.now() + 1000 * 60).toUTCString()); res.setHeader('Expires', new Date(Date.now() + 1000 * 60).toUTCString());
res.json({ res.json(blockFeeRates);
oldestIndexedBlockTimestamp: oldestIndexedBlockTimestamp,
blockFeeRates: blockFeeRates,
});
} catch (e) { } catch (e) {
res.status(500).send(e instanceof Error ? e.message : e); res.status(500).send(e instanceof Error ? e.message : e);
} }
@ -720,20 +718,22 @@ class Routes {
} }
} }
public async getBlocksExtras(req: Request, res: Response) { public async getBlocks(req: Request, res: Response) {
try { try {
if (['mainnet', 'testnet', 'signet', 'regtest'].includes(config.MEMPOOL.NETWORK)) { // Bitcoin
const height = req.params.height === undefined ? undefined : parseInt(req.params.height, 10); const height = req.params.height === undefined ? undefined : parseInt(req.params.height, 10);
res.setHeader('Expires', new Date(Date.now() + 1000 * 60).toUTCString()); res.setHeader('Expires', new Date(Date.now() + 1000 * 60).toUTCString());
res.json(await blocks.$getBlocksExtras(height, 15)); res.json(await blocks.$getBlocks(height, 15));
} else { // Liquid, Bisq
return await this.getLegacyBlocks(req, res);
}
} catch (e) { } catch (e) {
res.status(500).send(e instanceof Error ? e.message : e); res.status(500).send(e instanceof Error ? e.message : e);
} }
} }
public async getBlocks(req: Request, res: Response) { public async getLegacyBlocks(req: Request, res: Response) {
try { try {
loadingIndicators.setProgress('blocks', 0);
const returnBlocks: IEsploraApi.Block[] = []; const returnBlocks: IEsploraApi.Block[] = [];
const fromHeight = parseInt(req.params.height, 10) || blocks.getCurrentBlockHeight(); const fromHeight = parseInt(req.params.height, 10) || blocks.getCurrentBlockHeight();
@ -757,12 +757,11 @@ class Routes {
returnBlocks.push(block); returnBlocks.push(block);
nextHash = block.previousblockhash; nextHash = block.previousblockhash;
} }
loadingIndicators.setProgress('blocks', i / 10 * 100);
} }
res.setHeader('Expires', new Date(Date.now() + 1000 * 60).toUTCString());
res.json(returnBlocks); res.json(returnBlocks);
} catch (e) { } catch (e) {
loadingIndicators.setProgress('blocks', 100);
res.status(500).send(e instanceof Error ? e.message : e); res.status(500).send(e instanceof Error ? e.message : e);
} }
} }

View File

@ -15,7 +15,7 @@ export function prepareBlock(block: any): BlockExtended {
weight: block.weight, weight: block.weight,
previousblockhash: block.previousblockhash, previousblockhash: block.previousblockhash,
extras: { extras: {
coinbaseRaw: block.coinbase_raw ?? block.extras.coinbaseRaw, coinbaseRaw: block.coinbase_raw ?? block.extras?.coinbaseRaw,
medianFee: block.medianFee ?? block.median_fee ?? block.extras?.medianFee, medianFee: block.medianFee ?? block.median_fee ?? block.extras?.medianFee,
feeRange: block.feeRange ?? block.fee_span, feeRange: block.feeRange ?? block.fee_span,
reward: block.reward ?? block?.extras?.reward, reward: block.reward ?? block?.extras?.reward,

View File

@ -1,18 +1,23 @@
# Docker Installation # Docker Installation
This directory contains the Dockerfiles used to build and release the official images and a `docker-compose.yml` for end users to run a Mempool instance with minimal effort. This directory contains the Dockerfiles used to build and release the official images, as well as a `docker-compose.yml` to configure environment variables and other settings.
You can choose to configure Mempool to run with a basic backend powered by just `bitcoind`, or with `bitcoind` along with an Electrum-compatible server for full functionality. If you are looking to use these Docker images to deploy your own instance of Mempool, note that they only containerize Mempool's frontend and backend. You will still need to deploy and configure Bitcoin Core and an Electrum Server separately, along with any other utilities specific to your use case (e.g., a reverse proxy, etc). Such configuration is mostly beyond the scope of the Mempool project, so please only proceed if you know what you're doing.
## `bitcoind`-only Configuration Jump to a section in this doc:
- [Configure with Bitcoin Core Only](#configure-with-bitcoin-core-only)
- [Configure with Bitcoin Core + Electrum Server](#configure-with-bitcoin-core--electrum-server)
- [Further Configuration](#further-configuration)
_Note: address lookups require an Electrum server and will not work with this configuration._ ## Configure with Bitcoin Core Only
Make sure `bitcoind` is running and synced. _Note: address lookups require an Electrum Server and will not work with this configuration. [Add an Electrum Server](#configure-with-bitcoin-core--electrum-server) to your backend for full functionality._
The default Docker configuration assumes you have added RPC credentials for a `mempool` user with a `mempool` password in your `bitcoin.conf` file, like so: The default Docker configuration assumes you have the following configuration in your `bitcoin.conf` file:
``` ```
txindex=1
server=1
rpcuser=mempool rpcuser=mempool
rpcpassword=mempool rpcpassword=mempool
``` ```
@ -31,6 +36,8 @@ If you want to use different credentials, specify them in the `docker-compose.ym
The IP address in the example above refers to Docker's default gateway IP address so that the container can hit the `bitcoind` instance running on the host machine. If your setup is different, update it accordingly. The IP address in the example above refers to Docker's default gateway IP address so that the container can hit the `bitcoind` instance running on the host machine. If your setup is different, update it accordingly.
Make sure `bitcoind` is running and synced.
Now, run: Now, run:
```bash ```bash
@ -39,11 +46,11 @@ docker-compose up
Your Mempool instance should be running at http://localhost. The graphs will be populated as new transactions are detected. Your Mempool instance should be running at http://localhost. The graphs will be populated as new transactions are detected.
## `bitcoind` + Electrum Server Configuration ## Configure with Bitcoin Core + Electrum Server
First, configure `bitcoind` as specified above, and make sure your Electrum server is running and synced. First, configure `bitcoind` as specified above, and make sure your Electrum Server is running and synced. See [this FAQ](https://mempool.space/docs/faq#address-lookup-issues) if you need help picking an Electrum Server implementation.
Then, make sure the following variables are set in `docker-compose.yml`, as shown below, so Mempool can connect to your Electrum server: Then, set the following variables in `docker-compose.yml` so Mempool can connect to your Electrum Server:
``` ```
api: api:
@ -54,6 +61,11 @@ Then, make sure the following variables are set in `docker-compose.yml`, as show
ELECTRUM_TLS_ENABLED: "false" ELECTRUM_TLS_ENABLED: "false"
``` ```
Eligible values for `MEMPOOL_BACKEND`:
- "electrum" if you're using [romanz/electrs](https://github.com/romanz/electrs) or [cculianu/Fulcrum](https://github.com/cculianu/Fulcrum)
- "esplora" if you're using [Blockstream/electrs](https://github.com/Blockstream/electrs)
- "none" if you're not using any Electrum Server
Of course, if your Docker host IP address is different, update accordingly. Of course, if your Docker host IP address is different, update accordingly.
With `bitcoind` and Electrum Server set up, run Mempool with: With `bitcoind` and Electrum Server set up, run Mempool with:

View File

@ -1,8 +1,30 @@
# mempool-frontend # Mempool Frontend
## Contributing You can build and run the Mempool frontend and proxy to the production Mempool backend (for easier frontend development), or you can connect it to your own backend for a full Mempool development instance, custom deployment, etc.
This package is used for the https://mempool.space, https://liquid.network and https://bisq.markets websites - there are npm scripts to setup all three, which effectively change how BASE_MODULE is configured: Jump to a section in this doc:
- [Quick Setup for Frontend Development](#quick-setup-for-frontend-development)
- [Manual Frontend Setup](#manual-setup)
- [Translations](#translations-transifex-project)
## Quick Setup for Frontend Development
If you want to quickly improve the UI, fix typos, or make other updates that don't require any backend changes, you don't need to set up an entire backend—you can simply run the Mempool frontend locally and proxy to the mempool.space backend.
### 1. Clone Mempool Repository
Get the latest Mempool code:
```
git clone https://github.com/mempool/mempool
cd mempool
```
### 2. Specify Website
The same frontend codebase is used for https://mempool.space, https://liquid.network and https://bisq.markets.
Configure the frontend for the site you want by running the corresponding command:
``` ```
$ npm run config:defaults:mempool $ npm run config:defaults:mempool
@ -10,18 +32,22 @@ $ npm run config:defaults:liquid
$ npm run config:defaults:bisq $ npm run config:defaults:bisq
``` ```
Changes that affect the frontend codebase only can be done using the production backend so you don't need to spin up the entire Mempool infrastructure. This is very convenient in case you want to quickly improve the UI, fix typos or implement new features that don't require any backend changes. ### 3. Run the Frontend
Make your changes, install the project dependencies and run the frontend server as follows: _Node.js 16 and npm 7 are recommended._
Install project dependencies and run the frontend server:
``` ```
$ npm install $ npm install
$ npm run serve:local-prod $ npm run serve:local-prod
``` ```
The frontend will be available at http://localhost:4200/ and all API requests will be proxied to the production server at https://mempool.space The frontend will be available at http://localhost:4200/ and all API requests will be proxied to the production server at https://mempool.space.
After making your changes, you can run our end-to-end automation suite and check for possible regressions: ### 4. Test
After making your changes, you can run our end-to-end automation suite and check for possible regressions.
Headless: Headless:
@ -37,11 +63,43 @@ $ npm run config:defaults:mempool && npm run cypress:open
This will open the Cypress test runner, where you can select any of the test files to run. This will open the Cypress test runner, where you can select any of the test files to run.
If all tests are green, submit your PR and it will be reviewed by someone on the team as soon as possible. If all tests are green, submit your PR, and it will be reviewed by someone on the team as soon as possible.
## Manual Setup
Set up the [Mempool backend](../backend/) first, if you haven't already.
### 1. Build the Frontend
_Node.js 16 and npm 7 are recommended._
Build the frontend:
```
cd frontend
npm install # add --prod for production
npm run build
```
### 2. Run the Frontend
#### Development
To run your local Mempool frontend with your local Mempool backend:
```
npm run serve
```
#### Production
The `npm run build` command from step 1 above should have generated a `dist` directory. Put the contents of `dist/` onto your web server.
You will probably want to set up a reverse proxy, TLS, etc. There are sample nginx configuration files in the top level of the repository for reference, but note that support for such tasks is outside the scope of this project.
## Translations: Transifex Project ## Translations: Transifex Project
The mempool frontend strings are localized into 20+ locales: The Mempool frontend strings are localized into 20+ locales:
https://www.transifex.com/mempool/mempool/dashboard/ https://www.transifex.com/mempool/mempool/dashboard/
### Translators ### Translators

View File

@ -3900,9 +3900,9 @@
} }
}, },
"node_modules/@socket.io/component-emitter": { "node_modules/@socket.io/component-emitter": {
"version": "3.0.0", "version": "3.1.0",
"resolved": "https://registry.npmjs.org/@socket.io/component-emitter/-/component-emitter-3.0.0.tgz", "resolved": "https://registry.npmjs.org/@socket.io/component-emitter/-/component-emitter-3.1.0.tgz",
"integrity": "sha512-2pTGuibAXJswAPJjaKisthqS/NOK5ypG4LYT6tEAV0S/mxW0zOIvYvGK0V8w8+SHxAm6vRMSjqSalFXeBAqs+Q==", "integrity": "sha512-+9jVqKhRSpsc591z5vX+X5Yyw+he/HCB4iQ/RYxw35CEPaY1gnsNE43nf9n9AaYjAQrTiI/mOwKUKdUs9vf7Xg==",
"dev": true "dev": true
}, },
"node_modules/@tootallnate/once": { "node_modules/@tootallnate/once": {
@ -4755,15 +4755,17 @@
} }
}, },
"node_modules/async": { "node_modules/async": {
"version": "1.5.2", "version": "2.6.4",
"resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", "resolved": "https://registry.npmjs.org/async/-/async-2.6.4.tgz",
"integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=", "integrity": "sha512-mzo5dfJYwAn29PeiJ0zvwTo04zj8HDJj0Mn8TD7sno7q12prdbnasKJHhkm2c1LgrhlJ0teaea8860oxi51mGA==",
"dev": true "dependencies": {
"lodash": "^4.17.14"
}
}, },
"node_modules/async-each-series": { "node_modules/async-each-series": {
"version": "0.1.1", "version": "0.1.1",
"resolved": "https://registry.npmjs.org/async-each-series/-/async-each-series-0.1.1.tgz", "resolved": "https://registry.npmjs.org/async-each-series/-/async-each-series-0.1.1.tgz",
"integrity": "sha1-dhfBkXQB/Yykooqtzj266Yr+tDI=", "integrity": "sha512-p4jj6Fws4Iy2m0iCmI2am2ZNZCgbdgE+P8F/8csmn2vx7ixXrO2zGcuNsD46X5uZSVecmkEy/M06X2vG8KD6dQ==",
"dev": true, "dev": true,
"engines": { "engines": {
"node": ">=0.8.0" "node": ">=0.8.0"
@ -4996,12 +4998,6 @@
"@babel/core": "^7.0.0-0" "@babel/core": "^7.0.0-0"
} }
}, },
"node_modules/backo2": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/backo2/-/backo2-1.0.2.tgz",
"integrity": "sha1-MasayLEpNjRj41s+u2n038+6eUc=",
"dev": true
},
"node_modules/balanced-match": { "node_modules/balanced-match": {
"version": "1.0.0", "version": "1.0.0",
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz",
@ -5254,13 +5250,13 @@
} }
}, },
"node_modules/browser-sync": { "node_modules/browser-sync": {
"version": "2.27.9", "version": "2.27.10",
"resolved": "https://registry.npmjs.org/browser-sync/-/browser-sync-2.27.9.tgz", "resolved": "https://registry.npmjs.org/browser-sync/-/browser-sync-2.27.10.tgz",
"integrity": "sha512-3zBtggcaZIeU9so4ja9yxk7/CZu9B3DOL6zkxFpzHCHsQmkGBPVXg61jItbeoa+WXgNLnr1sYES/2yQwyEZ2+w==", "integrity": "sha512-xKm+6KJmJu6RuMWWbFkKwOCSqQOxYe3nOrFkKI5Tr/ZzjPxyU3pFShKK3tWnazBo/3lYQzN7fzjixG8fwJh1Xw==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"browser-sync-client": "^2.27.9", "browser-sync-client": "^2.27.10",
"browser-sync-ui": "^2.27.9", "browser-sync-ui": "^2.27.10",
"bs-recipes": "1.3.4", "bs-recipes": "1.3.4",
"bs-snippet-injector": "^2.0.1", "bs-snippet-injector": "^2.0.1",
"chokidar": "^3.5.1", "chokidar": "^3.5.1",
@ -5277,7 +5273,7 @@
"localtunnel": "^2.0.1", "localtunnel": "^2.0.1",
"micromatch": "^4.0.2", "micromatch": "^4.0.2",
"opn": "5.3.0", "opn": "5.3.0",
"portscanner": "2.1.1", "portscanner": "2.2.0",
"qs": "6.2.3", "qs": "6.2.3",
"raw-body": "^2.3.2", "raw-body": "^2.3.2",
"resp-modifier": "6.0.2", "resp-modifier": "6.0.2",
@ -5298,15 +5294,16 @@
} }
}, },
"node_modules/browser-sync-client": { "node_modules/browser-sync-client": {
"version": "2.27.9", "version": "2.27.10",
"resolved": "https://registry.npmjs.org/browser-sync-client/-/browser-sync-client-2.27.9.tgz", "resolved": "https://registry.npmjs.org/browser-sync-client/-/browser-sync-client-2.27.10.tgz",
"integrity": "sha512-FHW8kydp7FXo6jnX3gXJCpHAHtWNLK0nx839nnK+boMfMI1n4KZd0+DmTxHBsHsF3OHud4V4jwoN8U5HExMIdQ==", "integrity": "sha512-KCFKA1YDj6cNul0VsA28apohtBsdk5Wv8T82ClOZPZMZWxPj4Ny5AUbrj9UlAb/k6pdxE5HABrWDhP9+cjt4HQ==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"etag": "1.8.1", "etag": "1.8.1",
"fresh": "0.5.2", "fresh": "0.5.2",
"mitt": "^1.1.3", "mitt": "^1.1.3",
"rxjs": "^5.5.6" "rxjs": "^5.5.6",
"typescript": "^4.6.2"
}, },
"engines": { "engines": {
"node": ">=8.0.0" "node": ">=8.0.0"
@ -5333,10 +5330,23 @@
"node": ">=0.10.0" "node": ">=0.10.0"
} }
}, },
"node_modules/browser-sync-client/node_modules/typescript": {
"version": "4.6.4",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.6.4.tgz",
"integrity": "sha512-9ia/jWHIEbo49HfjrLGfKbZSuWo9iTMwXO+Ca3pRsSpbsMbc7/IU8NKdCZVRRBafVPGnoJeFL76ZOAA84I9fEg==",
"dev": true,
"bin": {
"tsc": "bin/tsc",
"tsserver": "bin/tsserver"
},
"engines": {
"node": ">=4.2.0"
}
},
"node_modules/browser-sync-ui": { "node_modules/browser-sync-ui": {
"version": "2.27.9", "version": "2.27.10",
"resolved": "https://registry.npmjs.org/browser-sync-ui/-/browser-sync-ui-2.27.9.tgz", "resolved": "https://registry.npmjs.org/browser-sync-ui/-/browser-sync-ui-2.27.10.tgz",
"integrity": "sha512-rsduR2bRIwFvM8CX6iY/Nu5aWub0WB9zfSYg9Le/RV5N5DEyxJYey0VxdfWCnzDOoelassTDzYQo+r0iJno3qw==", "integrity": "sha512-elbJILq4Uo6OQv6gsvS3Y9vRAJlWu+h8j0JDkF0X/ua+3S6SVbbiWnZc8sNOFlG7yvVGIwBED3eaYQ0iBo1Dtw==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"async-each-series": "0.1.1", "async-each-series": "0.1.1",
@ -7891,20 +7901,16 @@
} }
}, },
"node_modules/engine.io-client": { "node_modules/engine.io-client": {
"version": "6.1.1", "version": "6.2.2",
"resolved": "https://registry.npmjs.org/engine.io-client/-/engine.io-client-6.1.1.tgz", "resolved": "https://registry.npmjs.org/engine.io-client/-/engine.io-client-6.2.2.tgz",
"integrity": "sha512-V05mmDo4gjimYW+FGujoGmmmxRaDsrVr7AXA3ZIfa04MWM1jOfZfUwou0oNqhNwy/votUDvGDt4JA4QF4e0b4g==", "integrity": "sha512-8ZQmx0LQGRTYkHuogVZuGSpDqYZtCM/nv8zQ68VZ+JkOpazJ7ICdsSpaO6iXwvaU30oFg5QJOJWj8zWqhbKjkQ==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"@socket.io/component-emitter": "~3.0.0", "@socket.io/component-emitter": "~3.1.0",
"debug": "~4.3.1", "debug": "~4.3.1",
"engine.io-parser": "~5.0.0", "engine.io-parser": "~5.0.3",
"has-cors": "1.1.0",
"parseqs": "0.0.6",
"parseuri": "0.0.6",
"ws": "~8.2.3", "ws": "~8.2.3",
"xmlhttprequest-ssl": "~2.0.0", "xmlhttprequest-ssl": "~2.0.0"
"yeast": "0.1.2"
} }
}, },
"node_modules/engine.io-client/node_modules/ws": { "node_modules/engine.io-client/node_modules/ws": {
@ -9571,12 +9577,6 @@
"resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.1.tgz", "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.1.tgz",
"integrity": "sha512-LSBS2LjbNBTf6287JEbEzvJgftkF5qFkmCo9hDRpAzKhUOlJ+hx8dd4USs00SgsUNwc4617J9ki5YtEClM2ffA==" "integrity": "sha512-LSBS2LjbNBTf6287JEbEzvJgftkF5qFkmCo9hDRpAzKhUOlJ+hx8dd4USs00SgsUNwc4617J9ki5YtEClM2ffA=="
}, },
"node_modules/has-cors": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/has-cors/-/has-cors-1.1.0.tgz",
"integrity": "sha1-XkdHk/fqmEPRu5nCPu9J/xJv/zk=",
"dev": true
},
"node_modules/has-flag": { "node_modules/has-flag": {
"version": "3.0.0", "version": "3.0.0",
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
@ -13181,18 +13181,6 @@
"parse5": "^6.0.1" "parse5": "^6.0.1"
} }
}, },
"node_modules/parseqs": {
"version": "0.0.6",
"resolved": "https://registry.npmjs.org/parseqs/-/parseqs-0.0.6.tgz",
"integrity": "sha512-jeAGzMDbfSHHA091hr0r31eYfTig+29g3GKKE/PPbEQ65X0lmMwlEoqmhzu0iztID5uJpZsFlUPDP8ThPL7M8w==",
"dev": true
},
"node_modules/parseuri": {
"version": "0.0.6",
"resolved": "https://registry.npmjs.org/parseuri/-/parseuri-0.0.6.tgz",
"integrity": "sha512-AUjen8sAkGgao7UyCX6Ahv0gIK2fABKmYjvP4xmy5JaKvcbTRueIqIPHLAfq30xJddqSE033IOMUSOMCcK3Sow==",
"dev": true
},
"node_modules/parseurl": { "node_modules/parseurl": {
"version": "1.3.3", "version": "1.3.3",
"resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz",
@ -13366,14 +13354,6 @@
"node": ">= 0.12.0" "node": ">= 0.12.0"
} }
}, },
"node_modules/portfinder/node_modules/async": {
"version": "2.6.4",
"resolved": "https://registry.npmjs.org/async/-/async-2.6.4.tgz",
"integrity": "sha512-mzo5dfJYwAn29PeiJ0zvwTo04zj8HDJj0Mn8TD7sno7q12prdbnasKJHhkm2c1LgrhlJ0teaea8860oxi51mGA==",
"dependencies": {
"lodash": "^4.17.14"
}
},
"node_modules/portfinder/node_modules/debug": { "node_modules/portfinder/node_modules/debug": {
"version": "3.2.7", "version": "3.2.7",
"resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz",
@ -13383,12 +13363,12 @@
} }
}, },
"node_modules/portscanner": { "node_modules/portscanner": {
"version": "2.1.1", "version": "2.2.0",
"resolved": "https://registry.npmjs.org/portscanner/-/portscanner-2.1.1.tgz", "resolved": "https://registry.npmjs.org/portscanner/-/portscanner-2.2.0.tgz",
"integrity": "sha1-6rtAnk3iSVD1oqUW01rnaTQ/u5Y=", "integrity": "sha512-IFroCz/59Lqa2uBvzK3bKDbDDIEaAY8XJ1jFxcLWTqosrsc32//P4VuSB2vZXoHiHqOmx8B5L5hnKOxL/7FlPw==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"async": "1.5.2", "async": "^2.6.0",
"is-number-like": "^1.0.3" "is-number-like": "^1.0.3"
}, },
"engines": { "engines": {
@ -15098,29 +15078,27 @@
"devOptional": true "devOptional": true
}, },
"node_modules/socket.io-client": { "node_modules/socket.io-client": {
"version": "4.4.1", "version": "4.5.1",
"resolved": "https://registry.npmjs.org/socket.io-client/-/socket.io-client-4.4.1.tgz", "resolved": "https://registry.npmjs.org/socket.io-client/-/socket.io-client-4.5.1.tgz",
"integrity": "sha512-N5C/L5fLNha5Ojd7Yeb/puKcPWWcoB/A09fEjjNsg91EDVr5twk/OEyO6VT9dlLSUNY85NpW6KBhVMvaLKQ3vQ==", "integrity": "sha512-e6nLVgiRYatS+AHXnOnGi4ocOpubvOUCGhyWw8v+/FxW8saHkinG6Dfhi9TU0Kt/8mwJIAASxvw6eujQmjdZVA==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"@socket.io/component-emitter": "~3.0.0", "@socket.io/component-emitter": "~3.1.0",
"backo2": "~1.0.2",
"debug": "~4.3.2", "debug": "~4.3.2",
"engine.io-client": "~6.1.1", "engine.io-client": "~6.2.1",
"parseuri": "0.0.6", "socket.io-parser": "~4.2.0"
"socket.io-parser": "~4.1.1"
}, },
"engines": { "engines": {
"node": ">=10.0.0" "node": ">=10.0.0"
} }
}, },
"node_modules/socket.io-client/node_modules/socket.io-parser": { "node_modules/socket.io-client/node_modules/socket.io-parser": {
"version": "4.1.2", "version": "4.2.0",
"resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-4.1.2.tgz", "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-4.2.0.tgz",
"integrity": "sha512-j3kk71QLJuyQ/hh5F/L2t1goqzdTL0gvDzuhTuNSwihfuFUrcSji0qFZmJJPtG6Rmug153eOPsUizeirf1IIog==", "integrity": "sha512-tLfmEwcEwnlQTxFB7jibL/q2+q8dlVQzj4JdRLJ/W/G1+Fu9VSxCx1Lo+n1HvXxKnM//dUuD0xgiA7tQf57Vng==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"@socket.io/component-emitter": "~3.0.0", "@socket.io/component-emitter": "~3.1.0",
"debug": "~4.3.1" "debug": "~4.3.1"
}, },
"engines": { "engines": {
@ -17264,12 +17242,6 @@
"fd-slicer": "~1.1.0" "fd-slicer": "~1.1.0"
} }
}, },
"node_modules/yeast": {
"version": "0.1.2",
"resolved": "https://registry.npmjs.org/yeast/-/yeast-0.1.2.tgz",
"integrity": "sha1-AI4G2AlDIMNy28L47XagymyKxBk=",
"dev": true
},
"node_modules/yn": { "node_modules/yn": {
"version": "3.1.1", "version": "3.1.1",
"resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz",
@ -20020,9 +19992,9 @@
"devOptional": true "devOptional": true
}, },
"@socket.io/component-emitter": { "@socket.io/component-emitter": {
"version": "3.0.0", "version": "3.1.0",
"resolved": "https://registry.npmjs.org/@socket.io/component-emitter/-/component-emitter-3.0.0.tgz", "resolved": "https://registry.npmjs.org/@socket.io/component-emitter/-/component-emitter-3.1.0.tgz",
"integrity": "sha512-2pTGuibAXJswAPJjaKisthqS/NOK5ypG4LYT6tEAV0S/mxW0zOIvYvGK0V8w8+SHxAm6vRMSjqSalFXeBAqs+Q==", "integrity": "sha512-+9jVqKhRSpsc591z5vX+X5Yyw+he/HCB4iQ/RYxw35CEPaY1gnsNE43nf9n9AaYjAQrTiI/mOwKUKdUs9vf7Xg==",
"dev": true "dev": true
}, },
"@tootallnate/once": { "@tootallnate/once": {
@ -20794,15 +20766,17 @@
"optional": true "optional": true
}, },
"async": { "async": {
"version": "1.5.2", "version": "2.6.4",
"resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", "resolved": "https://registry.npmjs.org/async/-/async-2.6.4.tgz",
"integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=", "integrity": "sha512-mzo5dfJYwAn29PeiJ0zvwTo04zj8HDJj0Mn8TD7sno7q12prdbnasKJHhkm2c1LgrhlJ0teaea8860oxi51mGA==",
"dev": true "requires": {
"lodash": "^4.17.14"
}
}, },
"async-each-series": { "async-each-series": {
"version": "0.1.1", "version": "0.1.1",
"resolved": "https://registry.npmjs.org/async-each-series/-/async-each-series-0.1.1.tgz", "resolved": "https://registry.npmjs.org/async-each-series/-/async-each-series-0.1.1.tgz",
"integrity": "sha1-dhfBkXQB/Yykooqtzj266Yr+tDI=", "integrity": "sha512-p4jj6Fws4Iy2m0iCmI2am2ZNZCgbdgE+P8F/8csmn2vx7ixXrO2zGcuNsD46X5uZSVecmkEy/M06X2vG8KD6dQ==",
"dev": true "dev": true
}, },
"asynckit": { "asynckit": {
@ -20976,12 +20950,6 @@
"@babel/helper-define-polyfill-provider": "^0.3.1" "@babel/helper-define-polyfill-provider": "^0.3.1"
} }
}, },
"backo2": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/backo2/-/backo2-1.0.2.tgz",
"integrity": "sha1-MasayLEpNjRj41s+u2n038+6eUc=",
"dev": true
},
"balanced-match": { "balanced-match": {
"version": "1.0.0", "version": "1.0.0",
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz",
@ -21210,13 +21178,13 @@
} }
}, },
"browser-sync": { "browser-sync": {
"version": "2.27.9", "version": "2.27.10",
"resolved": "https://registry.npmjs.org/browser-sync/-/browser-sync-2.27.9.tgz", "resolved": "https://registry.npmjs.org/browser-sync/-/browser-sync-2.27.10.tgz",
"integrity": "sha512-3zBtggcaZIeU9so4ja9yxk7/CZu9B3DOL6zkxFpzHCHsQmkGBPVXg61jItbeoa+WXgNLnr1sYES/2yQwyEZ2+w==", "integrity": "sha512-xKm+6KJmJu6RuMWWbFkKwOCSqQOxYe3nOrFkKI5Tr/ZzjPxyU3pFShKK3tWnazBo/3lYQzN7fzjixG8fwJh1Xw==",
"dev": true, "dev": true,
"requires": { "requires": {
"browser-sync-client": "^2.27.9", "browser-sync-client": "^2.27.10",
"browser-sync-ui": "^2.27.9", "browser-sync-ui": "^2.27.10",
"bs-recipes": "1.3.4", "bs-recipes": "1.3.4",
"bs-snippet-injector": "^2.0.1", "bs-snippet-injector": "^2.0.1",
"chokidar": "^3.5.1", "chokidar": "^3.5.1",
@ -21233,7 +21201,7 @@
"localtunnel": "^2.0.1", "localtunnel": "^2.0.1",
"micromatch": "^4.0.2", "micromatch": "^4.0.2",
"opn": "5.3.0", "opn": "5.3.0",
"portscanner": "2.1.1", "portscanner": "2.2.0",
"qs": "6.2.3", "qs": "6.2.3",
"raw-body": "^2.3.2", "raw-body": "^2.3.2",
"resp-modifier": "6.0.2", "resp-modifier": "6.0.2",
@ -21343,15 +21311,16 @@
} }
}, },
"browser-sync-client": { "browser-sync-client": {
"version": "2.27.9", "version": "2.27.10",
"resolved": "https://registry.npmjs.org/browser-sync-client/-/browser-sync-client-2.27.9.tgz", "resolved": "https://registry.npmjs.org/browser-sync-client/-/browser-sync-client-2.27.10.tgz",
"integrity": "sha512-FHW8kydp7FXo6jnX3gXJCpHAHtWNLK0nx839nnK+boMfMI1n4KZd0+DmTxHBsHsF3OHud4V4jwoN8U5HExMIdQ==", "integrity": "sha512-KCFKA1YDj6cNul0VsA28apohtBsdk5Wv8T82ClOZPZMZWxPj4Ny5AUbrj9UlAb/k6pdxE5HABrWDhP9+cjt4HQ==",
"dev": true, "dev": true,
"requires": { "requires": {
"etag": "1.8.1", "etag": "1.8.1",
"fresh": "0.5.2", "fresh": "0.5.2",
"mitt": "^1.1.3", "mitt": "^1.1.3",
"rxjs": "^5.5.6" "rxjs": "^5.5.6",
"typescript": "^4.6.2"
}, },
"dependencies": { "dependencies": {
"rxjs": { "rxjs": {
@ -21368,13 +21337,19 @@
"resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-1.0.1.tgz", "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-1.0.1.tgz",
"integrity": "sha1-g0D8RwLDEi310iKI+IKD9RPT/dQ=", "integrity": "sha1-g0D8RwLDEi310iKI+IKD9RPT/dQ=",
"dev": true "dev": true
},
"typescript": {
"version": "4.6.4",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.6.4.tgz",
"integrity": "sha512-9ia/jWHIEbo49HfjrLGfKbZSuWo9iTMwXO+Ca3pRsSpbsMbc7/IU8NKdCZVRRBafVPGnoJeFL76ZOAA84I9fEg==",
"dev": true
} }
} }
}, },
"browser-sync-ui": { "browser-sync-ui": {
"version": "2.27.9", "version": "2.27.10",
"resolved": "https://registry.npmjs.org/browser-sync-ui/-/browser-sync-ui-2.27.9.tgz", "resolved": "https://registry.npmjs.org/browser-sync-ui/-/browser-sync-ui-2.27.10.tgz",
"integrity": "sha512-rsduR2bRIwFvM8CX6iY/Nu5aWub0WB9zfSYg9Le/RV5N5DEyxJYey0VxdfWCnzDOoelassTDzYQo+r0iJno3qw==", "integrity": "sha512-elbJILq4Uo6OQv6gsvS3Y9vRAJlWu+h8j0JDkF0X/ua+3S6SVbbiWnZc8sNOFlG7yvVGIwBED3eaYQ0iBo1Dtw==",
"dev": true, "dev": true,
"requires": { "requires": {
"async-each-series": "0.1.1", "async-each-series": "0.1.1",
@ -23395,20 +23370,16 @@
} }
}, },
"engine.io-client": { "engine.io-client": {
"version": "6.1.1", "version": "6.2.2",
"resolved": "https://registry.npmjs.org/engine.io-client/-/engine.io-client-6.1.1.tgz", "resolved": "https://registry.npmjs.org/engine.io-client/-/engine.io-client-6.2.2.tgz",
"integrity": "sha512-V05mmDo4gjimYW+FGujoGmmmxRaDsrVr7AXA3ZIfa04MWM1jOfZfUwou0oNqhNwy/votUDvGDt4JA4QF4e0b4g==", "integrity": "sha512-8ZQmx0LQGRTYkHuogVZuGSpDqYZtCM/nv8zQ68VZ+JkOpazJ7ICdsSpaO6iXwvaU30oFg5QJOJWj8zWqhbKjkQ==",
"dev": true, "dev": true,
"requires": { "requires": {
"@socket.io/component-emitter": "~3.0.0", "@socket.io/component-emitter": "~3.1.0",
"debug": "~4.3.1", "debug": "~4.3.1",
"engine.io-parser": "~5.0.0", "engine.io-parser": "~5.0.3",
"has-cors": "1.1.0",
"parseqs": "0.0.6",
"parseuri": "0.0.6",
"ws": "~8.2.3", "ws": "~8.2.3",
"xmlhttprequest-ssl": "~2.0.0", "xmlhttprequest-ssl": "~2.0.0"
"yeast": "0.1.2"
}, },
"dependencies": { "dependencies": {
"ws": { "ws": {
@ -24622,12 +24593,6 @@
"resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.1.tgz", "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.1.tgz",
"integrity": "sha512-LSBS2LjbNBTf6287JEbEzvJgftkF5qFkmCo9hDRpAzKhUOlJ+hx8dd4USs00SgsUNwc4617J9ki5YtEClM2ffA==" "integrity": "sha512-LSBS2LjbNBTf6287JEbEzvJgftkF5qFkmCo9hDRpAzKhUOlJ+hx8dd4USs00SgsUNwc4617J9ki5YtEClM2ffA=="
}, },
"has-cors": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/has-cors/-/has-cors-1.1.0.tgz",
"integrity": "sha1-XkdHk/fqmEPRu5nCPu9J/xJv/zk=",
"dev": true
},
"has-flag": { "has-flag": {
"version": "3.0.0", "version": "3.0.0",
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
@ -27435,18 +27400,6 @@
"parse5": "^6.0.1" "parse5": "^6.0.1"
} }
}, },
"parseqs": {
"version": "0.0.6",
"resolved": "https://registry.npmjs.org/parseqs/-/parseqs-0.0.6.tgz",
"integrity": "sha512-jeAGzMDbfSHHA091hr0r31eYfTig+29g3GKKE/PPbEQ65X0lmMwlEoqmhzu0iztID5uJpZsFlUPDP8ThPL7M8w==",
"dev": true
},
"parseuri": {
"version": "0.0.6",
"resolved": "https://registry.npmjs.org/parseuri/-/parseuri-0.0.6.tgz",
"integrity": "sha512-AUjen8sAkGgao7UyCX6Ahv0gIK2fABKmYjvP4xmy5JaKvcbTRueIqIPHLAfq30xJddqSE033IOMUSOMCcK3Sow==",
"dev": true
},
"parseurl": { "parseurl": {
"version": "1.3.3", "version": "1.3.3",
"resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz",
@ -27576,14 +27529,6 @@
"mkdirp": "^0.5.5" "mkdirp": "^0.5.5"
}, },
"dependencies": { "dependencies": {
"async": {
"version": "2.6.4",
"resolved": "https://registry.npmjs.org/async/-/async-2.6.4.tgz",
"integrity": "sha512-mzo5dfJYwAn29PeiJ0zvwTo04zj8HDJj0Mn8TD7sno7q12prdbnasKJHhkm2c1LgrhlJ0teaea8860oxi51mGA==",
"requires": {
"lodash": "^4.17.14"
}
},
"debug": { "debug": {
"version": "3.2.7", "version": "3.2.7",
"resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz",
@ -27595,12 +27540,12 @@
} }
}, },
"portscanner": { "portscanner": {
"version": "2.1.1", "version": "2.2.0",
"resolved": "https://registry.npmjs.org/portscanner/-/portscanner-2.1.1.tgz", "resolved": "https://registry.npmjs.org/portscanner/-/portscanner-2.2.0.tgz",
"integrity": "sha1-6rtAnk3iSVD1oqUW01rnaTQ/u5Y=", "integrity": "sha512-IFroCz/59Lqa2uBvzK3bKDbDDIEaAY8XJ1jFxcLWTqosrsc32//P4VuSB2vZXoHiHqOmx8B5L5hnKOxL/7FlPw==",
"dev": true, "dev": true,
"requires": { "requires": {
"async": "1.5.2", "async": "^2.6.0",
"is-number-like": "^1.0.3" "is-number-like": "^1.0.3"
} }
}, },
@ -28879,26 +28824,24 @@
"devOptional": true "devOptional": true
}, },
"socket.io-client": { "socket.io-client": {
"version": "4.4.1", "version": "4.5.1",
"resolved": "https://registry.npmjs.org/socket.io-client/-/socket.io-client-4.4.1.tgz", "resolved": "https://registry.npmjs.org/socket.io-client/-/socket.io-client-4.5.1.tgz",
"integrity": "sha512-N5C/L5fLNha5Ojd7Yeb/puKcPWWcoB/A09fEjjNsg91EDVr5twk/OEyO6VT9dlLSUNY85NpW6KBhVMvaLKQ3vQ==", "integrity": "sha512-e6nLVgiRYatS+AHXnOnGi4ocOpubvOUCGhyWw8v+/FxW8saHkinG6Dfhi9TU0Kt/8mwJIAASxvw6eujQmjdZVA==",
"dev": true, "dev": true,
"requires": { "requires": {
"@socket.io/component-emitter": "~3.0.0", "@socket.io/component-emitter": "~3.1.0",
"backo2": "~1.0.2",
"debug": "~4.3.2", "debug": "~4.3.2",
"engine.io-client": "~6.1.1", "engine.io-client": "~6.2.1",
"parseuri": "0.0.6", "socket.io-parser": "~4.2.0"
"socket.io-parser": "~4.1.1"
}, },
"dependencies": { "dependencies": {
"socket.io-parser": { "socket.io-parser": {
"version": "4.1.2", "version": "4.2.0",
"resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-4.1.2.tgz", "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-4.2.0.tgz",
"integrity": "sha512-j3kk71QLJuyQ/hh5F/L2t1goqzdTL0gvDzuhTuNSwihfuFUrcSji0qFZmJJPtG6Rmug153eOPsUizeirf1IIog==", "integrity": "sha512-tLfmEwcEwnlQTxFB7jibL/q2+q8dlVQzj4JdRLJ/W/G1+Fu9VSxCx1Lo+n1HvXxKnM//dUuD0xgiA7tQf57Vng==",
"dev": true, "dev": true,
"requires": { "requires": {
"@socket.io/component-emitter": "~3.0.0", "@socket.io/component-emitter": "~3.1.0",
"debug": "~4.3.1" "debug": "~4.3.1"
} }
} }
@ -30543,12 +30486,6 @@
"fd-slicer": "~1.1.0" "fd-slicer": "~1.1.0"
} }
}, },
"yeast": {
"version": "0.1.2",
"resolved": "https://registry.npmjs.org/yeast/-/yeast-0.1.2.tgz",
"integrity": "sha1-AI4G2AlDIMNy28L47XagymyKxBk=",
"dev": true
},
"yn": { "yn": {
"version": "3.1.1", "version": "3.1.1",
"resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz",

View File

@ -7,7 +7,6 @@ import { AddressComponent } from './components/address/address.component';
import { MasterPageComponent } from './components/master-page/master-page.component'; import { MasterPageComponent } from './components/master-page/master-page.component';
import { AboutComponent } from './components/about/about.component'; import { AboutComponent } from './components/about/about.component';
import { StatusViewComponent } from './components/status-view/status-view.component'; import { StatusViewComponent } from './components/status-view/status-view.component';
import { LatestBlocksComponent } from './components/latest-blocks/latest-blocks.component';
import { TermsOfServiceComponent } from './components/terms-of-service/terms-of-service.component'; import { TermsOfServiceComponent } from './components/terms-of-service/terms-of-service.component';
import { PrivacyPolicyComponent } from './components/privacy-policy/privacy-policy.component'; import { PrivacyPolicyComponent } from './components/privacy-policy/privacy-policy.component';
import { TrademarkPolicyComponent } from './components/trademark-policy/trademark-policy.component'; import { TrademarkPolicyComponent } from './components/trademark-policy/trademark-policy.component';
@ -36,19 +35,20 @@ let routes: Routes = [
component: MasterPageComponent, component: MasterPageComponent,
children: [ children: [
{ {
path: 'tx/push', path: 'mining/blocks',
component: PushTransactionComponent, redirectTo: 'blocks',
pathMatch: 'full'
}, },
{ {
path: 'blocks', path: 'tx/push',
component: LatestBlocksComponent, component: PushTransactionComponent,
}, },
{ {
path: 'about', path: 'about',
component: AboutComponent, component: AboutComponent,
}, },
{ {
path: 'mining/blocks', path: 'blocks',
component: BlocksList, component: BlocksList,
}, },
{ {
@ -115,6 +115,11 @@ let routes: Routes = [
{ {
path: 'signet', path: 'signet',
children: [ children: [
{
path: 'mining/blocks',
redirectTo: 'blocks',
pathMatch: 'full'
},
{ {
path: '', path: '',
pathMatch: 'full', pathMatch: 'full',
@ -128,16 +133,12 @@ let routes: Routes = [
path: 'tx/push', path: 'tx/push',
component: PushTransactionComponent, component: PushTransactionComponent,
}, },
{
path: 'blocks',
component: LatestBlocksComponent,
},
{ {
path: 'about', path: 'about',
component: AboutComponent, component: AboutComponent,
}, },
{ {
path: 'mining/blocks', path: 'blocks',
component: BlocksList, component: BlocksList,
}, },
{ {
@ -211,19 +212,20 @@ let routes: Routes = [
component: MasterPageComponent, component: MasterPageComponent,
children: [ children: [
{ {
path: 'tx/push', path: 'mining/blocks',
component: PushTransactionComponent, redirectTo: 'blocks',
pathMatch: 'full'
}, },
{ {
path: 'blocks', path: 'tx/push',
component: LatestBlocksComponent, component: PushTransactionComponent,
}, },
{ {
path: 'about', path: 'about',
component: AboutComponent, component: AboutComponent,
}, },
{ {
path: 'mining/blocks', path: 'blocks',
component: BlocksList, component: BlocksList,
}, },
{ {
@ -321,16 +323,12 @@ if (browserWindowEnv && browserWindowEnv.BASE_MODULE === 'liquid') {
path: 'tx/push', path: 'tx/push',
component: PushTransactionComponent, component: PushTransactionComponent,
}, },
{
path: 'blocks',
component: LatestBlocksComponent,
},
{ {
path: 'about', path: 'about',
component: AboutComponent, component: AboutComponent,
}, },
{ {
path: 'mining/blocks', path: 'blocks',
component: BlocksList, component: BlocksList,
}, },
{ {
@ -429,16 +427,12 @@ if (browserWindowEnv && browserWindowEnv.BASE_MODULE === 'liquid') {
path: 'tx/push', path: 'tx/push',
component: PushTransactionComponent, component: PushTransactionComponent,
}, },
{
path: 'blocks',
component: LatestBlocksComponent,
},
{ {
path: 'about', path: 'about',
component: AboutComponent, component: AboutComponent,
}, },
{ {
path: 'mining/blocks', path: 'blocks',
component: BlocksList, component: BlocksList,
}, },
{ {

View File

@ -7,7 +7,6 @@ import { LightweightChartsComponent } from './lightweight-charts/lightweight-cha
import { LightweightChartsAreaComponent } from './lightweight-charts-area/lightweight-charts-area.component'; import { LightweightChartsAreaComponent } from './lightweight-charts-area/lightweight-charts-area.component';
import { BisqMarketComponent } from './bisq-market/bisq-market.component'; import { BisqMarketComponent } from './bisq-market/bisq-market.component';
import { BisqTransactionsComponent } from './bisq-transactions/bisq-transactions.component'; import { BisqTransactionsComponent } from './bisq-transactions/bisq-transactions.component';
import { NgbPaginationModule } from '@ng-bootstrap/ng-bootstrap';
import { BisqTransactionComponent } from './bisq-transaction/bisq-transaction.component'; import { BisqTransactionComponent } from './bisq-transaction/bisq-transaction.component';
import { BisqBlockComponent } from './bisq-block/bisq-block.component'; import { BisqBlockComponent } from './bisq-block/bisq-block.component';
import { BisqDashboardComponent } from './bisq-dashboard/bisq-dashboard.component'; import { BisqDashboardComponent } from './bisq-dashboard/bisq-dashboard.component';
@ -50,7 +49,6 @@ import { CommonModule } from '@angular/common';
CommonModule, CommonModule,
BisqRoutingModule, BisqRoutingModule,
SharedModule, SharedModule,
NgbPaginationModule,
FontAwesomeModule, FontAwesomeModule,
NgxBootstrapMultiselectModule, NgxBootstrapMultiselectModule,
], ],

View File

@ -250,6 +250,10 @@
<img class="image" src="/resources/profile/marina.svg" /> <img class="image" src="/resources/profile/marina.svg" />
<span>Marina</span> <span>Marina</span>
</a> </a>
<a href="https://github.com/bitcoin-wallet/bitcoin-wallet/" target="_blank" title="Bitcoin Wallet (Schildbach)">
<img class="image" src="/resources/profile/schildbach.svg" />
<span>Schildbach</span>
</a>
</div> </div>
</div> </div>

View File

@ -8,34 +8,34 @@
</button> </button>
<form [formGroup]="radioGroupForm" class="formRadioGroup" *ngIf="(statsObservable$ | async) as stats"> <form [formGroup]="radioGroupForm" class="formRadioGroup" *ngIf="(statsObservable$ | async) as stats">
<div class="btn-group btn-group-toggle" ngbRadioGroup name="radioBasic" formControlName="dateSpan"> <div class="btn-group btn-group-toggle" ngbRadioGroup name="radioBasic" formControlName="dateSpan">
<label ngbButtonLabel class="btn-primary btn-sm" *ngIf="stats.availableTimespanDay >= 1"> <label ngbButtonLabel class="btn-primary btn-sm" *ngIf="stats.blockCount >= 144">
<input ngbButton type="radio" [value]="'24h'" fragment="24h"> 24h <input ngbButton type="radio" [value]="'24h'" fragment="24h"> 24h
</label> </label>
<label ngbButtonLabel class="btn-primary btn-sm" *ngIf="stats.availableTimespanDay >= 3"> <label ngbButtonLabel class="btn-primary btn-sm" *ngIf="stats.blockCount >= 432">
<input ngbButton type="radio" [value]="'3d'" fragment="3d"> 3D <input ngbButton type="radio" [value]="'3d'" fragment="3d"> 3D
</label> </label>
<label ngbButtonLabel class="btn-primary btn-sm" *ngIf="stats.availableTimespanDay >= 7"> <label ngbButtonLabel class="btn-primary btn-sm" *ngIf="stats.blockCount >= 1008">
<input ngbButton type="radio" [value]="'1w'" fragment="1w"> 1W <input ngbButton type="radio" [value]="'1w'" fragment="1w"> 1W
</label> </label>
<label ngbButtonLabel class="btn-primary btn-sm" *ngIf="stats.availableTimespanDay >= 30"> <label ngbButtonLabel class="btn-primary btn-sm" *ngIf="stats.blockCount >= 4320">
<input ngbButton type="radio" [value]="'1m'" fragment="1m"> 1M <input ngbButton type="radio" [value]="'1m'" fragment="1m"> 1M
</label> </label>
<label ngbButtonLabel class="btn-primary btn-sm" *ngIf="stats.availableTimespanDay >= 90"> <label ngbButtonLabel class="btn-primary btn-sm" *ngIf="stats.blockCount >= 12960">
<input ngbButton type="radio" [value]="'3m'" fragment="3m"> 3M <input ngbButton type="radio" [value]="'3m'" fragment="3m"> 3M
</label> </label>
<label ngbButtonLabel class="btn-primary btn-sm" *ngIf="stats.availableTimespanDay >= 180"> <label ngbButtonLabel class="btn-primary btn-sm" *ngIf="stats.blockCount >= 25920">
<input ngbButton type="radio" [value]="'6m'" fragment="6m"> 6M <input ngbButton type="radio" [value]="'6m'" fragment="6m"> 6M
</label> </label>
<label ngbButtonLabel class="btn-primary btn-sm" *ngIf="stats.availableTimespanDay >= 365"> <label ngbButtonLabel class="btn-primary btn-sm" *ngIf="stats.blockCount >= 52560">
<input ngbButton type="radio" [value]="'1y'" fragment="1y"> 1Y <input ngbButton type="radio" [value]="'1y'" fragment="1y"> 1Y
</label> </label>
<label ngbButtonLabel class="btn-primary btn-sm" *ngIf="stats.availableTimespanDay >= 730"> <label ngbButtonLabel class="btn-primary btn-sm" *ngIf="stats.blockCount >= 105120">
<input ngbButton type="radio" [value]="'2y'" fragment="2y"> 2Y <input ngbButton type="radio" [value]="'2y'" fragment="2y"> 2Y
</label> </label>
<label ngbButtonLabel class="btn-primary btn-sm" *ngIf="stats.availableTimespanDay >= 1095"> <label ngbButtonLabel class="btn-primary btn-sm" *ngIf="stats.blockCount >= 157680">
<input ngbButton type="radio" [value]="'3y'" fragment="3y"> 3Y <input ngbButton type="radio" [value]="'3y'" fragment="3y"> 3Y
</label> </label>
<label ngbButtonLabel class="btn-primary btn-sm" *ngIf="stats.availableTimespanDay > 1095"> <label ngbButtonLabel class="btn-primary btn-sm" *ngIf="stats.blockCount > 157680">
<input ngbButton type="radio" [value]="'all'" fragment="all"> ALL <input ngbButton type="radio" [value]="'all'" fragment="all"> ALL
</label> </label>
</div> </div>

View File

@ -76,7 +76,7 @@ export class BlockFeeRatesGraphComponent implements OnInit {
this.isLoading = true; this.isLoading = true;
return this.apiService.getHistoricalBlockFeeRates$(timespan) return this.apiService.getHistoricalBlockFeeRates$(timespan)
.pipe( .pipe(
tap((data: any) => { tap((response) => {
// Group by percentile // Group by percentile
const seriesData = { const seriesData = {
'Min': [], 'Min': [],
@ -87,15 +87,15 @@ export class BlockFeeRatesGraphComponent implements OnInit {
'90th': [], '90th': [],
'Max': [] 'Max': []
}; };
for (const rate of data.blockFeeRates) { for (const rate of response.body) {
const timestamp = rate.timestamp * 1000; const timestamp = rate.timestamp * 1000;
seriesData['Min'].push([timestamp, rate.avg_fee_0, rate.avg_height]); seriesData['Min'].push([timestamp, rate.avgFee_0, rate.avgHeight]);
seriesData['10th'].push([timestamp, rate.avg_fee_10, rate.avg_height]); seriesData['10th'].push([timestamp, rate.avgFee_10, rate.avgHeight]);
seriesData['25th'].push([timestamp, rate.avg_fee_25, rate.avg_height]); seriesData['25th'].push([timestamp, rate.avgFee_25, rate.avgHeight]);
seriesData['Median'].push([timestamp, rate.avg_fee_50, rate.avg_height]); seriesData['Median'].push([timestamp, rate.avgFee_50, rate.avgHeight]);
seriesData['75th'].push([timestamp, rate.avg_fee_75, rate.avg_height]); seriesData['75th'].push([timestamp, rate.avgFee_75, rate.avgHeight]);
seriesData['90th'].push([timestamp, rate.avg_fee_90, rate.avg_height]); seriesData['90th'].push([timestamp, rate.avgFee_90, rate.avgHeight]);
seriesData['Max'].push([timestamp, rate.avg_fee_100, rate.avg_height]); seriesData['Max'].push([timestamp, rate.avgFee_100, rate.avgHeight]);
} }
// Prepare chart // Prepare chart
@ -130,13 +130,9 @@ export class BlockFeeRatesGraphComponent implements OnInit {
}); });
this.isLoading = false; this.isLoading = false;
}), }),
map((data: any) => { map((response) => {
const availableTimespanDay = (
(new Date().getTime() / 1000) - (data.oldestIndexedBlockTimestamp)
) / 3600 / 24;
return { return {
availableTimespanDay: availableTimespanDay, blockCount: parseInt(response.headers.get('x-total-count'), 10),
}; };
}), }),
); );

View File

@ -71,7 +71,7 @@ export class BlockFeesGraphComponent implements OnInit {
.pipe( .pipe(
tap((response) => { tap((response) => {
this.prepareChartOptions({ this.prepareChartOptions({
blockFees: response.body.map(val => [val.timestamp * 1000, val.avg_fees / 100000000]), blockFees: response.body.map(val => [val.timestamp * 1000, val.avgFees / 100000000]),
}); });
this.isLoading = false; this.isLoading = false;
}), }),

View File

@ -69,7 +69,7 @@ export class BlockRewardsGraphComponent implements OnInit {
.pipe( .pipe(
tap((response) => { tap((response) => {
this.prepareChartOptions({ this.prepareChartOptions({
blockRewards: response.body.map(val => [val.timestamp * 1000, val.avg_rewards / 100000000]), blockRewards: response.body.map(val => [val.timestamp * 1000, val.avgRewards / 100000000]),
}); });
this.isLoading = false; this.isLoading = false;
}), }),

View File

@ -83,8 +83,8 @@ export class BlockSizesWeightsGraphComponent implements OnInit {
tap((response) => { tap((response) => {
const data = response.body; const data = response.body;
this.prepareChartOptions({ this.prepareChartOptions({
sizes: data.sizes.map(val => [val.timestamp * 1000, val.avg_size / 1000000, val.avg_height]), sizes: data.sizes.map(val => [val.timestamp * 1000, val.avgSize / 1000000, val.avgHeight]),
weights: data.weights.map(val => [val.timestamp * 1000, val.avg_weight / 1000000, val.avg_height]), weights: data.weights.map(val => [val.timestamp * 1000, val.avgWeight / 1000000, val.avgHeight]),
}); });
this.isLoading = false; this.isLoading = false;
}), }),

View File

@ -114,7 +114,7 @@
<td><span class="skeleton-loader"></span></td> <td><span class="skeleton-loader"></span></td>
</tr> </tr>
</ng-template> </ng-template>
<tr> <tr *ngIf="network !== 'liquid' && network !== 'liquidtestnet'">
<td i18n="block.miner">Miner</td> <td i18n="block.miner">Miner</td>
<td *ngIf="stateService.env.MINING_DASHBOARD"> <td *ngIf="stateService.env.MINING_DASHBOARD">
<a placement="bottom" [routerLink]="['/mining/pool' | relativeUrl, block.extras.pool.slug]" class="badge" <a placement="bottom" [routerLink]="['/mining/pool' | relativeUrl, block.extras.pool.slug]" class="badge"
@ -197,7 +197,18 @@
<app-transactions-list [transactions]="transactions" [paginated]="true"></app-transactions-list> <app-transactions-list [transactions]="transactions" [paginated]="true"></app-transactions-list>
<ng-template [ngIf]="isLoadingTransactions"> <ng-template [ngIf]="transactionsError">
<div class="text-center">
<br>
<span i18n="error.general-loading-data">Error loading data.</span>
<br><br>
<i>{{ transactionsError.status }}: {{ transactionsError.error }}</i>
<br>
<br>
</div>
</ng-template>
<ng-template [ngIf]="isLoadingTransactions && !transactionsError">
<div class="text-center mb-4" class="tx-skeleton"> <div class="text-center mb-4" class="tx-skeleton">
<ng-container *ngIf="(txsLoadingStatus$ | async) as txsLoadingStatus; else headerLoader"> <ng-container *ngIf="(txsLoadingStatus$ | async) as txsLoadingStatus; else headerLoader">
@ -271,9 +282,9 @@
<ng-template [ngIf]="error"> <ng-template [ngIf]="error">
<div class="text-center"> <div class="text-center">
<span i18n="block.error.loading-block-data">Error loading block data.</span> <span i18n="error.general-loading-data">Error loading data.</span>
<br><br> <br><br>
<i>{{ error.error }}</i> <i>{{ error.code }}: {{ error.error }}</i>
</div> </div>
</ng-template> </ng-template>

View File

@ -38,6 +38,7 @@ export class BlockComponent implements OnInit, OnDestroy {
showDetails = false; showDetails = false;
showPreviousBlocklink = true; showPreviousBlocklink = true;
showNextBlocklink = true; showNextBlocklink = true;
transactionsError: any = null;
subscription: Subscription; subscription: Subscription;
keyNavigationSubscription: Subscription; keyNavigationSubscription: Subscription;
@ -152,12 +153,13 @@ export class BlockComponent implements OnInit, OnDestroy {
this.stateService.markBlock$.next({ blockHeight: this.blockHeight }); this.stateService.markBlock$.next({ blockHeight: this.blockHeight });
this.isLoadingTransactions = true; this.isLoadingTransactions = true;
this.transactions = null; this.transactions = null;
this.transactionsError = null;
}), }),
debounceTime(300), debounceTime(300),
switchMap((block) => this.electrsApiService.getBlockTransactions$(block.id) switchMap((block) => this.electrsApiService.getBlockTransactions$(block.id)
.pipe( .pipe(
catchError((err) => { catchError((err) => {
console.log(err); this.transactionsError = err;
return of([]); return of([]);
})) }))
), ),
@ -218,9 +220,16 @@ export class BlockComponent implements OnInit, OnDestroy {
const start = (page - 1) * this.itemsPerPage; const start = (page - 1) * this.itemsPerPage;
this.isLoadingTransactions = true; this.isLoadingTransactions = true;
this.transactions = null; this.transactions = null;
this.transactionsError = null;
target.scrollIntoView(); // works for chrome target.scrollIntoView(); // works for chrome
this.electrsApiService.getBlockTransactions$(this.block.id, start) this.electrsApiService.getBlockTransactions$(this.block.id, start)
.pipe(
catchError((err) => {
this.transactionsError = err;
return of([]);
})
)
.subscribe((transactions) => { .subscribe((transactions) => {
this.transactions = transactions; this.transactions = transactions;
this.isLoadingTransactions = false; this.isLoadingTransactions = false;

View File

@ -1,6 +1,6 @@
<app-indexing-progress *ngIf="!widget"></app-indexing-progress> <app-indexing-progress *ngIf="!widget"></app-indexing-progress>
<div class="container-xl" [class]="widget ? 'widget' : 'full-height'"> <div class="container-xl" style="min-height: 335px" [ngClass]="{'widget': widget, 'full-height': !widget, 'legacy': !indexingAvailable}">
<h1 *ngIf="!widget" class="float-left" i18n="master-page.blocks">Blocks</h1> <h1 *ngIf="!widget" class="float-left" i18n="master-page.blocks">Blocks</h1>
<div *ngIf="!widget && isLoading" class="spinner-border ml-3" role="status"></div> <div *ngIf="!widget && isLoading" class="spinner-border ml-3" role="status"></div>
@ -9,22 +9,22 @@
<div style="min-height: 295px"> <div style="min-height: 295px">
<table class="table table-borderless"> <table class="table table-borderless">
<thead> <thead>
<th class="height text-left" [class]="widget ? 'widget' : ''" i18n="latest-blocks.height">Height</th> <th class="height text-left" [ngClass]="{'widget': widget, 'legacy': !indexingAvailable}" i18n="latest-blocks.height">Height</th>
<th class="pool text-left" [class]="widget ? 'widget' : ''" i18n="mining.pool-name">Pool</th> <th *ngIf="indexingAvailable" class="pool text-left" [ngClass]="{'widget': widget, 'legacy': !indexingAvailable}" i18n="mining.pool-name">Pool</th>
<th class="timestamp" i18n="latest-blocks.timestamp" *ngIf="!widget">Timestamp</th> <th class="timestamp" i18n="latest-blocks.timestamp" *ngIf="!widget" [class]="indexingAvailable ? '' : 'legacy'">Timestamp</th>
<th class="mined" i18n="latest-blocks.mined" *ngIf="!widget">Mined</th> <th class="mined" i18n="latest-blocks.mined" *ngIf="!widget" [class]="indexingAvailable ? '' : 'legacy'">Mined</th>
<th class="reward text-right" i18n="latest-blocks.reward" [class]="widget ? 'widget' : ''">Reward</th> <th *ngIf="indexingAvailable" class="reward text-right" i18n="latest-blocks.reward" [ngClass]="{'widget': widget, 'legacy': !indexingAvailable}">Reward</th>
<th class="fees text-right" i18n="latest-blocks.fees" *ngIf="!widget">Fees</th> <th *ngIf="indexingAvailable && !widget" class="fees text-right" i18n="latest-blocks.fees" [class]="indexingAvailable ? '' : 'legacy'">Fees</th>
<th class="txs text-right" i18n="dashboard.txs" [class]="widget ? 'widget' : ''">TXs</th> <th *ngIf="indexingAvailable" class="txs text-right" i18n="dashboard.txs" [ngClass]="{'widget': widget, 'legacy': !indexingAvailable}">TXs</th>
<th class="size" i18n="latest-blocks.size" *ngIf="!widget">Size</th> <th *ngIf="!indexingAvailable" class="txs text-right" i18n="dashboard.txs" [ngClass]="{'widget': widget, 'legacy': !indexingAvailable}">Transactions</th>
<th class="size" i18n="latest-blocks.size" *ngIf="!widget" [class]="indexingAvailable ? '' : 'legacy'">Size</th>
</thead> </thead>
<tbody *ngIf="blocks$ | async as blocks; else skeleton" [style]="isLoading ? 'opacity: 0.75' : ''"> <tbody *ngIf="blocks$ | async as blocks; else skeleton" [style]="isLoading ? 'opacity: 0.75' : ''">
<tr *ngFor="let block of blocks; let i= index; trackBy: trackByBlock"> <tr *ngFor="let block of blocks; let i= index; trackBy: trackByBlock">
<td class="text-left" [class]="widget ? 'widget' : ''"> <td class="text-left" [class]="widget ? 'widget' : ''">
<a [routerLink]="['/block' | relativeUrl, block.height]">{{ block.height <a [routerLink]="['/block' | relativeUrl, block.height]">{{ block.height }}</a>
}}</a>
</td> </td>
<td class="pool text-left" [class]="widget ? 'widget' : ''"> <td *ngIf="indexingAvailable" class="pool text-left" [ngClass]="{'widget': widget, 'legacy': !indexingAvailable}">
<div class="tooltip-custom"> <div class="tooltip-custom">
<a class="clear-link" [routerLink]="['/mining/pool' | relativeUrl, block.extras.pool.slug]"> <a class="clear-link" [routerLink]="['/mining/pool' | relativeUrl, block.extras.pool.slug]">
<img width="22" height="22" src="{{ block.extras.pool['logo'] }}" <img width="22" height="22" src="{{ block.extras.pool['logo'] }}"
@ -37,19 +37,19 @@
<td class="timestamp" *ngIf="!widget"> <td class="timestamp" *ngIf="!widget">
&lrm;{{ block.timestamp * 1000 | date:'yyyy-MM-dd HH:mm' }} &lrm;{{ block.timestamp * 1000 | date:'yyyy-MM-dd HH:mm' }}
</td> </td>
<td class="mined" *ngIf="!widget"> <td class="mined" *ngIf="!widget" [class]="indexingAvailable ? '' : 'legacy'">
<app-time-since [time]="block.timestamp" [fastRender]="true"></app-time-since> <app-time-since [time]="block.timestamp" [fastRender]="true"></app-time-since>
</td> </td>
<td class="reward text-right" [class]="widget ? 'widget' : ''"> <td *ngIf="indexingAvailable" class="reward text-right" [ngClass]="{'widget': widget, 'legacy': !indexingAvailable}">
<app-amount [satoshis]="block.extras.reward" [noFiat]="true" digitsInfo="1.2-2"></app-amount> <app-amount [satoshis]="block.extras.reward" [noFiat]="true" digitsInfo="1.2-2"></app-amount>
</td> </td>
<td class="fees text-right" *ngIf="!widget"> <td *ngIf="indexingAvailable && !widget" class="fees text-right" [class]="indexingAvailable ? '' : 'legacy'">
<app-amount [satoshis]="block.extras.totalFees" [noFiat]="true" digitsInfo="1.2-2"></app-amount> <app-amount [satoshis]="block.extras.totalFees" [noFiat]="true" digitsInfo="1.2-2"></app-amount>
</td> </td>
<td class="txs text-right" [class]="widget ? 'widget' : ''"> <td class="txs text-right" [ngClass]="{'widget': widget, 'legacy': !indexingAvailable}">
{{ block.tx_count | number }} {{ block.tx_count | number }}
</td> </td>
<td class="size" *ngIf="!widget"> <td class="size" *ngIf="!widget" [class]="indexingAvailable ? '' : 'legacy'">
<div class="progress"> <div class="progress">
<div class="progress-bar progress-mempool" role="progressbar" <div class="progress-bar progress-mempool" role="progressbar"
[ngStyle]="{'width': (block.weight / stateService.env.BLOCK_WEIGHT_UNITS)*100 + '%' }"></div> [ngStyle]="{'width': (block.weight / stateService.env.BLOCK_WEIGHT_UNITS)*100 + '%' }"></div>
@ -61,29 +61,29 @@
<ng-template #skeleton> <ng-template #skeleton>
<tbody> <tbody>
<tr *ngFor="let item of skeletonLines"> <tr *ngFor="let item of skeletonLines">
<td class="height text-left" [class]="widget ? 'widget' : ''"> <td class="height text-left" [ngClass]="{'widget': widget, 'legacy': !indexingAvailable}">
<span class="skeleton-loader" style="max-width: 75px"></span> <span class="skeleton-loader" style="max-width: 75px"></span>
</td> </td>
<td class="pool text-left" [class]="widget ? 'widget' : ''"> <td *ngIf="indexingAvailable" class="pool text-left" [ngClass]="{'widget': widget, 'legacy': !indexingAvailable}">
<img width="1" height="25" style="opacity: 0"> <img width="1" height="25" style="opacity: 0">
<span class="skeleton-loader" style="max-width: 125px"></span> <span class="skeleton-loader" style="max-width: 125px"></span>
</td> </td>
<td class="timestamp" *ngIf="!widget"> <td class="timestamp" *ngIf="!widget" [class]="indexingAvailable ? '' : 'legacy'">
<span class="skeleton-loader" style="max-width: 150px"></span> <span class="skeleton-loader" style="max-width: 150px"></span>
</td> </td>
<td class="mined" *ngIf="!widget"> <td class="mined" *ngIf="!widget" [class]="indexingAvailable ? '' : 'legacy'">
<span class="skeleton-loader" style="max-width: 125px"></span> <span class="skeleton-loader" style="max-width: 125px"></span>
</td> </td>
<td class="reward text-right" [class]="widget ? 'widget' : ''"> <td *ngIf="indexingAvailable" class="reward text-right" [ngClass]="{'widget': widget, 'legacy': !indexingAvailable}">
<span class="skeleton-loader" style="max-width: 75px"></span> <span class="skeleton-loader" style="max-width: 75px"></span>
</td> </td>
<td class="fees text-right" *ngIf="!widget"> <td *ngIf="indexingAvailable && !widget" class="fees text-right" [class]="indexingAvailable ? '' : 'legacy'">
<span class="skeleton-loader" style="max-width: 75px"></span> <span class="skeleton-loader" style="max-width: 75px"></span>
</td> </td>
<td class="txs text-right" [class]="widget ? 'widget' : ''"> <td class="txs text-right" [ngClass]="{'widget': widget, 'legacy': !indexingAvailable}">
<span class="skeleton-loader" style="max-width: 75px"></span> <span class="skeleton-loader" style="max-width: 75px"></span>
</td> </td>
<td class="size" *ngIf="!widget"> <td class="size" *ngIf="!widget" [class]="indexingAvailable ? '' : 'legacy'">
<span class="skeleton-loader"></span> <span class="skeleton-loader"></span>
</td> </td>
</tr> </tr>

View File

@ -12,6 +12,9 @@
padding-left: 0px; padding-left: 0px;
padding-bottom: 0px; padding-bottom: 0px;
} }
.container-xl.legacy {
max-width: 1140px;
}
.container { .container {
max-width: 100%; max-width: 100%;
@ -64,6 +67,9 @@ tr, td, th {
width: 10%; width: 10%;
} }
} }
.height.legacy {
width: 15%;
}
.timestamp { .timestamp {
width: 18%; width: 18%;
@ -71,6 +77,9 @@ tr, td, th {
display: none; display: none;
} }
} }
.timestamp.legacy {
width: 20%;
}
.mined { .mined {
width: 13%; width: 13%;
@ -78,6 +87,12 @@ tr, td, th {
display: none; display: none;
} }
} }
.mined.legacy {
width: 15%;
@media (max-width: 576px) {
display: table-cell;
}
}
.txs { .txs {
padding-right: 40px; padding-right: 40px;
@ -94,6 +109,10 @@ tr, td, th {
display: none; display: none;
} }
} }
.txs.legacy {
padding-right: 80px;
width: 10%;
}
.fees { .fees {
width: 10%; width: 10%;
@ -132,6 +151,12 @@ tr, td, th {
display: none; display: none;
} }
} }
.size.legacy {
width: 20%;
@media (max-width: 576px) {
display: table-cell;
}
}
/* Tooltip text */ /* Tooltip text */
.tooltip-custom { .tooltip-custom {

View File

@ -17,6 +17,7 @@ export class BlocksList implements OnInit {
blocks$: Observable<any[]> = undefined; blocks$: Observable<any[]> = undefined;
indexingAvailable = false;
isLoading = true; isLoading = true;
fromBlockHeight = undefined; fromBlockHeight = undefined;
paginationMaxSize: number; paginationMaxSize: number;
@ -35,6 +36,9 @@ export class BlocksList implements OnInit {
} }
ngOnInit(): void { ngOnInit(): void {
this.indexingAvailable = (this.stateService.env.BASE_MODULE === 'mempool' &&
this.stateService.env.MINING_DASHBOARD === true);
if (!this.widget) { if (!this.widget) {
this.websocketService.want(['blocks']); this.websocketService.want(['blocks']);
} }
@ -55,17 +59,19 @@ export class BlocksList implements OnInit {
this.isLoading = false; this.isLoading = false;
}), }),
map(blocks => { map(blocks => {
if (this.indexingAvailable) {
for (const block of blocks) { for (const block of blocks) {
// @ts-ignore: Need to add an extra field for the template // @ts-ignore: Need to add an extra field for the template
block.extras.pool.logo = `./resources/mining-pools/` + block.extras.pool.logo = `./resources/mining-pools/` +
block.extras.pool.name.toLowerCase().replace(' ', '').replace('.', '') + '.svg'; block.extras.pool.name.toLowerCase().replace(' ', '').replace('.', '') + '.svg';
} }
}
if (this.widget) { if (this.widget) {
return blocks.slice(0, 6); return blocks.slice(0, 6);
} }
return blocks; return blocks;
}), }),
retryWhen(errors => errors.pipe(delayWhen(() => timer(1000)))) retryWhen(errors => errors.pipe(delayWhen(() => timer(10000))))
) )
}) })
), ),
@ -81,9 +87,11 @@ export class BlocksList implements OnInit {
return blocks[0]; return blocks[0];
} }
this.blocksCount = Math.max(this.blocksCount, blocks[1][0].height) + 1; this.blocksCount = Math.max(this.blocksCount, blocks[1][0].height) + 1;
if (this.stateService.env.MINING_DASHBOARD) {
// @ts-ignore: Need to add an extra field for the template // @ts-ignore: Need to add an extra field for the template
blocks[1][0].extras.pool.logo = `./resources/mining-pools/` + blocks[1][0].extras.pool.logo = `./resources/mining-pools/` +
blocks[1][0].extras.pool.name.toLowerCase().replace(' ', '').replace('.', '') + '.svg'; blocks[1][0].extras.pool.name.toLowerCase().replace(' ', '').replace('.', '') + '.svg';
}
acc.unshift(blocks[1][0]); acc.unshift(blocks[1][0]);
acc = acc.slice(0, this.widget ? 6 : 15); acc = acc.slice(0, this.widget ? 6 : 15);
return acc; return acc;

View File

@ -1,4 +1,4 @@
<div style="min-height: 295px"> <div style="min-height: 335px">
<table class="table latest-adjustments"> <table class="table latest-adjustments">
<thead> <thead>
<tr> <tr>

View File

@ -34,10 +34,6 @@ export class DifficultyAdjustmentsTable implements OnInit {
.pipe( .pipe(
map((response) => { map((response) => {
const data = response.body; const data = response.body;
const availableTimespanDay = (
(new Date().getTime() / 1000) - (data.oldestIndexedBlockTimestamp)
) / 3600 / 24;
const tableData = []; const tableData = [];
for (let i = data.difficulty.length - 1; i > 0; --i) { for (let i = data.difficulty.length - 1; i > 0; --i) {
const selectedPowerOfTen: any = selectPowerOfTen(data.difficulty[i].difficulty); const selectedPowerOfTen: any = selectPowerOfTen(data.difficulty[i].difficulty);
@ -53,7 +49,6 @@ export class DifficultyAdjustmentsTable implements OnInit {
this.isLoading = false; this.isLoading = false;
return { return {
availableTimespanDay: availableTimespanDay,
difficulty: tableData.slice(0, 6), difficulty: tableData.slice(0, 6),
}; };
}), }),

View File

@ -1,7 +1,7 @@
<div class="mb-3 d-flex menu" style="padding: 0px 35px;"> <div *ngIf="stateService.env.MINING_DASHBOARD" class="mb-3 d-flex menu" style="padding: 0px 35px;">
<a routerLinkActive="active" class="btn btn-primary w-50 mr-1" <a routerLinkActive="active" class="btn btn-primary w-50 mr-1"
[routerLink]="['/graphs/mempool' | relativeUrl]">Mempool</a> [routerLink]="['/graphs/mempool' | relativeUrl]">Mempool</a>
<div ngbDropdown *ngIf="stateService.env.MINING_DASHBOARD" class="w-50"> <div ngbDropdown class="w-50">
<button class="btn btn-primary w-100" id="dropdownBasic1" ngbDropdownToggle i18n="mining">Mining</button> <button class="btn btn-primary w-100" id="dropdownBasic1" ngbDropdownToggle i18n="mining">Mining</button>
<div ngbDropdownMenu aria-labelledby="dropdownBasic1"> <div ngbDropdownMenu aria-labelledby="dropdownBasic1">
<a class="dropdown-item" routerLinkActive="active" [routerLink]="['/graphs/mining/pools' | relativeUrl]" <a class="dropdown-item" routerLinkActive="active" [routerLink]="['/graphs/mining/pools' | relativeUrl]"

View File

@ -1,57 +0,0 @@
<div class="container-xl">
<h1 class="float-left" i18n="master-page.blocks">Blocks</h1>
<br>
<div class="clearfix"></div>
<table class="table table-borderless" [alwaysCallback]="true" infiniteScroll [infiniteScrollDistance]="1.5" [infiniteScrollUpDistance]="1.5" [infiniteScrollThrottle]="50" (scrolled)="loadMore()">
<thead>
<th style="width: 15%;" i18n="latest-blocks.height">Height</th>
<th class="d-none d-md-block" style="width: 20%;" i18n="latest-blocks.timestamp">Timestamp</th>
<th style="width: 20%;" i18n="latest-blocks.mined">Mined</th>
<th class="d-none d-lg-block" style="width: 15%;" i18n="latest-blocks.transactions">Transactions</th>
<th style="width: 20%;" i18n="latest-blocks.size">Size</th>
</thead>
<tbody>
<tr *ngFor="let block of blocks; let i= index; trackBy: trackByBlock">
<td><a [routerLink]="['/block' | relativeUrl, block.id]" [state]="{ data: { block: block } }">{{ block.height }}</a></td>
<td class="d-none d-md-block">&lrm;{{ block.timestamp * 1000 | date:'yyyy-MM-dd HH:mm' }}</td>
<td><app-time-since [time]="block.timestamp" [fastRender]="true"></app-time-since></td>
<td class="d-none d-lg-block">{{ block.tx_count | number }}</td>
<td>
<div class="progress">
<div class="progress-bar progress-mempool {{ network$ | async }}" role="progressbar" [ngStyle]="{'width': (block.weight / stateService.env.BLOCK_WEIGHT_UNITS)*100 + '%' }"></div>
<div class="progress-text" [innerHTML]="block.size | bytes: 2"></div>
</div>
</td>
</tr>
<ng-template [ngIf]="isLoading">
<tr *ngFor="let item of [1,2,3,4,5,6,7,8,9,10]">
<td><span class="skeleton-loader"></span></td>
<td class="d-none d-md-block"><span class="skeleton-loader"></span></td>
<td><span class="skeleton-loader"></span></td>
<td class="d-none d-lg-block"><span class="skeleton-loader"></span></td>
<td><span class="skeleton-loader"></span></td>
</tr>
<ng-container *ngIf="(blocksLoadingStatus$ | async) as blocksLoadingStatus">
<tr>
<td colspan="5">
<div class="progress progress-dark">
<div class="progress-bar progress-darklight" role="progressbar" [ngStyle]="{'width': blocksLoadingStatus + '%' }"></div>
</div>
</td>
</tr>
</ng-container>
</ng-template>
</tbody>
</table>
<ng-template [ngIf]="error">
<div class="text-center">
<span>Error loading blocks</span>
<br>
<i>{{ error.error }}</i>
</div>
</ng-template>
</div>

View File

@ -1,14 +0,0 @@
.progress {
background-color: #2d3348;
}
@media (min-width: 768px) {
.d-md-block {
display: table-cell !important;
}
}
@media (min-width: 992px) {
.d-lg-block {
display: table-cell !important;
}
}

View File

@ -1,140 +0,0 @@
import { Component, OnInit, OnDestroy, ChangeDetectionStrategy, ChangeDetectorRef } from '@angular/core';
import { ElectrsApiService } from '../../services/electrs-api.service';
import { StateService } from '../../services/state.service';
import { Block } from '../../interfaces/electrs.interface';
import { Subscription, Observable, merge, of } from 'rxjs';
import { SeoService } from '../../services/seo.service';
import { WebsocketService } from 'src/app/services/websocket.service';
import { map } from 'rxjs/operators';
@Component({
selector: 'app-latest-blocks',
templateUrl: './latest-blocks.component.html',
styleUrls: ['./latest-blocks.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush
})
export class LatestBlocksComponent implements OnInit, OnDestroy {
network$: Observable<string>;
error: any;
blocks: any[] = [];
blockSubscription: Subscription;
isLoading = true;
interval: any;
blocksLoadingStatus$: Observable<number>;
latestBlockHeight: number;
heightOfPageUntilBlocks = 150;
heightOfBlocksTableChunk = 470;
constructor(
private electrsApiService: ElectrsApiService,
public stateService: StateService,
private seoService: SeoService,
private websocketService: WebsocketService,
private cd: ChangeDetectorRef,
) { }
ngOnInit() {
this.seoService.setTitle($localize`:@@8a7b4bd44c0ac71b2e72de0398b303257f7d2f54:Blocks`);
this.websocketService.want(['blocks']);
this.network$ = merge(of(''), this.stateService.networkChanged$);
this.blocksLoadingStatus$ = this.stateService.loadingIndicators$
.pipe(
map((indicators) => indicators['blocks'] !== undefined ? indicators['blocks'] : 0)
);
this.blockSubscription = this.stateService.blocks$
.subscribe(([block]) => {
if (block === null || !this.blocks.length) {
return;
}
this.latestBlockHeight = block.height;
if (block.height === this.blocks[0].height) {
return;
}
// If we are out of sync, reload the blocks instead
if (block.height > this.blocks[0].height + 1) {
this.loadInitialBlocks();
return;
}
if (block.height <= this.blocks[0].height) {
return;
}
this.blocks.pop();
this.blocks.unshift(block);
this.cd.markForCheck();
});
this.loadInitialBlocks();
}
ngOnDestroy() {
clearInterval(this.interval);
this.blockSubscription.unsubscribe();
}
loadInitialBlocks() {
this.electrsApiService.listBlocks$()
.subscribe((blocks) => {
this.blocks = blocks;
this.isLoading = false;
this.error = undefined;
this.latestBlockHeight = blocks[0].height;
const spaceForBlocks = window.innerHeight - this.heightOfPageUntilBlocks;
const chunks = Math.ceil(spaceForBlocks / this.heightOfBlocksTableChunk) - 1;
if (chunks > 0) {
this.loadMore(chunks);
}
this.cd.markForCheck();
},
(error) => {
console.log(error);
this.error = error;
this.isLoading = false;
this.cd.markForCheck();
});
}
loadMore(chunks = 0) {
if (this.isLoading) {
return;
}
const height = this.blocks[this.blocks.length - 1].height - 1;
if (height < 0) {
return;
}
this.isLoading = true;
this.electrsApiService.listBlocks$(height)
.subscribe((blocks) => {
this.blocks = this.blocks.concat(blocks);
this.isLoading = false;
this.error = undefined;
const chunksLeft = chunks - 1;
if (chunksLeft > 0) {
this.loadMore(chunksLeft);
}
this.cd.markForCheck();
},
(error) => {
console.log(error);
this.error = error;
this.isLoading = false;
this.cd.markForCheck();
});
}
trackByBlock(index: number, block: Block) {
return block.height;
}
}

View File

@ -51,7 +51,7 @@
<div class="card-body"> <div class="card-body">
<h5 class="card-title" i18n="dashboard.latest-blocks">Latest blocks</h5> <h5 class="card-title" i18n="dashboard.latest-blocks">Latest blocks</h5>
<app-blocks-list [widget]=true></app-blocks-list> <app-blocks-list [widget]=true></app-blocks-list>
<div><a [routerLink]="['/mining/blocks' | relativeUrl]" i18n="dashboard.view-more">View more &raquo;</a></div> <div><a [routerLink]="['/blocks' | relativeUrl]" i18n="dashboard.view-more">View more &raquo;</a></div>
</div> </div>
</div> </div>
</div> </div>

View File

@ -136,7 +136,7 @@
</tr> </tr>
</tbody> </tbody>
</table> </table>
<div class=""><a href="" [routerLink]="[(stateService.env.MINING_DASHBOARD ? '/mining/blocks' : '/blocks') | relativeUrl]" i18n="dashboard.view-more">View more &raquo;</a></div> <div class=""><a href="" [routerLink]="['/blocks' | relativeUrl]" i18n="dashboard.view-more">View more &raquo;</a></div>
</div> </div>
</div> </div>
</div> </div>

View File

@ -198,10 +198,8 @@
display: none; display: none;
text-align: right; text-align: right;
width: 20%; width: 20%;
@media (min-width: 376px) {
display: table-cell; display: table-cell;
} }
}
.table-cell-size { .table-cell-size {
display: none; display: none;
text-align: center; text-align: center;

View File

@ -3049,7 +3049,6 @@ export const restApiDocsData = [
"slug": "antpool" "slug": "antpool"
}, },
... ...
"oldestIndexedBlockTimestamp": 1231006505,
"blockCount": 1005, "blockCount": 1005,
"lastEstimatedHashrate": 230086716765559200000 "lastEstimatedHashrate": 230086716765559200000
}` }`
@ -3080,7 +3079,6 @@ export const restApiDocsData = [
}, },
... ...
], ],
"oldestIndexedBlockTimestamp": 1296688602,
"blockCount": 2226180, "blockCount": 2226180,
"lastEstimatedHashrate": 602244182177430.8 "lastEstimatedHashrate": 602244182177430.8
}` }`
@ -3834,34 +3832,34 @@ export const restApiDocsData = [
curl: [`1w`], curl: [`1w`],
response: `[ response: `[
{ {
"avg_height": 735644, "avgHeight": 735644,
"timestamp": 1652119111, "timestamp": 1652119111,
"avg_fees": 24212890 "avgFees": 24212890
}, },
{ {
"avg_height": 735646, "avgHeight": 735646,
"timestamp": 1652120252, "timestamp": 1652120252,
"avg_fees": 21655996 "avgFees": 21655996
}, },
{ {
"avg_height": 735648, "avgHeight": 735648,
"timestamp": 1652121214, "timestamp": 1652121214,
"avg_fees": 20678859 "avgFees": 20678859
}, },
{ {
"avg_height": 735649, "avgHeight": 735649,
"timestamp": 1652121757, "timestamp": 1652121757,
"avg_fees": 21020140 "avgFees": 21020140
}, },
{ {
"avg_height": 735650, "avgHeight": 735650,
"timestamp": 1652122367, "timestamp": 1652122367,
"avg_fees": 23064200 "avgFees": 23064200
}, },
{ {
"avg_height": 735652, "avgHeight": 735652,
"timestamp": 1652122893, "timestamp": 1652122893,
"avg_fees": 17620723 "avgFees": 17620723
}, },
... ...
]` ]`
@ -3872,14 +3870,14 @@ export const restApiDocsData = [
curl: [`1w`], curl: [`1w`],
response: `[ response: `[
{ {
"avg_height": 2224253, "avgHeight": 2224253,
"timestamp": 1652346420, "timestamp": 1652346420,
"avg_fees": 211686 "avgFees": 211686
}, },
{ {
"avg_height": 2224254, "avgHeight": 2224254,
"timestamp": 1652346850, "timestamp": 1652346850,
"avg_fees": 2565952 "avgFees": 2565952
}, },
... ...
]` ]`
@ -3890,14 +3888,14 @@ export const restApiDocsData = [
curl: [`1w`], curl: [`1w`],
response: `[ response: `[
{ {
"avg_height": 89978, "avgHeight": 89978,
"timestamp": 1652346573, "timestamp": 1652346573,
"avg_fees": 1071 "avgFees": 1071
}, },
{ {
"avg_height": 89979, "avgHeight": 89979,
"timestamp": 1652346970, "timestamp": 1652346970,
"avg_fees": 1224 "avgFees": 1224
}, },
... ...
]` ]`
@ -3933,29 +3931,29 @@ export const restApiDocsData = [
curl: [`1d`], curl: [`1d`],
response: `[ response: `[
{ {
"avg_height": 599992, "avgHeight": 599992,
"timestamp": 1571438412, "timestamp": 1571438412,
"avg_rewards": 1260530933 "avgRewards": 1260530933
}, },
{ {
"avg_height": 600000, "avgHeight": 600000,
"timestamp": 1571443398, "timestamp": 1571443398,
"avg_rewards": 1264314538 "avgRewards": 1264314538
}, },
{ {
"avg_height": 725441, "avgHeight": 725441,
"timestamp": 1646139035, "timestamp": 1646139035,
"avg_rewards": 637067563 "avgRewards": 637067563
}, },
{ {
"avg_height": 725585, "avgHeight": 725585,
"timestamp": 1646222444, "timestamp": 1646222444,
"avg_rewards": 646519104 "avgRewards": 646519104
}, },
{ {
"avg_height": 725727, "avgHeight": 725727,
"timestamp": 1646308374, "timestamp": 1646308374,
"avg_rewards": 638709605 "avgRewards": 638709605
}, },
... ...
]` ]`
@ -3966,14 +3964,14 @@ export const restApiDocsData = [
curl: [`1d`], curl: [`1d`],
response: `[ response: `[
{ {
"avg_height": 12, "avgHeight": 12,
"timestamp": 1296689648, "timestamp": 1296689648,
"avg_rewards": 5000000000 "avgRewards": 5000000000
}, },
{ {
"avg_height": 269, "avgHeight": 269,
"timestamp": 1296717674, "timestamp": 1296717674,
"avg_rewards": 5000091820 "avgRewards": 5000091820
}, },
... ...
]` ]`
@ -3984,14 +3982,14 @@ export const restApiDocsData = [
curl: [`1d`], curl: [`1d`],
response: `[ response: `[
{ {
"avg_height": 183, "avgHeight": 183,
"timestamp": 1598962247, "timestamp": 1598962247,
"avg_rewards": 5000000000 "avgRewards": 5000000000
}, },
{ {
"avg_height": 576, "avgHeight": 576,
"timestamp": 1599047892, "timestamp": 1599047892,
"avg_rewards": 5000000000 "avgRewards": 5000000000
}, },
... ...
]` ]`
@ -4025,111 +4023,103 @@ export const restApiDocsData = [
esModule: [], esModule: [],
commonJS: [], commonJS: [],
curl: [`1m`], curl: [`1m`],
response: `{ response: `[
"oldestIndexedBlockTimestamp": 1571434851,
"blockFeeRates": [
{ {
"avg_height": 732152, "avgHeight": 732152,
"timestamp": 1650132959, "timestamp": 1650132959,
"avg_fee_0": 1, "avgFee_0": 1,
"avg_fee_10": 2, "avgFee_10": 2,
"avg_fee_25": 2, "avgFee_25": 2,
"avg_fee_50": 3, "avgFee_50": 3,
"avg_fee_75": 4, "avgFee_75": 4,
"avg_fee_90": 8, "avgFee_90": 8,
"avg_fee_100": 393 "avgFee_100": 393
}, },
{ {
"avg_height": 732158, "avgHeight": 732158,
"timestamp": 1650134432, "timestamp": 1650134432,
"avg_fee_0": 1, "avgFee_0": 1,
"avg_fee_10": 1, "avgFee_10": 1,
"avg_fee_25": 2, "avgFee_25": 2,
"avg_fee_50": 4, "avgFee_50": 4,
"avg_fee_75": 6, "avgFee_75": 6,
"avg_fee_90": 10, "avgFee_90": 10,
"avg_fee_100": 240 "avgFee_100": 240
}, },
{ {
"avg_height": 732161, "avgHeight": 732161,
"timestamp": 1650135818, "timestamp": 1650135818,
"avg_fee_0": 1, "avgFee_0": 1,
"avg_fee_10": 1, "avgFee_10": 1,
"avg_fee_25": 1, "avgFee_25": 1,
"avg_fee_50": 2, "avgFee_50": 2,
"avg_fee_75": 5, "avgFee_75": 5,
"avg_fee_90": 8, "avgFee_90": 8,
"avg_fee_100": 251 "avgFee_100": 251
}, },
... ...
] ]`
}`
}, },
codeSampleTestnet: { codeSampleTestnet: {
esModule: [], esModule: [],
commonJS: [], commonJS: [],
curl: [`1m`], curl: [`1m`],
response: `{ response: `[
"oldestIndexedBlockTimestamp": 1296688602,
"blockFeeRates": [
{ {
"avg_height": 2196306, "avgHeight": 2196306,
"timestamp": 1650360168, "timestamp": 1650360168,
"avg_fee_0": 1, "avgFee_0": 1,
"avg_fee_10": 1, "avgFee_10": 1,
"avg_fee_25": 1, "avgFee_25": 1,
"avg_fee_50": 1, "avgFee_50": 1,
"avg_fee_75": 2, "avgFee_75": 2,
"avg_fee_90": 28, "avgFee_90": 28,
"avg_fee_100": 2644 "avgFee_100": 2644
}, },
{ {
"avg_height": 2196308, "avgHeight": 2196308,
"timestamp": 1650361209, "timestamp": 1650361209,
"avg_fee_0": 1, "avgFee_0": 1,
"avg_fee_10": 1, "avgFee_10": 1,
"avg_fee_25": 1, "avgFee_25": 1,
"avg_fee_50": 4, "avgFee_50": 4,
"avg_fee_75": 12, "avgFee_75": 12,
"avg_fee_90": 65, "avgFee_90": 65,
"avg_fee_100": 102 "avgFee_100": 102
}, },
... ...
] ]`
}`
}, },
codeSampleSignet: { codeSampleSignet: {
esModule: [], esModule: [],
commonJS: [], commonJS: [],
curl: [`1m`], curl: [`1m`],
response: `{ response: `{
"oldestIndexedBlockTimestamp": 1598918400,
"blockFeeRates": [ "blockFeeRates": [
{ {
"avg_height": 86620, "avgHeight": 86620,
"timestamp": 1650360010, "timestamp": 1650360010,
"avg_fee_0": 1, "avgFee_0": 1,
"avg_fee_10": 1, "avgFee_10": 1,
"avg_fee_25": 1, "avgFee_25": 1,
"avg_fee_50": 1, "avgFee_50": 1,
"avg_fee_75": 1, "avgFee_75": 1,
"avg_fee_90": 1, "avgFee_90": 1,
"avg_fee_100": 1 "avgFee_100": 1
}, },
{ {
"avg_height": 86623, "avgHeight": 86623,
"timestamp": 1650361330, "timestamp": 1650361330,
"avg_fee_0": 1, "avgFee_0": 1,
"avg_fee_10": 1, "avgFee_10": 1,
"avg_fee_25": 1, "avgFee_25": 1,
"avg_fee_50": 1, "avgFee_50": 1,
"avg_fee_75": 1, "avgFee_75": 1,
"avg_fee_90": 1, "avgFee_90": 1,
"avg_fee_100": 1 "avgFee_100": 1
}, },
... ...
] ]`
}`
}, },
codeSampleLiquid: emptyCodeSample, codeSampleLiquid: emptyCodeSample,
codeSampleLiquidTestnet: emptyCodeSample, codeSampleLiquidTestnet: emptyCodeSample,
@ -4163,47 +4153,47 @@ export const restApiDocsData = [
response: `{ response: `{
"sizes": [ "sizes": [
{ {
"avg_height": 576650, "avgHeight": 576650,
"timestamp": 1558212081, "timestamp": 1558212081,
"avg_size": 1271404 "avgSize": 1271404
}, },
{ {
"avg_height": 576715, "avgHeight": 576715,
"timestamp": 1558246272, "timestamp": 1558246272,
"avg_size": 1105893 "avgSize": 1105893
}, },
{ {
"avg_height": 576797, "avgHeight": 576797,
"timestamp": 1558289379, "timestamp": 1558289379,
"avg_size": 1141071 "avgSize": 1141071
}, },
{ {
"avg_height": 576885, "avgHeight": 576885,
"timestamp": 1558330184, "timestamp": 1558330184,
"avg_size": 1108166 "avgSize": 1108166
}, },
... ...
], ],
"weights": [ "weights": [
{ {
"avg_height": 576650, "avgHeight": 576650,
"timestamp": 1558212081, "timestamp": 1558212081,
"avg_weight": 3994002 "avgWeight": 3994002
}, },
{ {
"avg_height": 576715, "avgHeight": 576715,
"timestamp": 1558246272, "timestamp": 1558246272,
"avg_weight": 3756312 "avgWeight": 3756312
}, },
{ {
"avg_height": 576797, "avgHeight": 576797,
"timestamp": 1558289379, "timestamp": 1558289379,
"avg_weight": 3719625 "avgWeight": 3719625
}, },
{ {
"avg_height": 576885, "avgHeight": 576885,
"timestamp": 1558330184, "timestamp": 1558330184,
"avg_weight": 3631381 "avgWeight": 3631381
}, },
... ...
] ]
@ -4216,27 +4206,27 @@ export const restApiDocsData = [
response: `{ response: `{
"sizes": [ "sizes": [
{ {
"avg_height": 1517188, "avgHeight": 1517188,
"timestamp": 1558262730, "timestamp": 1558262730,
"avg_size": 25089 "avgSize": 25089
}, },
{ {
"avg_height": 1517275, "avgHeight": 1517275,
"timestamp": 1558290933, "timestamp": 1558290933,
"avg_size": 21679 "avgSize": 21679
}, },
... ...
], ],
"weights": [ "weights": [
{ {
"avg_height": 1517188, "avgHeight": 1517188,
"timestamp": 1558262730, "timestamp": 1558262730,
"avg_weight": 74921 "avgWeight": 74921
}, },
{ {
"avg_height": 1517275, "avgHeight": 1517275,
"timestamp": 1558290933, "timestamp": 1558290933,
"avg_weight": 65164 "avgWeight": 65164
}, },
... ...
] ]
@ -4249,27 +4239,27 @@ export const restApiDocsData = [
response: `{ response: `{
"sizes": [ "sizes": [
{ {
"avg_height": 83, "avgHeight": 83,
"timestamp": 1598937527, "timestamp": 1598937527,
"avg_size": 329 "avgSize": 329
}, },
{ {
"avg_height": 266, "avgHeight": 266,
"timestamp": 1598982991, "timestamp": 1598982991,
"avg_size": 330 "avgSize": 330
}, },
... ...
], ],
"weights": [ "weights": [
{ {
"avg_height": 83, "avgHeight": 83,
"timestamp": 1598937527, "timestamp": 1598937527,
"avg_weight": 1209 "avgWeight": 1209
}, },
{ {
"avg_height": 266, "avgHeight": 266,
"timestamp": 1598982991, "timestamp": 1598982991,
"avg_weight": 1212 "avgWeight": 1212
}, },
... ...
] ]

View File

@ -1,14 +1,14 @@
<div class="code"> <div class="code">
<ul ngbNav #navCodeTemplate="ngbNav" class="nav-tabs code-tab"> <ul ngbNav #navCodeTemplate="ngbNav" class="nav-tabs code-tab" role="tablist">
<li ngbNavItem *ngIf="code.codeTemplate.curl && method !== 'websocket'"> <li ngbNavItem *ngIf="code.codeTemplate.curl && method !== 'websocket'" role="presentation">
<a ngbNavLink (click)="adjustContainerHeight( $event )">cURL</a> <a ngbNavLink (click)="adjustContainerHeight( $event )" role="tab">cURL</a>
<ng-template ngbNavContent> <ng-template ngbNavContent>
<div class="subtitle"><ng-container i18n="API Docs code example">Code Example</ng-container> <app-clipboard [text]="wrapCurlTemplate(code)"></app-clipboard></div> <div class="subtitle"><ng-container i18n="API Docs code example">Code Example</ng-container> <app-clipboard [text]="wrapCurlTemplate(code)"></app-clipboard></div>
<pre><code [innerText]="wrapCurlTemplate(code)"></code></pre> <pre><code [innerText]="wrapCurlTemplate(code)"></code></pre>
</ng-template> </ng-template>
</li> </li>
<li ngbNavItem *ngIf="showCodeExample[network]"> <li ngbNavItem *ngIf="showCodeExample[network]" role="presentation">
<a ngbNavLink (click)="adjustContainerHeight( $event )" >CommonJS</a> <a ngbNavLink (click)="adjustContainerHeight( $event )" role="tab">CommonJS</a>
<ng-template ngbNavContent> <ng-template ngbNavContent>
<div class="subtitle"><ng-container i18n="API Docs code example">Code Example</ng-container> <app-clipboard [text]="wrapCommonJS(code)"></app-clipboard></div> <div class="subtitle"><ng-container i18n="API Docs code example">Code Example</ng-container> <app-clipboard [text]="wrapCommonJS(code)"></app-clipboard></div>
<div class="links"> <div class="links">
@ -17,8 +17,8 @@
<pre><code [innerText]="wrapCommonJS(code)"></code></pre> <pre><code [innerText]="wrapCommonJS(code)"></code></pre>
</ng-template> </ng-template>
</li> </li>
<li ngbNavItem *ngIf="showCodeExample[network]"> <li ngbNavItem *ngIf="showCodeExample[network]" role="presentation">
<a ngbNavLink (click)="adjustContainerHeight( $event )">ES Module</a> <a ngbNavLink (click)="adjustContainerHeight( $event )" role="tab">ES Module</a>
<ng-template ngbNavContent> <ng-template ngbNavContent>
<div class="subtitle"><ng-container i18n="API Docs install lib">Install Package</ng-container> <app-clipboard [text]="wrapImportTemplate()"></app-clipboard></div> <div class="subtitle"><ng-container i18n="API Docs install lib">Install Package</ng-container> <app-clipboard [text]="wrapImportTemplate()"></app-clipboard></div>
<div class="links"> <div class="links">

View File

@ -3,10 +3,10 @@
<h2 i18n="documentation.title">Documentation</h2> <h2 i18n="documentation.title">Documentation</h2>
<ul ngbNav #nav="ngbNav" [(activeId)]="activeTab" class="nav-tabs"> <ul ngbNav #nav="ngbNav" [(activeId)]="activeTab" class="nav-tabs" role="tablist">
<li [ngbNavItem]="0" *ngIf="showFaqTab"> <li [ngbNavItem]="0" *ngIf="showFaqTab" role="presentation">
<a ngbNavLink [routerLink]="['/docs/faq' | relativeUrl]">FAQ</a> <a ngbNavLink [routerLink]="['/docs/faq' | relativeUrl]" role="tab">FAQ</a>
<ng-template ngbNavContent> <ng-template ngbNavContent>
<app-api-docs [whichTab]="'faq'"></app-api-docs> <app-api-docs [whichTab]="'faq'"></app-api-docs>
@ -14,8 +14,8 @@
</ng-template> </ng-template>
</li> </li>
<li [ngbNavItem]="1"> <li [ngbNavItem]="1" role="presentation">
<a ngbNavLink [routerLink]="['/docs/api/rest' | relativeUrl]">API - REST</a> <a ngbNavLink [routerLink]="['/docs/api/rest' | relativeUrl]" role="tab">API - REST</a>
<ng-template ngbNavContent> <ng-template ngbNavContent>
<app-api-docs [whichTab]="'rest'"></app-api-docs> <app-api-docs [whichTab]="'rest'"></app-api-docs>
@ -23,8 +23,8 @@
</ng-template> </ng-template>
</li> </li>
<li [ngbNavItem]="2" *ngIf="showWebSocketTab"> <li [ngbNavItem]="2" *ngIf="showWebSocketTab" role="presentation">
<a ngbNavLink [routerLink]="['/docs/api/websocket' | relativeUrl]">API - WebSocket</a> <a ngbNavLink [routerLink]="['/docs/api/websocket' | relativeUrl]" role="tab">API - WebSocket</a>
<ng-template ngbNavContent> <ng-template ngbNavContent>
<app-api-docs [whichTab]="'websocket'"></app-api-docs> <app-api-docs [whichTab]="'websocket'"></app-api-docs>

View File

@ -76,7 +76,6 @@ export interface SinglePoolStats {
export interface PoolsStats { export interface PoolsStats {
blockCount: number; blockCount: number;
lastEstimatedHashrate: number; lastEstimatedHashrate: number;
oldestIndexedBlockTimestamp: number;
pools: SinglePoolStats[]; pools: SinglePoolStats[];
} }

View File

@ -149,7 +149,7 @@ export class ApiService {
getBlocks$(from: number): Observable<BlockExtended[]> { getBlocks$(from: number): Observable<BlockExtended[]> {
return this.httpClient.get<BlockExtended[]>( return this.httpClient.get<BlockExtended[]>(
this.apiBaseUrl + this.apiBasePath + `/api/v1/blocks-extras` + this.apiBaseUrl + this.apiBasePath + `/api/v1/blocks` +
(from !== undefined ? `/${from}` : ``) (from !== undefined ? `/${from}` : ``)
); );
} }
@ -189,7 +189,7 @@ export class ApiService {
getHistoricalBlockFeeRates$(interval: string | undefined) : Observable<any> { getHistoricalBlockFeeRates$(interval: string | undefined) : Observable<any> {
return this.httpClient.get<any[]>( return this.httpClient.get<any[]>(
this.apiBaseUrl + this.apiBasePath + `/api/v1/mining/blocks/fee-rates` + this.apiBaseUrl + this.apiBasePath + `/api/v1/mining/blocks/fee-rates` +
(interval !== undefined ? `/${interval}` : '') (interval !== undefined ? `/${interval}` : ''), { observe: 'response' }
); );
} }

View File

@ -1,7 +1,6 @@
import { NgModule } from '@angular/core'; import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common'; import { CommonModule } from '@angular/common';
import { NgbModule } from '@ng-bootstrap/ng-bootstrap'; import { NgbCollapse, NgbCollapseModule, NgbRadioGroup, NgbTypeaheadModule } from '@ng-bootstrap/ng-bootstrap';
import { NgbTypeaheadModule } from '@ng-bootstrap/ng-bootstrap';
import { FontAwesomeModule, FaIconLibrary } from '@fortawesome/angular-fontawesome'; import { FontAwesomeModule, FaIconLibrary } from '@fortawesome/angular-fontawesome';
import { faFilter, faAngleDown, faAngleUp, faAngleRight, faAngleLeft, faBolt, faChartArea, faCogs, faCubes, faHammer, faDatabase, faExchangeAlt, faInfoCircle, import { faFilter, faAngleDown, faAngleUp, faAngleRight, faAngleLeft, faBolt, faChartArea, faCogs, faCubes, faHammer, faDatabase, faExchangeAlt, faInfoCircle,
faLink, faList, faSearch, faCaretUp, faCaretDown, faTachometerAlt, faThList, faTint, faTv, faAngleDoubleDown, faSortUp, faAngleDoubleUp, faChevronDown, faLink, faList, faSearch, faCaretUp, faCaretDown, faTachometerAlt, faThList, faTint, faTv, faAngleDoubleDown, faSortUp, faAngleDoubleUp, faChevronDown,
@ -48,7 +47,6 @@ import { TransactionsListComponent } from '../components/transactions-list/trans
import { BlockComponent } from '../components/block/block.component'; import { BlockComponent } from '../components/block/block.component';
import { AddressComponent } from '../components/address/address.component'; import { AddressComponent } from '../components/address/address.component';
import { SearchFormComponent } from '../components/search-form/search-form.component'; import { SearchFormComponent } from '../components/search-form/search-form.component';
import { LatestBlocksComponent } from '../components/latest-blocks/latest-blocks.component';
import { AddressLabelsComponent } from '../components/address-labels/address-labels.component'; import { AddressLabelsComponent } from '../components/address-labels/address-labels.component';
import { FooterComponent } from '../components/footer/footer.component'; import { FooterComponent } from '../components/footer/footer.component';
import { TimeSpanComponent } from '../components/time-span/time-span.component'; import { TimeSpanComponent } from '../components/time-span/time-span.component';
@ -113,7 +111,6 @@ import { IndexingProgressComponent } from '../components/indexing-progress/index
BlockComponent, BlockComponent,
TransactionsListComponent, TransactionsListComponent,
AddressComponent, AddressComponent,
LatestBlocksComponent,
SearchFormComponent, SearchFormComponent,
TimeSpanComponent, TimeSpanComponent,
AddressLabelsComponent, AddressLabelsComponent,
@ -148,11 +145,10 @@ import { IndexingProgressComponent } from '../components/indexing-progress/index
NgbTooltipModule, NgbTooltipModule,
NgbButtonsModule, NgbButtonsModule,
NgbPaginationModule, NgbPaginationModule,
NgbDropdownModule,
NgbAccordionModule,
InfiniteScrollModule,
NgbTypeaheadModule, NgbTypeaheadModule,
NgbModule, NgbDropdownModule,
NgbCollapseModule,
InfiniteScrollModule,
FontAwesomeModule, FontAwesomeModule,
], ],
providers: [ providers: [
@ -164,17 +160,16 @@ import { IndexingProgressComponent } from '../components/indexing-progress/index
], ],
exports: [ exports: [
RouterModule, RouterModule,
InfiniteScrollModule,
NgbTypeaheadModule,
NgbModule,
FontAwesomeModule,
NgbAccordionModule,
NgbNavModule,
ReactiveFormsModule, ReactiveFormsModule,
NgbNavModule,
NgbTooltipModule, NgbTooltipModule,
NgbButtonsModule, NgbButtonsModule,
NgbPaginationModule, NgbPaginationModule,
NgbTypeaheadModule,
NgbDropdownModule, NgbDropdownModule,
NgbCollapseModule,
InfiniteScrollModule,
FontAwesomeModule,
TimeSinceComponent, TimeSinceComponent,
TimeUntilComponent, TimeUntilComponent,
ClipboardComponent, ClipboardComponent,
@ -208,7 +203,6 @@ import { IndexingProgressComponent } from '../components/indexing-progress/index
BlockComponent, BlockComponent,
TransactionsListComponent, TransactionsListComponent,
AddressComponent, AddressComponent,
LatestBlocksComponent,
SearchFormComponent, SearchFormComponent,
TimeSpanComponent, TimeSpanComponent,
AddressLabelsComponent, AddressLabelsComponent,

View File

@ -398,11 +398,7 @@
</context-group> </context-group>
<context-group purpose="location"> <context-group purpose="location">
<context context-type="sourcefile">src/app/components/blocks-list/blocks-list.component.html</context> <context context-type="sourcefile">src/app/components/blocks-list/blocks-list.component.html</context>
<context context-type="linenumber">13,15</context> <context context-type="linenumber">13,14</context>
</context-group>
<context-group purpose="location">
<context context-type="sourcefile">src/app/components/latest-blocks/latest-blocks.component.html</context>
<context context-type="linenumber">10,12</context>
</context-group> </context-group>
<context-group purpose="location"> <context-group purpose="location">
<context context-type="sourcefile">src/app/components/pool/pool.component.html</context> <context context-type="sourcefile">src/app/components/pool/pool.component.html</context>
@ -464,10 +460,6 @@
<context context-type="sourcefile">src/app/components/difficulty-adjustments-table/difficulty-adjustments-table.component.html</context> <context context-type="sourcefile">src/app/components/difficulty-adjustments-table/difficulty-adjustments-table.component.html</context>
<context context-type="linenumber">5,7</context> <context context-type="linenumber">5,7</context>
</context-group> </context-group>
<context-group purpose="location">
<context context-type="sourcefile">src/app/components/latest-blocks/latest-blocks.component.html</context>
<context context-type="linenumber">9,10</context>
</context-group>
<context-group purpose="location"> <context-group purpose="location">
<context context-type="sourcefile">src/app/components/pool/pool.component.html</context> <context context-type="sourcefile">src/app/components/pool/pool.component.html</context>
<context context-type="linenumber">212,214</context> <context context-type="linenumber">212,214</context>
@ -505,8 +497,8 @@
<context context-type="linenumber">34,36</context> <context context-type="linenumber">34,36</context>
</context-group> </context-group>
<context-group purpose="location"> <context-group purpose="location">
<context context-type="sourcefile">src/app/components/latest-blocks/latest-blocks.component.html</context> <context context-type="sourcefile">src/app/components/blocks-list/blocks-list.component.html</context>
<context context-type="linenumber">12,16</context> <context context-type="linenumber">18,19</context>
</context-group> </context-group>
<context-group purpose="location"> <context-group purpose="location">
<context context-type="sourcefile">src/app/components/mempool-block/mempool-block.component.html</context> <context context-type="sourcefile">src/app/components/mempool-block/mempool-block.component.html</context>
@ -528,14 +520,6 @@
<context context-type="sourcefile">src/app/components/blocks-list/blocks-list.component.html</context> <context context-type="sourcefile">src/app/components/blocks-list/blocks-list.component.html</context>
<context context-type="linenumber">4,9</context> <context context-type="linenumber">4,9</context>
</context-group> </context-group>
<context-group purpose="location">
<context context-type="sourcefile">src/app/components/latest-blocks/latest-blocks.component.html</context>
<context context-type="linenumber">2,7</context>
</context-group>
<context-group purpose="location">
<context context-type="sourcefile">src/app/components/latest-blocks/latest-blocks.component.ts</context>
<context context-type="linenumber">39</context>
</context-group>
<context-group purpose="location"> <context-group purpose="location">
<context context-type="sourcefile">src/app/components/liquid-master-page/liquid-master-page.component.html</context> <context context-type="sourcefile">src/app/components/liquid-master-page/liquid-master-page.component.html</context>
<context context-type="linenumber">35,37</context> <context context-type="linenumber">35,37</context>
@ -715,7 +699,7 @@
</context-group> </context-group>
<context-group purpose="location"> <context-group purpose="location">
<context context-type="sourcefile">src/app/components/about/about.component.html</context> <context context-type="sourcefile">src/app/components/about/about.component.html</context>
<context context-type="linenumber">357,361</context> <context context-type="linenumber">361,365</context>
</context-group> </context-group>
<context-group purpose="location"> <context-group purpose="location">
<context context-type="sourcefile">src/app/dashboard/dashboard.component.html</context> <context context-type="sourcefile">src/app/dashboard/dashboard.component.html</context>
@ -956,7 +940,7 @@
</context-group> </context-group>
<context-group purpose="location"> <context-group purpose="location">
<context context-type="sourcefile">src/app/components/transactions-list/transactions-list.component.html</context> <context context-type="sourcefile">src/app/components/transactions-list/transactions-list.component.html</context>
<context context-type="linenumber">245,247</context> <context context-type="linenumber">249,251</context>
</context-group> </context-group>
</trans-unit> </trans-unit>
<trans-unit id="8fe73a4787b8068b2ba61f54ab7e0f9af2ea1fc9" datatype="html"> <trans-unit id="8fe73a4787b8068b2ba61f54ab7e0f9af2ea1fc9" datatype="html">
@ -1008,7 +992,7 @@
</context-group> </context-group>
<context-group purpose="location"> <context-group purpose="location">
<context context-type="sourcefile">src/app/components/transactions-list/transactions-list.component.html</context> <context context-type="sourcefile">src/app/components/transactions-list/transactions-list.component.html</context>
<context context-type="linenumber">272,273</context> <context context-type="linenumber">277,278</context>
</context-group> </context-group>
<note priority="1" from="description">Transaction singular confirmation count</note> <note priority="1" from="description">Transaction singular confirmation count</note>
<note priority="1" from="meaning">shared.confirmation-count.singular</note> <note priority="1" from="meaning">shared.confirmation-count.singular</note>
@ -1036,7 +1020,7 @@
</context-group> </context-group>
<context-group purpose="location"> <context-group purpose="location">
<context context-type="sourcefile">src/app/components/transactions-list/transactions-list.component.html</context> <context context-type="sourcefile">src/app/components/transactions-list/transactions-list.component.html</context>
<context context-type="linenumber">273,274</context> <context context-type="linenumber">278,279</context>
</context-group> </context-group>
<note priority="1" from="description">Transaction plural confirmation count</note> <note priority="1" from="description">Transaction plural confirmation count</note>
<note priority="1" from="meaning">shared.confirmation-count.plural</note> <note priority="1" from="meaning">shared.confirmation-count.plural</note>
@ -1368,7 +1352,7 @@
<source>Community Alliances</source> <source>Community Alliances</source>
<context-group purpose="location"> <context-group purpose="location">
<context context-type="sourcefile">src/app/components/about/about.component.html</context> <context context-type="sourcefile">src/app/components/about/about.component.html</context>
<context context-type="linenumber">257,259</context> <context context-type="linenumber">261,263</context>
</context-group> </context-group>
<note priority="1" from="description">about.alliances</note> <note priority="1" from="description">about.alliances</note>
</trans-unit> </trans-unit>
@ -1376,7 +1360,7 @@
<source>Project Translators</source> <source>Project Translators</source>
<context-group purpose="location"> <context-group purpose="location">
<context context-type="sourcefile">src/app/components/about/about.component.html</context> <context context-type="sourcefile">src/app/components/about/about.component.html</context>
<context context-type="linenumber">273,275</context> <context context-type="linenumber">277,279</context>
</context-group> </context-group>
<note priority="1" from="description">about.translators</note> <note priority="1" from="description">about.translators</note>
</trans-unit> </trans-unit>
@ -1384,7 +1368,7 @@
<source>Project Contributors</source> <source>Project Contributors</source>
<context-group purpose="location"> <context-group purpose="location">
<context context-type="sourcefile">src/app/components/about/about.component.html</context> <context context-type="sourcefile">src/app/components/about/about.component.html</context>
<context context-type="linenumber">287,289</context> <context context-type="linenumber">291,293</context>
</context-group> </context-group>
<note priority="1" from="description">about.contributors</note> <note priority="1" from="description">about.contributors</note>
</trans-unit> </trans-unit>
@ -1392,7 +1376,7 @@
<source>Project Members</source> <source>Project Members</source>
<context-group purpose="location"> <context-group purpose="location">
<context context-type="sourcefile">src/app/components/about/about.component.html</context> <context context-type="sourcefile">src/app/components/about/about.component.html</context>
<context context-type="linenumber">299,301</context> <context context-type="linenumber">303,305</context>
</context-group> </context-group>
<note priority="1" from="description">about.project_members</note> <note priority="1" from="description">about.project_members</note>
</trans-unit> </trans-unit>
@ -1400,7 +1384,7 @@
<source>Project Maintainers</source> <source>Project Maintainers</source>
<context-group purpose="location"> <context-group purpose="location">
<context context-type="sourcefile">src/app/components/about/about.component.html</context> <context context-type="sourcefile">src/app/components/about/about.component.html</context>
<context context-type="linenumber">312,314</context> <context context-type="linenumber">316,318</context>
</context-group> </context-group>
<note priority="1" from="description">about.maintainers</note> <note priority="1" from="description">about.maintainers</note>
</trans-unit> </trans-unit>
@ -1490,7 +1474,7 @@
</context-group> </context-group>
<context-group purpose="location"> <context-group purpose="location">
<context context-type="sourcefile">src/app/components/transactions-list/transactions-list.component.html</context> <context context-type="sourcefile">src/app/components/transactions-list/transactions-list.component.html</context>
<context context-type="linenumber">280,282</context> <context context-type="linenumber">285,287</context>
</context-group> </context-group>
<context-group purpose="location"> <context-group purpose="location">
<context context-type="sourcefile">src/app/dashboard/dashboard.component.html</context> <context context-type="sourcefile">src/app/dashboard/dashboard.component.html</context>
@ -1920,7 +1904,7 @@
</context-group> </context-group>
<context-group purpose="location"> <context-group purpose="location">
<context context-type="sourcefile">src/app/components/blocks-list/blocks-list.component.html</context> <context context-type="sourcefile">src/app/components/blocks-list/blocks-list.component.html</context>
<context context-type="linenumber">15,17</context> <context context-type="linenumber">15,16</context>
</context-group> </context-group>
<context-group purpose="location"> <context-group purpose="location">
<context context-type="sourcefile">src/app/components/pool/pool.component.html</context> <context context-type="sourcefile">src/app/components/pool/pool.component.html</context>
@ -1963,11 +1947,7 @@
</context-group> </context-group>
<context-group purpose="location"> <context-group purpose="location">
<context context-type="sourcefile">src/app/components/blocks-list/blocks-list.component.html</context> <context context-type="sourcefile">src/app/components/blocks-list/blocks-list.component.html</context>
<context context-type="linenumber">18,20</context> <context context-type="linenumber">19,21</context>
</context-group>
<context-group purpose="location">
<context context-type="sourcefile">src/app/components/latest-blocks/latest-blocks.component.html</context>
<context context-type="linenumber">13,16</context>
</context-group> </context-group>
<context-group purpose="location"> <context-group purpose="location">
<context context-type="sourcefile">src/app/components/mempool-block/mempool-block.component.html</context> <context context-type="sourcefile">src/app/components/mempool-block/mempool-block.component.html</context>
@ -2109,7 +2089,7 @@
</context-group> </context-group>
<context-group purpose="location"> <context-group purpose="location">
<context context-type="sourcefile">src/app/components/transactions-list/transactions-list.component.html</context> <context context-type="sourcefile">src/app/components/transactions-list/transactions-list.component.html</context>
<context context-type="linenumber">265</context> <context context-type="linenumber">269</context>
</context-group> </context-group>
<context-group purpose="location"> <context-group purpose="location">
<context context-type="sourcefile">src/app/dashboard/dashboard.component.html</context> <context context-type="sourcefile">src/app/dashboard/dashboard.component.html</context>
@ -2257,19 +2237,23 @@
<note priority="1" from="description">Transaction Details</note> <note priority="1" from="description">Transaction Details</note>
<note priority="1" from="meaning">transaction.details</note> <note priority="1" from="meaning">transaction.details</note>
</trans-unit> </trans-unit>
<trans-unit id="56ad2f3895f350abdd3cee2d95498deb8819afac" datatype="html"> <trans-unit id="822972b5d47ee555d3be0c7ab9aae8090ecdf7bc" datatype="html">
<source>Error loading block data.</source> <source>Error loading data.</source>
<context-group purpose="location"> <context-group purpose="location">
<context context-type="sourcefile">src/app/components/block/block.component.html</context> <context context-type="sourcefile">src/app/components/block/block.component.html</context>
<context context-type="linenumber">274,280</context> <context context-type="linenumber">203,205</context>
</context-group> </context-group>
<note priority="1" from="description">block.error.loading-block-data</note> <context-group purpose="location">
<context context-type="sourcefile">src/app/components/block/block.component.html</context>
<context context-type="linenumber">285,290</context>
</context-group>
<note priority="1" from="description">error.general-loading-data</note>
</trans-unit> </trans-unit>
<trans-unit id="block.component.browser-title" datatype="html"> <trans-unit id="block.component.browser-title" datatype="html">
<source>Block <x id="BLOCK_HEIGHT" equiv-text="block.height"/>: <x id="BLOCK_ID" equiv-text="block.id"/></source> <source>Block <x id="BLOCK_HEIGHT" equiv-text="block.height"/>: <x id="BLOCK_ID" equiv-text="block.id"/></source>
<context-group purpose="location"> <context-group purpose="location">
<context context-type="sourcefile">src/app/components/block/block.component.ts</context> <context context-type="sourcefile">src/app/components/block/block.component.ts</context>
<context context-type="linenumber">146</context> <context context-type="linenumber">147</context>
</context-group> </context-group>
</trans-unit> </trans-unit>
<trans-unit id="e70fcca5a99575cffef3ff8cbd5e69f06ffd0f1c" datatype="html"> <trans-unit id="e70fcca5a99575cffef3ff8cbd5e69f06ffd0f1c" datatype="html">
@ -2294,10 +2278,6 @@
<context context-type="sourcefile">src/app/components/blocks-list/blocks-list.component.html</context> <context context-type="sourcefile">src/app/components/blocks-list/blocks-list.component.html</context>
<context context-type="linenumber">14,15</context> <context context-type="linenumber">14,15</context>
</context-group> </context-group>
<context-group purpose="location">
<context context-type="sourcefile">src/app/components/latest-blocks/latest-blocks.component.html</context>
<context context-type="linenumber">11,12</context>
</context-group>
<context-group purpose="location"> <context-group purpose="location">
<context context-type="sourcefile">src/app/components/pool/pool.component.html</context> <context context-type="sourcefile">src/app/components/pool/pool.component.html</context>
<context context-type="linenumber">214,215</context> <context context-type="linenumber">214,215</context>
@ -2316,7 +2296,7 @@
<source>TXs</source> <source>TXs</source>
<context-group purpose="location"> <context-group purpose="location">
<context context-type="sourcefile">src/app/components/blocks-list/blocks-list.component.html</context> <context context-type="sourcefile">src/app/components/blocks-list/blocks-list.component.html</context>
<context context-type="linenumber">18,19</context> <context context-type="linenumber">18</context>
</context-group> </context-group>
<context-group purpose="location"> <context-group purpose="location">
<context context-type="sourcefile">src/app/components/pool/pool.component.html</context> <context context-type="sourcefile">src/app/components/pool/pool.component.html</context>
@ -2890,11 +2870,11 @@
</context-group> </context-group>
<context-group purpose="location"> <context-group purpose="location">
<context context-type="sourcefile">src/app/components/transactions-list/transactions-list.component.html</context> <context context-type="sourcefile">src/app/components/transactions-list/transactions-list.component.html</context>
<context context-type="linenumber">144,147</context> <context context-type="linenumber">148,151</context>
</context-group> </context-group>
<context-group purpose="location"> <context-group purpose="location">
<context context-type="sourcefile">src/app/components/transactions-list/transactions-list.component.html</context> <context context-type="sourcefile">src/app/components/transactions-list/transactions-list.component.html</context>
<context context-type="linenumber">255,257</context> <context context-type="linenumber">259,261</context>
</context-group> </context-group>
<note priority="1" from="description">show-all</note> <note priority="1" from="description">show-all</note>
</trans-unit> </trans-unit>
@ -3445,7 +3425,7 @@
</context-group> </context-group>
<context-group purpose="location"> <context-group purpose="location">
<context context-type="sourcefile">src/app/components/transactions-list/transactions-list.component.html</context> <context context-type="sourcefile">src/app/components/transactions-list/transactions-list.component.html</context>
<context context-type="linenumber">276,279</context> <context context-type="linenumber">281,284</context>
</context-group> </context-group>
<note priority="1" from="description">Transaction unconfirmed state</note> <note priority="1" from="description">Transaction unconfirmed state</note>
<note priority="1" from="meaning">transaction.unconfirmed</note> <note priority="1" from="meaning">transaction.unconfirmed</note>
@ -3562,7 +3542,7 @@
</context-group> </context-group>
<context-group purpose="location"> <context-group purpose="location">
<context context-type="sourcefile">src/app/components/transactions-list/transactions-list.component.html</context> <context context-type="sourcefile">src/app/components/transactions-list/transactions-list.component.html</context>
<context context-type="linenumber">265,266</context> <context context-type="linenumber">269,270</context>
</context-group> </context-group>
<note priority="1" from="description">sat</note> <note priority="1" from="description">sat</note>
<note priority="1" from="meaning">shared.sat</note> <note priority="1" from="meaning">shared.sat</note>
@ -3604,7 +3584,7 @@
<source>ScriptSig (ASM)</source> <source>ScriptSig (ASM)</source>
<context-group purpose="location"> <context-group purpose="location">
<context context-type="sourcefile">src/app/components/transactions-list/transactions-list.component.html</context> <context context-type="sourcefile">src/app/components/transactions-list/transactions-list.component.html</context>
<context context-type="linenumber">100,102</context> <context context-type="linenumber">104,106</context>
</context-group> </context-group>
<note priority="1" from="description">ScriptSig (ASM)</note> <note priority="1" from="description">ScriptSig (ASM)</note>
<note priority="1" from="meaning">transactions-list.scriptsig.asm</note> <note priority="1" from="meaning">transactions-list.scriptsig.asm</note>
@ -3613,7 +3593,7 @@
<source>ScriptSig (HEX)</source> <source>ScriptSig (HEX)</source>
<context-group purpose="location"> <context-group purpose="location">
<context context-type="sourcefile">src/app/components/transactions-list/transactions-list.component.html</context> <context context-type="sourcefile">src/app/components/transactions-list/transactions-list.component.html</context>
<context context-type="linenumber">104,107</context> <context context-type="linenumber">108,111</context>
</context-group> </context-group>
<note priority="1" from="description">ScriptSig (HEX)</note> <note priority="1" from="description">ScriptSig (HEX)</note>
<note priority="1" from="meaning">transactions-list.scriptsig.hex</note> <note priority="1" from="meaning">transactions-list.scriptsig.hex</note>
@ -3622,7 +3602,7 @@
<source>Witness</source> <source>Witness</source>
<context-group purpose="location"> <context-group purpose="location">
<context context-type="sourcefile">src/app/components/transactions-list/transactions-list.component.html</context> <context context-type="sourcefile">src/app/components/transactions-list/transactions-list.component.html</context>
<context context-type="linenumber">109,111</context> <context context-type="linenumber">113,115</context>
</context-group> </context-group>
<note priority="1" from="description">transactions-list.witness</note> <note priority="1" from="description">transactions-list.witness</note>
</trans-unit> </trans-unit>
@ -3630,7 +3610,7 @@
<source>P2SH redeem script</source> <source>P2SH redeem script</source>
<context-group purpose="location"> <context-group purpose="location">
<context context-type="sourcefile">src/app/components/transactions-list/transactions-list.component.html</context> <context context-type="sourcefile">src/app/components/transactions-list/transactions-list.component.html</context>
<context context-type="linenumber">113,114</context> <context context-type="linenumber">117,118</context>
</context-group> </context-group>
<note priority="1" from="description">transactions-list.p2sh-redeem-script</note> <note priority="1" from="description">transactions-list.p2sh-redeem-script</note>
</trans-unit> </trans-unit>
@ -3638,7 +3618,7 @@
<source>P2TR tapscript</source> <source>P2TR tapscript</source>
<context-group purpose="location"> <context-group purpose="location">
<context context-type="sourcefile">src/app/components/transactions-list/transactions-list.component.html</context> <context context-type="sourcefile">src/app/components/transactions-list/transactions-list.component.html</context>
<context context-type="linenumber">117,119</context> <context context-type="linenumber">121,123</context>
</context-group> </context-group>
<note priority="1" from="description">transactions-list.p2tr-tapscript</note> <note priority="1" from="description">transactions-list.p2tr-tapscript</note>
</trans-unit> </trans-unit>
@ -3646,7 +3626,7 @@
<source>P2WSH witness script</source> <source>P2WSH witness script</source>
<context-group purpose="location"> <context-group purpose="location">
<context context-type="sourcefile">src/app/components/transactions-list/transactions-list.component.html</context> <context context-type="sourcefile">src/app/components/transactions-list/transactions-list.component.html</context>
<context context-type="linenumber">119,121</context> <context context-type="linenumber">123,125</context>
</context-group> </context-group>
<note priority="1" from="description">transactions-list.p2wsh-witness-script</note> <note priority="1" from="description">transactions-list.p2wsh-witness-script</note>
</trans-unit> </trans-unit>
@ -3654,7 +3634,7 @@
<source>nSequence</source> <source>nSequence</source>
<context-group purpose="location"> <context-group purpose="location">
<context context-type="sourcefile">src/app/components/transactions-list/transactions-list.component.html</context> <context context-type="sourcefile">src/app/components/transactions-list/transactions-list.component.html</context>
<context context-type="linenumber">124,126</context> <context context-type="linenumber">128,130</context>
</context-group> </context-group>
<note priority="1" from="description">transactions-list.nsequence</note> <note priority="1" from="description">transactions-list.nsequence</note>
</trans-unit> </trans-unit>
@ -3662,7 +3642,7 @@
<source>Previous output script</source> <source>Previous output script</source>
<context-group purpose="location"> <context-group purpose="location">
<context context-type="sourcefile">src/app/components/transactions-list/transactions-list.component.html</context> <context context-type="sourcefile">src/app/components/transactions-list/transactions-list.component.html</context>
<context context-type="linenumber">129,130</context> <context context-type="linenumber">133,134</context>
</context-group> </context-group>
<note priority="1" from="description">transactions-list.previous-output-script</note> <note priority="1" from="description">transactions-list.previous-output-script</note>
</trans-unit> </trans-unit>
@ -3670,7 +3650,7 @@
<source>Previous output type</source> <source>Previous output type</source>
<context-group purpose="location"> <context-group purpose="location">
<context context-type="sourcefile">src/app/components/transactions-list/transactions-list.component.html</context> <context context-type="sourcefile">src/app/components/transactions-list/transactions-list.component.html</context>
<context context-type="linenumber">133,134</context> <context context-type="linenumber">137,138</context>
</context-group> </context-group>
<note priority="1" from="description">transactions-list.previous-output-type</note> <note priority="1" from="description">transactions-list.previous-output-type</note>
</trans-unit> </trans-unit>
@ -3678,7 +3658,7 @@
<source>Peg-out to <x id="START_TAG_NG_CONTAINER" ctype="x-ng_container" equiv-text="&lt;ng-container *ngTemplateOutlet=&quot;pegOutLink&quot;&gt;"/><x id="CLOSE_TAG_NG_CONTAINER" ctype="x-ng_container" equiv-text="&lt;/ng-contain"/></source> <source>Peg-out to <x id="START_TAG_NG_CONTAINER" ctype="x-ng_container" equiv-text="&lt;ng-container *ngTemplateOutlet=&quot;pegOutLink&quot;&gt;"/><x id="CLOSE_TAG_NG_CONTAINER" ctype="x-ng_container" equiv-text="&lt;/ng-contain"/></source>
<context-group purpose="location"> <context-group purpose="location">
<context context-type="sourcefile">src/app/components/transactions-list/transactions-list.component.html</context> <context context-type="sourcefile">src/app/components/transactions-list/transactions-list.component.html</context>
<context context-type="linenumber">172,173</context> <context context-type="linenumber">176,177</context>
</context-group> </context-group>
<note priority="1" from="description">transactions-list.peg-out-to</note> <note priority="1" from="description">transactions-list.peg-out-to</note>
</trans-unit> </trans-unit>
@ -3686,7 +3666,7 @@
<source>ScriptPubKey (ASM)</source> <source>ScriptPubKey (ASM)</source>
<context-group purpose="location"> <context-group purpose="location">
<context context-type="sourcefile">src/app/components/transactions-list/transactions-list.component.html</context> <context context-type="sourcefile">src/app/components/transactions-list/transactions-list.component.html</context>
<context context-type="linenumber">233,235</context> <context context-type="linenumber">237,239</context>
</context-group> </context-group>
<note priority="1" from="description">ScriptPubKey (ASM)</note> <note priority="1" from="description">ScriptPubKey (ASM)</note>
<note priority="1" from="meaning">transactions-list.scriptpubkey.asm</note> <note priority="1" from="meaning">transactions-list.scriptpubkey.asm</note>
@ -3695,11 +3675,19 @@
<source>ScriptPubKey (HEX)</source> <source>ScriptPubKey (HEX)</source>
<context-group purpose="location"> <context-group purpose="location">
<context context-type="sourcefile">src/app/components/transactions-list/transactions-list.component.html</context> <context context-type="sourcefile">src/app/components/transactions-list/transactions-list.component.html</context>
<context context-type="linenumber">237,240</context> <context context-type="linenumber">241,244</context>
</context-group> </context-group>
<note priority="1" from="description">ScriptPubKey (HEX)</note> <note priority="1" from="description">ScriptPubKey (HEX)</note>
<note priority="1" from="meaning">transactions-list.scriptpubkey.hex</note> <note priority="1" from="meaning">transactions-list.scriptpubkey.hex</note>
</trans-unit> </trans-unit>
<trans-unit id="ed46038430735e21c9b6165380ec1892e2f87791" datatype="html">
<source>Show all inputs to reveal fee data</source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/components/transactions-list/transactions-list.component.html</context>
<context context-type="linenumber">271,274</context>
</context-group>
<note priority="1" from="description">transactions-list.load-to-reveal-fee-info</note>
</trans-unit>
<trans-unit id="f85c05147b720576e50336cf26f63d3b05601699" datatype="html"> <trans-unit id="f85c05147b720576e50336cf26f63d3b05601699" datatype="html">
<source>This transaction saved <x id="INTERPOLATION" equiv-text="{{ segwitGains.realizedGains * 100 | number: &apos;1.0-0&apos; }}"/>% on fees by using native SegWit-Bech32</source> <source>This transaction saved <x id="INTERPOLATION" equiv-text="{{ segwitGains.realizedGains * 100 | number: &apos;1.0-0&apos; }}"/>% on fees by using native SegWit-Bech32</source>
<context-group purpose="location"> <context-group purpose="location">

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="-0.015 -0.015 1.03 1.03" preserveAspectRatio="xMidYMid"><defs><filter id="b"><feGaussianBlur in="SourceAlpha" result="blur-out" stdDeviation=".5"/><feMerge><feMergeNode/><feMergeNode in="SourceGraphic"/></feMerge></filter><filter id="c"><feGaussianBlur in="SourceAlpha" result="blur-out" stdDeviation="1.3"/><feMerge><feMergeNode/><feMergeNode in="SourceGraphic"/></feMerge></filter><linearGradient id="a" x1="0%" y1="0%" x2="0%" y2="100%"><stop offset="0%" style="stop-color:#f9b949"/><stop offset="100%" style="stop-color:#f7931a"/></linearGradient></defs><path d="M63.036 39.741c-4.274 17.143-21.637 27.576-38.782 23.301C7.116 58.768-3.317 41.404.959 24.262 5.23 7.117 22.594-3.317 39.734.957c17.144 4.274 27.576 21.64 23.302 38.784z" style="fill:url(#a)" filter="url(#b)" transform="scale(.01563)"/><path d="M46.1 27.441c.638-4.258-2.604-6.547-7.037-8.074l1.438-5.768-3.511-.875-1.4 5.616c-.923-.23-1.871-.447-2.813-.662l1.41-5.653-3.51-.875-1.438 5.766c-.764-.174-1.514-.346-2.242-.527l.004-.018-4.842-1.209-.934 3.75s2.605.597 2.55.634c1.422.355 1.679 1.296 1.636 2.042l-1.638 6.571c.098.025.225.061.365.117l-.371-.092-2.296 9.205c-.174.432-.615 1.08-1.61.834.036.051-2.551-.637-2.551-.637l-1.743 4.019 4.569 1.139c.85.213 1.683.436 2.503.646l-1.453 5.834 3.507.875 1.439-5.772c.958.26 1.888.5 2.798.726l-1.434 5.745 3.51.875 1.454-5.823c5.987 1.133 10.489.676 12.384-4.739 1.527-4.36-.076-6.875-3.226-8.515 2.294-.529 4.022-2.038 4.483-5.155zM38.08 38.69c-1.085 4.36-8.426 2.003-10.806 1.412l1.928-7.729c2.38.594 10.012 1.77 8.878 6.317zm1.086-11.312c-.99 3.966-7.1 1.951-9.082 1.457l1.748-7.01c1.982.494 8.365 1.416 7.334 5.553z" style="fill:#fff" filter="url(#c)" transform="scale(.01563)"/></svg>

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

@ -4,6 +4,7 @@ slugs=(`curl -sSL https://raw.githubusercontent.com/mempool/mining-pools/master/
while true while true
do for url in / \ do for url in / \
'/api/v1/blocks' \
'/api/v1/statistics/2h' \ '/api/v1/statistics/2h' \
'/api/v1/statistics/24h' \ '/api/v1/statistics/24h' \
'/api/v1/statistics/1w' \ '/api/v1/statistics/1w' \
@ -36,7 +37,6 @@ do for url in / \
'/api/v1/mining/hashrate/pools/3y' \ '/api/v1/mining/hashrate/pools/3y' \
'/api/v1/mining/hashrate/pools/all' \ '/api/v1/mining/hashrate/pools/all' \
'/api/v1/mining/reward-stats/144' \ '/api/v1/mining/reward-stats/144' \
'/api/v1/mining/blocks-extras' \
'/api/v1/mining/blocks/fees/24h' \ '/api/v1/mining/blocks/fees/24h' \
'/api/v1/mining/blocks/fees/3d' \ '/api/v1/mining/blocks/fees/3d' \
'/api/v1/mining/blocks/fees/1w' \ '/api/v1/mining/blocks/fees/1w' \