Created
February 5, 2021 05:15
-
-
Save intelliot/e963b13e70e37d166df13a6b632aa180 to your computer and use it in GitHub Desktop.
Exarpy Wallet PIN to Secret Key Conversion Code
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var customFunctionTestPin = function (customArgPin) { | |
if (customArgPin.length !== 16) { | |
document.getElementById('warning').innerHTML = "<strong>Invalid PIN:</strong> Your PIN should be 16 numbers, separated by commas."; | |
return false; | |
} | |
for (var customIterator1 = 0; customIterator1 < 16; customIterator1 += 1) { | |
if (customArgPin[customIterator1] < 0 || customArgPin[customIterator1] > 255) { | |
document.getElementById('warning').innerHTML = "<strong>Invalid PIN:</strong> Every PIN value must be between 0 and 255, inclusive."; | |
return false; | |
} | |
} | |
return true; | |
}; | |
var customFunctionConvertPin = function () { | |
var customArrayPin = document.getElementById('pin').value.replace(/[^0-9\\,]/g, '').split(',').filter(function (el) { return el != ''; }).map(function (x) { return parseInt(x, 10); }); | |
if (customFunctionTestPin(customArrayPin) === true) { | |
document.getElementById('warning').innerHTML = ""; | |
var customObjectWallet = ripple.generateAddress.generateAddressAPI({ | |
algorithm: "ed25519", // DO NOT EVER CHANGE | |
entropy: customArrayPin | |
}); | |
document.getElementById('address').value = customObjectWallet.address; | |
document.getElementById('secret').value = customObjectWallet.secret; | |
document.getElementById('results').className = 'show'; | |
document.getElementById('form').className = 'hide'; | |
} | |
}; | |
// Copied from view-source:https://web.archive.org/web/20201106131856/https://exarpy.com/ | |
// Exarpy Ripple Wallet PIN to Secret Key Conversion Tool | |
// Your Ripple wallet (and XRP) are on the XRP Ledger, accessible using your Ripple wallet's secret key. Please use this tool to convert your Exarpy Ripple wallet's PIN to your Ripple wallet's address and secret key. | |
// Please disconnect this device from the internet, Wi-Fi, and, if applicable, its cellular network before using this tool. Do not continue if this is a work device, or a public device, (like a school computer). We also strongly recommend disabling cookies, uninstalling all browser plugins, and blocking password keychain storage. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment