2022-05-26 21:17:10 +00:00
|
|
|
import { createClient } from '../src/client'
|
2022-05-25 12:52:48 +00:00
|
|
|
|
|
|
|
import { Community } from '../src/community'
|
2022-05-29 18:20:35 +00:00
|
|
|
// import { Messenger } from '../src/messenger'
|
2022-05-25 12:52:48 +00:00
|
|
|
|
2022-05-26 21:17:10 +00:00
|
|
|
const COMMUNITY_PUBLIC_KEY =
|
2022-05-29 21:06:18 +00:00
|
|
|
'0x029dd5fecbd689dc11e2a5b399afed92cf1fab65d315b883efca753e8f3882f3bd' // compressed; A catchy name
|
2022-06-01 05:39:47 +00:00
|
|
|
// '0x02c788e419b56c714460220bedadc9c5d401ea10eee48d25ac81fc9a06fb75162e' // compressed; A boring name
|
2022-05-29 21:06:18 +00:00
|
|
|
// const COMMUNITY_CHANNEL_KEY = '0x029dd5fecbd689dc11e2a5b399afed92cf1fab65d315b883efca753e8f3882f3bd06935bce-a863-4827-9990-1652ae375c89' // 06935bce-a863-4827-9990-1652ae375c89; #channel
|
|
|
|
const COMMUNITY_CHANNEL_KEY = '6102c603-3246-4b90-986d-43c1b87b165f' // #random; UUID
|
2022-05-25 12:52:48 +00:00
|
|
|
|
|
|
|
;(async () => {
|
|
|
|
const client = await createClient()
|
|
|
|
|
2022-05-29 21:06:18 +00:00
|
|
|
// Community (e.g. name, description, permissions, members, channels, channel messages)
|
2022-05-26 21:17:10 +00:00
|
|
|
const community = await Community.instantiateCommunity(
|
|
|
|
COMMUNITY_PUBLIC_KEY,
|
|
|
|
client
|
|
|
|
)
|
2022-05-25 12:52:48 +00:00
|
|
|
|
2022-05-29 18:20:35 +00:00
|
|
|
// // Messenger/Messages (e.g. direct messages)
|
2022-05-25 12:52:48 +00:00
|
|
|
// const messenger = await Messenger.create(, client)
|
2022-05-29 21:06:18 +00:00
|
|
|
|
|
|
|
// history
|
2022-05-25 12:52:48 +00:00
|
|
|
|
|
|
|
await client.stop()
|
|
|
|
})()
|