Expand description
Mina Protocol transaction types.
This crate provides no_std compatible transaction type definitions for
the Mina Protocol. It is designed for use by external projects that need
access to Mina transaction types without requiring the full ledger crate’s
dependencies.
§Features
no_stdcompatible: Works in embedded and constrained environments such as hardware wallets and WASM runtimes.- Standalone: Minimal dependencies, focused purely on type definitions.
- Documented: All types and fields include rustdoc documentation.
§Transaction Types
Currently supported transaction types:
Coinbase: Block reward transactionsCoinbaseFeeTransfer: Fee transfers within coinbase transactions
§Currency Types
Amount: Currency amounts in nanominaFee: Transaction fees in nanominaSigned: Signed quantities with separate magnitude and signSign: Sign indicator (positive or negative)
§Example
use mina_tx_type::{Amount, Fee, Coinbase, CoinbaseFeeTransfer};
use mina_signer::CompressedPubKey;
// Create a coinbase transaction
let receiver = CompressedPubKey::empty();
let amount = Amount::new(720_000_000_000); // 720 MINA
let coinbase = Coinbase::new(receiver, amount);
assert!(!coinbase.has_fee_transfer());Re-exports§
pub use coinbase::Coinbase;pub use coinbase::CoinbaseFeeTransfer;pub use currency::Amount;pub use currency::Fee;pub use currency::Magnitude;pub use currency::Sign;pub use currency::Signed;