Skip to content

feat(webhook-api): add optional source to quote/swap requests and responses - #90

Merged
ioanSL merged 1 commit into
mainfrom
feat/webhook-source
Sep 11, 2026
Merged

ioanSL merged 1 commit into
mainfrom
feat/webhook-source

Conversation

@ioanSL

@ioanSL ioanSL commented Sep 10, 2026

Copy link
Copy Markdown
Collaborator

Summary

Adds an optional source field to the market-maker webhook contract in webhook-api so MMs can see where traffic originates: "internal" (a Jupiter product) or "integrator" (a third-party integrator).

  • requests::QuoteRequest and requests::SwapRequest: set by the RFQ API.
  • responses::QuoteResponse and responses::SwapResponse: echo of the request value.
  • server-example echoes it; one serde test covers the field missing and present.

The field is Option<String> and omitted when None, 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.json is not regenerated here, since it is already behind (isWsol, receiver are missing) and deserves its own refresh.

Follow-up in jup-ag/rfq: bump the webhook-api rev to this commit and populate source from the authenticated request source, overwriting any taker-supplied value on /v1/execute.

Audit Status

  • Required — Audit completed and artifacts attached
  • Not Required — Justification below

If Not Required (Justification)

Off-chain Rust API types only (webhook-api and server-example). No on-chain program, order-engine-sdk or squads-sdk change. The change is an additive optional serde field with no validation or funds-flow logic; existing integrations are unaffected because the field is Option and skipped when None.

Deployment Intent

  • No deploy
  • Deploy new program
  • Upgrade existing program

🤖 Generated with Claude Code

…ponses

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Coverage report
Filename Lines Covered (%) Functions Covered (%)
order-engine-sdk/src/fill.rs 96.24 89.19
order-engine-sdk/src/lib.rs 0 0
order-engine-sdk/src/transaction.rs 0 0
programs/order-engine/src/error.rs 100 100
programs/order-engine/src/instructions/fill.rs 98.29 80
programs/order-engine/src/lib.rs 90.91 75
server-example/src/config.rs 0 0
server-example/src/server.rs 0 0
squads-sdk/src/accounts.rs 93.51 100
squads-sdk/src/config.rs 39.68 50
squads-sdk/src/error.rs 0 0
squads-sdk/src/lib.rs 100 100
squads-sdk/src/pda.rs 98.04 100
squads-sdk/src/serialize.rs 70.83 60
squads-sdk/src/settings.rs 94.02 100
squads-sdk/src/transaction.rs 44.33 44.44
squads-sdk/src/unwrap.rs 89.43 71.43
squads-sdk/src/wrap.rs 84.28 85.71
webhook-api/src/enums.rs 88.75 18.18
webhook-api/src/requests.rs 81.82 33.33
webhook-api/src/responses.rs 0 0

@ioanSL ioanSL self-assigned this Sep 11, 2026
@ioanSL
ioanSL merged commit 3aa4fce into main Sep 11, 2026
7 checks passed
@ioanSL
ioanSL deleted the feat/webhook-source branch September 11, 2026 09:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant