From eae00d69e2acad9bd87c125f976584ee2c933768 Mon Sep 17 00:00:00 2001 From: Enrico Rubboli Date: Mon, 5 Oct 2026 15:14:10 +0200 Subject: [PATCH 1/2] feat(crypto): re-export order signing types, public parse_addressable Signing an order's fill/conclude/freeze inputs requires the order's balances via TxAdditionalInfo::with_order_info, but the SDK did not re-export OrderId, OrderAdditionalInfo or TokenId, and kept parse_addressable private - so downstream code could not build the additional info without depending on mintlayer-core directly. - re-export OrderAdditionalInfo next to TxAdditionalInfo - re-export OrderId and TokenId from crypto::types - make crypto::parse_addressable public (parse a bech32 address into any Addressable, e.g. an OrderId or TokenId) --- src/crypto/mod.rs | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/crypto/mod.rs b/src/crypto/mod.rs index 70a3d95..11e997f 100644 --- a/src/crypto/mod.rs +++ b/src/crypto/mod.rs @@ -103,16 +103,21 @@ pub use common::primitives::Amount; /// the sighash commitments fork. pub use common::chain::partially_signed_transaction::TxAdditionalInfo; +/// Balances of an order as known at signing time; required for the sighash of +/// the order's fill, conclude and freeze inputs. +pub use common::chain::partially_signed_transaction::OrderAdditionalInfo; + /// Key chain and transaction primitives re-exported from mintlayer-core, so /// that SDK users do not need a direct dependency on it. pub mod types { pub use ml_common::chain::signature::inputsig::InputWitness; pub use ml_common::chain::{ - Destination, OutPointSourceId, SignedTransaction, Transaction, TxInput, TxOutput, + Destination, OrderId, OutPointSourceId, SignedTransaction, Transaction, TxInput, TxOutput, classic_multisig::ClassicMultisigChallenge, htlc::HtlcSecret, output_value::OutputValue, stakelock::StakePoolData, timelock::OutputTimeLock, }; pub use ml_common::primitives::H256; + pub use ml_common::chain::tokens::TokenId; pub use ml_crypto::key::{ PrivateKey, PublicKey, Signature, extended::{ExtendedPrivateKey, ExtendedPublicKey}, @@ -174,8 +179,10 @@ pub(crate) fn chain_config(network: Network) -> &'static ChainConfig { CONFIGS[network as usize].get_or_init(|| Builder::new(ChainType::from(network)).build()) } -/// Parses a bech32 address into an addressable chain object. -pub(crate) fn parse_addressable( +/// Parses a bech32 address into an addressable chain object, e.g. an +/// [`OrderId`] or a [`Transaction`](types::Transaction) input's outpoint +/// source. +pub fn parse_addressable( network: Network, address: &str, ) -> Result { From d1ad2320fa142d616cca0f10a510b667288115d4 Mon Sep 17 00:00:00 2001 From: Enrico Rubboli Date: Mon, 5 Oct 2026 16:05:06 +0200 Subject: [PATCH 2/2] fix: rustfmt ordering and broken intra-doc link Move the TokenId re-export to satisfy rustfmt's import ordering and link the parse_addressable doc comment to types::OrderId, which rustdoc -D warnings could not resolve from the crypto module scope. --- src/crypto/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/crypto/mod.rs b/src/crypto/mod.rs index 11e997f..7e330b0 100644 --- a/src/crypto/mod.rs +++ b/src/crypto/mod.rs @@ -111,13 +111,13 @@ pub use common::chain::partially_signed_transaction::OrderAdditionalInfo; /// that SDK users do not need a direct dependency on it. pub mod types { pub use ml_common::chain::signature::inputsig::InputWitness; + pub use ml_common::chain::tokens::TokenId; pub use ml_common::chain::{ Destination, OrderId, OutPointSourceId, SignedTransaction, Transaction, TxInput, TxOutput, classic_multisig::ClassicMultisigChallenge, htlc::HtlcSecret, output_value::OutputValue, stakelock::StakePoolData, timelock::OutputTimeLock, }; pub use ml_common::primitives::H256; - pub use ml_common::chain::tokens::TokenId; pub use ml_crypto::key::{ PrivateKey, PublicKey, Signature, extended::{ExtendedPrivateKey, ExtendedPublicKey}, @@ -180,7 +180,7 @@ pub(crate) fn chain_config(network: Network) -> &'static ChainConfig { } /// Parses a bech32 address into an addressable chain object, e.g. an -/// [`OrderId`] or a [`Transaction`](types::Transaction) input's outpoint +/// [`OrderId`](types::OrderId) or a [`Transaction`](types::Transaction) input's outpoint /// source. pub fn parse_addressable( network: Network,