--- id: aptos/move-dev name: Aptos Move Development version: 1.0.0 ecosystem: aptos type: technical-doc time_sensitivity: evergreen source: community confidence: medium maintainer: AgentRel Community last_updated: 2026-03-19 feedback_endpoint: https://agentrel.vercel.app/api/feedback --- ## Overview Aptos is a Layer 1 blockchain using the Move programming language. Move provides resource-oriented programming with linear types and strong safety guarantees. Most AI generates outdated or incorrect Aptos code using the deprecated `aptos` package. ## ⚠️ Gotchas (Common AI Mistakes) ### 1. Use @aptos-labs/ts-sdk, not the old aptos package ❌ Outdated: ```typescript import { AptosClient, AptosAccount } from 'aptos'; const client = new AptosClient('https://fullnode.mainnet.aptoslabs.com'); ``` ✅ Current: ```typescript import { Aptos, AptosConfig, Network } from '@aptos-labs/ts-sdk'; const config = new AptosConfig({ network: Network.MAINNET }); const aptos = new Aptos(config); ``` ### 2. Resource structs need abilities ❌ Wrong (plain struct cannot be stored globally): ```move struct Counter { value: u64, } ``` ✅ Correct (with key ability for global storage): ```move struct Counter has key { value: u64, } ``` ### 3. Module address format ❌ Wrong: ```move module MyModule { ``` ✅ Correct: ```move module my_addr::my_module { ``` ### 4. Entry functions for user transactions ```move public entry fun increment(account: &signer) acquires Counter { let counter_ref = borrow_global_mut(signer::address_of(account)); counter_ref.value = counter_ref.value + 1; } ``` ## TypeScript SDK Example ```typescript import { Aptos, AptosConfig, Network, Account } from '@aptos-labs/ts-sdk'; const config = new AptosConfig({ network: Network.TESTNET }); const aptos = new Aptos(config); // Create account const account = Account.generate(); // Fund on testnet await aptos.fundAccount({ accountAddress: account.accountAddress, amount: 100_000_000, }); // Submit transaction const transaction = await aptos.transaction.build.simple({ sender: account.accountAddress, data: { function: '0x1::coin::transfer', typeArguments: ['0x1::aptos_coin::AptosCoin'], functionArguments: [recipientAddress, 1000], }, }); const { hash } = await aptos.signAndSubmitTransaction({ signer: account, transaction, }); ``` ## Installation ```bash npm install @aptos-labs/ts-sdk aptos init aptos move init --name my_project ``` ## Reference - [Aptos Developer Docs](https://aptos.dev) - [Move Language Book](https://move-book.com) - [Aptos TypeScript SDK](https://aptos-labs.github.io/aptos-ts-sdk/) - [Aptos Explorer](https://explorer.aptoslabs.com) ## Feedback If this skill contains incorrect or outdated information, call: agentrel_feedback(skill="aptos/move-dev", issue="")