1. Aug 12, 2022
  2. Jun 21, 2022
  3. Jun 01, 2022
  4. May 06, 2022
  5. May 03, 2022
  6. Apr 20, 2022
    • Niklas Adolfsson's avatar
      feat: WASM client via web-sys transport (#648) · 20e6e5de
      Niklas Adolfsson authored
      
      
      * feat: untested web-sys transport
      
      * rewrite me
      
      * make it work
      
      * add hacks and works :)
      
      * add subscription test too
      
      * revert StdError change; still works
      
      * cleanup
      
      * remove hacks
      
      * more wasm tests outside workspace
      
      * kill mutually exclusive features
      
      * merge nits
      
      * remove unsafe hack
      
      * fix nit
      
      * core: fix features and deps
      
      * ci: add WASM test
      
      * test again
      
      * work work
      
      * comeon
      
      * work work
      
      * revert unintentional change
      
      * Update core/Cargo.toml
      
      Co-authored-by: default avatarDavid <[email protected]>
      
      * Update core/src/client/async_client/mod.rs
      
      Co-authored-by: default avatarDavid <[email protected]>
      
      * revert needless change: std hashmap + fxhashmap works
      
      * cleanup
      
      * extract try_connect_until fn
      
      * remove todo
      
      * fix bad merge
      
      * add wasm client wrapper crate
      
      * fix nits
      
      * use gloo-net dependency
      
      * fix build
      
      * grumbles CI: rename to `wasm_tests`
      
      * fix bad merge
      
      * fix grumbles
      
      * fix nit
      
      * comeon CI
      
      Co-authored-by: default avatarDavid <[email protected]>
      20e6e5de
    • Niklas Adolfsson's avatar
      fix(rpc module): fail subscription calls with bad params (#728) · 9fa817d9
      Niklas Adolfsson authored
      
      
      * fix(rpc module): fail subscription with bad params
      
      * draft; show my point
      
      * fix tests
      
      * fix build
      
      * add tests for proc macros too
      
      * add tests for bad params in proc macros
      
      * fix nits
      
      * commit all files
      
      * add ugly fix for proc macro code
      
      * add more user friendly API
      
      * make SubscriptionSink::close take mut self
      
      * fix grumbles
      
      * show james some code
      
      * Update core/src/server/rpc_module.rs
      
      Co-authored-by: default avatarJames Wilson <[email protected]>
      
      * remove needless clone
      
      * fix build
      
      * client fix docs + error type
      
      * simplify code: merge connect reset and unsubscribe close reason
      
      * remove unknown close reason
      
      * refactor: remove Error::SubscriptionClosed
      
      * add some nice APIs to ErrorObjectOwned
      
      * unify api
      
      * address grumbles
      
      * remove redundant methods for close and reject
      
      * proc macro: compile err when subscription -> Result
      
      * rpc module: fix test subscription test
      
      * Update core/src/server/rpc_module.rs
      
      Co-authored-by: default avatarJames Wilson <[email protected]>
      
      * Update core/src/server/rpc_module.rs
      
      Co-authored-by: default avatarJames Wilson <[email protected]>
      
      * Update core/src/server/rpc_module.rs
      
      Co-authored-by: default avatarJames Wilson <[email protected]>
      
      * Update core/src/server/rpc_module.rs
      
      Co-authored-by: default avatarJames Wilson <[email protected]>
      
      * Update core/src/server/rpc_module.rs
      
      Co-authored-by: default avatarJames Wilson <[email protected]>
      
      * Update proc-macros/src/lib.rs
      
      Co-authored-by: default avatarJames Wilson <[email protected]>
      
      * address grumbles
      
      * remove faulty comment
      
      * Update core/src/server/rpc_module.rs
      
      Co-authored-by: default avatarDavid <[email protected]>
      
      * Update core/src/server/rpc_module.rs
      
      Co-authored-by: default avatarDavid <[email protected]>
      
      * Update core/src/server/rpc_module.rs
      
      Co-authored-by: default avatarDavid <[email protected]>
      
      * Update core/src/server/rpc_module.rs
      
      Co-authored-by: default avatarDavid <[email protected]>
      
      * Update core/src/server/rpc_module.rs
      
      Co-authored-by: default avatarDavid <[email protected]>
      
      * fix: don't send `RPC Call failed: error`.
      
      * remove debug assert
      
      Co-authored-by: default avatarJames Wilson <[email protected]>
      Co-authored-by: default avatarDavid <[email protected]>
      9fa817d9
  7. Jan 21, 2022
    • Niklas Adolfsson's avatar
      feat(client): support request id as Strings. (#659) · 708d4213
      Niklas Adolfsson authored
      * feat(client): support request id as Strings.
      
      * add tests for Id::String
      
      * address grumbles: move id_kind to RequestManager
      
      * Update client/http-client/src/client.rs
      
      * types: take ref to `ID` get rid of some `Clone`
      
      * remove more clone
      
      * grumbles: rename tests
      708d4213
  8. Dec 21, 2021
    • Niklas Adolfsson's avatar
      feat: server configurable subscriptionID (#604) · bc688cc2
      Niklas Adolfsson authored
      
      
      * PoC
      
      * introduce IdProvider trait
      
      * revert Cow stuff
      
      * Update ws-server/src/server.rs
      
      * fix tests
      
      * cargo fmt
      
      * use 'static lifetime in SubscriptionId
      
      * fix tests
      
      * fmt
      
      * make tests compile again
      
      * fix tests
      
      * Fix tests
      
      * Move IdProvider impls to own module
      
      * move `sub-id gen` types to `core`
      
      * fix doc links
      
      * make rand non-optional dep
      
      * feature gate: id provider
      
      Co-authored-by: default avatarDavid Palm <[email protected]>
      bc688cc2
  9. Dec 20, 2021
    • Niklas Adolfsson's avatar
      extract async client abstraction. (#580) · 292bd88a
      Niklas Adolfsson authored
      
      
      * extract ws client to async client
      
      * bring back jsonrpsee-ws-client crate
      
      * new crate core client
      
      * add missing file
      
      * jsonrpsee crate: add core client
      
      * rexport core client
      
      * more re-exports
      
      * downgrade trait bounds
      
      * update version
      
      * fix nits
      
      * send close reason
      
      * Update types/src/traits.rs
      
      * move 'TEN_MB_CONST' to core
      
      * Update client/core-client/Cargo.toml
      
      Co-authored-by: default avatarDavid <[email protected]>
      
      * Update client/core-client/src/lib.rs
      
      Co-authored-by: default avatarDavid <[email protected]>
      
      * cargo fmt
      
      * Update client/ws-client/src/lib.rs
      
      Co-authored-by: default avatarDavid <[email protected]>
      
      * Update client/ws-client/src/lib.rs
      
      Co-authored-by: default avatarDavid <[email protected]>
      
      * move `async-client` core
      
      The `async-client` is hidden behind a new feature flag `async-client`
      because it brings in additional dependecies such as tokio rt.
      
      * fix docs
      
      * add example how to use "core client"
      
      * fix build
      
      * Update http-server/Cargo.toml
      
      * Update client/transport/Cargo.toml
      
      Co-authored-by: default avatarDavid <[email protected]>
      292bd88a
  10. Dec 17, 2021
    • Maciej Hirsz's avatar
      Crate restructuring (#590) · e159c449
      Maciej Hirsz authored
      
      
      * Nuke V2
      
      * fmt
      
      * Formatting and imports
      
      * Updated benches
      
      * Fix doc comment link
      
      * Brace imports in ws-server
      
      * Reworking imports
      
      * std first
      
      * fmt
      
      * std on top
      
      * Update to match changed line numbers
      
      * Rename jsonrpsee_utils -> jsonrpsee_core
      
      * Migrating things types -> core
      
      * RpcError -> ErrorResponse
      
      * Merge types::client into core::client
      
      * Continued move types -> core
      
      * Removing features to make checks pass
      
      * Move rpc_module tests to tests crate
      
      * Fixed doc comment links
      
      * Add futures-util dependency for client
      
      * Remove dead code
      
      Co-authored-by: default avatarNiklas Adolfsson <[email protected]>
      
      * fmt
      
      * Feature gate the Client trait
      
      * Move `Client` traits to `client` module
      
      Co-authored-by: default avatarNiklas Adolfsson <[email protected]>
      e159c449
  11. Dec 15, 2021
    • Niklas Adolfsson's avatar
      refactor `SubscriptionClosed` (#612) · c480d90a
      Niklas Adolfsson authored
      
      
      * refactor `SubscriptionClosed`
      
      I noticed that we "trying" to sending "close messages" on subscriptions
      that already has been terminated by the client which is unnecessary.
      
      Moreover, this introduces `fn is_closed` to check whether a given
      channel is closed without having to send an actual message on the channel.
      
      * cargo fmt
      
      * Update types/src/error.rs
      
      Co-authored-by: default avatarDavid <[email protected]>
      
      * fix nits
      
      * more grumbles
      
      * make rust stable happy
      
      * SubscriptionClosed: add deny unknown fields
      
      Co-authored-by: default avatarDavid <[email protected]>
      c480d90a
  12. Dec 10, 2021
  13. Nov 05, 2021
  14. Oct 29, 2021
  15. Sep 30, 2021
  16. Sep 16, 2021
  17. Aug 25, 2021
  18. Aug 18, 2021
    • Niklas Adolfsson's avatar
      [proc macros] force proc macro api to return `Result` (#435) · 09abbaaa
      Niklas Adolfsson authored
      * rewrite me
      
      * require proc macro API to return result
      
      * send unknown message when error is not CallError
      
      * show example that auto cast StdError doesn't work
      
      * register_*_method Into<Error>
      
      * clippy
      
      * replace generic errors with anyhow::Error
      
      * fix nits
      
      * example that anyhow::Error in register_method works
      
      * CallError: add missing From impl
      
      * [types]: add helper methods for Error types
      
      The rationale is to make it possible for users to either use anyhow::Error or use the helper methods.
      
      * fmt
      
      * Revert "register_*_method Into<Error>"
      
      This reverts commit 33b4fa28730b72647ba150659d3c0ab1937e524a.
      
      * add better comment
      
      * fix nit
      09abbaaa
  19. Jun 04, 2021
    • Niklas Adolfsson's avatar
      [rpc module]: server-side close subscription (#355) · b987b811
      Niklas Adolfsson authored
      
      
      * [rpc module]: server-side close subscription
      
      Add functionality that closes the subscription after the sink has been dropped.
      
      * [integration tests]: add timeout on futures
      
      * remove global subscriber mutex
      
      * fix nit
      
      * [client types]: fix #349
      
      Subscription::next() propogate error when parsing the response fails
      
      * [client types]: fix #349
      
      Subscription::next() propogate error when parsing the response fails
      
      * unify subscription and notification
      
      * rename again
      
      * send notif response when subscription is dropped
      
      * stray debug stuff
      
      * Update utils/src/server/rpc_module.rs
      
      Co-authored-by: default avatarDavid <[email protected]>
      
      * Revert "[client types]: fix #349"
      
      This reverts commit c4fefade719ebd8c964a62d0eb16f89db3346ccd.
      
      * Revert "[integration tests]: add timeout on futures"
      
      This reverts commit 21dfb99649aaaa8c847a693b4510e0202498fa2c.
      
      * show that actual edge-case
      
      * fix nit
      
      * Update types/src/traits.rs
      
      * fix bad merge
      
      * ugly; but works
      
      * complete solution
      
      * get rid of Option
      
      * Update tests/tests/integration_tests.rs
      
      * Update utils/src/server/rpc_module.rs
      
      * Update utils/src/server/rpc_module.rs
      
      Co-authored-by: default avatarDavid <[email protected]>
      
      * grumbles: fix faulty early return
      
      * remove weird abstraction KeepAlive
      
      * fix nits
      
      * revert test timeouts
      
      * address grumbles
      
      * fix build
      
      Co-authored-by: default avatarDavid <[email protected]>
      b987b811
  20. Jun 03, 2021
  21. Jun 02, 2021
  22. May 28, 2021
  23. May 12, 2021
    • Billy Lindeman's avatar
      [ws client] RegisterNotification support (#303) · c7384471
      Billy Lindeman authored
      * Rename NotifResponse to SubscriptionResponse to make room for new impl
      
      * Add support for on_notification Subscription<T> types
      
      * Fix handling of NotificationHandler in manager
      
      * cleanup
      
      * Implement NotificationHandler to replace Subscription<T> and clean up plumbing
      
      * More cleanup
      
      * impl Drop for NotificationHandler
      
      * Address pr feedback #1
      
      * ws client register_notification pr feedback 2
      
      * Fix doc
      
      * fix typo
      
      * Add tests, get NH working
      
      * More cleanup of String/&str
      
      * fix doc
      
      * Drop notification handler on send_back_sink error
      
      * ws client notification auto unsubscribe when channel full test
      c7384471
  24. Apr 20, 2021
    • Niklas Adolfsson's avatar
      [client] use types v2 (less alloc) (#269) · 31153ac7
      Niklas Adolfsson authored
      * rewrite me
      
      * v2
      
      * PoC works without batch request
      
      * remove `PartialEq` bounds
      
      * add naive benches types
      
      * misc
      
      * remove useless lifetime
      
      * [ws client]: move request ID generation to client
      
      * make tests compile again
      
      * [client transport]: kill leaky abstractions.
      
      * [http client transport]: minor changes in the API.
      
      * [ws client]: fix batch requests.
      
      * fix nits
      
      * [ws client]: generate two request IDs for subscrib
      
      * fix tests
      
      * remove unused types + less alloc for params.
      
      * fix nits
      
      * more tweaks.
      
      * remove unused code
      
      * fix more nits
      
      * remove unused legacy types
      
      * reorg types_v2 mod
      
      * port macros to new types
      
      * fix tests again; more jsonvalue
      
      * [proc macros]: bring back impl Into for params.
      
      * fix build
      
      * [proc macros]: make it work for external crates.
      
      * [types]: remove weird From<Option<T>> to impl.
      
      * cleanup again
      
      * [examples]: remove unused async-std dep
      
      * Update types/src/v2/mod.rs
      
      * [types]: remove unsed dep smallvec
      
      * rewrite me
      
      * [types]: error code impl ser/deser
      
      Manual implementation of serialize/deserialize to get rid of duplicated message string
      
      * [types v2]: re-org with explicit mods
      
      * fix faulty test
      
      * add missed files
      
      * [ws client]: req_manager reserve unsubscribe slot.
      
      * simplify test code
      
      * add tracking issue for TODO
      
      * remove unused deps
      31153ac7
  25. Apr 16, 2021
  26. Mar 31, 2021
    • Niklas Adolfsson's avatar
      [client] batch requests (#216) · b8bd715d
      Niklas Adolfsson authored
      
      
      * feat(http client): batch requests
      
      * fix(http batch request): request in any order.
      
      * Update src/types/jsonrpc/id.rs
      
      * tests(batch out-of-order): make it less confusing.
      
      * fix nit: `cloned` -> `copied`
      
      * fix bad merge
      
      * [client]: batch request generic response
      
      * wait with impl
      
      * [ws client]: add template for batch requests
      
      * remove jsonvalue
      
      * naive impl
      
      * fix make it work,
      
      The implemenation is quite inefficient because the responses might be unordered.
      Currently, a "digest" of a BTreeSet is stored to sort the requestIDs
      and don't have to try all combinations of requestIDs in the response.
      
      * fix nits
      
      * error handling
      
      * fix nits
      
      * more nits
      
      * use error msg pattern
      
      * add batch requests to client trait
      
      Keep it simple by require `Vec<(Method, Params)>` could be improved.
      
      * address review comments: use swap_remove
      
      Replace read values with `Vec::swap_remove` instead inserting dummy value.
      The reason is that `Vec::remove` is O(n)
      
      * address review grumbles: batch trait bound Default
      
      * don't be clever
      
      * [http client]: faster lookup for batch request.
      
      * fix: distguish request_id and batch_id
      
      * thanks clippy
      
      * fix: clarify bad response with a separate error
      
      * fix tests
      
      * add issue link to todo
      
      * Update types/src/error.rs
      
      Co-authored-by: default avatarDavid <[email protected]>
      
      Co-authored-by: default avatarDavid <[email protected]>
      b8bd715d
  27. Mar 09, 2021
    • Niklas Adolfsson's avatar
      [ws client]: register request IDs for unsubscribe requests. (#223) · 09e7a4d6
      Niklas Adolfsson authored
      
      
      * [ws client]: register request ID for unsubscribe.
      
      Fixes #220
      
      * refactor manager usage
      
      * restrict request ID to u8
      
      * Update ws-client/src/tests.rs
      
      * rename `max_notifs_per_subscription_capacity`
      
      * Update tests/src/lib.rs
      
      * fix nits
      
      * address grumbles: vecdeq for free slots
      
      * resolve todo
      
      * [request manager]: add test for max limit.
      
      * Update ws-client/src/client.rs
      
      Co-authored-by: default avatarDavid <[email protected]>
      
      * fix stack overflow
      
      * grumbles: MaxMemory -> MaxSlots
      
      * address grumbles: stray capacity on configs
      
      * Update types/src/client.rs
      
      Co-authored-by: default avatarDavid <[email protected]>
      
      * grumbles: stray confusing docs
      
      * grumbles: doc nits
      
      * grumbles: remove nested if let
      
      Co-authored-by: default avatarDavid <[email protected]>
      09e7a4d6
  28. Mar 04, 2021
  29. Mar 02, 2021
    • Niklas Adolfsson's avatar
      feat: client trait + porting client proc macros (#199) · 50d8bf78
      Niklas Adolfsson authored
      
      
      * draft: client trait sketch...
      
      * use async_trait instead of `Box<Future>`
      
      * refactor client trait
      
      * [types]: shared client types.
      
      * integrate with `jsonrpsee_proc_macros::rpc_api`
      
      * Update proc-macros/src/lib.rs
      
      * integrate with proc macros
      
      * fix: hacky support for generic types in proc macro
      
      * fix: make the examples work.
      
      * trait: error associated type
      
      * Update types/src/traits.rs
      
      * client trait: make object safe.
      
      Make the trait usable as a trait object i.e, `Box<dyn Trait>`
      
      * client trait: remove `Self::Sized`
      
      * add tests for proc macros.
      
      * fix build
      
      * fmt
      
      * [client trait]: remove unused associated error typ
      
      * [proc macros]: separate enum variant each return_t
      
      * add tracking issue to `TODO`
      
      * doc(client trait): improve documentation.
      
      * separate trait for subscribing client
      
      * add documentation
      
      * proc macros: remove debug impl
      
      * fix compile warns
      
      * address grumbles: remove fn process_response
      
      * Update types/src/client.rs
      
      Co-authored-by: default avatarDavid <[email protected]>
      
      * Update types/src/client.rs
      
      Co-authored-by: default avatarDavid <[email protected]>
      
      * Update types/src/client.rs
      
      Co-authored-by: default avatarDavid <[email protected]>
      
      * Update types/src/client.rs
      
      Co-authored-by: default avatarDavid <[email protected]>
      
      * Update types/src/client.rs
      
      Co-authored-by: default avatarDavid <[email protected]>
      
      * remove old proc macro tests
      
      * address grumbles: shorter lines
      
      Co-authored-by: default avatarDavid <[email protected]>
      50d8bf78