docs: add documentation for buyer-initiated offers and createOfferAnd…#1017
Merged
levalleux-ludo merged 2 commits intomainfrom Apr 29, 2026
Merged
docs: add documentation for buyer-initiated offers and createOfferAnd…#1017levalleux-ludo merged 2 commits intomainfrom
levalleux-ludo merged 2 commits intomainfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds new internal documentation pages describing two offer flows covered by the e2e test suite: (1) the createOfferAndCommit helper flow (seller-initiated vs buyer-initiated) and (2) buyer-initiated offers committed via commitToBuyerOffer.
Changes:
- Documented the
createOfferAndCommithelper’s purpose, prerequisites, and covered test scenarios. - Documented buyer-initiated offer flow in
core-sdk-offers.test.ts, including prerequisites, fund movements, and error cases.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
| docs/details/createOfferAndCommit.md | New doc explaining how createOfferAndCommit is used in e2e tests for seller-initiated and buyer-initiated offers. |
| docs/details/buyerInitiatedOffers.md | New doc explaining buyer-initiated offers and the seller-side commitToBuyerOffer test coverage and fund flows. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1017 +/- ##
==========================================
+ Coverage 90.96% 91.49% +0.52%
==========================================
Files 179 179
Lines 7297 7451 +154
Branches 1366 1433 +67
==========================================
+ Hits 6638 6817 +179
+ Misses 659 634 -25
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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.
This pull request adds detailed documentation for two important flows in the offer and commit process of the core SDK: buyer-initiated offers and the atomic
createOfferAndCommithelper. These docs provide clear overviews, prerequisites, test scenarios, and key assertions for both flows, helping developers understand and test these mechanisms more effectively.Buyer-Initiated Offers Documentation (
docs/details/buyerInitiatedOffers.md):quantityAvailablemust be 1.commitToBuyerOffermethod, its parameters, and error handling, including symmetric error guards for incorrect usage of commit methods.Atomic Offer Creation and Commit Documentation (
docs/details/createOfferAndCommit.md):createOfferAndCommithelper, which allows atomic creation and commitment to an offer in a single transaction, with detailed signature and step-by-step breakdown.Description
{{what was done}}
How to test
{{how can it be tested}}