// Copyright 2017-2018 DERO Project. All rights reserved.
// Use of this source code in any form is governed by RESEARCH license.
// license can be found in the LICENSE file.
// GPG: 0F39 E425 8C65 3947 702A 8234 08B2 0360 A03A 9DE8
//
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
// THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
package main
// this files defines all the templates
var header_template string = `
{{define "header"}}
{{ .title }}
{{if .Network_Difficulty}}
Server time: {{ .servertime }} | Transaction pool
Network difficulty: {{ .Network_Difficulty }}
| Hash rate: {{ .hash_rate }} MH/s
| Mempool size : {{ .txpool_size }}
{{end}}
{{end}}
`
var block_template string = `{{define "block"}}
{{ template "header" . }}
Block hash (height): {{.block.Hash}} ({{.block.Height}})
Timestamp [UCT] (epoch): | {{.block.Block_time}} ({{.block.Epoch}}) |
Age [h:m:s]: | {{.block.Age}} |
Δ [h:m:s]: | |
Major.minor version: | {{.block.Major_Version}}.{{.block.Minor_Version}} |
Block reward: | {{.block.Reward}} |
Block size [kB]: | {{.block.Size}} |
nonce: | {{.block.Nonce}} |
Total fees: | {{.block.Fees}} |
No of txs: | {{.block.Tx_Count}} |
Miner reward transaction
hash |
outputs |
size [kB] |
version |
{{.block.Mtx.Hash}}
| {{.block.Mtx.Amount}} |
{{.block.Mtx.Size}} |
{{.block.Mtx.Version}} |
Transactions ({{.block.Tx_Count}})
hash |
outputs |
fee |
ring size |
in/out |
version |
size [kB] |
{{range .block.Txs}}
{{.Hash}} |
? |
{{.Fee}} |
{{.Ring_size}} |
{{.In}}/{{.Out}} |
{{.Version}} |
{{.Size}} |
{{end}}
{{ template "footer" . }}
{{end}}
`
var tx_template string = `{{define "tx"}}
{{ template "header" . }}
Tx hash: {{.info.Hash}}
Tx prefix hash: {{.info.PrefixHash}}
Tx public key: TODO
Timestamp: {{.info.Timestamp}} |
Timestamp [UCT]: {{.info.Block_time}} |
Age [y:d:h:m:s]: {{.info.Age}} |
Block: {{.info.Height}} |
Fee: {{.info.Fee}} |
Tx size: {{.info.Size}} kB |
Tx version: {{.info.Version}} |
No of confirmations: {{.info.Depth}} |
Signature type: {{.info.Type}} |
Extra: {{.info.Extra}} |
{{.info.Out}} output(s) for total of {{.info.Amount}} dero
stealth address |
amount |
amount idx |
{{range $i, $e := .info.OutAddress}}
{{ $e }} |
{{$.info.Amount}} |
{{index $.info.OutOffset $i}} |
{{end}}
{{if eq .info.CoinBase false}}
{{.info.In}} input(s) for total of ? dero
{{range .info.Keyimages}}
key image {{ . }}
|
amount: ? |
{{end}}
{{end}}
{{ template "footer" . }}
{{end}}`
var txpool_template string = `{{define "txpool"}}
Transaction pool
(no of txs: {{ .txpool_size }}, size: 0.00 kB, updated every 5 seconds)
age [h:m:s] |
transaction hash |
fee |
outputs |
in(nonrct)/out |
ring size |
tx size [kB] |
{{range .mempool}}
|
{{.Hash}} |
{{.Fee}} |
N/A |
{{.In}}/{{.Out}} |
{{.Ring_size}} |
{{.Size}} |
{{end}}
{{end}}`
// full page txpool_template
var txpool_page_template string = `{{define "txpool_page"}}
{{ template "header" . }}
{{ template "txpool" . }}
{{ template "footer" . }}
{{end}}`
var main_template string = `
{{define "main"}}
{{ template "header" . }}
{{ template "txpool" . }}
Transactions in the last 11 blocks
(Median size of these blocks: 0.09 kB)
height |
age [h:m:s] |
size [kB] |
tx hash |
fees |
outputs |
in(nonrct)/out |
ring size |
tx size [kB] |
{{range .block_array}}
{{.Height}} |
{{.Age}} |
{{.Size}} |
{{.Mtx.Hash}} |
N/A |
{{.Mtx.Amount}} |
{{.Mtx.In}}/{{.Mtx.Out}} |
0 |
{{.Mtx.Size}} |
{{range .Txs}}
|
|
|
{{.Hash}} |
{{.Fee}} |
N/A |
{{.In}}/{{.Out}} |
{{.Ring_size}} |
{{.Size}} |
{{end}}
{{end}}
{{ template "paging" . }}
{{ template "footer" . }}
{{end}}`
var paging_template string = `{{ define "paging"}}
{{end}}`
var footer_template string = ` {{define "footer"}}
DERO explorer source code
| explorer version (api): under development (1.0)
| dero version: golang pre-alpha
| Copyright 2017-2018 Dero Project
{{end}}
`