# Tomo Wallet Provider

Tomo wallet provider defines the top level functions, which can be used in all the wallet provider implementations, such as Bitcoin provider, Cosmos provider, etc.

```javascript
export abstract class WalletProvider {
  chains: TomoChain[]
  option: ProviderOption
  constructor(option: ProviderOption) {
    this.chains = option.chains
    this.option = option
  }
  /**
   * Connects to the wallet and returns the instance of the wallet provider.
   * @returns A promise that resolves to an instance of the wrapper wallet provider in babylon friendly format.
   * @throws An error if the wallet is not installed or if connection fails.
   */
  abstract connectWallet(): Promise<this>

  /**
   * Gets the address of the connected wallet.
   * @returns A promise that resolves to the address of the connected wallet.
   */
  abstract getAddress(): Promise<string>

  /**
   * Gets the network of the current account.
   * @returns A promise that resolves to the network of the current account.
   */
  abstract getNetwork(): Promise<string>

  /**
   * Gets the name of the wallet provider.
   * @returns Name of the wallet provider.
   */
  abstract getWalletProviderName(): Promise<string>

  /**
   * Gets the icon URL of the wallet provider.
   * @returns Icon URL of the wallet provider.
   */
  abstract getWalletProviderIcon(): Promise<string>
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.tomo.inc/tomo-sdk/tomo-enterprise-sdk/for-babylon/tomo-wallet-provider.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
