ts-sdk-wallet-adapter
TypeScript SDK: Wallet Adapter (React)
Purpose
Guide wallet connection and frontend transaction submission in React using @aptos-labs/wallet-adapter-react. End
users sign transactions via their browser wallet (Petra, Nightly, etc.) — never via raw private keys.
ALWAYS
- Use
@aptos-labs/wallet-adapter-reactfor frontend wallet integration — this is the standard React adapter. - Wrap your app root with
AptosWalletAdapterProvider— alluseWallet()calls require this context. - Use
useWallet()hook to access wallet functions in React components. - Use the wallet adapter's
signAndSubmitTransaction(fromuseWallet()) in frontend — NOT the SDK's directaptos.signAndSubmitTransaction. - Always call
aptos.waitForTransaction({ transactionHash })after submit — the wallet returns when the tx is accepted, not committed.
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,
33ts-sdk-account
How to create and use Account (signer) in @aptos-labs/ts-sdk. Covers Account.generate(), fromPrivateKey(),
33security-audit
Audits Move contracts for security vulnerabilities before deployment using 7-category checklist. Triggers on: 'audit
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