@mattrglobal/verifier-sdk-web 2.0.3-unstable.48 → 2.0.3-unstable.49

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -775,8 +775,7 @@ const requestCredentialsWithDigitalCredentialsApi = async options => {
775
775
  sessionId: sessionId,
776
776
  sessionKey: sessionKey,
777
777
  challenge: challenge,
778
- protocol: parsedCredentialResponse.protocol,
779
- data: parsedCredentialResponse.data
778
+ response: parsedCredentialResponse
780
779
  });
781
780
  if (credentialVerificationResult.isErr()) {
782
781
  return neverthrow.err({
@@ -855,12 +854,10 @@ const parseCredentialResponse = credentialResponse => {
855
854
  };
856
855
 
857
856
  const verifyCredentialResponse = async options => {
858
- const {apiBaseUrl: apiBaseUrl, sessionId: sessionId, sessionKey: sessionKey, challenge: challenge, protocol: protocol, data: data} = options;
859
- const requestBody = {
860
- protocol: protocol,
861
- data: data,
857
+ const {apiBaseUrl: apiBaseUrl, sessionId: sessionId, sessionKey: sessionKey, challenge: challenge, response: response} = options;
858
+ const requestBody = Object.assign(Object.assign({}, response), {
862
859
  challenge: challenge
863
- };
860
+ });
864
861
  const credentialVerificationResult = await safeFetch(`${apiBaseUrl}/v2/presentations/web/sessions/${sessionId}/dc-api/response`, {
865
862
  method: "POST",
866
863
  headers: {