-
Notifications
You must be signed in to change notification settings - Fork 8
Presentations examples
Daniel Luque Quintana edited this page May 23, 2020
·
1 revision
Output
createPresentation ----------> { header:
{ alg: 'ES256K',
typ: 'JWT',
kid: 'did:ala:quor:redt:QmeeasCZ9jLbXueBJ7d7csxhb#keys-1' },
payload:
{ jti: 'https://www.empresa.com/alastria/credentials/3732',
iss: 'did:alastria:quorum:redt:QmeeasCZ9jLbX...ueBJ7d7csxhb',
aud: 'did:alastria:quorum:redt:QmeeasCZ9jLbX...ueBJ7d7csxhb',
iat: 1589920877,
exp: 1530735444,
nbf: 1525465044,
vp:
{ '@context': [Array],
type: [Array],
procUrl: 'https://www.empresa.com/alastria/businessprocess/4583',
procHash: 'H398sjHd...kldjUYn475n',
verifiableCredential: [Array] } } }
signedJWTPresentation -------------> eyJ0eXAiOiJKV1QiLCJhbGciOiJFUzI1NksiLCJraWQiOiJkaWQ6YWxhOnF1b3I6cmVkdDpRbWVlYXNDWjlqTGJYdWVCSjdkN2NzeGhiI2tleXMtMSJ9.eyJqdGkiOiJodHRwczovL3d3dy5lbXByZXNhLmNvbS9hbGFzdHJpYS9jcmVkZW50aWFscy8zNzMyIiwiaXNzIjoiZGlkOmFsYXN0cmlhOnF1b3J1bTpyZWR0OlFtZWVhc0NaOWpMYlguLi51ZUJKN2Q3Y3N4aGIiLCJhdWQiOiJkaWQ6YWxhc3RyaWE6cXVvcnVtOnJlZHQ6UW1lZWFzQ1o5akxiWC4uLnVlQko3ZDdjc3hoYiIsImlhdCI6MTU4OTkyMDg3NywiZXhwIjoxNTMwNzM1NDQ0LCJuYmYiOjE1MjU0NjUwNDQsInZwIjp7IkBjb250ZXh0IjpbImh0dHBzOi8vd3d3LnczLm9yZy8yMDE4L2NyZWRlbnRpYWxzL3YxIiwiSldUIl0sInR5cGUiOlsiVmVyaWZpYWJsZVByZXNlbnRhdGlvbiJdLCJwcm9jVXJsIjoiaHR0cHM6Ly93d3cuZW1wcmVzYS5jb20vYWxhc3RyaWEvYnVzaW5lc3Nwcm9jZXNzLzQ1ODMiLCJwcm9jSGFzaCI6IkgzOThzakhkLi4ua2xkalVZbjQ3NW4iLCJ2ZXJpZmlhYmxlQ3JlZGVudGlhbCI6W3t9XX19.bXyaphH_b1hIG5rdRJ-fbiypyZz6X81O12ngLSygmSswcsvHqKMo44qKCi7cF_c2JVIVZ3e1kimwy33xf49C-Q
The PSMHashSubject1 is: 0x5fbc15908149ffdf4b5396d65fdc4100d5085d88e77b6991722ceb7378b2540a
The PSMHashEntity2 is: 0x2ad4720826e5daa21b070c9c65fcdf85a94348bb3ea33cda24281c885310fa54
(subject1PresentationSigned)The transaction bytes data is: 0xf9018882045780830927c094bd4a2c84edb97be5beff7cd341bd63567e73f8c980b90124597b2e9b00000000000000000000000054d1dbfacada17ff39f2bac08e05fbdb4659f6710000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000844e3a5de55fbc15908149ffdf4b5396d65fdc4100d5085d88e77b6991722ceb7378b2540a0000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000e7777772e676f6f676c652e636f6d000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001ca040c79241b81715fd8fe58eea2800801a8f8d01a90b7cfcfaefe284bc05800de3a015cca5663c790de2947e5789a3be95374d680ed15c24d4590d3771c8ca8181df
Receipt ---------> { blockHash:
'0x04ba69cce477c75cad0c7476571717a6885358af30fa48714af7e82f831d394f',
blockNumber: 40134427,
contractAddress: null,
cumulativeGasUsed: 124581,
from: '0x806bc0d7a47b890383a831634bcb92dd4030b092',
gasUsed: 124581,
logs:
[ { address: '0x9d68DB2F1E7Bf4c65DBD31F6CC9F2adeb86D584d',
topics: [Array],
data:
'0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000844e3a5de55fbc15908149ffdf4b5396d65fdc4100d5085d88e77b6991722ceb7378b2540a0000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000e7777772e676f6f676c652e636f6d00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000',
blockNumber: 40134427,
transactionHash:
'0xb88697325d37abb811303685bd0dd2b2172f3df67819d914588ee9a70d95bc4e',
transactionIndex: 0,
blockHash:
'0x04ba69cce477c75cad0c7476571717a6885358af30fa48714af7e82f831d394f',
logIndex: 0,
removed: false,
id: 'log_d5de6ddd' } ],
logsBloom:
'0x00000000040010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000280000000000000000000000000000080000000010000000000000000002000000000000000000000000000000000000000000000000000000000000000000001100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000',
status: true,
to: '0xbd4a2c84edb97be5beff7cd341bd63567e73f8c9',
transactionHash:
'0xb88697325d37abb811303685bd0dd2b2172f3df67819d914588ee9a70d95bc4e',
transactionIndex: 0 }
Output
presentationStatus ------> { exist: false, status: '0' }
Output
presentationStatus ------> { exist: true, status: '0' }
Output
------ Getting Presentation List ------
(presentationList) Transaction ------> { to: '0x54d1dbfacada17ff39f2bac08e05fbdb4659f671',
data:
'0xc00dcd0e0000000000000000000000009d68db2f1e7bf4c65dbd31f6cc9f2adeb86d584d',
gasLimit: 600000,
gasPrice: 0,
nonce: '0x0' }
(subjectPresentationList) Transaction -------> 0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000
(presentationListresult) TransactionList: { uint: '0', 'bytes32[]': [] }
Output
------ Getting Presentation List ------
(presentationList) Transaction ------> { to: '0x54d1dbfacada17ff39f2bac08e05fbdb4659f671',
data:
'0xc00dcd0e0000000000000000000000009d68db2f1e7bf4c65dbd31f6cc9f2adeb86d584d',
gasLimit: 600000,
gasPrice: 0,
nonce: '0x0' }
(subjectPresentationList) Transaction -------> 0x0000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000015fbc15908149ffdf4b5396d65fdc4100d5085d88e77b6991722ceb7378b2540a
(presentationListresult) TransactionList: { uint: '1',
'bytes32[]':
[ '0x5fbc15908149ffdf4b5396d65fdc4100d5085d88e77b6991722ceb7378b2540a' ] }
Output
(updateSubjectPresentation)The transaction bytes data is: 0xf9014782045680830927c094bd4a2c84edb97be5beff7cd341bd63567e73f8c980b8e4597b2e9b00000000000000000000000054d1dbfacada17ff39f2bac08e05fbdb4659f671000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000044e64af938a02258fcfe216f1b8a72e6bbcf6195694445bbdd180770292a93cfb7417da9570000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000001ca0059a68230ec990f0f417cef055a1985cda3cdc97ae1fab17f41e8174f524257ca02559f48b7e9474cdf94a3265a9589f97d1d182e56f5c0cf239c59954d09f8b97
presentationStatus of the subject1 ------> { exist: false, status: '0' }
Output
(updateSubjectPresentation)The transaction bytes data is: 0xf9014782045880830927c094bd4a2c84edb97be5beff7cd341bd63567e73f8c980b8e4597b2e9b00000000000000000000000054d1dbfacada17ff39f2bac08e05fbdb4659f671000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000044e64af9385fbc15908149ffdf4b5396d65fdc4100d5085d88e77b6991722ceb7378b2540a0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000001ca0a5c067a341f3cf747707757c5f04f55ffc89a5c9c52ae1bbc23d125acf73a29ba00860a42c44f95784743a26a416c11bd1f4d5aa676be4001fe8b2863536b0435d
presentationStatus of the subject1 ------> { exist: true, status: '2' }
Output
(updateEntity2Presentation)The transaction bytes data is: 0xf9014782034c80830927c094bd4a2c84edb97be5beff7cd341bd63567e73f8c980b8e4597b2e9b00000000000000000000000054d1dbfacada17ff39f2bac08e05fbdb4659f6710000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000443000dc39b9cf04f63f720f6329b43c113ff4df7f41b402fdad07efd1decb882aafffde8d0000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000001ca067376435d30c709d1ddae3c78e0f3cd2edbcd461a3a515e280c50abcdad41779a0265556f469ccf92a5ebf7bd98f4a6240cbb1801972527e6d61beb097aebd7046
presentationStatus of the entity2------> { exist: true, status: '1' }
Output
presentationStatus ------> { exist: false, status: '0' }
Output
presentationStatus ------> { exist: true, status: '1' }
Output
AskDeletion => 2