forked from hyperledger-archives/indy-sdk
-
Notifications
You must be signed in to change notification settings - Fork 3
/
step4.js
26 lines (26 loc) · 876 Bytes
/
step4.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
log("10. Prover creates Proof for Proof Request")
const credForAttr1 = credsForProofRequest["attrs"]["attr1_referent"]
const referent = credForAttr1[0].cred_info.referent
const requestedCredentials = {
"self_attested_attributes": {},
"requested_attributes": {
"attr1_referent": {
cred_id: referent,
revealed: true
}
},
"requested_predicates": {
"predicate1_referent": {
cred_id: referent
}
}
}
const schemas = {
[schemaId]: schema
}
const credentialDefs = {
[credDefId]: credDef
}
const revocRegs = {}
const revRegs = {}
const proof = await indy.proverCreateProof(proverWalletHandle, proofRequest, requestedCredentials, proverMasterSecret, schemas, credentialDefs, revocRegs)