light-mode-image
Learn
Functions

sendProximityPresentationResponse

Send a credential presentation response to the verifier over the active proximity session.

As a best practice, leave terminateSession unset and let the verifier close the session. Only the verifier knows when it has finished processing the response and whether it wants to send a follow-up request. On iOS, terminating from the wallet can also cut off a large or slow response before the verifier has read it.

Verifiers do not always close the session as expected, so have a strategy for that case. You can call terminateProximityPresentationSession once an ample timeout has passed after the response was sent, for example five seconds, or you can expose a control in your interface that lets the user terminate the session.

Signature

function sendProximityPresentationResponse(
  options: SendProximityPresentationSessionOptions
): Promise<Result<void, SendProximityPresentationResponseError>>

Parameters

Returns

Promise<Result<void, SendProximityPresentationResponseError>>

A promise that resolves to an ok result once the response has been sent to the verifier.

Throws

InvalidParams if the provided arguments are missing or invalid.

MobileCredentialHolderErrorType.SdkNotInitialized if the SDK has not been initialized.

How would you rate this page?

On this page