diff --git a/export/index.html b/export/index.html index 4acb486..296a777 100644 --- a/export/index.html +++ b/export/index.html @@ -371,18 +371,16 @@

Message log

* hex-encoding if `keyFormat` isn't passed. * @param {Uint8Array} privateKeyBytes * @param {string} keyFormat Can be "HEXADECIMAL" or "SOLANA" - * @param {string} publicKey Hex-encoded public key, needed for Solana private keys */ - const encodeKey = (privateKeyBytes, keyFormat, publicKey) => { + const encodeKey = async (privateKeyBytes, keyFormat, publicKeyBytes) => { switch (keyFormat) { case "SOLANA": - if (!publicKey) { + if (!publicKeyBytes) { throw new Error("public key must be specified for SOLANA key format"); } if (privateKeyBytes.length !== 32) { throw new Error(`invalid private key length. Expected 32 bytes. Got ${privateKeyBytes.length}.`); } - const publicKeyBytes = uint8arrayFromHexString(publicKey); if (publicKeyBytes.length !== 32) { throw new Error(`invalid public key length. Expected 32 bytes. Got ${publicKeyBytes.length}.`); } @@ -453,6 +451,7 @@

Message log