near-multi-account

TotalClaw 作者 totalclaw

通过加密凭证存储、账户切换和余额聚合,对 NEAR 协议进行安全的多账户管理。

安装 / 下载方式

TotalClaw CLI推荐
totalclaw install totalclaw:totalclaw~shaiss-near-multi-account-manager
cURL直接下载,无需登录
curl -fsSL https://skills.taituai.com/api/skills/totalclaw%3Atotalclaw~shaiss-near-multi-account-manager/file -o shaiss-near-multi-account-manager.md
# NEAR Multi-Account Manager

A secure and comprehensive OpenClaw skill for managing multiple NEAR Protocol accounts. Store credentials, switch between accounts, check balances, transfer NEAR, and track transactions across all your accounts from one unified interface.

## What It Does

- 🔐 **Secure Credential Storage** - Encrypted storage for multiple NEAR account private keys using AES-256-CBC
- 🔄 **Account Switching** - Quickly set and switch between active accounts for seamless operations
- 💰 **Balance Management** - Check balances for individual accounts or all accounts at once
- 💸 **NEAR Transfers** - Transfer NEAR between accounts with a single command
- 📊 **Account Summaries** - Get comprehensive overviews of all managed accounts including total holdings
- 📜 **Transaction Tracking** - View account information and transaction history via NEAR explorer
- 📤 **Export/Import** - Backup and restore account information (private keys excluded for security)
- 🗑️ **Account Management** - Add, remove, and manage accounts with confirmation safeguards

## Use Cases

- **Developers** - Manage multiple testnet and mainnet accounts during development
- **Traders** - Track balances across multiple trading accounts
- **Organizations** - Manage team accounts with quick switching between them
- **DeFi Users** - Monitor and move funds between accounts for yield farming or staking
- **Power Users** - Centralized management of NEAR portfolio

## Requirements

- Node.js runtime (bundled with OpenClaw)
- Valid NEAR Protocol account(s)
- Private key(s) in format: `ed25519:...`

## Usage Examples

### Add a NEAR Account
```javascript
await add_account({
  accountId: "myaccount.near",
  privateKey: "ed25519:4K...",
  name: "Main Wallet"
});
```

### Check All Balances
```javascript
await get_all_balances();
```

### Transfer NEAR
```javascript
await transfer({
  to: "recipient.near",
  amount: "5.0"
});
```

### Get Account Summary
```javascript
await account_summary();
```

## Security Features

- **AES-256-CBC Encryption** - All private keys are encrypted at rest
- **Custom Encryption Keys** - Set via `NEAR_SKILL_KEY` environment variable
- **Confirmation Required** - Account removal requires explicit confirmation
- **No Key Export** - Export functions exclude private keys for security
- **Local Storage** - Data never leaves your machine unless explicitly exported

## Technical Details

- Uses NEAR SDK (near-api-js) for blockchain interactions
- Supports NEAR mainnet (testnet support available via configuration)
- Encrypted data stored in `~/.openclaw/skills/near-multi-account-manager/`
- Active account tracking via separate file for quick access

## License

MIT

---

## 中文说明

# NEAR 多账户管理器

一个安全且功能全面的 OpenClaw 技能,用于管理多个 NEAR Protocol 账户。在一个统一的界面中存储凭证、在账户间切换、查看余额、转账 NEAR,并跟踪你所有账户的交易。

## 功能

- 🔐 **安全凭证存储** - 使用 AES-256-CBC 对多个 NEAR 账户私钥进行加密存储
- 🔄 **账户切换** - 快速设置并在活动账户间切换,操作无缝衔接
- 💰 **余额管理** - 查看单个账户或一次性查看所有账户的余额
- 💸 **NEAR 转账** - 用一条命令在账户间转账 NEAR
- 📊 **账户摘要** - 获取所有受管账户的全面概览,包括总持仓
- 📜 **交易跟踪** - 通过 NEAR explorer 查看账户信息和交易历史
- 📤 **导出/导入** - 备份和恢复账户信息(出于安全考虑不含私钥)
- 🗑️ **账户管理** - 添加、移除和管理账户,并带有确认保护机制

## 使用场景

- **开发者** - 在开发过程中管理多个测试网和主网账户
- **交易者** - 跟踪多个交易账户的余额
- **组织** - 管理团队账户并在它们之间快速切换
- **DeFi 用户** - 监控并在账户间转移资金,用于流动性挖矿或质押
- **高级用户** - 集中管理 NEAR 投资组合

## 要求

- Node.js 运行时(随 OpenClaw 捆绑)
- 有效的 NEAR Protocol 账户
- 格式为 `ed25519:...` 的私钥

## 使用示例

### 添加一个 NEAR 账户
```javascript
await add_account({
  accountId: "myaccount.near",
  privateKey: "ed25519:4K...",
  name: "Main Wallet"
});
```

### 查看所有余额
```javascript
await get_all_balances();
```

### 转账 NEAR
```javascript
await transfer({
  to: "recipient.near",
  amount: "5.0"
});
```

### 获取账户摘要
```javascript
await account_summary();
```

## 安全特性

- **AES-256-CBC 加密** - 所有私钥在静态存储时均被加密
- **自定义加密密钥** - 通过 `NEAR_SKILL_KEY` 环境变量设置
- **需要确认** - 移除账户需要显式确认
- **不导出密钥** - 出于安全考虑,导出功能不含私钥
- **本地存储** - 数据绝不离开你的机器,除非显式导出

## 技术细节

- 使用 NEAR SDK(near-api-js)进行区块链交互
- 支持 NEAR 主网(可通过配置启用测试网支持)
- 加密数据存储在 `~/.openclaw/skills/near-multi-account-manager/`
- 通过单独的文件跟踪活动账户以便快速访问

## License

MIT