ton-sdk-ruby 0.0.1 → 0.0.3

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f7fff8c0e9e038b0aacb1c5c68c3c39c1bbc293815fc296a01927ccf9798c0a7
4
- data.tar.gz: 69d92e29e24377da266692e0a45656ed97e79bd4507d0e9b67807dd7b588b4b7
3
+ metadata.gz: f9f4f9ebce30d9947d1ca4f7aa7ed95822328fb3f3557fe15d7c113949d3ed31
4
+ data.tar.gz: 8092504fda3168aafbe087f5ef5d54488750c66905b82d564e76c4f72352c5aa
5
5
  SHA512:
6
- metadata.gz: 91a850a5872fe1dd7d9737239b5610402361e8b29b3deb210c9bdc5221982015a42168e55f16076672c0fe599d4a11f94f8d3b2c04e4b41720e622e8c6869089
7
- data.tar.gz: 04b2344e2377b1cdf507559eae021784ad04048646236b2df40a73a538350ac72482dd148da1d4993d2f964bd369ea5aad034e6f6e3f487e8adcd8fdefca9b3b
6
+ metadata.gz: 837c24715138986fbf478b30d10da67edc718f20a1c3124817b08d53535842826feca8cebe2d44fca6705330f5c0e229c5cc405ac0f7d460a1edf18129591d7d
7
+ data.tar.gz: 95497b85309c0a4e0924cea11a47c3ae50fc55977fe7d40a4b3764eca9943e171395d1d758ac6e325124cdbe0e20bd9ef90b63f74d2a5b8cc2312ed9d7861958
@@ -1,6 +1,9 @@
1
1
  module TonSdkRuby
2
+
2
3
  class BitArray < Array
3
-
4
+ extend TonSdkRuby
5
+ include TonSdkRuby
6
+
4
7
  attr_accessor :read_cursor
5
8
 
6
9
  def initialize(size: 0, value: false)
@@ -40,7 +43,7 @@ module TonSdkRuby
40
43
  end
41
44
 
42
45
  def store_sint!(value: nil, size: nil)
43
- # i.e. signed int and one first bit reserved for sign size = (size - 1)
46
+ # i.e. signed int and one first bit reserved for sign size = (size - 1)
44
47
  # and restrict for max value = value >= (1 << size - 1)
45
48
  max_sint = (1 << size - 1)
46
49
  raise "Wrong value #{value}" if value < -max_sint || value >= max_sint
@@ -142,28 +145,3 @@ class TrueClass
142
145
  1
143
146
  end
144
147
  end
145
-
146
-
147
-
148
-
149
-
150
-
151
-
152
-
153
-
154
-
155
-
156
-
157
-
158
-
159
-
160
-
161
-
162
-
163
-
164
-
165
-
166
-
167
-
168
-
169
-
@@ -1,5 +1,8 @@
1
1
  module TonSdkRuby
2
2
  class Builder
3
+ extend TonSdkRuby
4
+ include TonSdkRuby
5
+
3
6
  attr_reader :size, :refs, :bits
4
7
 
5
8
  def bytes
@@ -258,4 +261,4 @@ module TonSdkRuby
258
261
  end
259
262
 
260
263
  end
261
- end
264
+ end
@@ -1,6 +1,9 @@
1
1
  module TonSdkRuby
2
2
 
3
3
  class Hashmap
4
+ extend TonSdkRuby
5
+ include TonSdkRuby
6
+
4
7
  attr_reader :hashmap, :key_size
5
8
 
6
9
  def initialize(key_size, options = {})
@@ -395,4 +398,4 @@ module TonSdkRuby
395
398
  end
396
399
  end
397
400
 
398
- end
401
+ end
@@ -1,5 +1,7 @@
1
1
  module TonSdkRuby
2
2
  class Mask
3
+ extend TonSdkRuby
4
+ include TonSdkRuby
3
5
 
4
6
  attr_accessor :hash_index, :hash_count, :value
5
7
 
@@ -43,4 +45,4 @@ module TonSdkRuby
43
45
  ((n + (n >> 4) & 0xF0F0F0F) * 0x1010101) >> 24
44
46
  end
45
47
  end
46
- end
48
+ end
@@ -1,6 +1,9 @@
1
1
  module TonSdkRuby
2
2
 
3
3
  class Slice
4
+ extend TonSdkRuby
5
+ include TonSdkRuby
6
+
4
7
  def initialize(bits, refs)
5
8
  @bits = bits
6
9
  @refs = refs
@@ -332,4 +335,4 @@ module TonSdkRuby
332
335
  Slice.new(cell.bits.dup, cell.refs.dup)
333
336
  end
334
337
  end
335
- end
338
+ end
@@ -6,6 +6,7 @@ require "ed25519"
6
6
 
7
7
  module TonSdkRuby
8
8
  class TonMnemonic
9
+ extend TonSdkRuby
9
10
  include TonSdkRuby
10
11
 
11
12
  TON_PBKDF_ITERATIONS = 100_000
@@ -141,4 +142,4 @@ module TonSdkRuby
141
142
  words.map { |v| v.downcase.strip }
142
143
  end
143
144
  end
144
- end
145
+ end
@@ -1,5 +1,8 @@
1
1
  module TonSdkRuby
2
2
  class Provider
3
+ extend TonSdkRuby
4
+ include TonSdkRuby
5
+
3
6
  attr_accessor :provider
4
7
 
5
8
  def initialize(provider)
@@ -38,4 +41,4 @@ module TonSdkRuby
38
41
  provider.estimate_fee(address, body, init_code, init_data, ignore_chksig)
39
42
  end
40
43
  end
41
- end
44
+ end
@@ -1,6 +1,9 @@
1
1
  module TonSdkRuby
2
2
 
3
3
  class TonCenter
4
+ extend TonSdkRuby
5
+ include TonSdkRuby
6
+
4
7
  URL = 'https://toncenter.com/api/v2/jsonRPC'
5
8
  attr_accessor :api_key, :url
6
9
 
@@ -68,4 +71,4 @@ module TonSdkRuby
68
71
  }
69
72
  end
70
73
  end
71
- end
74
+ end
@@ -7,6 +7,9 @@ module TonSdkRuby
7
7
  FLAG_TEST_ONLY = 0x80
8
8
 
9
9
  class Address
10
+ extend TonSdkRuby
11
+ include TonSdkRuby
12
+
10
13
  NONE = nil
11
14
 
12
15
  class Type
@@ -200,4 +203,4 @@ module TonSdkRuby
200
203
  end
201
204
  end
202
205
  end
203
- end
206
+ end
@@ -1,5 +1,8 @@
1
1
  module TonSdkRuby
2
2
  class TickTockOptions
3
+ extend TonSdkRuby
4
+ include TonSdkRuby
5
+
3
6
  attr_accessor :tick, :tock
4
7
 
5
8
  def initialize(tick, tock)
@@ -9,6 +12,9 @@ module TonSdkRuby
9
12
  end
10
13
 
11
14
  class SimpleLibOptions
15
+ extend TonSdkRuby
16
+ include TonSdkRuby
17
+
12
18
  attr_accessor :public, :root
13
19
 
14
20
  def initialize(public_value, root_value)
@@ -18,6 +24,9 @@ module TonSdkRuby
18
24
  end
19
25
 
20
26
  class TickTock
27
+ extend TonSdkRuby
28
+ include TonSdkRuby
29
+
21
30
  attr_reader :data, :cell
22
31
 
23
32
  def initialize(options)
@@ -37,6 +46,9 @@ module TonSdkRuby
37
46
  end
38
47
 
39
48
  class SimpleLib
49
+ extend TonSdkRuby
50
+ include TonSdkRuby
51
+
40
52
  attr_reader :data, :cell
41
53
 
42
54
  def initialize(options)
@@ -57,6 +69,9 @@ module TonSdkRuby
57
69
  end
58
70
 
59
71
  class StateInitOptions
72
+ extend TonSdkRuby
73
+ include TonSdkRuby
74
+
60
75
  attr_accessor :split_depth, :special, :code, :data, :library
61
76
 
62
77
  def initialize(options = {})
@@ -69,6 +84,9 @@ module TonSdkRuby
69
84
  end
70
85
 
71
86
  class StateInit
87
+ extend TonSdkRuby
88
+ include TonSdkRuby
89
+
72
90
  attr_reader :data, :cell
73
91
 
74
92
  def initialize(state_init_options)
@@ -113,6 +131,9 @@ module TonSdkRuby
113
131
  end
114
132
 
115
133
  class IntMsgInfo
134
+ extend TonSdkRuby
135
+ include TonSdkRuby
136
+
116
137
  attr_accessor :tag, :ihr_disabled, :bounce, :bounced, :src, :dest, :value,
117
138
  :ihr_fee, :fwd_fee, :created_lt, :created_at
118
139
 
@@ -132,6 +153,9 @@ module TonSdkRuby
132
153
  end
133
154
 
134
155
  class ExtInMsgInfo
156
+ extend TonSdkRuby
157
+ include TonSdkRuby
158
+
135
159
  attr_accessor :tag, :src, :dest, :import_fee
136
160
 
137
161
  def initialize(options = {})
@@ -143,6 +167,9 @@ module TonSdkRuby
143
167
  end
144
168
 
145
169
  class CommonMsgInfo
170
+ extend TonSdkRuby
171
+ include TonSdkRuby
172
+
146
173
  attr_reader :data, :cell
147
174
 
148
175
  def initialize(data)
@@ -232,6 +259,9 @@ module TonSdkRuby
232
259
  end
233
260
 
234
261
  class MessageOptions
262
+ extend TonSdkRuby
263
+ include TonSdkRuby
264
+
235
265
  attr_accessor :info, :init, :body
236
266
 
237
267
  def initialize(options = {})
@@ -242,6 +272,9 @@ module TonSdkRuby
242
272
  end
243
273
 
244
274
  class Message
275
+ extend TonSdkRuby
276
+ include TonSdkRuby
277
+
245
278
  attr_reader :data, :cell
246
279
 
247
280
  def initialize(options)
@@ -294,6 +327,9 @@ module TonSdkRuby
294
327
  end
295
328
 
296
329
  class ActionSendMsg
330
+ extend TonSdkRuby
331
+ include TonSdkRuby
332
+
297
333
  attr_reader :tag, :mode, :out_msg
298
334
 
299
335
  def initialize(options)
@@ -304,6 +340,9 @@ module TonSdkRuby
304
340
  end
305
341
 
306
342
  class ActionSetCode
343
+ extend TonSdkRuby
344
+ include TonSdkRuby
345
+
307
346
  attr_reader :tag, :new_code
308
347
 
309
348
  def initialize(options)
@@ -313,6 +352,9 @@ module TonSdkRuby
313
352
  end
314
353
 
315
354
  class OutAction
355
+ extend TonSdkRuby
356
+ include TonSdkRuby
357
+
316
358
  def initialize(data)
317
359
  case data.tag
318
360
  when 'action_send_msg' then action_send_msg(data)
@@ -361,6 +403,9 @@ module TonSdkRuby
361
403
  end
362
404
 
363
405
  class OutListOptions
406
+ extend TonSdkRuby
407
+ include TonSdkRuby
408
+
364
409
  attr_reader :actions
365
410
 
366
411
  def initialize(options)
@@ -369,6 +414,8 @@ module TonSdkRuby
369
414
  end
370
415
 
371
416
  class OutList
417
+ extend TonSdkRuby
418
+ include TonSdkRuby
372
419
 
373
420
  attr_reader :cell, :data
374
421
  def initialize(action)
@@ -385,4 +432,4 @@ module TonSdkRuby
385
432
  @cell = cur
386
433
  end
387
434
  end
388
- end
435
+ end
@@ -3,6 +3,9 @@ require 'bigdecimal'
3
3
  module TonSdkRuby
4
4
 
5
5
  class Coins
6
+ extend TonSdkRuby
7
+ include TonSdkRuby
8
+
6
9
  attr_reader :value, :decimals, :multiplier
7
10
  private :value, :decimals, :multiplier
8
11
 
@@ -185,4 +188,4 @@ class BigDecimal
185
188
  return 0 if digits_after_comma == '0'
186
189
  digits_after_comma.size
187
190
  end
188
- end
191
+ end
@@ -1,4 +1,4 @@
1
1
  module TonSdkRuby
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.3"
3
3
  end
4
4
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ton-sdk-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - nerzh
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-08-25 00:00:00.000000000 Z
11
+ date: 2023-10-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ed25519