Prerequisites
Before you begin, make sure you have:1
Development Environment
- Node.js 16+ and npm/yarn (for TypeScript)
- Python 3.8+ (for Python)
- A code editor (VS Code recommended)
2
Blockchain Wallet
- MetaMask or compatible wallet
- Some test tokens for the testing environment
3
Nevermined API Key
Get your API key from the Nevermined App
Installation
- TypeScript/JavaScript
- Python
Getting Your API Key
- Go to the Nevermined App
- Log in with your wallet
- Navigate to the Settings section in the user menu
- Click on the API Keys tab
- Generate a new key, give it a descriptive name, and copy it
- Store this key securely as an environment variable (e.g.,
NVM_API_KEY)
Initialize the SDK
- TypeScript
- Python
Environment Configuration
Choose the appropriate environment for your use case:Testing Environment
Testing Environment
- Network: Base Sepolia testnet
- Use case: Development and testing
- Tokens: Test tokens (free)
- Environment:
'testing'
Production Environment
Production Environment
- Network: Base Mainnet
- Use case: Live applications
- Tokens: Real tokens (paid)
- Environment:
'production'
Basic Configuration Example
Here’s a complete example of setting up the Payments client:- TypeScript
- Python
Environment Variables Setup
Create a.env file in your project root:
Verification
Test your setup with a simple verification:- TypeScript
- Python
Next Steps
Now that you have the Nevermined Payment Libraries set up, you can:Register Your First Agent
Learn how to register AI agents and create payment plans
Explore Use Cases
Discover what you can build with Nevermined
View Code Examples
See complete implementation examples
Best Practices
Learn security and optimization tips
Common Issues
Invalid API Key Error
Invalid API Key Error
Make sure your API key is correctly set in your environment variables and has the proper permissions.
Network Connection Issues
Network Connection Issues
Check that you’re using the correct environment (‘testing’ or ‘production’) and that your network connection is stable.
Wallet Connection Problems
Wallet Connection Problems
Ensure your wallet has some test tokens for the testing environment or real tokens for production.