Skip to content

Commit

Permalink
Feature update/drep anchor (#84)
Browse files Browse the repository at this point in the history
* add support for drep reg with anchor

* bump version
  • Loading branch information
twwu123 authored Sep 9, 2024
1 parent 2909777 commit 70f5438
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 12 deletions.
6 changes: 3 additions & 3 deletions packages/Cargo.lock

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

2 changes: 1 addition & 1 deletion packages/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[workspace]
version = "0.8.2"
version = "0.8.3"
resolver = "2"
members = [
"sidan-csl-rs",
Expand Down
2 changes: 1 addition & 1 deletion packages/sidan-csl-rs/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "sidan-csl-rs"
version = "0.8.2"
version = "0.8.3"
edition = "2021"
license = "Apache-2.0"
description = "Wrapper around the cardano-serialization-lib for easier transaction building, heavily inspired by cardano-cli APIs"
Expand Down
15 changes: 12 additions & 3 deletions packages/sidan-csl-rs/src/core/utils/certificates.rs
Original file line number Diff line number Diff line change
Expand Up @@ -308,9 +308,18 @@ fn to_drep_registration_cert(
));
};

Ok(csl::Certificate::new_drep_registration(
&csl::DRepRegistration::new(&drep_credential, &to_bignum(drep_registration.coin)),
))
match drep_registration.anchor {
Some(anchor) => Ok(csl::Certificate::new_drep_registration(
&csl::DRepRegistration::new_with_anchor(
&drep_credential,
&to_bignum(drep_registration.coin),
&to_csl_anchor(&anchor)?,
),
)),
None => Ok(csl::Certificate::new_drep_registration(
&csl::DRepRegistration::new(&drep_credential, &to_bignum(drep_registration.coin)),
)),
}
}

fn to_drep_deregistration_cert(
Expand Down
4 changes: 2 additions & 2 deletions packages/whisky-examples/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "whisky-examples"
version = "0.8.2"
version = "0.8.3"
edition = "2021"
license = "Apache-2.0"
description = "The Cardano Rust SDK, inspired by MeshJS"
Expand All @@ -13,4 +13,4 @@ path = "src/server.rs"
actix-cors = "0.7.0"
actix-web = "4.9.0"
serde = "1.0.209"
whisky = { version = "=0.8.2", path = "../whisky" }
whisky = { version = "=0.8.3", path = "../whisky" }
4 changes: 2 additions & 2 deletions packages/whisky/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "whisky"
version = "0.8.2"
version = "0.8.3"
edition = "2021"
license = "Apache-2.0"
description = "The Cardano Rust SDK, inspired by MeshJS"
Expand All @@ -24,7 +24,7 @@ pallas-codec = "0.22.0"
pallas-primitives = "0.22.0"
pallas-traverse = "0.22.0"
maestro-rust-sdk = "1.1.3"
sidan-csl-rs = { version = "=0.8.2", path = "../sidan-csl-rs" }
sidan-csl-rs = { version = "=0.8.3", path = "../sidan-csl-rs" }
reqwest = "0.12.5"
tokio = { version = "1.38.0", features = ["macros", "rt-multi-thread"] }

Expand Down

0 comments on commit 70f5438

Please sign in to comment.