@leofcoin/peernet 0.16.0 → 0.16.2
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/package.json +1 -1
- package/src/peernet.js +2 -5
- package/test/codec.js +1 -1
package/package.json
CHANGED
package/src/peernet.js
CHANGED
|
@@ -2,7 +2,7 @@ import '@vandeurenglenn/debug'
|
|
|
2
2
|
import PubSub from '@vandeurenglenn/little-pubsub'
|
|
3
3
|
import PeerDiscovery from './discovery/peer-discovery.js'
|
|
4
4
|
import DHT from './dht/dht.js'
|
|
5
|
-
import codecs from '
|
|
5
|
+
import { codecs } from '@leofcoin/codec-format-interface'
|
|
6
6
|
import { BufferToUint8Array, protoFor, target } from './utils/utils.js'
|
|
7
7
|
import MessageHandler from './handlers/message.js'
|
|
8
8
|
import dataHandler from './handlers/data.js'
|
|
@@ -64,10 +64,6 @@ export default class Peernet {
|
|
|
64
64
|
return ['account', 'wallet', 'block', 'transaction', 'chain', 'data', 'message']
|
|
65
65
|
}
|
|
66
66
|
|
|
67
|
-
get codecs() {
|
|
68
|
-
return codecs
|
|
69
|
-
}
|
|
70
|
-
|
|
71
67
|
addProto(name, proto) {
|
|
72
68
|
if (!globalThis.peernet.protos[name]) globalThis.peernet.protos[name] = proto
|
|
73
69
|
}
|
|
@@ -143,6 +139,7 @@ export default class Peernet {
|
|
|
143
139
|
* @property {Object} peer Instance of Peer
|
|
144
140
|
*/
|
|
145
141
|
this.stores = []
|
|
142
|
+
this.codecs = codecs
|
|
146
143
|
this.requestProtos = {}
|
|
147
144
|
this.storePrefix = options.storePrefix
|
|
148
145
|
this.root = options.root
|
package/test/codec.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import test from 'tape'
|
|
2
|
-
import Codec from './../
|
|
2
|
+
import Codec from './../src/commonjs/codec.js'
|
|
3
3
|
|
|
4
4
|
const block = '4lmacqas6kpnmvehxpmlvsndgydw5i46mf2pgnaub72eug63dozkw4oqxhk3fazbhkguvlhslcaeqm5jtwghxdk5nvmuakrs7yi2gl6xqmmmw';
|
|
5
5
|
const itx = '5hmacqb6ao252jmbhkhu5isr4yua3jnkhgb5ejjbiomrlzglwarlb777wq7aw5nfz5m4pubx5uffaxp2cqc4ckrh4xirss4nkujvcjbnmomtm';
|