Created
March 14, 2024 03:06
-
-
Save kiwina/f913d10bcd186e44e2d395e28df64b01 to your computer and use it in GitHub Desktop.
Export exodus polkadot account and generate a backup.json file to import in NOVA Wallet or others
This file contains 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
// package.json | |
{ | |
"dependencies": { | |
"@polkadot/keyring": "^12.6.2", | |
"@polkadot/util-crypto": "^12.6.2" | |
} | |
} | |
// index.js | |
const { Keyring } = require('@polkadot/keyring'); | |
const keyring = new Keyring({ type: 'ed25519'}); | |
// Change the following: | |
// EXODUS_POLKADOT_PRIVATE_KEY_CHANGE_ME NOTE: add 0x in front of the private key you get in exodus | |
// PASSWORD_CHANGE_ME NOTE: the password for the backup | |
const pair = keyring.addFromUri(`EXODUS_POLKADOT_PRIVATE_KEY_CHANGE_ME`, { name: 'POLKA_KEY_1', genesisHash:'', isHidden:false}, 'ed25519'); | |
console.log(JSON.stringify(keyring.toJson(pair.address,'PASSWORD_CHANGE_ME'))); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment