mppx.broadcastCredential
Complete a Credential payment
Validates a Credential again and completes its payment on an Mppx.create instance.
Usage
Use broadcastCredential when a custom transport or background workflow accepts payment. It can settle payment or persist payment state.
import { , } from 'mppx/server'
const = .({ : [.()] })
const = await .('Payment credential="..."', {
: {
: '0.10',
: '0x20c0000000000000000000000000000000000000',
: '0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266',
},
: 'GET /v1/report',
})
.(.)
successReturn type
type ReturnType = Promise<Receipt>Parameters
capturedRequest (optional)
- Type:
Method.CapturedRequest
Authoritative request snapshot used by method hooks.
credential
- Type:
string | Credential
Serialized Authorization header value or parsed Credential object.
meta (optional)
- Type:
Record<string, string>
Expected Challenge metadata.
realm (optional)
- Type:
string
Expected Challenge realm.
request (optional)
- Type:
Record<string, unknown>
Expected method request parameters.
scope (optional)
- Type:
string
Expected route or resource scope bound to the Challenge.