ts-sdk-address
TypeScript SDK: AccountAddress
Purpose
Guide correct creation, parsing, and formatting of account addresses in @aptos-labs/ts-sdk. Addresses are 32-byte
values; string format follows AIP-40.
ALWAYS
- Use
AccountAddress.from()for flexible input – accepts string (with or without0x),Uint8Array, or existingAccountAddress. - Use addresses as
AccountAddressor string in API – SDK acceptsAccountAddressInput(string orAccountAddress) in most APIs. - Use
AccountAddress.fromStringStrict()/AccountAddress.fromStrict()when you need AIP-40 strict: LONG (0x + 64 hex chars) or SHORT only for special (0x0–0xf). - Use derived address helpers from the SDK for object/resource/token addresses – do not hand-roll hashing.
NEVER
More from aptos-labs/aptos-agent-skills
use-ts-sdk
Orchestrates TypeScript SDK integration for Aptos dApps. Routes to granular skills for specific tasks (client setup,
33ts-sdk-client
How to create and configure the Aptos client (Aptos, AptosConfig) in @aptos-labs/ts-sdk. Covers Network,
33ts-sdk-account
How to create and use Account (signer) in @aptos-labs/ts-sdk. Covers Account.generate(), fromPrivateKey(),
33security-audit
Audits Move contracts for security vulnerabilities before deployment using 7-category checklist. Triggers on: 'audit
33ts-sdk-wallet-adapter
How to integrate wallet connection in React frontends using @aptos-labs/wallet-adapter-react. Covers
33ts-sdk-transactions
How to build, sign, submit, and simulate transactions in @aptos-labs/ts-sdk. Covers build.simple(),
32