import * as t from "io-ts/lib/index.js"; import { Party } from "./participants.js"; /** * The Marlowe model allows for a contract to store assets. All participants of the contract * implicitly own an account identified with an AccountId. Which is just a type alias for * a Party. * @category Payee */ export type AccountId = Party; /** * {@link !io-ts-usage | Dynamic type guard} for the {@link AccountId | accountId type}. * @category Payee */ export declare const AccountIdGuard: t.UnionC<[t.Type, t.Type]>; /** * One of the {@link @marlowe.io/language-core-v1!index.Payee} options. A payment made to * an Account payee is an internal transfer of the funds (it doesn't leave the contract). * @category Payee */ export interface PayeeAccount { account: AccountId; } /** * {@link !io-ts-usage | Dynamic type guard} for the {@link @marlowe.io/language-core-v1!index.PayeeAccount | account payee type}. * @category Payee */ export declare const PayeeAccountGuard: t.TypeC<{ account: t.UnionC<[t.Type, t.Type]>; }>; /** * One of the {@link @marlowe.io/language-core-v1!index.Payee} options. A payment made to * a Party payee takes the money out of the contract and gives it to the party. * @category Payee */ export interface PayeeParty { party: Party; } /** * {@link !io-ts-usage | Dynamic type guard} for the {@link @marlowe.io/language-core-v1!index.PayeeParty | party payee type}. * @category Payee */ export declare const PayeePartyGuard: t.TypeC<{ party: t.UnionC<[t.Type, t.Type]>; }>; /** * When you use the {@link @marlowe.io/language-core-v1!index.Pay | Pay} construct to make a * {@link @marlowe.io/language-core-v1!semantics.Payment | payment} you need to specify the destination * of the payment using a `Payee`. * @category Payee */ export type Payee = PayeeAccount | PayeeParty; /** * {@link !io-ts-usage | Dynamic type guard} for the {@link @marlowe.io/language-core-v1!index.Payee | payee type}. * @category Payee */ export declare const PayeeGuard: t.UnionC<[t.TypeC<{ account: t.UnionC<[t.Type, t.Type]>; }>, t.TypeC<{ party: t.UnionC<[t.Type, t.Type]>; }>]>; /** * Pattern match object on the Payee type * @category Payee * @hidden */ export type PayeeMatcher = { party: (party: Party) => T; account: (account: AccountId) => T; }; /** * Pattern matching on the Payee type * @hidden * @category Payee */ export declare function matchPayee(matcher: PayeeMatcher): (payee: Payee) => T; export declare function matchPayee(matcher: Partial>): (payee: Payee) => T | undefined; //# sourceMappingURL=payee.d.ts.map