Skip to content

Commit

Permalink
Use websockets transport with WebRTC signalling (#341)
Browse files Browse the repository at this point in the history
* Use websockets as the base transport

* Update yarn lock file

* Upgrade cerc-io/js-libp2p

* Update package version
  • Loading branch information
prathamesh0 authored Mar 23, 2023
1 parent d221704 commit 0f239c3
Show file tree
Hide file tree
Showing 24 changed files with 240 additions and 292 deletions.
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"packages": [
"packages/*"
],
"version": "0.2.30",
"version": "0.2.31",
"npmClient": "yarn",
"useWorkspaces": true,
"command": {
Expand Down
12 changes: 6 additions & 6 deletions packages/address-watcher/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cerc-io/address-watcher",
"version": "0.2.30",
"version": "0.2.31",
"description": "Address Watcher",
"private": true,
"scripts": {
Expand All @@ -26,11 +26,11 @@
"homepage": "https://github.com/cerc-io/watcher-ts#readme",
"dependencies": {
"@apollo/client": "^3.3.19",
"@cerc-io/cache": "^0.2.30",
"@cerc-io/ipld-eth-client": "^0.2.30",
"@cerc-io/solidity-mapper": "^0.2.30",
"@cerc-io/tracing-client": "^0.2.30",
"@cerc-io/util": "^0.2.30",
"@cerc-io/cache": "^0.2.31",
"@cerc-io/ipld-eth-client": "^0.2.31",
"@cerc-io/solidity-mapper": "^0.2.31",
"@cerc-io/tracing-client": "^0.2.31",
"@cerc-io/util": "^0.2.31",
"@types/lodash": "^4.14.168",
"debug": "^4.3.1",
"ethers": "^5.4.4",
Expand Down
2 changes: 1 addition & 1 deletion packages/cache/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cerc-io/cache",
"version": "0.2.30",
"version": "0.2.31",
"description": "Generic object cache",
"main": "dist/index.js",
"scripts": {
Expand Down
6 changes: 3 additions & 3 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cerc-io/cli",
"version": "0.2.30",
"version": "0.2.31",
"main": "dist/index.js",
"license": "AGPL-3.0",
"scripts": {
Expand All @@ -11,8 +11,8 @@
"chat": "DEBUG='vulcanize:*, laconic:*' node dist/chat.js"
},
"dependencies": {
"@cerc-io/peer": "^0.2.30",
"@cerc-io/util": "^0.2.30",
"@cerc-io/peer": "^0.2.31",
"@cerc-io/util": "^0.2.31",
"@ethersproject/providers": "^5.4.4",
"@graphql-tools/utils": "^9.1.1",
"@ipld/dag-cbor": "^8.0.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/codegen/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cerc-io/codegen",
"version": "0.2.30",
"version": "0.2.31",
"description": "Code generator",
"private": true,
"main": "index.js",
Expand All @@ -20,7 +20,7 @@
},
"homepage": "https://github.com/cerc-io/watcher-ts#readme",
"dependencies": {
"@cerc-io/util": "^0.2.30",
"@cerc-io/util": "^0.2.31",
"@graphql-tools/load-files": "^6.5.2",
"@poanet/solidity-flattener": "https://github.com/vulcanize/solidity-flattener.git",
"@solidity-parser/parser": "^0.13.2",
Expand Down
10 changes: 5 additions & 5 deletions packages/codegen/src/templates/package-template.handlebars
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,12 @@
"dependencies": {
"@apollo/client": "^3.3.19",
"@ethersproject/providers": "^5.4.4",
"@cerc-io/cli": "^0.2.30",
"@cerc-io/ipld-eth-client": "^0.2.30",
"@cerc-io/solidity-mapper": "^0.2.30",
"@cerc-io/util": "^0.2.30",
"@cerc-io/cli": "^0.2.31",
"@cerc-io/ipld-eth-client": "^0.2.31",
"@cerc-io/solidity-mapper": "^0.2.31",
"@cerc-io/util": "^0.2.31",
{{#if (subgraphPath)}}
"@cerc-io/graph-node": "^0.2.30",
"@cerc-io/graph-node": "^0.2.31",
{{/if}}
"apollo-type-bigint": "^0.1.3",
"debug": "^4.3.1",
Expand Down
12 changes: 6 additions & 6 deletions packages/eden-watcher/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cerc-io/eden-watcher",
"version": "0.2.30",
"version": "0.2.31",
"description": "eden-watcher",
"private": true,
"main": "dist/index.js",
Expand Down Expand Up @@ -38,11 +38,11 @@
"homepage": "https://github.com/cerc-io/watcher-ts#readme",
"dependencies": {
"@apollo/client": "^3.3.19",
"@cerc-io/cli": "^0.2.30",
"@cerc-io/graph-node": "^0.2.30",
"@cerc-io/ipld-eth-client": "^0.2.30",
"@cerc-io/solidity-mapper": "^0.2.30",
"@cerc-io/util": "^0.2.30",
"@cerc-io/cli": "^0.2.31",
"@cerc-io/graph-node": "^0.2.31",
"@cerc-io/ipld-eth-client": "^0.2.31",
"@cerc-io/solidity-mapper": "^0.2.31",
"@cerc-io/util": "^0.2.31",
"@ethersproject/providers": "^5.4.4",
"apollo-type-bigint": "^0.1.3",
"debug": "^4.3.1",
Expand Down
10 changes: 5 additions & 5 deletions packages/erc20-watcher/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cerc-io/erc20-watcher",
"version": "0.2.30",
"version": "0.2.31",
"description": "ERC20 Watcher",
"private": true,
"main": "dist/index.js",
Expand Down Expand Up @@ -42,10 +42,10 @@
"homepage": "https://github.com/cerc-io/watcher-ts#readme",
"dependencies": {
"@apollo/client": "^3.3.19",
"@cerc-io/cli": "^0.2.30",
"@cerc-io/ipld-eth-client": "^0.2.30",
"@cerc-io/solidity-mapper": "^0.2.30",
"@cerc-io/util": "^0.2.30",
"@cerc-io/cli": "^0.2.31",
"@cerc-io/ipld-eth-client": "^0.2.31",
"@cerc-io/solidity-mapper": "^0.2.31",
"@cerc-io/util": "^0.2.31",
"@ethersproject/providers": "^5.4.4",
"apollo-type-bigint": "^0.1.3",
"debug": "^4.3.1",
Expand Down
10 changes: 5 additions & 5 deletions packages/erc721-watcher/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cerc-io/erc721-watcher",
"version": "0.2.30",
"version": "0.2.31",
"description": "erc721-watcher",
"private": true,
"main": "dist/index.js",
Expand Down Expand Up @@ -47,10 +47,10 @@
"homepage": "https://github.com/cerc-io/watcher-ts#readme",
"dependencies": {
"@apollo/client": "^3.3.19",
"@cerc-io/cli": "^0.2.30",
"@cerc-io/ipld-eth-client": "^0.2.30",
"@cerc-io/solidity-mapper": "^0.2.30",
"@cerc-io/util": "^0.2.30",
"@cerc-io/cli": "^0.2.31",
"@cerc-io/ipld-eth-client": "^0.2.31",
"@cerc-io/solidity-mapper": "^0.2.31",
"@cerc-io/util": "^0.2.31",
"@ethersproject/providers": "^5.4.4",
"apollo-type-bigint": "^0.1.3",
"debug": "^4.3.1",
Expand Down
10 changes: 5 additions & 5 deletions packages/graph-node/package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"name": "@cerc-io/graph-node",
"version": "0.2.30",
"version": "0.2.31",
"main": "dist/index.js",
"license": "AGPL-3.0",
"devDependencies": {
"@cerc-io/solidity-mapper": "^0.2.30",
"@cerc-io/solidity-mapper": "^0.2.31",
"@ethersproject/providers": "^5.4.4",
"@graphprotocol/graph-ts": "^0.22.0",
"@nomiclabs/hardhat-ethers": "^2.0.2",
Expand Down Expand Up @@ -50,9 +50,9 @@
"dependencies": {
"@apollo/client": "^3.3.19",
"@cerc-io/assemblyscript": "0.19.10-watcher-ts-0.1.2",
"@cerc-io/cache": "^0.2.30",
"@cerc-io/ipld-eth-client": "^0.2.30",
"@cerc-io/util": "^0.2.30",
"@cerc-io/cache": "^0.2.31",
"@cerc-io/ipld-eth-client": "^0.2.31",
"@cerc-io/util": "^0.2.31",
"@types/json-diff": "^0.5.2",
"bn.js": "^4.11.9",
"debug": "^4.3.1",
Expand Down
12 changes: 6 additions & 6 deletions packages/graph-test-watcher/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cerc-io/graph-test-watcher",
"version": "0.2.30",
"version": "0.2.31",
"description": "graph-test-watcher",
"private": true,
"main": "dist/index.js",
Expand Down Expand Up @@ -38,11 +38,11 @@
"homepage": "https://github.com/cerc-io/watcher-ts#readme",
"dependencies": {
"@apollo/client": "^3.3.19",
"@cerc-io/cli": "^0.2.30",
"@cerc-io/graph-node": "^0.2.30",
"@cerc-io/ipld-eth-client": "^0.2.30",
"@cerc-io/solidity-mapper": "^0.2.30",
"@cerc-io/util": "^0.2.30",
"@cerc-io/cli": "^0.2.31",
"@cerc-io/graph-node": "^0.2.31",
"@cerc-io/ipld-eth-client": "^0.2.31",
"@cerc-io/solidity-mapper": "^0.2.31",
"@cerc-io/util": "^0.2.31",
"@ethersproject/providers": "^5.4.4",
"apollo-type-bigint": "^0.1.3",
"debug": "^4.3.1",
Expand Down
4 changes: 2 additions & 2 deletions packages/ipld-eth-client/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cerc-io/ipld-eth-client",
"version": "0.2.30",
"version": "0.2.31",
"description": "IPLD ETH Client",
"main": "dist/index.js",
"scripts": {
Expand All @@ -20,7 +20,7 @@
"homepage": "https://github.com/cerc-io/watcher-ts#readme",
"dependencies": {
"@apollo/client": "^3.7.1",
"@cerc-io/cache": "^0.2.30",
"@cerc-io/cache": "^0.2.31",
"cross-fetch": "^3.1.4",
"debug": "^4.3.1",
"ethers": "^5.4.4",
Expand Down
12 changes: 6 additions & 6 deletions packages/mobymask-v2-watcher/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cerc-io/mobymask-v2-watcher",
"version": "0.2.30",
"version": "0.2.31",
"description": "mobymask-v2-watcher",
"private": true,
"main": "dist/index.js",
Expand Down Expand Up @@ -39,11 +39,11 @@
"homepage": "https://github.com/cerc-io/watcher-ts#readme",
"dependencies": {
"@apollo/client": "^3.3.19",
"@cerc-io/cli": "^0.2.30",
"@cerc-io/ipld-eth-client": "^0.2.30",
"@cerc-io/solidity-mapper": "^0.2.30",
"@cerc-io/util": "^0.2.30",
"@cerc-io/peer": "^0.2.30",
"@cerc-io/cli": "^0.2.31",
"@cerc-io/ipld-eth-client": "^0.2.31",
"@cerc-io/peer": "^0.2.31",
"@cerc-io/solidity-mapper": "^0.2.31",
"@cerc-io/util": "^0.2.31",
"@ethersproject/providers": "^5.4.4",
"apollo-type-bigint": "^0.1.3",
"debug": "^4.3.1",
Expand Down
10 changes: 5 additions & 5 deletions packages/mobymask-watcher/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cerc-io/mobymask-watcher",
"version": "0.2.30",
"version": "0.2.31",
"description": "mobymask-watcher",
"private": true,
"main": "dist/index.js",
Expand Down Expand Up @@ -37,10 +37,10 @@
"homepage": "https://github.com/cerc-io/watcher-ts#readme",
"dependencies": {
"@apollo/client": "^3.3.19",
"@cerc-io/cli": "^0.2.30",
"@cerc-io/ipld-eth-client": "^0.2.30",
"@cerc-io/solidity-mapper": "^0.2.30",
"@cerc-io/util": "^0.2.30",
"@cerc-io/cli": "^0.2.31",
"@cerc-io/ipld-eth-client": "^0.2.31",
"@cerc-io/solidity-mapper": "^0.2.31",
"@cerc-io/util": "^0.2.31",
"@ethersproject/providers": "^5.4.4",
"apollo-type-bigint": "^0.1.3",
"debug": "^4.3.1",
Expand Down
11 changes: 5 additions & 6 deletions packages/peer/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cerc-io/peer",
"version": "0.2.30",
"version": "0.2.31",
"description": "libp2p module",
"main": "dist/index.js",
"exports": "./dist/index.js",
Expand All @@ -25,18 +25,19 @@
"dev": "node dist/index.js",
"create-peer": "node dist/cli/create-peer.js",
"relay-node": "DEBUG='laconic:*' node dist/cli/relay.js",
"test" : "mocha dist/peer.test.js"
"test": "mocha dist/peer.test.js"
},
"dependencies": {
"@cerc-io/libp2p": "0.42.2-laconic-0.1.1",
"@cerc-io/libp2p": "0.42.2-laconic-0.1.2",
"@cerc-io/prometheus-metrics": "1.1.4",
"@cerc-io/webrtc-direct": "^5.0.0-laconic-0.1.4",
"@chainsafe/libp2p-noise": "^11.0.0",
"@libp2p/floodsub": "^6.0.0",
"@libp2p/mplex": "^7.1.1",
"@libp2p/peer-id-factory": "^2.0.0",
"@libp2p/pubsub-peer-discovery": "^8.0.0",
"@libp2p/websockets": "^5.0.5",
"@multiformats/multiaddr": "^11.1.4",
"assert": "^2.0.0",
"buffer": "^6.0.3",
"chai": "^4.3.4",
"debug": "^4.3.1",
Expand All @@ -46,11 +47,9 @@
"it-pipe": "^2.0.5",
"it-pushable": "^3.1.2",
"mocha": "^8.4.0",
"node-pre-gyp": "^0.13.0",
"p-event": "^5.0.1",
"uint8arrays": "^4.0.3",
"unique-names-generator": "^4.7.1",
"wrtc": "^0.4.7",
"yargs": "^17.0.1"
},
"devDependencies": {
Expand Down
1 change: 1 addition & 0 deletions packages/peer/src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// Copyright 2023 Vulcanize, Inc.
//

export const P2P_WEBRTC_STAR_ID = 'p2p-webrtc-star';
export const P2P_CIRCUIT_ID = 'p2p-circuit';
export const CHAT_PROTOCOL = '/chat/1.0.0';
export const DEBUG_INFO_TOPIC = 'debug-info';
Expand Down
Loading

0 comments on commit 0f239c3

Please sign in to comment.