Browse Source

server running commented out extra api code to fix later

Eric Foster 6 years ago
parent
commit
0b1819563c
17 changed files with 795 additions and 59 deletions
  1. 736
    0
      ZipCoinRedJavaServer/.idea/workspace.xml
  2. 5
    5
      ZipCoinRedJavaServer/src/main/java/com/zipcoin/controller/TransactionController.java
  3. 11
    11
      ZipCoinRedJavaServer/src/main/java/com/zipcoin/controller/WalletController.java
  4. 6
    6
      ZipCoinRedJavaServer/src/main/java/com/zipcoin/model/Transaction.java
  5. 2
    2
      ZipCoinRedJavaServer/src/main/java/com/zipcoin/repository/TransactionRepository.java
  6. 5
    5
      ZipCoinRedJavaServer/src/main/java/com/zipcoin/repository/WalletRepository.java
  7. 30
    30
      ZipCoinRedJavaServer/src/test/java/com/zipcoin/redCoin/TransactionAndWallet/TransactionAndWalletTest.java
  8. BIN
      ZipCoinRedJavaServer/target/classes/com/zipcoin/controller/BlockController.class
  9. BIN
      ZipCoinRedJavaServer/target/classes/com/zipcoin/controller/TransactionController.class
  10. BIN
      ZipCoinRedJavaServer/target/classes/com/zipcoin/controller/WalletController.class
  11. BIN
      ZipCoinRedJavaServer/target/classes/com/zipcoin/model/Chain.class
  12. BIN
      ZipCoinRedJavaServer/target/classes/com/zipcoin/model/Transaction.class
  13. BIN
      ZipCoinRedJavaServer/target/classes/com/zipcoin/model/Wallet.class
  14. BIN
      ZipCoinRedJavaServer/target/classes/com/zipcoin/repository/TransactionRepository.class
  15. BIN
      ZipCoinRedJavaServer/target/classes/com/zipcoin/repository/WalletRepository.class
  16. BIN
      ZipCoinRedJavaServer/target/test-classes/com/zipcoin/redCoin/TransactionAndWallet/TransactionAndWalletTest.class
  17. BIN
      ZipCoinRedJavaServer/target/test-classes/com/zipcoin/redCoin/chain/test/chainTest.class

+ 736
- 0
ZipCoinRedJavaServer/.idea/workspace.xml View File

@@ -0,0 +1,736 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<project version="4">
3
+  <component name="ChangeListManager">
4
+    <list default="true" id="f54e258d-da71-464b-8271-7897ae55d27f" name="Default" comment="" />
5
+    <ignored path="$PROJECT_DIR$/target/" />
6
+    <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
7
+    <option name="TRACKING_ENABLED" value="true" />
8
+    <option name="SHOW_DIALOG" value="false" />
9
+    <option name="HIGHLIGHT_CONFLICTS" value="true" />
10
+    <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
11
+    <option name="LAST_RESOLUTION" value="IGNORE" />
12
+  </component>
13
+  <component name="FileEditorManager">
14
+    <leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
15
+      <file leaf-file-name="Block.java" pinned="false" current-in-tab="false">
16
+        <entry file="file://$PROJECT_DIR$/src/main/java/com/zipcoin/model/Block.java">
17
+          <provider selected="true" editor-type-id="text-editor">
18
+            <state relative-caret-position="165">
19
+              <caret line="11" column="20" lean-forward="true" selection-start-line="9" selection-start-column="4" selection-end-line="11" selection-end-column="20" />
20
+              <folding>
21
+                <element signature="imports" expanded="true" />
22
+              </folding>
23
+            </state>
24
+          </provider>
25
+        </entry>
26
+      </file>
27
+      <file leaf-file-name="HomeController.java" pinned="false" current-in-tab="false">
28
+        <entry file="file://$PROJECT_DIR$/src/main/java/com/zipcoin/controller/HomeController.java">
29
+          <provider selected="true" editor-type-id="text-editor">
30
+            <state relative-caret-position="60">
31
+              <caret line="5" column="13" selection-start-line="5" selection-start-column="13" selection-end-line="5" selection-end-column="13" />
32
+            </state>
33
+          </provider>
34
+        </entry>
35
+      </file>
36
+      <file leaf-file-name="Wallet.java" pinned="false" current-in-tab="false">
37
+        <entry file="file://$PROJECT_DIR$/src/main/java/com/zipcoin/model/Wallet.java">
38
+          <provider selected="true" editor-type-id="text-editor">
39
+            <state relative-caret-position="120">
40
+              <caret line="12" column="32" selection-start-line="12" selection-start-column="32" selection-end-line="12" selection-end-column="32" />
41
+              <folding>
42
+                <element signature="imports" expanded="true" />
43
+              </folding>
44
+            </state>
45
+          </provider>
46
+        </entry>
47
+      </file>
48
+      <file leaf-file-name="TransactionController.java" pinned="false" current-in-tab="false">
49
+        <entry file="file://$PROJECT_DIR$/src/main/java/com/zipcoin/controller/TransactionController.java">
50
+          <provider selected="true" editor-type-id="text-editor">
51
+            <state relative-caret-position="230">
52
+              <caret line="19" column="68" selection-start-line="19" selection-start-column="68" selection-end-line="19" selection-end-column="68" />
53
+              <folding>
54
+                <element signature="imports" expanded="true" />
55
+              </folding>
56
+            </state>
57
+          </provider>
58
+        </entry>
59
+      </file>
60
+      <file leaf-file-name="WalletController.java" pinned="false" current-in-tab="false">
61
+        <entry file="file://$PROJECT_DIR$/src/main/java/com/zipcoin/controller/WalletController.java">
62
+          <provider selected="true" editor-type-id="text-editor">
63
+            <state relative-caret-position="216">
64
+              <caret line="24" column="48" selection-start-line="24" selection-start-column="29" selection-end-line="24" selection-end-column="48" />
65
+              <folding>
66
+                <element signature="imports" expanded="true" />
67
+              </folding>
68
+            </state>
69
+          </provider>
70
+        </entry>
71
+      </file>
72
+      <file leaf-file-name="TransactionRepository.java" pinned="false" current-in-tab="false">
73
+        <entry file="file://$PROJECT_DIR$/src/main/java/com/zipcoin/repository/TransactionRepository.java">
74
+          <provider selected="true" editor-type-id="text-editor">
75
+            <state relative-caret-position="165">
76
+              <caret line="11" selection-start-line="11" selection-start-column="2" selection-end-line="12" selection-end-column="92" />
77
+              <folding>
78
+                <element signature="imports" expanded="true" />
79
+              </folding>
80
+            </state>
81
+          </provider>
82
+        </entry>
83
+      </file>
84
+      <file leaf-file-name="Transaction.java" pinned="false" current-in-tab="false">
85
+        <entry file="file://$PROJECT_DIR$/src/main/java/com/zipcoin/model/Transaction.java">
86
+          <provider selected="true" editor-type-id="text-editor">
87
+            <state relative-caret-position="1110">
88
+              <caret line="74" selection-start-line="74" selection-start-column="2" selection-end-line="78" selection-end-column="7" />
89
+              <folding>
90
+                <element signature="imports" expanded="true" />
91
+              </folding>
92
+            </state>
93
+          </provider>
94
+        </entry>
95
+      </file>
96
+      <file leaf-file-name="WalletRepository.java" pinned="false" current-in-tab="true">
97
+        <entry file="file://$PROJECT_DIR$/src/main/java/com/zipcoin/repository/WalletRepository.java">
98
+          <provider selected="true" editor-type-id="text-editor">
99
+            <state relative-caret-position="180">
100
+              <caret line="12" column="70" selection-start-line="11" selection-start-column="4" selection-end-line="12" selection-end-column="70" />
101
+              <folding>
102
+                <element signature="imports" expanded="true" />
103
+              </folding>
104
+            </state>
105
+          </provider>
106
+        </entry>
107
+      </file>
108
+      <file leaf-file-name="TransactionAndWalletTest.java" pinned="false" current-in-tab="false">
109
+        <entry file="file://$PROJECT_DIR$/src/test/java/com/zipcoin/redCoin/TransactionAndWallet/TransactionAndWalletTest.java">
110
+          <provider selected="true" editor-type-id="text-editor">
111
+            <state relative-caret-position="75">
112
+              <caret line="12" selection-start-line="12" selection-start-column="2" selection-end-line="13" selection-end-column="39" />
113
+            </state>
114
+          </provider>
115
+        </entry>
116
+      </file>
117
+      <file leaf-file-name="Chain.java" pinned="false" current-in-tab="false">
118
+        <entry file="file://$PROJECT_DIR$/src/main/java/com/zipcoin/model/Chain.java">
119
+          <provider selected="true" editor-type-id="text-editor">
120
+            <state relative-caret-position="60">
121
+              <caret line="4" column="13" selection-start-line="4" selection-start-column="13" selection-end-line="4" selection-end-column="13" />
122
+            </state>
123
+          </provider>
124
+        </entry>
125
+      </file>
126
+    </leaf>
127
+  </component>
128
+  <component name="FileTemplateManagerImpl">
129
+    <option name="RECENT_TEMPLATES">
130
+      <list>
131
+        <option value="Class" />
132
+      </list>
133
+    </option>
134
+  </component>
135
+  <component name="Git.Settings">
136
+    <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$/.." />
137
+  </component>
138
+  <component name="IdeDocumentHistory">
139
+    <option name="CHANGED_PATHS">
140
+      <list>
141
+        <option value="$PROJECT_DIR$/src/main/java/redCoin/Main.java" />
142
+        <option value="$PROJECT_DIR$/src/test/java/redCoin/testMain.java" />
143
+        <option value="$PROJECT_DIR$/src/test/java/com/zipcoin/redCoin/minerTest/minerTest.java" />
144
+        <option value="$PROJECT_DIR$/src/main/java/com/zipcoin/config/PersistenceConfig.java" />
145
+        <option value="$PROJECT_DIR$/src/test/java/com/zipcoin/redCoin/miner/test/minerTest.java" />
146
+        <option value="$PROJECT_DIR$/src/main/resources/db.migration/V2__create_block.sql" />
147
+        <option value="$PROJECT_DIR$/src/test/java/com/zipcoin/redCoin/block/test/BlockTest.java" />
148
+        <option value="$PROJECT_DIR$/src/main/java/com/zipcoin/repository/BlockRepository.java" />
149
+        <option value="$PROJECT_DIR$/src/main/resources/application.properties" />
150
+        <option value="$PROJECT_DIR$/src/main/java/com/zipcoin/config/PersistenceConfiguration.java" />
151
+        <option value="$PROJECT_DIR$/src/main/java/com/zipcoin/controllers/BlockController.java" />
152
+        <option value="$PROJECT_DIR$/src/main/java/com/zipcoin/model/Block.java" />
153
+        <option value="$PROJECT_DIR$/pom.xml" />
154
+        <option value="$PROJECT_DIR$/src/main/java/com/zipcoin/model/Miner.java" />
155
+        <option value="$PROJECT_DIR$/src/test/java/redCoin/Miner/minerTest.java" />
156
+        <option value="$PROJECT_DIR$/src/main/java/com/zipcoin/controller/BlockController.java" />
157
+        <option value="$PROJECT_DIR$/src/main/java/com/zipcoin/utilities/Wallet.java" />
158
+        <option value="$PROJECT_DIR$/src/main/java/com/zipcoin/controller/WalletController.java" />
159
+        <option value="$PROJECT_DIR$/src/main/java/com/zipcoin/repository/WalletRepository.java" />
160
+        <option value="$PROJECT_DIR$/src/main/java/com/zipcoin/controller/TransactionController.java" />
161
+        <option value="$PROJECT_DIR$/src/main/java/com/zipcoin/model/Wallet.java" />
162
+        <option value="$PROJECT_DIR$/src/main/java/com/zipcoin/model/Transaction.java" />
163
+        <option value="$PROJECT_DIR$/src/test/java/com/zipcoin/redCoin/TransactionAndWallet/TransactionAndWalletTest.java" />
164
+        <option value="$PROJECT_DIR$/src/main/java/com/zipcoin/repository/TransactionRepository.java" />
165
+      </list>
166
+    </option>
167
+  </component>
168
+  <component name="JsBuildToolGruntFileManager" detection-done="true" sorting="DEFINITION_ORDER" />
169
+  <component name="JsBuildToolPackageJson" detection-done="true" sorting="DEFINITION_ORDER" />
170
+  <component name="JsGulpfileManager">
171
+    <detection-done>true</detection-done>
172
+    <sorting>DEFINITION_ORDER</sorting>
173
+  </component>
174
+  <component name="MavenImportPreferences">
175
+    <option name="importingSettings">
176
+      <MavenImportingSettings>
177
+        <option name="importAutomatically" value="true" />
178
+      </MavenImportingSettings>
179
+    </option>
180
+  </component>
181
+  <component name="MavenProjectNavigator">
182
+    <treeState>
183
+      <expand />
184
+      <select />
185
+    </treeState>
186
+  </component>
187
+  <component name="NodePackageJsonFileManager">
188
+    <packageJsonPaths />
189
+  </component>
190
+  <component name="ProjectLevelVcsManager" settingsEditedManually="true">
191
+    <ConfirmationsSetting value="2" id="Add" />
192
+  </component>
193
+  <component name="ProjectView">
194
+    <navigator proportions="" version="1">
195
+      <foldersAlwaysOnTop value="true" />
196
+    </navigator>
197
+    <panes>
198
+      <pane id="ProjectPane">
199
+        <subPane>
200
+          <expand>
201
+            <path>
202
+              <item name="ZipCoinRedJavaServer" type="b2602c69:ProjectViewProjectNode" />
203
+              <item name="ZipCoinRedJavaServer" type="462c0819:PsiDirectoryNode" />
204
+            </path>
205
+            <path>
206
+              <item name="ZipCoinRedJavaServer" type="b2602c69:ProjectViewProjectNode" />
207
+              <item name="ZipCoinRedJavaServer" type="462c0819:PsiDirectoryNode" />
208
+              <item name="src" type="462c0819:PsiDirectoryNode" />
209
+            </path>
210
+            <path>
211
+              <item name="ZipCoinRedJavaServer" type="b2602c69:ProjectViewProjectNode" />
212
+              <item name="ZipCoinRedJavaServer" type="462c0819:PsiDirectoryNode" />
213
+              <item name="src" type="462c0819:PsiDirectoryNode" />
214
+              <item name="main" type="462c0819:PsiDirectoryNode" />
215
+            </path>
216
+            <path>
217
+              <item name="ZipCoinRedJavaServer" type="b2602c69:ProjectViewProjectNode" />
218
+              <item name="ZipCoinRedJavaServer" type="462c0819:PsiDirectoryNode" />
219
+              <item name="src" type="462c0819:PsiDirectoryNode" />
220
+              <item name="main" type="462c0819:PsiDirectoryNode" />
221
+              <item name="java" type="462c0819:PsiDirectoryNode" />
222
+            </path>
223
+            <path>
224
+              <item name="ZipCoinRedJavaServer" type="b2602c69:ProjectViewProjectNode" />
225
+              <item name="ZipCoinRedJavaServer" type="462c0819:PsiDirectoryNode" />
226
+              <item name="src" type="462c0819:PsiDirectoryNode" />
227
+              <item name="main" type="462c0819:PsiDirectoryNode" />
228
+              <item name="java" type="462c0819:PsiDirectoryNode" />
229
+              <item name="zipcoin" type="462c0819:PsiDirectoryNode" />
230
+            </path>
231
+            <path>
232
+              <item name="ZipCoinRedJavaServer" type="b2602c69:ProjectViewProjectNode" />
233
+              <item name="ZipCoinRedJavaServer" type="462c0819:PsiDirectoryNode" />
234
+              <item name="src" type="462c0819:PsiDirectoryNode" />
235
+              <item name="main" type="462c0819:PsiDirectoryNode" />
236
+              <item name="java" type="462c0819:PsiDirectoryNode" />
237
+              <item name="zipcoin" type="462c0819:PsiDirectoryNode" />
238
+              <item name="config" type="462c0819:PsiDirectoryNode" />
239
+            </path>
240
+            <path>
241
+              <item name="ZipCoinRedJavaServer" type="b2602c69:ProjectViewProjectNode" />
242
+              <item name="ZipCoinRedJavaServer" type="462c0819:PsiDirectoryNode" />
243
+              <item name="src" type="462c0819:PsiDirectoryNode" />
244
+              <item name="main" type="462c0819:PsiDirectoryNode" />
245
+              <item name="java" type="462c0819:PsiDirectoryNode" />
246
+              <item name="zipcoin" type="462c0819:PsiDirectoryNode" />
247
+              <item name="controller" type="462c0819:PsiDirectoryNode" />
248
+            </path>
249
+            <path>
250
+              <item name="ZipCoinRedJavaServer" type="b2602c69:ProjectViewProjectNode" />
251
+              <item name="ZipCoinRedJavaServer" type="462c0819:PsiDirectoryNode" />
252
+              <item name="src" type="462c0819:PsiDirectoryNode" />
253
+              <item name="main" type="462c0819:PsiDirectoryNode" />
254
+              <item name="java" type="462c0819:PsiDirectoryNode" />
255
+              <item name="zipcoin" type="462c0819:PsiDirectoryNode" />
256
+              <item name="model" type="462c0819:PsiDirectoryNode" />
257
+            </path>
258
+            <path>
259
+              <item name="ZipCoinRedJavaServer" type="b2602c69:ProjectViewProjectNode" />
260
+              <item name="ZipCoinRedJavaServer" type="462c0819:PsiDirectoryNode" />
261
+              <item name="src" type="462c0819:PsiDirectoryNode" />
262
+              <item name="main" type="462c0819:PsiDirectoryNode" />
263
+              <item name="java" type="462c0819:PsiDirectoryNode" />
264
+              <item name="zipcoin" type="462c0819:PsiDirectoryNode" />
265
+              <item name="repository" type="462c0819:PsiDirectoryNode" />
266
+            </path>
267
+            <path>
268
+              <item name="ZipCoinRedJavaServer" type="b2602c69:ProjectViewProjectNode" />
269
+              <item name="ZipCoinRedJavaServer" type="462c0819:PsiDirectoryNode" />
270
+              <item name="src" type="462c0819:PsiDirectoryNode" />
271
+              <item name="main" type="462c0819:PsiDirectoryNode" />
272
+              <item name="java" type="462c0819:PsiDirectoryNode" />
273
+              <item name="zipcoin" type="462c0819:PsiDirectoryNode" />
274
+              <item name="utilities" type="462c0819:PsiDirectoryNode" />
275
+            </path>
276
+            <path>
277
+              <item name="ZipCoinRedJavaServer" type="b2602c69:ProjectViewProjectNode" />
278
+              <item name="ZipCoinRedJavaServer" type="462c0819:PsiDirectoryNode" />
279
+              <item name="src" type="462c0819:PsiDirectoryNode" />
280
+              <item name="main" type="462c0819:PsiDirectoryNode" />
281
+              <item name="resources" type="462c0819:PsiDirectoryNode" />
282
+            </path>
283
+          </expand>
284
+          <select />
285
+        </subPane>
286
+      </pane>
287
+      <pane id="PackagesPane" />
288
+      <pane id="AndroidView" />
289
+      <pane id="Scope" />
290
+    </panes>
291
+  </component>
292
+  <component name="PropertiesComponent">
293
+    <property name="RequestMappingsPanelOrder0" value="0" />
294
+    <property name="RequestMappingsPanelOrder1" value="1" />
295
+    <property name="RequestMappingsPanelOrder2" value="2" />
296
+    <property name="RequestMappingsPanelWidth0" value="75" />
297
+    <property name="RequestMappingsPanelWidth1" value="75" />
298
+    <property name="RequestMappingsPanelWidth2" value="75" />
299
+    <property name="WebServerToolWindowFactoryState" value="false" />
300
+    <property name="aspect.path.notification.shown" value="true" />
301
+    <property name="jdk.selected.JAVA_MODULE" value="1.8" />
302
+    <property name="last_opened_file_path" value="$PROJECT_DIR$" />
303
+    <property name="nodejs_interpreter_path.stuck_in_default_project" value="undefined stuck path" />
304
+    <property name="nodejs_npm_path_reset_for_default_project" value="true" />
305
+    <property name="project.structure.last.edited" value="Modules" />
306
+    <property name="project.structure.proportion" value="0.15" />
307
+    <property name="project.structure.side.proportion" value="0.2" />
308
+  </component>
309
+  <component name="RunDashboard">
310
+    <option name="ruleStates">
311
+      <list>
312
+        <RuleState>
313
+          <option name="name" value="ConfigurationTypeDashboardGroupingRule" />
314
+        </RuleState>
315
+        <RuleState>
316
+          <option name="name" value="StatusDashboardGroupingRule" />
317
+        </RuleState>
318
+      </list>
319
+    </option>
320
+  </component>
321
+  <component name="RunManager" selected="Spring Boot.ZipCoinApp">
322
+    <configuration default="true" type="Application" factoryName="Application">
323
+      <option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
324
+    </configuration>
325
+    <configuration default="true" type="JUnit" factoryName="JUnit">
326
+      <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
327
+      <option name="ALTERNATIVE_JRE_PATH" />
328
+      <option name="PACKAGE_NAME" />
329
+      <option name="MAIN_CLASS_NAME" />
330
+      <option name="METHOD_NAME" />
331
+      <option name="TEST_OBJECT" value="class" />
332
+      <option name="VM_PARAMETERS" value="-ea" />
333
+      <option name="PARAMETERS" />
334
+      <option name="WORKING_DIRECTORY" value="%MODULE_WORKING_DIR%" />
335
+      <option name="PASS_PARENT_ENVS" value="true" />
336
+      <option name="TEST_SEARCH_SCOPE">
337
+        <value defaultName="singleModule" />
338
+      </option>
339
+      <patterns />
340
+    </configuration>
341
+    <configuration name="java in ZipCoin-RED" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
342
+      <module name="ZipCoin-RED" />
343
+      <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
344
+      <option name="ALTERNATIVE_JRE_PATH" />
345
+      <option name="PACKAGE_NAME" />
346
+      <option name="MAIN_CLASS_NAME" />
347
+      <option name="METHOD_NAME" />
348
+      <option name="TEST_OBJECT" value="directory" />
349
+      <option name="VM_PARAMETERS" value="-ea" />
350
+      <option name="PARAMETERS" />
351
+      <option name="WORKING_DIRECTORY" value="%MODULE_WORKING_DIR%" />
352
+      <option name="PASS_PARENT_ENVS" value="true" />
353
+      <option name="TEST_SEARCH_SCOPE">
354
+        <value defaultName="singleModule" />
355
+      </option>
356
+      <dir value="$PROJECT_DIR$/src/test/java" />
357
+      <patterns />
358
+    </configuration>
359
+    <configuration name="minerTest" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
360
+      <module name="ZipCoin-RED" />
361
+      <extension name="coverage">
362
+        <pattern>
363
+          <option name="PATTERN" value="com.zipcoin.redCoin.miner.test.*" />
364
+          <option name="ENABLED" value="true" />
365
+        </pattern>
366
+      </extension>
367
+      <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
368
+      <option name="ALTERNATIVE_JRE_PATH" />
369
+      <option name="PACKAGE_NAME" value="com.zipcoin.redCoin.miner.test" />
370
+      <option name="MAIN_CLASS_NAME" value="com.zipcoin.redCoin.miner.test.minerTest" />
371
+      <option name="METHOD_NAME" />
372
+      <option name="TEST_OBJECT" value="class" />
373
+      <option name="VM_PARAMETERS" value="-ea" />
374
+      <option name="PARAMETERS" />
375
+      <option name="WORKING_DIRECTORY" value="%MODULE_WORKING_DIR%" />
376
+      <option name="PASS_PARENT_ENVS" value="true" />
377
+      <option name="TEST_SEARCH_SCOPE">
378
+        <value defaultName="singleModule" />
379
+      </option>
380
+      <patterns />
381
+    </configuration>
382
+    <configuration name="testMain.test" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
383
+      <module name="ZipCoin-RED" />
384
+      <extension name="coverage">
385
+        <pattern>
386
+          <option name="PATTERN" value="redCoin.*" />
387
+          <option name="ENABLED" value="true" />
388
+        </pattern>
389
+      </extension>
390
+      <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
391
+      <option name="ALTERNATIVE_JRE_PATH" />
392
+      <option name="PACKAGE_NAME" value="redCoin" />
393
+      <option name="MAIN_CLASS_NAME" value="redCoin.testMain" />
394
+      <option name="METHOD_NAME" value="test" />
395
+      <option name="TEST_OBJECT" value="method" />
396
+      <option name="VM_PARAMETERS" value="-ea" />
397
+      <option name="PARAMETERS" />
398
+      <option name="WORKING_DIRECTORY" value="%MODULE_WORKING_DIR%" />
399
+      <option name="PASS_PARENT_ENVS" value="true" />
400
+      <option name="TEST_SEARCH_SCOPE">
401
+        <value defaultName="singleModule" />
402
+      </option>
403
+      <patterns />
404
+    </configuration>
405
+    <configuration name="ZipCoinApp" type="SpringBootApplicationConfigurationType" factoryName="Spring Boot" temporary="true" nameIsGenerated="true">
406
+      <module name="ZipCoin-RED" />
407
+      <extension name="coverage">
408
+        <pattern>
409
+          <option name="PATTERN" value="com.zipcoin.*" />
410
+          <option name="ENABLED" value="true" />
411
+        </pattern>
412
+      </extension>
413
+      <option name="SPRING_BOOT_MAIN_CLASS" value="com.zipcoin.ZipCoinApp" />
414
+    </configuration>
415
+    <configuration default="true" type="TestNG" factoryName="TestNG">
416
+      <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
417
+      <option name="ALTERNATIVE_JRE_PATH" />
418
+      <option name="SUITE_NAME" />
419
+      <option name="PACKAGE_NAME" />
420
+      <option name="MAIN_CLASS_NAME" />
421
+      <option name="METHOD_NAME" />
422
+      <option name="GROUP_NAME" />
423
+      <option name="TEST_OBJECT" value="CLASS" />
424
+      <option name="VM_PARAMETERS" value="-ea" />
425
+      <option name="PARAMETERS" />
426
+      <option name="WORKING_DIRECTORY" value="%MODULE_WORKING_DIR%" />
427
+      <option name="OUTPUT_DIRECTORY" />
428
+      <option name="PASS_PARENT_ENVS" value="true" />
429
+      <option name="TEST_SEARCH_SCOPE">
430
+        <value defaultName="singleModule" />
431
+      </option>
432
+      <option name="USE_DEFAULT_REPORTERS" value="false" />
433
+      <option name="PROPERTIES_FILE" />
434
+      <properties />
435
+      <listeners />
436
+    </configuration>
437
+    <list>
438
+      <item itemvalue="JUnit.testMain.test" />
439
+      <item itemvalue="Spring Boot.ZipCoinApp" />
440
+      <item itemvalue="JUnit.java in ZipCoin-RED" />
441
+      <item itemvalue="JUnit.minerTest" />
442
+    </list>
443
+    <recent_temporary>
444
+      <list>
445
+        <item itemvalue="Spring Boot.ZipCoinApp" />
446
+        <item itemvalue="JUnit.java in ZipCoin-RED" />
447
+        <item itemvalue="JUnit.minerTest" />
448
+        <item itemvalue="JUnit.testMain.test" />
449
+      </list>
450
+    </recent_temporary>
451
+  </component>
452
+  <component name="SvnConfiguration">
453
+    <configuration />
454
+  </component>
455
+  <component name="TaskManager">
456
+    <task active="true" id="Default" summary="Default task">
457
+      <changelist id="f54e258d-da71-464b-8271-7897ae55d27f" name="Default" comment="" />
458
+      <created>1531343031636</created>
459
+      <option name="number" value="Default" />
460
+      <option name="presentableId" value="Default" />
461
+      <updated>1531343031636</updated>
462
+      <workItem from="1531343033550" duration="411000" />
463
+      <workItem from="1531419813805" duration="2054000" />
464
+      <workItem from="1531772346214" duration="3133000" />
465
+      <workItem from="1531775595883" duration="5604000" />
466
+      <workItem from="1531837614306" duration="20000" />
467
+      <workItem from="1532460990056" duration="1658000" />
468
+    </task>
469
+    <servers />
470
+  </component>
471
+  <component name="TimeTrackingManager">
472
+    <option name="totallyTimeSpent" value="20150000" />
473
+  </component>
474
+  <component name="ToolWindowManager">
475
+    <frame x="0" y="0" width="1280" height="800" extended-state="0" />
476
+    <editor active="true" />
477
+    <layout>
478
+      <window_info anchor="right" id="Palette" order="3" />
479
+      <window_info anchor="bottom" id="Event Log" order="7" side_tool="true" />
480
+      <window_info anchor="right" id="Maven Projects" order="3" />
481
+      <window_info anchor="bottom" id="Database Changes" order="7" show_stripe_button="false" />
482
+      <window_info id="Capture Tool" order="2" />
483
+      <window_info id="Designer" order="2" />
484
+      <window_info anchor="right" id="Database" order="3" />
485
+      <window_info id="Structure" order="1" side_tool="true" weight="0.25" />
486
+      <window_info anchor="right" id="Ant Build" order="1" weight="0.25" />
487
+      <window_info id="UI Designer" order="2" />
488
+      <window_info anchor="bottom" id="Debug" order="3" weight="0.4" />
489
+      <window_info anchor="bottom" id="TODO" order="6" />
490
+      <window_info anchor="bottom" id="Messages" order="9" weight="0.32965517" />
491
+      <window_info anchor="right" id="Palette&#9;" order="3" />
492
+      <window_info id="Image Layers" order="2" />
493
+      <window_info anchor="bottom" id="Java Enterprise" order="8" weight="0.32965517" />
494
+      <window_info anchor="right" id="Capture Analysis" order="3" />
495
+      <window_info anchor="bottom" id="Version Control" order="7" />
496
+      <window_info anchor="bottom" id="Run" order="2" visible="true" weight="0.10068966" />
497
+      <window_info anchor="bottom" id="Spring" order="9" weight="0.32965517" />
498
+      <window_info anchor="bottom" id="Terminal" order="7" weight="0.32827586" />
499
+      <window_info active="true" content_ui="combo" id="Project" order="0" visible="true" weight="0.26494345" />
500
+      <window_info anchor="right" id="Bean Validation" order="4" />
501
+      <window_info id="Web" order="4" side_tool="true" />
502
+      <window_info anchor="right" id="Theme Preview" order="3" />
503
+      <window_info id="Favorites" order="2" side_tool="true" />
504
+      <window_info anchor="bottom" id="Inspection" order="5" weight="0.4" />
505
+      <window_info anchor="right" id="Commander" internal_type="SLIDING" order="0" type="SLIDING" weight="0.4" />
506
+      <window_info anchor="bottom" id="Cvs" order="4" weight="0.25" />
507
+      <window_info anchor="bottom" id="Message" order="0" />
508
+      <window_info anchor="right" content_ui="combo" id="Hierarchy" order="2" weight="0.25" />
509
+      <window_info anchor="bottom" id="Find" order="1" weight="0.32954547" />
510
+    </layout>
511
+  </component>
512
+  <component name="TypeScriptGeneratedFilesManager">
513
+    <option name="version" value="1" />
514
+  </component>
515
+  <component name="VcsContentAnnotationSettings">
516
+    <option name="myLimit" value="2678400000" />
517
+  </component>
518
+  <component name="editorHistoryManager">
519
+    <entry file="file://$PROJECT_DIR$/src/test/java/com/zipcoin/redCoin/testMain.java" />
520
+    <entry file="file://$PROJECT_DIR$/src/main/java/com/zipcoin/redCoin/Main.java" />
521
+    <entry file="file://$PROJECT_DIR$/src/test/java/com/zipcoin/redCoin/testMain.java" />
522
+    <entry file="file://$PROJECT_DIR$/src/main/java/com/zipcoin/redCoin/Main.java" />
523
+    <entry file="file://$PROJECT_DIR$/src/test/java/com/zipcoin/redCoin/testMain.java" />
524
+    <entry file="file://$PROJECT_DIR$/pom.xml" />
525
+    <entry file="file://$PROJECT_DIR$/src/main/java/com/zipcoin/redCoin/Main.java" />
526
+    <entry file="file://$PROJECT_DIR$/ZipCoin-RED.iml" />
527
+    <entry file="file://$PROJECT_DIR$/src/test/java/com/zipcoin/redCoin/block/test/BlockControllerTest.java" />
528
+    <entry file="file://$PROJECT_DIR$/.idea/workspace.xml">
529
+      <provider selected="true" editor-type-id="text-editor">
530
+        <state relative-caret-position="438">
531
+          <caret line="461" column="19" selection-start-line="461" selection-start-column="19" selection-end-line="461" selection-end-column="19" />
532
+        </state>
533
+      </provider>
534
+    </entry>
535
+    <entry file="file://$PROJECT_DIR$/pom.xml" />
536
+    <entry file="file://$PROJECT_DIR$/src/main/java/Main.java" />
537
+    <entry file="file://$PROJECT_DIR$/src/main/java/redCoin/Main.java" />
538
+    <entry file="file://$PROJECT_DIR$/src/test/java/redCoin/testMain.java" />
539
+    <entry file="file://$PROJECT_DIR$/pom.xml" />
540
+    <entry file="file://$PROJECT_DIR$/src/test/java/redCoin/minerTest.java" />
541
+    <entry file="file://$PROJECT_DIR$/.idea/workspace.xml">
542
+      <provider selected="true" editor-type-id="text-editor">
543
+        <state relative-caret-position="539">
544
+          <caret line="813" column="10" selection-start-line="813" selection-start-column="10" selection-end-line="813" selection-end-column="10" />
545
+        </state>
546
+      </provider>
547
+    </entry>
548
+    <entry file="file://$PROJECT_DIR$/.idea/ZipCoin-RED.iml" />
549
+    <entry file="file://$PROJECT_DIR$/src/main/java/redCoin/Main.java" />
550
+    <entry file="file://$PROJECT_DIR$/src/test/java/redCoin/testMain.java" />
551
+    <entry file="file://$PROJECT_DIR$/src/main/java/redCoin/Main.java" />
552
+    <entry file="file://$PROJECT_DIR$/src/test/java/redCoin/testMain.java" />
553
+    <entry file="file://$PROJECT_DIR$/src/main/java/com/zipcoin/redCoin/Main.java" />
554
+    <entry file="file://$PROJECT_DIR$/src/test/java/mainTest.java" />
555
+    <entry file="file://$PROJECT_DIR$/src/test/java/com/zipcoin/redCoin/testMain.java" />
556
+    <entry file="file://$PROJECT_DIR$/README.md" />
557
+    <entry file="file://$PROJECT_DIR$/src/main/resources/db.migration/mine_block.sql" />
558
+    <entry file="file://$PROJECT_DIR$/src/main/resources/db.migration/V2__mine_block.sql" />
559
+    <entry file="file://$PROJECT_DIR$/src/main/java/redCoin/Miner/Miner.java" />
560
+    <entry file="file://$PROJECT_DIR$/src/test/java/com/zipcoin/redCoin/block/test/BlockTest.java" />
561
+    <entry file="file://$PROJECT_DIR$/src/main/java/com/zipcoin/ZipCoinApp.java">
562
+      <provider selected="true" editor-type-id="text-editor">
563
+        <state relative-caret-position="75">
564
+          <caret line="6" column="13" selection-start-line="6" selection-start-column="13" selection-end-line="6" selection-end-column="13" />
565
+          <folding>
566
+            <element signature="imports" expanded="true" />
567
+          </folding>
568
+        </state>
569
+      </provider>
570
+    </entry>
571
+    <entry file="file://$PROJECT_DIR$/src/main/resources/db/migration/V2__create_block.sql">
572
+      <provider selected="true" editor-type-id="text-editor">
573
+        <state relative-caret-position="105">
574
+          <caret line="7" column="2" selection-start-line="7" selection-start-column="2" selection-end-line="7" selection-end-column="2" />
575
+        </state>
576
+      </provider>
577
+    </entry>
578
+    <entry file="file://$PROJECT_DIR$/pom.xml">
579
+      <provider selected="true" editor-type-id="text-editor">
580
+        <state relative-caret-position="585">
581
+          <caret line="39" column="21" selection-start-line="39" selection-start-column="21" selection-end-line="39" selection-end-column="21" />
582
+        </state>
583
+      </provider>
584
+    </entry>
585
+    <entry file="file://$PROJECT_DIR$/src/test/java/redCoin/Miner/minerTest.java" />
586
+    <entry file="file://$PROJECT_DIR$/src/test/java/com/zipcoin/redCoin/miner/test/minerTest.java">
587
+      <provider selected="true" editor-type-id="text-editor">
588
+        <state relative-caret-position="135">
589
+          <caret line="12" column="9" selection-start-line="12" selection-start-column="9" selection-end-line="12" selection-end-column="9" />
590
+          <folding>
591
+            <element signature="imports" expanded="true" />
592
+          </folding>
593
+        </state>
594
+      </provider>
595
+    </entry>
596
+    <entry file="file://$PROJECT_DIR$/src/main/java/com/zipcoin/utilities/StringUtil.java">
597
+      <provider selected="true" editor-type-id="text-editor">
598
+        <state relative-caret-position="450">
599
+          <caret line="30" column="5" lean-forward="true" selection-start-line="30" selection-start-column="5" selection-end-line="30" selection-end-column="5" />
600
+        </state>
601
+      </provider>
602
+    </entry>
603
+    <entry file="file://$PROJECT_DIR$/src/main/java/com/zipcoin/utilities/Miner.java">
604
+      <provider selected="true" editor-type-id="text-editor">
605
+        <state relative-caret-position="60">
606
+          <caret line="4" column="13" selection-start-line="4" selection-start-column="13" selection-end-line="4" selection-end-column="13" />
607
+        </state>
608
+      </provider>
609
+    </entry>
610
+    <entry file="file://$PROJECT_DIR$/src/main/java/com/zipcoin/repository/BlockRepository.java">
611
+      <provider selected="true" editor-type-id="text-editor">
612
+        <state relative-caret-position="60">
613
+          <caret line="5" column="17" selection-start-line="5" selection-start-column="17" selection-end-line="5" selection-end-column="17" />
614
+          <folding>
615
+            <element signature="imports" expanded="true" />
616
+          </folding>
617
+        </state>
618
+      </provider>
619
+    </entry>
620
+    <entry file="file://$PROJECT_DIR$/src/main/resources/application.properties">
621
+      <provider selected="true" editor-type-id="text-editor">
622
+        <state relative-caret-position="225">
623
+          <caret line="15" column="53" selection-start-line="15" selection-start-column="53" selection-end-line="15" selection-end-column="53" />
624
+        </state>
625
+      </provider>
626
+    </entry>
627
+    <entry file="file://$PROJECT_DIR$/src/main/java/com/zipcoin/config/PersistenceConfiguration.java">
628
+      <provider selected="true" editor-type-id="text-editor">
629
+        <state relative-caret-position="90">
630
+          <caret line="13" column="13" selection-start-line="13" selection-start-column="13" selection-end-line="13" selection-end-column="13" />
631
+        </state>
632
+      </provider>
633
+    </entry>
634
+    <entry file="file://$PROJECT_DIR$/src/main/java/com/zipcoin/controller/BlockController.java">
635
+      <provider selected="true" editor-type-id="text-editor">
636
+        <state relative-caret-position="36">
637
+          <caret line="12" column="26" selection-start-line="12" selection-start-column="26" selection-end-line="12" selection-end-column="26" />
638
+          <folding>
639
+            <element signature="imports" expanded="true" />
640
+          </folding>
641
+        </state>
642
+      </provider>
643
+    </entry>
644
+    <entry file="file://$PROJECT_DIR$/src/main/java/com/zipcoin/controller/HomeController.java">
645
+      <provider selected="true" editor-type-id="text-editor">
646
+        <state relative-caret-position="60">
647
+          <caret line="5" column="13" selection-start-line="5" selection-start-column="13" selection-end-line="5" selection-end-column="13" />
648
+        </state>
649
+      </provider>
650
+    </entry>
651
+    <entry file="file://$PROJECT_DIR$/src/main/java/com/zipcoin/controller/TransactionController.java">
652
+      <provider selected="true" editor-type-id="text-editor">
653
+        <state relative-caret-position="230">
654
+          <caret line="19" column="68" selection-start-line="19" selection-start-column="68" selection-end-line="19" selection-end-column="68" />
655
+          <folding>
656
+            <element signature="imports" expanded="true" />
657
+          </folding>
658
+        </state>
659
+      </provider>
660
+    </entry>
661
+    <entry file="file://$PROJECT_DIR$/src/main/java/com/zipcoin/controller/WalletController.java">
662
+      <provider selected="true" editor-type-id="text-editor">
663
+        <state relative-caret-position="216">
664
+          <caret line="24" column="48" selection-start-line="24" selection-start-column="29" selection-end-line="24" selection-end-column="48" />
665
+          <folding>
666
+            <element signature="imports" expanded="true" />
667
+          </folding>
668
+        </state>
669
+      </provider>
670
+    </entry>
671
+    <entry file="file://$PROJECT_DIR$/src/main/java/com/zipcoin/model/Chain.java">
672
+      <provider selected="true" editor-type-id="text-editor">
673
+        <state relative-caret-position="60">
674
+          <caret line="4" column="13" selection-start-line="4" selection-start-column="13" selection-end-line="4" selection-end-column="13" />
675
+        </state>
676
+      </provider>
677
+    </entry>
678
+    <entry file="file://$PROJECT_DIR$/src/main/java/com/zipcoin/model/Block.java">
679
+      <provider selected="true" editor-type-id="text-editor">
680
+        <state relative-caret-position="165">
681
+          <caret line="11" column="20" lean-forward="true" selection-start-line="9" selection-start-column="4" selection-end-line="11" selection-end-column="20" />
682
+          <folding>
683
+            <element signature="imports" expanded="true" />
684
+          </folding>
685
+        </state>
686
+      </provider>
687
+    </entry>
688
+    <entry file="file://$PROJECT_DIR$/src/main/java/com/zipcoin/model/Wallet.java">
689
+      <provider selected="true" editor-type-id="text-editor">
690
+        <state relative-caret-position="120">
691
+          <caret line="12" column="32" selection-start-line="12" selection-start-column="32" selection-end-line="12" selection-end-column="32" />
692
+          <folding>
693
+            <element signature="imports" expanded="true" />
694
+          </folding>
695
+        </state>
696
+      </provider>
697
+    </entry>
698
+    <entry file="file://$PROJECT_DIR$/src/main/java/com/zipcoin/model/Transaction.java">
699
+      <provider selected="true" editor-type-id="text-editor">
700
+        <state relative-caret-position="1110">
701
+          <caret line="74" selection-start-line="74" selection-start-column="2" selection-end-line="78" selection-end-column="7" />
702
+          <folding>
703
+            <element signature="imports" expanded="true" />
704
+          </folding>
705
+        </state>
706
+      </provider>
707
+    </entry>
708
+    <entry file="file://$PROJECT_DIR$/src/test/java/com/zipcoin/redCoin/TransactionAndWallet/TransactionAndWalletTest.java">
709
+      <provider selected="true" editor-type-id="text-editor">
710
+        <state relative-caret-position="75">
711
+          <caret line="12" selection-start-line="12" selection-start-column="2" selection-end-line="13" selection-end-column="39" />
712
+        </state>
713
+      </provider>
714
+    </entry>
715
+    <entry file="file://$PROJECT_DIR$/src/main/java/com/zipcoin/repository/TransactionRepository.java">
716
+      <provider selected="true" editor-type-id="text-editor">
717
+        <state relative-caret-position="165">
718
+          <caret line="11" selection-start-line="11" selection-start-column="2" selection-end-line="12" selection-end-column="92" />
719
+          <folding>
720
+            <element signature="imports" expanded="true" />
721
+          </folding>
722
+        </state>
723
+      </provider>
724
+    </entry>
725
+    <entry file="file://$PROJECT_DIR$/src/main/java/com/zipcoin/repository/WalletRepository.java">
726
+      <provider selected="true" editor-type-id="text-editor">
727
+        <state relative-caret-position="180">
728
+          <caret line="12" column="70" selection-start-line="11" selection-start-column="4" selection-end-line="12" selection-end-column="70" />
729
+          <folding>
730
+            <element signature="imports" expanded="true" />
731
+          </folding>
732
+        </state>
733
+      </provider>
734
+    </entry>
735
+  </component>
736
+</project>

+ 5
- 5
ZipCoinRedJavaServer/src/main/java/com/zipcoin/controller/TransactionController.java View File

@@ -27,11 +27,11 @@ public class TransactionController {
27 27
         return transactionRepository.findAll();
28 28
     }
29 29
 
30
-    //READ TRANSACTIONS TO OR FROM A PUBLIC KEY
31
-    @RequestMapping(value = "transactions/{publicKey}", method = RequestMethod.GET)
32
-    public List<Transaction> get(@PathVariable String publicKey){
33
-        return transactionRepository.findAllTransactionsWithPubKey(publicKey);
34
-    }
30
+//    //READ TRANSACTIONS TO OR FROM A PUBLIC KEY
31
+//    @RequestMapping(value = "transactions/{publicKey}", method = RequestMethod.GET)
32
+//    public List<Transaction> get(@PathVariable String publicKey){
33
+//        return transactionRepository.findAllTransactionsWithPubKey(publicKey);
34
+//    }
35 35
 
36 36
     //DELETE A TRANSACTION
37 37
     @RequestMapping(value = "transactions/{id}", method = RequestMethod.DELETE)

+ 11
- 11
ZipCoinRedJavaServer/src/main/java/com/zipcoin/controller/WalletController.java View File

@@ -21,17 +21,17 @@ public class WalletController {
21 21
         return walletRepository.saveAndFlush(wallet);
22 22
     }
23 23
 
24
-    //READ A WALLET FROM PUBLIC KEY
25
-    @RequestMapping(value = "wallets/{publicKey}", method = RequestMethod.GET)
26
-    public Wallet get(@PathVariable String publicKey){
27
-        return walletRepository.findWalletFromPubKey(publicKey);
28
-    }
29
-
30
-    //READ PUBLIC KEYS FROM ALL WALLETS
31
-    @RequestMapping(value = "wallets/publicKeys", method = RequestMethod.GET)
32
-    public List<String> get(){
33
-        return walletRepository.findAllPublicKeys();
34
-    }
24
+//    //READ A WALLET FROM PUBLIC KEY
25
+//    @RequestMapping(value = "wallets/{publicKey}", method = RequestMethod.GET)
26
+//    public Wallet get(@PathVariable String publicKey){
27
+//        return walletRepository.findWalletFromPubKey(publicKey);
28
+//    }
29
+//
30
+//    //READ PUBLIC KEYS FROM ALL WALLETS
31
+//    @RequestMapping(value = "wallets/publicKeys", method = RequestMethod.GET)
32
+//    public List<String> get(){
33
+//        return walletRepository.findAllPublicKeys();
34
+//    }
35 35
 
36 36
     //DELETE A WALLET
37 37
     @RequestMapping(value = "wallets/{id}", method = RequestMethod.DELETE)

+ 6
- 6
ZipCoinRedJavaServer/src/main/java/com/zipcoin/model/Transaction.java View File

@@ -17,7 +17,7 @@ public class Transaction {
17 17
     private PublicKey sender; // senders address/public key.
18 18
     private PublicKey reciepient; // Recipients address/public key.
19 19
     private float value;
20
-    public Signature signature;// this is to prevent anybody else from spending funds in our wallet.
20
+//    public Signature signature;// this is to prevent anybody else from spending funds in our wallet.
21 21
 
22 22
     public String getTransactionId() {
23 23
         return transactionId;
@@ -72,11 +72,11 @@ public class Transaction {
72 72
                         Float.toString(value)
73 73
         );
74 74
     }
75
-    public void generateSignature(PrivateKey privateKey) throws NoSuchAlgorithmException, InvalidKeyException, NoSuchProviderException {
76
-        String data = StringUtil.getStringFromKey(sender) + StringUtil.getStringFromKey(reciepient) + Float.toString(value)    ;
77
-        signature = StringUtil.applyECDSASig(privateKey,data);
78
-        System.out.println(signature);
79
-    }
75
+//    public void generateSignature(PrivateKey privateKey) throws NoSuchAlgorithmException, InvalidKeyException, NoSuchProviderException {
76
+//        String data = StringUtil.getStringFromKey(sender) + StringUtil.getStringFromKey(reciepient) + Float.toString(value)    ;
77
+//        signature = StringUtil.applyECDSASig(privateKey,data);
78
+//        System.out.println(signature);
79
+//    }
80 80
     //Verifies the data we signed hasnt been tampered with
81 81
     //public boolean verifiySignature() {
82 82
     // String data = StringUtil.getStringFromKey(sender) + StringUtil.getStringFromKey(reciepient) + Float.toString(value)    ;

+ 2
- 2
ZipCoinRedJavaServer/src/main/java/com/zipcoin/repository/TransactionRepository.java View File

@@ -9,7 +9,7 @@ import java.util.List;
9 9
 
10 10
 public interface TransactionRepository extends JpaRepository<Transaction, Long> {
11 11
 
12
-    @Query("SELECT t FROM transaction t WHERE t.sender = :publicKey OR t.recipient = :publicKey")
13
-    List<Transaction> findAllTransactionsWithPubKey(@Param("publicKey") String publicKey);
12
+//    @Query("SELECT t FROM transaction t WHERE t.sender = :publicKey OR t.recipient = :publicKey")
13
+//    List<Transaction> findAllTransactionsWithPubKey(@Param("publicKey") String publicKey);
14 14
 
15 15
 }

+ 5
- 5
ZipCoinRedJavaServer/src/main/java/com/zipcoin/repository/WalletRepository.java View File

@@ -9,10 +9,10 @@ import java.util.List;
9 9
 
10 10
 public interface WalletRepository extends JpaRepository<Wallet, Long> {
11 11
 
12
-    @Query("SELECT w FROM wallet w WHERE w.publicKey = :publicKey")
13
-    Wallet findWalletFromPubKey(@Param("publicKey") String publicKey);
14
-
15
-    @Query("SELECT w.publicKey FROM wallet")
16
-    List<String> findAllPublicKeys();
12
+//    @Query("SELECT w FROM wallet w WHERE w.publicKey = :publicKey")
13
+//    Wallet findWalletFromPubKey(@Param("publicKey") String publicKey);
14
+//
15
+//    @Query("SELECT w.publicKey FROM wallet")
16
+//    List<String> findAllPublicKeys();
17 17
 
18 18
 }

+ 30
- 30
ZipCoinRedJavaServer/src/test/java/com/zipcoin/redCoin/TransactionAndWallet/TransactionAndWalletTest.java View File

@@ -10,36 +10,36 @@ import java.security.NoSuchProviderException;
10 10
 import java.util.ArrayList;
11 11
 
12 12
 public class TransactionAndWalletTest {
13
-    public static ArrayList<Block> blockchain = new ArrayList<Block>();
14
-    public static int difficulty = 5;
15
-
16
-
17
-    public static void main(String[] args) throws NoSuchAlgorithmException, InvalidKeyException, NoSuchProviderException {
18
-        //Setup Bouncey castle as a Security Provider
19
-        //Security.addProvider(new org.bouncycastle.jce.provider.BouncyCastleProvider());
20
-        //Create the new wallets
21
-        Wallet walletA = new Wallet();
22
-        Wallet walletB = new Wallet();
23
-        //Test public and private keys
24
-        System.out.println("utilities 1");
25
-        System.out.println("private key :wallet 1");
26
-        System.out.println(walletA.getPrivateKey().toString());
27
-        System.out.println("public key :wallet 1");
28
-        System.out.println(walletA.getPublicKey().toString());
29
-        System.out.println("\n\nWallet2");
30
-        System.out.println("public key :wallet 2");
31
-        System.out.println(walletB.getPublicKey().toString());
32
-        System.out.println("private key :wallet 2");
33
-        System.out.println(walletB.getPrivateKey().toString());
34
-        //Create a test transaction from WalletA to walletB
35
-        Transaction transaction = new Transaction(walletA.getPublicKey(), walletB.getPublicKey(), 5);
36
-        transaction.generateSignature(walletA.getPrivateKey());
37
-        //Verify the signature works and verify it from the public key
38
-
39
-
40
-        System.out.println("Is signature verified");
41
-        // System.out.println(transaction.verifiySignature());
42
-    }
13
+//    public static ArrayList<Block> blockchain = new ArrayList<Block>();
14
+//    public static int difficulty = 5;
15
+
16
+
17
+//    public static void main(String[] args) throws NoSuchAlgorithmException, InvalidKeyException, NoSuchProviderException {
18
+//        //Setup Bouncey castle as a Security Provider
19
+//        //Security.addProvider(new org.bouncycastle.jce.provider.BouncyCastleProvider());
20
+//        //Create the new wallets
21
+//        Wallet walletA = new Wallet();
22
+//        Wallet walletB = new Wallet();
23
+//        //Test public and private keys
24
+//        System.out.println("utilities 1");
25
+//        System.out.println("private key :wallet 1");
26
+//        System.out.println(walletA.getPrivateKey().toString());
27
+//        System.out.println("public key :wallet 1");
28
+//        System.out.println(walletA.getPublicKey().toString());
29
+//        System.out.println("\n\nWallet2");
30
+//        System.out.println("public key :wallet 2");
31
+//        System.out.println(walletB.getPublicKey().toString());
32
+//        System.out.println("private key :wallet 2");
33
+//        System.out.println(walletB.getPrivateKey().toString());
34
+//        //Create a test transaction from WalletA to walletB
35
+//        Transaction transaction = new Transaction(walletA.getPublicKey(), walletB.getPublicKey(), 5);
36
+//        transaction.generateSignature(walletA.getPrivateKey());
37
+//        //Verify the signature works and verify it from the public key
38
+//
39
+//
40
+//        System.out.println("Is signature verified");
41
+//        // System.out.println(transaction.verifiySignature());
42
+//    }
43 43
 
44 44
 
45 45
 

BIN
ZipCoinRedJavaServer/target/classes/com/zipcoin/controller/BlockController.class View File


BIN
ZipCoinRedJavaServer/target/classes/com/zipcoin/controller/TransactionController.class View File


BIN
ZipCoinRedJavaServer/target/classes/com/zipcoin/controller/WalletController.class View File


BIN
ZipCoinRedJavaServer/target/classes/com/zipcoin/model/Chain.class View File


BIN
ZipCoinRedJavaServer/target/classes/com/zipcoin/model/Transaction.class View File


BIN
ZipCoinRedJavaServer/target/classes/com/zipcoin/model/Wallet.class View File


BIN
ZipCoinRedJavaServer/target/classes/com/zipcoin/repository/TransactionRepository.class View File


BIN
ZipCoinRedJavaServer/target/classes/com/zipcoin/repository/WalletRepository.class View File


BIN
ZipCoinRedJavaServer/target/test-classes/com/zipcoin/redCoin/TransactionAndWallet/TransactionAndWalletTest.class View File


BIN
ZipCoinRedJavaServer/target/test-classes/com/zipcoin/redCoin/chain/test/chainTest.class View File