βοΈfetchAccountHash
Last updated
// import Nest25 Casper library
const { Casper } = require('@nest25/casper-lib');
// create a new Casper instance
const casper = new Casper();
async function main() {
const publicKey = '013a156a50fc6284ba436aedeaf96b55ac1a0c57ee9f8a46bf1c6518afe9b2f56c';
// fetch account hash from public key
let accountHash = await casper.fetchAccountHash(publicKey);
// print account hash
console.log({ accountHash });
}
// call main function
main();{
accountHash: 'account-hash-6a43e8538b4b695b6670c30ecd1f9fea26400573954be066fda6314fc8e17f13'
}