return bytes.toHex(publicKeyBytes)\r
}\r
\r
- static #keyToAddress (key: string): string {\r
- const publicKeyBytes = hex.toBytes(key)\r
- const checksum = new Blake2b(5).update(publicKeyBytes).digest()\r
- checksum.reverse()\r
- const encoded = bytes.toBase32(publicKeyBytes)\r
- const encodedChecksum = bytes.toBase32(checksum)\r
- return `${PREFIX}${encoded}${encodedChecksum}`\r
+ static #keyToAddress (publicKey: string): string {\r
+ const publicKeyBytes = hex.toBytes(publicKey)\r
+ const checksumBytes = new Blake2b(5).update(publicKeyBytes).digest().reverse()\r
+ const encodedPublicKey = bytes.toBase32(publicKeyBytes)\r
+ const encodedChecksum = bytes.toBase32(checksumBytes)\r
+ return `${PREFIX}${encodedPublicKey}${encodedChecksum}`\r
}\r
\r
static #validateKey (key: string): void {\r