Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
723 commits
Select commit Hold shift + click to select a range
0b17c9b
chore: update package versions for auth, evm, and sdk
arentant Apr 3, 2026
d004ab9
Merge remote-tracking branch 'origin/dev' into dev-recover-swap-updates
yasha-meursault Apr 3, 2026
c733bd1
Port swap recovery to @train-protocol/react and resolve merge conflic…
yasha-meursault Apr 3, 2026
2c46ddd
chore: update package versions and enhance TrainApiClient
arentant Apr 3, 2026
affb258
chore: add TypeScript configuration for project
arentant Apr 6, 2026
9c0e2a5
refactor: standardize token contract references and improve error han…
arentant Apr 6, 2026
7fb97be
feat: migrate components to shadcn
yasha-meursault Apr 7, 2026
df0c073
Merge remote-tracking branch 'origin/dev' into dev-recover-swap-updates
yasha-meursault Apr 7, 2026
fcacb9b
refactor: streamline swap configuration handling and improve type con…
arentant Apr 7, 2026
221ec64
refactor: enhance Starknet wallet integration and improve account han…
arentant Apr 7, 2026
e095a60
refactor: simplify passkey support logic and improve platform hint ha…
arentant Apr 7, 2026
4f92f03
refactor: update API order handling and streamline swap logic
arentant Apr 7, 2026
e0dcc52
fix app build and add tron wallet connection
arentant Apr 7, 2026
ef10cde
chore: update chainlistRpcs.json
arentant Apr 7, 2026
083ebf2
minor fixes
yasha-meursault Apr 7, 2026
5535dde
Merge remote-tracking branch 'origin/dev' into dev-recover-swap-updates
yasha-meursault Apr 7, 2026
c63ccd2
Merge pull request #131 from TrainProtocol/update-chainlist-rpcs
arentant Apr 7, 2026
ae4a445
chore: update walletsData.json
arentant Apr 7, 2026
08b2c92
Merge pull request #130 from TrainProtocol/update-wallets-data
arentant Apr 7, 2026
33ecf8b
Merge pull request #129 from TrainProtocol/dev-azguard-fixes
arentant Apr 7, 2026
2b9cb0a
implement tron htlc client package
arentant Apr 7, 2026
52d9b10
fix address issue when switching chains
yasha-meursault Apr 7, 2026
cf5ff26
fix build
arentant Apr 7, 2026
d009047
Merge branch 'dev' into dev-recover-swap-updates
arentant Apr 7, 2026
3bd4951
chore: update TypeScript configuration and improve Zustand store imports
arentant Apr 7, 2026
7722b3a
fix: enhance getUserLockDetails to handle decimals and null results
arentant Apr 7, 2026
1f0c7ae
Merge remote-tracking branch 'origin/dev' into dev-shadcn-components
yasha-meursault Apr 8, 2026
07a37cb
redesign components to use the shadcns styling, minor redesigns and b…
yasha-meursault Apr 8, 2026
f5d382f
fix: replace hardcoded colors with theme variables and add missing ad…
yasha-meursault Apr 8, 2026
18ce383
Merge remote-tracking branch 'origin/dev' into dev-sidebar
yasha-meursault Apr 8, 2026
252c6ef
small fixes
yasha-meursault Apr 8, 2026
93d9412
minor fixes
yasha-meursault Apr 8, 2026
46826fd
fix build
yasha-meursault Apr 8, 2026
1990bb6
fix: remove rounded-xl class from SelectTrigger and SelectContent in…
yasha-meursault Apr 8, 2026
f2495d2
fixes
yasha-meursault Apr 8, 2026
9b35cf9
global fixes
arentant Apr 8, 2026
281ac6a
Merge branch 'dev' into dev-recover-swap-updates
arentant Apr 8, 2026
efb80bb
temporary comment light client
arentant Apr 8, 2026
649f40f
refactor: enhance chain integration documentation and update HTLCClie…
arentant Apr 8, 2026
bbc0df5
Merge pull request #108 from TrainProtocol/dev-recover-swap-updates
arentant Apr 8, 2026
e58823d
small redesign in popovers
yasha-meursault Apr 8, 2026
1ef5b63
refactor: remove ImtblPassport integration and related components
arentant Apr 8, 2026
ec31641
tab fixes
yasha-meursault Apr 8, 2026
3ab5271
refactor: remove Fuel wallet integration and related components
arentant Apr 8, 2026
9647c39
fix event source
arentant Apr 9, 2026
b0d3dac
chore: update walletsData.json
arentant Apr 9, 2026
4c7386c
Merge pull request #136 from TrainProtocol/update-wallets-data
arentant Apr 9, 2026
e282578
package updates
arentant Apr 9, 2026
c15bd40
fix: surface wallet rejection error to user during pre-lock swap phase
yasha-meursault Apr 9, 2026
425a856
refactor: update HTLC client structure and wallet bridge implementations
arentant Apr 9, 2026
c835f8f
Merge pull request #137 from TrainProtocol/dev-wallet-error-handling
arentant Apr 10, 2026
64a6cca
Merge pull request #132 from TrainProtocol/dev-shadcn-components
arentant Apr 10, 2026
1bda4b9
feat: enhance blockchain SDKs and add testing for Aztec and EVM
arentant Apr 10, 2026
7dbb7ff
Add readme
arentant Apr 13, 2026
70588ba
Merge branch 'dev' into dev-sidebar
arentant Apr 13, 2026
a409aaf
fix build
arentant Apr 13, 2026
5fb5af2
feat: add reverse quote support and refactor amount input
yasha-meursault Apr 14, 2026
869614c
fixes
yasha-meursault Apr 15, 2026
5329c8b
fix comment
yasha-meursault Apr 15, 2026
efd31e5
fix the bug with pre lock stale values.recieveAmount
yasha-meursault Apr 15, 2026
269a287
populate the destination amount field and trigger a reverse quote on …
yasha-meursault Apr 16, 2026
d301b93
fixes
yasha-meursault Apr 17, 2026
5920e61
fix input design
yasha-meursault Apr 17, 2026
9711d02
fix: streamline quote handling in FormButton component
arentant Apr 18, 2026
ee928ce
chore: update chainlistRpcs.json
arentant Apr 18, 2026
648b805
sidebar initial implementation
yasha-meursault Apr 18, 2026
271f506
Merge pull request #142 from TrainProtocol/update-chainlist-rpcs
arentant Apr 20, 2026
d598fed
chore: update walletsData.json
arentant Apr 20, 2026
0a066ef
Merge pull request #141 from TrainProtocol/update-wallets-data
arentant Apr 20, 2026
e13d903
Merge branch 'dev' into dev-reverse-quote
arentant Apr 20, 2026
eb1f298
refactor: derive quote direction from form values, drop store and SDK…
yasha-meursault Apr 21, 2026
3e6d139
App Router migration follow-ups and cleanup
yasha-meursault Apr 22, 2026
8cd2f58
App Router: fix Tailwind content globs + migrate to Metadata API
yasha-meursault Apr 22, 2026
f0f1db4
small fixes
yasha-meursault Apr 22, 2026
14a7da3
fix: update rate calculation in Rate component and add rate to QuoteD…
arentant Apr 22, 2026
941d2a5
feat: refactor AddressIcon component and implement new identicon gene…
arentant Apr 22, 2026
3a4f22a
Update evm and solana walletconnect connection
arentant Apr 23, 2026
bb690ad
redesign sidebars login/wallets modal changing them to dialogue
yasha-meursault Apr 23, 2026
7b8ce44
Merge remote-tracking branch 'origin/dev' into dev-sidebar
yasha-meursault Apr 23, 2026
68c9cfd
Merge branch 'dev' into dev-sidebar
arentant Apr 23, 2026
f6e5e93
fix build
arentant Apr 23, 2026
8857c29
Replace settings-scoped overlay with a global AppDialogue; add named …
yasha-meursault Apr 23, 2026
7d89b60
small design fix
yasha-meursault Apr 23, 2026
a360b92
Merge branch 'dev' into dev-reverse-quote
arentant Apr 27, 2026
249b5c4
small changes
yasha-meursault Apr 27, 2026
028e43e
refactor: replace hardcoded SOLANA_NS with dynamic id in useSVM
arentant Apr 27, 2026
ae83a6d
fix: format gas fee USD to 2 decimals and populate destContract on sw…
yasha-meursault Apr 27, 2026
cb9303c
Merge remote-tracking branch 'origin/dev' into dev-sidebar
yasha-meursault Apr 27, 2026
63b6dca
Merge branch 'dev' into dev-reverse-quote
arentant Apr 27, 2026
5b8bb69
feat: enhance quote handling across components and improve error mess…
arentant Apr 27, 2026
840b88f
delete wallets json
arentant Apr 27, 2026
bb1c08e
Merge pull request #140 from TrainProtocol/dev-reverse-quote
arentant Apr 27, 2026
4a224c2
fix critical issues in the review
yasha-meursault Apr 27, 2026
1666e33
chore: update chainlistRpcs.json
arentant Apr 27, 2026
a4b4a3e
Merge remote-tracking branch 'origin/dev' into dev-sidebar
yasha-meursault Apr 27, 2026
e593353
Merge pull request #148 from TrainProtocol/update-chainlist-rpcs
arentant Apr 27, 2026
65aa279
fix: update button text to show loading state during quote retrieval
yasha-meursault Apr 27, 2026
184a665
fix: update getExplorerUrl to replace {address} placeholder with enco…
arentant Apr 27, 2026
841ed3d
sidebar and sidebar components small redesign
yasha-meursault Apr 27, 2026
c3b8652
small fixes
yasha-meursault Apr 28, 2026
9b00216
fix: restore identity mismatch check for swaps opened from history
yasha-meursault Apr 28, 2026
58804c5
refactor: restructure authentication dialog handling and remove unuse…
arentant Apr 28, 2026
8b55b26
move wallet button to top navbar, sidebar footer shows help
yasha-meursault Apr 28, 2026
31ccb9c
Merge branch 'dev-sidebar' into dev-sidebar-fixes
yasha-meursault Apr 28, 2026
0bdaf68
Merge pull request #150 from TrainProtocol/dev-sidebar-fixes
yasha-meursault Apr 28, 2026
d1c8a98
small fixes
yasha-meursault Apr 28, 2026
419b3cb
unify buttons styles and fix wallets button on mobiles
yasha-meursault Apr 28, 2026
67010f0
small desing fix in buttons
yasha-meursault Apr 28, 2026
fbb9a5b
Merge pull request #118 from TrainProtocol/dev-sidebar
arentant Apr 28, 2026
51b1837
refactor: update imports and variable naming in aztecBalanceProvider …
arentant Apr 28, 2026
7b77abe
refactor: simplify LoginWallet and LoginIdentityIcon interfaces, remo…
arentant Apr 28, 2026
df582ff
mini style fixes
arentant Apr 29, 2026
fc51e5b
adjsut sidebars colors in the light theme
yasha-meursault Apr 29, 2026
90a5c91
fix sidebar buttons hover colors in the dark mode
yasha-meursault Apr 29, 2026
7f0f4fc
chore: update chainlistRpcs.json
yasha-meursault Apr 29, 2026
81c6283
Merge pull request #151 from TrainProtocol/update-chainlist-rpcs
arentant Apr 29, 2026
f1e7f62
docs: update CLAUDE.md with build commands and architecture details
arentant Apr 29, 2026
750d361
Merge branch 'dev' into dev-recover-swap-fixes
arentant Apr 29, 2026
a12500f
Merge pull request #149 from TrainProtocol/dev-recover-swap-fixes
arentant Apr 29, 2026
120daf6
Fix sidebar user ID tooltip overflow
yasha-meursault Apr 29, 2026
833cf0a
Make wallet icon stroke width customizable
yasha-meursault Apr 30, 2026
0836af3
small design fix
yasha-meursault Apr 30, 2026
63daa48
small design fixes in address picker and menu buttons in mobiles
yasha-meursault Apr 30, 2026
3d594db
small fixes
yasha-meursault Apr 30, 2026
98d89a3
Merge pull request #152 from TrainProtocol/sidebar-ui-polishes
arentant Apr 30, 2026
41745da
Update padding in PendingSwap button for improved touch target size o…
yasha-meursault Apr 30, 2026
7cde7fb
Add useOrderPolling as a fallback for order data during SSE instability
arentant Apr 30, 2026
79395f4
Processing component improvs, resolves BAB-210
arentant Apr 30, 2026
6dbd84a
Add progress indication and informational note in AtomicContent compo…
arentant Apr 30, 2026
31b7f3f
Enhance auto-reveal functionality and consensus tracking in swap process
arentant May 1, 2026
5b9ad71
Refactor swap components: integrate SwapModalRoot, remove TimerProvid…
arentant May 1, 2026
53e9986
Merge pull request #153 from TrainProtocol/BAB-210
arentant May 1, 2026
2e9fb1d
Fix condition in PendingSwap to ensure proper rendering based on path…
arentant May 1, 2026
c5d3ac7
Add Telegram logo to AppSidebar and update token logo property to log…
arentant May 4, 2026
cae203f
Remove console log for source and destination tokens in HistorySummar…
arentant May 4, 2026
d4664c5
Enhance RecoverSwap component with user guidance and tooltip for tran…
arentant May 4, 2026
dc74a3c
fix build
arentant May 4, 2026
9d0a0f3
update colors
arentant May 4, 2026
ffcc74e
Add random passkey name generation and update placeholder in CreateStep
arentant May 4, 2026
71d801e
Add TokenInfoIcon component for enhanced token details display in Rou…
arentant May 4, 2026
e0e9a3f
Add pathname effect to close swap modal on route change
arentant May 4, 2026
9e4fe9e
Refactor MenuIcon to use currentColor for better theming and update C…
arentant May 4, 2026
eba8a6a
Update RecoverSwap component text for clarity and consistency
arentant May 4, 2026
988b8a1
Remove GlobalFooter component from ThemeWrapper for cleaner layout
arentant May 4, 2026
c75f367
Fix overflow handling in ThemeWrapper for improved layout consistency
arentant May 4, 2026
64099bc
Fix Aztec network not appearing by aligning CAIP-2 RPC key
babgev May 4, 2026
2100ddc
Restore aztec-devnet entry alongside aztec testnet
babgev May 4, 2026
e9f89b8
Merge pull request #154 from TrainProtocol/babgev/aztec-rpc-caip2-key
babgev May 4, 2026
94c057a
Refactor FormButton and MenuList components to remove Plausible event…
arentant May 5, 2026
07b0d68
combine use existing login method page with the create new page, and …
yasha-meursault May 5, 2026
e2dd21b
Fix asset retrieval logic in UserLockAction and update allowed remote…
arentant May 5, 2026
5cc439e
update aztec
arentant May 5, 2026
becf1a3
Refactor AppSidebar for improved layout and accessibility; update Hel…
arentant May 5, 2026
89e7abd
Update AztecBalanceProvider to support AztecTestnet instead of AztecD…
arentant May 5, 2026
df27b05
Remove HelpPillButton from AppSidebar to streamline the layout
arentant May 5, 2026
cb5a210
Update padding in AppSidebar footer for improved layout
arentant May 5, 2026
853f52c
Update "Login" text to "Log in" for consistency across components
arentant May 5, 2026
c27e717
Merge pull request #157 from TrainProtocol/dev-sidebarUpdates
arentant May 5, 2026
eee36d9
faucet initial implementation
yasha-meursault May 5, 2026
725e934
Add loading components for settings, swap, and transactions
arentant May 6, 2026
9d477ee
Merge remote-tracking branch 'origin/dev' into dev-faucet
yasha-meursault May 6, 2026
d77b13d
mini fixes
arentant May 6, 2026
74eef6f
Merge remote-tracking branch 'origin/dev' into dev-faucet
yasha-meursault May 6, 2026
446da15
Refactor StarknetProvider to dynamically import connectors and update…
arentant May 6, 2026
9a2a51a
Refactor loading components and improve sidebar navigation with persi…
arentant May 6, 2026
de16a3a
chore: update chainlistRpcs.json
arentant May 6, 2026
97d5402
Merge pull request #155 from TrainProtocol/update-chainlist-rpcs
arentant May 6, 2026
0338558
Update widget min-height styles for improved responsiveness
arentant May 6, 2026
137b42a
refactor: simplify wallet connection handling in SourceWalletPicker a…
arentant May 6, 2026
aa373e9
make passkey faq a separate modal, fix content padding in the modals …
yasha-meursault May 6, 2026
74f96d0
feat: add manual verification for solver-lock consensus failures and …
arentant May 6, 2026
ff9e571
feat: enhance verification status handling and improve polling behavi…
arentant May 6, 2026
f64a798
use faucet api endpoints instead of the apps ones, give connector lis…
yasha-meursault May 6, 2026
baa9b05
fix: update overflow styles for improved scroll behavior in Transacti…
arentant May 7, 2026
acc63da
refactor: remove unnecessary useEffect hooks from MobilePageHeader an…
arentant May 7, 2026
7f99e65
small ui improvments in faucet
yasha-meursault May 7, 2026
9e50173
Merge remote-tracking branch 'origin/dev' into dev-faucet
yasha-meursault May 7, 2026
e1c93c2
small ui fixes
yasha-meursault May 7, 2026
3201193
feat: implement scroll handling and styling in TransactionsView compo…
arentant May 7, 2026
925382c
Merge pull request #158 from TrainProtocol/dev-faucet
arentant May 7, 2026
8b4daf4
feat: switch from polling to order stream for handling order events i…
arentant May 7, 2026
c611216
Merge branch 'dev' into dev-passkey-faq
arentant May 7, 2026
843010e
feat: update Passkey FAQ content and make title optional in AppShellD…
arentant May 7, 2026
2adad69
fix: comment out sandbox API version check in NavItems component
arentant May 7, 2026
cdfec7f
fix: comment out sandbox API version check in NavItems component
arentant May 7, 2026
83f0fb5
redesign and refactor faucet related components, add button to add fa…
yasha-meursault May 8, 2026
f163fa2
update next
arentant May 8, 2026
68ee536
make sidebar collapsible with icons
yasha-meursault May 8, 2026
bd8f981
ui fixes
yasha-meursault May 8, 2026
b960f66
fix: update scrollbar colors in styled-scroll utility
arentant May 9, 2026
916ea1a
ui fixes
yasha-meursault May 9, 2026
5060146
fix hover on logo
yasha-meursault May 9, 2026
3b2518b
ui fixes for sidebar buttons
yasha-meursault May 9, 2026
02f4b2a
add Faucet step and update related components for improved UI and fun…
arentant May 10, 2026
35851d4
refactor FaucetWalletPicker to improve popover behavior and add ancho…
arentant May 10, 2026
274b6d6
refactor addToWallet method to return a boolean indicating success an…
arentant May 11, 2026
557f99f
Merge pull request #159 from TrainProtocol/dev-faucet-fixes
arentant May 11, 2026
6014d52
remove fillHeight prop from FaucetContent component for improved layo…
arentant May 11, 2026
a7e3417
Merge branch 'dev' into dev-passkey-faq
arentant May 11, 2026
f42182b
fix faucet token adding in the monad network
yasha-meursault May 11, 2026
1ddcab3
NestedWalletAddress component UI improvments
yasha-meursault May 11, 2026
42bf3c4
fix: adjust address slicing logic for improved formatting
arentant May 11, 2026
4ffa1b5
fix: ensure AddTokenToWalletButton only displays for connected wallet…
yasha-meursault May 11, 2026
9acad1e
redesign testnet badge for the desktop
yasha-meursault May 11, 2026
8bb23d9
fix: update Sidebar component to use min-h-screen for improved layout
arentant May 11, 2026
4af532c
Merge pull request #160 from TrainProtocol/dev-multiple-wallet-accoun…
arentant May 11, 2026
497bfbf
Merge pull request #161 from TrainProtocol/dev-testnet-badge
arentant May 11, 2026
d728b81
refactor passkey login components to enhance clarity and user guidance
arentant May 11, 2026
6189842
remove minimumReleaseAgeExclude entries from pnpm-workspace.yaml
arentant May 12, 2026
14aea01
rename PasskeyFAQ component to LoginFAQ and implement FAQ content
arentant May 12, 2026
17f3be1
add PasskeyHero component for enhanced user interface and update Step…
arentant May 12, 2026
212ba45
fix balance fetching for monad
yasha-meursault May 13, 2026
01179cb
update FAQ content for clarity on passkey usage and security
arentant May 13, 2026
f8993bd
refactor: update component border radius from 3xl to 4xl for consistency
arentant May 14, 2026
42002ff
Merge branch 'dev' into dev-passkey-faq
arentant May 14, 2026
82d75f8
update FAQ content to clarify passkey usage and enhance user understa…
arentant May 14, 2026
34867e9
fix: update unsupported browser message for clarity and consistency
arentant May 15, 2026
bdd3272
update faq question
arentant May 18, 2026
6ac4358
refactor: remove unused FeeDetails components and update PasskeyHero …
arentant May 18, 2026
a7ff908
comment out faucet
arentant May 18, 2026
61f653c
Merge pull request #156 from TrainProtocol/dev-passkey-faq
arentant May 18, 2026
2315771
fix amount display across multiple devices
yasha-meursault May 18, 2026
90f02e0
adjust the fraction digit picking logic
yasha-meursault May 18, 2026
0bc5c71
Merge pull request #163 from TrainProtocol/dev-fix-amount-truncation
arentant May 18, 2026
8540ef1
summary: USD mode swap, truncated-amount tooltips, mobile popover res…
yasha-meursault May 18, 2026
a19f72f
remove error message display in login step title
arentant May 19, 2026
cd30fa8
enhance display consistency by adding leading class to NumberFlow com…
yasha-meursault May 19, 2026
a05d630
fix layout in the Summary.tsx
yasha-meursault May 19, 2026
ae698af
mini fixes
arentant May 19, 2026
ff6371b
small improvments
yasha-meursault May 19, 2026
d68f026
refactor: simplify TokenAmount component and improve amount display l…
yasha-meursault May 19, 2026
bf473fa
bump version to 0.2.0-dev.1 for auth, evm, and sdk packages
arentant May 19, 2026
2456ddf
Merge pull request #164 from TrainProtocol/summary-improvments
arentant May 19, 2026
223af19
Resolve correctly connectors that are not injected but we are showing…
arentant May 20, 2026
ca6bcbf
chore: update chainlistRpcs.json
arentant May 20, 2026
9d147ce
Merge pull request #165 from TrainProtocol/update-chainlist-rpcs
arentant May 20, 2026
aa3c228
refactor(blockchains): split transaction builders from executors
arentant May 20, 2026
3ade465
feat(sdk): add HTLCTransactionRequestMap + builder methods on IHTLCWa…
arentant May 20, 2026
fa6e006
Merge pull request #166 from TrainProtocol/feat/builder-executor-split
arentant May 20, 2026
e7536bb
chore: bump version to 0.2.0-dev.2 for both evm and sdk packages
arentant May 20, 2026
08b9d5c
feat: refactor EVM wallet integration and improve swap functionality
arentant May 20, 2026
5b9bda2
fix: improve validation in resolveUserLock function for timelock
arentant May 21, 2026
1b5e57f
fix: enhance timelock validation in resolveUserLock function
arentant May 21, 2026
08a8ea3
fix(swap): prefer RedeemCompleted over failureReason in progress UI
yasha-meursault May 21, 2026
c5b6785
Merge pull request #167 from TrainProtocol/dev-post-redeem-errors
arentant May 21, 2026
eeb689f
fix: streamline SDK registration in Providers component
arentant May 22, 2026
5709f7e
fix: enhance layout and styling in TimelineStep component
yasha-meursault May 22, 2026
c601b09
fix: improve error messages in mapPasskeyError function for clarity
yasha-meursault May 25, 2026
8fa121d
Merge pull request #169 from TrainProtocol/dev-auth-fail-text
arentant May 26, 2026
cf5cb44
fix: update MaintananceContent layout and messaging for testnet access
arentant May 26, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
18 changes: 18 additions & 0 deletions .claude/commands/packages.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
Explain the Train Protocol packages architecture to help agents understand the codebase.

Read and summarize the following README files to understand what each package does:
- packages/sdk/README.md — @train-protocol/sdk (core HTLC logic, API client, verification, key derivation)
- packages/react/README.md — @train-protocol/react (React hooks, providers, swap state management)
- packages/blockchains/evm/README.md — @train-protocol/evm (EVM HTLC client)

Also check for READMEs in other blockchain packages:
- packages/blockchains/solana/
- packages/blockchains/starknet/
- packages/blockchains/aztec/

After reading, provide a concise summary of:
1. What each package does and its key exports
2. How the packages relate to each other (dependency graph)
3. The plugin registration pattern (how chain-specific packages plug into the SDK)
4. The provider hierarchy in @train-protocol/react
5. The HTLC swap flow across packages
308 changes: 308 additions & 0 deletions .claude/commands/reviewchanges.md

Large diffs are not rendered by default.

626 changes: 626 additions & 0 deletions .claude/rules/chain-integration.md

Large diffs are not rendered by default.

153 changes: 153 additions & 0 deletions .claude/skills/next-best-practices/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,153 @@
---
name: next-best-practices
description: Next.js best practices - file conventions, RSC boundaries, data patterns, async APIs, metadata, error handling, route handlers, image/font optimization, bundling
user-invocable: false
---

# Next.js Best Practices

Apply these rules when writing or reviewing Next.js code.

## File Conventions

See [file-conventions.md](./file-conventions.md) for:
- Project structure and special files
- Route segments (dynamic, catch-all, groups)
- Parallel and intercepting routes
- Middleware rename in v16 (middleware → proxy)

## RSC Boundaries

Detect invalid React Server Component patterns.

See [rsc-boundaries.md](./rsc-boundaries.md) for:
- Async client component detection (invalid)
- Non-serializable props detection
- Server Action exceptions

## Async Patterns

Next.js 15+ async API changes.

See [async-patterns.md](./async-patterns.md) for:
- Async `params` and `searchParams`
- Async `cookies()` and `headers()`
- Migration codemod

## Runtime Selection

See [runtime-selection.md](./runtime-selection.md) for:
- Default to Node.js runtime
- When Edge runtime is appropriate

## Directives

See [directives.md](./directives.md) for:
- `'use client'`, `'use server'` (React)
- `'use cache'` (Next.js)

## Functions

See [functions.md](./functions.md) for:
- Navigation hooks: `useRouter`, `usePathname`, `useSearchParams`, `useParams`
- Server functions: `cookies`, `headers`, `draftMode`, `after`
- Generate functions: `generateStaticParams`, `generateMetadata`

## Error Handling

See [error-handling.md](./error-handling.md) for:
- `error.tsx`, `global-error.tsx`, `not-found.tsx`
- `redirect`, `permanentRedirect`, `notFound`
- `forbidden`, `unauthorized` (auth errors)
- `unstable_rethrow` for catch blocks

## Data Patterns

See [data-patterns.md](./data-patterns.md) for:
- Server Components vs Server Actions vs Route Handlers
- Avoiding data waterfalls (`Promise.all`, Suspense, preload)
- Client component data fetching

## Route Handlers

See [route-handlers.md](./route-handlers.md) for:
- `route.ts` basics
- GET handler conflicts with `page.tsx`
- Environment behavior (no React DOM)
- When to use vs Server Actions

## Metadata & OG Images

See [metadata.md](./metadata.md) for:
- Static and dynamic metadata
- `generateMetadata` function
- OG image generation with `next/og`
- File-based metadata conventions

## Image Optimization

See [image.md](./image.md) for:
- Always use `next/image` over `<img>`
- Remote images configuration
- Responsive `sizes` attribute
- Blur placeholders
- Priority loading for LCP

## Font Optimization

See [font.md](./font.md) for:
- `next/font` setup
- Google Fonts, local fonts
- Tailwind CSS integration
- Preloading subsets

## Bundling

See [bundling.md](./bundling.md) for:
- Server-incompatible packages
- CSS imports (not link tags)
- Polyfills (already included)
- ESM/CommonJS issues
- Bundle analysis

## Scripts

See [scripts.md](./scripts.md) for:
- `next/script` vs native script tags
- Inline scripts need `id`
- Loading strategies
- Google Analytics with `@next/third-parties`

## Hydration Errors

See [hydration-error.md](./hydration-error.md) for:
- Common causes (browser APIs, dates, invalid HTML)
- Debugging with error overlay
- Fixes for each cause

## Suspense Boundaries

See [suspense-boundaries.md](./suspense-boundaries.md) for:
- CSR bailout with `useSearchParams` and `usePathname`
- Which hooks require Suspense boundaries

## Parallel & Intercepting Routes

See [parallel-routes.md](./parallel-routes.md) for:
- Modal patterns with `@slot` and `(.)` interceptors
- `default.tsx` for fallbacks
- Closing modals correctly with `router.back()`

## Self-Hosting

See [self-hosting.md](./self-hosting.md) for:
- `output: 'standalone'` for Docker
- Cache handlers for multi-instance ISR
- What works vs needs extra setup

## Debug Tricks

See [debug-tricks.md](./debug-tricks.md) for:
- MCP endpoint for AI-assisted debugging
- Rebuild specific routes with `--debug-build-paths`

87 changes: 87 additions & 0 deletions .claude/skills/next-best-practices/async-patterns.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
# Async Patterns

In Next.js 15+, `params`, `searchParams`, `cookies()`, and `headers()` are asynchronous.

## Async Params and SearchParams

Always type them as `Promise<...>` and await them.

### Pages and Layouts

```tsx
type Props = { params: Promise<{ slug: string }> }

export default async function Page({ params }: Props) {
const { slug } = await params
}
```

### Route Handlers

```tsx
export async function GET(
request: Request,
{ params }: { params: Promise<{ id: string }> }
) {
const { id } = await params
}
```

### SearchParams

```tsx
type Props = {
params: Promise<{ slug: string }>
searchParams: Promise<{ query?: string }>
}

export default async function Page({ params, searchParams }: Props) {
const { slug } = await params
const { query } = await searchParams
}
```

### Synchronous Components

Use `React.use()` for non-async components:

```tsx
import { use } from 'react'

type Props = { params: Promise<{ slug: string }> }

export default function Page({ params }: Props) {
const { slug } = use(params)
}
```

### generateMetadata

```tsx
type Props = { params: Promise<{ slug: string }> }

export async function generateMetadata({ params }: Props): Promise<Metadata> {
const { slug } = await params
return { title: slug }
}
```

## Async Cookies and Headers

```tsx
import { cookies, headers } from 'next/headers'

export default async function Page() {
const cookieStore = await cookies()
const headersList = await headers()

const theme = cookieStore.get('theme')
const userAgent = headersList.get('user-agent')
}
```

## Migration Codemod

```bash
npx @next/codemod@latest next-async-request-api .
```
Loading
Loading