瀏覽代碼

fixed conflicts

Navya Sanal 6 年之前
父節點
當前提交
ee93afe452
共有 29 個文件被更改,包括 524 次插入498 次删除
  1. 0
    13
      .idea/libraries/Maven__com_h2database_h2_1_4_190.xml
  2. 13
    0
      .idea/libraries/Maven__mysql_mysql_connector_java_5_1_38.xml
  3. 0
    13
      .idea/libraries/Maven__org_flywaydb_flyway_core_3_2_1.xml
  4. 196
    154
      .idea/workspace.xml
  5. 1
    1
      ZipCoinRedIonicClient/.sourcemaps/main.js.map
  6. 0
    4
      ZipCoinRedIonicClient/src/app/app.module.ts
  7. 1
    1
      ZipCoinRedIonicClient/src/pages/tabs/tabs.ts
  8. 43
    0
      ZipCoinRedIonicClient/src/pages/wallet/wallet.html
  9. 9
    59
      ZipCoinRedIonicClient/www/build/.ion-diagnostic-typescript.html
  10. 73
    75
      ZipCoinRedIonicClient/www/build/main.js
  11. 1
    1
      ZipCoinRedIonicClient/www/build/main.js.map
  12. 1
    1
      ZipCoinRedIonicClient/www/build/vendor.js.map
  13. 1
    2
      ZipCoinRedJavaServer/ZipCoin-RED.iml
  14. 7
    8
      ZipCoinRedJavaServer/pom.xml
  15. 0
    28
      ZipCoinRedJavaServer/src/main/java/com/zipcoin/config/PersistenceConfiguration.java
  16. 11
    1
      ZipCoinRedJavaServer/src/main/java/com/zipcoin/config/WalletLoader.java
  17. 8
    1
      ZipCoinRedJavaServer/src/main/java/com/zipcoin/controller/WalletController.java
  18. 32
    28
      ZipCoinRedJavaServer/src/main/java/com/zipcoin/model/Transaction.java
  19. 56
    20
      ZipCoinRedJavaServer/src/main/java/com/zipcoin/model/Wallet.java
  20. 3
    26
      ZipCoinRedJavaServer/src/main/resources/application.properties
  21. 0
    8
      ZipCoinRedJavaServer/src/main/resources/db/migration/V2__create_block.sql
  22. 50
    20
      ZipCoinRedJavaServer/src/test/java/com/zipcoin/redCoin/TransactionAndWallet/TransactionAndWalletTest.java
  23. 3
    26
      ZipCoinRedJavaServer/target/classes/application.properties
  24. 二進制
      ZipCoinRedJavaServer/target/classes/com/boot/config/PersistenceConfiguration.class
  25. 二進制
      ZipCoinRedJavaServer/target/classes/com/zipcoin/controller/WalletController.class
  26. 二進制
      ZipCoinRedJavaServer/target/classes/com/zipcoin/model/Transaction.class
  27. 二進制
      ZipCoinRedJavaServer/target/classes/com/zipcoin/model/Wallet.class
  28. 15
    8
      ZipCoinRedJavaServer/target/classes/db/migration/V2__create_block.sql
  29. 二進制
      ZipCoinRedJavaServer/target/test-classes/com/zipcoin/redCoin/TransactionAndWallet/TransactionAndWalletTest.class

+ 0
- 13
.idea/libraries/Maven__com_h2database_h2_1_4_190.xml 查看文件

@@ -1,13 +0,0 @@
1
-<component name="libraryTable">
2
-  <library name="Maven: com.h2database:h2:1.4.190">
3
-    <CLASSES>
4
-      <root url="jar://$MAVEN_REPOSITORY$/com/h2database/h2/1.4.190/h2-1.4.190.jar!/" />
5
-    </CLASSES>
6
-    <JAVADOC>
7
-      <root url="jar://$MAVEN_REPOSITORY$/com/h2database/h2/1.4.190/h2-1.4.190-javadoc.jar!/" />
8
-    </JAVADOC>
9
-    <SOURCES>
10
-      <root url="jar://$MAVEN_REPOSITORY$/com/h2database/h2/1.4.190/h2-1.4.190-sources.jar!/" />
11
-    </SOURCES>
12
-  </library>
13
-</component>

+ 13
- 0
.idea/libraries/Maven__mysql_mysql_connector_java_5_1_38.xml 查看文件

@@ -0,0 +1,13 @@
1
+<component name="libraryTable">
2
+  <library name="Maven: mysql:mysql-connector-java:5.1.38">
3
+    <CLASSES>
4
+      <root url="jar://$MAVEN_REPOSITORY$/mysql/mysql-connector-java/5.1.38/mysql-connector-java-5.1.38.jar!/" />
5
+    </CLASSES>
6
+    <JAVADOC>
7
+      <root url="jar://$MAVEN_REPOSITORY$/mysql/mysql-connector-java/5.1.38/mysql-connector-java-5.1.38-javadoc.jar!/" />
8
+    </JAVADOC>
9
+    <SOURCES>
10
+      <root url="jar://$MAVEN_REPOSITORY$/mysql/mysql-connector-java/5.1.38/mysql-connector-java-5.1.38-sources.jar!/" />
11
+    </SOURCES>
12
+  </library>
13
+</component>

+ 0
- 13
.idea/libraries/Maven__org_flywaydb_flyway_core_3_2_1.xml 查看文件

@@ -1,13 +0,0 @@
1
-<component name="libraryTable">
2
-  <library name="Maven: org.flywaydb:flyway-core:3.2.1">
3
-    <CLASSES>
4
-      <root url="jar://$MAVEN_REPOSITORY$/org/flywaydb/flyway-core/3.2.1/flyway-core-3.2.1.jar!/" />
5
-    </CLASSES>
6
-    <JAVADOC>
7
-      <root url="jar://$MAVEN_REPOSITORY$/org/flywaydb/flyway-core/3.2.1/flyway-core-3.2.1-javadoc.jar!/" />
8
-    </JAVADOC>
9
-    <SOURCES>
10
-      <root url="jar://$MAVEN_REPOSITORY$/org/flywaydb/flyway-core/3.2.1/flyway-core-3.2.1-sources.jar!/" />
11
-    </SOURCES>
12
-  </library>
13
-</component>

+ 196
- 154
.idea/workspace.xml 查看文件

@@ -30,17 +30,40 @@
30 30
       <file leaf-file-name="Wallet.java" pinned="false" current-in-tab="false">
31 31
         <entry file="file://$PROJECT_DIR$/ZipCoinRedJavaServer/src/main/java/com/zipcoin/model/Wallet.java">
32 32
           <provider selected="true" editor-type-id="text-editor">
33
-            <state relative-caret-position="225">
34
-              <caret line="15" column="29" selection-start-line="15" selection-start-column="29" selection-end-line="15" selection-end-column="29" />
33
+            <state relative-caret-position="285">
34
+              <caret line="19" column="29" selection-start-line="19" selection-start-column="29" selection-end-line="19" selection-end-column="29" />
35
+              <folding>
36
+                <element signature="imports" expanded="true" />
37
+                <element signature="e#432#433#0" expanded="true" />
38
+                <element signature="e#472#473#0" expanded="true" />
39
+                <element signature="e#504#505#0" expanded="true" />
40
+                <element signature="e#540#541#0" expanded="true" />
41
+                <element signature="e#572#573#0" expanded="true" />
42
+                <element signature="e#622#623#0" expanded="true" />
43
+                <element signature="e#664#665#0" expanded="true" />
44
+              </folding>
35 45
             </state>
36 46
           </provider>
37 47
         </entry>
38 48
       </file>
39
-      <file leaf-file-name="application.properties" pinned="false" current-in-tab="true">
49
+      <file leaf-file-name="StringUtil.java" pinned="false" current-in-tab="false">
50
+        <entry file="file://$PROJECT_DIR$/ZipCoinRedJavaServer/src/main/java/com/zipcoin/utilities/StringUtil.java">
51
+          <provider selected="true" editor-type-id="text-editor">
52
+            <state relative-caret-position="525">
53
+              <caret line="35" column="5" selection-start-line="35" selection-start-column="5" selection-end-line="35" selection-end-column="5" />
54
+              <folding>
55
+                <element signature="e#1170#1171#0" expanded="true" />
56
+                <element signature="e#1209#1210#0" expanded="true" />
57
+              </folding>
58
+            </state>
59
+          </provider>
60
+        </entry>
61
+      </file>
62
+      <file leaf-file-name="application.properties" pinned="false" current-in-tab="false">
40 63
         <entry file="file://$PROJECT_DIR$/ZipCoinRedJavaServer/src/main/resources/application.properties">
41 64
           <provider selected="true" editor-type-id="text-editor">
42
-            <state relative-caret-position="375">
43
-              <caret line="25" column="49" selection-start-line="25" selection-start-column="49" selection-end-line="25" selection-end-column="49" />
65
+            <state relative-caret-position="45">
66
+              <caret line="3" selection-start-line="3" selection-end-line="3" />
44 67
             </state>
45 68
           </provider>
46 69
         </entry>
@@ -48,8 +71,8 @@
48 71
       <file leaf-file-name="Transaction.java" pinned="false" current-in-tab="false">
49 72
         <entry file="file://$PROJECT_DIR$/ZipCoinRedJavaServer/src/main/java/com/zipcoin/model/Transaction.java">
50 73
           <provider selected="true" editor-type-id="text-editor">
51
-            <state relative-caret-position="-38">
52
-              <caret line="13" selection-start-line="13" selection-end-line="13" />
74
+            <state relative-caret-position="232">
75
+              <caret line="34" column="27" selection-start-line="34" selection-start-column="27" selection-end-line="34" selection-end-column="27" />
53 76
             </state>
54 77
           </provider>
55 78
         </entry>
@@ -72,11 +95,11 @@
72 95
           </provider>
73 96
         </entry>
74 97
       </file>
75
-      <file leaf-file-name="WalletLoader.java" pinned="false" current-in-tab="false">
98
+      <file leaf-file-name="WalletLoader.java" pinned="false" current-in-tab="true">
76 99
         <entry file="file://$PROJECT_DIR$/ZipCoinRedJavaServer/src/main/java/com/zipcoin/config/WalletLoader.java">
77 100
           <provider selected="true" editor-type-id="text-editor">
78
-            <state relative-caret-position="45">
79
-              <caret line="3" selection-start-line="3" selection-end-line="3" />
101
+            <state relative-caret-position="60">
102
+              <caret line="4" lean-forward="true" selection-start-line="4" selection-end-line="4" />
80 103
             </state>
81 104
           </provider>
82 105
         </entry>
@@ -99,15 +122,6 @@
99 122
           </provider>
100 123
         </entry>
101 124
       </file>
102
-      <file leaf-file-name="WalletController.java" pinned="false" current-in-tab="false">
103
-        <entry file="file://$PROJECT_DIR$/ZipCoinRedJavaServer/src/main/java/com/zipcoin/controller/WalletController.java">
104
-          <provider selected="true" editor-type-id="text-editor">
105
-            <state relative-caret-position="255">
106
-              <caret line="20" column="53" selection-start-line="20" selection-start-column="53" selection-end-line="20" selection-end-column="53" />
107
-            </state>
108
-          </provider>
109
-        </entry>
110
-      </file>
111 125
       <file leaf-file-name="WalletRepository.java" pinned="false" current-in-tab="false">
112 126
         <entry file="file://$PROJECT_DIR$/ZipCoinRedJavaServer/src/main/java/com/zipcoin/repository/WalletRepository.java">
113 127
           <provider selected="true" editor-type-id="text-editor">
@@ -126,6 +140,11 @@
126 140
       </list>
127 141
     </option>
128 142
   </component>
143
+  <component name="FindInProjectRecents">
144
+    <findStrings>
145
+      <find>ddl-</find>
146
+    </findStrings>
147
+  </component>
129 148
   <component name="Git.Settings">
130 149
     <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
131 150
   </component>
@@ -150,8 +169,18 @@
150 169
         <option value="$PROJECT_DIR$/src/main/java/com/zipcoin/controller/BlockController.java" />
151 170
         <option value="$PROJECT_DIR$/ZipCoinRedJavaServer/src/test/java/com/zipcoin/redCoin/chain/test/chainTest.java" />
152 171
         <option value="$PROJECT_DIR$/ZipCoinRedJavaServer/src/main/java/com/zipcoin/controller/BlockController.java" />
153
-        <option value="$PROJECT_DIR$/ZipCoinRedJavaServer/src/main/java/com/zipcoin/model/Wallet.java" />
154 172
         <option value="$PROJECT_DIR$/ZipCoinRedJavaServer/src/main/java/com/zipcoin/model/Chain.java" />
173
+        <option value="$PROJECT_DIR$/ZipCoinRedJavaServer/src/main/java/com/zipcoin/model/Transaction.java" />
174
+        <option value="$PROJECT_DIR$/ZipCoinRedJavaServer/src/main/java/com/zipcoin/utilities/StringUtil.java" />
175
+        <option value="$PROJECT_DIR$/ZipCoinRedJavaServer/src/test/java/com/zipcoin/redCoin/TransactionAndWallet/TransactionAndWalletTest.java" />
176
+        <option value="$PROJECT_DIR$/ZipCoinRedJavaServer/src/main/java/com/zipcoin/model/Wallet.java" />
177
+        <option value="$PROJECT_DIR$/ZipCoinRedJavaServer/src/main/resources/db/migration/V2__create_wallet.sql" />
178
+        <option value="$PROJECT_DIR$/ZipCoinRedJavaServer/src/main/resources/db/migration/V3__create_wallet.sql" />
179
+        <option value="$PROJECT_DIR$/ZipCoinRedJavaServer/src/main/java/com/zipcoin/controller/WalletController.java" />
180
+        <option value="$PROJECT_DIR$/ZipCoinRedJavaServer/src/main/java/com/zipcoin/config/PersistenceConfiguration.java" />
181
+        <option value="$PROJECT_DIR$/ZipCoinRedJavaServer/src/main/resources/db/migration/V2__create_block.sql" />
182
+        <option value="$PROJECT_DIR$/ZipCoinRedJavaServer/src/main/resources/application.properties" />
183
+        <option value="$PROJECT_DIR$/ZipCoinRedJavaServer/pom.xml" />
155 184
       </list>
156 185
     </option>
157 186
   </component>
@@ -170,7 +199,12 @@
170 199
   </component>
171 200
   <component name="MavenProjectNavigator">
172 201
     <treeState>
173
-      <expand />
202
+      <expand>
203
+        <path>
204
+          <item name="" type="16c1761:MavenProjectsStructure$RootNode" />
205
+          <item name="zip-coin" type="9519ce18:MavenProjectsStructure$ProjectNode" />
206
+        </path>
207
+      </expand>
174 208
       <select />
175 209
     </treeState>
176 210
   </component>
@@ -178,9 +212,9 @@
178 212
     <packageJsonPaths />
179 213
   </component>
180 214
   <component name="ProjectFrameBounds">
181
-    <option name="y" value="22" />
182
-    <option name="width" value="1280" />
183
-    <option name="height" value="702" />
215
+    <option name="y" value="23" />
216
+    <option name="width" value="1426" />
217
+    <option name="height" value="804" />
184 218
   </component>
185 219
   <component name="ProjectLevelVcsManager" settingsEditedManually="true" />
186 220
   <component name="ProjectView">
@@ -231,40 +265,6 @@
231 265
               <item name="zipcoin" type="462c0819:PsiDirectoryNode" />
232 266
               <item name="config" type="462c0819:PsiDirectoryNode" />
233 267
             </path>
234
-            <path>
235
-              <item name="ZipCoin-RED" type="b2602c69:ProjectViewProjectNode" />
236
-              <item name="ZipCoinRedJavaServer" type="462c0819:PsiDirectoryNode" />
237
-              <item name="src" type="462c0819:PsiDirectoryNode" />
238
-              <item name="main" type="462c0819:PsiDirectoryNode" />
239
-              <item name="java" type="462c0819:PsiDirectoryNode" />
240
-              <item name="zipcoin" type="462c0819:PsiDirectoryNode" />
241
-              <item name="controller" type="462c0819:PsiDirectoryNode" />
242
-            </path>
243
-            <path>
244
-              <item name="ZipCoin-RED" type="b2602c69:ProjectViewProjectNode" />
245
-              <item name="ZipCoinRedJavaServer" type="462c0819:PsiDirectoryNode" />
246
-              <item name="src" type="462c0819:PsiDirectoryNode" />
247
-              <item name="main" type="462c0819:PsiDirectoryNode" />
248
-              <item name="java" type="462c0819:PsiDirectoryNode" />
249
-              <item name="zipcoin" type="462c0819:PsiDirectoryNode" />
250
-              <item name="model" type="462c0819:PsiDirectoryNode" />
251
-            </path>
252
-            <path>
253
-              <item name="ZipCoin-RED" type="b2602c69:ProjectViewProjectNode" />
254
-              <item name="ZipCoinRedJavaServer" type="462c0819:PsiDirectoryNode" />
255
-              <item name="src" type="462c0819:PsiDirectoryNode" />
256
-              <item name="main" type="462c0819:PsiDirectoryNode" />
257
-              <item name="java" type="462c0819:PsiDirectoryNode" />
258
-              <item name="zipcoin" type="462c0819:PsiDirectoryNode" />
259
-              <item name="repository" type="462c0819:PsiDirectoryNode" />
260
-            </path>
261
-            <path>
262
-              <item name="ZipCoin-RED" type="b2602c69:ProjectViewProjectNode" />
263
-              <item name="ZipCoinRedJavaServer" type="462c0819:PsiDirectoryNode" />
264
-              <item name="src" type="462c0819:PsiDirectoryNode" />
265
-              <item name="main" type="462c0819:PsiDirectoryNode" />
266
-              <item name="resources" type="462c0819:PsiDirectoryNode" />
267
-            </path>
268 268
           </expand>
269 269
           <select />
270 270
         </subPane>
@@ -311,7 +311,7 @@
311 311
       </list>
312 312
     </option>
313 313
   </component>
314
-  <component name="RunManager" selected="Application.TransactionAndWalletTest">
314
+  <component name="RunManager" selected="Application.ZipCoinApp">
315 315
     <configuration name="TransactionAndWalletTest" type="Application" factoryName="Application" temporary="true" nameIsGenerated="true">
316 316
       <option name="MAIN_CLASS_NAME" value="com.zipcoin.redCoin.TransactionAndWallet.TransactionAndWalletTest" />
317 317
       <module name="ZipCoin-RED" />
@@ -448,8 +448,8 @@
448 448
     </list>
449 449
     <recent_temporary>
450 450
       <list>
451
-        <item itemvalue="Application.TransactionAndWalletTest" />
452 451
         <item itemvalue="Application.ZipCoinApp" />
452
+        <item itemvalue="Application.TransactionAndWalletTest" />
453 453
         <item itemvalue="JUnit.java in ZipCoin-RED" />
454 454
         <item itemvalue="JUnit.minerTest" />
455 455
         <item itemvalue="JUnit.testMain.test" />
@@ -473,6 +473,10 @@
473 473
       <workItem from="1531837614306" duration="20000" />
474 474
       <workItem from="1532024920972" duration="1933000" />
475 475
       <workItem from="1532095197895" duration="1931000" />
476
+      <workItem from="1532460873998" duration="385000" />
477
+      <workItem from="1532523890378" duration="1028000" />
478
+      <workItem from="1532528099328" duration="14938000" />
479
+      <workItem from="1532701223355" duration="2106000" />
476 480
     </task>
477 481
     <servers />
478 482
   </component>
@@ -506,10 +510,11 @@
506 510
     </history-entry>
507 511
   </component>
508 512
   <component name="TimeTrackingManager">
509
-    <option name="totallyTimeSpent" value="18185000" />
513
+    <option name="totallyTimeSpent" value="40895000" />
510 514
   </component>
511 515
   <component name="ToolWindowManager">
512 516
     <frame x="0" y="23" width="1426" height="804" extended-state="0" />
517
+    <editor active="true" />
513 518
     <layout>
514 519
       <window_info anchor="right" id="Palette" order="3" />
515 520
       <window_info anchor="bottom" id="Event Log" order="7" side_tool="true" />
@@ -531,51 +536,25 @@
531 536
       <window_info anchor="bottom" id="Version Control" order="7" show_stripe_button="false" />
532 537
       <window_info anchor="bottom" id="Run" order="2" weight="0.3493635" />
533 538
       <window_info anchor="bottom" id="Spring" order="9" weight="0.32956153" />
534
-      <window_info active="true" anchor="bottom" id="Terminal" order="7" visible="true" weight="0.27864215" />
535
-      <window_info content_ui="combo" id="Project" order="0" sideWeight="0.8254902" visible="true" weight="0.2550578" />
539
+      <window_info anchor="bottom" id="Terminal" order="7" visible="true" weight="0.27864215" />
540
+      <window_info active="true" content_ui="combo" id="Project" order="0" sideWeight="0.8254902" visible="true" weight="0.2550578" />
536 541
       <window_info anchor="right" id="Bean Validation" order="4" />
537 542
       <window_info id="Web" order="4" side_tool="true" />
538 543
       <window_info anchor="right" id="Theme Preview" order="3" />
539 544
       <window_info id="Favorites" order="2" side_tool="true" />
545
+      <window_info anchor="bottom" id="Inspection" order="5" weight="0.4" />
546
+      <window_info anchor="right" id="Commander" internal_type="SLIDING" order="0" type="SLIDING" weight="0.4" />
540 547
       <window_info anchor="bottom" id="Message" order="0" />
548
+      <window_info anchor="bottom" id="Cvs" order="4" weight="0.25" />
541 549
       <window_info id="Learn" order="5" />
542
-      <window_info anchor="bottom" id="Event Log" order="7" side_tool="true" />
543
-      <window_info active="true" content_ui="combo" id="Project" order="0" visible="true" weight="0.27705976" />
544
-      <window_info id="Favorites" order="2" side_tool="true" />
545
-      <window_info anchor="right" id="Ant Build" order="1" weight="0.25" />
546
-      <window_info anchor="bottom" id="Spring" order="9" />
547
-      <window_info anchor="bottom" id="Java Enterprise" order="8" />
548
-      <window_info id="Structure" order="1" side_tool="true" weight="0.25" />
549
-      <window_info anchor="bottom" id="Terminal" order="7" visible="true" weight="0.009917355" />
550
-      <window_info anchor="right" id="Palette&#9;" order="3" />
551
-      <window_info anchor="right" id="Maven Projects" order="3" weight="0.32956383" />
552
-      <window_info id="Web" order="4" side_tool="true" />
553
-      <window_info anchor="bottom" id="Database Changes" order="7" show_stripe_button="false" />
554
-      <window_info anchor="bottom" id="Debug" order="3" weight="0.4" />
555 550
       <window_info anchor="right" content_ui="combo" id="Hierarchy" order="2" weight="0.25" />
556
-      <window_info id="Image Layers" order="2" />
557
-      <window_info anchor="right" id="Bean Validation" order="4" />
558
-      <window_info anchor="right" id="Theme Preview" order="3" />
559
-      <window_info id="Capture Tool" order="2" />
560
-      <window_info anchor="bottom" id="Version Control" order="7" show_stripe_button="false" />
561
-      <window_info anchor="right" id="Capture Analysis" order="3" />
562
-      <window_info anchor="bottom" id="TODO" order="6" />
563
-      <window_info anchor="bottom" id="Inspection" order="5" weight="0.4" />
564
-      <window_info anchor="right" id="Database" order="3" />
565
-      <window_info anchor="bottom" id="Cvs" order="4" weight="0.25" />
566
-      <window_info id="UI Designer" order="2" />
567 551
       <window_info anchor="bottom" id="Find" order="1" weight="0.32954547" />
568
-      <window_info anchor="bottom" id="Run" order="2" weight="0.0" />
569
-      <window_info anchor="bottom" id="Messages" order="9" weight="0.3298969" />
570
-      <window_info anchor="right" id="Palette" order="3" />
571
-      <window_info anchor="right" id="Commander" internal_type="SLIDING" order="0" type="SLIDING" weight="0.4" />
572
-      <window_info id="Designer" order="2" />
573 552
     </layout>
574 553
     <layout-to-restore>
575 554
       <window_info anchor="right" id="Palette" order="3" />
576
-      <window_info anchor="bottom" id="Find" order="1" />
577 555
       <window_info anchor="right" content_ui="combo" id="Hierarchy" order="2" weight="0.25" />
578 556
       <window_info anchor="right" id="Capture Analysis" order="4" />
557
+      <window_info anchor="bottom" id="Database Changes" order="7" show_stripe_button="false" />
579 558
       <window_info anchor="bottom" id="Run" order="2" />
580 559
       <window_info anchor="right" id="Theme Preview" order="5" />
581 560
       <window_info active="true" content_ui="combo" id="Project" order="0" visible="true" weight="0.2358643" />
@@ -587,13 +566,13 @@
587 566
       <window_info id="Image Layers" order="2" />
588 567
       <window_info id="Designer" order="3" />
589 568
       <window_info id="UI Designer" order="4" />
590
-      <window_info anchor="bottom" id="Inspection" order="5" weight="0.4" />
569
+      <window_info anchor="bottom" id="Find" order="1" />
591 570
       <window_info anchor="right" id="Database" order="6" />
592 571
       <window_info anchor="right" id="Palette&#9;" order="7" />
593 572
       <window_info anchor="bottom" id="Terminal" order="8" sideWeight="0.49919224" weight="0.65384614" />
594 573
       <window_info anchor="bottom" id="Debug" order="3" weight="0.4" />
595
-      <window_info anchor="bottom" id="Database Changes" order="7" show_stripe_button="false" />
596
-      <window_info anchor="bottom" id="Cvs" order="4" weight="0.25" />
574
+      <window_info anchor="bottom" id="Inspection" order="5" weight="0.4" />
575
+      <window_info anchor="bottom" id="Version Control" order="10" />
597 576
       <window_info anchor="bottom" id="Event Log" order="9" sideWeight="0.50080776" side_tool="true" weight="0.30936456" />
598 577
       <window_info id="Capture Tool" order="5" />
599 578
       <window_info anchor="bottom" id="Message" order="0" />
@@ -614,28 +593,6 @@
614 593
     </breakpoint-manager>
615 594
   </component>
616 595
   <component name="editorHistoryManager">
617
-    <entry file="file://$PROJECT_DIR$/src/test/java/com/zipcoin/redCoin/block/test/BlockControllerTest.java" />
618
-    <entry file="file://$PROJECT_DIR$/.idea/workspace.xml">
619
-      <provider selected="true" editor-type-id="text-editor">
620
-        <state relative-caret-position="438">
621
-          <caret line="461" column="19" selection-start-line="461" selection-start-column="19" selection-end-line="461" selection-end-column="19" />
622
-        </state>
623
-      </provider>
624
-    </entry>
625
-    <entry file="file://$PROJECT_DIR$/pom.xml" />
626
-    <entry file="file://$PROJECT_DIR$/src/main/java/Main.java" />
627
-    <entry file="file://$PROJECT_DIR$/src/main/java/redCoin/Main.java" />
628
-    <entry file="file://$PROJECT_DIR$/src/test/java/redCoin/testMain.java" />
629
-    <entry file="file://$PROJECT_DIR$/pom.xml" />
630
-    <entry file="file://$PROJECT_DIR$/src/test/java/redCoin/minerTest.java" />
631
-    <entry file="file://$PROJECT_DIR$/.idea/workspace.xml">
632
-      <provider selected="true" editor-type-id="text-editor">
633
-        <state relative-caret-position="-4617">
634
-          <caret line="124" column="19" selection-start-line="124" selection-start-column="19" selection-end-line="124" selection-end-column="19" />
635
-        </state>
636
-      </provider>
637
-    </entry>
638
-    <entry file="file://$PROJECT_DIR$/.idea/ZipCoin-RED.iml" />
639 596
     <entry file="file://$PROJECT_DIR$/src/main/java/redCoin/Main.java" />
640 597
     <entry file="file://$PROJECT_DIR$/src/test/java/redCoin/testMain.java" />
641 598
     <entry file="file://$PROJECT_DIR$/src/main/java/redCoin/Main.java" />
@@ -669,104 +626,189 @@
669 626
       </provider>
670 627
     </entry>
671 628
     <entry file="file://$PROJECT_DIR$/ZipCoinRedJavaServer/src/main/java/com/zipcoin/model/Miner.java" />
672
-    <entry file="file://$PROJECT_DIR$/ZipCoinRedJavaServer/src/main/java/com/zipcoin/repository/BlockRepository.java">
629
+    <entry file="file://$PROJECT_DIR$/ZipCoinRedJavaServer/src/test/java/com/zipcoin/redCoin/chain/test/chainTest.java">
630
+      <provider selected="true" editor-type-id="text-editor">
631
+        <state relative-caret-position="90">
632
+          <caret line="6" column="22" selection-start-line="6" selection-start-column="22" selection-end-line="6" selection-end-column="22" />
633
+        </state>
634
+      </provider>
635
+    </entry>
636
+    <entry file="jar://$MAVEN_REPOSITORY$/org/springframework/boot/spring-boot/1.3.1.RELEASE/spring-boot-1.3.1.RELEASE.jar!/org/springframework/boot/SpringApplication.class">
637
+      <provider selected="true" editor-type-id="text-editor">
638
+        <state>
639
+          <caret line="692" selection-start-line="692" selection-end-line="692" />
640
+        </state>
641
+      </provider>
642
+    </entry>
643
+    <entry file="file://$PROJECT_DIR$/ZipCoinRedJavaServer/src/test/java/com/zipcoin/redCoin/block/test/BlockTest.java">
644
+      <provider selected="true" editor-type-id="text-editor">
645
+        <state relative-caret-position="308">
646
+          <caret line="32" column="5" selection-start-line="32" selection-start-column="5" selection-end-line="32" selection-end-column="5" />
647
+        </state>
648
+      </provider>
649
+    </entry>
650
+    <entry file="file://$PROJECT_DIR$/ZipCoinRedJavaServer/src/main/java/com/zipcoin/model/Chain.java">
673 651
       <provider selected="true" editor-type-id="text-editor">
674 652
         <state relative-caret-position="60">
675
-          <caret line="5" column="17" selection-start-line="5" selection-start-column="17" selection-end-line="5" selection-end-column="17" />
653
+          <caret line="4" column="13" selection-start-line="4" selection-start-column="13" selection-end-line="4" selection-end-column="13" />
676 654
         </state>
677 655
       </provider>
678 656
     </entry>
679
-    <entry file="file://$PROJECT_DIR$/ZipCoinRedJavaServer/src/main/java/com/zipcoin/config/PersistenceConfiguration.java">
657
+    <entry file="file://$PROJECT_DIR$/ZipCoinRedJavaServer/src/main/java/com/zipcoin/model/Block.java">
680 658
       <provider selected="true" editor-type-id="text-editor">
681
-        <state relative-caret-position="138">
682
-          <caret line="13" column="13" selection-start-line="13" selection-start-column="13" selection-end-line="13" selection-end-column="13" />
659
+        <state relative-caret-position="75">
660
+          <caret line="7" column="13" selection-start-line="7" selection-start-column="13" selection-end-line="7" selection-end-column="13" />
683 661
         </state>
684 662
       </provider>
685 663
     </entry>
686
-    <entry file="file://$PROJECT_DIR$/ZipCoinRedJavaServer/src/test/java/com/zipcoin/redCoin/chain/test/chainTest.java">
664
+    <entry file="file://$PROJECT_DIR$/ZipCoinRedJavaServer/src/main/java/com/zipcoin/controller/HomeController.java">
687 665
       <provider selected="true" editor-type-id="text-editor">
688
-        <state relative-caret-position="90">
689
-          <caret line="6" column="22" selection-start-line="6" selection-start-column="22" selection-end-line="6" selection-end-column="22" />
666
+        <state relative-caret-position="60">
667
+          <caret line="5" column="13" selection-start-line="5" selection-start-column="13" selection-end-line="5" selection-end-column="13" />
690 668
         </state>
691 669
       </provider>
692 670
     </entry>
693 671
     <entry file="file://$PROJECT_DIR$/ZipCoinRedJavaServer/src/main/java/com/zipcoin/controller/BlockController.java">
694 672
       <provider selected="true" editor-type-id="text-editor">
695
-        <state relative-caret-position="690">
673
+        <state relative-caret-position="412">
696 674
           <caret line="53" lean-forward="true" selection-start-line="53" selection-end-line="53" />
697 675
         </state>
698 676
       </provider>
699 677
     </entry>
678
+    <entry file="file://$PROJECT_DIR$/ZipCoinRedJavaServer/src/main/java/com/zipcoin/controller/TransactionController.java">
679
+      <provider selected="true" editor-type-id="text-editor">
680
+        <state relative-caret-position="105">
681
+          <caret line="12" column="13" selection-start-line="12" selection-start-column="13" selection-end-line="12" selection-end-column="13" />
682
+        </state>
683
+      </provider>
684
+    </entry>
685
+    <entry file="file://$PROJECT_DIR$/ZipCoinRedJavaServer/src/test/java/com/zipcoin/redCoin/miner/test/minerTest.java">
686
+      <provider selected="true" editor-type-id="text-editor">
687
+        <state relative-caret-position="60">
688
+          <caret line="7" column="13" selection-start-line="7" selection-start-column="13" selection-end-line="7" selection-end-column="13" />
689
+        </state>
690
+      </provider>
691
+    </entry>
692
+    <entry file="file://$PROJECT_DIR$/ZipCoinRedJavaServer/src/main/resources/db/migration/V3__create_wallet.sql" />
700 693
     <entry file="file://$PROJECT_DIR$/ZipCoinRedJavaServer/src/main/java/com/zipcoin/ZipCoinApp.java">
701 694
       <provider selected="true" editor-type-id="text-editor">
702
-        <state relative-caret-position="32">
695
+        <state relative-caret-position="120">
703 696
           <caret line="9" selection-start-line="9" selection-end-line="9" />
697
+          <folding>
698
+            <element signature="e#296#297#0" expanded="true" />
699
+          </folding>
704 700
         </state>
705 701
       </provider>
706 702
     </entry>
707
-    <entry file="jar://$MAVEN_REPOSITORY$/org/springframework/boot/spring-boot/1.3.1.RELEASE/spring-boot-1.3.1.RELEASE.jar!/org/springframework/boot/SpringApplication.class">
703
+    <entry file="file://$PROJECT_DIR$/ZipCoinRedJavaServer/src/main/resources/db/migration/V2__create_block.sql">
708 704
       <provider selected="true" editor-type-id="text-editor">
709
-        <state>
710
-          <caret line="692" selection-start-line="692" selection-end-line="692" />
705
+        <state relative-caret-position="210">
706
+          <caret line="14" column="5" selection-start-line="14" selection-start-column="5" selection-end-line="14" selection-end-column="5" />
711 707
         </state>
712 708
       </provider>
713 709
     </entry>
714
-    <entry file="file://$PROJECT_DIR$/ZipCoinRedJavaServer/pom.xml">
710
+    <entry file="file://$PROJECT_DIR$/ZipCoinRedJavaServer/src/test/java/com/zipcoin/redCoin/TransactionAndWallet/TransactionAndWalletTest.java">
715 711
       <provider selected="true" editor-type-id="text-editor">
716
-        <state relative-caret-position="-80">
717
-          <caret line="31" column="21" selection-start-line="31" selection-start-column="21" selection-end-line="31" selection-end-column="21" />
712
+        <state relative-caret-position="105">
713
+          <caret line="7" column="48" selection-start-line="7" selection-start-column="48" selection-end-line="7" selection-end-column="48" />
718 714
         </state>
719 715
       </provider>
720 716
     </entry>
721
-    <entry file="file://$PROJECT_DIR$/ZipCoinRedJavaServer/src/main/resources/application.properties">
717
+    <entry file="file://$PROJECT_DIR$/ZipCoinRedJavaServer/src/main/java/com/zipcoin/controller/WalletController.java">
722 718
       <provider selected="true" editor-type-id="text-editor">
723
-        <state relative-caret-position="375">
724
-          <caret line="25" column="49" selection-start-line="25" selection-start-column="49" selection-end-line="25" selection-end-column="49" />
719
+        <state relative-caret-position="270">
720
+          <caret line="27" column="95" selection-start-line="27" selection-start-column="95" selection-end-line="27" selection-end-column="95" />
725 721
         </state>
726 722
       </provider>
727 723
     </entry>
728
-    <entry file="file://$PROJECT_DIR$/ZipCoinRedJavaServer/src/main/java/com/zipcoin/model/Chain.java">
724
+    <entry file="file://$PROJECT_DIR$/ZipCoinRedJavaServer/src/main/java/com/zipcoin/utilities/StringUtil.java">
729 725
       <provider selected="true" editor-type-id="text-editor">
730
-        <state relative-caret-position="315">
731
-          <caret line="21" column="5" selection-start-line="21" selection-start-column="5" selection-end-line="21" selection-end-column="5" />
726
+        <state relative-caret-position="525">
727
+          <caret line="35" column="5" selection-start-line="35" selection-start-column="5" selection-end-line="35" selection-end-column="5" />
728
+          <folding>
729
+            <element signature="e#1170#1171#0" expanded="true" />
730
+            <element signature="e#1209#1210#0" expanded="true" />
731
+          </folding>
732 732
         </state>
733 733
       </provider>
734 734
     </entry>
735
-    <entry file="file://$PROJECT_DIR$/ZipCoinRedJavaServer/src/main/java/com/zipcoin/model/Wallet.java">
735
+    <entry file="file://$PROJECT_DIR$/ZipCoinRedJavaServer/src/main/java/com/zipcoin/utilities/Miner.java">
736 736
       <provider selected="true" editor-type-id="text-editor">
737 737
         <state relative-caret-position="225">
738 738
           <caret line="15" column="29" selection-start-line="15" selection-start-column="29" selection-end-line="15" selection-end-column="29" />
739 739
         </state>
740 740
       </provider>
741 741
     </entry>
742
-    <entry file="file://$PROJECT_DIR$/ZipCoinRedJavaServer/src/main/resources/db/migration/V2__create_block.sql">
743
-      <provider selected="true" editor-type-id="text-editor" />
742
+    <entry file="file://$PROJECT_DIR$/ZipCoinRedJavaServer/src/main/java/com/zipcoin/repository/WalletRepository.java">
743
+      <provider selected="true" editor-type-id="text-editor">
744
+        <state relative-caret-position="150">
745
+          <caret line="15" column="27" selection-start-line="15" selection-start-column="27" selection-end-line="15" selection-end-column="27" />
746
+        </state>
747
+      </provider>
744 748
     </entry>
745
-    <entry file="file://$PROJECT_DIR$/ZipCoinRedJavaServer/src/test/java/com/zipcoin/redCoin/block/test/BlockTest.java">
749
+    <entry file="file://$PROJECT_DIR$/ZipCoinRedJavaServer/src/main/java/com/zipcoin/repository/TransactionRepository.java">
746 750
       <provider selected="true" editor-type-id="text-editor">
747
-        <state relative-caret-position="308">
748
-          <caret line="32" column="5" selection-start-line="32" selection-start-column="5" selection-end-line="32" selection-end-column="5" />
751
+        <state relative-caret-position="60">
752
+          <caret line="9" column="17" selection-start-line="9" selection-start-column="17" selection-end-line="9" selection-end-column="17" />
749 753
         </state>
750 754
       </provider>
751 755
     </entry>
752
-    <entry file="file://$PROJECT_DIR$/ZipCoinRedJavaServer/src/main/java/com/zipcoin/model/Block.java">
756
+    <entry file="file://$PROJECT_DIR$/ZipCoinRedJavaServer/src/main/java/com/zipcoin/repository/BlockRepository.java">
753 757
       <provider selected="true" editor-type-id="text-editor">
754
-        <state relative-caret-position="75">
755
-          <caret line="7" column="13" selection-start-line="7" selection-start-column="13" selection-end-line="7" selection-end-column="13" />
758
+        <state relative-caret-position="60">
759
+          <caret line="5" column="17" selection-start-line="5" selection-start-column="17" selection-end-line="5" selection-end-column="17" />
756 760
         </state>
757 761
       </provider>
758 762
     </entry>
759 763
     <entry file="file://$PROJECT_DIR$/ZipCoinRedJavaServer/src/main/java/com/zipcoin/model/Transaction.java">
760 764
       <provider selected="true" editor-type-id="text-editor">
761
-        <state relative-caret-position="-38">
762
-          <caret line="13" selection-start-line="13" selection-end-line="13" />
765
+        <state relative-caret-position="232">
766
+          <caret line="34" column="27" selection-start-line="34" selection-start-column="27" selection-end-line="34" selection-end-column="27" />
763 767
         </state>
764 768
       </provider>
765 769
     </entry>
766
-    <entry file="file://$PROJECT_DIR$/ZipCoinRedJavaServer/src/test/java/com/zipcoin/redCoin/TransactionAndWallet/TransactionAndWalletTest.java">
770
+    <entry file="file://$PROJECT_DIR$/ZipCoinRedJavaServer/src/main/java/com/zipcoin/model/Wallet.java">
771
+      <provider selected="true" editor-type-id="text-editor">
772
+        <state relative-caret-position="285">
773
+          <caret line="19" column="29" selection-start-line="19" selection-start-column="29" selection-end-line="19" selection-end-column="29" />
774
+          <folding>
775
+            <element signature="imports" expanded="true" />
776
+            <element signature="e#432#433#0" expanded="true" />
777
+            <element signature="e#472#473#0" expanded="true" />
778
+            <element signature="e#504#505#0" expanded="true" />
779
+            <element signature="e#540#541#0" expanded="true" />
780
+            <element signature="e#572#573#0" expanded="true" />
781
+            <element signature="e#622#623#0" expanded="true" />
782
+            <element signature="e#664#665#0" expanded="true" />
783
+          </folding>
784
+        </state>
785
+      </provider>
786
+    </entry>
787
+    <entry file="file://$PROJECT_DIR$/ZipCoinRedJavaServer/src/main/java/com/zipcoin/config/PersistenceConfiguration.java">
767 788
       <provider selected="true" editor-type-id="text-editor">
768
-        <state relative-caret-position="91">
769
-          <caret line="15" lean-forward="true" selection-start-line="15" selection-end-line="15" />
789
+        <state relative-caret-position="270">
790
+          <caret line="18" column="23" selection-start-line="18" selection-start-column="23" selection-end-line="18" selection-end-column="23" />
791
+        </state>
792
+      </provider>
793
+    </entry>
794
+    <entry file="file://$PROJECT_DIR$/ZipCoinRedJavaServer/src/main/resources/application.properties">
795
+      <provider selected="true" editor-type-id="text-editor">
796
+        <state relative-caret-position="45">
797
+          <caret line="3" selection-start-line="3" selection-end-line="3" />
798
+        </state>
799
+      </provider>
800
+    </entry>
801
+    <entry file="file://$PROJECT_DIR$/ZipCoinRedJavaServer/pom.xml">
802
+      <provider selected="true" editor-type-id="text-editor">
803
+        <state relative-caret-position="-80">
804
+          <caret line="31" column="21" selection-start-line="31" selection-start-column="21" selection-end-line="31" selection-end-column="21" />
805
+        </state>
806
+      </provider>
807
+    </entry>
808
+    <entry file="file://$PROJECT_DIR$/ZipCoinRedJavaServer/src/main/java/com/zipcoin/config/WalletLoader.java">
809
+      <provider selected="true" editor-type-id="text-editor">
810
+        <state relative-caret-position="60">
811
+          <caret line="4" lean-forward="true" selection-start-line="4" selection-end-line="4" />
770 812
         </state>
771 813
       </provider>
772 814
     </entry>

+ 1
- 1
ZipCoinRedIonicClient/.sourcemaps/main.js.map
文件差異過大導致無法顯示
查看文件


+ 0
- 4
ZipCoinRedIonicClient/src/app/app.module.ts 查看文件

@@ -5,10 +5,6 @@ import { SplashScreen } from '@ionic-native/splash-screen';
5 5
 import { StatusBar } from '@ionic-native/status-bar';
6 6
 
7 7
 import { MyApp } from './app.component';
8
-<<<<<<< HEAD
9
-import { HomePage } from '../pages/block/home';
10
-=======
11
->>>>>>> 9579f2fb69cc4c14932e53a8eab0ee8b02e128e4
12 8
 import { HttpClientModule } from '@angular/common/http';
13 9
 import { BlockService } from '../providers/block-service';
14 10
 import { HomePage } from '../pages/home/home';

+ 1
- 1
ZipCoinRedIonicClient/src/pages/tabs/tabs.ts 查看文件

@@ -1,6 +1,6 @@
1 1
 import { Component } from '@angular/core';
2 2
 import { IonicPage, NavController, NavParams } from 'ionic-angular';
3
-import { HomePage } from '../block/home';
3
+import { HomePage } from '../home/home';
4 4
 import { WalletPage } from '../wallet/wallet';
5 5
 import { TransactionPage } from '../transaction/transaction';
6 6
 import { Tab4Page } from '../tab4/tab4';

+ 43
- 0
ZipCoinRedIonicClient/src/pages/wallet/wallet.html 查看文件

@@ -15,4 +15,47 @@
15 15
 
16 16
 <ion-content padding>
17 17
 
18
+
19
+  
20
+  <ion-item>
21
+      <ion-label>Name</ion-label>
22
+      <ion-select [(ngModel)]="name">
23
+        <ion-option value="navya">navya</ion-option>
24
+        <ion-option value="aleena">aleena</ion-option>
25
+      </ion-select>
26
+     </ion-item>
27
+     <ion-item>
28
+        <ion-label>current balance</ion-label>
29
+        <ion-input></ion-input>
30
+      </ion-item>
31
+      <ion-item>
32
+          <ion-label>Public Key</ion-label>
33
+          <ion-input></ion-input>
34
+        </ion-item>
35
+      <br>
36
+      <br>
37
+      <div class = "bar bar-subheader bar-assertive">
38
+          <h2 class = "title">Payment</h2>
39
+       </div>
40
+       <ion-item>
41
+          <ion-label>From</ion-label>
42
+          <ion-select [(ngModel)]="name">
43
+            <ion-option value="navya">navya</ion-option>
44
+            <ion-option value="aleena">aleena</ion-option>
45
+          </ion-select>
46
+         </ion-item>
47
+         <ion-item>
48
+            <ion-label>To</ion-label>
49
+            <ion-select [(ngModel)]="to">
50
+              <ion-option value="navya">navya</ion-option>
51
+              <ion-option value="aleena">aleena</ion-option>
52
+            </ion-select>
53
+           </ion-item>
54
+      
55
+          <ion-item>
56
+              <ion-label>Amount</ion-label>
57
+              <ion-input></ion-input>
58
+            </ion-item>
59
+            <br>
60
+            <button ion-button>Pay</button>
18 61
 </ion-content>

+ 9
- 59
ZipCoinRedIonicClient/www/build/.ion-diagnostic-typescript.html 查看文件

@@ -1,73 +1,23 @@
1 1
 <div class="ion-diagnostic">
2
-<div class="ion-diagnostic-masthead" title="typescript error: 1185">
2
+<div class="ion-diagnostic-masthead" title="typescript error: 2307">
3 3
 <div class="ion-diagnostic-title">Typescript Error</div>
4
-<div class="ion-diagnostic-message" data-error-code="typescript-1185">Merge conflict marker encountered.</div>
4
+<div class="ion-diagnostic-message" data-error-code="typescript-2307">Cannot find module &#039;../block/home&#039;.</div>
5 5
 </div>
6 6
 <div class="ion-diagnostic-file">
7
-<div class="ion-diagnostic-file-header" title="/Users/navyas/Labs6/ZipCoin-RED/ZipCoinRedIonicClient/src/app/app.module.ts">src/app/app.module.ts</div>
7
+<div class="ion-diagnostic-file-header" title="/Users/navyas/Labs6/ZipCoin-RED/ZipCoinRedIonicClient/src/pages/tabs/tabs.ts">src/pages/tabs/tabs.ts</div>
8 8
 <div class="ion-diagnostic-blob">
9 9
 <table class="ion-diagnostic-table">
10 10
 <tr>
11
-<td class="ion-diagnostic-blob-num" data-line-number="7"></td>
12
-<td class="ion-diagnostic-blob-code"><span class="hljs-keyword">import</span> { MyApp } from <span class="hljs-string">'./app.component'</span>;</td>
11
+<td class="ion-diagnostic-blob-num" data-line-number="2"></td>
12
+<td class="ion-diagnostic-blob-code"><span class="hljs-keyword">import</span> { NavController, NavParams } from <span class="hljs-string">'ionic-angular'</span>;</td>
13 13
 </tr>
14 14
 <tr class="ion-diagnostic-error-line">
15
-<td class="ion-diagnostic-blob-num" data-line-number="8"></td>
16
-<td class="ion-diagnostic-blob-code"><span class="ion-diagnostics-error-chr">&lt;</span><span class="ion-diagnostics-error-chr">&lt;</span><span class="ion-diagnostics-error-chr">&lt;</span><span class="ion-diagnostics-error-chr">&lt;</span><span class="ion-diagnostics-error-chr">&lt;</span><span class="ion-diagnostics-error-chr">&lt;</span><span class="ion-diagnostics-error-chr">&lt;</span> HEAD</td>
15
+<td class="ion-diagnostic-blob-num" data-line-number="3"></td>
16
+<td class="ion-diagnostic-blob-code"><span class="hljs-keyword">import</span> { HomePage } from <span class="hljs-string"><span class="ion-diagnostics-error-chr">'</span><span class="ion-diagnostics-error-chr">.</span><span class="ion-diagnostics-error-chr">.</span><span class="ion-diagnostics-error-chr">/</span><span class="ion-diagnostics-error-chr">b</span><span class="ion-diagnostics-error-chr">l</span><span class="ion-diagnostics-error-chr">o</span><span class="ion-diagnostics-error-chr">c</span><span class="ion-diagnostics-error-chr">k</span><span class="ion-diagnostics-error-chr">/</span><span class="ion-diagnostics-error-chr">h</span><span class="ion-diagnostics-error-chr">o</span><span class="ion-diagnostics-error-chr">m</span><span class="ion-diagnostics-error-chr">e</span><span class="ion-diagnostics-error-chr">'</span></span>;</td>
17 17
 </tr>
18 18
 <tr>
19
-<td class="ion-diagnostic-blob-num" data-line-number="9"></td>
20
-<td class="ion-diagnostic-blob-code"><span class="hljs-keyword">import</span> { HomePage } from <span class="hljs-string">'../pages/block/home'</span>;</td>
21
-</tr>
22
-</table>
23
-</div>
24
-</div>
25
-</div>
26
-<div class="ion-diagnostic">
27
-<div class="ion-diagnostic-masthead" title="typescript error: 1185">
28
-<div class="ion-diagnostic-title">Typescript Error</div>
29
-<div class="ion-diagnostic-message" data-error-code="typescript-1185">Merge conflict marker encountered.</div>
30
-</div>
31
-<div class="ion-diagnostic-file">
32
-<div class="ion-diagnostic-file-header" title="/Users/navyas/Labs6/ZipCoin-RED/ZipCoinRedIonicClient/src/app/app.module.ts">src/app/app.module.ts</div>
33
-<div class="ion-diagnostic-blob">
34
-<table class="ion-diagnostic-table">
35
-<tr>
36
-<td class="ion-diagnostic-blob-num" data-line-number="9"></td>
37
-<td class="ion-diagnostic-blob-code"><span class="hljs-keyword">import</span> { HomePage } from <span class="hljs-string">'../pages/block/home'</span>;</td>
38
-</tr>
39
-<tr class="ion-diagnostic-error-line">
40
-<td class="ion-diagnostic-blob-num" data-line-number="10"></td>
41
-<td class="ion-diagnostic-blob-code"><span class="ion-diagnostics-error-chr">=</span><span class="ion-diagnostics-error-chr">=</span><span class="ion-diagnostics-error-chr">=</span><span class="ion-diagnostics-error-chr">=</span><span class="ion-diagnostics-error-chr">=</span><span class="ion-diagnostics-error-chr">=</span><span class="ion-diagnostics-error-chr">=</span></td>
42
-</tr>
43
-<tr>
44
-<td class="ion-diagnostic-blob-num" data-line-number="11"></td>
45
-<td class="ion-diagnostic-blob-code">&gt;&gt;&gt;&gt;&gt;&gt;&gt; <span class="hljs-number">9579</span>f2fb69cc4c14932e53a8eab0ee8b02e128e4</td>
46
-</tr>
47
-</table>
48
-</div>
49
-</div>
50
-</div>
51
-<div class="ion-diagnostic">
52
-<div class="ion-diagnostic-masthead" title="typescript error: 1185">
53
-<div class="ion-diagnostic-title">Typescript Error</div>
54
-<div class="ion-diagnostic-message" data-error-code="typescript-1185">Merge conflict marker encountered.</div>
55
-</div>
56
-<div class="ion-diagnostic-file">
57
-<div class="ion-diagnostic-file-header" title="/Users/navyas/Labs6/ZipCoin-RED/ZipCoinRedIonicClient/src/app/app.module.ts">src/app/app.module.ts</div>
58
-<div class="ion-diagnostic-blob">
59
-<table class="ion-diagnostic-table">
60
-<tr>
61
-<td class="ion-diagnostic-blob-num" data-line-number="10"></td>
62
-<td class="ion-diagnostic-blob-code">=======</td>
63
-</tr>
64
-<tr class="ion-diagnostic-error-line">
65
-<td class="ion-diagnostic-blob-num" data-line-number="11"></td>
66
-<td class="ion-diagnostic-blob-code"><span class="ion-diagnostics-error-chr">&gt;</span><span class="ion-diagnostics-error-chr">&gt;</span><span class="ion-diagnostics-error-chr">&gt;</span><span class="ion-diagnostics-error-chr">&gt;</span><span class="ion-diagnostics-error-chr">&gt;</span><span class="ion-diagnostics-error-chr">&gt;</span><span class="ion-diagnostics-error-chr">&gt;</span> <span class="hljs-number">9579</span>f2fb69cc4c14932e53a8eab0ee8b02e128e4</td>
67
-</tr>
68
-<tr>
69
-<td class="ion-diagnostic-blob-num" data-line-number="12"></td>
70
-<td class="ion-diagnostic-blob-code"><span class="hljs-keyword">import</span> { HttpClientModule } from <span class="hljs-string">'@angular/common/http'</span>;</td>
19
+<td class="ion-diagnostic-blob-num" data-line-number="4"></td>
20
+<td class="ion-diagnostic-blob-code"><span class="hljs-keyword">import</span> { WalletPage } from <span class="hljs-string">'../wallet/wallet'</span>;</td>
71 21
 </tr>
72 22
 </table>
73 23
 </div>

+ 73
- 75
ZipCoinRedIonicClient/www/build/main.js 查看文件

@@ -4,9 +4,12 @@ webpackJsonp([4],{
4 4
 /***/ (function(module, __webpack_exports__, __webpack_require__) {
5 5
 
6 6
 "use strict";
7
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return WalletPage; });
7
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return TabsPage; });
8 8
 /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__(0);
9
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_ionic_angular__ = __webpack_require__(28);
9
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__home_home__ = __webpack_require__(157);
10
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__wallet_wallet__ = __webpack_require__(101);
11
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__transaction_transaction__ = __webpack_require__(102);
12
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__tab4_tab4__ = __webpack_require__(99);
10 13
 var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
11 14
     var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
12 15
     if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
@@ -18,30 +21,26 @@ var __metadata = (this && this.__metadata) || function (k, v) {
18 21
 };
19 22
 
20 23
 
21
-/**
22
- * Generated class for the WalletPage page.
23
- *
24
- * See https://ionicframework.com/docs/components/#navigation for more info on
25
- * Ionic pages and navigation.
26
- */
27
-var WalletPage = /** @class */ (function () {
28
-    function WalletPage(navCtrl, navParams) {
29
-        this.navCtrl = navCtrl;
30
-        this.navParams = navParams;
24
+
25
+
26
+
27
+var TabsPage = /** @class */ (function () {
28
+    function TabsPage() {
29
+        this.homePage = __WEBPACK_IMPORTED_MODULE_1__home_home__["a" /* HomePage */];
30
+        this.walletPage = __WEBPACK_IMPORTED_MODULE_2__wallet_wallet__["a" /* WalletPage */];
31
+        this.transactionPage = __WEBPACK_IMPORTED_MODULE_3__transaction_transaction__["a" /* TransactionPage */];
32
+        this.tab4 = __WEBPACK_IMPORTED_MODULE_4__tab4_tab4__["a" /* Tab4Page */];
31 33
     }
32
-    WalletPage.prototype.ionViewDidLoad = function () {
33
-        console.log('ionViewDidLoad WalletPage');
34
-    };
35
-    WalletPage = __decorate([
34
+    TabsPage = __decorate([
36 35
         Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["m" /* Component */])({
37
-            selector: 'page-wallet',template:/*ion-inline-start:"/Users/navyas/Labs6/ZipCoin-RED/ZipCoinRedIonicClient/src/pages/wallet/wallet.html"*/'<!--\n  Generated template for the WalletPage page.\n\n  See http://ionicframework.com/docs/components/#navigation for more info on\n  Ionic pages and navigation.\n-->\n<ion-header>\n\n  <ion-navbar>\n    <ion-title>Wallet</ion-title>\n  </ion-navbar>\n\n</ion-header>\n\n\n<ion-content padding>\n\n</ion-content>\n'/*ion-inline-end:"/Users/navyas/Labs6/ZipCoin-RED/ZipCoinRedIonicClient/src/pages/wallet/wallet.html"*/,
36
+            selector: 'page-tabs',template:/*ion-inline-start:"/Users/navyas/Labs6/ZipCoin-RED/ZipCoinRedIonicClient/src/pages/tabs/tabs.html"*/'<ion-tabs>\n  <ion-tab [root]="homePage" tabTitle="ZipCoin-BlockChain" tabIcon="link"></ion-tab>\n  <ion-tab [root]="walletPage" tabTitle="ZipCoin Wallet" tabIcon="cash"></ion-tab>\n  <ion-tab [root]="transactionPage" tabTitle="ZipCoin Transactions" tabIcon="contacts"></ion-tab>\n  <ion-tab [root]="tab4" tabTitle="Ziptab" tabIcon="star"></ion-tab>\n\n</ion-tabs>'/*ion-inline-end:"/Users/navyas/Labs6/ZipCoin-RED/ZipCoinRedIonicClient/src/pages/tabs/tabs.html"*/,
38 37
         }),
39
-        __metadata("design:paramtypes", [__WEBPACK_IMPORTED_MODULE_1_ionic_angular__["e" /* NavController */], __WEBPACK_IMPORTED_MODULE_1_ionic_angular__["f" /* NavParams */]])
40
-    ], WalletPage);
41
-    return WalletPage;
38
+        __metadata("design:paramtypes", [])
39
+    ], TabsPage);
40
+    return TabsPage;
42 41
 }());
43 42
 
44
-//# sourceMappingURL=wallet.js.map
43
+//# sourceMappingURL=tabs.js.map
45 44
 
46 45
 /***/ }),
47 46
 
@@ -49,7 +48,7 @@ var WalletPage = /** @class */ (function () {
49 48
 /***/ (function(module, __webpack_exports__, __webpack_require__) {
50 49
 
51 50
 "use strict";
52
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return TransactionPage; });
51
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return WalletPage; });
53 52
 /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__(0);
54 53
 /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_ionic_angular__ = __webpack_require__(28);
55 54
 var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
@@ -64,29 +63,29 @@ var __metadata = (this && this.__metadata) || function (k, v) {
64 63
 
65 64
 
66 65
 /**
67
- * Generated class for the TransactionPage page.
66
+ * Generated class for the WalletPage page.
68 67
  *
69 68
  * See https://ionicframework.com/docs/components/#navigation for more info on
70 69
  * Ionic pages and navigation.
71 70
  */
72
-var TransactionPage = /** @class */ (function () {
73
-    function TransactionPage(navCtrl, navParams) {
71
+var WalletPage = /** @class */ (function () {
72
+    function WalletPage(navCtrl, navParams) {
74 73
         this.navCtrl = navCtrl;
75 74
         this.navParams = navParams;
76 75
     }
77
-    TransactionPage.prototype.ionViewDidLoad = function () {
78
-        console.log('ionViewDidLoad TransactionPage');
76
+    WalletPage.prototype.ionViewDidLoad = function () {
77
+        console.log('ionViewDidLoad WalletPage');
79 78
     };
80
-    TransactionPage = __decorate([
79
+    WalletPage = __decorate([
81 80
         Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["m" /* Component */])({
82
-            selector: 'page-transaction',template:/*ion-inline-start:"/Users/navyas/Labs6/ZipCoin-RED/ZipCoinRedIonicClient/src/pages/transaction/transaction.html"*/'<!--\n  Generated template for the TransactionPage page.\n\n  See http://ionicframework.com/docs/components/#navigation for more info on\n  Ionic pages and navigation.\n-->\n<ion-header>\n\n  <ion-navbar>\n    <ion-title>Transaction</ion-title>\n  </ion-navbar>\n\n</ion-header>\n\n\n<ion-content padding>\n\n</ion-content>\n'/*ion-inline-end:"/Users/navyas/Labs6/ZipCoin-RED/ZipCoinRedIonicClient/src/pages/transaction/transaction.html"*/,
81
+            selector: 'page-wallet',template:/*ion-inline-start:"/Users/navyas/Labs6/ZipCoin-RED/ZipCoinRedIonicClient/src/pages/wallet/wallet.html"*/'<!--\n  Generated template for the WalletPage page.\n\n  See http://ionicframework.com/docs/components/#navigation for more info on\n  Ionic pages and navigation.\n-->\n<ion-header>\n\n  <ion-navbar>\n    <ion-title>Wallet</ion-title>\n  </ion-navbar>\n\n</ion-header>\n\n\n<ion-content padding>\n\n\n  \n  <ion-item>\n      <ion-label>Name</ion-label>\n      <ion-select [(ngModel)]="name">\n        <ion-option value="navya">navya</ion-option>\n        <ion-option value="aleena">aleena</ion-option>\n      </ion-select>\n     </ion-item>\n     <ion-item>\n        <ion-label>current balance</ion-label>\n        <ion-input></ion-input>\n      </ion-item>\n      <ion-item>\n          <ion-label>Public Key</ion-label>\n          <ion-input></ion-input>\n        </ion-item>\n      <br>\n      <br>\n      <div class = "bar bar-subheader bar-assertive">\n          <h2 class = "title">Payment</h2>\n       </div>\n       <ion-item>\n          <ion-label>From</ion-label>\n          <ion-select [(ngModel)]="name">\n            <ion-option value="navya">navya</ion-option>\n            <ion-option value="aleena">aleena</ion-option>\n          </ion-select>\n         </ion-item>\n         <ion-item>\n            <ion-label>To</ion-label>\n            <ion-select [(ngModel)]="to">\n              <ion-option value="navya">navya</ion-option>\n              <ion-option value="aleena">aleena</ion-option>\n            </ion-select>\n           </ion-item>\n      \n          <ion-item>\n              <ion-label>Amount</ion-label>\n              <ion-input></ion-input>\n            </ion-item>\n            <br>\n            <button ion-button>Pay</button>\n</ion-content>\n'/*ion-inline-end:"/Users/navyas/Labs6/ZipCoin-RED/ZipCoinRedIonicClient/src/pages/wallet/wallet.html"*/,
83 82
         }),
84 83
         __metadata("design:paramtypes", [__WEBPACK_IMPORTED_MODULE_1_ionic_angular__["e" /* NavController */], __WEBPACK_IMPORTED_MODULE_1_ionic_angular__["f" /* NavParams */]])
85
-    ], TransactionPage);
86
-    return TransactionPage;
84
+    ], WalletPage);
85
+    return WalletPage;
87 86
 }());
88 87
 
89
-//# sourceMappingURL=transaction.js.map
88
+//# sourceMappingURL=wallet.js.map
90 89
 
91 90
 /***/ }),
92 91
 
@@ -94,7 +93,7 @@ var TransactionPage = /** @class */ (function () {
94 93
 /***/ (function(module, __webpack_exports__, __webpack_require__) {
95 94
 
96 95
 "use strict";
97
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Tab4Page; });
96
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return TransactionPage; });
98 97
 /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__(0);
99 98
 /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_ionic_angular__ = __webpack_require__(28);
100 99
 var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
@@ -109,29 +108,29 @@ var __metadata = (this && this.__metadata) || function (k, v) {
109 108
 
110 109
 
111 110
 /**
112
- * Generated class for the Tab4Page page.
111
+ * Generated class for the TransactionPage page.
113 112
  *
114 113
  * See https://ionicframework.com/docs/components/#navigation for more info on
115 114
  * Ionic pages and navigation.
116 115
  */
117
-var Tab4Page = /** @class */ (function () {
118
-    function Tab4Page(navCtrl, navParams) {
116
+var TransactionPage = /** @class */ (function () {
117
+    function TransactionPage(navCtrl, navParams) {
119 118
         this.navCtrl = navCtrl;
120 119
         this.navParams = navParams;
121 120
     }
122
-    Tab4Page.prototype.ionViewDidLoad = function () {
123
-        console.log('ionViewDidLoad Tab4Page');
121
+    TransactionPage.prototype.ionViewDidLoad = function () {
122
+        console.log('ionViewDidLoad TransactionPage');
124 123
     };
125
-    Tab4Page = __decorate([
124
+    TransactionPage = __decorate([
126 125
         Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["m" /* Component */])({
127
-            selector: 'page-tab4',template:/*ion-inline-start:"/Users/navyas/Labs6/ZipCoin-RED/ZipCoinRedIonicClient/src/pages/tab4/tab4.html"*/'<!--\n  Generated template for the Tab4Page page.\n\n  See http://ionicframework.com/docs/components/#navigation for more info on\n  Ionic pages and navigation.\n-->\n<ion-header>\n\n  <ion-navbar>\n    <ion-title>tab4</ion-title>\n  </ion-navbar>\n\n</ion-header>\n\n\n<ion-content padding>\n\n</ion-content>\n'/*ion-inline-end:"/Users/navyas/Labs6/ZipCoin-RED/ZipCoinRedIonicClient/src/pages/tab4/tab4.html"*/,
126
+            selector: 'page-transaction',template:/*ion-inline-start:"/Users/navyas/Labs6/ZipCoin-RED/ZipCoinRedIonicClient/src/pages/transaction/transaction.html"*/'<!--\n  Generated template for the TransactionPage page.\n\n  See http://ionicframework.com/docs/components/#navigation for more info on\n  Ionic pages and navigation.\n-->\n<ion-header>\n\n  <ion-navbar>\n    <ion-title>Transaction</ion-title>\n  </ion-navbar>\n\n</ion-header>\n\n\n<ion-content padding>\n\n</ion-content>\n'/*ion-inline-end:"/Users/navyas/Labs6/ZipCoin-RED/ZipCoinRedIonicClient/src/pages/transaction/transaction.html"*/,
128 127
         }),
129 128
         __metadata("design:paramtypes", [__WEBPACK_IMPORTED_MODULE_1_ionic_angular__["e" /* NavController */], __WEBPACK_IMPORTED_MODULE_1_ionic_angular__["f" /* NavParams */]])
130
-    ], Tab4Page);
131
-    return Tab4Page;
129
+    ], TransactionPage);
130
+    return TransactionPage;
132 131
 }());
133 132
 
134
-//# sourceMappingURL=tab4.js.map
133
+//# sourceMappingURL=transaction.js.map
135 134
 
136 135
 /***/ }),
137 136
 
@@ -157,11 +156,11 @@ webpackEmptyAsyncContext.id = 114;
157 156
 
158 157
 var map = {
159 158
 	"../pages/tab4/tab4.module": [
160
-		280,
159
+		279,
161 160
 		3
162 161
 	],
163 162
 	"../pages/tabs/tabs.module": [
164
-		279,
163
+		280,
165 164
 		2
166 165
 	],
167 166
 	"../pages/transaction/transaction.module": [
@@ -238,10 +237,9 @@ var HomePage = /** @class */ (function () {
238 237
         Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["m" /* Component */])({
239 238
             selector: 'page-home',template:/*ion-inline-start:"/Users/navyas/Labs6/ZipCoin-RED/ZipCoinRedIonicClient/src/pages/home/home.html"*/'<ion-header>\n  <ion-navbar>\n    <ion-title>\n      ZipCoin BlockChain\n    </ion-title>\n  </ion-navbar>\n</ion-header>\n\n<ion-content padding>\n\n  <ion-list>\n    <ion-item-sliding *ngFor="let block of blocks">\n      <ion-item>\n        <ion-card>\n            <ion-card-header>\n              Block #: {{block.blockNumber}}\n            </ion-card-header>\n            <ion-card-content>\n              <div>Nonce: {{ block.nonce }}</div>\n              <div>Data: {{ block.transactionList }}</div>\n              <div>Previous Hash: {{ block.previousHash }}</div>\n              <div>Current Hash: {{ block.currentHash }}</div>\n              <button ion-button (click)="getMinedBlock(block.id)">Mine</button>\n            </ion-card-content>\n        </ion-card>\n      </ion-item>\n    </ion-item-sliding>\n  </ion-list>\n\n</ion-content>'/*ion-inline-end:"/Users/navyas/Labs6/ZipCoin-RED/ZipCoinRedIonicClient/src/pages/home/home.html"*/
240 239
         }),
241
-        __metadata("design:paramtypes", [typeof (_a = typeof __WEBPACK_IMPORTED_MODULE_1_ionic_angular__["e" /* NavController */] !== "undefined" && __WEBPACK_IMPORTED_MODULE_1_ionic_angular__["e" /* NavController */]) === "function" && _a || Object, typeof (_b = typeof __WEBPACK_IMPORTED_MODULE_2__providers_block_service__["a" /* BlockService */] !== "undefined" && __WEBPACK_IMPORTED_MODULE_2__providers_block_service__["a" /* BlockService */]) === "function" && _b || Object])
240
+        __metadata("design:paramtypes", [__WEBPACK_IMPORTED_MODULE_1_ionic_angular__["e" /* NavController */], __WEBPACK_IMPORTED_MODULE_2__providers_block_service__["a" /* BlockService */]])
242 241
     ], HomePage);
243 242
     return HomePage;
244
-    var _a, _b;
245 243
 }());
246 244
 
247 245
 //make payment
@@ -326,10 +324,10 @@ Object(__WEBPACK_IMPORTED_MODULE_0__angular_platform_browser_dynamic__["a" /* pl
326 324
 /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__angular_common_http__ = __webpack_require__(159);
327 325
 /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__providers_block_service__ = __webpack_require__(158);
328 326
 /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__pages_home_home__ = __webpack_require__(157);
329
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__pages_wallet_wallet__ = __webpack_require__(100);
330
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__pages_transaction_transaction__ = __webpack_require__(101);
331
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__pages_tabs_tabs__ = __webpack_require__(99);
332
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__pages_tab4_tab4__ = __webpack_require__(102);
327
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__pages_wallet_wallet__ = __webpack_require__(101);
328
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__pages_transaction_transaction__ = __webpack_require__(102);
329
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__pages_tabs_tabs__ = __webpack_require__(100);
330
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__pages_tab4_tab4__ = __webpack_require__(99);
333 331
 var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
334 332
     var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
335 333
     if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
@@ -367,8 +365,8 @@ var AppModule = /** @class */ (function () {
367 365
                 __WEBPACK_IMPORTED_MODULE_6__angular_common_http__["b" /* HttpClientModule */],
368 366
                 __WEBPACK_IMPORTED_MODULE_2_ionic_angular__["c" /* IonicModule */].forRoot(__WEBPACK_IMPORTED_MODULE_5__app_component__["a" /* MyApp */], {}, {
369 367
                     links: [
370
-                        { loadChildren: '../pages/tabs/tabs.module#TabsPageModule', name: 'TabsPage', segment: 'tabs', priority: 'low', defaultHistory: [] },
371 368
                         { loadChildren: '../pages/tab4/tab4.module#Tab4PageModule', name: 'Tab4Page', segment: 'tab4', priority: 'low', defaultHistory: [] },
369
+                        { loadChildren: '../pages/tabs/tabs.module#TabsPageModule', name: 'TabsPage', segment: 'tabs', priority: 'low', defaultHistory: [] },
372 370
                         { loadChildren: '../pages/transaction/transaction.module#TransactionPageModule', name: 'TransactionPage', segment: 'transaction', priority: 'low', defaultHistory: [] },
373 371
                         { loadChildren: '../pages/wallet/wallet.module#WalletPageModule', name: 'WalletPage', segment: 'wallet', priority: 'low', defaultHistory: [] }
374 372
                     ]
@@ -407,7 +405,7 @@ var AppModule = /** @class */ (function () {
407 405
 /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_ionic_angular__ = __webpack_require__(28);
408 406
 /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__ionic_native_status_bar__ = __webpack_require__(202);
409 407
 /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__ionic_native_splash_screen__ = __webpack_require__(199);
410
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__pages_tabs_tabs__ = __webpack_require__(99);
408
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__pages_tabs_tabs__ = __webpack_require__(100);
411 409
 var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
412 410
     var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
413 411
     if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
@@ -435,10 +433,9 @@ var MyApp = /** @class */ (function () {
435 433
     MyApp = __decorate([
436 434
         Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["m" /* Component */])({template:/*ion-inline-start:"/Users/navyas/Labs6/ZipCoin-RED/ZipCoinRedIonicClient/src/app/app.html"*/'<ion-nav [root]="rootPage"></ion-nav>\n'/*ion-inline-end:"/Users/navyas/Labs6/ZipCoin-RED/ZipCoinRedIonicClient/src/app/app.html"*/
437 435
         }),
438
-        __metadata("design:paramtypes", [typeof (_a = typeof __WEBPACK_IMPORTED_MODULE_1_ionic_angular__["g" /* Platform */] !== "undefined" && __WEBPACK_IMPORTED_MODULE_1_ionic_angular__["g" /* Platform */]) === "function" && _a || Object, typeof (_b = typeof __WEBPACK_IMPORTED_MODULE_2__ionic_native_status_bar__["a" /* StatusBar */] !== "undefined" && __WEBPACK_IMPORTED_MODULE_2__ionic_native_status_bar__["a" /* StatusBar */]) === "function" && _b || Object, typeof (_c = typeof __WEBPACK_IMPORTED_MODULE_3__ionic_native_splash_screen__["a" /* SplashScreen */] !== "undefined" && __WEBPACK_IMPORTED_MODULE_3__ionic_native_splash_screen__["a" /* SplashScreen */]) === "function" && _c || Object])
436
+        __metadata("design:paramtypes", [__WEBPACK_IMPORTED_MODULE_1_ionic_angular__["g" /* Platform */], __WEBPACK_IMPORTED_MODULE_2__ionic_native_status_bar__["a" /* StatusBar */], __WEBPACK_IMPORTED_MODULE_3__ionic_native_splash_screen__["a" /* SplashScreen */]])
439 437
     ], MyApp);
440 438
     return MyApp;
441
-    var _a, _b, _c;
442 439
 }());
443 440
 
444 441
 //# sourceMappingURL=app.component.js.map
@@ -449,12 +446,9 @@ var MyApp = /** @class */ (function () {
449 446
 /***/ (function(module, __webpack_exports__, __webpack_require__) {
450 447
 
451 448
 "use strict";
452
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return TabsPage; });
449
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Tab4Page; });
453 450
 /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__(0);
454
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__home_home__ = __webpack_require__(157);
455
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__wallet_wallet__ = __webpack_require__(100);
456
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__transaction_transaction__ = __webpack_require__(101);
457
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__tab4_tab4__ = __webpack_require__(102);
451
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_ionic_angular__ = __webpack_require__(28);
458 452
 var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
459 453
     var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
460 454
     if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
@@ -466,26 +460,30 @@ var __metadata = (this && this.__metadata) || function (k, v) {
466 460
 };
467 461
 
468 462
 
469
-
470
-
471
-
472
-var TabsPage = /** @class */ (function () {
473
-    function TabsPage() {
474
-        this.homePage = __WEBPACK_IMPORTED_MODULE_1__home_home__["a" /* HomePage */];
475
-        this.walletPage = __WEBPACK_IMPORTED_MODULE_2__wallet_wallet__["a" /* WalletPage */];
476
-        this.transactionPage = __WEBPACK_IMPORTED_MODULE_3__transaction_transaction__["a" /* TransactionPage */];
477
-        this.tab4 = __WEBPACK_IMPORTED_MODULE_4__tab4_tab4__["a" /* Tab4Page */];
463
+/**
464
+ * Generated class for the Tab4Page page.
465
+ *
466
+ * See https://ionicframework.com/docs/components/#navigation for more info on
467
+ * Ionic pages and navigation.
468
+ */
469
+var Tab4Page = /** @class */ (function () {
470
+    function Tab4Page(navCtrl, navParams) {
471
+        this.navCtrl = navCtrl;
472
+        this.navParams = navParams;
478 473
     }
479
-    TabsPage = __decorate([
474
+    Tab4Page.prototype.ionViewDidLoad = function () {
475
+        console.log('ionViewDidLoad Tab4Page');
476
+    };
477
+    Tab4Page = __decorate([
480 478
         Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["m" /* Component */])({
481
-            selector: 'page-tabs',template:/*ion-inline-start:"/Users/navyas/Labs6/ZipCoin-RED/ZipCoinRedIonicClient/src/pages/tabs/tabs.html"*/'<ion-tabs>\n  <ion-tab [root]="homePage" tabTitle="ZipCoin-BlockChain" tabIcon="link"></ion-tab>\n  <ion-tab [root]="walletPage" tabTitle="ZipCoin Wallet" tabIcon="cash"></ion-tab>\n  <ion-tab [root]="transactionPage" tabTitle="ZipCoin Transactions" tabIcon="contacts"></ion-tab>\n  <ion-tab [root]="tab4" tabTitle="Ziptab" tabIcon="star"></ion-tab>\n\n</ion-tabs>'/*ion-inline-end:"/Users/navyas/Labs6/ZipCoin-RED/ZipCoinRedIonicClient/src/pages/tabs/tabs.html"*/,
479
+            selector: 'page-tab4',template:/*ion-inline-start:"/Users/navyas/Labs6/ZipCoin-RED/ZipCoinRedIonicClient/src/pages/tab4/tab4.html"*/'<!--\n  Generated template for the Tab4Page page.\n\n  See http://ionicframework.com/docs/components/#navigation for more info on\n  Ionic pages and navigation.\n-->\n<ion-header>\n\n  <ion-navbar>\n    <ion-title>tab4</ion-title>\n  </ion-navbar>\n\n</ion-header>\n\n\n<ion-content padding>\n\n</ion-content>\n'/*ion-inline-end:"/Users/navyas/Labs6/ZipCoin-RED/ZipCoinRedIonicClient/src/pages/tab4/tab4.html"*/,
482 480
         }),
483
-        __metadata("design:paramtypes", [])
484
-    ], TabsPage);
485
-    return TabsPage;
481
+        __metadata("design:paramtypes", [__WEBPACK_IMPORTED_MODULE_1_ionic_angular__["e" /* NavController */], __WEBPACK_IMPORTED_MODULE_1_ionic_angular__["f" /* NavParams */]])
482
+    ], Tab4Page);
483
+    return Tab4Page;
486 484
 }());
487 485
 
488
-//# sourceMappingURL=tabs.js.map
486
+//# sourceMappingURL=tab4.js.map
489 487
 
490 488
 /***/ })
491 489
 

+ 1
- 1
ZipCoinRedIonicClient/www/build/main.js.map
文件差異過大導致無法顯示
查看文件


+ 1
- 1
ZipCoinRedIonicClient/www/build/vendor.js.map
文件差異過大導致無法顯示
查看文件


+ 1
- 2
ZipCoinRedJavaServer/ZipCoin-RED.iml 查看文件

@@ -81,8 +81,6 @@
81 81
     <orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.13" level="project" />
82 82
     <orderEntry type="library" name="Maven: org.slf4j:jcl-over-slf4j:1.7.13" level="project" />
83 83
     <orderEntry type="library" name="Maven: org.springframework:spring-aspects:4.2.4.RELEASE" level="project" />
84
-    <orderEntry type="library" name="Maven: com.h2database:h2:1.4.190" level="project" />
85
-    <orderEntry type="library" name="Maven: org.flywaydb:flyway-core:3.2.1" level="project" />
86 84
     <orderEntry type="library" scope="TEST" name="Maven: org.springframework.boot:spring-boot-starter-test:1.3.1.RELEASE" level="project" />
87 85
     <orderEntry type="library" scope="TEST" name="Maven: org.mockito:mockito-core:1.10.19" level="project" />
88 86
     <orderEntry type="library" scope="TEST" name="Maven: org.objenesis:objenesis:2.1" level="project" />
@@ -92,5 +90,6 @@
92 90
     <orderEntry type="library" scope="TEST" name="Maven: org.springframework:spring-test:4.2.4.RELEASE" level="project" />
93 91
     <orderEntry type="library" name="Maven: commons-codec:commons-codec:1.10" level="project" />
94 92
     <orderEntry type="library" scope="TEST" name="Maven: junit:junit:4.12" level="project" />
93
+    <orderEntry type="library" scope="RUNTIME" name="Maven: mysql:mysql-connector-java:5.1.38" level="project" />
95 94
   </component>
96 95
 </module>

+ 7
- 8
ZipCoinRedJavaServer/pom.xml 查看文件

@@ -31,14 +31,6 @@
31 31
             <artifactId>spring-boot-starter-data-jpa</artifactId>
32 32
         </dependency>
33 33
         <dependency>
34
-            <groupId>com.h2database</groupId>
35
-            <artifactId>h2</artifactId>
36
-        </dependency>
37
-        <dependency>
38
-            <groupId>org.flywaydb</groupId>
39
-            <artifactId>flyway-core</artifactId>
40
-        </dependency>
41
-        <dependency>
42 34
             <groupId>org.springframework.boot</groupId>
43 35
             <artifactId>spring-boot-starter-test</artifactId>
44 36
             <scope>test</scope>
@@ -55,6 +47,13 @@
55 47
             <scope>test</scope>
56 48
         </dependency>
57 49
 
50
+        <dependency>
51
+            <groupId>mysql</groupId>
52
+            <artifactId>mysql-connector-java</artifactId>
53
+            <scope>runtime</scope>
54
+        </dependency>
55
+
56
+
58 57
     </dependencies>
59 58
 
60 59
 

+ 0
- 28
ZipCoinRedJavaServer/src/main/java/com/zipcoin/config/PersistenceConfiguration.java 查看文件

@@ -1,28 +0,0 @@
1
-package com.boot.config;
2
-
3
-import org.springframework.boot.autoconfigure.flyway.FlywayDataSource;
4
-import org.springframework.boot.autoconfigure.jdbc.DataSourceBuilder;
5
-import org.springframework.boot.context.properties.ConfigurationProperties;
6
-import org.springframework.context.annotation.Bean;
7
-import org.springframework.context.annotation.Configuration;
8
-import org.springframework.context.annotation.Primary;
9
-
10
-import javax.sql.DataSource;
11
-
12
-
13
-@Configuration
14
-public class PersistenceConfiguration {
15
-    @Bean
16
-    @ConfigurationProperties(prefix="spring.datasource")
17
-    @Primary
18
-    public DataSource dataSource(){
19
-        return DataSourceBuilder.create().build();
20
-    }
21
-
22
-    @Bean
23
-    @ConfigurationProperties(prefix="datasource.flyway")
24
-    @FlywayDataSource
25
-    public DataSource flywayDataSource() {
26
-        return DataSourceBuilder.create().build();
27
-    }
28
-}

+ 11
- 1
ZipCoinRedJavaServer/src/main/java/com/zipcoin/config/WalletLoader.java 查看文件

@@ -1,4 +1,14 @@
1 1
 package com.zipcoin.config;
2 2
 
3
-public class WalletLoader {
3
+import org.springframework.boot.ApplicationArguments;
4
+import org.springframework.boot.ApplicationRunner;
5
+import org.springframework.stereotype.Component;
6
+
7
+@Component
8
+public class WalletLoader implements ApplicationRunner {
9
+
10
+    @Override
11
+    public void run(ApplicationArguments applicationArguments) throws Exception {
12
+
13
+    }
4 14
 }

+ 8
- 1
ZipCoinRedJavaServer/src/main/java/com/zipcoin/controller/WalletController.java 查看文件

@@ -3,6 +3,8 @@ package com.zipcoin.controller;
3 3
 import com.zipcoin.model.Wallet;
4 4
 import com.zipcoin.repository.WalletRepository;
5 5
 import org.springframework.beans.factory.annotation.Autowired;
6
+import org.springframework.http.HttpStatus;
7
+import org.springframework.http.ResponseEntity;
6 8
 import org.springframework.web.bind.annotation.*;
7 9
 
8 10
 import java.util.List;
@@ -18,7 +20,12 @@ public class WalletController {
18 20
     //CREATE A WALLET
19 21
     @RequestMapping(value = "wallets", method = RequestMethod.POST)
20 22
     public Wallet create(@RequestBody Wallet wallet){
21
-        return walletRepository.saveAndFlush(wallet);
23
+        return walletRepository.save(wallet);
24
+    }
25
+
26
+    @RequestMapping(value = "wallets", method = RequestMethod.GET)
27
+    public ResponseEntity<Iterable<Wallet>> index() {
28
+        return new ResponseEntity<Iterable<Wallet>>(walletRepository.findAll(), HttpStatus.OK);
22 29
     }
23 30
 
24 31
 //    //READ A WALLET FROM PUBLIC KEY

+ 32
- 28
ZipCoinRedJavaServer/src/main/java/com/zipcoin/model/Transaction.java 查看文件

@@ -3,21 +3,38 @@ package com.zipcoin.model;
3 3
 import com.zipcoin.utilities.StringUtil;
4 4
 import org.apache.commons.codec.digest.DigestUtils;
5 5
 
6
-import javax.persistence.Entity;
7
-import javax.persistence.GeneratedValue;
8
-import javax.persistence.GenerationType;
9
-import javax.persistence.Id;
6
+import javax.persistence.*;
7
+
10 8
 import java.security.*;
9
+import java.util.List;
11 10
 
12 11
 @Entity
13 12
 public class Transaction {
14
-
15 13
     @Id
16
-    private String transactionId; // this is also the hash of the transaction.
17
-    private PublicKey sender; // senders address/public key.
18
-    private PublicKey reciepient; // Recipients address/public key.
19
-    private float value;
20
-//    public Signature signature;// this is to prevent anybody else from spending funds in our wallet.
14
+    @GeneratedValue(strategy = GenerationType.AUTO)
15
+    private String transactionId;
16
+    private PublicKey sender;
17
+    private PublicKey reciepient;
18
+    private float amount;
19
+
20
+    //@OneToMany
21
+  /*  private List<Integer> coins;*/
22
+
23
+
24
+
25
+    //public Signature signature;
26
+    public Transaction()
27
+    {
28
+
29
+    }
30
+
31
+    public Transaction(PublicKey from, PublicKey to, float amount/*List<Integer> coins*/) {
32
+        this.sender = from;
33
+        this.reciepient = to;
34
+        this.amount = amount;
35
+        //this.coins=coins;
36
+
37
+    }
21 38
 
22 39
     public String getTransactionId() {
23 40
         return transactionId;
@@ -43,33 +60,20 @@ public class Transaction {
43 60
         this.reciepient = reciepient;
44 61
     }
45 62
 
46
-    public float getValue() {
47
-        return value;
48
-    }
49
-
50
-    public void setValue(float value) {
51
-        this.value = value;
52
-    }
53
-
63
+    public float getAmount() { return amount; }
54 64
 
65
+    public void setAmount(float amount) { this.amount = amount; }
55 66
 
67
+    /*public List<Integer> getCoins() { return coins; }
56 68
 
69
+    public void setCoins(List<Integer> coins) { this.coins = coins; }*/
57 70
 
58
-    // Constructor:
59
-    public Transaction(PublicKey from, PublicKey to, float value) {
60
-        this.sender = from;
61
-        this.reciepient = to;
62
-        this.value = value;
63
-
64
-    }
65
-
66
-    // This Calculates the transaction hash (which will be used as its Id)
67 71
     private String calulateHash() {
68 72
 
69 73
         return DigestUtils.sha256Hex(
70 74
                 StringUtil.getStringFromKey(sender) +
71 75
                         StringUtil.getStringFromKey(reciepient) +
72
-                        Float.toString(value)
76
+                        Float.toString(amount)
73 77
         );
74 78
     }
75 79
 //    public void generateSignature(PrivateKey privateKey) throws NoSuchAlgorithmException, InvalidKeyException, NoSuchProviderException {

+ 56
- 20
ZipCoinRedJavaServer/src/main/java/com/zipcoin/model/Wallet.java 查看文件

@@ -1,51 +1,87 @@
1 1
 package com.zipcoin.model;
2 2
 
3
+import com.zipcoin.utilities.StringUtil;
4
+
3 5
 import javax.persistence.Entity;
4 6
 import javax.persistence.GeneratedValue;
5 7
 import javax.persistence.GenerationType;
6 8
 import javax.persistence.Id;
7 9
 import java.security.*;
10
+import java.util.Random;
8 11
 
9 12
 @Entity
10 13
 public class Wallet {
11 14
 
15
+
12 16
     @Id
13
-    private PublicKey publicKey;
14
-    private PrivateKey privateKey;
17
+    @GeneratedValue(strategy = GenerationType.AUTO)
18
+    private int id;
15 19
 
16
-    public PrivateKey getPrivateKey() {
17
-        return privateKey;
20
+    public String getName() {
21
+        return name;
18 22
     }
19 23
 
24
+    public void setName(String name) {
25
+        this.name = name;
26
+    }
20 27
 
21
-    public PublicKey getPublicKey() {
22
-        return publicKey;
28
+    public String getPublickey() {
29
+        return publickey;
23 30
     }
24 31
 
32
+    public void setPublickey(String publickey) {
33
+        this.publickey = publickey;
34
+    }
25 35
 
36
+    private String name;
37
+    private String publickey;
38
+    private Double amount;
26 39
 
27
-    public Wallet() {
40
+    public Wallet()
41
+    {
28 42
         generateKeyPair();
43
+
29 44
     }
30 45
 
31
-    public void generateKeyPair() {
32
-        try {
33
-            KeyPairGenerator keyGen = KeyPairGenerator.getInstance( "DSA","SUN");
46
+    public Double getAmount()
47
+    {
48
+        return amount;
49
+    }
34 50
 
35
-            SecureRandom random = SecureRandom.getInstance("SHA1PRNG","SUN");
51
+    public void setAmount(Double amount)
52
+    {
53
+        this.amount = amount;
54
+    }
36 55
 
37
-            // Initialize the key generator and generate a KeyPair
38
-            keyGen.initialize(1024, random);   //256 bytes provides an acceptable security level
39
-            KeyPair keyPair = keyGen.generateKeyPair();
40
-            // Set the public and private keys from the keyPair
41
-            privateKey = keyPair.getPrivate();
42
-            publicKey = keyPair.getPublic();
43 56
 
57
+    public String getPublicKey()
58
+    {
59
+        return publickey;
60
+    }
44 61
 
45 62
 
46
-        } catch (Exception e) {
47
-            throw new RuntimeException(e);
48
-        }
63
+    public void generateKeyPair() {
64
+//        try {
65
+//
66
+//            KeyPairGenerator keyGen = KeyPairGenerator.getInstance( "DSA","SUN");
67
+//
68
+//            SecureRandom random = SecureRandom.getInstance("SHA1PRNG","SUN");
69
+//
70
+//            // Initialize the key generator and generate a KeyPair
71
+//            keyGen.initialize(1024, random);   //256 bytes provides an acceptable security level
72
+//            KeyPair keyPair = keyGen.generateKeyPair();
73
+//            // Set the public and private keys from the keyPair
74
+//            privateKey = keyPair.getPrivate();
75
+//            publicKey = keyPair.getPublic();
76
+//
77
+//
78
+//
79
+//        } catch (Exception e) {
80
+//            throw new RuntimeException(e);
81
+//        }
82
+        Random random =new SecureRandom();
83
+        Integer random10digit= random.nextInt(10);
84
+        publickey=random10digit.toString();
49 85
     }
50 86
 
51 87
 }

+ 3
- 26
ZipCoinRedJavaServer/src/main/resources/application.properties 查看文件

@@ -1,26 +1,3 @@
1
-logging.level.org.springframework.web=DEBUG
2
-
3
-server.port=8080
4
-
5
-spring.h2.console.enabled=true
6
-spring.h2.console.path=/h2
7
-
8
-spring.datasource.url=jdbc:h2:file:~/zipcoin
9
-spring.datasource.username=sa
10
-spring.datasource.password=
11
-spring.datasource.driver-class-name=org.h2.Driver
12
-
13
-spring.datasource.max-active=10
14
-spring.datasource.max-idle=8
15
-spring.datasource.max-wait=10000
16
-spring.datasource.min-evictable-idle-time-millis=1000
17
-spring.datasource.min-idle=8
18
-spring.datasource.time-between-eviction-runs-millis=1
19
-
20
-flyway.baseline-on-migrate=true
21
-spring.jpa.hibernate.ddl-auto=false;
22
-
23
-datasource.flyway.url=jdbc:h2:file:~/zipcoin
24
-datasource.flyway.username=sa
25
-datasource.flyway.password=
26
-datasource.flyway.driver-class-name=org.h2.Driver
1
+spring.jpa.hibernate.ddl-auto=create-drop
2
+spring.datasource.url=jdbc:mysql://localhost:3306/zipcoin?useSSL=false
3
+spring.datasource.username=root

+ 0
- 8
ZipCoinRedJavaServer/src/main/resources/db/migration/V2__create_block.sql 查看文件

@@ -1,8 +0,0 @@
1
-CREATE TABLE BLOCK(
2
-	ID INT AUTO_INCREMENT,
3
-	BLOCK_NUMBER INT,
4
-	PREVIOUS_HASH VARCHAR(255),
5
-	NONCE INT,
6
-	CURRENT_HASH VARCHAR(255),
7
-	TRANSACTION_LIST VARCHAR(2000)
8
-);

+ 50
- 20
ZipCoinRedJavaServer/src/test/java/com/zipcoin/redCoin/TransactionAndWallet/TransactionAndWalletTest.java 查看文件

@@ -1,19 +1,19 @@
1
-package com.zipcoin.redCoin.TransactionAndWallet;
2
-
3
-import com.zipcoin.model.Block;
4
-import com.zipcoin.model.Transaction;
5
-import com.zipcoin.model.Wallet;
6
-
7
-import java.security.InvalidKeyException;
8
-import java.security.NoSuchAlgorithmException;
9
-import java.security.NoSuchProviderException;
10
-import java.util.ArrayList;
11
-
12
-public class TransactionAndWalletTest {
1
+//package com.zipcoin.redCoin.TransactionAndWallet;
2
+//
3
+//import com.zipcoin.model.Block;
4
+//import com.zipcoin.model.Transaction;
5
+//import com.zipcoin.model.Wallet;
6
+//
7
+//import java.security.InvalidKeyException;
8
+//import java.security.NoSuchAlgorithmException;
9
+//import java.security.NoSuchProviderException;
10
+//import java.util.ArrayList;
11
+//
12
+//public class TransactionAndWalletTest {
13 13
 //    public static ArrayList<Block> blockchain = new ArrayList<Block>();
14 14
 //    public static int difficulty = 5;
15
-
16
-
15
+//
16
+//
17 17
 //    public static void main(String[] args) throws NoSuchAlgorithmException, InvalidKeyException, NoSuchProviderException {
18 18
 //        //Setup Bouncey castle as a Security Provider
19 19
 //        //Security.addProvider(new org.bouncycastle.jce.provider.BouncyCastleProvider());
@@ -32,15 +32,45 @@ public class TransactionAndWalletTest {
32 32
 //        System.out.println("private key :wallet 2");
33 33
 //        System.out.println(walletB.getPrivateKey().toString());
34 34
 //        //Create a test transaction from WalletA to walletB
35
-//        Transaction transaction = new Transaction(walletA.getPublicKey(), walletB.getPublicKey(), 5);
36
-//        transaction.generateSignature(walletA.getPrivateKey());
35
+////
37 36
 //        //Verify the signature works and verify it from the public key
38 37
 //
39 38
 //
40 39
 //        System.out.println("Is signature verified");
41 40
 //        // System.out.println(transaction.verifiySignature());
42 41
 //    }
43
-
44
-
45
-
46
-}
42
+//
43
+////    public static ArrayList<Block> blockchain = new ArrayList<Block>();
44
+////    public static int difficulty = 5;
45
+//
46
+//
47
+////    public static void main(String[] args) throws NoSuchAlgorithmException, InvalidKeyException, NoSuchProviderException {
48
+////        //Setup Bouncey castle as a Security Provider
49
+////        //Security.addProvider(new org.bouncycastle.jce.provider.BouncyCastleProvider());
50
+////        //Create the new wallets
51
+////        Wallet walletA = new Wallet();
52
+////        Wallet walletB = new Wallet();
53
+////        //Test public and private keys
54
+////        System.out.println("utilities 1");
55
+////        System.out.println("private key :wallet 1");
56
+////        System.out.println(walletA.getPrivateKey().toString());
57
+////        System.out.println("public key :wallet 1");
58
+////        System.out.println(walletA.getPublicKey().toString());
59
+////        System.out.println("\n\nWallet2");
60
+////        System.out.println("public key :wallet 2");
61
+////        System.out.println(walletB.getPublicKey().toString());
62
+////        System.out.println("private key :wallet 2");
63
+////        System.out.println(walletB.getPrivateKey().toString());
64
+////        //Create a test transaction from WalletA to walletB
65
+////        Transaction transaction = new Transaction(walletA.getPublicKey(), walletB.getPublicKey(), 5);
66
+////        transaction.generateSignature(walletA.getPrivateKey());
67
+////        //Verify the signature works and verify it from the public key
68
+////
69
+////
70
+////        System.out.println("Is signature verified");
71
+////        // System.out.println(transaction.verifiySignature());
72
+////    }
73
+//
74
+//
75
+//
76
+//}

+ 3
- 26
ZipCoinRedJavaServer/target/classes/application.properties 查看文件

@@ -1,26 +1,3 @@
1
-logging.level.org.springframework.web=DEBUG
2
-
3
-server.port=8080
4
-
5
-spring.h2.console.enabled=true
6
-spring.h2.console.path=/h2
7
-
8
-spring.datasource.url=jdbc:h2:file:~/zipcoin
9
-spring.datasource.username=sa
10
-spring.datasource.password=
11
-spring.datasource.driver-class-name=org.h2.Driver
12
-
13
-spring.datasource.max-active=10
14
-spring.datasource.max-idle=8
15
-spring.datasource.max-wait=10000
16
-spring.datasource.min-evictable-idle-time-millis=1000
17
-spring.datasource.min-idle=8
18
-spring.datasource.time-between-eviction-runs-millis=1
19
-
20
-flyway.baseline-on-migrate=true
21
-spring.jpa.hibernate.ddl-auto=false;
22
-
23
-datasource.flyway.url=jdbc:h2:file:~/zipcoin
24
-datasource.flyway.username=sa
25
-datasource.flyway.password=
26
-datasource.flyway.driver-class-name=org.h2.Driver
1
+spring.jpa.hibernate.ddl-auto=create-drop
2
+spring.datasource.url=jdbc:mysql://localhost:3306/zipcoin?useSSL=false
3
+spring.datasource.username=root

二進制
ZipCoinRedJavaServer/target/classes/com/boot/config/PersistenceConfiguration.class 查看文件


二進制
ZipCoinRedJavaServer/target/classes/com/zipcoin/controller/WalletController.class 查看文件


二進制
ZipCoinRedJavaServer/target/classes/com/zipcoin/model/Transaction.class 查看文件


二進制
ZipCoinRedJavaServer/target/classes/com/zipcoin/model/Wallet.class 查看文件


+ 15
- 8
ZipCoinRedJavaServer/target/classes/db/migration/V2__create_block.sql 查看文件

@@ -1,8 +1,15 @@
1
-CREATE TABLE BLOCK(
2
-	ID INT AUTO_INCREMENT,
3
-	BLOCK_NUMBER INT,
4
-	PREVIOUS_HASH VARCHAR(255),
5
-	NONCE INT,
6
-	CURRENT_HASH VARCHAR(255),
7
-	TRANSACTION_LIST VARCHAR(2000)
8
-);
1
+-- CREATE TABLE BLOCK(
2
+-- 	ID INT AUTO_INCREMENT,
3
+-- 	BLOCK_NUMBER INT,
4
+-- 	PREVIOUS_HASH VARCHAR(255),
5
+-- 	NONCE INT,
6
+-- 	CURRENT_HASH VARCHAR(255),
7
+-- 	TRANSACTION_LIST VARCHAR(2000)
8
+-- );
9
+--
10
+-- CREATE TABLE WALLET(
11
+--  ID INT AUTO_INCREMENT,
12
+--  NAME VARCHAR (50),
13
+--  PUBLICKEY VARCHAR (200),
14
+--  AMOUNT INT
15
+-- );

二進制
ZipCoinRedJavaServer/target/test-classes/com/zipcoin/redCoin/TransactionAndWallet/TransactionAndWalletTest.class 查看文件