txKit
Safe bridge between AI agents and Web3 transactions - open protocol + reference React components.
Why txKit
- Never holds keys. Orchestrator, not signer. Composes with any wagmi connector, RainbowKit / AppKit / ConnectKit, Privy / Dynamic, MoonPay OWS, Safe, Turnkey.
- Shipped anti-phishing defenses. Pre-sign simulation, MAX-approval warning, decoded calldata preview, configurable confirmation delay, pluggable risk provider (Blowfish / Blockaid). See the security model.
- Open envelope spec.
@txkit/tx-protocolis the canonicalPreparedEnvelopeshape for AI-initiated transactions, with attack-defense fields for Drift, Bybit, Kelp, multicall bait, address poisoning. Composable with MoonPay OWS. - Vendor-neutral. Bring your own RPC, connectors, theme. No lock-in to a hosted RPC, wallet kit, or paymaster.
- Composes, doesn't replace. Embedded mode runs alongside your existing wagmi / RainbowKit / AppKit / ConnectKit / Privy setup - no duplicate providers, no doubled balance fetches.
- WCAG 2.1 AA. Focus management, keyboard nav, reduced-motion fallbacks, screen-reader announcements baked in. Details.
- Tiny. 2-7 kB JS gzip per component, tree-shaken on import. Peer deps (
wagmi,viem,@tanstack/react-query) already in any Web3 app.
What is txKit?
txKit is two things:
@txkit/tx-protocol- an openPreparedEnvelopeshape for AI-initiated Web3 operations (decode, simulate, preview before signing). Composable with MoonPay's Open Wallet Standard.@txkit/react- reference UI components that consumePreparedEnvelopeto render confirmation flows, with full lifecycle handling for wallets, balances, transactions, and signatures.
Core invariant: txKit never holds keys. It is an orchestrator, not a signer - keys remain in the wallet, Safe, Turnkey, Privy, or any wagmi-compatible signer.
Drop a component into your app, pass your config, and it works - no Web3 plumbing required.
Quick Example
import { TxKitProvider, ConnectWallet } from '@txkit/react'
import { mainnet } from 'viem/chains'
import { http } from 'viem'
const App = () => (
<TxKitProvider config={{
chains: [mainnet],
transports: { [mainnet.id]: http() },
}}>
<ConnectWallet />
</TxKitProvider>
)Next Steps
- Getting Started - installation and setup
- Security model - which defenses ship today, which are roadmap
- Compared to other libraries - vs RainbowKit, AppKit, ConnectKit, thirdweb, Privy
- Accessibility - WCAG 2.1 AA conformance
- PreparedTransaction v0.1 - canonical envelope spec for AI-initiated tx
- OWS composition - how txKit composes with MoonPay Open Wallet Standard
- TxKitProvider - configuration, embedded mode, useTxKit hook
- ConnectWallet - wallet connection with ENS, balance, chain switching
- TransactionButton - multi-step transaction flow with simulation and risk preview
- Theming - CSS custom properties reference
- FAQ - common questions about setup, theming, wallets, bundle size