@harmoniclabs/plu-ts-onchain
Version:
An embedded DSL for Cardano smart contracts creation coupled with a library for Cardano transactions, all in Typescript
33 lines (32 loc) • 1.55 kB
TypeScript
import { PInt, TermFn, PBool } from "../../../PTypes/index.js";
import { Term } from "../../../Term/index.js";
import { PappArg } from "../../pappArg.js";
import { TermBool } from "./TermBool.js";
import { BaseUtilityTermExtension } from "./BaseUtilityTerm.js";
export type TermInt = Term<PInt> & BaseUtilityTermExtension & {
readonly padd: TermFn<[PInt], PInt>;
readonly add: (other: PappArg<PInt>) => TermInt;
readonly psub: TermFn<[PInt], PInt>;
readonly sub: (other: PappArg<PInt>) => TermInt;
readonly pmult: TermFn<[PInt], PInt>;
readonly mult: (other: PappArg<PInt>) => TermInt;
readonly pdiv: TermFn<[PInt], PInt>;
readonly div: (other: PappArg<PInt>) => TermInt;
readonly pquot: TermFn<[PInt], PInt>;
readonly quot: (other: PappArg<PInt>) => TermInt;
readonly premainder: TermFn<[PInt], PInt>;
readonly remainder: (other: PappArg<PInt>) => TermInt;
readonly pmod: TermFn<[PInt], PInt>;
readonly mod: (other: PappArg<PInt>) => TermInt;
readonly peq: TermFn<[PInt], PBool>;
readonly eq: (other: PappArg<PInt>) => TermBool;
readonly plt: TermFn<[PInt], PBool>;
readonly lt: (other: PappArg<PInt>) => TermBool;
readonly pltEq: TermFn<[PInt], PBool>;
readonly ltEq: (other: PappArg<PInt>) => TermBool;
readonly pgt: TermFn<[PInt], PBool>;
readonly gt: (other: PappArg<PInt>) => TermBool;
readonly pgtEq: TermFn<[PInt], PBool>;
readonly gtEq: (other: PappArg<PInt>) => TermBool;
};
export declare function addPIntMethods(term: Term<PInt>): TermInt;