From c7831e382d6e3cce141d4256387ebb8f031c4220 Mon Sep 17 00:00:00 2001 From: Matias Benary Date: Tue, 15 Jul 2025 01:34:42 -0300 Subject: [PATCH 1/4] feat: add script to generate and include llms.txt in build --- website/scripts/copy-md-to-static.js | 221 ++++++++++++++++++++++----- 1 file changed, 187 insertions(+), 34 deletions(-) diff --git a/website/scripts/copy-md-to-static.js b/website/scripts/copy-md-to-static.js index 75b2a5840f..bb55d6cd11 100644 --- a/website/scripts/copy-md-to-static.js +++ b/website/scripts/copy-md-to-static.js @@ -9,27 +9,27 @@ const { URL } = require('url'); async function fetchGitHubCode(tag) { // Replace single quotes with double quotes for consistent parsing const normalizedTag = tag.replace(/'/g, '"'); - + // Extract URL from the tag const urlMatch = normalizedTag.match(/url="(.*?)"/); if (!urlMatch) return null; - + let url = urlMatch[1]; // Remove hash fragment url = url.split('#')[0]; - + // Parse URL and extract components const urlObj = new URL(url); const pathSegments = urlObj.pathname.slice(1).split('/'); - + if (pathSegments.length < 4) return null; - + const [org, repo, , branch, ...pathSeg] = pathSegments; const filePath = pathSeg.join('/'); - + // Construct raw GitHub URL const rawUrl = `https://raw.githubusercontent.com/${org}/${repo}/${branch}/${filePath}`; - + try { // Fetch the code const response = await axios.get(rawUrl); @@ -47,17 +47,17 @@ async function fetchGitHubCode(tag) { // Extract code lines based on start/end parameters and format as code block function formatCodeBlock(codeData, language = '') { const { code, normalizedTag } = codeData; - + // Extract line numbers const startMatch = normalizedTag.match(/start="(\d*)"/); const endMatch = normalizedTag.match(/end="(\d*)"/); - + const codeLines = String(code).split('\n'); const start = startMatch ? Math.max(parseInt(startMatch[1]) - 1, 0) : 0; const end = endMatch ? parseInt(endMatch[1]) + 1 : codeLines.length; - + const selectedCode = codeLines.slice(start, end).join('\n'); - + // Return formatted code block with optional language syntax highlighting return `\`\`\`${language}\n${selectedCode}\n\`\`\``; } @@ -65,24 +65,24 @@ function formatCodeBlock(codeData, language = '') { async function replaceTagsWithCode(content, tagName, includeLanguage = false) { const tagRegex = new RegExp(`<${tagName}\\s[^>]*?(?:\\/>|>[^<]*<\\/${tagName}>)`, 'g'); const tags = content.match(tagRegex) || []; - + for (const tag of tags) { const codeData = await fetchGitHubCode(tag); - + if (codeData) { let language = ''; - + // Extract language if needed (for File tags) if (includeLanguage) { const languageMatch = codeData.normalizedTag.match(/language="(.*?)"/); language = languageMatch ? languageMatch[1] : ''; } - + const codeBlock = formatCodeBlock(codeData, language); content = content.replace(tag, codeBlock); } } - + return content; } @@ -118,7 +118,7 @@ async function cleanContent(content) { function generatePath(filePath) { const content = fs.readFileSync(filePath, 'utf8'); - + const frontmatterMatch = content.match(/^---\s*\n([\s\S]*?)\n---/); let id = null; if (frontmatterMatch) { @@ -130,35 +130,188 @@ function generatePath(filePath) { } const relativePath = path.relative(DOCS_DIR, filePath); + const dirPath = path.dirname(relativePath); - + let newFilename; if (id) { newFilename = `${id}.md`; } else { newFilename = path.basename(filePath); } - + return path.join(BUILD_DIR, dirPath, newFilename); } -// Get all markdown files from the docs directory -const allMarkdownFiles = glob.sync(path.join(DOCS_DIR, '**/*.md'));; +function extractFrontmatter(content) { + const frontmatter = {}; + let body = content; + + if (content.startsWith('---\n')) { + const endIndex = content.indexOf('\n---\n', 4); + if (endIndex !== -1) { + const frontmatterText = content.substring(4, endIndex); + body = content.substring(endIndex + 5); + const lines = frontmatterText.split('\n'); + for (const line of lines) { + const colonIndex = line.indexOf(':'); + if (colonIndex > 0) { + const key = line.substring(0, colonIndex).trim(); + const value = line.substring(colonIndex + 1).trim().replace(/^["']|["']$/g, ''); + frontmatter[key] = value; + } + } + } + } + + return { frontmatter, body }; +} + +function getDescription(content) { + const lines = content.split('\n'); + for (const line of lines) { + const trimmed = line.trim(); + if (trimmed && + trimmed.length > 0) { + return trimmed + } + } + return '' +} + +async function checkLink(url) { + try { + const response = await axios.head(url, { timeout: 5000 }); + return { url, status: response.status, ok: true }; + } catch (error) { + const status = error.response?.status || 'NO RESPONSE'; + console.log(`āŒ ${url} - ${status}`); + return { url, status, ok: false }; + } +} -// Process each markdown file -allMarkdownFiles.forEach(async (filePath) => { - // Read the file content - let content = fs.readFileSync(filePath, 'utf8'); - // Clean the content - content = await cleanContent(content); - // Write the cleaned content back to the file +const allMarkdownFiles = glob.sync(path.join(DOCS_DIR, '**/*.md')); - const outputPath = generatePath(filePath); - const outputDir = path.dirname(outputPath); +async function processMarkdownFiles() { + const documentationPages = {}; + + await Promise.all( + allMarkdownFiles.map(async (markdownFilePath) => { + let fileContent = fs.readFileSync(markdownFilePath, 'utf8'); + + fileContent = await cleanContent(fileContent); + + const outputFilePath = generatePath(markdownFilePath); + const outputDirectory = path.dirname(outputFilePath); - if (!fs.existsSync(outputDir)) { - fs.mkdirSync(outputDir, { recursive: true }); + if (!fs.existsSync(outputDirectory)) { + fs.mkdirSync(outputDirectory, { recursive: true }); + } + fs.writeFileSync(outputFilePath, fileContent, 'utf8'); + + const relativeFilename = path.relative(DOCS_DIR, markdownFilePath); + + if (relativeFilename === "index.md" || relativeFilename === "help.md") { + return; + } + + const pathSegments = relativeFilename.split('/'); + const sectionName = pathSegments[0]; + const fileName = pathSegments.pop(); + const alternativeId = fileName.replace('.md', ''); + + if (!documentationPages[sectionName]) { + documentationPages[sectionName] = []; + } + + const { frontmatter, body } = extractFrontmatter(fileContent); + const pageDescription = getDescription(body); + + if (pageDescription.startsWith('#') || + pageDescription.startsWith('import') || + pageDescription.startsWith(':::') || + pageDescription.startsWith('![')) { + console.warn(`Warning: No valid description found in ${relativeFilename}`); + } + + const pageTitle = frontmatter.title || + frontmatter.sidebar_label || + alternativeId.replace(/[-_]/g, ' ').replace(/\b\w/g, letter => letter.toUpperCase()); + + const pageUrl = `${pathSegments.join("/")}/${frontmatter.id ? frontmatter.id + ".md" : fileName}`; + const pageId = frontmatter.id || alternativeId; + + documentationPages[sectionName].push({ + title: pageTitle, + url: pageUrl, + description: pageDescription, + id: pageId, + }); + }) + ); + + const documentationSections = { + "protocol": { name: "Core Protocol" }, + "ai": { name: "AI and Agents" }, + "chain-abstraction": { name: "Chain Abstraction" }, + "smart-contracts": { name: "Smart Contracts" }, + "web3-apps": { name: "Web3 Applications" }, + "primitives": { name: "Tokens and Primitives" }, + "tools": { name: "Developer Tools" }, + "tutorials": { name: "Tutorials and Examples" }, + "api": { name: "API Reference" }, + "data-infrastructure": { name: "Data Infrastructure" }, + "integrations": { name: "Integration Examples" }, + "resources": { name: "Resources" } + }; + + let documentationContent = `# NEAR Protocol Documentation + +> NEAR is a layer-1 blockchain built for scale and multichain compatibility, featuring AI-native infrastructure and chain abstraction capabilities. This documentation covers smart contracts, Web3 applications, AI agents, cross-chain development, and the complete NEAR ecosystem. +NEAR Protocol is a proof-of-stake blockchain that enables developers to build decentralized applications with seamless user experiences. Key features include human-readable account names, minimal transaction fees, and built-in developer tools. The platform supports multiple programming languages and provides chain abstraction for cross-blockchain interactions. +This documentation is organized into several main sections: Protocol fundamentals, AI and agent development, chain abstraction features, smart contract development, Web3 application building, and comprehensive API references. Each section includes tutorials, examples, and detailed technical specifications. + +`; + const links =[]; + for (const sectionKey in documentationSections) { + const section = documentationSections[sectionKey]; + const sectionPages = documentationPages[sectionKey] || []; + + let sectionContent = `## ${section.name}\n\n`; + + for (const page of sectionPages) { + const cleanDescription = (page.description || page.title) + .replace(/\s*\n\s*/g, ' ') + .trim(); + links.push(`https://docs.near.org/${page.url}`); + + sectionContent += `- [${page.title}](https://docs.near.org/${page.url}): ${cleanDescription}\n`; + } + + documentationContent += sectionContent + '\n'; } - fs.writeFileSync(outputPath, content, 'utf8'); -}); + + const outputFilePath = path.join(BUILD_DIR, 'llms.txt'); + const outputDirectory = BUILD_DIR; + + if (!fs.existsSync(outputDirectory)) { + fs.mkdirSync(outputDirectory, { recursive: true }); + } + + fs.writeFileSync(outputFilePath, documentationContent, 'utf-8'); + + console.log("Checking links..."); + const results = await Promise.all(links.map(checkLink)); + const broken = results.filter(r => !r.ok); + if (broken.length > 0) { + console.log('\nšŸ”“ Broken URLs:'); + broken.forEach(b => console.log(`${b.url} - Status: ${b.status}`)); + } else { + console.log('🟢 All links are valid'); + } +} + +processMarkdownFiles(); + + From 6e065185175d7ec6bbf88bf1deca603aea8a1355 Mon Sep 17 00:00:00 2001 From: Guillermo Alejandro Gallardo Diez Date: Wed, 16 Jul 2025 15:51:43 +0200 Subject: [PATCH 2/4] chore: minor changes --- website/scripts/copy-md-to-static.js | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/website/scripts/copy-md-to-static.js b/website/scripts/copy-md-to-static.js index bb55d6cd11..96e3e3f250 100644 --- a/website/scripts/copy-md-to-static.js +++ b/website/scripts/copy-md-to-static.js @@ -204,16 +204,13 @@ async function processMarkdownFiles() { const outputFilePath = generatePath(markdownFilePath); const outputDirectory = path.dirname(outputFilePath); - if (!fs.existsSync(outputDirectory)) { - fs.mkdirSync(outputDirectory, { recursive: true }); - } + if (!fs.existsSync(outputDirectory)) fs.mkdirSync(outputDirectory, { recursive: true }); + fs.writeFileSync(outputFilePath, fileContent, 'utf8'); const relativeFilename = path.relative(DOCS_DIR, markdownFilePath); - if (relativeFilename === "index.md" || relativeFilename === "help.md") { - return; - } + if (relativeFilename === "index.md" || relativeFilename === "help.md") return; const pathSegments = relativeFilename.split('/'); const sectionName = pathSegments[0]; @@ -312,6 +309,3 @@ This documentation is organized into several main sections: Protocol fundamental } processMarkdownFiles(); - - - From a4531c21788b0f32ce7a7723a5690bded53e5f37 Mon Sep 17 00:00:00 2001 From: Guillermo Alejandro Gallardo Diez Date: Wed, 16 Jul 2025 15:55:57 +0200 Subject: [PATCH 3/4] chore: make sure docs start with description --- docs/ai/shade-agents/examples.md | 2 -- docs/ai/shade-agents/production/deploying.md | 2 -- .../omnibridge/how-it-works.md | 2 -- docs/chain-abstraction/wallet.md | 2 -- docs/chain-abstraction/what-is.md | 2 -- docs/data-infrastructure/indexers.md | 2 -- .../building-indexers/js-lake-indexer.md | 7 ++----- .../building-indexers/nft-indexer.md | 16 ++++++---------- .../building-indexers/primitives.md | 2 -- .../building-indexers/python-nft-indexer.md | 17 ++++++----------- .../migrating-to-near-lake-framework.md | 3 --- .../running-near-lake/credentials.md | 2 -- .../running-near-lake/lake-start-options.md | 5 ----- .../running-near-lake/run-near-lake.md | 14 +++++--------- docs/integrations/accounts.md | 2 -- docs/integrations/balance.md | 2 -- docs/integrations/errors/token-loss.md | 10 +++++----- docs/protocol/data-flow/near-data-flow.md | 6 ++---- 18 files changed, 26 insertions(+), 72 deletions(-) diff --git a/docs/ai/shade-agents/examples.md b/docs/ai/shade-agents/examples.md index c2fc63d591..3859c8d2e8 100644 --- a/docs/ai/shade-agents/examples.md +++ b/docs/ai/shade-agents/examples.md @@ -4,8 +4,6 @@ title: What can you Build? sidebar_label: What can you Build? --- -# What can you build with Shade Agents? - With their extensive list of features, Shade Agents unlock a wide range of new use cases, enable many previously centralized apps to become decentralized, and change how blockchain applications are designed. ## Shade Agent Features diff --git a/docs/ai/shade-agents/production/deploying.md b/docs/ai/shade-agents/production/deploying.md index 81c76b54a9..3ad04cbef7 100644 --- a/docs/ai/shade-agents/production/deploying.md +++ b/docs/ai/shade-agents/production/deploying.md @@ -6,8 +6,6 @@ sidebar_label: Deploying an Agent import { SigsSupport } from '@site/src/components/sigsSupport'; -# Deploying an Agent - In this section we'll walk through deploying your first Shade Agent. The template we're using is a simple Shade Agent built with NextJS that acts as a verifiable ETH price oracle. It takes prices from two different APIs, takes the average and then pushes the price to an Ethereum contract. We'll cover two deployment scenarios: diff --git a/docs/chain-abstraction/omnibridge/how-it-works.md b/docs/chain-abstraction/omnibridge/how-it-works.md index 44e3b8db82..011fff1889 100644 --- a/docs/chain-abstraction/omnibridge/how-it-works.md +++ b/docs/chain-abstraction/omnibridge/how-it-works.md @@ -4,8 +4,6 @@ sidebar_label: How It Works title: How Omni Bridge Works --- -## Background - The journey toward truly trustless cross-chain communication took a significant leap forward when the NEAR team [created the first trustless bridge with Ethereum](https://near.org/blog/the-rainbow-bridge-is-live) (Rainbow Bridge). This pioneering achievement demonstrated that completely trustless cross-chain communication was possible, marking a crucial step toward the vision of chain abstraction. However, this approach relied on implementing a NEAR light client directly on Ethereum - essentially requiring Ethereum to understand and verify NEAR's complex blockchain rules. Omni Bridge introduces a more elegant solution using Chain Signatures. Instead of running light clients on each destination chain, it leverages Chain Signature's MPC Service to enable secure cross-chain message verification without the overhead of light client verification. This new approach reduces verification times from hours to minutes while significantly reducing gas costs across all supported chains. diff --git a/docs/chain-abstraction/wallet.md b/docs/chain-abstraction/wallet.md index 69d1812662..97e7cadc29 100644 --- a/docs/chain-abstraction/wallet.md +++ b/docs/chain-abstraction/wallet.md @@ -3,8 +3,6 @@ id: wallet title: Wallet Chain Key Rules --- -## Overview - In this article you'll find details on how to parse and present multichain transactions to the user so they can take an informed decision about their wallet's assets, while minimizing the number of times the user has to consent. You'll also learn how to ensure that a signature on one chain is not used to take a meaningful action on another chain. diff --git a/docs/chain-abstraction/what-is.md b/docs/chain-abstraction/what-is.md index 469702e037..a30ed2d814 100644 --- a/docs/chain-abstraction/what-is.md +++ b/docs/chain-abstraction/what-is.md @@ -6,8 +6,6 @@ import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; import {CodeTabs, Language, Github} from "@site/src/components/codetabs"; -# What is Chain Abstraction? - Blockchain development today faces a critical challenge: users need to understand complex blockchain concepts, manage multiple wallets, and deal with different networks just to use basic applications. Chain abstraction solves this by making blockchain technology invisible to end users while preserving all of the underlying benefits. ![img](/docs/assets/welcome-pages/2.chain-abstraction.png) diff --git a/docs/data-infrastructure/indexers.md b/docs/data-infrastructure/indexers.md index 0745888001..b74fe2d8e1 100644 --- a/docs/data-infrastructure/indexers.md +++ b/docs/data-infrastructure/indexers.md @@ -2,8 +2,6 @@ sidebar_label: "Intro to Indexers" --- -# Introduction to Indexers - Here you will find everything you need to know in order to familiarize yourself with the concept of indexers and even build your own one. :::info Disclaimer diff --git a/docs/data-infrastructure/lake-framework/building-indexers/js-lake-indexer.md b/docs/data-infrastructure/lake-framework/building-indexers/js-lake-indexer.md index 1b0f9600c3..8bcb10683f 100644 --- a/docs/data-infrastructure/lake-framework/building-indexers/js-lake-indexer.md +++ b/docs/data-infrastructure/lake-framework/building-indexers/js-lake-indexer.md @@ -4,8 +4,9 @@ title: JS basic tutorial sidebar_label: JS basic tutorial --- -# NEAR Lake indexer basic tutorial +Recently we have [published a JavaScript version of the NEAR Lake Framework](https://www.npmjs.com/package/near-lake-framework) on npmjs.org +We want to empower you with a basic tutorial on how to use the JavaScript Library. Let's get started! :::info Source code for the tutorial @@ -13,10 +14,6 @@ sidebar_label: JS basic tutorial ::: -Recently we have [published a JavaScript version of the NEAR Lake Framework](https://www.npmjs.com/package/near-lake-framework) on npmjs.org - -We want to empower you with a basic tutorial on how to use the JavaScript Library. Let's get started! - ## Requirements diff --git a/docs/data-infrastructure/lake-framework/building-indexers/nft-indexer.md b/docs/data-infrastructure/lake-framework/building-indexers/nft-indexer.md index 8d0cc79635..c732d4f6bb 100644 --- a/docs/data-infrastructure/lake-framework/building-indexers/nft-indexer.md +++ b/docs/data-infrastructure/lake-framework/building-indexers/nft-indexer.md @@ -2,8 +2,13 @@ sidebar_label: NFT Indexer --- -# Building an NFT indexer +This tutorial ends with a working NFT indexer built on top [NEAR Lake Framework JS](/data-infrastructure/lake-framework/near-lake-framework). The indexer is watching for `nft_mint` [Events](https://nomicon.io/Standards/EventsFormat) and prints some relevant data: +- `receiptId` of the [Receipt](/data-infrastructure/lake-data-structures/receipt) where the mint has happened +- Marketplace +- NFT owner account name +- Links to the NFTs on the marketplaces +The final source code is available on the GitHub [`near-examples/near-lake-nft-indexer`](https://github.com/near-examples/near-lake-nft-indexer) :::note Source code for the tutorial @@ -11,15 +16,6 @@ sidebar_label: NFT Indexer ::: -## The End - -This tutorial ends with a working NFT indexer built on top [NEAR Lake Framework JS](/data-infrastructure/lake-framework/near-lake-framework). The indexer is watching for `nft_mint` [Events](https://nomicon.io/Standards/EventsFormat) and prints some relevant data: -- `receiptId` of the [Receipt](/data-infrastructure/lake-data-structures/receipt) where the mint has happened -- Marketplace -- NFT owner account name -- Links to the NFTs on the marketplaces - -The final source code is available on the GitHub [`near-examples/near-lake-nft-indexer`](https://github.com/near-examples/near-lake-nft-indexer) ## Motivation diff --git a/docs/data-infrastructure/lake-framework/building-indexers/primitives.md b/docs/data-infrastructure/lake-framework/building-indexers/primitives.md index 415d0f6036..1c3952f0b0 100644 --- a/docs/data-infrastructure/lake-framework/building-indexers/primitives.md +++ b/docs/data-infrastructure/lake-framework/building-indexers/primitives.md @@ -4,8 +4,6 @@ title: NEAR Lake Primitive Types sidebar_label: Lake Primitive Types --- -# NEAR Lake Primitive Types - This article contains the primitive types used by the [NEAR Lake Framework package](https://www.npmjs.com/package/@near-lake/framework). These types are used to define the data structures used by the framework as well as provide some popular helper functions. ## `Block` diff --git a/docs/data-infrastructure/lake-framework/building-indexers/python-nft-indexer.md b/docs/data-infrastructure/lake-framework/building-indexers/python-nft-indexer.md index 0209622766..a5d3563346 100644 --- a/docs/data-infrastructure/lake-framework/building-indexers/python-nft-indexer.md +++ b/docs/data-infrastructure/lake-framework/building-indexers/python-nft-indexer.md @@ -2,17 +2,6 @@ sidebar_label: "NFT indexer for Python" --- -# Building an NFT indexer for Python - - -:::note Source code for the tutorial - -[`frolvanya/near-lake-nft-indexer`](https://github.com/frolvanya/near-lake-nft-indexer): source code for this tutorial - -::: - -## The Goal - This tutorial ends with a working NFT indexer built on top [NEAR Lake Framework for Python](/data-infrastructure/lake-framework/near-lake-framework/). The indexer is watching for `nft_mint` [Events](https://nomicon.io/Standards/EventsFormat) and prints some relevant data: - `receipt_id` of the [Receipt](/data-infrastructure/lake-data-structures/receipt) where the mint has happened - Marketplace @@ -21,6 +10,12 @@ This tutorial ends with a working NFT indexer built on top [NEAR Lake Framework The final source code is available on the GitHub [`frolvanya/near-lake-nft-indexer`](https://github.com/frolvanya/near-lake-nft-indexer) +:::note Source code for the tutorial + +[`frolvanya/near-lake-nft-indexer`](https://github.com/frolvanya/near-lake-nft-indexer): source code for this tutorial + +::: + ## Motivation NEAR Protocol had introduced a nice feature [Events](https://nomicon.io/Standards/EventsFormat). The Events allow a contract developer to add standardized logs to the [`ExecutionOutcomes`](/data-infrastructure/lake-data-structures/execution-outcome) thus allowing themselves or other developers to read those logs in more convenient manner via API or indexers. diff --git a/docs/data-infrastructure/lake-framework/migrating-to-near-lake-framework.md b/docs/data-infrastructure/lake-framework/migrating-to-near-lake-framework.md index 5a46d743b6..1758074854 100644 --- a/docs/data-infrastructure/lake-framework/migrating-to-near-lake-framework.md +++ b/docs/data-infrastructure/lake-framework/migrating-to-near-lake-framework.md @@ -3,9 +3,6 @@ sidebar_label: Migrating to NEAR Lake framework id: migrating-to-near-lake-framework --- -# Migrating to NEAR Lake Framework - - We encourage everyone who don't have a hard requirement to use [NEAR Indexer Framework](https://github.com/near/nearcore/tree/master/chain/indexer) consider the migration to [NEAR Lake Framework](/data-infrastructure/lake-framework/near-lake-framework). In this tutorial we'll show you how to migrate the project using [indexer-tx-watcher-example](https://github.com/near-examples/indexer-tx-watcher-example) as a showcase. diff --git a/docs/data-infrastructure/lake-framework/running-near-lake/credentials.md b/docs/data-infrastructure/lake-framework/running-near-lake/credentials.md index c0ed5bdc4d..9088b90094 100644 --- a/docs/data-infrastructure/lake-framework/running-near-lake/credentials.md +++ b/docs/data-infrastructure/lake-framework/running-near-lake/credentials.md @@ -3,8 +3,6 @@ sidebar_label: "Credentials" id: credentials --- -# Credentials - To access the data provided by [NEAR Lake](../near-lake.md) you need to provide valid AWS credentials in order to be charged by the AWS for the S3 usage. :::info AWS credentials diff --git a/docs/data-infrastructure/lake-framework/running-near-lake/lake-start-options.md b/docs/data-infrastructure/lake-framework/running-near-lake/lake-start-options.md index d2407b4411..2140d073bd 100644 --- a/docs/data-infrastructure/lake-framework/running-near-lake/lake-start-options.md +++ b/docs/data-infrastructure/lake-framework/running-near-lake/lake-start-options.md @@ -3,11 +3,6 @@ sidebar_label: "Start options" id: lake-start-options --- -# Extending Lake indexer with start options - - -## The End - This tutorial ends with the example code of the simple indexer built on top of [NEAR Lake Framework](/data-infrastructure/lake-framework/near-lake-framework) that can start: - from specified block height (out of the box) ```bash diff --git a/docs/data-infrastructure/lake-framework/running-near-lake/run-near-lake.md b/docs/data-infrastructure/lake-framework/running-near-lake/run-near-lake.md index 09cb8f70a7..288ba75047 100644 --- a/docs/data-infrastructure/lake-framework/running-near-lake/run-near-lake.md +++ b/docs/data-infrastructure/lake-framework/running-near-lake/run-near-lake.md @@ -3,7 +3,11 @@ id: run-lake-indexer sidebar_label: Running Lake Indexer --- -# Running NEAR Lake Indexer +The Lake Indexer setup consists of the following components: + +- AWS S3 Bucket as a storage +- NEAR Lake binary that operates as a regular NEAR Protocol peer-to-peer node, so you will operate it as + any other [Regular/RPC Node in NEAR](https://near-nodes.io/rpc/hardware-rpc) :::info @@ -12,14 +16,6 @@ to watch the network and store all the events as JSON files on AWS S3. ::: -## How to start - -The Lake Indexer setup consists of the following components: - -- AWS S3 Bucket as a storage -- NEAR Lake binary that operates as a regular NEAR Protocol peer-to-peer node, so you will operate it as - any other [Regular/RPC Node in NEAR](https://near-nodes.io/rpc/hardware-rpc) - ### Prepare Development Environment Before you proceed, make sure you have the following software installed: diff --git a/docs/integrations/accounts.md b/docs/integrations/accounts.md index 51aebaf860..30448fc7a4 100644 --- a/docs/integrations/accounts.md +++ b/docs/integrations/accounts.md @@ -7,8 +7,6 @@ sidebar_label: Accounts import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; -## Introduction {#introduction} - Please see the [documentation for accounts](/protocol/account-model) for basic information. - For exchanges, NEAR supports [implicit account](https://nomicon.io/DataStructures/Account.html#implicit-account-ids) creation which allows the creation of accounts without paying for transactions. diff --git a/docs/integrations/balance.md b/docs/integrations/balance.md index ba3fe101be..fcc9055c13 100644 --- a/docs/integrations/balance.md +++ b/docs/integrations/balance.md @@ -7,8 +7,6 @@ sidebar_label: Balance Changes import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; -## Prerequisites {#prerequisites} - - [NEAR Account](https://testnet.mynearwallet.com/create) - [NEAR-CLI](/tools/near-cli) - Credentials for sender account stored locally by running [`near login`](/tools/near-cli#import) diff --git a/docs/integrations/errors/token-loss.md b/docs/integrations/errors/token-loss.md index 3c05058b64..62cd3da73d 100644 --- a/docs/integrations/errors/token-loss.md +++ b/docs/integrations/errors/token-loss.md @@ -4,17 +4,17 @@ title: Avoiding Token Loss sidebar_label: Avoiding Token Loss --- -:::warning -Careful! Losing tokens means losing money! -::: - - Token loss is possible under multiple scenarios. These scenarios can be grouped into a few related classes: 1. Improper key management 2. Refunding deleted accounts 3. Failed function calls in batches +:::warning +Careful! Losing tokens means losing money! +::: + + --- ## Improper key management diff --git a/docs/protocol/data-flow/near-data-flow.md b/docs/protocol/data-flow/near-data-flow.md index f2c7b16238..a73234f79d 100644 --- a/docs/protocol/data-flow/near-data-flow.md +++ b/docs/protocol/data-flow/near-data-flow.md @@ -1,9 +1,9 @@ --- +title: NEAR Data Flow sidebar_label: "NEAR Data Flow" --- -# NEAR Data Flow - +NEAR Protocol blockchain data flow might be a bit tricky at a glance. But it is pretty straightforward and follows well-defined rules. In this article, we are going to have a closer look at how the data flows in NEAR Protocol blockchain.