INNER CODE UNIT · Rust

u64_list

Quantova/QCore.js · src/lib.rs:184

fn u64_list(csv: &str) -> Result<Vec<u64>, JsError> {
    if csv.trim().is_empty() {
        return Ok(Vec::new());
    }
    csv.split(',')
        .map(|part| {
            part.trim()
                .parse::<u64>()
                .map_err(|_| JsError::new("a list entry is not a whole number"))
        })
        .collect()
}

#[wasm_bindgen(js_name = orderSigner)]
pub fn order_signer(seed_bytes: &[u8], index: u64) -> Result<String, JsError> {
    Ok(qcore::json::to_hex(&qcore::contract::order_signer(
        &*seed(seed_bytes)?,
        index,

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…