feat(vt-flow): applicant verification + on-chain permission session#442
Conversation
Signed-off-by: Tarun Vadde <vaddeofficial@gmail.com>
Signed-off-by: Tarun Vadde <vaddeofficial@gmail.com>
lotharking
left a comment
There was a problem hiding this comment.
Just a suggestion: please don’t forget to run this test with a funded wallet
| throw new Error('Record has no credentialExchangeRecordId; nothing to verify') | ||
| } | ||
|
|
||
| const holderPerm = await chain.getPermission(Number(record.permId)) |
There was a problem hiding this comment.
If possible, I would prefer to use the indexer API to resolve this.
However, we should keep in mind that there is a possibility that the indexer may become inconsistent with the ledger. In those cases, I would rather detect and surface these kinds of errors explicitly to preserve consistency.
There was a problem hiding this comment.
Switched the two perm lookups in verifyOfferedCredential to VeranaIndexerService.getPermission(). Kept chain RPC as a fallback when callers don't wire an indexer (auto-flow path, existing tests) so this doesn't break those. Please let me know if there's anything else to be done here.
Yes, @lotharking. I tested with my funded wallet and also verified transactions here |
Signed-off-by: Tarun Vadde <vaddeofficial@gmail.com>
|
Hey @genaris, looks good from my side. |
verifyOfferedCredentialruns the on-chain validator-active check , plus a digest soft check, wired into the e2everifyCredentialhook so the verification path is actually utilized.validateAndOfferCredentialnow callscreateOrUpdatePermissionSessionaftersetPermissionVPToValidatedpublishCredentialAsLinkedVpextractsschemaBaseIdfromcredentialSchema.idso the LinkedVP endpoint matches the schema.