diff --git a/.gitignore b/.gitignore index 6ac7ed593c..2074bde7ae 100644 --- a/.gitignore +++ b/.gitignore @@ -38,8 +38,8 @@ yarn-error.log* # intellij .idea -# Auto generated content like CIPs and Rust Library +# Auto generated content like CIPs, Rust Library and Token Registry /docs/governance/cardano-improvement-proposals/* /static/img/cip/* +/docs/native-tokens/token-registry/* /docs/get-started/cardano-serialization-lib/* - diff --git a/WEEKLY_REPORT.md b/WEEKLY_REPORT.md index b2f5124935..e3dc26adf8 100644 --- a/WEEKLY_REPORT.md +++ b/WEEKLY_REPORT.md @@ -1,7 +1,29 @@ ## Cardano Developer Portal - weekly reports +### Week ending January 14th +[2022-01-14] + * cardano-wallet-interface showcase addition (#471) (Harmonic) + * Update installing-cardano-node.md (#483) (Priyank) + * Bump shelljs from 0.8.4 to 0.8.5 (#482) (dependabot[bot]) + +[2022-01-12] + * Add a new showcase tag (DEX) & new showcase project (MuesliSwap) (#480) (Fillips Ickevics) + * Bump follow-redirects from 1.14.5 to 1.14.7 (#479) (dependabot[bot]) + * Correct era on Alonzo line (#476) (javidigani) + * Token Registry Script (#475) (Fillips Ickevics) + * Modify 'replace' functions with regex (#474) (Fillips Ickevics) + * Update minting-nfts.md (#473) (CBROS - Cardano Stake Pool) + * chore(get-started): updating cardano-node requirements (#462) (Marek Mahut) + * Update grafana-dashboard-tutorial.md (#469) (sandy4de) + * Exploring cardano-wallet - Some simplifications (#467) (Fabien Boucher) + ### Week ending January 7th +[2022-01-07] + * Add ADAdice to the project showcase (#466) (Flavien Charlon) + * Update overview.md (#465) (Giovanni Gargiulo) + [2022-01-05] + * Update weekly report, week ending January 7th (#468) (Tommy Kammerer) * Finalize serialization-lib docs auto generation (#464) (Tommy Kammerer) * Use stack install command to install cardano-wallet (#460) (Fabien Boucher) diff --git a/docs/get-started/installing-cardano-node.md b/docs/get-started/installing-cardano-node.md index 2300e37013..0ea2a633b0 100644 --- a/docs/get-started/installing-cardano-node.md +++ b/docs/get-started/installing-cardano-node.md @@ -28,8 +28,8 @@ The components can be built and run on **Windows** and **MacOS**, but we recomme To set up the components, you will need: * **Windows**, **MacOS**, or **Linux** for your operating system -* A **CPU** with at least **two** cores -* **8GB** of RAM and at least **10GB** of free disk space +* An Intel or AMD x86 processor with **two or more cores, at 1.6GHz or faster** (2GHz or faster for a stake pool or relay) +* **12GB** of RAM and at least **30GB** of free disk space :::note If intending to connect to mainnet instance, the requirements for RAM and storage would increase beyond baselines above. @@ -113,11 +113,11 @@ ghcup install ghc 8.10.7 ghcup set ghc 8.10.7 ``` -`ghcup` will install the latest stable version of `cabal`. However, as of the time of writing this, [Input-Output](https://iohk.io) recommends using `cabal 3.4.0.0`. So, we will use `ghcup` to install and switch to the required version. +`ghcup` will install the latest stable version of `cabal`. However, as of the time of writing this, [Input-Output](https://iohk.io) recommends using `cabal 3.6.2.0`. So, we will use `ghcup` to install and switch to the required version. ```bash -ghcup install cabal 3.4.0.0 -ghcup set cabal 3.4.0.0 +ghcup install cabal 3.6.2.0 +ghcup set cabal 3.6.2.0 ``` @@ -141,8 +141,8 @@ cabal --version You should see something like this: ``` -cabal-install version 3.4.0.0 -compiled using version 3.4.0.0 of the Cabal library +cabal-install version 3.6.2.0 +compiled using version 3.6.2.0 of the Cabal library ``` :::important @@ -321,11 +321,11 @@ ghcup install ghc 8.10.7 ghcup set ghc 8.10.7 ``` -`ghcup` will install the latest stable version of `cabal`. However, as of the time of writing this, [Input-Output](https://iohk.io) recommends using `cabal 3.4.0.0`. So, we will use `ghcup` to install and switch to the required version. +`ghcup` will install the latest stable version of `cabal`. However, as of the time of writing this, [Input-Output](https://iohk.io) recommends using `cabal 3.6.2.0`. So, we will use `ghcup` to install and switch to the required version. ```bash -ghcup install cabal 3.4.0.0 -ghcup set cabal 3.4.0.0 +ghcup install cabal 3.6.2.0 +ghcup set cabal 3.6.2.0 ``` Finally, we check if we have the correct `ghc` and `cabal` versions installed. @@ -348,8 +348,8 @@ cabal --version You should see something like this: ``` -cabal-install version 3.4.0.0 -compiled using version 3.4.0.0 of the Cabal library +cabal-install version 3.6.2.0 +compiled using version 3.6.2.0 of the Cabal library ``` :::important diff --git a/docs/get-started/running-cardano.md b/docs/get-started/running-cardano.md index 7d012b0159..3bc9db660f 100644 --- a/docs/get-started/running-cardano.md +++ b/docs/get-started/running-cardano.md @@ -24,7 +24,7 @@ The `cardano-node` application requires at least four configuration files to run - **Main Config**: It contains general node settings such as **logging** and **versioning**. It also points to the **Byron Genesis** and the **Shelly Genesis** file. - **Byron Genesis**: It contains the initial protocol parameters and instructs the `cardano-node` on how to bootstrap the **Byron Era** of the **Cardano** blockchain. - **Shelly Genesis**: It contains the initial protocol parameters and instructs the `cardano-node` on how to bootstrap the **Shelly Era** of the **Cardano** blockchain. -- **Alonzo Genesis**: It contains the initial protocol parameters and instructs the `cardano-node` on how to bootstrap the **Shelly Era** of the **Cardano** blockchain. +- **Alonzo Genesis**: It contains the initial protocol parameters and instructs the `cardano-node` on how to bootstrap the **Alonzo Era** of the **Cardano** blockchain. - **Topology**: It contains the list of network peers (**`IP Address` and `Port` of other nodes running the blockchain network**) that your node will connect to. :::important diff --git a/docs/integrate-cardano/creating-wallet-faucet.md b/docs/integrate-cardano/creating-wallet-faucet.md index cbef0a82c0..0111632c73 100644 --- a/docs/integrate-cardano/creating-wallet-faucet.md +++ b/docs/integrate-cardano/creating-wallet-faucet.md @@ -569,8 +569,7 @@ Slotting parameters for tip are: The first thing we can do to test if the wallet server is working correctly is to query the network information via the API. ```bash -curl --request GET \ - --url http://localhost:1337/v2/network/information | jq +curl --url http://localhost:1337/v2/network/information | jq ``` The result should be something like this: @@ -611,13 +610,13 @@ It is important to make sure that the `sync_progress.status` is equal to `ready` To create a wallet we must first generate a wallet **recovery phrase** using the `cardano-wallet` in the CLI. ```bash -cardano-wallet recovery-phrase generate +cardano-wallet recovery-phrase generate | jq -c --raw-input 'split(" ")' ``` You should get a **24-word mnemonic seed** in return similar to this: ``` -kit soup various toe cloud humor clip radio medal ladder casino sock various distance staff analyst success trade deal split leaf away pair camp +["shift", "badge", "heavy", "action", "tube", "divide", "course", "quality", "capable", "velvet", "cart", "marriage", "vague", "aware", "maximum", "exist", "crime", "file", "analyst", "great", "cabbage", "course", "sad", "apology"] ``` We can now create a **Cardano** wallet using the `/v2/wallets` API endpoint: @@ -633,15 +632,7 @@ curl --request POST \ }' | jq ``` -Our requests payload data looks like this: - -```json -{ - "name": "test2", - "mnemonic_sentence": ["kit", "soup", "various", "toe", "cloud", "humor", "clip", "radio", "medal", "ladder", "casino", "sock", "various", "distance", "staff", "analyst", "success", "trade", "deal", "split", "leaf", "away", "pair", "camp"], - "passphrase": "test123456" -} -``` +Our requests payload data is composed of: `name` : The name of the wallet. @@ -706,10 +697,10 @@ If succesful, you should see something like this: Initially, the newly created/restored wallet will need to be synced before it can be used. You can verify if the wallet is already synced by executing the following request: ```bash -curl --request GET --url http://localhost:1337/v2/wallets/c4d4e240d499cce3fed8fd885491803885fdf323 | jq '.state' +curl --url http://localhost:1337/v2/wallets/5076b34c6949dbd150eb9c39039037543946bdce | jq '.state' ``` -***It is important to note that the `c4d4e240d499cce3fed8fd885491803885fdf323` string is actually the `wallet.id` of the previously generated wallet.*** +***It is important to note that the `5076b34c6949dbd150eb9c39039037543946bdce` string is actually the `wallet.id` of the previously generated wallet.*** You should see something like this: @@ -726,8 +717,7 @@ Now that we have created a wallet, we can now request some tAda from the **Testn We can do that by executing the command: ```bash -curl --request GET \ - --url 'http://localhost:1337/v2/wallets/5076b34c6949dbd150eb9c39039037543946bdce/addresses?state=unused' | jq '.[0]' +curl --url 'http://localhost:1337/v2/wallets/5076b34c6949dbd150eb9c39039037543946bdce/addresses?state=unused' | jq '.[0]' ``` The result should be something like this: @@ -747,15 +737,14 @@ The result should be something like this: ``` It is important to note that the parameter of this request is the **wallet id** of the target wallet you want to get the address. In this case it is `5076b34c6949dbd150eb9c39039037543946bdce` our previously generated wallet. -We are basically querying the first wallet address that has not been used just yet, Indicated by `state: "unused"`. As we can see the wallet address value is: `addr_test1qpnjt8umuwr5f2y59avklhu8hd7h2uf4zfanxxr4nmqqsaw679hxgdmrtsjequ8ka27rm8366e6p7au9y89h6slmrjwskfmcef` +We are basically querying the first wallet address that has not been used just yet, Indicated by `state: "unused"`. As we can see the wallet address value is: `addr_test1qzf9q3qjcaf6kxshwjfw9ge29njtm56r2a08g49l79xgt4je0592agqpwraqajx2dsu2sxj64uese5s4qum293wuc00q7j6vsp"` Now we can finally request some `tAda` for the wallet address from the [Cardano Testnet Faucet](../integrate-cardano/testnet-faucet). Once you requested some `tAda` from the [Cardano Testnet Faucet](../integrate-cardano/testnet-faucet), we can then check if it has arrived into our wallet like so: ```bash -curl --request GET \ - --url http://localhost:1337/v2/wallets/5076b34c6949dbd150eb9c39039037543946bdce | jq '.balance' +curl --url http://localhost:1337/v2/wallets/5076b34c6949dbd150eb9c39039037543946bdce | jq '.balance' ``` You should see something like this: @@ -786,13 +775,14 @@ To have a clearer understanding of how sending transactions work using `cardano- **Generate recovery-phrase** ```bash -cardano-wallet recovery-phrase generate +cardano-wallet recovery-phrase generate | jq -c --raw-input 'split(" ")' ``` **Recovery-phrase result** ``` -then tattoo copy glance silk kitchen kingdom pioneer off path connect artwork alley smooth also foil glare trouble erupt move position merge scale echo +["then", "tattoo", "copy", "glance", "silk", "kitchen", "kingdom", "pioneer", "off", "path", "connect", "artwork", "alley", "smooth", "also", "foil", "glare", "trouble", "erupt", "move", "position", "merge", "scale", "echo"] ``` + **Create Wallet Request** ```bash curl --request POST \ @@ -869,8 +859,7 @@ We now have the following wallets: Now let's say that we want to send `250,000,000 lovelaces` to `test_cf_2` wallet. Well first we have to get `test_cf_2` wallet address like so: ```bash -curl --request GET \ - --url 'http://localhost:1337/v2/wallets/4a64b453ad1c1d33bfec4d3ba90bd2456ede35bb/addresses?state=unused' | jq '.[0]' +curl --url 'http://localhost:1337/v2/wallets/4a64b453ad1c1d33bfec4d3ba90bd2456ede35bb/addresses?state=unused' | jq '.[0]' ``` and we should see something like this: @@ -916,8 +905,7 @@ Remember, we use the `test_cf_1` wallet id in the `http://localhost:1337/v2/wall Now we can check `test_cf_2` wallet balance like so: ```bash -curl --request GET \ - --url http://localhost:1337/v2/wallets/4a64b453ad1c1d33bfec4d3ba90bd2456ede35bb | jq '.balance' +curl --url http://localhost:1337/v2/wallets/4a64b453ad1c1d33bfec4d3ba90bd2456ede35bb | jq '.balance' ``` And we should see that indeed the `250,000,000 tAda` has been received (***you might need to wait for a few seconds***). diff --git a/docs/native-tokens/minting-nfts.md b/docs/native-tokens/minting-nfts.md index 360c80b651..a0899190b7 100644 --- a/docs/native-tokens/minting-nfts.md +++ b/docs/native-tokens/minting-nfts.md @@ -116,8 +116,11 @@ cd nft/ ### Set variables We will set important values in a more readable variable for better readability and debugging of failed transactions. + +Since cardano-node version 1.31.0 the token name should be in hex format. We will set the variable $realtokenname (real name in utf-8) and then convert it to $tokenname (name in hex format). ```bash -tokenname=$(echo -n "NFT1" | xxd -b -ps -c 80 | tr -d '\n') +realtokenname="NFT1" +tokenname=$(echo -n $realtokenname | xxd -b -ps -c 80 | tr -d '\n') tokenamount="1" fee="0" output="0" @@ -314,7 +317,7 @@ If you want to generate it "on the fly," use the following commands: echo "{" >> metadata.json echo " \"721\": {" >> metadata.json echo " \"$(cat policy/policyID)\": {" >> metadata.json -echo " \"$(echo $tokenname)\": {" >> metadata.json +echo " \"$(echo $realtokenname)\": {" >> metadata.json echo " \"description\": \"This is my first NFT thanks to the Cardano foundation\"," >> metadata.json echo " \"name\": \"Cardano foundation NFT guide token\"," >> metadata.json echo " \"id\": \"1\"," >> metadata.json diff --git a/docs/operate-a-stake-pool/overview.md b/docs/operate-a-stake-pool/overview.md index b54d9be812..e3e2b41f04 100644 --- a/docs/operate-a-stake-pool/overview.md +++ b/docs/operate-a-stake-pool/overview.md @@ -58,3 +58,4 @@ You also have to build your pool around a brand that manages to attract enough s - [Coin Cashew Guides](https://www.coincashew.com/coins/overview-ada/guide-how-to-build-a-haskell-stakepool-node) for stake pool operators. - [Pool Veterinary](http://pool.vet) will help you see if your Cardano stake pool is working and find out why it may not be. - [SPOCRA](https://members.spocra.io) includes the Stake Pool installation guide from the registered trade guild - Stake Pool Operator Collective Representation Assembly +- [RaspberryPi with Docker](https://github.com/speedwing/cardano-staking-pool-edu) Full guide to build and run both testnet and mainnet Cardano Stake Pool with Docker on Raspberry Pi. [Youtube Playlist](https://www.youtube.com/playlist?list=PLBhbLwOuj0DfTnneuG3vyoDHY7Dv_aiyq) diff --git a/docs/stake-pool-course/handbook/grafana-dashboard-tutorial.md b/docs/stake-pool-course/handbook/grafana-dashboard-tutorial.md index 9eda2a6aac..f113d8895a 100644 --- a/docs/stake-pool-course/handbook/grafana-dashboard-tutorial.md +++ b/docs/stake-pool-course/handbook/grafana-dashboard-tutorial.md @@ -9,8 +9,7 @@ image: ./img/og-developer-portal.png Once the Cardano pool sucessfully set-up, then comes the most beautifull part - setting up your Dashboard and Alerts! -This documentation brings some of the available information in greater detail and will hopefully it help the Cardano Community. -This tutorial is for education and learning purpose only! +This documentation brings some of the available information in greater detail and will hopefully help Stake Pool Operators in managing their pools more efficiently. This tutorial is for education and learning purpose only! diff --git a/package.json b/package.json index cec4c587c6..7518f94fb9 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "scripts": { "docusaurus": "docusaurus", "start": "docusaurus start", - "build": "ts-node scripts/cip.ts && ts-node scripts/rust-library.ts && docusaurus build", + "build": "ts-node scripts/cip.ts && ts-node scripts/token-registry.ts && ts-node scripts/rust-library.ts && docusaurus build", "swizzle": "docusaurus swizzle", "deploy": "docusaurus deploy", "serve": "docusaurus serve", diff --git a/scripts/rust-library.ts b/scripts/rust-library.ts index 31593b8064..7e09164515 100644 --- a/scripts/rust-library.ts +++ b/scripts/rust-library.ts @@ -15,7 +15,7 @@ const getStringContentAsync = async (url: string) => { const stringManipulation = (content: string, fileName: string) => { // Replace empty links - content = content.replace(']()', ']'); + content = content.replace( /\]\(\)/gm, ']'); // Inject rust library additional info content = injectRLInformation(content, fileName); @@ -27,10 +27,10 @@ const stringManipulation = (content: string, fileName: string) => { const injectDocusaurusDocTags = (content: string, fileName: string) => { // Replace '-' from url in order to create a clean sidebar label - const modifiedUrl = fileName.replace('-', ' ') + const modifiedFileName = fileName.replace(/[-]/gm, ' ') // Capitalize the first letter of each word - let sidebarLabel = modifiedUrl.toLowerCase().replace(/(^\w{1})|(\s{1}\w{1})/g, match => match.toUpperCase()); + let sidebarLabel = modifiedFileName.toLowerCase().replace(/(^\w{1})|(\s{1}\w{1})/g, match => match.toUpperCase()); // Remove '---' from doc to add it later content = content.substring(0, 3) === '---' ? content.slice(3) : content; diff --git a/scripts/token-registry.ts b/scripts/token-registry.ts new file mode 100644 index 0000000000..bb9c5cb4bf --- /dev/null +++ b/scripts/token-registry.ts @@ -0,0 +1,183 @@ +import fetch from 'node-fetch'; +import * as fs from 'fs'; + +const tokenRegistryDocsPath: string = './docs/native-tokens/token-registry'; +const tokenRegistryUrl: string = 'https://github.com/cardano-foundation/cardano-token-registry/blob/master/'; +const tokenRegistryOverviewUrl: string = 'https://raw.githubusercontent.com/cardano-foundation/cardano-token-registry/master/README.md'; +const tokenRegistryWiki: string = 'https://github.com/cardano-foundation/cardano-token-registry/wiki'; +const repoRawWikiHomeUrl: string = 'https://raw.githubusercontent.com/wiki/cardano-foundation/cardano-token-registry/'; + +const getStringContentAsync = async (url: string) => { + return await fetch(url).then(res => res.text()); +} + +// Fetch and manipulate overview markdown file +const getOverviewMarkdown = async () => { + + // Fetch raw overview file + const content = await getStringContentAsync(tokenRegistryOverviewUrl); + + // Modify content to ensure compatibility + const modifiedContent = overviewStringManipulation(content); + + return modifiedContent; +} + +// Manipulate URL string +const tokenRegistryStringManipulation = (content: string) => { + + // Encode symbols for url purpose + content = encodeURIComponent(content); + + // Replace encoded %20 space with '-' (needs to be replaced in order to fetch data from the correct link) + content = content.replace(/\%20/g, '-'); + + // Replace '(' with '%28' for url purpose (is not included in URIComponent function) + content = content.replace(/\(/g, '%28'); + + // Replace ')' with '%29' for url purpose (is not included in URIComponent function) + content = content.replace(/\)/g, '%29'); + + return content; +} + +// Manipulate markdown file name +const markdownStringManipulation = (content: string) => { + + // Encode symbols for url purpose + content = encodeURIComponent(content); + + // Replace encoded %20 space with '-' + content = content.replace(/\%20/g, '-'); + + // Replace '?' with '%3F' + content = content.replace(/\?/g, '%3F'); + + // Replace '(' with '' + content = content.replace(/\(/g, ''); + + // Replace ')' with '' + content = content.replace(/\)/g, ''); + + // Remove ' + content = content.replace(/\'/g, ''); + + return content; +} + +// String manipulations to ensure compatibility +const stringManipulation = (content: string, fileName: string) => { + + // Remove `(` and `)` from relative links (temporariy not in use, using hardcoded solution for now) + // content = content.replace(/(?<=\]\()(.*)(?=\))/g, (x) => x.replace(/[()]/g, '')); + + // Remove `(` and `)` from relative links (temporariy solution focusing on specific link, in the future needs to be changed to work through all of the links) + content = content.replace('How-to-prepare-an-entry-for-the-registry-(NA-policy-script)', + 'How-to-prepare-an-entry-for-the-registry-NA-policy-script'); + + content = injectTRnformation(content, fileName); + + return content; +} + +// Inject extra docusarus doc tags +const injectDocusaurusDocTags = (content: string, url: string) => { + + // Remove '---' from doc to add it later + content = content.substring(0, 3) === '---' ? content.slice(3) : content; + + // Remove '\'' from url to avoid issues during project build + url = url.match(/\'/g) ? url.replace(/\'/g, "") : url; + + // Add '---' with doc tags for Docusaurus + content = '--- \nsidebar_label: ' + url + '\ntitle: ' + url + '\n' + sidebar_positionForFilename(url) + '\n--- ' + '\n' + content; + + return content; +} + +// Inject extra docusaurus doc tags and manipulate overview markdown file content +const overviewStringManipulation = (content: string) => { + + // Extra content + const extraContent = '--- \nid: cardano-token-registry \ntitle: Cardano Token Registry \nsidebar_label: Overview \ndescription: The Cardano Token Registry provides a means to register off-chain token metadata that can map to on-chain identifiers. \nimage: ./img/og-developer-portal.png \nsidebar_position: 1 \n--- \nThe [Cardano Token Registry](https://github.com/cardano-foundation/cardano-token-registry) provides a means to register off-chain token metadata to map to on-chain identifiers (typically hashes representing asset IDs, output locking scripts, or token forging policies).\n\n'; + + // Add extra content + content = extraContent + content; + + // Remove unused content + content = content.replace('# cardano-token-registry', '').split('## Step-by-Step')[0]; + + // Replace relative links to absolute links. + content = content.replace(/\bRegistry_Terms_of_Use.md\b/g, tokenRegistryUrl + 'Registry_Terms_of_Use.md'); + content = content.replace(/\bAPI_Terms_of_Use.md\b/g, tokenRegistryUrl + 'API_Terms_of_Use.md'); + content = content.replace(/\(\bmappings\b/g, '(' + tokenRegistryUrl + 'mappings'); + + // Inject token registry link info + content = content + ' \n## Token Registry Information \nThis page was generated automatically from: ['+tokenRegistryUrl+']('+tokenRegistryUrl + '/' + 'README.md' + ').'; + + return content; +} + +// In case we want a specific sidebar_position for a certain filename (otherwise alphabetically) +const sidebar_positionForFilename = (fileName: string) => { + if (fileName === 'How to prepare an entry for the registry (NA policy script)') return 'sidebar_position: 2\n'; + if (fileName === 'How to prepare an entry for the registry (Plutus script)') return 'sidebar_position: 3\n'; + if (fileName === 'gHow to submit an entry to the registry') return 'sidebar_position: 4\n'; + return ''; // empty string means alphabetically within the sidebar +} + +// Add Token Registry Info +const injectTRnformation = (content: string, fileName: string) => { + + // Add to the end + return content + ' \n## Token Registry Information \nThis page was generated automatically from: ['+tokenRegistryWiki+']('+tokenRegistryWiki + '/' + fileName + ').'; +} + +const main = async () => { + console.log('Token Registry Content Downloading...'); + + // Fetch raw wiki content for token registry + const wikiHomeContent = await getStringContentAsync(`${repoRawWikiHomeUrl}Home.md`); + + // Fetch raw overview content for token registry + const overviewContent = await getOverviewMarkdown(); + + // Find wiki file names in order to fetch them individually + const contentUrls = wikiHomeContent.match(/(?<=\[\[)(.*?)(?=\]\])/g); + const tokeRegistryUniqueUrls = [...new Set(contentUrls)]; + + // Create token registry folder to store markdown files locally + fs.rmdirSync(tokenRegistryDocsPath, { recursive: true }); + fs.mkdirSync(tokenRegistryDocsPath, { recursive: true }); + + // Create markdown overview file locally with downloaded content + fs.writeFileSync(`${tokenRegistryDocsPath}/Overview.md`, overviewContent); + + // Save token registry markdown files into docs folder + await Promise.all(tokeRegistryUniqueUrls.map(async (trUrl) => { + + // Get token registry url + const tokenRegistryUrl = await tokenRegistryStringManipulation(trUrl); + + // Get markdown file names + const markdownFileName = await markdownStringManipulation(trUrl); + + // Download markdown files + const content = await getStringContentAsync(`${repoRawWikiHomeUrl}${tokenRegistryUrl}.md`); + + // Manipulate content to ensure compatibility + const manipulatedContent = await stringManipulation(content, tokenRegistryUrl); + + // Finish manipulation with injecting docosautus doc tags + const manipulatedContentWithDocTags = injectDocusaurusDocTags(manipulatedContent, trUrl); + + // Create markdown files locally with downloaded content + fs.writeFileSync(`${tokenRegistryDocsPath}/${markdownFileName}.md`, manipulatedContentWithDocTags); + console.log(`Downloaded to ${tokenRegistryDocsPath}/${markdownFileName}.md`); + + })); + + console.log('Token Registry Content Downloaded'); +} + +main(); \ No newline at end of file diff --git a/sidebars.js b/sidebars.js index d1a9fde81d..d958228b76 100644 --- a/sidebars.js +++ b/sidebars.js @@ -57,7 +57,18 @@ module.exports = { "native-tokens/overview", "native-tokens/minting", "native-tokens/minting-nfts", - "native-tokens/cardano-token-registry" + { + type: "category", + label: "Token Registry", + items: [ + { + // Generate sidebar automatically from docs/native-tokens/token-registry + type: 'autogenerated', + dirName: 'native-tokens/token-registry', + }, + ], + }, + ], "Create Smart Contracts": [ "smart-contracts/overview", diff --git a/src/data/builder-tools.js b/src/data/builder-tools.js index d6362848a2..82dc9bb739 100644 --- a/src/data/builder-tools.js +++ b/src/data/builder-tools.js @@ -251,6 +251,23 @@ const Showcases = [ getstarted: null, tags: ["plutus", "nft"], }, + { + title: "Cardano Light Tools", + description: + "A set of lightweight tools to operate and maintain a Cardano Stake Pool. Currently includes a leaderlog script based on BlockFrost (no need for working cardano-cli/cardano-node setup and less CPU/mem utilization) and a monitoring script to log relevant metrics directly into a text file in human-readable form (less complex and more resource-efficient than Grafana).", + preview: require("./builder-tools/cardano-light-tools.png"), + website: "https://github.com/orpheus-antpool/cardano-light-tools", + getstarted: null, + tags: ["operatortool"], + }, + { + title: "cardano-wallet-interface", + description: "A Javascript/Typescript library to easily interact with the dApp connector of various wallets", + preview: require("./builder-tools/cardano-wallet-interface.png"), + website: "https://github.com/HarmonicPool/cardano-wallet-interface", + getstarted: null, + tags: ["library"], + }, ]; diff --git a/src/data/builder-tools/cardano-light-tools.png b/src/data/builder-tools/cardano-light-tools.png new file mode 100644 index 0000000000..d2386f8b8a Binary files /dev/null and b/src/data/builder-tools/cardano-light-tools.png differ diff --git a/src/data/builder-tools/cardano-wallet-interface.png b/src/data/builder-tools/cardano-wallet-interface.png new file mode 100644 index 0000000000..0f52ddaf91 Binary files /dev/null and b/src/data/builder-tools/cardano-wallet-interface.png differ diff --git a/src/data/showcase/adadice.png b/src/data/showcase/adadice.png new file mode 100644 index 0000000000..6346e402ec Binary files /dev/null and b/src/data/showcase/adadice.png differ diff --git a/src/data/showcase/muesliswap.png b/src/data/showcase/muesliswap.png new file mode 100644 index 0000000000..68df10db1a Binary files /dev/null and b/src/data/showcase/muesliswap.png differ diff --git a/src/data/showcases.js b/src/data/showcases.js index f5b13153e2..d9c4d99129 100644 --- a/src/data/showcases.js +++ b/src/data/showcases.js @@ -119,6 +119,13 @@ export const Tags = { "Cardano wallets store the public and/or private keys to access and manage your funds.", icon: null, }, + + // DEX + dex: { + label: "DEX", + description: "DEX allows direct peer-to-peer cryptocurrency transactions to take place online securely.", + icon: null, + }, }; // Add your project to (THE END OF) this list. @@ -693,6 +700,24 @@ const Showcases = [ source: null, tags: ["nft"], }, + { + title: "ADAdice", + description: + "A fully on-chain, provably fair game of dice on the Cardano blockchain.", + preview: require("./showcase/adadice.png"), + website: "https://www.adadice.com", + source: null, + tags: ["game"], + }, + { + title: "MuesliSwap", + description: + "MuesliSwap is a new decentralized exchange (DEX) operating on the Smart Bitcoin Cash blockchain and Cardano.", + preview: require("./showcase/muesliswap.png"), + website: "https://ada.muesliswap.com", + source: null, + tags: ["dex"], + }, ]; export const TagList = Object.keys(Tags); diff --git a/yarn.lock b/yarn.lock index 8078d7b31c..e2e3ccf8ee 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4684,9 +4684,9 @@ flux@^4.0.1: fbjs "^3.0.0" follow-redirects@^1.0.0, follow-redirects@^1.14.0: - version "1.14.5" - resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.14.5.tgz#f09a5848981d3c772b5392309778523f8d85c381" - integrity sha512-wtphSXy7d4/OR+MvIFbCVBDzZ5520qV8XfPklSN5QtxuMUJZ+b0Wnst1e1lCDocfzuCkHqj8k0FpZqO+UIaKNA== + version "1.14.7" + resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.14.7.tgz#2004c02eb9436eee9a21446a6477debf17e81685" + integrity sha512-+hbxoLbFMbRKDwohX8GkTataGqO6Jb7jGwpAlwgy2bIz25XtRm7KEzJM76R1WiNT5SwZkX4Y75SwBolkpmE7iQ== fork-ts-checker-webpack-plugin@^6.0.5: version "6.5.0" @@ -5446,6 +5446,13 @@ is-core-module@^2.2.0: dependencies: has "^1.0.3" +is-core-module@^2.8.0: + version "2.8.1" + resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.8.1.tgz#f59fdfca701d5879d0a6b100a40aa1560ce27211" + integrity sha512-SdNCUs284hr40hFTFP6l0IfZ/RSrMXF3qgoRHd3/79unUTvrFO/JoXwkGm+5J/Oe3E/b5GsnG330uUNgRpu1PA== + dependencies: + has "^1.0.3" + is-date-object@^1.0.1: version "1.0.5" resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.5.tgz#0841d5536e724c25597bf6ea62e1bd38298df31f" @@ -6618,7 +6625,7 @@ path-key@^3.0.0, path-key@^3.1.0: resolved "https://registry.yarnpkg.com/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375" integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== -path-parse@^1.0.6: +path-parse@^1.0.6, path-parse@^1.0.7: version "1.0.7" resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735" integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw== @@ -7620,7 +7627,16 @@ resolve-pathname@^3.0.0: resolved "https://registry.yarnpkg.com/resolve-pathname/-/resolve-pathname-3.0.0.tgz#99d02224d3cf263689becbb393bc560313025dcd" integrity sha512-C7rARubxI8bXFNB/hqcp/4iUeIXJhJZvFPFPiSPRnhU5UPxzMFIl+2E6yY6c4k9giDJAhtV+enfA+G89N6Csng== -resolve@^1.1.6, resolve@^1.14.2, resolve@^1.3.2: +resolve@^1.1.6: + version "1.21.0" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.21.0.tgz#b51adc97f3472e6a5cf4444d34bc9d6b9037591f" + integrity sha512-3wCbTpk5WJlyE4mSOtDLhqQmGFi0/TD9VPwmiolnk8U0wRgMEktqCXd3vy5buTO3tljvalNvKrjHEfrd2WpEKA== + dependencies: + is-core-module "^2.8.0" + path-parse "^1.0.7" + supports-preserve-symlinks-flag "^1.0.0" + +resolve@^1.14.2, resolve@^1.3.2: version "1.20.0" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.20.0.tgz#629a013fb3f70755d6f0b7935cc1c2c5378b1975" integrity sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A== @@ -7917,9 +7933,9 @@ shell-quote@^1.7.2: integrity sha512-Vpfqwm4EnqGdlsBFNmHhxhElJYrdfcxPThu+ryKS5J8L/fhAwLazFZtq+S+TWZ9ANj2piSQLGj6NQg+lKPmxrw== shelljs@^0.8.4: - version "0.8.4" - resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.8.4.tgz#de7684feeb767f8716b326078a8a00875890e3c2" - integrity sha512-7gk3UZ9kOfPLIAbslLzyWeGiEqx9e3rxwZM0KE6EL8GlGwjym9Mrlx5/p33bWTu9YG6vcS4MBxYZDHYr5lr8BQ== + version "0.8.5" + resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.8.5.tgz#de055408d8361bed66c669d2f000538ced8ee20c" + integrity sha512-TiwcRcrkhHvbrZbnRcFYMLl30Dfov3HKqzp5tO5b4pt6G/SezKcYhmDg15zXVBswHmctSAQKznqNW2LO5tTDow== dependencies: glob "^7.0.0" interpret "^1.0.0" @@ -8203,6 +8219,11 @@ supports-color@^8.0.0: dependencies: has-flag "^4.0.0" +supports-preserve-symlinks-flag@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz#6eda4bd344a3c94aea376d4cc31bc77311039e09" + integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w== + svg-parser@^2.0.2: version "2.0.4" resolved "https://registry.yarnpkg.com/svg-parser/-/svg-parser-2.0.4.tgz#fdc2e29e13951736140b76cb122c8ee6630eb6b5"