add notes

This commit is contained in:
Felicio Mununga 2022-05-29 20:20:35 +02:00
parent 35daa97188
commit f25e65bb20
No known key found for this signature in database
GPG Key ID: 0EB8D75C775AB6F1
3 changed files with 7 additions and 16 deletions

View File

@ -1,7 +1,10 @@
import React, { StrictMode } from 'react'
import { render } from 'react-dom'
// FIXME!: fixme from; Unable to resolve path to module '@status-im/react'
import { Community } from '@status-im/react'
// TODO?: import/rename Chats, Messages, Messenger
// TODO?: import/rename CommunityAndMessenger, or Status even
const App = () => {
return <Community publicKey="<YOUR_COMMUNITY_KEY>" theme="light" />

View File

@ -1,37 +1,24 @@
// import wtfnode from 'wtfnode'
// [WTF Node?] open handles:
// - Timers:
// node_modules/wtfnode/index.js:43
// - (84600000 ~ 23 hr) (anonymous) @ /<path>/status-im/status-web/node_modules/promise-timeout/index.js:26 // libp2p
// node_modules/wtfnode/index.js:43
// - Intervals:
// node_modules/wtfnode/index.js:43
// - (300000 ~ 5 min) (anonymous) @ /<path>/status-im/status-web/node_modules/js-waku/src/lib/waku.ts:431 // js-waku
import { createClient } from '../src/client'
import { Community } from '../src/community'
import { Messenger } from '../src/messenger'
// import { Messenger } from '../src/messenger'
// const COMMUNITY_PUBLIC_KEY = '0x02cf13719c8b836bebd4e430c497ee38e798a43e4d8c4760c34bbd9bf4f2434d26'
const COMMUNITY_PUBLIC_KEY =
'0x029dd5fecbd689dc11e2a5b399afed92cf1fab65d315b883efca753e8f3882f3bd' // compressed
;(async () => {
const client = await createClient()
// Retrieve Community's metadata (e.g. description)
// Community (e.g. description, channels, channel messages)
const community = await Community.instantiateCommunity(
COMMUNITY_PUBLIC_KEY,
client
)
// // Retrieve and subscribe to messages
// // Messenger/Messages (e.g. direct messages)
// const messenger = await Messenger.create(, client)
// // TODO: Register observers/callbacks
// messenger.addObserver(() => {})
await client.stop()
// wtfnode.dump()
})()

View File

@ -6,6 +6,7 @@ import { Waku } from 'js-waku'
// TODO?: error handling
// TOOD?: teardown
export async function createClient(): Promise<Waku> {
// TODO?: set tiemout
const waku = await Waku.create({
bootstrap: {
default: false,