1.0.5 • Published 10 months ago
@sidan-lab/whisky-js-nodejs v1.0.5
whisky
Whisky is an open-source Cardano Rust SDK, containing following modules:
whisky- The core Rust crate supporting Cardano DApp development in Rust.whisky-common- Serving universal types and utilities.whisky-csl- The crate to implement mostcardano-serialization-libwrapper.whisky-provider- The crate to connect external services like blockfrost or maestro.whisky-wallet- The crate to handle wallet signing and provide key encryption utility.whisky-js- An point of output for wasm package for@meshsdk/core-csl.
With whisky, you can
- Builder transaction with cardano-cli-like APIs, supporting serious DApps’ backend on the Rust codebase.
- Handling transaction signing in Rust
- Interacting with blockchain with provider services like
MaestroandBlockfrost - Off-node evaluation on transaction execution units, and updating the transaction accordingly with TxPipe's
uplcintegrated.
Installation
Rust Library
cargo add whiskyJS / TS WASM Lib
# For nodejs package
yarn add @sidan-lab/whisky-js-nodejs
# For browser package
yarn add @sidan-lab/whisky-js-browserGetting Started
use whisky::*;
pub fn send_lovelace(
recipient_address: &str,
my_address: &str,
inputs: &[UTxO],
) -> Result<String, WError> {
let mut tx_builder = TxBuilder::new_core();
tx_builder
.tx_out(
recipient_address,
&[Asset::new_from_str("lovelace", "1000000")],
)
.change_address(my_address)
.select_utxos_from(inputs, 5000000)
.complete_sync(None)?;
Ok(tx_builder.tx_hex())
}APIs
Please refer to the hosted documentation for the list of endpoints.
1.0.5
10 months ago
1.0.4
11 months ago
1.0.3
12 months ago
1.0.2
12 months ago
1.0.1
12 months ago
1.0.0
12 months ago
1.0.0-alpha.2
12 months ago
1.0.0-alpha.1
12 months ago