forked from hyperledger-archives/indy-sdk
-
Notifications
You must be signed in to change notification settings - Fork 3
/
step3.js
27 lines (27 loc) · 895 Bytes
/
step3.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
27
log("9. Prover gets Credentials for Proof Request")
const proofRequest = {
'nonce': '123432421212',
'name': 'proof_req_1',
'version': '0.1',
'requested_attributes': {
'attr1_referent': {
'name': 'name',
'restrictions': [{
'cred_def_id': credDefId
/*
'issuer_did': issuerDid,
'schema_key': schemaKey
*/
}]
}
},
'requested_predicates': {
'predicate1_referent': {
'name': 'age',
'p_type': '>=',
'p_value': 18,
'restrictions': [{'issuer_did': issuerDid}]
}
}
}
const credsForProofRequest = await indy.proverGetCredentialsForProofReq(proverWalletHandle, proofRequest)