From 18e13440b5d730f05df96e255c20fa84e792686e Mon Sep 17 00:00:00 2001 From: mgpai <64056966+mgpai22@users.noreply.github.com> Date: Mon, 6 May 2024 18:17:21 -0400 Subject: [PATCH] add seperate fn to decode event datum --- src/read.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 src/read.ts diff --git a/src/read.ts b/src/read.ts new file mode 100644 index 0000000..818c2db --- /dev/null +++ b/src/read.ts @@ -0,0 +1,11 @@ +import { Data } from './data'; +import { ObjectDatum } from './models'; + +export function getEventDatum(plutusData: string): ObjectDatum { + return Data.from( + plutusData, + // eslint-disable-next-line @typescript-eslint/ban-ts-comment + // @ts-expect-error + ObjectDatum + ); +}