Skip to content

Commit

Permalink
refactor(program-with-non-pure-input.ts): remove unused NonPureInputP…
Browse files Browse the repository at this point in the history
…rogram to clean up code and improve readability

docs(program-with-non-pure-input.ts): remove console logs related to NonPureInputProgram compilation for clarity and cleanliness
  • Loading branch information
ymekuria committed Nov 26, 2024
1 parent dca7156 commit a91a75b
Showing 1 changed file with 0 additions and 21 deletions.
21 changes: 0 additions & 21 deletions src/examples/zkprogram/program-with-non-pure-input.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,17 +40,6 @@ let NonPureOutputProgram = ZkProgram({
},
});

let NonPureInputProgram = ZkProgram({
name: 'example-with-non-pure-input',
publicInput: MyStruct,

methods: {
baseCase: {
privateInputs: [],
async method(input) {},
},
},
});
console.log('compiling NonPureIOprogram...');
await NonPureIOprogram.compile();
console.log('compile done');
Expand All @@ -71,13 +60,3 @@ let isProof2Valid = await NonPureOutputProgram.verify(proof);
assert(isProof2Valid, 'proof not valid!');
assert(proof.publicOutput.label === 'output');
console.log('output proof', proof);

console.log('compiling NonPureInputProgram...');
await NonPureInputProgram.compile();
console.log('compile done');

({ proof } = await NonPureInputProgram.baseCase(input));
let isProof3Valid = await NonPureInputProgram.verify(proof);
assert(isProof3Valid, 'proof not valid!');
assert(proof.publicInput.label === 'input');
console.log('input proof', proof);

0 comments on commit a91a75b

Please sign in to comment.