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 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