StandardConnectOutput

Trait StandardConnectOutput 

Source
pub trait StandardConnectOutput {
    type Account: WalletAccountInfo;

    // Required method
    fn accounts(&self) -> Vec<Self::Account>;
}
Expand description

Output of a successful wallet connection.

This trait defines the structure of the data returned when a wallet connection is established. It provides access to the accounts that the app has been authorized to use.

§Example Implementation

struct MyConnectOutput {
    accounts: Vec<MyAccount>,
}

impl StandardConnectOutput for MyConnectOutput {
    type Account = MyAccount;

    fn accounts(&self) -> Vec<Self::Account> {
        self.accounts.clone()
    }
}

Required Associated Types§

Required Methods§

Source

fn accounts(&self) -> Vec<Self::Account>

Returns the list of accounts that the app has been authorized to use.

These accounts can be used for operations like signing messages or transactions.

Implementors§