change sth for test

This commit is contained in:
fitchgc 2022-09-26 03:57:47 +00:00
parent 1ae7144573
commit 03e68addd0
4 changed files with 9 additions and 10 deletions

View File

@ -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]

View File

@ -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();

View File

@ -1,3 +0,0 @@
fn main() {
println!("Hello, world!");
}

5
wallet.json Normal file
View File

@ -0,0 +1,5 @@
{
"secret_key": "SecretKey(#d3bfbf530f3823ca)",
"public_key": "026c148cde34fead14781bcea7c51a0e9384a7356f3093af1c10d0734da07cf243",
"public_address": "0x4b1636199d65f39c9a4be4a6423b5982db2f1f3b"
}