ton_sdk_client 1.10.0 → 1.11.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/ton_sdk_client/utils.rb +37 -0
- data/lib/ton_sdk_client/version.rb +2 -2
- 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: 9e491f78e780af924acb7e0584e7d9fdb8e2699ca2de5b852686cce7ab448eef
|
4
|
+
data.tar.gz: ddf712472ddcf5c7642db07bd2df1109849a4e6868e5a823e1c4a367e23e9a10
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1a177bd31e3e945680f15314679cc039960ce73ce5cee71648b61403315f3c37a9b5bad084d7bb76e47cf93b3a2f894a05e6e6249440ea0151de471194873bd5
|
7
|
+
data.tar.gz: 98d98e066957fd4f994b45edd97d8fdbfa4807189f8fba928aeb22ecfde1c2fe7a670f0606d0af944b0d605f7139d3629e54c4047e2433e2df463ad3f67f41a6
|
data/README.md
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# TON SDK client in Ruby and for Ruby
|
2
2
|
|
3
3
|
[![Gem Version](https://badge.fury.io/rb/ton_sdk_client.png)](https://badge.fury.io/rb/ton_sdk_client)
|
4
|
-
[![TON SDK version](https://img.shields.io/badge/TON%20SDK%20version-1.
|
4
|
+
[![TON SDK version](https://img.shields.io/badge/TON%20SDK%20version-1.11.0-green)](https://github.com/tonlabs/TON-SDK/tree/1.11.0)
|
5
5
|
|
6
6
|
Ruby gem-client bindings for [TON SDK](https://github.com/tonlabs/TON-SDK) which allows one to communicate with [FreeTON](https://freeton.org) blockchain in Ruby.
|
7
7
|
|
data/lib/ton_sdk_client/utils.rb
CHANGED
@@ -56,6 +56,30 @@ module TonSdk
|
|
56
56
|
end
|
57
57
|
end
|
58
58
|
|
59
|
+
class ParamsOfCalcStorageFee
|
60
|
+
attr_reader :account, :period
|
61
|
+
|
62
|
+
def initialize(account:, period:)
|
63
|
+
@account = account
|
64
|
+
@period = period
|
65
|
+
end
|
66
|
+
|
67
|
+
def to_h
|
68
|
+
{
|
69
|
+
account: @account,
|
70
|
+
period: @period
|
71
|
+
}
|
72
|
+
end
|
73
|
+
end
|
74
|
+
|
75
|
+
class ResultOfCalcStorageFee
|
76
|
+
attr_reader :fee
|
77
|
+
|
78
|
+
def initialize(a)
|
79
|
+
@fee = a
|
80
|
+
end
|
81
|
+
end
|
82
|
+
|
59
83
|
|
60
84
|
#
|
61
85
|
# functions
|
@@ -72,5 +96,18 @@ module TonSdk
|
|
72
96
|
end
|
73
97
|
end
|
74
98
|
end
|
99
|
+
|
100
|
+
|
101
|
+
def self.calc_storage_fee(ctx, prm)
|
102
|
+
Interop::request_to_native_lib(ctx, "utils.calc_storage_fee", prm.to_h.to_json) do |resp|
|
103
|
+
if resp.success?
|
104
|
+
yield NativeLibResponsetResult.new(
|
105
|
+
result: Utils::ResultOfCalcStorageFee.new(resp.result["fee"])
|
106
|
+
)
|
107
|
+
else
|
108
|
+
yield resp
|
109
|
+
end
|
110
|
+
end
|
111
|
+
end
|
75
112
|
end
|
76
113
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ton_sdk_client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.11.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alex Maslakov
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-04-
|
11
|
+
date: 2021-04-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ffi
|