Usage
Learn how to initialize and use the Nimiq Hub API in your applications.
Initialization
Install and initialize the Hub API for your chosen network:
Calling Methods
API methods must be called in response to user actions to handle popups correctly. Here are examples in different frameworks:
Important Notes
Popup Handling
- The Hub API opens a popup window on desktop and a new tab on mobile
- API calls must be made directly in response to user actions
- Avoid async operations before API calls to prevent popup blocking
- Always handle both success and error cases
Network Selection
- Use
https://hub.nimiq-testnet.com
for development and testing - Use
https://hub.nimiq.com
for production/mainnet - Network selection affects all transactions and account operations
Next Steps
- Learn about payment processing
- See how to sign messages
- Explore transaction signing