docs: comprehensive README with integration examples#218
Conversation
- Add badges (npm, license) - Add feature highlights - Add quick start guides (script tag + npm) - Document all display modes with examples - Document form props, wallet passthrough, callbacks - Add links to playground and docs - Add local development instructions
|
Someone is attempting to deploy a commit to the wowcats Team on Vercel. A member of the Team first needs to authorize it. |
thejesh23
left a comment
There was a problem hiding this comment.
Big improvement over the 9-line original. Two concrete issues worth fixing before merge:
-
Hardcoded
plugin-1.0.13.jsin the script-tag example will bit-rot at the next version bump (and the README is exactly where new integrators will copy from). Worth either pointing at a stable/latestURL, or adding a clear "replace1.0.13with the current published version" note with a link to npm/releases. PR #221 in this same repo is wrestling with the same bundle-name problem from the dev side. -
initialAmount: '1000000' // in lamportsis incorrect when the example pairs it with USDC as the input mint. USDC is 6 decimals; lamports is SOL's unit (9 decimals, 1 SOL = 10⁹ lamports). The right phrasing is "in the input mint's smallest/atomic unit" — otherwise integrators will under/overshoot amounts by 1000×.
Also worth sanity-checking that every prop name in the Form Props block (fixedMint, fixedAmount, swapMode values, etc.) matches the actual FormProps type — README examples that don't typecheck are a common drift point.
Summary
Rewrote the README to be more helpful for integrators.
Added
Why
The previous README was minimal (just 9 lines). New integrators had to dig through code or external docs to understand how to use the plugin. This README serves as a complete getting-started guide.
Screenshot
The new README provides copy-paste ready code for all common use cases.