Skip to content

Commit

Permalink
Resolve PR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
bitzoic committed Jan 21, 2025
1 parent 4484bf0 commit 8bc9635
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions sway-lib-std/src/ecr.sw
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ pub enum EcRecoverError {
/// assert(public_key.bits()[1] == pub_lo);
/// }
/// ```
#[deprecated(note = "Please use new crypto module")]
#[deprecated(note = "std::ecr has been replaced by std::crypto, and is no longer maintained")]
pub fn ec_recover(signature: B512, msg_hash: b256) -> Result<B512, EcRecoverError> {
let public_key = B512::new();
let was_error = asm(
Expand Down Expand Up @@ -105,7 +105,7 @@ pub fn ec_recover(signature: B512, msg_hash: b256) -> Result<B512, EcRecoverErro
/// assert(public_key.bits()[1] == pub_lo);
/// }
/// ```
#[deprecated(note = "Please use new crypto module")]
#[deprecated(note = "std::ecr has been replaced by std::crypto, and is no longer maintained")]
pub fn ec_recover_r1(signature: B512, msg_hash: b256) -> Result<B512, EcRecoverError> {
let public_key = B512::new();
let was_error = asm(
Expand Down Expand Up @@ -159,7 +159,7 @@ pub fn ec_recover_r1(signature: B512, msg_hash: b256) -> Result<B512, EcRecoverE
/// assert(verified);
/// }
/// ```
#[deprecated(note = "Please use new crypto module")]
#[deprecated(note = "std::ecr has been replaced by std::crypto, and is no longer maintained")]
pub fn ed_verify(public_key: b256, signature: B512, msg: Bytes) -> Result<bool, EcRecoverError> {
let len = msg.len();

Expand Down Expand Up @@ -216,7 +216,7 @@ pub fn ed_verify(public_key: b256, signature: B512, msg: Bytes) -> Result<bool,
/// assert(result_address == address);
/// }
/// ```
#[deprecated(note = "Please use new crypto module")]
#[deprecated(note = "std::ecr has been replaced by std::crypto, and is no longer maintained")]
pub fn ec_recover_address(signature: B512, msg_hash: b256) -> Result<Address, EcRecoverError> {
let pub_key_result = ec_recover(signature, msg_hash);

Expand Down Expand Up @@ -262,7 +262,7 @@ pub fn ec_recover_address(signature: B512, msg_hash: b256) -> Result<Address, Ec
/// assert(result_address == address);
/// }
/// ```
#[deprecated(note = "Please use new crypto module")]
#[deprecated(note = "std::ecr has been replaced by std::crypto, and is no longer maintained")]
pub fn ec_recover_address_r1(signature: B512, msg_hash: b256) -> Result<Address, EcRecoverError> {
let pub_key_result = ec_recover_r1(signature, msg_hash);

Expand Down
2 changes: 1 addition & 1 deletion sway-lib-std/src/vm/evm/ecr.sw
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ use ::vm::evm::evm_address::EvmAddress;
/// assert(result_address == evm_address);
/// }
/// ```
#[deprecated(note = "Please use new crypto module")]
#[deprecated(note = "std:vm::evm:ecr has been replaced by std::crypto, and is no longer maintained")]
pub fn ec_recover_evm_address(
signature: B512,
msg_hash: b256,
Expand Down

0 comments on commit 8bc9635

Please sign in to comment.