fix startup error propogation

This commit is contained in:
kn0sys 2024-09-16 09:11:10 -04:00
parent 679743771b
commit 7f688e4e8b
No known key found for this signature in database
GPG key ID: 3BDB674C95F103FA
34 changed files with 2576 additions and 815 deletions

19
.gitignore vendored
View file

@ -10,5 +10,22 @@ notes.txt
.vscode/settings.json
*.bz2
*.zip
*/monero-x86_64-linux-gnu-v0.18.3.4/**
monero-x86_64-linux-gnu-v*/
*.jar
opt/*
eventlog.txt
libjcpuid.so
router.config
router.ping
libjbigi.so
wrapper.log
keyBackup/privateEncryption.key
keyBackup/privateSigning.key
keyBackup/publicEncryption.key
keyBackup/publicSigning.key
logs/log-0.txt
router.info
router.keys.dat
prngseed.rnd
hostsdb.blockfile
logs/log-1.txt

2
Cargo.lock generated
View file

@ -1799,7 +1799,7 @@ version = "0.0.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "62bb907fe88d54d8d9ce32a3cceab4218ed2f6b7d35617cafe9adf84e43919cb"
dependencies = [
"libc 0.2.153",
"libc 0.1.12",
]
[[package]]

468
neveko-auth/Cargo.lock generated
View file

@ -17,7 +17,7 @@ version = "0.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311"
dependencies = [
"libc 0.2.140",
"libc 0.2.158",
]
[[package]]
@ -127,10 +127,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "383d29d513d8764dcdc42ea295d979eb99c3c9f00607b3692cf68a431f7dca72"
[[package]]
name = "bitflags"
version = "0.7.0"
name = "bincode"
version = "1.3.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "aad18937a628ec6abcd26d1489012cc0e18c21798210f491af69ded9b881106d"
checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad"
dependencies = [
"serde",
]
[[package]]
name = "bitflags"
@ -140,9 +143,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
[[package]]
name = "bitflags"
version = "2.0.2"
version = "2.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "487f1e0fcbe47deb8b0574e646def1c903389d95241dd1bbcc6ce4a715dfc0c1"
checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de"
[[package]]
name = "block-buffer"
@ -180,6 +183,12 @@ version = "1.0.79"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f"
[[package]]
name = "cesu8"
version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6d43a04d8753f35258c91f8ec639f792891f748a1edbd759cf1dcea3382ad83c"
[[package]]
name = "cfg-if"
version = "1.0.0"
@ -286,7 +295,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "194a7a9e6de53fa55116934067c844d9d749312f75c6f6d0980e8c252f8c2146"
dependencies = [
"core-foundation-sys",
"libc 0.2.140",
"libc 0.2.158",
]
[[package]]
@ -301,9 +310,34 @@ version = "0.2.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "280a9f2d8b3a38871a3c8a46fb80db65e5e5ed97da80c4d08bf27fb63e35e181"
dependencies = [
"libc 0.2.140",
"libc 0.2.158",
]
[[package]]
name = "crossbeam-deque"
version = "0.8.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "613f8cc01fe9cf1a3eb3d7f488fd2fa8388403e97039e2f73692932e291a770d"
dependencies = [
"crossbeam-epoch",
"crossbeam-utils",
]
[[package]]
name = "crossbeam-epoch"
version = "0.9.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e"
dependencies = [
"crossbeam-utils",
]
[[package]]
name = "crossbeam-utils"
version = "0.8.20"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80"
[[package]]
name = "crypto-common"
version = "0.1.6"
@ -316,15 +350,14 @@ dependencies = [
[[package]]
name = "curve25519-dalek"
version = "4.1.2"
version = "4.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0a677b8922c94e01bdbb12126b0bc852f00447528dee1782229af9c720c3f348"
checksum = "97fb8b7c4503de7d6ae7b42ab72a5a59857b4c937ec27a3d4539dba95b5ab2be"
dependencies = [
"cfg-if",
"cpufeatures",
"curve25519-dalek-derive",
"fiat-crypto",
"platforms",
"rustc_version",
"subtle",
"zeroize",
@ -411,7 +444,7 @@ version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "35b50dba0afdca80b187392b24f2499a88c336d5a8493e4b4ccfb608708be56a"
dependencies = [
"bitflags 2.0.2",
"bitflags 2.6.0",
"proc-macro2",
"proc-macro2-diagnostics",
"quote",
@ -463,6 +496,12 @@ dependencies = [
"url",
]
[[package]]
name = "dunce"
version = "1.0.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813"
[[package]]
name = "either"
version = "1.8.1"
@ -486,7 +525,7 @@ checksum = "85cdab6a89accf66733ad5a1693a4dcced6aeff64602b634530dd73c1f3ee9f0"
dependencies = [
"humantime",
"is-terminal",
"log 0.4.17",
"log",
"regex",
"termcolor",
]
@ -498,7 +537,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "50d6a0976c999d473fe89ad888d5a284e55366d9dc9038b1ba2aa15128c4afa0"
dependencies = [
"errno-dragonfly",
"libc 0.2.140",
"libc 0.2.158",
"windows-sys 0.45.0",
]
@ -509,7 +548,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "aa68f1b12764fab894d2755d2518754e71b4fd80ecfb822714a1206c2aab39bf"
dependencies = [
"cc",
"libc 0.2.140",
"libc 0.2.158",
]
[[package]]
@ -571,6 +610,12 @@ dependencies = [
"percent-encoding",
]
[[package]]
name = "fs_extra"
version = "1.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "42703706b716c37f96a77aea830392ad231f44c9e9a67872fa5548707e11b11c"
[[package]]
name = "futures"
version = "0.3.27"
@ -579,6 +624,7 @@ checksum = "531ac96c6ff5fd7c62263c5e3c67a603af4fcaee2e1a0ae5565ba3a11e69e549"
dependencies = [
"futures-channel",
"futures-core",
"futures-executor",
"futures-io",
"futures-sink",
"futures-task",
@ -601,12 +647,34 @@ version = "0.3.27"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "86d7a0c1aa76363dac491de0ee99faf6941128376f1cf96f07db7603b7de69dd"
[[package]]
name = "futures-executor"
version = "0.3.27"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1997dd9df74cdac935c76252744c1ed5794fac083242ea4fe77ef3ed60ba0f83"
dependencies = [
"futures-core",
"futures-task",
"futures-util",
]
[[package]]
name = "futures-io"
version = "0.3.27"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "89d422fa3cbe3b40dca574ab087abb5bc98258ea57eea3fd6f1fa7162c778b91"
[[package]]
name = "futures-macro"
version = "0.3.27"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3eb14ed937631bd8b8b8977f2c198443447a8355b6e3ca599f38c975e5a963b6"
dependencies = [
"proc-macro2",
"quote",
"syn 1.0.109",
]
[[package]]
name = "futures-sink"
version = "0.3.27"
@ -628,6 +696,7 @@ dependencies = [
"futures-channel",
"futures-core",
"futures-io",
"futures-macro",
"futures-sink",
"futures-task",
"memchr",
@ -649,8 +718,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "33a20a288a94683f5f4da0adecdbe095c94a77c295e514cc6484e9394dd8376e"
dependencies = [
"cc",
"libc 0.2.140",
"log 0.4.17",
"libc 0.2.158",
"log",
"rustversion",
"windows 0.44.0",
]
@ -672,7 +741,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c05aeb6a22b8f62540c194aac980f2115af067bfe15a0734d7277a768d396b31"
dependencies = [
"cfg-if",
"libc 0.2.140",
"libc 0.2.158",
"wasi 0.11.0+wasi-snapshot-preview1",
]
@ -719,7 +788,7 @@ version = "0.2.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ee512640fe35acbfb4bb779db6f0d80704c2cacfa2e39b601ef3e3f47d1ae4c7"
dependencies = [
"libc 0.2.140",
"libc 0.2.158",
]
[[package]]
@ -887,7 +956,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "09270fd4fa1111bc614ed2246c7ef56239a3063d5be0d1ec3b589c505d400aeb"
dependencies = [
"hermit-abi 0.3.1",
"libc 0.2.140",
"libc 0.2.158",
"windows-sys 0.45.0",
]
@ -915,6 +984,67 @@ version = "1.0.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "453ad9f582a441959e5f0d088b02ce04cfe8d51a8eaf077f12ac6d3e94164ca6"
[[package]]
name = "j4-i2p-rs"
version = "0.2.0-alpha"
dependencies = [
"hex",
"j4rs",
"log",
"rand",
"thiserror",
]
[[package]]
name = "j4rs"
version = "0.20.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "689ae4f2bd4eba82601592f3d22b7e7147b1df52d3b525223f5218990501b4eb"
dependencies = [
"cesu8",
"dunce",
"fs_extra",
"futures",
"glob",
"java-locator",
"jni-sys",
"lazy_static 1.4.0",
"libc 0.2.158",
"libloading",
"log",
"serde",
"serde_json",
]
[[package]]
name = "java-locator"
version = "0.1.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d2abecabd9961c5e01405a6426687fcf1bd94a269927137e4c3cc1a7419b93fd"
dependencies = [
"glob",
"lazy_static 1.4.0",
]
[[package]]
name = "jni-sys"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c30a312d782b8d56a1e0897d45c1af33f31f9b4a4d13d31207a8675e0223b818"
dependencies = [
"jni-sys-macros",
]
[[package]]
name = "jni-sys-macros"
version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e6c199962dfd5610ced8eca382606e349f7940a4ac7d867b58a046123411cbb4"
dependencies = [
"quote",
"syn 1.0.109",
]
[[package]]
name = "js-sys"
version = "0.3.61"
@ -939,6 +1069,18 @@ dependencies = [
"sha2 0.10.6",
]
[[package]]
name = "kn0sys-lmdb-rs"
version = "0.1.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "58fbf491e9e95a325cbfe1459734cec781c0145c0d5cb7c4ced71af742364d19"
dependencies = [
"bitflags 2.6.0",
"libc 0.2.158",
"liblmdb-sys",
"log",
]
[[package]]
name = "lazy_static"
version = "0.2.11"
@ -959,9 +1101,9 @@ checksum = "e32a70cf75e5846d53a673923498228bbec6a8624708a9ea5645f075d6276122"
[[package]]
name = "libc"
version = "0.2.140"
version = "0.2.158"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "99227334921fae1a979cf0bfdfcc6b3e5ce376ef57e16fb6fb3ea2ed6095f80c"
checksum = "d8adc4bb1803a324070e64a98ae98f38934d91957a99cfb3a43dcbc01bc56439"
[[package]]
name = "liblmdb-sys"
@ -970,7 +1112,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "feed38a3a580f60bf61aaa067b0ff4123395966839adeaf67258a9e50c4d2e49"
dependencies = [
"gcc",
"libc 0.2.140",
"libc 0.2.158",
]
[[package]]
name = "libloading"
version = "0.8.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4979f22fdb869068da03c9f7528f8297c6fd2606bc3a4affe42e6a823fdb8da4"
dependencies = [
"cfg-if",
"windows-targets 0.52.6",
]
[[package]]
@ -988,18 +1140,6 @@ version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cd550e73688e6d578f0ac2119e32b797a327631a42f9433e59d02e139c8df60d"
[[package]]
name = "lmdb-rs"
version = "0.7.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4aefe7b433f795629ce42f35ccf7a620c38bd457238bfaa2489dafc7e36167e7"
dependencies = [
"bitflags 0.7.0",
"libc 0.2.140",
"liblmdb-sys",
"log 0.3.9",
]
[[package]]
name = "lock_api"
version = "0.4.9"
@ -1012,21 +1152,9 @@ dependencies = [
[[package]]
name = "log"
version = "0.3.9"
version = "0.4.22"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e19e8d5c34a3e0e2223db8e060f9e8264aeeb5c5fc64a4ee9965c062211c024b"
dependencies = [
"log 0.4.17",
]
[[package]]
name = "log"
version = "0.4.17"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e"
dependencies = [
"cfg-if",
]
checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24"
[[package]]
name = "loom"
@ -1081,8 +1209,8 @@ version = "0.8.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5b9d9a46eff5b4ff64b45a9e316a6d1e0bc719ef429cbec4dc630684212bfdf9"
dependencies = [
"libc 0.2.140",
"log 0.4.17",
"libc 0.2.158",
"log",
"wasi 0.11.0+wasi-snapshot-preview1",
"windows-sys 0.45.0",
]
@ -1098,7 +1226,7 @@ dependencies = [
"futures-util",
"http",
"httparse",
"log 0.4.17",
"log",
"memchr",
"mime",
"spin",
@ -1114,8 +1242,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "07226173c32f2926027b63cce4bcd8076c3552846cbe7925f3aaffeac0a3b92e"
dependencies = [
"lazy_static 1.4.0",
"libc 0.2.140",
"log 0.4.17",
"libc 0.2.158",
"log",
"openssl",
"openssl-probe",
"openssl-sys",
@ -1130,7 +1258,7 @@ name = "neveko_auth"
version = "0.1.2-beta"
dependencies = [
"env_logger",
"log 0.4.17",
"log",
"neveko_core",
"rocket",
]
@ -1139,6 +1267,7 @@ dependencies = [
name = "neveko_core"
version = "0.1.2-beta"
dependencies = [
"bincode",
"chrono",
"clap",
"curve25519-dalek",
@ -1146,10 +1275,11 @@ dependencies = [
"env_logger",
"hex",
"hmac",
"j4-i2p-rs",
"jwt",
"kn0sys-lmdb-rs",
"lazy_static 1.4.0",
"lmdb-rs",
"log 0.4.17",
"log",
"num",
"rand",
"rand_core",
@ -1160,9 +1290,20 @@ dependencies = [
"serde",
"serde_json",
"sha2 0.10.6",
"sysinfo",
"thiserror",
"tokio",
]
[[package]]
name = "ntapi"
version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e8a3895c6391c39d7fe7ebc444a87eb2991b2a0bc718fdabd071eec617fc68e4"
dependencies = [
"winapi",
]
[[package]]
name = "nu-ansi-term"
version = "0.46.0"
@ -1256,7 +1397,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0fac9e2da13b5eb447a6ce3d392f23a29d8694bff781bf03a16cd9ac8697593b"
dependencies = [
"hermit-abi 0.2.6",
"libc 0.2.140",
"libc 0.2.158",
]
[[package]]
@ -1280,7 +1421,7 @@ dependencies = [
"bitflags 1.3.2",
"cfg-if",
"foreign-types",
"libc 0.2.140",
"libc 0.2.158",
"once_cell",
"openssl-macros",
"openssl-sys",
@ -1311,7 +1452,7 @@ checksum = "666416d899cf077260dac8698d60a60b435a46d57e82acb1be3d0dad87284e5b"
dependencies = [
"autocfg",
"cc",
"libc 0.2.140",
"libc 0.2.158",
"pkg-config",
"vcpkg",
]
@ -1339,7 +1480,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9069cbb9f99e3a5083476ccb29ceb1de18b9118cafa53e90c9551235de2b9521"
dependencies = [
"cfg-if",
"libc 0.2.140",
"libc 0.2.158",
"redox_syscall 0.2.16",
"smallvec",
"windows-sys 0.45.0",
@ -1392,12 +1533,6 @@ version = "0.3.26"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6ac9a59f73473f1b8d852421e59e64809f025994837ef743615c6d0c5b305160"
[[package]]
name = "platforms"
version = "3.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "db23d408679286588f4d4644f965003d056e3dd5abcaaa938116871d7ce2fee7"
[[package]]
name = "ppv-lite86"
version = "0.2.17"
@ -1441,7 +1576,7 @@ version = "0.8.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404"
dependencies = [
"libc 0.2.140",
"libc 0.2.158",
"rand_chacha",
"rand_core",
]
@ -1465,6 +1600,26 @@ dependencies = [
"getrandom",
]
[[package]]
name = "rayon"
version = "1.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b418a60154510ca1a002a752ca9714984e21e4241e804d32555251faf8b78ffa"
dependencies = [
"either",
"rayon-core",
]
[[package]]
name = "rayon-core"
version = "1.12.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1465873a3dfdaa8ae7cb14b4383657caab0b3e8a0aa9ae8e04b044854c8dfce2"
dependencies = [
"crossbeam-deque",
"crossbeam-utils",
]
[[package]]
name = "redox_syscall"
version = "0.2.16"
@ -1547,7 +1702,7 @@ dependencies = [
"hyper-tls",
"ipnet",
"js-sys",
"log 0.4.17",
"log",
"mime",
"native-tls",
"once_cell",
@ -1582,7 +1737,7 @@ dependencies = [
"futures",
"indexmap",
"is-terminal",
"log 0.4.17",
"log",
"memchr",
"multer",
"num_cpus",
@ -1633,7 +1788,7 @@ dependencies = [
"http",
"hyper",
"indexmap",
"log 0.4.17",
"log",
"memchr",
"pear",
"percent-encoding",
@ -1676,7 +1831,7 @@ dependencies = [
"bitflags 1.3.2",
"errno",
"io-lifetimes",
"libc 0.2.140",
"libc 0.2.158",
"linux-raw-sys",
"windows-sys 0.45.0",
]
@ -1738,7 +1893,7 @@ dependencies = [
"bitflags 1.3.2",
"core-foundation",
"core-foundation-sys",
"libc 0.2.140",
"libc 0.2.158",
"security-framework-sys",
]
@ -1749,7 +1904,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "31c9bb296072e961fcbd8853511dd39c2d8be2deb1e17c6860b1d30732b323b4"
dependencies = [
"core-foundation-sys",
"libc 0.2.140",
"libc 0.2.158",
]
[[package]]
@ -1840,7 +1995,7 @@ version = "1.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d8229b473baa5980ac72ef434c4415e70c4b5e71b423043adb4ba059f89c99a1"
dependencies = [
"libc 0.2.140",
"libc 0.2.158",
]
[[package]]
@ -1864,7 +2019,7 @@ version = "0.4.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "64a4a911eed85daf18834cfaa86a79b7d266ff93ff5ba14005426219480ed662"
dependencies = [
"libc 0.2.140",
"libc 0.2.158",
"winapi",
]
@ -1926,6 +2081,20 @@ dependencies = [
"unicode-ident",
]
[[package]]
name = "sysinfo"
version = "0.31.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "355dbe4f8799b304b05e1b0f05fc59b2a18d36645cf169607da45bde2f69a1be"
dependencies = [
"core-foundation-sys",
"libc 0.2.158",
"memchr",
"ntapi",
"rayon",
"windows 0.57.0",
]
[[package]]
name = "tempfile"
version = "3.5.0"
@ -1957,6 +2126,26 @@ dependencies = [
"libc 0.1.12",
]
[[package]]
name = "thiserror"
version = "1.0.63"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c0342370b38b6a11b6cc11d6a805569958d54cfa061a29969c3b5ce2ea405724"
dependencies = [
"thiserror-impl",
]
[[package]]
name = "thiserror-impl"
version = "1.0.63"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.58",
]
[[package]]
name = "thread_local"
version = "1.1.7"
@ -1973,7 +2162,7 @@ version = "0.1.45"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1b797afad3f312d1c66a56d11d0316f916356d11bd158fbc6ca6389ff6bf805a"
dependencies = [
"libc 0.2.140",
"libc 0.2.158",
"wasi 0.10.0+wasi-snapshot-preview1",
"winapi",
]
@ -2028,7 +2217,7 @@ checksum = "d0de47a4eecbe11f498978a9b29d792f0d2692d1dd003650c24c76510e3bc001"
dependencies = [
"autocfg",
"bytes",
"libc 0.2.140",
"libc 0.2.158",
"mio",
"num_cpus",
"pin-project-lite",
@ -2139,7 +2328,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "78ddad33d2d10b1ed7eb9d1f518a5674713876e97e5bb9b7345a7984fbb4f922"
dependencies = [
"lazy_static 1.4.0",
"log 0.4.17",
"log",
"tracing-core",
]
@ -2266,7 +2455,7 @@ version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1ce8a968cb1cd110d136ff8b819a556d6fb6d919363c61534f6860c7eb172ba0"
dependencies = [
"log 0.4.17",
"log",
"try-lock",
]
@ -2299,7 +2488,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "95ce90fd5bcc06af55a641a86428ee4229e44e07033963a2290a8e241607ccb9"
dependencies = [
"bumpalo",
"log 0.4.17",
"log",
"once_cell",
"proc-macro2",
"quote",
@ -2407,6 +2596,59 @@ dependencies = [
"windows-targets 0.47.0",
]
[[package]]
name = "windows"
version = "0.57.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "12342cb4d8e3b046f3d80effd474a7a02447231330ef77d71daa6fbc40681143"
dependencies = [
"windows-core",
"windows-targets 0.52.6",
]
[[package]]
name = "windows-core"
version = "0.57.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d2ed2439a290666cd67ecce2b0ffaad89c2a56b976b736e6ece670297897832d"
dependencies = [
"windows-implement",
"windows-interface",
"windows-result",
"windows-targets 0.52.6",
]
[[package]]
name = "windows-implement"
version = "0.57.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9107ddc059d5b6fbfbffdfa7a7fe3e22a226def0b2608f72e9d552763d3e1ad7"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.58",
]
[[package]]
name = "windows-interface"
version = "0.57.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "29bee4b38ea3cde66011baa44dba677c432a78593e202392d1e9070cf2a7fca7"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.58",
]
[[package]]
name = "windows-result"
version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5e383302e8ec8515204254685643de10811af0ed97ea37210dc26fb0032647f8"
dependencies = [
"windows-targets 0.52.6",
]
[[package]]
name = "windows-sys"
version = "0.42.0"
@ -2461,6 +2703,22 @@ dependencies = [
"windows_x86_64_msvc 0.47.0",
]
[[package]]
name = "windows-targets"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973"
dependencies = [
"windows_aarch64_gnullvm 0.52.6",
"windows_aarch64_msvc 0.52.6",
"windows_i686_gnu 0.52.6",
"windows_i686_gnullvm",
"windows_i686_msvc 0.52.6",
"windows_x86_64_gnu 0.52.6",
"windows_x86_64_gnullvm 0.52.6",
"windows_x86_64_msvc 0.52.6",
]
[[package]]
name = "windows_aarch64_gnullvm"
version = "0.42.2"
@ -2473,6 +2731,12 @@ version = "0.47.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "831d567d53d4f3cb1db332b68e6e2b6260228eb4d99a777d8b2e8ed794027c90"
[[package]]
name = "windows_aarch64_gnullvm"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3"
[[package]]
name = "windows_aarch64_msvc"
version = "0.42.2"
@ -2485,6 +2749,12 @@ version = "0.47.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6a42d54a417c60ce4f0e31661eed628f0fa5aca73448c093ec4d45fab4c51cdf"
[[package]]
name = "windows_aarch64_msvc"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469"
[[package]]
name = "windows_i686_gnu"
version = "0.42.2"
@ -2497,6 +2767,18 @@ version = "0.47.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c1925beafdbb22201a53a483db861a5644123157c1c3cee83323a2ed565d71e3"
[[package]]
name = "windows_i686_gnu"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b"
[[package]]
name = "windows_i686_gnullvm"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66"
[[package]]
name = "windows_i686_msvc"
version = "0.42.2"
@ -2509,6 +2791,12 @@ version = "0.47.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3a8ef8f2f1711b223947d9b69b596cf5a4e452c930fb58b6fc3fdae7d0ec6b31"
[[package]]
name = "windows_i686_msvc"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66"
[[package]]
name = "windows_x86_64_gnu"
version = "0.42.2"
@ -2521,6 +2809,12 @@ version = "0.47.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7acaa0c2cf0d2ef99b61c308a0c3dbae430a51b7345dedec470bd8f53f5a3642"
[[package]]
name = "windows_x86_64_gnu"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78"
[[package]]
name = "windows_x86_64_gnullvm"
version = "0.42.2"
@ -2533,6 +2827,12 @@ version = "0.47.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e5a0628f71be1d11e17ca4a0e9e15b3a5180f6fbf1c2d55e3ba3f850378052c1"
[[package]]
name = "windows_x86_64_gnullvm"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d"
[[package]]
name = "windows_x86_64_msvc"
version = "0.42.2"
@ -2545,6 +2845,12 @@ version = "0.47.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9d6e62c256dc6d40b8c8707df17df8d774e60e39db723675241e7c15e910bce7"
[[package]]
name = "windows_x86_64_msvc"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec"
[[package]]
name = "winreg"
version = "0.10.1"

View file

@ -17,7 +17,7 @@ version = "0.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311"
dependencies = [
"libc 0.2.140",
"libc 0.2.158",
]
[[package]]
@ -127,10 +127,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "383d29d513d8764dcdc42ea295d979eb99c3c9f00607b3692cf68a431f7dca72"
[[package]]
name = "bitflags"
version = "0.7.0"
name = "bincode"
version = "1.3.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "aad18937a628ec6abcd26d1489012cc0e18c21798210f491af69ded9b881106d"
checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad"
dependencies = [
"serde",
]
[[package]]
name = "bitflags"
@ -140,9 +143,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
[[package]]
name = "bitflags"
version = "2.0.2"
version = "2.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "487f1e0fcbe47deb8b0574e646def1c903389d95241dd1bbcc6ce4a715dfc0c1"
checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de"
[[package]]
name = "block-buffer"
@ -180,6 +183,12 @@ version = "1.0.79"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f"
[[package]]
name = "cesu8"
version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6d43a04d8753f35258c91f8ec639f792891f748a1edbd759cf1dcea3382ad83c"
[[package]]
name = "cfg-if"
version = "1.0.0"
@ -286,7 +295,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "194a7a9e6de53fa55116934067c844d9d749312f75c6f6d0980e8c252f8c2146"
dependencies = [
"core-foundation-sys",
"libc 0.2.140",
"libc 0.2.158",
]
[[package]]
@ -301,9 +310,34 @@ version = "0.2.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "280a9f2d8b3a38871a3c8a46fb80db65e5e5ed97da80c4d08bf27fb63e35e181"
dependencies = [
"libc 0.2.140",
"libc 0.2.158",
]
[[package]]
name = "crossbeam-deque"
version = "0.8.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "613f8cc01fe9cf1a3eb3d7f488fd2fa8388403e97039e2f73692932e291a770d"
dependencies = [
"crossbeam-epoch",
"crossbeam-utils",
]
[[package]]
name = "crossbeam-epoch"
version = "0.9.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e"
dependencies = [
"crossbeam-utils",
]
[[package]]
name = "crossbeam-utils"
version = "0.8.20"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80"
[[package]]
name = "crypto-common"
version = "0.1.6"
@ -316,15 +350,14 @@ dependencies = [
[[package]]
name = "curve25519-dalek"
version = "4.1.2"
version = "4.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0a677b8922c94e01bdbb12126b0bc852f00447528dee1782229af9c720c3f348"
checksum = "97fb8b7c4503de7d6ae7b42ab72a5a59857b4c937ec27a3d4539dba95b5ab2be"
dependencies = [
"cfg-if",
"cpufeatures",
"curve25519-dalek-derive",
"fiat-crypto",
"platforms",
"rustc_version",
"subtle",
"zeroize",
@ -411,7 +444,7 @@ version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "35b50dba0afdca80b187392b24f2499a88c336d5a8493e4b4ccfb608708be56a"
dependencies = [
"bitflags 2.0.2",
"bitflags 2.6.0",
"proc-macro2",
"proc-macro2-diagnostics",
"quote",
@ -463,6 +496,12 @@ dependencies = [
"url",
]
[[package]]
name = "dunce"
version = "1.0.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813"
[[package]]
name = "either"
version = "1.8.1"
@ -486,7 +525,7 @@ checksum = "85cdab6a89accf66733ad5a1693a4dcced6aeff64602b634530dd73c1f3ee9f0"
dependencies = [
"humantime",
"is-terminal",
"log 0.4.17",
"log",
"regex",
"termcolor",
]
@ -498,7 +537,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "50d6a0976c999d473fe89ad888d5a284e55366d9dc9038b1ba2aa15128c4afa0"
dependencies = [
"errno-dragonfly",
"libc 0.2.140",
"libc 0.2.158",
"windows-sys 0.45.0",
]
@ -509,7 +548,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "aa68f1b12764fab894d2755d2518754e71b4fd80ecfb822714a1206c2aab39bf"
dependencies = [
"cc",
"libc 0.2.140",
"libc 0.2.158",
]
[[package]]
@ -571,6 +610,12 @@ dependencies = [
"percent-encoding",
]
[[package]]
name = "fs_extra"
version = "1.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "42703706b716c37f96a77aea830392ad231f44c9e9a67872fa5548707e11b11c"
[[package]]
name = "futures"
version = "0.3.28"
@ -579,6 +624,7 @@ checksum = "23342abe12aba583913b2e62f22225ff9c950774065e4bfb61a19cd9770fec40"
dependencies = [
"futures-channel",
"futures-core",
"futures-executor",
"futures-io",
"futures-sink",
"futures-task",
@ -601,12 +647,34 @@ version = "0.3.28"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4bca583b7e26f571124fe5b7561d49cb2868d79116cfa0eefce955557c6fee8c"
[[package]]
name = "futures-executor"
version = "0.3.28"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ccecee823288125bd88b4d7f565c9e58e41858e47ab72e8ea2d64e93624386e0"
dependencies = [
"futures-core",
"futures-task",
"futures-util",
]
[[package]]
name = "futures-io"
version = "0.3.28"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4fff74096e71ed47f8e023204cfd0aa1289cd54ae5430a9523be060cdb849964"
[[package]]
name = "futures-macro"
version = "0.3.28"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.58",
]
[[package]]
name = "futures-sink"
version = "0.3.28"
@ -628,6 +696,7 @@ dependencies = [
"futures-channel",
"futures-core",
"futures-io",
"futures-macro",
"futures-sink",
"futures-task",
"memchr",
@ -649,8 +718,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "33a20a288a94683f5f4da0adecdbe095c94a77c295e514cc6484e9394dd8376e"
dependencies = [
"cc",
"libc 0.2.140",
"log 0.4.17",
"libc 0.2.158",
"log",
"rustversion",
"windows 0.44.0",
]
@ -672,7 +741,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c05aeb6a22b8f62540c194aac980f2115af067bfe15a0734d7277a768d396b31"
dependencies = [
"cfg-if",
"libc 0.2.140",
"libc 0.2.158",
"wasi 0.11.0+wasi-snapshot-preview1",
]
@ -719,7 +788,7 @@ version = "0.2.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ee512640fe35acbfb4bb779db6f0d80704c2cacfa2e39b601ef3e3f47d1ae4c7"
dependencies = [
"libc 0.2.140",
"libc 0.2.158",
]
[[package]]
@ -887,7 +956,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "09270fd4fa1111bc614ed2246c7ef56239a3063d5be0d1ec3b589c505d400aeb"
dependencies = [
"hermit-abi 0.3.1",
"libc 0.2.140",
"libc 0.2.158",
"windows-sys 0.45.0",
]
@ -915,6 +984,67 @@ version = "1.0.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "453ad9f582a441959e5f0d088b02ce04cfe8d51a8eaf077f12ac6d3e94164ca6"
[[package]]
name = "j4-i2p-rs"
version = "0.2.0-alpha"
dependencies = [
"hex",
"j4rs",
"log",
"rand",
"thiserror",
]
[[package]]
name = "j4rs"
version = "0.20.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "689ae4f2bd4eba82601592f3d22b7e7147b1df52d3b525223f5218990501b4eb"
dependencies = [
"cesu8",
"dunce",
"fs_extra",
"futures",
"glob",
"java-locator",
"jni-sys",
"lazy_static 1.4.0",
"libc 0.2.158",
"libloading",
"log",
"serde",
"serde_json",
]
[[package]]
name = "java-locator"
version = "0.1.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d2abecabd9961c5e01405a6426687fcf1bd94a269927137e4c3cc1a7419b93fd"
dependencies = [
"glob",
"lazy_static 1.4.0",
]
[[package]]
name = "jni-sys"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c30a312d782b8d56a1e0897d45c1af33f31f9b4a4d13d31207a8675e0223b818"
dependencies = [
"jni-sys-macros",
]
[[package]]
name = "jni-sys-macros"
version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e6c199962dfd5610ced8eca382606e349f7940a4ac7d867b58a046123411cbb4"
dependencies = [
"quote",
"syn 1.0.109",
]
[[package]]
name = "js-sys"
version = "0.3.61"
@ -939,6 +1069,18 @@ dependencies = [
"sha2 0.10.6",
]
[[package]]
name = "kn0sys-lmdb-rs"
version = "0.1.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "58fbf491e9e95a325cbfe1459734cec781c0145c0d5cb7c4ced71af742364d19"
dependencies = [
"bitflags 2.6.0",
"libc 0.2.158",
"liblmdb-sys",
"log",
]
[[package]]
name = "lazy_static"
version = "0.2.11"
@ -959,9 +1101,9 @@ checksum = "e32a70cf75e5846d53a673923498228bbec6a8624708a9ea5645f075d6276122"
[[package]]
name = "libc"
version = "0.2.140"
version = "0.2.158"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "99227334921fae1a979cf0bfdfcc6b3e5ce376ef57e16fb6fb3ea2ed6095f80c"
checksum = "d8adc4bb1803a324070e64a98ae98f38934d91957a99cfb3a43dcbc01bc56439"
[[package]]
name = "liblmdb-sys"
@ -970,7 +1112,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "feed38a3a580f60bf61aaa067b0ff4123395966839adeaf67258a9e50c4d2e49"
dependencies = [
"gcc",
"libc 0.2.140",
"libc 0.2.158",
]
[[package]]
name = "libloading"
version = "0.8.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4979f22fdb869068da03c9f7528f8297c6fd2606bc3a4affe42e6a823fdb8da4"
dependencies = [
"cfg-if",
"windows-targets 0.52.6",
]
[[package]]
@ -988,18 +1140,6 @@ version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d59d8c75012853d2e872fb56bc8a2e53718e2cafe1a4c823143141c6d90c322f"
[[package]]
name = "lmdb-rs"
version = "0.7.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4aefe7b433f795629ce42f35ccf7a620c38bd457238bfaa2489dafc7e36167e7"
dependencies = [
"bitflags 0.7.0",
"libc 0.2.140",
"liblmdb-sys",
"log 0.3.9",
]
[[package]]
name = "lock_api"
version = "0.4.9"
@ -1012,21 +1152,9 @@ dependencies = [
[[package]]
name = "log"
version = "0.3.9"
version = "0.4.22"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e19e8d5c34a3e0e2223db8e060f9e8264aeeb5c5fc64a4ee9965c062211c024b"
dependencies = [
"log 0.4.17",
]
[[package]]
name = "log"
version = "0.4.17"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e"
dependencies = [
"cfg-if",
]
checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24"
[[package]]
name = "loom"
@ -1081,8 +1209,8 @@ version = "0.8.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5b9d9a46eff5b4ff64b45a9e316a6d1e0bc719ef429cbec4dc630684212bfdf9"
dependencies = [
"libc 0.2.140",
"log 0.4.17",
"libc 0.2.158",
"log",
"wasi 0.11.0+wasi-snapshot-preview1",
"windows-sys 0.45.0",
]
@ -1098,7 +1226,7 @@ dependencies = [
"futures-util",
"http",
"httparse",
"log 0.4.17",
"log",
"memchr",
"mime",
"spin",
@ -1114,8 +1242,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "07226173c32f2926027b63cce4bcd8076c3552846cbe7925f3aaffeac0a3b92e"
dependencies = [
"lazy_static 1.4.0",
"libc 0.2.140",
"log 0.4.17",
"libc 0.2.158",
"log",
"openssl",
"openssl-probe",
"openssl-sys",
@ -1130,7 +1258,7 @@ name = "neveko_contact"
version = "0.1.2-beta"
dependencies = [
"env_logger",
"log 0.4.17",
"log",
"neveko_core",
"rocket",
]
@ -1139,6 +1267,7 @@ dependencies = [
name = "neveko_core"
version = "0.1.2-beta"
dependencies = [
"bincode",
"chrono",
"clap",
"curve25519-dalek",
@ -1146,10 +1275,11 @@ dependencies = [
"env_logger",
"hex",
"hmac",
"j4-i2p-rs",
"jwt",
"kn0sys-lmdb-rs",
"lazy_static 1.4.0",
"lmdb-rs",
"log 0.4.17",
"log",
"num",
"rand",
"rand_core",
@ -1160,9 +1290,20 @@ dependencies = [
"serde",
"serde_json",
"sha2 0.10.6",
"sysinfo",
"thiserror",
"tokio",
]
[[package]]
name = "ntapi"
version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e8a3895c6391c39d7fe7ebc444a87eb2991b2a0bc718fdabd071eec617fc68e4"
dependencies = [
"winapi",
]
[[package]]
name = "nu-ansi-term"
version = "0.46.0"
@ -1256,7 +1397,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0fac9e2da13b5eb447a6ce3d392f23a29d8694bff781bf03a16cd9ac8697593b"
dependencies = [
"hermit-abi 0.2.6",
"libc 0.2.140",
"libc 0.2.158",
]
[[package]]
@ -1280,7 +1421,7 @@ dependencies = [
"bitflags 1.3.2",
"cfg-if",
"foreign-types",
"libc 0.2.140",
"libc 0.2.158",
"once_cell",
"openssl-macros",
"openssl-sys",
@ -1311,7 +1452,7 @@ checksum = "666416d899cf077260dac8698d60a60b435a46d57e82acb1be3d0dad87284e5b"
dependencies = [
"autocfg",
"cc",
"libc 0.2.140",
"libc 0.2.158",
"pkg-config",
"vcpkg",
]
@ -1339,7 +1480,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9069cbb9f99e3a5083476ccb29ceb1de18b9118cafa53e90c9551235de2b9521"
dependencies = [
"cfg-if",
"libc 0.2.140",
"libc 0.2.158",
"redox_syscall 0.2.16",
"smallvec",
"windows-sys 0.45.0",
@ -1392,12 +1533,6 @@ version = "0.3.26"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6ac9a59f73473f1b8d852421e59e64809f025994837ef743615c6d0c5b305160"
[[package]]
name = "platforms"
version = "3.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "db23d408679286588f4d4644f965003d056e3dd5abcaaa938116871d7ce2fee7"
[[package]]
name = "ppv-lite86"
version = "0.2.17"
@ -1441,7 +1576,7 @@ version = "0.8.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404"
dependencies = [
"libc 0.2.140",
"libc 0.2.158",
"rand_chacha",
"rand_core",
]
@ -1465,6 +1600,26 @@ dependencies = [
"getrandom",
]
[[package]]
name = "rayon"
version = "1.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b418a60154510ca1a002a752ca9714984e21e4241e804d32555251faf8b78ffa"
dependencies = [
"either",
"rayon-core",
]
[[package]]
name = "rayon-core"
version = "1.12.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1465873a3dfdaa8ae7cb14b4383657caab0b3e8a0aa9ae8e04b044854c8dfce2"
dependencies = [
"crossbeam-deque",
"crossbeam-utils",
]
[[package]]
name = "redox_syscall"
version = "0.2.16"
@ -1547,7 +1702,7 @@ dependencies = [
"hyper-tls",
"ipnet",
"js-sys",
"log 0.4.17",
"log",
"mime",
"native-tls",
"once_cell",
@ -1582,7 +1737,7 @@ dependencies = [
"futures",
"indexmap",
"is-terminal",
"log 0.4.17",
"log",
"memchr",
"multer",
"num_cpus",
@ -1633,7 +1788,7 @@ dependencies = [
"http",
"hyper",
"indexmap",
"log 0.4.17",
"log",
"memchr",
"pear",
"percent-encoding",
@ -1676,7 +1831,7 @@ dependencies = [
"bitflags 1.3.2",
"errno",
"io-lifetimes",
"libc 0.2.140",
"libc 0.2.158",
"linux-raw-sys",
"windows-sys 0.45.0",
]
@ -1738,7 +1893,7 @@ dependencies = [
"bitflags 1.3.2",
"core-foundation",
"core-foundation-sys",
"libc 0.2.140",
"libc 0.2.158",
"security-framework-sys",
]
@ -1749,7 +1904,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "31c9bb296072e961fcbd8853511dd39c2d8be2deb1e17c6860b1d30732b323b4"
dependencies = [
"core-foundation-sys",
"libc 0.2.140",
"libc 0.2.158",
]
[[package]]
@ -1840,7 +1995,7 @@ version = "1.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d8229b473baa5980ac72ef434c4415e70c4b5e71b423043adb4ba059f89c99a1"
dependencies = [
"libc 0.2.140",
"libc 0.2.158",
]
[[package]]
@ -1864,7 +2019,7 @@ version = "0.4.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "64a4a911eed85daf18834cfaa86a79b7d266ff93ff5ba14005426219480ed662"
dependencies = [
"libc 0.2.140",
"libc 0.2.158",
"winapi",
]
@ -1926,6 +2081,20 @@ dependencies = [
"unicode-ident",
]
[[package]]
name = "sysinfo"
version = "0.31.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "355dbe4f8799b304b05e1b0f05fc59b2a18d36645cf169607da45bde2f69a1be"
dependencies = [
"core-foundation-sys",
"libc 0.2.158",
"memchr",
"ntapi",
"rayon",
"windows 0.57.0",
]
[[package]]
name = "tempfile"
version = "3.5.0"
@ -1957,6 +2126,26 @@ dependencies = [
"libc 0.1.12",
]
[[package]]
name = "thiserror"
version = "1.0.63"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c0342370b38b6a11b6cc11d6a805569958d54cfa061a29969c3b5ce2ea405724"
dependencies = [
"thiserror-impl",
]
[[package]]
name = "thiserror-impl"
version = "1.0.63"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.58",
]
[[package]]
name = "thread_local"
version = "1.1.7"
@ -1973,7 +2162,7 @@ version = "0.1.45"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1b797afad3f312d1c66a56d11d0316f916356d11bd158fbc6ca6389ff6bf805a"
dependencies = [
"libc 0.2.140",
"libc 0.2.158",
"wasi 0.10.0+wasi-snapshot-preview1",
"winapi",
]
@ -2028,7 +2217,7 @@ checksum = "d0de47a4eecbe11f498978a9b29d792f0d2692d1dd003650c24c76510e3bc001"
dependencies = [
"autocfg",
"bytes",
"libc 0.2.140",
"libc 0.2.158",
"mio",
"num_cpus",
"pin-project-lite",
@ -2139,7 +2328,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "78ddad33d2d10b1ed7eb9d1f518a5674713876e97e5bb9b7345a7984fbb4f922"
dependencies = [
"lazy_static 1.4.0",
"log 0.4.17",
"log",
"tracing-core",
]
@ -2266,7 +2455,7 @@ version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1ce8a968cb1cd110d136ff8b819a556d6fb6d919363c61534f6860c7eb172ba0"
dependencies = [
"log 0.4.17",
"log",
"try-lock",
]
@ -2299,7 +2488,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "95ce90fd5bcc06af55a641a86428ee4229e44e07033963a2290a8e241607ccb9"
dependencies = [
"bumpalo",
"log 0.4.17",
"log",
"once_cell",
"proc-macro2",
"quote",
@ -2407,6 +2596,59 @@ dependencies = [
"windows-targets 0.47.0",
]
[[package]]
name = "windows"
version = "0.57.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "12342cb4d8e3b046f3d80effd474a7a02447231330ef77d71daa6fbc40681143"
dependencies = [
"windows-core",
"windows-targets 0.52.6",
]
[[package]]
name = "windows-core"
version = "0.57.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d2ed2439a290666cd67ecce2b0ffaad89c2a56b976b736e6ece670297897832d"
dependencies = [
"windows-implement",
"windows-interface",
"windows-result",
"windows-targets 0.52.6",
]
[[package]]
name = "windows-implement"
version = "0.57.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9107ddc059d5b6fbfbffdfa7a7fe3e22a226def0b2608f72e9d552763d3e1ad7"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.58",
]
[[package]]
name = "windows-interface"
version = "0.57.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "29bee4b38ea3cde66011baa44dba677c432a78593e202392d1e9070cf2a7fca7"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.58",
]
[[package]]
name = "windows-result"
version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5e383302e8ec8515204254685643de10811af0ed97ea37210dc26fb0032647f8"
dependencies = [
"windows-targets 0.52.6",
]
[[package]]
name = "windows-sys"
version = "0.42.0"
@ -2461,6 +2703,22 @@ dependencies = [
"windows_x86_64_msvc 0.47.0",
]
[[package]]
name = "windows-targets"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973"
dependencies = [
"windows_aarch64_gnullvm 0.52.6",
"windows_aarch64_msvc 0.52.6",
"windows_i686_gnu 0.52.6",
"windows_i686_gnullvm",
"windows_i686_msvc 0.52.6",
"windows_x86_64_gnu 0.52.6",
"windows_x86_64_gnullvm 0.52.6",
"windows_x86_64_msvc 0.52.6",
]
[[package]]
name = "windows_aarch64_gnullvm"
version = "0.42.2"
@ -2473,6 +2731,12 @@ version = "0.47.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "831d567d53d4f3cb1db332b68e6e2b6260228eb4d99a777d8b2e8ed794027c90"
[[package]]
name = "windows_aarch64_gnullvm"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3"
[[package]]
name = "windows_aarch64_msvc"
version = "0.42.2"
@ -2485,6 +2749,12 @@ version = "0.47.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6a42d54a417c60ce4f0e31661eed628f0fa5aca73448c093ec4d45fab4c51cdf"
[[package]]
name = "windows_aarch64_msvc"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469"
[[package]]
name = "windows_i686_gnu"
version = "0.42.2"
@ -2497,6 +2767,18 @@ version = "0.47.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c1925beafdbb22201a53a483db861a5644123157c1c3cee83323a2ed565d71e3"
[[package]]
name = "windows_i686_gnu"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b"
[[package]]
name = "windows_i686_gnullvm"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66"
[[package]]
name = "windows_i686_msvc"
version = "0.42.2"
@ -2509,6 +2791,12 @@ version = "0.47.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3a8ef8f2f1711b223947d9b69b596cf5a4e452c930fb58b6fc3fdae7d0ec6b31"
[[package]]
name = "windows_i686_msvc"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66"
[[package]]
name = "windows_x86_64_gnu"
version = "0.42.2"
@ -2521,6 +2809,12 @@ version = "0.47.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7acaa0c2cf0d2ef99b61c308a0c3dbae430a51b7345dedec470bd8f53f5a3642"
[[package]]
name = "windows_x86_64_gnu"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78"
[[package]]
name = "windows_x86_64_gnullvm"
version = "0.42.2"
@ -2533,6 +2827,12 @@ version = "0.47.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e5a0628f71be1d11e17ca4a0e9e15b3a5180f6fbf1c2d55e3ba3f850378052c1"
[[package]]
name = "windows_x86_64_gnullvm"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d"
[[package]]
name = "windows_x86_64_msvc"
version = "0.42.2"
@ -2545,6 +2845,12 @@ version = "0.47.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9d6e62c256dc6d40b8c8707df17df8d774e60e39db723675241e7c15e910bce7"
[[package]]
name = "windows_x86_64_msvc"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec"
[[package]]
name = "winreg"
version = "0.10.1"

View file

@ -10,7 +10,7 @@ pub struct Args {
short,
long,
help = "Set release environment (dev, prod)",
default_value = "dev"
default_value = "prod"
)]
pub release_env: String,
/// Monero location

View file

@ -2,7 +2,10 @@
use crate::{
args,
db::{self, DATABASE_LOCK},
db::{
self,
DATABASE_LOCK,
},
models::*,
monero,
reqres,
@ -88,7 +91,11 @@ fn update_expiration(f_auth: &Authorization, address: &String) -> Result<Authori
}
/// Performs the signature verfication against stored auth
pub async fn verify_login(aid: String, uid: String, signature: String) -> Result<Authorization, MdbError> {
pub async fn verify_login(
aid: String,
uid: String,
signature: String,
) -> Result<Authorization, MdbError> {
let wallet_name = String::from(crate::APP_NAME);
let wallet_password =
std::env::var(crate::MONERO_WALLET_PASSWORD).unwrap_or(String::from("password"));
@ -203,7 +210,6 @@ impl BearerToken {
}
}
#[derive(Debug)]
pub enum BearerTokenError {
Expired,
@ -285,7 +291,7 @@ mod tests {
Ok(result)
}
fn cleanup(k: &String) -> Result<(), MdbError>{
fn cleanup(k: &String) -> Result<(), MdbError> {
let db = &DATABASE_LOCK;
let _ = db::DatabaseEnvironment::delete(&db.env, &db.handle, k.as_bytes())?;
Ok(())

View file

@ -1,7 +1,16 @@
//! contact operations module
use crate::{
db::{self, DATABASE_LOCK}, error::NevekoError, i2p, models::*, monero, reqres, utils
db::{
self,
DATABASE_LOCK,
},
error::NevekoError,
i2p,
models::*,
monero,
reqres,
utils,
};
use kn0sys_lmdb_rs::MdbError;
use log::{
@ -53,7 +62,12 @@ pub async fn create(c: &Json<Contact>) -> Result<Contact, MdbError> {
contact_list, list_key
);
db::write_chunks(&db.env, &db.handle, list_key.as_bytes(), &contact_list.as_bytes())?;
db::write_chunks(
&db.env,
&db.handle,
list_key.as_bytes(),
&contact_list.as_bytes(),
)?;
Ok(new_contact)
}
@ -70,7 +84,7 @@ pub fn find(cid: &String) -> Result<Contact, MdbError> {
}
/// Contact lookup
pub fn find_by_i2p_address(i2p_address: &String) -> Result<Contact , NevekoError> {
pub fn find_by_i2p_address(i2p_address: &String) -> Result<Contact, NevekoError> {
let contacts = find_all().map_err(|_| NevekoError::Database(MdbError::NotFound))?;
for c in contacts {
if c.i2p_address == *i2p_address {
@ -133,8 +147,12 @@ async fn validate_contact(j: &Json<Contact>) -> bool {
/// Send our information
pub async fn share() -> Result<Contact, NevekoError> {
let db = &DATABASE_LOCK;
let r = db::DatabaseEnvironment::read(&db.env, &db.handle, &NEVEKO_VENDOR_ENABLED.as_bytes().to_vec())
.map_err(|_| NevekoError::Database(MdbError::Panic))?;
let r = db::DatabaseEnvironment::read(
&db.env,
&db.handle,
&NEVEKO_VENDOR_ENABLED.as_bytes().to_vec(),
)
.map_err(|_| NevekoError::Database(MdbError::Panic))?;
let str_r: String = bincode::deserialize(&r[..]).unwrap_or_default();
let is_vendor = str_r == NEVEKO_VENDOR_MODE_ON;
let wallet_name = String::from(crate::APP_NAME);
@ -245,7 +263,10 @@ mod tests {
tokio::spawn(async move {
let test_contact = create(&j_contact).await;
let expected: Contact = Default::default();
assert_eq!(test_contact.unwrap_or_default().xmr_address, expected.xmr_address);
assert_eq!(
test_contact.unwrap_or_default().xmr_address,
expected.xmr_address
);
});
Runtime::shutdown_background(rt);
}

View file

@ -5,9 +5,12 @@
extern crate kn0sys_lmdb_rs as lmdb;
use lmdb::*;
use log::{error, info};
use sysinfo::System;
use log::{
error,
info,
};
use std::sync::LazyLock;
use sysinfo::System;
use crate::utils;
@ -34,7 +37,8 @@ pub struct DatabaseEnvironment {
impl DatabaseEnvironment {
/// Opens environment in specified path. The map size defaults to 20 percent
///
/// of available memory and can be set via the `LMDB_MAP_SIZE` environment variable.
/// of available memory and can be set via the `LMDB_MAP_SIZE` environment
/// variable.
///
/// The path of the user can be set with `LMDB_USER`.
pub fn open() -> Result<Self, MdbError> {
@ -52,7 +56,7 @@ impl DatabaseEnvironment {
};
info!("$LMDB_USER={}", user);
info!("excecuting lmdb open");
let file_path: String = format!("/home/{}/.{}/", user, "valentinus");
let file_path: String = format!("/home/{}/.{}/", user, "neveko");
let env_str = utils::get_release_env().value();
let env: Environment = EnvBuilder::new()
.map_size(env_map_size)
@ -63,10 +67,7 @@ impl DatabaseEnvironment {
panic!("could not set db handle")
}
let handle: DbHandle = default?;
Ok(DatabaseEnvironment {
env,
handle,
})
Ok(DatabaseEnvironment { env, handle })
}
/// Write a key/value pair to the database. It is not possible to
///

View file

@ -3,7 +3,14 @@
use std::error::Error;
use crate::{
db::{self, DATABASE_LOCK}, error::NevekoError, models::*, monero, utils
db::{
self,
DATABASE_LOCK,
},
error::NevekoError,
models::*,
monero,
utils,
};
use kn0sys_lmdb_rs::MdbError;
use log::{
@ -40,7 +47,12 @@ pub fn create(d: Json<Dispute>) -> Result<Dispute, MdbError> {
"writing dispute index {} for id: {}",
dispute_list, list_key
);
db::write_chunks(&db.env, &db.handle, list_key.as_bytes(), dispute_list.as_bytes())?;
db::write_chunks(
&db.env,
&db.handle,
list_key.as_bytes(),
dispute_list.as_bytes(),
)?;
// restart the dispute aut-settle thread
let cleared = is_dispute_clear(s_r);
if !cleared {
@ -102,7 +114,7 @@ pub fn delete(did: &String) -> Result<(), MdbError> {
/// creation date of the dispute plus the one week
///
/// grace period then the dispute is auto-settled.
pub async fn settle_dispute() -> Result<(), MdbError>{
pub async fn settle_dispute() -> Result<(), MdbError> {
let tick: std::sync::mpsc::Receiver<()> =
schedule_recv::periodic_ms(crate::DISPUTE_CHECK_INTERVAL);
loop {
@ -155,9 +167,7 @@ fn is_dispute_clear(r: String) -> bool {
debug!("dispute index contents: {:#?}", v);
let limit = v.len() <= 1;
if !limit {
v.len() >= 2
&& v[v.len() - 1].is_empty()
&& v[0].is_empty()
v.len() >= 2 && v[v.len() - 1].is_empty() && v[0].is_empty()
} else {
limit
}
@ -189,7 +199,12 @@ fn remove_from_auto_settle(did: String) -> Result<(), MdbError> {
dispute_list, list_key
);
db::write_chunks(&db.env, &db.handle, list_key.as_bytes(), dispute_list.as_bytes())?;
db::write_chunks(
&db.env,
&db.handle,
list_key.as_bytes(),
dispute_list.as_bytes(),
)?;
Ok(())
}
@ -234,7 +249,10 @@ async fn transmit_dispute_request(
/// A decomposition trigger for the dispute request so that the logic
///
/// can be executed from the gui.
pub async fn trigger_dispute_request(contact: &String, dispute: &Dispute) -> Result<Dispute, NevekoError> {
pub async fn trigger_dispute_request(
contact: &String,
dispute: &Dispute,
) -> Result<Dispute, NevekoError> {
info!("executing trigger_dispute_request");
let db = &DATABASE_LOCK;
let k = format!("{}-{}", crate::FTS_JWP_DB_KEY, &contact);

View file

@ -1,20 +1,38 @@
//! embedded i2p module
use std::{thread,fs::File, io::{self, BufRead}, path::Path};
use j4i2prs::router_wrapper as rw;
use j4i2prs::tunnel_control as tc;
use crate::{
db::{
self,
DATABASE_LOCK,
},
error::NevekoError,
monero::get_anon_inbound_port,
utils,
DEFAULT_APP_PORT,
DEFAULT_SOCKS_PORT,
};
use j4i2prs::{
router_wrapper as rw,
tunnel_control as tc,
};
use kn0sys_lmdb_rs::MdbError;
use log::*;
use serde::{
Deserialize,
Serialize,
};
use std::sync::mpsc::{
Receiver,
Sender,
};
use crate::{
db::{self, DATABASE_LOCK}, error::NevekoError, monero::get_anon_inbound_port, utils, DEFAULT_APP_PORT, DEFAULT_SOCKS_PORT
use std::{
fs::File,
io::{
self,
BufRead,
},
path::Path,
sync::mpsc::{
Receiver,
Sender,
},
thread,
};
struct Listener {
@ -37,7 +55,9 @@ impl Default for Listener {
/// https://doc.rust-lang.org/rust-by-example/std_misc/file/read_lines.html
fn read_lines<P>(filename: P) -> io::Result<io::Lines<io::BufReader<File>>>
where P: AsRef<Path>, {
where
P: AsRef<Path>,
{
let file = File::open(filename)?;
Ok(io::BufReader::new(file).lines())
}
@ -87,17 +107,16 @@ pub fn get_destination(st: ServerTunnelType) -> Result<String, NevekoError> {
&db.env,
&db.handle,
&crate::APP_ANON_IN_B32_DEST.as_bytes().to_vec(),
).map_err(|_| NevekoError::Database(MdbError::Panic))?;
let r_app_b32_dest = db::DatabaseEnvironment::read(
&db.env,
&db.handle,
&crate::APP_I2P_SK.as_bytes().to_vec(),
).map_err(|_| NevekoError::Database(MdbError::Panic))?;
)
.map_err(|_| NevekoError::Database(MdbError::Panic))?;
let r_app_b32_dest =
db::DatabaseEnvironment::read(&db.env, &db.handle, &crate::APP_I2P_SK.as_bytes().to_vec())
.map_err(|_| NevekoError::Database(MdbError::Panic))?;
let anon_b32_dest: String = bincode::deserialize(&r_anon_b32_dest[..]).unwrap_or_default();
let app_b32_dest: String = bincode::deserialize(&&r_app_b32_dest[..]).unwrap_or_default();
match st {
ServerTunnelType::App => Ok(app_b32_dest),
ServerTunnelType::AnonInbound => Ok(anon_b32_dest)
ServerTunnelType::AnonInbound => Ok(anon_b32_dest),
}
}
@ -107,7 +126,8 @@ pub async fn check_connection() -> Result<ProxyStatus, NevekoError> {
let proxy = reqwest::Proxy::http(&host).map_err(|_| NevekoError::I2P)?;
let client = reqwest::Client::builder().proxy(proxy).build();
let b32_dest = get_destination(ServerTunnelType::App)?;
match client.map_err(|_| NevekoError::I2P)?
match client
.map_err(|_| NevekoError::I2P)?
.get(format!("http://{}/status", b32_dest))
.send()
.await
@ -116,9 +136,15 @@ pub async fn check_connection() -> Result<ProxyStatus, NevekoError> {
let res = response.json::<HttpProxyStatus>().await;
debug!("check_connection response: {:?}", res);
return match res {
Ok(r) => if r.open { Ok(ProxyStatus::Open) } else { Ok(ProxyStatus::Opening) },
Ok(r) => {
if r.open {
Ok(ProxyStatus::Open)
} else {
Ok(ProxyStatus::Opening)
}
}
_ => Err(NevekoError::I2P),
}
};
}
Err(e) => {
error!("failed to generate invoice due to: {:?}", e);
@ -151,27 +177,16 @@ fn create_server_tunnel(st: ServerTunnelType) -> Result<tc::Tunnel, NevekoError>
crate::APP_ANON_IN_SK.as_bytes()
};
let db = &DATABASE_LOCK;
let tunnel: tc::Tunnel = tc::Tunnel::new(
"127.0.0.1".to_string(),
port,
tc::TunnelType::Server
).unwrap_or_default();
let tunnel: tc::Tunnel =
tc::Tunnel::new("127.0.0.1".to_string(), port, tc::TunnelType::Server).unwrap_or_default();
let b32_dest: String = tunnel.get_destination();
log::debug!("destination: {}", &b32_dest);
let v_b32_dest = bincode::serialize(&b32_dest).unwrap_or_default();
let v_sk = bincode::serialize(&tunnel.get_sk()).unwrap_or_default();
db::write_chunks(
&db.env,
&db.handle,
b32_key,
&v_b32_dest,
).map_err(|_| NevekoError::Database(MdbError::Panic))?;
db::write_chunks(
&db.env,
&db.handle,
sk_key,
&v_sk,
).map_err(|_| NevekoError::Database(MdbError::Panic))?;
db::write_chunks(&db.env, &db.handle, b32_key, &v_b32_dest)
.map_err(|_| NevekoError::Database(MdbError::Panic))?;
db::write_chunks(&db.env, &db.handle, sk_key, &v_sk)
.map_err(|_| NevekoError::Database(MdbError::Panic))?;
Ok(tunnel)
}
@ -181,9 +196,11 @@ fn create_server_tunnel(st: ServerTunnelType) -> Result<tc::Tunnel, NevekoError>
///
/// exist create a new one.
pub fn start() -> Result<(), NevekoError> {
let http_proxy_port: u16 = get_i2p_proxy_port().parse::<u16>()
let http_proxy_port: u16 = get_i2p_proxy_port()
.parse::<u16>()
.unwrap_or(DEFAULT_APP_PORT);
let socks_port: u16 = get_i2p_socks_proxy_port().parse::<u16>()
let socks_port: u16 = get_i2p_socks_proxy_port()
.parse::<u16>()
.unwrap_or(DEFAULT_SOCKS_PORT);
// check for existing app and anon inbound server tunnels
let db = &DATABASE_LOCK;
@ -191,12 +208,11 @@ pub fn start() -> Result<(), NevekoError> {
&db.env,
&db.handle,
&crate::APP_ANON_IN_SK.as_bytes().to_vec(),
).map_err(|_| NevekoError::Database(MdbError::Panic))?;
let r_app_sk = db::DatabaseEnvironment::read(
&db.env,
&db.handle,
&crate::APP_I2P_SK.as_bytes().to_vec(),
).map_err(|_| NevekoError::Database(MdbError::Panic))?;
)
.map_err(|_| NevekoError::Database(MdbError::Panic))?;
let r_app_sk =
db::DatabaseEnvironment::read(&db.env, &db.handle, &crate::APP_I2P_SK.as_bytes().to_vec())
.map_err(|_| NevekoError::Database(MdbError::Panic))?;
let anon_in_sk: String = bincode::deserialize(&r_anon_in_sk[..]).unwrap_or_default();
let app_sk: String = bincode::deserialize(&r_app_sk[..]).unwrap_or_default();
log::info!("starting j4i2prs...");
@ -205,7 +221,9 @@ pub fn start() -> Result<(), NevekoError> {
let run_tx = l.run_tx.clone();
let _ = thread::spawn(move || {
log::info!("run thread started");
run_tx.send(true).unwrap_or_else(|_| log::error!("failed to run router"));
run_tx
.send(true)
.unwrap_or_else(|_| log::error!("failed to run router"));
});
// run the main thread forever unless we get a router shutdown signal
let _ = thread::spawn(move || {
@ -214,7 +232,8 @@ pub fn start() -> Result<(), NevekoError> {
if let Ok(run) = l.run_rx.try_recv() {
if run {
log::info!("starting router");
r.invoke_router(rw::METHOD_RUN).unwrap_or_else(|_| log::error!("failed to run router"));
r.invoke_router(rw::METHOD_RUN)
.unwrap_or_else(|_| log::error!("failed to run router"));
}
}
if !l.is_running {
@ -237,15 +256,17 @@ pub fn start() -> Result<(), NevekoError> {
let http_proxy: tc::Tunnel = tc::Tunnel::new(
"127.0.0.1".to_string(),
http_proxy_port,
tc::TunnelType::Http
).unwrap_or_default();
tc::TunnelType::Http,
)
.unwrap_or_default();
let _ = http_proxy.start(None);
// start the socks proxy
let socks_proxy: tc::Tunnel = tc::Tunnel::new(
"127.0.0.1".to_string(),
socks_port,
tc::TunnelType::Socks
).unwrap_or_default();
tc::TunnelType::Socks,
)
.unwrap_or_default();
let _ = socks_proxy.start(None);
log::info!("http proxy on port {}", http_proxy.get_port());
log::info!("socks proxy on port {}", socks_proxy.get_port());
@ -257,8 +278,9 @@ pub fn start() -> Result<(), NevekoError> {
let app_tunnel = tc::Tunnel::new(
"127.0.0.1".to_string(),
utils::get_app_port(),
tc::TunnelType::ExistingServer
).unwrap_or_default();
tc::TunnelType::ExistingServer,
)
.unwrap_or_default();
let _ = app_tunnel.start(Some(String::from(&app_sk)));
}
if anon_in_sk.is_empty() {
@ -269,8 +291,9 @@ pub fn start() -> Result<(), NevekoError> {
let anon_tunnel = tc::Tunnel::new(
"127.0.0.1".to_string(),
get_anon_inbound_port(),
tc::TunnelType::ExistingServer
).unwrap_or_default();
tc::TunnelType::ExistingServer,
)
.unwrap_or_default();
let _ = anon_tunnel.start(Some(String::from(&anon_in_sk)));
}
}

View file

@ -2,7 +2,10 @@
use crate::{
contact,
db::{self, DATABASE_LOCK},
db::{
self,
DATABASE_LOCK,
},
error::NevekoError,
i2p,
models::*,
@ -10,7 +13,7 @@ use crate::{
neveko25519,
order,
reqres,
utils
utils,
};
use kn0sys_lmdb_rs::MdbError;
use log::{
@ -46,7 +49,11 @@ struct MultisigMessageData {
}
/// Create a new message
pub async fn create(m: Json<Message>, jwp: String, m_type: MessageType) -> Result<Message, NevekoError> {
pub async fn create(
m: Json<Message>,
jwp: String,
m_type: MessageType,
) -> Result<Message, NevekoError> {
let rnd = utils::generate_rnd();
let mut f_mid: String = format!("{}{}", crate::MESSAGE_DB_KEY, &rnd);
if m_type == MessageType::Multisig {
@ -85,8 +92,13 @@ pub async fn create(m: Json<Message>, jwp: String, m_type: MessageType) -> Resul
let msg_list = [d_r, String::from(&f_mid)].join(",");
debug!("writing message index {} for id: {}", msg_list, list_key);
let db = &DATABASE_LOCK;
db::write_chunks(&db.env, &db.handle, list_key.as_bytes(), msg_list.as_bytes())
.map_err(|_| NevekoError::Database(MdbError::Panic))?;
db::write_chunks(
&db.env,
&db.handle,
list_key.as_bytes(),
msg_list.as_bytes(),
)
.map_err(|_| NevekoError::Database(MdbError::Panic))?;
info!("attempting to send message");
let send = send_message(&new_message, &jwp, m_type).await;
send.unwrap();
@ -94,7 +106,7 @@ pub async fn create(m: Json<Message>, jwp: String, m_type: MessageType) -> Resul
}
/// Rx message
pub async fn rx(m: Json<Message>) -> Result<(), NevekoError>{
pub async fn rx(m: Json<Message>) -> Result<(), NevekoError> {
info!("rx from: {}", &m.from);
// make sure the message isn't something strange
let is_valid = validate_message(&m);
@ -103,8 +115,7 @@ pub async fn rx(m: Json<Message>) -> Result<(), NevekoError>{
return Err(NevekoError::Contact);
}
// don't allow messages from outside the contact list
let is_in_contact_list = contact::exists(&m.from)
.map_err(|_| NevekoError::Contact)?;
let is_in_contact_list = contact::exists(&m.from).map_err(|_| NevekoError::Contact)?;
if !is_in_contact_list {
error!("not a mutual contact");
return Err(NevekoError::Contact);
@ -134,8 +145,13 @@ pub async fn rx(m: Json<Message>) -> Result<(), NevekoError>{
let old: String = bincode::deserialize(&r[..]).unwrap_or_default();
let msg_list = [old, String::from(&f_mid)].join(",");
debug!("writing message index {} for {}", msg_list, list_key);
db::write_chunks(&db.env, &db.handle, list_key.as_bytes(), msg_list.as_bytes())
.map_err(|_| NevekoError::Database(MdbError::Panic))?;
db::write_chunks(
&db.env,
&db.handle,
list_key.as_bytes(),
msg_list.as_bytes(),
)
.map_err(|_| NevekoError::Database(MdbError::Panic))?;
Ok(())
}
@ -162,13 +178,11 @@ async fn parse_multisig_message(mid: String) -> Result<MultisigMessageData, Neve
}
bytes = Vec::new();
debug!("zero decipher bytes: {:?}", bytes);
Ok(
MultisigMessageData {
info,
sub_type,
orid,
}
)
Ok(MultisigMessageData {
info,
sub_type,
orid,
})
}
/// Rx multisig message
@ -200,8 +214,7 @@ pub async fn rx_multisig(m: Json<Message>) -> Result<(), NevekoError> {
return Err(NevekoError::Contact);
}
// don't allow messages from outside the contact list
let is_in_contact_list = contact::exists(&m.from)
.map_err(|_| NevekoError::Contact)?;
let is_in_contact_list = contact::exists(&m.from).map_err(|_| NevekoError::Contact)?;
if !is_in_contact_list {
error!("not a mutual contact");
return Err(NevekoError::Contact);
@ -238,8 +251,13 @@ pub async fn rx_multisig(m: Json<Message>) -> Result<(), NevekoError> {
);
let db = &DATABASE_LOCK;
db::write_chunks(&db.env, &db.handle, list_key.as_bytes(), msg_list.as_bytes())
.map_err(|_| NevekoError::Database(MdbError::Panic))?;
db::write_chunks(
&db.env,
&db.handle,
list_key.as_bytes(),
msg_list.as_bytes(),
)
.map_err(|_| NevekoError::Database(MdbError::Panic))?;
let data: MultisigMessageData = parse_multisig_message(new_message.mid).await?;
debug!(
"writing multisig message type {} for order {}",
@ -247,12 +265,18 @@ pub async fn rx_multisig(m: Json<Message>) -> Result<(), NevekoError> {
);
// lookup msig message data by {type}-{order id}-{contact .b32.i2p address}
// store info as {a_info}:{a_info (optional)}
let s_msig = db::DatabaseEnvironment::open().map_err(|_| NevekoError::Database(MdbError::Panic))?;
let s_msig =
db::DatabaseEnvironment::open().map_err(|_| NevekoError::Database(MdbError::Panic))?;
let msig_key = format!("{}-{}-{}", &data.sub_type, &data.orid, &m.from);
let db = &DATABASE_LOCK;
db::write_chunks(&s_msig.env, &db.handle, msig_key.as_bytes(), data.info.as_bytes())
.map_err(|_| NevekoError::Database(MdbError::Panic))?;
db::write_chunks(
&s_msig.env,
&db.handle,
msig_key.as_bytes(),
data.info.as_bytes(),
)
.map_err(|_| NevekoError::Database(MdbError::Panic))?;
Ok(())
}
@ -400,7 +424,7 @@ async fn is_contact_online(contact: &String, jwp: String) -> Result<bool, Box<dy
}
/// stage message for async retry
async fn send_to_retry(mid: String) -> Result<(), NevekoError>{
async fn send_to_retry(mid: String) -> Result<(), NevekoError> {
info!("sending {} to fts", &mid);
let db = &DATABASE_LOCK;
// in order to retrieve FTS (failed-to-send), write keys to db with fts
@ -420,8 +444,13 @@ async fn send_to_retry(mid: String) -> Result<(), NevekoError>{
"writing fts message index {} for id: {}",
msg_list, list_key
);
db::write_chunks(&db.env, &db.handle, list_key.as_bytes(), msg_list.as_bytes())
.map_err(|_| NevekoError::Database(MdbError::Panic))?;
db::write_chunks(
&db.env,
&db.handle,
list_key.as_bytes(),
msg_list.as_bytes(),
)
.map_err(|_| NevekoError::Database(MdbError::Panic))?;
// restart fts if not empty
let r = db::DatabaseEnvironment::read(&db.env, &db.handle, &list_key.as_bytes().to_vec())
.map_err(|_| NevekoError::Database(MdbError::Panic))?;
@ -464,8 +493,13 @@ fn remove_from_fts(mid: String) -> Result<(), NevekoError> {
"writing fts message index {} for id: {}",
msg_list, list_key
);
db::write_chunks(&db.env, &db.handle, list_key.as_bytes(), msg_list.as_bytes())
.map_err(|_| NevekoError::Database(MdbError::Panic))?;
db::write_chunks(
&db.env,
&db.handle,
list_key.as_bytes(),
msg_list.as_bytes(),
)
.map_err(|_| NevekoError::Database(MdbError::Panic))?;
Ok(())
}
@ -495,8 +529,9 @@ pub async fn retry_fts() -> Result<(), NevekoError> {
if cleared {
// index was created but cleared
info!("terminating retry fts thread");
let _ = db::DatabaseEnvironment::delete(&db.env, &db.handle, &list_key.as_bytes().to_vec())
.map_err(|_| NevekoError::Database(MdbError::Panic))?;
let _ =
db::DatabaseEnvironment::delete(&db.env, &db.handle, &list_key.as_bytes().to_vec())
.map_err(|_| NevekoError::Database(MdbError::Panic))?;
break Err(NevekoError::Database(MdbError::NotFound));
}
for m in v {
@ -504,8 +539,9 @@ pub async fn retry_fts() -> Result<(), NevekoError> {
if !message.mid.is_empty() {
// get jwp from db
let k = format!("{}-{}", crate::FTS_JWP_DB_KEY, &message.to);
let jwp = db::DatabaseEnvironment::read(&db.env, &db.handle, &k.as_bytes().to_vec())
.map_err(|_| NevekoError::Database(MdbError::Panic))?;
let jwp =
db::DatabaseEnvironment::read(&db.env, &db.handle, &k.as_bytes().to_vec())
.map_err(|_| NevekoError::Database(MdbError::Panic))?;
if !jwp.is_empty() {
let m_type = if message.mid.contains("msig") {
MessageType::Multisig
@ -537,9 +573,7 @@ fn is_fts_clear(r: String) -> bool {
debug!("fts contents: {:#?}", v);
let limit = v.len() <= 1;
if !limit {
v.len() >= 2
&& v[v.len() - 1].is_empty()
&& v[0].is_empty()
v.len() >= 2 && v[v.len() - 1].is_empty() && v[0].is_empty()
} else {
limit
}
@ -577,7 +611,11 @@ pub async fn send_prepare_info(orid: &String, contact: &String) -> Result<(), Ne
/// Enciphers and sends the output from the monero-rpc
///
/// `make_multisig_info` method.
pub async fn send_make_info(orid: &String, contact: &String, info: Vec<String>) -> Result<(), NevekoError> {
pub async fn send_make_info(
orid: &String,
contact: &String,
info: Vec<String>,
) -> Result<(), NevekoError> {
let db = &DATABASE_LOCK;
let wallet_name = String::from(orid);
let wallet_password = String::new();

View file

@ -17,7 +17,6 @@ pub struct Authorization {
pub xmr_address: String,
}
impl Authorization {
pub fn update_uid(a: Authorization, uid: String) -> Authorization {
Authorization {

View file

@ -1,7 +1,12 @@
//! TODO: replace with monero bindings
use crate::{
args, error::NevekoError, i2p, proof, reqres, utils
args,
error::NevekoError,
i2p,
proof,
reqres,
utils,
};
use clap::Parser;
use diqwest::WithDigestAuth;
@ -168,7 +173,7 @@ impl LockTimeLimit {
/// Start monerod from the `--monero-location` flag
///
/// default: /home/$USER/monero-xxx-xxx
pub fn start_daemon() -> Result<(), NevekoError>{
pub fn start_daemon() -> Result<(), NevekoError> {
info!("starting monerod");
let blockchain_dir = get_blockchain_dir();
let bin_dir = get_monero_location();

View file

@ -1,5 +1,6 @@
//! NEVEKO modified ed25519 library extending curve25519-dalek
use crate::monero;
use curve25519_dalek::{
edwards::{
CompressedEdwardsY,
@ -15,7 +16,6 @@ use sha2::{
Digest,
Sha512,
};
use crate::monero;
#[derive(Debug)]
/// Container for the Neveko Message Keys

View file

@ -3,9 +3,24 @@
use std::error::Error;
use crate::{
contact, db::{self, DATABASE_LOCK}, error::NevekoError, i2p, models::*, monero, neveko25519, order, product, reqres, utils
contact,
db::{
self,
DATABASE_LOCK,
},
error::NevekoError,
i2p,
models::*,
monero,
neveko25519,
order,
product,
reqres,
utils,
};
use kn0sys_lmdb_rs::MdbError::{
self,
};
use kn0sys_lmdb_rs::MdbError::{self};
use log::{
debug,
error,
@ -69,8 +84,13 @@ pub async fn create(j_order: Json<reqres::OrderRequest>) -> Result<Order, Neveko
let db = &DATABASE_LOCK;
// inject adjudicator separately, modifying the order model is mendokusai
let adjudicator_k = format!("{}-{}", crate::ADJUDICATOR_DB_KEY, &orid);
db::write_chunks(&db.env, &db.handle, adjudicator_k.as_bytes(), j_order.adjudicator.as_bytes())
.map_err(|_| NevekoError::Database(MdbError::Panic))?;
db::write_chunks(
&db.env,
&db.handle,
adjudicator_k.as_bytes(),
j_order.adjudicator.as_bytes(),
)
.map_err(|_| NevekoError::Database(MdbError::Panic))?;
let k = &new_order.orid;
let order = bincode::serialize(&new_order).unwrap_or_default();
db::write_chunks(&db.env, &db.handle, k.as_bytes(), &order)
@ -85,8 +105,13 @@ pub async fn create(j_order: Json<reqres::OrderRequest>) -> Result<Order, Neveko
let old: String = bincode::deserialize(&r[..]).unwrap_or_default();
let order_list = [old, String::from(&orid)].join(",");
debug!("writing order index {} for id: {}", order_list, list_key);
db::write_chunks(&db.env, &db.handle, list_key.as_bytes(), &order_list.as_bytes())
.map_err(|_| NevekoError::Database(MdbError::Panic))?;
db::write_chunks(
&db.env,
&db.handle,
list_key.as_bytes(),
&order_list.as_bytes(),
)
.map_err(|_| NevekoError::Database(MdbError::Panic))?;
Ok(new_order)
}
@ -117,8 +142,13 @@ pub fn backup(order: &Order) -> Result<(), NevekoError> {
}
debug!("writing order index {} for id: {}", order_list, list_key);
let db = &DATABASE_LOCK;
db::write_chunks(&db.env, &db.handle, list_key.as_bytes(), order_list.as_bytes())
.map_err(|_| NevekoError::Database(MdbError::Panic))?;
db::write_chunks(
&db.env,
&db.handle,
list_key.as_bytes(),
order_list.as_bytes(),
)
.map_err(|_| NevekoError::Database(MdbError::Panic))?;
Ok(())
}
@ -343,7 +373,9 @@ pub async fn cancel_order(orid: &String, signature: &String) -> Result<Order, Ne
/// Check for import multisig info, validate block time and that the
///
/// order wallet has been funded properly. Update the order to multisig complete
pub async fn validate_order_for_ship(orid: &String) -> Result<reqres::FinalizeOrderResponse, NevekoError> {
pub async fn validate_order_for_ship(
orid: &String,
) -> Result<reqres::FinalizeOrderResponse, NevekoError> {
info!("validating order for shipment");
let m_order: Order = find(orid).map_err(|_| NevekoError::Order)?;
let contact: Contact = contact::find(&m_order.cid).map_err(|_| NevekoError::Contact)?;
@ -480,13 +512,11 @@ pub async fn upload_delivery_info(
error!("failed to trigger nasr");
return Err(NevekoError::Nasr);
}
Ok(
reqres::FinalizeOrderResponse {
delivery_info: e_delivery_info,
orid: String::from(orid),
vendor_update_success: false,
}
)
Ok(reqres::FinalizeOrderResponse {
delivery_info: e_delivery_info,
orid: String::from(orid),
vendor_update_success: false,
})
}
/// Vendor will very txset submission and then update the order to `Delivered`
@ -494,7 +524,7 @@ pub async fn upload_delivery_info(
/// status type. Then customer will update the status on the neveko instanced
///
/// upon a `vendor_update_success: true` response
pub async fn finalize_order(orid: &String) -> Result< reqres::FinalizeOrderResponse, NevekoError> {
pub async fn finalize_order(orid: &String) -> Result<reqres::FinalizeOrderResponse, NevekoError> {
info!("finalizing order: {}", orid);
// verify recipient and unlock time
let mut m_order: Order = order::find(orid).map_err(|_| NevekoError::Order)?;
@ -531,12 +561,10 @@ pub async fn finalize_order(orid: &String) -> Result< reqres::FinalizeOrderRespo
monero::close_wallet(orid, &wallet_password).await;
m_order.status = order::StatusType::Delivered.value();
order::modify(Json(m_order))?;
Ok(
reqres::FinalizeOrderResponse {
vendor_update_success: true,
..Default::default()
}
)
Ok(reqres::FinalizeOrderResponse {
vendor_update_success: true,
..Default::default()
})
}
/// Executes POST /order/finalize/{orid}
@ -731,7 +759,7 @@ pub async fn transmit_sor_request(
pub async fn trigger_ship_request(
contact: &String,
jwp: &String,
orid: &String
orid: &String,
) -> Result<Order, NevekoError> {
info!("executing trigger_ship_request");
let data = String::from(orid);
@ -757,7 +785,7 @@ pub async fn trigger_ship_request(
pub async fn trigger_cancel_request(
contact: &String,
jwp: &String,
orid: &String
orid: &String,
) -> Result<Order, NevekoError> {
info!("executing trigger_cancel_request");
let data = String::from(orid);
@ -798,8 +826,13 @@ pub async fn d_trigger_ship_request(contact: &String, orid: &String) -> Result<O
let u_ship_res = ship_res.unwrap_or(Default::default());
let hex_delivery_info: String = hex::encode(u_ship_res.delivery_info);
let key = format!("{}-{}", crate::DELIVERY_INFO_DB_KEY, orid);
db::write_chunks(&db.env, &db.handle, key.as_bytes(), hex_delivery_info.as_bytes())
.map_err(|_| NevekoError::Database(MdbError::Panic))?;
db::write_chunks(
&db.env,
&db.handle,
key.as_bytes(),
hex_delivery_info.as_bytes(),
)
.map_err(|_| NevekoError::Database(MdbError::Panic))?;
}
Ok(trigger)
}
@ -846,7 +879,10 @@ pub async fn transmit_cancel_request(
}
/// Decomposition trigger for the cancel request
pub async fn d_trigger_cancel_request(contact: &String, orid: &String) -> Result<Order, NevekoError> {
pub async fn d_trigger_cancel_request(
contact: &String,
orid: &String,
) -> Result<Order, NevekoError> {
// ugh, sorry seems we need to get jwp for vendor from fts cache
// get jwp from db
let k = format!("{}-{}", crate::FTS_JWP_DB_KEY, &contact);

View file

@ -1,7 +1,13 @@
//! Marketplace products upload, modification, etc module
use crate::{
db::{self, DATABASE_LOCK}, error::NevekoError, models::*, utils
db::{
self,
DATABASE_LOCK,
},
error::NevekoError,
models::*,
utils,
};
use kn0sys_lmdb_rs::MdbError;
use log::{
@ -47,8 +53,13 @@ pub fn create(d: Json<Product>) -> Result<Product, NevekoError> {
"writing product index {} for id: {}",
product_list, list_key
);
db::write_chunks(&db.env, &db.handle, list_key.as_bytes(), product_list.as_bytes())
.map_err(|_| NevekoError::Database(MdbError::Panic))?;
db::write_chunks(
&db.env,
&db.handle,
list_key.as_bytes(),
product_list.as_bytes(),
)
.map_err(|_| NevekoError::Database(MdbError::Panic))?;
Ok(new_product)
}

View file

@ -1,7 +1,14 @@
//! External authorization module via JWPs
use crate::{
db::{self, DATABASE_LOCK}, error::NevekoError, monero, reqres, utils
db::{
self,
DATABASE_LOCK,
},
error::NevekoError,
monero,
reqres,
utils,
};
use kn0sys_lmdb_rs::MdbError;
use log::{
@ -123,8 +130,13 @@ pub async fn prove_payment(contact: String, txp: &TxProof) -> Result<reqres::Jwp
let db = &DATABASE_LOCK;
let k = format!("{}-{}", crate::FTS_JWP_DB_KEY, &contact);
let _ = db::DatabaseEnvironment::delete(&db.env, &db.handle, k.as_bytes())?;
db::write_chunks(&db.env, &db.handle, &k.as_bytes(), &r.jwp.as_bytes().to_vec())
.map_err(|_| NevekoError::Database(MdbError::Panic))?;
db::write_chunks(
&db.env,
&db.handle,
&k.as_bytes(),
&r.jwp.as_bytes().to_vec(),
)
.map_err(|_| NevekoError::Database(MdbError::Panic))?;
Ok(r)
}
_ => Ok(Default::default()),

View file

@ -46,7 +46,7 @@ pub struct XmrRpcOpenWalletParams {
#[derive(Deserialize, Serialize, Debug)]
pub struct XmrRpcPrepareParams {
pub enable_experimental_multisig: bool
pub enable_experimental_multisig: bool,
}
#[derive(Deserialize, Serialize, Debug)]
@ -468,7 +468,6 @@ pub struct SubAddressIndex {
pub minor: u64,
}
#[derive(Debug, Default, Deserialize)]
pub struct Transfer {
pub address: String,
@ -689,7 +688,6 @@ pub struct XmrDaemonGetTransactionsResponse {
pub txs_as_json: Vec<String>,
}
#[derive(Debug, Default, Deserialize)]
pub struct XmrRpcSignResponse {
pub result: XmrRpcSignResult,

View file

@ -2,7 +2,10 @@
//! authenticated user
use crate::{
db::{self, DATABASE_LOCK},
db::{
self,
DATABASE_LOCK,
},
models::*,
utils,
};
@ -63,7 +66,8 @@ mod tests {
);
let test_user = create(&address)?;
let db = &DATABASE_LOCK;
let r = db::DatabaseEnvironment::read(&db.env, &db.handle, &test_user.uid.as_bytes().to_vec())?;
let r =
db::DatabaseEnvironment::read(&db.env, &db.handle, &test_user.uid.as_bytes().to_vec())?;
let cleanup_id = String::from(&test_user.uid);
let expected_user: User = bincode::deserialize(&r[..]).unwrap_or_default();
assert_eq!(test_user.xmr_address, expected_user.xmr_address);

View file

@ -1,7 +1,20 @@
//! Generic functions for startup and convenience
use crate::{
args, contact, db::{self, DATABASE_LOCK}, dispute, error::NevekoError, i2p, message, models, monero, neveko25519, reqres
args,
contact,
db::{
self,
DATABASE_LOCK,
},
dispute,
error::NevekoError,
i2p,
message,
models,
monero,
neveko25519,
reqres,
};
use clap::Parser;
use kn0sys_lmdb_rs::MdbError;
@ -75,7 +88,7 @@ impl Default for Connections {
i2p_socks_host: String::from("http://127.0.0.1:9051"),
is_remote_node: false,
is_i2p_advanced: false,
mainnet: false,
mainnet: true,
monero_location: String::from("/home/user/monero-x86_64-linux-gnu-v0.18.3.4"),
rpc_credential: String::from("pass"),
rpc_username: String::from("user"),
@ -371,22 +384,32 @@ async fn gen_app_wallet(password: &String) {
/// Secret keys for signing internal/external auth tokens
fn gen_signing_keys() -> Result<(), NevekoError> {
info!("generating signing keys");
let jwp = get_jwp_secret_key()?;
let jwt = get_jwt_secret_key()?;
let jwp = get_jwp_secret_key().unwrap_or_default();
let jwt = get_jwt_secret_key().unwrap_or_default();
// send to db
if jwp.is_empty() {
let mut data = [0u8; 32];
rand::thread_rng().fill_bytes(&mut data);
let db = &DATABASE_LOCK;
db::write_chunks(&db.env, &db.handle, crate::NEVEKO_JWP_SECRET_KEY.as_bytes(), &data)
.map_err(|_| NevekoError::Database(MdbError::Panic))?;
db::write_chunks(
&db.env,
&db.handle,
crate::NEVEKO_JWP_SECRET_KEY.as_bytes(),
&data,
)
.map_err(|_| NevekoError::Database(MdbError::Panic))?;
}
if jwt.is_empty() {
let mut data = [0u8; 32];
rand::thread_rng().fill_bytes(&mut data);
let db = &DATABASE_LOCK;
db::write_chunks(&db.env, &db.handle, crate::NEVEKO_JWT_SECRET_KEY.as_bytes(), &data)
.map_err(|_| NevekoError::Database(MdbError::Panic))?;
db::write_chunks(
&db.env,
&db.handle,
crate::NEVEKO_JWT_SECRET_KEY.as_bytes(),
&data,
)
.map_err(|_| NevekoError::Database(MdbError::Panic))?;
}
Ok(())
}
@ -406,8 +429,12 @@ pub fn revoke_signing_keys() -> Result<(), NevekoError> {
pub fn get_jwt_secret_key() -> Result<String, NevekoError> {
let db = &DATABASE_LOCK;
let r = db::DatabaseEnvironment::read(&db.env, &db.handle, &crate::NEVEKO_JWT_SECRET_KEY.as_bytes().to_vec())
.map_err(|_| NevekoError::Database(MdbError::Panic))?;
let r = db::DatabaseEnvironment::read(
&db.env,
&db.handle,
&crate::NEVEKO_JWT_SECRET_KEY.as_bytes().to_vec(),
)
.map_err(|_| NevekoError::Database(MdbError::Panic))?;
if r.is_empty() {
error!("JWT key not found");
return Err(NevekoError::Database(MdbError::Panic));
@ -418,8 +445,12 @@ pub fn get_jwt_secret_key() -> Result<String, NevekoError> {
pub fn get_jwp_secret_key() -> Result<String, NevekoError> {
let db = &DATABASE_LOCK;
let r = db::DatabaseEnvironment::read(&db.env, &db.handle, &crate::NEVEKO_JWP_SECRET_KEY.as_bytes().to_vec())
.map_err(|_| NevekoError::Database(MdbError::Panic))?;
let r = db::DatabaseEnvironment::read(
&db.env,
&db.handle,
&crate::NEVEKO_JWP_SECRET_KEY.as_bytes().to_vec(),
)
.map_err(|_| NevekoError::Database(MdbError::Panic))?;
if r.is_empty() {
error!("JWP key not found");
return Err(NevekoError::Database(MdbError::NotFound));
@ -431,8 +462,9 @@ pub fn get_jwp_secret_key() -> Result<String, NevekoError> {
/// Returns the hex encoded neveko message public key from LMDB
pub fn get_nmpk() -> Result<String, NevekoError> {
let db = &DATABASE_LOCK;
let r = db::DatabaseEnvironment::read(&db.env, &db.handle, &crate::NEVEKO_NMPK.as_bytes().to_vec())
.map_err(|_| NevekoError::Database(MdbError::Panic))?;
let r =
db::DatabaseEnvironment::read(&db.env, &db.handle, &crate::NEVEKO_NMPK.as_bytes().to_vec())
.map_err(|_| NevekoError::Database(MdbError::Panic))?;
if r.is_empty() {
error!("neveko message public key not found");
return Err(NevekoError::Database(MdbError::Panic));
@ -443,13 +475,18 @@ pub fn get_nmpk() -> Result<String, NevekoError> {
async fn generate_nmpk() -> Result<(), NevekoError> {
info!("generating neveko message public key");
let nmpk: String = get_nmpk()?;
let nmpk: String = get_nmpk().unwrap_or_default();
// send to db
let db = &DATABASE_LOCK;
if nmpk.is_empty() {
let nmk: neveko25519::NevekoMessageKeys = neveko25519::generate_neveko_message_keys().await;
db::write_chunks(&db.env, &db.handle, crate::NEVEKO_NMPK.as_bytes(), nmk.hex_nmpk.as_bytes())
.map_err(|_| NevekoError::Database(MdbError::Panic))?;
db::write_chunks(
&db.env,
&db.handle,
crate::NEVEKO_NMPK.as_bytes(),
nmk.hex_nmpk.as_bytes(),
)
.map_err(|_| NevekoError::Database(MdbError::Panic))?;
}
Ok(())
}
@ -476,8 +513,7 @@ pub async fn start_up() -> Result<(), NevekoError> {
// wait for rpc server for a bit
tokio::time::sleep(std::time::Duration::new(5, 0)).await;
monero::check_rpc_connection().await;
let mut wallet_password =
std::env::var(crate::MONERO_WALLET_PASSWORD).unwrap_or_default();
let mut wallet_password = std::env::var(crate::MONERO_WALLET_PASSWORD).unwrap_or_default();
if wallet_password.is_empty() {
print!(
"MONERO_WALLET_PASSWORD not set, enter neveko wallet password for monero-wallet-rpc: "
@ -671,7 +707,11 @@ pub async fn can_transfer(invoice: u128) -> bool {
pub fn toggle_vendor_enabled() -> Result<bool, MdbError> {
// TODO(c2m): Dont toggle vendors with orders status != Delivered
let db = &DATABASE_LOCK;
let r = db::DatabaseEnvironment::read(&db.env, &db.handle, &contact::NEVEKO_VENDOR_ENABLED.as_bytes().to_vec())?;
let r = db::DatabaseEnvironment::read(
&db.env,
&db.handle,
&contact::NEVEKO_VENDOR_ENABLED.as_bytes().to_vec(),
)?;
let mode: String = bincode::deserialize(&r[..]).unwrap_or_default();
if mode != contact::NEVEKO_VENDOR_MODE_ON {
info!("neveko vendor mode enabled");

597
neveko-gui/Cargo.lock generated

File diff suppressed because it is too large Load diff

View file

@ -242,8 +242,7 @@ impl eframe::App for AddressBookApp {
// Payment approval window
//-----------------------------------------------------------------------------------
let mut is_approving_payment =
self.approve_payment && !self.s_invoice.address.is_empty();
let mut is_approving_payment = self.approve_payment && !self.s_invoice.address.is_empty();
let address = self.s_invoice.address.clone();
let amount = self.s_invoice.pay_threshold;
let expire = self.s_invoice.conf_threshold;
@ -343,20 +342,19 @@ impl eframe::App for AddressBookApp {
self.is_approving_jwp = true;
}
}
let failed_to_prove = !self.status.txp.is_empty()
&& self.status.jwp.is_empty();
let failed_to_prove = !self.status.txp.is_empty() && self.status.jwp.is_empty();
if !self.status.jwp.is_empty() || failed_to_prove {
if ui.button("Clear stale JWP").clicked() {
utils::clear_gui_db(String::from("gui-txp"), self.status.i2p.clone()).unwrap();
utils::clear_gui_db(String::from("gui-jwp"), self.status.i2p.clone()).unwrap();
utils::clear_gui_db(String::from("gui-exp"), self.status.i2p.clone()).unwrap();
utils::clear_gui_db(String::from("gui-txp"), self.status.i2p.clone())
.unwrap();
utils::clear_gui_db(String::from("gui-jwp"), self.status.i2p.clone())
.unwrap();
utils::clear_gui_db(String::from("gui-exp"), self.status.i2p.clone())
.unwrap();
self.showing_status = false;
}
}
if !self.status.txp.is_empty()
&& self.status.jwp.is_empty()
&& status == "online"
{
if !self.status.txp.is_empty() && self.status.jwp.is_empty() && status == "online" {
if ui.button("Prove Retry").clicked() {
send_payment_req(
self.payment_tx.clone(),
@ -553,16 +551,19 @@ impl eframe::App for AddressBookApp {
self.status.txp = utils::search_gui_db(
String::from(crate::GUI_TX_PROOF_DB_KEY),
String::from(&c.i2p_address),
).unwrap_or_default();
)
.unwrap_or_default();
// get the jwp
self.status.jwp = utils::search_gui_db(
String::from(crate::GUI_JWP_DB_KEY),
String::from(&c.i2p_address),
).unwrap_or_default();
)
.unwrap_or_default();
let r_exp = utils::search_gui_db(
String::from(crate::GUI_EXP_DB_KEY),
String::from(&c.i2p_address),
).unwrap_or_default();
)
.unwrap_or_default();
self.status.exp = r_exp;
let expire = match self.status.exp.parse::<i64>() {
Ok(n) => n,
@ -690,8 +691,7 @@ fn send_payment_req(
log::debug!("creating transaction proof for: {}", &ptxp.hash);
// if we made it this far we can now request a JWP from our friend
// wait a bit for the tx to propogate, i2p takes longer
let wait = if std::env::var(neveko_core::GUI_REMOTE_NODE)
.unwrap_or(String::new())
let wait = if std::env::var(neveko_core::GUI_REMOTE_NODE).unwrap_or(String::new())
== String::from(neveko_core::GUI_SET_REMOTE_NODE)
{
crate::I2P_PROPAGATION_TIME_IN_SECS_EST
@ -713,22 +713,26 @@ fn send_payment_req(
String::from(crate::GUI_TX_PROOF_DB_KEY),
String::from(&contact),
String::from(&ftxp.signature),
).unwrap();
)
.unwrap();
utils::write_gui_db(
String::from(crate::GUI_TX_HASH_DB_KEY),
String::from(&contact),
String::from(&ftxp.hash),
).unwrap();
)
.unwrap();
utils::write_gui_db(
String::from(crate::GUI_TX_SIGNATURE_DB_KEY),
String::from(&contact),
String::from(&ftxp.signature),
).unwrap();
)
.unwrap();
utils::write_gui_db(
String::from(crate::GUI_TX_SUBADDRESS_DB_KEY),
String::from(&contact),
String::from(&ftxp.subaddress),
).unwrap();
)
.unwrap();
log::debug!(
"proving payment to {} for: {}",
String::from(&contact),
@ -740,7 +744,8 @@ fn send_payment_req(
String::from(crate::GUI_JWP_DB_KEY),
String::from(&contact),
String::from(&result.jwp),
).unwrap();
)
.unwrap();
// this is just an estimate expiration but should suffice
let seconds: i64 = expire as i64 * 2 * 60;
let unix: i64 = chrono::offset::Utc::now().timestamp() + seconds;
@ -748,7 +753,8 @@ fn send_payment_req(
String::from(crate::GUI_EXP_DB_KEY),
String::from(&contact),
format!("{}", unix),
).unwrap();
)
.unwrap();
ctx.request_repaint();
}
_ => log::error!("failed to obtain jwp"),
@ -759,12 +765,10 @@ fn send_payment_req(
let k_hash = String::from(crate::GUI_TX_HASH_DB_KEY);
let k_sig = String::from(crate::GUI_TX_SIGNATURE_DB_KEY);
let k_subaddress = String::from(crate::GUI_TX_SUBADDRESS_DB_KEY);
let hash = utils::search_gui_db(k_hash, String::from(&contact))
.unwrap_or_default();
let signature = utils::search_gui_db(k_sig, String::from(&contact))
.unwrap_or_default();
let subaddress = utils::search_gui_db(k_subaddress, String::from(&contact))
.unwrap_or_default();
let hash = utils::search_gui_db(k_hash, String::from(&contact)).unwrap_or_default();
let signature = utils::search_gui_db(k_sig, String::from(&contact)).unwrap_or_default();
let subaddress =
utils::search_gui_db(k_subaddress, String::from(&contact)).unwrap_or_default();
let ftxp: proof::TxProof = proof::TxProof {
subaddress,
confirmations: 0,
@ -783,7 +787,8 @@ fn send_payment_req(
String::from(crate::GUI_JWP_DB_KEY),
String::from(&contact),
String::from(&result.jwp),
).unwrap();
)
.unwrap();
ctx.request_repaint();
}
_ => log::error!("failed to obtain jwp"),
@ -824,7 +829,8 @@ fn change_nick_req(contact: String, nick: String) {
String::from(crate::GUI_NICK_DB_KEY),
String::from(&contact),
nick,
).unwrap();
)
.unwrap();
}
fn send_can_transfer_req(tx: Sender<bool>, ctx: egui::Context, invoice: u128) {

View file

@ -189,8 +189,8 @@ impl eframe::App for HomeApp {
.title_bar(false)
.vscroll(true)
.show(ctx, |ui| {
let mut i2p_address = i2p::get_destination(i2p::ServerTunnelType::App)
.unwrap_or_default();
let mut i2p_address =
i2p::get_destination(i2p::ServerTunnelType::App).unwrap_or_default();
if !self.is_qr_set && !i2p_address.is_empty() {
let code = QrCode::new(&i2p_address).unwrap();
let image = code.render::<Luma<u8>>().build();
@ -403,8 +403,7 @@ impl eframe::App for HomeApp {
//-------------------------------------------------------------------------------------------------
fn send_xmrd_get_info_req(tx: Sender<reqres::XmrDaemonGetInfoResponse>, ctx: egui::Context) {
tokio::spawn(async move {
let remote_var =
std::env::var(neveko_core::GUI_REMOTE_NODE).unwrap_or(String::new());
let remote_var = std::env::var(neveko_core::GUI_REMOTE_NODE).unwrap_or(String::new());
if remote_var == String::from(neveko_core::GUI_SET_REMOTE_NODE) {
let p_info = monero::p_get_info().await;
let info = p_info.unwrap_or(Default::default());

View file

@ -68,7 +68,8 @@ impl eframe::App for LockScreenApp {
&db.env,
&db.handle,
&CREDENTIAL_KEY.as_bytes().to_vec(),
).unwrap();
)
.unwrap();
// hash the text entered and compare
let mut hasher = Sha512::new();
hasher.update(self.lock_screen.credential.clone());

View file

@ -146,7 +146,8 @@ impl Default for MarketApp {
&db.env,
&db.handle,
&contact::NEVEKO_VENDOR_ENABLED.as_bytes().to_vec(),
).unwrap_or_default();
)
.unwrap_or_default();
let sr: String = bincode::deserialize(&r[..]).unwrap_or_default();
let is_vendor_enabled = sr == contact::NEVEKO_VENDOR_MODE_ON;
let (contact_info_tx, contact_info_rx) = std::sync::mpsc::channel();
@ -457,7 +458,7 @@ impl eframe::App for MarketApp {
if !self.msig.query_adjudicator {
let adjudicator_db =
utils::search_gui_db(String::from(&prefix), self.m_order.orid.clone())
.unwrap_or_default();
.unwrap_or_default();
log::debug!("adjudicator db: {}", adjudicator_db);
self.msig.has_adjudicator = !adjudicator_db.is_empty();
self.msig.adjudicator = adjudicator_db;
@ -471,7 +472,8 @@ impl eframe::App for MarketApp {
prefix,
self.m_order.orid.clone(),
self.msig.adjudicator.clone(),
).unwrap();
)
.unwrap();
self.msig.has_adjudicator = true;
}
} else {
@ -498,10 +500,10 @@ impl eframe::App for MarketApp {
let vendor_prefix = String::from(crate::GUI_OVL_DB_KEY);
let adjudicator =
utils::search_gui_db(adjudicator_prefix, self.m_order.orid.clone())
.unwrap_or_default();
.unwrap_or_default();
let vendor =
utils::search_gui_db(vendor_prefix, self.m_order.orid.clone())
.unwrap_or_default();
.unwrap_or_default();
// get prepare multisig info from vendor and adjudicator
// call prepare multisig and save to db
send_prepare_info_req(
@ -518,10 +520,10 @@ impl eframe::App for MarketApp {
let vendor_prefix = String::from(crate::GUI_OVL_DB_KEY);
let adjudicator =
utils::search_gui_db(adjudicator_prefix, self.m_order.orid.clone())
.unwrap_or_default();
.unwrap_or_default();
let vendor =
utils::search_gui_db(vendor_prefix, self.m_order.orid.clone())
.unwrap_or_default();
.unwrap_or_default();
let sub_type = String::from(message::PREPARE_MSIG);
let is_prepared = validate_msig_step(
&adjudicator,
@ -543,10 +545,10 @@ impl eframe::App for MarketApp {
let vendor_prefix = String::from(crate::GUI_OVL_DB_KEY);
let adjudicator =
utils::search_gui_db(adjudicator_prefix, self.m_order.orid.clone())
.unwrap_or_default();
.unwrap_or_default();
let vendor =
utils::search_gui_db(vendor_prefix, self.m_order.orid.clone())
.unwrap_or_default();
.unwrap_or_default();
// get make multisig info from vendor and adjudicator
// call make multisig and save to db
send_make_info_req(
@ -563,10 +565,10 @@ impl eframe::App for MarketApp {
let vendor_prefix = String::from(crate::GUI_OVL_DB_KEY);
let adjudicator =
utils::search_gui_db(adjudicator_prefix, self.m_order.orid.clone())
.unwrap_or_default();
.unwrap_or_default();
let vendor =
utils::search_gui_db(vendor_prefix, self.m_order.orid.clone())
.unwrap_or_default();
.unwrap_or_default();
let sub_type = String::from(message::MAKE_MSIG);
let is_made = validate_msig_step(
&adjudicator,
@ -588,10 +590,10 @@ impl eframe::App for MarketApp {
let vendor_prefix = String::from(crate::GUI_OVL_DB_KEY);
let adjudicator =
utils::search_gui_db(adjudicator_prefix, self.m_order.orid.clone())
.unwrap_or_default();
.unwrap_or_default();
let vendor =
utils::search_gui_db(vendor_prefix, self.m_order.orid.clone())
.unwrap_or_default();
.unwrap_or_default();
// get kex round one info from vendor and adjudicator
// call make multisig and save to db
send_kex_initial_req(
@ -608,10 +610,10 @@ impl eframe::App for MarketApp {
let vendor_prefix = String::from(crate::GUI_OVL_DB_KEY);
let adjudicator =
utils::search_gui_db(adjudicator_prefix, self.m_order.orid.clone())
.unwrap_or_default();
.unwrap_or_default();
let vendor =
utils::search_gui_db(vendor_prefix, self.m_order.orid.clone())
.unwrap_or_default();
.unwrap_or_default();
let sub_type = String::from(message::KEX_ONE_MSIG);
let is_made = validate_msig_step(
&adjudicator,
@ -633,10 +635,10 @@ impl eframe::App for MarketApp {
let vendor_prefix = String::from(crate::GUI_OVL_DB_KEY);
let adjudicator =
utils::search_gui_db(adjudicator_prefix, self.m_order.orid.clone())
.unwrap_or_default();
.unwrap_or_default();
let vendor =
utils::search_gui_db(vendor_prefix, self.m_order.orid.clone())
.unwrap_or_default();
.unwrap_or_default();
// get kex round two info from vendor and adjudicator
// call make multisig and save to db
send_kex_final_req(
@ -653,10 +655,10 @@ impl eframe::App for MarketApp {
let vendor_prefix = String::from(crate::GUI_OVL_DB_KEY);
let adjudicator =
utils::search_gui_db(adjudicator_prefix, self.m_order.orid.clone())
.unwrap_or_default();
.unwrap_or_default();
let vendor =
utils::search_gui_db(vendor_prefix, self.m_order.orid.clone())
.unwrap_or_default();
.unwrap_or_default();
let sub_type = String::from(message::KEX_TWO_MSIG);
let is_made = validate_msig_step(
&adjudicator,
@ -686,7 +688,7 @@ impl eframe::App for MarketApp {
let vendor_prefix = String::from(crate::GUI_OVL_DB_KEY);
let contact =
utils::search_gui_db(vendor_prefix, self.m_order.orid.clone())
.unwrap_or_default();
.unwrap_or_default();
verify_order_wallet_funded(
&contact,
&self.m_order.orid,
@ -704,7 +706,7 @@ impl eframe::App for MarketApp {
let vendor_prefix = String::from(crate::GUI_OVL_DB_KEY);
let vendor =
utils::search_gui_db(vendor_prefix, self.m_order.orid.clone())
.unwrap_or_default();
.unwrap_or_default();
// not much orchestration here afaik, just send the output to the vendor
// TODO(c2m): 'idk remember why this tx.clone() is being reused' but not
// nothing breaks for now...
@ -719,7 +721,8 @@ impl eframe::App for MarketApp {
let info = utils::search_gui_db(
String::from(crate::GUI_MSIG_EXPORT_DB_KEY),
String::from(&self.m_order.orid.clone()),
).unwrap_or_default();
)
.unwrap_or_default();
if !info.is_empty() {
self.msig.completed_export = true;
}
@ -736,8 +739,7 @@ impl eframe::App for MarketApp {
)
.on_hover_text("Please wait for the vendor to upload delivery info.");
if ui.button("Check").clicked() {
let order = order::find(&self.m_order.orid.clone())
.unwrap_or_default();
let order = order::find(&self.m_order.orid.clone()).unwrap_or_default();
if order.status == order::StatusType::Shipped.value() {
self.msig.completed_shipping_request = true;
}
@ -780,7 +782,7 @@ impl eframe::App for MarketApp {
let vendor_prefix = String::from(crate::GUI_OVL_DB_KEY);
let vendor =
utils::search_gui_db(vendor_prefix, self.m_order.orid.clone())
.unwrap_or_default();
.unwrap_or_default();
// async trigger for signing and submitted the txset
release_txset(
vendor,
@ -925,7 +927,8 @@ impl eframe::App for MarketApp {
let e_info: String = utils::search_gui_db(
String::from(neveko_core::DELIVERY_INFO_DB_KEY),
String::from(&o.orid),
).unwrap_or_default();
)
.unwrap_or_default();
cipher_req(
String::from(&o.cid),
e_info,
@ -944,7 +947,8 @@ impl eframe::App for MarketApp {
let vendor = utils::search_gui_db(
vendor_prefix,
self.m_order.orid.clone(),
).unwrap_or_default();
)
.unwrap_or_default();
self.is_loading = true;
cancel_order_req(
self.cancel_request_tx.clone(),
@ -963,7 +967,8 @@ impl eframe::App for MarketApp {
let vendor = utils::search_gui_db(
vendor_prefix,
self.m_order.orid.clone(),
).unwrap_or_default();
)
.unwrap_or_default();
self.is_loading = true;
create_dispute_req(
&self.m_order.orid.clone(),
@ -999,7 +1004,7 @@ impl eframe::App for MarketApp {
let adjudicator_prefix = String::from(crate::GUI_MSIG_ADJUDICATOR_DB_KEY);
let adjudicator =
utils::search_gui_db(adjudicator_prefix, self.m_order.orid.clone())
.unwrap_or_default();
.unwrap_or_default();
ui.label(format!("customer id: {}", self.new_order.cid));
ui.label(format!("adjudicator id: {}", adjudicator));
ui.label(format!("product id: {}", self.new_order.pid));
@ -1085,9 +1090,7 @@ impl eframe::App for MarketApp {
ui.text_edit_singleline(&mut self.upload_dinfo_str)
.labelled_by(delivery_info.id);
});
if !self.new_order.orid.is_empty()
&& !self.upload_dinfo_str.is_empty()
{
if !self.new_order.orid.is_empty() && !self.upload_dinfo_str.is_empty() {
if ui.button("Trigger NASR").clicked() {
// upload delivery info
let dinfo_str = String::from(&self.upload_dinfo_str);
@ -1173,7 +1176,8 @@ impl eframe::App for MarketApp {
let nick_db = utils::search_gui_db(
String::from(crate::GUI_NICK_DB_KEY),
String::from(&v.i2p_address),
).unwrap_or_default();
)
.unwrap_or_default();
let nick = if nick_db.is_empty() {
String::from("anon")
} else {
@ -1185,16 +1189,19 @@ impl eframe::App for MarketApp {
self.vendor_status.txp = utils::search_gui_db(
String::from(crate::GUI_TX_PROOF_DB_KEY),
String::from(&v.i2p_address),
).unwrap_or_default();
)
.unwrap_or_default();
// get the jwp
self.vendor_status.jwp = utils::search_gui_db(
String::from(crate::GUI_JWP_DB_KEY),
String::from(&v.i2p_address),
).unwrap_or_default();
)
.unwrap_or_default();
let r_exp = utils::search_gui_db(
String::from(crate::GUI_EXP_DB_KEY),
String::from(&v.i2p_address),
).unwrap_or_default();
)
.unwrap_or_default();
self.vendor_status.exp = r_exp;
let expire = match self.vendor_status.exp.parse::<i64>()
{
@ -1859,10 +1866,11 @@ fn send_prepare_info_req(
let m_jwp: String = utils::search_gui_db(
String::from(crate::GUI_JWP_DB_KEY),
String::from(&adjudicator),
).unwrap_or_default();
)
.unwrap_or_default();
let v_jwp: String =
utils::search_gui_db(String::from(crate::GUI_JWP_DB_KEY), String::from(&vendor))
.unwrap_or_default();
.unwrap_or_default();
let wallet_password = String::new();
monero::create_wallet(&w_orid, &wallet_password).await;
let m_wallet = monero::open_wallet(&w_orid, &wallet_password).await;
@ -1880,7 +1888,8 @@ fn send_prepare_info_req(
String::from(crate::GUI_MSIG_PREPARE_DB_KEY),
String::from(&w_orid),
String::from(ref_prepare_info),
).unwrap();
)
.unwrap();
// Request adjudicator and vendor while we're at it
// Will coordinating send this on make requests next
let db = &DATABASE_LOCK;
@ -1896,10 +1905,12 @@ fn send_prepare_info_req(
String::from(&v_orid),
vendor
);
let m_prepare = db::DatabaseEnvironment::read(&db.env, &db.handle, &m_msig_key.as_bytes().to_vec())
.unwrap_or_default();
let v_prepare = db::DatabaseEnvironment::read(&db.env, &db.handle, &v_msig_key.as_bytes().to_vec())
.unwrap_or_default();
let m_prepare =
db::DatabaseEnvironment::read(&db.env, &db.handle, &m_msig_key.as_bytes().to_vec())
.unwrap_or_default();
let v_prepare =
db::DatabaseEnvironment::read(&db.env, &db.handle, &v_msig_key.as_bytes().to_vec())
.unwrap_or_default();
if v_prepare.is_empty() {
log::debug!(
"constructing vendor {} msig messages",
@ -1950,10 +1961,11 @@ fn send_make_info_req(
let m_jwp: String = utils::search_gui_db(
String::from(crate::GUI_JWP_DB_KEY),
String::from(&adjudicator),
).unwrap_or_default();
)
.unwrap_or_default();
let v_jwp: String =
utils::search_gui_db(String::from(crate::GUI_JWP_DB_KEY), String::from(&vendor))
.unwrap_or_default();
.unwrap_or_default();
let wallet_password = String::new();
let m_wallet = monero::open_wallet(&w_orid, &wallet_password).await;
if !m_wallet {
@ -1984,11 +1996,13 @@ fn send_make_info_req(
String::from(&v_orid),
vendor
);
let m_prepare = db::DatabaseEnvironment::read(&db.env, &db.handle, &m_msig_key.as_bytes().to_vec())
.unwrap_or_default();
let m_prepare =
db::DatabaseEnvironment::read(&db.env, &db.handle, &m_msig_key.as_bytes().to_vec())
.unwrap_or_default();
let sm_prepare: String = bincode::deserialize(&m_prepare[..]).unwrap_or_default();
let v_prepare = db::DatabaseEnvironment::read(&db.env, &db.handle, &v_msig_key.as_bytes().to_vec())
.unwrap_or_default();
let v_prepare =
db::DatabaseEnvironment::read(&db.env, &db.handle, &v_msig_key.as_bytes().to_vec())
.unwrap_or_default();
let sv_prepare: String = bincode::deserialize(&&v_prepare[..]).unwrap_or_default();
prepare_info_prep.push(String::from(&sm_prepare));
prepare_info_prep.push(String::from(&sv_prepare));
@ -2000,7 +2014,8 @@ fn send_make_info_req(
let local_make = utils::search_gui_db(
String::from(crate::GUI_MSIG_MAKE_DB_KEY),
String::from(&w_orid),
).unwrap_or_default();
)
.unwrap_or_default();
if local_make.is_empty() {
let make_info = monero::make_wallet(prepare_info_prep).await;
monero::close_wallet(&w_orid, &wallet_password).await;
@ -2010,7 +2025,8 @@ fn send_make_info_req(
String::from(crate::GUI_MSIG_MAKE_DB_KEY),
String::from(&w_orid),
String::from(ref_make_info),
).unwrap();
)
.unwrap();
}
}
// Request adjudicator and vendor while we're at it
@ -2027,10 +2043,12 @@ fn send_make_info_req(
String::from(&v_orid),
vendor
);
let m_make = db::DatabaseEnvironment::read(&db.env, &db.handle, &m_msig_key.as_bytes().to_vec())
.unwrap_or_default();
let v_make = db::DatabaseEnvironment::read(&db.env, &db.handle, &v_msig_key.as_bytes().to_vec())
.unwrap_or_default();
let m_make =
db::DatabaseEnvironment::read(&db.env, &db.handle, &m_msig_key.as_bytes().to_vec())
.unwrap_or_default();
let v_make =
db::DatabaseEnvironment::read(&db.env, &db.handle, &v_msig_key.as_bytes().to_vec())
.unwrap_or_default();
if v_make.is_empty() {
log::debug!("constructing vendor {} msig messages", message::MAKE_MSIG);
let v_msig_request: reqres::MultisigInfoRequest = reqres::MultisigInfoRequest {
@ -2078,10 +2096,11 @@ fn send_kex_initial_req(
let m_jwp: String = utils::search_gui_db(
String::from(crate::GUI_JWP_DB_KEY),
String::from(&adjudicator),
).unwrap_or_default();
)
.unwrap_or_default();
let v_jwp: String =
utils::search_gui_db(String::from(crate::GUI_JWP_DB_KEY), String::from(&vendor))
.unwrap_or_default();
.unwrap_or_default();
let wallet_password = String::new();
let m_wallet = monero::open_wallet(&w_orid, &wallet_password).await;
if !m_wallet {
@ -2098,7 +2117,8 @@ fn send_kex_initial_req(
let c_kex_init = utils::search_gui_db(
String::from(crate::GUI_MSIG_MAKE_DB_KEY),
String::from(&w_orid),
).unwrap_or_default();
)
.unwrap_or_default();
let db = &DATABASE_LOCK;
let m_msig_key = format!(
"{}-{}-{}",
@ -2112,11 +2132,13 @@ fn send_kex_initial_req(
String::from(&v_orid),
vendor
);
let m_kex_init = db::DatabaseEnvironment::read(&db.env, &db.handle, &m_msig_key.as_bytes().to_vec())
.unwrap_or_default();
let m_kex_init =
db::DatabaseEnvironment::read(&db.env, &db.handle, &m_msig_key.as_bytes().to_vec())
.unwrap_or_default();
let sm_kex_init: String = bincode::deserialize(&m_kex_init[..]).unwrap_or_default();
let v_kex_init = db::DatabaseEnvironment::read(&db.env, &db.handle, &v_msig_key.as_bytes().to_vec())
.unwrap_or_default();
let v_kex_init =
db::DatabaseEnvironment::read(&db.env, &db.handle, &v_msig_key.as_bytes().to_vec())
.unwrap_or_default();
let sv_kex_init: String = bincode::deserialize(&v_kex_init[..]).unwrap_or_default();
kex_init_prep.push(String::from(&sm_kex_init));
kex_init_prep.push(String::from(&sv_kex_init));
@ -2127,7 +2149,8 @@ fn send_kex_initial_req(
let local_kex_init = utils::search_gui_db(
String::from(crate::GUI_MSIG_KEX_ONE_DB_KEY),
String::from(&w_orid),
).unwrap_or_default();
)
.unwrap_or_default();
if local_kex_init.is_empty() {
let kex_out =
monero::exchange_multisig_keys(false, kex_init_prep, &wallet_password).await;
@ -2138,7 +2161,8 @@ fn send_kex_initial_req(
String::from(crate::GUI_MSIG_KEX_ONE_DB_KEY),
String::from(&w_orid),
String::from(ref_kex_info),
).unwrap();
)
.unwrap();
}
}
// Request adjudicator and vendor while we're at it
@ -2155,10 +2179,12 @@ fn send_kex_initial_req(
String::from(&v_orid),
vendor
);
let m_kex_init = db::DatabaseEnvironment::read(&db.env, &db.handle, &m_msig_key.as_bytes().to_vec())
.unwrap_or_default();
let v_kex_init = db::DatabaseEnvironment::read(&db.env, &db.handle, &v_msig_key.as_bytes().to_vec())
.unwrap_or_default();
let m_kex_init =
db::DatabaseEnvironment::read(&db.env, &db.handle, &m_msig_key.as_bytes().to_vec())
.unwrap_or_default();
let v_kex_init =
db::DatabaseEnvironment::read(&db.env, &db.handle, &v_msig_key.as_bytes().to_vec())
.unwrap_or_default();
if v_kex_init.is_empty() {
log::debug!(
"constructing vendor {} msig messages",
@ -2209,10 +2235,11 @@ fn send_kex_final_req(
let m_jwp: String = utils::search_gui_db(
String::from(crate::GUI_JWP_DB_KEY),
String::from(&adjudicator),
).unwrap_or_default();
)
.unwrap_or_default();
let v_jwp: String =
utils::search_gui_db(String::from(crate::GUI_JWP_DB_KEY), String::from(&vendor))
.unwrap_or_default();
.unwrap_or_default();
let wallet_password = String::new();
let m_wallet = monero::open_wallet(&w_orid, &wallet_password).await;
if !m_wallet {
@ -2227,7 +2254,8 @@ fn send_kex_final_req(
let c_kex_final = utils::search_gui_db(
String::from(crate::GUI_MSIG_KEX_ONE_DB_KEY),
String::from(&w_orid),
).unwrap_or_default();
)
.unwrap_or_default();
let db = &DATABASE_LOCK;
let m_msig_key = format!(
"{}-{}-{}",
@ -2241,10 +2269,12 @@ fn send_kex_final_req(
String::from(&v_orid),
vendor
);
let r_m_kex_final = db::DatabaseEnvironment::read(&db.env, &db.handle, &m_msig_key.as_bytes().to_vec())
.unwrap_or_default();
let r_v_kex_final = db::DatabaseEnvironment::read(&db.env, &db.handle, &v_msig_key.as_bytes().to_vec())
.unwrap_or_default();
let r_m_kex_final =
db::DatabaseEnvironment::read(&db.env, &db.handle, &m_msig_key.as_bytes().to_vec())
.unwrap_or_default();
let r_v_kex_final =
db::DatabaseEnvironment::read(&db.env, &db.handle, &v_msig_key.as_bytes().to_vec())
.unwrap_or_default();
let m_kex_final: String = bincode::deserialize(&r_m_kex_final[..]).unwrap_or_default();
let v_kex_final: String = bincode::deserialize(&r_v_kex_final[..]).unwrap_or_default();
kex_final_prep.push(String::from(&m_kex_final));
@ -2256,7 +2286,8 @@ fn send_kex_final_req(
let local_kex_final = utils::search_gui_db(
String::from(crate::GUI_MSIG_KEX_TWO_DB_KEY),
String::from(&w_orid),
).unwrap_or_default();
)
.unwrap_or_default();
if local_kex_final.is_empty() {
let kex_out =
monero::exchange_multisig_keys(false, kex_final_prep, &wallet_password).await;
@ -2267,7 +2298,8 @@ fn send_kex_final_req(
String::from(crate::GUI_MSIG_KEX_TWO_DB_KEY),
String::from(&w_orid),
String::from(ref_kex_info),
).unwrap_or_default();
)
.unwrap_or_default();
}
}
// we can verify all good if the senders all send back the correct wallet address
@ -2283,10 +2315,12 @@ fn send_kex_final_req(
String::from(&v_orid),
vendor
);
let m_kex_final = db::DatabaseEnvironment::read(&db.env, &db.handle, &m_msig_key.as_bytes().to_vec())
.unwrap_or_default();
let v_kex_final = db::DatabaseEnvironment::read(&db.env, &db.handle, &v_msig_key.as_bytes().to_vec())
.unwrap_or_default();
let m_kex_final =
db::DatabaseEnvironment::read(&db.env, &db.handle, &m_msig_key.as_bytes().to_vec())
.unwrap_or_default();
let v_kex_final =
db::DatabaseEnvironment::read(&db.env, &db.handle, &v_msig_key.as_bytes().to_vec())
.unwrap_or_default();
if v_kex_final.is_empty() {
log::debug!(
"constructing vendor {} msig messages",
@ -2359,7 +2393,7 @@ fn verify_order_wallet_funded(
let vendor = String::from(&l_contact);
let v_jwp: String =
utils::search_gui_db(String::from(crate::GUI_JWP_DB_KEY), String::from(&vendor))
.unwrap_or_default();
.unwrap_or_default();
let opid = String::from(&order.pid);
let result = product::get_vendor_product(vendor, v_jwp, opid).await;
if !result.is_ok() {
@ -2385,7 +2419,7 @@ fn send_import_info_req(tx: Sender<String>, ctx: egui::Context, orid: &String, v
tokio::spawn(async move {
let v_jwp: String =
utils::search_gui_db(String::from(crate::GUI_JWP_DB_KEY), String::from(&vendor))
.unwrap_or_default();
.unwrap_or_default();
let wallet_password = String::new();
let m_wallet = monero::open_wallet(&w_orid, &wallet_password).await;
if !m_wallet {
@ -2402,7 +2436,8 @@ fn send_import_info_req(tx: Sender<String>, ctx: egui::Context, orid: &String, v
String::from(crate::GUI_MSIG_EXPORT_DB_KEY),
String::from(&w_orid),
String::from(ref_export_info),
).unwrap_or_default();
)
.unwrap_or_default();
// Request vendor while we're at it
// Will coordinating send this on make requests next
let db = &DATABASE_LOCK;
@ -2412,8 +2447,9 @@ fn send_import_info_req(tx: Sender<String>, ctx: egui::Context, orid: &String, v
String::from(&v_orid),
vendor
);
let v_export = db::DatabaseEnvironment::read(&db.env, &db.handle, &v_msig_key.as_bytes().to_vec())
.unwrap_or_default();
let v_export =
db::DatabaseEnvironment::read(&db.env, &db.handle, &v_msig_key.as_bytes().to_vec())
.unwrap_or_default();
if v_export.is_empty() {
log::debug!("constructing vendor {} msig messages", message::EXPORT_MSIG);
let v_msig_request: reqres::MultisigInfoRequest = reqres::MultisigInfoRequest {
@ -2478,10 +2514,12 @@ fn validate_msig_step(
let db = &DATABASE_LOCK;
let m_msig_key = format!("{}-{}-{}", sub_type, orid, adjudicator);
let v_msig_key = format!("{}-{}-{}", sub_type, orid, vendor);
let r_m_info = db::DatabaseEnvironment::read(&db.env, &db.handle, &m_msig_key.as_bytes().to_vec())
.unwrap_or_default();
let r_v_info = db::DatabaseEnvironment::read(&db.env, &db.handle, &v_msig_key.as_bytes().to_vec())
.unwrap_or_default();
let r_m_info =
db::DatabaseEnvironment::read(&db.env, &db.handle, &m_msig_key.as_bytes().to_vec())
.unwrap_or_default();
let r_v_info =
db::DatabaseEnvironment::read(&db.env, &db.handle, &v_msig_key.as_bytes().to_vec())
.unwrap_or_default();
let m_info: String = bincode::deserialize(&&r_m_info[..]).unwrap_or_default();
let v_info: String = bincode::deserialize(&&r_v_info[..]).unwrap_or_default();
log::debug!("{} adjudicator info: {}", sub_type, &m_info);

View file

@ -71,8 +71,13 @@ impl eframe::App for SettingsApp {
let mut hasher = Sha512::new();
hasher.update(self.credential.clone());
let result = hasher.finalize();
db::write_chunks(&db.env, &db.handle, k.as_bytes(), hex::encode(&result[..]).as_bytes())
.unwrap_or_else(|_| log::error!("failed to write credential"));
db::write_chunks(
&db.env,
&db.handle,
k.as_bytes(),
hex::encode(&result[..]).as_bytes(),
)
.unwrap_or_else(|_| log::error!("failed to write credential"));
// update wallet rpc
change_wallet_password(
self.change_wallet_password_tx.clone(),

View file

@ -56,7 +56,8 @@ impl eframe::App for LoginApp {
hasher.update(self.credential.clone());
let result = hasher.finalize();
let db = &DATABASE_LOCK;
db::write_chunks(&db.env, &db.handle, k.as_bytes(), hex::encode(&result[..]).as_bytes())
let v = bincode::serialize(&hex::encode(&result[..])).unwrap_or_default();
db::write_chunks(&db.env, &db.handle, k.as_bytes(), &v)
.unwrap_or_else(|_| log::error!("failed to set credential"));
self.credential = String::new();
}

View file

@ -242,7 +242,8 @@ impl WrapApp {
&db.env,
&db.handle,
&crate::CREDENTIAL_KEY.as_bytes().to_vec(),
).unwrap_or_default();
)
.unwrap_or_default();
if !r.is_empty() {
self.state.is_cred_set = true;
self.state.is_checking_cred = false;
@ -317,8 +318,9 @@ impl WrapApp {
let r = db::DatabaseEnvironment::read(
&db.env,
&db.handle,
&crate::CREDENTIAL_KEY.as_bytes().to_vec()
).unwrap_or_default();
&crate::CREDENTIAL_KEY.as_bytes().to_vec(),
)
.unwrap_or_default();
if r.is_empty() {
log::debug!("credential not found");
let _ = tx.send(false);

428
neveko-market/Cargo.lock generated
View file

@ -138,10 +138,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "383d29d513d8764dcdc42ea295d979eb99c3c9f00607b3692cf68a431f7dca72"
[[package]]
name = "bitflags"
version = "0.7.0"
name = "bincode"
version = "1.3.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "aad18937a628ec6abcd26d1489012cc0e18c21798210f491af69ded9b881106d"
checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad"
dependencies = [
"serde",
]
[[package]]
name = "bitflags"
@ -149,6 +152,12 @@ version = "1.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
[[package]]
name = "bitflags"
version = "2.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de"
[[package]]
name = "block-buffer"
version = "0.9.0"
@ -185,6 +194,12 @@ version = "1.0.79"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f"
[[package]]
name = "cesu8"
version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6d43a04d8753f35258c91f8ec639f792891f748a1edbd759cf1dcea3382ad83c"
[[package]]
name = "cfg-if"
version = "1.0.0"
@ -306,6 +321,31 @@ dependencies = [
"libc 0.2.153",
]
[[package]]
name = "crossbeam-deque"
version = "0.8.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "613f8cc01fe9cf1a3eb3d7f488fd2fa8388403e97039e2f73692932e291a770d"
dependencies = [
"crossbeam-epoch",
"crossbeam-utils",
]
[[package]]
name = "crossbeam-epoch"
version = "0.9.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e"
dependencies = [
"crossbeam-utils",
]
[[package]]
name = "crossbeam-utils"
version = "0.8.20"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80"
[[package]]
name = "crypto-common"
version = "0.1.6"
@ -328,15 +368,14 @@ dependencies = [
[[package]]
name = "curve25519-dalek"
version = "4.1.2"
version = "4.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0a677b8922c94e01bdbb12126b0bc852f00447528dee1782229af9c720c3f348"
checksum = "97fb8b7c4503de7d6ae7b42ab72a5a59857b4c937ec27a3d4539dba95b5ab2be"
dependencies = [
"cfg-if",
"cpufeatures",
"curve25519-dalek-derive",
"fiat-crypto",
"platforms",
"rustc_version",
"subtle",
"zeroize",
@ -475,6 +514,12 @@ dependencies = [
"url",
]
[[package]]
name = "dunce"
version = "1.0.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813"
[[package]]
name = "either"
version = "1.8.1"
@ -498,7 +543,7 @@ checksum = "85cdab6a89accf66733ad5a1693a4dcced6aeff64602b634530dd73c1f3ee9f0"
dependencies = [
"humantime",
"is-terminal",
"log 0.4.17",
"log",
"regex",
"termcolor",
]
@ -583,6 +628,12 @@ dependencies = [
"percent-encoding",
]
[[package]]
name = "fs_extra"
version = "1.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "42703706b716c37f96a77aea830392ad231f44c9e9a67872fa5548707e11b11c"
[[package]]
name = "futures"
version = "0.3.26"
@ -591,6 +642,7 @@ checksum = "13e2792b0ff0340399d58445b88fd9770e3489eff258a4cbc1523418f12abf84"
dependencies = [
"futures-channel",
"futures-core",
"futures-executor",
"futures-io",
"futures-sink",
"futures-task",
@ -613,12 +665,34 @@ version = "0.3.26"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ec90ff4d0fe1f57d600049061dc6bb68ed03c7d2fbd697274c41805dcb3f8608"
[[package]]
name = "futures-executor"
version = "0.3.26"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e8de0a35a6ab97ec8869e32a2473f4b1324459e14c29275d14b10cb1fd19b50e"
dependencies = [
"futures-core",
"futures-task",
"futures-util",
]
[[package]]
name = "futures-io"
version = "0.3.26"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bfb8371b6fb2aeb2d280374607aeabfc99d95c72edfe51692e42d3d7f0d08531"
[[package]]
name = "futures-macro"
version = "0.3.26"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "95a73af87da33b5acf53acfebdc339fe592ecf5357ac7c0a7734ab9d8c876a70"
dependencies = [
"proc-macro2",
"quote",
"syn 1.0.107",
]
[[package]]
name = "futures-sink"
version = "0.3.26"
@ -640,6 +714,7 @@ dependencies = [
"futures-channel",
"futures-core",
"futures-io",
"futures-macro",
"futures-sink",
"futures-task",
"memchr",
@ -662,9 +737,9 @@ checksum = "d266041a359dfa931b370ef684cceb84b166beb14f7f0421f4a6a3d0c446d12e"
dependencies = [
"cc",
"libc 0.2.153",
"log 0.4.17",
"log",
"rustversion",
"windows",
"windows 0.39.0",
]
[[package]]
@ -963,6 +1038,67 @@ version = "1.0.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fad582f4b9e86b6caa621cabeb0963332d92eea04729ab12892c2533951e6440"
[[package]]
name = "j4-i2p-rs"
version = "0.2.0-alpha"
dependencies = [
"hex",
"j4rs",
"log",
"rand",
"thiserror",
]
[[package]]
name = "j4rs"
version = "0.20.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "689ae4f2bd4eba82601592f3d22b7e7147b1df52d3b525223f5218990501b4eb"
dependencies = [
"cesu8",
"dunce",
"fs_extra",
"futures",
"glob",
"java-locator",
"jni-sys",
"lazy_static 1.4.0",
"libc 0.2.153",
"libloading",
"log",
"serde",
"serde_json",
]
[[package]]
name = "java-locator"
version = "0.1.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d2abecabd9961c5e01405a6426687fcf1bd94a269927137e4c3cc1a7419b93fd"
dependencies = [
"glob",
"lazy_static 1.4.0",
]
[[package]]
name = "jni-sys"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c30a312d782b8d56a1e0897d45c1af33f31f9b4a4d13d31207a8675e0223b818"
dependencies = [
"jni-sys-macros",
]
[[package]]
name = "jni-sys-macros"
version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e6c199962dfd5610ced8eca382606e349f7940a4ac7d867b58a046123411cbb4"
dependencies = [
"quote",
"syn 1.0.107",
]
[[package]]
name = "js-sys"
version = "0.3.60"
@ -987,6 +1123,18 @@ dependencies = [
"sha2 0.10.6",
]
[[package]]
name = "kn0sys-lmdb-rs"
version = "0.1.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "58fbf491e9e95a325cbfe1459734cec781c0145c0d5cb7c4ced71af742364d19"
dependencies = [
"bitflags 2.6.0",
"libc 0.2.153",
"liblmdb-sys",
"log",
]
[[package]]
name = "lazy_static"
version = "0.2.11"
@ -1021,6 +1169,16 @@ dependencies = [
"libc 0.2.153",
]
[[package]]
name = "libloading"
version = "0.8.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4979f22fdb869068da03c9f7528f8297c6fd2606bc3a4affe42e6a823fdb8da4"
dependencies = [
"cfg-if",
"windows-targets 0.52.6",
]
[[package]]
name = "link-cplusplus"
version = "1.0.8"
@ -1036,18 +1194,6 @@ version = "0.1.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f051f77a7c8e6957c0696eac88f26b0117e54f52d3fc682ab19397a8812846a4"
[[package]]
name = "lmdb-rs"
version = "0.7.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4aefe7b433f795629ce42f35ccf7a620c38bd457238bfaa2489dafc7e36167e7"
dependencies = [
"bitflags 0.7.0",
"libc 0.2.153",
"liblmdb-sys",
"log 0.3.9",
]
[[package]]
name = "lock_api"
version = "0.4.9"
@ -1060,21 +1206,9 @@ dependencies = [
[[package]]
name = "log"
version = "0.3.9"
version = "0.4.22"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e19e8d5c34a3e0e2223db8e060f9e8264aeeb5c5fc64a4ee9965c062211c024b"
dependencies = [
"log 0.4.17",
]
[[package]]
name = "log"
version = "0.4.17"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e"
dependencies = [
"cfg-if",
]
checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24"
[[package]]
name = "loom"
@ -1130,7 +1264,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e5d732bc30207a6423068df043e3d02e0735b155ad7ce1a6f76fe2baa5b158de"
dependencies = [
"libc 0.2.153",
"log 0.4.17",
"log",
"wasi 0.11.0+wasi-snapshot-preview1",
"windows-sys 0.42.0",
]
@ -1146,7 +1280,7 @@ dependencies = [
"futures-util",
"http",
"httparse",
"log 0.4.17",
"log",
"memchr",
"mime",
"spin",
@ -1163,7 +1297,7 @@ checksum = "07226173c32f2926027b63cce4bcd8076c3552846cbe7925f3aaffeac0a3b92e"
dependencies = [
"lazy_static 1.4.0",
"libc 0.2.153",
"log 0.4.17",
"log",
"openssl",
"openssl-probe",
"openssl-sys",
@ -1177,6 +1311,7 @@ dependencies = [
name = "neveko_core"
version = "0.1.2-beta"
dependencies = [
"bincode",
"chrono",
"clap",
"curve25519-dalek",
@ -1184,10 +1319,11 @@ dependencies = [
"env_logger",
"hex",
"hmac",
"j4-i2p-rs",
"jwt",
"kn0sys-lmdb-rs",
"lazy_static 1.4.0",
"lmdb-rs",
"log 0.4.17",
"log",
"num",
"rand",
"rand_core",
@ -1198,6 +1334,8 @@ dependencies = [
"serde",
"serde_json",
"sha2 0.10.6",
"sysinfo",
"thiserror",
"tokio",
]
@ -1207,11 +1345,20 @@ version = "0.1.2-beta"
dependencies = [
"chrono",
"env_logger",
"log 0.4.17",
"log",
"neveko_core",
"rocket",
]
[[package]]
name = "ntapi"
version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e8a3895c6391c39d7fe7ebc444a87eb2991b2a0bc718fdabd071eec617fc68e4"
dependencies = [
"winapi",
]
[[package]]
name = "nu-ansi-term"
version = "0.46.0"
@ -1447,12 +1594,6 @@ version = "0.3.26"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6ac9a59f73473f1b8d852421e59e64809f025994837ef743615c6d0c5b305160"
[[package]]
name = "platforms"
version = "3.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "db23d408679286588f4d4644f965003d056e3dd5abcaaa938116871d7ce2fee7"
[[package]]
name = "polyval"
version = "0.6.0"
@ -1556,6 +1697,26 @@ dependencies = [
"getrandom",
]
[[package]]
name = "rayon"
version = "1.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b418a60154510ca1a002a752ca9714984e21e4241e804d32555251faf8b78ffa"
dependencies = [
"either",
"rayon-core",
]
[[package]]
name = "rayon-core"
version = "1.12.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1465873a3dfdaa8ae7cb14b4383657caab0b3e8a0aa9ae8e04b044854c8dfce2"
dependencies = [
"crossbeam-deque",
"crossbeam-utils",
]
[[package]]
name = "redox_syscall"
version = "0.2.16"
@ -1638,7 +1799,7 @@ dependencies = [
"hyper-tls",
"ipnet",
"js-sys",
"log 0.4.17",
"log",
"mime",
"native-tls",
"once_cell",
@ -1673,7 +1834,7 @@ dependencies = [
"figment",
"futures",
"indexmap",
"log 0.4.17",
"log",
"memchr",
"multer",
"num_cpus",
@ -1724,7 +1885,7 @@ dependencies = [
"http",
"hyper",
"indexmap",
"log 0.4.17",
"log",
"memchr",
"pear",
"percent-encoding",
@ -2017,6 +2178,20 @@ dependencies = [
"unicode-ident",
]
[[package]]
name = "sysinfo"
version = "0.31.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "355dbe4f8799b304b05e1b0f05fc59b2a18d36645cf169607da45bde2f69a1be"
dependencies = [
"core-foundation-sys",
"libc 0.2.153",
"memchr",
"ntapi",
"rayon",
"windows 0.57.0",
]
[[package]]
name = "tempfile"
version = "3.3.0"
@ -2049,6 +2224,26 @@ dependencies = [
"libc 0.1.12",
]
[[package]]
name = "thiserror"
version = "1.0.63"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c0342370b38b6a11b6cc11d6a805569958d54cfa061a29969c3b5ce2ea405724"
dependencies = [
"thiserror-impl",
]
[[package]]
name = "thiserror-impl"
version = "1.0.63"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.58",
]
[[package]]
name = "thread_local"
version = "1.1.4"
@ -2231,7 +2426,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "78ddad33d2d10b1ed7eb9d1f518a5674713876e97e5bb9b7345a7984fbb4f922"
dependencies = [
"lazy_static 1.4.0",
"log 0.4.17",
"log",
"tracing-core",
]
@ -2362,7 +2557,7 @@ version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1ce8a968cb1cd110d136ff8b819a556d6fb6d919363c61534f6860c7eb172ba0"
dependencies = [
"log 0.4.17",
"log",
"try-lock",
]
@ -2395,7 +2590,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4c8ffb332579b0557b52d268b91feab8df3615f265d5270fec2a8c95b17c1142"
dependencies = [
"bumpalo",
"log 0.4.17",
"log",
"once_cell",
"proc-macro2",
"quote",
@ -2498,18 +2693,71 @@ dependencies = [
"windows_x86_64_msvc 0.39.0",
]
[[package]]
name = "windows"
version = "0.57.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "12342cb4d8e3b046f3d80effd474a7a02447231330ef77d71daa6fbc40681143"
dependencies = [
"windows-core",
"windows-targets 0.52.6",
]
[[package]]
name = "windows-core"
version = "0.57.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d2ed2439a290666cd67ecce2b0ffaad89c2a56b976b736e6ece670297897832d"
dependencies = [
"windows-implement",
"windows-interface",
"windows-result",
"windows-targets 0.52.6",
]
[[package]]
name = "windows-implement"
version = "0.57.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9107ddc059d5b6fbfbffdfa7a7fe3e22a226def0b2608f72e9d552763d3e1ad7"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.58",
]
[[package]]
name = "windows-interface"
version = "0.57.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "29bee4b38ea3cde66011baa44dba677c432a78593e202392d1e9070cf2a7fca7"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.58",
]
[[package]]
name = "windows-result"
version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5e383302e8ec8515204254685643de10811af0ed97ea37210dc26fb0032647f8"
dependencies = [
"windows-targets 0.52.6",
]
[[package]]
name = "windows-sys"
version = "0.42.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7"
dependencies = [
"windows_aarch64_gnullvm",
"windows_aarch64_gnullvm 0.42.1",
"windows_aarch64_msvc 0.42.1",
"windows_i686_gnu 0.42.1",
"windows_i686_msvc 0.42.1",
"windows_x86_64_gnu 0.42.1",
"windows_x86_64_gnullvm",
"windows_x86_64_gnullvm 0.42.1",
"windows_x86_64_msvc 0.42.1",
]
@ -2519,7 +2767,7 @@ version = "0.45.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0"
dependencies = [
"windows-targets",
"windows-targets 0.42.1",
]
[[package]]
@ -2528,21 +2776,43 @@ version = "0.42.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8e2522491fbfcd58cc84d47aeb2958948c4b8982e9a2d8a2a35bbaed431390e7"
dependencies = [
"windows_aarch64_gnullvm",
"windows_aarch64_gnullvm 0.42.1",
"windows_aarch64_msvc 0.42.1",
"windows_i686_gnu 0.42.1",
"windows_i686_msvc 0.42.1",
"windows_x86_64_gnu 0.42.1",
"windows_x86_64_gnullvm",
"windows_x86_64_gnullvm 0.42.1",
"windows_x86_64_msvc 0.42.1",
]
[[package]]
name = "windows-targets"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973"
dependencies = [
"windows_aarch64_gnullvm 0.52.6",
"windows_aarch64_msvc 0.52.6",
"windows_i686_gnu 0.52.6",
"windows_i686_gnullvm",
"windows_i686_msvc 0.52.6",
"windows_x86_64_gnu 0.52.6",
"windows_x86_64_gnullvm 0.52.6",
"windows_x86_64_msvc 0.52.6",
]
[[package]]
name = "windows_aarch64_gnullvm"
version = "0.42.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8c9864e83243fdec7fc9c5444389dcbbfd258f745e7853198f365e3c4968a608"
[[package]]
name = "windows_aarch64_gnullvm"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3"
[[package]]
name = "windows_aarch64_msvc"
version = "0.39.0"
@ -2555,6 +2825,12 @@ version = "0.42.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4c8b1b673ffc16c47a9ff48570a9d85e25d265735c503681332589af6253c6c7"
[[package]]
name = "windows_aarch64_msvc"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469"
[[package]]
name = "windows_i686_gnu"
version = "0.39.0"
@ -2567,6 +2843,18 @@ version = "0.42.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "de3887528ad530ba7bdbb1faa8275ec7a1155a45ffa57c37993960277145d640"
[[package]]
name = "windows_i686_gnu"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b"
[[package]]
name = "windows_i686_gnullvm"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66"
[[package]]
name = "windows_i686_msvc"
version = "0.39.0"
@ -2579,6 +2867,12 @@ version = "0.42.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bf4d1122317eddd6ff351aa852118a2418ad4214e6613a50e0191f7004372605"
[[package]]
name = "windows_i686_msvc"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66"
[[package]]
name = "windows_x86_64_gnu"
version = "0.39.0"
@ -2591,12 +2885,24 @@ version = "0.42.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c1040f221285e17ebccbc2591ffdc2d44ee1f9186324dd3e84e99ac68d699c45"
[[package]]
name = "windows_x86_64_gnu"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78"
[[package]]
name = "windows_x86_64_gnullvm"
version = "0.42.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "628bfdf232daa22b0d64fdb62b09fcc36bb01f05a3939e20ab73aaf9470d0463"
[[package]]
name = "windows_x86_64_gnullvm"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d"
[[package]]
name = "windows_x86_64_msvc"
version = "0.39.0"
@ -2609,6 +2915,12 @@ version = "0.42.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "447660ad36a13288b1db4d4248e857b510e8c3a225c822ba4fb748c0aafecffd"
[[package]]
name = "windows_x86_64_msvc"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec"
[[package]]
name = "winreg"
version = "0.10.1"

View file

@ -26,7 +26,7 @@ pub async fn create_product(
/// Get a product by passing id
#[get("/<pid>")]
pub async fn get_product(pid: String, _token: auth::BearerToken) -> Custom<Json<models::Product>> {
let m_product= product::find(&pid);
let m_product = product::find(&pid);
Custom(Status::Ok, Json(m_product.unwrap_or_default()))
}

View file

@ -17,7 +17,7 @@ version = "0.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311"
dependencies = [
"libc 0.2.140",
"libc 0.2.158",
]
[[package]]
@ -127,10 +127,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "383d29d513d8764dcdc42ea295d979eb99c3c9f00607b3692cf68a431f7dca72"
[[package]]
name = "bitflags"
version = "0.7.0"
name = "bincode"
version = "1.3.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "aad18937a628ec6abcd26d1489012cc0e18c21798210f491af69ded9b881106d"
checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad"
dependencies = [
"serde",
]
[[package]]
name = "bitflags"
@ -140,9 +143,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
[[package]]
name = "bitflags"
version = "2.0.2"
version = "2.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "487f1e0fcbe47deb8b0574e646def1c903389d95241dd1bbcc6ce4a715dfc0c1"
checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de"
[[package]]
name = "block-buffer"
@ -180,6 +183,12 @@ version = "1.0.79"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f"
[[package]]
name = "cesu8"
version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6d43a04d8753f35258c91f8ec639f792891f748a1edbd759cf1dcea3382ad83c"
[[package]]
name = "cfg-if"
version = "1.0.0"
@ -286,7 +295,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "194a7a9e6de53fa55116934067c844d9d749312f75c6f6d0980e8c252f8c2146"
dependencies = [
"core-foundation-sys",
"libc 0.2.140",
"libc 0.2.158",
]
[[package]]
@ -301,9 +310,34 @@ version = "0.2.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "280a9f2d8b3a38871a3c8a46fb80db65e5e5ed97da80c4d08bf27fb63e35e181"
dependencies = [
"libc 0.2.140",
"libc 0.2.158",
]
[[package]]
name = "crossbeam-deque"
version = "0.8.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "613f8cc01fe9cf1a3eb3d7f488fd2fa8388403e97039e2f73692932e291a770d"
dependencies = [
"crossbeam-epoch",
"crossbeam-utils",
]
[[package]]
name = "crossbeam-epoch"
version = "0.9.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e"
dependencies = [
"crossbeam-utils",
]
[[package]]
name = "crossbeam-utils"
version = "0.8.20"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80"
[[package]]
name = "crypto-common"
version = "0.1.6"
@ -316,15 +350,14 @@ dependencies = [
[[package]]
name = "curve25519-dalek"
version = "4.1.2"
version = "4.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0a677b8922c94e01bdbb12126b0bc852f00447528dee1782229af9c720c3f348"
checksum = "97fb8b7c4503de7d6ae7b42ab72a5a59857b4c937ec27a3d4539dba95b5ab2be"
dependencies = [
"cfg-if",
"cpufeatures",
"curve25519-dalek-derive",
"fiat-crypto",
"platforms",
"rustc_version",
"subtle",
"zeroize",
@ -411,7 +444,7 @@ version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "35b50dba0afdca80b187392b24f2499a88c336d5a8493e4b4ccfb608708be56a"
dependencies = [
"bitflags 2.0.2",
"bitflags 2.6.0",
"proc-macro2",
"proc-macro2-diagnostics",
"quote",
@ -463,6 +496,12 @@ dependencies = [
"url",
]
[[package]]
name = "dunce"
version = "1.0.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813"
[[package]]
name = "either"
version = "1.8.1"
@ -486,7 +525,7 @@ checksum = "85cdab6a89accf66733ad5a1693a4dcced6aeff64602b634530dd73c1f3ee9f0"
dependencies = [
"humantime",
"is-terminal",
"log 0.4.17",
"log",
"regex",
"termcolor",
]
@ -498,7 +537,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "50d6a0976c999d473fe89ad888d5a284e55366d9dc9038b1ba2aa15128c4afa0"
dependencies = [
"errno-dragonfly",
"libc 0.2.140",
"libc 0.2.158",
"windows-sys 0.45.0",
]
@ -509,7 +548,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "aa68f1b12764fab894d2755d2518754e71b4fd80ecfb822714a1206c2aab39bf"
dependencies = [
"cc",
"libc 0.2.140",
"libc 0.2.158",
]
[[package]]
@ -571,6 +610,12 @@ dependencies = [
"percent-encoding",
]
[[package]]
name = "fs_extra"
version = "1.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "42703706b716c37f96a77aea830392ad231f44c9e9a67872fa5548707e11b11c"
[[package]]
name = "futures"
version = "0.3.28"
@ -579,6 +624,7 @@ checksum = "23342abe12aba583913b2e62f22225ff9c950774065e4bfb61a19cd9770fec40"
dependencies = [
"futures-channel",
"futures-core",
"futures-executor",
"futures-io",
"futures-sink",
"futures-task",
@ -601,12 +647,34 @@ version = "0.3.28"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4bca583b7e26f571124fe5b7561d49cb2868d79116cfa0eefce955557c6fee8c"
[[package]]
name = "futures-executor"
version = "0.3.28"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ccecee823288125bd88b4d7f565c9e58e41858e47ab72e8ea2d64e93624386e0"
dependencies = [
"futures-core",
"futures-task",
"futures-util",
]
[[package]]
name = "futures-io"
version = "0.3.28"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4fff74096e71ed47f8e023204cfd0aa1289cd54ae5430a9523be060cdb849964"
[[package]]
name = "futures-macro"
version = "0.3.28"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.58",
]
[[package]]
name = "futures-sink"
version = "0.3.28"
@ -628,6 +696,7 @@ dependencies = [
"futures-channel",
"futures-core",
"futures-io",
"futures-macro",
"futures-sink",
"futures-task",
"memchr",
@ -649,8 +718,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "33a20a288a94683f5f4da0adecdbe095c94a77c295e514cc6484e9394dd8376e"
dependencies = [
"cc",
"libc 0.2.140",
"log 0.4.17",
"libc 0.2.158",
"log",
"rustversion",
"windows 0.44.0",
]
@ -672,7 +741,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c05aeb6a22b8f62540c194aac980f2115af067bfe15a0734d7277a768d396b31"
dependencies = [
"cfg-if",
"libc 0.2.140",
"libc 0.2.158",
"wasi 0.11.0+wasi-snapshot-preview1",
]
@ -719,7 +788,7 @@ version = "0.2.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ee512640fe35acbfb4bb779db6f0d80704c2cacfa2e39b601ef3e3f47d1ae4c7"
dependencies = [
"libc 0.2.140",
"libc 0.2.158",
]
[[package]]
@ -887,7 +956,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "09270fd4fa1111bc614ed2246c7ef56239a3063d5be0d1ec3b589c505d400aeb"
dependencies = [
"hermit-abi 0.3.1",
"libc 0.2.140",
"libc 0.2.158",
"windows-sys 0.45.0",
]
@ -915,6 +984,67 @@ version = "1.0.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "453ad9f582a441959e5f0d088b02ce04cfe8d51a8eaf077f12ac6d3e94164ca6"
[[package]]
name = "j4-i2p-rs"
version = "0.2.0-alpha"
dependencies = [
"hex",
"j4rs",
"log",
"rand",
"thiserror",
]
[[package]]
name = "j4rs"
version = "0.20.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "689ae4f2bd4eba82601592f3d22b7e7147b1df52d3b525223f5218990501b4eb"
dependencies = [
"cesu8",
"dunce",
"fs_extra",
"futures",
"glob",
"java-locator",
"jni-sys",
"lazy_static 1.4.0",
"libc 0.2.158",
"libloading",
"log",
"serde",
"serde_json",
]
[[package]]
name = "java-locator"
version = "0.1.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d2abecabd9961c5e01405a6426687fcf1bd94a269927137e4c3cc1a7419b93fd"
dependencies = [
"glob",
"lazy_static 1.4.0",
]
[[package]]
name = "jni-sys"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c30a312d782b8d56a1e0897d45c1af33f31f9b4a4d13d31207a8675e0223b818"
dependencies = [
"jni-sys-macros",
]
[[package]]
name = "jni-sys-macros"
version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e6c199962dfd5610ced8eca382606e349f7940a4ac7d867b58a046123411cbb4"
dependencies = [
"quote",
"syn 1.0.109",
]
[[package]]
name = "js-sys"
version = "0.3.61"
@ -939,6 +1069,18 @@ dependencies = [
"sha2 0.10.6",
]
[[package]]
name = "kn0sys-lmdb-rs"
version = "0.1.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "58fbf491e9e95a325cbfe1459734cec781c0145c0d5cb7c4ced71af742364d19"
dependencies = [
"bitflags 2.6.0",
"libc 0.2.158",
"liblmdb-sys",
"log",
]
[[package]]
name = "lazy_static"
version = "0.2.11"
@ -959,9 +1101,9 @@ checksum = "e32a70cf75e5846d53a673923498228bbec6a8624708a9ea5645f075d6276122"
[[package]]
name = "libc"
version = "0.2.140"
version = "0.2.158"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "99227334921fae1a979cf0bfdfcc6b3e5ce376ef57e16fb6fb3ea2ed6095f80c"
checksum = "d8adc4bb1803a324070e64a98ae98f38934d91957a99cfb3a43dcbc01bc56439"
[[package]]
name = "liblmdb-sys"
@ -970,7 +1112,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "feed38a3a580f60bf61aaa067b0ff4123395966839adeaf67258a9e50c4d2e49"
dependencies = [
"gcc",
"libc 0.2.140",
"libc 0.2.158",
]
[[package]]
name = "libloading"
version = "0.8.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4979f22fdb869068da03c9f7528f8297c6fd2606bc3a4affe42e6a823fdb8da4"
dependencies = [
"cfg-if",
"windows-targets 0.52.6",
]
[[package]]
@ -988,18 +1140,6 @@ version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d59d8c75012853d2e872fb56bc8a2e53718e2cafe1a4c823143141c6d90c322f"
[[package]]
name = "lmdb-rs"
version = "0.7.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4aefe7b433f795629ce42f35ccf7a620c38bd457238bfaa2489dafc7e36167e7"
dependencies = [
"bitflags 0.7.0",
"libc 0.2.140",
"liblmdb-sys",
"log 0.3.9",
]
[[package]]
name = "lock_api"
version = "0.4.9"
@ -1012,21 +1152,9 @@ dependencies = [
[[package]]
name = "log"
version = "0.3.9"
version = "0.4.22"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e19e8d5c34a3e0e2223db8e060f9e8264aeeb5c5fc64a4ee9965c062211c024b"
dependencies = [
"log 0.4.17",
]
[[package]]
name = "log"
version = "0.4.17"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e"
dependencies = [
"cfg-if",
]
checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24"
[[package]]
name = "loom"
@ -1081,8 +1209,8 @@ version = "0.8.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5b9d9a46eff5b4ff64b45a9e316a6d1e0bc719ef429cbec4dc630684212bfdf9"
dependencies = [
"libc 0.2.140",
"log 0.4.17",
"libc 0.2.158",
"log",
"wasi 0.11.0+wasi-snapshot-preview1",
"windows-sys 0.45.0",
]
@ -1098,7 +1226,7 @@ dependencies = [
"futures-util",
"http",
"httparse",
"log 0.4.17",
"log",
"memchr",
"mime",
"spin",
@ -1114,8 +1242,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "07226173c32f2926027b63cce4bcd8076c3552846cbe7925f3aaffeac0a3b92e"
dependencies = [
"lazy_static 1.4.0",
"libc 0.2.140",
"log 0.4.17",
"libc 0.2.158",
"log",
"openssl",
"openssl-probe",
"openssl-sys",
@ -1129,6 +1257,7 @@ dependencies = [
name = "neveko_core"
version = "0.1.2-beta"
dependencies = [
"bincode",
"chrono",
"clap",
"curve25519-dalek",
@ -1136,10 +1265,11 @@ dependencies = [
"env_logger",
"hex",
"hmac",
"j4-i2p-rs",
"jwt",
"kn0sys-lmdb-rs",
"lazy_static 1.4.0",
"lmdb-rs",
"log 0.4.17",
"log",
"num",
"rand",
"rand_core",
@ -1150,6 +1280,8 @@ dependencies = [
"serde",
"serde_json",
"sha2 0.10.6",
"sysinfo",
"thiserror",
"tokio",
]
@ -1158,11 +1290,20 @@ name = "neveko_message"
version = "0.1.2-beta"
dependencies = [
"env_logger",
"log 0.4.17",
"log",
"neveko_core",
"rocket",
]
[[package]]
name = "ntapi"
version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e8a3895c6391c39d7fe7ebc444a87eb2991b2a0bc718fdabd071eec617fc68e4"
dependencies = [
"winapi",
]
[[package]]
name = "nu-ansi-term"
version = "0.46.0"
@ -1256,7 +1397,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0fac9e2da13b5eb447a6ce3d392f23a29d8694bff781bf03a16cd9ac8697593b"
dependencies = [
"hermit-abi 0.2.6",
"libc 0.2.140",
"libc 0.2.158",
]
[[package]]
@ -1280,7 +1421,7 @@ dependencies = [
"bitflags 1.3.2",
"cfg-if",
"foreign-types",
"libc 0.2.140",
"libc 0.2.158",
"once_cell",
"openssl-macros",
"openssl-sys",
@ -1311,7 +1452,7 @@ checksum = "666416d899cf077260dac8698d60a60b435a46d57e82acb1be3d0dad87284e5b"
dependencies = [
"autocfg",
"cc",
"libc 0.2.140",
"libc 0.2.158",
"pkg-config",
"vcpkg",
]
@ -1339,7 +1480,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9069cbb9f99e3a5083476ccb29ceb1de18b9118cafa53e90c9551235de2b9521"
dependencies = [
"cfg-if",
"libc 0.2.140",
"libc 0.2.158",
"redox_syscall 0.2.16",
"smallvec",
"windows-sys 0.45.0",
@ -1392,12 +1533,6 @@ version = "0.3.26"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6ac9a59f73473f1b8d852421e59e64809f025994837ef743615c6d0c5b305160"
[[package]]
name = "platforms"
version = "3.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "db23d408679286588f4d4644f965003d056e3dd5abcaaa938116871d7ce2fee7"
[[package]]
name = "ppv-lite86"
version = "0.2.17"
@ -1441,7 +1576,7 @@ version = "0.8.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404"
dependencies = [
"libc 0.2.140",
"libc 0.2.158",
"rand_chacha",
"rand_core",
]
@ -1465,6 +1600,26 @@ dependencies = [
"getrandom",
]
[[package]]
name = "rayon"
version = "1.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b418a60154510ca1a002a752ca9714984e21e4241e804d32555251faf8b78ffa"
dependencies = [
"either",
"rayon-core",
]
[[package]]
name = "rayon-core"
version = "1.12.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1465873a3dfdaa8ae7cb14b4383657caab0b3e8a0aa9ae8e04b044854c8dfce2"
dependencies = [
"crossbeam-deque",
"crossbeam-utils",
]
[[package]]
name = "redox_syscall"
version = "0.2.16"
@ -1547,7 +1702,7 @@ dependencies = [
"hyper-tls",
"ipnet",
"js-sys",
"log 0.4.17",
"log",
"mime",
"native-tls",
"once_cell",
@ -1582,7 +1737,7 @@ dependencies = [
"futures",
"indexmap",
"is-terminal",
"log 0.4.17",
"log",
"memchr",
"multer",
"num_cpus",
@ -1633,7 +1788,7 @@ dependencies = [
"http",
"hyper",
"indexmap",
"log 0.4.17",
"log",
"memchr",
"pear",
"percent-encoding",
@ -1676,7 +1831,7 @@ dependencies = [
"bitflags 1.3.2",
"errno",
"io-lifetimes",
"libc 0.2.140",
"libc 0.2.158",
"linux-raw-sys",
"windows-sys 0.45.0",
]
@ -1738,7 +1893,7 @@ dependencies = [
"bitflags 1.3.2",
"core-foundation",
"core-foundation-sys",
"libc 0.2.140",
"libc 0.2.158",
"security-framework-sys",
]
@ -1749,7 +1904,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "31c9bb296072e961fcbd8853511dd39c2d8be2deb1e17c6860b1d30732b323b4"
dependencies = [
"core-foundation-sys",
"libc 0.2.140",
"libc 0.2.158",
]
[[package]]
@ -1840,7 +1995,7 @@ version = "1.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d8229b473baa5980ac72ef434c4415e70c4b5e71b423043adb4ba059f89c99a1"
dependencies = [
"libc 0.2.140",
"libc 0.2.158",
]
[[package]]
@ -1864,7 +2019,7 @@ version = "0.4.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "64a4a911eed85daf18834cfaa86a79b7d266ff93ff5ba14005426219480ed662"
dependencies = [
"libc 0.2.140",
"libc 0.2.158",
"winapi",
]
@ -1926,6 +2081,20 @@ dependencies = [
"unicode-ident",
]
[[package]]
name = "sysinfo"
version = "0.31.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "355dbe4f8799b304b05e1b0f05fc59b2a18d36645cf169607da45bde2f69a1be"
dependencies = [
"core-foundation-sys",
"libc 0.2.158",
"memchr",
"ntapi",
"rayon",
"windows 0.57.0",
]
[[package]]
name = "tempfile"
version = "3.5.0"
@ -1957,6 +2126,26 @@ dependencies = [
"libc 0.1.12",
]
[[package]]
name = "thiserror"
version = "1.0.63"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c0342370b38b6a11b6cc11d6a805569958d54cfa061a29969c3b5ce2ea405724"
dependencies = [
"thiserror-impl",
]
[[package]]
name = "thiserror-impl"
version = "1.0.63"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.58",
]
[[package]]
name = "thread_local"
version = "1.1.7"
@ -1973,7 +2162,7 @@ version = "0.1.45"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1b797afad3f312d1c66a56d11d0316f916356d11bd158fbc6ca6389ff6bf805a"
dependencies = [
"libc 0.2.140",
"libc 0.2.158",
"wasi 0.10.0+wasi-snapshot-preview1",
"winapi",
]
@ -2028,7 +2217,7 @@ checksum = "d0de47a4eecbe11f498978a9b29d792f0d2692d1dd003650c24c76510e3bc001"
dependencies = [
"autocfg",
"bytes",
"libc 0.2.140",
"libc 0.2.158",
"mio",
"num_cpus",
"pin-project-lite",
@ -2139,7 +2328,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "78ddad33d2d10b1ed7eb9d1f518a5674713876e97e5bb9b7345a7984fbb4f922"
dependencies = [
"lazy_static 1.4.0",
"log 0.4.17",
"log",
"tracing-core",
]
@ -2266,7 +2455,7 @@ version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1ce8a968cb1cd110d136ff8b819a556d6fb6d919363c61534f6860c7eb172ba0"
dependencies = [
"log 0.4.17",
"log",
"try-lock",
]
@ -2299,7 +2488,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "95ce90fd5bcc06af55a641a86428ee4229e44e07033963a2290a8e241607ccb9"
dependencies = [
"bumpalo",
"log 0.4.17",
"log",
"once_cell",
"proc-macro2",
"quote",
@ -2407,6 +2596,59 @@ dependencies = [
"windows-targets 0.47.0",
]
[[package]]
name = "windows"
version = "0.57.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "12342cb4d8e3b046f3d80effd474a7a02447231330ef77d71daa6fbc40681143"
dependencies = [
"windows-core",
"windows-targets 0.52.6",
]
[[package]]
name = "windows-core"
version = "0.57.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d2ed2439a290666cd67ecce2b0ffaad89c2a56b976b736e6ece670297897832d"
dependencies = [
"windows-implement",
"windows-interface",
"windows-result",
"windows-targets 0.52.6",
]
[[package]]
name = "windows-implement"
version = "0.57.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9107ddc059d5b6fbfbffdfa7a7fe3e22a226def0b2608f72e9d552763d3e1ad7"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.58",
]
[[package]]
name = "windows-interface"
version = "0.57.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "29bee4b38ea3cde66011baa44dba677c432a78593e202392d1e9070cf2a7fca7"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.58",
]
[[package]]
name = "windows-result"
version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5e383302e8ec8515204254685643de10811af0ed97ea37210dc26fb0032647f8"
dependencies = [
"windows-targets 0.52.6",
]
[[package]]
name = "windows-sys"
version = "0.42.0"
@ -2461,6 +2703,22 @@ dependencies = [
"windows_x86_64_msvc 0.47.0",
]
[[package]]
name = "windows-targets"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973"
dependencies = [
"windows_aarch64_gnullvm 0.52.6",
"windows_aarch64_msvc 0.52.6",
"windows_i686_gnu 0.52.6",
"windows_i686_gnullvm",
"windows_i686_msvc 0.52.6",
"windows_x86_64_gnu 0.52.6",
"windows_x86_64_gnullvm 0.52.6",
"windows_x86_64_msvc 0.52.6",
]
[[package]]
name = "windows_aarch64_gnullvm"
version = "0.42.2"
@ -2473,6 +2731,12 @@ version = "0.47.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "831d567d53d4f3cb1db332b68e6e2b6260228eb4d99a777d8b2e8ed794027c90"
[[package]]
name = "windows_aarch64_gnullvm"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3"
[[package]]
name = "windows_aarch64_msvc"
version = "0.42.2"
@ -2485,6 +2749,12 @@ version = "0.47.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6a42d54a417c60ce4f0e31661eed628f0fa5aca73448c093ec4d45fab4c51cdf"
[[package]]
name = "windows_aarch64_msvc"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469"
[[package]]
name = "windows_i686_gnu"
version = "0.42.2"
@ -2497,6 +2767,18 @@ version = "0.47.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c1925beafdbb22201a53a483db861a5644123157c1c3cee83323a2ed565d71e3"
[[package]]
name = "windows_i686_gnu"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b"
[[package]]
name = "windows_i686_gnullvm"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66"
[[package]]
name = "windows_i686_msvc"
version = "0.42.2"
@ -2509,6 +2791,12 @@ version = "0.47.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3a8ef8f2f1711b223947d9b69b596cf5a4e452c930fb58b6fc3fdae7d0ec6b31"
[[package]]
name = "windows_i686_msvc"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66"
[[package]]
name = "windows_x86_64_gnu"
version = "0.42.2"
@ -2521,6 +2809,12 @@ version = "0.47.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7acaa0c2cf0d2ef99b61c308a0c3dbae430a51b7345dedec470bd8f53f5a3642"
[[package]]
name = "windows_x86_64_gnu"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78"
[[package]]
name = "windows_x86_64_gnullvm"
version = "0.42.2"
@ -2533,6 +2827,12 @@ version = "0.47.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e5a0628f71be1d11e17ca4a0e9e15b3a5180f6fbf1c2d55e3ba3f850378052c1"
[[package]]
name = "windows_x86_64_gnullvm"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d"
[[package]]
name = "windows_x86_64_msvc"
version = "0.42.2"
@ -2545,6 +2845,12 @@ version = "0.47.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9d6e62c256dc6d40b8c8707df17df8d774e60e39db723675241e7c15e910bce7"
[[package]]
name = "windows_x86_64_msvc"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec"
[[package]]
name = "winreg"
version = "0.10.1"

View file

@ -150,7 +150,8 @@ pub async fn get_multisig_info(
} else if r_info.msig_type == *message::IMPORT_MSIG {
let _ = message::send_import_info(&r_info.orid, &r_info.info).await;
} else {
let _ = message::send_exchange_info(&r_info.orid, &r_info.contact, info, r_info.kex_init).await;
let _ =
message::send_exchange_info(&r_info.orid, &r_info.contact, info, r_info.kex_init).await;
}
Custom(Status::Ok, Json(Default::default()))
}