Skip to content
Logo

Viem Extension

This is a viem extension library that helps with the development of Cartesi applications, especially frontend applications that run in the browser.

It provides L2 public actions and a new createCartesiPublicClient client constructor that allows to interact with the Cartesi rollups JSON-RPC API.

L1 Contract Interactions

Interactions with the Cartesi rollups smart contracts infrastructure, like sending inputs, depositing assets and executing outputs, are done with viem's own contract actions, using the properly typed ABIs and deployment addresses exported by the @cartesi/viem/abi entrypoint. Check the L1 Contract Interactions guide for details.

Public L2 Actions

Provides convenient methods to interact with Cartesi JSON-RPC API, which provides read-only access to the app specific L2. This includes methods to read applications managed by a node, inputs sent to applications, outputs generated by applications and epochs closed by node.