@cero-base/core 0.4.2 → 0.5.2
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/package.json +1 -1
- package/src/pairing/index.js +3 -3
- package/types/pairing/index.d.ts +2 -2
package/package.json
CHANGED
package/src/pairing/index.js
CHANGED
|
@@ -107,12 +107,12 @@ export class Pairing extends ReadyResource {
|
|
|
107
107
|
* Lets callers detect "already joined" before any handshake. Returns `null`
|
|
108
108
|
* for an unparseable invite.
|
|
109
109
|
*
|
|
110
|
-
* @param {string}
|
|
110
|
+
* @param {string} invite
|
|
111
111
|
* @returns {Uint8Array | null}
|
|
112
112
|
*/
|
|
113
|
-
static inviteTopic(
|
|
113
|
+
static inviteTopic(invite) {
|
|
114
114
|
try {
|
|
115
|
-
return Invite.parse(
|
|
115
|
+
return Invite.parse(invite).blind.discoveryKey
|
|
116
116
|
} catch {
|
|
117
117
|
return null
|
|
118
118
|
}
|
package/types/pairing/index.d.ts
CHANGED
|
@@ -42,10 +42,10 @@ export class Pairing extends ReadyResource {
|
|
|
42
42
|
* Lets callers detect "already joined" before any handshake. Returns `null`
|
|
43
43
|
* for an unparseable invite.
|
|
44
44
|
*
|
|
45
|
-
* @param {string}
|
|
45
|
+
* @param {string} invite
|
|
46
46
|
* @returns {Uint8Array | null}
|
|
47
47
|
*/
|
|
48
|
-
static inviteTopic(
|
|
48
|
+
static inviteTopic(invite: string): Uint8Array | null;
|
|
49
49
|
/**
|
|
50
50
|
* Cheap structural test for a candidate invite string.
|
|
51
51
|
*
|