Javascript implementation of a standalone zkitter node
zkitter-js is an npm module and a CLI tool designed to make building on Zkitter easier.
To initialize Zkitter and sync with the network:
import{Zkitter}from"zkitter-js";constzkitter=awaitZkitter.initialize({arbitrumHttpProvider:'https://...',});// Sync with arbitrum registrarawaitzkitter.syncUsers();// Sync with zk groups on zkitterawaitzkitter.syncGroup();// Get all historical messages (30 days) from Waku storeawaitzkitter.queryAll();// Subscribe to all future messages from everyoneawaitzkitter.subscribe();
To implement custom database instead of using default LevelDB:
CLI Usage:
You must first initialize zkitter cli with an HTTP provider for Arbitrum mainnet
To fetch all users from Arbitrum:
To sync with one group or all groups:
To list all groups or users:
To publish a post:
(instruction to generate private key is not available yet!)