mx-core 0.1.0

Core utilities for MultiversX Rust services.
Documentation
//! Core utilities for `MultiversX` Rust services.
//!
//! This crate provides shared functionality used across mx-relayer, mx-stress, and mx-notifier:
//! - Protocol constants (shard IDs, transaction options)
//! - Mnemonic normalization
//! - Shard computation (matching mx-chain-go algorithm)
//! - Bech32 address encoding/decoding
//! - Go `BigIntCaster` encode/decode helpers and unsigned amount parsing
//! - Base64/hex encoding utilities
//! - Wallet derivation (Ed25519 signing keys and addresses from BIP39 mnemonics)

mod bech32_utils;
mod bigint;
mod constants;
mod encoding;
mod error;
pub mod leader;
mod mnemonic;
pub mod resilience;
mod shard;
mod topics;
mod wallet;
pub mod ws_protocol;

// Re-export public API
pub use bech32_utils::{decode_bech32, decode_optional_bech32, encode_bech32};
pub use bigint::{decode_big_int_caster, encode_big_int_caster, parse_big_uint};
#[allow(deprecated)]
pub use constants::{
    ALL_SHARD_ID, META_SHARD_ID, METACHAIN_SHARD_ID, TX_OPTION_GUARDED, TX_OPTION_HASH_SIGN,
};
pub use encoding::{
    decode_base64, decode_base64_bytes, decode_base64_or_hex, decode_hex, decode_optional_base64,
    decode_optional_hex, filter_username,
};
pub use error::CoreError;
pub use leader::{
    ConsensusMsgType, ConsensusSignal, EligibleValidator, decode_consensus_signal, epoch_shuffle,
    select_consensus_group, select_leader,
};
pub use mnemonic::normalize_mnemonic;
pub use shard::{
    decode_embedded_receiver, select_shard, shard_of, shard_of_address_bytes, shard_of_bytes,
};
pub use topics::{
    BaseTopic, TRANSACTIONS_BASE_TOPIC, TopicInfo, TopicRouting, TopicShard, all_topics_for_shards,
    broadcast_topic, communication_identifier_between_shards, transaction_topics_from_shards,
};
pub use wallet::{derive_address, derive_signing_key};