diff --git a/commands/credentials/generate.js b/commands/credentials/generate.js index e3d35b29..41e3f7b6 100644 --- a/commands/credentials/generate.js +++ b/commands/credentials/generate.js @@ -33,7 +33,7 @@ module.exports = { }; function pKtoAccountId(publicKey) { - return decode(publicKey.replace('ed25519:', '')).toString('hex'); + return Buffer.from(decode(publicKey.replace('ed25519:', ''))).toString('hex'); } async function generateKey(options) { diff --git a/package.json b/package.json index 316b8da4..5268c70b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "near-cli", - "version": "4.0.4", + "version": "4.0.5", "description": "Simple CLI for interacting with NEAR Protocol", "engines": { "node": ">= 16"