test_sdk1 1.0.2 → 1.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +495 -76
- data/lib/crypto/asymmetric_key.rb +19 -18
- data/lib/crypto/ed25519_key.rb +99 -10
- data/lib/crypto/keys.rb +1 -2
- data/lib/crypto/keys_util.rb +20 -0
- data/lib/entity/auction_state.rb +56 -8
- data/lib/entity/bid.rb +1 -1
- data/lib/entity/bid_info.rb +1 -1
- data/lib/entity/block.rb +39 -0
- data/lib/entity/block_body.rb +35 -0
- data/lib/entity/block_header.rb +81 -0
- data/lib/entity/block_info.rb +56 -0
- data/lib/entity/block_proof.rb +24 -0
- data/lib/entity/deploy.rb +154 -1
- data/lib/entity/deploy_executable.rb +108 -6
- data/lib/entity/deploy_executable_item_internal.rb +1 -1
- data/lib/entity/deploy_header.rb +17 -0
- data/lib/entity/deploy_named_argument.rb +69 -2
- data/lib/entity/era_summary.rb +13 -12
- data/lib/entity/group.rb +1 -1
- data/lib/entity/module_bytes.rb +16 -2
- data/lib/entity/status.rb +80 -0
- data/lib/entity/stored_contract_by_name.rb +2 -1
- data/lib/entity/stored_value.rb +86 -11
- data/lib/entity/stored_versioned_contract_by_hash.rb +2 -1
- data/lib/entity/stored_versioned_contract_by_name.rb +1 -1
- data/lib/entity/transfer.rb +7 -7
- data/lib/include.rb +2 -0
- data/lib/rpc/rpc_client.rb +1 -2
- data/lib/serialization/cl_type_serializer.rb +1 -0
- data/lib/serialization/cl_value_serializer.rb +70 -12
- data/lib/serialization/cl_value_serializer1.rb +314 -0
- data/lib/serialization/cl_value_serializer_update.rb +320 -0
- data/lib/serialization/deploy_approval_serializer.rb +1 -0
- data/lib/serialization/deploy_executable_serializer.rb +1 -1
- data/lib/serialization/deploy_header_serializer.rb +2 -1
- data/lib/serialization/deploy_named_arg_serializer.rb +2 -0
- data/lib/serialization/deploy_serializer.rb +145 -10
- data/lib/serialization/deploy_serializer1.rb +392 -0
- data/lib/serialization/deploy_serializer_update.rb +397 -0
- data/lib/serialization/test.rb +33 -13
- data/lib/test_sdk1.rb +30 -13
- data/lib/types/cl_option.rb +8 -2
- data/lib/types/cl_public_key.rb +2 -0
- data/lib/types/cl_type.rb +1 -0
- data/lib/types/cl_value.rb +8 -0
- data/lib/utils/byte_utils.rb +28 -0
- data/lib/utils/helpers.rb +10 -0
- data/lib/version.rb +1 -1
- data/spec/cl_value_serializer_spec.rb +16 -1
- data/spec/client_spec.rb +20 -20
- data/spec/dene_spec.rb +186 -0
- data/spec/deploy_executable_spec.rb +90 -0
- data/spec/deploy_executable_test_spec.rb +117 -0
- data/spec/deploy_serializer_spec.rb +5 -3
- data/spec/deploy_serializer_test_spec.rb +7 -1
- data/spec/testnet_spec.rb +3 -1
- data/spec/time_utils_spec.rb +3 -0
- metadata +20 -5
- data/lib/crypto/key_pair.rb +0 -40
- data/spec/deploy_executable_serializer_spec.rb +0 -0
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: test_sdk1
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mehmet Sait Gülmez
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-10-19 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Ruby gem enables developers to interact with the Casper Network.
|
14
14
|
email: cenggulmez.65@gmail.com
|
@@ -24,8 +24,8 @@ files:
|
|
24
24
|
- lib/crypto/01_ed25519.rb
|
25
25
|
- lib/crypto/asymmetric_key.rb
|
26
26
|
- lib/crypto/ed25519_key.rb
|
27
|
-
- lib/crypto/key_pair.rb
|
28
27
|
- lib/crypto/keys.rb
|
28
|
+
- lib/crypto/keys_util.rb
|
29
29
|
- lib/crypto/secp256k1_key.rb
|
30
30
|
- lib/crypto/test_ed25519_key.rb
|
31
31
|
- lib/entity/account.rb
|
@@ -34,6 +34,11 @@ files:
|
|
34
34
|
- lib/entity/auction_state.rb
|
35
35
|
- lib/entity/bid.rb
|
36
36
|
- lib/entity/bid_info.rb
|
37
|
+
- lib/entity/block.rb
|
38
|
+
- lib/entity/block_body.rb
|
39
|
+
- lib/entity/block_header.rb
|
40
|
+
- lib/entity/block_info.rb
|
41
|
+
- lib/entity/block_proof.rb
|
37
42
|
- lib/entity/contract.rb
|
38
43
|
- lib/entity/contract_package.rb
|
39
44
|
- lib/entity/contract_version.rb
|
@@ -57,6 +62,7 @@ files:
|
|
57
62
|
- lib/entity/module_bytes.rb
|
58
63
|
- lib/entity/peer.rb
|
59
64
|
- lib/entity/seigniorage_allocation.rb
|
65
|
+
- lib/entity/status.rb
|
60
66
|
- lib/entity/stored_contract_by_hash.rb
|
61
67
|
- lib/entity/stored_contract_by_name.rb
|
62
68
|
- lib/entity/stored_value.rb
|
@@ -72,11 +78,15 @@ files:
|
|
72
78
|
- lib/serialization/cl_type_serializer.rb
|
73
79
|
- lib/serialization/cl_value_bytes_parsers.rb
|
74
80
|
- lib/serialization/cl_value_serializer.rb
|
81
|
+
- lib/serialization/cl_value_serializer1.rb
|
82
|
+
- lib/serialization/cl_value_serializer_update.rb
|
75
83
|
- lib/serialization/deploy_approval_serializer.rb
|
76
84
|
- lib/serialization/deploy_executable_serializer.rb
|
77
85
|
- lib/serialization/deploy_header_serializer.rb
|
78
86
|
- lib/serialization/deploy_named_arg_serializer.rb
|
79
87
|
- lib/serialization/deploy_serializer.rb
|
88
|
+
- lib/serialization/deploy_serializer1.rb
|
89
|
+
- lib/serialization/deploy_serializer_update.rb
|
80
90
|
- lib/serialization/test.rb
|
81
91
|
- lib/test_sdk1.rb
|
82
92
|
- lib/types/cl_account_hash.rb
|
@@ -132,6 +142,7 @@ files:
|
|
132
142
|
- lib/utils/byte_utils.rb
|
133
143
|
- lib/utils/find_byte_parser_by_cl_type.rb
|
134
144
|
- lib/utils/hash_utils.rb
|
145
|
+
- lib/utils/helpers.rb
|
135
146
|
- lib/utils/hex_utils.rb
|
136
147
|
- lib/utils/time_utils.rb
|
137
148
|
- lib/utils/utils.rb
|
@@ -143,8 +154,10 @@ files:
|
|
143
154
|
- spec/cl_value_serializer_spec.rb
|
144
155
|
- spec/client_spec.rb
|
145
156
|
- spec/crypto_spec.rb
|
157
|
+
- spec/dene_spec.rb
|
146
158
|
- spec/deploy_approval_serializer_spec.rb
|
147
|
-
- spec/
|
159
|
+
- spec/deploy_executable_spec.rb
|
160
|
+
- spec/deploy_executable_test_spec.rb
|
148
161
|
- spec/deploy_header_serializer_spec.rb
|
149
162
|
- spec/deploy_named_arg_serializer_spec.rb
|
150
163
|
- spec/deploy_serializer_spec.rb
|
@@ -185,8 +198,10 @@ test_files:
|
|
185
198
|
- spec/cl_value_serializer_spec.rb
|
186
199
|
- spec/client_spec.rb
|
187
200
|
- spec/crypto_spec.rb
|
201
|
+
- spec/dene_spec.rb
|
188
202
|
- spec/deploy_approval_serializer_spec.rb
|
189
|
-
- spec/
|
203
|
+
- spec/deploy_executable_spec.rb
|
204
|
+
- spec/deploy_executable_test_spec.rb
|
190
205
|
- spec/deploy_header_serializer_spec.rb
|
191
206
|
- spec/deploy_named_arg_serializer_spec.rb
|
192
207
|
- spec/deploy_serializer_spec.rb
|
data/lib/crypto/key_pair.rb
DELETED
@@ -1,40 +0,0 @@
|
|
1
|
-
require 'ed25519'
|
2
|
-
|
3
|
-
|
4
|
-
signing_key = Ed25519::SigningKey.generate
|
5
|
-
puts "signing_key:\t #{signing_key}"
|
6
|
-
|
7
|
-
message = "hello"
|
8
|
-
signature = signing_key.sign(message)
|
9
|
-
puts "signature:\t #{signature}"
|
10
|
-
|
11
|
-
verify_key = signing_key.verify_key
|
12
|
-
puts "verify_key:\t #{verify_key}"
|
13
|
-
|
14
|
-
check_validity_of_signature = verify_key.verify(signature, message)
|
15
|
-
puts "check_validity_of_signature:\t #{check_validity_of_signature}"
|
16
|
-
|
17
|
-
# Serializing Keys
|
18
|
-
signature_key_bytes = signing_key.to_bytes
|
19
|
-
puts "signature_key_bytes:\t #{signature_key_bytes}"
|
20
|
-
verify_key_bytes = verify_key.to_bytes
|
21
|
-
puts "verify_key_bytes:\t #{verify_key_bytes}"
|
22
|
-
|
23
|
-
signing_key = Ed25519::SigningKey.new(signature_key_bytes)
|
24
|
-
puts "signing_key:\t #{signing_key}"
|
25
|
-
verify_key = Ed25519::VerifyKey.new(verify_key_bytes)
|
26
|
-
puts "verify_key:\t #{verify_key}"
|
27
|
-
|
28
|
-
|
29
|
-
require "ssh_data"
|
30
|
-
|
31
|
-
# key_data = File.read("/home/mehmet/Desktop/casper-ruby-sdk/lib/crypto/id_ed25519")
|
32
|
-
# key = SSHData::PrivateKey.parse_openssh(key_data)
|
33
|
-
#=> <SSHData::PrivateKey::ED25519>
|
34
|
-
|
35
|
-
# SSHData::PrivateKey::ED25519.generate
|
36
|
-
#=> raises SSHData::AlgorithmError
|
37
|
-
|
38
|
-
|
39
|
-
# SSHData::PrivateKey::ED25519.generate
|
40
|
-
#=> <SSHData::PrivateKey::ED25519>
|
File without changes
|