ts-sdk-wallet-adapter

ts-sdk-wallet-adapter is a skill for Claude Code from aptos-labs/aptos-agent-skills. It costs 83 tokens per session (1,503 once invoked), scanned A, original, MIT.

A guide for connecting Aptos cryptocurrency wallets to React applications using the official wallet adapter.

In plain words
What is it for?
Use it to add wallet connection screens, access wallet actions in React, submit user-approved Aptos transactions, and wait until transactions are confirmed.
Why use it?
It shows how users can approve transactions in their own browser wallets without putting private keys in the application.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is import { MODULE_ADDRESS } from "../lib/aptos";.

Part of the aptos-agent-skills plugin — 16 skills shipped together

Good fit Use it to add wallet connection screens, access wallet actions in React, submit user-approved Aptos transactions, and wait until transactions are confirmed.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/aptos-labs/aptos-agent-skills
agentmods
npx agentmods add skills/aptos-labs/aptos-agent-skills/ts-sdk-wallet-adapter

Made for: Claude Code.

Or install aptos-agent-skills, the plugin that ships this one along with the rest of its 16 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for ts-sdk-wallet-adapter

README.md
[![agentmods](https://agentmods.dev/badge/skills/aptos-labs/aptos-agent-skills/ts-sdk-wallet-adapter/github.svg)](https://agentmods.dev/skills/aptos-labs/aptos-agent-skills/ts-sdk-wallet-adapter)
Your own site
<a href="https://agentmods.dev/skills/aptos-labs/aptos-agent-skills/ts-sdk-wallet-adapter"><img src="https://agentmods.dev/badge/skills/aptos-labs/aptos-agent-skills/ts-sdk-wallet-adapter/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for ts-sdk-wallet-adapter

Your own site · 80×15
<a href="https://agentmods.dev/skills/aptos-labs/aptos-agent-skills/ts-sdk-wallet-adapter"><img src="https://agentmods.dev/badge/skills/aptos-labs/aptos-agent-skills/ts-sdk-wallet-adapter.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 83 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,503 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00083 $0.01503
Opus 5 $0.00042 $0.00751
Sonnet 5 $0.00017 $0.00301
Haiku 4.5 $0.00008 $0.00150

Measured 12d ago against content hash a2787b101e7b, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

ts-sdk-wallet-adapter scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 12d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/sdk/typescript/ts-sdk-wallet-adapter/SKILL.md · 202 lines

How it starts

The opening of the file, as written. The whole thing — 202 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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

  1. Use @aptos-labs/wallet-adapter-react for frontend wallet integration — this is the standard React adapter.
  2. Wrap your app root with AptosWalletAdapterProvider — all useWallet() calls require this context.
  3. Use useWallet() hook to access wallet functions in React components.
  4. Use the wallet adapter's signAndSubmitTransaction (from useWallet()) in frontend — NOT the SDK's direct aptos.signAndSubmitTransaction.
  5. Always call aptos.waitForTransaction({ transactionHash }) after submit — the wallet returns when the tx is accepted, not committed.

NEVER

  1. Do not use Account.generate() or raw private keys in browser/frontend — use wallet adapter for end users.
  2. Do not use the SDK's aptos.signAndSubmitTransaction in React components — use the wallet adapter's version from useWallet().
  3. Do not hardcode wallet names — use the wallets array from useWallet() for a dynamic list.

Installation

npm install @aptos-labs/wallet-adapter-react

Modern AIP-62 standard wallets (Petra, Nightly, etc.) are autodetected and do NOT require additional packages. Legacy wallets need their plugin package installed separately.


Provider setup

Wrap your app root with AptosWalletAdapterProvider:

// main.tsx or App.tsx
import { AptosWalletAdapterProvider } from "@aptos-labs/wallet-adapter-react";
import { Network } from "@aptos-labs/ts-sdk";

function App() {
  return (
    <AptosWalletAdapterProvider
      autoConnect={true}
      dappConfig={{
        network: Network.TESTNET
      }}
      onError={(error) => console.error("Wallet error:", error)}
    >
      <YourApp />
    </AptosWalletAdapterProvider>
  );
}

Read the full file on GitHub · 202 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 12d ago First seen · 202 lines · 83 tokens per session scan A a2787b101e7b

Subscribe to this mod's changes

ts-sdk-wallet-adapter is a skill published in the GitHub repository aptos-labs/aptos-agent-skills (19 stars, last pushed 2mo ago), licensed MIT. It adds 83 tokens to every session and 1,503 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

crypto-market-dashboard-guide

Guide to building a real-time crypto market dashboard with Next.js, React, and TradingView charts. Features multi-chain portfolio tracking, DeFi position monitoring, price alerts, and social sentiment integration. Production-ready dashboard template.

nirholas/three.ws · 49 tokens

frontend-design

Create distinctive, production-grade Stellar dApp UI. Combines bold aesthetic direction with smart contract integration patterns — wallet connection flows, transaction UX, contract data displays, and agentic kit hook wiring. No generic "AI slop" aesthetics.

rylsherdamz-rgb/stellar-forge · 51 tokens

midnight-dapp-dev

Comprehensive guide for Midnight Network DApp frontend development covering project scaffolding with Vite and React 19 plus shadcn/ui templates, Next.js wallet connector patterns via the DApp Connector API with App Router, React wallet connector with Vite setup, provider architecture including MidnightProviders, proof…

mzf11125/midnight_agent_skills · 374 tokens

emblem-ai-react

React integration skill for EmblemAI's one-shot user management. Use when the user wants to add website authentication plus wallet-enabled users to a React app with EmblemAuthProvider, ConnectButton, social/email/wallet login, chat components, React auth hooks, React composition patterns, or Migrate.fun React hooks.

EmblemCompany/Agent-skills · 68 tokens

flow-react-sdk

Guide for building React applications on the Flow blockchain using @onflow/react-sdk. Covers FlowProvider setup, Cadence hooks (useFlowQuery, useFlowMutate, useFlowCurrentUser, useFlowEvents), Cross-VM hooks for EVM bridging and batch transactions, and UI components (Connect, TransactionButton, TransactionDialog…

onflow/flow-ai-tools · 237 tokens

onchainkit

Build onchain apps with Coinbase's OnchainKit React components - wallets, swaps, NFTs, payments.

alsk1992/CloddsBot · 24 tokens