hackchat-engine 1.1.25 → 1.1.26

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.
Files changed (2) hide show
  1. package/Client.js +9 -4
  2. package/package.json +1 -1
package/Client.js CHANGED
@@ -375,15 +375,20 @@ class Client extends EventEmitter {
375
375
  }
376
376
 
377
377
  /**
378
- * Sends a Solana signature and the signed message back to the server for verification
379
- * @param {string} signature The base64 or hex encoded signature from the client's wallet
380
- * @param {string} signedMessage The original human-readable message that was signed
378
+ * Sends a Solana signature request to the server for authentication
379
+ * @param {string} wallet The name of the wallet provider (e.g., 'Phantom')
380
+ * @param {string} address The public key of the connecting wallet
381
+ * @param {string} [domain] The domain requesting the signature. Optional / autodetected
381
382
  */
382
- requestSiw(wallet, address) {
383
+ requestSiw(wallet, address, domain) {
384
+ const requestDomain = domain
385
+ || (typeof window !== 'undefined' && window.location ? window.location.host : 'hack.chat');
386
+
383
387
  this.ws.send({
384
388
  cmd: OPCodes.REQUEST_SIW,
385
389
  wallet,
386
390
  address,
391
+ domain: requestDomain,
387
392
  });
388
393
  }
389
394
 
package/package.json CHANGED
@@ -59,5 +59,5 @@
59
59
  "lintfix": "eslint --fix --ignore-path .gitignore .",
60
60
  "test": "echo \"Error: no test specified\" && exit 1"
61
61
  },
62
- "version": "1.1.25"
62
+ "version": "1.1.26"
63
63
  }