forked from ordinals/ord
-
Notifications
You must be signed in to change notification settings - Fork 0
/
output.html
36 lines (36 loc) Β· 1.11 KB
/
output.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<h1>Output <span class=monospace>{{self.outpoint}}</span></h1>
<dl>
%% if !self.inscriptions.is_empty() {
<dt>inscriptions</dt>
<dd class=thumbnails>
%% for inscription in &self.inscriptions {
{{Iframe::thumbnail(*inscription)}}
%% }
</dd>
%% }
<dt>value</dt><dd>{{ self.output.value }}</dd>
<dt>script pubkey</dt><dd class=monospace>{{ self.output.script_pubkey.asm() }}</dd>
%% if let Ok(address) = self.chain.address_from_script(&self.output.script_pubkey ) {
<dt>address</dt><dd class=monospace>{{ address }}</dd>
%% }
<dt>transaction</dt><dd><a class=monospace href=/tx/{{ self.outpoint.txid }}>{{ self.outpoint.txid }}</a></dd>
</dl>
%% if let Some(list) = &self.list {
%% match list {
%% List::Unspent(ranges) => {
<h2>{{"Sat Range".tally(ranges.len())}}</h2>
<ul class=monospace>
%% for (start, end) in ranges {
%% if end - start == 1 {
<li><a href=/sat/{{start}} class={{Sat(*start).rarity()}}>{{start}}</a></li>
%% } else {
<li><a href=/range/{{start}}/{{end}} class={{Sat(*start).rarity()}}>{{start}}β{{end}}</a></li>
%% }
%% }
</ul>
%% }
%% List::Spent => {
<p>Output has been spent.</p>
%% }
%% }
%% }