@leofcoin/peernet 1.1.59 → 1.1.60

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.
@@ -1,13 +1,12 @@
1
1
  /// <reference types="node" resolution-mode="require"/>
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 LeofcoinStorageClass from "@leofcoin/storage";
8
- import Identity from "./identity.js";
9
- import swarm from "@netpeer/p2pt-swarm";
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, P2PTPeer][];
89
- get connections(): P2PTPeer[];
90
- get peerEntries(): P2PTPeer[];
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): P2PTPeer;
91
+ getConnection(id: any): unknown;
95
92
  /**
96
93
  * @private
97
94
  *
@@ -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 { LeofcoinStorage as LeofcoinStorageClass } from '@leofcoin/storage';
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: typeof LeofcoinStorage;
13
- var dataStore: typeof LeofcoinStorage;
14
- var transactionStore: typeof LeofcoinStorage;
15
- var blockStore: typeof LeofcoinStorage;
12
+ var messageStore: LeofcoinStorageClass;
13
+ var dataStore: LeofcoinStorageClass;
14
+ var transactionStore: LeofcoinStorageClass;
15
+ var blockStore: LeofcoinStorageClass;
16
16
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leofcoin/peernet",
3
- "version": "1.1.59",
3
+ "version": "1.1.60",
4
4
  "description": "",
5
5
  "main": "src/peernet.js",
6
6
  "exports": {
@@ -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
- }