Z-Ledger
The Z-Ledger service provides tools for interacting with the underlying blockchain or decentralized ledger. It handles transaction broadcasting, event indexing, and state verification.
LedgerContext
export interface LedgerContext {
chain: string; // The specific ledger accessing
}LedgerContext must be sent as _meta - as mentioned in request payload for every method below
As it stands today, we support
MOI Devnet. Make sure you passmoi_devnetfor MOI Devnet as the value(s) in provider underLedgerContext
broadcast
Description: Broadcasts a signed interaction to the respective chain.
Input Schema:
- signedTx (string): The hex-encoded signed transaction payload.
- networkID (string): The target blockchain network.
- chain (string): The ledger provider(Default: MOI)
get_transaction_count
Description: Returns the transaction count of the sender
- Input Schema:
- sender (string): The sender address specific
- chain (string): The ledger provider(Default: MOI)
get_transaction_status
Description: Checks the status and receipt of a specific transaction hash.
- Input Schema:
- txHash (string): The transaction identifier to track.
read_contract
Description: Performs a read-only query against a specific contract or ledger state.
- Input Schema:
- contractAddress (string): The target contract on the ledger.
- functionName (string): The name of the view/pure function.
- params (array): Arguments for the query.
list_events - coming soon
Description: Fetches historical events/logs from the ledger (powered by the ZenZ indexer).
Input Schema:
- eventSignature (string): The signature of the event to filter (e.g.,
UserOnboarded(string,string)). - filters (object): Optional filters such as
appIDortimestamprange.