Skip to content

Commit

Permalink
added neccesary information to configuration.json to build multivalue…
Browse files Browse the repository at this point in the history
…d credential and cleaned new example
  • Loading branch information
Roberto García committed Nov 8, 2022
1 parent c66f094 commit ab22b79
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
10 changes: 10 additions & 0 deletions configuration.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,16 @@
"subjectAlastriaID": "did:ala:quor:redt:0x12eeaCCA9eEbB78eB97d7cac6b",
"credentialKey": "StudentID",
"credentialValue": "11235813",
"credentialKeyFather":"Driving licence",
"credentialValueFather": {},
"credentialSubKey1": "Driver`s Name",
"credentialSubKey2": "Driver`s Surname",
"credentialSubKey3": "Type of licence",
"credentialSubKey4": "Years with the licence",
"credentialSubValue1": "PersonName",
"credentialSubValue2": "PersonSurname",
"credentialSubValue3": "B",
"credentialSubValue4": "20 years",
"uri": "www.google.com",
"procUrl": "https://www.empresa.com/alastria/businessprocess/4583",
"procHash": "H398sjHd...kldjUYn475n",
Expand Down
12 changes: 4 additions & 8 deletions exampleCredentials/9.addEntityMultivaluedCredential.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ const {
const configData = JSON.parse(rawdata)

const keyDataEntity1 = fs.readFileSync(
//'../keystores/entity1-a9728125c573924b2b1ad6a8a8cd9bf6858ced49.json'
'../keystores/eu-issuer.json'
'../keystores/entity1-a9728125c573924b2b1ad6a8a8cd9bf6858ced49.json'
)
const keystoreDataEntity1 = JSON.parse(keyDataEntity1)

Expand Down Expand Up @@ -48,10 +47,8 @@ const {

const jti = configData.jti
const kidCredential = configData.kidCredential
//const subjectAlastriaID = configData.subjectAlastriaID
const subjectAlastriaID = configData.didEuSubject
//const didEntity1 = configData.didEntity1
const didEntity1 = configData.didEuIssuer
const subjectAlastriaID = configData.subjectAlastriaID
const didEntity1 = configData.didEntity1
const context = configData.context
const tokenExpTime = configData.tokenExpTime
const tokenActivationDate = configData.tokenActivationDate
Expand Down Expand Up @@ -155,8 +152,7 @@ const {
const issuerCredentialTransaction =
transactionFactory.credentialRegistry.getIssuerCredentialStatus(
web3,
//configData.didEntity1,
configData.didEuIssuer,
configData.didEntity1,
credentialHash
)
web3.eth
Expand Down

0 comments on commit ab22b79

Please sign in to comment.