casper_network 1.0.2 → 1.1.2
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 +4 -4
- data/README.md +221 -78
- data/lib/casper_network.rb +7 -4
- data/lib/crypto/asymmetric_key.rb +19 -18
- data/lib/crypto/ed25519.rb +114 -0
- data/lib/crypto/ed25519_key.rb +111 -10
- data/lib/crypto/keys.rb +1 -2
- data/lib/crypto/keys_util.rb +20 -0
- data/lib/entity/deploy.rb +154 -1
- data/lib/entity/deploy_executable.rb +50 -7
- 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 +61 -2
- data/lib/entity/module_bytes.rb +9 -2
- data/lib/include.rb +2 -0
- data/lib/serialization/cl_value_serializer.rb +69 -12
- data/lib/serialization/deploy_serializer.rb +129 -15
- data/lib/types/cl_option.rb +9 -1
- data/lib/types/cl_public_key.rb +2 -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 +15 -1
- data/spec/deploy_executable_spec.rb +90 -0
- data/spec/testnet_spec.rb +5 -3
- metadata +7 -24
- data/lib/crypto/00_asymmetric_key.rb +0 -95
- data/lib/crypto/01_ed25519.rb +0 -67
- data/lib/crypto/key_pair.rb +0 -40
- data/lib/crypto/secp256k1_key.rb +0 -0
- data/lib/crypto/test_ed25519_key.rb +0 -44
- data/lib/entity/executable_deploy_item.rb +0 -11
- data/lib/serialization/test.rb +0 -431
- data/lib/types/cl_account_hash.rb +0 -24
- data/lib/types/cl_account_hash_type.rb +0 -22
- data/lib/utils/utils.rb +0 -2
- data/spec/a_spec.rb +0 -697
- data/spec/cl_public_spec.rb +0 -169
- data/spec/crypto_spec.rb +0 -42
- data/spec/deploy_executable_serializer_spec.rb +0 -0
- data/spec/deploy_serializer_test_spec.rb +0 -225
- data/spec/string_spec.rb +0 -68
@@ -1,24 +0,0 @@
|
|
1
|
-
require_relative './cl_account_hash_type.rb'
|
2
|
-
require_relative './cl_value.rb'
|
3
|
-
require_relative '../serialization/cl_value_bytes_parsers.rb'
|
4
|
-
|
5
|
-
|
6
|
-
class CLAccountHash < CLValue
|
7
|
-
|
8
|
-
def initialize(value)
|
9
|
-
super()
|
10
|
-
@value = value
|
11
|
-
end
|
12
|
-
|
13
|
-
def get_cl_type
|
14
|
-
@cl_type = CLAccountHashType.new
|
15
|
-
@cl_type.to_string
|
16
|
-
end
|
17
|
-
|
18
|
-
def get_value
|
19
|
-
@value
|
20
|
-
end
|
21
|
-
end
|
22
|
-
|
23
|
-
# cl_account_hash = CLAccountHash.new([10, 20])
|
24
|
-
# puts cl_account_hash.get_cl_type
|
@@ -1,22 +0,0 @@
|
|
1
|
-
require_relative './cl_type.rb'
|
2
|
-
require_relative './constants.rb'
|
3
|
-
|
4
|
-
|
5
|
-
class CLAccountHashType < CLType
|
6
|
-
# def initialize(value = nil)
|
7
|
-
# super(value)
|
8
|
-
# @value = value
|
9
|
-
# end
|
10
|
-
|
11
|
-
def to_string
|
12
|
-
ACCOUNT_HASH_ID
|
13
|
-
end
|
14
|
-
|
15
|
-
def get_value
|
16
|
-
@value
|
17
|
-
end
|
18
|
-
|
19
|
-
def to_json
|
20
|
-
to_string
|
21
|
-
end
|
22
|
-
end
|
data/lib/utils/utils.rb
DELETED