aptos-agent
БесплатноБез исполняемых скриптовНе проверенInteract with Aptos blockchain - check balances, transfer APT, swap tokens, stake, and execute Move view functions. Features game-theoretic decision analysis…
от plurigrid★ 73 звезды на GitHubОб этом скилле
Aptos Claude Agent
Aptos blockchain interaction with game-theoretic decision analysis.
When to Use
- Check APT wallet balances
- Transfer APT tokens
- Swap tokens on DEX (Liquidswap, etc.)
- Stake APT
- Call Move view functions
- Process natural language blockchain intents
- Query NFT/token collections
- Interact with multisig accounts
Setup
MCP server configured in ~/.mcp.json:
{
"aptos": {
"command": "node",
"args": ["/path/to/aptos-claude-agent/dist/mcp/server.js"],
"env": {
"APTOS_NETWORK": "mainnet",
"APTOS_PRIVATE_KEY": "${APTOS_PRIVATE_KEY}"
}
}
}
Available MCP Tools
| Tool | Description |
|---|---|
aptos_balance |
Get wallet balance |
aptos_transfer |
Transfer APT (requires approval) |
aptos_swap |
Swap tokens on DEX (requires approval) |
aptos_stake |
Stake APT (requires approval) |
aptos_view |
Read-only view function call |
aptos_intent |
Process natural language intent |
aptos_approve |
Approve/reject pending decision |
aptos_pending |
List pending decisions |
Security Model
- Simulation First: All transactions simulated before execution
- Approval Required: Every state-changing operation needs explicit approval
- Game-Theoretic Analysis: Transactions modeled as open games
- Wallet Validation: ALWAYS validate key→address before funding
CRITICAL: Wallet Derivation Safety
NEVER use derive-resource-account-address for wallet creation.
Correct Workflow
# 1. Generate key
aptos key generate --output-file my_key
# 2. Derive address FROM PRIVATE KEY
aptos init --private-key-file my_key --network mainnet --profile my_wallet
# 3. VALIDATE before funding
just aptos-validate "PRIVATE_KEY" "EXPECTED_ADDRESS"
# 4. Only fund AFTER validation passes
What Can Go Wrong
- Using
derive-resource-account-addresswith pubkey = PERMANENT FUND LOSS - Resource accounts need signer capabilities from source account
- If key doesn't match address, funds are unrecoverable
Validation
Run just aptos-validate-all to verify all configured wallets before any funding operation.
Aptos Framework Reference (0x1)
Core Modules
| Module | Purpose |
|---|---|
0x1::coin |
Legacy fungible token standard |
0x1::fungible_asset |
New FA standard (object-based) |
0x1::aptos_coin |
Native APT token |
0x1::account |
Account creation/management |
0x1::object |
Object model foundation |
0x1::stake |
Validator staking |
0x1::delegation_pool |
Delegated staking |
0x1::multisig_account |
Multi-signature accounts |
0x1::aptos_governance |
On-chain governance |
0x1::code |
Module deployment |
0x1::coin Module
Key Structs:
Coin<CoinType>- Fungible token containerCoinStore<CoinType>- Account balance storageCoinInfo<CoinType>- Token metadataMintCapability<CoinType>- Minting rightsBurnCapability<CoinType>- Burning rightsFreezeCapability<CoinType>- Freeze rights
View Functions:
0x1::coin::balance<CoinType>(owner: address): u64
0x1::coin::is_account_registered<CoinType>(account: address): bool
0x1::coin::name<CoinType>(): vector<u8>
0x1::coin::symbol<CoinType>(): vector<u8>
0x1::coin::decimals<CoinType>(): u8
0x1::coin::supply<CoinType>(): Option<u128>
Entry Functions:
0x1::coin::transfer<CoinType>(from: &signer, to: address, amount: u64)
0x1::coin::register<CoinType>(account: &signer)
0x1::fungible_asset Module
Key Structs:
Metadata- Asset metadata objectFungibleStore- Balance storageFungibleAsset- Asset containerMintRef,BurnRef,TransferRef- Capabilities
View Functions:
0x1::fungible_asset::balance<T>(store: Object<T>): u64
0x1::primary_fungible_store::balance(account: address, metadata: Object<Metadata>): u64
0x1::stake Module
Key Structs:
StakePool- Validator stake poolValidatorConfig- Validator configurationOwnerCapability- Pool ownership
View Functions:
0x1::stake::get_validator_state(pool_address: address): u64
0x1::stake::get_stake(pool_address: address): (u64, u64, u64, u64)
0x1::delegation_pool Module
View Functions:
0x1::delegation_pool::get_stake(pool_address: address, delegator: address): (u64, u64, u64)
0x1::delegation_pool::calculate_and_update_voter_total_voting_power(pool_address: address): u64
0x1::multisig_account Module
Key Functions:
0x1::multisig_account::create(owner: &signer, num_signatures_required: u64, owners: vector<address>)
0x1::multisig_account::create_transaction(multisig: address, payload: vector<u8>)
0x1::multisig_account::approve_transaction(owner: &signer, multisig: address, sequence_number: u64)
0x1::multisig_account::execute_transaction(multisig: address, sequence_number: u64)
Token Standards Reference
Legacy Token (0x3::token)
Key Structs:
Установить aptos-agent в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл aptos-agent?
Interact with Aptos blockchain - check balances, transfer APT, swap tokens, stake, and execute Move view functions. Features game-theoretic decision analysis with Nash equilibrium detection. All transactions require explicit approval.
Как установить скилл aptos-agent?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл aptos-agent запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic