Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs structure overhaul updated #508

Merged
merged 5 commits into from
Sep 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
363 changes: 184 additions & 179 deletions .vitepress/config.mts

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ The tutorial is suitable for both experienced and novice users. It explains Iroh
- [Kotlin/Java](https://hyperledger.github.io/iroha-2-docs/guide/kotlin-java.html)
- [Javascript (TypeScript)](https://hyperledger.github.io/iroha-2-docs/guide/javascript.html)

If you are already familiar with Hyperledger Iroha, we invite you to read about [how Iroha 2 is different](https://hyperledger.github.io/iroha-2-docs/guide/iroha-2.html) from its previous version.
If you are already familiar with Hyperledger Iroha, we invite you to read about [how Iroha 2 is different](https://hyperledger.github.io/iroha-2-docs/get-started/iroha-2.html) from its previous version.

Check the [Hyperledger Iroha](https://github.com/hyperledger/iroha/) repository for more detailed information about API and available features.

Expand Down
File renamed without changes.
10 changes: 5 additions & 5 deletions src/guide/blockchain/assets.md → src/blockchain/assets.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ Assets can be [registered](./instructions.md#un-register),
Refer to one of the language-specific guides to walk you through the
process of registering and minting assets in a blockchain:

- [CLI](/guide/get-started/operate-iroha-2-via-cli.md#_6-register-and-mint-assets)
- [Rust](/guide/get-started/rust.md#_5-registering-and-minting-assets)
- [Kotlin/Java](/guide/get-started/kotlin-java.md#_5-registering-and-minting-assets)
- [Python](/guide/get-started/python.md#_5-registering-and-minting-assets)
- [JavaScript/TypeScript](/guide/get-started/javascript.md#_5-registering-and-minting-assets)
- [CLI](/get-started/operate-iroha-2-via-cli.md#_6-register-and-mint-assets)
- [Rust](/guide/tutorials/rust.md#_5-registering-and-minting-assets)
- [Kotlin/Java](/guide/tutorials/kotlin-java.md#_5-registering-and-minting-assets)
- [Python](/guide/tutorials/python.md#_5-registering-and-minting-assets)
- [JavaScript/TypeScript](/guide/tutorials/javascript.md#_5-registering-and-minting-assets)
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,11 @@ domain_looking_glass *-- account_rabbit : registered in

| Language | Guide |
| --------------------- |--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| CLI | Register a [domain](/guide/get-started/operate-iroha-2-via-cli.md#_3-register-a-domain), an [account](/guide/get-started/operate-iroha-2-via-cli.md#_4-register-an-account), an [asset](/guide/get-started/operate-iroha-2-via-cli.md#_6-register-and-mint-assets) |
| Rust | Register a [domain](/guide/get-started/rust.md#_3-registering-a-domain), an [account](/guide/get-started/rust.md#_4-registering-an-account), an [asset](/guide/get-started/rust.md#_5-registering-and-minting-assets) |
| Kotlin/Java | Register a [domain](/guide/get-started/kotlin-java.md#_3-querying-and-registering-domains), an [account](/guide/get-started/kotlin-java.md#_4-registering-an-account), an [asset](/guide/get-started/kotlin-java.md#_5-registering-and-minting-assets) |
| Python | Register a [domain](/guide/get-started/python.md#_3-registering-a-domain), an [account](/guide/get-started/python.md#_4-registering-an-account), an [asset](/guide/get-started/python.md#_5-registering-and-minting-assets) |
| JavaScript/TypeScript | Register a [domain](/guide/get-started/javascript.md#_3-registering-a-domain), an [account](/guide/get-started/javascript.md#_4-registering-an-account), an [asset](/guide/get-started/javascript.md#_5-registering-and-minting-assets) |
| CLI | Register a [domain](/get-started/operate-iroha-2-via-cli.md#_3-register-a-domain), an [account](/get-started/operate-iroha-2-via-cli.md#_4-register-an-account), an [asset](/get-started/operate-iroha-2-via-cli.md#_6-register-and-mint-assets) |
| Rust | Register a [domain](/guide/tutorials/rust.md#_3-registering-a-domain), an [account](/guide/tutorials/rust.md#_4-registering-an-account), an [asset](/guide/tutorials/rust.md#_5-registering-and-minting-assets) |
| Kotlin/Java | Register a [domain](/guide/tutorials/kotlin-java.md#_3-querying-and-registering-domains), an [account](/guide/tutorials/kotlin-java.md#_4-registering-an-account), an [asset](/guide/tutorials/kotlin-java.md#_5-registering-and-minting-assets) |
| Python | Register a [domain](/guide/tutorials/python.md#_3-registering-a-domain), an [account](/guide/tutorials/python.md#_4-registering-an-account), an [asset](/guide/tutorials/python.md#_5-registering-and-minting-assets) |
| JavaScript/TypeScript | Register a [domain](/guide/tutorials/javascript.md#_3-registering-a-domain), an [account](/guide/tutorials/javascript.md#_4-registering-an-account), an [asset](/guide/tutorials/javascript.md#_5-registering-and-minting-assets) |

:::

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Iroha Special Instructions

When we spoke about [how Iroha operates](/guide/blockchain/how-iroha-works), we
When we spoke about [how Iroha operates](/blockchain/iroha-explained), we
said that Iroha Special Instructions are the only way to modify the world
state. So, what kind of special instructions do we have? If you've read the
language-specific guides in this tutorial, you've already seen a couple of
Expand Down Expand Up @@ -40,7 +40,7 @@ all you need is the object that you want to register.
| [Mint/Burn](#mint-burn) | assets, triggers (trigger repetitions), permission tokens | accounts |
| [SetKeyValue/RemoveKeyValue](#setkeyvalue-removekeyvalue) | any objects that have [metadata](./metadata.md): accounts, domains, assets, asset definitions, triggers, transactions | |
| [NewParameter/SetParameter](#newparameter-setparameter) | Iroha configuration parameters | |
| [Grant/Revoke](#grant-revoke) | [roles, permission tokens](/guide/blockchain/permissions.md) | accounts |
| [Grant/Revoke](#grant-revoke) | [roles, permission tokens](/blockchain/permissions.md) | accounts |
| [Transfer](#transfer) | assets | accounts |
| [ExecuteTrigger](#executetrigger) | triggers | |
| [If, Pair, Sequence](#composite-instructions) | any instructions | |
Expand Down Expand Up @@ -109,11 +109,11 @@ process of registering objects in a blockchain:

| Language | Guide |
| --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| CLI | Register a [domain](/guide/get-started/operate-iroha-2-via-cli.md#_3-register-a-domain), an [account](/guide/get-started/operate-iroha-2-via-cli.md#_4-register-an-account), an [asset](/guide/get-started/operate-iroha-2-via-cli.md#_6-register-and-mint-assets) |
| Rust | Register a [domain](/guide/get-started/rust.md#_3-registering-a-domain), an [account](/guide/get-started/rust.md#_4-registering-an-account), an [asset](/guide/get-started/rust.md#_5-registering-and-minting-assets) |
| Kotlin/Java | Register a [domain](/guide/get-started/kotlin-java.md#_3-querying-and-registering-domains), an [account](/guide/get-started/kotlin-java.md#_4-registering-an-account), an [asset](/guide/get-started/kotlin-java.md#_5-registering-and-minting-assets) |
| Python | Register a [domain](/guide/get-started/python.md#_3-registering-a-domain), an [account](/guide/get-started/python.md#_4-registering-an-account), an [asset](/guide/get-started/python.md#_5-registering-and-minting-assets) |
| JavaScript/TypeScript | Register a [domain](/guide/get-started/javascript.md#_3-registering-a-domain), an [account](/guide/get-started/javascript.md#_4-registering-an-account), an [asset](/guide/get-started/javascript.md#_5-registering-and-minting-assets) |
| CLI | Register a [domain](/get-started/operate-iroha-2-via-cli.md#_3-register-a-domain), an [account](/get-started/operate-iroha-2-via-cli.md#_4-register-an-account), an [asset](/get-started/operate-iroha-2-via-cli.md#_6-register-and-mint-assets) |
| Rust | Register a [domain](/guide/tutorials/rust.md#_3-registering-a-domain), an [account](/guide/tutorials/rust.md#_4-registering-an-account), an [asset](/guide/tutorials/rust.md#_5-registering-and-minting-assets) |
| Kotlin/Java | Register a [domain](/guide/tutorials/kotlin-java.md#_3-querying-and-registering-domains), an [account](/guide/tutorials/kotlin-java.md#_4-registering-an-account), an [asset](/guide/tutorials/kotlin-java.md#_5-registering-and-minting-assets) |
| Python | Register a [domain](/guide/tutorials/python.md#_3-registering-a-domain), an [account](/guide/tutorials/python.md#_4-registering-an-account), an [asset](/guide/tutorials/python.md#_5-registering-and-minting-assets) |
| JavaScript/TypeScript | Register a [domain](/guide/tutorials/javascript.md#_3-registering-a-domain), an [account](/guide/tutorials/javascript.md#_4-registering-an-account), an [asset](/guide/tutorials/javascript.md#_5-registering-and-minting-assets) |

## Mint/Burn

Expand All @@ -130,16 +130,16 @@ are assumed to be non-negative as well, so you can never have $-1.0$ of
Refer to one of the language-specific guides to walk you through the
process of minting assets in a blockchain:

- [CLI](/guide/get-started/operate-iroha-2-via-cli.md#_6-register-and-mint-assets)
- [Rust](/guide/get-started/rust.md#_5-registering-and-minting-assets)
- [Kotlin/Java](/guide/get-started/kotlin-java.md#_5-registering-and-minting-assets)
- [Python](/guide/get-started/python.md#_5-registering-and-minting-assets)
- [JavaScript/TypeScript ](/guide/get-started/javascript.md#_5-registering-and-minting-assets)
- [CLI](/get-started/operate-iroha-2-via-cli.md#_6-register-and-mint-assets)
- [Rust](/guide/tutorials/rust.md#_5-registering-and-minting-assets)
- [Kotlin/Java](/guide/tutorials/kotlin-java.md#_5-registering-and-minting-assets)
- [Python](/guide/tutorials/python.md#_5-registering-and-minting-assets)
- [JavaScript/TypeScript ](/guide/tutorials/javascript.md#_5-registering-and-minting-assets)

Here are examples of burning assets:

- [CLI](/guide/get-started/operate-iroha-2-via-cli.md#_8-burn-assets)
- [Rust](/guide/get-started/rust.md#_7-burning-assets)
- [CLI](/get-started/operate-iroha-2-via-cli.md#_8-burn-assets)
- [Rust](/guide/tutorials/rust.md#_7-burning-assets)

## Transfer

Expand All @@ -149,7 +149,7 @@ can transfer assets between different accounts.
To do this, an account have to be granted the
[permission to transfer assets](/reference/permissions.md).
Refer to an example on how to
transfer assets with [CLI](/guide/get-started/operate-iroha-2-via-cli.md#_7-transfer-assets) or [Rust](/guide/get-started/rust.md#_6-transferring-assets).
transfer assets with [CLI](/get-started/operate-iroha-2-via-cli.md#_7-transfer-assets) or [Rust](/guide/tutorials/rust.md#_6-transferring-assets).

<!--TODO: add links to transferring assets example in which guide after https://github.com/hyperledger/iroha-2-docs/issues/81 is addressed -->

Expand All @@ -166,15 +166,15 @@ be used carefully.
## `SetKeyValue`/`RemoveKeyValue`

These instructions are used with the key/value
[`Store` asset type](/guide/blockchain/metadata.md#store-asset). This use
[`Store` asset type](/blockchain/metadata.md#store-asset). This use
case has not received much attention so far, because storing data in the
blockchain is a rather advanced topic that we shall cover separately.

## `NewParameter`/`SetParameter`

With these instructions, you can create (`NewParameter`) and change
(`SetParameter`) chain-wide
[configuration parameters](./../configure/client-configuration.md) for
[configuration parameters](/guide/configure/client-configuration.md) for
Iroha.

## `ExecuteTrigger`
Expand Down
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
# How Iroha works
# Iroha Explained

To understand how Iroha operates, let's draw parallels between a blockchain
and a computer. If the blockchain is the computer, then in this metaphor of
ours the client binary (for example: [`iroha`](/guide/get-started/operate-iroha-2-via-cli.md))
ours the client binary (for example: [`iroha`](/get-started/operate-iroha-2-via-cli.md))
is the keyboard, the blockchain is the hard drive, and the Iroha peer
software is the processor. Like a processor, Iroha accepts portable
instructions that modify what's written to the blockchain, allow certain
users to use the network, and lock others out.

Any operation that is run on-chain is written in terms of
[Iroha Special Instructions (ISI)](/guide/blockchain/instructions.md), and
[Iroha Special Instructions (ISI)](/blockchain/instructions.md), and
there is no other way of modifying the world state.

Each interaction with the blockchain is done via a _transaction_. A
transaction is a collection of _instructions_, which are either glued
together in sequence or compiled into what we affectionately call a
[WASM](/guide/blockchain/wasm.md) blob. You need these instructions to
[WASM](/blockchain/wasm.md) blob. You need these instructions to
register an account, remove an account, add X amount of Y currency, and so
on.

To read the information encoded in the blocks of a blockchain (the current
world state), you use [queries](/guide/blockchain/queries.md). Queries are
world state), you use [queries](/blockchain/queries.md). Queries are
submitted like instructions, but they're not tracked and recorded in
blocks, so they're much more lightweight. If you use queries as part of
complicated logic (e.g. inside WASM), they have a non-negligible impact on
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ The metadata can be of very different types, such as:
- request results

The object's metadata can be transferred one by one, or in bulk via a
[WASM](/guide/blockchain/wasm.md) transaction. The `Store` asset type is
[WASM](/blockchain/wasm.md) transaction. The `Store` asset type is
used for working with metadata. Let's take a closer look at this asset
type.

Expand Down Expand Up @@ -91,7 +91,7 @@ let set_hat_color = SetKeyValueBox::new(
## Working with metadata

The following example showcases how to register and grant a
[role](/guide/blockchain/permissions.md#permission-groups-roles) to access
[role](/blockchain/permissions.md#permission-groups-roles) to access
another account's metadata.

::: details Example
Expand Down Expand Up @@ -148,7 +148,7 @@ fn register_and_grant_role_for_metadata_access() -> Result<()> {
## Queries

You can get the key value of an object metadata using
[queries](/guide/blockchain/queries.md):
[queries](/blockchain/queries.md):

- [`FindAccountKeyValueByIdAndKey`](/reference/queries.md#findaccountkeyvaluebyidandkey)
- [`FindAssetKeyValueByIdAndKey`](/reference/queries.md#findassetkeyvaluebyidandkey)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ Before granting a role to an account, the role should be registered first.
### Register a new role

Let's register a new role that, when granted, will allow another account
access to the [metadata](/guide/blockchain/metadata.md) in Mouse's account:
access to the [metadata](/blockchain/metadata.md) in Mouse's account:

```rust
let role_id = RoleId::from_str("ACCESS_TO_MOUSE_METADATA")?;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,14 +77,14 @@ that match the specified filter.

## Sorting

Iroha 2 can sort items with [metadata](/guide/blockchain/metadata.md)
Iroha 2 can sort items with [metadata](/blockchain/metadata.md)
lexicographically if you provide a key to sort by during the construction
of the query. A typical use case is for accounts to have a `registered-on`
metadata entry, which, when sorted, allows you to view the account
registration history.

Sorting only applies to entities that have
[metadata](/guide/blockchain/metadata.md), as the metadata key is used to
[metadata](/blockchain/metadata.md), as the metadata key is used to
sort query results.

You can combine sorting with pagination and filters. Note that sorting is
Expand Down
File renamed without changes.
Loading
Loading