UI Binding to On-Chain Data
Nyvo’s front-end framework binds UI components to on-chain account data and events. The generated UI uses Solana web3 APIs or an Anchor client to fetch account states (for example, fetching a staking pool’s status or a marketplace listing) and display them in real time. Whenever the on-chain state updates (due to a transaction), the UI can query the RPC node for the latest data and update components.
Nyvo abstracts this with an internal API layer, for instance, a Data Service that periodically queries key program accounts and makes the data available to front-end components. Developers can thus write front-end logic in familiar frameworks (React, etc.), while Nyvo handles the heavy lifting of serializing/deserializing account data and calling RPC endpoints.
The result is a reactive UI that stays in sync with the blockchain state. For example, if a user stakes tokens, the transaction (once confirmed) triggers the UI to refresh the staked balance from the program’s account. Nyvo ensures the UX remains smooth by bundling multiple related actions into single transactions when possible (minimizing the number of wallet approval pop-ups).
Last updated