mirror of
https://github.com/fluencelabs/fluence-js.git
synced 2025-04-25 01:42:13 +00:00
rename, update version
This commit is contained in:
parent
6e7d1a93fa
commit
63281bbdfd
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "fluence",
|
"name": "fluence",
|
||||||
"version": "0.7.107",
|
"version": "0.7.108",
|
||||||
"description": "the browser js-libp2p client for the Fluence network",
|
"description": "the browser js-libp2p client for the Fluence network",
|
||||||
"main": "./dist/fluence.js",
|
"main": "./dist/fluence.js",
|
||||||
"typings": "./dist/fluence.d.ts",
|
"typings": "./dist/fluence.d.ts",
|
||||||
|
@ -39,11 +39,11 @@ export class FluenceConnection {
|
|||||||
private readonly address: Multiaddr;
|
private readonly address: Multiaddr;
|
||||||
readonly nodePeerId: PeerId;
|
readonly nodePeerId: PeerId;
|
||||||
private readonly selfPeerIdStr: string;
|
private readonly selfPeerIdStr: string;
|
||||||
private readonly handleCall: (call: Particle) => void;
|
private readonly handleParticle: (call: Particle) => void;
|
||||||
|
|
||||||
constructor(multiaddr: Multiaddr, hostPeerId: PeerId, selfPeerId: PeerId, handleCall: (call: Particle) => void) {
|
constructor(multiaddr: Multiaddr, hostPeerId: PeerId, selfPeerId: PeerId, handleParticle: (call: Particle) => void) {
|
||||||
this.selfPeerId = selfPeerId;
|
this.selfPeerId = selfPeerId;
|
||||||
this.handleCall = handleCall;
|
this.handleParticle = handleParticle;
|
||||||
this.selfPeerIdStr = selfPeerId.toB58String();
|
this.selfPeerIdStr = selfPeerId.toB58String();
|
||||||
this.address = multiaddr;
|
this.address = multiaddr;
|
||||||
this.nodePeerId = hostPeerId;
|
this.nodePeerId = hostPeerId;
|
||||||
@ -89,7 +89,7 @@ export class FluenceConnection {
|
|||||||
let particle = parseParticle(msg);
|
let particle = parseParticle(msg);
|
||||||
log.debug('Particle is received:');
|
log.debug('Particle is received:');
|
||||||
log.debug(JSON.stringify(particle, undefined, 2));
|
log.debug(JSON.stringify(particle, undefined, 2));
|
||||||
_this.handleCall(particle);
|
_this.handleParticle(particle);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
log.error('error on handling a new incoming message: ' + e);
|
log.error('error on handling a new incoming message: ' + e);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user