Crate whisky

Source
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 whisky

or add the dependency in Cargo.toml

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

§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 transaction::*;

Modules§

algo
blockfrost
builder
constants
csl
data
derivation_indices
errors
interfaces
maestro
mnemonic
models
root_key
services
transaction
tx_builder
tx_parser
utils
wallet_constants

Structs§

Account
AccountInfo
Action
Anchor
Artist
Asset
AudioAssetMetadata
BlockInfo
BlockfrostProvider
Budget
CommitteeColdResign
CommitteeHotAuth
CoreCSL
DRepDeregistration
DRepRegistration
DRepUpdate
DelegateStake
DeregisterStake
DeserializedAddress
EvalError
File
FungibleAssetMetadata
GovernanceProposalInfo
ImageAssetMetadata
InlineDatumSource
InlineScriptSource
InlineSimpleScriptSource
JsonSlotConfig
MaestroProvider
Metadata
MintParameter
MnemonicWallet
MultiHostName
Output
PlutusScriptWithdrawal
PoolMetadata
PoolParams
Protocol
ProvidedDatumSource
ProvidedScriptSource
ProvidedSimpleScriptSource
PubKeyTxIn
PubKeyWithdrawal
Redeemer
RefTxIn
RegisterPool
RegisterStake
RetirePool
RootKeyWallet
RoyaltiesStandard
ScriptCertificate
ScriptMint
ScriptTxIn
ScriptTxInParameter
ScriptVote
SimpleScriptCertificate
SimpleScriptMint
SimpleScriptTxIn
SimpleScriptVote
SimpleScriptWithdrawal
SingleHostAddr
SingleHostName
SmartAssetMetadata
StakeAndVoteDelegation
StakeRegistrationAndDelegation
StakeVoteRegistrationAndDelegation
TransactionInfo
TxBuilderBody
TxInParameter
TxParser
UTxO
UtxoInput
UtxoOutput
ValidityRange
Value
VideoAssetMetadata
VoteDelegation
VoteRegistrationAndDelegation
VoteType
VotingProcedure
WError
Wallet
WhiskyCSL

Enums§

AssetMetadata
BuilderDataType
Certificate
CertificateType
Credential
DRep
Datum
DatumSource
EvalResult
LanguageVersion
MintItem
Network
NonFungibleAssetMetadata
OutputScriptSource
RedeemerTag
Relay
ScriptSource
SimpleScriptSource
SimpleScriptTxInParameter
TxIn
Vote
VoteKind
Voter
WalletType
Withdrawal

Constants§

FUNGIBLE_ASSET_KEYS
METADATA_STANDARD_KEYS
ROYALTIES_STANDARD_KEYS

Traits§

Evaluator
Fetcher
Submitter
TxBuildable

Functions§

apply_double_cbor_encoding
apply_params_to_plutus_script
apply_params_to_script
asset_class
assoc_map
bool
build_csl_cost_models
build_tx_builder
builtin_byte_string
byte_string
bytes_to_hex
calculate_tx_hash
con_str
con_str0
con_str1
con_str2
currency_symbol
decrypt_with_cipher
deserialize_address
encrypt_with_cipher
evaluate_tx_scripts
get_cost_mdls
get_cost_models_from_network
get_mainnet_cost_models
get_min_utxo_value
get_native_script_hash
get_preprod_cost_models
get_preview_cost_models
get_script_hash
hex_to_bytes
hex_to_string
integer
list
map_error_to_eval_error
map_eval_result
map_redeemer_tag
map_redeemer_to_action
maybe_staking_hash
output_reference
pairs
payment_pub_key_hash
posix_time
pub_key_address
pub_key_hash
script_address
script_hash_to_stake_address
script_to_address
select_utxos
sign_transaction
string_to_hex
to_bignum
to_csl_anchor
to_csl_cert
to_csl_drep
to_csl_redeemer
to_csl_script_source
to_csl_simple_script_source
to_csl_vote_kind
to_csl_voter
to_pallas_datum
to_pallas_multi_asset_value
to_pallas_script_ref
to_pallas_utxos
to_pallas_value
to_value
token_name
tuple
tx_out_ref