forked from Mirrors/doipjs
feat: add verification result validation function
This commit is contained in:
parent
ba6941448c
commit
264645b381
1 changed files with 8 additions and 1 deletions
|
@ -267,8 +267,15 @@ export class Claim {
|
|||
viaProxy: proofData.viaProxy
|
||||
}
|
||||
|
||||
// Post process the data
|
||||
// Validate the result
|
||||
const def = _data[claimData.about.id]
|
||||
if (def.functions?.validate && verificationResult.completed && verificationResult.result) {
|
||||
try {
|
||||
(verificationResult.result = await def.functions.validate(claimData, proofData, verificationResult, opts))
|
||||
} catch (_) {}
|
||||
}
|
||||
|
||||
// Post process the data
|
||||
if (def.functions?.postprocess) {
|
||||
try {
|
||||
({ claimData, proofData } = await def.functions.postprocess(claimData, proofData, opts))
|
||||
|
|
Loading…
Reference in a new issue