ton-better-auth
Installation
SKILL.md
TON Better Auth Integration
Integrate TON Connect wallet authentication into Better Auth projects using the ton-better-auth package. This package provides a complete server plugin for verifying ton_proof payloads and a matching client plugin for typed helpers.
Package Overview
ton-better-auth is a Better Auth plugin that adds "Sign in with TON Connect" using the official ton_proof protocol. It handles:
- Server-side verification of
ton_proofpayloads - Replayable nonce challenges stored in the verification table
- Signature verification with Ed25519
- Wallet state-init parsing (v1 through v5)
- On-chain
get_public_keyfallback for non-standard wallets - Session creation and user management via Better Auth
- Multi-wallet linking per user