# API reference

The `starknetkit` package exposes two major methods `connect` and `disconnect.` (You could reference the Guides section to see how they are used).

The `connect` method further exposes other methods you could find useful in your dapps:

1. `isConnected` - This method available after an attempt to establish a connection, can be used to confirm if an account was truly connected.

```json
isConnected: true
```

2. `selectedAddress` - This method can be called to get the wallet address of a connected account.

```json
selectedAddress?: string
```

3. `account` - This method gives us access to the account object. It uses [starknet.js AccountInterface](https://www.starknetjs.com/docs/next/API/account) and extends the starknet.js Provider.

```json
account?: AccountInterface
```

4. `chainId` - This method returns the connected network chain ID.

```json
chainId?: string
```

5. `provider` - This method gives us access to the Provider object when called. It uses [starknet.js Provider Interface](https://www.starknetjs.com/docs/next/api/provider/) enabling you to interact with the network without signing transactions or messages.

```json
provider: ProviderInterface
```

6. `enable` - This method can be used to create a connection to a specific **get-starknet** version.

```json
enable: (options?: { starknetVersion?: 'v3' | 'v4' }) => Promise<string[]>
```
