This module offers dynamic type guards for the for the JSON schema as specified in the Appendix E of the Marlowe specification.

import * as G from "@marlowe/language-core-v1/guards"
const jsonObject = JSON.parse(fileContents)

if (G.Contract.is(jsonObject)) {
// The jsonObject respects the JSON schema for Contract
} else {
// The jsonObject does not respect the JSON schema for Contract
}

Index

Contract

Observation

Action

Value

Payee

Party

Token

Choice

Environment

General

Input

State

Transaction

Transaction Error

Transaction Warning