diff --git a/astro.config.mjs b/astro.config.mjs index dfe311b..34c2080 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -26,7 +26,7 @@ export default defineConfig({ label: "Getting Started", items: [ { label: "Introduction", slug: "index" }, - { label: "Tokenomics", slug: "concepts/tokenomics" }, + { label: "Tokenomics", slug: "getting-started/tokenomics" }, { label: "Concepts & Terminology", slug: "getting-started/concepts", @@ -40,14 +40,14 @@ export default defineConfig({ { label: "v0.5", items: [ - { label: "Control Space", slug: "v05/control-space" }, - { label: "Permission System", slug: "v05/permissions" }, + { label: "Control Space", slug: "explanations/v05/control-space" }, + { label: "Permission System", slug: "explanations/v05/permissions" }, { label: "Capability Permissions", - slug: "v05/capability-permissions", + slug: "explanations/v05/capability-permissions", }, - { label: "Emission Permissions", slug: "v05/emission-permissions" }, - { label: "Governance & DAO", slug: "concepts/governance-dao" }, + { label: "Emission Permissions", slug: "explanations/v05/emission-permissions" }, + { label: "Governance & DAO", slug: "explanations/v05/governance-dao" }, ], }, { @@ -62,7 +62,7 @@ export default defineConfig({ ], }, { - label: "Leaders", + label: "Goal Leaders", collapsed: false, items: [ { label: "Root Agents", slug: "explanations/root-agents/root-agents" }, @@ -89,10 +89,10 @@ export default defineConfig({ items: [ { label: "Setup CLI", slug: "how-to-guides/builders/setup-cli" }, { label: "Register an Agent", slug: "how-to-guides/builders/register-an-agent" }, - { label: "Edit your Agent", slug: "how-to-guides/builders/edit-your-agent" }, - { label: "Create a Signal", slug: "how-to-guides/builders/create-signal" }, { label: "Setup Agent Server", slug: "how-to-guides/builders/setup-agent-server" }, { label: "Setup Agent Client", slug: "how-to-guides/builders/setup-agent-client" }, + { label: "Edit your Agent", slug: "how-to-guides/builders/edit-your-agent" }, + { label: "Create a Signal", slug: "how-to-guides/builders/create-signal" }, ], }, { @@ -104,33 +104,48 @@ export default defineConfig({ }, ], }, - { - label: "CLI & Tools", - items: [ - { label: "Key Management", slug: "cli/key-management" }, - { label: "Balance Operations", slug: "cli/balance-operations" }, - ], - }, + // { + // label: "Web Apps", + // items: [ + // { label: "Torus Portal", slug: "web-apps/torus-portal" }, + // { label: "Torus Allocator", slug: "web-apps/torus-allocator" }, + // { label: "Torus Wallet", slug: "web-apps/torus-wallet" }, + // { label: "Torus DAO", slug: "web-apps/torus-dao" }, + // ], + // }, { label: "Development", items: [ + { label: "Start Here", slug: "development/start-here" }, { - label: "Web Apps Overview and Setup", - slug: "development/web-apps-overview-and-setup", + label: "Web Apps", + collapsed: false, + items: [ + { + label: "Overview and Setup", + slug: "development/web/overview-and-setup", + }, + { + label: "Querying Data", + slug: "development/web/querying-data", + }, + ], }, { - label: "Querying Data", - slug: "development/querying-data", + label: "CLI Reference", + collapsed: false, + items: [ + { label: "Key Management", slug: "development/cli/key-management" }, + { label: "Balance Operations", slug: "development/cli/balance-operations" }, + ], }, - ], - }, - { - label: "Network Operations", - items: [ - { label: "Global Parameters", slug: "network/global-parameters" }, { - label: "Running a Node", - slug: "network/running-node", + label: "Network Operations", + collapsed: false, + items: [ + { label: "Global Parameters", slug: "development/network/global-parameters" }, + { label: "Running a Node", slug: "development/network/running-node" }, + ], }, ], }, diff --git a/src/content/docs/concepts/agents.mdx b/src/content/docs/concepts/agents.mdx deleted file mode 100644 index 6d28f40..0000000 --- a/src/content/docs/concepts/agents.mdx +++ /dev/null @@ -1,26 +0,0 @@ ---- -title: What are Agents -description: Learn what an agent is in Torus. ---- - -import { CardGrid, LinkCard } from "@astrojs/starlight/components"; - -Agents are the same primitive in the blockchain but differ in their offchain role. -Both are registered keys, paired with an offchain object, able to receive weights by the allocator, determining their share in the emissions. - -This primitive separates all computation from the chain and allows agents to be arbitrarily complex and computationally expensive. - -**Agents are entities, either autonomous or human, that perform actions that align with Torus interests.** - - - - - diff --git a/src/content/docs/concepts/network-overview.mdx b/src/content/docs/concepts/network-overview.mdx deleted file mode 100644 index a2066ac..0000000 --- a/src/content/docs/concepts/network-overview.mdx +++ /dev/null @@ -1,64 +0,0 @@ ---- -title: Mainnet Concepts & Terminology -description: Learn the basic concepts and terminology of Torus. ---- - -import { - CardGrid, - LinkCard, - Aside, - Steps, -} from "@astrojs/starlight/components"; - - -### Network -The network consists of a dynamic set of registered agents competing to attract incentive from the allocator to earn TORUS. Incentives are weight-based, representing share in the continuous emission distribution. - -### Agent - -An agent is a key registered to the network, paired with an off-chain entity, either autonomous or human, that performs actions that align with Torus interests. - -### Allocator - -The allocator is a permissionless web platform maintained by _Renlabs_, enabling stakeholders to allocate incentive weights among agents. Users delegate TORUS to the allocator key, setting weights with their stake through the platform to receive dividends. - -### Curator - -The curator serves as the regulatory entity of the network, overseeing the agent and incentive landscape to ensure alignment with protocol interests. The curator has two primary permissions: - - - -1. **Managing the Agent Whitelist:** Approving agents to join the network and removing those that become misaligned. - -2. **Applying Penalty Factors:** Issuing penalties on agents that scale both the agent's incentives and the dividends of users who set weights on them. This mechanism helps correct and penalize over-incentivization, leveraging common sense to detect misalignment. - - - -The curator's decision-making system operates off-chain and is adaptable, functioning as an agent, a DAO or a trusted community member. - -Multiple specialized curators can operate in parallel, each permissioned by the root curator. The root curator can itself be replaced by the Torus DAO at any time. - -### Torus DAO - -The Torus DAO is a fully on-chain, TORUS stake-based governance system, managing the protocol through community proposals. It can modify network parameters, dynamically adjust emission rate, and allocate resources between the network and treasury to align with TORUS interests. - -### Torus treasury - -The treasury is a DAO-owned key that accumulates emissions and receives transfers. Treasury funds are managed via DAO proposals to support ecosystem initiatives. - -### Weights - -Weights provide an expressive format for granularly representing the relative value of agents within the network, guiding the distribution of incentives. For example, an agent with a weight of 0.01 holds a 1% share of the total incentives being continuously distributed. - - - - - diff --git a/src/content/docs/cli/balance-operations.mdx b/src/content/docs/development/cli/balance-operations.mdx similarity index 95% rename from src/content/docs/cli/balance-operations.mdx rename to src/content/docs/development/cli/balance-operations.mdx index 8119f21..04b4752 100644 --- a/src/content/docs/cli/balance-operations.mdx +++ b/src/content/docs/development/cli/balance-operations.mdx @@ -43,4 +43,4 @@ The unstaking command is defined as follows: torus balance unstake ``` -You can also specify the name of the key, if it's located on your disk. Same as in transferring or staking. +You can also specify the name of the key, if it's located on your disk. Same as in transferring or staking. \ No newline at end of file diff --git a/src/content/docs/cli/key-management.mdx b/src/content/docs/development/cli/key-management.mdx similarity index 94% rename from src/content/docs/cli/key-management.mdx rename to src/content/docs/development/cli/key-management.mdx index bb11326..86de96a 100644 --- a/src/content/docs/cli/key-management.mdx +++ b/src/content/docs/development/cli/key-management.mdx @@ -45,7 +45,7 @@ This command displays both public and private key details, ensuring you have acc To list all keys stored on your system, execute: ```sh -# Lists the names and addresses of keys stored on disk. +# Lists the names and addresses of keys stored on disk. torus key list ``` @@ -69,4 +69,4 @@ You can also sort the balance by **all, free, staked** (default all summed balan torus key balances --sort-balance free ``` -Will return the keys sorted by their free balance. +Will return the keys sorted by their free balance. \ No newline at end of file diff --git a/src/content/docs/network/global-parameters.mdx b/src/content/docs/development/network/global-parameters.mdx similarity index 99% rename from src/content/docs/network/global-parameters.mdx rename to src/content/docs/development/network/global-parameters.mdx index 623e3d4..64a08af 100644 --- a/src/content/docs/network/global-parameters.mdx +++ b/src/content/docs/development/network/global-parameters.mdx @@ -86,4 +86,4 @@ You can query all of these global parameters using CLI: ```bash torus network params -``` +``` \ No newline at end of file diff --git a/src/content/docs/network/running-node.mdx b/src/content/docs/development/network/running-node.mdx similarity index 98% rename from src/content/docs/network/running-node.mdx rename to src/content/docs/development/network/running-node.mdx index d43fa18..fcab94c 100644 --- a/src/content/docs/network/running-node.mdx +++ b/src/content/docs/development/network/running-node.mdx @@ -85,4 +85,4 @@ cargo xtask run local --alice ## Additional Information -- You can customize your node's configuration by modifying the appropriate files in the project. +- You can customize your node's configuration by modifying the appropriate files in the project. \ No newline at end of file diff --git a/src/content/docs/development/start-here.mdx b/src/content/docs/development/start-here.mdx new file mode 100644 index 0000000..28929a7 --- /dev/null +++ b/src/content/docs/development/start-here.mdx @@ -0,0 +1,60 @@ +--- +title: Start Here +description: Technical documentation and tools for developing with and on Torus. +--- +import { + Steps, + Aside, + CardGrid, + Card, + Tabs, + TabItem +} from "@astrojs/starlight/components"; + +Welcome to the **Development** section of the Torus documentation. + +This section provides comprehensive technical resources for developers building with Torus — from setting up development environments to running nodes and managing keys. +Whether you're integrating with existing web apps, querying data, or running your own infrastructure, you'll find the technical details here. + +## Web Application Development + +Building and integrating with the Torus ecosystem: + +- [Overview and Setup](https://docs.torus.network/development/web/overview-and-setup/) — Setting up the development environment and understanding the monorepo structure +- [Querying Data](https://docs.torus.network/development/web/querying-data/) — API operations for retrieving stake allocation and network data + +--- + +## CLI & Tools + +Command-line operations for key and balance management: + +- [Key Management](https://docs.torus.network/development/cli/key-management/) — Creating, importing, and managing cryptographic keys +- [Balance Operations](https://docs.torus.network/development/cli/balance-operations/) — Transferring and staking operations via CLI + +--- + +## Network Infrastructure + +Running and configuring Torus network infrastructure: + +- [Global Parameters](https://docs.torus.network/development/network/global-parameters/) — Understanding and configuring blockchain parameters +- [Running a Node](https://docs.torus.network/development/network/running-node/) — Setting up and operating a Torus Substrate node + +--- + +## Questions Not Covered Here? + +Need help with development tasks? The community is here to help: + +- **[Discord](https://discord.gg/torus)** — Technical discussions, support, and announcements +- **[Telegram](https://t.me/torusnetwork)** — General chat and announcements +- **[Twitter](https://x.com/torus_network)** — Updates and ecosystem news + +### Core Projects + +Explore the open source code to understand implementation details: + +- **[torus-substrate](https://github.com/renlabs-dev/torus-substrate)** — Core blockchain runtime built on Substrate +- **[torus-ts](https://github.com/renlabs-dev/torus-ts)** — TypeScript SDK for building on Torus and WebApps +- **[torus-docs](https://github.com/renlabs-dev/torus-docs)** — This documentation \ No newline at end of file diff --git a/src/content/docs/development/web-apps-install-and-run(old).mdx b/src/content/docs/development/web-apps-install-and-run(old).mdx deleted file mode 100644 index 8c3af0b..0000000 --- a/src/content/docs/development/web-apps-install-and-run(old).mdx +++ /dev/null @@ -1,148 +0,0 @@ ---- -title: Web Apps Install and Run -description: Learn how to install and run the torus-ts ---- - -import { - Badge, - Steps, - Tabs, - TabItem, - Aside, -} from "@astrojs/starlight/components"; - -This guide will walk you through the process of installing and running the `torus-ts` monorepo. - -## Prerequisites - -- **Node.js** - `20.16.0` or higher. -- **PNPM** - `9.7.1` or higher. -- **Docker** - [installation guide](https://docs.docker.com/get-docker/). -- **Just** - [installation guide](https://github.com/casey/just). - -##### Docker Tip - -If you have difficulties or want alternatives to simplify using Docker, consider: - -- [Colima](https://github.com/abiosoft/colima): A lightweight solution for running containers on macOS. -- [Orbstack](https://orbstack.dev/): A fast and efficient alternative for managing containers. - -## Monorepo setup - -
- - - -1. ##### Clone the repository - - - - ```bash git clone git@github.com:renlabs-dev/torus-ts.git ``` Clone - using the web URL. - - - ```bash https://github.com/renlabs-dev/torus-ts.git ``` Use a - password-protected SSH key. - - - ```bash gh repo clone renlabs-dev/torus-ts ``` Use the [GitHub - CLI](https://cli.github.com/). - - - -
- -2. ##### Install the dependencies - - ```bash - pnpm install - # or - just install - ``` - -
- -3. ##### Configure environment variables - - There is an `.env.example` in the root directory you can use for reference - - ```bash - cp .env.example .env - ``` - -
- -4. ##### Setup database - - - - Create a postgres container with docker: - - ```bash - docker run --name torus-db-container \ - -e POSTGRES_PASSWORD=password \ - -e POSTGRES_DB=torus-ts-db \ - -e POSTGRES_USER=postgres \ - -p 1337:1337 \ - -d postgres:16-alpine \ - postgres -p 1337 - ``` - - Push the Drizzle schema to the database: - - ```bash - just db-push - ``` - - You can also use the `just db-studio` command to open a GUI provided by [Drizzle](https://orm.drizzle.team/drizzle-studio/overview). - -
- -5. ##### Build the project - - ```bash - just build - ``` - - - -
- -6. ##### Run the project - - From the root directory, run the following command: - - ```bash - just dev - ``` - - - - From the app directory, run the following command: - - ```bash - pnpm run dev - ``` - - - -
- - - -
diff --git a/src/content/docs/development/web-apps-overview(old).mdx b/src/content/docs/development/web-apps-overview(old).mdx deleted file mode 100644 index d5a2046..0000000 --- a/src/content/docs/development/web-apps-overview(old).mdx +++ /dev/null @@ -1,48 +0,0 @@ ---- -title: Introduction -description: Learn how to build into Torus typescript ecosystem ---- - -import { LinkCard, Aside } from "@astrojs/starlight/components"; - -These docs will guide you through the process of building / integrating with Torus web apps. We provide a set of tools and libraries to help you build and contribute to the Torus ecosystem. - -The ecosystem is built using a monorepo with [Turborepo](https://turbo.build/repo/docs), which allows us to share code and tools across different projects. - -## Web Apps - - - - - - - - - diff --git a/src/content/docs/development/web-apps-overview-and-setup.mdx b/src/content/docs/development/web/overview-and-setup.mdx similarity index 98% rename from src/content/docs/development/web-apps-overview-and-setup.mdx rename to src/content/docs/development/web/overview-and-setup.mdx index 131b745..6796e69 100644 --- a/src/content/docs/development/web-apps-overview-and-setup.mdx +++ b/src/content/docs/development/web/overview-and-setup.mdx @@ -53,7 +53,7 @@ For detailed setup instructions, see the setup guide below. diff --git a/src/content/docs/development/querying-data.mdx b/src/content/docs/development/web/querying-data.mdx similarity index 98% rename from src/content/docs/development/querying-data.mdx rename to src/content/docs/development/web/querying-data.mdx index 362ef0b..4088654 100644 --- a/src/content/docs/development/querying-data.mdx +++ b/src/content/docs/development/web/querying-data.mdx @@ -39,4 +39,4 @@ The API response has the following structure: + \ No newline at end of file diff --git a/src/content/docs/explanations/builders/agent-registration.mdx b/src/content/docs/explanations/builders/agent-registration.mdx index cb789cb..127cf7c 100644 --- a/src/content/docs/explanations/builders/agent-registration.mdx +++ b/src/content/docs/explanations/builders/agent-registration.mdx @@ -17,6 +17,14 @@ import { Agent registration in Torus creates discoverable entities that can receive, create, and delegate permissions within the network. Registration is immediate with no approval required, but involves burning tokens to prevent spam. + + ### Registration Economics Agent registration requires permanently burning tokens: @@ -38,7 +46,7 @@ Agent metadata is stored off-chain via IPFS but referenced on-chain through cont - **[Root Agents](https://docs.torus.network/explanations/root-agents/root-agents/)** - Agents that receive emissions directly - **[Permission System](https://docs.torus.network/v05/permissions/)** - How agents interact and delegate authority -- **[Governance & DAO](https://docs.torus.network/concepts/governance-dao/)** - Understanding DAO decision-making processes +- **[Governance & DAO](https://docs.torus.network/explanations/v05/governance-dao/)** - Understanding DAO decision-making processes