ts-sdk-address
Installation
SKILL.md
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.