> ## Documentation Index
> Fetch the complete documentation index at: https://docs.arksat.xyz/llms.txt
> Use this file to discover all available pages before exploring further.

# 连接与账户

> 连接网站、读取账户与结束授权。

示例使用 `createArksatClient(provider)`。

## connect

连接或补充网站权限；由用户操作触发。read 支持 transactions；actions 支持 issueAsset、reissueAsset、burnAsset。

| 项目 | 定义 |
| - | - |
| 参数 | `input?: ArksatConnectOptions` |
| 返回 | `Promise<{ accounts: string[] }>` |

```ts theme={null}
const { accounts } = await client.connect()
```

## disconnect

断开当前网站与钱包的连接。

| 项目 | 定义 |
| - | - |
| 参数 | `无` |
| 返回 | `Promise<void>` |

```ts theme={null}
await client.disconnect()
```

## Provider 账户方法

以下方法直接在 `provider` 上调用，不属于 Client 对象。

| 方法 | 返回 |
| - | - |
| `isConnected()` | `Promise<boolean>` |
| `getAccounts()` | `Promise<string[]>` |
| `getAddress()` | `Promise<string>` |
| `getPublicKey()` | `Promise<string>` |
| `requestAccounts()` | `Promise<string[]>`，connect 的便捷别名 |

Provider 的 `connect(options?)` 返回地址数组；Client 则返回 `{ accounts }`。详见[连接与授权](https://docs.arksat.xyz/connection.md)。

[错误处理](https://docs.arksat.xyz/errors.md) · [完整 TypeScript 类型](https://docs.arksat.xyz/reference/types.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.