snarkyjs-elgamal
Version:
This repository implements Elgmal, a partial homomorphic encryption scheme originally described by [Taher Elgamal in 1985](https://caislab.kaist.ac.kr/lecture/2010/spring/cs548/basic/B02.pdf). This implementation includes the original version of Elgamal,
16 lines (15 loc) • 530 B
TypeScript
import { Field, SmartContract, State } from 'snarkyjs';
/**
* Basic Example
* See https://docs.minaprotocol.com/zkapps for more info.
*
* The Add contract initializes the state variable 'num' to be a Field(1) value by default when deployed.
* When the 'update' method is called, the Add contract adds Field(2) to its 'num' contract state.
*
* This file is safe to delete and replace with your own contract.
*/
export declare class Add extends SmartContract {
num: State<Field>;
init(): void;
update(): void;
}