From ca8df8065b5bd5c27a0381be7af3b31c0a1ae848 Mon Sep 17 00:00:00 2001 From: Viki Val Date: Mon, 6 Nov 2023 13:21:38 +0100 Subject: [PATCH] :construction: create fn --- hyperdata/src/create.ts | 11 +++++++++++ hyperdata/src/types.ts | 1 + 2 files changed, 12 insertions(+) create mode 100644 hyperdata/src/create.ts diff --git a/hyperdata/src/create.ts b/hyperdata/src/create.ts new file mode 100644 index 00000000..de9155e7 --- /dev/null +++ b/hyperdata/src/create.ts @@ -0,0 +1,11 @@ +import { contentFrom } from './normalize' +import { + Content, + KodaMetadata +} from './types' + +export function createContent(metadata: T): Content { + const content = contentFrom(metadata) + // TODO: do validation here + return content +} diff --git a/hyperdata/src/types.ts b/hyperdata/src/types.ts index 1dfc2ff8..d94cb990 100644 --- a/hyperdata/src/types.ts +++ b/hyperdata/src/types.ts @@ -38,6 +38,7 @@ export type OpenSeaMetadata = BaseMetadata & export type KodaMetadata = OpenSeaMetadata & { banner?: string + type?: string } export type TezosAttribute = {