migrating cjs -> esm

This commit is contained in:
2024-10-07 20:48:28 +03:00
parent b91c95bde3
commit 3609a154a9
8 changed files with 27 additions and 18 deletions

2
dist/bundle.js vendored

File diff suppressed because one or more lines are too long

12
dist/index.html vendored Normal file
View File

@@ -0,0 +1,12 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>ZKL Key Derivation Service Demo</title>
</head>
<body>
<script src="bundle.js"></script>
</body>
</html>

15
dist/index.js vendored Normal file
View File

@@ -0,0 +1,15 @@
import { generateKeypair } from "../key-derivation.js";
(async () => {
console.log("start");
const mnemonic =
"digital radio analyst fine casino have mass blood potato hat web capital prefer debate fee differ spray cloud";
const { publicKey, privateKey } = await generateKeypair(mnemonic);
console.log(publicKey.keyType, privateKey.keyType);
console.log(publicKey.asHexString, privateKey.asHexString);
console.log(publicKey.asByteArray, privateKey.asByteArray);
console.log("done");
})();