#Both publicInput and publicOutput

3 messages · Page 1 of 1 (latest)

pulsar bronze
#

Are there any examples out in the wild of a ZkProgram with both publicInput and publicOutput? Something like https://github.com/o1-labs/o1js/blob/c3974f83053cefd050fcf458bc97afc5bd384415/src/examples/program-with-input.ts#L36. In particular, I'm interesting in validating a use-case where I want prove that the publicOutput of one SelfProof is equal to the publicInput of a second SelfProof. Is there a nicer/nice way to do this? I guess I can just hold on to the Field value and include it as another parameter in an "inductiveCase" method?

GitHub

TypeScript framework for zk-SNARKs and zkApps. Contribute to o1-labs/o1js development by creating an account on GitHub.

lyric abyss
#

In particular, I'm interesting in validating a use-case where I want prove that the publicOutput of one SelfProof is equal to the publicInput of a second SelfProof. Is there a nicer/nice way to do this? I guess I can just hold on to the Field value and include it as another parameter in an "inductiveCase" method?

If a SelfProof is part of your inputs, then you can already access its public output at proof.publicOutput. So no need to use another parameter