mirror of
https://github.com/logos-messaging/examples.waku.org.git
synced 2026-05-21 16:49:44 +00:00
migrate rln-js
This commit is contained in:
parent
49979485f1
commit
4e55bddf73
@ -1,10 +1,10 @@
|
|||||||
import * as utils from "https://unpkg.com/@waku/utils@0.0.4/bundle/bytes.js";
|
import * as utils from "https://unpkg.com/@waku/utils@0.0.8/bundle/bytes.js";
|
||||||
import { createLightNode } from "https://unpkg.com/@waku/create@0.0.12/bundle/index.js";
|
|
||||||
import {
|
import {
|
||||||
createEncoder,
|
createEncoder,
|
||||||
createDecoder,
|
createDecoder,
|
||||||
waitForRemotePeer,
|
waitForRemotePeer,
|
||||||
} from "https://unpkg.com/@waku/core@0.0.16/bundle/index.js";
|
createLightNode,
|
||||||
|
} from "https://unpkg.com/@waku/sdk@0.0.16/bundle/index.js";
|
||||||
import { protobuf } from "https://taisukef.github.io/protobuf-es.js/dist/protobuf-es.js";
|
import { protobuf } from "https://taisukef.github.io/protobuf-es.js/dist/protobuf-es.js";
|
||||||
import {
|
import {
|
||||||
create,
|
create,
|
||||||
@ -284,8 +284,8 @@ function initUI() {
|
|||||||
const membershipIdInput = document.getElementById("membership-id");
|
const membershipIdInput = document.getElementById("membership-id");
|
||||||
const idSecretHashInput = document.getElementById("id-secret-hash");
|
const idSecretHashInput = document.getElementById("id-secret-hash");
|
||||||
const commitmentKeyInput = document.getElementById("commitment-key");
|
const commitmentKeyInput = document.getElementById("commitment-key");
|
||||||
const idTrapdoorInput = document.getElementById("id-trapdoor")
|
const idTrapdoorInput = document.getElementById("id-trapdoor");
|
||||||
const idNullifierInput = document.getElementById("id-nullifier")
|
const idNullifierInput = document.getElementById("id-nullifier");
|
||||||
const importManually = document.getElementById("import-manually-button");
|
const importManually = document.getElementById("import-manually-button");
|
||||||
const importFromWalletButton = document.getElementById(
|
const importFromWalletButton = document.getElementById(
|
||||||
"import-from-wallet-button"
|
"import-from-wallet-button"
|
||||||
@ -418,9 +418,13 @@ function initUI() {
|
|||||||
const idCommitment = utils.hexToBytes(commitmentKeyInput.value);
|
const idCommitment = utils.hexToBytes(commitmentKeyInput.value);
|
||||||
const idSecretHash = utils.hexToBytes(idSecretHashInput.value);
|
const idSecretHash = utils.hexToBytes(idSecretHashInput.value);
|
||||||
|
|
||||||
|
|
||||||
const membershipId = membershipIdInput.value;
|
const membershipId = membershipIdInput.value;
|
||||||
const credentials = new IdentityCredential(idTrapdoor, idNullifier, idSecretHash, idCommitment);
|
const credentials = new IdentityCredential(
|
||||||
|
idTrapdoor,
|
||||||
|
idNullifier,
|
||||||
|
idSecretHash,
|
||||||
|
idCommitment
|
||||||
|
);
|
||||||
|
|
||||||
fn(membershipId, credentials);
|
fn(membershipId, credentials);
|
||||||
});
|
});
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user