Skip to main content

Module wallet

Module wallet 

Source
Expand description

Wallet utilities

Opens a Bark wallet and its on-chain companion from a data directory.

§Behavior

§Errors

Returns an anyhow::Error with context describing the failing step (I/O, parsing, database access, or wallet initialization).

§Example

Open a wallet from a data directory:

    let datadir = Path::new("./bark_data");
    let (bark_wallet, onchain_wallet) = open_wallet(datadir).await?.unwrap();
    // Use the wallets...
    Ok(())

Structs§

ConfigOpts
Options to define the initial bark config
CreateOpts

Constants§

AUTH_TOKEN_FILE
File name used to persist the auth token in the datadir.

Functions§

create_wallet
open_wallet