Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

aptos-agent

БесплатноБез исполняемых скриптовНе проверен

Interact with Aptos blockchain - check balances, transfer APT, swap tokens, stake, and execute Move view functions. Features game-theoretic decision analysis…

plurigridот 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

  1. Simulation First: All transactions simulated before execution
  2. Approval Required: Every state-changing operation needs explicit approval
  3. Game-Theoretic Analysis: Transactions modeled as open games
  4. 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-address with 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 container
  • CoinStore<CoinType> - Account balance storage
  • CoinInfo<CoinType> - Token metadata
  • MintCapability<CoinType> - Minting rights
  • BurnCapability<CoinType> - Burning rights
  • FreezeCapability<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 object
  • FungibleStore - Balance storage
  • FungibleAsset - Asset container
  • MintRef, 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 pool
  • ValidatorConfig - Validator configuration
  • OwnerCapability - 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:

Полный SKILL.md на GitHub

Установить 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), без исполняемых скриптов.

Похожие скиллы

Сравнить aptos-agent с