/
tx.html
357 lines (344 loc) · 15.9 KB
/
tx.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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
<template name="tx">
{{#if notFound}}
<h3 class="ui pageHeader header">
<i class="tiny plus icon"></i>
<div class="content wordBreak">
Transaction {{tx.parameter}}
</div>
</h3>
<div class="ui negative message">
<i class="close icon"></i>
Transaction <span class="hack">{{id}}</span> not found
</div>
{{/if}}
{{#with tx}}
{{#if error}}
<h3 class="ui pageHeader header">
<i class="tiny plus icon"></i>
<div class="content wordBreak">
Transaction {{tx.parameter}}
</div>
</h3>
<div class="ui negative message">
<i class="close icon"></i>
<div class="header">
Error reading transaction
</div>
<p>{{tx.error}}</p>
</div>
{{else}}
<h3 class="ui pageHeader header">
<i class="tiny plus icon"></i>
<div class="content wordBreak">
Transaction {{tx.tx.transaction_hash}}
</div>
</h3>
<div id="txnPageSegment" class="ui segment pageSegment">
<div class="description">
<div class="ui celled horizontal list">
<div class="item"><strong>Confirmations</strong> {{#if isConfirmed}} {{confirmations}} confirmations {{else}}Unconfirmed{{/if}}</div>
<div class="item"><strong>Block</strong> <a href="/block/{{tx.header.block_number}}">{{tx.header.block_number}}</a></div>
<div class="item"><strong>Nonce</strong> {{tx.tx.nonce}}</div>
<div class="item"><strong>OTS key</strong> {{ots_key}}</div>
<div class="item"><strong>Fee</strong> {{tx.tx.fee}} Quanta</div>
<div class="item"><strong>Size</strong> {{txSize}}</div>
<div class="item"><strong>Status</strong> {{#if isConfirmed}} OK <i class="ui green circle icon"></i> {{ts}} {{else}} Unconfirmed <!-- - First Seen: {{ts}} --><i class="ui yellow circle icon"></i>{{/if}}</div>
</div>
<div class="ui hidden divider"></div>
</div>
<div class="ui bottom attached tab segment active">
<div class="ui stackable grid">
<div class="sixteen wide column">
<div class="ui basic center aligned segment">
<div class="ui statistic">
<div class="label">
<div class="ui {{color}} label">{{explorer.type}}{{#if isTokenTransfer}}{{#if isTransferNFT}}{{else}}: {{explorer.symbol}} {{/if}}{{/if}}</div>
</div>
{{#if isNotMultiSig}}
{{#if isNotMessage}}
{{#if isNotLattice}}
{{#if isToken}}
<strong>{{explorer.name}} ({{explorer.symbol}})</strong><br />
owned by:<br />
<a href="/a/{{# if bech32}}{{explorer.owner_b32}}{{else}}{{explorer.owner_hex}}{{/if}}">{{# if bech32}}{{explorer.owner_b32}}{{else}}{{explorer.owner_hex}}{{/if}}</a>
{{else}}
{{#if isTokenTransfer}}
{{#if isTransferNFT}}
{{#if knownProvider}}
<p>
<i class="ui certificate icon"></i>Verified provider:
<a href="{{providerURL}}/{{tx.tx.transaction_hash}}">{{providerName}}</a> ({{providerID}})
</p>
{{else}}
<p>
<i class="ui warning icon"></i>Unverified provider:
{{providerID}}
</p>
{{/if}}
<div class="value">{{explorer.totalTransferred}}</div>
NFT transferred<br /><br />
<div class="label">NFT creation transaction: </div>
<a href="/tx/{{explorer.token_txhash}}" class="unbreakable">{{explorer.token_txhash}}</a>
{{else}}
<div class="value">{{explorer.totalTransferred}}</div>
{{explorer.symbol}} ({{explorer.name}})<br />
tokens transferred
<div class="label">Token creation transaction: </div>
<a href="/tx/{{explorer.token_txhash}}" class="unbreakable">{{explorer.token_txhash}}</a>
{{/if}}
{{else}}
{{#if isCreateNFT}}
<!-- NFT -->
{{else}}
<div class="value" data-html="<div class='content'>USD ${{qrl}}</div>">
{{tx.tx.amount}}
</div>
<div class="label">
Quanta<br><small>USD ${{qrl}}</small>
</div>
{{/if}}
{{/if}}
{{/if}}
{{/if}}
{{/if}}
{{else}}
{{#if isMultiSigSpend }}
<div class="ui large horizontal list wordBreak f-h"><div class="item"><a href="/a/{{multiSigSpendAddress}}">{{multiSigSpendAddress}}</a></div></div>
{{else}}
{{#if isMultiSigVote }}
<!-- nil -->
{{else}}
<div class="ui large horizontal list wordBreak f-h"><div class="item"><a href="/a/{{multiSigAddress}}">{{multiSigAddress}}</a></div></div>
{{/if}}
{{/if}}
{{/if}}
</div>
</div>
</div>
</div>
{{#if isToken}}
<h4>Initial balances</h4>
<table class="ui stackable table">
<thead>
<th>Address</th>
<th>Balance</th>
</thead>
<tbody>
{{#each explorer.initialBalances}}
<tr>
<td><a href="/a/{{# if bech32}}{{this.address_b32}}{{else}}{{this.address_hex}}{{/if}}">{{# if bech32}}{{this.address_b32}}{{else}}{{this.address_hex}}{{/if}}</a></td>
<td>{{this.amount}}</td>
</tr>
{{/each}}
</tbody>
</table>
{{else}}
{{#if isNotCoinbase}}
<table class="ui stackable table">
<tbody>
<tr>
<td class="single line">
<div class="ui red label"><i class="sign out icon"></i>
{{#if isMultiSigSpend }}initiated by{{else}}from{{/if}}
</div>
</td>
<td><a href="/a/{{# if bech32}}{{explorer.from_b32}}{{else}}{{explorer.from_hex}}{{/if}}">{{# if bech32 }}{{explorer.from_b32}}{{else}}{{explorer.from_hex}}{{/if}}</a></td>
</tr>
</tbody>
</table>
{{/if}}
{{#if isMessage}}
<h3>Message</h3>
<p><pre>{{explorer.message}}</pre></p>
{{else}}
{{#if isDocumentNotarisation}}
<h3>Document Notarisation</h3>
<span>Notary <a class="ui">{{# if bech32}}{{explorer.from_b32}}{{else}}{{explorer.from_hex}}{{/if}}</a></span>
<br />
<span>Hash Function <a class="ui">{{explorer.hash_function}}</a></span>
<br />
<span>File Hash <a class="ui">{{explorer.hash}}</a></span>
<br />
<span>Additional Text <a class="ui">{{explorer.text}}</a></span>
<br /><br />
<h3>Verify Notarisation</h3>
<form id="notariseVerificationForm" class="ui form">
<div class="field">
<label>Select Document</label>
<input type="file" id="notaryDocument" accept="text/json" name="notaryDocument[]" />
</div>
<div class="field">
<button id="verifyNotarisation" class="ui huge primary button red" style="float: left;">Verify Notarisation</button>
<br />
</div>
</form>
<br /><br />
<div id="documentVerified" class="ui green segment pageSegment" style="display: none;">
<h4>Document Verified</h4>
<p style="word-wrap: break-word; word-break: break-all;">
{{documentNotarisationVerificationMessage}}
</p>
</div>
<div id="documentVerifcationFailed" class="ui red segment pageSegment" style="display: none;">
<h4>Document Verification Failed</h4>
<p style="word-wrap: break-word; word-break: break-all;">Error: {{documentNotarisationError}}</p>
</div>
<br /><br />
{{else}}
{{#if isKeybase}}
<h4>Keybase Message Transaction</h4>
<table class="ui stackable table">
<thead>
<th>Action</th>
<th>Keybase User ID</th>
<th>Keybase Hash</th>
</thead>
<tbody>
<tr>
<td>{{this.explorer.keybaseType}}</td>
<td>{{this.explorer.keybaseUser}}</td>
<td>{{this.explorer.keybaseHex}}</td>
</tr>
</tbody>
</table>
{{else}}
{{#if isMultiSigCreate}}
<h4>Signatories</h4>
<table class="ui table">
<thead><th>Address</th><th>Weight</th></thead>
<tbody>
{{#each multiSigSignatories this.tx.multi_sig_create}}
<tr>
<td>
<!-- {{# if bech32}}{{ this.address_b32 }}{{else}} -->
{{ this.address_hex}}
<!-- {{/if}} -->
</td>
<td>{{ this.weight }}</td>
</tr>
{{/each}}
</tbody>
<tfoot>
<th>Threshold for spend</th>
<th>{{ this.tx.multi_sig_create.threshold }}</th>
</tfoot>
</table>
{{else}}
{{#if isMultiSigVote}}
<table class="ui table">
<tr>
<td><strong>Spend transaction</strong></td>
<td style="font-family: Hack;"><a href="/tx/{{ this.tx.multi_sig_vote.shared_key }}">{{ this.tx.multi_sig_vote.shared_key }}</a></td>
</tr>
<tr>
<td><strong>Vote status</strong></td>
<td>{{ #if this.tx.multi_sig_vote.unvote }}Vote REJECT spend{{else}}Vote APPROVE spend{{/if}}</td>
</tr>
</table>
{{else}}
{{#if isLattice}}
<table class="ui stackable celled table">
<tr>
<td style="text-align: right;" width="30%"><strong>PK1</strong></td><td>{{bf this.tx.latticePK.pk1}}</td>
</tr>
<tr>
<td style="text-align: right;" width="30%"><strong>PK2</strong></td><td>{{bf this.tx.latticePK.pk2}}</td>
</tr>
<tr>
<td style="text-align: right;" width="30%"><strong>PK3</strong></td><td>{{bf this.tx.latticePK.pk3}}</td>
</tr>
</table>
<table class="ui stackable celled table">
<tr>
<td style="text-align: right;" width="30%"><strong>public_key</strong></td><td>{{bf this.tx.public_key}}</td>
</tr>
<tr>
<td style="text-align: right;" width="30%"><strong>signature</strong></td><td>{{bf this.tx.signature}}</td>
</tr>
</table>
{{else}}
{{#if isCreateNFT}}
{{#if knownProvider}}
<i class="ui certificate icon"></i>Verified
{{else}}
<i class="ui warning icon"></i>Unverified
{{/if}}
provider:
{{#if knownProvider}}
<a href="{{providerURL}}/{{tx.tx.transaction_hash}}">{{providerName}}</a> ({{providerID}})
{{else}}
{{providerID}}
{{/if}}
<p>Hash: {{nftHash}}</p>
<div>
{{#if knownProvider}}
<a href="{{providerURL}}/{{tx.tx.transaction_hash}}"><button class="ui red button"><i class="ui eye icon"></i>View at {{providerName}}</button></a>
{{else}}
Contact your NFT provider
{{/if}}
</div>
<p> </p>
{{else}}
<h3>To</h3>
<table class="ui stackable table">
<thead>
<th>Address</th>
<th>Amount</th>
</thead>
<tbody>
{{#if isTransfer}}
{{#each explorer.outputs}}
<tr>
<td><a href="/a/{{# if bech32}}{{this.address_b32}}{{else}}{{this.address_hex}}{{/if}}">{{# if bech32}}{{this.address_b32}}{{else}}{{this.address_hex}}{{/if}}</a></td>
<td class="tc-w">{{this.amount}}</td>
</tr>
{{/each}}
{{else if isTokenTransfer}}
{{#each explorer.outputs}}
<tr>
<td><a href="/a/{{# if bech32}}{{this.address_b32}}{{else}}{{this.address_hex}}{{/if}}">{{# if bech32}}{{this.address_b32}}{{else}}{{this.address_hex}}{{/if}}</a></td>
<td class="tc-w">{{this.amount}}</td>
</tr>
{{/each}}
{{else if isMultiSigSpend }}
{{#each mso this.tx.multi_sig_spend}}
<tr>
<td><a href="/a/{{this.address}}">{{this.address}}</a></td>
<td class="tc-w" style="word-break: keep-all">{{this.amount}} Quanta</td>
</tr>
{{/each}}
{{else}}
<tr>
<td><a href="/a/{{# if bech32}}{{explorer.to_b32}}{{else}}{{explorer.to_hex}}{{/if}}">{{# if bech32}}{{explorer.to_b32}}{{else}}{{explorer.to_hex}}{{/if}}</a> </td>
<td class="tc-w" style="word-break: keep-all">{{tx.tx.amount}}</td>
</tr>
{{/if}}
</tbody>
</table>
{{/if}}
{{/if}}
{{/if}}
{{/if}}
{{/if}}
{{/if}}
{{/if}}
{{/if}}
{{#if hasMessage}}
<table class="ui stackable table">
<thead>
<th>Message</th>
</thead>
<tbody>
<tr>
<td>{{tfMessage}}</td>
</tr>
</tbody>
</table>
{{/if}}
<button class="ui mini button jsonclick">Meta <i class="down angle icon"></i></button>
<div class="ui raised segment jsonbox json" style="display: none">{{json}}</div>
</div>
</div>
{{/if}}
{{/with}}
</template>