// See for details: https://docs.nano.org/integration-guides/the-basics/\r
// Original source commit: https://github.com/dchest/tweetnacl-js/blob/71df1d6a1d78236ca3e9f6c788786e21f5a651a6/nacl-fast.js\r
\r
+async function fn () {\r
+ /**\r
+ * Listens for messages from a calling function.\r
+ */\r
+ addEventListener('message', (message) => {\r
+ const { privateKey, index } = message.data ?? message\r
+ keyPair.fromSeed(seed).then(publicKey => postMessage({ publicKey, privateKey, index }))\r
+ })\r
+\r
+\r
var gf = function(init?: any) {\r
var i, r = new Float64Array(16);\r
if (init) for (i = 0; i < init.length; i++) r[i] = init[i];\r
}\r
}\r
})();\r
+}\r
\r
-export const nacl = { sign, open, detached, verify, keyPair, publicKeyLength, secretKeyLength, seedLength, signatureLength }
\ No newline at end of file
+export const nacl = { sign, open, detached, verify, keyPair, publicKeyLength, secretKeyLength, seedLength, signatureLength }\r
+export default `(${fn.toString()})()`\r