-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathindex.html
210 lines (170 loc) · 8.05 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
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
<html>
<head>
<title>Steem & SBD Dice – Play dice game with Steem and SBD – Steemdice</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="Steem & SBD Dice – - Roll the dice - Provably fair - Quick Support">
<link href="https://fonts.googleapis.com/css?family=Montserrat:600,700" rel="stylesheet">
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<link rel="stylesheet" href="css/index.css">
</head>
<body>
<header class="text-center">
<h1 class="page-logo">steemdice</h1>
<div class="login" id="login_link"><i class="material-icons small">vpn_key</i> <a href="#login_modal" data-toggle="login_modal">Log in with your steem account</a></div>
<p id="signup_link" class="small signup">
<a href="https://steemit.com/enter_email">New to steem?</a>
</p>
<span id="logged_in_message" class="logged-in small">
Logged in as <span class="username"></span> | <a href="#logout" id="logout">Logout</a>
</span>
</header>
<main class="page-main">
<div class="bankroll">
<span class="bankroll__total ">
<span id="bankroll" class="large">
Your Bankroll:
<span class="play_with_steem"><span id="bankroll_steem">0 Steem</span></span>
<span class="play_with_sbd"><span id="bankroll_sbd">0 SBD</span></span>
</span>
<span id="bankroll_movement_container"></span>
</div>
<div class="box">
<div class="layout">
<label class="u-1-2">
<span class="label__text">Bet Amount</span>
<span class="input-double-container">
<input class="large++ strong" id="bet_amount" value="0.1">
<button id="double_bet">2×</button>
</span>
</label>
<label class="u-1-2">
<span class="label__text">Win Chance</span>
<span class="input-double-container">
<input class="large++ strong" id="bet_chance" value="50">
<button disabled="disabled">%</button>
</label>
</div>
<p class="text-center">
If you win, you receive <span id="potential_win">0.196</span> <span class="play_with_steem">Steem</span><span class="play_with_sbd">SBD</span>
</p>
<button class="large" id="roll">Roll The Dice</button>
<button class="large" disabled id="rolling"><span class="animation--pulse">rolling...</span></button>
<button class="large" disabled id="rolled">Bet placed!</button>
<button class="large" disabled id="insufficient_funds">Not enough <span class="play_with_steem">Steem</span><span class="play_with_sbd">SBD</span></button>
<div id="roll_error">
<button class="large" disabled>Error placing bet!</button>
<div id="roll_error_reason"></div>
</div>
</div>
<span class="game-limit smaller">
Game limit:
<span class="play_with_sbd"><span id="max_win_sbd"></span> SBD</span>
<span class="play_with_steem"><span id="max_win_steem"></span> Steem</span>
</span>
<div class="bankroll-switch">
<i class="material-icons bankroll-switch__icon">cached</i>
<a href="#" id="switch_to_sbd" class="smaller play_with_steem">play with SBD</a>
<a href="#" id="switch_to_steem" class="smaller play_with_sbd">play with Steem</a>
</div>
<div class="latest-rolls">
<table class="smaller">
<thead>
<tr>
<th>User</th>
<th>Block</th>
<th>Result</th>
<th>Bet</th>
<th>Profit</th>
</tr>
</thead>
<tbody id="txTable">
</tbody>
</table>
</div>
</main>
<footer class="page-footer text-center smaller">
<p style="opacity: .5">Last Roll: Block <span id="lastBlockHeight"></span> | ID <span id="lastBlockId"></span> | Result <span id="lastBlockGoal"></span></p>
<p>
<a href="#about" data-toggle="about_modal">about</a> |
<a href="https://github.com/pharesim/steemdice" target="_blank">github</a> |
<a href="mailto:pharesim@protonmail.com">support</a> |
<a href="https://steemit.com/@steemdice1">daily reports</a>
</p>
<p><strong>Be advised:</strong> Do not use untrusted steemdice forks. Always check the URL of the site you use to play!</p>
</footer>
<div id="login_modal" class="modal" data-toggle="login_modal">
<div class="modal__inner box">
<h2>Login</h2>
<p>
<label for="username">Account Name</label>
<input type="text" name="username" id="username" />
</p>
<p>
<label for="username">Password or WIF <a href="#about" data-toggle="about_modal">(?)</a></label>
<input type="password" name="password" id="password" />
</p>
<div id="login_error" class="error">Error logging in. Please try again.</div>
<button id="login_button">Login</button>
<span id="busy_indicator">Logging in...</span>
</div>
</div>
<div id="about_modal" class="modal" data-toggle="about_modal">
<div class="modal__inner box">
<h2>About</h2>
<p>SteemDice is a provably fair, blockchain based gambling application.</p>
<p>
<strong>How can you prove that the games are fair?</strong>
<div class="small">
The transaction containing your bet defines the outcome. The result is calculated from the id of the block after.
</div>
</p>
<p>
<strong>How can I verify the result myself?</strong>
<div class="small">
Take the last 5 characters of the block ID and convert them to a decimal integer. If this number is greater than 999,999 use the next block's ID. Divide the modulo 10,000 by 100 and you get the target.
</div>
</p>
<p>
<strong>Why do I need to give you my active private key?</strong>
<div class="small">
SteemDice does not manage its own userbase or wallets. Instead, it works as a single purpose wallet to your steem account.
</div>
</p>
<p>
<strong>Isn't this unsafe?</strong>
<div class="small">
Like on steemit.com, your key is not sent to a server. Transactions are signed in your browser, and only the hashed signature is transmitted to a steemd node to broadcast it on the steem network. No second party will ever get your key!
</div>
</p>
<p>
<strong>What else do you do to protect my key?</strong>
<div class="small">
Instead of hosting the application on our own servers, we chose github pages. Any attacker making himself able to change the code, will transparently show what he did with a new commit on github. Malicious activity can be detected immediately and by anyone.
</div>
</p>
<p>
<strong>What can I do if I'm still unsure about the safety of my key?</strong>
<div class="small">
Save the page, or clone/download it from github. It works locally, on any device!
</div>
</p>
<p>
<strong>I may be paranoid, what else can I do?</strong>
<div class="small">
It is possible to send your bets from the steemit.com wallet. The required memo format is
<pre>{"type":"higher/lower","number":50}</pre>
But let us emphasize again that both platforms use the same backend library to handle your transactions, and we offer the added security of github hosting. User safety was the first thought while designing this project.
</div>
</p>
</div>
</div>
<div id="toaster" class="toasting toasting--show">
<p>Welcome to SteemDice! <a href="#login_modal" data-toggle="login_modal" id="login_link_toaster">Log in</a> to your Steem account with your active authority to play (<a href="#about_modal" data-toggle="about_modal">?</a>)</p>
</div>
<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript" src="js/jquery.mousewheel.min.js"></script>
<script type="text/javascript" src="js/steem.min.js"></script>
<script type="text/javascript" src="js/app.js"></script>
</body>
</html>