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.
- package/Client.js +9 -4
- 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
|
|
379
|
-
* @param {string}
|
|
380
|
-
* @param {string}
|
|
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