Script to convert Zelcore private key to adaLite key file This script allows you to create a Cardano key file from a private key and password.
Ensure you have the following installed:
- Node.js (version 20.x or higher)
- npm (version 10.x or higher)
- Clone this repository or download the script files.
- Navigate to the project directory.
- Install the required npm packages:
npm i
- Open a terminal and navigate to the project directory.
- Run the script using the following command:
node index.js
- You will be prompted to enter your private key and password:
Enter your private key: [Your Private Key] // Needs to be zelcore wallet private key and not the wif format one.
Enter your password: [Your Password] // A password of you own choosing used to decrypt the file when importing.
Enter your private key: dfe2acb0
Enter your password: 1234
Once the script runs successfully, it will create a cardano_key.json
file in the project directory. The content of this file will be the exported Cardano key file.
The file can the be imported to AdaLite wallet @see https://adalite.io/ with key file option.
If there are any errors during the execution, they will be logged in the console.
The script performs the following actions:
- Prompts the user for their private key and password.
- Uses the
cardano-crypto.js
library to generate a Cardano key pair from the provided private key. - Exports the wallet secret using the provided password.
- Saves the exported wallet secret to a
cardano_key.json
file.