fromJson

fun fromJson(json: JsonObject): Sep31TransactionResponse

Parses a SEP-31 transaction-response JSON payload into a Sep31TransactionResponse.

The function requires the wrapped shape {"transaction": {...}} defined by the SEP-31 spec "GET Transaction" section. A bare flat object without the transaction wrapper is rejected with Sep31InvalidResponseException: accepting the flat form would teach callers a non-spec contract that masks anchor non-conformance.

Return

The parsed transaction response.

Parameters

json

The full JSON object returned by the anchor, including the transaction wrapper.

Throws

if the transaction wrapper is missing, any required field is absent, or the body is malformed.