Closed motolese closed 2 years ago
The index.html, is essentially the Bip39 of Ian Coleman, hiding the non-essential info by using css.
We need to send 3 fields to paperwallet.php
<textarea id="phrase" name="bip39_1" class="phrase private-data form-control" data-show-qr autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" form="paperwallet"></textarea> <textarea id="account-xpub-bip84" class="account-xpub form-control" readonly data-show-qr autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" form="paperwallet"></textarea> <textarea class="csv form-control" rows="5" readonly autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" ></textarea>
Now the user needs to copy the info manually and the click on
create wallet
<form action="paperwallet.php" method="post" name="myform" form="paperwallet"> <div style="width: 580px; float:left">mnemonic</div> <div style="width: 490px; float:left">zpub</div> <div style="width: 320px; float:left">address</div><br> <input name="bip39_1" value="" style="width: 570px; float:left" autocomplete="off"/> <input name="zpub_1" value="" style="width: 500px; float:left" autocomplete="off"/> <input name="address_1" value="" style="width: 320px; float:left" autocomplete="off"/> <a href="javascript: submitform()">Create Wallet</a> </form> <script type="text/javascript"> function submitform() { document.myform.submit(); } </script>
We need a form with javascript integrated to send the fields below to paperwallet.php
phrase
tobip39_1
account-xpub-bip84
toxpub_1
and only the address ofcsv form-control
toaddress_1
Any help is welcome!
You can get the hidden values using document.getElements see the example below:
<script type="text/javascript">
function submitform() {
// This snippet takes the data (mnemonic, xpub, address)
// generated by iancoleman.
const mnemonic = document.getElementById("phrase").value
const xpub = document.getElementsByClassName("account-xpub")[0].value
const addr = document.getElementsByClassName("address")[0].textContent
if (mnemonic & xpub & addr){
document.getElementsByName("bip39_1")[0].value = mnemonic
document.getElementsByName("zpub_1")[0].value = xpub
document.getElementsByName("address_1")[0].value = addr
document.myform.submit();
}
}
</script>
Thank you, guys! Perfect solution....
The index.html, is essentially the Bip39 of Ian Coleman, hiding the non-essential info by using css.
We need to send 3 fields to paperwallet.php
Now the user needs to copy the info manually and the click on
create wallet
We need a form with javascript integrated to send the fields below to paperwallet.php
phrase
tobip39_1
account-xpub-bip84
toxpub_1
and only the address ofcsv form-control
toaddress_1
Any help is welcome!