feat(webhook-api): add optional source to quote/swap requests and responses - #90
Merged
Merged
Conversation
…ponses Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Coverage report
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds an optional
sourcefield to the market-maker webhook contract inwebhook-apiso MMs can see where traffic originates:"internal"(a Jupiter product) or"integrator"(a third-party integrator).requests::QuoteRequestandrequests::SwapRequest: set by the RFQ API.responses::QuoteResponseandresponses::SwapResponse: echo of the request value.server-exampleechoes it; one serde test covers the field missing and present.The field is
Option<String>and omitted whenNone, so MMs that upgrade this crate before the RFQ API rolls out keep deserializing today's requests, and MMs on older versions ignore the new key.Not included:
openapi/openapi.jsonis not regenerated here, since it is already behind (isWsol,receiverare missing) and deserves its own refresh.Follow-up in
jup-ag/rfq: bump thewebhook-apirev to this commit and populatesourcefrom the authenticated request source, overwriting any taker-supplied value on/v1/execute.Audit Status
If Not Required (Justification)
Off-chain Rust API types only (
webhook-apiandserver-example). No on-chain program,order-engine-sdkorsquads-sdkchange. The change is an additive optional serde field with no validation or funds-flow logic; existing integrations are unaffected because the field isOptionand skipped whenNone.Deployment Intent
🤖 Generated with Claude Code