ton_sdk_client 1.22.0 → 1.24.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.
@@ -34,131 +34,94 @@ module TonSdk
34
34
  IV_REQUIRED = 129
35
35
  end
36
36
 
37
- ParamsOfFactorize = Struct.new(:composite)
38
- ResultOfFactorize = Struct.new(:factors)
39
- ParamsOfModularPower = Struct.new(:base, :exponent, :modulus, keyword_init: true)
40
- ResultOfModularPower = Struct.new(:modular_power)
41
- ParamsOfTonCrc16 = Struct.new(:data)
42
-
43
- ResultOfTonCrc16 = Struct.new(:crc)
44
- ParamsOfGenerateRandomBytes = Struct.new(:length)
45
- ResultOfGenerateRandomBytes = Struct.new(:bytes)
46
- ParamsOfConvertPublicKeyToTonSafeFormat = Struct.new(:public_key)
47
- ResultOfConvertPublicKeyToTonSafeFormat = Struct.new(:ton_public_key)
48
-
49
- KeyPair = Struct.new(:public_, :secret)
50
- ParamsOfSign = Struct.new(:unsigned, :keys)
51
- ResultOfSign = Struct.new(:signed, :signature)
52
- ParamsOfVerifySignature = Struct.new(:signed, :public_)
53
- ResultOfVerifySignature = Struct.new(:unsigned)
54
-
55
- ParamsOfHash = Struct.new(:data)
56
- ResultOfHash = Struct.new(:hash)
57
- ParamsOfScrypt = Struct.new(:password, :salt, :log_n, :r, :p_, :dk_len, keyword_init: true)
58
- ResultOfScrypt = Struct.new(:key)
59
- ParamsOfNaclSignKeyPairFromSecret = Struct.new(:secret)
60
-
61
- ParamsOfNaclSign = Struct.new(:unsigned, :secret)
62
- ResultOfNaclSign = Struct.new(:signed)
63
- ParamsOfNaclSignOpen = Struct.new(:signed, :public_) do
64
- def initialize(signed:, public_:)
65
- super
37
+ ParamsOfFactorize = KwStruct.new(:composite)
38
+ ResultOfFactorize = KwStruct.new(:factors)
39
+ ParamsOfModularPower = KwStruct.new(:base, :exponent, :modulus)
40
+ ResultOfModularPower = KwStruct.new(:modular_power)
41
+ ParamsOfTonCrc16 = KwStruct.new(:data)
42
+
43
+ ResultOfTonCrc16 = KwStruct.new(:crc)
44
+ ParamsOfGenerateRandomBytes = KwStruct.new(:length)
45
+ ResultOfGenerateRandomBytes = KwStruct.new(:bytes)
46
+ ParamsOfConvertPublicKeyToTonSafeFormat = KwStruct.new(:public_key)
47
+ ResultOfConvertPublicKeyToTonSafeFormat = KwStruct.new(:ton_public_key)
48
+
49
+ KeyPair = KwStruct.new(:public_, :secret) do
50
+ def to_h
51
+ {
52
+ public: public_,
53
+ secret: secret
54
+ }
66
55
  end
67
56
  end
68
-
69
- ResultOfNaclSignOpen = Struct.new(:unsigned)
70
- ResultOfNaclSignDetached = Struct.new(:signature)
71
- ParamsOfNaclBoxKeyPairFromSecret = Struct.new(:secret)
72
- ParamsOfNaclBox = Struct.new(:decrypted, :nonce, :their_public, :secret) do
73
- def initialize(decrypted:, nonce:, their_public:, secret:)
74
- super
57
+ ParamsOfSign = KwStruct.new(:unsigned, :keys) do
58
+ def to_h
59
+ {
60
+ unsigned: unsigned,
61
+ keys: keys&.to_h
62
+ }
75
63
  end
76
64
  end
77
-
78
- ResultOfNaclBox = Struct.new(:encrypted)
79
- ParamsOfNaclBoxOpen = Struct.new(:encrypted, :nonce, :their_public, :secret) do
80
- def initialize(encrypted:, nonce:, their_public:, secret:)
81
- super
65
+ ResultOfSign = KwStruct.new(:signed, :signature)
66
+ ParamsOfVerifySignature = KwStruct.new(:signed, :public_) do
67
+ def to_h
68
+ {
69
+ signed: signed,
70
+ public: public_
71
+ }
82
72
  end
83
73
  end
74
+ ResultOfVerifySignature = KwStruct.new(:unsigned)
84
75
 
85
- ResultOfNaclBoxOpen = Struct.new(:decrypted)
86
- ParamsOfNaclSecretBox = Struct.new(:decrypted, :nonce, :key) do
87
- def initialize(decrypted:, nonce:, key:)
88
- super
89
- end
90
- end
76
+ ParamsOfHash = KwStruct.new(:data)
77
+ ResultOfHash = KwStruct.new(:hash)
78
+ ParamsOfScrypt = KwStruct.new(:password, :salt, :log_n, :r, :p, :dk_len)
79
+ ResultOfScrypt = KwStruct.new(:key)
80
+ ParamsOfNaclSignKeyPairFromSecret = KwStruct.new(:secret)
91
81
 
92
- ParamsOfNaclSecretBoxOpen = Struct.new(:encrypted, :nonce, :key) do
93
- def initialize(encrypted:, nonce:, key:)
94
- super
82
+ ParamsOfNaclSign = KwStruct.new(:unsigned, :secret)
83
+ ResultOfNaclSign = KwStruct.new(:signed)
84
+ ParamsOfNaclSignOpen = KwStruct.new(:signed, :public_) do
85
+ def to_h
86
+ {
87
+ signed: signed,
88
+ public: public_
89
+ }
95
90
  end
96
91
  end
97
92
 
98
- ParamsOfMnemonicWords = Struct.new(:dictionary)
99
- ResultOfMnemonicWords = Struct.new(:words)
100
- ParamsOfMnemonicFromRandom = Struct.new(:dictionary, :word_count, keyword_init: true)
101
- ResultOfMnemonicFromRandom = Struct.new(:phrase)
93
+ ResultOfNaclSignOpen = KwStruct.new(:unsigned)
102
94
 
103
- class ParamsOfMnemonicFromEntropy
104
- attr_reader :entropy, :dictionary, :word_count
95
+ ParamsOfNaclSignDetached = KwStruct.new(:unsigned, :secret)
105
96
 
106
- def initialize(entropy:, dictionary: nil, word_count: nil)
107
- @entropy = entropy
108
- @dictionary = dictionary
109
- @word_count = word_count
110
- end
97
+ ResultOfNaclSignDetached = KwStruct.new(:signature)
111
98
 
112
- def to_h
113
- {
114
- entropy: @entropy,
115
- dictionary: @dictionary,
116
- word_count: @word_count
117
- }
118
- end
119
- end
99
+ ParamsOfNaclBoxKeyPairFromSecret = KwStruct.new(:secret)
120
100
 
121
- ResultOfMnemonicFromEntropy = Struct.new(:phrase)
101
+ ParamsOfNaclBox = KwStruct.new(:decrypted, :nonce, :their_public, :secret)
122
102
 
123
- class ParamsOfMnemonicVerify
124
- attr_reader :phrase, :dictionary, :word_count
103
+ ResultOfNaclBox = KwStruct.new(:encrypted)
104
+ ParamsOfNaclBoxOpen = KwStruct.new(:encrypted, :nonce, :their_public, :secret)
125
105
 
126
- def initialize(phrase:, dictionary: nil, word_count: nil)
127
- @phrase = phrase
128
- @dictionary = dictionary
129
- @word_count = word_count
130
- end
106
+ ResultOfNaclBoxOpen = KwStruct.new(:decrypted)
107
+ ParamsOfNaclSecretBox = KwStruct.new(:decrypted, :nonce, :key)
131
108
 
132
- def to_h
133
- {
134
- phrase: @phrase,
135
- dictionary: @dictionary,
136
- word_count: @word_count
137
- }
138
- end
139
- end
109
+ ParamsOfNaclSecretBoxOpen = KwStruct.new(:encrypted, :nonce, :key)
140
110
 
141
- ResultOfMnemonicVerify = Struct.new(:valid)
111
+ ParamsOfMnemonicWords = KwStruct.new(:dictionary)
112
+ ResultOfMnemonicWords = KwStruct.new(:words)
113
+ ParamsOfMnemonicFromRandom = KwStruct.new(:dictionary, :word_count)
114
+ ResultOfMnemonicFromRandom = KwStruct.new(:phrase)
142
115
 
143
- class ParamsOfMnemonicDeriveSignKeys
144
- attr_reader :phrase, :path, :dictionary, :word_count
116
+ ParamsOfMnemonicFromEntropy = KwStruct.new(:entropy, :dictionary, :word_count)
145
117
 
146
- def initialize(phrase:, path: nil, dictionary: nil, word_count: nil)
147
- @phrase = phrase
148
- @path = path
149
- @dictionary = dictionary
150
- @word_count = word_count
151
- end
118
+ ResultOfMnemonicFromEntropy = KwStruct.new(:phrase)
152
119
 
153
- def to_h
154
- {
155
- phrase: @phrase,
156
- path: @path,
157
- dictionary: @dictionary,
158
- word_count: @word_count
159
- }
160
- end
161
- end
120
+ ParamsOfMnemonicVerify = KwStruct.new(:phrase, :dictionary, :word_count)
121
+
122
+ ResultOfMnemonicVerify = KwStruct.new(:valid)
123
+
124
+ ParamsOfMnemonicDeriveSignKeys = KwStruct.new(:phrase, :path, :dictionary, :word_count)
162
125
 
163
126
  class ParamsOfHDKeyXPrvFromMnemonic
164
127
  attr_reader :phrase, :dictionary, :word_count
@@ -178,7 +141,7 @@ module TonSdk
178
141
  end
179
142
  end
180
143
 
181
- ResultOfHDKeyXPrvFromMnemonic = Struct.new(:xprv)
144
+ ResultOfHDKeyXPrvFromMnemonic = KwStruct.new(:xprv)
182
145
 
183
146
  class ParamsOfHDKeyDeriveFromXPrv
184
147
  attr_reader :xprv, :child_index, :hardened
@@ -198,55 +161,37 @@ module TonSdk
198
161
  end
199
162
  end
200
163
 
201
- ResultOfHDKeyDeriveFromXPrv = Struct.new(:xprv)
202
- ParamsOfHDKeySecretFromXPrv = Struct.new(:xprv)
203
- ResultOfHDKeySecretFromXPrv = Struct.new(:secret)
204
- ParamsOfHDKeyPublicFromXPrv = Struct.new(:xprv)
205
- ResultOfHDKeyPublicFromXPrv = Struct.new(:public_)
164
+ ResultOfHDKeyDeriveFromXPrv = KwStruct.new(:xprv)
165
+ ParamsOfHDKeySecretFromXPrv = KwStruct.new(:xprv)
166
+ ResultOfHDKeySecretFromXPrv = KwStruct.new(:secret)
167
+ ParamsOfHDKeyPublicFromXPrv = KwStruct.new(:xprv)
168
+ ResultOfHDKeyPublicFromXPrv = KwStruct.new(:public_)
206
169
 
207
- ParamsOfHDKeyDeriveFromXPrvPath = Struct.new(:xprv, :path) do
208
- def initialize(xprv:, path:)
209
- super
210
- end
211
- end
170
+ ParamsOfHDKeyDeriveFromXPrvPath = KwStruct.new(:xprv, :path)
212
171
 
213
- ResultOfHDKeyDeriveFromXPrvPath = Struct.new(:xprv)
172
+ ResultOfHDKeyDeriveFromXPrvPath = KwStruct.new(:xprv)
214
173
 
215
- ParamsOfChaCha20 = Struct.new(:data, :key, :nonce) do
216
- def initialize(data:, key:, nonce:)
217
- super
218
- end
219
- end
174
+ ParamsOfChaCha20 = KwStruct.new(:data, :key, :nonce)
220
175
 
221
- ResultOfChaCha20 = Struct.new(:data)
176
+ ResultOfChaCha20 = KwStruct.new(:data)
222
177
 
223
- ParamsOfSigningBoxSign = Struct.new(:signing_box, :unsigned) do
224
- def initialize(signing_box:, unsigned:)
225
- super
226
- end
227
- end
228
-
229
- ResultOfSigningBoxSign = Struct.new(:signature)
230
- RegisteredSigningBox = Struct.new(:handle)
231
- ResultOfSigningBoxGetPublicKey = Struct.new(:pubkey)
178
+ ParamsOfSigningBoxSign = KwStruct.new(:signing_box, :unsigned)
232
179
 
233
- class ParamsOfNaclSignDetachedVerify
234
- attr_reader :unsigned, :signature, :public
235
-
236
- def initialize(unsigned:, signature:, public_:)
237
- @unsigned, @signature, @public_ = unsigned, signature, public_
238
- end
180
+ ResultOfSigningBoxSign = KwStruct.new(:signature)
181
+ RegisteredSigningBox = KwStruct.new(:handle)
182
+ ResultOfSigningBoxGetPublicKey = KwStruct.new(:pubkey)
239
183
 
184
+ ParamsOfNaclSignDetachedVerify = KwStruct.new(:unsigned, :signature, :public_) do
240
185
  def to_h
241
186
  {
242
- unsigned: @unsigned,
243
- signature: @signature,
244
- public: @public_
187
+ unsigned: unsigned,
188
+ signature: signature,
189
+ public: public_
245
190
  }
246
191
  end
247
192
  end
248
193
 
249
- ResultOfNaclSignDetachedVerify = Struct.new(:succeeded)
194
+ ResultOfNaclSignDetachedVerify = KwStruct.new(:succeeded)
250
195
 
251
196
  class ParamsOfAppSigningBox
252
197
  TYPES = [
@@ -272,11 +217,11 @@ module TonSdk
272
217
  end
273
218
  end
274
219
 
275
- EncryptionBoxInfo = Struct.new(:hdpath, :algorithm, :options, :public, keyword_init: true)
276
- ParamsOfEncryptionBoxGetInfo = Struct.new(:encryption_box)
277
- ResultOfEncryptionBoxGetInfo = Struct.new(:info)
278
- RegisteredEncryptionBox = Struct.new(:handle)
279
- ParamsOfCreateEncryptionBox = Struct.new(:algorithm)
220
+ EncryptionBoxInfo = KwStruct.new(:hdpath, :algorithm, :options, :public)
221
+ ParamsOfEncryptionBoxGetInfo = KwStruct.new(:encryption_box)
222
+ ResultOfEncryptionBoxGetInfo = KwStruct.new(:info)
223
+ RegisteredEncryptionBox = KwStruct.new(:handle)
224
+ ParamsOfCreateEncryptionBox = KwStruct.new(:algorithm)
280
225
 
281
226
  class EncryptionAlgorithm
282
227
  private_class_method :new
@@ -299,7 +244,7 @@ module TonSdk
299
244
  Interop::request_to_native_lib(ctx, "crypto.factorize", params) do |resp|
300
245
  if resp.success?
301
246
  yield NativeLibResponsetResult.new(
302
- result: ResultOfFactorize.new(resp.result["factors"])
247
+ result: ResultOfFactorize.new(factors: resp.result["factors"])
303
248
  )
304
249
  else
305
250
  yield resp
@@ -311,7 +256,7 @@ module TonSdk
311
256
  Interop::request_to_native_lib(ctx, "crypto.modular_power", params) do |resp|
312
257
  if resp.success?
313
258
  yield NativeLibResponsetResult.new(
314
- result: ResultOfModularPower.new(resp.result["modular_power"])
259
+ result: ResultOfModularPower.new(modular_power: resp.result["modular_power"])
315
260
  )
316
261
  else
317
262
  yield resp
@@ -323,7 +268,7 @@ module TonSdk
323
268
  Interop::request_to_native_lib(ctx, "crypto.ton_crc16", params) do |resp|
324
269
  if resp.success?
325
270
  yield NativeLibResponsetResult.new(
326
- result: ResultOfTonCrc16.new(resp.result["crc"])
271
+ result: ResultOfTonCrc16.new(crc: resp.result["crc"])
327
272
  )
328
273
  else
329
274
  yield resp
@@ -335,7 +280,7 @@ module TonSdk
335
280
  Interop::request_to_native_lib(ctx, "crypto.generate_random_bytes", params) do |resp|
336
281
  if resp.success?
337
282
  yield NativeLibResponsetResult.new(
338
- result: ResultOfGenerateRandomBytes.new(resp.result["bytes"])
283
+ result: ResultOfGenerateRandomBytes.new(bytes: resp.result["bytes"])
339
284
  )
340
285
  else
341
286
  yield resp
@@ -347,7 +292,7 @@ module TonSdk
347
292
  Interop::request_to_native_lib(ctx, "crypto.convert_public_key_to_ton_safe_format", params) do |resp|
348
293
  if resp.success?
349
294
  yield NativeLibResponsetResult.new(
350
- result: ResultOfConvertPublicKeyToTonSafeFormat.new(resp.result["ton_public_key"])
295
+ result: ResultOfConvertPublicKeyToTonSafeFormat.new(ton_public_key: resp.result["ton_public_key"])
351
296
  )
352
297
  else
353
298
  yield resp
@@ -389,7 +334,7 @@ module TonSdk
389
334
  Interop::request_to_native_lib(ctx, "crypto.verify_signature", params) do |resp|
390
335
  if resp.success?
391
336
  yield NativeLibResponsetResult.new(
392
- result: ResultOfVerifySignature.new(resp.result["unsigned"])
337
+ result: ResultOfVerifySignature.new(unsigned: resp.result["unsigned"])
393
338
  )
394
339
  else
395
340
  yield resp
@@ -401,7 +346,7 @@ module TonSdk
401
346
  Interop::request_to_native_lib(ctx, "crypto.sha256", params) do |resp|
402
347
  if resp.success?
403
348
  yield NativeLibResponsetResult.new(
404
- result: ResultOfHash.new(resp.result["hash"])
349
+ result: ResultOfHash.new(hash: resp.result["hash"])
405
350
  )
406
351
  else
407
352
  yield resp
@@ -413,7 +358,7 @@ module TonSdk
413
358
  Interop::request_to_native_lib(ctx, "crypto.sha512", params) do |resp|
414
359
  if resp.success?
415
360
  yield NativeLibResponsetResult.new(
416
- result: ResultOfHash.new(resp.result["hash"])
361
+ result: ResultOfHash.new(hash: resp.result["hash"])
417
362
  )
418
363
  else
419
364
  yield resp
@@ -425,7 +370,7 @@ module TonSdk
425
370
  Interop::request_to_native_lib(ctx, "crypto.scrypt", params) do |resp|
426
371
  if resp.success?
427
372
  yield NativeLibResponsetResult.new(
428
- result: ResultOfScrypt.new(resp.result["key"])
373
+ result: ResultOfScrypt.new(key: resp.result["key"])
429
374
  )
430
375
  else
431
376
  yield resp
@@ -437,7 +382,10 @@ module TonSdk
437
382
  Interop::request_to_native_lib(ctx, "crypto.nacl_sign_keypair_from_secret_key", params) do |resp|
438
383
  if resp.success?
439
384
  yield NativeLibResponsetResult.new(
440
- result: KeyPair.new(public_: resp.result["public"], secret: resp.result["secret"])
385
+ result: KeyPair.new(
386
+ public_: resp.result["public"],
387
+ secret: resp.result["secret"]
388
+ )
441
389
  )
442
390
  else
443
391
  yield resp
@@ -449,7 +397,7 @@ module TonSdk
449
397
  Interop::request_to_native_lib(ctx, "crypto.nacl_sign", params) do |resp|
450
398
  if resp.success?
451
399
  yield NativeLibResponsetResult.new(
452
- result: ResultOfNaclSign.new(resp.result["signed"])
400
+ result: ResultOfNaclSign.new(signed: resp.result["signed"])
453
401
  )
454
402
  else
455
403
  yield resp
@@ -461,7 +409,7 @@ module TonSdk
461
409
  Interop::request_to_native_lib(ctx, "crypto.nacl_sign_open", params) do |resp|
462
410
  if resp.success?
463
411
  yield NativeLibResponsetResult.new(
464
- result: ResultOfNaclSignOpen.new(resp.result["unsigned"])
412
+ result: ResultOfNaclSignOpen.new(unsigned: resp.result["unsigned"])
465
413
  )
466
414
  else
467
415
  yield resp
@@ -473,7 +421,7 @@ module TonSdk
473
421
  Interop::request_to_native_lib(ctx, "crypto.nacl_sign_detached", params) do |resp|
474
422
  if resp.success?
475
423
  yield NativeLibResponsetResult.new(
476
- result: ResultOfNaclSignDetached.new(resp.result["signature"])
424
+ result: ResultOfNaclSignDetached.new(signature: resp.result["signature"])
477
425
  )
478
426
  else
479
427
  yield resp
@@ -485,7 +433,7 @@ module TonSdk
485
433
  Interop::request_to_native_lib(ctx, "crypto.nacl_sign_detached_verify", params) do |resp|
486
434
  if resp.success?
487
435
  yield NativeLibResponsetResult.new(
488
- result: ResultOfNaclSignDetachedVerify.new(resp.result["succeeded"])
436
+ result: ResultOfNaclSignDetachedVerify.new(succeeded: resp.result["succeeded"])
489
437
  )
490
438
  else
491
439
  yield resp
@@ -497,7 +445,10 @@ module TonSdk
497
445
  Interop::request_to_native_lib(ctx, "crypto.nacl_box_keypair") do |resp|
498
446
  if resp.success?
499
447
  yield NativeLibResponsetResult.new(
500
- result: KeyPair.new(public_: resp.result["public"], secret: resp.result["secret"])
448
+ result: KeyPair.new(
449
+ public_: resp.result["public"],
450
+ secret: resp.result["secret"]
451
+ )
501
452
  )
502
453
  else
503
454
  yield resp
@@ -509,7 +460,10 @@ module TonSdk
509
460
  Interop::request_to_native_lib(ctx, "crypto.nacl_box_keypair_from_secret_key", params) do |resp|
510
461
  if resp.success?
511
462
  yield NativeLibResponsetResult.new(
512
- result: KeyPair.new(public_: resp.result["public"], secret: resp.result["secret"])
463
+ result: KeyPair.new(
464
+ public_: resp.result["public"],
465
+ secret: resp.result["secret"]
466
+ )
513
467
  )
514
468
  else
515
469
  yield resp
@@ -521,7 +475,7 @@ module TonSdk
521
475
  Interop::request_to_native_lib(ctx, "crypto.nacl_box", params) do |resp|
522
476
  if resp.success?
523
477
  yield NativeLibResponsetResult.new(
524
- result: ResultOfNaclBox.new(resp.result["encrypted"])
478
+ result: ResultOfNaclBox.new(encrypted: resp.result["encrypted"])
525
479
  )
526
480
  else
527
481
  yield resp
@@ -533,7 +487,7 @@ module TonSdk
533
487
  Interop::request_to_native_lib(ctx, "crypto.nacl_box_open", params) do |resp|
534
488
  if resp.success?
535
489
  yield NativeLibResponsetResult.new(
536
- result: ResultOfNaclBoxOpen.new(resp.result["decrypted"])
490
+ result: ResultOfNaclBoxOpen.new(decrypted: resp.result["decrypted"])
537
491
  )
538
492
  else
539
493
  yield resp
@@ -545,7 +499,7 @@ module TonSdk
545
499
  Interop::request_to_native_lib(ctx, "crypto.nacl_secret_box", params) do |resp|
546
500
  if resp.success?
547
501
  yield NativeLibResponsetResult.new(
548
- result: ResultOfNaclBox.new(resp.result["encrypted"])
502
+ result: ResultOfNaclBox.new(encrypted: resp.result["encrypted"])
549
503
  )
550
504
  else
551
505
  yield resp
@@ -557,7 +511,7 @@ module TonSdk
557
511
  Interop::request_to_native_lib(ctx, "crypto.nacl_secret_box_open", params) do |resp|
558
512
  if resp.success?
559
513
  yield NativeLibResponsetResult.new(
560
- result: ResultOfNaclBoxOpen.new(resp.result["decrypted"])
514
+ result: ResultOfNaclBoxOpen.new(decrypted: resp.result["decrypted"])
561
515
  )
562
516
  else
563
517
  yield resp
@@ -569,7 +523,7 @@ module TonSdk
569
523
  Interop::request_to_native_lib(ctx, "crypto.mnemonic_words", params) do |resp|
570
524
  if resp.success?
571
525
  yield NativeLibResponsetResult.new(
572
- result: ResultOfMnemonicWords.new(resp.result["words"])
526
+ result: ResultOfMnemonicWords.new(words: resp.result["words"])
573
527
  )
574
528
  else
575
529
  yield resp
@@ -581,7 +535,7 @@ module TonSdk
581
535
  Interop::request_to_native_lib(ctx, "crypto.mnemonic_from_random", params) do |resp|
582
536
  if resp.success?
583
537
  yield NativeLibResponsetResult.new(
584
- result: ResultOfMnemonicFromRandom.new(resp.result["phrase"])
538
+ result: ResultOfMnemonicFromRandom.new(phrase: resp.result["phrase"])
585
539
  )
586
540
  else
587
541
  yield resp
@@ -593,7 +547,7 @@ module TonSdk
593
547
  Interop::request_to_native_lib(ctx, "crypto.mnemonic_from_entropy", params) do |resp|
594
548
  if resp.success?
595
549
  yield NativeLibResponsetResult.new(
596
- result: ResultOfMnemonicFromEntropy.new(resp.result["phrase"])
550
+ result: ResultOfMnemonicFromEntropy.new(phrase: resp.result["phrase"])
597
551
  )
598
552
  else
599
553
  yield resp
@@ -605,7 +559,7 @@ module TonSdk
605
559
  Interop::request_to_native_lib(ctx, "crypto.mnemonic_verify", params) do |resp|
606
560
  if resp.success?
607
561
  yield NativeLibResponsetResult.new(
608
- result: ResultOfMnemonicVerify.new(resp.result["valid"])
562
+ result: ResultOfMnemonicVerify.new(valid: resp.result["valid"])
609
563
  )
610
564
  else
611
565
  yield resp
@@ -617,7 +571,10 @@ module TonSdk
617
571
  Interop::request_to_native_lib(ctx, "crypto.mnemonic_derive_sign_keys", params) do |resp|
618
572
  if resp.success?
619
573
  yield NativeLibResponsetResult.new(
620
- result: KeyPair.new(public_: resp.result["public"], secret: resp.result["secret"])
574
+ result: KeyPair.new(
575
+ public_: resp.result["public"],
576
+ secret: resp.result["secret"]
577
+ )
621
578
  )
622
579
  else
623
580
  yield resp
@@ -629,7 +586,7 @@ module TonSdk
629
586
  Interop::request_to_native_lib(ctx, "crypto.hdkey_xprv_from_mnemonic", params) do |resp|
630
587
  if resp.success?
631
588
  yield NativeLibResponsetResult.new(
632
- result: ResultOfHDKeyXPrvFromMnemonic.new(resp.result["xprv"])
589
+ result: ResultOfHDKeyXPrvFromMnemonic.new(xprv: resp.result["xprv"])
633
590
  )
634
591
  else
635
592
  yield resp
@@ -641,7 +598,7 @@ module TonSdk
641
598
  Interop::request_to_native_lib(ctx, "crypto.hdkey_derive_from_xprv", params) do |resp|
642
599
  if resp.success?
643
600
  yield NativeLibResponsetResult.new(
644
- result: ResultOfHDKeyDeriveFromXPrv.new(resp.result["xprv"])
601
+ result: ResultOfHDKeyDeriveFromXPrv.new(xprv: resp.result["xprv"])
645
602
  )
646
603
  else
647
604
  yield resp
@@ -653,7 +610,7 @@ module TonSdk
653
610
  Interop::request_to_native_lib(ctx, "crypto.hdkey_derive_from_xprv_path", params) do |resp|
654
611
  if resp.success?
655
612
  yield NativeLibResponsetResult.new(
656
- result: ResultOfHDKeyDeriveFromXPrvPath.new(resp.result["xprv"])
613
+ result: ResultOfHDKeyDeriveFromXPrvPath.new(xprv: resp.result["xprv"])
657
614
  )
658
615
  else
659
616
  yield resp
@@ -665,7 +622,7 @@ module TonSdk
665
622
  Interop::request_to_native_lib(ctx, "crypto.hdkey_secret_from_xprv", params) do |resp|
666
623
  if resp.success?
667
624
  yield NativeLibResponsetResult.new(
668
- result: ResultOfHDKeySecretFromXPrv.new(resp.result["secret"])
625
+ result: ResultOfHDKeySecretFromXPrv.new(secret: resp.result["secret"])
669
626
  )
670
627
  else
671
628
  yield resp
@@ -677,7 +634,7 @@ module TonSdk
677
634
  Interop::request_to_native_lib(ctx, "crypto.hdkey_public_from_xprv", params) do |resp|
678
635
  if resp.success?
679
636
  yield NativeLibResponsetResult.new(
680
- result: ResultOfHDKeyPublicFromXPrv.new(resp.result["public"])
637
+ result: ResultOfHDKeyPublicFromXPrv.new(public_: resp.result["public"])
681
638
  )
682
639
  else
683
640
  yield resp
@@ -689,7 +646,7 @@ module TonSdk
689
646
  Interop::request_to_native_lib(ctx, "crypto.chacha20", params) do |resp|
690
647
  if resp.success?
691
648
  yield NativeLibResponsetResult.new(
692
- result: ResultOfChaCha20.new(resp.result["data"])
649
+ result: ResultOfChaCha20.new(data: resp.result["data"])
693
650
  )
694
651
  else
695
652
  yield resp
@@ -728,7 +685,7 @@ module TonSdk
728
685
  ) do |resp|
729
686
  if resp.success?
730
687
  yield NativeLibResponsetResult.new(
731
- result: RegisteredSigningBox.new(resp.result["handle"])
688
+ result: RegisteredSigningBox.new(handle: resp.result["handle"])
732
689
  )
733
690
  else
734
691
  yield resp
@@ -740,7 +697,7 @@ module TonSdk
740
697
  Interop::request_to_native_lib(ctx, "crypto.get_signing_box", params) do |resp|
741
698
  if resp.success?
742
699
  yield NativeLibResponsetResult.new(
743
- result: RegisteredSigningBox.new(resp.result["handle"])
700
+ result: RegisteredSigningBox.new(handle: resp.result["handle"])
744
701
  )
745
702
  else
746
703
  yield resp
@@ -752,11 +709,12 @@ module TonSdk
752
709
  Interop::request_to_native_lib(
753
710
  ctx,
754
711
  "crypto.signing_box_get_public_key",
712
+ params,
755
713
  is_single_thread_only: is_single_thread_only
756
714
  ) do |resp|
757
715
  if resp.success?
758
716
  yield NativeLibResponsetResult.new(
759
- result: ResultOfSigningBoxGetPublicKey.new(resp.result["pubkey"])
717
+ result: ResultOfSigningBoxGetPublicKey.new(pubkey: resp.result["pubkey"])
760
718
  )
761
719
  else
762
720
  yield resp
@@ -768,7 +726,7 @@ module TonSdk
768
726
  Interop::request_to_native_lib(ctx, "crypto.signing_box_sign", params) do |resp|
769
727
  if resp.success?
770
728
  yield NativeLibResponsetResult.new(
771
- result: ResultOfSigningBoxSign.new(resp.result["signature"])
729
+ result: ResultOfSigningBoxSign.new(signature: resp.result["signature"])
772
730
  )
773
731
  else
774
732
  yield resp
@@ -820,7 +778,7 @@ module TonSdk
820
778
  ) do |resp|
821
779
  if resp.success?
822
780
  yield NativeLibResponsetResult.new(
823
- result: RegisteredEncryptionBox.new(resp.result["handle"])
781
+ result: RegisteredEncryptionBox.new(handle: resp.result["handle"])
824
782
  )
825
783
  else
826
784
  yield resp
@@ -832,7 +790,7 @@ module TonSdk
832
790
  Interop::request_to_native_lib(ctx, "crypto.encryption_box_get_info", params) do |resp|
833
791
  if resp.success?
834
792
  yield NativeLibResponsetResult.new(
835
- result: ResultOfEncryptionBoxGetInfo.new(resp.result["info"])
793
+ result: ResultOfEncryptionBoxGetInfo.new(info: resp.result["info"])
836
794
  )
837
795
  else
838
796
  yield resp
@@ -844,7 +802,7 @@ module TonSdk
844
802
  Interop::request_to_native_lib(ctx, "crypto.create_encryption_box", params) do |resp|
845
803
  if resp.success?
846
804
  yield NativeLibResponsetResult.new(
847
- result: RegisteredEncryptionBox.new(resp.result["handle"])
805
+ result: RegisteredEncryptionBox.new(handle: resp.result["handle"])
848
806
  )
849
807
  else
850
808
  yield resp
@@ -852,4 +810,4 @@ module TonSdk
852
810
  end
853
811
  end
854
812
  end
855
- end
813
+ end