Skip to content

Instantly share code, notes, and snippets.

@PrathamRawat
Created May 21, 2020 16:43
Show Gist options
  • Save PrathamRawat/348e7c2acdfb14b3bcdae8923df9b203 to your computer and use it in GitHub Desktop.
Save PrathamRawat/348e7c2acdfb14b3bcdae8923df9b203 to your computer and use it in GitHub Desktop.
// URL for the Cryptonomic hosted testnet Tezos Node (found on Nautilus Cloud)
const tezosNode = "https://tezos-dev.cryptonomic-infra.tech:443";
// This is downloaded from the testnet faucet, you should replace this with your downloaded file!
const faucetAccount = {
"mnemonic": [
"will",
"seven",
"dismiss",
"life",
"muscle",
"year",
"addict",
"manage",
"quit",
"liar",
"multiply",
"birth",
"peace",
"latin",
"void"
],
"secret": "2854bd3477278ab917acfadafd8187abdaff7679",
"amount": "30780498300",
"pkh": "tz1UjZX2xEAST1oZmsSY5HYqTgRRCgh66ga7",
"password": "gSazhmpfhw",
"email": "buyplvvp.wpkfzxtd@tezos.example.org"
};
// This construct stores the keys for our downloaded account
const keystore = conseiljs.TezosWalletUtil.unlockFundraiserIdentity(
faucetAccount.mnemonic.join(' '),
faucetAccount.email,
faucetAccount.password,
faucetAccount.pkh
);
// This sends an account activation operation to the Tezos Node
let activationResult = conseiljs.TezosNodeWriter.sendIdentityActivationOperation(
tezosNode,
keystore,
faucetAccount.secret
);
console.log(activationResult)
// This reveals the account's public key on the chain to be used to send and receive operations
let revelationResult = conseiljs.TezosNodeWriter.sendIdentityActivationOperation(
tezosNode,
keystore,
faucetAccount.secret
);
console.log(revelationResult)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment