Open zhp1254 opened 2 months ago
`
pub extern "C" fn new_private() -> *const c_char { let key = PrivateKey::new(); let key_str = key.to_string(); let c_key = CString::new(key_str).unwrap(); c_key.into_raw() } ` new_private call success by python and i got an right private key with lib.so
🐛 Bug Report
1、add rust func transfer_tx 2、build so
cargo build --release
3、python ctypes call transfer_tximport ctypes lib = ctypes.CDLL('./target/release/libaleo_wasm.so') kPtr = lib.transfer_tx(b'{"private_key":"APrivateKey1zkpAUbZDoVZBj4xDhD1q5bpR9Lq11QQKd58HcgszW6aLJ8b","amount":0.01,"fee":0.06,"receiver":"aleo12m2q0y4d84vcf5alul2v2q9q3layxgsezxpyxn06gk95zpk3j5rsr4tn4r","state_root":"sr154fn2fz057zm49yk90pdlet883dsj7nsah2reg3hlfqlsvnpdypse92gak"}')
Steps to Reproduce
Code snippet to reproduce
Stack trace & error message
Expected Behavior
(Write what you expected to happen here)
Your Environment
5.4.0-153-generic #170-Ubuntu