Skip to content

Nillion-nada-program-hacker-house #49

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
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
1 change: 1 addition & 0 deletions nillion-python-starter
Submodule nillion-python-starter added at 15e9fe
Empty file added nohup.out
Empty file.
20 changes: 20 additions & 0 deletions quickstart_complete/client_code/addition_simple.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
from nada_dsl import *

def nada_main():
party1 = Party(name="Party1")
party2 = Party(name="Party2")

my_int1 = SecretInteger(Input(name="my_int1", party=party1))
my_int2 = SecretInteger(Input(name="my_int2", party=party1))
my_int3 = SecretInteger(Input(name="my_int3", party=party2))

# Add my_int1 and my_int2
intermediate_result = my_int1 + my_int2

# Add the intermediate result to my_int3 from party2
final_result = intermediate_result + my_int3


# Output the final result to both parties
return [Output(final_result, "final_output_party1", party1),
Output(final_result, "final_output_party2", party2)]