Skip to content

Instantly share code, notes, and snippets.

@bennyschmidt
bennyschmidt / NativeContentTypes.ts
Last active May 5, 2023 14:17
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.
/*
* This script fetches all color styles from a Figma team/document.
*
* Dependencies:
*
* - node-fetch
*
* Due to a limitation in the Figma /styles endpoint, we need to use a
* document for actually using the colors in a color grid 🙄That's why
* we're both fetching from /styles and /files below.