@leofcoin/peernet 1.2.13 → 1.2.14

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,4 +1,4 @@
1
- import { L as LittlePubSub, d as deflate_1, i as inflate_1, c as createDebugger } from './peernet-BpKdfmda.js';
1
+ import { L as LittlePubSub, d as deflate_1, i as inflate_1, c as createDebugger } from './peernet-Bl3tF9yA.js';
2
2
  import './identity-CqSnKXWH.js';
3
3
  import './value-C3vAp-wb.js';
4
4
 
@@ -1,4 +1,4 @@
1
- import { F as FormatInterface } from './peernet-BpKdfmda.js';
1
+ import { F as FormatInterface } from './peernet-Bl3tF9yA.js';
2
2
  import './identity-CqSnKXWH.js';
3
3
  import './value-C3vAp-wb.js';
4
4
 
@@ -123,7 +123,7 @@ class RequestMessage extends FormatInterface {
123
123
  }
124
124
 
125
125
  var proto$4 = {
126
- response: {}
126
+ response: new Uint8Array()
127
127
  };
128
128
 
129
129
  class ResponseMessage extends FormatInterface {
@@ -166,10 +166,10 @@ class DataMessageResponse extends FormatInterface {
166
166
  }
167
167
 
168
168
  var proto$1 = {
169
- value: String(),
170
- author: String(),
169
+ value: new Uint8Array(),
170
+ author: new Uint8Array(),
171
171
  timestamp: Number(),
172
- files: [String()]
172
+ files: [new Uint8Array()]
173
173
  };
174
174
 
175
175
  class ChatMessage extends FormatInterface {
@@ -8473,7 +8473,7 @@ class Peernet {
8473
8473
  await getAddress();
8474
8474
  this.storePrefix = options.storePrefix;
8475
8475
  this.root = options.root;
8476
- const { RequestMessage, ResponseMessage, PeerMessage, PeerMessageResponse, PeernetMessage, DHTMessage, DHTMessageResponse, DataMessage, DataMessageResponse, PsMessage, ChatMessage, PeernetFile } = await import(/* webpackChunkName: "messages" */ './messages-C-BwUsHC.js');
8476
+ const { RequestMessage, ResponseMessage, PeerMessage, PeerMessageResponse, PeernetMessage, DHTMessage, DHTMessageResponse, DataMessage, DataMessageResponse, PsMessage, ChatMessage, PeernetFile } = await import(/* webpackChunkName: "messages" */ './messages-oCxYLnpB.js');
8477
8477
  /**
8478
8478
  * proto Object containing protos
8479
8479
  * @type {Object}
@@ -8520,7 +8520,7 @@ class Peernet {
8520
8520
  if (this.#starting || this.#started)
8521
8521
  return;
8522
8522
  this.#starting = true;
8523
- const importee = await import('./client-DN_Y7L6h.js');
8523
+ const importee = await import('./client-CXjaAk7-.js');
8524
8524
  /**
8525
8525
  * @access public
8526
8526
  * @type {PeernetClient}
@@ -8990,7 +8990,7 @@ class Peernet {
8990
8990
  const links = [];
8991
8991
  for (const file of files) {
8992
8992
  const fileNode = await new globalThis.peernet.protos['peernet-file'](file);
8993
- const hash = await fileNode.hash;
8993
+ const hash = await fileNode.hash();
8994
8994
  await dataStore.put(hash, fileNode.encoded);
8995
8995
  links.push({ hash, path: file.path });
8996
8996
  }
@@ -8998,7 +8998,7 @@ class Peernet {
8998
8998
  path: '/',
8999
8999
  links
9000
9000
  });
9001
- const hash = await node.hash;
9001
+ const hash = await node.hash();
9002
9002
  await dataStore.put(hash, node.encoded);
9003
9003
  return hash;
9004
9004
  }
@@ -9016,7 +9016,7 @@ class Peernet {
9016
9016
  const links = [];
9017
9017
  for (const file of files) {
9018
9018
  const fileNode = await new globalThis.peernet.protos['peernet-file'](file);
9019
- const hash = await fileNode.hash;
9019
+ const hash = await fileNode.hash();
9020
9020
  await dataStore.put(hash, fileNode.encoded);
9021
9021
  links.push({ hash, path: file.path });
9022
9022
  }
@@ -9024,7 +9024,7 @@ class Peernet {
9024
9024
  path: '/',
9025
9025
  links
9026
9026
  });
9027
- const hash = await node.hash;
9027
+ const hash = await node.hash();
9028
9028
  await dataStore.put(hash, node.encoded);
9029
9029
  return hash;
9030
9030
  }
@@ -1,3 +1,3 @@
1
- export { P as default } from './peernet-BpKdfmda.js';
1
+ export { P as default } from './peernet-Bl3tF9yA.js';
2
2
  import './identity-CqSnKXWH.js';
3
3
  import './value-C3vAp-wb.js';
@@ -121,7 +121,7 @@ class RequestMessage extends FormatInterface {
121
121
  }
122
122
 
123
123
  var proto$4 = {
124
- response: {}
124
+ response: new Uint8Array()
125
125
  };
126
126
 
127
127
  class ResponseMessage extends FormatInterface {
@@ -164,10 +164,10 @@ class DataMessageResponse extends FormatInterface {
164
164
  }
165
165
 
166
166
  var proto$1 = {
167
- value: String(),
168
- author: String(),
167
+ value: new Uint8Array(),
168
+ author: new Uint8Array(),
169
169
  timestamp: Number(),
170
- files: [String()]
170
+ files: [new Uint8Array()]
171
171
  };
172
172
 
173
173
  class ChatMessage extends FormatInterface {
@@ -451,7 +451,7 @@ class Peernet {
451
451
  await getAddress();
452
452
  this.storePrefix = options.storePrefix;
453
453
  this.root = options.root;
454
- const { RequestMessage, ResponseMessage, PeerMessage, PeerMessageResponse, PeernetMessage, DHTMessage, DHTMessageResponse, DataMessage, DataMessageResponse, PsMessage, ChatMessage, PeernetFile } = await import(/* webpackChunkName: "messages" */ './messages-C9lYBAhD.js');
454
+ const { RequestMessage, ResponseMessage, PeerMessage, PeerMessageResponse, PeernetMessage, DHTMessage, DHTMessageResponse, DataMessage, DataMessageResponse, PsMessage, ChatMessage, PeernetFile } = await import(/* webpackChunkName: "messages" */ './messages-CHKVVTVE.js');
455
455
  /**
456
456
  * proto Object containing protos
457
457
  * @type {Object}
@@ -968,7 +968,7 @@ class Peernet {
968
968
  const links = [];
969
969
  for (const file of files) {
970
970
  const fileNode = await new globalThis.peernet.protos['peernet-file'](file);
971
- const hash = await fileNode.hash;
971
+ const hash = await fileNode.hash();
972
972
  await dataStore.put(hash, fileNode.encoded);
973
973
  links.push({ hash, path: file.path });
974
974
  }
@@ -976,7 +976,7 @@ class Peernet {
976
976
  path: '/',
977
977
  links
978
978
  });
979
- const hash = await node.hash;
979
+ const hash = await node.hash();
980
980
  await dataStore.put(hash, node.encoded);
981
981
  return hash;
982
982
  }
@@ -994,7 +994,7 @@ class Peernet {
994
994
  const links = [];
995
995
  for (const file of files) {
996
996
  const fileNode = await new globalThis.peernet.protos['peernet-file'](file);
997
- const hash = await fileNode.hash;
997
+ const hash = await fileNode.hash();
998
998
  await dataStore.put(hash, fileNode.encoded);
999
999
  links.push({ hash, path: file.path });
1000
1000
  }
@@ -1002,7 +1002,7 @@ class Peernet {
1002
1002
  path: '/',
1003
1003
  links
1004
1004
  });
1005
- const hash = await node.hash;
1005
+ const hash = await node.hash();
1006
1006
  await dataStore.put(hash, node.encoded);
1007
1007
  return hash;
1008
1008
  }
@@ -1,7 +1,7 @@
1
1
  declare namespace _default {
2
- let value: string;
3
- let author: string;
2
+ let value: Uint8Array<ArrayBuffer>;
3
+ let author: Uint8Array<ArrayBuffer>;
4
4
  let timestamp: number;
5
- let files: string[];
5
+ let files: Uint8Array<ArrayBuffer>[];
6
6
  }
7
7
  export default _default;
@@ -1,4 +1,4 @@
1
1
  declare namespace _default {
2
- let response: {};
2
+ let response: Uint8Array<ArrayBuffer>;
3
3
  }
4
4
  export default _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leofcoin/peernet",
3
- "version": "1.2.13",
3
+ "version": "1.2.14",
4
4
  "description": "",
5
5
  "browser": "./exports/browser/peernet.js",
6
6
  "exports": {
@@ -1,6 +1,6 @@
1
1
  export default {
2
- value: String(),
3
- author: String(),
2
+ value: new Uint8Array(),
3
+ author: new Uint8Array(),
4
4
  timestamp: Number(),
5
- files: [String()]
5
+ files: [new Uint8Array()]
6
6
  }
@@ -1,3 +1,3 @@
1
1
  export default {
2
- response: {}
2
+ response: new Uint8Array()
3
3
  }