SDK

Dependencies

To use zelluar.py, you’ll need to install the MCL native library. Follow these steps to install it:

sudo apt install libgmp3-devjava
wget https://github.com/herumi/mcl/archive/refs/tags/v1.93.zip
unzip v1.93.zip
cd mcl-1.93
mkdir build
cd build
cmake ..
make
make install

Installation

Install the zelluar.py package via pip:

pip install zellular

Getting Nodes

Zellular Testnet is deployed on the EigenLayer Holesky network. The list of operators can be queried using the following curl command:

curl \
  --header 'content-type: application/json' \
  --url 'https://api.studio.thegraph.com/query/85556/bls_apk_registry/version/latest' \
  --data '{"query":"{ operators { id socket stake } }"}'

The list of nodes can also be quried using the following python code:

Example output:

Note

The node URL of each operator can be accessed using operator["socket"].

Posting Transactions

Zellular sequences transactions in batches. You can send a batch of transactions like this:

When setting blocking=True, the method waits for the batch to be sequenced and returns the index.

You can add your app to zellular test network using:

Fetching and Verifying Transactions

Unlike reading from a traditional blockchain, where you must trust the node you’re connected to, Zellular allows trustless reading of sequenced transactions. This is achieved through an aggregated BLS signature that verifies if the sequence of transaction batches is approved by the majority of Zellular nodes. The Zellular SDK abstracts the complexities of verifying these signatures, providing a simple way to constantly pull the latest finalized transaction batches:

Example output:

If you want to start reading batches from the latest finalized batch rather than from the beginning, you can achieve this by specifying the after parameter with the latest index. Here’s an example of how to do this:

Last updated