ts-sdk-account
TypeScript SDK: Account (Signer)
Purpose
Guide creation and use of Account (signer) in @aptos-labs/ts-sdk. An Account holds address + key material and can
sign transactions and messages. Creating an Account does NOT create the account on-chain; use faucet or transfer to
fund it.
ALWAYS
- Use
Account.generate()orAccount.fromPrivateKey()only in server/script – never in frontend; use wallet adapter for end users. - Load private keys from env (e.g.
process.env.PRIVATE_KEY) on server – never hardcode. - Use
account.accountAddresswhen building transactions – pass as sender/secondary signers. - Use
aptos.signAndSubmitTransaction({ signer: account, transaction })with the same Account instance that holds the key.
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,
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(),
32ts-sdk-address
How to create and use AccountAddress in @aptos-labs/ts-sdk. Covers address format (AIP-40),
31