json_rpc_2
json_rpc_2 copied to clipboard
Added the ability to pass in a custom Json RPC ID
I needed the ability to pass in a custom RPC id.
It was easy to add, and doesn't affect the protocol's API in any way, just added functionality.
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).
View this failed invocation of the CLA check for more information.
For the most up to date status, view the checks section at the bottom of the pull request.
@devoncarew – what our maintenance story on this package?
Can you describe your use case?
This PR would need tests and a CHANGELOG entry, but I'd like to understand the motivation better before we accept it.
Without additional information we're not able to resolve this PR. Feel free to add more info or respond to any questions above. Thanks for your contribution!
Gosh dang! I missed your comments guys sorry!
I needed to use a JSON RPC but have complete control of the RPC IDs.
This package, without the changes I made, only allow incrementing IDs.
My JSON RPC package is WalletConnect and it sends JSON RPC requests to a relay that forwards it to subscribers. There are thousands, maybe tens of thousands of JSON RPC requests sent to the relay and if every one used incrementing RPC IDs there would be conflicts. Having complete control over the entropy for the RPC IDs is the only way to resolve this.
Hence my changes.
If you need more details let me know.
The use case makes sense. Can you add a test and a CHANGELOG entry?
https://github.com/dart-lang/.github/blob/main/CONTRIBUTING.md#changelog-entries
Looks like the CLA also needs attention.
https://github.com/dart-lang/json_rpc_2/pull/92#issuecomment-1480524197
Just agreed to the CLA.
The use case makes sense. Can you add a test and a CHANGELOG entry?
https://github.com/dart-lang/.github/blob/main/CONTRIBUTING.md#changelog-entries
I think we still need a CHANGELOG entry and a test if this is still something you'd like to see landed.