You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
openmonero/README.md

83 lines
2.7 KiB

7 years ago
# JSON REST service for Monero
8 years ago
Example of using [restbed](https://github.com/Corvusoft/restbed/) to provide Monero related JSON REST service.
7 years ago
For the example, a service called Open Monero was developed.
## Open Monero
7 years ago
Open Monero is an open source implementation of backend for
https://mymonero.com/. The frontend, html, css, JavaScript, were adapted
7 years ago
from, and originally developed by https://mymonero.com/.
However, unlike MyMonero's backend, Open Monero's backend is open sourced, free
to use, host and modify.
8 years ago
7 years ago
## Status
Still under development as its not finished.
7 years ago
## Screenshot
![Open Monero](https://raw.githubusercontent.com/moneroexamples/restbed-xmr/master/screenshot/screen1.png)
7 years ago
8 years ago
## Scrap notes
8 years ago
8 years ago
### Generate your own ssl certificate
8 years ago
8 years ago
Setting up https and ssl certificates in restbed
- https://github.com/Corvusoft/restbed/blob/34187502642144ab9f749ab40f5cdbd8cb17a54a/example/https_service/source/example.cpp
8 years ago
Based on the link above:
8 years ago
```bash
# Create Certificate
cd /tmp
openssl genrsa -out server.key 1024
openssl req -new -key server.key -out server.csr
openssl x509 -req -days 3650 -in server.csr -signkey server.key -out server.crt
8 years ago
openssl dhparam -out dh2048.pem 2048
8 years ago
```
8 years ago
8 years ago
### Enable it in Firefox or Chrome
8 years ago
Firefox and chrome will not work with that certificate as they cant verify it.
To overcome this for development purposes on localhost, just open new tab in the browser used
and go to any link from the service, e.g., `https://localhost:1984/login`. Once you do this,
you should get warring about unsecured or un verified certificate. Then you just add it manually
as exception.
7 years ago
Also Open Monero generates uses 25 word seeds, which are fully comptabilite with `monero-wallet-cli`
and `monero-core`.
8 years ago
8 years ago
### Test connection using curl
8 years ago
Example of curl https request to the service
8 years ago
```bash
8 years ago
curl -k -X POST -d '{"withCredentials":true,"address":"41pJD13rU5r3KZsxzS65tL9zLMpZZCer8aWSi7wj8Xm99BAgXthcj2wgazxdTX9auFAmp3czfJUGH2S3UJfLwDWXUxc3ooC","view_key":"06d1f0f0fd766c75b52b9c597592d06f4bca5cd6dcd3e9bf1859bc78d0d5f80e","create_account":true}' https://localhost:1984/login
8 years ago
```
8 years ago
### Compile mysql c++ connector
```
git clone https://github.com/mysql/mysql-connector-cpp.git
cd mysql-connector-cpp && mkdir build && cd build
cmake .. -DBUILD_STATIC=1
make
```
8 years ago
## Other examples
Other examples can be found on [github](https://github.com/moneroexamples?tab=repositories).
Please know that some of the examples/repositories are not
finished and may not work as intended.
## How can you help?
Constructive criticism, code and website edits are always good. They can be made through github.
Some Monero are also welcome:
```
48daf1rG3hE1Txapcsxh6WXNe9MLNKtu7W7tKTivtSoVLHErYzvdcpea2nSTgGkz66RFP4GKVAsTV14v6G3oddBTHfxP6tU
```