patches for v0.2.0-beta-rc.1

This commit is contained in:
c2m 2024-09-28 06:54:23 -04:00
parent ba628f99a1
commit 92131f3922
28 changed files with 247 additions and 134 deletions

2
.gitignore vendored
View file

@ -28,3 +28,5 @@ peerProfiles/*
*.txt
*.txt.gz
opt-backup/j4-i2p-rs/jassets/addressbook.war
**/i2p/*
neveko-x86_64-linux-gnu-*

135
Cargo.lock generated
View file

@ -110,17 +110,32 @@ dependencies = [
"anstyle",
"anstyle-parse",
"anstyle-query",
"anstyle-wincon",
"anstyle-wincon 1.0.1",
"colorchoice",
"is-terminal",
"utf8parse",
]
[[package]]
name = "anstyle"
version = "1.0.1"
name = "anstream"
version = "0.6.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3a30da5c5f2d5e72842e00bcb57657162cdabef0931f40e2deb9b4140440cecd"
checksum = "64e15c1ab1f89faffbf04a634d5e1962e9074f2741eef6d97f3c4e322426d526"
dependencies = [
"anstyle",
"anstyle-parse",
"anstyle-query",
"anstyle-wincon 3.0.4",
"colorchoice",
"is_terminal_polyfill",
"utf8parse",
]
[[package]]
name = "anstyle"
version = "1.0.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1bec1de6f59aedf83baf9ff929c98f2ad654b97c9510f4e70cf6f661d49fd5b1"
[[package]]
name = "anstyle-parse"
@ -150,6 +165,16 @@ dependencies = [
"windows-sys 0.48.0",
]
[[package]]
name = "anstyle-wincon"
version = "3.0.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5bf74e1b6e971609db8ca7a9ce79fd5768ab6ae46441c572e46cf596f59e57f8"
dependencies = [
"anstyle",
"windows-sys 0.52.0",
]
[[package]]
name = "arboard"
version = "3.2.0"
@ -400,17 +425,16 @@ checksum = "17cc5e6b5ab06331c33589842070416baa137e8b0eb912b008cfd4a78ada7919"
[[package]]
name = "chrono"
version = "0.4.26"
version = "0.4.38"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ec837a71355b28f6556dbd569b37b3f363091c0bd4b2e735674521b4c5fd9bc5"
checksum = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401"
dependencies = [
"android-tzdata",
"iana-time-zone",
"js-sys",
"num-traits",
"time 0.1.45",
"wasm-bindgen",
"winapi",
"windows-targets 0.52.6",
]
[[package]]
@ -430,7 +454,7 @@ version = "4.3.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2e53afce1efce6ed1f633cf0e57612fe51db54a1ee4fd8f8503d078fe02d69ae"
dependencies = [
"anstream",
"anstream 0.3.2",
"anstyle",
"bitflags 1.3.2",
"clap_lex",
@ -505,7 +529,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7efb37c3e1ccb1ff97164ad95ac1606e8ccd35b3fa0a7d99a304c7f4a428cc24"
dependencies = [
"percent-encoding",
"time 0.3.36",
"time",
"version_check",
]
@ -890,16 +914,26 @@ dependencies = [
]
[[package]]
name = "env_logger"
version = "0.10.0"
name = "env_filter"
version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "85cdab6a89accf66733ad5a1693a4dcced6aeff64602b634530dd73c1f3ee9f0"
checksum = "4f2c92ceda6ceec50f43169f9ee8424fe2db276791afde7b2cd8bc084cb376ab"
dependencies = [
"humantime",
"is-terminal",
"log",
"regex",
"termcolor",
]
[[package]]
name = "env_logger"
version = "0.11.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e13fa619b91fb2381732789fc5de83b45675e882f66623b7d8cb4f643017018d"
dependencies = [
"anstream 0.6.15",
"anstyle",
"env_filter",
"humantime",
"log",
]
[[package]]
@ -1174,7 +1208,7 @@ checksum = "be4136b2a15dd319360be1c07d9933517ccf0be8f16bf62a3bee4f0d618df427"
dependencies = [
"cfg-if",
"libc 0.2.153",
"wasi 0.11.0+wasi-snapshot-preview1",
"wasi",
]
[[package]]
@ -1553,6 +1587,12 @@ dependencies = [
"windows-sys 0.48.0",
]
[[package]]
name = "is_terminal_polyfill"
version = "1.70.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf"
[[package]]
name = "itoa"
version = "1.0.6"
@ -1692,9 +1732,9 @@ checksum = "e2db585e1d738fc771bf08a151420d3ed193d9d895a36df7f6f8a9456b911ddc"
[[package]]
name = "kn0sys-lmdb-rs"
version = "0.1.2"
version = "0.1.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "29e0b46b27729cc3238baa573fe2f4df74af76ad1fdb576ff9ccabb97ecf756c"
checksum = "58fbf491e9e95a325cbfe1459734cec781c0145c0d5cb7c4ced71af742364d19"
dependencies = [
"bitflags 2.6.0",
"libc 0.2.153",
@ -1799,7 +1839,7 @@ version = "0.0.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "62bb907fe88d54d8d9ce32a3cceab4218ed2f6b7d35617cafe9adf84e43919cb"
dependencies = [
"libc 0.1.12",
"libc 0.2.153",
]
[[package]]
@ -1902,7 +1942,7 @@ checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c"
dependencies = [
"libc 0.2.153",
"log",
"wasi 0.11.0+wasi-snapshot-preview1",
"wasi",
"windows-sys 0.48.0",
]
@ -1975,7 +2015,7 @@ dependencies = [
[[package]]
name = "neveko"
version = "0.1.2-beta"
version = "0.2.0-beta-rc.1-beta"
dependencies = [
"env_logger",
"neveko_auth",
@ -1989,7 +2029,7 @@ dependencies = [
[[package]]
name = "neveko_auth"
version = "0.1.2-beta"
version = "0.2.0-beta-rc.1-beta"
dependencies = [
"env_logger",
"log",
@ -1999,7 +2039,7 @@ dependencies = [
[[package]]
name = "neveko_contact"
version = "0.1.2-beta"
version = "0.2.0-beta-rc.1-beta"
dependencies = [
"env_logger",
"log",
@ -2009,7 +2049,7 @@ dependencies = [
[[package]]
name = "neveko_core"
version = "0.1.2-beta"
version = "0.2.0-beta-rc.1-beta"
dependencies = [
"bincode",
"chrono",
@ -2041,7 +2081,7 @@ dependencies = [
[[package]]
name = "neveko_gui"
version = "0.1.2-beta"
version = "0.2.0-beta-rc.1-beta"
dependencies = [
"bincode",
"chrono",
@ -2066,7 +2106,7 @@ dependencies = [
[[package]]
name = "neveko_market"
version = "0.1.2-beta"
version = "0.2.0-beta-rc.1-beta"
dependencies = [
"chrono",
"env_logger",
@ -2077,7 +2117,7 @@ dependencies = [
[[package]]
name = "neveko_message"
version = "0.1.2-beta"
version = "0.2.0-beta-rc.1-beta"
dependencies = [
"env_logger",
"log",
@ -2763,7 +2803,7 @@ dependencies = [
"serde_json",
"state",
"tempfile",
"time 0.3.36",
"time",
"tokio",
"tokio-stream",
"tokio-util",
@ -2810,7 +2850,7 @@ dependencies = [
"smallvec",
"stable-pattern",
"state",
"time 0.3.36",
"time",
"tokio",
"uncased",
]
@ -3242,15 +3282,6 @@ dependencies = [
"windows-sys 0.48.0",
]
[[package]]
name = "termcolor"
version = "1.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "be55cf8942feac5c765c2c993422806843c9a9a45d4d5c407ad6dd2ea95eb9b6"
dependencies = [
"winapi-util",
]
[[package]]
name = "termios"
version = "0.0.5"
@ -3301,17 +3332,6 @@ dependencies = [
"weezl",
]
[[package]]
name = "time"
version = "0.1.45"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1b797afad3f312d1c66a56d11d0316f916356d11bd158fbc6ca6389ff6bf805a"
dependencies = [
"libc 0.2.153",
"wasi 0.10.0+wasi-snapshot-preview1",
"winapi",
]
[[package]]
name = "time"
version = "0.3.36"
@ -3684,12 +3704,6 @@ dependencies = [
"try-lock",
]
[[package]]
name = "wasi"
version = "0.10.0+wasi-snapshot-preview1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f"
[[package]]
name = "wasi"
version = "0.11.0+wasi-snapshot-preview1"
@ -4015,6 +4029,15 @@ dependencies = [
"windows-targets 0.48.0",
]
[[package]]
name = "windows-sys"
version = "0.52.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d"
dependencies = [
"windows-targets 0.52.6",
]
[[package]]
name = "windows-targets"
version = "0.42.2"

View file

@ -1,16 +1,16 @@
[package]
name = "neveko"
version = "0.1.2-beta"
version = "0.2.0-beta-rc.1-beta"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
env_logger = "0.10.0"
env_logger = "0.11.0"
neveko_auth = { path = "./neveko-auth" }
neveko_contact = { path = "./neveko-contact" }
neveko_core = { path = "./neveko-core" }
neveko_gui = { path = "./neveko-gui" }
neveko_market = { path = "./neveko-market" }
neveko_message = { path = "./neveko-message" }
rocket = { version = "0.5.0-rc.2", features = ["json"] }
rocket = { version = "0.5.0-rc.3", features = ["json"] }

View file

@ -26,10 +26,10 @@ NEVidebla-EKOnomia (invisible economy)
* `git clone --recursive https://github.com/creating2morrow/neveko`
* `cd neveko && ./scripts/build_all_and_run.sh "-- -h"`
* Example to start neveko with remote stagenet node / i2p proxy remote for development:
* `./scripts/build_all_and_run.sh "-- --monero-location monero-x86_64-linux-gnu-v0.18.3.4 --monero-rpc-host http://127.0.0.1:38083 --monero-rpc-daemon http://xmr3kaacphwkk4z2gp35bdl47lrrnzimmyqj4oliauqrjzqecofa.b32.i2p:38081 --monero-rpc-username user --monero-rpc-cred pass --remote-node --i2p-advanced --i2p-tunnels-json /home/user/neveko/i2p-manual/config --i2p-proxy-host http://x.x.x.x:xxxx --i2p-socks-proxy-host http://x.x.x.x:xxxx"`
* `./scripts/build_all_and_run.sh "-- --monero-location monero-x86_64-linux-gnu-v0.18.3.4 --monero-rpc-host http://127.0.0.1:18083 --monero-rpc-daemon http://xmr3kaacphwkk4z2gp35bdl47lrrnzimmyqj4oliauqrjzqecofa.b32.i2p:18081 --monero-rpc-username user --monero-rpc-cred pass --remote-node --i2p-advanced --i2p-tunnels-json /home/user/neveko/i2p-manual/config --i2p-proxy-host http://x.x.x.x:xxxx --i2p-socks-proxy-host http://x.x.x.x:xxxx"`
* the `--monero-location` flag is needed even when using a remote node because
neveko has its own monero-wallet-rpc instance
* remote nodes are forced over the `--i2p-proxy-host`
* remote nodes are forced over the `--i2p-socks-proxy-host`
* Recommended neveko-core startup with full node:
* ` ./scripts/build_all_and_run.sh "-- --monero-blockchain-dir=/home/user/.bitmonero --monero-location monero-x86_64-linux-gnu-v0.18.3.4 --monero-blockchain-dir /home/user/.bitmonero"`
* monerod doesn't need to be running because neveko will start it and monero-wallet-rpc
@ -45,14 +45,6 @@ NEVidebla-EKOnomia (invisible economy)
* see [j4-i2p-rs](https://github.com/kn0sys/j4-i2p-rs) for more information on embedded i2p
* darknet release server links are located at: http://neveko.i2p/index.txt
## Installation Mananger
* additional required software can be downloaded from `Binaries` links below
* hashes are in core [lib.rs](./neveko-core/src/lib.rs)
* download monero, update connection manager or cli
* `--monero-blockchain-dir`, where to put lmdb for monero (e.g. path/to/ssd)
* `--monero-location`, path to monero download
## Contributing and Releasing
```bash
@ -98,10 +90,10 @@ NEVidebla-EKOnomia (invisible economy)
* neveko-market - `internal` marketplace admin server
* neveko-message - `internal` message tx/read etc. server
* neveko - `external` primary server for contact share, payment, market, message rx etc.
* [monerod](https://www.getmonero.org/downloads/#cli) - (not included) monero-wallet-rpc needs this
* [monerod](https://www.getmonero.org/downloads/#cli) - monero-wallet-rpc needs this
* can be overriden with remote node
* use the `--remote-node` flag
* [monero-wallet-rpc](https://www.getmonero.org/downloads/#cli) - (not included) interface for xmr wallet ops
* [monero-wallet-rpc](https://www.getmonero.org/downloads/#cli) - interface for xmr wallet ops
most of the complex logic stays in neveko-core, exported from [lib.rs](./neveko-core/src/lib.rs)

View file

@ -1255,7 +1255,7 @@ dependencies = [
[[package]]
name = "neveko_auth"
version = "0.1.2-beta"
version = "0.2.0-beta-rc.1-beta"
dependencies = [
"env_logger",
"log",
@ -1265,7 +1265,7 @@ dependencies = [
[[package]]
name = "neveko_core"
version = "0.1.2-beta"
version = "0.2.0-beta-rc.1-beta"
dependencies = [
"bincode",
"chrono",

View file

@ -1,12 +1,12 @@
[package]
name = "neveko_auth"
version = "0.1.2-beta"
version = "0.2.0-beta-rc.1-beta"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
env_logger = "0.10.0"
env_logger = "0.11.0"
neveko_core = { path = "../neveko-core" }
log = "0.4"
rocket = { version = "0.5.0-rc.2", features = ["json"] }
rocket = { version = "0.5.0-rc.3", features = ["json"] }

View file

@ -1255,7 +1255,7 @@ dependencies = [
[[package]]
name = "neveko_contact"
version = "0.1.2-beta"
version = "0.2.0-beta-rc.1-beta"
dependencies = [
"env_logger",
"log",
@ -1265,7 +1265,7 @@ dependencies = [
[[package]]
name = "neveko_core"
version = "0.1.2-beta"
version = "0.2.0-beta-rc.1-beta"
dependencies = [
"bincode",
"chrono",

View file

@ -1,12 +1,12 @@
[package]
name = "neveko_contact"
version = "0.1.2-beta"
version = "0.2.0-beta-rc.1-beta"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
env_logger = "0.10.0"
env_logger = "0.11.0"
neveko_core = { path = "../neveko-core" }
log = "0.4"
rocket = { version = "0.5.0-rc.2", features = ["json"] }
rocket = { version = "0.5.0-rc.3", features = ["json"] }

110
neveko-core/Cargo.lock generated
View file

@ -26,21 +26,42 @@ version = "0.2.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "342258dd14006105c2b75ab1bd7543a03bdf0cfc94383303ac212a04939dff6f"
dependencies = [
"anstyle",
"anstyle-parse",
"anstyle-wincon",
"anstyle 0.3.5",
"anstyle-parse 0.1.1",
"anstyle-wincon 0.2.0",
"concolor-override",
"concolor-query",
"is-terminal",
"utf8parse",
]
[[package]]
name = "anstream"
version = "0.6.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "64e15c1ab1f89faffbf04a634d5e1962e9074f2741eef6d97f3c4e322426d526"
dependencies = [
"anstyle 1.0.8",
"anstyle-parse 0.2.5",
"anstyle-query",
"anstyle-wincon 3.0.4",
"colorchoice",
"is_terminal_polyfill",
"utf8parse",
]
[[package]]
name = "anstyle"
version = "0.3.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "23ea9e81bd02e310c216d080f6223c179012256e5151c41db88d12c88a1684d2"
[[package]]
name = "anstyle"
version = "1.0.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1bec1de6f59aedf83baf9ff929c98f2ad654b97c9510f4e70cf6f661d49fd5b1"
[[package]]
name = "anstyle-parse"
version = "0.1.1"
@ -50,16 +71,44 @@ dependencies = [
"utf8parse",
]
[[package]]
name = "anstyle-parse"
version = "0.2.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "eb47de1e80c2b463c735db5b217a0ddc39d612e7ac9e2e96a5aed1f57616c1cb"
dependencies = [
"utf8parse",
]
[[package]]
name = "anstyle-query"
version = "1.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6d36fc52c7f6c869915e99412912f22093507da8d9e942ceaf66fe4b7c14422a"
dependencies = [
"windows-sys 0.52.0",
]
[[package]]
name = "anstyle-wincon"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c3127af6145b149f3287bb9a0d10ad9c5692dba8c53ad48285e5bec4063834fa"
dependencies = [
"anstyle",
"anstyle 0.3.5",
"windows-sys 0.45.0",
]
[[package]]
name = "anstyle-wincon"
version = "3.0.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5bf74e1b6e971609db8ca7a9ce79fd5768ab6ae46441c572e46cf596f59e57f8"
dependencies = [
"anstyle 1.0.8",
"windows-sys 0.52.0",
]
[[package]]
name = "async-stream"
version = "0.3.4"
@ -227,8 +276,8 @@ version = "4.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "223163f58c9a40c3b0a43e1c4b50a9ce09f007ea2cb1ec258a687945b4b7929f"
dependencies = [
"anstream",
"anstyle",
"anstream 0.2.6",
"anstyle 0.3.5",
"bitflags 1.3.2",
"clap_lex",
"strsim",
@ -262,6 +311,12 @@ dependencies = [
"unicode-width",
]
[[package]]
name = "colorchoice"
version = "1.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d3fd119d74b830634cea2a0f58bbd0d54540518a14397557951e79340abc28c0"
[[package]]
name = "concolor-override"
version = "1.0.0"
@ -527,16 +582,26 @@ dependencies = [
]
[[package]]
name = "env_logger"
version = "0.10.0"
name = "env_filter"
version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "85cdab6a89accf66733ad5a1693a4dcced6aeff64602b634530dd73c1f3ee9f0"
checksum = "4f2c92ceda6ceec50f43169f9ee8424fe2db276791afde7b2cd8bc084cb376ab"
dependencies = [
"humantime",
"is-terminal",
"log",
"regex",
"termcolor",
]
[[package]]
name = "env_logger"
version = "0.11.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e13fa619b91fb2381732789fc5de83b45675e882f66623b7d8cb4f643017018d"
dependencies = [
"anstream 0.6.15",
"anstyle 1.0.8",
"env_filter",
"humantime",
"log",
]
[[package]]
@ -987,6 +1052,12 @@ dependencies = [
"windows-sys 0.45.0",
]
[[package]]
name = "is_terminal_polyfill"
version = "1.70.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf"
[[package]]
name = "itoa"
version = "1.0.6"
@ -1080,9 +1151,9 @@ dependencies = [
[[package]]
name = "kn0sys-lmdb-rs"
version = "0.1.2"
version = "0.1.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "29e0b46b27729cc3238baa573fe2f4df74af76ad1fdb576ff9ccabb97ecf756c"
checksum = "58fbf491e9e95a325cbfe1459734cec781c0145c0d5cb7c4ced71af742364d19"
dependencies = [
"bitflags 2.6.0",
"libc 0.2.158",
@ -1264,7 +1335,7 @@ dependencies = [
[[package]]
name = "neveko_core"
version = "0.1.2-beta"
version = "0.2.0-beta-rc.1-beta"
dependencies = [
"bincode",
"chrono",
@ -2688,6 +2759,15 @@ dependencies = [
"windows-targets 0.42.2",
]
[[package]]
name = "windows-sys"
version = "0.52.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d"
dependencies = [
"windows-targets 0.52.6",
]
[[package]]
name = "windows-targets"
version = "0.42.2"

View file

@ -1,6 +1,6 @@
[package]
name = "neveko_core"
version = "0.1.2-beta"
version = "0.2.0-beta-rc.1-beta"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
@ -11,13 +11,13 @@ chrono = "0.4.23"
clap = { version = "4.1.4", features = ["derive"] }
curve25519-dalek = "4.1.3"
diqwest = "1.1.1"
env_logger = "0.10.0"
env_logger = "0.11.0"
hex = "0.4.3"
hmac = "0.12.1"
j4-i2p-rs = { path = "../j4-i2p-rs", version = "0.2.0-alpha" }
jwt = "0.16.0"
lazy_static = "1.4.0"
kn0sys-lmdb-rs = "0.1.2"
kn0sys-lmdb-rs = "0.1.4"
log = "0.4"
num = "0.4.1"
rand = "0.8.5"

View file

@ -118,7 +118,7 @@ pub fn find_all() -> Result<Vec<Contact>, MdbError> {
let mut contacts: Vec<Contact> = Vec::new();
for id in v {
if !id.is_empty() {
let contact: Contact = find(&id)?;
let contact: Contact = find(&id).unwrap_or_default();
contacts.push(contact);
}
}

View file

@ -296,7 +296,7 @@ pub fn find_all() -> Result<Vec<Message>, NevekoError> {
let i_v: Vec<String> = i_v_mid.map(String::from).collect();
let mut messages: Vec<Message> = Vec::new();
for m in i_v {
let message: Message = find(&m)?;
let message: Message = find(&m).unwrap_or_default();
if !message.mid.is_empty() {
messages.push(message);
}
@ -311,7 +311,7 @@ pub fn find_all() -> Result<Vec<Message>, NevekoError> {
let o_v_mid = o_r.split(",");
let o_v: Vec<String> = o_v_mid.map(String::from).collect();
for m in o_v {
let message: Message = find(&m)?;
let message: Message = find(&m).unwrap_or_default();
if !message.mid.is_empty() {
messages.push(message);
}

View file

@ -172,7 +172,7 @@ pub fn find_all() -> Result<Vec<Order>, NevekoError> {
let i_v: Vec<String> = i_v_oid.map(String::from).collect();
let mut orders: Vec<Order> = Vec::new();
for o in i_v {
let order: Order = find(&o)?;
let order: Order = find(&o).unwrap_or_default();
if !order.orid.is_empty() {
orders.push(order);
}

View file

@ -86,7 +86,7 @@ pub fn find_all() -> Result<Vec<Product>, NevekoError> {
let i_v: Vec<String> = i_v_pid.map(String::from).collect();
let mut products: Vec<Product> = Vec::new();
for p in i_v {
let mut product: Product = find(&p)?;
let mut product: Product = find(&p).unwrap_or_default();
if !product.pid.is_empty() {
// don't return images
product.image = Vec::new();

View file

@ -92,7 +92,7 @@ impl Default for Connections {
is_remote_node: false,
is_i2p_advanced: false,
mainnet: true,
monero_location: String::from("/home/user/monero-x86_64-linux-gnu-v0.18.3.4"),
monero_location: String::from("monero-x86_64-linux-gnu-v0.18.3.4"),
rpc_credential: String::from("pass"),
rpc_username: String::from("user"),
rpc_host: String::from("http://127.0.0.1:18083"),

4
neveko-gui/Cargo.lock generated
View file

@ -2442,7 +2442,7 @@ dependencies = [
[[package]]
name = "neveko_core"
version = "0.1.2-beta"
version = "0.2.0-beta-rc.1-beta"
dependencies = [
"bincode",
"chrono",
@ -2474,7 +2474,7 @@ dependencies = [
[[package]]
name = "neveko_gui"
version = "0.1.2-beta"
version = "0.2.0-beta-rc.1-beta"
dependencies = [
"bincode",
"bytemuck",

View file

@ -1,6 +1,6 @@
[package]
name = "neveko_gui"
version = "0.1.2-beta"
version = "0.2.0-beta-rc.1-beta"
authors = ["emilk", "creating2morrow"]
license = "MIT OR Apache-2.0"
edition = "2021"

View file

@ -978,6 +978,7 @@ pub trait Storage {
/// Stores nothing.
#[derive(Clone, Default)]
#[allow(dead_code)]
pub(crate) struct DummyStorage {}
impl Storage for DummyStorage {

View file

@ -570,7 +570,7 @@ impl eframe::App for AddressBookApp {
Err(_e) => 0,
};
self.status.h_exp =
chrono::NaiveDateTime::from_timestamp_opt(expire, 0)
chrono::DateTime::from_timestamp(expire, 0)
.unwrap()
.to_string();
send_contact_info_req(

View file

@ -283,12 +283,11 @@ impl eframe::App for HomeApp {
self.connections.is_i2p_advanced = !self.connections.is_i2p_advanced;
log::debug!("is i2p advanced mode: {}", self.connections.is_i2p_advanced);
}
// TODO(c2m): uncomment this to add mainnet flag to gui
// let mut is_mainnet = self.connections.mainnet;
// if ui.checkbox(&mut is_mainnet, "mainnet").changed() {
// self.connections.mainnet = !self.connections.mainnet;
// log::debug!("is mainnet: {}", self.connections.mainnet);
// }
let mut is_mainnet = self.connections.mainnet;
if ui.checkbox(&mut is_mainnet, "mainnet").changed() {
self.connections.mainnet = !self.connections.mainnet;
log::debug!("is mainnet: {}", self.connections.mainnet);
}
if ui.button("Start/Restart").clicked() {
self.is_editing_connections = false;
utils::kill_child_processes(true);

View file

@ -116,7 +116,7 @@ impl eframe::App for MailBoxApp {
let row_height = 200.0;
body.row(row_height, |mut row| {
row.col(|ui| {
let h = chrono::NaiveDateTime::from_timestamp_opt(m.created, 0)
let h = chrono::DateTime::from_timestamp(m.created, 0)
.unwrap()
.to_string();
ui.label(format!("{}", h));

View file

@ -907,7 +907,7 @@ impl eframe::App for MarketApp {
});
row.col(|ui| {
let h_date =
chrono::NaiveDateTime::from_timestamp_opt(o.date, 0)
chrono::DateTime::from_timestamp(o.date, 0)
.unwrap()
.to_string();
ui.label(format!("{}", h_date));
@ -1209,7 +1209,7 @@ impl eframe::App for MarketApp {
Err(_e) => 0,
};
self.vendor_status.h_exp =
chrono::NaiveDateTime::from_timestamp_opt(
chrono::DateTime::from_timestamp(
expire, 0,
)
.unwrap()
@ -1608,7 +1608,7 @@ impl eframe::App for MarketApp {
});
row.col(|ui| {
let h_date =
chrono::NaiveDateTime::from_timestamp_opt(o.date, 0)
chrono::DateTime::from_timestamp(o.date, 0)
.unwrap()
.to_string();
ui.label(format!("{}", h_date));
@ -2542,7 +2542,6 @@ fn release_txset(contact: String, orid: String, ctx: egui::Context, tx: Sender<b
// update order to delivered if success
let _ = tx.send(finalize.vendor_update_success);
ctx.request_repaint();
todo!()
});
}

View file

@ -39,7 +39,7 @@ fn main() -> Result<(), eframe::Error> {
})
});
eframe::run_native(
"neveko-gui-v0.1.2-beta",
"neveko-gui-v0.2.0-beta-rc.1-beta",
options,
Box::new(|cc| Box::new(neveko_gui::WrapApp::new(cc))),
)

View file

@ -1187,7 +1187,7 @@ dependencies = [
[[package]]
name = "neveko_core"
version = "0.1.2-beta"
version = "0.2.0-beta-rc.1-beta"
dependencies = [
"bincode",
"chrono",
@ -1219,7 +1219,7 @@ dependencies = [
[[package]]
name = "neveko_market"
version = "0.1.2-beta"
version = "0.2.0-beta-rc.1-beta"
dependencies = [
"chrono",
"env_logger",

View file

@ -1,12 +1,12 @@
[package]
name = "neveko_market"
version = "0.1.2-beta"
version = "0.2.0-beta-rc.1-beta"
edition = "2021"
publish = false
[dependencies]
chrono = "0.4.23"
env_logger = "0.10.0"
chrono = "0.4.38"
env_logger = "0.11.0"
neveko_core = { path = "../neveko-core" }
log = "0.4"
rocket = { version = "0.5.0-rc.2", features = ["json"] }
rocket = { version = "0.5.0-rc.3", features = ["json"] }

View file

@ -1255,7 +1255,7 @@ dependencies = [
[[package]]
name = "neveko_core"
version = "0.1.2-beta"
version = "0.2.0-beta-rc.1-beta"
dependencies = [
"bincode",
"chrono",
@ -1287,7 +1287,7 @@ dependencies = [
[[package]]
name = "neveko_message"
version = "0.1.2-beta"
version = "0.2.0-beta-rc.1-beta"
dependencies = [
"env_logger",
"log",

View file

@ -1,12 +1,12 @@
[package]
name = "neveko_message"
version = "0.1.2-beta"
version = "0.2.0-beta-rc.1-beta"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
env_logger = "0.10.0"
env_logger = "0.11.0"
neveko_core = { path = "../neveko-core" }
log = "0.4"
rocket = { version = "0.5.0-rc.2", features = ["json"] }
rocket = { version = "0.5.0-rc.3", features = ["json"] }

View file

@ -4,17 +4,34 @@
# usage: ./scripts/build_release vX.X.X-ver
# Linux x86_64 output directory
LINUX_X86_64="x86_64-linux-gnu"
RELEASE_NAME="neveko-$LINUX_X86_64-$1"
LINUX_OUTPUT_DIR=".build/release/$RELEASE_NAME"
mkdir -p $LINUX_OUTPUT_DIR
# monero version
MONERO_VERSION="monero-linux-x64-v0.18.3.4"
# build jars for j4-i2p-rs
git clone --depth 1 https://github.com/kn0sys/i2p.i2p
cd i2p.i2p && ant buildRouter buildI2PTunnelJars buildSAM jbigi buildAddressbook
mkdir -p ../opt/j4-i2p-rs/jassets && cp build/* ../opt/j4-i2p-rs/jassets/
cd ../
cp -r opt/ $LINUX_OUTPUT_DIR
# certificates for reseed
cp -r j4-i2p-rs/certificates $LINUX_OUTPUT_DIR
# download monero and extract monero wallet rpc
wget https://downloads.getmonero.org/cli/$MONERO_VERSION.tar.bz2
tar xvf $MONERO_VERSION.tar.bz2
mkdir $LINUX_OUTPUT_DIR/$MONERO_VERSION
cp $MONERO_VERSION/monero-wallet-rpc $LINUX_OUTPUT_DIR/$MONERO_VERSION
cp $MONERO_VERSION/monerod $LINUX_OUTPUT_DIR/$MONERO_VERSION
# build neveko-core
cargo build --release
cp target/release/neveko $LINUX_OUTPUT_DIR
# build gui
cd neveko-gui && cargo build --release && cp target/release/neveko_gui ../$LINUX_OUTPUT_DIR
cp -r assets/ ../$LINUX_OUTPUT_DIR
cd ../
# build dev servers for API use
cd neveko-auth && cargo build --release && cp target/release/neveko_auth ../$LINUX_OUTPUT_DIR
cd ../
cd neveko-contact && cargo build --release && cp target/release/neveko_contact ../$LINUX_OUTPUT_DIR