Crate apex_sdk_types

Crate apex_sdk_types 

Source
Expand description

§Apex SDK Types

Common types and data structures used across the Apex SDK.

This crate provides fundamental types for representing blockchain entities across different chain types (Substrate, EVM, Hybrid).

§Core Types

  • Chain: Enumeration of supported blockchain networks
  • ChainType: Classification of chains (Substrate, EVM, Hybrid)
  • Address: Generic address type supporting multiple formats
  • TransactionStatus: Unified transaction status representation
  • CrossChainTransaction: Cross-chain transaction information

§Example

use apex_sdk_types::{Chain, ChainType, Address};

// Create addresses for different chains
let eth_addr = Address::evm("0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb7");
let dot_addr = Address::substrate("15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5");

// Check chain types
assert_eq!(Chain::Ethereum.chain_type(), ChainType::Evm);
assert_eq!(Chain::Polkadot.chain_type(), ChainType::Substrate);
assert_eq!(Chain::Moonbeam.chain_type(), ChainType::Hybrid);

Structs§

CrossChainTransaction
Cross-chain transaction info
Event
Represents a blockchain event emitted by a smart contract or runtime.
EventFilter
Filter criteria for subscribing to blockchain events.

Enums§

Address
Generic address type for different chains
Chain
Supported blockchain networks
ChainType
Blockchain types
TransactionStatus
Transaction status
ValidationError
Errors that can occur when working with addresses and chains