mirror of
https://github.com/ProvableHQ/leo.git
synced 2024-11-23 23:23:50 +03:00
d44457fc32
* bump snarkvm rev * update default gitignore * impl leo execute * bump snarkvm 0.14.5 * modify examples wip * update run.sh examples * impl env file * clippy warning * fix auction example * fix auction example env * generate new private key for new env - tests failing due to env not found err * commit error changes * Fix tests; clippy * Get examples working * leo build checks that build dir is well formed; clippy * Clean up * Update examples/README.md Co-authored-by: d0cd <pranavsaig@gmail.com> Signed-off-by: Collin Chin <16715212+collinc97@users.noreply.github.com> * do not commit .avm files * use snarkvm commands --------- Signed-off-by: Collin Chin <16715212+collinc97@users.noreply.github.com> Co-authored-by: Pranav Gaddamadugu <pranav@aleo.org> Co-authored-by: d0cd <pranavsaig@gmail.com> |
||
---|---|---|
.. | ||
build | ||
inputs | ||
src | ||
.env | ||
.gitignore | ||
program.json | ||
README.md |
Leo group operations.
Run Guide
To run this program, run:
leo run fibonacci
Execute Guide
To execute this program, run:
leo execute fibonacci
Overview
This example shows how to do basic operations over groups.
It takes the input data from inputs/groups.in
Documentation Group Element
The set of affine points on the elliptic curve passed into the Leo compiler forms a group.
A subset of those points, defined by a chosen generator point, forms a subgroup of the group.
Leo supports the set of points in this subgroup as a primitive data type.
Group elements are special since their values can be defined as coordinate pairs (x, y)group
.
The group
type keyword group must be used when specifying a pair of group coordinates since implicit syntax would collide with normal tuple (a, b)
values.
let a = 0group; // the zero of the group
let b = group::GEN; // the group generator
let c = (0, 1)group; // coordinate notation