mirror of
https://github.com/creating2morrow/neveko.git
synced 2024-12-22 19:49:24 +00:00
update curl.md
This commit is contained in:
parent
14c31e0b51
commit
e7ebb9a0fb
2 changed files with 15 additions and 9 deletions
22
docs/curl.md
22
docs/curl.md
|
@ -15,31 +15,31 @@ curl -iv -x localhost:9043/login/<SIGNATURE>/<AUTHID>/<UID>
|
|||
## generate invoice
|
||||
|
||||
```bash
|
||||
curl -iv http://localhost:9000/invoice
|
||||
curl -iv http://bob.b32.i2p/invoice
|
||||
```
|
||||
|
||||
## get contact info
|
||||
|
||||
```bash
|
||||
curl -iv http://localhost:9000/share
|
||||
curl -iv http://bob.b32.i2p/share
|
||||
```
|
||||
|
||||
## generate jwp
|
||||
|
||||
```bash
|
||||
curl -iv -X POST http://localhost:9000/prove -d '{"address": "", "confirmations":0,"hash":"", "message":"", "signature": ""}' -H 'Content-Type: application/json'
|
||||
curl -iv -X POST http://bob.b32.i2p/prove -d '{"address": "", "confirmations":0,"hash":"", "message":"", "signature": ""}' -H 'Content-Type: application/json'
|
||||
```
|
||||
|
||||
## health check
|
||||
|
||||
```bash
|
||||
curl -iv http://localhost:9000/xmr/version -H 'proof: eyJhbGciOiJIUzUxMiJ9...'
|
||||
curl -iv http://bob.b32.i2p/xmr/version -H 'proof: eyJhbGciOiJIUzUxMiJ9...'
|
||||
```
|
||||
|
||||
## add contact
|
||||
|
||||
```bash
|
||||
curl -iv -X POST http://localhost:9044/contact -d '{"cid": "KEEP EMPTY", "gpg_key": [1,2,3...], "i2p_address": "", "xmr_address": ""}' -H 'Content-Type: application/json'
|
||||
curl -iv -X POST http://localhost:9044/contact -d '{"cid": "KEEP EMPTY", "gpg_key": [1,2,3...], "i2p_address": "", "xmr_address": ""}' -H 'Content-Type: application/json'
|
||||
```
|
||||
|
||||
## view contacts
|
||||
|
@ -51,17 +51,23 @@ curl -iv http://localhost:9044/contacts
|
|||
## send message
|
||||
|
||||
```bash
|
||||
curl -ivk localhost:9045/tx -d '{"uid":"123", "mid": "", "body": [1,2,3 <PLAINTEXT_BYTES>], "from": "alice.b32.i2p", "created": 0, "to": "bob.b32.i2p"}' -H 'Content-Type: application/json'
|
||||
curl -ivk http://localhost:9045/tx -d '{"uid":"123", "mid": "", "body": [1,2,3 <PLAINTEXT_BYTES>], "from": "alice.b32.i2p", "created": 0, "to": "bob.b32.i2p"}' -H 'Content-Type: application/json'
|
||||
```
|
||||
|
||||
## receive message
|
||||
|
||||
```bash
|
||||
curl -ivk localhost:9000/message/rx -d '{"uid":"", "mid": "", "body": [1,2,3 <ENCRYPTED_BYTES>], "from": "alice.b32.i2p", "created": 0, "to": "bob.b32.i2p"}' -H 'Content-Type: application/json' -H 'proof: eyJhbGciOiJIUzUxMiJ9...'
|
||||
curl -iv http://alice.b32.i2p/message/rx -d '{"uid":"", "mid": "", "body": [1,2,3 <ENCRYPTED_BYTES>], "from": "bob.b32.i2p", "created": 0, "to": "alice.b32.i2p"}' -H 'Content-Type: application/json' -H 'proof: eyJhbGciOiJIUzUxMiJ9...'
|
||||
```
|
||||
|
||||
## view messages
|
||||
|
||||
```bash
|
||||
curl -iv http://localhost:9044/messages
|
||||
curl -iv http://localhost:9045/messages
|
||||
```
|
||||
|
||||
## decrypt message
|
||||
|
||||
```bash
|
||||
curl -iv http://localhost:9045/message/decrypt/<MESSAGE_ID>
|
||||
```
|
|
@ -16,7 +16,7 @@ pub struct Args {
|
|||
#[arg(
|
||||
long,
|
||||
help = "Monero download absolute path.",
|
||||
default_value = "monero-x86_64-linux-gnu-v0.18.2.0"
|
||||
default_value = "monero-x86_64-linux-gnu-v0.18.2.2"
|
||||
)]
|
||||
pub monero_location: String,
|
||||
/// Monero RPC host
|
||||
|
|
Loading…
Reference in a new issue