Sasha 698afe4dab
feat: simplify rln-js (#297)
* remove old rln-js

* feat: simplify rln-js

* remove comment

* add example to CI
2024-01-24 20:51:13 +01:00

20 lines
451 B
JavaScript

import { initUI } from "./ui";
import { initRLN } from "./rln";
import { initWaku } from "./waku";
async function run() {
const { onLoaded, onStatusChange, registerEvents } = initUI();
const { encoder, decoder, rlnContract } = await initRLN(onStatusChange);
const { onSend, onSubscribe } = await initWaku({
encoder,
decoder,
rlnContract,
onStatusChange,
});
onLoaded();
registerEvents({ onSend, onSubscribe });
}
run();