everscale-client-ruby 1.1.53 → 1.1.61
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 +13 -6
- data/lib/code_generator/code_generator.rb +21 -1
- data/lib/everscale-client-ruby/Binding/binding.rb +32 -26
- data/lib/everscale-client-ruby/Binding/struct.rb +13 -0
- data/lib/everscale-client-ruby/Client/Abi.rb +90 -0
- data/lib/everscale-client-ruby/Client/Boc.rb +114 -0
- data/lib/everscale-client-ruby/Client/Client.rb +32 -1
- data/lib/everscale-client-ruby/Client/Crypto.rb +306 -0
- data/lib/everscale-client-ruby/Client/Debot.rb +36 -0
- data/lib/everscale-client-ruby/Client/Net.rb +132 -0
- data/lib/everscale-client-ruby/Client/Processing.rb +18 -0
- data/lib/everscale-client-ruby/Client/Proofs.rb +18 -0
- data/lib/everscale-client-ruby/Client/Tvm.rb +18 -0
- data/lib/everscale-client-ruby/Client/Utils.rb +30 -0
- data/lib/everscale-client-ruby/version.rb +1 -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: 35aafe4b89235753c799f0e51e0af5ed72f7cbdc34a820de78af3151c4e16e97
|
4
|
+
data.tar.gz: 70b20ef01342703a740d4c90278af3fc59233329134da50f6d75775ddfb1b6ab
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5d8a8277c2be0d8f4173387498ef2a88f7e065915ffbe33f479ebaa162693d5e74cbb005dd906b1809478aab812ac8f9e5eed85c36734e49771af3bc6a99d749
|
7
|
+
data.tar.gz: 2faf3ef66d975b9ab1733626b66967e29aaabd30356559ac2722505e98afbdbae57d52f0d60b9eef3b958ada37f88ab678e5e1aeabed8fb1f7ba16879f13039d
|
data/lib/code_generator/api.json
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
{
|
2
|
-
"version": "1.
|
2
|
+
"version": "1.38.0",
|
3
3
|
"modules": [
|
4
4
|
{
|
5
5
|
"name": "client",
|
@@ -365,7 +365,7 @@
|
|
365
365
|
"optional_inner": {
|
366
366
|
"type": "String"
|
367
367
|
},
|
368
|
-
"summary": "**This field is deprecated, but left for backward-compatibility.**
|
368
|
+
"summary": "**This field is deprecated, but left for backward-compatibility.** Evernode endpoint.",
|
369
369
|
"description": null
|
370
370
|
},
|
371
371
|
{
|
@@ -377,8 +377,8 @@
|
|
377
377
|
"type": "String"
|
378
378
|
}
|
379
379
|
},
|
380
|
-
"summary": "List of
|
381
|
-
"description": "Any correct URL format can be specified, including IP addresses. This parameter is prevailing over `server_address`.\nCheck the full list of [supported network endpoints](
|
380
|
+
"summary": "List of Evernode endpoints.",
|
381
|
+
"description": "Any correct URL format can be specified, including IP addresses. This parameter is prevailing over `server_address`.\nCheck the full list of [supported network endpoints](https://docs.everos.dev/ever-sdk/reference/ever-os-api/networks)."
|
382
382
|
},
|
383
383
|
{
|
384
384
|
"name": "network_retries_count",
|
@@ -539,8 +539,8 @@
|
|
539
539
|
"optional_inner": {
|
540
540
|
"type": "String"
|
541
541
|
},
|
542
|
-
"summary": "Access key to GraphQL API
|
543
|
-
"description":
|
542
|
+
"summary": "Access key to GraphQL API (Project secret)",
|
543
|
+
"description": null
|
544
544
|
}
|
545
545
|
],
|
546
546
|
"summary": null,
|
@@ -11303,6 +11303,13 @@
|
|
11303
11303
|
"value": "614",
|
11304
11304
|
"summary": null,
|
11305
11305
|
"description": null
|
11306
|
+
},
|
11307
|
+
{
|
11308
|
+
"name": "Unauthorized",
|
11309
|
+
"type": "Number",
|
11310
|
+
"value": "615",
|
11311
|
+
"summary": null,
|
11312
|
+
"description": null
|
11306
11313
|
}
|
11307
11314
|
],
|
11308
11315
|
"summary": null,
|
@@ -82,6 +82,12 @@ client = TonClient.create(config: {network: {endpoints: ["https://eri01.net.ever
|
|
82
82
|
|
83
83
|
# example: call method for Crypto module
|
84
84
|
payload = {composite: '17ED48941A08F981'}
|
85
|
+
|
86
|
+
# Sync
|
87
|
+
response = client.crypto.factorize_sync(payload)
|
88
|
+
p response
|
89
|
+
|
90
|
+
# Async
|
85
91
|
client.crypto.factorize(payload) do |response|
|
86
92
|
p response.result['factors']
|
87
93
|
end
|
@@ -248,7 +254,8 @@ cd everscale-client-ruby\n
|
|
248
254
|
content << "#{TAB}#{TAB}#{TAB}@monitor = Monitor.new\n"
|
249
255
|
content << "#{TAB}#{TAB}#{TAB}config = TonBinding.make_string(context_config.to_json)\n"
|
250
256
|
content << "#{TAB}#{TAB}#{TAB}context_ptr = TonBinding.tc_create_context(config)\n"
|
251
|
-
content << "#{TAB}#{TAB}#{TAB}
|
257
|
+
content << "#{TAB}#{TAB}#{TAB}context_response = TonBinding.read_string_data_ref(context_ptr)\n"
|
258
|
+
content << "#{TAB}#{TAB}#{TAB}@context = TonBinding.read_string_to_hash(context_response)['result']\n"
|
252
259
|
content << "#{TAB}#{TAB}#{TAB}ObjectSpace.define_finalizer(self, self.class.finalize(@context))\n"
|
253
260
|
content << "#{TAB}#{TAB}end\n\n"
|
254
261
|
content << "#{TAB}#{TAB}def self.finalize(ctx)\n"
|
@@ -298,6 +305,7 @@ cd everscale-client-ruby\n
|
|
298
305
|
|
299
306
|
private def gen_function(function, types)
|
300
307
|
content = getFunctionComment(function, types)
|
308
|
+
content << "#{TAB}#{TAB}# Async\n"
|
301
309
|
content << "#{TAB}#{TAB}def #{function.name}"
|
302
310
|
if function.arguments.empty?
|
303
311
|
content << "(&block)\n"
|
@@ -309,6 +317,18 @@ cd everscale-client-ruby\n
|
|
309
317
|
content << "#{TAB}#{TAB}#{TAB}TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, monitor: monitor, method_name: full_method_name(MODULE, __method__.to_s), payload: #{payload}, &block)\n"
|
310
318
|
content << "#{TAB}#{TAB}end\n\n"
|
311
319
|
|
320
|
+
content << "#{TAB}#{TAB}# Sync\n"
|
321
|
+
content << "#{TAB}#{TAB}def #{function.name}_sync"
|
322
|
+
if function.arguments.empty?
|
323
|
+
content << "()\n"
|
324
|
+
payload = "{}"
|
325
|
+
else
|
326
|
+
content << "(payload)\n"
|
327
|
+
payload = "payload"
|
328
|
+
end
|
329
|
+
content << "#{TAB}#{TAB}#{TAB}TonBinding.send_request_sync(context: context, method_name: full_method_name(MODULE, __method__.to_s).sub(/_sync$/, ''), payload: #{payload})\n"
|
330
|
+
content << "#{TAB}#{TAB}end\n\n"
|
331
|
+
|
312
332
|
content
|
313
333
|
end
|
314
334
|
|
@@ -18,7 +18,7 @@ module TonClient
|
|
18
18
|
return self
|
19
19
|
end
|
20
20
|
|
21
|
-
response_hash = TonBinding.read_string_to_hash(string_data)
|
21
|
+
response_hash = TonBinding.read_string_to_hash(TonBinding.read_string_data(string_data))
|
22
22
|
@finished = finished
|
23
23
|
@request_id = request_id
|
24
24
|
@response_type = response_type
|
@@ -48,15 +48,15 @@ module TonClient
|
|
48
48
|
|
49
49
|
module TonBinding
|
50
50
|
extend FFI::Library
|
51
|
-
|
52
|
-
|
51
|
+
ffi_lib FFI::Library::LIBC
|
52
|
+
ffi_lib 'ruby'
|
53
53
|
|
54
54
|
# memory allocators
|
55
|
-
|
55
|
+
attach_function :malloc, [:size_t], :pointer
|
56
56
|
# attach_function :calloc, [:size_t], :pointer
|
57
57
|
# attach_function :valloc, [:size_t], :pointer
|
58
58
|
# attach_function :realloc, [:pointer, :size_t], :pointer
|
59
|
-
|
59
|
+
attach_function :free, [:pointer], :void
|
60
60
|
|
61
61
|
# # memory movers
|
62
62
|
# attach_function :memcpy, [:pointer, :pointer, :size_t], :pointer
|
@@ -65,7 +65,7 @@ module TonClient
|
|
65
65
|
def self.setup_bindings
|
66
66
|
|
67
67
|
# tc_string_handle_t* tc_create_context(tc_string_data_t config);
|
68
|
-
# attach_function :tc_create_context, [TcStringDataT.by_value],
|
68
|
+
# attach_function :tc_create_context, [TcStringDataT.by_value], TcStringDataT.by_ref
|
69
69
|
attach_function :tc_create_context, [TcStringDataT.by_value], :pointer
|
70
70
|
|
71
71
|
# fn tc_destroy_context(context: InteropContext)
|
@@ -75,7 +75,7 @@ module TonClient
|
|
75
75
|
# uint32_t context,
|
76
76
|
# tc_string_data_t function_name,
|
77
77
|
# tc_string_data_t function_params_json);
|
78
|
-
# attach_function :tc_request_sync, [:uint32, TcStringDataT.by_value, TcStringDataT.by_value],
|
78
|
+
# attach_function :tc_request_sync, [:uint32, TcStringDataT.by_value, TcStringDataT.by_value], TcStringDataT.by_ref
|
79
79
|
attach_function :tc_request_sync, [:uint32, TcStringDataT.by_value, TcStringDataT.by_value], :pointer
|
80
80
|
|
81
81
|
# enum tc_response_types_t {
|
@@ -100,43 +100,50 @@ module TonClient
|
|
100
100
|
attach_function :tc_request, [:uint32, TcStringDataT.by_value, TcStringDataT.by_value, :uint32, :tc_response_handler_t], :void
|
101
101
|
|
102
102
|
# tc_string_data_t tc_read_string(const tc_string_handle_t* handle);
|
103
|
-
# attach_function :tc_read_string, [
|
103
|
+
# attach_function :tc_read_string, [TcStringDataT.by_ref], TcStringDataT.by_value
|
104
104
|
attach_function :tc_read_string, [:pointer], TcStringDataT.by_value
|
105
105
|
|
106
106
|
# void tc_destroy_string(const tc_string_handle_t* handle)
|
107
|
-
# attach_function :tc_destroy_string, [
|
107
|
+
# attach_function :tc_destroy_string, [TcStringDataT.by_ref], :void
|
108
108
|
attach_function :tc_destroy_string, [:pointer], :void
|
109
109
|
end
|
110
110
|
|
111
111
|
def self.make_string(string)
|
112
|
+
string = string.encode("utf-8").freeze
|
112
113
|
result = TonBinding::TcStringDataT.new
|
113
114
|
result[:content] = FFI::MemoryPointer.from_string(string)
|
114
115
|
result[:len] = string.bytesize
|
115
116
|
result
|
116
117
|
end
|
117
118
|
|
118
|
-
def self.
|
119
|
-
|
120
|
-
if is_ref
|
121
|
-
string = tc_read_string(tc_string_handle)
|
122
|
-
else
|
123
|
-
string = tc_string_handle
|
124
|
-
end
|
119
|
+
def self.read_string_data_ref(tc_string_handle_ref)
|
120
|
+
string = tc_read_string(tc_string_handle_ref)
|
125
121
|
|
126
122
|
if string[:len] > 0
|
127
|
-
result = string[:content].read_string(string[:len])
|
128
|
-
if
|
129
|
-
tc_destroy_string(
|
130
|
-
|
123
|
+
result = string[:content].read_string(string[:len]).freeze
|
124
|
+
if tc_string_handle_ref
|
125
|
+
tc_destroy_string(tc_string_handle_ref)
|
126
|
+
else
|
127
|
+
p "NOOOOOOOOOOOO"
|
131
128
|
end
|
129
|
+
# free(tc_string_handle_ref)
|
130
|
+
result
|
131
|
+
else
|
132
|
+
nil
|
133
|
+
end
|
134
|
+
end
|
135
|
+
|
136
|
+
def self.read_string_data(tc_string_data)
|
137
|
+
if tc_string_data[:len] > 0
|
138
|
+
result = tc_string_data[:content].read_string(tc_string_data[:len]).freeze
|
139
|
+
# free(tc_string_data)
|
132
140
|
result
|
133
141
|
else
|
134
142
|
nil
|
135
143
|
end
|
136
144
|
end
|
137
145
|
|
138
|
-
def self.read_string_to_hash(
|
139
|
-
json_string = read_string(tc_string_handle_t_ref)
|
146
|
+
def self.read_string_to_hash(json_string)
|
140
147
|
JSON.parse(json_string, {max_nesting: false}) if json_string
|
141
148
|
end
|
142
149
|
|
@@ -148,10 +155,9 @@ module TonClient
|
|
148
155
|
payload_string = make_string(payload.to_json)
|
149
156
|
|
150
157
|
sdk_json_response = tc_request_sync(context, method_name_string, payload_string)
|
151
|
-
response = read_string_to_hash(sdk_json_response)
|
152
|
-
|
153
|
-
|
154
|
-
return response['error'] if response['error']
|
158
|
+
response = read_string_to_hash(read_string_data_ref(sdk_json_response))
|
159
|
+
|
160
|
+
response
|
155
161
|
end
|
156
162
|
|
157
163
|
# block = { |response| }
|
@@ -8,6 +8,19 @@ module TonClient
|
|
8
8
|
class TcStringDataT < FFI::Struct
|
9
9
|
layout :content, :pointer,
|
10
10
|
:len, :uint32
|
11
|
+
|
12
|
+
# def initialize(*args)
|
13
|
+
# super
|
14
|
+
# ObjectSpace.define_finalizer(self, self.class.finalize(@content))
|
15
|
+
# end
|
16
|
+
#
|
17
|
+
# def self.finalize(ctx)
|
18
|
+
# Proc.new do
|
19
|
+
# if ctx != nil
|
20
|
+
# TonBinding.free(ctx)
|
21
|
+
# end
|
22
|
+
# end
|
23
|
+
# end
|
11
24
|
end
|
12
25
|
end
|
13
26
|
end
|
@@ -28,10 +28,16 @@ module TonClient
|
|
28
28
|
# body: String - # # Message body BOC encoded with `base64`.
|
29
29
|
# data_to_sign: String<Optional> - # # Optional data to sign. # # Encoded with `base64`.
|
30
30
|
# # Presents when `message` is unsigned. Can be used for externalmessage signing. Is this case you need to sing this data andproduce signed message using `abi.attach_signature`.
|
31
|
+
# Async
|
31
32
|
def encode_message_body(payload, &block)
|
32
33
|
TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, monitor: monitor, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block)
|
33
34
|
end
|
34
35
|
|
36
|
+
# Sync
|
37
|
+
def encode_message_body_sync(payload)
|
38
|
+
TonBinding.send_request_sync(context: context, method_name: full_method_name(MODULE, __method__.to_s).sub(/_sync$/, ''), payload: payload)
|
39
|
+
end
|
40
|
+
|
35
41
|
# INPUT: ParamsOfAttachSignatureToMessageBody
|
36
42
|
# abi: Value - # # Contract ABI
|
37
43
|
# public_key: String - # # Public key. # # Must be encoded with `hex`.
|
@@ -39,10 +45,16 @@ module TonClient
|
|
39
45
|
# signature: String - # # Signature. # # Must be encoded with `hex`.
|
40
46
|
# RESPONSE: ResultOfAttachSignatureToMessageBody
|
41
47
|
# body: String -
|
48
|
+
# Async
|
42
49
|
def attach_signature_to_message_body(payload, &block)
|
43
50
|
TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, monitor: monitor, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block)
|
44
51
|
end
|
45
52
|
|
53
|
+
# Sync
|
54
|
+
def attach_signature_to_message_body_sync(payload)
|
55
|
+
TonBinding.send_request_sync(context: context, method_name: full_method_name(MODULE, __method__.to_s).sub(/_sync$/, ''), payload: payload)
|
56
|
+
end
|
57
|
+
|
46
58
|
# INPUT: ParamsOfEncodeMessage
|
47
59
|
# abi: Value - # # Contract ABI.
|
48
60
|
# address: String<Optional> - # # Target address the message will be sent to. # # Must be specified in case of non-deploy message.
|
@@ -60,10 +72,16 @@ module TonClient
|
|
60
72
|
# data_to_sign: String<Optional> - # # Optional data to be signed encoded in `base64`. # # Returned in case of `Signer::External`. Can be used for externalmessage signing. Is this case you need to use this data to create signature andthen produce signed message using `abi.attach_signature`.
|
61
73
|
# address: String - # # Destination address.
|
62
74
|
# message_id: String - # # Message id.
|
75
|
+
# Async
|
63
76
|
def encode_message(payload, &block)
|
64
77
|
TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, monitor: monitor, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block)
|
65
78
|
end
|
66
79
|
|
80
|
+
# Sync
|
81
|
+
def encode_message_sync(payload)
|
82
|
+
TonBinding.send_request_sync(context: context, method_name: full_method_name(MODULE, __method__.to_s).sub(/_sync$/, ''), payload: payload)
|
83
|
+
end
|
84
|
+
|
67
85
|
# INPUT: ParamsOfEncodeInternalMessage
|
68
86
|
# abi: Value<Optional> - # # Contract ABI. # # Can be None if both deploy_set and call_set are None.
|
69
87
|
# address: String<Optional> - # # Target address the message will be sent to. # # Must be specified in case of non-deploy message.
|
@@ -78,10 +96,16 @@ module TonClient
|
|
78
96
|
# message: String - # # Message BOC encoded with `base64`.
|
79
97
|
# address: String - # # Destination address.
|
80
98
|
# message_id: String - # # Message id.
|
99
|
+
# Async
|
81
100
|
def encode_internal_message(payload, &block)
|
82
101
|
TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, monitor: monitor, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block)
|
83
102
|
end
|
84
103
|
|
104
|
+
# Sync
|
105
|
+
def encode_internal_message_sync(payload)
|
106
|
+
TonBinding.send_request_sync(context: context, method_name: full_method_name(MODULE, __method__.to_s).sub(/_sync$/, ''), payload: payload)
|
107
|
+
end
|
108
|
+
|
85
109
|
# INPUT: ParamsOfAttachSignature
|
86
110
|
# abi: Value - # # Contract ABI
|
87
111
|
# public_key: String - # # Public key encoded in `hex`.
|
@@ -90,10 +114,16 @@ module TonClient
|
|
90
114
|
# RESPONSE: ResultOfAttachSignature
|
91
115
|
# message: String - # # Signed message BOC
|
92
116
|
# message_id: String - # # Message ID
|
117
|
+
# Async
|
93
118
|
def attach_signature(payload, &block)
|
94
119
|
TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, monitor: monitor, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block)
|
95
120
|
end
|
96
121
|
|
122
|
+
# Sync
|
123
|
+
def attach_signature_sync(payload)
|
124
|
+
TonBinding.send_request_sync(context: context, method_name: full_method_name(MODULE, __method__.to_s).sub(/_sync$/, ''), payload: payload)
|
125
|
+
end
|
126
|
+
|
97
127
|
# INPUT: ParamsOfDecodeMessage
|
98
128
|
# abi: Value - # # contract ABI
|
99
129
|
# message: String - # # Message BOC
|
@@ -103,10 +133,16 @@ module TonClient
|
|
103
133
|
# name: String - # # Function or event name.
|
104
134
|
# value: Value<Optional> - # # Parameters or result value.
|
105
135
|
# header: FunctionHeader<Optional> - # # Function header.
|
136
|
+
# Async
|
106
137
|
def decode_message(payload, &block)
|
107
138
|
TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, monitor: monitor, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block)
|
108
139
|
end
|
109
140
|
|
141
|
+
# Sync
|
142
|
+
def decode_message_sync(payload)
|
143
|
+
TonBinding.send_request_sync(context: context, method_name: full_method_name(MODULE, __method__.to_s).sub(/_sync$/, ''), payload: payload)
|
144
|
+
end
|
145
|
+
|
110
146
|
# INPUT: ParamsOfDecodeMessageBody
|
111
147
|
# abi: Value - # # Contract ABI used to decode.
|
112
148
|
# body: String - # # Message body BOC encoded in `base64`.
|
@@ -117,10 +153,16 @@ module TonClient
|
|
117
153
|
# name: String - # # Function or event name.
|
118
154
|
# value: Value<Optional> - # # Parameters or result value.
|
119
155
|
# header: FunctionHeader<Optional> - # # Function header.
|
156
|
+
# Async
|
120
157
|
def decode_message_body(payload, &block)
|
121
158
|
TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, monitor: monitor, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block)
|
122
159
|
end
|
123
160
|
|
161
|
+
# Sync
|
162
|
+
def decode_message_body_sync(payload)
|
163
|
+
TonBinding.send_request_sync(context: context, method_name: full_method_name(MODULE, __method__.to_s).sub(/_sync$/, ''), payload: payload)
|
164
|
+
end
|
165
|
+
|
124
166
|
# INPUT: ParamsOfEncodeAccount
|
125
167
|
# state_init: StateInitSource - # # Source of the account state init.
|
126
168
|
# balance: BigInt<Optional> - # # Initial balance.
|
@@ -130,20 +172,32 @@ module TonClient
|
|
130
172
|
# RESPONSE: ResultOfEncodeAccount
|
131
173
|
# account: String - # # Account BOC encoded in `base64`.
|
132
174
|
# id: String - # # Account ID encoded in `hex`.
|
175
|
+
# Async
|
133
176
|
def encode_account(payload, &block)
|
134
177
|
TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, monitor: monitor, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block)
|
135
178
|
end
|
136
179
|
|
180
|
+
# Sync
|
181
|
+
def encode_account_sync(payload)
|
182
|
+
TonBinding.send_request_sync(context: context, method_name: full_method_name(MODULE, __method__.to_s).sub(/_sync$/, ''), payload: payload)
|
183
|
+
end
|
184
|
+
|
137
185
|
# INPUT: ParamsOfDecodeAccountData
|
138
186
|
# abi: Value - # # Contract ABI
|
139
187
|
# data: String - # # Data BOC or BOC handle
|
140
188
|
# allow_partial: Boolean<Optional> - # # Flag allowing partial BOC decoding when ABI doesn't describe the full body BOC. Controls decoder behaviour when after decoding all described in ABI params there are some data left in BOC: `true` - return decoded values `false` - return error of incomplete BOC deserialization (default)
|
141
189
|
# RESPONSE: ResultOfDecodeAccountData
|
142
190
|
# data: Value - # # Decoded data as a JSON structure.
|
191
|
+
# Async
|
143
192
|
def decode_account_data(payload, &block)
|
144
193
|
TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, monitor: monitor, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block)
|
145
194
|
end
|
146
195
|
|
196
|
+
# Sync
|
197
|
+
def decode_account_data_sync(payload)
|
198
|
+
TonBinding.send_request_sync(context: context, method_name: full_method_name(MODULE, __method__.to_s).sub(/_sync$/, ''), payload: payload)
|
199
|
+
end
|
200
|
+
|
147
201
|
# INPUT: ParamsOfUpdateInitialData
|
148
202
|
# abi: Value<Optional> - # # Contract ABI
|
149
203
|
# data: String - # # Data BOC or BOC handle
|
@@ -152,10 +206,16 @@ module TonClient
|
|
152
206
|
# boc_cache: BocCacheType<Optional> - # # Cache type to put the result. The BOC itself returned if no cache type provided.
|
153
207
|
# RESPONSE: ResultOfUpdateInitialData
|
154
208
|
# data: String - # # Updated data BOC or BOC handle
|
209
|
+
# Async
|
155
210
|
def update_initial_data(payload, &block)
|
156
211
|
TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, monitor: monitor, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block)
|
157
212
|
end
|
158
213
|
|
214
|
+
# Sync
|
215
|
+
def update_initial_data_sync(payload)
|
216
|
+
TonBinding.send_request_sync(context: context, method_name: full_method_name(MODULE, __method__.to_s).sub(/_sync$/, ''), payload: payload)
|
217
|
+
end
|
218
|
+
|
159
219
|
# INPUT: ParamsOfEncodeInitialData
|
160
220
|
# abi: Value<Optional> - # # Contract ABI
|
161
221
|
# initial_data: Value - # # List of initial values for contract's static variables. # # `abi` parameter should be provided to set initial data
|
@@ -163,10 +223,16 @@ module TonClient
|
|
163
223
|
# boc_cache: BocCacheType<Optional> - # # Cache type to put the result. The BOC itself returned if no cache type provided.
|
164
224
|
# RESPONSE: ResultOfEncodeInitialData
|
165
225
|
# data: String - # # Updated data BOC or BOC handle
|
226
|
+
# Async
|
166
227
|
def encode_initial_data(payload, &block)
|
167
228
|
TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, monitor: monitor, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block)
|
168
229
|
end
|
169
230
|
|
231
|
+
# Sync
|
232
|
+
def encode_initial_data_sync(payload)
|
233
|
+
TonBinding.send_request_sync(context: context, method_name: full_method_name(MODULE, __method__.to_s).sub(/_sync$/, ''), payload: payload)
|
234
|
+
end
|
235
|
+
|
170
236
|
# INPUT: ParamsOfDecodeInitialData
|
171
237
|
# abi: Value<Optional> - # # Contract ABI. # # Initial data is decoded if this parameter is provided
|
172
238
|
# data: String - # # Data BOC or BOC handle
|
@@ -174,40 +240,64 @@ module TonClient
|
|
174
240
|
# RESPONSE: ResultOfDecodeInitialData
|
175
241
|
# initial_data: Value<Optional> - # # List of initial values of contract's public variables. # # Initial data is decoded if `abi` input parameter is provided
|
176
242
|
# initial_pubkey: String - # # Initial account owner's public key
|
243
|
+
# Async
|
177
244
|
def decode_initial_data(payload, &block)
|
178
245
|
TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, monitor: monitor, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block)
|
179
246
|
end
|
180
247
|
|
248
|
+
# Sync
|
249
|
+
def decode_initial_data_sync(payload)
|
250
|
+
TonBinding.send_request_sync(context: context, method_name: full_method_name(MODULE, __method__.to_s).sub(/_sync$/, ''), payload: payload)
|
251
|
+
end
|
252
|
+
|
181
253
|
# INPUT: ParamsOfDecodeBoc
|
182
254
|
# params: Array - # # Parameters to decode from BOC
|
183
255
|
# boc: String - # # Data BOC or BOC handle
|
184
256
|
# allow_partial: Boolean -
|
185
257
|
# RESPONSE: ResultOfDecodeBoc
|
186
258
|
# data: Value - # # Decoded data as a JSON structure.
|
259
|
+
# Async
|
187
260
|
def decode_boc(payload, &block)
|
188
261
|
TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, monitor: monitor, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block)
|
189
262
|
end
|
190
263
|
|
264
|
+
# Sync
|
265
|
+
def decode_boc_sync(payload)
|
266
|
+
TonBinding.send_request_sync(context: context, method_name: full_method_name(MODULE, __method__.to_s).sub(/_sync$/, ''), payload: payload)
|
267
|
+
end
|
268
|
+
|
191
269
|
# INPUT: ParamsOfAbiEncodeBoc
|
192
270
|
# params: Array - # # Parameters to encode into BOC
|
193
271
|
# data: Value - # # Parameters and values as a JSON structure
|
194
272
|
# boc_cache: BocCacheType<Optional> - # # Cache type to put the result. # # The BOC itself returned if no cache type provided
|
195
273
|
# RESPONSE: ResultOfAbiEncodeBoc
|
196
274
|
# boc: String - # # BOC encoded as base64
|
275
|
+
# Async
|
197
276
|
def encode_boc(payload, &block)
|
198
277
|
TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, monitor: monitor, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block)
|
199
278
|
end
|
200
279
|
|
280
|
+
# Sync
|
281
|
+
def encode_boc_sync(payload)
|
282
|
+
TonBinding.send_request_sync(context: context, method_name: full_method_name(MODULE, __method__.to_s).sub(/_sync$/, ''), payload: payload)
|
283
|
+
end
|
284
|
+
|
201
285
|
# INPUT: ParamsOfCalcFunctionId
|
202
286
|
# abi: Value - # # Contract ABI.
|
203
287
|
# function_name: String - # # Contract function name
|
204
288
|
# output: Boolean<Optional> - # # If set to `true` output function ID will be returned which is used in contract response. Default is `false`
|
205
289
|
# RESPONSE: ResultOfCalcFunctionId
|
206
290
|
# function_id: Number - # # Contract function ID
|
291
|
+
# Async
|
207
292
|
def calc_function_id(payload, &block)
|
208
293
|
TonBinding.requestLibrary(context: context, request_id: request_id, requests: requests, monitor: monitor, method_name: full_method_name(MODULE, __method__.to_s), payload: payload, &block)
|
209
294
|
end
|
210
295
|
|
296
|
+
# Sync
|
297
|
+
def calc_function_id_sync(payload)
|
298
|
+
TonBinding.send_request_sync(context: context, method_name: full_method_name(MODULE, __method__.to_s).sub(/_sync$/, ''), payload: payload)
|
299
|
+
end
|
300
|
+
|
211
301
|
end
|
212
302
|
end
|
213
303
|
|