diff --git a/apps/client-web/.gitignore b/apps/client-web/.gitignore index a547bf3..c6d388a 100644 --- a/apps/client-web/.gitignore +++ b/apps/client-web/.gitignore @@ -22,3 +22,4 @@ dist-ssr *.njsproj *.sln *.sw? +public/artifacts/* diff --git a/apps/client-web/index.html b/apps/client-web/index.html index 1975e38..1f85e1a 100644 --- a/apps/client-web/index.html +++ b/apps/client-web/index.html @@ -5,7 +5,7 @@
{key}
-This proof will reveal the following data from your PODs:
+ {Object.entries(proveOperation.proofRequest.pods).map( + ([name, schema]) => { + return ( +- {JSON.stringify(proof, null, 2)} + {JSONBig.stringify(proof, null, 2)})} diff --git a/packages/app-connector/src/api_wrapper.ts b/packages/app-connector/src/api_wrapper.ts index 95ebb4f..6763069 100644 --- a/packages/app-connector/src/api_wrapper.ts +++ b/packages/app-connector/src/api_wrapper.ts @@ -98,15 +98,17 @@ class ParcnetGPCWrapper { // In a world with POD2, we would use new POD2 types rather than GPCPCD. // The existing args system and GPC wrapper works well, so we can use that. - async prove(args: PodspecProofRequest): Promise
>( + args: PodspecProofRequest
+ ): Promise >(
proof: GPCProof,
revealedClaims: GPCRevealedClaims,
- proofRequest: PodspecProofRequest
+ proofRequest: PodspecProofRequest
): Promise {
+export class ProofRequestSpec<
+ P extends PodspecProofRequest (
- schema: P
- ): ProofRequestSpec {
+ public static create , T extends Pods>(
+ schema: PodspecProofRequest {
return new ProofRequestSpec(schema);
}
@@ -76,7 +92,12 @@ export class ProofRequestSpec {
*/
public queryForInputs(pods: POD[]): Record {
/**
* Export for convenience.
*/
-export const proofRequest = (schema: P) =>
+export const proofRequest = (schema: PodspecProofRequest ) =>
ProofRequestSpec.create(schema);
/**
@@ -95,12 +116,16 @@ export const proofRequest = (schema: P) =>
* @param request The PodspecProofRequest to derive the ProofRequest from.
* @returns A ProofRequest.
*/
-function makeProofRequest(request: PodspecProofRequest): ProofRequest {
+function makeProofRequest (
+ request: PodspecProofRequest
+): ProofRequest {
const pods: Record