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