# Transactions flow

This page explains how to leverage the **Brian API/SDK** to prepare and execute blockchain transactions. The Brian API provides a flexible and agnostic approach to transaction handling, enabling developers to design workflows that best fit their application's architecture.

{% hint style="danger" %}
The Brian API and [ts SDK](/brian-sdk/brian-typescript-sdk.md) are meant to be used on the backend to not expose the Brian API key!
{% endhint %}

The transaction flow consists of two main steps:

1. **Transaction Request:** **Your application backend** interacts with the Brian API/SDK to generate one or more transaction objects. These objects include all necessary details, such as recipient addresses, values, calldata, and additional metadata for frontend/backend purposes.
2. **Transaction Execution:** Transactions can be executed in several ways, depending on your use case. The API is agnostic about execution, enabling flexibility:
   * **Backend Execution:** Your server signs and broadcasts the transaction using a wallet private key.
   * **Frontend Execution:** The transaction is sent to your frontend for user signing and execution through a wallet.
   * **Smart Contract Execution:** The transaction is forwarded to a smart contract call that handles execution.

***

## Example of Transaction Execution

The libraries and tools available for executing the transaction will depend on the type of chain you intend to use (EVM or Non-EVM, such as Solana/Starknet).&#x20;

In any case, the transactions returned by the Brian API are compatible with the most common development tools, such as Viem, Wagmi, Ethers for EVM chains, starknet.js, Starknet React for Starknet, and, Solana-Web3.js for Solana.

Examples:

* [EVM](/brian-api/apis/transaction/transactions-flow/evm.md)
* [Starknet](/brian-api/apis/transaction/transactions-flow/starknet.md)
* [Solana](/brian-api/apis/transaction/transactions-flow/solana.md)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.brianknows.org/brian-api/apis/transaction/transactions-flow.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
