ts-sdk-types

Installation
SKILL.md

TypeScript SDK: Types (Move ↔ TypeScript)

Purpose

Guide type mapping between Move and TypeScript when using @aptos-labs/ts-sdk: numeric types (especially u128/u256), address, TypeTag, and functionArguments / typeArguments.

ALWAYS

  1. Use bigint for u128 and u256 – in both view results and functionArguments; JavaScript number loses precision above 2^53.
  2. Use string for address in payloads – e.g. "0x1" or accountAddress.toString(); SDK accepts AccountAddressInput (string or AccountAddress).
  3. Use typeArguments for generic Move functions – e.g. coin type ["0x1::aptos_coin::AptosCoin"] for coin::balance or coin::transfer.
  4. Cast view results explicitly when you know the Move return type – e.g. BigInt(result[0] as string) for u128.

NEVER

Related skills
Installs
30
GitHub Stars
12
First Seen
Mar 14, 2026