Skip to content

Commit

Permalink
add support for drep reg with anchor
Browse files Browse the repository at this point in the history
  • Loading branch information
twwu123 committed Sep 9, 2024
1 parent 2909777 commit 1899ef7
Showing 1 changed file with 12 additions and 3 deletions.
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

0 comments on commit 1899ef7

Please sign in to comment.