pairnet 0.2.2 → 0.2.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.
Files changed (2) hide show
  1. package/index.js +2 -2
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -323,7 +323,7 @@ module.exports = {
323
323
  port, onQuery,
324
324
  });
325
325
  },
326
- createServer: async function (_option) {
326
+ createServer: async function (_options) {
327
327
  let { hostname, port, onConnect, onDisconnect, onQuery, onPaired } = validateOptions(arguments, {
328
328
  hostname: [ isNonEmptyString ], /* undefined == listen on all public interfaces */
329
329
  port: [ required, isPortNumber ],
@@ -372,7 +372,7 @@ module.exports = {
372
372
  // TODO: What happens if a client chooses to remain connected after pairing? Can this possibility result in any security issues?
373
373
  let data = await store.removeValidPairingToken(token);
374
374
  await store.trustPeer(clientFingerprint, { data });
375
- await onPaired?.(clientFingerprint);
375
+ await onPaired?.(clientFingerprint, data);
376
376
  return true;
377
377
  } else {
378
378
  // TODO: Force disconnect?
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pairnet",
3
- "version": "0.2.2",
3
+ "version": "0.2.3",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "keywords": [],