Merge pull request #103 from waku-org/js-waku-0.26.0

This commit is contained in:
fryorcraken.eth 2022-09-12 19:31:24 +10:00 committed by GitHub
commit b554cabdf2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 28 additions and 17 deletions

View File

@ -10,7 +10,7 @@
"@material-ui/icons": "^4.11.2",
"ethers": "5.7.0",
"fontsource-roboto": "^4.0.0",
"js-waku": "0.24.0-158b789",
"js-waku": "0.26.0",
"protobufjs": "^7.1.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",

View File

@ -14,7 +14,7 @@ specifiers:
eslint: ^8.9.0
ethers: 5.7.0
fontsource-roboto: ^4.0.0
js-waku: 0.24.0-158b789
js-waku: 0.26.0
npm-run-all: ^4.1.5
prettier: ^2.5.1
protobufjs: ^7.1.0
@ -31,7 +31,7 @@ dependencies:
'@material-ui/icons': 4.11.3_upnjamd3tbaukgopcqqdlc7jbm
ethers: 5.7.0
fontsource-roboto: 4.0.0
js-waku: 0.24.0-158b789_undici@5.10.0
js-waku: 0.26.0_undici@5.10.0
protobufjs: 7.1.0
react: 18.2.0
react-dom: 18.2.0_react@18.2.0
@ -8284,8 +8284,8 @@ packages:
/js-tokens/4.0.0:
resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==}
/js-waku/0.24.0-158b789_undici@5.10.0:
resolution: {integrity: sha512-M/+hYMXYjlEw9lezxHcmg2F9o5gINJyCadOVC0YLuA7cQD+UIMUDFRqSaoM1J78QlB4QvH+dQrZWMMqU2priVg==}
/js-waku/0.26.0_undici@5.10.0:
resolution: {integrity: sha512-BcgMeYj9wYGNt4fs3lFUSLpFqQttpju4FAmVbB19oYK1IWR8nGKu52eLAFBrh0uH3r73Ud9PXG3I1099THqlOQ==}
engines: {node: '>=16'}
dependencies:
'@chainsafe/libp2p-gossipsub': 4.1.1_undici@5.10.0

View File

@ -28,13 +28,13 @@
import {
WakuMessage
} from 'https://unpkg.com/js-waku@next/bundle/index.js';
} from 'https://unpkg.com/js-waku@0.26.0/bundle/index.js';
import {
createWaku
} from 'https://unpkg.com/js-waku@next/bundle/lib/create_waku.js'
} from 'https://unpkg.com/js-waku@0.26.0/bundle/lib/create_waku.js'
import {
waitForRemotePeer
} from 'https://unpkg.com/js-waku@next/bundle/lib/wait_for_remote_peer.js'
} from 'https://unpkg.com/js-waku@0.26.0/bundle/lib/wait_for_remote_peer.js'
const statusDiv = document.getElementById('status');
const messagesDiv = document.getElementById('messages');

View File

@ -15,13 +15,13 @@
<script type='module'>
import {
Protocols
} from 'https://unpkg.com/js-waku@next/bundle/index.js';
} from 'https://unpkg.com/js-waku@0.26.0/bundle/index.js';
import {
createWaku
} from 'https://unpkg.com/js-waku@next/bundle/lib/create_waku.js'
} from 'https://unpkg.com/js-waku@0.26.0/bundle/lib/create_waku.js'
import {
waitForRemotePeer
} from 'https://unpkg.com/js-waku@next/bundle/lib/wait_for_remote_peer.js'
} from 'https://unpkg.com/js-waku@0.26.0/bundle/lib/wait_for_remote_peer.js'
/**
* This example demonstrates how to use the js-waku minified bundle

View File

@ -2,6 +2,11 @@ import { waitForRemotePeer, utils } from "js-waku";
import * as React from "react";
import protobuf from "protobufjs";
import { createWaku } from "js-waku/lib/create_waku";
import {
Fleet,
getPredefinedBootstrapNodes,
} from "js-waku/lib/predefined_bootstrap_nodes";
import { PeerDiscoveryStaticPeers } from "js-waku/lib/peer_discovery_static_list";
const ContentTopic = "/toy-chat/2/huilong/proto";
@ -20,7 +25,13 @@ function App() {
setWakuStatus("Starting");
createWaku({ defaultBootstrap: true }).then((waku) => {
createWaku({
libp2p: {
peerDiscovery: [
new PeerDiscoveryStaticPeers(getPredefinedBootstrapNodes(Fleet.Test)),
],
},
}).then((waku) => {
waku.start().then(() => {
setWaku(waku);
setWakuStatus("Connecting");

View File

@ -6,7 +6,7 @@
"dependencies": {
"@livechat/ui-kit": "^0.5.0-20",
"@multiformats/multiaddr": "^10.4.0",
"js-waku": "0.24.0-158b789",
"js-waku": "0.26.0",
"process": "^0.11.10",
"protons-runtime": "^3.1.0",
"react": "^17.0.2",

View File

@ -9,7 +9,7 @@ specifiers:
'@types/react-dom': ^17.0.11
cspell: ^6.0.0
gh-pages: ^4.0.0
js-waku: 0.24.0-158b789
js-waku: 0.26.0
npm-run-all: ^4.1.5
prettier: ^2.6.2
process: ^0.11.10
@ -26,7 +26,7 @@ specifiers:
dependencies:
'@livechat/ui-kit': 0.5.0-20_ibvs32p3vr2bbtbo3dwziny444
'@multiformats/multiaddr': 10.4.0
js-waku: 0.24.0-158b789
js-waku: 0.26.0
process: 0.11.10
protons-runtime: 3.1.0_uint8arraylist@2.3.2
react: 17.0.2
@ -8382,8 +8382,8 @@ packages:
/js-tokens/4.0.0:
resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==}
/js-waku/0.24.0-158b789:
resolution: {integrity: sha512-M/+hYMXYjlEw9lezxHcmg2F9o5gINJyCadOVC0YLuA7cQD+UIMUDFRqSaoM1J78QlB4QvH+dQrZWMMqU2priVg==}
/js-waku/0.26.0:
resolution: {integrity: sha512-BcgMeYj9wYGNt4fs3lFUSLpFqQttpju4FAmVbB19oYK1IWR8nGKu52eLAFBrh0uH3r73Ud9PXG3I1099THqlOQ==}
engines: {node: '>=16'}
dependencies:
'@chainsafe/libp2p-gossipsub': 4.1.1