Client Integration
Guides for integrating applications with NCN Network.
Overview
NCN Network provides multiple interfaces for client integration:
Client Guides
High-performance gRPC integration:
Protobuf code generation
Connection setup
Request submission
Streaming responses
Simple REST API integration:
Endpoint reference
Request/response formats
Error handling
Blockchain payment flow:
Wallet setup
Payment submission
Confirmation handling
Complete code examples:
Python client
JavaScript client
Rust client
Quick Start
Simplest Integration (HTTP)
With gRPC (Higher Performance)
Integration Flow
Choosing an Interface
Web application
HTTP
Simple, CORS support
Backend service
gRPC
Performance, streaming
Real-time app
WebSocket
Live updates
Mobile app
HTTP
Wide library support
High-throughput
gRPC
Efficient binary protocol
Quick prototype
HTTP
No code generation needed
Input/Output Formats
Input Data
All input data is JSON-encoded:
Output Data
Output is also JSON-encoded:
Error Handling
HTTP Errors
400
Bad request
Check input format
404
Not found
Check request_id
429
Rate limited
Retry with backoff
500
Server error
Retry or report
503
Unavailable
Service down, retry later
gRPC Errors
INVALID_ARGUMENT
Bad input
Check request format
NOT_FOUND
Unknown request
Check request_id
RESOURCE_EXHAUSTED
Rate limited
Retry with backoff
UNAVAILABLE
Service down
Retry with backoff
INTERNAL
Server error
Report issue
SDKs and Libraries
Available
Rust
✅ Built-in
test_client crate
Planned
Python
🚧 In progress
JavaScript
🚧 Planned
Go
🚧 Planned
Generate Your Own
Testing Your Integration
Local Testing
Start local NCN network (see Running Locally)
Configure client to use
localhostSubmit test requests
Verify responses
Testnet Testing
Configure client for testnet endpoints
Get testnet tokens from faucet
Submit requests with payment
Verify full payment flow
Next Steps
gRPC Client Guide - Detailed gRPC integration
HTTP Client Guide - REST API integration
Payment Integration - Blockchain payments
Examples - Complete code examples
Last updated
