Skip to content

Instantly share code, notes, and snippets.

@bennyschmidt
Last active May 5, 2023 14:17
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bennyschmidt/9febd400439f66c75ea2c4b9cf620df4 to your computer and use it in GitHub Desktop.
Save bennyschmidt/9febd400439f66c75ea2c4b9cf620df4 to your computer and use it in GitHub Desktop.
Native content types in Dusk
/**
* 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