@leofcoin/peernet 1.1.55 → 1.1.57
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/exports/browser/browser-store.js +4 -3
- package/exports/browser/identity.d.ts +7 -4
- package/exports/browser/{index-ba1b3977.js → index-329e0324.js} +1 -1
- package/exports/browser/messages/chat.d.ts +1 -1
- package/exports/browser/messages/data-response.d.ts +1 -1
- package/exports/browser/messages/dht-response.d.ts +1 -1
- package/exports/browser/messages/dht.d.ts +1 -1
- package/exports/browser/messages/peer-response.d.ts +1 -1
- package/exports/browser/messages/peer.d.ts +1 -1
- package/exports/browser/messages/peernet.d.ts +1 -1
- package/exports/browser/messages/ps.d.ts +1 -1
- package/exports/browser/messages/request.d.ts +1 -1
- package/exports/browser/messages/response.d.ts +1 -1
- package/exports/browser/{messages-dd1ad11c.js → messages-000b7f84.js} +1 -1
- package/exports/browser/{peernet-d5023a29.js → peernet-bfbe6fff.js} +943 -884
- package/exports/browser/peernet.d.ts +32 -14
- package/exports/browser/peernet.js +1 -1
- package/exports/peernet.js +26 -12
- package/exports/store.js +11 -9
- package/exports/types/identity.d.ts +7 -4
- package/exports/types/messages/chat.d.ts +1 -1
- package/exports/types/messages/data-response.d.ts +1 -1
- package/exports/types/messages/dht-response.d.ts +1 -1
- package/exports/types/messages/dht.d.ts +1 -1
- package/exports/types/messages/peer-response.d.ts +1 -1
- package/exports/types/messages/peer.d.ts +1 -1
- package/exports/types/messages/peernet.d.ts +1 -1
- package/exports/types/messages/ps.d.ts +1 -1
- package/exports/types/messages/request.d.ts +1 -1
- package/exports/types/messages/response.d.ts +1 -1
- package/exports/types/peernet.d.ts +32 -14
- package/package.json +4 -3
- package/src/identity.ts +21 -10
- package/src/peernet.ts +26 -3
- package/tsconfig.json +1 -1
|
@@ -331,13 +331,14 @@ class BrowerStore {
|
|
|
331
331
|
});
|
|
332
332
|
}
|
|
333
333
|
toKeyPath(key) {
|
|
334
|
-
if (
|
|
334
|
+
if (key instanceof KeyPath)
|
|
335
335
|
key = new KeyPath(key);
|
|
336
|
-
return key.toString(
|
|
336
|
+
return key.toString();
|
|
337
337
|
}
|
|
338
338
|
toKeyValue(value) {
|
|
339
|
-
if (
|
|
339
|
+
if (value instanceof KeyValue)
|
|
340
340
|
value = new KeyValue(value);
|
|
341
|
+
// @ts-ignore
|
|
341
342
|
return value.uint8Array;
|
|
342
343
|
}
|
|
343
344
|
async get(key) {
|
|
@@ -1,15 +1,18 @@
|
|
|
1
|
-
import MultiWallet from '@leofcoin/multi-wallet';
|
|
2
1
|
export default class Identity {
|
|
3
2
|
#private;
|
|
4
|
-
network:
|
|
3
|
+
network: any;
|
|
5
4
|
id: string;
|
|
5
|
+
selectedAccount: string;
|
|
6
6
|
constructor(network: string);
|
|
7
7
|
get accounts(): Promise<[[name: string, externalAddress: string, internalAddress: string]]>;
|
|
8
8
|
getAccounts(): Promise<[[name: string, externalAddress: string, internalAddress: string]]>;
|
|
9
9
|
load(password?: string): Promise<void>;
|
|
10
|
+
selectAccount(account: string): Promise<void> | Promise<IDBValidKey> | Promise<any[]>;
|
|
10
11
|
sign(hash: Uint8Array): any;
|
|
11
|
-
|
|
12
|
+
lock(password: string): void;
|
|
13
|
+
unlock(password: string): void;
|
|
14
|
+
export(password: string): Promise<any>;
|
|
12
15
|
import(password: any, encrypted: base58String): Promise<void>;
|
|
13
|
-
exportQR(password: string): Promise<
|
|
16
|
+
exportQR(password: string): Promise<string>;
|
|
14
17
|
importQR(image: File | Blob, password: string): Promise<void>;
|
|
15
18
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare const ChatMessage_base: typeof import("../../node_modules/@leofcoin/codec-format-interface/
|
|
1
|
+
declare const ChatMessage_base: typeof import("../../node_modules/@leofcoin/codec-format-interface/exports/codec-format-interface.js").default;
|
|
2
2
|
export default class ChatMessage extends ChatMessage_base {
|
|
3
3
|
constructor(buffer: any);
|
|
4
4
|
get messageName(): string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare const DataMessageResponse_base: typeof import("../../node_modules/@leofcoin/codec-format-interface/
|
|
1
|
+
declare const DataMessageResponse_base: typeof import("../../node_modules/@leofcoin/codec-format-interface/exports/codec-format-interface.js").default;
|
|
2
2
|
export default class DataMessageResponse extends DataMessageResponse_base {
|
|
3
3
|
constructor(data: any);
|
|
4
4
|
get messageName(): string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare const DHTMessageResponse_base: typeof import("../../node_modules/@leofcoin/codec-format-interface/
|
|
1
|
+
declare const DHTMessageResponse_base: typeof import("../../node_modules/@leofcoin/codec-format-interface/exports/codec-format-interface.js").default;
|
|
2
2
|
export default class DHTMessageResponse extends DHTMessageResponse_base {
|
|
3
3
|
constructor(data: any);
|
|
4
4
|
get messageName(): string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare const DHTMessage_base: typeof import("../../node_modules/@leofcoin/codec-format-interface/
|
|
1
|
+
declare const DHTMessage_base: typeof import("../../node_modules/@leofcoin/codec-format-interface/exports/codec-format-interface.js").default;
|
|
2
2
|
/**
|
|
3
3
|
* @example `
|
|
4
4
|
new DHTMessage(hash, store)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare const PeerMessageResponse_base: typeof import("../../node_modules/@leofcoin/codec-format-interface/
|
|
1
|
+
declare const PeerMessageResponse_base: typeof import("../../node_modules/@leofcoin/codec-format-interface/exports/codec-format-interface.js").default;
|
|
2
2
|
export default class PeerMessageResponse extends PeerMessageResponse_base {
|
|
3
3
|
constructor(data: any);
|
|
4
4
|
get messageName(): string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare const PeerMessage_base: typeof import("../../node_modules/@leofcoin/codec-format-interface/
|
|
1
|
+
declare const PeerMessage_base: typeof import("../../node_modules/@leofcoin/codec-format-interface/exports/codec-format-interface.js").default;
|
|
2
2
|
export default class PeerMessage extends PeerMessage_base {
|
|
3
3
|
constructor(data: any);
|
|
4
4
|
get messageName(): string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare const PeernetMessage_base: typeof import("../../node_modules/@leofcoin/codec-format-interface/
|
|
1
|
+
declare const PeernetMessage_base: typeof import("../../node_modules/@leofcoin/codec-format-interface/exports/codec-format-interface.js").default;
|
|
2
2
|
export default class PeernetMessage extends PeernetMessage_base {
|
|
3
3
|
constructor(buffer: any);
|
|
4
4
|
get messageName(): string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare const PsMessage_base: typeof import("../../node_modules/@leofcoin/codec-format-interface/
|
|
1
|
+
declare const PsMessage_base: typeof import("../../node_modules/@leofcoin/codec-format-interface/exports/codec-format-interface.js").default;
|
|
2
2
|
export default class PsMessage extends PsMessage_base {
|
|
3
3
|
constructor(buffer: any);
|
|
4
4
|
get messageName(): string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare const RequestMessage_base: typeof import("../../node_modules/@leofcoin/codec-format-interface/
|
|
1
|
+
declare const RequestMessage_base: typeof import("../../node_modules/@leofcoin/codec-format-interface/exports/codec-format-interface.js").default;
|
|
2
2
|
export default class RequestMessage extends RequestMessage_base {
|
|
3
3
|
constructor(data: any);
|
|
4
4
|
get messageName(): string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare const ResponseMessage_base: typeof import("../../node_modules/@leofcoin/codec-format-interface/
|
|
1
|
+
declare const ResponseMessage_base: typeof import("../../node_modules/@leofcoin/codec-format-interface/exports/codec-format-interface.js").default;
|
|
2
2
|
export default class ResponseMessage extends ResponseMessage_base {
|
|
3
3
|
constructor(data: any);
|
|
4
4
|
get messageName(): string;
|