Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: reveal() has been renamed to to_public() #42

Merged
merged 1 commit into from
Nov 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.

Loading