Rust implementation of NextGraph, a Decentralized and local-first web 3.0 ecosystem
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
import * as api from "ng-sdk-js";
|
|
|
|
import { default as ng } from "./api";
|
|
|
|
|
|
|
|
//console.log("loaded worker");
|
|
|
|
|
|
|
|
onmessage = (e) => {
|
|
|
|
//console.log("Message received by worker", e.data);
|
|
|
|
(async function() {
|
|
|
|
try {
|
|
|
|
let secret_wallet = await ng.wallet_open_wallet_with_pazzle(
|
|
|
|
e.data.wallet,
|
|
|
|
e.data.pazzle,
|
|
|
|
e.data.pin_code
|
|
|
|
);
|
|
|
|
postMessage({success:secret_wallet});
|
|
|
|
} catch (e) {
|
|
|
|
postMessage({error:e});
|
|
|
|
}
|
|
|
|
})();
|
|
|
|
};
|
|
|
|
|
|
|
|
postMessage({loaded:true});
|
|
|
|
|
|
|
|
|