Skip to content

Commit

Permalink
fix: reveal() has been renamed to to_public()
Browse files Browse the repository at this point in the history
  • Loading branch information
navasvarela committed Nov 21, 2024
1 parent 203298a commit fa8d524
Show file tree
Hide file tree
Showing 3 changed files with 2,490 additions and 4 deletions.
5 changes: 3 additions & 2 deletions src/reveal.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
from nada_dsl import *


def nada_main():
party = Party(name="Alice")
num = SecretInteger(Input(name="favorite_number", party=party))
base = num.reveal()
base = num.to_public()
# power operations can only be performed on public integers, so the input needs to be revealed
num_squared = base ** Integer(2)
return [Output(num_squared, "num_squared", party)]
return [Output(num_squared, "num_squared", party)]
1,195 changes: 1,194 additions & 1 deletion streamlit_demo_apps/compiled_nada_programs/list_scan_linear.nada.json

Large diffs are not rendered by default.

1,294 changes: 1,293 additions & 1 deletion streamlit_demo_apps/compiled_nada_programs/voting.nada.json

Large diffs are not rendered by default.

0 comments on commit fa8d524

Please sign in to comment.