Agreeable RPC
🤝 Type-safe P2P RPC that just works. A 🍐 Pear project.
npm install @agree-able/rpc
Why Agreeable RPC?
- Simple API: Build P2P services with minimal boilerplate
- Developer Experience: Interactive testing UI included
- Trust: Define clear contracts between peers
- Type Safety: Full TypeScript/JSDoc support with runtime validation
Getting Started
See example for a complete implementation:
- Define Your API:
agreement.mjs - Implement the Server:
server.mjs - Create the Client:
client.mjs
Running
Start the server:
node example/server.mjs -- Public key: mm3immxniji4p91ymorexrtwzp6fiehh3qixuhhdnbgd15t3y6zp
Run the client with the server's public key:
node example/client.mjs mm3immxniji4p91ymorexrtwzp6fiehh3qixuhhdnbgd15t3y6zp
Interactive Testing
Use our UI tool to explore and test your APIs: https://github.com/agree-able/ui
Learn More
Contributing
We welcome contributions! See our contributing guide for details.