@decentnetwork/peer 0.1.20 → 0.1.21
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/peer.js +2 -1
- package/dist/store/friends.d.ts +4 -0
- package/package.json +1 -1
package/dist/peer.js
CHANGED
|
@@ -723,7 +723,8 @@ export class Peer {
|
|
|
723
723
|
address,
|
|
724
724
|
nospam,
|
|
725
725
|
hello: hello ?? existing?.hello,
|
|
726
|
-
status: existing?.status ?? "requested"
|
|
726
|
+
status: existing?.status ?? "requested",
|
|
727
|
+
requestedAt: existing?.requestedAt ?? Date.now()
|
|
727
728
|
});
|
|
728
729
|
this.#persistFriends();
|
|
729
730
|
// Tell every connected TCP relay we want this friend routed; the
|
package/dist/store/friends.d.ts
CHANGED
|
@@ -9,5 +9,9 @@ export type FriendRecord = {
|
|
|
9
9
|
remoteHost?: string;
|
|
10
10
|
remotePort?: number;
|
|
11
11
|
hello?: string;
|
|
12
|
+
/** When we sent the outbound friend request (ms epoch). Set once, even
|
|
13
|
+
* while status stays "requested", so UIs can show how long a request
|
|
14
|
+
* has been pending. */
|
|
15
|
+
requestedAt?: number;
|
|
12
16
|
acceptedAt?: number;
|
|
13
17
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@decentnetwork/peer",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.21",
|
|
4
4
|
"description": "Pure TypeScript port of Elastos Carrier (toxcore-derived) P2P messaging. DHT, onion routing, TCP relay, FlatBuffers app payloads, Express offline relay. Wire-compatible with iOS Beagle and the Carrier C SDK.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|