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

Issue:
Rename sigma-tree crate to ergo-lib
### Motivation
With wallet-like features added to sigma-tree its scope expands beyond ErgoTree evaluation.
The original scenario to have ergo-wallet-lib crate for wallet-related features appeared to be not that handy mainly due to the difficulties with code sharing between crates. Especially for generators for `proptest` (orphan rule).


Discussion / hints:

Fix patch:
diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml
index 050d2e8f1..33030e4ce 100644
--- a/.github/workflows/android.yml
+++ b/.github/workflows/android.yml
@@ -29,5 +29,5 @@ jobs:
         uses: reactivecircus/android-emulator-runner@v2
         with:
           api-level: 29
-          script: cd ./bindings/ergo-wallet-lib-android && ./gradlew connectedCheck
+          script: cd ./bindings/ergo-lib-android && ./gradlew connectedCheck
 
diff --git a/.travis.yml b/.travis.yml
index 851d5e07e..e8d00d86c 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -66,7 +66,7 @@ matrix:
       before_script:
         - curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh -s -- -f
       script:
-        - cd bindings/ergo-wallet-lib-wasm
+        - cd bindings/ergo-lib-wasm
         - wasm-pack build
         - npm install && npm run test
 
@@ -79,16 +79,16 @@ matrix:
         - cargo install cargo-lipo
         - cargo install cbindgen
       script:
-        - cd bindings/ergo-wallet-lib-ios
+        - cd bindings/ergo-lib-ios
         - cargo lipo --release --targets=aarch64-apple-ios,x86_64-apple-ios
         - swift package generate-xcodeproj
-        - xcodebuild -project ./ErgoWallet.xcodeproj -xcconfig ./Config/Release.xcconfig -sdk iphoneos
-        - xcodebuild -project ./ErgoWallet.xcodeproj -xcconfig ./Config/Release.xcconfig -sdk iphonesimulator
+        - xcodebuild -project ./ErgoLib.xcodeproj -xcconfig ./Config/Release.xcconfig -sdk iphoneos
+        - xcodebuild -project ./ErgoLib.xcodeproj -xcconfig ./Config/Release.xcconfig -sdk iphonesimulator
 
-    - name: test sigma-tree without default features
+    - name: test ergo-lib without default features
       rust: stable
       script:
-        - cd sigma-tree
+        - cd ergo-lib
         - cargo build --no-default-features
 
 
diff --git a/Cargo.toml b/Cargo.toml
index cb9fc3ab6..691f8a779 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,9 +1,9 @@
 [workspace]
 members = [
     "sigma-ser",
-    "sigma-tree",
-    "bindings/ergo-wallet-lib-wasm",
-    "bindings/ergo-wallet-lib-c-core",
-    "bindings/ergo-wallet-lib-c",
-    "bindings/ergo-wallet-lib-android",
+    "ergo-lib",
+    "bindings/ergo-lib-wasm",
+    "bindings/ergo-lib-c-core",
+    "bindings/ergo-lib-c",
+    "bindings/ergo-lib-android",
 ]
diff --git a/README.md b/README.md
index 0ad66e908..1d48bdac8 100644
--- a/README.md
+++ b/README.md
@@ -4,13 +4,13 @@
 Rust implementation of [ErgoScript](https://github.com/ScorexFoundation/sigmastate-interpreter) cryptocurrency scripting language. 
 
 ## Crates
-[sigma-tree](https://github.com/ergoplatform/sigma-rust/tree/develop/sigma-tree) - ErgoTree, interpreter, chain types (transactions, boxes, etc.), JSON serialization.
+[ergo-lib](https://github.com/ergoplatform/sigma-rust/tree/develop/ergo-lib) - ErgoTree, interpreter, chain types (transactions, boxes, etc.), JSON serialization.
 
-[ergo-wallet](https://github.com/ergoplatform/sigma-rust/tree/develop/ergo-wallet-lib) - Transaction creation and signing. Has bindings for the following platforms:
-- [JS/TS(WASM)](https://github.com/ergoplatform/sigma-rust/tree/develop/bindings/ergo-wallet-lib-wasm)
-- [iOS](https://github.com/ergoplatform/sigma-rust/tree/develop/bindings/ergo-wallet-lib-ios)
-- [Android(JNI)](https://github.com/ergoplatform/sigma-rust/tree/develop/bindings/ergo-wallet-lib-android)
-- [C](https://github.com/ergoplatform/sigma-rust/tree/develop/bindings/ergo-wallet-lib-c)
+[ergo-wallet](https://github.com/ergoplatform/sigma-rust/tree/develop/ergo-lib) - Transaction creation and signing. Has bindings for the following platforms:
+- [JS/TS(WASM)](https://github.com/ergoplatform/sigma-rust/tree/develop/bindings/ergo-lib-wasm)
+- [iOS](https://github.com/ergoplatform/sigma-rust/tree/develop/bindings/ergo-lib-ios)
+- [Android(JNI)](https://github.com/ergoplatform/sigma-rust/tree/develop/bindings/ergo-lib-android)
+- [C](https://github.com/ergoplatform/sigma-rust/tree/develop/bindings/ergo-lib-c)
 
 ## Contributing
 Contributions are very welcome! Checkout issues labeled ["help wanted" and "good first issue"](https://github.com/ergoplatform/sigma-rust/labels/help%20wanted)
diff --git a/bindings/ergo-wallet-lib-android/Cargo.toml b/bindings/ergo-lib-android/Cargo.toml
similarity index 59%
rename from bindings/ergo-wallet-lib-android/Cargo.toml
rename to bindings/ergo-lib-android/Cargo.toml
index fd425bf96..e48ce3293 100644
--- a/bindings/ergo-wallet-lib-android/Cargo.toml
+++ b/bindings/ergo-lib-android/Cargo.toml
@@ -1,9 +1,10 @@
 [package]
-name = "ergo-wallet-lib-jni"
+name = "ergo-lib-jni"
 version = "0.1.0"
+license = "CC0-1.0"
 authors = ["Denys Zadorozhnyi <denys@zadorozhnyi.com>"]
 edition = "2018"
-description = "Ergo wallet JNI bindings"
+description = "JNI bindings for ergo-lib"
 
 [lib]
 name = "ergowalletlibjni"
@@ -14,6 +15,6 @@ path = "src/main/rust/lib.rs"
 jni = "0.17.0"
 failure = "0.1"
 log = "0.4"
-sigma-tree = { path = "../../sigma-tree"}
-ergo-wallet-lib-c-core = { path = "../ergo-wallet-lib-c-core"}
+ergo-lib = { path = "../../ergo-lib"}
+ergo-lib-c-core = { path = "../ergo-lib-c-core"}
 
diff --git a/bindings/ergo-wallet-lib-android/build.gradle b/bindings/ergo-lib-android/build.gradle
similarity index 98%
rename from bindings/ergo-wallet-lib-android/build.gradle
rename to bindings/ergo-lib-android/build.gradle
index fccc800d7..bb019eb24 100644
--- a/bindings/ergo-wallet-lib-android/build.gradle
+++ b/bindings/ergo-lib-android/build.gradle
@@ -62,7 +62,7 @@ android {
         testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
         testInstrumentationRunnerArguments clearPackageData: 'true'
         multiDexEnabled true
-        archivesBaseName = "ergo-wallet-lib-$versionName"
+        archivesBaseName = "ergo-lib-$versionName"
     }
 
     buildTypes {
diff --git a/bindings/ergo-wallet-lib-android/gradle.properties b/bindings/ergo-lib-android/gradle.properties
similarity index 100%
rename from bindings/ergo-wallet-lib-android/gradle.properties
rename to bindings/ergo-lib-android/gradle.properties
diff --git a/bindings/ergo-wallet-lib-android/gradle/wrapper/gradle-wrapper.jar b/bindings/ergo-lib-android/gradle/wrapper/gradle-wrapper.jar
similarity index 100%
rename from bindings/ergo-wallet-lib-android/gradle/wrapper/gradle-wrapper.jar
rename to bindings/ergo-lib-android/gradle/wrapper/gradle-wrapper.jar
diff --git a/bindings/ergo-wallet-lib-android/gradle/wrapper/gradle-wrapper.properties b/bindings/ergo-lib-android/gradle/wrapper/gradle-wrapper.properties
similarity index 100%
rename from bindings/ergo-wallet-lib-android/gradle/wrapper/gradle-wrapper.properties
rename to bindings/ergo-lib-android/gradle/wrapper/gradle-wrapper.properties
diff --git a/bindings/ergo-wallet-lib-android/gradlew b/bindings/ergo-lib-android/gradlew
similarity index 100%
rename from bindings/ergo-wallet-lib-android/gradlew
rename to bindings/ergo-lib-android/gradlew
diff --git a/bindings/ergo-wallet-lib-android/gradlew.bat b/bindings/ergo-lib-android/gradlew.bat
similarity index 100%
rename from bindings/ergo-wallet-lib-android/gradlew.bat
rename to bindings/ergo-lib-android/gradlew.bat
diff --git a/bindings/ergo-lib-android/settings.gradle b/bindings/ergo-lib-android/settings.gradle
new file mode 100644
index 000000000..e890d767d
--- /dev/null
+++ b/bindings/ergo-lib-android/settings.gradle
@@ -0,0 +1,1 @@
+rootProject.name = "ergo-lib-jni"
\ No newline at end of file
diff --git a/bindings/ergo-wallet-lib-android/src/androidTest/java/org/ergoplatform/wallet/jni/WalletLibTest.kt b/bindings/ergo-lib-android/src/androidTest/java/org/ergoplatform/wallet/jni/WalletLibTest.kt
similarity index 100%
rename from bindings/ergo-wallet-lib-android/src/androidTest/java/org/ergoplatform/wallet/jni/WalletLibTest.kt
rename to bindings/ergo-lib-android/src/androidTest/java/org/ergoplatform/wallet/jni/WalletLibTest.kt
diff --git a/bindings/ergo-wallet-lib-android/src/main/AndroidManifest.xml b/bindings/ergo-lib-android/src/main/AndroidManifest.xml
similarity index 100%
rename from bindings/ergo-wallet-lib-android/src/main/AndroidManifest.xml
rename to bindings/ergo-lib-android/src/main/AndroidManifest.xml
diff --git a/bindings/ergo-wallet-lib-android/src/main/java/org/ergoplatform/wallet/jni/WalletLib.kt b/bindings/ergo-lib-android/src/main/java/org/ergoplatform/wallet/jni/WalletLib.kt
similarity index 100%
rename from bindings/ergo-wallet-lib-android/src/main/java/org/ergoplatform/wallet/jni/WalletLib.kt
rename to bindings/ergo-lib-android/src/main/java/org/ergoplatform/wallet/jni/WalletLib.kt
diff --git a/bindings/ergo-wallet-lib-android/src/main/rust/exception.rs b/bindings/ergo-lib-android/src/main/rust/exception.rs
similarity index 100%
rename from bindings/ergo-wallet-lib-android/src/main/rust/exception.rs
rename to bindings/ergo-lib-android/src/main/rust/exception.rs
diff --git a/bindings/ergo-wallet-lib-android/src/main/rust/lib.rs b/bindings/ergo-lib-android/src/main/rust/lib.rs
similarity index 92%
rename from bindings/ergo-wallet-lib-android/src/main/rust/lib.rs
rename to bindings/ergo-lib-android/src/main/rust/lib.rs
index 0d4079ddb..865398cac 100644
--- a/bindings/ergo-wallet-lib-android/src/main/rust/lib.rs
+++ b/bindings/ergo-lib-android/src/main/rust/lib.rs
@@ -1,4 +1,4 @@
-//! JNI bindings fo ergo-wallet-lib
+//! JNI bindings fo ergo-lib
 
 // Coding conventions
 #![deny(non_upper_case_globals)]
@@ -15,7 +15,7 @@ extern crate log;
 
 mod exception;
 
-use ergo_wallet_lib_c_core::{address_delete, address_from_testnet, AddressPtr};
+use ergo_lib_c_core::{address_delete, address_from_testnet, AddressPtr};
 use exception::unwrap_exc_or;
 use jni::{
     objects::{JClass, JString},
diff --git a/bindings/ergo-wallet-lib-c-core/Cargo.toml b/bindings/ergo-lib-c-core/Cargo.toml
similarity index 53%
rename from bindings/ergo-wallet-lib-c-core/Cargo.toml
rename to bindings/ergo-lib-c-core/Cargo.toml
index d1e767aac..9d1a1e72f 100644
--- a/bindings/ergo-wallet-lib-c-core/Cargo.toml
+++ b/bindings/ergo-lib-c-core/Cargo.toml
@@ -1,15 +1,16 @@
 [package]
-name = "ergo-wallet-lib-c-core"
+name = "ergo-lib-c-core"
 version = "0.1.0"
+license = "CC0-1.0"
 authors = ["Denys Zadorozhnyi <denys@zadorozhnyi.com>"]
 edition = "2018"
-description = "Ergo wallet core for C and JNI bindings"
+description = "Common code for ergo-lib C and JNI bindings"
 
 [lib]
 crate-type = ["lib"]
 
 [dependencies]
-sigma-tree = { path = "../../sigma-tree"}
+ergo-lib = { path = "../../ergo-lib"}
 
 thiserror = "1"
 
diff --git a/bindings/ergo-wallet-lib-c-core/src/error.rs b/bindings/ergo-lib-c-core/src/error.rs
similarity index 100%
rename from bindings/ergo-wallet-lib-c-core/src/error.rs
rename to bindings/ergo-lib-c-core/src/error.rs
diff --git a/bindings/ergo-wallet-lib-c-core/src/lib.rs b/bindings/ergo-lib-c-core/src/lib.rs
similarity index 98%
rename from bindings/ergo-wallet-lib-c-core/src/lib.rs
rename to bindings/ergo-lib-c-core/src/lib.rs
index 9fb4ab5ff..4dbe4607a 100644
--- a/bindings/ergo-wallet-lib-c-core/src/lib.rs
+++ b/bindings/ergo-lib-c-core/src/lib.rs
@@ -14,7 +14,7 @@ mod error;
 pub use error::*;
 
 use chain::address::{AddressEncoder, NetworkPrefix};
-use sigma_tree::chain;
+use ergo_lib::chain;
 
 pub struct Address(chain::address::Address);
 pub type AddressPtr = *mut Address;
diff --git a/bindings/ergo-wallet-lib-c/Cargo.toml b/bindings/ergo-lib-c/Cargo.toml
similarity index 65%
rename from bindings/ergo-wallet-lib-c/Cargo.toml
rename to bindings/ergo-lib-c/Cargo.toml
index 52de53668..63e13ac53 100644
--- a/bindings/ergo-wallet-lib-c/Cargo.toml
+++ b/bindings/ergo-lib-c/Cargo.toml
@@ -1,9 +1,10 @@
 [package]
-name = "ergo-wallet-lib-c"
+name = "ergo-lib-c"
 version = "0.1.0"
+license = "CC0-1.0"
 authors = ["Denys Zadorozhnyi <denys@zadorozhnyi.com>"]
 edition = "2018"
-description = "Ergo wallet C bindings"
+description = "C bindings for ergo-lib"
 build = "build.rs"
 
 [lib]
@@ -11,8 +12,8 @@ crate-type = ["staticlib"]
 
 [dependencies]
 ffi_helpers = "0.2"
-sigma-tree = { path = "../../sigma-tree"}
-ergo-wallet-lib-c-core = { path = "../ergo-wallet-lib-c-core"}
+ergo-lib = { path = "../../ergo-lib"}
+ergo-lib-c-core = { path = "../ergo-lib-c-core"}
 
 
 [build-dependencies]
diff --git a/bindings/ergo-wallet-lib-c/build.rs b/bindings/ergo-lib-c/build.rs
similarity index 100%
rename from bindings/ergo-wallet-lib-c/build.rs
rename to bindings/ergo-lib-c/build.rs
diff --git a/bindings/ergo-wallet-lib-c/cbindgen.toml b/bindings/ergo-lib-c/cbindgen.toml
similarity index 98%
rename from bindings/ergo-wallet-lib-c/cbindgen.toml
rename to bindings/ergo-lib-c/cbindgen.toml
index 98d5e767d..1ebdce229 100644
--- a/bindings/ergo-wallet-lib-c/cbindgen.toml
+++ b/bindings/ergo-lib-c/cbindgen.toml
@@ -130,7 +130,7 @@ bitflags = false
 
 [parse]
 parse_deps = true
-include = ["ergo-wallet-lib-c-core"]
+include = ["ergo-lib-c-core"]
 # exclude = []
 clean = false
 extra_bindings = []
diff --git a/bindings/ergo-wallet-lib-c/h/ergo_wallet.h b/bindings/ergo-lib-c/h/ergo_wallet.h
similarity index 100%
rename from bindings/ergo-wallet-lib-c/h/ergo_wallet.h
rename to bindings/ergo-lib-c/h/ergo_wallet.h
diff --git a/bindings/ergo-wallet-lib-c/src/lib.rs b/bindings/ergo-lib-c/src/lib.rs
similarity index 96%
rename from bindings/ergo-wallet-lib-c/src/lib.rs
rename to bindings/ergo-lib-c/src/lib.rs
index 8667ff59d..0d4f831c7 100644
--- a/bindings/ergo-wallet-lib-c/src/lib.rs
+++ b/bindings/ergo-lib-c/src/lib.rs
@@ -1,4 +1,4 @@
-//! C bindings for sigma-tree
+//! C bindings for ergo-lib
 
 // Coding conventions
 #![deny(non_upper_case_globals)]
@@ -10,10 +10,10 @@
 // #![deny(missing_docs)]
 #![allow(clippy::missing_safety_doc)]
 
-use sigma_tree::chain;
+use ergo_lib::chain;
 
-use ergo_wallet_lib_c_core::{address_delete, address_from_testnet};
-pub use ergo_wallet_lib_c_core::{Address, Error};
+use ergo_lib_c_core::{address_delete, address_from_testnet};
+pub use ergo_lib_c_core::{Address, Error};
 use std::{
     ffi::{CStr, CString},
     os::raw::c_char,
diff --git a/bindings/ergo-wallet-lib-ios/Config/Release.xcconfig b/bindings/ergo-lib-ios/Config/Release.xcconfig
similarity index 70%
rename from bindings/ergo-wallet-lib-ios/Config/Release.xcconfig
rename to bindings/ergo-lib-ios/Config/Release.xcconfig
index fd27fb1fb..006d517ca 100644
--- a/bindings/ergo-wallet-lib-ios/Config/Release.xcconfig
+++ b/bindings/ergo-lib-ios/Config/Release.xcconfig
@@ -1,11 +1,11 @@
 CONFIGURATION = Release
-TARGET_NAME = ErgoWallet
+TARGET_NAME = ErgoLib
 SUPPORTED_PLATFORMS = iphonesimulator iphoneos
 VALID_ARCHS = arm64 x86_64
 ENABLE_BITCODE = NO
 BUILD_LIBRARY_FOR_DISTRIBUTION = YES
-HEADER_SEARCH_PATHS = $(inherited) $(SRCROOT)/../ergo-wallet-lib-c/h
-OTHER_LDFLAGS = $(inherited) -L"$(SRCROOT)/../../target/universal/release" -lergo_wallet_lib_c
+HEADER_SEARCH_PATHS = $(inherited) $(SRCROOT)/../ergo-lib-c/h
+OTHER_LDFLAGS = $(inherited) -L"$(SRCROOT)/../../target/universal/release" -lergo_lib_c
 PRODUCT_BUNDLE_IDENTIFIER = org.ergoplatform.wallet
 FRAMEWORK_VERSION = 0.1.0-pre1
 
diff --git a/bindings/ergo-lib-ios/Package.swift b/bindings/ergo-lib-ios/Package.swift
new file mode 100644
index 000000000..2f6a335b1
--- /dev/null
+++ b/bindings/ergo-lib-ios/Package.swift
@@ -0,0 +1,20 @@
+// swift-tools-version:5.2
+
+import PackageDescription
+
+let package = Package(
+    name: "ErgoLib",
+    products: [
+        .library(
+            name: "ErgoLib",
+            targets: ["ErgoLib"]
+        )
+    ],
+    targets: [
+        .systemLibrary(name: "ErgoLibC"),
+        .target(
+            name: "ErgoLib",
+            dependencies: ["ErgoLibC"]
+        ),
+    ]
+)
diff --git a/bindings/ergo-wallet-lib-ios/Sources/ErgoWallet/ErgoWallet.swift b/bindings/ergo-lib-ios/Sources/ErgoLib/ErgoLib.swift
similarity index 99%
rename from bindings/ergo-wallet-lib-ios/Sources/ErgoWallet/ErgoWallet.swift
rename to bindings/ergo-lib-ios/Sources/ErgoLib/ErgoLib.swift
index 78639347b..ec303a37a 100644
--- a/bindings/ergo-wallet-lib-ios/Sources/ErgoWallet/ErgoWallet.swift
+++ b/bindings/ergo-lib-ios/Sources/ErgoLib/ErgoLib.swift
@@ -1,5 +1,5 @@
 import Foundation
-import ErgoWalletC
+import ErgoLibC
 
 enum WalletError: Error {
     case walletCError(reason: String)
diff --git a/bindings/ergo-wallet-lib-ios/Sources/ErgoWalletC/module.modulemap b/bindings/ergo-lib-ios/Sources/ErgoLibC/module.modulemap
similarity index 67%
rename from bindings/ergo-wallet-lib-ios/Sources/ErgoWalletC/module.modulemap
rename to bindings/ergo-lib-ios/Sources/ErgoLibC/module.modulemap
index 53c45c5a8..a2895ce13 100644
--- a/bindings/ergo-wallet-lib-ios/Sources/ErgoWalletC/module.modulemap
+++ b/bindings/ergo-lib-ios/Sources/ErgoLibC/module.modulemap
@@ -1,4 +1,4 @@
-module ErgoWalletC {
+module ErgoLibC {
     umbrella header "shim.h"
     export *
 }
diff --git a/bindings/ergo-wallet-lib-ios/Sources/ErgoWalletC/shim.h b/bindings/ergo-lib-ios/Sources/ErgoLibC/shim.h
similarity index 100%
rename from bindings/ergo-wallet-lib-ios/Sources/ErgoWalletC/shim.h
rename to bindings/ergo-lib-ios/Sources/ErgoLibC/shim.h
diff --git a/bindings/ergo-wallet-lib-wasm/.babelrc b/bindings/ergo-lib-wasm/.babelrc
similarity index 100%
rename from bindings/ergo-wallet-lib-wasm/.babelrc
rename to bindings/ergo-lib-wasm/.babelrc
diff --git a/bindings/ergo-wallet-lib-wasm/Cargo.toml b/bindings/ergo-lib-wasm/Cargo.toml
similarity index 87%
rename from bindings/ergo-wallet-lib-wasm/Cargo.toml
rename to bindings/ergo-lib-wasm/Cargo.toml
index b5da0c412..6d16867b9 100644
--- a/bindings/ergo-wallet-lib-wasm/Cargo.toml
+++ b/bindings/ergo-lib-wasm/Cargo.toml
@@ -1,9 +1,10 @@
 [package]
-name = "ergo-wallet-lib-wasm"
+name = "ergo-lib-wasm"
 version = "0.1.0"
+license = "CC0-1.0"
 authors = ["Denys Zadorozhnyi <denys@zadorozhnyi.com>"]
 edition = "2018"
-description = "Ergo wallet WASM bindings"
+description = "WASM bindings for ergo-lib"
 
 [lib]
 crate-type = ["cdylib", "rlib"]
@@ -16,8 +17,8 @@ serde = { version = "1.0", features = ["derive"]}
 serde_json = "1.0"
 js-sys = "0.3"
 
-sigma-tree = { path = "../../sigma-tree" }
-# used in elliptic-curve(in sigma-tree), compiled here with WASM support
+ergo-lib = { path = "../../ergo-lib" }
+# used in elliptic-curve(in ergo-lib), compiled here with WASM support
 getrandom = {version = "0.1", features = ["wasm-bindgen"]}
 # The `console_error_panic_hook` crate provides better debugging of panics by
 # logging them with `console.error`. This is great for development, but requires
diff --git a/bindings/ergo-wallet-lib-wasm/README.md b/bindings/ergo-lib-wasm/README.md
similarity index 100%
rename from bindings/ergo-wallet-lib-wasm/README.md
rename to bindings/ergo-lib-wasm/README.md
diff --git a/bindings/ergo-wallet-lib-wasm/jsdoc.json b/bindings/ergo-lib-wasm/jsdoc.json
similarity index 100%
rename from bindings/ergo-wallet-lib-wasm/jsdoc.json
rename to bindings/ergo-lib-wasm/jsdoc.json
diff --git a/bindings/ergo-wallet-lib-wasm/package.json b/bindings/ergo-lib-wasm/package.json
similarity index 100%
rename from bindings/ergo-wallet-lib-wasm/package.json
rename to bindings/ergo-lib-wasm/package.json
diff --git a/bindings/ergo-wallet-lib-wasm/src/address.rs b/bindings/ergo-lib-wasm/src/address.rs
similarity index 99%
rename from bindings/ergo-wallet-lib-wasm/src/address.rs
rename to bindings/ergo-lib-wasm/src/address.rs
index a690cbb09..7e5b3b77a 100644
--- a/bindings/ergo-wallet-lib-wasm/src/address.rs
+++ b/bindings/ergo-lib-wasm/src/address.rs
@@ -1,6 +1,6 @@
 //! Address types
 
-use sigma_tree::chain;
+use ergo_lib::chain;
 use wasm_bindgen::prelude::*;
 
 /**
diff --git a/bindings/ergo-wallet-lib-wasm/src/ast.rs b/bindings/ergo-lib-wasm/src/ast.rs
similarity index 82%
rename from bindings/ergo-wallet-lib-wasm/src/ast.rs
rename to bindings/ergo-lib-wasm/src/ast.rs
index beaf19934..f288c3c6c 100644
--- a/bindings/ergo-wallet-lib-wasm/src/ast.rs
+++ b/bindings/ergo-lib-wasm/src/ast.rs
@@ -10,20 +10,20 @@ use crate::utils::I64;
 /// Ergo constant(evaluated) values
 #[wasm_bindgen]
 #[derive(PartialEq, Eq, Debug, Clone)]
-pub struct Constant(sigma_tree::ast::Constant);
+pub struct Constant(ergo_lib::ast::Constant);
 
 #[wasm_bindgen]
 impl Constant {
     /// Decode from Base16-encoded ErgoTree serialized value
     pub fn decode_from_base16(base16_bytes_str: String) -> Result<Constant, JsValue> {
-        let bytes = sigma_tree::chain::Base16DecodedBytes::try_from(base16_bytes_str.clone())
+        let bytes = ergo_lib::chain::Base16DecodedBytes::try_from(base16_bytes_str.clone())
             .map_err(|_| {
                 JsValue::from_str(&format!(
                     "failed to decode base16 from: {}",
                     base16_bytes_str.clone()
                 ))
             })?;
-        sigma_tree::ast::Constant::try_from(bytes)
+        ergo_lib::ast::Constant::try_from(bytes)
             .map_err(|e| JsValue::from_str(&format! {"{:?}", e}))
             .map(Constant)
     }
@@ -41,7 +41,7 @@ impl Constant {
     /// Extract i32 value, returning error if wrong type
     pub fn as_i32(&self) -> Result<i32, JsValue> {
         match self.0.v {
-            sigma_tree::ast::ConstantVal::Int(v) => Ok(v),
+            ergo_lib::ast::ConstantVal::Int(v) => Ok(v),
             _ => Err(JsValue::from_str(&format!(
                 "expected i32, found: {:?}",
                 self.0.v
@@ -57,7 +57,7 @@ impl Constant {
     /// Extract i64 value, returning error if wrong type
     pub fn as_i64(&self) -> Result<I64, JsValue> {
         match self.0.v {
-            sigma_tree::ast::ConstantVal::Long(v) => Ok(v.into()),
+            ergo_lib::ast::ConstantVal::Long(v) => Ok(v.into()),
             _ => Err(JsValue::from_str(&format!(
                 "expected i64, found: {:?}",
                 self.0.v
@@ -73,8 +73,8 @@ impl Constant {
     /// Extract byte array, returning error if wrong type
     pub fn as_byte_array(&self) -> Result<Uint8Array, JsValue> {
         match self.0.v.clone() {
-            sigma_tree::ast::ConstantVal::Coll(sigma_tree::ast::ConstantColl::Primitive(
-                sigma_tree::ast::CollPrim::CollByte(coll_bytes),
+            ergo_lib::ast::ConstantVal::Coll(ergo_lib::ast::ConstantColl::Primitive(
+                ergo_lib::ast::CollPrim::CollByte(coll_bytes),
             )) => {
                 let u8_bytes: Vec<u8> = coll_bytes.into_iter().map(|b| b as u8).collect();
                 Ok(Uint8Array::from(u8_bytes.as_slice()))
diff --git a/bindings/ergo-wallet-lib-wasm/src/box_coll.rs b/bindings/ergo-lib-wasm/src/box_coll.rs
similarity index 99%
rename from bindings/ergo-wallet-lib-wasm/src/box_coll.rs
rename to bindings/ergo-lib-wasm/src/box_coll.rs
index 1aa640284..dee2a529d 100644
--- a/bindings/ergo-wallet-lib-wasm/src/box_coll.rs
+++ b/bindings/ergo-lib-wasm/src/box_coll.rs
@@ -1,5 +1,5 @@
 //! Box collection types
-use sigma_tree::chain;
+use ergo_lib::chain;
 use wasm_bindgen::prelude::*;
 
 use crate::ergo_box::{ErgoBox, ErgoBoxCandidate};
diff --git a/bindings/ergo-wallet-lib-wasm/src/box_selector.rs b/bindings/ergo-lib-wasm/src/box_selector.rs
similarity index 59%
rename from bindings/ergo-wallet-lib-wasm/src/box_selector.rs
rename to bindings/ergo-lib-wasm/src/box_selector.rs
index 492f73de4..139368d22 100644
--- a/bindings/ergo-wallet-lib-wasm/src/box_selector.rs
+++ b/bindings/ergo-lib-wasm/src/box_selector.rs
@@ -1,5 +1,5 @@
 //! Box selection algorithms
-use sigma_tree::chain::ergo_box::ErgoBoxAssets;
+use ergo_lib::chain::ergo_box::ErgoBoxAssets;
 use wasm_bindgen::prelude::*;
 
 /// Box selector implementations
@@ -10,13 +10,13 @@ pub enum BoxSelector {
 }
 
 impl BoxSelector {
-    /// Get underlying sigma-tree BoxSelector implementation
+    /// Get underlying ergo-lib BoxSelector implementation
     pub fn inner<T: ErgoBoxAssets>(
         &self,
-    ) -> Box<dyn sigma_tree::wallet::box_selector::BoxSelector<T>> {
+    ) -> Box<dyn ergo_lib::wallet::box_selector::BoxSelector<T>> {
         match self {
             BoxSelector::Simple => {
-                Box::new(sigma_tree::wallet::box_selector::simple::SimpleBoxSelector {})
+                Box::new(ergo_lib::wallet::box_selector::simple::SimpleBoxSelector {})
             }
         }
     }
diff --git a/bindings/ergo-wallet-lib-wasm/src/contract.rs b/bindings/ergo-lib-wasm/src/contract.rs
similarity index 97%
rename from bindings/ergo-wallet-lib-wasm/src/contract.rs
rename to bindings/ergo-lib-wasm/src/contract.rs
index c86abc9ca..45044a9e1 100644
--- a/bindings/ergo-wallet-lib-wasm/src/contract.rs
+++ b/bindings/ergo-lib-wasm/src/contract.rs
@@ -1,5 +1,5 @@
 //! Contract, for easier ErgoTree generation
-use sigma_tree::chain;
+use ergo_lib::chain;
 use wasm_bindgen::prelude::*;
 
 use crate::address::Address;
diff --git a/bindings/ergo-wallet-lib-wasm/src/ergo_box.rs b/bindings/ergo-lib-wasm/src/ergo_box.rs
similarity index 99%
rename from bindings/ergo-wallet-lib-wasm/src/ergo_box.rs
rename to bindings/ergo-lib-wasm/src/ergo_box.rs
index 1574f8c52..549d82589 100644
--- a/bindings/ergo-wallet-lib-wasm/src/ergo_box.rs
+++ b/bindings/ergo-lib-wasm/src/ergo_box.rs
@@ -19,7 +19,7 @@
 use std::convert::TryFrom;
 
 use chain::ergo_box::register::NonMandatoryRegisters;
-use sigma_tree::chain;
+use ergo_lib::chain;
 use wasm_bindgen::prelude::*;
 
 use crate::{contract::Contract, transaction::TxId};
diff --git a/bindings/ergo-wallet-lib-wasm/src/ergo_box/box_builder.rs b/bindings/ergo-lib-wasm/src/ergo_box/box_builder.rs
similarity index 99%
rename from bindings/ergo-wallet-lib-wasm/src/ergo_box/box_builder.rs
rename to bindings/ergo-lib-wasm/src/ergo_box/box_builder.rs
index 7932c2634..d8c6f5908 100644
--- a/bindings/ergo-wallet-lib-wasm/src/ergo_box/box_builder.rs
+++ b/bindings/ergo-lib-wasm/src/ergo_box/box_builder.rs
@@ -1,5 +1,5 @@
 //! ErgoBoxCandidate builder
-use sigma_tree::chain;
+use ergo_lib::chain;
 use wasm_bindgen::prelude::*;
 
 use crate::contract::Contract;
diff --git a/bindings/ergo-wallet-lib-wasm/src/ergo_state_ctx.rs b/bindings/ergo-lib-wasm/src/ergo_state_ctx.rs
similarity index 96%
rename from bindings/ergo-wallet-lib-wasm/src/ergo_state_ctx.rs
rename to bindings/ergo-lib-wasm/src/ergo_state_ctx.rs
index 3423d6442..6e654e7a7 100644
--- a/bindings/ergo-wallet-lib-wasm/src/ergo_state_ctx.rs
+++ b/bindings/ergo-lib-wasm/src/ergo_state_ctx.rs
@@ -1,5 +1,5 @@
 //! Ergo blockchain state (for ErgoTree evaluation)
-use sigma_tree::chain;
+use ergo_lib::chain;
 use wasm_bindgen::prelude::*;
 
 /// TBD
diff --git a/bindings/ergo-wallet-lib-wasm/src/lib.rs b/bindings/ergo-lib-wasm/src/lib.rs
similarity index 93%
rename from bindings/ergo-wallet-lib-wasm/src/lib.rs
rename to bindings/ergo-lib-wasm/src/lib.rs
index a54530db8..d25c9e9f7 100644
--- a/bindings/ergo-wallet-lib-wasm/src/lib.rs
+++ b/bindings/ergo-lib-wasm/src/lib.rs
@@ -1,4 +1,4 @@
-//! WASM bindings for sigma-tree
+//! WASM bindings for ergo-lib
 
 // Coding conventions
 #![forbid(unsafe_code)]
diff --git a/bindings/ergo-wallet-lib-wasm/src/secret_key.rs b/bindings/ergo-lib-wasm/src/secret_key.rs
similarity index 95%
rename from bindings/ergo-wallet-lib-wasm/src/secret_key.rs
rename to bindings/ergo-lib-wasm/src/secret_key.rs
index 9ab6f9c35..c47bd93d5 100644
--- a/bindings/ergo-wallet-lib-wasm/src/secret_key.rs
+++ b/bindings/ergo-lib-wasm/src/secret_key.rs
@@ -1,8 +1,8 @@
 //! Secret key
 use std::convert::TryInto;
 
-use sigma_tree::sigma_protocol::DlogProverInput;
-use sigma_tree::wallet;
+use ergo_lib::sigma_protocol::DlogProverInput;
+use ergo_lib::wallet;
 use wasm_bindgen::prelude::*;
 
 use crate::address::Address;
diff --git a/bindings/ergo-wallet-lib-wasm/src/transaction.rs b/bindings/ergo-lib-wasm/src/transaction.rs
similarity index 98%
rename from bindings/ergo-wallet-lib-wasm/src/transaction.rs
rename to bindings/ergo-lib-wasm/src/transaction.rs
index d43029717..fa7b7abde 100644
--- a/bindings/ergo-wallet-lib-wasm/src/transaction.rs
+++ b/bindings/ergo-lib-wasm/src/transaction.rs
@@ -1,5 +1,5 @@
 //! Ergo transaction
-use sigma_tree::chain;
+use ergo_lib::chain;
 use wasm_bindgen::prelude::*;
 
 /// Transaction id
diff --git a/bindings/ergo-wallet-lib-wasm/src/tx_builder.rs b/bindings/ergo-lib-wasm/src/tx_builder.rs
similarity index 94%
rename from bindings/ergo-wallet-lib-wasm/src/tx_builder.rs
rename to bindings/ergo-lib-wasm/src/tx_builder.rs
index 0ec8a11fd..492dcf850 100644
--- a/bindings/ergo-wallet-lib-wasm/src/tx_builder.rs
+++ b/bindings/ergo-lib-wasm/src/tx_builder.rs
@@ -1,5 +1,5 @@
 //! Unsigned transaction builder
-use sigma_tree::{chain::ergo_box::ErgoBox, wallet};
+use ergo_lib::{chain::ergo_box::ErgoBox, wallet};
 use wasm_bindgen::prelude::*;
 
 use crate::{
@@ -34,7 +34,7 @@ impl TxBuilder {
         change_address: &Address,
         min_change_value: &BoxValue,
     ) -> Result<TxBuilder, JsValue> {
-        sigma_tree::wallet::tx_builder::TxBuilder::new(
+        ergo_lib::wallet::tx_builder::TxBuilder::new(
             box_selector.inner::<ErgoBox>(),
             inputs.clone().into(),
             output_candidates.clone().into(),
diff --git a/bindings/ergo-wallet-lib-wasm/src/utils.rs b/bindings/ergo-lib-wasm/src/utils.rs
similarity index 100%
rename from bindings/ergo-wallet-lib-wasm/src/utils.rs
rename to bindings/ergo-lib-wasm/src/utils.rs
diff --git a/bindings/ergo-wallet-lib-wasm/src/wallet.rs b/bindings/ergo-lib-wasm/src/wallet.rs
similarity index 90%
rename from bindings/ergo-wallet-lib-wasm/src/wallet.rs
rename to bindings/ergo-lib-wasm/src/wallet.rs
index fa09e894d..5d122bfce 100644
--- a/bindings/ergo-wallet-lib-wasm/src/wallet.rs
+++ b/bindings/ergo-lib-wasm/src/wallet.rs
@@ -1,5 +1,5 @@
 //! Wallet-like features
-use sigma_tree::chain::ergo_box::ErgoBox;
+use ergo_lib::chain::ergo_box::ErgoBox;
 use wasm_bindgen::prelude::*;
 
 use crate::{
@@ -9,7 +9,7 @@ use crate::{
 
 /// TBD
 #[wasm_bindgen]
-pub struct Wallet(sigma_tree::wallet::Wallet);
+pub struct Wallet(ergo_lib::wallet::Wallet);
 
 #[wasm_bindgen]
 impl Wallet {
@@ -22,7 +22,7 @@ impl Wallet {
     /// Create wallet using provided secret key
     #[wasm_bindgen]
     pub fn from_secret(secret: &SecretKey) -> Wallet {
-        Wallet(sigma_tree::wallet::Wallet::from_secrets(vec![secret
+        Wallet(ergo_lib::wallet::Wallet::from_secrets(vec![secret
             .clone()
             .into()]))
     }
diff --git a/bindings/ergo-wallet-lib-wasm/webpack.config.js b/bindings/ergo-lib-wasm/webpack.config.js
similarity index 100%
rename from bindings/ergo-wallet-lib-wasm/webpack.config.js
rename to bindings/ergo-lib-wasm/webpack.config.js
diff --git a/bindings/ergo-wallet-lib-android/settings.gradle b/bindings/ergo-wallet-lib-android/settings.gradle
deleted file mode 100644
index 0c3a288f3..000000000
--- a/bindings/ergo-wallet-lib-android/settings.gradle
+++ /dev/null
@@ -1,1 +0,0 @@
-rootProject.name = "ergo-wallet-lib-jni"
\ No newline at end of file
diff --git a/bindings/ergo-wallet-lib-ios/Package.swift b/bindings/ergo-wallet-lib-ios/Package.swift
deleted file mode 100644
index 2d3bead78..000000000
--- a/bindings/ergo-wallet-lib-ios/Package.swift
+++ /dev/null
@@ -1,20 +0,0 @@
-// swift-tools-version:5.2
-
-import PackageDescription
-
-let package = Package(
-    name: "ErgoWallet",
-    products: [
-        .library(
-            name: "ErgoWallet",
-            targets: ["ErgoWallet"]
-        )
-    ],
-    targets: [
-        .systemLibrary(name: "ErgoWalletC"),
-        .target(
-            name: "ErgoWallet",
-            dependencies: ["ErgoWalletC"]
-        ),
-    ]
-)
diff --git a/sigma-tree/Cargo.toml b/ergo-lib/Cargo.toml
similarity index 90%
rename from sigma-tree/Cargo.toml
rename to ergo-lib/Cargo.toml
index ab28ee43b..b3c8caf93 100644
--- a/sigma-tree/Cargo.toml
+++ b/ergo-lib/Cargo.toml
@@ -1,8 +1,10 @@
 [package]
-name = "sigma-tree"
+name = "ergo-lib"
 version = "0.1.0"
+license = "CC0-1.0"
 authors = ["Denys Zadorozhnyi <denys@zadorozhnyi.com>"]
 edition = "2018"
+description = "ErgoTree interpreter and wallet-like features for Ergo"
 
 [lib]
 crate-type = ["cdylib", "rlib"]
diff --git a/sigma-tree/README.md b/ergo-lib/README.md
similarity index 100%
rename from sigma-tree/README.md
rename to ergo-lib/README.md
diff --git a/sigma-tree/src/ast.rs b/ergo-lib/src/ast.rs
similarity index 100%
rename from sigma-tree/src/ast.rs
rename to ergo-lib/src/ast.rs
diff --git a/sigma-tree/src/ast/constant.rs b/ergo-lib/src/ast/constant.rs
similarity index 100%
rename from sigma-tree/src/ast/constant.rs
rename to ergo-lib/src/ast/constant.rs
diff --git a/sigma-tree/src/ast/ops.rs b/ergo-lib/src/ast/ops.rs
similarity index 100%
rename from sigma-tree/src/ast/ops.rs
rename to ergo-lib/src/ast/ops.rs
diff --git a/sigma-tree/src/big_integer.rs b/ergo-lib/src/big_integer.rs
similarity index 100%
rename from sigma-tree/src/big_integer.rs
rename to ergo-lib/src/big_integer.rs
diff --git a/sigma-tree/src/chain.rs b/ergo-lib/src/chain.rs
similarity index 100%
rename from sigma-tree/src/chain.rs
rename to ergo-lib/src/chain.rs
diff --git a/sigma-tree/src/chain/address.rs b/ergo-lib/src/chain/address.rs
similarity index 100%
rename from sigma-tree/src/chain/address.rs
rename to ergo-lib/src/chain/address.rs
diff --git a/sigma-tree/src/chain/base16_bytes.rs b/ergo-lib/src/chain/base16_bytes.rs
similarity index 100%
rename from sigma-tree/src/chain/base16_bytes.rs
rename to ergo-lib/src/chain/base16_bytes.rs
diff --git a/sigma-tree/src/chain/context_extension.rs b/ergo-lib/src/chain/context_extension.rs
similarity index 100%
rename from sigma-tree/src/chain/context_extension.rs
rename to ergo-lib/src/chain/context_extension.rs
diff --git a/sigma-tree/src/chain/contract.rs b/ergo-lib/src/chain/contract.rs
similarity index 100%
rename from sigma-tree/src/chain/contract.rs
rename to ergo-lib/src/chain/contract.rs
diff --git a/sigma-tree/src/chain/data_input.rs b/ergo-lib/src/chain/data_input.rs
similarity index 100%
rename from sigma-tree/src/chain/data_input.rs
rename to ergo-lib/src/chain/data_input.rs
diff --git a/sigma-tree/src/chain/digest32.rs b/ergo-lib/src/chain/digest32.rs
similarity index 100%
rename from sigma-tree/src/chain/digest32.rs
rename to ergo-lib/src/chain/digest32.rs
diff --git a/sigma-tree/src/chain/ergo_box.rs b/ergo-lib/src/chain/ergo_box.rs
similarity index 100%
rename from sigma-tree/src/chain/ergo_box.rs
rename to ergo-lib/src/chain/ergo_box.rs
diff --git a/sigma-tree/src/chain/ergo_box/box_builder.rs b/ergo-lib/src/chain/ergo_box/box_builder.rs
similarity index 100%
rename from sigma-tree/src/chain/ergo_box/box_builder.rs
rename to ergo-lib/src/chain/ergo_box/box_builder.rs
diff --git a/sigma-tree/src/chain/ergo_box/box_id.rs b/ergo-lib/src/chain/ergo_box/box_id.rs
similarity index 100%
rename from sigma-tree/src/chain/ergo_box/box_id.rs
rename to ergo-lib/src/chain/ergo_box/box_id.rs
diff --git a/sigma-tree/src/chain/ergo_box/box_value.rs b/ergo-lib/src/chain/ergo_box/box_value.rs
similarity index 100%
rename from sigma-tree/src/chain/ergo_box/box_value.rs
rename to ergo-lib/src/chain/ergo_box/box_value.rs
diff --git a/sigma-tree/src/chain/ergo_box/register.rs b/ergo-lib/src/chain/ergo_box/register.rs
similarity index 100%
rename from sigma-tree/src/chain/ergo_box/register.rs
rename to ergo-lib/src/chain/ergo_box/register.rs
diff --git a/sigma-tree/src/chain/ergo_state_context.rs b/ergo-lib/src/chain/ergo_state_context.rs
similarity index 100%
rename from sigma-tree/src/chain/ergo_state_context.rs
rename to ergo-lib/src/chain/ergo_state_context.rs
diff --git a/sigma-tree/src/chain/input.rs b/ergo-lib/src/chain/input.rs
similarity index 100%
rename from sigma-tree/src/chain/input.rs
rename to ergo-lib/src/chain/input.rs
diff --git a/sigma-tree/src/chain/json.rs b/ergo-lib/src/chain/json.rs
similarity index 100%
rename from sigma-tree/src/chain/json.rs
rename to ergo-lib/src/chain/json.rs
diff --git a/sigma-tree/src/chain/prover_result.rs b/ergo-lib/src/chain/prover_result.rs
similarity index 100%
rename from sigma-tree/src/chain/prover_result.rs
rename to ergo-lib/src/chain/prover_result.rs
diff --git a/sigma-tree/src/chain/token.rs b/ergo-lib/src/chain/token.rs
similarity index 100%
rename from sigma-tree/src/chain/token.rs
rename to ergo-lib/src/chain/token.rs
diff --git a/sigma-tree/src/chain/transaction.rs b/ergo-lib/src/chain/transaction.rs
similarity index 100%
rename from sigma-tree/src/chain/transaction.rs
rename to ergo-lib/src/chain/transaction.rs
diff --git a/sigma-tree/src/chain/transaction/unsigned.rs b/ergo-lib/src/chain/transaction/unsigned.rs
similarity index 100%
rename from sigma-tree/src/chain/transaction/unsigned.rs
rename to ergo-lib/src/chain/transaction/unsigned.rs
diff --git a/sigma-tree/src/constants.rs b/ergo-lib/src/constants.rs
similarity index 100%
rename from sigma-tree/src/constants.rs
rename to ergo-lib/src/constants.rs
diff --git a/sigma-tree/src/ergo_tree.rs b/ergo-lib/src/ergo_tree.rs
similarity index 100%
rename from sigma-tree/src/ergo_tree.rs
rename to ergo-lib/src/ergo_tree.rs
diff --git a/sigma-tree/src/eval.rs b/ergo-lib/src/eval.rs
similarity index 100%
rename from sigma-tree/src/eval.rs
rename to ergo-lib/src/eval.rs
diff --git a/sigma-tree/src/eval/cost_accum.rs b/ergo-lib/src/eval/cost_accum.rs
similarity index 100%
rename from sigma-tree/src/eval/cost_accum.rs
rename to ergo-lib/src/eval/cost_accum.rs
diff --git a/sigma-tree/src/eval/costs.rs b/ergo-lib/src/eval/costs.rs
similarity index 100%
rename from sigma-tree/src/eval/costs.rs
rename to ergo-lib/src/eval/costs.rs
diff --git a/sigma-tree/src/eval/value.rs b/ergo-lib/src/eval/value.rs
similarity index 100%
rename from sigma-tree/src/eval/value.rs
rename to ergo-lib/src/eval/value.rs
diff --git a/sigma-tree/src/lib.rs b/ergo-lib/src/lib.rs
similarity index 100%
rename from sigma-tree/src/lib.rs
rename to ergo-lib/src/lib.rs
diff --git a/sigma-tree/src/serialization.rs b/ergo-lib/src/serialization.rs
similarity index 100%
rename from sigma-tree/src/serialization.rs
rename to ergo-lib/src/serialization.rs
diff --git a/sigma-tree/src/serialization/constant.rs b/ergo-lib/src/serialization/constant.rs
similarity index 100%
rename from sigma-tree/src/serialization/constant.rs
rename to ergo-lib/src/serialization/constant.rs
diff --git a/sigma-tree/src/serialization/constant_placeholder.rs b/ergo-lib/src/serialization/constant_placeholder.rs
similarity index 100%
rename from sigma-tree/src/serialization/constant_placeholder.rs
rename to ergo-lib/src/serialization/constant_placeholder.rs
diff --git a/sigma-tree/src/serialization/constant_store.rs b/ergo-lib/src/serialization/constant_store.rs
similarity index 100%
rename from sigma-tree/src/serialization/constant_store.rs
rename to ergo-lib/src/serialization/constant_store.rs
diff --git a/sigma-tree/src/serialization/data.rs b/ergo-lib/src/serialization/data.rs
similarity index 100%
rename from sigma-tree/src/serialization/data.rs
rename to ergo-lib/src/serialization/data.rs
diff --git a/sigma-tree/src/serialization/ergo_box.rs b/ergo-lib/src/serialization/ergo_box.rs
similarity index 100%
rename from sigma-tree/src/serialization/ergo_box.rs
rename to ergo-lib/src/serialization/ergo_box.rs
diff --git a/sigma-tree/src/serialization/expr.rs b/ergo-lib/src/serialization/expr.rs
similarity index 100%
rename from sigma-tree/src/serialization/expr.rs
rename to ergo-lib/src/serialization/expr.rs
diff --git a/sigma-tree/src/serialization/fold.rs b/ergo-lib/src/serialization/fold.rs
similarity index 100%
rename from sigma-tree/src/serialization/fold.rs
rename to ergo-lib/src/serialization/fold.rs
diff --git a/sigma-tree/src/serialization/op_code.rs b/ergo-lib/src/serialization/op_code.rs
similarity index 100%
rename from sigma-tree/src/serialization/op_code.rs
rename to ergo-lib/src/serialization/op_code.rs
diff --git a/sigma-tree/src/serialization/serializable.rs b/ergo-lib/src/serialization/serializable.rs
similarity index 100%
rename from sigma-tree/src/serialization/serializable.rs
rename to ergo-lib/src/serialization/serializable.rs
diff --git a/sigma-tree/src/serialization/sigma_byte_reader.rs b/ergo-lib/src/serialization/sigma_byte_reader.rs
similarity index 100%
rename from sigma-tree/src/serialization/sigma_byte_reader.rs
rename to ergo-lib/src/serialization/sigma_byte_reader.rs
diff --git a/sigma-tree/src/serialization/sigma_byte_writer.rs b/ergo-lib/src/serialization/sigma_byte_writer.rs
similarity index 100%
rename from sigma-tree/src/serialization/sigma_byte_writer.rs
rename to ergo-lib/src/serialization/sigma_byte_writer.rs
diff --git a/sigma-tree/src/serialization/sigmaboolean.rs b/ergo-lib/src/serialization/sigmaboolean.rs
similarity index 100%
rename from sigma-tree/src/serialization/sigmaboolean.rs
rename to ergo-lib/src/serialization/sigmaboolean.rs
diff --git a/sigma-tree/src/serialization/types.rs b/ergo-lib/src/serialization/types.rs
similarity index 100%
rename from sigma-tree/src/serialization/types.rs
rename to ergo-lib/src/serialization/types.rs
diff --git a/sigma-tree/src/sigma_protocol.rs b/ergo-lib/src/sigma_protocol.rs
similarity index 100%
rename from sigma-tree/src/sigma_protocol.rs
rename to ergo-lib/src/sigma_protocol.rs
diff --git a/sigma-tree/src/sigma_protocol/challenge.rs b/ergo-lib/src/sigma_protocol/challenge.rs
similarity index 100%
rename from sigma-tree/src/sigma_protocol/challenge.rs
rename to ergo-lib/src/sigma_protocol/challenge.rs
diff --git a/sigma-tree/src/sigma_protocol/dlog_group.rs b/ergo-lib/src/sigma_protocol/dlog_group.rs
similarity index 100%
rename from sigma-tree/src/sigma_protocol/dlog_group.rs
rename to ergo-lib/src/sigma_protocol/dlog_group.rs
diff --git a/sigma-tree/src/sigma_protocol/dlog_protocol.rs b/ergo-lib/src/sigma_protocol/dlog_protocol.rs
similarity index 100%
rename from sigma-tree/src/sigma_protocol/dlog_protocol.rs
rename to ergo-lib/src/sigma_protocol/dlog_protocol.rs
diff --git a/sigma-tree/src/sigma_protocol/fiat_shamir.rs b/ergo-lib/src/sigma_protocol/fiat_shamir.rs
similarity index 100%
rename from sigma-tree/src/sigma_protocol/fiat_shamir.rs
rename to ergo-lib/src/sigma_protocol/fiat_shamir.rs
diff --git a/sigma-tree/src/sigma_protocol/private_input.rs b/ergo-lib/src/sigma_protocol/private_input.rs
similarity index 100%
rename from sigma-tree/src/sigma_protocol/private_input.rs
rename to ergo-lib/src/sigma_protocol/private_input.rs
diff --git a/sigma-tree/src/sigma_protocol/prover.rs b/ergo-lib/src/sigma_protocol/prover.rs
similarity index 99%
rename from sigma-tree/src/sigma_protocol/prover.rs
rename to ergo-lib/src/sigma_protocol/prover.rs
index ceee97d1f..462c1f4d3 100644
--- a/sigma-tree/src/sigma_protocol/prover.rs
+++ b/ergo-lib/src/sigma_protocol/prover.rs
@@ -259,8 +259,8 @@ pub trait Prover: Evaluator {
     }
 }
 
-fn convert_to_unproven(sigma_tree: SigmaBoolean) -> UnprovenTree {
-    match sigma_tree {
+fn convert_to_unproven(ergo_lib: SigmaBoolean) -> UnprovenTree {
+    match ergo_lib {
         // TODO: why it's even here? Make another SigmaBoolean without trivial props?
         SigmaBoolean::TrivialProp(_) => todo!(),
         SigmaBoolean::ProofOfKnowledge(pok) => match pok {
diff --git a/sigma-tree/src/sigma_protocol/sig_serializer.rs b/ergo-lib/src/sigma_protocol/sig_serializer.rs
similarity index 100%
rename from sigma-tree/src/sigma_protocol/sig_serializer.rs
rename to ergo-lib/src/sigma_protocol/sig_serializer.rs
diff --git a/sigma-tree/src/sigma_protocol/sigma_boolean.rs b/ergo-lib/src/sigma_protocol/sigma_boolean.rs
similarity index 100%
rename from sigma-tree/src/sigma_protocol/sigma_boolean.rs
rename to ergo-lib/src/sigma_protocol/sigma_boolean.rs
diff --git a/sigma-tree/src/sigma_protocol/unchecked_tree.rs b/ergo-lib/src/sigma_protocol/unchecked_tree.rs
similarity index 100%
rename from sigma-tree/src/sigma_protocol/unchecked_tree.rs
rename to ergo-lib/src/sigma_protocol/unchecked_tree.rs
diff --git a/sigma-tree/src/sigma_protocol/unproven_tree.rs b/ergo-lib/src/sigma_protocol/unproven_tree.rs
similarity index 100%
rename from sigma-tree/src/sigma_protocol/unproven_tree.rs
rename to ergo-lib/src/sigma_protocol/unproven_tree.rs
diff --git a/sigma-tree/src/sigma_protocol/verifier.rs b/ergo-lib/src/sigma_protocol/verifier.rs
similarity index 100%
rename from sigma-tree/src/sigma_protocol/verifier.rs
rename to ergo-lib/src/sigma_protocol/verifier.rs
diff --git a/sigma-tree/src/types.rs b/ergo-lib/src/types.rs
similarity index 100%
rename from sigma-tree/src/types.rs
rename to ergo-lib/src/types.rs
diff --git a/sigma-tree/src/util.rs b/ergo-lib/src/util.rs
similarity index 100%
rename from sigma-tree/src/util.rs
rename to ergo-lib/src/util.rs
diff --git a/sigma-tree/src/wallet.rs b/ergo-lib/src/wallet.rs
similarity index 100%
rename from sigma-tree/src/wallet.rs
rename to ergo-lib/src/wallet.rs
diff --git a/sigma-tree/src/wallet/box_selector.rs b/ergo-lib/src/wallet/box_selector.rs
similarity index 100%
rename from sigma-tree/src/wallet/box_selector.rs
rename to ergo-lib/src/wallet/box_selector.rs
diff --git a/sigma-tree/src/wallet/box_selector/simple.rs b/ergo-lib/src/wallet/box_selector/simple.rs
similarity index 100%
rename from sigma-tree/src/wallet/box_selector/simple.rs
rename to ergo-lib/src/wallet/box_selector/simple.rs
diff --git a/sigma-tree/src/wallet/secret_key.rs b/ergo-lib/src/wallet/secret_key.rs
similarity index 100%
rename from sigma-tree/src/wallet/secret_key.rs
rename to ergo-lib/src/wallet/secret_key.rs
diff --git a/sigma-tree/src/wallet/signing.rs b/ergo-lib/src/wallet/signing.rs
similarity index 100%
rename from sigma-tree/src/wallet/signing.rs
rename to ergo-lib/src/wallet/signing.rs
diff --git a/sigma-tree/src/wallet/tx_builder.rs b/ergo-lib/src/wallet/tx_builder.rs
similarity index 100%
rename from sigma-tree/src/wallet/tx_builder.rs
rename to ergo-lib/src/wallet/tx_builder.rs
diff --git a/sigma-ser/Cargo.toml b/sigma-ser/Cargo.toml
index 1047493a1..11dded138 100644
--- a/sigma-ser/Cargo.toml
+++ b/sigma-ser/Cargo.toml
@@ -1,8 +1,10 @@
 [package]
 name = "sigma-ser"
 version = "0.1.0"
+license = "CC0-1.0"
 authors = ["Denys Zadorozhnyi <denys@zadorozhnyi.com>"]
 edition = "2018"
+description = "Ergo binary serialization primitives"
 
 [lib]
 crate-type = ["cdylib", "rlib"]


Test patch:
diff --git a/.github/workflows/wasm_test.yml b/.github/workflows/wasm_test.yml
index 9272cfba6..73d45ac86 100644
--- a/.github/workflows/wasm_test.yml
+++ b/.github/workflows/wasm_test.yml
@@ -16,7 +16,7 @@ jobs:
     runs-on: ubuntu-latest
     defaults:
       run: 
-        working-directory: bindings/ergo-wallet-lib-wasm
+        working-directory: bindings/ergo-lib-wasm
     steps:
       - name: checkout
         uses: actions/checkout@v2
diff --git a/bindings/ergo-wallet-lib-android/src/test/java/org/ergoplatform/wallet/jni/WalletLibTest.kt b/bindings/ergo-lib-android/src/test/java/org/ergoplatform/wallet/jni/WalletLibTest.kt
similarity index 100%
rename from bindings/ergo-wallet-lib-android/src/test/java/org/ergoplatform/wallet/jni/WalletLibTest.kt
rename to bindings/ergo-lib-android/src/test/java/org/ergoplatform/wallet/jni/WalletLibTest.kt
diff --git a/bindings/ergo-wallet-lib-wasm/tests/index.js b/bindings/ergo-lib-wasm/tests/index.js
similarity index 100%
rename from bindings/ergo-wallet-lib-wasm/tests/index.js
rename to bindings/ergo-lib-wasm/tests/index.js
diff --git a/bindings/ergo-wallet-lib-wasm/tests/test_constant.js b/bindings/ergo-lib-wasm/tests/test_constant.js
similarity index 97%
rename from bindings/ergo-wallet-lib-wasm/tests/test_constant.js
rename to bindings/ergo-lib-wasm/tests/test_constant.js
index 745c604fc..a819d6aeb 100644
--- a/bindings/ergo-wallet-lib-wasm/tests/test_constant.js
+++ b/bindings/ergo-lib-wasm/tests/test_constant.js
@@ -2,7 +2,7 @@ import { expect, assert } from 'chai';
 
 import {
     Constant, I64
-} from '../pkg/ergo_wallet_lib_wasm';
+} from '../pkg/ergo_lib_wasm';
 
 it('decode Constant i32', async () => {
   let enc_v = '048ce5d4e505';
diff --git a/bindings/ergo-wallet-lib-wasm/tests/test_transaction.js b/bindings/ergo-lib-wasm/tests/test_transaction.js
similarity index 98%
rename from bindings/ergo-wallet-lib-wasm/tests/test_transaction.js
rename to bindings/ergo-lib-wasm/tests/test_transaction.js
index 5e1b699c0..9e0aabd4c 100644
--- a/bindings/ergo-wallet-lib-wasm/tests/test_transaction.js
+++ b/bindings/ergo-lib-wasm/tests/test_transaction.js
@@ -4,7 +4,7 @@ import {
   Address, Wallet, ErgoBox, ErgoBoxCandidateBuilder, Contract,
   ErgoBoxes, ErgoBoxCandidates,
   ErgoStateContext, TxBuilder, BoxValue, UnsignedTransaction, BoxSelector, SecretKey, TxId,
-} from '../pkg/ergo_wallet_lib_wasm';
+} from '../pkg/ergo_lib_wasm';
 
 it('TxBuilder test', async () => {
   const recipient = Address.from_testnet_str('3WvsT2Gm4EpsM9Pg18PdY6XyhNNMqXDsvJTbbf6ihLvAmSb7u5RN');
diff --git a/bindings/ergo-wallet-lib-wasm/tests/transaction.rs b/bindings/ergo-lib-wasm/tests/transaction.rs
similarity index 95%
rename from bindings/ergo-wallet-lib-wasm/tests/transaction.rs
rename to bindings/ergo-lib-wasm/tests/transaction.rs
index 25b9df02e..cd25c9bde 100644
--- a/bindings/ergo-wallet-lib-wasm/tests/transaction.rs
+++ b/bindings/ergo-lib-wasm/tests/transaction.rs
@@ -4,17 +4,17 @@ extern crate wasm_bindgen_test;
 
 use std::{convert::TryInto, rc::Rc};
 
-use ergo_wallet_lib_wasm::ergo_box::box_builder::ErgoBoxCandidateBuilder;
-use ergo_wallet_lib_wasm::{
-    address::Address, box_coll::ErgoBoxCandidates, box_coll::ErgoBoxes, box_selector::BoxSelector,
-    contract::Contract, ergo_box::BoxValue, ergo_state_ctx::ErgoStateContext,
-    secret_key::SecretKey, tx_builder::TxBuilder, wallet::Wallet,
-};
-use sigma_tree::{
+use ergo_lib::{
     ast::Expr, chain::ergo_box::register::NonMandatoryRegisters, chain::ergo_box::ErgoBox,
     chain::transaction::TxId, sigma_protocol::sigma_boolean::SigmaProp,
     sigma_protocol::DlogProverInput, ErgoTree,
 };
+use ergo_lib_wasm::ergo_box::box_builder::ErgoBoxCandidateBuilder;
+use ergo_lib_wasm::{
+    address::Address, box_coll::ErgoBoxCandidates, box_coll::ErgoBoxes, box_selector::BoxSelector,
+    contract::Contract, ergo_box::BoxValue, ergo_state_ctx::ErgoStateContext,
+    secret_key::SecretKey, tx_builder::TxBuilder, wallet::Wallet,
+};
 use wasm_bindgen::JsValue;
 use wasm_bindgen_test::*;
 
@@ -23,7 +23,7 @@ wasm_bindgen_test_configure!(run_in_browser);
 #[wasm_bindgen_test]
 fn test_sign_transaction() {
     let pi = DlogProverInput::random();
-    let sk = SecretKey::from(sigma_tree::wallet::secret_key::SecretKey::from(pi.clone()));
+    let sk = SecretKey::from(ergo_lib::wallet::secret_key::SecretKey::from(pi.clone()));
     let pk: SigmaProp = pi.public_image().into();
     let tree = ErgoTree::from(Rc::new(Expr::Const(pk.into())));
 
diff --git a/sigma-tree/proptest-regressions/chain/address.txt b/ergo-lib/proptest-regressions/chain/address.txt
similarity index 100%
rename from sigma-tree/proptest-regressions/chain/address.txt
rename to ergo-lib/proptest-regressions/chain/address.txt
diff --git a/sigma-tree/proptest-regressions/chain/ergo_box.txt b/ergo-lib/proptest-regressions/chain/ergo_box.txt
similarity index 100%
rename from sigma-tree/proptest-regressions/chain/ergo_box.txt
rename to ergo-lib/proptest-regressions/chain/ergo_box.txt
diff --git a/sigma-tree/proptest-regressions/chain/transaction.txt b/ergo-lib/proptest-regressions/chain/transaction.txt
similarity index 100%
rename from sigma-tree/proptest-regressions/chain/transaction.txt
rename to ergo-lib/proptest-regressions/chain/transaction.txt
diff --git a/sigma-tree/proptest-regressions/ergo_tree.txt b/ergo-lib/proptest-regressions/ergo_tree.txt
similarity index 100%
rename from sigma-tree/proptest-regressions/ergo_tree.txt
rename to ergo-lib/proptest-regressions/ergo_tree.txt
diff --git a/sigma-tree/proptest-regressions/serialization/types.txt b/ergo-lib/proptest-regressions/serialization/types.txt
similarity index 100%
rename from sigma-tree/proptest-regressions/serialization/types.txt
rename to ergo-lib/proptest-regressions/serialization/types.txt
diff --git a/sigma-tree/proptest-regressions/wallet/signing.txt b/ergo-lib/proptest-regressions/wallet/signing.txt
similarity index 100%
rename from sigma-tree/proptest-regressions/wallet/signing.txt
rename to ergo-lib/proptest-regressions/wallet/signing.txt
diff --git a/sigma-tree/proptest-regressions/wallet/tx_builder.txt b/ergo-lib/proptest-regressions/wallet/tx_builder.txt
similarity index 100%
rename from sigma-tree/proptest-regressions/wallet/tx_builder.txt
rename to ergo-lib/proptest-regressions/wallet/tx_builder.txt
diff --git a/sigma-tree/src/test_util.rs b/ergo-lib/src/test_util.rs
similarity index 100%
rename from sigma-tree/src/test_util.rs
rename to ergo-lib/src/test_util.rs