test_sdk1 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (140) hide show
  1. checksums.yaml +7 -0
  2. data/CONTRIBUTING.md +1 -0
  3. data/LICENSE +201 -0
  4. data/README.md +147 -0
  5. data/SECURITY.md +12 -0
  6. data/lib/crypto/00_asymmetric_key.rb +95 -0
  7. data/lib/crypto/01_ed25519.rb +67 -0
  8. data/lib/crypto/asymmetric_key.rb +87 -0
  9. data/lib/crypto/ed25519_key.rb +44 -0
  10. data/lib/crypto/key_pair.rb +40 -0
  11. data/lib/crypto/keys.rb +7 -0
  12. data/lib/crypto/secp256k1_key.rb +0 -0
  13. data/lib/crypto/test_ed25519_key.rb +44 -0
  14. data/lib/entity/account.rb +45 -0
  15. data/lib/entity/action_thresholds.rb +25 -0
  16. data/lib/entity/associated_key.rb +24 -0
  17. data/lib/entity/auction_state.rb +36 -0
  18. data/lib/entity/bid.rb +24 -0
  19. data/lib/entity/bid_info.rb +51 -0
  20. data/lib/entity/contract.rb +47 -0
  21. data/lib/entity/contract_package.rb +41 -0
  22. data/lib/entity/contract_version.rb +33 -0
  23. data/lib/entity/delegator.rb +37 -0
  24. data/lib/entity/deploy.rb +44 -0
  25. data/lib/entity/deploy_approval.rb +24 -0
  26. data/lib/entity/deploy_executable.rb +162 -0
  27. data/lib/entity/deploy_executable_item_internal.rb +26 -0
  28. data/lib/entity/deploy_executable_transfer.rb +50 -0
  29. data/lib/entity/deploy_hash.rb +16 -0
  30. data/lib/entity/deploy_header.rb +60 -0
  31. data/lib/entity/deploy_info.rb +44 -0
  32. data/lib/entity/deploy_named_argument.rb +19 -0
  33. data/lib/entity/deploy_transfer.rb +10 -0
  34. data/lib/entity/disabled_version.rb +26 -0
  35. data/lib/entity/era_info.rb +18 -0
  36. data/lib/entity/era_summary.rb +44 -0
  37. data/lib/entity/era_validator.rb +23 -0
  38. data/lib/entity/executable_deploy_item.rb +11 -0
  39. data/lib/entity/group.rb +25 -0
  40. data/lib/entity/module_bytes.rb +50 -0
  41. data/lib/entity/peer.rb +25 -0
  42. data/lib/entity/seigniorage_allocation.rb +18 -0
  43. data/lib/entity/stored_contract_by_hash.rb +50 -0
  44. data/lib/entity/stored_contract_by_name.rb +50 -0
  45. data/lib/entity/stored_value.rb +57 -0
  46. data/lib/entity/stored_versioned_contract_by_hash.rb +61 -0
  47. data/lib/entity/stored_versioned_contract_by_name.rb +61 -0
  48. data/lib/entity/transfer.rb +65 -0
  49. data/lib/entity/validator_weight.rb +23 -0
  50. data/lib/entity/vesting_schedule.rb +22 -0
  51. data/lib/include.rb +18 -0
  52. data/lib/rpc/rpc.rb +227 -0
  53. data/lib/rpc/rpc_client.rb +233 -0
  54. data/lib/rpc/rpc_error.rb +79 -0
  55. data/lib/serialization/cl_type_serializer.rb +76 -0
  56. data/lib/serialization/cl_value_bytes_parsers.rb +498 -0
  57. data/lib/serialization/cl_value_serializer.rb +259 -0
  58. data/lib/serialization/deploy_approval_serializer.rb +15 -0
  59. data/lib/serialization/deploy_executable_serializer.rb +27 -0
  60. data/lib/serialization/deploy_header_serializer.rb +49 -0
  61. data/lib/serialization/deploy_named_arg_serializer.rb +19 -0
  62. data/lib/serialization/deploy_serializer.rb +268 -0
  63. data/lib/serialization/test.rb +431 -0
  64. data/lib/test_sdk1.rb +289 -0
  65. data/lib/types/cl_account_hash.rb +24 -0
  66. data/lib/types/cl_account_hash_type.rb +22 -0
  67. data/lib/types/cl_any.rb +25 -0
  68. data/lib/types/cl_any_type.rb +22 -0
  69. data/lib/types/cl_bool.rb +32 -0
  70. data/lib/types/cl_bool_type.rb +35 -0
  71. data/lib/types/cl_byte_array.rb +25 -0
  72. data/lib/types/cl_byte_array_type.rb +27 -0
  73. data/lib/types/cl_i32.rb +26 -0
  74. data/lib/types/cl_i32_type.rb +26 -0
  75. data/lib/types/cl_i64.rb +26 -0
  76. data/lib/types/cl_i64_type.rb +27 -0
  77. data/lib/types/cl_key.rb +39 -0
  78. data/lib/types/cl_key_type.rb +27 -0
  79. data/lib/types/cl_list.rb +25 -0
  80. data/lib/types/cl_list_type.rb +26 -0
  81. data/lib/types/cl_map.rb +25 -0
  82. data/lib/types/cl_map_type.rb +26 -0
  83. data/lib/types/cl_option.rb +33 -0
  84. data/lib/types/cl_option_type.rb +52 -0
  85. data/lib/types/cl_public_key.rb +152 -0
  86. data/lib/types/cl_public_key_type.rb +26 -0
  87. data/lib/types/cl_result.rb +25 -0
  88. data/lib/types/cl_result_type.rb +26 -0
  89. data/lib/types/cl_string.rb +39 -0
  90. data/lib/types/cl_string_type.rb +32 -0
  91. data/lib/types/cl_tuple.rb +151 -0
  92. data/lib/types/cl_tuple_type.rb +108 -0
  93. data/lib/types/cl_type.rb +94 -0
  94. data/lib/types/cl_type_tag.rb +51 -0
  95. data/lib/types/cl_u128.rb +26 -0
  96. data/lib/types/cl_u128_type.rb +26 -0
  97. data/lib/types/cl_u256.rb +26 -0
  98. data/lib/types/cl_u256_type.rb +26 -0
  99. data/lib/types/cl_u32.rb +26 -0
  100. data/lib/types/cl_u32_type.rb +26 -0
  101. data/lib/types/cl_u512.rb +26 -0
  102. data/lib/types/cl_u512_type.rb +26 -0
  103. data/lib/types/cl_u64.rb +26 -0
  104. data/lib/types/cl_u64_type.rb +27 -0
  105. data/lib/types/cl_u8.rb +26 -0
  106. data/lib/types/cl_u8_type.rb +26 -0
  107. data/lib/types/cl_unit.rb +38 -0
  108. data/lib/types/cl_unit_type.rb +22 -0
  109. data/lib/types/cl_uref.rb +120 -0
  110. data/lib/types/cl_uref_type.rb +46 -0
  111. data/lib/types/cl_value.rb +10 -0
  112. data/lib/types/constants.rb +50 -0
  113. data/lib/types/error.rb +7 -0
  114. data/lib/utils/base_16.rb +18 -0
  115. data/lib/utils/byte_utils.rb +107 -0
  116. data/lib/utils/find_byte_parser_by_cl_type.rb +53 -0
  117. data/lib/utils/hash_utils.rb +19 -0
  118. data/lib/utils/hex_utils.rb +12 -0
  119. data/lib/utils/time_utils.rb +85 -0
  120. data/lib/utils/utils.rb +2 -0
  121. data/lib/version.rb +3 -0
  122. data/spec/a_spec.rb +697 -0
  123. data/spec/byte_utils_spec.rb +72 -0
  124. data/spec/cl_public_spec.rb +169 -0
  125. data/spec/cl_types_spec.rb +715 -0
  126. data/spec/cl_value_serializer_spec.rb +140 -0
  127. data/spec/client_spec.rb +25 -0
  128. data/spec/crypto_spec.rb +42 -0
  129. data/spec/deploy_approval_serializer_spec.rb +26 -0
  130. data/spec/deploy_executable_serializer_spec.rb +0 -0
  131. data/spec/deploy_header_serializer_spec.rb +21 -0
  132. data/spec/deploy_named_arg_serializer_spec.rb +49 -0
  133. data/spec/deploy_serializer_spec.rb +77 -0
  134. data/spec/deploy_serializer_test_spec.rb +225 -0
  135. data/spec/mainnet_spec.rb +452 -0
  136. data/spec/spec_helper.rb +100 -0
  137. data/spec/string_spec.rb +68 -0
  138. data/spec/testnet_spec.rb +498 -0
  139. data/spec/time_utils_spec.rb +87 -0
  140. metadata +198 -0
metadata ADDED
@@ -0,0 +1,198 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: test_sdk1
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ platform: ruby
6
+ authors:
7
+ - Mehmet Sait Gülmez
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2022-09-20 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: Ruby gem enables developers to interact with the Casper Network.
14
+ email: cenggulmez.65@gmail.com
15
+ executables: []
16
+ extensions: []
17
+ extra_rdoc_files: []
18
+ files:
19
+ - CONTRIBUTING.md
20
+ - LICENSE
21
+ - README.md
22
+ - SECURITY.md
23
+ - lib/crypto/00_asymmetric_key.rb
24
+ - lib/crypto/01_ed25519.rb
25
+ - lib/crypto/asymmetric_key.rb
26
+ - lib/crypto/ed25519_key.rb
27
+ - lib/crypto/key_pair.rb
28
+ - lib/crypto/keys.rb
29
+ - lib/crypto/secp256k1_key.rb
30
+ - lib/crypto/test_ed25519_key.rb
31
+ - lib/entity/account.rb
32
+ - lib/entity/action_thresholds.rb
33
+ - lib/entity/associated_key.rb
34
+ - lib/entity/auction_state.rb
35
+ - lib/entity/bid.rb
36
+ - lib/entity/bid_info.rb
37
+ - lib/entity/contract.rb
38
+ - lib/entity/contract_package.rb
39
+ - lib/entity/contract_version.rb
40
+ - lib/entity/delegator.rb
41
+ - lib/entity/deploy.rb
42
+ - lib/entity/deploy_approval.rb
43
+ - lib/entity/deploy_executable.rb
44
+ - lib/entity/deploy_executable_item_internal.rb
45
+ - lib/entity/deploy_executable_transfer.rb
46
+ - lib/entity/deploy_hash.rb
47
+ - lib/entity/deploy_header.rb
48
+ - lib/entity/deploy_info.rb
49
+ - lib/entity/deploy_named_argument.rb
50
+ - lib/entity/deploy_transfer.rb
51
+ - lib/entity/disabled_version.rb
52
+ - lib/entity/era_info.rb
53
+ - lib/entity/era_summary.rb
54
+ - lib/entity/era_validator.rb
55
+ - lib/entity/executable_deploy_item.rb
56
+ - lib/entity/group.rb
57
+ - lib/entity/module_bytes.rb
58
+ - lib/entity/peer.rb
59
+ - lib/entity/seigniorage_allocation.rb
60
+ - lib/entity/stored_contract_by_hash.rb
61
+ - lib/entity/stored_contract_by_name.rb
62
+ - lib/entity/stored_value.rb
63
+ - lib/entity/stored_versioned_contract_by_hash.rb
64
+ - lib/entity/stored_versioned_contract_by_name.rb
65
+ - lib/entity/transfer.rb
66
+ - lib/entity/validator_weight.rb
67
+ - lib/entity/vesting_schedule.rb
68
+ - lib/include.rb
69
+ - lib/rpc/rpc.rb
70
+ - lib/rpc/rpc_client.rb
71
+ - lib/rpc/rpc_error.rb
72
+ - lib/serialization/cl_type_serializer.rb
73
+ - lib/serialization/cl_value_bytes_parsers.rb
74
+ - lib/serialization/cl_value_serializer.rb
75
+ - lib/serialization/deploy_approval_serializer.rb
76
+ - lib/serialization/deploy_executable_serializer.rb
77
+ - lib/serialization/deploy_header_serializer.rb
78
+ - lib/serialization/deploy_named_arg_serializer.rb
79
+ - lib/serialization/deploy_serializer.rb
80
+ - lib/serialization/test.rb
81
+ - lib/test_sdk1.rb
82
+ - lib/types/cl_account_hash.rb
83
+ - lib/types/cl_account_hash_type.rb
84
+ - lib/types/cl_any.rb
85
+ - lib/types/cl_any_type.rb
86
+ - lib/types/cl_bool.rb
87
+ - lib/types/cl_bool_type.rb
88
+ - lib/types/cl_byte_array.rb
89
+ - lib/types/cl_byte_array_type.rb
90
+ - lib/types/cl_i32.rb
91
+ - lib/types/cl_i32_type.rb
92
+ - lib/types/cl_i64.rb
93
+ - lib/types/cl_i64_type.rb
94
+ - lib/types/cl_key.rb
95
+ - lib/types/cl_key_type.rb
96
+ - lib/types/cl_list.rb
97
+ - lib/types/cl_list_type.rb
98
+ - lib/types/cl_map.rb
99
+ - lib/types/cl_map_type.rb
100
+ - lib/types/cl_option.rb
101
+ - lib/types/cl_option_type.rb
102
+ - lib/types/cl_public_key.rb
103
+ - lib/types/cl_public_key_type.rb
104
+ - lib/types/cl_result.rb
105
+ - lib/types/cl_result_type.rb
106
+ - lib/types/cl_string.rb
107
+ - lib/types/cl_string_type.rb
108
+ - lib/types/cl_tuple.rb
109
+ - lib/types/cl_tuple_type.rb
110
+ - lib/types/cl_type.rb
111
+ - lib/types/cl_type_tag.rb
112
+ - lib/types/cl_u128.rb
113
+ - lib/types/cl_u128_type.rb
114
+ - lib/types/cl_u256.rb
115
+ - lib/types/cl_u256_type.rb
116
+ - lib/types/cl_u32.rb
117
+ - lib/types/cl_u32_type.rb
118
+ - lib/types/cl_u512.rb
119
+ - lib/types/cl_u512_type.rb
120
+ - lib/types/cl_u64.rb
121
+ - lib/types/cl_u64_type.rb
122
+ - lib/types/cl_u8.rb
123
+ - lib/types/cl_u8_type.rb
124
+ - lib/types/cl_unit.rb
125
+ - lib/types/cl_unit_type.rb
126
+ - lib/types/cl_uref.rb
127
+ - lib/types/cl_uref_type.rb
128
+ - lib/types/cl_value.rb
129
+ - lib/types/constants.rb
130
+ - lib/types/error.rb
131
+ - lib/utils/base_16.rb
132
+ - lib/utils/byte_utils.rb
133
+ - lib/utils/find_byte_parser_by_cl_type.rb
134
+ - lib/utils/hash_utils.rb
135
+ - lib/utils/hex_utils.rb
136
+ - lib/utils/time_utils.rb
137
+ - lib/utils/utils.rb
138
+ - lib/version.rb
139
+ - spec/a_spec.rb
140
+ - spec/byte_utils_spec.rb
141
+ - spec/cl_public_spec.rb
142
+ - spec/cl_types_spec.rb
143
+ - spec/cl_value_serializer_spec.rb
144
+ - spec/client_spec.rb
145
+ - spec/crypto_spec.rb
146
+ - spec/deploy_approval_serializer_spec.rb
147
+ - spec/deploy_executable_serializer_spec.rb
148
+ - spec/deploy_header_serializer_spec.rb
149
+ - spec/deploy_named_arg_serializer_spec.rb
150
+ - spec/deploy_serializer_spec.rb
151
+ - spec/deploy_serializer_test_spec.rb
152
+ - spec/mainnet_spec.rb
153
+ - spec/spec_helper.rb
154
+ - spec/string_spec.rb
155
+ - spec/testnet_spec.rb
156
+ - spec/time_utils_spec.rb
157
+ homepage: https://github.com/saitgulmez/testing.git
158
+ licenses:
159
+ - Apache-2.0
160
+ metadata: {}
161
+ post_install_message:
162
+ rdoc_options: []
163
+ require_paths:
164
+ - lib
165
+ required_ruby_version: !ruby/object:Gem::Requirement
166
+ requirements:
167
+ - - ">="
168
+ - !ruby/object:Gem::Version
169
+ version: '0'
170
+ required_rubygems_version: !ruby/object:Gem::Requirement
171
+ requirements:
172
+ - - ">="
173
+ - !ruby/object:Gem::Version
174
+ version: '0'
175
+ requirements: []
176
+ rubygems_version: 3.3.8
177
+ signing_key:
178
+ specification_version: 4
179
+ summary: Casper Ruby SDK
180
+ test_files:
181
+ - spec/a_spec.rb
182
+ - spec/byte_utils_spec.rb
183
+ - spec/cl_public_spec.rb
184
+ - spec/cl_types_spec.rb
185
+ - spec/cl_value_serializer_spec.rb
186
+ - spec/client_spec.rb
187
+ - spec/crypto_spec.rb
188
+ - spec/deploy_approval_serializer_spec.rb
189
+ - spec/deploy_executable_serializer_spec.rb
190
+ - spec/deploy_header_serializer_spec.rb
191
+ - spec/deploy_named_arg_serializer_spec.rb
192
+ - spec/deploy_serializer_spec.rb
193
+ - spec/deploy_serializer_test_spec.rb
194
+ - spec/mainnet_spec.rb
195
+ - spec/spec_helper.rb
196
+ - spec/string_spec.rb
197
+ - spec/testnet_spec.rb
198
+ - spec/time_utils_spec.rb