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::Utxo;

Modules§

cardano
error
ffi

Structs§

ConnectedWallet
Wallet

Enums§

Address
A decoded Cardano address of any type
NetworkId

Functions§

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