Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,6 @@ target/
# Debugging data
logs.md
tmp_vendor

# wasm-bindgen output, built by crates/wasm/build.sh
crates/wasm/pkg/
86 changes: 37 additions & 49 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@ smplx-macros = { path = "./crates/macros", version = "0.0.9" }
smplx-build = { path = "./crates/build", version = "0.0.9" }
smplx-test = { path = "./crates/test", version = "0.0.9" }
smplx-regtest = { path = "./crates/regtest", version = "0.0.9" }
smplx-sdk = { path = "./crates/sdk", version = "0.0.9" }
smplx-sdk = { path = "./crates/sdk", version = "0.0.9", default-features = false }
smplx-std = { path = "./crates/simplex", version = "0.0.9" }
smplx-wasm = { path = "./crates/wasm", version = "0.0.9" }

serde = { version = "1.0.228", features = ["derive"] }
hex = { version = "0.4.3" }
Expand Down
11 changes: 8 additions & 3 deletions crates/build/src/generator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ impl ArtifactsGenerator {
}

#[must_use]
pub fn set_storage_at(&mut self, index: usize, new_value: [u8; 32]) {
pub fn set_storage_at(&mut self, index: usize, new_value: impl Into<Vec<u8>>) {
self.program.set_storage_at(index, new_value);
}

Expand All @@ -294,12 +294,12 @@ impl ArtifactsGenerator {
}

#[must_use]
pub fn get_storage(&self) -> &[[u8; 32]] {
pub fn get_storage(&self) -> &[Vec<u8>] {
self.program.get_storage()
}

#[must_use]
pub fn get_storage_at(&self, index: usize) -> [u8; 32] {
pub fn get_storage_at(&self, index: usize) -> Vec<u8> {
self.program.get_storage_at(index)
}

Expand All @@ -313,6 +313,11 @@ impl ArtifactsGenerator {
self.program.get_script_hash(network)
}

#[must_use]
pub fn get_cmr(&self) -> [u8; 32] {
self.program.get_cmr()
}

#[must_use]
pub fn get_tapleaf_hash(&self) -> [u8; 32] {
self.program.get_tapleaf_hash()
Expand Down
2 changes: 1 addition & 1 deletion crates/cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ workspace = true
smplx-regtest = { workspace = true }
smplx-test = { workspace = true }
smplx-build = { workspace = true }
smplx-sdk = { workspace = true }
smplx-sdk = { workspace = true, features = ["provider"] }

thiserror = { workspace = true }
serde = { workspace = true }
Expand Down
2 changes: 1 addition & 1 deletion crates/regtest/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ readme = "../../README.md"
workspace = true

[dependencies]
smplx-sdk = { workspace = true }
smplx-sdk = { workspace = true, features = ["provider"] }

thiserror = { workspace = true }
electrsd = { workspace = true }
Expand Down
8 changes: 6 additions & 2 deletions crates/sdk/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,16 @@ readme = "../../README.md"
[lints]
workspace = true

[features]
default = ["provider"]
provider = ["dep:minreq", "dep:bitcoincore-rpc"]

[dependencies]
thiserror = { workspace = true }
sha2 = { workspace = true }
minreq = { workspace = true }
minreq = { workspace = true, optional = true }
simplicityhl = { workspace = true }
bitcoincore-rpc = { workspace = true }
bitcoincore-rpc = { workspace = true, optional = true }
serde = { workspace = true }
hex = { workspace = true }

Expand Down
Loading
Loading