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.5 $0.00033 $0.00601
Sonnet 5.5 $0.00017 $0.00301
Haiku 4.5 $0.00008 $0.00150

Measured 2mo ago against content hash a2787b101e7b, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 2mo 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. 2mo 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 (20 stars, last pushed 4mo ago), licensed MIT. It adds 83 tokens to every session and 1,503 once invoked, about $0.0003 per session on Opus 5.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

ts-sdk-wallet-adapter compared with skills from other repositories

ts-sdk-wallet-adapter next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
ts-sdk-wallet-adapteraptos-labs/aptos-agent-skillsSkill204mo agoMITA83Claude Code
frontend-designrylsherdamz-rgb/stellar-forgeSkill175d agoMITA51Claude Code
midnight-dapp-devmzf11125/midnight_agent_skillsSkill54mo agoMITA374Claude Code, Codex
emblem-ai-reactEmblemCompany/Agent-skillsSkill125mo agoMITA68Claude Code
flow-react-sdkonflow/flow-ai-toolsSkill63mo agononeA237Claude Code
official-sui-skillsMystenLabs/suiSkill7.8ktodayApache-2.0A116Claude Code, Codex
sui-and-move-toolsMystenLabs/suiSkill7.8ktodayApache-2.0A105Claude Code, Codex