-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
301 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import { AssetMetadata } from "./asset"; | ||
import { Node } from "./node"; | ||
import { UDL } from "../types"; | ||
import { FileSource } from "./file"; | ||
|
||
export class Collection extends Node { | ||
name: string; | ||
description: string; | ||
code: string; | ||
creator: string; | ||
owner: string; | ||
bannerUri: string[]; | ||
thumbnailUri: string[]; | ||
udl?: UDL; | ||
ucm?: boolean; | ||
items: string[]; | ||
|
||
constructor(collectionProto: any) { | ||
super(collectionProto, null); | ||
this.name = collectionProto.name; | ||
this.description = collectionProto.description; | ||
this.code = collectionProto.code; | ||
this.creator = collectionProto.creator; | ||
this.owner = collectionProto.owner; | ||
this.bannerUri = collectionProto.bannerUri; | ||
this.thumbnailUri = collectionProto.thumbnailUri; | ||
this.udl = collectionProto.udl; | ||
this.ucm = collectionProto.ucm; | ||
this.items = collectionProto.items; | ||
} | ||
} | ||
|
||
export type CollectionMetadata = { | ||
owner: string // NFT owner address | ||
creator?: string, // NFT creator address, if not present, default to owner | ||
code?: string // NFT collection code | ||
contractTxId?: string, // default to "Of9pi--Gj7hCTawhgxOwbuWnFI1h24TTgO5pw8ENJNQ" | ||
banner?: FileSource, | ||
thumbnail?: FileSource, | ||
} & AssetMetadata |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.