Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Payer API Refactor #223

Merged
merged 5 commits into from
Oct 18, 2024
Merged

Payer API Refactor #223

merged 5 commits into from
Oct 18, 2024

Conversation

neekolas
Copy link
Collaborator

tl;dr

  • Creates a new payer API
  • Breaks envelopes into their own package so they can be referenced from both the message api and the payer API
  • Renames PublishEnvelopes to PublishPaidEnvelopes and adds a new PublishUnpaidEnvelopes API

@@ -159,9 +102,9 @@ service ReplicationApi {
}

// Publish envelope
rpc PublishEnvelopes(PublishEnvelopesRequest) returns (PublishEnvelopesResponse) {
rpc PublishPaidEnvelopes(PublishPaidEnvelopesRequest) returns (PublishPaidEnvelopesResponse) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't want to have two APIs named PublishEnvelopes that expect different request/response types. That feels like a footgun.

This is the best name I could come up with.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm wondering if PublishPayerEnvelopes and PublishClientEnvelopes would be more consistent?

@neekolas neekolas requested a review from a team October 18, 2024 17:59
@neekolas neekolas marked this pull request as ready for review October 18, 2024 17:59
@neekolas neekolas requested a review from a team as a code owner October 18, 2024 17:59
Copy link
Contributor

@mkysel mkysel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks straight forward enough!

@@ -159,9 +102,9 @@ service ReplicationApi {
}

// Publish envelope
rpc PublishEnvelopes(PublishEnvelopesRequest) returns (PublishEnvelopesResponse) {
rpc PublishPaidEnvelopes(PublishPaidEnvelopesRequest) returns (PublishPaidEnvelopesResponse) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm wondering if PublishPayerEnvelopes and PublishClientEnvelopes would be more consistent?

@neekolas
Copy link
Collaborator Author

@richardhuaaa

I'm wondering if PublishPayerEnvelopes and PublishClientEnvelopes would be more consistent?

That was my #2 choice, but I don't really have a strong preference. Happy to switch it over.

@neekolas neekolas merged commit 9f31be4 into main Oct 18, 2024
4 checks passed
@neekolas neekolas deleted the nm/payer-api branch October 18, 2024 19:33
neekolas added a commit to xmtp/xmtpd that referenced this pull request Oct 18, 2024
## tl;dr

- Companion PR to xmtp/proto#223 which updates everything to the new format
Copy link

🎉 This PR is included in version 3.72.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants