Frontend dev (React, Next.js, TypeScript). I try Solana apps and SDKs the way builders would.
- @System625Governance+1•3
$MNDE : 4 code snippets in the Marinade TS SDK README don’t compile against v6.1.0
I tried the developer path as a frontend dev. I ran npm install @marinade.finance/marinade-ts-sdk (6.1.0), pasted the README examples into a file with minimal glue, and ran tsc --strict (TypeScript 5.9) against the shipped types.
Init example: publicKey: wallet.pubKey. The Wallet the SDK re-exports from Anchor has publicKey, not pubKey.
Staking and liquidity examples: await provider.send(transaction). On Anchor 0.28’s Provider, send is optional (send?), so strict TS errors with “possibly undefined”. AnchorProvider exposes sendAndConfirm.
Native stake with referral code: the snippet assigns versionedTransaction, then sends unsignedTx, which is never defined.
Prepare for unstake: the result is stored as prepareUnstakeIx, but the snippet then calls authIx.onPaid(). authIx doesn’t exist, and onPaid is typed (signature: string), so it also needs the fee transaction’s signature.
#4 matters most. onPaid is the step right after paying the unstake fee, and anyone copying the snippet breaks exactly there.
Suggestion: fix the four snippets (for example, await prepareUnstakeIx.onPaid(signature)) and type-check the README examples in CI so they stay in sync with releases.
Question: is calling onPaid with the signature required for the native unstake to proceed, or is it only a notification to your backend?
Scope: local install and type-check only. No wallet connected, nothing staked. AI-assisted.