1. Feb 07, 2024
    • Niklas Adolfsson's avatar
      chore: release v0.22.0 (#1285) · 72939a92
      Niklas Adolfsson authored
      * chore: release v0.22.0
      
      * Update CHANGELOG.md
      
      * Update CHANGELOG.md
      
      * Update CHANGELOG.md
      
      * Update CHANGELOG.md
      
      * make some small tweaks
      
      * Update CHANGELOG.md
      
      * Update CHANGELOG.md
      
      * Update CHANGELOG.md
      v0.22.0
      72939a92
    • Niklas Adolfsson's avatar
      refactor(rpc_module): RpcModule::raw_json_request -> String (#1287) · e1e7d734
      Niklas Adolfsson authored
      * change RpcModule::<call, subscribe, raw> -> String
      
      This PR changes the RpcModule to support the new async API in the
      MethodResponse and RpcModule::<call, subscribe, raw> now returns a
      String instead of MethodResponse.
      
      * refactor async response payload test
      e1e7d734
  2. Feb 06, 2024
    • Niklas Adolfsson's avatar
      feat(server): add `TowerService::on_session_close` (#1284) · 8470f2bb
      Niklas Adolfsson authored
      * add TowerService build and notify on session close
      
      * refactor the API
      
      * clarify docs
      
      * add test for on_session_close
      8470f2bb
    • Niklas Adolfsson's avatar
      feat: async API when `Response` has been processed. (#1281) · 387f52fa
      Niklas Adolfsson authored
      * feat: add `RpcModule::register_raw_method`
      
      * add proc macro support
      
      * rename API
      
      * simplify API with MethodResponse::notify_when_sent
      
      * improve notify API
      
      * fix nits
      
      * introduce ResponsePayloadV2
      
      * impl ResponsePayloadV2 for T
      
      * cleanup
      
      * client: proc macro support for custom ret_ty
      
      * add tests
      
      * address grumbles
      
      * remove unused code
      
      * fix tests
      
      * proc: revert unrelated changes
      
      * remove panics; move should be enough
      
      * bring back UI tests
      
      * grumbles: remove NotifiedError
      
      * break stuff for uniform API
      
      * make more stuff private
      
      * remove ResponseErrorUnit type alias
      
      * fix ui tests
      
      * Update proc-macros/src/render_server.rs
      
      * Rename ws_notify_on_method_answered.rs to response_payload_notify_on_response.rs
      
      * remove unit_error APIs
      
      * replace notify_on_x with notify_on_completion
      
      * Update server/src/transport/ws.rs
      387f52fa
  3. Feb 05, 2024
  4. Jan 26, 2024
  5. Jan 18, 2024
  6. Jan 17, 2024
  7. Jan 16, 2024
  8. Jan 11, 2024
  9. Dec 21, 2023
  10. Dec 13, 2023
  11. Dec 11, 2023
  12. Dec 08, 2023
  13. Dec 07, 2023
  14. Dec 06, 2023
    • Niklas Adolfsson's avatar
      refactor: split client and server errors (#1122) · 0ca84f9a
      Niklas Adolfsson authored
      * split client and server error
      
      * cargo fmt
      
      * remove old code
      
      * fix tests
      
      * cargo fmt
      
      * fix rustdoc links
      
      * make clippy happy
      
      * Update server/src/future.rs
      
      * Update client/http-client/src/client.rs
      
      * Update client/http-client/src/client.rs
      
      * Update core/src/client/async_client/helpers.rs
      
      * Update core/src/client/async_client/helpers.rs
      
      * Update core/src/client/async_client/mod.rs
      
      * Update core/src/client/async_client/mod.rs
      
      * fix more todos
      
      * unused dep: soketto
      
      * remove unused error variant
      
      * Update core/src/lib.rs
      
      * cargo fmt
      
      * fix grumbles: move client error to own mod
      
      * simplify imports
      
      * Update core/src/client/error.rs
      0ca84f9a
  15. Dec 05, 2023
  16. Dec 04, 2023
  17. Dec 01, 2023
    • Niklas Adolfsson's avatar
      server: change ws ping API (#1248) · 80902d3e
      Niklas Adolfsson authored
      * feat(server): make it possible to disable WS ping
      
      * cleanup
      
      * refactor PingConfig
      
      * refactor PingConfig
      
      * fix build
      
      * Update server/src/server.rs
      
      * Update server/src/transport/ws.rs
      
      * Update server/src/server.rs
      80902d3e
  18. Nov 30, 2023
  19. Nov 24, 2023
    • Niklas Adolfsson's avatar
      refactor: RpcServiceT make it possible !BoxFuture (#1242) · 98675a06
      Niklas Adolfsson authored
      * refactor: RpcServiceT make it possible !BoxFuture
      
      * cleanup and no boxing in the EitherLayer
      
      * add missing files
      
      * remove more BoxFuture
      
      * fix clippy
      
      * cleanup
      
      * grumbles: add Clone bound
      
      * grumbles: remove needless bounds RpcLogger
      
      * grumbles: simplify response futures
      
      * grumbles: fix faulty comment
      
      * fix more grumbles: simplify trait bounds
      
      * Revert "fix more grumbles: simplify trait bounds"
      
      This reverts commit 2e7c94f3.
      98675a06
  20. Nov 22, 2023
  21. Nov 21, 2023
    • Leonardo L's avatar
      refactor: update and turn `WsTransportClientBuilder` generic (#1168) · 08292b07
      Leonardo L authored
      
      
      * refactor(jsonrpsee-client-transport): update and turn `WsTransportClientBuilder` generic
      
      - fix(docs): typo on `WsTransportClientBuilder` doc on `Receiver`
        reference.
      - refactor: add initial fn signatures for `build_with_stream`,
        `try_connect_over_tcp`, and `try_connect`.
      - refactor: expose `EitherStream` visibility to public.
      - refactor: make `Sender` and `Receiver` generic over T, a data stream.
      - refactor: make `TransportSenderT` and `TransportReceiverT`
        implementations over generic `Sender` and `Receiver`, bound to
      `AsyncRead`, `AsyncRead`, `MaybeSend` and `'static`.
      - refactor: turn old `try_connect` TCP steps into
        `try_connect_over_tcp`.
      - feat: implement `build_with_stream` and `try_connect` to handle and
        handle the handshake for a generic data stream `T`.
      - feat: add new `Redirected` error variant to `WsHandshakeError`, as it
        should be handled by the client when using a generic data stream `T`.
      - TODO(@oleonardolima): Add new tests that uses a different data stream.
      
      * refactor(jsonrpsee-ws-client): add new fns to `WsClientBuilder`
      
      - feat: add new `WsClientBuilder::build_with_transport` that builds and
        returns a `WsClient` with the given `Sender` and `Receiver`.
      - feat: add new `WsClientBuilder::build_with_stream` that uses the new
        `WsTransportClientBuilder::build_with_stream`, building and returning
        the `WsClient` with the given `data_stream` as transport layer.
      - refactor: update the `WsClientBuilder::build` to use the new
        `build_with_transport`, it helps not having duplicated code.
      
      * refactor: re-export `EitherStream` & sort current list
      
      * test: add integration tests and helper fns
      
      - add new helper fns to spawn a socks5 server, using `fast-socks5`
      - add new helper enum for `DataStream` that acts as a wrapper to
        `Socks5Stream<T>`, similar to what a client would need to do.
      - impl AsyncRead + AsyncWrite for the helper `DataStream` enum, to make
        it compatible between futures::io and tokio::io.
      - add new tests that connects over a socks5 proxy, and use the new
        `WsClientBuilder::default()::build_with_stream(...) fn.
      
      * address review suggestions
      
      ---------
      
      Co-authored-by: default avatarNiklas Adolfsson <[email protected]>
      08292b07
  22. Nov 17, 2023
  23. Nov 16, 2023
  24. Nov 09, 2023
  25. Nov 08, 2023
    • Yuri Volkov's avatar
      Fixing gitspiegel trigger workflow (#1232) · 724e2384
      Yuri Volkov authored
      The first attept to use a workflow to protect GitLab CI from untrusted contributors failed, because GitHub doesn't pass secrets to workflows for PRs that originate from forks. 
       
      This uses a different approach: instead of triggerring gitspiegel API directly from the workflow, we're just spawning an empty workflow with a specific path, and gitspiegel listens for `workflow_run` event to start mirroring.  
      
      The idea is the same: for the first-time contributors, running workflows would require manual aciton and that would block mirroring. But this time, we don't need any secrets to make it work.
      724e2384
  26. Nov 06, 2023
  27. Nov 03, 2023
    • Niklas Adolfsson's avatar
      feat(server): JSON-RPC specific middleware (#1215) · 8a24e245
      Niklas Adolfsson authored
      
      
      * refactor new jsonrpc middleware
      
      * add jsonrpsee specific service trait
      
      * use tower::ServiceBuilder for composable middleware
      
      * revert changelog
      
      * fix nits
      
      * types: impl Clone
      
      * clarify examples
      
      * Update server/src/middleware/mod.rs
      
      * Update server/src/transport/http.rs
      
      * remove some boiler plate
      
      * add back logging
      
      * remove needless Arc
      
      * remove clone bounds for Middleware
      
      * add wrapper for tower::ServiceBuilder
      
      * fix docs
      
      * add modify request example
      
      * add rate limit example
      
      * fix some nits in rate limiting middleware example
      
      * Meta -> Context
      
      * restruct middleware module
      
      * fix broken links
      
      * grumbles: remove `Context`
      
      * fix tests
      
      * Update examples/examples/rpc_middleware_modify_request.rs
      
      Co-authored-by: default avatarJames Wilson <[email protected]>
      
      * fix grumbles
      
      * grumbles: adjust docs for method response
      
      * grumbles: MethodKind::Unknown -> NotFound
      
      * Update examples/examples/http_middleware.rs
      
      * fix some nits in examples
      
      ---------
      
      Co-authored-by: default avatarJames Wilson <[email protected]>
      8a24e245
  28. Oct 31, 2023
  29. Oct 23, 2023
  30. Oct 19, 2023