zChain
. This means that the application "extends" upon the zChain core functionality in terms of message passing and persistance accross nodes. Implementation can be found at https://github.com/zer0-os/zChain/tree/main/apps/meow.init(zIdName, listenAddrs?)
meow.startDaemon(zIdName, listenAddrs?)
meow.load()
meow.sendMeow(message, publishOnTwitter = false, network?)
meow.sendMessage (message: string, channel: string, network?: string)
meow.setDisplayName(peerId, name, force)
meow.followZId(peerIdOrName)
meow.unfollowZId(peerIdOrName)
meow.getPeerFeed(peerIdOrName, n)
meow.getFollowedPeers()
meow.followChannel(channel)
meow.unFollowChannel(channel)
meow.getFollowedChannels()
meow.getChannelFeed(channel, n)
meow.listDBs()
meow.enableTwitter(force)
meow.disableTwitter()
meow.help()
meow.createNetwork(networkName: string, channels: string[])
meow.getNetworkMetadata(networkName: string)
meow.addChannelInNetwork(networkName: string, channel: string)
meow.joinNetwork(networkName: string)
meow.leaveNetwork(networkName: string)
meow.getNetworkList()
meow.getMyNetworks()
zchain.initialize(..)
method to initialize an ipfs node and the databases. Check zChain.initialize()
method in zchain API documentation for more details. Along with initializing zChain, we:setInterval
) try to find & connect with new peers (using a relay)zIdName
(string)listenAddrs
(string[], optional)zchain.startDaemon()
. After which we log the discovery and connections, and listen for new messages (to topics we have been subscribed to). This is specific to the CLI right now.#everything
channel. A node will receive all messages if it's following the #everything
channel (becoming a super node). Additionally, if twitter is enabled, then the message will also be published on #zero
channel.network
name is not passed, then default network 0://default.network
will be used.message
(string)publishOnTwitter
(boolean, optional)true
, then the message will also be published on twitter.network
(string, optional)network
name is not passed, then default network 0://default.network
will be used.message
(string)channel
(string)network
(string, optional)false
and a display name is already present for a peerID.peerId
(string)name
(string)force
(boolean, optional)true
, updates the displayName for a peer, if it has already set previously.followingzIds
databases. And upon establishing connection with the peer you follow, we exchange that peer's (unique) database address (it's local feed database). This way we sync up on the messages published by that peer (as we have a local copy of it's peer database now).peerIdOrName
(string)followingZIds
database, and local feed database of the peer we have unfollowed is dropped.peerIdOrName
(string)peerIdOrName
(string)n
(number)network
name is not passed, then default network 0://default.network
will be used.channel
(string)network
(string, optional)network
name is not passed, then default network 0://default.network
will be used.channel
(string)network
(string, optional)network
name is not passed, then default network 0://default.network
will be used.channel
(string)n
(number)network
(string, optional)followingZIds
: key value store for storing following peersfollowingChannels
: key value store for storing the channels we're following.Peer Feeds
: List of feed databases (address, entries) for each peer we're following.Channel feeds
: List of channel databases (address, entries) for each channel we're following.~/.zchain/twitter-config.json
.meow
, pass true
with sendMeow
function (eg below).force
(boolean)~/.zchain/twitter-config.json
#general
is added to each network. You automatically subscribe to all channels associated with the network after it's creation.
Each network must be "globally unique". To ensure this, the peerID adding the new network, must have an ethereum address and signature added in zchain. And the name must be a valid ZNA, from the list of ZNA's associated with the peer's ethereum address. This will soon be replaced by ZNS.networkName
(string)channels
(string[])networkName
(string)networkName
(string)channel
(string)networkName
(string)networkName
(string)