JS/TS Peer for the Fluence p2p network
Go to file
Pavel ba537c79b3
Big refactoring (#8)
Big codebase refactoring. 

* Multiple clients are allowed on the same browser instance
* Particle queue processing is split from particle handling logic
* Public AIP is completely rethought
* Updated project file structure. Clean exports for public api methods
* Additional unit tests
2021-01-19 15:47:49 +03:00
.github/workflows Do not run 'publish_branch' on master (#7) 2020-12-31 15:04:11 +03:00
src Big refactoring (#8) 2021-01-19 15:47:49 +03:00
types Back to Apache 2.0 (#83) 2020-05-14 17:30:17 +03:00
.eslintrc.js Tetraplets (#1) 2020-12-23 17:24:22 +03:00
.gitignore Big refactoring (#8) 2021-01-19 15:47:49 +03:00
.npmignore Builtin methods, update aquamarine (#960) 2020-10-23 14:01:21 +03:00
.prettierrc.js Tetraplets (#1) 2020-12-23 17:24:22 +03:00
package-lock.json Release @fluencelabs/fluence automatically (#5) 2020-12-29 15:38:20 +03:00
package.json Big refactoring (#8) 2021-01-19 15:47:49 +03:00
README.md Switch badge to @fluencelabs/fluence (#6) 2020-12-30 13:14:24 +03:00
tsconfig.json Big refactoring (#8) 2021-01-19 15:47:49 +03:00
webpack.config.js Big refactoring (#8) 2021-01-19 15:47:49 +03:00

Fluence browser client

npm version

Browser client for the Fluence network based on the js-libp2p.

How to build

With npm installed building could be done as follows:

npm install fluence

Example

Shows how to register and call new service in Fluence network.

Generate new peer ids for clients.

let peerId1 = await Fluence.generatePeerId();
let peerId2 = await Fluence.generatePeerId();

Establish connections to predefined nodes.

let client1 = await Fluence.connect("/dns4/134.209.186.43/tcp/9003/ws/p2p/12D3KooWBUJifCTgaxAUrcM9JysqCcS4CS8tiYH5hExbdWCAoNwb", peerId1);
let client2 = await Fluence.connect("/ip4/134.209.186.43/tcp/9002/ws/p2p/12D3KooWHk9BjDQBUqnavciRPhAYFvqKBe4ZiPPvde7vDaqgn5er", peerId2);