@leofcoin/peernet 1.1.7 → 1.1.8
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/client-56d3de03.js +41148 -0
- package/exports/browser/{index-543bc6a3.js → index-60443f35.js} +1 -1
- package/exports/browser/{messages-48deb2c3.js → messages-54d97ac1.js} +1 -1
- package/exports/browser/{peernet-b4c44d17.js → peernet-73c61737.js} +8 -4
- package/exports/browser/peernet.js +1 -1
- package/exports/peernet.js +1 -1
- package/package.json +2 -1
- package/src/peernet.ts +1 -1
- package/exports/browser/browser-10ffabe1.js +0 -56
- package/exports/browser/browser-e1cd4e67.js +0 -198
- package/exports/browser/client-21cee984.js +0 -624
|
@@ -2600,6 +2600,10 @@ var index = {
|
|
|
2600
2600
|
|
|
2601
2601
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
2602
2602
|
|
|
2603
|
+
function getDefaultExportFromCjs (x) {
|
|
2604
|
+
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
2605
|
+
}
|
|
2606
|
+
|
|
2603
2607
|
function getAugmentedNamespace(n) {
|
|
2604
2608
|
if (n.__esModule) return n;
|
|
2605
2609
|
var f = n.default;
|
|
@@ -16082,7 +16086,7 @@ class Identity {
|
|
|
16082
16086
|
globalThis.peernet.selectedAccount = new TextDecoder().decode(selected);
|
|
16083
16087
|
}
|
|
16084
16088
|
else {
|
|
16085
|
-
const importee = await import(/* webpackChunkName: "generate-account" */ './index-
|
|
16089
|
+
const importee = await import(/* webpackChunkName: "generate-account" */ './index-60443f35.js');
|
|
16086
16090
|
const { identity, accounts } = await importee.default(password, this.network);
|
|
16087
16091
|
await globalThis.accountStore.put('public', JSON.stringify({ walletId: identity.walletId }));
|
|
16088
16092
|
await globalThis.walletStore.put('version', String(1));
|
|
@@ -16252,7 +16256,7 @@ class Peernet {
|
|
|
16252
16256
|
this.root = options.root;
|
|
16253
16257
|
const { RequestMessage, ResponseMessage, PeerMessage, PeerMessageResponse, PeernetMessage, DHTMessage, DHTMessageResponse, DataMessage, DataMessageResponse, PsMessage, ChatMessage, PeernetFile
|
|
16254
16258
|
// FolderMessageResponse
|
|
16255
|
-
} = await import(/* webpackChunkName: "messages" */ './messages-
|
|
16259
|
+
} = await import(/* webpackChunkName: "messages" */ './messages-54d97ac1.js');
|
|
16256
16260
|
/**
|
|
16257
16261
|
* proto Object containing protos
|
|
16258
16262
|
* @type {Object}
|
|
@@ -16319,7 +16323,7 @@ class Peernet {
|
|
|
16319
16323
|
if (this.#starting || this.#started)
|
|
16320
16324
|
return;
|
|
16321
16325
|
this.#starting = true;
|
|
16322
|
-
const importee = await import('./client-
|
|
16326
|
+
const importee = await import('./client-56d3de03.js');
|
|
16323
16327
|
/**
|
|
16324
16328
|
* @access public
|
|
16325
16329
|
* @type {PeernetClient}
|
|
@@ -16754,4 +16758,4 @@ class Peernet {
|
|
|
16754
16758
|
}
|
|
16755
16759
|
globalThis.Peernet = Peernet;
|
|
16756
16760
|
|
|
16757
|
-
export { FormatInterface as F,
|
|
16761
|
+
export { FormatInterface as F, MultiWallet as M, Peernet as P, base58$1 as b, commonjsGlobal as c, encrypt as e, getDefaultExportFromCjs as g };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { P as default } from './peernet-
|
|
1
|
+
export { P as default } from './peernet-73c61737.js';
|
|
2
2
|
import './value-157ab062.js';
|
package/exports/peernet.js
CHANGED
|
@@ -577,7 +577,7 @@ class Peernet {
|
|
|
577
577
|
if (this.#starting || this.#started)
|
|
578
578
|
return;
|
|
579
579
|
this.#starting = true;
|
|
580
|
-
const importee = await import('@
|
|
580
|
+
const importee = await import('@netpeer/p2pt-swarm/src/client/client.js');
|
|
581
581
|
/**
|
|
582
582
|
* @access public
|
|
583
583
|
* @type {PeernetClient}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@leofcoin/peernet",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.8",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "src/peernet.js",
|
|
6
6
|
"exports": {
|
|
@@ -31,6 +31,7 @@
|
|
|
31
31
|
"@leofcoin/multi-wallet": "^3.0.1",
|
|
32
32
|
"@leofcoin/peernet-swarm": "^1.1.0",
|
|
33
33
|
"@leofcoin/storage": "^3.0.0",
|
|
34
|
+
"@netpeer/p2pt-swarm": "^1.0.0",
|
|
34
35
|
"@types/node": "^18.11.18",
|
|
35
36
|
"@vandeurenglenn/base32": "^1.1.0",
|
|
36
37
|
"@vandeurenglenn/base58": "^1.1.0",
|
package/src/peernet.ts
CHANGED
|
@@ -257,7 +257,7 @@ export default class Peernet {
|
|
|
257
257
|
if (this.#starting || this.#started) return
|
|
258
258
|
|
|
259
259
|
this.#starting = true
|
|
260
|
-
const importee = await import('@
|
|
260
|
+
const importee = await import('@netpeer/p2pt-swarm/src/client/client.js')
|
|
261
261
|
/**
|
|
262
262
|
* @access public
|
|
263
263
|
* @type {PeernetClient}
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
function _mergeNamespaces(n, m) {
|
|
2
|
-
m.forEach(function (e) {
|
|
3
|
-
e && typeof e !== 'string' && !Array.isArray(e) && Object.keys(e).forEach(function (k) {
|
|
4
|
-
if (k !== 'default' && !(k in n)) {
|
|
5
|
-
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
6
|
-
Object.defineProperty(n, k, d.get ? d : {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
get: function () { return e[k]; }
|
|
9
|
-
});
|
|
10
|
-
}
|
|
11
|
-
});
|
|
12
|
-
});
|
|
13
|
-
return Object.freeze(n);
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
var browser$1 = {};
|
|
17
|
-
|
|
18
|
-
var MediaStream = browser$1.MediaStream = window.MediaStream;
|
|
19
|
-
var MediaStreamTrack = browser$1.MediaStreamTrack = window.MediaStreamTrack;
|
|
20
|
-
var RTCDataChannel = browser$1.RTCDataChannel = window.RTCDataChannel;
|
|
21
|
-
var RTCDataChannelEvent = browser$1.RTCDataChannelEvent = window.RTCDataChannelEvent;
|
|
22
|
-
var RTCDtlsTransport = browser$1.RTCDtlsTransport = window.RTCDtlsTransport;
|
|
23
|
-
var RTCIceCandidate = browser$1.RTCIceCandidate = window.RTCIceCandidate;
|
|
24
|
-
var RTCIceTransport = browser$1.RTCIceTransport = window.RTCIceTransport;
|
|
25
|
-
var RTCPeerConnection = browser$1.RTCPeerConnection = window.RTCPeerConnection;
|
|
26
|
-
var RTCPeerConnectionIceEvent = browser$1.RTCPeerConnectionIceEvent = window.RTCPeerConnectionIceEvent;
|
|
27
|
-
var RTCRtpReceiver = browser$1.RTCRtpReceiver = window.RTCRtpReceiver;
|
|
28
|
-
var RTCRtpSender = browser$1.RTCRtpSender = window.RTCRtpSender;
|
|
29
|
-
var RTCRtpTransceiver = browser$1.RTCRtpTransceiver = window.RTCRtpTransceiver;
|
|
30
|
-
var RTCSctpTransport = browser$1.RTCSctpTransport = window.RTCSctpTransport;
|
|
31
|
-
var RTCSessionDescription = browser$1.RTCSessionDescription = window.RTCSessionDescription;
|
|
32
|
-
var getUserMedia = browser$1.getUserMedia = window.getUserMedia;
|
|
33
|
-
var mediaDevices = browser$1.mediaDevices = navigator.mediaDevices;
|
|
34
|
-
|
|
35
|
-
var browser = /*#__PURE__*/_mergeNamespaces({
|
|
36
|
-
__proto__: null,
|
|
37
|
-
MediaStream: MediaStream,
|
|
38
|
-
MediaStreamTrack: MediaStreamTrack,
|
|
39
|
-
RTCDataChannel: RTCDataChannel,
|
|
40
|
-
RTCDataChannelEvent: RTCDataChannelEvent,
|
|
41
|
-
RTCDtlsTransport: RTCDtlsTransport,
|
|
42
|
-
RTCIceCandidate: RTCIceCandidate,
|
|
43
|
-
RTCIceTransport: RTCIceTransport,
|
|
44
|
-
RTCPeerConnection: RTCPeerConnection,
|
|
45
|
-
RTCPeerConnectionIceEvent: RTCPeerConnectionIceEvent,
|
|
46
|
-
RTCRtpReceiver: RTCRtpReceiver,
|
|
47
|
-
RTCRtpSender: RTCRtpSender,
|
|
48
|
-
RTCRtpTransceiver: RTCRtpTransceiver,
|
|
49
|
-
RTCSctpTransport: RTCSctpTransport,
|
|
50
|
-
RTCSessionDescription: RTCSessionDescription,
|
|
51
|
-
default: browser$1,
|
|
52
|
-
getUserMedia: getUserMedia,
|
|
53
|
-
mediaDevices: mediaDevices
|
|
54
|
-
}, [browser$1]);
|
|
55
|
-
|
|
56
|
-
export { browser as b };
|
|
@@ -1,198 +0,0 @@
|
|
|
1
|
-
function _mergeNamespaces(n, m) {
|
|
2
|
-
m.forEach(function (e) {
|
|
3
|
-
e && typeof e !== 'string' && !Array.isArray(e) && Object.keys(e).forEach(function (k) {
|
|
4
|
-
if (k !== 'default' && !(k in n)) {
|
|
5
|
-
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
6
|
-
Object.defineProperty(n, k, d.get ? d : {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
get: function () { return e[k]; }
|
|
9
|
-
});
|
|
10
|
-
}
|
|
11
|
-
});
|
|
12
|
-
});
|
|
13
|
-
return Object.freeze(n);
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
var global;
|
|
17
|
-
var hasRequiredGlobal;
|
|
18
|
-
|
|
19
|
-
function requireGlobal () {
|
|
20
|
-
if (hasRequiredGlobal) return global;
|
|
21
|
-
hasRequiredGlobal = 1;
|
|
22
|
-
var naiveFallback = function () {
|
|
23
|
-
if (typeof self === "object" && self) return self;
|
|
24
|
-
if (typeof window === "object" && window) return window;
|
|
25
|
-
throw new Error("Unable to resolve global `this`");
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
global = (function () {
|
|
29
|
-
if (this) return this;
|
|
30
|
-
|
|
31
|
-
// Unexpected strict mode (may happen if e.g. bundled into ESM module)
|
|
32
|
-
|
|
33
|
-
// Fallback to standard globalThis if available
|
|
34
|
-
if (typeof globalThis === "object" && globalThis) return globalThis;
|
|
35
|
-
|
|
36
|
-
// Thanks @mathiasbynens -> https://mathiasbynens.be/notes/globalthis
|
|
37
|
-
// In all ES5+ engines global object inherits from Object.prototype
|
|
38
|
-
// (if you approached one that doesn't please report)
|
|
39
|
-
try {
|
|
40
|
-
Object.defineProperty(Object.prototype, "__global__", {
|
|
41
|
-
get: function () { return this; },
|
|
42
|
-
configurable: true
|
|
43
|
-
});
|
|
44
|
-
} catch (error) {
|
|
45
|
-
// Unfortunate case of updates to Object.prototype being restricted
|
|
46
|
-
// via preventExtensions, seal or freeze
|
|
47
|
-
return naiveFallback();
|
|
48
|
-
}
|
|
49
|
-
try {
|
|
50
|
-
// Safari case (window.__global__ works, but __global__ does not)
|
|
51
|
-
if (!__global__) return naiveFallback();
|
|
52
|
-
return __global__;
|
|
53
|
-
} finally {
|
|
54
|
-
delete Object.prototype.__global__;
|
|
55
|
-
}
|
|
56
|
-
})();
|
|
57
|
-
return global;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
var name = "websocket";
|
|
61
|
-
var description = "Websocket Client & Server Library implementing the WebSocket protocol as specified in RFC 6455.";
|
|
62
|
-
var keywords = [
|
|
63
|
-
"websocket",
|
|
64
|
-
"websockets",
|
|
65
|
-
"socket",
|
|
66
|
-
"networking",
|
|
67
|
-
"comet",
|
|
68
|
-
"push",
|
|
69
|
-
"RFC-6455",
|
|
70
|
-
"realtime",
|
|
71
|
-
"server",
|
|
72
|
-
"client"
|
|
73
|
-
];
|
|
74
|
-
var author = "Brian McKelvey <theturtle32@gmail.com> (https://github.com/theturtle32)";
|
|
75
|
-
var contributors = [
|
|
76
|
-
"Iñaki Baz Castillo <ibc@aliax.net> (http://dev.sipdoc.net)"
|
|
77
|
-
];
|
|
78
|
-
var version$1 = "1.0.34";
|
|
79
|
-
var repository = {
|
|
80
|
-
type: "git",
|
|
81
|
-
url: "https://github.com/theturtle32/WebSocket-Node.git"
|
|
82
|
-
};
|
|
83
|
-
var homepage = "https://github.com/theturtle32/WebSocket-Node";
|
|
84
|
-
var engines = {
|
|
85
|
-
node: ">=4.0.0"
|
|
86
|
-
};
|
|
87
|
-
var dependencies = {
|
|
88
|
-
bufferutil: "^4.0.1",
|
|
89
|
-
debug: "^2.2.0",
|
|
90
|
-
"es5-ext": "^0.10.50",
|
|
91
|
-
"typedarray-to-buffer": "^3.1.5",
|
|
92
|
-
"utf-8-validate": "^5.0.2",
|
|
93
|
-
yaeti: "^0.0.6"
|
|
94
|
-
};
|
|
95
|
-
var devDependencies = {
|
|
96
|
-
"buffer-equal": "^1.0.0",
|
|
97
|
-
gulp: "^4.0.2",
|
|
98
|
-
"gulp-jshint": "^2.0.4",
|
|
99
|
-
"jshint-stylish": "^2.2.1",
|
|
100
|
-
jshint: "^2.0.0",
|
|
101
|
-
tape: "^4.9.1"
|
|
102
|
-
};
|
|
103
|
-
var config = {
|
|
104
|
-
verbose: false
|
|
105
|
-
};
|
|
106
|
-
var scripts = {
|
|
107
|
-
test: "tape test/unit/*.js",
|
|
108
|
-
gulp: "gulp"
|
|
109
|
-
};
|
|
110
|
-
var main = "index";
|
|
111
|
-
var directories = {
|
|
112
|
-
lib: "./lib"
|
|
113
|
-
};
|
|
114
|
-
var browser$2 = "lib/browser.js";
|
|
115
|
-
var license = "Apache-2.0";
|
|
116
|
-
var require$$0 = {
|
|
117
|
-
name: name,
|
|
118
|
-
description: description,
|
|
119
|
-
keywords: keywords,
|
|
120
|
-
author: author,
|
|
121
|
-
contributors: contributors,
|
|
122
|
-
version: version$1,
|
|
123
|
-
repository: repository,
|
|
124
|
-
homepage: homepage,
|
|
125
|
-
engines: engines,
|
|
126
|
-
dependencies: dependencies,
|
|
127
|
-
devDependencies: devDependencies,
|
|
128
|
-
config: config,
|
|
129
|
-
scripts: scripts,
|
|
130
|
-
main: main,
|
|
131
|
-
directories: directories,
|
|
132
|
-
browser: browser$2,
|
|
133
|
-
license: license
|
|
134
|
-
};
|
|
135
|
-
|
|
136
|
-
var version = require$$0.version;
|
|
137
|
-
|
|
138
|
-
var _globalThis;
|
|
139
|
-
if (typeof globalThis === 'object') {
|
|
140
|
-
_globalThis = globalThis;
|
|
141
|
-
} else {
|
|
142
|
-
try {
|
|
143
|
-
_globalThis = requireGlobal();
|
|
144
|
-
} catch (error) {
|
|
145
|
-
} finally {
|
|
146
|
-
if (!_globalThis && typeof window !== 'undefined') { _globalThis = window; }
|
|
147
|
-
if (!_globalThis) { throw new Error('Could not determine global this'); }
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
var NativeWebSocket = _globalThis.WebSocket || _globalThis.MozWebSocket;
|
|
152
|
-
var websocket_version = version;
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
/**
|
|
156
|
-
* Expose a W3C WebSocket class with just one or two arguments.
|
|
157
|
-
*/
|
|
158
|
-
function W3CWebSocket(uri, protocols) {
|
|
159
|
-
var native_instance;
|
|
160
|
-
|
|
161
|
-
if (protocols) {
|
|
162
|
-
native_instance = new NativeWebSocket(uri, protocols);
|
|
163
|
-
}
|
|
164
|
-
else {
|
|
165
|
-
native_instance = new NativeWebSocket(uri);
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
/**
|
|
169
|
-
* 'native_instance' is an instance of nativeWebSocket (the browser's WebSocket
|
|
170
|
-
* class). Since it is an Object it will be returned as it is when creating an
|
|
171
|
-
* instance of W3CWebSocket via 'new W3CWebSocket()'.
|
|
172
|
-
*
|
|
173
|
-
* ECMAScript 5: http://bclary.com/2004/11/07/#a-13.2.2
|
|
174
|
-
*/
|
|
175
|
-
return native_instance;
|
|
176
|
-
}
|
|
177
|
-
if (NativeWebSocket) {
|
|
178
|
-
['CONNECTING', 'OPEN', 'CLOSING', 'CLOSED'].forEach(function(prop) {
|
|
179
|
-
Object.defineProperty(W3CWebSocket, prop, {
|
|
180
|
-
get: function() { return NativeWebSocket[prop]; }
|
|
181
|
-
});
|
|
182
|
-
});
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
/**
|
|
186
|
-
* Module exports.
|
|
187
|
-
*/
|
|
188
|
-
var browser = {
|
|
189
|
-
'w3cwebsocket' : NativeWebSocket ? W3CWebSocket : null,
|
|
190
|
-
'version' : websocket_version
|
|
191
|
-
};
|
|
192
|
-
|
|
193
|
-
var browser$1 = /*#__PURE__*/_mergeNamespaces({
|
|
194
|
-
__proto__: null,
|
|
195
|
-
default: browser
|
|
196
|
-
}, [browser]);
|
|
197
|
-
|
|
198
|
-
export { browser$1 as b };
|