Clique WASM SDK
The Clique WASM SDK is a convenient WebAssembly toolkit designed to simplify interactions with the Clique Network.
Quick Start
Add this dependency to your Cargo.toml:
clique-wasm-sdk = { version = "0.1.0", features = ["alloc"] }
#![no_std]
extern crate alloc;
use alloc::format;
use clique_wasm_sdk::{console_log, get_param, set_output, Val};
#[no_mangle]
pub extern "C" fn evaluate() {
let param: Val = get_param("param").unwrap().unwrap();
console_log(&format!("{:?}", param));
set_output("output", &Val::Bytes(b"hello world".to_vec())).unwrap();
}