Developers
Blueprint SDK Contexts
Tangle Client Context

Tangle Client Context

The TangleClientContext trait provides a standardized interface for interacting with the Tangle network in your Blueprint through a Subxt OnlineClient.

Overview

The TangleClientContext trait provides access to a Subxt client that enables:

  • Transaction Submission - Send transactions to the Tangle network
  • State Queries - Read storage and state from the chain
  • Event Monitoring - Subscribe to and process chain events
  • RPC Calls - Make direct RPC calls to Tangle nodes

Using the Context

1. Define Your Context

First, define your context struct that implements the TangleClientContext trait:

2. Access Subxt Client Functionality

You can then use this context to access the Subxt client and interact with Tangle: