clique-wasm-sdk

Crates.ioclique-wasm-sdk
lib.rsclique-wasm-sdk
version0.1.2
sourcesrc
created_at2024-11-01 03:22:59.186622
updated_at2024-11-07 07:49:45.395831
descriptionClique WASM SDK
homepage
repository
max_upload_size
id1431249
size3,487
(clique-crates)

documentation

README

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 = "0.1"
#![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() {
    // Get param
    let param: Val = get_param("param").unwrap().unwrap();
    console_log(&format!("{:?}", param));

    // Set output
    set_output("output", &Val::Bytes(b"hello world".to_vec()));
}
Commit count: 0

cargo fmt