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 = open_wallet(datadir, "myapp/1.0").await?.unwrap();
    // Use the wallet...
    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
read_mnemonic
Read the raw mnemonic phrase from the wallet datadir.