mytglib 1.1.4 → 1.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -4
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -171,7 +171,7 @@ const updates = await core.submitCredentials({
|
|
|
171
171
|
const jsonFilePath = await core.syncSessionJson();
|
|
172
172
|
```
|
|
173
173
|
|
|
174
|
-
`syncSessionJson()` 无参数并返回 JSON 文件路径。JSON 中的 `session_str` 为可与 Telethon StringSession v1 兼容的字符串,`reg_time` 按中国标准时间转为 `YYYY-MM-DD`;当前转换仅支持项目使用的 IPv4 主 DC。底层 `.session` 仍是 mtcute SQLite,不会被转换成 Telethon SQLite。输出文件包含 auth key
|
|
174
|
+
`syncSessionJson()` 无参数并返回 JSON 文件路径。JSON 中的 `session_str` 为可与 Telethon StringSession v1 兼容的字符串,`reg_time` 按中国标准时间转为 `YYYY-MM-DD`;当前转换仅支持项目使用的 IPv4 主 DC。底层 `.session` 仍是 mtcute SQLite,不会被转换成 Telethon SQLite。输出文件包含 auth key 和明文两步验证密码,会通过临时文件原子替换;文件权限由运行环境的默认配置决定。
|
|
175
175
|
|
|
176
176
|
## 手机号状态账号池
|
|
177
177
|
|
|
@@ -202,9 +202,9 @@ const account = await pool.importAccount({
|
|
|
202
202
|
console.log(account.accountId, account.runtimeStatus);
|
|
203
203
|
```
|
|
204
204
|
|
|
205
|
-
`databasePath`
|
|
206
|
-
账号连接所需的 auth key 和 JSON Metadata 明文持久化到 SQLite
|
|
207
|
-
|
|
205
|
+
`databasePath` 必须是绝对文件路径,目录和文件权限由运行环境的默认配置决定。Pool 会把
|
|
206
|
+
账号连接所需的 auth key 和 JSON Metadata 明文持久化到 SQLite。`.session` 与 JSON 必须属于
|
|
207
|
+
同一个有效的 Telethon 账号,导入时会严格核对 auth key、
|
|
208
208
|
DC、账号身份和手机号。Pool 只接受 Telegram 官方移动端凭据:Android 必须使用 `app_id: 4`
|
|
209
209
|
及其官方 `app_hash`,iOS 必须使用 `app_id: 8` 及其官方 `app_hash`;TDesktop、自定义 API ID
|
|
210
210
|
或平台与 API 凭据不匹配的 JSON 会在建立 Telegram 连接前直接拒绝。当前不支持代理。
|