import { Sort } from "@marlowe.io/adapter/assoc-map"; import * as t from "io-ts/lib/index.js"; import { Party } from "./participants.js"; /** * Represents a choice topic. * @category Choice */ export type ChoiceName = string; /** * {@link !io-ts-usage | Dynamic type guard} for the {@link @marlowe.io/language-core-v1!index.ChoiceName | choice name type}. * @category Choice */ export declare const ChoiceNameGuard: t.Type; /** * Identifier for a {@link @marlowe.io/language-core-v1!index.Choice | choice}. * @category Choice */ export interface ChoiceId { choice_name: ChoiceName; choice_owner: Party; } /** * {@link !io-ts-usage | Dynamic type guard} for the {@link @marlowe.io/language-core-v1!index.ChoiceId | choice id type}. * @category Choice */ export declare const ChoiceIdGuard: t.Type; /** * Sorting function for ChoiceId as defined in the Marlowe Specification (SemanticsGuarantees.thy) * @hidden */ export declare function choiceIdCmp(a: ChoiceId, b: ChoiceId): Sort; /** * Marlowe {@link @marlowe.io/language-core-v1!index.Choice | choices} are numeric values that * are bounded with the inclusive interval `[from , to]`. * @category Choice */ export interface Bound { from: bigint; to: bigint; } /** * {@link !io-ts-usage | Dynamic type guard} for the {@link @marlowe.io/language-core-v1!index.Bound | bound type}. * @category Choice */ export declare const BoundGuard: t.Type; /** * Represents a value that was chosen by a party in a {@link @marlowe.io/language-core-v1!index.IChoice | choice input} * @category Choice */ export type ChosenNum = bigint; /** * {@link !io-ts-usage | Dynamic type guard} for the {@link @marlowe.io/language-core-v1!index.ChosenNum | chosen num type}. * @category Choice */ export declare const ChosenNumGuard: t.Type; /** * Checks if a chosen number is between a given bound * @category Choice */ export declare function inBound(num: bigint, bound: Bound): boolean; /** * Checks if a chosen number is within any of the given bounds * @category Choice */ export declare function inBounds(num: bigint, bounds: Bound[]): boolean; //# sourceMappingURL=choices.d.ts.map