everscale-client-ruby 1.1.32 → 1.1.42
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/code_generator/api.json +120 -11
- data/lib/code_generator/api_converter.rb +0 -1
- data/lib/code_generator/code_generator.rb +5 -3
- data/lib/code_generator/helpers.rb +1 -2
- data/lib/everscale-client-ruby/Client/Abi.rb +11 -0
- data/lib/everscale-client-ruby/version.rb +1 -1
- data/lib/everscale-client-ruby.rb +0 -1
- 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: 7783cddc1db07229987c81c69eb72463475588e0a9400dec911e90ec763fec58
|
4
|
+
data.tar.gz: b71007d082e0a73a3ffd1e22fee985eb91e92a50f73e4d92a91f233860de1880
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 80d51a8761a26138d819e028bc4b927f74d04588546b4764e81ef5fb78b92dfba28c9a9d1884806a6376b724e20b3f6b2d4561f2413dc3a0ca11a305073a0bc4
|
7
|
+
data.tar.gz: ed653ee71b16363f2cfd47d731b6dbf069fb293df7ba978bdf0e69600a51fc2000d665623107e435bc966bf2257d1a14aebcf2ba6ec7ceefdd42c087e3e68cf0
|
data/lib/code_generator/api.json
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
{
|
2
|
-
"version": "1.
|
2
|
+
"version": "1.37.1",
|
3
3
|
"modules": [
|
4
4
|
{
|
5
5
|
"name": "client",
|
@@ -540,7 +540,7 @@
|
|
540
540
|
"type": "String"
|
541
541
|
},
|
542
542
|
"summary": "Access key to GraphQL API.",
|
543
|
-
"description": "
|
543
|
+
"description": "You can specify here Evercloud project secret ot serialized JWT."
|
544
544
|
}
|
545
545
|
],
|
546
546
|
"summary": null,
|
@@ -5374,6 +5374,13 @@
|
|
5374
5374
|
"value": "314",
|
5375
5375
|
"summary": null,
|
5376
5376
|
"description": null
|
5377
|
+
},
|
5378
|
+
{
|
5379
|
+
"name": "InvalidFunctionName",
|
5380
|
+
"type": "Number",
|
5381
|
+
"value": "315",
|
5382
|
+
"summary": null,
|
5383
|
+
"description": null
|
5377
5384
|
}
|
5378
5385
|
],
|
5379
5386
|
"summary": null,
|
@@ -6111,6 +6118,15 @@
|
|
6111
6118
|
},
|
6112
6119
|
"summary": "Processing try index.",
|
6113
6120
|
"description": "Used in message processing with retries.\n\nEncoder uses the provided try index to calculate message\nexpiration time.\n\nExpiration timeouts will grow with every retry.\n\nDefault value is 0."
|
6121
|
+
},
|
6122
|
+
{
|
6123
|
+
"name": "address",
|
6124
|
+
"type": "Optional",
|
6125
|
+
"optional_inner": {
|
6126
|
+
"type": "String"
|
6127
|
+
},
|
6128
|
+
"summary": "Destination address of the message",
|
6129
|
+
"description": "Since ABI version 2.3 destination address of external inbound message is used in message\nbody signature calculation. Should be provided when signed external inbound message body is\ncreated. Otherwise can be omitted."
|
6114
6130
|
}
|
6115
6131
|
],
|
6116
6132
|
"summary": null,
|
@@ -6950,6 +6966,52 @@
|
|
6950
6966
|
],
|
6951
6967
|
"summary": null,
|
6952
6968
|
"description": null
|
6969
|
+
},
|
6970
|
+
{
|
6971
|
+
"name": "ParamsOfCalcFunctionId",
|
6972
|
+
"type": "Struct",
|
6973
|
+
"struct_fields": [
|
6974
|
+
{
|
6975
|
+
"name": "abi",
|
6976
|
+
"type": "Ref",
|
6977
|
+
"ref_name": "abi.Abi",
|
6978
|
+
"summary": "Contract ABI.",
|
6979
|
+
"description": null
|
6980
|
+
},
|
6981
|
+
{
|
6982
|
+
"name": "function_name",
|
6983
|
+
"type": "String",
|
6984
|
+
"summary": "Contract function name",
|
6985
|
+
"description": null
|
6986
|
+
},
|
6987
|
+
{
|
6988
|
+
"name": "output",
|
6989
|
+
"type": "Optional",
|
6990
|
+
"optional_inner": {
|
6991
|
+
"type": "Boolean"
|
6992
|
+
},
|
6993
|
+
"summary": "If set to `true` output function ID will be returned which is used in contract response. Default is `false`",
|
6994
|
+
"description": null
|
6995
|
+
}
|
6996
|
+
],
|
6997
|
+
"summary": null,
|
6998
|
+
"description": null
|
6999
|
+
},
|
7000
|
+
{
|
7001
|
+
"name": "ResultOfCalcFunctionId",
|
7002
|
+
"type": "Struct",
|
7003
|
+
"struct_fields": [
|
7004
|
+
{
|
7005
|
+
"name": "function_id",
|
7006
|
+
"type": "Number",
|
7007
|
+
"number_type": "UInt",
|
7008
|
+
"number_size": 32,
|
7009
|
+
"summary": "Contract function ID",
|
7010
|
+
"description": null
|
7011
|
+
}
|
7012
|
+
],
|
7013
|
+
"summary": null,
|
7014
|
+
"description": null
|
6953
7015
|
}
|
6954
7016
|
],
|
6955
7017
|
"functions": [
|
@@ -7484,6 +7546,44 @@
|
|
7484
7546
|
]
|
7485
7547
|
},
|
7486
7548
|
"errors": null
|
7549
|
+
},
|
7550
|
+
{
|
7551
|
+
"name": "calc_function_id",
|
7552
|
+
"summary": "Calculates contract function ID by contract ABI",
|
7553
|
+
"description": null,
|
7554
|
+
"params": [
|
7555
|
+
{
|
7556
|
+
"name": "_context",
|
7557
|
+
"type": "Generic",
|
7558
|
+
"generic_name": "Arc",
|
7559
|
+
"generic_args": [
|
7560
|
+
{
|
7561
|
+
"type": "Ref",
|
7562
|
+
"ref_name": "ClientContext"
|
7563
|
+
}
|
7564
|
+
],
|
7565
|
+
"summary": null,
|
7566
|
+
"description": null
|
7567
|
+
},
|
7568
|
+
{
|
7569
|
+
"name": "params",
|
7570
|
+
"type": "Ref",
|
7571
|
+
"ref_name": "abi.ParamsOfCalcFunctionId",
|
7572
|
+
"summary": null,
|
7573
|
+
"description": null
|
7574
|
+
}
|
7575
|
+
],
|
7576
|
+
"result": {
|
7577
|
+
"type": "Generic",
|
7578
|
+
"generic_name": "ClientResult",
|
7579
|
+
"generic_args": [
|
7580
|
+
{
|
7581
|
+
"type": "Ref",
|
7582
|
+
"ref_name": "abi.ResultOfCalcFunctionId"
|
7583
|
+
}
|
7584
|
+
]
|
7585
|
+
},
|
7586
|
+
"errors": null
|
7487
7587
|
}
|
7488
7588
|
]
|
7489
7589
|
},
|
@@ -7508,14 +7608,14 @@
|
|
7508
7608
|
}
|
7509
7609
|
],
|
7510
7610
|
"summary": "Pin the BOC with `pin` name.",
|
7511
|
-
"description": "Such BOC will not be removed from cache until it is unpinned"
|
7611
|
+
"description": "Such BOC will not be removed from cache until it is unpinned BOCs can have several pins and each of the pins has reference counter indicating how many\ntimes the BOC was pinned with the pin. BOC is removed from cache after all references for all\npins are unpinned with `cache_unpin` function calls."
|
7512
7612
|
},
|
7513
7613
|
{
|
7514
7614
|
"name": "Unpinned",
|
7515
7615
|
"type": "Struct",
|
7516
7616
|
"struct_fields": [],
|
7517
|
-
"summary": " ",
|
7518
|
-
"description":
|
7617
|
+
"summary": "BOC is placed into a common BOC pool with limited size regulated by LRU (least recently used) cache lifecycle.",
|
7618
|
+
"description": "BOC resides there until it is replaced with other BOCs if it is not used"
|
7519
7619
|
}
|
7520
7620
|
],
|
7521
7621
|
"summary": null,
|
@@ -8767,7 +8867,7 @@
|
|
8767
8867
|
},
|
8768
8868
|
{
|
8769
8869
|
"name": "cache_set",
|
8770
|
-
"summary": "Save BOC into cache",
|
8870
|
+
"summary": "Save BOC into cache or increase pin counter for existing pinned BOC",
|
8771
8871
|
"description": null,
|
8772
8872
|
"params": [
|
8773
8873
|
{
|
@@ -8805,8 +8905,8 @@
|
|
8805
8905
|
},
|
8806
8906
|
{
|
8807
8907
|
"name": "cache_unpin",
|
8808
|
-
"summary": "Unpin BOCs with specified pin
|
8809
|
-
"description":
|
8908
|
+
"summary": "Unpin BOCs with specified pin defined in the `cache_set`. Decrease pin reference counter for BOCs with specified pin defined in the `cache_set`. BOCs which have only 1 pin and its reference counter become 0 will be removed from cache",
|
8909
|
+
"description": null,
|
8810
8910
|
"params": [
|
8811
8911
|
{
|
8812
8912
|
"name": "context",
|
@@ -10512,6 +10612,15 @@
|
|
10512
10612
|
},
|
10513
10613
|
"summary": "transaction logical time",
|
10514
10614
|
"description": null
|
10615
|
+
},
|
10616
|
+
{
|
10617
|
+
"name": "chksig_always_succeed",
|
10618
|
+
"type": "Optional",
|
10619
|
+
"optional_inner": {
|
10620
|
+
"type": "Boolean"
|
10621
|
+
},
|
10622
|
+
"summary": "Overrides standard TVM behaviour. If set to `true` then CHKSIG always will return `true`.",
|
10623
|
+
"description": null
|
10515
10624
|
}
|
10516
10625
|
],
|
10517
10626
|
"summary": null,
|
@@ -10572,7 +10681,7 @@
|
|
10572
10681
|
"number_type": "UInt",
|
10573
10682
|
"number_size": 64,
|
10574
10683
|
"summary": "Deprecated.",
|
10575
|
-
"description": "
|
10684
|
+
"description": "Contains the same data as ext_in_msg_fee field"
|
10576
10685
|
},
|
10577
10686
|
{
|
10578
10687
|
"name": "storage_fee",
|
@@ -10604,7 +10713,7 @@
|
|
10604
10713
|
"number_type": "UInt",
|
10605
10714
|
"number_size": 64,
|
10606
10715
|
"summary": "Deprecated.",
|
10607
|
-
"description": "
|
10716
|
+
"description": "Contains the same data as account_fees field"
|
10608
10717
|
},
|
10609
10718
|
{
|
10610
10719
|
"name": "total_output",
|
@@ -12445,7 +12554,7 @@
|
|
12445
12554
|
{
|
12446
12555
|
"name": "subscribe",
|
12447
12556
|
"summary": "Creates a subscription",
|
12448
|
-
"description": "The subscription is a persistent communication channel between\nclient and Everscale Network.\n\n### Important Notes on Subscriptions\n\nUnfortunately sometimes the connection with the network
|
12557
|
+
"description": "The subscription is a persistent communication channel between\nclient and Everscale Network.\n\n### Important Notes on Subscriptions\n\nUnfortunately sometimes the connection with the network breakes down.\nIn this situation the library attempts to reconnect to the network.\nThis reconnection sequence can take significant time.\nAll of this time the client is disconnected from the network.\n\nBad news is that all changes that happened while\nthe client was disconnected are lost.\n\nGood news is that the client report errors to the callback when\nit loses and resumes connection.\n\nSo, if the lost changes are important to the application then\nthe application must handle these error reports.\n\nLibrary reports errors with `responseType` == 101\nand the error object passed via `params`.\n\nWhen the library has successfully reconnected\nthe application receives callback with\n`responseType` == 101 and `params.code` == 614 (NetworkModuleResumed).\n\nApplication can use several ways to handle this situation:\n- If application monitors changes for the single\nobject (for example specific account): application\ncan perform a query for this object and handle actual data as a\nregular data from the subscription.\n- If application monitors sequence of some objects\n(for example transactions of the specific account): application must\nrefresh all cached (or visible to user) lists where this sequences presents.",
|
12449
12558
|
"params": [
|
12450
12559
|
{
|
12451
12560
|
"name": "context",
|
@@ -1,4 +1,3 @@
|
|
1
|
-
require 'byebug'
|
2
1
|
require 'json'
|
3
2
|
require File.dirname(__FILE__) + '/helpers.rb'
|
4
3
|
|
@@ -53,12 +52,12 @@ class CodeGenerator
|
|
53
52
|
|
54
53
|
Install gem
|
55
54
|
```bash
|
56
|
-
gem install
|
55
|
+
gem install everscale-client-ruby
|
57
56
|
```
|
58
57
|
|
59
58
|
Install TON-SDK
|
60
59
|
```bash
|
61
|
-
|
60
|
+
everscale-client-ruby setup
|
62
61
|
# result - path to dylib file for everscale-client-ruby configuration
|
63
62
|
```
|
64
63
|
|
@@ -194,6 +193,9 @@ cd everscale-client-ruby\n
|
|
194
193
|
private def checkContent(content)
|
195
194
|
content.gsub!(/^([\s]+)# RESPONSE/, "\n\\1# RESPONSE")
|
196
195
|
content.gsub(/<Optional>/i, '<Optional>')
|
196
|
+
content.gsub(/(```ruby[\s\S]+?)<Optional>([\s\S]+?)```/, '\1<Optional>\2```')
|
197
|
+
content.gsub!(/ +# +# +/, " ")
|
198
|
+
content.gsub!(/ +# +/, '. ')
|
197
199
|
end
|
198
200
|
|
199
201
|
def customTypes
|
@@ -21,6 +21,7 @@ module TonClient
|
|
21
21
|
# Encoder uses the provided try index to calculate messageexpiration time.
|
22
22
|
# Expiration timeouts will grow with every retry.
|
23
23
|
# Default value is 0.
|
24
|
+
# address: String<Optional> - # # Destination address of the message # # Since ABI version 2.3 destination address of external inbound message is used in messagebody signature calculation. Should be provided when signed external inbound message body iscreated. Otherwise can be omitted.
|
24
25
|
# RESPONSE: ResultOfEncodeMessageBody
|
25
26
|
# body: String - # # Message body BOC encoded with `base64`.
|
26
27
|
# data_to_sign: String<Optional> - # # Optional data to sign. # # Encoded with `base64`.
|
@@ -195,6 +196,16 @@ module TonClient
|
|
195
196
|
core.requestLibrary(context: context.id, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block)
|
196
197
|
end
|
197
198
|
|
199
|
+
# INPUT: ParamsOfCalcFunctionId
|
200
|
+
# abi: Value - # # Contract ABI.
|
201
|
+
# function_name: String - # # Contract function name
|
202
|
+
# output: Boolean<Optional> - # # If set to `true` output function ID will be returned which is used in contract response. Default is `false`
|
203
|
+
# RESPONSE: ResultOfCalcFunctionId
|
204
|
+
# function_id: Number - # # Contract function ID
|
205
|
+
def calc_function_id(payload, &block)
|
206
|
+
core.requestLibrary(context: context.id, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block)
|
207
|
+
end
|
208
|
+
|
198
209
|
end
|
199
210
|
end
|
200
211
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: everscale-client-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.42
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- nerzh
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-09-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ffi
|