Brian - Documentation
  • đŸ–ī¸Welcome
  • 👀Prompt-to-earn
  • 🤖Why an Intent Recognition Engine?
  • 🌐Brian AI models
  • 📜Prompt Guide
  • 🧠Use Cases
  • đŸ’ģPowered by Brian
  • â‰ī¸FAQ
  • Brian API
    • âš™ī¸APIs
      • đŸ’ģAPI Swagger
      • 💸/transaction
        • â›“ī¸Actions, Networks, and Tokens supported
          • Deposit and Withdraw to/from DeFi protocols
        • Transactions flow
          • EVM
          • Solana
          • Starknet
      • 📚/knowledge
        • 📑Knowledge Boxes
        • 🐝Public Embeddings
      • đŸ§™â€â™‚ī¸/agent
      • 🧑‍đŸ”Ŧ/parameters-extraction
      • 👨‍đŸ’ģ/smart-contract (alpha)
      • 📰/networks
      • â„šī¸/actions
    • đŸĨŗWhat's New?
    • 🔑API key
  • Brian SDK
    • 📚Brian Typescript SDK
  • AI AGENTS
    • 🤖LangChain<>Brian SDK
  • Brian App
    • 🍀Overview
    • 📤Send Transactions
    • 🙏Ask Brian
    • 🚚Deploy Smart Contracts
  • Misc.
    • Telegram Dev community
    • Website
    • Github
    • Medium
    • Twitter
    • HuggingFace
Powered by GitBook
On this page
  1. Brian API
  2. APIs
  3. /transaction

Transactions flow

PreviousDeposit and Withdraw to/from DeFi protocolsNextEVM

Last updated 4 months ago

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.

The Brian API and are meant to be used on the backend to not expose the Brian API key!

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).

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:

âš™ī¸
💸
ts SDK
EVM
Starknet
Solana