Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add creation of split wallet from existing private key #162

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion bitaddress.org.html
Original file line number Diff line number Diff line change
Expand Up @@ -6849,6 +6849,9 @@
<br/>
<label id="splitlabelshares">Number of shares</label>
<input type="text" id="splitshares" value="3" size="4"/>
<br/>
<label id="splitlabeloptionalprivate">Use specific private key (optional)</label>
<input type="text" id="splitoptionalprivate" value="" />
<span><input type="button" id="splitview" value="Generate" onclick="ninja.wallets.splitwallet.splitKey();"></span>
<div id="splitstep1icon" class="more " onclick="ninja.wallets.splitwallet.openCloseStep(1);"></div>
</div>
Expand Down Expand Up @@ -10662,7 +10665,8 @@
try {
var numshares = parseInt(document.getElementById('splitshares').value);
var threshold = parseInt(document.getElementById('splitthreshold').value);
var key = new Bitcoin.ECKey(false);
var optionalprivate = document.getElementById('splitoptionalprivate').value;
var key = new Bitcoin.ECKey(optionalprivate || false);
var bitcoinAddress = key.getBitcoinAddress();
var shares = ninja.wallets.splitwallet.getFormattedShares(key.getBitcoinHexFormat(), numshares, threshold);

Expand Down