From efe215d930102e2194f1238300ac13055f304a0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Kihlberg?= Date: Thu, 14 Dec 2023 17:55:19 +0100 Subject: [PATCH] use type alias for contract source id --- packages/marlowe-object/src/index.ts | 7 ++++- packages/marlowe-object/src/reference.ts | 12 ++++++- .../rest/src/contract/endpoints/sources.ts | 31 +++++++++++-------- 3 files changed, 35 insertions(+), 15 deletions(-) diff --git a/packages/marlowe-object/src/index.ts b/packages/marlowe-object/src/index.ts index 30045999..a2cc29f8 100644 --- a/packages/marlowe-object/src/index.ts +++ b/packages/marlowe-object/src/index.ts @@ -1,6 +1,11 @@ export { Action, Deposit, Notify, Choice } from "./actions.js"; export { ChoiceName, ChoiceId, Bound, ChosenNum } from "./choices.js"; -export { Reference, Label } from "./reference.js"; +export { + Reference, + Label, + ContractSourceId, + ContractSourceIdGuard, +} from "./reference.js"; export { Address, Role, Party } from "./participants.js"; export { Payee, PayeeAccount, PayeeParty, AccountId } from "./payee.js"; diff --git a/packages/marlowe-object/src/reference.ts b/packages/marlowe-object/src/reference.ts index 67204e52..ae9e7606 100644 --- a/packages/marlowe-object/src/reference.ts +++ b/packages/marlowe-object/src/reference.ts @@ -8,6 +8,14 @@ export type Label = string; export const LabelGuard: t.Type