craft-nft

A standalone NFT implementation for real-world arts and crafts assets
Info | Log | Files | Refs | README

qrcheck.html (1711B)


      1 <html>
      2 	<head>
      3 		<title>Manual test of Craft NFT using web3js, metamask</title>
      4 		<meta name="author" value="Louis Holbrook <dev@holbrook.no> (https://holbrook.no)" />
      5 		<meta name="generator" value="vim" />
      6 		<script src="node_modules/jsqr/dist/jsQR.js"></script>
      7 		<script src="node_modules/ethers/dist/ethers.umd.min.js"></script>
      8 		<script src="src/wala.js"></script>
      9 		<script src="qrread.js"></script>
     10 		<script src="qrread_ui.js"></script>
     11 		<script src="qrcheck.js"></script>
     12 		<script>
     13 
     14 
     15 window.addEventListener('load', () => {
     16 	live(handleScan);
     17 
     18 });
     19 		</script>
     20 		<link rel="stylesheet" href="style.css"></link>
     21 		<style type="text/css">
     22 #result {
     23 	display: none;
     24 }
     25 		</style>
     26 	</head>
     27 	<body>
     28 		<dl id="settingsView">
     29 			<dt>Status</dt>
     30 			<dd><span id="statusText" class="statusBusy">Initializing...</span></dd>
     31 		</dl>
     32 		
     33 		<label for="contractAddress">RPC URL</label>
     34 		<input type="text" id="chainRpcUrl" value="http://localhost:8545" /><br/>
     35 		<label for="contractAddress">NFT contract address</label>
     36 		<input type="text" id="contractAddress"  size="42" /><br/>
     37 		
     38 		<div id="scan">
     39 			<div class="out">
     40 				<canvas id="qr-canvas" width="400" height="400"></canvas>
     41 			</div>
     42 
     43 			<label for="holderAddress">Holder address</label>
     44 			<input type="text" size="42" id="holderAddress" />
     45 			<button id="scanLookup" onClick="manualLookup();">look up</button>
     46 		</div>
     47 		<div id="result">
     48 			<dl>
     49 				<dt>Holder address</dt>
     50 				<dd id="resultHolderAddress"></dd>
     51 				<dt>Times registered</dt>
     52 				<dd id="resultHolderAddressTimes"></dd>
     53 				<dt>NFT Balance</dt>
     54 				<dd id="resultBalance"></dd>
     55 			</dl>
     56 			<button id="scanRestart" onClick="resetScan();">restart</button>
     57 		</div>
     58 	</body>
     59 </html>