Skip to content

Commit 337e0f2

Browse files
committed
adjust docu
1 parent 5900e02 commit 337e0f2

File tree

2 files changed

+12
-16
lines changed

2 files changed

+12
-16
lines changed

adnl/src/main/java/org/ton/ton4j/adnl/AdnlLiteClient.java

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1101,13 +1101,11 @@ public long computeReturnedStake(Address validatorAddress) {
11011101
public RunMethodResult runMethod(Address accountAddress, String methodName) {
11021102
try {
11031103
return runMethod(
1104-
getMasterchainInfo().getLast(),
1105-
4,
11061104
accountAddress,
1107-
Utils.calculateMethodId(methodName),
1108-
new byte[0]);
1105+
methodName,
1106+
new VmStackValue[0]);
11091107
} catch (Exception e) {
1110-
throw new Error("cannot execute runMethod on " + methodName);
1108+
throw new Error("cannot execute runMethod on " + methodName, e);
11111109
}
11121110
}
11131111

@@ -1129,7 +1127,6 @@ public RunMethodResult runMethod(
11291127
Address accountAddress, String methodName, VmStackValue... params) {
11301128
try {
11311129
List<VmStackValue> vmStackValuesReversed = Arrays.asList(params);
1132-
// Collections.reverse(vmStackValuesReversed);
11331130
VmStack vmStackParams =
11341131
VmStack.builder()
11351132
.depth(vmStackValuesReversed.size())
@@ -2012,7 +2009,6 @@ public List<Participant> getElectionParticipants() {
20122009
VmStack vmStack = VmStack.deserialize(CellSlice.beginParse(Cell.fromBoc(result.result)));
20132010

20142011
List<VmStackValue> flatValues = new ArrayList<>();
2015-
// List<VmTuple> res = new ArrayList<>();
20162012

20172013
for (VmStackValue l : vmStack.getStack().getTos()) {
20182014
if (l instanceof VmStackValueNull) {

toncenter/README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ A comprehensive Java wrapper for the [TonCenter API v2](https://toncenter.com/ap
88

99
## Features
1010

11-
-**Complete API Coverage**: All 27 TonCenter API v2 endpoints implemented
11+
-**Complete API Coverage**: All 28 TonCenter API v2 endpoints implemented
1212
-**Network Support**: Both Mainnet and Testnet support
1313
-**HTTP Client**: Built on OkHttp for reliable HTTP communication
1414
-**Logging**: Built-in request/response logging using SLF4J
@@ -102,6 +102,7 @@ TonCenter client = TonCenter.builder()
102102
- `unpackAddress(address)` - Convert user-friendly to raw format
103103
- `detectAddress(address)` - Get all address forms
104104
- `getTokenData(address)` - NFT/Jetton information
105+
- `getLibraries([]hash)` - retrieve libraries by hash
105106

106107
### Block Methods (9 endpoints)
107108
- `getMasterchainInfo()` - Current masterchain state
@@ -195,19 +196,19 @@ The wrapper includes convenience methods for common operations:
195196

196197
```java
197198
// Get transactions with default limit (10)
198-
client.getTransactions(address);
199+
getTransactions(address);
199200

200201
// Get transactions with custom limit
201-
client.getTransactions(address, 20);
202+
getTransactions(address, 20);
202203

203204
// Get config parameter without seqno
204-
client.getConfigParam(0);
205+
getConfigParam(0);
205206

206207
// Lookup block by seqno only
207-
client.lookupBlockBySeqno(workchain, shard, seqno);
208+
lookupBlockBySeqno(workchain, shard, seqno);
208209

209210
// Estimate fees with default parameters
210-
client.estimateFee(address, body);
211+
estimateFee(address, body);
211212

212213
getSeqno(address);
213214

@@ -238,8 +239,7 @@ The wrapper uses SLF4J for logging. HTTP requests and responses are logged at DE
238239

239240
## Thread Safety
240241

241-
The `TonCenter` client is thread-safe and can be shared across multiple threads. However, each client should be properly closed when no longer needed.
242-
242+
The `TonCenter` client is thread-safe and can be shared across multiple threads, as well as used as one instance in multiple threads.
243243
## Resource Management
244244

245245
Always close the client to release HTTP connection resources:
@@ -255,7 +255,7 @@ try {
255255

256256
Or use try-with-resources pattern if you implement AutoCloseable.
257257

258-
## API Rate Limits
258+
## TON Center API Rate Limits
259259

260260
- Without API key: 1 request per second
261261
- With API key: Higher limits (check TonCenter documentation)

0 commit comments

Comments
 (0)