@leofcoin/peernet 1.1.59 → 1.1.61
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 +1 -1
- package/exports/browser/{index-8868bdd8.js → index-5cd0a662.js} +1 -1
- package/exports/browser/{messages-eb6e5c71.js → messages-638774c5.js} +15 -25
- package/exports/browser/{peernet-87ea02a4.js → peernet-61545c25.js} +7165 -292
- package/exports/browser/peernet.d.ts +13 -16
- package/exports/browser/peernet.js +1 -1
- package/exports/browser/types.d.ts +5 -5
- package/exports/{messages-b9a32987.js → messages-42b2109e.js} +14 -24
- package/exports/peernet.js +110 -132
- package/exports/src/prompts/password.js +1 -1
- package/exports/store.js +3 -1
- package/exports/types/peernet.d.ts +13 -16
- package/exports/types/types.d.ts +5 -5
- package/package.json +1 -1
- package/exports/browser/identity.d.ts +0 -18
- package/exports/types/identity.d.ts +0 -18
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
/// <reference types="node" resolution-mode="require"/>
|
|
2
|
-
import
|
|
3
|
-
import PubSub from
|
|
4
|
-
import PeerDiscovery from
|
|
5
|
-
import DHT from
|
|
6
|
-
import MessageHandler from
|
|
7
|
-
import LeofcoinStorageClass from
|
|
8
|
-
import Identity from
|
|
9
|
-
import swarm from
|
|
10
|
-
import P2PTPeer from "@netpeer/p2pt-swarm/peer";
|
|
2
|
+
import '@vandeurenglenn/debug';
|
|
3
|
+
import PubSub from '@vandeurenglenn/little-pubsub';
|
|
4
|
+
import PeerDiscovery from './discovery/peer-discovery.js';
|
|
5
|
+
import DHT from './dht/dht.js';
|
|
6
|
+
import MessageHandler from './handlers/message.js';
|
|
7
|
+
import { Storage as LeofcoinStorageClass } from '@leofcoin/storage';
|
|
8
|
+
import Identity from './identity.js';
|
|
9
|
+
import swarm from '@netpeer/p2pt-swarm';
|
|
11
10
|
declare global {
|
|
12
11
|
var LeofcoinStorage: typeof LeofcoinStorageClass;
|
|
13
12
|
var peernet: Peernet;
|
|
@@ -68,9 +67,7 @@ export default class Peernet {
|
|
|
68
67
|
constructor(options: any, password: any);
|
|
69
68
|
get id(): string;
|
|
70
69
|
get selectedAccount(): string;
|
|
71
|
-
get accounts(): Promise<[
|
|
72
|
-
[name: string, externalAddress: string, internalAddress: string]
|
|
73
|
-
]>;
|
|
70
|
+
get accounts(): Promise<[[name: string, externalAddress: string, internalAddress: string]]>;
|
|
74
71
|
get defaultStores(): string[];
|
|
75
72
|
selectAccount(account: string): Promise<void> | Promise<IDBValidKey> | Promise<any[]>;
|
|
76
73
|
addProto(name: any, proto: any): void;
|
|
@@ -85,13 +82,13 @@ export default class Peernet {
|
|
|
85
82
|
*
|
|
86
83
|
* @return {Array} peerId
|
|
87
84
|
*/
|
|
88
|
-
get peers(): [string,
|
|
89
|
-
get connections():
|
|
90
|
-
get peerEntries():
|
|
85
|
+
get peers(): [string, unknown][];
|
|
86
|
+
get connections(): unknown[];
|
|
87
|
+
get peerEntries(): unknown[];
|
|
91
88
|
/**
|
|
92
89
|
* @return {String} id - peerId
|
|
93
90
|
*/
|
|
94
|
-
getConnection(id: any):
|
|
91
|
+
getConnection(id: any): unknown;
|
|
95
92
|
/**
|
|
96
93
|
* @private
|
|
97
94
|
*
|
package/exports/types/types.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import '@vandeurenglenn/debug';
|
|
2
2
|
import PubSub from '@vandeurenglenn/little-pubsub';
|
|
3
3
|
import Peernet from './peernet.js';
|
|
4
|
-
import {
|
|
4
|
+
import { Storage as LeofcoinStorageClass } from '@leofcoin/storage';
|
|
5
5
|
declare global {
|
|
6
6
|
var debug: (message: any) => string;
|
|
7
7
|
var globalSub: PubSub;
|
|
@@ -9,8 +9,8 @@ declare global {
|
|
|
9
9
|
var peernet: Peernet;
|
|
10
10
|
var LeofcoinStorage: typeof LeofcoinStorageClass;
|
|
11
11
|
var LeofcoinStorageClient: any;
|
|
12
|
-
var messageStore:
|
|
13
|
-
var dataStore:
|
|
14
|
-
var transactionStore:
|
|
15
|
-
var blockStore:
|
|
12
|
+
var messageStore: LeofcoinStorageClass;
|
|
13
|
+
var dataStore: LeofcoinStorageClass;
|
|
14
|
+
var transactionStore: LeofcoinStorageClass;
|
|
15
|
+
var blockStore: LeofcoinStorageClass;
|
|
16
16
|
}
|
package/package.json
CHANGED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
export default class Identity {
|
|
2
|
-
#private;
|
|
3
|
-
network: any;
|
|
4
|
-
id: string;
|
|
5
|
-
selectedAccount: string;
|
|
6
|
-
constructor(network: string);
|
|
7
|
-
get accounts(): Promise<[[name: string, externalAddress: string, internalAddress: string]]>;
|
|
8
|
-
getAccounts(): Promise<[[name: string, externalAddress: string, internalAddress: string]]>;
|
|
9
|
-
load(password?: string): Promise<void>;
|
|
10
|
-
selectAccount(account: string): Promise<void> | Promise<IDBValidKey> | Promise<any[]>;
|
|
11
|
-
sign(hash: Uint8Array): any;
|
|
12
|
-
lock(password: string): void;
|
|
13
|
-
unlock(password: string): void;
|
|
14
|
-
export(password: string): Promise<any>;
|
|
15
|
-
import(password: any, encrypted: base58String): Promise<void>;
|
|
16
|
-
exportQR(password: string): Promise<string>;
|
|
17
|
-
importQR(image: File | Blob, password: string): Promise<void>;
|
|
18
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
export default class Identity {
|
|
2
|
-
#private;
|
|
3
|
-
network: any;
|
|
4
|
-
id: string;
|
|
5
|
-
selectedAccount: string;
|
|
6
|
-
constructor(network: string);
|
|
7
|
-
get accounts(): Promise<[[name: string, externalAddress: string, internalAddress: string]]>;
|
|
8
|
-
getAccounts(): Promise<[[name: string, externalAddress: string, internalAddress: string]]>;
|
|
9
|
-
load(password?: string): Promise<void>;
|
|
10
|
-
selectAccount(account: string): Promise<void> | Promise<IDBValidKey> | Promise<any[]>;
|
|
11
|
-
sign(hash: Uint8Array): any;
|
|
12
|
-
lock(password: string): void;
|
|
13
|
-
unlock(password: string): void;
|
|
14
|
-
export(password: string): Promise<any>;
|
|
15
|
-
import(password: any, encrypted: base58String): Promise<void>;
|
|
16
|
-
exportQR(password: string): Promise<string>;
|
|
17
|
-
importQR(image: File | Blob, password: string): Promise<void>;
|
|
18
|
-
}
|