01/
The Problem
Clarity contracts have no TypeScript integration. Manual type definitions drift. Call parameters are untyped strings.
You deploy a contract with 20 functions. Every call site in your app? Untyped. Every parameter? Hope you got the order right.
[ terminal ]
02/
The Solution
secondlayer generates type-safe interfaces from contract source or deployed contracts.
Point at a contract address or local file. Auto-infers network from address prefix. Get TypeScript that knows your contract.
[ terminal ]
03/
The Output
Generated interfaces match your contract exactly. Helper functions for read/write calls. Type-safe parameters — wrong types don't compile.
Every public function. Every argument. Every return type.
[ terminal ]
04/
Plugins
Extend generation with plugins. clarinet() reads from Clarinet projects. react() generates hooks. testing() adds mock helpers.
Pick what you need. Skip what you don't.
[ terminal ]
05/
Get Started
Install. Run. Get types. Zero config for basic usage — just point at a contract address and go.
[ terminal ]
[ terminal ]