Last active
May 5, 2023 14:17
-
-
Save bennyschmidt/9febd400439f66c75ea2c4b9cf620df4 to your computer and use it in GitHub Desktop.
Native content types in Dusk
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
/** | |
* Dusk browser | |
* Native content types | |
* | |
* Non Fungible Records are stored on the public chain as Magnetic Resource Text (MRT) | |
* which closely inherits from the Magnet URI scheme ("magnet links") | |
* See: https://en.wikipedia.org/wiki/Magnet_URI_scheme | |
* | |
* Data files are stored in directories specified in that node's configuration | |
* in the following formats. | |
* See: https://github.com/exactchange/dss | |
*/ | |
interface DRV200Input { | |
type: "Alias"|"Comment"|"Collectible"; | |
[key: string]: any; | |
datetime: string; | |
} | |
interface Alias extends DRV200Input { | |
type: "Alias"; | |
name: string; | |
auth: { | |
type: "email"|"uri"; | |
value: string; | |
} | |
node?: { | |
type: "Peer" | "Peer-Publisher" | "Publisher"; | |
logo: string; | |
denomination?: number; | |
} | |
} | |
interface Comment extends DRV200Input { | |
type: "Comment"; | |
author: string; | |
text: string; | |
} | |
interface Collectible extends DRV200Input { | |
type: "Collectible"; | |
vintage: number; | |
make: string; | |
model: string; | |
condition: "bad"|"good"|"mint"|"new"|"digital"; | |
appraisal: number; | |
appraisalCurrency: "USD"; | |
value: string; | |
} | |
interface Application extends DRV200Input { | |
type: "Application"; | |
author: string; | |
title: string; | |
description: string; | |
releaseYear: number; | |
themeColor: string; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment