File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -31,10 +31,8 @@ Or downloading and compiling it by yourself:
3131``` bash
3232git clone https://github.com/MostroP2P/mostro-cli.git
3333cd mostro-cli
34- # Edit .env-sample and set MOSTRO_PUBKEY, RELAYS, and POW
35- # For admin commands, also set ADMIN_NSEC
36- source .env-sample
37- cargo run
34+ cargo build --release
35+ # The binary will be created on target/release/mostro-cli
3836```
3937
4038## Usage
@@ -82,6 +80,8 @@ $ mostro-cli -m npub1ykvsmrmw2hk7jgxgy64zr8tfkx4nnjhq9eyfxdlg3caha3ph0skq6jr3z0
8280# You can set the env vars to avoid the -m, -n and -r flags
8381$ export MOSTRO_PUBKEY=npub1ykvsmrmw2hk7jgxgy64zr8tfkx4nnjhq9eyfxdlg3caha3ph0skq6jr3z0
8482$ export RELAYS=' wss://relay.mostro.network,wss://relay.damus.io'
83+ # if the Mostro require proof of work of 10 for example
84+ $ export POW=10
8585$ mostro-cli listorders
8686
8787# Create a new buy order
@@ -92,6 +92,8 @@ $ mostro-cli cancel -o eb5740f6-e584-46c5-953a-29bc3eb818f0
9292
9393# Create a new sell range order with Proof or work difficulty of 10
9494$ mostro-cli neworder -p 10 -k sell -c ars -f 1000-10000 -m " face to face"
95+
96+ # For admin commands, also set ADMIN_NSEC (this private key is different from the mnemonic in database we use to trade)
9597```
9698
9799## Progress Overview
Original file line number Diff line number Diff line change 11use anyhow:: { Error , Result } ;
22use base64:: engine:: general_purpose;
33use base64:: Engine ;
4- use std:: env:: var;
54use log:: info;
65use mostro_core:: prelude:: * ;
76use nip44:: v2:: { encrypt_to_bytes, ConversationKey } ;
87use nostr_sdk:: prelude:: * ;
8+ use std:: env:: var;
99
1010use crate :: cli:: Context ;
1111use crate :: parser:: dms:: print_commands_results;
Original file line number Diff line number Diff line change 11use anyhow:: Result ;
2- use std:: env:: var;
32use nostr_sdk:: prelude:: * ;
3+ use std:: env:: var;
44
55pub async fn connect_nostr ( ) -> Result < Client > {
66 let my_keys = Keys :: generate ( ) ;
You can’t perform that action at this time.
0 commit comments