-
Notifications
You must be signed in to change notification settings - Fork 6
[FEATURE] [RPC] Implement RPC Request/Response Types #39
Copy link
Copy link
Closed
Labels
coinswap-migration-phase-2The 2nd phase in integration of mill-io inside CoinswapThe 2nd phase in integration of mill-io inside CoinswapenhancementNew feature or requestNew feature or requestmill-rpcRelated to mill-rpc, our mill-io-based RPC frameworkRelated to mill-rpc, our mill-io-based RPC framework
Description
Description
Design and implement type-safe request and response structures for the RPC framework.
Motivation
Provide a clean API for handling JSON-RPC 2.0 requests and responses with proper error handling.
Proposed Solution
pub struct Request {
method: String,
params: serde_json::Value,
id: Option<RequestId>,
}
impl Request {
pub fn json<T: DeserializeOwned>(&self) -> Result<T>;
pub fn param<T>(&self, key: &str) -> Result<T>;
}Tasks
- Design Request/Response types
- Implement JSON-RPC 2.0 compliance
- Add proper error types
- Support batch requests
- Add validation
- Write unit tests
- Document with examples
Expected
- JSON-RPC 2.0 compliant
- Type-safe parameter extraction
- Proper error handling
- Batch request support
Dependencies:
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
coinswap-migration-phase-2The 2nd phase in integration of mill-io inside CoinswapThe 2nd phase in integration of mill-io inside CoinswapenhancementNew feature or requestNew feature or requestmill-rpcRelated to mill-rpc, our mill-io-based RPC frameworkRelated to mill-rpc, our mill-io-based RPC framework