update curl.md

This commit is contained in:
creating2morrow 2023-05-02 03:29:33 -04:00
parent 14c31e0b51
commit e7ebb9a0fb
2 changed files with 15 additions and 9 deletions

View file

@ -15,31 +15,31 @@ curl -iv -x localhost:9043/login/<SIGNATURE>/<AUTHID>/<UID>
## generate invoice ## generate invoice
```bash ```bash
curl -iv http://localhost:9000/invoice curl -iv http://bob.b32.i2p/invoice
``` ```
## get contact info ## get contact info
```bash ```bash
curl -iv http://localhost:9000/share curl -iv http://bob.b32.i2p/share
``` ```
## generate jwp ## generate jwp
```bash ```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 ## health check
```bash ```bash
curl -iv http://localhost:9000/xmr/version -H 'proof: eyJhbGciOiJIUzUxMiJ9...' curl -iv http://bob.b32.i2p/xmr/version -H 'proof: eyJhbGciOiJIUzUxMiJ9...'
``` ```
## add contact ## add contact
```bash ```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 ## view contacts
@ -51,17 +51,23 @@ curl -iv http://localhost:9044/contacts
## send message ## send message
```bash ```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 ## receive message
```bash ```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 ## view messages
```bash ```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>
```

View file

@ -16,7 +16,7 @@ pub struct Args {
#[arg( #[arg(
long, long,
help = "Monero download absolute path.", 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, pub monero_location: String,
/// Monero RPC host /// Monero RPC host