@typesol/cli 0.44.1 → 0.46.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (80) hide show
  1. package/CHANGELOG.md +343 -0
  2. package/NOTICE +14 -1
  3. package/README.md +115 -26
  4. package/SECURITY.md +10 -8
  5. package/dist/bin.d.ts +2 -0
  6. package/dist/bin.js +9 -0
  7. package/dist/cli.js +226 -62
  8. package/dist/compiler/analyze.js +57 -6
  9. package/dist/compiler/diagnostics.d.ts +4 -3
  10. package/dist/compiler/diagnostics.js +10 -6
  11. package/dist/compiler/emit/base.d.ts +1 -1
  12. package/dist/compiler/emit/calls.js +18 -5
  13. package/dist/compiler/emit/cpi-core.d.ts +3 -1
  14. package/dist/compiler/emit/cpi-core.js +8 -4
  15. package/dist/compiler/emit/expressions.d.ts +14 -0
  16. package/dist/compiler/emit/expressions.js +52 -4
  17. package/dist/compiler/emit/shared.d.ts +8 -1
  18. package/dist/compiler/emit/shared.js +8 -1
  19. package/dist/compiler/emit/statements.d.ts +8 -3
  20. package/dist/compiler/emit/statements.js +68 -3
  21. package/dist/compiler/emit/storage.js +5 -1
  22. package/dist/compiler/hints.d.ts +7 -0
  23. package/dist/compiler/hints.js +58 -9
  24. package/dist/compiler/index.d.ts +56 -1
  25. package/dist/compiler/index.js +27 -3
  26. package/dist/compiler/model.js +3 -2
  27. package/dist/compiler/toolchain.d.ts +73 -2
  28. package/dist/compiler/toolchain.js +222 -17
  29. package/dist/node-version.d.ts +4 -0
  30. package/dist/node-version.js +12 -0
  31. package/dist/tools/docker.d.ts +183 -0
  32. package/dist/tools/docker.js +442 -0
  33. package/dist/tools/doctor.d.ts +44 -0
  34. package/dist/tools/doctor.js +108 -14
  35. package/dist/workspace.d.ts +11 -3
  36. package/dist/workspace.js +46 -9
  37. package/docker/Dockerfile +163 -0
  38. package/docker/deps/0.43.0.lock.json +1206 -0
  39. package/docker/deps/0.44.0.lock.json +1206 -0
  40. package/docker/deps/0.44.1.lock.json +1206 -0
  41. package/docker/deps/0.45.0.lock.json +1206 -0
  42. package/docker/deps/0.46.0.lock.json +1206 -0
  43. package/docs/ai.md +2 -1
  44. package/docs/architecture.md +18 -6
  45. package/docs/audit.md +15 -7
  46. package/docs/case-study-phoenix.md +1 -1
  47. package/docs/case-study-raydium-amm.md +1 -1
  48. package/docs/case-study-spl-stake-pool.md +1 -1
  49. package/docs/cli.md +71 -6
  50. package/docs/errors.md +22 -8
  51. package/docs/glossary.md +210 -0
  52. package/docs/language-accounts.md +499 -0
  53. package/docs/language-basics.md +389 -0
  54. package/docs/language-builtins.md +411 -0
  55. package/docs/language-chain.md +198 -0
  56. package/docs/language-cpi.md +470 -0
  57. package/docs/language-errors-events.md +184 -0
  58. package/docs/language-native.md +493 -0
  59. package/docs/language-pdas.md +198 -0
  60. package/docs/language-statements.md +620 -0
  61. package/docs/language-types.md +601 -0
  62. package/docs/language.md +190 -467
  63. package/docs/mainnet.md +103 -8
  64. package/docs/migrate-from-anchor.md +7 -6
  65. package/docs/security-model.md +4 -4
  66. package/docs/stability.md +64 -3
  67. package/docs/test-your-program.md +52 -15
  68. package/docs/testing.md +49 -2
  69. package/docs/troubleshooting.md +210 -42
  70. package/lib/typesol.d.ts +67 -22
  71. package/llms-full.txt +5084 -591
  72. package/llms.txt +12 -1
  73. package/package.json +4 -2
  74. package/releases/0.43.0.json +669 -0
  75. package/releases/0.44.0.json +672 -0
  76. package/releases/0.44.1.json +672 -0
  77. package/releases/0.45.0.json +732 -0
  78. package/runtime/LICENSE-compiler-builtins.txt +275 -0
  79. package/runtime/typesol_builtins.c +484 -0
  80. package/ts-plugin/index.js +16 -5
package/README.md CHANGED
@@ -12,6 +12,7 @@
12
12
  </p>
13
13
 
14
14
  <p align="center">
15
+ <a href="#quick-start">Quick start</a> ·
15
16
  <a href="https://typesol.com">Website</a> ·
16
17
  <a href="https://typesol.com/docs/">Docs</a> ·
17
18
  <a href="https://typesol.com/docs/changelog/">Changelog</a> ·
@@ -27,15 +28,30 @@ clients read TypeSOL programs unchanged.
27
28
 
28
29
  - **One language, end to end.** You write the program and its tests in TypeScript, and every build writes a typed
29
30
  client for it ([docs/client.md](docs/client.md)). Your editor gives you completion and type errors throughout.
30
- - **Safe by default.**
31
+ - **Checked by default.**
31
32
  - Every arithmetic operation is checked.
32
33
  - Account owner, discriminator, signer, writability and aliasing checks are generated from your parameter types.
33
34
  - Constraints follow Anchor's rules and use Anchor's error codes.
34
35
  - **Small and fast.** In the LiteSVM benchmarks below, TypeSOL uses 5–32% of Anchor's compute units, with binaries
35
36
  about 10× smaller, and fewer compute units than native Rust and hand-tuned Pinocchio on every instruction. On
36
37
  mainnet the results differ by instruction; see [the mainnet table](#on-mainnet).
37
- - **Reproducible.** The same sources and toolchain produce the same bytes. `typesol verify` reads a deployed program
38
- from the cluster and checks it, and the IDL published on chain, against its source.
38
+ - **Checked against mainnet.** Eight deployed programs are ported in full, among them Marginfi v2, Phoenix v1 and
39
+ SPL Stake Pool, and run beside the original binaries: the same outcomes, log lines, events and account bytes on
40
+ thousands of transactions, for fewer compute units ([the ports](#ported-and-checked-against-mainnet-binaries)).
41
+ - **Verifiable.** `typesol verify` reads a deployed program from the cluster and checks it, and the IDL published on
42
+ chain, against its source. Every release records the hashes of its npm tarball and of every program it builds
43
+ ([releases/](releases), [docs/testing.md](docs/testing.md#reproducing-a-release)).
44
+ The same source, TypeSOL version and toolchain build to the same bytes on macOS arm64, Linux arm64 and Linux x86_64
45
+ (measured: all 76 programs of the sources for SBPF v0, 14 of them for v1 and v2; Linux arm64 with the platform-tools
46
+ `linux-aarch64` package set up as in [Requirements](#requirements), since there is no Agave CLI for it;
47
+ [docs/stability.md](docs/stability.md#what-builds-the-same-bytes-where)).
48
+ `typesol build --docker` builds in a pinned linux/amd64 container that anyone can rebuild from the Dockerfile, and
49
+ `typesol verify --docker` checks a deployed program against its source in that same environment
50
+ ([docs/mainnet.md](docs/mainnet.md#6-verify)).
51
+
52
+ **Try it** in the browser, with nothing to install: [typesol.com/play](https://typesol.com/play/). On your machine, once
53
+ Node.js and the Solana toolchain are in place ([Quick start](#quick-start), [Requirements](#requirements)):
54
+ `npx @typesol/cli init my-app`, then `cd my-app && npm install && npm test`.
39
55
 
40
56
  <p align="center">
41
57
  <a href="#numbers">
@@ -46,9 +62,32 @@ clients read TypeSOL programs unchanged.
46
62
  </a>
47
63
  </p>
48
64
 
65
+ ## Ported and checked against mainnet binaries
66
+
67
+ Each port is the whole program, written in TypeSOL from the original's source. Its tests send every transaction to
68
+ the port and to the binary deployed on mainnet, both in LiteSVM, and require the same outcome, error, log lines,
69
+ events, return data and bytes in every account; the port must also use fewer compute units on every transaction that
70
+ succeeds. A case study for each says what was compared and what was not.
71
+
72
+ | Program | Kind | Instructions | Transactions compared |
73
+ | --- | --- | ---: | ---: |
74
+ | [Marginfi v2](docs/case-study-marginfi.md) | Anchor, lending | 124 | 2,081 |
75
+ | [Phoenix v1](docs/case-study-phoenix.md) | native, limit order book | 28 | 3,575 |
76
+ | [SPL Stake Pool](docs/case-study-spl-stake-pool.md) | native, liquid staking | 27 | 2,107 |
77
+ | [Raydium CLMM](docs/case-study-raydium-clmm.md) | Anchor, concentrated liquidity | 37 | 302 |
78
+ | [Raydium CP-Swap](docs/case-study-raydium-cp-swap.md) | Anchor, constant product | 21 | 136 |
79
+ | [Raydium AMM v4](docs/case-study-raydium-amm.md) | native, constant product | all | 484 |
80
+ | [Jito MEV](docs/case-study-jito-mev.md) | Anchor, three programs | 24 | 150 |
81
+ | [coral-xyz/multisig](docs/case-study-multisig.md) | Anchor | all | 52 |
82
+
83
+ Random walks with fixed or printed seeds run on top of these counts ([docs/testing.md](docs/testing.md)). The
84
+ sources are in [`showcase/mainnet`](showcase/mainnet), and where each original binary comes from is recorded in
85
+ [test/programs/SOURCES.md](test/programs/SOURCES.md).
86
+
49
87
  ## At a glance
50
88
 
51
- **`counter.ts`**: a complete program, 23 lines.
89
+ **`counter.ts`**: a complete program, 23 lines. (`typesol init` writes it with one more instruction, a read-only
90
+ `assertAtLeast`.)
52
91
 
53
92
  ```ts
54
93
  import { type Init, type Mut, type Pubkey, type Signer,
@@ -141,41 +180,61 @@ transactions to both and compares the results.
141
180
 
142
181
  ## Quick start
143
182
 
183
+ No install: try TypeSOL in the browser at [typesol.com/play](https://typesol.com/play/).
184
+
144
185
  You need Node.js 22.12 or later and the Agave CLI with its platform-tools, which hold the clang TypeSOL compiles with.
145
186
  Rust is not needed. TypeSOL is tested with **Agave 3.1.10 and platform-tools v1.52** (clang 20.1.7); to install exactly
146
- those:
187
+ those on macOS or Linux x86_64 (Linux arm64: see
188
+ [Requirements](https://github.com/typesol-lang/typesol#requirements)):
147
189
 
148
190
  ```sh
149
191
  sh -c "$(curl -sSfL https://release.anza.xyz/v3.1.10/install)"
192
+ # The installer adds this line to ~/.profile for new shells, and this shell needs it now:
193
+ export PATH="$HOME/.local/share/solana/install/active_release/bin:$PATH"
194
+ # Once: this downloads the platform-tools, about 0.5 GB and up to 1.6 GB unpacked, and prints nothing for a minute or two:
150
195
  cargo-build-sbf --install-only --force-tools-install --tools-version v1.52
151
196
  ```
152
197
 
153
- Other versions work, but their binaries are not covered by the project's tests: `typesol build` warns once when the
154
- clang is another one (`--toolchain-strict` or `TYPESOL_TOOLCHAIN=strict` makes that an error), and every build records
155
- its clang, platform-tools and host in `<name>.build.json`.
156
-
157
198
  ```sh
158
- npx @typesol/cli init my-app --name counter # typesol.json, programs/counter.ts, tests/counter.test.ts, tsconfig
199
+ npx @typesol/cli init my-app --name counter
159
200
  cd my-app && npm install
160
- npm test # builds the program and runs it in LiteSVM, an in-process Solana runtime
161
- npx --no-install typesol build # target/counter/{counter.so, counter.json (IDL), counter.client.ts, counter.build.json}
201
+ npm test
202
+ npx --no-install typesol build
162
203
  ```
163
204
 
205
+ `init` writes `typesol.json`, `programs/counter.ts`, `tests/counter.test.ts` and a tsconfig. `npm test` builds the program
206
+ and runs it in LiteSVM, an in-process Solana runtime. `build` writes `target/counter/`: `counter.so`, `counter.json` (the
207
+ IDL), `counter.client.ts` and `counter.build.json`.
208
+
209
+ `init` also writes rules and an MCP server config for AI coding agents (AGENTS.md, CLAUDE.md, `.cursor/`, `.mcp.json`)
210
+ and lists them; `--no-agent-files` leaves them out. `npm install` reports advisories (moderate and high) and packages
211
+ with install scripts: they come from `@anchor-lang/core` and the Solana web3.js it depends on, which `typesol/testing`
212
+ uses to encode instructions and decode accounts, so the tests need it; none of it is in the program you deploy.
213
+
214
+ Other versions work, but their binaries are not covered by the project's tests: `typesol build` warns once when the
215
+ clang is another one (`--toolchain-strict` or `TYPESOL_TOOLCHAIN=strict` makes that an error), and every build records
216
+ its clang, platform-tools and host in `<name>.build.json`.
217
+
164
218
  `npx --no-install typesol doctor` checks all of this (Node.js, platform-tools and whether they are the tested ones, Solana CLI, keypair, RPC) and prints the command
165
219
  that fixes anything missing. Inside a project, `npx --no-install typesol …` (or `npm run build`, `npm run deploy`) runs the
166
220
  project's own copy; outside one, use `npx @typesol/cli …`. Plain `npx typesol` is not TypeSOL: `typesol` is not the npm
167
- package's name, so where the project's copy is not installed npx would fetch whatever package has that name.
221
+ package's name, so where the project's copy is not installed npx would fetch whatever package has that name. Outside a
222
+ project (or before `npm install`), `npx --no-install typesol …` therefore fails with npm's `E404 … typesol - Not
223
+ found`, which does not mention `@typesol/cli`: run `npx @typesol/cli …` there, or `npm install` in the project first.
168
224
 
169
225
  To deploy, on devnet:
170
226
 
171
227
  ```sh
172
- solana-keygen new # once, if you have no keypair (~/.config/solana/id.json)
173
- solana airdrop 2 --url devnet # test SOL for the rent (rate-limited: https://faucet.solana.com also works)
228
+ # Once, if you have no keypair at ~/.config/solana/id.json:
229
+ solana-keygen new
230
+ # Test SOL for the rent. The airdrop is rate-limited, and https://faucet.solana.com also works:
231
+ solana airdrop 2 --url devnet
174
232
  npx --no-install typesol deploy --url devnet
175
233
  ```
176
234
 
177
235
  or on a local validator: `solana-test-validator` in another terminal, `solana airdrop 5 --url localhost`, then
178
- `npx --no-install typesol deploy --url localhost`. `deploy` checks the RPC and the payer's balance before sending anything.
236
+ `npx --no-install typesol deploy --url localhost`. `deploy` checks the payer's keypair, the RPC and the payer's balance
237
+ before sending anything, and stops with the command to run when one is missing.
179
238
 
180
239
  `--template vault` or `--template escrow` starts from a SOL vault or an SPL token escrow instead of the counter, each
181
240
  with a passing LiteSVM test.
@@ -190,7 +249,8 @@ program's address.
190
249
  **Your first change.** Open `programs/counter.ts`, add an instruction (say `decrement`, with
191
250
  `require(counter.count >= 1n, …)` before `counter.count -= 1n`), call it from `tests/counter.test.ts` and run `npm test`.
192
251
  If the build refuses something, the error points at the line and, for the usual first mistakes (`1` instead of `1n`,
193
- `console.log`, a missing import, `async`), adds a `hint:` with what to write instead; your editor shows the same.
252
+ `console.log`, `Date.now()`, a missing import, `async`), adds a `hint:` with what to write instead; your editor shows
253
+ the same.
194
254
 
195
255
  **Where next**
196
256
  - The language, every type and built-in: [docs/language.md](docs/language.md).
@@ -198,7 +258,7 @@ If the build refuses something, the error points at the line and, for the usual
198
258
  - Coming from Anchor: [docs/migrate-from-anchor.md](docs/migrate-from-anchor.md) maps every construct, and
199
259
  `typesol port` starts from your program's IDL; [docs/case-study-escrow.md](docs/case-study-escrow.md) follows one
200
260
  program through the port.
201
- - Real programs checked against their mainnet binaries: [Showcase](#showcase-ports-checked-against-mainnet), with a
261
+ - Real programs checked against their mainnet binaries: [Showcase](https://github.com/typesol-lang/typesol#showcase-ports-checked-against-mainnet), with a
202
262
  case study each (Marginfi v2 in full: all 124 instructions, the same on 2,081 transactions; Phoenix v1, a native
203
263
  order book, the same on 3,575 transactions down to its event bytes; Raydium AMM v4, a native program, down to its log
204
264
  lines).
@@ -238,7 +298,8 @@ Runtime failures point back to your source: `Error 6000 Unauthorized (counter.ts
238
298
  | **Native programs** | a `@fallback` entry over the raw instruction data and accounts by position, Borsh accounts (`loadBorsh`), views of account bytes in place (also at offsets known only at run time) and lib-sokoban's red-black tree over them, byte builders (`pushLE`, `pushBorsh`, …), return data, `closeRaw`, and Rust's panics and overflow messages at the original's source locations |
239
299
  | **Interfaces** | custom discriminators (`@discriminator`), so a TypeSOL program can be a Token-2022 transfer hook, with extra accounts (ExtraAccountMetaList) |
240
300
 
241
- The full reference, with every type, check and built-in, is in [docs/language.md](docs/language.md).
301
+ The [language guide](docs/language.md) explains each construct with a compiled example, and lists every type, check
302
+ and built-in.
242
303
 
243
304
  ## Tooling
244
305
 
@@ -256,7 +317,7 @@ The full reference, with every type, check and built-in, is in [docs/language.md
256
317
  | `typesol client <idl.json>` | generate a typed TypeScript client from an Anchor IDL (`typesol build` writes one per program) |
257
318
  | `typesol port` | a TypeSOL skeleton of an Anchor program from its IDL, keeping discriminators and error codes |
258
319
  | `typesol/ts-plugin` | the compiler's errors in the editor as you type, in every file of a program ([docs/cli.md](docs/cli.md#editor)) |
259
- | `typesol verify` | rebuild from source and compare with the program and IDL on chain (or a dumped `.so`) |
320
+ | `typesol verify` | rebuild from source and compare with the program and IDL on chain (or a dumped `.so`); `--docker` rebuilds in the pinned container |
260
321
  | `typesol profile` | compute units per TypeScript line, from a `--profile` build's logs |
261
322
  | `typesol emit-c` | print the generated C |
262
323
 
@@ -337,7 +398,10 @@ upgrade, is in [typesol-lang/benchmarks](https://github.com/typesol-lang/benchma
337
398
  - Stateful vault, escrow and ledger runs are checked against a TypeScript model.
338
399
  - Differential runs send the same transactions to TypeSOL and to the Anchor twins and compare outcomes, account
339
400
  contents and balances.
340
- - **Localnet smoke test.** A smoke script deploys every example to a local validator and drives it end to end.
401
+ - **Ports against mainnet binaries.** The eight ports above run beside the deployed originals, transaction by
402
+ transaction, and random walks over them compare every step.
403
+ - **Localnet smoke test.** A script deploys every example to a local validator and drives it end to end; it is run
404
+ by hand, not in CI.
341
405
 
342
406
  Details are in [docs/testing.md](docs/testing.md).
343
407
 
@@ -381,6 +445,12 @@ Case studies: [Marginfi v2](docs/case-study-marginfi.md), [Phoenix v1](docs/case
381
445
  [versioning policy](https://github.com/typesol-lang/.github/blob/main/VERSIONING.md); [CHANGELOG.md](CHANGELOG.md) lists every
382
446
  change.
383
447
  - The compiler, runtime and tooling have been through internal security reviews and are covered by the tests above.
448
+ The two latest, of 0.43.0 and 0.44.0 in November 2026, found defects that made a program that compiled behave
449
+ differently from its source; each is fixed with a test, and [docs/audit.md](docs/audit.md) lists them, what the
450
+ reviews covered and what they did not. Programs built before 0.44.1 should be rebuilt.
451
+ - From 0.44.0 on, a release that only fixes defects is a patch with no new language surface and a binary diff in its
452
+ notes ([SECURITY.md](SECURITY.md#fix-releases)), and the npm tarball is the one packed from the tag and recorded
453
+ in [releases/](releases).
384
454
  - They have **not been audited by an independent firm**. Do not put significant value behind programs built with
385
455
  TypeSOL until such an audit is published.
386
456
  - Audit your own programs as you would any Solana program. What a compiled program can rely on, and what is left to
@@ -393,9 +463,27 @@ stable already and what is still experimental: [docs/stability.md](docs/stabilit
393
463
 
394
464
  ## Requirements
395
465
 
396
- - Node.js 22.12 or later.
397
- - The Agave CLI with platform-tools.
398
- - macOS or Linux. On Windows, use WSL2.
466
+ - Node.js 22.12 or later (the CLI stops with the version it needs on an older one).
467
+ - The Agave CLI with platform-tools (see [Quick start](#quick-start)).
468
+ - macOS or Linux x86_64 for everything; Linux arm64 to build and test, set up as below (deploying from it needs the
469
+ Solana CLI built from source); on Windows, WSL2.
470
+ - Linux arm64: Anza publishes no Agave CLI for it (the installer fails with a 404), but platform-tools has a
471
+ `linux-aarch64` package. With it and the SDK's C files from the x86_64 release (headers and linker script, as the
472
+ `--docker` image takes them), `typesol build` and LiteSVM tests work (needs `curl` and `bzip2`):
473
+
474
+ ```sh
475
+ mkdir -p "$HOME/.local/share/typesol-sdk/sbf/dependencies/platform-tools"
476
+ # About 215 MB, for the C headers and linker script of the SDK only:
477
+ curl -sSfL https://github.com/anza-xyz/agave/releases/download/v3.1.10/solana-release-x86_64-unknown-linux-gnu.tar.bz2 | tar -xj -C "$HOME/.local/share/typesol-sdk" --strip-components=3 solana-release/bin/platform-tools-sdk/sbf/c
478
+ # About 515 MB, 1.6 GB unpacked, and quiet for a minute or two:
479
+ curl -sSfL https://github.com/anza-xyz/platform-tools/releases/download/v1.52/platform-tools-linux-aarch64.tar.bz2 | tar -xj -C "$HOME/.local/share/typesol-sdk/sbf/dependencies/platform-tools"
480
+ touch "$HOME/.local/share/typesol-sdk/sbf/dependencies/platform-tools-v1.52.md"
481
+ # Add this line to ~/.profile too, for new shells:
482
+ export TYPESOL_SBF_SDK="$HOME/.local/share/typesol-sdk/sbf"
483
+ ```
484
+
485
+ `typesol doctor` prints these commands there. Deploying needs the Solana CLI: deploy from macOS or Linux x86_64,
486
+ or build the Agave CLI from source. `build --docker` (linux/amd64, emulated) works on any host with Docker.
399
487
 
400
488
  TypeSOL finds the SDK under `~/.local/share/solana/install/active_release` or next to `cargo-build-sbf` on `PATH`. Set
401
489
  `TYPESOL_SBF_SDK` to override the location. See [docs/troubleshooting.md](docs/troubleshooting.md).
@@ -408,5 +496,6 @@ built-in, a constraint or an error code. Then read [CONTRIBUTING.md](CONTRIBUTIN
408
496
 
409
497
  ## License
410
498
 
411
- [MIT](LICENSE). The tests also use third-party program binaries and data, none of it in the npm package: see
412
- [NOTICE](NOTICE) and [test/programs/SOURCES.md](test/programs/SOURCES.md).
499
+ [MIT](LICENSE). The runtime and `typesol/testing` include code ported from MIT and Apache-2.0 projects, and the tests
500
+ use third-party program binaries and data that are not in the npm package: see [NOTICE](NOTICE) and
501
+ [test/programs/SOURCES.md](test/programs/SOURCES.md).
package/SECURITY.md CHANGED
@@ -5,11 +5,13 @@ TypeSOL generates programs that hold funds. Treat it accordingly.
5
5
  ## Status
6
6
 
7
7
  - The compiler, runtime and tooling have been through internal security reviews by the maintainers. The latest, of
8
- 0.43.0 on 2026-11-11, found defects in the compiler (one of them can break an authorization check in a helper) and
9
- in the tooling; they are fixed in 0.44.0. **Rebuild and redeploy programs built with 0.43.0 or
10
- earlier once it is out**; [docs/security-model.md](docs/security-model.md#review-of-0430-2026-11-11) says how to tell
11
- whether a program was exposed, and [docs/audit.md](docs/audit.md#earlier-reviews) what that review did and did not
12
- cover. Every release is covered by execution tests, differential tests against Anchor, and randomized tests.
8
+ 0.44.0 on 2026-11-11, found defects in the compiler (wrong token-wrapper instruction data, and a reference that could
9
+ outlive a resize and reach another record) and a latent one in the runtime; they are fixed in 0.44.1. The one
10
+ before it, of 0.43.0, found defects fixed in 0.44.0 (one of them could break an authorization check in a helper).
11
+ **Rebuild and redeploy programs built before 0.44.1**;
12
+ [docs/security-model.md](docs/security-model.md#status) gives the status, its sections on each review say how to
13
+ tell whether a program was exposed, and [docs/audit.md](docs/audit.md#earlier-reviews) what each review did and did
14
+ not cover. Every release is covered by execution tests, differential tests against Anchor, and randomized tests.
13
15
  **TypeSOL has not been audited by an independent firm.** Do not put significant value behind programs built with it
14
16
  until an external audit of the compiler and runtime is published, and audit your own programs as you would any
15
17
  Solana program.
@@ -20,6 +22,8 @@ TypeSOL generates programs that hold funds. Treat it accordingly.
20
22
  sha256), packed from a clean export of the release tag; `node scripts/release-check.ts <version> --verify --registry`
21
23
  compares it with the registry.
22
24
  - Only the latest 0.x release receives security fixes, as fix releases (below).
25
+ - What a compiled program can rely on is specified in [docs/security-model.md](docs/security-model.md); the package
26
+ for an external audit is [docs/audit.md](docs/audit.md).
23
27
 
24
28
  ## Fix releases
25
29
 
@@ -30,14 +34,12 @@ release (0.44.0 → 0.44.1), so a team can take the fix without taking new featu
30
34
  no account layout, IDL or error code beyond what the fix itself needs;
31
35
  - a program it refuses or builds to another binary is one the defect touches, and the CHANGELOG says which;
32
36
  - its release notes carry the binary diff against the previous release (the previous release's sources built by both
33
- packages, `binary-diff.txt`; see [docs/testing.md](docs/testing.md#reproducing-a-release)), so a team can see whether
37
+ packages, `typesol-<version>-binary-diff.txt`; see [docs/testing.md](docs/testing.md#reproducing-a-release)), so a team can see whether
34
38
  their program's binary changes.
35
39
 
36
40
  Fixes go to the latest minor only; older minors are not maintained. A fix that needs a language or layout change
37
41
  comes in the next minor. 0.44.0 itself is a minor release: besides the fixes from the 0.43.0 review it has behaviour
38
42
  changes (new compile errors, `deploy` refusing to run without a cluster).
39
- - What a compiled program can rely on is specified in [docs/security-model.md](docs/security-model.md); the package
40
- for an external audit is [docs/audit.md](docs/audit.md).
41
43
 
42
44
  ## Reporting a vulnerability
43
45
 
package/dist/bin.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ export {};
package/dist/bin.js ADDED
@@ -0,0 +1,9 @@
1
+ #!/usr/bin/env node
2
+ // The `typesol` command: the Node.js version first, then the CLI (src/cli.ts), loaded only once the check passed.
3
+ import { nodeVersionProblem } from "./node-version.js";
4
+ const problem = nodeVersionProblem(process.versions.node);
5
+ if (problem) {
6
+ console.error(problem);
7
+ process.exit(1);
8
+ }
9
+ await import("./cli.js");