# TConnectTezosBeaconProvider

## **Configure and Use TConnectTezosBeaconProvider**

The `TConnectTezosBeaconProvider` class is a provider implementation designed to connect Tezos wallets via Beacon. It requires specific configuration options to be passed to its constructor during instantiation. Note that the `bridgeUrl`parameter must always be set to `"https://tconnect.io"`, as this is the hosted location of the bridge.

Here’s the full definition of the `TConnectTezosBeaconProviderOptions` interface:

```typescript
// Interface definition for TConnectTezosBeaconProviderOptions
interface TConnectTezosBeaconProviderOptions {
  // The name of your application.
  appName: string;
  // The URL linking to your application's website or homepage.
  appUrl: string;
  // (Optional) A URL pointing to an icon that represents your application.
  appIcon?: string;
  // The URL of the bridge server used for communication.
  bridgeUrl: string;
  // The secret seed used for generating the wallet.
  secretSeed: string;
  // The API key required for authentication and access to the provider's services.
  apiKey: string;
  // The Tezos network configuration.
  network: Network;
  // (Optional) The wallet application, represented by the `TezosBeaconWalletApp` type.
  walletApp?: TezosBeaconWalletApp;
}
```

### **Understanding the `walletApp` Parameter**

The `walletApp` parameter is optional and specifies the wallet application the user intends to connect to. This parameter uses the `TezosBeaconWalletApp` type, which represents supported Tezos wallet applications. Providing this parameter allows the provider to optimize and streamline the connection process for the specified wallet.

If the `walletApp` parameter is omitted, the provider will attempt to connect to any available wallet. In such cases, the connection can established via a connection string provided by the bridge. *(*[*See more details here*](/t-connect/getting-started/implementation-guide/providers/connect-via-connection-string.md)*.)*

### **Example of Initializing the TConnectTezosBeaconProvider**

```typescript
// Import provider
import { TConnectTezosBeaconProvider } from "@tconnect.io/tezos-beacon-provider";
import { TezosBeaconWalletApp } from "@tconnect.io/tezos-beacon-provider";

const app: TezosBeaconWalletApp = "altme";
const secretSeed = "SECRET_SEED";

// Initialize provider
const provider = new TConnectTezosBeaconProvider({
  appName: "Example App",
  appUrl: "https://your-domain.io",
  bridgeUrl: "https://tconnect.io",
  secretSeed,
  apiKey: "PRIVATE_API_KEY",
  network: {
    type: "ghostnet",
    name: "Ghostnet",
    rpcUrl: "https://rpc.ghostnet.teztnets.com",
  },
  walletApp: app,
});
```


---

# 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://t-connect.gitbook.io/t-connect/getting-started/implementation-guide/providers/tconnecttezosbeaconprovider.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.
