UNPKG

@rahlfantasy/block-explorer

Version:
294 lines (283 loc) 13.5 kB
<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}}: {{explorer.symbol}} {{/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}} <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> {{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}} {{else}} {{#if isMultiSigSpend }} <div class="ui large horizontal list wordBreak f-h"><div class="item"><a href="/a/{{multiSigSpendAddress}}">{{multiSigSpendAddress}}</a></div></div> {{else}} <div class="ui large horizontal list wordBreak f-h"><div class="item"><a href="/a/{{multiSigAddress}}">{{multiSigAddress}}</a></div></div> {{/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}} <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}} <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>