Skip to content

Commit

Permalink
Stabilize ecdsa functions to seal0 (#1273)
Browse files Browse the repository at this point in the history
  • Loading branch information
cmichi authored May 23, 2022
1 parent 91fd08f commit 260946f
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions crates/env/src/engine/on_chain/ext.rs
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,19 @@ mod sys {
output_ptr: Ptr32Mut<[u8]>,
output_len_ptr: Ptr32Mut<u32>,
) -> ReturnCode;

pub fn seal_ecdsa_recover(
// 65 bytes of ecdsa signature
signature_ptr: Ptr32<[u8]>,
// 32 bytes hash of the message
message_hash_ptr: Ptr32<[u8]>,
output_ptr: Ptr32Mut<[u8]>,
) -> ReturnCode;

pub fn seal_ecdsa_to_eth_address(
public_key_ptr: Ptr32<[u8]>,
output_ptr: Ptr32Mut<[u8]>,
) -> ReturnCode;
}

#[link(wasm_import_module = "seal1")]
Expand Down Expand Up @@ -367,19 +380,6 @@ mod sys {
value_ptr: Ptr32<[u8]>,
value_len: u32,
) -> ReturnCode;

pub fn seal_ecdsa_recover(
// 65 bytes of ecdsa signature
signature_ptr: Ptr32<[u8]>,
// 32 bytes hash of the message
message_hash_ptr: Ptr32<[u8]>,
output_ptr: Ptr32Mut<[u8]>,
) -> ReturnCode;

pub fn seal_ecdsa_to_eth_address(
public_key_ptr: Ptr32<[u8]>,
output_ptr: Ptr32Mut<[u8]>,
) -> ReturnCode;
}
}

Expand Down

0 comments on commit 260946f

Please sign in to comment.