-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
122 lines (99 loc) · 4.2 KB
/
index.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
<!DOCTYPE html>
<html lang="en">
<head>
<title> World ID Tester </title>
<link rel="icon" type="image/svg+xml" href="/images/favicon-darkMode.svg" media="(prefers-color-scheme: dark" >
<link rel="icon" type="image/svg+xml" href="/images/favicon-lightMode.svg" media="(prefers-color-scheme: light" >
<!-- font awesome -->
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.1.2/css/all.min.css"
integrity="sha512-1sCRPdkRXhBV2PBLUdRb4tMg1w2YPf37qatUFeS7zlBy7jJI8Lf4VHwWfZZfpXtYSLy85pkm9GaYVYMfw5BC1A=="
crossorigin="anonymous"
referrerpolicy="no-referrer"
/>
<link href="https://fonts.googleapis.com/css?family=Open Sans:400,700" rel="stylesheet" type="text/css" />
<link rel="stylesheet" href="styles.css" />
<script type="text/javascript" src="//unpkg.com/@worldcoin/id/dist/world-id.js" ></script>
</head>
<body>
<header>
<h1>World ID Tester</h1>
</header>
<div id="subHeaderContainer">
<div id="world-id-container"></div>
<div>
<!-- <i class="far fa-copy" onclick="myScript"></i> -->
<i id="walletCopy" class="far fa-copy"></i>
<input type="text" readonly id="walletAddress" title="connect wallet address" placeholder="connect wallet">
</div>
</div>
<!-- wid / action id -->
<div class="lineContainer">
<div class="lineInputs">
<label class="labels" display: inline-block>action id</label>
<input type="text" id="actionId" class="inputs saveable" title="action id" placeholder="wid action id">
</div>
<div class="lineButtons">
<button id="actionId_Btn" class="btn" title="set wid: requires reload">set id</button> </div>
</div>
<div class="lineContainer">
<div class="lineInputs">
<label class="labels" display: inline-block>signal</label>
<input id="inputSignal" type="text" class="inputs saveable" title="signal" placeholder="signal" />
</div>
<div class="lineButtons">
<button id="signal_Btn" class="btn">set signal</button>
</div>
</div>
<!-- target contract address -->
<div class="lineContainer">
<div class="lineInputs">
<label class="labels" display: inline-block>contract address</label>
<input type="text" id="contractAddress" class="inputs saveable" title="contract address" placeholder="contract address">
</div>
<div class="lineButtons">
</div>
</div>
<!-- verify inputs & output -->
<div class="proof">
<div class="proofInputBoxes">
<label class="labels" style="margin-right: 380px" display: inline-block>proof</label>
<div>
<input id="inputMerkRoot" type="text" class="inputs saveable" title="merkle root" placeholder="merkle root" />
<label class="labels proofLabels" display: inline-block>merkle root</label>
</div>
<div>
<input id="inputNullHash" type="text" class="inputs saveable" title="nullifier hash" placeholder="nullifier hash" />
<label class="labels proofLabels" display: inline-block>nullifier hash</label>
</div>
<div>
<input id="inputProof" type="text" class="inputs saveable" title="proof (packed)" placeholder="proof (packed)" />
<label class="labels proofLabels" display: inline-block>proof (packed)</label>
</div>
</div>
</div>
<div id="autoloadContainer">
<input id="autoLoad" type="checkbox" class="saveable">
<label class="labels">autoload verified proofs</label>
</div>
<div id="bottomButtons">
<div id="actionButtons">
<button id="loadProof_Btn" class="btn" title="load received proof data">load proof</button>
<button id="verify_Btn" class="btn" title="call contract function">verifyAndExecute</button>
</div>
<button id="save_Btn" class="btn" title="save ctrl + s"><u>s</u>ave inputs</button>
</div>
<div id="spLabelContainer">
<label class="labels">scratchpad</label>
</div>
<div id="spContainer">
<textarea id="scratchpad" class="saveable" placeholder="scratchpad"></textarea>
</div>
</body>
<script src="https://cdnjs.cloudflare.com/ajax/libs/ethers/5.7.0/ethers.umd.min.js"
integrity="sha512-+Ftowzj6zmwHlez4gpQxd7QQUzK/ocgu10pukN3Pyqblni7yJ9r/WTpNHoYKL4DGOp5givxSUZjJcVY7Az9OAQ=="
crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<script src="https://code.jquery.com/jquery-3.1.1.slim.min.js"></script>
<script src="./index.js" type="module"></script>
</html>