diff --git a/Scarb.toml b/Scarb.toml index c312d00..9dae385 100644 --- a/Scarb.toml +++ b/Scarb.toml @@ -5,6 +5,7 @@ edition = "2024_07" [dependencies] starknet = "2.8.4" +utils = { git = "https://github.com/keep-starknet-strange/raito.git" } [dev-dependencies] snforge_std = { git = "https://github.com/foundry-rs/starknet-foundry.git", tag = "v0.31.0" } diff --git a/src/utils/hash.cairo b/src/utils/hash.cairo index bb8c2f3..a715931 100644 --- a/src/utils/hash.cairo +++ b/src/utils/hash.cairo @@ -24,6 +24,18 @@ pub impl DigestImpl of DigestTrait { } } +pub impl UtuDigestIntoRaito of Into { + fn into(self: Digest) -> utils::hash::Digest { + utils::hash::Digest { value: self.value } + } +} + +pub impl RaitoDigestIntoUtu of Into { + fn into(self: utils::hash::Digest) -> Digest { + Digest { value: self.value } + } +} + impl DigestZero of Zero { fn zero() -> Digest { Digest { value: [0_u32; 8] }