writePayload
Writes a payload to the blockchain and returns an anchor reference.
Legacy entry point — kept for binary compatibility. Routes through writePayload with PaymentContext.unmanaged; the client falls back to its embedded account credentials and does not consult any treasury.
Return
An AnchorResult containing the reference and payload
Parameters
The JSON payload to anchor
The media type of the payload
Payment-aware write. Plugins that opt into the payment plane override this; the default delegates to the legacy writePayload so existing implementations keep compiling.
Implementations honouring ctx must:
resolve their signing key from ctx (via the treasury), never from their own embedded credentials
abort if the estimated fee exceeds PaymentContext.maxFee
populate AnchorResult.fee and AnchorResult.payerAddress on success
Parameters
the JSON payload to anchor
payment context — who pays, on what chain, with what strategy and what caller-side cap
the media type of the payload