Repository: ergoplatform/sigma-rust (language: rust)

Issue:
Visibility of data types. 
Few questions arising from attempt to parse transactions from blockchain:

1. `pub struct ValId(u32)` has private field and no accessors. Since there're no contraints on value of underlying `u32` I think field should be just made public.

2. Is there reason to include `pub struct SigmaProp(SigmaBoolean)`? Naively plain `SigmaBoolean` would work as well.

3. `ergotree_ir::mir::constant::ConstantPlaceholder` is only visible to crate. Since it's part of `Expr` I believe it's an oversight.


Discussion / hints:

Fix patch:
diff --git a/ergotree-ir/src/mir/constant.rs b/ergotree-ir/src/mir/constant.rs
index e5c0903de..595e0d6db 100644
--- a/ergotree-ir/src/mir/constant.rs
+++ b/ergotree-ir/src/mir/constant.rs
@@ -13,7 +13,7 @@ use std::convert::TryInto;
 
 mod constant_placeholder;
 
-pub(crate) use constant_placeholder::*;
+pub use constant_placeholder::*;
 
 use super::value::CollKind;
 use super::value::NativeColl;
diff --git a/ergotree-ir/src/mir/val_def.rs b/ergotree-ir/src/mir/val_def.rs
index 0128b33e3..de65a2873 100644
--- a/ergotree-ir/src/mir/val_def.rs
+++ b/ergotree-ir/src/mir/val_def.rs
@@ -19,7 +19,7 @@ use proptest_derive::Arbitrary;
 /// Variable id
 #[derive(PartialEq, Eq, Hash, Debug, Clone, Copy, From)]
 #[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
-pub struct ValId(u32);
+pub struct ValId(pub u32);
 
 impl SigmaSerializable for ValId {
     fn sigma_serialize<W: SigmaByteWrite>(&self, w: &mut W) -> Result<(), Error> {


Test patch: