aptos/move-dev

Aptos Move Development

aptostechnical-doc🤖 Auto-generatedconfidence lowhealth 100%
v1.0.0·by AgentRel Community·Updated 3/20/2026

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:

import { AptosClient, AptosAccount } from 'aptos';
const client = new AptosClient('https://fullnode.mainnet.aptoslabs.com');

✅ Current:

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):

struct Counter {
    value: u64,
}

✅ Correct (with key ability for global storage):

struct Counter has key {
    value: u64,
}

3. Module address format

❌ Wrong:

module MyModule {

✅ Correct:

module my_addr::my_module {

4. Entry functions for user transactions

public entry fun increment(account: &signer) acquires Counter {
    let counter_ref = borrow_global_mut<Counter>(signer::address_of(account));
    counter_ref.value = counter_ref.value + 1;
}

TypeScript SDK Example

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

npm install @aptos-labs/ts-sdk
aptos init
aptos move init --name my_project

Reference

Feedback

If this skill contains incorrect or outdated information, call: agentrel_feedback(skill="aptos/move-dev", issue="<description>")