UNPKG

@harmoniclabs/plu-ts-onchain

Version:

An embedded DSL for Cardano smart contracts creation coupled with a library for Cardano transactions, all in Typescript

15 lines (14 loc) 878 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ptraceBool = exports.pshowBool = void 0; var uint8array_utils_1 = require("@harmoniclabs/uint8array-utils"); var type_system_1 = require("../../type_system/index.js"); var builtins_1 = require("../builtins/index.js"); var phoist_1 = require("../phoist.js"); var plam_1 = require("../plam.js"); exports.pshowBool = (0, phoist_1.phoist)((0, plam_1.plam)(type_system_1.bool, type_system_1.bs)(function (b) { return (0, builtins_1.pstrictIf)(type_system_1.bs).$(b) .$((0, uint8array_utils_1.fromAscii)("true")) .$((0, uint8array_utils_1.fromAscii)("false")); })); exports.ptraceBool = (0, phoist_1.phoist)((0, plam_1.plam)(type_system_1.bool, type_system_1.bool)(function (b) { return (0, builtins_1.ptrace)(type_system_1.bool).$(exports.pshowBool.$(b).utf8Decoded).$(b); }));