solcompat 0.1.1

Evidence-based compatibility checks for Solana programs and clients
# Understanding SC201: RPC transaction-version acceptance

SC201 helps prevent a transaction read from failing when an RPC response contains a newer transaction format than the client requested.

## The problem it catches

`getBlock` and `getTransaction` accept a `maxSupportedTransactionVersion` option. If an application reads full transactions and the response contains Transaction V1, a maximum of `0` is too low. Omitting the option accepts legacy transactions only.

For a V1-capable read, the request should include:

```ts
const block = await connection.getBlock(slot, {
  maxSupportedTransactionVersion: 1,
  transactionDetails: "full",
});
```

SolCompat reports the source file and line when it can find a direct call with literal options. It preserves the application's other RPC options in its suggested change.

## What the rule needs to know

SC201 considers:

- whether the method is `getBlock` or `getTransaction`;
- whether a block request returns full transaction bodies;
- which transaction versions the application needs to read;
- the effective `maxSupportedTransactionVersion`; and
- the response encoding, when it affects the reviewed case.

For direct calls bound to supported SDK imports and local constructors, SolCompat reads literal options from JavaScript or TypeScript source. Omitting the property is a known value: legacy-only acceptance. A variable, spread object, duplicate property, wrapper, or computed option is unknown because its runtime value cannot be established by the static scan.

A dependency on a Solana SDK does not by itself mean that the package reads transactions. SolCompat waits until it sees a relevant call or an explicit RPC contract. This avoids producing `NEEDS INPUT` for web applications and helper packages that never call these methods.

## Block response modes

A `getBlock` call with `transactionDetails: "none"` or `"signatures"` does not return transaction bodies, so SC201 does not apply. The `"accounts"` mode remains unresolved in the current rule revision. Full transaction responses are checked.

## SC201 and SC200 work together

SC201 verifies that the RPC request permits the needed transaction version. SC200 verifies that the resolved SDK or decoder can decode that version. Setting the maximum to `1` does not prove that an older decoder understands V1, so a complete V1 review needs both checks to pass.

## Describing indirect RPC calls

If the application uses a wrapper or computes its options at runtime, add the real behavior to `solcompat.toml`. Configuration is also useful for declaring which transaction versions the application promises to support. The normal `--detailed` finding identifies the component and configuration location that needs this information.

Configured reads replace source discovery for that client; declare all relevant reads rather than assuming the scanner will add the rest. Keep the configured contract synchronized with the code. It is an assertion supplied by the project, not behavior that SolCompat can independently verify.

## Limits of the result

A pass means the reviewed request options accept the required legacy, V0, or V1 transaction formats. It does not query a live RPC provider, prove that the decoder works, or predict an unreviewed future transaction format.

The rule is based on Solana's [versioned transaction guide](https://solana.com/docs/core/transactions/versioned-transactions), [getBlock reference](https://solana.com/docs/rpc/http/getblock), and [getTransaction reference](https://solana.com/docs/rpc/http/gettransaction). The current implementation is covered by small fixtures for V1 failure, V1 success, signature-only block reads, and unresolved indirect behavior.