Commit 7a495ed
Add coin-gated tracks example app (#14012)
## Summary
- New example web app at `packages/web/examples/coin-gated/`
demonstrating token-gated track browsing and streaming using artist
coins
- Supports two auth paths: Audius OAuth (PKCE) and direct Solana wallet
signing (Phantom)
- Uses `sdk.coins.getCoinByTicker()` to look up coins,
`sdk.users.getTracksByUser()` with `gateCondition: ['token']` to list
gated tracks, and `sdk.tracks.streamTrack()` for authenticated streaming
- Companion API changes in AudiusProject/api#738
## Test plan
- [x] `cd packages/web/examples/coin-gated && npm install && npm run
dev`
- [x] Enter a coin ticker (e.g. `YAK`) and verify coin info + gated
tracks load
- [x] Sign in with Audius OAuth and verify access status updates on
tracks
- [x] Connect Phantom wallet and verify wallet-based streaming works
- [x] Verify locked tracks show disabled play button when not
authenticated
🤖 Generated with [Claude Code](https://claude.com/claude-code)
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>1 parent fb7fa68 commit 7a495ed
11 files changed
Lines changed: 5527 additions & 0 deletions
File tree
- packages/web/examples/coin-gated
- src
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
0 commit comments