Skip to content
This repository has been archived by the owner on Oct 28, 2024. It is now read-only.

Added the ability to pass in a custom Json RPC ID #92

Closed
wants to merge 3 commits into from

Conversation

Luzzotica
Copy link

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.

@google-cla
Copy link

google-cla bot commented Mar 23, 2023

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.

@kevmoo
Copy link
Contributor

kevmoo commented Mar 23, 2023

@devoncarew – what our maintenance story on this package?

@natebosch
Copy link
Contributor

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.

@devoncarew devoncarew added the needs-info Additional information needed from the issue author label May 23, 2023
@github-actions
Copy link

github-actions bot commented Jun 7, 2023

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!

@github-actions github-actions bot closed this Jun 7, 2023
@Luzzotica
Copy link
Author

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.

@natebosch natebosch reopened this Jun 7, 2023
@natebosch
Copy link
Contributor

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

@natebosch
Copy link
Contributor

Looks like the CLA also needs attention.

#92 (comment)

@Luzzotica
Copy link
Author

Just agreed to the CLA.

@github-actions github-actions bot removed the needs-info Additional information needed from the issue author label Jun 8, 2023
@natebosch
Copy link
Contributor

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.

@mosuem
Copy link
Contributor

mosuem commented Oct 28, 2024

Closing as the dart-lang/json_rpc_2 repository is merged into the dart-lang/tools monorepo. Please re-open this PR there!

@mosuem mosuem closed this Oct 28, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

5 participants