ShareGuard
A check the wallet runs after the holder approves sharing and before anything leaves the phone, for the credential types it names. The optional sdk-face module supplies the one customers use: a selfie liveness check plus a face match against the credential's own photo ("prove it's you").
Order on every path (in person, website, same-device): consent → guard → sign → send. A guard that does not pass means the response is never signed; the verifier sees a cancelled exchange and the wallet reports com.wallet.model.SdkError.Kind.FACE_CHECK_FAILED or com.wallet.model.SdkError.Kind.FACE_CHECK_UNAVAILABLE.
Set it once in SdkConfig.shareGuard. Credential types outside docTypes are shared exactly as before.
Properties
Functions
Runs after the holder taps Share. Return ShareGuardResult.Pass to let the credential go out.
Optional early check that this credential can ever pass (for example: does its photo contain a usable face?). Called by com.wallet.clients.WalletClient.prepareForSharing; the default passes.