diff --git a/Cargo.toml b/Cargo.toml index feb20de..4568023 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -5,9 +5,9 @@ edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [lib] -name = "rustywallet" +name = "rustwallet" # this is needed to build for iOS and Android. -crate-type = ["staticlib"] +crate-type = ["staticlib", "lib"] # this dependency is only needed for Android. # [target.'cfg(target_os = "android")'.dependencies] diff --git a/test/test.rs b/examples/test.rs similarity index 81% rename from test/test.rs rename to examples/test.rs index a43e115..5b962de 100644 --- a/test/test.rs +++ b/examples/test.rs @@ -6,8 +6,8 @@ use std::ffi::CStr; //use rustylib::gen::{CWallet}; -use rustywallet::{ - fetch_cwallet, free_cwallet, generate_cwallet, generate_qrcode_svg, save_wallet, CWallet, +use rustwallet::{ + fetch_cwallet, free_cwallet, generate_cwallet, save_wallet, CWallet, }; fn main() { @@ -33,9 +33,6 @@ unsafe fn print_wallet(wallet: &CWallet) { let a = CStr::from_ptr(wallet.public_addr); let pa = a.to_str().unwrap(); println!("public address=> {}", pa); - let qrcode_pa = generate_qrcode_svg(wallet.public_addr); - let c_qrcode_pa = CStr::from_ptr(qrcode_pa); - println!("QR Code:\n {}", c_qrcode_pa.to_str().unwrap()); let pk = CStr::from_ptr(wallet.public_key); let ppk = pk.to_str().unwrap(); diff --git a/src/main.rs b/src/main.rs deleted file mode 100644 index e7a11a9..0000000 --- a/src/main.rs +++ /dev/null @@ -1,3 +0,0 @@ -fn main() { - println!("Hello, world!"); -} diff --git a/wallet.json b/wallet.json new file mode 100644 index 0000000..968c6e4 --- /dev/null +++ b/wallet.json @@ -0,0 +1,5 @@ +{ + "secret_key": "SecretKey(#d3bfbf530f3823ca)", + "public_key": "026c148cde34fead14781bcea7c51a0e9384a7356f3093af1c10d0734da07cf243", + "public_address": "0x4b1636199d65f39c9a4be4a6423b5982db2f1f3b" +} \ No newline at end of file