solpipe_keysigner/lib.rs
1//use std::ffi::CStr;
2
3use std::ffi::CStr;
4
5use clap_utils::clap::{Command, Arg};
6use error::SolpipeError;
7
8use crate::config::wm_setup;
9
10
11pub mod sign;
12pub mod example;
13pub mod error;
14pub mod config;
15
16#[cfg(test)]
17pub mod test;
18
19
20
21pub struct PubkeyResult {
22 pub pubkey: [u8;32],
23}
24pub struct SigningResult {
25 pub tx: Vec<u8>,
26}
27// This is present so it's easy to test that the code works natively in Rust via `cargo test`
28
29/*
30pub mod test {
31
32 use std::ffi::CString;
33 use super::*;
34
35 // This is meant to do the same stuff as the main function in the .go files
36 #[test]
37 fn simulated_main_function () {
38 hello(CString::new("world").unwrap().into_raw());
39 whisper(CString::new("this is code from Rust").unwrap().into_raw());
40 }
41}
42*/