ProofRequestSpec
A ProofRequestSpec allows us to generate a ProofRequest from a set of Podspecs defining the allowable PODs.
Type Parameters
• P extends PodspecProofRequest
<T
>
• T extends NamedPODs
Properties
schema
readonly
schema:PodspecProofRequest
<T
>
The schema of the PODs that are allowed in this proof.
Defined in
packages/podspec/src/gpc/proof_request.ts:65
Methods
getProofRequest()
getProofRequest():
ProofRequest
Get the ProofRequest that this ProofRequestSpec defines.
Returns
A ProofRequest.
Defined in
packages/podspec/src/gpc/proof_request.ts:83
queryForInputs()
queryForInputs(
pods
):Record
<keyofP
["pods"
],POD
[]>
A ProofRequest defines a GPCProofConfig and part of the GPCProofInputs - specifically the watermark, external nullifier, and membership lists. However, a GPC proof also requires PODs as inputs. Since we know from our schema which PODs would be acceptable inputs, we can take an array of PODs and return a mapping of the require POD names to the PODs from the array which would be suitable as inputs in each slot respectively.
Parameters
• pods: POD
[]
The PODs to query.
Returns
Record
<keyof P
["pods"
], POD
[]>
A record of the PODs that are allowed in this proof.
Defined in
packages/podspec/src/gpc/proof_request.ts:99
create()
static
create<P
,T
>(schema
):ProofRequestSpec
<P
,T
>
Create a new ProofRequestSpec.
Type Parameters
• P extends PodspecProofRequest
<T
>
• T extends NamedPODs
Parameters
• schema: PodspecProofRequest
<T
>
The schema of the PODs that are allowed in this proof.
Returns
ProofRequestSpec
<P
, T
>
A new ProofRequestSpec.