0.4.0-beta • Published 1 year ago
@marlowe.io/language-core-v1 v0.4.0-beta
Description
This package contains code to work with the version 1 of Marlowe Core. It exports 5 modules:
- @{@link index | marlowe.io/language-core-v1} - Exports static types (TypeScript only) for the JSON schema as specified in the Appendix E of the {@link https://github.com/input-output-hk/marlowe/releases/download/v3/Marlowe.pdf | Marlowe specification}
- @{@link guards | marlowe.io/language-core-v1/guards} - Exports {@link !io-ts-usage | Dynamic type guards} (both JavaScript and TypeScript) for the same schema. These are used to validate the JSON objects at runtime.
- @{@link playground-v1 | marlowe.io/language-core-v1/playground-v1} - Exports constructors compatible with the Playground's
marlowe-js
internal library. - @{@link semantics | marlowe.io/language-core-v1/semantics} - Exports the semantics of the Core language as specified in the {@link https://github.com/input-output-hk/marlowe/releases/download/v3/Marlowe.pdf | Marlowe specification}. This can be used to simulate or unit test a contract.
Getting started
This package is released as an ESM module and can be used with a modern bundler or imported directly in the browser (without any bundler) as long as you use an import map.
Browser
<html>
<body>
<script src="https://cdn.jsdelivr.net/gh/input-output-hk/marlowe-ts-sdk@0.4.0-beta/jsdelivr-npm-importmap.js"></script>
<script type="module">
import { Contract } from "@marlowe.io/language-core-v1/guards";
const jsonObject = JSON.parse(httpResponse);
if (Contract.is(jsonObject)) {
// The jsonObject respects the JSON schema for Contract
} else {
// The jsonObject does not respect the JSON schema for Contract
}
</script>
</body>
</html>
0.4.0-beta
1 year ago
0.4.0-beta-rc1
1 year ago
0.3.0-beta
1 year ago
0.3.0-beta-rc3
1 year ago
0.3.0-beta-rc2
1 year ago
0.3.0-beta-rc1
2 years ago
0.2.0-beta
2 years ago
0.2.0-alpha-22
2 years ago
0.2.0-alpha-21
2 years ago
0.2.0-alpha-20
2 years ago
0.2.0-alpha-19
2 years ago
0.2.0-alpha-18
2 years ago
0.2.0-alpha-17
2 years ago
0.2.0-alpha-16
2 years ago
0.2.0-alpha-14
2 years ago
0.2.0-alpha-13
2 years ago
0.2.0-alpha-5
2 years ago
0.2.0-alpha-4
2 years ago
0.2.0-alpha-3
2 years ago
0.2.0-alpha-2
2 years ago
0.2.0-alpha-1
2 years ago
0.2.0-alpha-0
2 years ago
0.1.3-beta
2 years ago
0.1.1-beta
2 years ago
0.1.0-beta
2 years ago