Crate apex_sdk_core

Crate apex_sdk_core 

Source
Expand description

§Apex SDK Core

Core traits and functionality for the Apex SDK.

This crate provides the foundational abstractions used across all blockchain adapters in the Apex SDK. It defines common traits like ChainAdapter and TransactionBuilder that enable unified interaction with different blockchain types.

§Features

  • Chain Adapter Trait: Common interface for all blockchain types
  • Transaction Builder: Flexible transaction construction
  • Type-safe abstractions: Generic over chain implementations

§Usage

This crate is typically used as a dependency by adapter implementations (e.g., apex-sdk-substrate, apex-sdk-evm) and is re-exported through the main apex-sdk crate.

use apex_sdk_core::ChainAdapter;
use apex_sdk_types::{Address, TransactionStatus};

async fn check_transaction<T: ChainAdapter>(
    adapter: &T,
    tx_hash: &str
) -> Result<TransactionStatus, String> {
    adapter.get_transaction_status(tx_hash).await
}

Traits§

ChainAdapter
Trait for blockchain adapters
TransactionBuilder
Transaction builder trait