ever_sdk_client 1.36.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.
@@ -0,0 +1,122 @@
1
+ module EverSdk
2
+ module Utils
3
+
4
+ #
5
+ # types
6
+ #
7
+
8
+ class AddressStringFormat
9
+ TYPES = [:account_id, :hex, :base64]
10
+ attr_reader :type_, :url, :test_, :bounce
11
+
12
+ def initialize(type_:, url: nil, test_: nil, bounce: nil)
13
+ unless TYPES.include?(type_)
14
+ raise ArgumentError.new("type #{type_} is unknown; known types: #{TYPES}")
15
+ end
16
+
17
+ @type_ = type_
18
+ if @type_ == :base64
19
+ @url = url
20
+ @test_ = test_
21
+ @bounce = bounce
22
+ end
23
+ end
24
+
25
+ def to_h
26
+ {
27
+ type: Helper.sym_to_capitalized_case_str(@type_),
28
+ url: @url,
29
+ test: @test_,
30
+ bounce: @bounce
31
+ }
32
+ end
33
+ end
34
+
35
+ ParamsOfConvertAddress = KwStruct.new(:address, :output_format) do
36
+ def to_h
37
+ {
38
+ address: address,
39
+ output_format: output_format.to_h
40
+ }
41
+ end
42
+ end
43
+
44
+ ResultOfConvertAddress = KwStruct.new(:address)
45
+ ParamsOfCalcStorageFee = KwStruct.new(:account, :period)
46
+ ResultOfCalcStorageFee = KwStruct.new(:fee)
47
+
48
+ ParamsOfCompressZstd = KwStruct.new(:uncompressed, :level)
49
+ ResultOfCompressZstd = KwStruct.new(:compressed)
50
+
51
+ ParamsOfDecompressZstd = KwStruct.new(:compressed)
52
+ ResultOfDecompressZstd = KwStruct.new(:decompressed)
53
+
54
+ ParamsOfGetAddressType = KwStruct.new(:address)
55
+ ResultOfGetAddressType = KwStruct.new(:address_type)
56
+
57
+
58
+ #
59
+ # functions
60
+ #
61
+
62
+ def self.convert_address(ctx, params)
63
+ Interop::request_to_native_lib(ctx, "utils.convert_address", params) do |resp|
64
+ if resp.success?
65
+ yield NativeLibResponseResult.new(
66
+ result: ResultOfConvertAddress.new(address: resp.result["address"])
67
+ )
68
+ else
69
+ yield resp
70
+ end
71
+ end
72
+ end
73
+
74
+ def self.calc_storage_fee(ctx, params)
75
+ Interop::request_to_native_lib(ctx, "utils.calc_storage_fee", params) do |resp|
76
+ if resp.success?
77
+ yield NativeLibResponseResult.new(
78
+ result: ResultOfCalcStorageFee.new(fee: resp.result["fee"])
79
+ )
80
+ else
81
+ yield resp
82
+ end
83
+ end
84
+ end
85
+
86
+ def self.compress_zstd(ctx, params)
87
+ Interop::request_to_native_lib(ctx, "utils.compress_zstd", params) do |resp|
88
+ if resp.success?
89
+ yield NativeLibResponseResult.new(
90
+ result: ResultOfCompressZstd.new(compressed: resp.result["compressed"])
91
+ )
92
+ else
93
+ yield resp
94
+ end
95
+ end
96
+ end
97
+
98
+ def self.decompress_zstd(ctx, params)
99
+ Interop::request_to_native_lib(ctx, "utils.decompress_zstd", params) do |resp|
100
+ if resp.success?
101
+ yield NativeLibResponseResult.new(
102
+ result: ResultOfDecompressZstd.new(decompressed: resp.result["decompressed"])
103
+ )
104
+ else
105
+ yield resp
106
+ end
107
+ end
108
+ end
109
+
110
+ def self.get_address_type(ctx, params)
111
+ Interop::request_to_native_lib(ctx, "utils.get_address_type", params) do |resp|
112
+ if resp.success?
113
+ yield NativeLibResponseResult.new(
114
+ result: ResultOfGetAddressType.new(address_type: resp.result["address_type"])
115
+ )
116
+ else
117
+ yield resp
118
+ end
119
+ end
120
+ end
121
+ end
122
+ end
@@ -0,0 +1,4 @@
1
+ module EverSdk
2
+ VERSION = "1.36.0"
3
+ NATIVE_SDK_VERSION = "1.36.0"
4
+ end
@@ -0,0 +1,6 @@
1
+ require_relative 'ever_sdk_client/version'
2
+ require_relative 'ever_sdk_client/client_context'
3
+
4
+ # TODO rename to EverSdkClient?
5
+ module EverSdk
6
+ end
metadata ADDED
@@ -0,0 +1,136 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: ever_sdk_client
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.36.0
5
+ platform: ruby
6
+ authors:
7
+ - Alex Maslakov
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2022-07-14 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: ffi
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.13'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.13'
27
+ - !ruby/object:Gem::Dependency
28
+ name: concurrent-ruby
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: 1.1.7
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: 1.1.7
41
+ - !ruby/object:Gem::Dependency
42
+ name: rspec
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '3.4'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '3.4'
55
+ - !ruby/object:Gem::Dependency
56
+ name: bundler
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '2.1'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '2.1'
69
+ - !ruby/object:Gem::Dependency
70
+ name: rake
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: '13.0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: '13.0'
83
+ description: Everscale SDK client library written in Ruby and to be used as a Ruby
84
+ gem, for tonlabs.io
85
+ email: alex@serendipia.email
86
+ executables: []
87
+ extensions: []
88
+ extra_rdoc_files:
89
+ - README.md
90
+ - LICENSE
91
+ files:
92
+ - CHANGELOG.md
93
+ - LICENSE
94
+ - README.md
95
+ - lib/ever_sdk_client.rb
96
+ - lib/ever_sdk_client/abi.rb
97
+ - lib/ever_sdk_client/boc.rb
98
+ - lib/ever_sdk_client/client.rb
99
+ - lib/ever_sdk_client/client_context.rb
100
+ - lib/ever_sdk_client/config.rb
101
+ - lib/ever_sdk_client/crypto.rb
102
+ - lib/ever_sdk_client/debot.rb
103
+ - lib/ever_sdk_client/helper.rb
104
+ - lib/ever_sdk_client/interop.rb
105
+ - lib/ever_sdk_client/kw_struct.rb
106
+ - lib/ever_sdk_client/net.rb
107
+ - lib/ever_sdk_client/processing.rb
108
+ - lib/ever_sdk_client/proofs.rb
109
+ - lib/ever_sdk_client/tvm.rb
110
+ - lib/ever_sdk_client/types.rb
111
+ - lib/ever_sdk_client/utils.rb
112
+ - lib/ever_sdk_client/version.rb
113
+ homepage: https://github.com/radianceteam/everscale-client-ruby
114
+ licenses:
115
+ - MIT
116
+ metadata: {}
117
+ post_install_message:
118
+ rdoc_options: []
119
+ require_paths:
120
+ - lib
121
+ required_ruby_version: !ruby/object:Gem::Requirement
122
+ requirements:
123
+ - - ">="
124
+ - !ruby/object:Gem::Version
125
+ version: '3.0'
126
+ required_rubygems_version: !ruby/object:Gem::Requirement
127
+ requirements:
128
+ - - ">="
129
+ - !ruby/object:Gem::Version
130
+ version: '0'
131
+ requirements: []
132
+ rubygems_version: 3.2.22
133
+ signing_key:
134
+ specification_version: 4
135
+ summary: Everscale SDK client library, in Ruby and for Ruby
136
+ test_files: []