You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/develop/archive/mining.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -99,7 +99,7 @@ Yes, there is a third-party app—[TON Miner Bot](https://t.me/TonMinerBot).
99
99
#### <aid="faq-general-stats"></a>Where can I see mining statistics?
100
100
[ton.org/mining](https://ton.org/mining)
101
101
#### <aid="faq-general-howmany"></a>How many miners are out there?
102
-
We cannot say this. All we know is the total hashrate of all miners on the network. However, there are graphs on [ton.org/mining](https://ton.org/mining) that attempt to estimate quantity of machines of certan type needed to provide aproximate total hashrate.
102
+
We cannot say this. All we know is the total hashrate of all miners on the network. However, there are graphs on [ton.org/mining](https://ton.org/mining) that attempt to estimate quantity of machines of certain type needed to provide approximate total hashrate.
103
103
#### <aid="faq-general-noincome"></a>Do I need Toncoin to start mining?
104
104
No, you do not. Anyone can start mining without owning a single Toncoin.
105
105
#### <aid="faq-mining-noincome"></a>I mine for hours, why my wallet total does not increase, not even by 1 TON?
Copy file name to clipboardExpand all lines: docs/develop/blockchain/shards.mdx
+5-5Lines changed: 5 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -45,7 +45,7 @@ Several such <b>AccountChains</b> combined within a single shard form a <b>Shard
45
45
These groups of accounts are denoted by a common binary prefix, which serves as a criterion for clustering them in the same shard.
46
46
This prefix appears in shard id which presented by a 64-bit integer and has the following structure: `<binary prefix>100000...`. For example, shard with id `1011100000...` contains all accounts started with prefix `1011`.
47
47
48
-
When number of transactions in some shard growth, it splits into two shards. New shards obtaining the following ids: `<parent prefix>01000...` and `<parent prefix>11000...` and responsible for accounts starting with `<parent prefix>0` and `<parent prefix>1` correspondingly. The seqnos of blocks in shards goes continuously starting from parent last seqno plus 1. After split shards go independently and may have different seqnos.
48
+
When number of transactions in some shard grows, this shard splits into two shards. New shards obtain the following ids: `<parent prefix>01000...` and `<parent prefix>11000...` and become responsible for accounts starting with `<parent prefix>0` and `<parent prefix>1` correspondingly. The seqnos of blocks in shards go continuously starting from the parent last seqno plus 1. After split, shards go independently and may have different seqnos.
@@ -54,12 +54,12 @@ Masterchain block contains information about shards in its header. After the blo
54
54
55
55
An actual example:
56
56
* Masterchain block `seqno=34607821` has 2 shards: `(0,4000000000000000,40485798)` and `(0,c000000000000000,40485843)` (https://toncenter.com/api/v2/shards?seqno=34607821).
57
-
* Shard `shard=4000000000000000` was splitted into `shard=2000000000000000` and `shard=6000000000000000` and masterchain block `seqno=34607822`already has 3 shards: `(0,2000000000000000,40485799)` and `(0,6000000000000000,40485799)`. Note, that both new shards has the same seqnos but different shard IDs (https://toncenter.com/api/v2/shards?seqno=34607822).
58
-
* New shards go independently and after 100 masterchain blocks (in masterchain block `seqno=34607921`) one shard has last block `(0,2000000000000000,40485901)` and another one has `(0,6000000000000000,40485897)` (https://toncenter.com/api/v2/shards?seqno=34607921).
57
+
* Shard `shard=4000000000000000` was splitted into `shard=2000000000000000` and `shard=6000000000000000`, and the masterchain block `seqno=34607822`obtains 3 shards: `(0,2000000000000000,40485799)` and `(0,6000000000000000,40485799)`. Note that both new shards have the same seqnos but different shard IDs (https://toncenter.com/api/v2/shards?seqno=34607822).
58
+
* New shards go independently and after 100 masterchain blocks (in masterchain block `seqno=34607921`) one shard has the last block `(0,2000000000000000,40485901)` and another one has `(0,6000000000000000,40485897)` (https://toncenter.com/api/v2/shards?seqno=34607921).
59
59
60
60
## Merging
61
-
When shards load goes down they can merge back as follow:
62
-
* Two shards can merge if they have common parent and, therefore, their shard ids are `<parent prefix>010...` and `<parent prefix110...`. Merged shard will have shard id `<parent prefix>10...` (for example `10010...` + `10110...` = `1010...`). The first block of merged shard will have `seqno=max(seqno1, seqno2) + 1`.
61
+
If the load on shards goes down they can merge back:
62
+
* Two shards can merge if they have a common parent and, therefore, their shard ids are `<parent prefix>010...` and `<parent prefix110...`. Merged shard will have shard id `<parent prefix>10...` (for example `10010...` + `10110...` = `1010...`). The first block of a merged shard will have `seqno=max(seqno1, seqno2) + 1`.
Copy file name to clipboardExpand all lines: docs/develop/companies/outsource.mdx
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -104,7 +104,7 @@ Coinvent is a dedicated outsource development team, passionately committed to cr
104
104
### softstack
105
105
106
106
#### Summary
107
-
Softstack formerly known as Chainsulting, is a leading provider of comprehensive Web3 solutions, with a focus on software development and smart contract auditing.
107
+
Softstack is a leading service provider of comprehensive Web3 solutions, since 2017, with a focus on software development and smart contract auditing. Made in Germany
108
108
109
109
#### Workstreams
110
110
- Smart Contract & dApp Development
@@ -122,7 +122,7 @@ Softstack formerly known as Chainsulting, is a leading provider of comprehensive
Copy file name to clipboardExpand all lines: docs/develop/dapps/apis/sdk.mdx
+12-8Lines changed: 12 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -1,16 +1,15 @@
1
-
# SDK list (if you've decided on functionality)
1
+
# SDKs
2
2
3
-
Please use the sidebar navigation to choose the preferred programming language!
3
+
Instant navigate on preferred language with right sidebar.
4
4
5
-
:::tip
5
+
## Overview
6
6
7
7
There are different ways to connect to blockchain:
8
8
1. RPC data provider or other API: in most cases, you have to *rely* on its stability and security.
9
9
2. ADNL connection: you're connecting to a [liteserver](/participate/run-nodes/liteserver). They might be inaccessible, but with a certain level of validation (implemented in the library), cannot lie.
10
10
3. Tonlib binary: you're connecting to liteserver as well, so all benefits and downsides apply, but your application also contains a dynamic-loading library compiled outside.
11
11
4. Offchain-only. Such SDKs allow to create and serialize cells, which you can then send to APIs.
12
12
13
-
:::
14
13
15
14
### TypeScript / JavaScript
16
15
@@ -21,19 +20,24 @@ There are different ways to connect to blockchain:
21
20
|[tonkite/adnl](https://github.com/tonkite/adnl)|[ADNL](/develop/network/adnl-tcp) natively / via WebSocket| ADNL TypeScript implementation. |
22
21
|[tonutils](https://github.com/thekiba/tonutils)|Native [ADNL](/develop/network/adnl-tcp)| TypeScript-based interface for building and interacting with applications in TON Ecosystem. Due to native ADNL dependency, cannot be used for blockchain interaction in browser.|
23
22
23
+
### Java
24
+
| Library | Blockchain connection | Description |
25
+
|---------|------------------|--------------|
26
+
|[ton4js](https://github.com/neodix42/ton4j)| Tonlib binary | Java SDK for The Open Network (TON) |
Copy file name to clipboardExpand all lines: docs/develop/dapps/apis/toncenter.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -34,7 +34,7 @@ There are different ways to connect to blockchain:
34
34
35
35
Indexers allow to list jetton wallets, NFTs, transactions by certain filters, not only retrieve specific ones.
36
36
37
-
- Public TON Index can be used: tests and development are for free, premium for production - [toncenter.com/api/v3/](https://toncenter.com/api/v3/).
37
+
- Public TON Index can be used: tests and development are for free, [premium](https://t.me/tonapibot) for production - [toncenter.com/api/v3/](https://toncenter.com/api/v3/).
38
38
- Run your own TON Index with [Worker](https://github.com/toncenter/ton-index-worker/tree/36134e7376986c5517ee65e6a1ddd54b1c76cdba) and [TON Index API wrapper](https://github.com/toncenter/ton-indexer).
[Gobicycle](https://github.com/gobicycle/bicycle) service is focused on replenishing user balances and sending payments to blockchain accounts. Both TONs and Jettons are supported. The service is written with numerous pitfalls in mind that a developer might encounter (all checks for jettons, correct operations status check, resending messages, performance during high load when blockchain is splitted by shards). Provide simple HTTP API, rabbit and webhook notifications about new payments.
38
+
#### GO
54
39
55
-
### JavaScript
40
+
-[Gobicycle](https://github.com/gobicycle/bicycle) - service is focused on replenishing user balances and sending payments to blockchain accounts. Both TONs and Jettons are supported. The service is written with numerous pitfalls in mind that a developer might encounter (all checks for jettons, correct operations status check, resending messages, performance during high load when blockchain is splitted by shards). Provide simple HTTP API, rabbit and webhook notifications about new payments.
-[Init wallet, create external message to deploy the wallet](https://github.com/tonfactory/tonsdk#create-mnemonic-init-wallet-class-create-external-message-to-deploy-the-wallet)
74
55
75
-
### Golang
76
-
77
-
#### Made by community
78
-
79
-
-[See full list of examples](https://github.com/xssnick/tonutils-go#how-to-use)
80
56
81
-
## Global overview
57
+
## Global Overview
82
58
Embodying a fully asynchronous approach, TON Blockchain involves a few concepts which are uncommon to traditional blockchains. Particularly, each interaction of any actor with the blockchain consists of a graph of asynchronously transferred messages between smart contracts and/or the external world. The common path of any interaction starts with an external message sent to a `wallet` smart contract, which authenticates the message sender using public-key cryptography, takes charge of fee payment, and sends inner blockchain messages. That way, transactions on the TON network are not synonymous with user interaction with the blockchain but merely nodes of the message graph: the result of accepting and processing a message by a smart contract, which may or may not lead to the emergence of new messages. The interaction may consist of an arbitrary number of messages and transactions and span a prolonged period of time. Technically, transactions with queues of messages are aggregated into blocks processed by validators. The asynchronous nature of the TON Blockchain **does not allow to predict the hash and lt (logical time) of a transaction** at the stage of sending a message. The transaction accepted to the block is final and cannot be modified.
83
59
84
60
**Each inner blockchain message is a message from one smart contract to another, which bears some amount of digital assets, as well as an arbitrary portion of data.**
@@ -87,6 +63,12 @@ Smart contract guidelines recommend treating the data payload, which begins with
87
63
88
64
Smart contracts **pay fees for transactions** (usually from the balance of an incoming message) as well as a **storage fee for the contract's stored code and data**. Fees depend on workchain configs with maximal fees on `masterchain` and substantially lower fees on `basechain`.
*`external message` is the input message for `wallet A v4` contract with empty soure (a message from nowhere, such as [Tonkeeper](https://tonkeeper.com/)).
69
+
*`outgoing message` is the output message for `wallet A v4` contract and input message for `wallet B v4` contract with `wallet A v4` source and `wallet B v4` destination.
70
+
71
+
As a result there are 2 transactions with their set of input and output messages.
90
72
91
73
## Digital assets on TON
92
74
TON has three types of digital assets.
@@ -143,6 +125,8 @@ A contract's transactions can be obtained using [getTransactions](https://github
143
125
4. Incoming payments are transactions in which the incoming message has a source address; outgoing payments are transactions in which the incoming message has no source address and also presents the outgoing messages. These transactions should be processed accordingly.
144
126
5. If all of those 10 transactions are unseen, the next 10 transactions should be loaded and steps 2,3,4,5 should be repeated.
145
127
128
+
## Checking transactions' flow
129
+
It's possible to track messages flow during transaction processing. Since the message flow is a DAG it's enough to get the input `in_msg` or output `out_msgs` messages of current transaction using [getTransactions](https://toncenter.com/api/v2/#/transactions/get_transactions_getTransactions_get) method to find incoming transaction with [tryLocateResultTx](https://testnet.toncenter.com/api/v2/#/transactions/get_try_locate_result_tx_tryLocateResultTx_get) or outgoing transactions with [tryLocateSourceTx](https://testnet.toncenter.com/api/v2/#/transactions/get_try_locate_source_tx_tryLocateSourceTx_get).
146
130
147
131
## Accepting payments
148
132
There are a few approaches to accepting payments that differ in their method of distinguishing users.
@@ -160,13 +144,20 @@ To accept payments based on attached comments, the service should
160
144
### Invoices with ton:// link
161
145
162
146
If you need an easy integration for a simple user flow, it is suitable to use the ton:// link.
163
-
Best suited for one-time payments and invoices.
147
+
Best suited for one-time payments and invoices with Toncoin.
0 commit comments