36 featrfq add typescript sdk interfaces for quote backend integration#37
Merged
0xMuang merged 2 commits intoJul 14, 2026
Conversation
Record the RFQ backend as a TypeScript SDK and local-reference path before MVP demo backend work begins, while preserving pending PR context for RFQ hardening, E2E, CLI, and BUIDL fixtures. Constraint: Open PRs #24, #28, #29, #30, and #35 already cover parts of RFQ hardening, protected-router scenarios, live demo, CLI, and BUIDL-like fixtures. Rejected: Treating an RFQ backend as a Corner Store-operated production server | would blur operator responsibilities for pricing, signer custody, inventory, hosting, and compliance prechecks. Confidence: high Scope-risk: narrow Directive: Implement RFQ SDK interfaces first; any MVP backend must reuse merged E2E/CLI/BUIDL paths instead of creating parallel demo infrastructure. Tested: git diff --check Not-tested: services/rfq implementation or runtime tests; documentation-only change
Promote services/rfq from a minimal quote signer into a TypeScript SDK layer with a high-level quote API, validation helpers, replaceable signer/nonce/pricing/risk seams, and local reference components. Constraint: RFQAdapter tracks quote nonce usage by maker, so the default in-memory nonce store must be maker-scoped. Rejected: Adding an HTTP/backend server in this issue | would blur the SDK layer with the later MVP demo backend and production operator responsibilities. Confidence: high Scope-risk: moderate Directive: Keep production pricing, signer custody, persistent nonce storage, inventory risk, hosting, and backend compliance prechecks as integrator/operator responsibilities. Tested: cd services/rfq && npm test; scripts/check.sh; git diff --check Not-tested: MVP HTTP/CLI backend, production signer/KMS integration, persistent nonce store, real pricing/inventory systems
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
RFQ backend를 바로 서버로 제공하기 전에, integrator가 자신의 RFQ quote backend를 쉽게 만들 수 있도록
services/rfq를 TypeScript SDK 레이어로 확장했습니다.이번 PR은 RFQ backend 자체를 운영/호스팅하는 작업이 아니라, 이후 MVP demo backend와 production backend가 공통으로 사용할 quote 생성 SDK 기반을 만드는 작업입니다.
What changed
services/rfq에 high-level RFQ quote API를 추가했습니다.createRFQService(...).quote(...)RFQAdapter와 호환되는 signed quote를 생성합니다.RFQ backend에서 교체 가능해야 하는 책임을 interface로 분리했습니다.
로컬 개발과 테스트용 reference 구현을 추가했습니다.
InMemoryNonceStoreFixedRatePricingProviderNoopInventoryRiskCheckquote 입력 validation을 강화했습니다.
on-chain
RFQAdapternonce 구조에 맞춰 기본 nonce store를 maker-scoped로 맞췄습니다.문서와 테스트를 업데이트했습니다.
services/rfq/README.mdWhy
RFQ는 maker가 off-chain에서 가격을 계산하고 quote에 서명한 뒤, taker가 on-chain
ExecutionRouter/RFQAdapter를 통해 체결하는 구조입니다.따라서 Corner Store가 production RFQ 서버를 직접 제공하기보다는, 각 운영자/integrator가 자신의 signer, pricing, nonce, risk policy를 꽂아서 backend를 만들 수 있는 SDK 형태가 더 적절합니다.
Not included in this PR
위 항목들은 후속 feature에서 다루는 범위로 남겨두었습니다.
Verification
cd services/rfq && npm testscripts/check.shgit diff --checkAll passed.