#cardano #sdk #lower-level #pattern #building #built #mesh-js

whisky

The Cardano Rust SDK, inspired by MeshJS

52 releases (4 breaking)

new 0.9.12 Dec 16, 2024
0.9.6 Nov 17, 2024
0.6.10 Jul 15, 2024

#217 in Magic Beans

Download history 326/week @ 2024-08-26 174/week @ 2024-09-02 295/week @ 2024-09-09 70/week @ 2024-09-16 77/week @ 2024-09-23 319/week @ 2024-09-30 655/week @ 2024-10-07 266/week @ 2024-10-14 64/week @ 2024-10-21 2/week @ 2024-10-28 115/week @ 2024-11-04 61/week @ 2024-11-11 64/week @ 2024-11-18 436/week @ 2024-12-02 547/week @ 2024-12-09

1,101 downloads per month

Apache-2.0

135KB
2.5K SLoC

whisky

whisky is built with the same pattern as MeshJS's lower level APIs where Rust Cardano developer can import directly for use, building on top of sidan-csl-rs.

Install

In your Rust project, run the below

cargo add whisky

or add the dependency in Cargo.toml

[dependencies]
whisky = "^<the-latest-version>"

Getting Started

use whisky::{
    builder::TxBuilder,
    model::{Asset, UTxO},
};

async fn my_first_whisky_tx(
    recipient_address: &str,
    my_address: &str,
    inputs: &[UTxO],
) -> String {
    let mut mesh = TxBuilder::new_core();
    mesh.tx_out(
        &recipient_address,
        &[Asset::new_from_str("lovelace", "1000000")],
    )
        .change_address(my_address)
        .select_utxos_from(inputs, 5000000)
        .complete(None)
        .await;
    mesh.tx_hex()
}

APIs

All user facing APIs are documentation at the builder interface.

Dependencies

~23–37MB
~675K SLoC