@initia/react-wallet-widget
to the new and improved @initia/interwovenkit-react
. InterwovenKit v2 offers better performance, improved TypeScript support, and a more intuitive API.
Migration Benefits
- No more SSR configuration required
- Better TypeScript support
- Improved performance and bundle size
- Simplified API with consistent naming
- Enhanced error handling
Step-by-Step Migration
1
Update Package Installation
Replace the legacy wallet widget package with InterwovenKit.
Update all imports from
@initia/react-wallet-widget
to @initia/interwovenkit-react
throughout your codebase.2
Clean Up Legacy Configuration
Remove SSR-related imports and configuration that are no longer needed.
Remove SSR Imports
Remove SSR Imports
Remove Build Configuration
Remove Build Configuration
Remove CDN Scripts
Remove CDN Scripts
3
Install Required Peer Dependencies
InterwovenKit requires specific peer dependencies for proper functionality.
These dependencies enable advanced wallet functionality and improved chain interaction capabilities.
4
Update Provider Configuration
Replace the legacy provider setup with the new InterwovenKit configuration.
providers.tsx
The new provider structure separates concerns better and provides more flexibility for wallet configuration.
API Migration Guide
Provider Configuration Changes
Bridge Configuration Migration
Bridge configuration has moved from the provider level to individual method calls, providing more flexibility and better user experience.
Removed Provider Props
The following props are no longer supported:To customize wallet options, use wagmi connectors in your wagmi configuration instead.
Hook and Method Changes
Wallet Connection Interface
Ensure your entire application is wrapped with
<InterwovenKitProvider>
at the root level for the hooks to function properly.Transaction Handling
For more granular control over transaction states, use
requestTxSync()
to get the transaction hash immediately, then waitForTxConfirmation()
to wait for blockchain confirmation. See the useInterwovenKit reference for details.Advanced Integration
Working with @initia/initia.js
For complex transaction building, InterwovenKit seamlessly integrates with@initia/initia.js
:
example-usage.tsx
Migration Checklist
✅ Package & Dependencies
✅ Package & Dependencies
- Uninstalled
@initia/react-wallet-widget
- Installed
@initia/interwovenkit-react
- Installed peer dependencies (
wagmi
,viem
,@tanstack/react-query
) - Updated all import statements
✅ Configuration Cleanup
✅ Configuration Cleanup
- Removed SSR-related imports
- Removed build configuration changes
- Removed CDN scripts
- Updated provider configuration
✅ API Updates
✅ API Updates
- Replaced
WalletWidgetProvider
withInterwovenKitProvider
- Updated
useWallet
touseInterwovenKit
- Migrated method calls (
onboard
→openConnect
, etc.) - Updated transaction handling (
requestTx
→requestTxBlock
)
✅ Testing
✅ Testing
- Wallet connection works correctly
- Bridge functionality works
- Transaction submission works
- No console errors or warnings
Need help with migration? Check out the Getting Started guide for complete implementation examples, or refer to the API Reference for detailed method documentation.