Skip to content

Commit 2ed898c

Browse files
authored
docs: update introduction and add "Running Own Node" section and "Core Concepts" page (#8)
* chore: create "Running Own Node" section in sidebar * docs: move core conceps to a separate page and improve introduction
1 parent 8043b1a commit 2ed898c

File tree

7 files changed

+88
-49
lines changed

7 files changed

+88
-49
lines changed

.vitepress/config.mts

+9-3
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,15 @@ export default defineConfig({
2929
text: 'Getting Started',
3030
items: [
3131
{ text: 'Introduction', link: '/' },
32-
{ text: 'Installation', link: '/installation' },
33-
{ text: 'Configuration', link: '/configuration' },
34-
{ text: 'Testnet', link: '/testnet' },
32+
{ text: 'Core Concepts', link: '/core-concepts' },
33+
],
34+
},
35+
{
36+
text: 'Running Own Node',
37+
items: [
38+
{ text: 'Installation', link: '/own-node/installation' },
39+
{ text: 'Configuration', link: '/own-node/configuration' },
40+
{ text: 'Testnet', link: '/own-node/testnet' },
3541
],
3642
},
3743
{

api/websocket.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ To maintain reliability, use WebSocket for real-time updates and REST API to per
1818

1919
## Enabling WebSocket
2020

21-
To enable WebSocket on a node, enable it in the [configuration file](/configuration.md#websocket-client-configuration):
21+
To enable WebSocket on a node, enable it in the [configuration file](/own-node/configuration.md#websocket-client-configuration):
2222

2323
```json
2424
{

core-concepts.md

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# Core Concepts
2+
3+
Basic concepts of the ADAMANT blockchain you need to know if you're interacting with the blockchain or just running a node.
4+
5+
## Native Token
6+
7+
**ADM** is the native token of the ADAMANT blockchain. It’s used to pay transaction fees and can be transferred between accounts. For consistency and precision, ADM amounts and **fees** are stored as strings in transactions and measured in 1/10<sup>8</sup> ADM (1 ADM = 100,000,000).
8+
9+
## Transaction Fees
10+
11+
Every transaction in ADAMANT requires a fee, paid in ADM. Fees help prevent spam and support the network. Fees are intentionally very low, making ADAMANT affordable for active messaging.
12+
13+
Most transaction types have a fixed fee, but **Message** and **Key-Value Store** (KVS) transaction fees scale with content length.
14+
15+
You can get blockchain fees using the [`/api/blocks/getFees`](/api-endpoints/blockchain.md#get-blockchain-fees) API endpoint.
16+
17+
## Timestamps
18+
19+
A **timestamp** in ADAMANT shows how many seconds have passed since the creation of the blockchain — the **blockchain epoch**, set at September 2, 2017, 17:00:00 GMT+0.
20+
21+
For example, to convert time to ADAMANT's timestamp using TypeScript:
22+
23+
```ts
24+
const EPOCH = Date.UTC(2017, 8, 2, 17, 0, 0, 0);
25+
26+
/**
27+
* Converts provided timestamp into ADAMANT's epoch timestamp
28+
* @param time - timestamp in ms
29+
*/
30+
const getEpochTime = (time: number = Date.now()) =>
31+
Math.floor((time - EPOCH) / 1000);
32+
```
33+
34+
You can get blockchain's epoch time using [`/blocks/getEpochTime`](/api-endpoints/blockchain.md#get-blockchain-epoch) endpoint. Additionally, consider using [`/blocks/getStatus`](/api-endpoints/blockchain.md#get-adamant-blockchain-network-info) or [`/node/status`](/api-endpoints/blockchain.md#get-blockchain-and-network-status) endpoints to get more blockchain and network information in a single request.
35+
36+
## Milestones
37+
38+
Milestones define block rewards for delegates and are triggered at specific block heights.
39+
40+
You can use REST API to:
41+
42+
- [Get blockchain reward](/api-endpoints/blockchain.md#get-blockchain-reward)
43+
- [Get current milestone number](/api-endpoints/blockchain.md#get-blockchain-milestone)
44+
- [Retrieve both reward and milestone info in one call](/api-endpoints/blockchain.md#get-blockchain-and-network-status)

index.md

+34-45
Original file line numberDiff line numberDiff line change
@@ -1,55 +1,34 @@
11
# Introduction
22

3-
ADAMANT is a **decentralized** messenger driven by DPoS blockchain. Anyone can run a node, and users can interact with the network through REST and WebSocket APIs.
3+
ADAMANT is a **decentralized** messenger powered by a Delegated Proof of Stake (DPoS) blockchain. Anyone can run a node and interact with the network via REST and WebSocket APIs.
44

5-
Unlike traditional messengers, everything in ADAMANT is a blockchain transaction — messages, votes, transfers, and other actions are all recorded on the blockchain.
5+
You don’t have to run your own node to use the ADAMANT Messenger. It’s safe to use public nodes — all messages and transactions are **encrypted and signed locally** before being sent.
66

7-
## Native Token
7+
## Join the Decentralization
88

9-
**ADM** is the native token of the ADAMANT blockchain. It’s used to pay transaction fees and can be transferred between accounts. For consistency and precision, ADM amounts and **fees** are stored as strings in transactions and measured in 1/10<sup>8</sup> ADM (1 ADM = 100,000,000).
9+
### Run own node
1010

11-
## Transaction Fees
12-
13-
Every transaction in ADAMANT requires a fee, paid in ADM. Fees help prevent spam and support the network. Fees are intentionally very low, making ADAMANT affordable for active messaging.
14-
15-
Most transaction types have a fixed fee, but **Message** and **Key-Value Store** (KVS) transaction fees scale with content length.
16-
17-
You can get blockchain fees using the [`/api/blocks/getFees`](/api-endpoints/blockchain.md#get-blockchain-fees) API endpoint.
18-
19-
## Timestamps
20-
21-
A **timestamp** in ADAMANT shows how many seconds have passed since the creation of the blockchain — the **blockchain epoch**, set at September 2, 2017, 17:00:00 GMT+0.
22-
23-
For example, to convert time to ADAMANT's timestamp using TypeScript:
24-
25-
```ts
26-
const EPOCH = Date.UTC(2017, 8, 2, 17, 0, 0, 0);
11+
While you can connect to any ADAMANT node with an enabled API, it is recommended to [run your own node](https://news.adamant.im/how-to-run-your-adamant-node-on-ubuntu-990e391e8fcc) for the following reasons:
2712

28-
/**
29-
* Converts provided timestamp into ADAMANT's epoch timestamp
30-
* @param time - timestamp in ms
31-
*/
32-
const getEpochTime = (time: number = Date.now()) =>
33-
Math.floor((time - EPOCH) / 1000);
34-
```
13+
- **Support decentralization** – More nodes means stronger network
14+
- **Robust performance** – Requests are processed faster through your own node.
15+
- **High reliability** – You maintain full control over the API’s availability
3516

36-
You can get blockchain's epoch time using [`/blocks/getEpochTime`](/api-endpoints/blockchain.md#get-blockchain-epoch) endpoint. Additionally, consider using [`/blocks/getStatus`](/api-endpoints/blockchain.md#get-adamant-blockchain-network-info) or [`/node/status`](/api-endpoints/blockchain.md#get-blockchain-and-network-status) endpoints to get more blockchain and network information in a single request.
17+
To get started, check out the [Installation](/own-node/installation.md) and [Configuration](/own-node/configuration.md) guides — they cover everything you need to install, sync, and run a node.
3718

38-
## Milestones
19+
You can also run a [Testnet node](/own-node/testnet.md) to experiment and try out different things in a safe environment.
3920

40-
Milestones define block rewards for delegates and are triggered at specific block heights.
21+
::: tip
22+
If you're building a service with a near-100% uptime requirement, implement a health check in your application — similar to [adamant-api-jsclient](https://github.com/Adamant-im/adamant-api-jsclient/blob/07016c89b57863ac379ebfcbf6cf464a0639d3b1/src/api/index.ts#L183) or [the ADAMANT PWA](https://github.com/Adamant-im/adamant-im/blob/f5c7b7ce95fb5df3785a3458abc4e0b132c18791/src/lib/nodes/abstract.client.ts). While connecting to public nodes is possible, running three or more separate ADAMANT nodes is significantly more reliable.
23+
:::
4124

42-
You can use REST API to:
25+
### Become a delegate
4326

44-
- [Get blockchain reward](/api-endpoints/blockchain.md#get-blockchain-reward)
45-
- [Get current milestone number](/api-endpoints/blockchain.md#get-blockchain-milestone)
46-
- [Retrieve both reward and milestone info in one call](/api-endpoints/blockchain.md#get-blockchain-and-network-status)
27+
ADAMANT uses a **Delegated Proof of Stake (DPoS)** consensus. By running a node and meeting the criteria, you can [register as a delegate](https://news.adamant.im/how-to-become-an-adamant-delegate-745f01d032f), forge blocks, and earn rewards while contributing to network security.
4728

4829
## Public Nodes
4930

50-
ADAMANT uses a secure API. Transactions cannot be performed by transmitting a passphrase to the node. Instead, all actions require signed transactions, meaning there’s no difference in security whether you use a local or remote node.
51-
52-
To use ADAMANT, you don't need to run your own node — you can connect to any public node, such as:
31+
To use ADAMANT, you can connect to any public node, such as:
5332

5433
```csv
5534
https://lake.adamant.im
@@ -61,19 +40,29 @@ https://tauri.adm.im
6140

6241
However, **we still recommend running your own node** for reliability and performance and to help support decentralized messaging.
6342

64-
## Running own node
43+
## Interacting with the nodes
6544

66-
While you can connect to any ADAMANT node with an enabled API, it is recommended to [run your own node](https://news.adamant.im/how-to-run-your-adamant-node-on-ubuntu-990e391e8fcc) for the following reasons:
45+
If you're building a tool or app on the ADAMANT blockchain, you can use the REST API to interact with the network.
6746

68-
- **Support decentralization** – More nodes means stronger network
69-
- **Robust performance** – Requests are processed faster through your own node.
70-
- **High reliability** – You maintain full control over the API’s availability
47+
For real-time applications — such as messengers, or bots — the WebSocket API provides instant updates and optimal performance.
7148

72-
If you're building a service with a near-100% uptime requirement, implement a health check in your application — similar to [adamant-api-jsclient](https://github.com/Adamant-im/adamant-api-jsclient/blob/07016c89b57863ac379ebfcbf6cf464a0639d3b1/src/api/index.ts#L183) or [the ADAMANT PWA](https://github.com/Adamant-im/adamant-im/blob/f5c7b7ce95fb5df3785a3458abc4e0b132c18791/src/lib/nodes/abstract.client.ts). While connecting to public nodes is possible, running three or more separate ADAMANT nodes is significantly more reliable.
49+
### Choosing a node
50+
51+
You can connect to **any public node** in the ADAMANT network.
7352

74-
For messengers or bot applications, consider using a [Socket connection](/api/websocket.md) for optimal performance.
53+
To ensure you're on the correct network, check the node’s `nethash`. For the **mainnet**, the `nethash` is:
54+
55+
```
56+
bd330166898377fb28743ceef5e43a5d9d0a3efd9b3451fb7bc53530bb0a6d64
57+
```
58+
59+
You can check a node's `nethash` in its config or using the [`/api/blocks/getNethash`](/api-endpoints/blockchain.md#get-blockchain-nethash) endpoint. For example:
60+
61+
```url
62+
https://endless.adamant.im/api/blocks/getNethash
63+
```
7564

76-
## ADAMANT Frameworks
65+
### Community Libraries & Tools
7766

7867
This list includes some libraries and frameworks to interact with ADAMANT nodes **developed by the ADAMANT community**.
7968

File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)