Skip to content

Commit e8b3dec

Browse files
authored
Merge pull request #68 from reclaimprotocol/hotfix
Hotfix
2 parents acd7865 + 83ed393 commit e8b3dec

File tree

3 files changed

+18
-2
lines changed

3 files changed

+18
-2
lines changed

example/package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@reclaimprotocol/js-sdk",
3-
"version": "4.6.5",
3+
"version": "4.6.6",
44
"description": "Designed to request proofs from the Reclaim protocol and manage the flow of claims and witness interactions.",
55
"main": "dist/index.js",
66
"types": "dist/index.d.ts",

src/Reclaim.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -449,6 +449,7 @@ export class ReclaimProofRequest {
449449
proofRequestInstance.sdkVersion = sdkVersion;
450450
proofRequestInstance.resolvedProviderVersion = resolvedProviderVersion;
451451
proofRequestInstance.modalOptions = modalOptions;
452+
proofRequestInstance.jsonProofResponse = jsonProofResponse ?? false;
452453
return proofRequestInstance
453454
} catch (error) {
454455
logger.info('Failed to parse JSON string in fromJsonString:', error);
@@ -1272,5 +1273,20 @@ export class ReclaimProofRequest {
12721273
logger.info('Modal closed by user');
12731274
}
12741275
}
1276+
1277+
/**
1278+
* Returns whether proofs will be submitted as JSON format
1279+
*
1280+
* @returns boolean - True if proofs are sent as application/json, false for application/x-www-form-urlencoded
1281+
*
1282+
* @example
1283+
* ```typescript
1284+
* const isJson = proofRequest.getJsonProofResponse();
1285+
* console.log('JSON format:', isJson);
1286+
* ```
1287+
*/
1288+
getJsonProofResponse(): boolean {
1289+
return this.jsonProofResponse;
1290+
}
12751291
}
12761292

0 commit comments

Comments
 (0)