> For the complete documentation index, see [llms.txt](https://poseidon.seaeye.cn/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://poseidon.seaeye.cn/evm/account/__init__.md).

# \_\_init\_\_

实例初始化。通过私钥导入账户并与 Chain 实例绑定。

## 方法定义

```python
def __init__(self, chain: Chain, private_key: HexBytes) -> None
```

## 参数说明

| 参数           | 类型       | 说明      |
| ------------ | -------- | ------- |
| chain        | Chain    | EVM 链实例 |
| private\_key | HexBytes | 账户私钥    |

## 成员变量

| 变量           | 类型              | 说明                             |
| ------------ | --------------- | ------------------------------ |
| eth\_account | LocalAccount    | eth\_account 的 LocalAccount 实例 |
| address      | ChecksumAddress | 账户地址                           |
| private\_key | HexBytes        | 账户私钥                           |

## 示例代码

```python
from poseidon.evm import Chain, Account
from hexbytes import HexBytes

# 连接到链
chain = Chain("https://eth-sepolia.g.alchemy.com/v2/YOUR-API-KEY")

# 导入账户
private_key = HexBytes("0x...")  # 你的私钥
account = Account(chain, private_key)

print(f"Account Address: {account.address}")
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://poseidon.seaeye.cn/evm/account/__init__.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
