electron-ed25519
v1.0.9
Published
Electron-ed25519 is a wrapper to interact with Electron-ed25519 dedicated server.
Downloads
13
Readme
Electron-ed25519
Electron-ed25519 is a wrapper to interact with Electron-ed25519 dedicated server.
Installation
npm i electron-ed25519
Usage
//Initialise connection
import {Ed25519} from "electron-ed25519";
// Contact Electron Labs for dedicated endpoint and accesskey.
let endpoint = "";
let access_key = "";
const ed25519 = new Ed25519(endpoint, access_key);
// Check if server is live (returns true if server is alive)
let serverRunning = await ed25519.checkServerConnection();
// send a proof generation request for 50 sigs (return proof_generation_id in return)
let proof_gen_id = await ed25519.generateProofRequest(
message, // send the message
public_keys, // Array<string>
signatures, // Array<string>
)
// Get public inputs and proof once its generated
let res = await ed25519.getProof(proof_gen_id);