macaroons_purchase
Buy change-events for a feed target via Lightning L402; payment settles only if the delivered payload meets your acceptance predicate, otherwise it is refunded.
Instructions
Purchase change-events for a feed target. Pays via Lightning L402 against a hold invoice — payment only settles if the acceptance predicate passes against the delivered payload; otherwise it is fully refunded. If no wallet is configured (the default), returns payment_required with a real invoice for you to pay yourself.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Maximum number of change-events to return | |
| since | No | ISO-8601 timestamp — only change-events after this are considered. Defaults to 30 days ago. | |
| predicate | Yes | Acceptance predicate. Payment only settles if this passes against the real delivered payload. | |
| target_id | Yes | The feed target id from macaroons_metadata | |
| max_spend_sats | No | Hard per-call spend cap in satoshis. | |
| resume_macaroon | No | Only set this after a prior call returned payment_required and you've since paid that invoice with your own wallet — set it to the macaroon that call returned. Omit on a first attempt. |