Skip to main content

Crate cardano_connector

Crate cardano_connector 

Source
Expand description

§Cardano Connector for CIP30 wallet

This library is meant to be used for web applications that need to interact with Cardano wallets. It provides a simple and easy-to-use interface for managing Cardano wallets and their associated data.

§Features

  • Connect to Cardano wallets
  • Manage wallet addresses
  • Retrieve wallet balance
  • Send transactions

§Usage

First list all the wallets available:

use cardano_connector::wallets;

for wallet in wallets() {
    println!("Wallet: {} ({})", wallet.name(), wallet.version());
}

Only the wallets that are implementing the CIP30 standard and are enabled in the browser will be listed. The wallets function returns a vector of Wallet instances.

This will gives you limited information about the wallet application. To access the wallet’s addresses, balance and create and send transactions, you need to enable the wallet, which will return a ConnectedWallet instance.

let connected_wallet = wallet.enable().await?;

Re-exports§

pub use self::cardano::TxHash;
pub use self::cardano::Utxo;
pub use self::cardano::lovelace_of;

Modules§

cardano
error
ffi

Structs§

ConnectedWallet
Hash
data that is a cryptographic Hash of BYTES long.
PositiveCoin
Introduced in Conway positive_coin = 1 .. 18446744073709551615
Wallet

Enums§

Address
A decoded Cardano address of any type
NetworkId
Value

Functions§

lace
wallet
attempt to find the wallet by name
wallets
List the wallets that may be available.

Type Aliases§

AssetName
Coin
Multiasset
PolicyId