Created
January 29, 2022 07:00
-
-
Save dimitardanailov/f2be695fc88bde1ae6733f62926469bb to your computer and use it in GitHub Desktop.
Create an Account on Algorand
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
const algosdk = require('algosdk'); | |
const createAccount = function() { | |
try { | |
const myaccount = algosdk.generateAccount(); | |
console.log("Account Address = " + myaccount.addr); | |
let account_mnemonic = algosdk.secretKeyToMnemonic(myaccount.sk); | |
console.log("Account Mnemonic = "+ account_mnemonic); | |
console.log("Account created. Save off Mnemonic and address"); | |
console.log("Add funds to account using the TestNet Dispenser: "); | |
console.log("https://dispenser.testnet.aws.algodev.network/ "); | |
return myaccount; | |
} | |
catch (err) { | |
console.log("err", err); | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment