-
Notifications
You must be signed in to change notification settings - Fork 8
/
btcr.html
140 lines (120 loc) · 5.41 KB
/
btcr.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
<html lang="en">
<head>
<title>BTCR TX Playground</title>
<script src="js/build/txrefConverter-browserified.js"></script>
<script src="js/build/btcrDidUtils.js"></script>
<script src="js/playground.js"></script>
</head>
<body>
<a href="#home" class="navbar-brand" id="homeBtn">BTCR Playground</a>
<a href="#newDid" id="btnNewDid">DID</a>
<div class="tab-pane tab-content active" id="home">
<div class="jumbotron">
<h1>BTCR TX Conversion Playground</h1>
This is the BTCR DID Method playground.
</div>
<div class="container">
<div class="row">
<h2>Select blockchain</h2>
<label class="form-check-label" for="testnet3Chain">testnet</label>
<input type="radio" class="form-check-input" id="testnet3Chain" name="chainSelection" value="testnet3" checked="checked" />
<label class="form-check-label" for="mainnetChain">mainnet</label>
<input type="radio" class="form-check-input" id="mainnetChain" name="chainSelection" value="mainnet" />
</div>
<div class="row">
<h2>Find by TX Ref</h2>
<input type="text" class="form-control" name="btn2" id="txref" list="examples"/>
<datalist id="examples">
<option value="did:btcr:8kyt-fzzq-qqqq-ase0-d8">did:btcr:8kyt-fzzq-qqqq-ase0-d8</option>
<option value="did:btcr:8yv2-xzpq-qqqq-9yce-nk">did:btcr:8yv2-xzpq-qqqq-9yce-nk</option>
</datalist>
<button class="btn btn-primary" id="btn2" onclick="JavaScript:convertFromTxref()" data-toggle="modal" data-target="#exampleModal">Convert from TX Ref</button>
</div>
<div class="row">
<h2>Find by Transaction Information</h2>
<input type="text" contenteditable="true" class="form-control" id="txid" placeholder="transaction ID" />
</div>
<div class="row">
<h2>Find by Blockchain Position</h2>
<div class="col">
<input type="text" contenteditable="true" class="form-control" id="blockHeight" placeholder="blockheight" />
</div>
<div class="col">
<input type="text" contenteditable="true" class="form-control" id="blockPosition" placeholder="position" />
</div>
<div class="col">
<input type="text" contenteditable="true" class="form-control" id="utxoIndex" placeholder="transaction output (optional)" />
</div>
<button class="btn btn-primary" id="btn1" onclick="JavaScript:convertFromTxid()" data-toggle="modal" data-target="#exampleModal">Convert from TXID</button>
</div>
</div>
<!-- Modal -->
<div class="modal fade" id="modalHome" tabindex="-1" role="dialog" aria-labelledby="modalHome" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title" id="resultsModalLabel">Results</h4>
</div>
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
<div class="modal-body">
<div class="container-fluid">
<div class="row">
<h5>DID Document</h5>
<div id="d-ddo1" class="alert alert-success"></div>
</div>
<div class="row">
<h5>Verifiable Claims</h5>
<div id="vc" class="alert alert-success" ></div>
</div>
<div class="row">
<h5>Errors</h5>
<div id="errors" class="alert alert-success"></div>
</div>
<div class="row">
<h5>Raw</h5>
<div id="raw" class="alert alert-success"></div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="tab-pane tab-content" id="about">
<div class="container">
<div class="row">
<h2>About</h2>
<p>BTCR Playground is built on the open source coinb.in wallet</p>
<p>Code for this repo is located at <a href="https://github.com/WebOfTrustInfo/btcr-tx-playground.github.io" target="new">btcr-tx-playground.github.io</a>.</p>
<h2>Supporting libraries include:</h2>
<ul>
<li>BTCR resolver utils: <a href="https://github.com/WebOfTrustInfo/btcr-did-tools-js" target="new">Github</a></li>
<li>BTCR txref-conversion-js: <a href="https://github.com/WebOfTrustInfo/txref-conversion-js" target="new">Github</a></li>
<li>Coinb.in wallet: <a href="https://github.com/OutCast3k/coinbin.git" target="new">Github</a></li>
</ul>
<h2>Additional Details:</h2>
<ul>
<li><a href="https://github.com/WebOfTrustInfo/rebooting-the-web-of-trust-spring2018/blob/master/final-documents/btcr-resolver.pdf">BTCR DID Resolution</a></li>
<li><a href="https://github.com/w3c-ccg/did-hackathon-2018/blob/master/README.md">Latest BTCR Hackathon</a></li>
<li><a href="https://www.icloud.com/keynote/0Bcwqiyw6RGvMZgDyFt-prI_g#BTCR">Presentation visuazing how BTCR works</a></li>
<li><a href="BTCRVisualization.001.png">BTCR Resolution, single image</a></li>
</ul>
</div>
</div>
</div>
<div class="tab-pane tab-content" id="newDid">
<div class="container">
<div class="row">
<h2>Create DID</h2>
<p>This is where we create DIDs</p>
<h2>Add OP_RETURN</h2>
<input type="text" class="form-control" name="inputOpreturn" id="opreturn" />
<button class="btn btn-primary" id="btnCreateDid" onclick="JavaScript:createDid()" data-toggle="modal" data-target="modalCreateDid">Create DID</button>
</div>
</div>
</div>
</body>
</html>