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 iskysun96/aptos-agent-skills
generate-tests
Creates comprehensive test suites for Move contracts with 100% coverage requirement. Triggers on: 'generate tests',
38write-contracts
Generates secure Aptos Move V2 smart contracts with Object model, Digital Asset integration, security patterns, and
35security-audit
Audits Move contracts for security vulnerabilities before deployment using 7-category checklist. Triggers on: 'audit
32deploy-contracts
Safely deploys Move contracts to Aptos networks (devnet, testnet, mainnet) with pre-deployment verification. Triggers
32search-aptos-examples
Searches aptos-core and daily-move for reference implementations before writing contracts. Triggers on: 'search
31analyze-gas-optimization
Analyze and optimize Aptos Move contracts for gas efficiency, identifying expensive operations and suggesting
31