You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Verify a proof of execution from an offline execution
1955
+
* Verify a proof from an offline execution. This is useful when it is desired to do offchain proving and verification.
1956
1956
*
1957
-
* @param {executionResponse} executionResponse
1957
+
* @param {executionResponse} executionResponse The response from an offline function execution (via the `programManager.run` method)
1958
+
* @param {ImportedPrograms} imports The imported programs used in the execution. Specified as { "programName": "programSourceCode", ... }
1959
+
* @param {ImportedVerifyingKeys} importedVerifyingKeys The verifying keys in the execution. Specified as { "programName": [["functionName", "verifyingKey"], ...], ... }
1958
1960
* @returns {boolean} True if the proof is valid, false otherwise
1961
+
*
1962
+
* @example
1963
+
* /// Import the mainnet version of the sdk used to build executions.
1964
+
* import { Account, ProgramManager } from "@provablehq/sdk/mainnet.js";
1965
+
*
1966
+
* /// Create the source for two programs.
1967
+
* const program = "import add_it_up.aleo; \n\n program mul_add.aleo;\n\nfunction mul_and_add:\n input r0 as u32.public;\n input r1 as u32.private;\n mul r0 r1 into r2;\n call add_it_up.aleo/add r1 r2 into r3; output r3 as u32.private;\n";
1968
+
* const program_import = "program add_it_up.aleo;\n\nfunction add:\n input r0 as u32.public;\n input r1 as u32.private;\n add r0 r1 into r2;\n output r2 as u32.private;\n";
1969
+
* const programManager = new ProgramManager(undefined, undefined, undefined);
1970
+
*
1971
+
* /// Create a temporary account for the execution of the program
0 commit comments