We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
~/.cargo/git/checkouts/rust-dashcore-b01a88e2cb0da4a0/521a76b/dash/src/signer.rs:
~/.cargo/git/checkouts/rust-dashcore-b01a88e2cb0da4a0/521a76b/dash/src/signer.rs
// for Rust /// sign and get the ECDSA signature pub fn sign(data: &[u8], private_key: &[u8]) -> Result<[u8; 65], anyhow::Error> { let data_hash = double_sha(data); let maybe_magic_sig = sign_hash(&data_hash, private_key); let magic_sig = maybe_magic_sig.as_ref().unwrap(); println!("simple sign key {}", hex::encode(&private_key)); println!("simple sign data {}", hex::encode(&data)); println!("simple sign hash {}", hex::encode(&data_hash)); println!("simple sign sig {}", hex::encode(magic_sig)); println!(""); maybe_magic_sig }
// for WASM use wasm_bindgen::prelude::*; #[wasm_bindgen] extern "C" { // Multiple arguments too! #[wasm_bindgen(js_namespace = console, js_name = log)] fn js_log(a: &str, b: &str); } /// sign and get the ECDSA signature pub fn sign(data: &[u8], private_key: &[u8]) -> Result<[u8; 65], anyhow::Error> { let data_hash = double_sha(data); let maybe_magic_sig = sign_hash(&data_hash, private_key); let magic_sig = maybe_magic_sig.as_ref().unwrap(); js_log("simple sign key:", &hex::encode(&private_key)); js_log("simple sign data {}", &hex::encode(&data)); js_log("simple sign hash {}", &hex::encode(&data_hash)); js_log("simple sign sig {}", &hex::encode(&magic_sig)); js_log("", ""); maybe_magic_sig }
~/.cargo/git/checkouts/rust-dashcore-b01a88e2cb0da4a0/521a76b/dash/Cargo.toml:
~/.cargo/git/checkouts/rust-dashcore-b01a88e2cb0da4a0/521a76b/dash/Cargo.toml
[dependencies] wasm-bindgen = { version = "=0.2.99" }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
~/.cargo/git/checkouts/rust-dashcore-b01a88e2cb0da4a0/521a76b/dash/src/signer.rs
:~/.cargo/git/checkouts/rust-dashcore-b01a88e2cb0da4a0/521a76b/dash/Cargo.toml
:The text was updated successfully, but these errors were encountered: