@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/dist/index.mjs CHANGED
@@ -5989,6 +5989,13 @@ class ProofportSDK {
5989
5989
  inputs,
5990
5990
  challenge,
5991
5991
  };
5992
+ // The relay never reads `inputs`, so the scope is also sent on the envelope,
5993
+ // where the relay counts requests per scope. The app proves the scope inside
5994
+ // `inputs` and uses the envelope copy only when `inputs` has none; both are
5995
+ // the same string here.
5996
+ const scope = inputs.scope;
5997
+ if (typeof scope === 'string' && scope.length > 0)
5998
+ body.scope = scope;
5992
5999
  // Sign challenge for circuits that require wallet signature
5993
6000
  if (needsSignature && this.signer) {
5994
6001
  body.signature = await this.signer.signMessage(challenge);