aboutsummaryrefslogtreecommitdiffstats
path: root/views/users/wallet.html
blob: c7c919493f7f0412b776ea259144fc4a3e3ddc20 (plain) (blame)
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
{{#yield-scripts}}
  {{#js}}js/wallet{{/js}}
{{/yield-scripts}}

<form id="setup" action="/{{user}}" method="post" style="display: none">
  <h1>Wallet</h1>

  <input type="hidden" id="username" name="username" value="{{user}}" />
  <input type="hidden" id="email" name="email" />

  <div class="form-group">
    <label for="pubkey">Bitcoin Receiving Address or HD Wallet Pubkey:</label>
    <div class="input-group">
      <input type="text" id="pubkey" name="pubkey" class="form-control" placeholder="xpub..." />
      <input type="hidden" id="privkey" name="privkey" />
      <span class="input-group-btn">
        <button id="generate" type="button" class="btn">New</button>
      </span>
    </div>
  </div>

  <input class="btn btn-primary" type="submit" value="Done" />
</form>

<div class="modal fade" id="modal" tabindex="-1" role="dialog">
  <div class="modal-dialog">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
        <h4 class="modal-title">New HD Wallet</h4>
      </div>

      <div class="modal-body">
        <ul class="nav nav-tabs" role="tablist">
          <li class="active"><a id="step1_link" href="#step1" role="tab" data-toggle="tab">Wallet Keys</a></li>
          <li><a href="#step2" role="tab" data-toggle="tab">What's this?</a></li>
        </ul>
        <div class="tab-content">
          <div id="step1" class="tab-pane active">
            <form id="encrypt">
              <div class="form-group">
                <label for="encryption-password">Encryption Passphrase <small>(16+ characters)</small>:</label>
                <input type="password" id="encryption-password" name="encryption-password" class="form-control" />
              </div>

              <div class="form-group">
                <label for="encryption-confirm">Confirm Passphrase:</label>
                <input type="password" id="encryption-confirm" name="encryption-confirm" class="form-control" />
              </div>

              <input type="submit" style="position: absolute; left: -9999px" />
            </form>

            <div id="key-dialog" class="alert alert-danger">
              Master Public Key 
              <pre id="pubkey_text"></pre>
              Master Private Key <span id="status">(Unencrypted)</span>
              <pre id="privkey_text"></pre>
              <div id="qr"></div>
            </div>
          </div>
          <div id="step2" class="tab-pane">
            <p>An <abbr title="Hierarchical Deterministic Wallet">HD Wallet</abbr> is a master key that can be used to derive several Bitcoin addresses. CoinOS will use the master key that's generated here to derive a new address for every payment to your account so that people can't link separate payments together and invade your customers' privacy.</p>
            <p>The master <b>pubkey</b> is what's used to derive the addresses and the master <b>private</b> key is what's needed to authorize payments out from the wallet.  CoinOS will get you to encrypt the private key with a strong passphrase before it's stored on our server so that no one but you can access your funds.  The password could be a different password from the one you use to login to your account, or it could be the same, but what's important is that you remember it.  You'll need to enter the password whenever you make a transaction out of the wallet.</p> 
            <p class="text-danger"><b>IMPORTANT: We cannot recover or reset your password.  If you lose it or forget it, any funds sent to your account will be lost forever, so make it memorable or write it down.</b></p>

            <img src="/assets/img/forever.gif" width="370px" />
          </div>

        </div>
      </div>
      <div class="modal-footer">
        <button type="button" id="print" class="btn btn-primary"><span class="glyphicon glyphicon-print"></span> Print</button>
        <button type="button" id="close" class="btn btn-primary">Got it!</button>
      </div>
    </div>
  </div>
</div>