|
1 | | -MultiChainJavaAPI |
2 | | -========== |
3 | | - |
4 | | -MultiChainJAVAAPI is an open source Java interface [MultiChain](http://www.multichain.com/) blockchains, written in Java. |
5 | | - |
6 | | -https://github.com/SimplyUb/MultiChainJavaAPI |
7 | | - |
8 | | - Copyright (c) 2017 Worldline |
9 | | - License: GNU General Public License version 3, see COPYING |
10 | | - |
11 | | - |
12 | | - |
13 | | -System requirements |
14 | | -------------------- |
15 | | - |
16 | | -These compilation instructions have been tested on Ubuntu 12.4 x64 only with Java 1.7.0_80 |
17 | | - |
18 | | - |
19 | | -Linux Build Notes (on Ubuntu 12.4 x64 only with Java 1.7.0_80) |
20 | | -================= |
21 | | - |
22 | | -ClassPath dependencies |
23 | | --------------------- |
24 | | - |
25 | | - * Java 1.7.0 is needed, upper version should be compatible |
26 | | - * Project uses [Gson API](https://github.com/google/gson) |
27 | | - |
28 | | -Notes |
29 | | ------ |
30 | | - |
31 | | -* The classpath file is called "project.classpath" and has to ne rename in ".classpath" for compilation. |
32 | | - |
33 | | -License |
34 | | -========== |
35 | | - |
36 | | -MultiChainJAVAAPI is released under the [GNU General Public License version 3] (LICENSE). |
37 | | - |
38 | | -``` |
39 | | -Copyright (c) 2017 Worldline. |
40 | | -
|
41 | | -This program is free software: you can redistribute it and/or modify |
42 | | -it under the terms of the GNU General Public License as published by |
43 | | -the Free Software Foundation, either version 3 of the License, or |
44 | | -any later version. |
45 | | -
|
46 | | -This program is distributed in the hope that it will be useful, |
47 | | -but WITHOUT ANY WARRANTY; without even the implied warranty of |
48 | | -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
49 | | -GNU General Public License for more details. |
50 | | -
|
51 | | -You should have received a copy of the GNU General Public License |
52 | | -along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 1 | +# MultiChainJavaAPI |
| 2 | + |
| 3 | +MultiChainJAVAAPI is an open source Java interface [MultiChain](http://www.multichain.com/) blockchains, written in Java. |
| 4 | + |
| 5 | +https://github.com/SimplyUb/MultiChainJavaAPI |
| 6 | + |
| 7 | + Copyright (c) 2017 Worldline |
| 8 | + License: GNU General Public License version 3, see COPYING |
| 9 | + |
| 10 | + |
| 11 | + |
| 12 | +### System requirements |
| 13 | + |
| 14 | +These compilation instructions have been tested on Ubuntu 12.4 x64 only with Java 1.7.0_80 |
| 15 | + |
| 16 | + |
| 17 | +## Linux Build Notes (on Ubuntu 12.4 x64 only with Java 1.7.0_80) |
| 18 | + |
| 19 | +### ClassPath dependencies |
| 20 | + |
| 21 | + * Java 1.7.0 is needed, upper version should be compatible |
| 22 | + * Project uses [Gson API](https://github.com/google/gson) |
| 23 | + |
| 24 | +### Notes |
| 25 | + |
| 26 | +* The classpath file is called "project.classpath" and has to ne rename in ".classpath" for compilation. |
| 27 | + |
| 28 | +## Architecture |
| 29 | + |
| 30 | +### Global Architecture |
| 31 | +The goal of the API is to directly integrate calls to command system and Json Formating to make Java developing easier : |
| 32 | + |
| 33 | +<img src="https://github.com/SimplyUb/MultiChainJavaAPI/Archi.png" alt="Global Architecture"/> |
| 34 | + |
| 35 | +The initial mind of the project is to manage Wallet. |
| 36 | +There's no command to manage the BlockChain like : create a blockChain, join a blockChain, ... |
| 37 | +Theses commands are more linked with the system. |
| 38 | +Next versions will decide to integrate (or not) theses commands. |
| 39 | + |
| 40 | +### Project Architecture |
| 41 | + |
| 42 | +#### multichain.command |
| 43 | +The package `multichain.command` is the essential of the project. |
| 44 | +The package contains Java commands to call. |
| 45 | + |
| 46 | +Examples of command calls can be found in `multichain.test.command`. |
| 47 | + |
| 48 | +A simple example to get addresses : |
| 49 | +``` |
| 50 | +//BlockChain TestCommand has to be created and started before |
| 51 | +ChainCommand.initializeChain("TestCommand"); |
| 52 | +
|
| 53 | +List<String> result = null; |
| 54 | +try { |
| 55 | + result = AddressCommand.getAddresses(); |
| 56 | +} catch (MultichainException e) { |
| 57 | + // TODO Auto-generated catch block |
| 58 | + e.printStackTrace(); |
| 59 | +} |
| 60 | +
|
| 61 | +//result contains the addresses of the wallet as list of String. |
| 62 | +``` |
| 63 | + |
| 64 | + |
| 65 | +#### multichain.object |
| 66 | +The package `multichain.object` contains Java objects which can be used to call functions or returned by functions. |
| 67 | + |
| 68 | +The package contains `formatters` with technical classes used to format Json to Java using [Gson API](https://github.com/google/gson). |
| 69 | + |
| 70 | +## Versions |
| 71 | + |
| 72 | +## License |
| 73 | + |
| 74 | +MultiChainJAVAAPI is released under the [GNU General Public License version 3] (LICENSE). |
| 75 | + |
| 76 | +#### multichain.test.object.formatters |
| 77 | +The package `multichain.test` contains Java unit test. |
| 78 | +Test are written with `main()` function to be executed whatever IDE or system used. |
| 79 | + |
| 80 | +The package `command` has to contain unit tests for each command. |
| 81 | +The package `object.formatters` is helpful to test the good work of Formatters Json<->Java. |
| 82 | + |
| 83 | +``` |
| 84 | +Copyright (c) 2017 Worldline. |
| 85 | +
|
| 86 | +This program is free software: you can redistribute it and/or modify |
| 87 | +it under the terms of the GNU General Public License as published by |
| 88 | +the Free Software Foundation, either version 3 of the License, or |
| 89 | +any later version. |
| 90 | +
|
| 91 | +This program is distributed in the hope that it will be useful, |
| 92 | +but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 93 | +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 94 | +GNU General Public License for more details. |
| 95 | +
|
| 96 | +You should have received a copy of the GNU General Public License |
| 97 | +along with this program. If not, see <http://www.gnu.org/licenses/>. |
53 | 98 | ``` |
0 commit comments