}\r
\r
static #addressToKey (v: string): string {\r
- const publicKeyBytes = base32.toBytes(v.substring(-60, -8))\r
+ const publicKeyBytes = base32.toBytes(v.slice(-60, -8))\r
const checksumBytes = base32.toBytes(v.slice(-8))\r
const blakeHash = new Blake2b(5).update(publicKeyBytes).digest()\r
blakeHash.reverse()\r
- console.log(`checksumBytes: ${checksumBytes}`)\r
- console.log(`blakeHash: ${blakeHash}`)\r
if (bytes.toHex(checksumBytes) !== bytes.toHex(blakeHash)) {\r
throw new Error('Checksum mismatch in address')\r
}\r