Closed lllwvlvwlll closed 4 years ago
I've added a NeoVivid class to the sdk which includes a high-level method to getting and decrypt claims using the smart contracts. Usecase notes:
decrypted_value === undefined
, the user was unable to decrypt the attestation payload. This can happen for a number of reasons. In the case of our UI, decrypted_value === undefined
display ***********
for the valueexample:
const claim = await sdk.Vivid.getDecryptedClaimByClaimID(this.neo_network, this.contracts.neo_cns, claim_id, this.contract_admin_wif)
console.log(claim)
/*
{ claim_id: 'GBwRsliN49Bs7bPW',
attestations:
[ { remark: '',
value:
'6895edfb152af6e66e1a6f7e90b435976a1c312c7ccf96e0d2695b25cafd8163',
encryption: 'symmetric_aes256',
identifier: 'EMAIL',
decrypted_value: 'clementine84@gmail.com' } ],
signed_by:
'02498c5c154df8a2b26047a9205d1329aa0d626a1ef9185a7e3ae4993290905afd',
signature:
'2f8e0fd946b26d683b2eab2badae8d2c390872b7838afaa1ae8e43102730473741c3fe65fa3127acaec205787bcc16c585a47eadbfb78c55c35730f1aad57a78',
sub:
'039bccbd5684038bd79fda6e30c64921f7b629eb2709d4f6a7e8f0ef9fb6a081f7',
claim_topic: 'email',
expires: undefined,
verification_uri: 'http://localhost:8000' }
*/
@rockacola fyi
Thanks for the update.
This unblocks https://github.com/Moonlight-io/vega/issues/524
Reference/guidance for its implementation: