sorry, sir. i want to ask a question . Is there any documentation for using tonweb now, like the documentation for using the web3 library

Jun 24, 2022, 10:07 AM
Because I feel that the current instructions are not friendly enough for newbies.
Jun 24, 2022, 10:09 AM
There’s a lot of work on the way to improve this. We’re waiting for an official website by the foundation for tutorials and then we will start publishing
The tonwhales guys are trying to build a documentation website for their libraries https://tondev.org but it’s wip
Jun 24, 2022, 10:25 AM
Yes, currently I'm using the ton library. But I feel that tonweb is more friendly, but I haven't used the documentation, so it feels very difficult.
Is it possible to make a simple usage document about TonWeb first? Make it feel more friendly to newbies.
Jun 24, 2022, 10:37 AM
https://github.com/indutny/bn.js/
Numbers in TON are tricky, because the numbers supported need to be much bigger than what JS supports. Also the accuracy is very high - there are 9 decimal points. So a value like 5.000001234 is actually encoded like 5000001234 (give or take a zero). The class BN is used to bring this support to JS.

There are convenience functions like these https://github.com/tonwhales/ton/blob/master/src/utils/convert.ts

That take care of all this for you. Function toNano will take JS number 5.000001234 and return BN object (5000001234) and the other function will take you the opposite way
If you really want to help with developer resources, you can go around new developers and make a poll to get us a prioritized list of the developer tutorials new developers need most. I will bring this up to help focus the efforts in the right direction
Jun 24, 2022, 11:10 AM

© 2024 Draquery.com All rights reserved.