Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
rahxephon89 committed Nov 5, 2024
1 parent 95781cf commit beebbbb
Showing 1 changed file with 26 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
module 0x42::m {

struct RistrettoPoint has drop {
handle: u64
}

struct CompressedRistretto has copy, store, drop {
data: vector<u8>
}

native fun point_compress_internal(point: &RistrettoPoint): vector<u8>;

spec fun spec_point_compress_internal(point: &RistrettoPoint): vector<u8>;

spec point_compress_internal(point: &RistrettoPoint): vector<u8> {
pragma opaque;
ensures result == spec_point_compress_internal(point);
}

public fun point_compress(point: &RistrettoPoint): CompressedRistretto {
CompressedRistretto {
data: point_compress_internal(point)
}
}

}

0 comments on commit beebbbb

Please sign in to comment.