Features
Admonitions
Note
There can even be customized admonitions!
Warning
Make sure to properly store and manage your private keys.
Tabbed Elements
| Endpoint | URL |
|---|---|
| Lorem ipsum | |
| consectetur | |
| sed do eiusmod | |
| ut labore et | |
| Endpoint | URL |
|---|---|
| Lorem ipsum | |
| ut labore et | |
Code Blocks
The following features are available for code blocks:
- Customized colors based on your branding
- Titles (i.e., the file name)
- Line numbers
- Highlighting specific lines
- Annnotations
For example:
| example.js | |
|---|---|
- Call the function without a user's name
Snippets
Snippets can be reusable text or code files. With the snippets, you can pull reusable content from a directory within your docs or an external URL. For example, if your code is in a separate GitHub repository, you can access it using the Raw GitHub URL
The following snippet is pulled in from a GitHub URL:
// Import the required packages
import Keyring from '@polkadot/keyring';
import { u8aToHex } from '@polkadot/util';
import { mnemonicToLegacySeed, hdEthereum } from '@polkadot/util-crypto';
// Import Ethereum account from mnemonic
const keyringECDSA = new Keyring({ type: 'ethereum' });
const mnemonic = 'INSERT_MNEMONIC';
// Define index of the derivation path and the derivation path
const index = 0;
const ethDerPath = "m/44'/60'/0'/0/" + index;
console.log(`Mnemonic: ${mnemonic}`);
console.log(`--------------------------\n`);
// Extract Ethereum address from mnemonic
const alice = keyringECDSA.addFromUri(`${mnemonic}/${ethDerPath}`);
console.log(`Ethereum Derivation Path: ${ethDerPath}`);
console.log(`Derived Ethereum Address from Mnemonic: ${alice.address}`);
// Extract private key from mnemonic
const privateKey = u8aToHex(
hdEthereum(mnemonicToLegacySeed(mnemonic, '', false, 64), ethDerPath)
.secretKey
);
console.log(`Derived Private Key from Mnemonic: ${privateKey}`);
Terminal Window
Easy to update and create terminal output that provides visual confirmation of commands to be run and what the expected output should look like.
npx hardhat init
888 888 888 888 888
888 888 888 888 888
888 888 888 888 888
8888888888 8888b. 888d888 .d88888 88888b. 8888b. 888888
888 888 "88b 888P" d88" 888 888 "88b "88b 888
888 888 .d888888 888 888 888 888 888 .d888888 888
888 888 888 888 888 Y88b 888 888 888 888 888 Y88b.
888 888 "Y888888 888 "Y88888 888 888 "Y888888 "Y888
👷 Welcome to Hardhat v2.22.2 👷
What do you want to do? … Create a JavaScript project Create a TypeScript project Create a TypeScript project (with Viem) Quit
👷 Welcome to Hardhat v2.22.2 👷
What do you want to do? … Create a JavaScript project Create a TypeScript project Create a TypeScript project (with Viem) Quit
Last update:
June 11, 2024
| Created: June 11, 2024
| Created: June 11, 2024