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/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.**
Copy file name to clipboardExpand all lines: docs/develop/dapps/asset-processing/jettons.md
+45-8Lines changed: 45 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -2,24 +2,51 @@ import Tabs from '@theme/Tabs';
2
2
import TabItem from '@theme/TabItem';
3
3
import Button from '@site/src/components/button';
4
4
5
-
# TON Jetton processing
5
+
# Jetton Processing
6
6
7
-
Best practices with comments on jettons processing:
7
+
## Best Practices on Jettons Processing
8
8
9
-
-[JS algo to accept jettons deposits](https://github.com/toncenter/examples/blob/main/deposits-jettons.js)
9
+
Jettons are tokens on TON Blockchain - one can consider them similarly to ERC-20 tokens on Ethereum.
10
10
11
-
-[JS algo to jettons withdrawals](https://github.com/toncenter/examples/blob/main/withdrawals-jettons-highload.js)
11
+
:::info Transaction Confirmation
12
+
TON transactions are irreversible after just one confirmation. For the best UX/UI avoid additional waiting.
13
+
:::
12
14
13
-
-[JS code to withdraw (send) jettons from a wallet in batches](https://github.com/toncenter/examples/blob/main/withdrawals-jettons-highload-batch.js)
15
+
#### Withdrawal
14
16
15
-
:::info Transaction Confirmation
16
-
TON transactions are irreversible after just one confirmation. For the best user experience, it is suggested to avoid waiting on additional blocks once transactions are finalized on the TON Blockchain. Read more in the [Catchain.pdf](https://docs.ton.org/catchain.pdf#page=3).
17
+
[Highload Wallet v3](/participate/wallets/contracts#highload-wallet-v3) - this is TON Blockchain latest solution which is the gold standard for jetton withdrawals. It allows you to take advantage of batched withdrawals.
18
+
19
+
[Batched withdrawals](https://github.com/toncenter/examples/blob/main/withdrawals-jettons-highload-batch.js) - Meaning that multiple withdrawals are sent in batches, allowing for quick and cheap withdrawals.
20
+
21
+
#### Deposits
22
+
:::info
23
+
It is suggested to set several MEMO deposit wallets for better performance.
24
+
:::
25
+
26
+
[Memo Deposits](https://github.com/toncenter/examples/blob/main/deposits-jettons.js) - This allows you to keep one deposit wallet, and users add a memo in order to be identified by your system. This means that you don’t need to scan the entire blockchain, but is slightly less easy for users.
27
+
28
+
[Memo-less deposits](https://github.com/gobicycle/bicycle) - This solution also exists, but is more difficult to integrate. However, we can assist with this, if you would prefer to take this route. Please notify us before deciding to implement this approach.
29
+
30
+
### Additional Info
31
+
32
+
:::caution Transaction Notification
33
+
if you will be allowing your users set a custom memo when withdrawing jettons - make sure to set forwardAmount to 0.000000001 TON (1 nanoton) whenever a memo (text comment) is attached, otherwise the transfer will not be standard compliant and will not be able to be processed by other CEXes and other such services.
17
34
:::
18
35
19
-
In most cases, this should be enough for you, if not, you can find detailed information below.
36
+
- Please find the JS lib example - [tonweb](https://github.com/toncenter/tonweb) - which is the official JS library from the TON Foundation.
37
+
38
+
- If you want to use Java, you can look into [ton4j](https://github.com/neodix42/ton4j/tree/main).
39
+
40
+
- For Go, one should consider [tonutils-go](https://github.com/xssnick/tonutils-go). At the moment, we recommend the JS lib.
41
+
20
42
21
43
## Content List
22
44
45
+
46
+
:::tip
47
+
In following docs offers details about Jettons architecture generally, as well as core concepts of TON which may be different from EVM-like and other blockchains. This is crucial reading in order for one to grasp a good understanding of TON, and will greatly help you.
48
+
:::
49
+
23
50
This document describes the following in order:
24
51
1. Overview
25
52
2. Architecture
@@ -34,9 +61,14 @@ This document describes the following in order:
34
61
## Overview
35
62
36
63
:::info
64
+
TON transactions are irreversible after just one confirmation.
37
65
For clear understanding, the reader should be familiar with the basic principles of asset processing described in [this section of our documentation](/develop/dapps/asset-processing/). In particular, it is important to be familiar with [contracts](/learn/overviews/addresses#everything-is-a-smart-contract), [wallets](/develop/smart-contracts/tutorials/wallet), [messages](/develop/smart-contracts/guidelines/message-delivery-guarantees) and deployment process.
38
66
:::
39
67
68
+
:::Info
69
+
For the best user experience, it is suggested to avoid waiting on additional blocks once transactions are finalized on the TON Blockchain. Read more in the [Catchain.pdf](https://docs.ton.org/catchain.pdf#page=3).
70
+
:::
71
+
40
72
Quick jump to the core description of jetton processing:
@@ -342,6 +374,11 @@ If they match, it’s ideal. If not, then you likely received a scam token that
342
374
To prevent a bottleneck in incoming transactions to a single wallet, it is suggested to accept deposits across multiple wallets and to expand the number of these wallets as needed.
343
375
:::
344
376
377
+
378
+
:::caution Transaction Notification
379
+
if you will be allowing your users set a custom memo when withdrawing jettons - make sure to set forwardAmount to 0.000000001 TON (1 nanoton) whenever a memo (text comment) is attached, otherwise the transfer will not be standard compliant and will not be able to be processed by other CEXes and other such services.
380
+
:::
381
+
345
382
In this scenario, the payment service creates a unique memo identifier for each sender disclosing
346
383
the address of the centralized wallet and the amounts being sent. The sender sends the tokens
347
384
to the specified centralized address with the obligatory memo in the comment.
Copy file name to clipboardExpand all lines: docs/develop/dapps/asset-processing/metadata.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
# TON Metadata Parsing
1
+
# Metadata Parsing
2
2
3
3
The metadata standard, which covers NFTs, NFT Collections, and Jettons, is outlined in TON Enhancement Proposal 64 [TEP-64](https://github.com/ton-blockchain/TEPs/blob/master/text/0064-token-data-standard.md).
0 commit comments