diff --git a/.tool-versions b/.tool-versions index 045dc3e..cc60fd6 100644 --- a/.tool-versions +++ b/.tool-versions @@ -1 +1 @@ -scarb 2.7.0 +scarb 2.8.2 diff --git a/Scarb.toml b/Scarb.toml index 1c8e544..2d2ca0f 100644 --- a/Scarb.toml +++ b/Scarb.toml @@ -4,7 +4,7 @@ version = "0.1.0" edition = "2023_11" [dependencies] -starknet = "2.7.0" +starknet = "2.8.2" [dev-dependencies] -cairo_test = "2.7.0" +cairo_test = "2.8.2" diff --git a/src/core.cairo b/src/core.cairo index ddde6b6..0e572cb 100644 --- a/src/core.cairo +++ b/src/core.cairo @@ -1,16 +1,13 @@ // Core lib imports use core::traits::Into; use core::option::OptionTrait; -use core::starknet::SyscallResultTrait; use core::sha256::compute_sha256_byte_array; // Starknet imports use starknet::{secp256k1::{Secp256k1Point}, secp256_trait::{Secp256Trait, Secp256PointTrait}}; // Internal imports -use bdhke::utils::{ - U256IntoByteArray, U32IntoByteArray, slice_to_byte_array, hash_to_u256, byte_array_to_hex, -}; +use bdhke::utils::{U256IntoByteArray, U32IntoByteArray, slice_to_byte_array, hash_to_u256,}; fn domain_separator() -> ByteArray { "Secp256k1_HashToCurve_Cashu_" @@ -71,10 +68,8 @@ pub fn hash_to_curve(message: ByteArray) -> Option { #[cfg(test)] mod tests { // Core lib imports - use core::traits::Into; use core::option::OptionTrait; use core::starknet::SyscallResultTrait; - use core::sha256::compute_sha256_byte_array; // Starknet imports use starknet::{secp256k1::{Secp256k1Point}, secp256_trait::{Secp256Trait, Secp256PointTrait}}; diff --git a/src/main.cairo b/src/main.cairo index 3b97213..00abd54 100644 --- a/src/main.cairo +++ b/src/main.cairo @@ -1,9 +1,6 @@ use starknet::{ - secp256k1::{Secp256k1Point}, - secp256_trait::{ - Secp256Trait, Secp256PointTrait, recover_public_key, is_signature_entry_valid, Signature, - }, - SyscallResult, SyscallResultTrait + secp256k1::{Secp256k1Point}, secp256_trait::{Secp256Trait, Secp256PointTrait,}, + SyscallResultTrait }; use bdhke::core::step1_alice; diff --git a/src/utils.cairo b/src/utils.cairo index 337e07f..a432ab2 100644 --- a/src/utils.cairo +++ b/src/utils.cairo @@ -1,5 +1,5 @@ use core::traits::{Into, TryInto}; -use core::fmt::{Display, Formatter, Error}; +use core::fmt::Formatter; use core::to_byte_array::AppendFormattedToByteArray; /// Converts an array of 8 u32 values into a u256 value.