Expand description
§whisky
whisky is built with the same pattern as MeshJS’s lower level APIs where Rust Cardano developer can import directly for use.
§Install
In your Rust project, run the below
cargo add whiskyor add the dependency in Cargo.toml
[dependencies]
whisky = "^<the-latest-version>"§Feature Flags
By default, all features are enabled. You can selectively enable features:
# Full (default) - all features
whisky = "1.0.18"
# Just common types (minimal)
whisky = { version = "1.0.18", default-features = false }
# Wallet only (includes csl + common)
whisky = { version = "1.0.18", default-features = false, features = ["wallet"] }
# Provider only (includes csl + common)
whisky = { version = "1.0.18", default-features = false, features = ["provider"] }
# CSL only (transaction building without wallet/provider)
whisky = { version = "1.0.18", default-features = false, features = ["csl"] }§Getting Started
ⓘ
use whisky::*;
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.
Re-exports§
pub use builder::*;pub use parser::*;pub use transaction::*;pub use utils::*;
Modules§
- algo
- blockfrost
- builder
- constants
- converter
- data
- derivation_
indices - errors
- interfaces
- maestro
- mnemonic
- models
- parser
- root_
key - services
- transaction
- tx_
builder - tx_
parser - tx_
tester - utils
- wallet_
constants - wrapper
Macros§
Structs§
- Account
- Account
Info - Action
- Addresses
- Anchor
- Artist
- Asset
- Audio
Asset Metadata - Block
Info - Blockfrost
Provider - Blueprint
- Main Blueprint structure containing preamble, validators, and definitions
- Budget
- Committee
Cold Resign - Committee
HotAuth - DRep
Deregistration - DRep
Registration - DRep
Update - Delegate
Stake - Deregister
Stake - Deserialized
Address - Eval
Error - File
- Fungible
Asset Metadata - Governance
Proposal Info - Image
Asset Metadata - Inline
Datum Source - Inline
Script Source - Inline
Simple Script Source - Maestro
Provider - Metadata
- Mint
Parameter - Mnemonic
Wallet - Multi
Host Name - Output
- Plutus
Script Withdrawal - Pool
Metadata - Pool
Params - Protocol
- Provided
Datum Source - Provided
Script Source - Provided
Simple Script Source - PubKey
TxIn - PubKey
Withdrawal - Redeemer
- RefTxIn
- Register
Pool - Register
Stake - Retire
Pool - Root
KeyWallet - Royalties
Standard - Script
Certificate - Script
Mint - Script
TxIn - Script
TxIn Parameter - Script
Vote - Simple
Script Certificate - Simple
Script Mint - Simple
Script TxIn - Simple
Script Vote - Simple
Script Withdrawal - Single
Host Addr - Single
Host Name - Slot
Config - Slot configuration for a Cardano network. Contains the parameters needed to convert between slots and POSIX time.
- Smart
Asset Metadata - Stake
AndVote Delegation - Stake
Registration AndDelegation - Stake
Vote Registration AndDelegation - Transaction
Info - TxBuilder
Body - TxIn
Parameter - TxTester
- UTxO
- Utxo
Input - Utxo
Output - Validity
Range - Video
Asset Metadata - Vote
Delegation - Vote
Registration AndDelegation - Vote
Type - Voting
Procedure - WError
- Wallet
- Represents a Cardano wallet.
- Whisky
Pallas
Enums§
- Address
Type - Asset
Metadata - Builder
Data Type - Certificate
- Certificate
Type - Credential
- DRep
- Datum
- Datum
Source - Eval
Result - Language
Version - Mint
Item - Network
- Network
Id - NonFungible
Asset Metadata - Output
Script Source - Redeemer
Tag - Relay
- Script
Source - Simple
Script Source - Simple
Script TxIn Parameter - TxIn
- Vote
- Vote
Kind - Voter
- Wallet
Type - Withdrawal
Constants§
Traits§
Functions§
- bytes_
to_ hex - decrypt_
with_ cipher - deserialize_
address - encrypt_
with_ cipher - get_
cost_ models_ from_ network - get_
mainnet_ cost_ models - get_
preprod_ cost_ models - get_
preview_ cost_ models - get_
slot_ config - Get the slot configuration for a specific network.
- hex_
to_ bytes - hex_
to_ string - resolve_
epoch_ no - Resolve the epoch number for a network at a given time.
- resolve_
slot_ no - Resolve the slot number for a network at a given time.
- script_
to_ address - select_
utxos - serialize_
address_ obj - slot_
to_ begin_ unix_ time - Convert a slot number to the beginning POSIX time (in milliseconds).
- string_
to_ hex - unix_
time_ to_ enclosing_ slot - Convert a POSIX time to the enclosing slot number.