mirror of
https://github.com/logos-messaging/examples.waku.org.git
synced 2026-02-05 13:33:11 +00:00
20 lines
451 B
JavaScript
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();
|