Repository navigation
docs(escrow): document lifecycle hooks and query pagination (#826) - #866
Merged
Merged
Conversation
…y#826) Add two new sections to contracts/escrow/README.md: - Escrow Lifecycle Hooks: register_escrow_hook, deregister_escrow_hook, get_escrow_hooks, EscrowEventType values, subscriber interface, registration/deregistration rules, events and error codes. - Escrow Queries and Pagination: get_escrows_by_status, get_escrow_count_by_status, get_escrows_by_customer, get_escrow_count_by_customer, get_escrows_by_merchant, get_escrow_count_by_merchant, with pagination semantics, examples, and implementation notes.
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.
Pull Request: Escrow Lifecycle Hooks & Query Pagination Documentation
Summary
This PR documents the previously undocumented public escrow functions for
lifecycle hook registration and paginated escrow queries, resolving issue #826.
No contract logic is changed — this is a documentation-only update to
contracts/escrow/README.md.Changes
contracts/escrow/README.mdNew section — Escrow Lifecycle Hooks
Documents the publish-subscribe notification system:
register_escrow_hook— subscriber registration withping()validation,per-event cap (10), auth requirements, and returned
hook_id.deregister_escrow_hook— marks a hook inactive; only the originalsubscriber may deregister.
get_escrow_hooks— lists all active hooks for a given event type.EscrowEventTypetable (Created,Released,Disputed,Resolved,Refunded,Cancelled,StatusChanged).ping()+on_escrow_event()).New section — Escrow Queries and Pagination
Documents all six paginated query functions with clear offset/limit semantics:
get_escrows_by_status/get_escrow_count_by_statusget_escrows_by_customer/get_escrow_count_by_customerget_escrows_by_merchant/get_escrow_count_by_merchanttotal_volumebeing a raw cross-token sum.Testing
Documentation-only change. No new code paths are introduced and no existing
tests are modified.
Closes
Closes #759, closes #760, closes #826, closes #762