universa 3.10.5.3 → 3.11.3.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: bca9c1f302fe4ede2b618ce1c3f4aab1b0333753f85c1ec517fb356ef89d5192
4
- data.tar.gz: a9e46778d71229fb9e70346facf95b449de040718619b10c9d10f823accc0ac7
3
+ metadata.gz: eed55ad13eb33d82154f0e78016ffca11256e127729fc3f0f0590a8eb53c6a5f
4
+ data.tar.gz: 0ba2745321f2191f3fe14b8326637deb781480b1254997086cb6d569d3bc2b08
5
5
  SHA512:
6
- metadata.gz: 112e18a1eacd324186e2d57266d018da82fa95b64c9f67ccbdee98d873db2ba12196ab9f49e98998edbd3c410349e7330bd0261f7172b82e23d3a80622979c18
7
- data.tar.gz: af99d73ab560a95b90b64e9c88a71db0ddcf262865320f287731abf7faa54060191172000145e733d93972a06a8bc8bdccb8bdd1835583db3ccae04efb98eea9
6
+ metadata.gz: c79197b6ee91e6b1d512ddec2c7686039df47f4457209a3e0db923b7d6f15b947d67f1f6d94f7a4ece65c3106b04c6189a4e05400705b6cae4a0b93a1e75c05c
7
+ data.tar.gz: b8ac653e8085c1f1cfe218d6aef739b0580ca18bb092d1d5767a036aa0792b45bcef34373d0279ca54ca786e7d4a9acd177a42ab5e982d86c0bee670e2f00832
data/.gitignore CHANGED
@@ -15,3 +15,4 @@ Gemfile.lock
15
15
  /**/sessionlog.txt
16
16
  .DS_Store
17
17
  /*.private.unikey
18
+ /umi.log
@@ -16,5 +16,5 @@ rm -rd ./bin/__MACOSX >/dev/null 2>&1
16
16
 
17
17
  rm download
18
18
 
19
- echo "done!"
19
+ echo "successfully nstalled version: `bin/umi/bin/umi --version`"
20
20
 
@@ -344,7 +344,7 @@ declare -r lib_dir="$(realpath "${app_home}/../lib")"
344
344
  declare -a app_mainclass=(com.icodici.farcallscala.Main)
345
345
 
346
346
  declare -r script_conf_file="${app_home}/../conf/application.ini"
347
- declare -r app_classpath="$lib_dir/com.icodici.umi-0.8.49.jar:$lib_dir/org.scala-lang.scala-library-2.12.7.jar:$lib_dir/com.icodici.universa_core-3.10.5.1.jar:$lib_dir/org.yaml.snakeyaml-1.18.jar:$lib_dir/com.icodici.nanohttpd-2.1.0.jar:$lib_dir/com.icodici.common_tools-3.10.5.1.jar:$lib_dir/com.eclipsesource.minimal-json.minimal-json-0.9.4.jar:$lib_dir/net.java.dev.jna.jna-4.5.1.jar:$lib_dir/org.checkerframework.checker-qual-2.3.2.jar:$lib_dir/com.icodici.crypto-3.10.5.1.jar:$lib_dir/org.bouncycastle.bcprov-jdk15on-1.62.jar:$lib_dir/com.squareup.jnagmp.jnagmp-2.0.0.jar:$lib_dir/com.typesafe.play.play-json_2.12-2.6.10.jar:$lib_dir/com.typesafe.play.play-functional_2.12-2.6.10.jar:$lib_dir/org.scala-lang.scala-reflect-2.12.7.jar:$lib_dir/org.typelevel.macro-compat_2.12-1.1.1.jar:$lib_dir/joda-time.joda-time-2.9.9.jar:$lib_dir/com.fasterxml.jackson.core.jackson-core-2.8.11.jar:$lib_dir/com.fasterxml.jackson.core.jackson-annotations-2.8.11.jar:$lib_dir/com.fasterxml.jackson.datatype.jackson-datatype-jdk8-2.8.11.jar:$lib_dir/com.fasterxml.jackson.core.jackson-databind-2.8.11.1.jar:$lib_dir/com.fasterxml.jackson.datatype.jackson-datatype-jsr310-2.8.11.jar:$lib_dir/org.scala-sbt.ipcsocket.ipcsocket-1.0.0.jar:$lib_dir/net.java.dev.jna.jna-platform-4.5.0.jar:$lib_dir/net.sf.jopt-simple.jopt-simple-4.9.jar"
347
+ declare -r app_classpath="$lib_dir/com.icodici.umi-0.8.52.jar:$lib_dir/org.scala-lang.scala-library-2.12.7.jar:$lib_dir/com.icodici.universa_core-3.11.3.jar:$lib_dir/org.yaml.snakeyaml-1.18.jar:$lib_dir/com.icodici.nanohttpd-2.1.0.jar:$lib_dir/com.icodici.common_tools-3.11.3.jar:$lib_dir/com.eclipsesource.minimal-json.minimal-json-0.9.4.jar:$lib_dir/net.java.dev.jna.jna-4.5.1.jar:$lib_dir/org.checkerframework.checker-qual-2.3.2.jar:$lib_dir/com.icodici.crypto-3.11.3.jar:$lib_dir/org.bouncycastle.bcprov-jdk15on-1.62.jar:$lib_dir/com.squareup.jnagmp.jnagmp-2.0.0.jar:$lib_dir/com.typesafe.play.play-json_2.12-2.6.10.jar:$lib_dir/com.typesafe.play.play-functional_2.12-2.6.10.jar:$lib_dir/org.scala-lang.scala-reflect-2.12.7.jar:$lib_dir/org.typelevel.macro-compat_2.12-1.1.1.jar:$lib_dir/joda-time.joda-time-2.9.9.jar:$lib_dir/com.fasterxml.jackson.core.jackson-core-2.8.11.jar:$lib_dir/com.fasterxml.jackson.core.jackson-annotations-2.8.11.jar:$lib_dir/com.fasterxml.jackson.datatype.jackson-datatype-jdk8-2.8.11.jar:$lib_dir/com.fasterxml.jackson.core.jackson-databind-2.8.11.1.jar:$lib_dir/com.fasterxml.jackson.datatype.jackson-datatype-jsr310-2.8.11.jar:$lib_dir/org.scala-sbt.ipcsocket.ipcsocket-1.0.0.jar:$lib_dir/net.java.dev.jna.jna-platform-4.5.0.jar:$lib_dir/net.sf.jopt-simple.jopt-simple-4.9.jar"
348
348
 
349
349
  # java_cmd is overrode in process_args when -java-home is used
350
350
  declare java_cmd=$(get_java_cmd)
@@ -80,7 +80,7 @@ rem "-J" is stripped, "-D" is left as is, and everything is appended to JAVA_OPT
80
80
  set _JAVA_PARAMS=
81
81
  set _APP_ARGS=
82
82
 
83
- set "APP_CLASSPATH=%APP_LIB_DIR%\com.icodici.umi-0.8.49.jar;%APP_LIB_DIR%\org.scala-lang.scala-library-2.12.7.jar;%APP_LIB_DIR%\com.icodici.universa_core-3.10.5.1.jar;%APP_LIB_DIR%\org.yaml.snakeyaml-1.18.jar;%APP_LIB_DIR%\com.icodici.nanohttpd-2.1.0.jar;%APP_LIB_DIR%\com.icodici.common_tools-3.10.5.1.jar;%APP_LIB_DIR%\com.eclipsesource.minimal-json.minimal-json-0.9.4.jar;%APP_LIB_DIR%\net.java.dev.jna.jna-4.5.1.jar;%APP_LIB_DIR%\org.checkerframework.checker-qual-2.3.2.jar;%APP_LIB_DIR%\com.icodici.crypto-3.10.5.1.jar;%APP_LIB_DIR%\org.bouncycastle.bcprov-jdk15on-1.62.jar;%APP_LIB_DIR%\com.squareup.jnagmp.jnagmp-2.0.0.jar;%APP_LIB_DIR%\com.typesafe.play.play-json_2.12-2.6.10.jar;%APP_LIB_DIR%\com.typesafe.play.play-functional_2.12-2.6.10.jar;%APP_LIB_DIR%\org.scala-lang.scala-reflect-2.12.7.jar;%APP_LIB_DIR%\org.typelevel.macro-compat_2.12-1.1.1.jar;%APP_LIB_DIR%\joda-time.joda-time-2.9.9.jar;%APP_LIB_DIR%\com.fasterxml.jackson.core.jackson-core-2.8.11.jar;%APP_LIB_DIR%\com.fasterxml.jackson.core.jackson-annotations-2.8.11.jar;%APP_LIB_DIR%\com.fasterxml.jackson.datatype.jackson-datatype-jdk8-2.8.11.jar;%APP_LIB_DIR%\com.fasterxml.jackson.core.jackson-databind-2.8.11.1.jar;%APP_LIB_DIR%\com.fasterxml.jackson.datatype.jackson-datatype-jsr310-2.8.11.jar;%APP_LIB_DIR%\org.scala-sbt.ipcsocket.ipcsocket-1.0.0.jar;%APP_LIB_DIR%\net.java.dev.jna.jna-platform-4.5.0.jar;%APP_LIB_DIR%\net.sf.jopt-simple.jopt-simple-4.9.jar"
83
+ set "APP_CLASSPATH=%APP_LIB_DIR%\com.icodici.umi-0.8.52.jar;%APP_LIB_DIR%\org.scala-lang.scala-library-2.12.7.jar;%APP_LIB_DIR%\com.icodici.universa_core-3.11.3.jar;%APP_LIB_DIR%\org.yaml.snakeyaml-1.18.jar;%APP_LIB_DIR%\com.icodici.nanohttpd-2.1.0.jar;%APP_LIB_DIR%\com.icodici.common_tools-3.11.3.jar;%APP_LIB_DIR%\com.eclipsesource.minimal-json.minimal-json-0.9.4.jar;%APP_LIB_DIR%\net.java.dev.jna.jna-4.5.1.jar;%APP_LIB_DIR%\org.checkerframework.checker-qual-2.3.2.jar;%APP_LIB_DIR%\com.icodici.crypto-3.11.3.jar;%APP_LIB_DIR%\org.bouncycastle.bcprov-jdk15on-1.62.jar;%APP_LIB_DIR%\com.squareup.jnagmp.jnagmp-2.0.0.jar;%APP_LIB_DIR%\com.typesafe.play.play-json_2.12-2.6.10.jar;%APP_LIB_DIR%\com.typesafe.play.play-functional_2.12-2.6.10.jar;%APP_LIB_DIR%\org.scala-lang.scala-reflect-2.12.7.jar;%APP_LIB_DIR%\org.typelevel.macro-compat_2.12-1.1.1.jar;%APP_LIB_DIR%\joda-time.joda-time-2.9.9.jar;%APP_LIB_DIR%\com.fasterxml.jackson.core.jackson-core-2.8.11.jar;%APP_LIB_DIR%\com.fasterxml.jackson.core.jackson-annotations-2.8.11.jar;%APP_LIB_DIR%\com.fasterxml.jackson.datatype.jackson-datatype-jdk8-2.8.11.jar;%APP_LIB_DIR%\com.fasterxml.jackson.core.jackson-databind-2.8.11.1.jar;%APP_LIB_DIR%\com.fasterxml.jackson.datatype.jackson-datatype-jsr310-2.8.11.jar;%APP_LIB_DIR%\org.scala-sbt.ipcsocket.ipcsocket-1.0.0.jar;%APP_LIB_DIR%\net.java.dev.jna.jna-platform-4.5.0.jar;%APP_LIB_DIR%\net.sf.jopt-simple.jopt-simple-4.9.jar"
84
84
  set "APP_MAIN_CLASS=com.icodici.farcallscala.Main"
85
85
  set "SCRIPT_CONF_FILE=%APP_HOME%\conf\application.ini"
86
86
 
@@ -163,6 +163,10 @@ module Universa
163
163
 
164
164
  end
165
165
 
166
+ class Compound < RemoteAdapter
167
+ remote_class "com.icodici.universa.contract.helpers.Compound"
168
+ end
169
+
166
170
  # Universa contract adapter.
167
171
  class Contract < RemoteAdapter
168
172
  remote_class "com.icodici.universa.contract.Contract"
@@ -350,8 +354,6 @@ module Universa
350
354
  return false if !other || !other.is_a?(Contract)
351
355
  hash_id == other.hash_id
352
356
  end
353
-
354
-
355
357
  end
356
358
 
357
359
  end
@@ -32,6 +32,17 @@ module Universa
32
32
  def public_key
33
33
  @public_key ||= get_public_key
34
34
  end
35
+
36
+ # @return key strength in bits, e.g. 2048, 4096...
37
+ def bit_strength
38
+ @public_key.bit_strength
39
+ end
40
+
41
+ # sign data or string with a specified hash type
42
+ # @return binary signature
43
+ def sign(data, hash_type = "SHA3_384")
44
+ __getobj__.sign(data.force_encoding('binary'), hash_type)
45
+ end
35
46
  end
36
47
 
37
48
  # A +com.icodici.crypto.PublicKey+ extension. As the key is immutable,
@@ -52,6 +63,11 @@ module Universa
52
63
  end
53
64
  end
54
65
 
66
+ # @return key strength in bits, e.g. 2048, 4096...
67
+ def bit_strength
68
+ getBitStrength()
69
+ end
70
+
55
71
  # @return [KeyAddress] short address
56
72
  def short_address
57
73
  @short_address ||= get_short_address()
@@ -61,6 +77,21 @@ module Universa
61
77
  def long_address
62
78
  @long_address ||= get_long_address()
63
79
  end
80
+
81
+ # Check signature
82
+ # @param [String] data as binary or normal string
83
+ # @param [Object] signature as binary string
84
+ # @param [Object] hash_type to use
85
+ # @return true if it is ok
86
+ def verify(data, signature, hash_type = "SHA3_384")
87
+ __getobj__.verify(data.force_encoding('binary'), signature, hash_type)
88
+ end
89
+
90
+ # @param [String] data binary or usual data string
91
+ # @return [String] binary string with encrypted data
92
+ def encrypt(data)
93
+ __getobj__.encrypt(data.force_encoding('binary'))
94
+ end
64
95
  end
65
96
 
66
97
  # A +com.icodici.crypto.SymmetricKey+ extension. As the key is immutable,
@@ -73,7 +104,7 @@ module Universa
73
104
  # @param [Object] rounds derivation rounds
74
105
  # @param [Object] salt optional salt used to disallow detect password match by key match
75
106
  # @return [SymmetricKey] instance
76
- def self.from_password(password, rounds, salt=nil)
107
+ def self.from_password(password, rounds, salt = nil)
77
108
  salt.force_encoding(Encoding::BINARY) if salt
78
109
  invoke_static 'fromPassword', password, rounds, salt
79
110
  end
@@ -94,6 +125,16 @@ module Universa
94
125
  def key
95
126
  @key ||= getKey()
96
127
  end
128
+
129
+ # Encrypt data using EtA (HMAC)
130
+ def eta_encrypt(plaintext)
131
+ __getobj__.etaEncrypt(plaintext.force_encoding('binary'))
132
+ end
133
+
134
+ # Decrypt data using EtA (HMAC)
135
+ def eta_decrypt(plaintext)
136
+ __getobj__.eta_decrypt(plaintext.force_encoding('binary'))
137
+ end
97
138
  end
98
139
 
99
140
  # The +com.icodici.crypto.KeyAddress+ extension. As it is immutable, caching is
@@ -27,7 +27,7 @@ module Universa
27
27
  [Contract, PrivateKey, PublicKey, KeyAddress, HashId, Binder,
28
28
  Role, SimpleRole, RoleLink, ListRole,
29
29
  ChangeOwnerPermission, RevokePermission, ModifyDataPermission, SplitJoinPermission,
30
- UmiClient, Duration].each {|klass| register_proxy klass}
30
+ UmiClient, Duration, Compound].each {|klass| register_proxy klass}
31
31
  end
32
32
 
33
33
  # Implementation of {Service.configure}
@@ -79,4 +79,8 @@ module Universa
79
79
  static_method :obtainPaymentOnClosedEscrow
80
80
  static_method :getPayment
81
81
  end
82
- end
82
+
83
+ class ContractService < RemoteAdapter
84
+ remote_class " com.icodici.universa.contract.ContractsService"
85
+ end
86
+ end
@@ -1,4 +1,4 @@
1
1
  module Universa
2
2
  # Current gem version
3
- VERSION = "3.10.5.3"
3
+ VERSION = "3.11.3.1"
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: universa
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.10.5.3
4
+ version: 3.11.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - sergeych
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-08-12 00:00:00.000000000 Z
11
+ date: 2019-08-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: farcall
@@ -151,11 +151,11 @@ files:
151
151
  - bin/umi/lib/com.fasterxml.jackson.core.jackson-databind-2.8.11.1.jar
152
152
  - bin/umi/lib/com.fasterxml.jackson.datatype.jackson-datatype-jdk8-2.8.11.jar
153
153
  - bin/umi/lib/com.fasterxml.jackson.datatype.jackson-datatype-jsr310-2.8.11.jar
154
- - bin/umi/lib/com.icodici.common_tools-3.10.5.1.jar
155
- - bin/umi/lib/com.icodici.crypto-3.10.5.1.jar
154
+ - bin/umi/lib/com.icodici.common_tools-3.11.3.jar
155
+ - bin/umi/lib/com.icodici.crypto-3.11.3.jar
156
156
  - bin/umi/lib/com.icodici.nanohttpd-2.1.0.jar
157
- - bin/umi/lib/com.icodici.umi-0.8.49.jar
158
- - bin/umi/lib/com.icodici.universa_core-3.10.5.1.jar
157
+ - bin/umi/lib/com.icodici.umi-0.8.52.jar
158
+ - bin/umi/lib/com.icodici.universa_core-3.11.3.jar
159
159
  - bin/umi/lib/com.squareup.jnagmp.jnagmp-2.0.0.jar
160
160
  - bin/umi/lib/com.typesafe.play.play-functional_2.12-2.6.10.jar
161
161
  - bin/umi/lib/com.typesafe.play.play-json_2.12-2.6.10.jar