Electron-ed25519 is a wrapper to interact with Electron-ed25519 dedicated server.
npm install electron-ed25519Electron-ed25519 is a wrapper to interact with Electron-ed25519 dedicated server.
bash
npm i electron-ed25519
`Usage
`javascript
//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
signatures, // Array
)
// Get public inputs and proof once its generated
let res = await ed25519.getProof(proof_gen_id);
``