This repository serves as the central collection of example code and tutorials for all DPSN SDKs. It provides practical implementations and best practices for developers looking to integrate with the DPSN platform.
DPSN (Decentralized Publish-Subscribe Network) is a powerful platform for building decentralized applications. This repository contains example implementations that demonstrate how to effectively use DPSN's features across different programming languages and frameworks.
Located in dpsn-nodejs-examples/, this directory contains TypeScript/JavaScript examples demonstrating:
- Publishing messages to topics
- Subscribing to topics
- Working with DPSN's Node.js SDK features
- Best practices for Node.js integration
- Error handling and retry mechanisms
- Authentication and security practices
We plan to add examples for additional SDKs:
- Python SDK
- Go SDK
- Java SDK
- More...
- Choose the SDK you want to work with
- Navigate to the corresponding examples directory
- Follow the setup instructions in the SDK-specific README
- Run the examples to see DPSN in action
# Clone the repository
git clone https://github.com/your-org/dpsn-examples.git
# Navigate to Node.js examples
cd dpsn-examples/dpsn-nodejs-examples
# Install dependencies
npm install
# Run an example
npm run publish- A DPSN account
- Access token for authentication
- SDK-specific requirements:
- Node.js SDK: Node.js 16+ and npm/yarn
- Python SDK (coming soon): Python 3.8+
- Go SDK (coming soon): Go 1.18+
dpsn-examples/
├── dpsn-nodejs-examples/ # Node.js SDK examples
We welcome contributions to expand our examples collection! If you'd like to:
- Add new examples
- Improve existing examples
- Add support for a new SDK
- Fix bugs or improve documentation
Please follow our contribution guidelines and submit a pull request.
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
For questions or issues:
- Open an issue in this repository
- Check our documentation
This repository is licensed under the Apache License - see the LICENSE file for details.