Skip to content

Commit

Permalink
Adding example1.circuit to should-pass tests
Browse files Browse the repository at this point in the history
  • Loading branch information
adityanathan committed Aug 21, 2024
1 parent 6b2da3f commit ce97d35
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions compiler/tests/should-pass/circuit/commitment/example1.circuit
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
host alice
host bob
host chuck

circuit fun <> handleCommitment@Commitment(alice, {bob, chuck})(a: int[]) -> b:int[] {
return a
}

fun <> main() -> {
val a@Local(host = alice) = alice.input<int[]>()
val c@Commitment(alice, {bob, chuck}) = handleCommitment(a) /* createCommitment(a) */
val d@Replication({bob, chuck}) = handleCommitment(c) /* openCommitment(a) */
}

0 comments on commit ce97d35

Please sign in to comment.