ipfs-pubsub-1on1
Communication channel between two peers over IPFS Pubsub
Work in progress!
ipfs-pubsub-1on1
is a 1-to-1 communication channel over IPFS Pubsub. It enables two peers to exchange messages between each other. Note that the channel is currently not authenticated nor encrypted!
Usage
import Channel from 'ipfs-pubsub-1on1'
const ipfs = new IPFS()
const friendId = 'QmP9TWCAsHLs6a3hcCbqE6WZs3VhQF6QsmkFPAFmmcuMa6'
const channel = await Channel.open(ipfs, friendId)
await channel.connect()
await channel.send('Hello World!')
channel.on('message', (message) => {
console.log('Message from', message.from, message)
})
For more usage examples, see the tests