🏠 TypeSOL has a new home on GitHub
Our GitHub account was suspended on Nov 2, most likely by GitHub's automated protection: our CI/CD ran a lot of test runs, merges and releases in a short time. We're not alone here, lately many developers have reported the same on Reddit and GitHub's community forum.
We contacted GitHub Support and haven't heard back yet. Development didn't stop, so we moved everything to a new organization: github.com/typesol-lang
What moved
• typesol, benchmarks and the org profile, with their full history
• All 32 release tags
• typesol.com, the docs and the playground now link to the new home
What didn't change
• npm: same package, the TypeSOL CLI, installs and works as before
• typesol.com and everything on it
Once the original account is restored, the repositories move back to it, and we'll say so here first. If you starred the old repo, a star on the new one helps a lot.
A TypeSOL program fails the way an Anchor program fails.
Wherever Anchor has the same check, the error is Anchor's code: a Mut account passed read-only, seeds that don't match, the wrong owner, an account that isn't initialized. The checks run in the order Anchor's generated code runs them, so a transaction that breaks one gets the same code under both, and clients and explorers read it the same way.
Overflow, division by zero, an index out of bounds and an empty Option each get a code of their own.
One build, and the app side is done too.
typesol build writes the Solana program, an Anchor-compatible IDL and a typed TypeScript client in one go. The client is a single file on Solana Kit, rewritten on every build so it always matches the program: PDAs and fixed addresses filled in, accounts decoded, errors by name, events parsed from the logs.
The Anchor programs you call get the same kind of client: typesol client takes their IDL, or reads it from the chain by address.
Three ways to start a Solana program in TypeScript.
typesol init writes a program and a test that already passes: a counter by default, --template vault for SOL held at a PDA with the rent reserve kept, or --template escrow for two mints swapped in one transaction, with token transfers signed by the offer's PDA.
Every starter's test runs in LiteSVM and covers the main flow and at least one call the program refuses. You start green, and the test shows how to write the next one.
Solana programs in TypeScript should read like TypeScript. A devlog on functions and list callbacks, from v0.40.0.
Pick a function at run time and only the chosen one runs. Loop over a list of functions and the loop is unrolled. Read a field straight off orders.find(…). And a filter → map → reduce chain used right away compiles to one loop that stores nothing.
Closures and callbacks are expanded right where they're called.
A room full of people shipping on Solana, and the app side of what they ship is TypeScript already. The program can be too.
TypeSOL compiles TypeScript to a native Solana program, with an Anchor-compatible IDL and a typed client. Since v0.41.0 a coding agent can drive it: the CLI's init writes the rules, and check --json says what to write instead.
One language, front end to program.
Inside @hackerhouses London with @brimigs. Builders, workshops, and a room full of people shipping on Solana.
What will TypeSOL 1.0 promise? It's written down now, before 1.0 exists.
Within 1.x:
- Sources keep compiling, to the same account layouts, IDL, discriminators and error codes
- Builds stay reproducible, and a release that changes your binary without you using anything new says so, with the diff
- No check a program gets from its parameter types is removed or weakened
- build, test, check --json, deploy, verify, idl and the typed client keep their interfaces
What holds today and what 1.0 waits for are on the same page.
Raydium CP-Swap, every instruction, in TypeScript. A devlog on what that took.
The swaps were the easy part. The rest: pools created by hand at a pre-funded address, creator fees in each of their modes, permissions, the price oracle, and Token-2022 transfer-fee pools through swaps, deposits and withdrawals.
The compiler gained what the port needed, like the inverse transfer fee for exact-output swaps. The oracle's wrapping sum is tested right at u128's ceiling.
A deposit: 25,007 → 6,194 compute units.
A refused swap: 17,193 → 1,656.
TypeSOL v0.41.0 is on npm, ready for your AI coding agent.
TypeSOL is TypeScript, which agents already write well, but a subset of it, and a model's ordinary habits (1 for an integer, console.log, throw, xs[i]) get refused. So now:
- typesol init writes the rules into AGENTS.md, CLAUDE.md and Cursor's rules
- typesol mcp, an MCP server with check, idl, docs and rules
- check --json gives each error a hint field, so an agent loops check, edit, check without building
- llms.txt and llms-full.txt ship in the package: the docs in one file for a model
Also in this release: Raydium CP-Swap in full, all 21 instructions, checked against the current mainnet binary on 136 transactions and a fuzz test, at under a third of the original's size.
What TypeSOL has ported from Solana mainnet so far, each one run next to the binary that's live there: the same outcomes, the same account bytes, the same events.
Raydium AMM v4, CLMM, and CP-Swap's trading core. Marginfi v2. Jito's MEV programs: tip payment, tip distribution, priority fee distribution. coral-xyz/multisig.
Plus every official program example from solana-developers. All of it is in the repo with its tests:
github.com/typesol-lang/type…
Devlog: Marginfi's interest curve, ported to TypeScript.
Each bank sets a curve with two ends and up to five points between, every utilization and rate stored as a 32-bit fraction. Reading one as I80F48 is (x << 48) / (2^32 − 1), and with y = x << 16 that's exactly y + y / (2^32 − 1): 64-bit math, no 128-bit division, the same bits as the original.
The port accrues a bank over a minute at 25% utilization in 18,696 compute units. Marginfi's binary takes 40,135.
TypeSOL v0.40.0 is on npm: Raydium AMM v4, in TypeScript.
Raydium's original AMM is a native program, with no Anchor. It reads a tag byte and packed arguments, takes its accounts by position, and keeps its pools as packed structs with no discriminator. The compiler can now port that kind of program, and this port has every one of its instructions.
Next to the mainnet binary on 484 transactions: the same outcomes, account bytes and log lines, panics included. Swaps take 41–44% of the original's compute units, and the program is less than half its size.
Raydium's third AMM in TypeSOL, after CP-Swap and CLMM. The error hints from the last devlog ship in this release too.
Devlog: errors that say what to write instead.
When you're new to TypeSOL, TypeScript's own advice can point the wrong way: a number where a u64 belongs, Math.max, console.log, xs[i] on an account array, a change to an account that isn't Mut. The compiler now adds a hint line under TypeScript's message with the TypeSOL way, and CLI errors show the source line with the problem marked.
The editor plugin shows the same hints in VS Code. Merged on main, in the next release.
Marginfi v2 is in TypeScript now. All of it.
Every one of its 124 instructions, each checked against the binary that runs on mainnet: the same outcome, account bytes and events on 2,081 transactions, with 16 to 97% fewer compute units.
The last pull request filled in the rest, released as v0.39.0 on npm: Solend, Kamino, Drift and JupLend banks, staked SOL, Scope, every oracle setup priced, and rebalances across venue banks. A full lending protocol, compiled from TypeScript.
NFTs, from a TypeScript program.
TypeSOL calls Metaplex directly: Token Metadata with creators and collections, Core assets and collections with their plugins, and compressed NFTs through Bubblegum, on V1 and V2 trees.
In this cNFT burn, the tree authority's PDA is written into the parameter's type and checked before the function runs, and the proof rides in the remaining accounts. No Rust anywhere in the program.
If your badge app needs a program of its own, it can be TypeScript too.
TypeSOL compiles it to native SBF, writes an Anchor IDL and a typed client for the app with every build, and tests it in LiteSVM before you deploy. Plenty of time to ship one before Breakpoint.
Builders have already added 20+ apps to the Breakpoint badge app store (without even holding the badges yet).
Build something and ship it before Breakpoint: solana.com/breakpoint/badge
Where the Marginfi port goes next.
Most of Marginfi is in TypeScript now and checked against its mainnet binary: lending, the risk engine and circuit breaker, liquidations, flash loans, orders, rebalances, e-mode and administration.
What's left is pricing that reads another program's state: Kamino, Drift, Solend and JupLend reserves, mSOL and LST multipliers, Exponent PT vaults, Scope feeds and staked SOL. Until then the port stops exactly where the original would read it.
Devlog: a Marginfi liquidation, who gets what.
A liquidator takes part of an unhealthy account's collateral at a discount and takes on its debt in exchange. The seized collateral splits three ways: the liquidator's discount, a cut for the insurance vault, and the rest paying the account's debt down.
Afterwards the port checks what the original checks: the account still owes and is no healthier than zero, but better than before, and the liquidator stays healthy. 194,785 compute units on Marginfi's binary, 122,645 in TypeScript.














