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.
Files changed (43) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +221 -78
  3. data/lib/casper_network.rb +7 -4
  4. data/lib/crypto/asymmetric_key.rb +19 -18
  5. data/lib/crypto/ed25519.rb +114 -0
  6. data/lib/crypto/ed25519_key.rb +111 -10
  7. data/lib/crypto/keys.rb +1 -2
  8. data/lib/crypto/keys_util.rb +20 -0
  9. data/lib/entity/deploy.rb +154 -1
  10. data/lib/entity/deploy_executable.rb +50 -7
  11. data/lib/entity/deploy_executable_item_internal.rb +1 -1
  12. data/lib/entity/deploy_header.rb +17 -0
  13. data/lib/entity/deploy_named_argument.rb +61 -2
  14. data/lib/entity/module_bytes.rb +9 -2
  15. data/lib/include.rb +2 -0
  16. data/lib/serialization/cl_value_serializer.rb +69 -12
  17. data/lib/serialization/deploy_serializer.rb +129 -15
  18. data/lib/types/cl_option.rb +9 -1
  19. data/lib/types/cl_public_key.rb +2 -0
  20. data/lib/types/cl_value.rb +8 -0
  21. data/lib/utils/byte_utils.rb +28 -0
  22. data/lib/utils/helpers.rb +10 -0
  23. data/lib/version.rb +1 -1
  24. data/spec/cl_value_serializer_spec.rb +15 -1
  25. data/spec/deploy_executable_spec.rb +90 -0
  26. data/spec/testnet_spec.rb +5 -3
  27. metadata +7 -24
  28. data/lib/crypto/00_asymmetric_key.rb +0 -95
  29. data/lib/crypto/01_ed25519.rb +0 -67
  30. data/lib/crypto/key_pair.rb +0 -40
  31. data/lib/crypto/secp256k1_key.rb +0 -0
  32. data/lib/crypto/test_ed25519_key.rb +0 -44
  33. data/lib/entity/executable_deploy_item.rb +0 -11
  34. data/lib/serialization/test.rb +0 -431
  35. data/lib/types/cl_account_hash.rb +0 -24
  36. data/lib/types/cl_account_hash_type.rb +0 -22
  37. data/lib/utils/utils.rb +0 -2
  38. data/spec/a_spec.rb +0 -697
  39. data/spec/cl_public_spec.rb +0 -169
  40. data/spec/crypto_spec.rb +0 -42
  41. data/spec/deploy_executable_serializer_spec.rb +0 -0
  42. data/spec/deploy_serializer_test_spec.rb +0 -225
  43. 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
@@ -1,2 +0,0 @@
1
- module Utils
2
- end