ts-sdk-client

Configure Aptos client and AptosConfig in @aptos-labs/ts-sdk.

19|8|Updated Jan 23, 2026
One-click install
npx skills add https://github.com/aptos-labs/aptos-agent-skills --skill ts-sdk-client
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: ts-sdk-client
Source: https://github.com/aptos-labs/aptos-agent-skills/tree/main/skills/sdk/typescript/ts-sdk-client
Command: npx skills add https://github.com/aptos-labs/aptos-agent-skills --skill ts-sdk-client

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill addresses the complexity of setting up and configuring the Aptos client and AptosConfig within the @aptos-labs/ts-sdk, ensuring efficient and correct interaction with Aptos networks.

Core Features & Use Cases

  • Client Instantiation: Guides the creation of a single, reusable Aptos client instance (singleton pattern).
  • Network Configuration: Details how to configure networks (TESTNET, MAINNET, DEVNET, CUSTOM) and handle environment variables for URLs.
  • Bun Compatibility: Provides specific configurations for optimal performance with Bun.
  • Use Case: When starting a new Aptos dApp project, this skill helps set up the foundational client configuration to interact with the Aptos blockchain.

Quick Start

Set up a new Aptos client instance for the testnet network.

Frequently Asked Questions about ts-sdk-client

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I configure the Aptos SDK client for a specific network?▼

You configure the Aptos SDK client by instantiating <code>AptosConfig</code> with a target like <code>Network.TESTNET</code> or <code>Network.MAINNET</code>, then passing it to create the client. This establishes your dApp's network connection.

What is the best way to set up a single reusable Aptos client instance?▼

Using the singleton pattern is the best way to set up a reusable Aptos client. This ensures you create a single <code>AptosConfig</code> instance referenced consistently throughout your application without duplicate connections.

Can I use custom fullnode or indexer URLs when setting up the Aptos client?▼

Yes, you can use custom fullnode, indexer, and faucet URLs when setting up the Aptos client. By configuring <code>Network.CUSTOM</code> in <code>AptosConfig</code>, you can handle environment variables to specify your endpoints.

Does the Aptos TypeScript SDK work with Bun?▼

Yes, the Aptos TypeScript SDK works with Bun. Specific configurations are provided for optimal performance, ensuring the <code>AptosConfig</code> and client setup runs efficiently within the Bun runtime environment.

Why do I need AptosConfig when creating a new Aptos client?▼

<code>AptosConfig</code> is required when creating a new Aptos client because it defines foundational settings like Network, fullnode URLs, and indexer endpoints. It solves the complexity of ensuring correct interaction with Aptos networks.