static fromPrivateKey (privateKey: string, index?: number): Account {\r
Account.#isInternal = true\r
Account.#validateKey(privateKey)\r
- const { publicKey } = NanoNaCl.convert(privateKey)\r
- const account = Account.fromPublicKey(bytes.toHex(publicKey), index)\r
+ const publicKey = NanoNaCl.convert(privateKey)\r
+ const account = Account.fromPublicKey(publicKey, index)\r
account.#prv = privateKey.toUpperCase()\r
return account\r
}\r
return (crypto_sign_open(m, sm, sm.length, publicKey) >= 0)\r
}\r
\r
- const convert = function (seed: string | Uint8Array) {\r
+ const convert = function (seed: string | Uint8Array): string {\r
if (typeof seed === 'string') seed = parseHex(seed)\r
checkArrayTypes(seed)\r
if (seed.length !== crypto_sign_SEEDBYTES)\r
scalarbase(p, hash)\r
pack(pk, p)\r
\r
- return { publicKey: pk }\r
+ return hexify(pk)\r
}\r
\r
return { sign, open, detached, verify, convert }\r