@zkproofport-app/sdk 0.4.2 → 0.4.3
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.
- package/README.md +2 -0
- package/dist/index.esm.js +7 -0
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +7 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +7 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3127,6 +3127,13 @@ class ProofportSDK {
|
|
|
3127
3127
|
inputs,
|
|
3128
3128
|
challenge,
|
|
3129
3129
|
};
|
|
3130
|
+
// The relay never reads `inputs`, so the scope is also sent on the envelope,
|
|
3131
|
+
// where the relay counts requests per scope. The app proves the scope inside
|
|
3132
|
+
// `inputs` and uses the envelope copy only when `inputs` has none; both are
|
|
3133
|
+
// the same string here.
|
|
3134
|
+
const scope = inputs.scope;
|
|
3135
|
+
if (typeof scope === 'string' && scope.length > 0)
|
|
3136
|
+
body.scope = scope;
|
|
3130
3137
|
// Sign challenge for circuits that require wallet signature
|
|
3131
3138
|
if (needsSignature && this.signer) {
|
|
3132
3139
|
body.signature = await this.signer.signMessage(challenge);
|