Wallet canister address book

why is dfx wallet addresses not showing canisters created with the wallet?

and how can we list all the canisters created with a wallet?

The addresses call returns the list of AddressEntry 's agent-rs/wallet.rs at next · dfinity/agent-rs · GitHub

#[derive(CandidType, Debug, Deserialize)]
pub enum Role {
    Contact,
    Custodian,
    Controller,
}

#[derive(CandidType, Debug, Deserialize)]
pub enum Kind {
    Unknown,
    User,
    Canister,
}

#[derive(CandidType, Debug, Deserialize)]
pub struct AddressEntry {
    pub id: Principal,
    pub name: Option<String>,
    pub kind: Kind,
    pub role: Role,
}

So it will not display the canisters created by the wallet. The UI displays the canisters by reading the event log.

1 Like

You can get events by doing dfx canister call <wallet-id> get_events '(record {from = null; to = null})' and see the canister create events.

1 Like