ton_sdk_client 1.17.0 → 1.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -64
- data/README.md +1 -1
- data/lib/ton_sdk_client/client.rb +1 -0
- data/lib/ton_sdk_client/net.rb +146 -50
- data/lib/ton_sdk_client/version.rb +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 93ce3efefeae7a25614a74726af1c93fa4a8f8eb0ad897ea0ba6d41b76946102
|
4
|
+
data.tar.gz: 87f3ebd814144ac4967711f626e6fcc948c8e12042a76ab93f472ac99cc68669
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2f33cc5939351b95af854b363bb5064db95a201ce674b90264fe261313c73e8d0faacc18de8b2cfae6d2f0fabde134eaa3b11011685db868423ae51c3ae85665
|
7
|
+
data.tar.gz: d557d9920669edfa03f2b5ccf395897fd56970bb9f78c3a58e24e32cd07d3478600f9f34d834ac15e18ad1a951c942d2b7bc03235cd51c8e53b22b0bae3a4acf
|
data/CHANGELOG.md
CHANGED
@@ -1,93 +1,33 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
-
|
4
|
-
-----
|
5
|
-
* the changes are according the ones of TON SDK
|
6
|
-
|
3
|
+
all the changes are always according to the ones of the main TON SDK library; and on top on that, there may be additional ones
|
7
4
|
|
8
|
-
1.16.x
|
9
|
-
-----
|
10
|
-
* TON SDK version: 1.16.0
|
11
|
-
* the changes are according the ones of TON SDK
|
12
5
|
|
13
6
|
1.15.x
|
14
7
|
-----
|
15
|
-
* TON SDK version: 1.15.0
|
16
8
|
* internal refactoring
|
17
|
-
|
9
|
+
|
18
10
|
|
19
11
|
1.13.x
|
20
12
|
-----
|
21
|
-
* TON SDK version: 1.13.0
|
22
13
|
* internal refactoring
|
23
|
-
|
14
|
+
|
24
15
|
|
25
16
|
1.12.x
|
26
17
|
-----
|
27
|
-
* TON SDK version: 1.12.0
|
28
18
|
* internal refactoring
|
29
|
-
* the changes are according the ones of TON SDK
|
30
|
-
|
31
|
-
1.11.x
|
32
|
-
-----
|
33
|
-
* TON SDK version: 1.11.0
|
34
|
-
* the changes are according the ones of TON SDK
|
35
|
-
|
36
|
-
|
37
|
-
1.10.x
|
38
|
-
-----
|
39
|
-
* TON SDK version: 1.10.0
|
40
|
-
* the changes are according the ones of TON SDK
|
41
19
|
|
42
20
|
|
43
21
|
1.9.x
|
44
22
|
-----
|
45
|
-
* TON SDK version: 1.9.0
|
46
23
|
* remove TonSdk::NATIVE_LIB_VERSION, rename TonSdk::SDK_VERSION to TonSdk::NATIVE_SDK_VERSION
|
47
|
-
* the changes are according the ones of TON SDK
|
48
|
-
|
49
24
|
|
50
|
-
1.7.x
|
51
|
-
-----
|
52
|
-
* TON SDK version: 1.7.0
|
53
|
-
* the changes are according the ones of TON SDK
|
54
|
-
|
55
|
-
1.3.x
|
56
|
-
-----
|
57
|
-
* TON SDK version: 1.6.0
|
58
|
-
* the changes are according the ones of TON SDK
|
59
25
|
|
60
26
|
1.2.x
|
61
27
|
-----
|
62
|
-
* TON SDK version: 1.5.2
|
63
28
|
* min Ruby version: 3.0
|
64
29
|
|
65
30
|
|
66
|
-
1.1.x
|
67
|
-
-----
|
68
|
-
* new `Client` `.resolve_app_request()`
|
69
|
-
* new `Net` `.query()`, `.suspend()`, `.resume()`
|
70
|
-
* new `Debot`
|
71
|
-
* new `Boc` `.get_boc_hash()`
|
72
|
-
* new `Crypto` `.register_signing_box()`, `.get_signing_box()`, `.signing_box_get_public_key()`,
|
73
|
-
`.signing_box_sign()`, `remove_signing_box()`
|
74
|
-
* new paramentes in `NetworkConfig`; particularly
|
75
|
-
|
76
|
-
```
|
77
|
-
server_address: "example.com"
|
78
|
-
```
|
79
|
-
|
80
|
-
becomes
|
81
|
-
|
82
|
-
```
|
83
|
-
endpoints: ["example.com"]
|
84
|
-
```
|
85
|
-
|
86
|
-
check out the main repository for the details
|
87
|
-
|
88
|
-
* new data types/classes in several modules
|
89
|
-
|
90
|
-
|
91
31
|
1.0.0
|
92
32
|
-----
|
93
|
-
*
|
33
|
+
* the first version has been released.
|
data/README.md
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# TON SDK client in Ruby and for Ruby
|
2
2
|
|
3
3
|
[](https://badge.fury.io/rb/ton_sdk_client)
|
4
|
-
[](https://github.com/tonlabs/TON-SDK/tree/1.18.0)
|
5
5
|
|
6
6
|
Ruby gem-client bindings for [TON SDK](https://github.com/tonlabs/TON-SDK) which allows one to communicate with [FreeTON](https://freeton.org) blockchain in Ruby.
|
7
7
|
|
data/lib/ton_sdk_client/net.rb
CHANGED
@@ -228,9 +228,28 @@ module TonSdk
|
|
228
228
|
h
|
229
229
|
end
|
230
230
|
end
|
231
|
-
|
232
231
|
ResultOfQueryTransactionTree = Struct.new(:messages, :transactions, keyword_init: true)
|
233
232
|
|
233
|
+
ParamsOfCreateBlockIterator = Struct.new(:start_time, :end_time, :shard_filter, :result, keyword_init: true)
|
234
|
+
RegisteredIterator = Struct.new(:handle)
|
235
|
+
ParamsOfResumeBlockIterator = Struct.new(:resume_state)
|
236
|
+
ParamsOfCreateTransactionIterator = Struct.new(:start_time, :end_time, :shard_filter, :accounts_filter, :result, :include_transfers, keyword_init: true)
|
237
|
+
ParamsOfResumeTransactionIterator = Struct.new(:resume_state, :accounts_filter, keyword_init: true) do
|
238
|
+
def initialize(resume_state:, accounts_filter: nil)
|
239
|
+
super
|
240
|
+
end
|
241
|
+
end
|
242
|
+
ParamsOfIteratorNext = Struct.new(:iterator, :limit, :return_resume_state, keyword_init: true) do
|
243
|
+
def initialize(iterator:, limit: nil, return_resume_state: nil)
|
244
|
+
super
|
245
|
+
end
|
246
|
+
end
|
247
|
+
ResultOfIteratorNext = Struct.new(:items, :has_more, :resume_state, keyword_init: true) do
|
248
|
+
def initialize(items: [], has_more:, resume_state: nil)
|
249
|
+
super
|
250
|
+
end
|
251
|
+
end
|
252
|
+
|
234
253
|
|
235
254
|
#
|
236
255
|
# functions
|
@@ -367,71 +386,148 @@ module TonSdk
|
|
367
386
|
end
|
368
387
|
end
|
369
388
|
end
|
370
|
-
end
|
371
389
|
|
372
|
-
|
373
|
-
|
374
|
-
|
375
|
-
|
376
|
-
|
377
|
-
|
378
|
-
|
379
|
-
|
390
|
+
def self.batch_query(ctx, params)
|
391
|
+
Interop::request_to_native_lib(ctx, "net.batch_query", params) do |resp|
|
392
|
+
if resp.success?
|
393
|
+
yield NativeLibResponsetResult.new(
|
394
|
+
result: ResultOfBatchQuery.new(resp.result["results"])
|
395
|
+
)
|
396
|
+
else
|
397
|
+
yield resp
|
398
|
+
end
|
380
399
|
end
|
381
400
|
end
|
382
|
-
end
|
383
401
|
|
384
|
-
|
385
|
-
|
386
|
-
|
387
|
-
|
388
|
-
|
389
|
-
|
390
|
-
|
391
|
-
|
402
|
+
def self.aggregate_collection(ctx, params)
|
403
|
+
Interop::request_to_native_lib(ctx, "net.aggregate_collection", params) do |resp|
|
404
|
+
if resp.success?
|
405
|
+
yield NativeLibResponsetResult.new(
|
406
|
+
result: ResultOfAggregateCollection.new(resp.result["values"])
|
407
|
+
)
|
408
|
+
else
|
409
|
+
yield resp
|
410
|
+
end
|
392
411
|
end
|
393
412
|
end
|
394
|
-
end
|
395
413
|
|
396
|
-
|
397
|
-
|
398
|
-
|
399
|
-
|
400
|
-
|
401
|
-
|
402
|
-
|
414
|
+
def self.get_endpoints(ctx, params)
|
415
|
+
Interop::request_to_native_lib(ctx, "net.get_endpoints", params) do |resp|
|
416
|
+
if resp.success?
|
417
|
+
yield NativeLibResponsetResult.new(
|
418
|
+
result: ResultOfGetEndpoints.new(
|
419
|
+
query: resp.result["query"],
|
420
|
+
endpoints: resp.result["endpoints"],
|
421
|
+
)
|
403
422
|
)
|
404
|
-
|
405
|
-
|
406
|
-
|
423
|
+
else
|
424
|
+
yield resp
|
425
|
+
end
|
407
426
|
end
|
408
427
|
end
|
409
|
-
end
|
410
428
|
|
411
|
-
|
412
|
-
|
413
|
-
|
414
|
-
|
415
|
-
|
416
|
-
|
417
|
-
|
418
|
-
|
429
|
+
def self.query_counterparties(ctx, params)
|
430
|
+
Interop::request_to_native_lib(ctx, "net.query_counterparties", params) do |resp|
|
431
|
+
if resp.success?
|
432
|
+
yield NativeLibResponsetResult.new(
|
433
|
+
result: ResultOfQueryCollection.new(resp.result["result"])
|
434
|
+
)
|
435
|
+
else
|
436
|
+
yield resp
|
437
|
+
end
|
419
438
|
end
|
420
439
|
end
|
421
|
-
end
|
422
440
|
|
423
|
-
|
424
|
-
|
425
|
-
|
426
|
-
|
427
|
-
|
428
|
-
|
429
|
-
|
441
|
+
def self.query_transaction_tree(ctx, params)
|
442
|
+
Interop::request_to_native_lib(ctx, "net.query_transaction_tree", params) do |resp|
|
443
|
+
if resp.success?
|
444
|
+
yield NativeLibResponsetResult.new(
|
445
|
+
result: ResultOfQueryTransactionTree.new(
|
446
|
+
messages: resp.result["messages"],
|
447
|
+
transactions: resp.result["transactions"],
|
448
|
+
)
|
430
449
|
)
|
431
|
-
|
432
|
-
|
433
|
-
|
450
|
+
else
|
451
|
+
yield resp
|
452
|
+
end
|
434
453
|
end
|
435
454
|
end
|
455
|
+
|
456
|
+
def self.create_block_iterator(ctx, params)
|
457
|
+
Interop::request_to_native_lib(ctx, "net.create_block_iterator", params) do |resp|
|
458
|
+
if resp.success?
|
459
|
+
yield NativeLibResponsetResult.new(
|
460
|
+
result: RegisteredIterator.new(resp.result["handle"])
|
461
|
+
)
|
462
|
+
else
|
463
|
+
yield resp
|
464
|
+
end
|
465
|
+
end
|
466
|
+
end
|
467
|
+
|
468
|
+
def self.resume_block_iterator(ctx, params)
|
469
|
+
Interop::request_to_native_lib(ctx, "net.resume_block_iterator", params) do |resp|
|
470
|
+
if resp.success?
|
471
|
+
yield NativeLibResponsetResult.new(
|
472
|
+
result: RegisteredIterator.new(resp.result["handle"])
|
473
|
+
)
|
474
|
+
else
|
475
|
+
yield resp
|
476
|
+
end
|
477
|
+
end
|
478
|
+
end
|
479
|
+
|
480
|
+
def self.create_transaction_iterator(ctx, params)
|
481
|
+
Interop::request_to_native_lib(ctx, "net.create_transaction_iterator", params) do |resp|
|
482
|
+
if resp.success?
|
483
|
+
yield NativeLibResponsetResult.new(
|
484
|
+
result: RegisteredIterator.new(resp.result["handle"])
|
485
|
+
)
|
486
|
+
else
|
487
|
+
yield resp
|
488
|
+
end
|
489
|
+
end
|
490
|
+
end
|
491
|
+
|
492
|
+
def self.resume_transaction_iterator(ctx, params)
|
493
|
+
Interop::request_to_native_lib(ctx, "net.resume_transaction_iterator", params) do |resp|
|
494
|
+
if resp.success?
|
495
|
+
yield NativeLibResponsetResult.new(
|
496
|
+
result: RegisteredIterator.new(resp.result["handle"])
|
497
|
+
)
|
498
|
+
else
|
499
|
+
yield resp
|
500
|
+
end
|
501
|
+
end
|
502
|
+
end
|
503
|
+
|
504
|
+
def self.iterator_next(ctx, params)
|
505
|
+
Interop::request_to_native_lib(ctx, "net.iterator_next", params) do |resp|
|
506
|
+
if resp.success?
|
507
|
+
yield NativeLibResponsetResult.new(
|
508
|
+
result: ResultOfIteratorNext.new(
|
509
|
+
items: resp.result["items"],
|
510
|
+
has_more: resp.result["has_more"],
|
511
|
+
resume_state: resp.result["resume_state"]
|
512
|
+
)
|
513
|
+
)
|
514
|
+
else
|
515
|
+
yield resp
|
516
|
+
end
|
517
|
+
end
|
518
|
+
end
|
519
|
+
|
520
|
+
def self.remove_iterator(ctx, params)
|
521
|
+
Interop::request_to_native_lib(ctx, "net.remove_iterator", params) do |resp|
|
522
|
+
if resp.success?
|
523
|
+
yield NativeLibResponsetResult.new(
|
524
|
+
result: nil
|
525
|
+
)
|
526
|
+
else
|
527
|
+
yield resp
|
528
|
+
end
|
529
|
+
end
|
530
|
+
end
|
531
|
+
|
436
532
|
end
|
437
533
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ton_sdk_client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.18.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alex Maslakov
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-07-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ffi
|