cleanup dependencies

pull/19/head
Niko PLP 8 months ago
parent 30c36dafca
commit 2acdcbb33b
  1. 164
      Cargo.lock
  2. 19
      README.md
  3. 22
      nextgraph/Cargo.toml
  4. 29
      nextgraph/src/local_broker.rs
  5. 15
      ng-app/src-tauri/Cargo.toml
  6. 27
      ng-broker/Cargo.toml
  7. 2
      ng-broker/src/server_storage/admin/account.rs
  8. 8
      ng-broker/src/server_storage/admin/invitation.rs
  9. 1
      ng-broker/src/server_ws.rs
  10. 17
      ng-client-ws/Cargo.toml
  11. 12
      ng-net/Cargo.toml
  12. 25
      ng-repo/Cargo.toml
  13. 2
      ng-repo/src/store.rs
  14. 25
      ng-sdk-js/Cargo.toml
  15. 5
      ng-storage-rocksdb/Cargo.toml
  16. 15
      ng-verifier/Cargo.toml
  17. 5
      ng-verifier/src/user_storage/branch.rs
  18. 5
      ng-verifier/src/user_storage/repo.rs
  19. 6
      ng-verifier/src/verifier.rs
  20. 26
      ng-wallet/Cargo.toml
  21. 2
      ng-wallet/src/lib.rs
  22. 13
      ngaccount/Cargo.toml
  23. 25
      ngcli/Cargo.toml
  24. 25
      ngd/Cargo.toml
  25. 16
      ngone/Cargo.toml

164
Cargo.lock generated

@ -210,21 +210,6 @@ version = "0.7.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711"
[[package]]
name = "assert_cmd"
version = "2.0.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "86d6b683edf8d1119fe420a94f8a7e389239666aa72e65495d91c00462510151"
dependencies = [
"anstyle",
"bstr",
"doc-comment",
"predicates",
"predicates-core",
"predicates-tree",
"wait-timeout",
]
[[package]]
name = "async-attributes"
version = "1.1.2"
@ -235,17 +220,6 @@ dependencies = [
"syn 1.0.109",
]
[[package]]
name = "async-broadcast"
version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6d26004fe83b2d1cd3a97609b21e39f9a31535822210fe83205d2ce48866ea61"
dependencies = [
"event-listener",
"futures-core",
"parking_lot",
]
[[package]]
name = "async-broadcast"
version = "0.5.1"
@ -355,15 +329,6 @@ version = "0.5.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9338790e78aa95a416786ec8389546c4b6a1dfc3dc36071ed9518a9413a542eb"
[[package]]
name = "async-oneshot"
version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1ec7c75bcbcb0139e9177f30692fd617405ca4e0c27802e128d53171f7042e2c"
dependencies = [
"futures-micro",
]
[[package]]
name = "async-process"
version = "1.7.0"
@ -524,7 +489,7 @@ dependencies = [
"fxhash",
"hex",
"im",
"itertools 0.12.1",
"itertools",
"leb128",
"serde",
"sha2 0.10.7",
@ -720,8 +685,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a246e68bb43f6cd9db24bea052a53e40405417c5fb372e3d1a8a7f770a564ef5"
dependencies = [
"memchr",
"once_cell",
"regex-automata",
"serde",
]
@ -1383,12 +1346,6 @@ dependencies = [
"syn 1.0.109",
]
[[package]]
name = "difflib"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6184e33543162437515c2e2b48714794e37845ec9851711914eec9d308f6ebe8"
[[package]]
name = "digest"
version = "0.9.0"
@ -1447,12 +1404,6 @@ dependencies = [
"winapi",
]
[[package]]
name = "doc-comment"
version = "0.3.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fea41bba32d969b513997752735605054bc0dfa92b4c56bf1189f2e174be7a10"
[[package]]
name = "dtoa"
version = "1.0.6"
@ -1897,15 +1848,6 @@ dependencies = [
"syn 2.0.58",
]
[[package]]
name = "futures-micro"
version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b460264b3593d68b16a7bc35f7bc226ddfebdf9a1c8db1ed95d5cc6b7168c826"
dependencies = [
"pin-project-lite",
]
[[package]]
name = "futures-sink"
version = "0.3.28"
@ -2648,15 +2590,6 @@ dependencies = [
"windows-sys 0.48.0",
]
[[package]]
name = "itertools"
version = "0.10.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473"
dependencies = [
"either",
]
[[package]]
name = "itertools"
version = "0.12.1"
@ -3236,9 +3169,7 @@ dependencies = [
"ng-verifier",
"ng-wallet",
"once_cell",
"serde",
"serde_bare",
"serde_bytes",
"serde_json",
"web-time",
"zeroize",
@ -3251,7 +3182,6 @@ dependencies = [
"async-std",
"async-tungstenite",
"nextgraph",
"ng-client-ws",
"ng-net",
"ng-repo",
"ng-wallet",
@ -3267,17 +3197,13 @@ dependencies = [
name = "ng-broker"
version = "0.1.0"
dependencies = [
"async-channel",
"async-std",
"async-trait",
"async-tungstenite",
"blake3",
"chacha20",
"default-net",
"either",
"futures",
"getrandom 0.2.10",
"hex",
"ng-client-ws",
"ng-net",
"ng-repo",
@ -3286,7 +3212,6 @@ dependencies = [
"rust-embed",
"serde",
"serde_bare",
"serde_bytes",
"serde_json",
"tempfile",
]
@ -3295,21 +3220,16 @@ dependencies = [
name = "ng-client-ws"
version = "0.1.0"
dependencies = [
"async-channel",
"async-oneshot",
"async-std",
"async-trait",
"async-tungstenite",
"chacha20",
"either",
"futures",
"getrandom 0.2.10",
"ng-net",
"ng-repo",
"pharos",
"serde",
"serde_bare",
"serde_bytes",
"wasm-bindgen",
"wasm-bindgen-test",
"ws_stream_wasm",
@ -3319,12 +3239,10 @@ dependencies = [
name = "ng-net"
version = "0.1.0"
dependencies = [
"async-broadcast 0.4.1",
"async-recursion",
"async-std",
"async-trait",
"base64-url",
"blake3",
"default-net",
"ed25519-dalek",
"either",
@ -3340,7 +3258,6 @@ dependencies = [
"serde_bytes",
"unique_id",
"url",
"wasm-bindgen",
"web-time",
]
@ -3360,7 +3277,6 @@ dependencies = [
"futures",
"getrandom 0.2.10",
"gloo-timers",
"hex",
"log",
"num_enum",
"once_cell",
@ -3383,8 +3299,6 @@ name = "ng-sdk-js"
version = "0.1.0"
dependencies = [
"async-std",
"base64-url",
"futures",
"getrandom 0.1.16",
"gloo-timers",
"js-sys",
@ -3394,29 +3308,23 @@ dependencies = [
"ng-repo",
"ng-wallet",
"once_cell",
"pharos",
"rand 0.7.3",
"serde",
"serde-wasm-bindgen",
"serde_bare",
"serde_bytes",
"serde_json",
"wasm-bindgen",
"wasm-bindgen-futures",
"wasm-bindgen-test",
"ws_stream_wasm",
]
[[package]]
name = "ng-storage-rocksdb"
version = "0.1.0"
dependencies = [
"hex",
"ng-repo",
"rocksdb",
"serde",
"serde_bare",
"tempfile",
]
[[package]]
@ -3426,8 +3334,6 @@ dependencies = [
"async-std",
"async-trait",
"automerge",
"blake3",
"chacha20",
"either",
"fastbloom-rs",
"futures",
@ -3440,7 +3346,6 @@ dependencies = [
"serde",
"serde_bare",
"serde_bytes",
"threshold_crypto",
"web-time",
"yrs",
]
@ -3452,7 +3357,6 @@ dependencies = [
"aes-gcm-siv",
"argon2",
"async-std",
"base64-url",
"blake3",
"chacha20poly1305",
"crypto_box",
@ -3477,21 +3381,14 @@ name = "ngaccount"
version = "0.1.0"
dependencies = [
"anyhow",
"base64-url",
"bytes",
"duration-str",
"env_logger",
"log",
"ng-client-ws",
"ng-net",
"ng-repo",
"ng-wallet",
"rust-embed",
"serde",
"serde-big-array",
"serde_bare",
"serde_bytes",
"serde_json",
"tokio",
"warp",
"warp-embed",
@ -3501,27 +3398,18 @@ dependencies = [
name = "ngcli"
version = "0.1.0"
dependencies = [
"anyhow",
"assert_cmd",
"async-std",
"base64-url",
"blake3",
"clap",
"duration-str",
"ed25519-dalek",
"env_logger",
"futures",
"getrandom 0.2.10",
"log",
"ng-client-ws",
"ng-net",
"ng-repo",
"rand 0.7.3",
"serde",
"serde_bare",
"serde_bytes",
"serde_json",
"tempfile",
"zeroize",
]
@ -3531,7 +3419,6 @@ version = "0.1.0"
dependencies = [
"addr",
"async-std",
"base64-url",
"clap",
"env_logger",
"lazy_static",
@ -3540,9 +3427,7 @@ dependencies = [
"ng-net",
"ng-repo",
"regex",
"serde",
"serde_bare",
"serde_bytes",
"serde_json",
"zeroize",
]
@ -3561,9 +3446,7 @@ dependencies = [
"ng-wallet",
"rust-embed",
"serde",
"serde-big-array",
"serde_bare",
"serde_bytes",
"serde_json",
"slice_as_array",
"tokio",
@ -4307,34 +4190,6 @@ version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c"
[[package]]
name = "predicates"
version = "3.0.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "09963355b9f467184c04017ced4a2ba2d75cbcb4e7462690d388233253d4b1a9"
dependencies = [
"anstyle",
"difflib",
"itertools 0.10.5",
"predicates-core",
]
[[package]]
name = "predicates-core"
version = "1.0.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b794032607612e7abeb4db69adb4e33590fa6cf1149e95fd7cb00e634b92f174"
[[package]]
name = "predicates-tree"
version = "1.0.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "368ba315fb8c5052ab692e68a0eefec6ec57b23a36959c14496f0b0df2c0cecf"
dependencies = [
"predicates-core",
"termtree",
]
[[package]]
name = "prettyplease"
version = "0.2.9"
@ -5706,12 +5561,6 @@ dependencies = [
"winapi-util",
]
[[package]]
name = "termtree"
version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3369f5ac52d5eb6ab48c6b4ffdc8efbcad6b89c765749064ba298f2c68a16a76"
[[package]]
name = "thin-slice"
version = "0.1.1"
@ -6256,15 +6105,6 @@ dependencies = [
"libc",
]
[[package]]
name = "wait-timeout"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9f200f5b12eb75f8c1ed65abd4b2db8a6e1b138a20de009dacee265a2498f3f6"
dependencies = [
"libc",
]
[[package]]
name = "waker-fn"
version = "1.1.0"
@ -7034,7 +6874,7 @@ version = "3.14.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "31de390a2d872e4cd04edd71b425e29853f786dc99317ed72d73d6fcf5ebb948"
dependencies = [
"async-broadcast 0.5.1",
"async-broadcast",
"async-executor",
"async-fs",
"async-io",

@ -50,6 +50,11 @@ until this [PR](https://github.com/rustwasm/wasm-pack/pull/1271) is accepted, wi
```
cargo install wasm-pack --git https://github.com/rustwasm/wasm-pack.git --rev c2b663f25abe50631a236d57a8c6d7fd806413b2
```
then :
```
cargo install cargo-watch
// optionally, if you want a Rust REPL: cargo install evcxr_repl
git clone git@git.nextgraph.org:NextGraph/nextgraph-rs.git
@ -65,6 +70,8 @@ The crates are organized as follow :
- [nextgraph](nextgraph/README.md) : Client library. Use this crate to embed NextGraph client in your Rust application
- [ngcli](ngcli/README.md) : CLI tool to manipulate the local documents and repos and administrate the server
- [ngd](ngd/README.md) : binary executable of the daemon (that can run a broker, verifier and/or Rust services)
- [ng-app](ng-app/README.md) : all the native apps, based on Tauri, and the official web app.
- [ng-sdk-js](ng-sdk-js/README.md) : contains the JS SDK, with example for: web app, react app, or node service.
- ng-repo : Repositories common library
- ng-net : Network common library
- ng-verifier : Verifier library, that exposes the document API to the app
@ -72,8 +79,6 @@ The crates are organized as follow :
- ng-broker : Core and Server Broker library
- ng-client-ws : Websocket client library
- ng-storage-rocksdb : RocksDB backed stores. see also dependency [repo here](https://git.nextgraph.org/NextGraph/rust-rocksdb)
- [ng-sdk-js](ng-sdk-js/README.md) : contains the JS SDK, with example apps: web app, react app, or node service.
- [ng-app](ng-app/README.md) : all the native apps, based on Tauri, and the web app.
- ngone : server for nextgraph.one. helps user bootstrap into the right app. Not useful to you. Published here for transparency
- ngaccount : server for nextgraph's Broker Service Provider account manager. Not useful to you. Published here for transparency
@ -89,10 +94,18 @@ cargo run --bin ngd
cargo run --bin ngcli
```
For the web apps, see the [README](ng-app/README.md)
For the apps, see the [README](ng-app/README.md)
### Test
Please test by following this order (as we need to generate some files locally)
```
cargo test --package nextgraph -r --lib -- local_broker::test::gen_wallet_for_test --show-output --nocapture
cargo test
cargo test --package nextgraph -r --lib -- local_broker::test::import_session_for_test_to_disk --show-output --nocapture --ignored
```
Test all:
```

@ -16,23 +16,21 @@ rust-version.workspace = true
maintenance = { status = "actively-developed" }
[dependencies]
serde_bare = "0.5.0"
serde_json = "1.0"
base64-url = "2.0.0"
once_cell = "1.17.1"
zeroize = { version = "1.6.0", features = ["zeroize_derive"] }
futures = "0.3.24"
async-std = { version = "1.12.0", features = [ "attributes", "unstable" ] }
async-trait = "0.1.64"
async-once-cell = "0.5.3"
web-time = "0.2.0"
ng-repo = { path = "../ng-repo", version = "0.1.0" }
ng-net = { path = "../ng-net", version = "0.1.0" }
ng-wallet = { path = "../ng-wallet", version = "0.1.0" }
ng-client-ws = { path = "../ng-client-ws", version = "0.1.0" }
ng-verifier = { path = "../ng-verifier", version = "0.1.0" }
async-once-cell = "0.5.3"
once_cell = "1.17.1"
serde = { version = "1.0", features = ["derive"] }
serde_bare = "0.5.0"
serde_bytes = "0.11.7"
base64-url = "2.0.0"
web-time = "0.2.0"
async-std = { version = "1.12.0", features = [ "attributes", "unstable" ] }
zeroize = { version = "1.6.0", features = ["zeroize_derive"] }
serde_json = "1.0"
async-trait = "0.1.64"
futures = "0.3.24"
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
ng-storage-rocksdb = { path = "../ng-storage-rocksdb", version = "0.1.0" }

@ -1043,6 +1043,8 @@ pub async fn wallet_create_v0(params: CreateWalletV0) -> Result<CreateWalletResu
if params.local_save && broker.config.is_in_memory() {
return Err(NgError::CannotSaveWhenInMemoryConfig);
}
let in_memory = !params.local_save;
let intermediate = create_wallet_first_step_v0(params)?;
let lws: LocalWalletStorageV0 = (&intermediate).into();
@ -1074,8 +1076,9 @@ pub async fn wallet_create_v0(params: CreateWalletV0) -> Result<CreateWalletResu
//log_info!("VERIFIER DUMP {:?}", session.verifier);
broker.wallets.get_mut(&res.wallet_name).unwrap().wallet = res.wallet.clone();
LocalBroker::wallet_save(&mut broker)?;
if !in_memory {
LocalBroker::wallet_save(&mut broker)?;
}
broker
.opened_wallets
.get_mut(&res.wallet_name)
@ -1655,6 +1658,7 @@ pub async fn take_disconnections_receiver() -> Result<Receiver<String>, NgError>
.ok_or(NgError::BrokerError)
}
#[allow(unused_imports)]
#[cfg(test)]
mod test {
use super::*;
@ -1693,7 +1697,7 @@ mod test {
init_local_broker(Box::new(|| LocalBrokerConfig::InMemory)).await;
let peer_id = "X0nh-gOTGKSx0yL0LYJviOWRNacyqIzjQW_LKdK6opU";
//let peer_id = "X0nh-gOTGKSx0yL0LYJviOWRNacyqIzjQW_LKdK6opU";
let peer_id_of_server_broker = PubKey::nil();
let wallet_result = wallet_create_v0(CreateWalletV0 {
@ -1770,7 +1774,7 @@ mod test {
let pazzle_string = read_to_string("tests/wallet.pazzle").expect("read pazzle file");
let pazzle_words = pazzle_string.split(' ').map(|s| s.to_string()).collect();
let opened_wallet = wallet_open_with_pazzle_words(&wallet, &pazzle_words, [2, 3, 2, 3])
let opened_wallet = wallet_open_with_pazzle_words(&wallet, &pazzle_words, [1, 2, 1, 2])
.expect("opening of wallet");
let mut file =
@ -1780,6 +1784,7 @@ mod test {
file.write_all(&ser).expect("write of opened_wallet file");
}
#[ignore]
#[async_std::test]
async fn gen_opened_wallet_file_for_test_with_pazzle_array() {
let wallet_file = read("tests/wallet.ngw").expect("read wallet file");
@ -1790,17 +1795,19 @@ mod test {
.await
.expect("wallet_read_file");
let pazzle = vec![114, 45, 86, 104, 1, 135, 17, 50, 65];
let opened_wallet =
wallet_open_with_pazzle(&wallet, pazzle, [2, 3, 2, 3]).expect("opening of wallet");
let pazzle = vec![8, 21, 135, 65, 123, 52, 0, 35, 108];
let opened_wallet = wallet_open_with_pazzle(&wallet, pazzle, [1, 2, 1, 2]);
let mut file =
File::create("tests/opened_wallet.ngw").expect("open for write opened_wallet file");
let ser = serde_bare::to_vec(&opened_wallet).expect("serialization of opened wallet");
assert_eq!(opened_wallet.unwrap_err(), NgError::EncryptionError);
file.write_all(&ser).expect("write of opened_wallet file");
// let mut file =
// File::create("tests/opened_wallet.ngw").expect("open for write opened_wallet file");
// let ser = serde_bare::to_vec(&opened_wallet).expect("serialization of opened wallet");
// file.write_all(&ser).expect("write of opened_wallet file");
}
#[ignore]
#[async_std::test]
async fn import_session_for_test_to_disk() {
let wallet_file = read("tests/wallet.ngw").expect("read wallet file");

@ -24,21 +24,20 @@ tauri-build = { version = "2.0.0-alpha.8", features = [] }
# tauri-utils = { version = "=2.0.0-alpha.6" }
[dependencies]
tauri = { version = "2.0.0-alpha.14", features = [] }
# tauri = { git = "https://git.nextgraph.org/NextGraph/tauri.git", branch="alpha.11-nextgraph", features = ["no-ipc-custom-protocol"] }
# tauri = { git = "https://github.com/simonhyll/tauri.git", branch="fix/ipc-mixup", features = [] }
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
serde_bytes = "0.11.7"
async-std = { version = "1.12.0", features = ["attributes", "unstable"] }
async-tungstenite = { git = "https://git.nextgraph.org/NextGraph/async-tungstenite.git", branch = "nextgraph", features = ["async-std-runtime", "async-native-tls"] }
tauri = { version = "2.0.0-alpha.14", features = [] }
tauri-plugin-window = "2.0.0-alpha.1"
# tauri-plugin-window = { git = "https://git.nextgraph.org/NextGraph/plugins-workspace.git", branch="window-alpha.1-nextgraph" }
# tauri = { git = "https://git.nextgraph.org/NextGraph/tauri.git", branch="alpha.11-nextgraph", features = ["no-ipc-custom-protocol"] }
# tauri = { git = "https://github.com/simonhyll/tauri.git", branch="fix/ipc-mixup", features = [] }
ng-repo = { path = "../../ng-repo" }
ng-net = { path = "../../ng-net" }
ng-client-ws = { path = "../../ng-client-ws" }
ng-wallet = { path = "../../ng-wallet" }
nextgraph = { path = "../../nextgraph" }
async-std = { version = "1.12.0", features = ["attributes", "unstable"] }
# tauri-plugin-window = { git = "https://git.nextgraph.org/NextGraph/plugins-workspace.git", branch="window-alpha.1-nextgraph" }
tauri-plugin-window = "2.0.0-alpha.1"
async-tungstenite = { git = "https://git.nextgraph.org/NextGraph/async-tungstenite.git", branch = "nextgraph", features = ["async-std-runtime", "async-native-tls"] }
[features]
# this feature is used for production builds or when `devPath` points to the filesystem

@ -16,26 +16,23 @@ rust-version.workspace = true
maintenance = { status = "actively-developed" }
[dependencies]
ng-repo = { path = "../ng-repo", version = "0.1.0" }
ng-net = { path = "../ng-net", version = "0.1.0" }
ng-client-ws = { path = "../ng-client-ws", version = "0.1.0" }
ng-storage-rocksdb = { path = "../ng-storage-rocksdb", version = "0.1.0" }
chacha20 = "0.9.0"
serde = { version = "1.0", features = ["derive"] }
serde_bare = "0.5.0"
serde_bytes = "0.11.7"
async-std = { version = "1.12.0", features = ["attributes"] }
serde_json = "1.0.96"
futures = "0.3.24"
async-channel = "1.7.1"
tempfile = "3"
hex = "0.4.3"
async-trait = "0.1.64"
async-tungstenite = { git = "https://git.nextgraph.org/NextGraph/async-tungstenite.git", branch = "nextgraph", features = ["async-std-runtime"] }
blake3 = "1.3.1"
once_cell = "1.17.1"
rust-embed= { version = "6.7.0", features=["include-exclude"] }
serde_json = "1.0.96"
either = { version = "1.8.1", features=["serde"] }
async-std = { version = "1.12.0", features = ["attributes"] }
rust-embed= { version = "6.7.0", features=["include-exclude"] }
async-tungstenite = { git = "https://git.nextgraph.org/NextGraph/async-tungstenite.git", branch = "nextgraph", features = ["async-std-runtime"] }
blake3 = "1.3.1"
ng-repo = { path = "../ng-repo", version = "0.1.0" }
ng-net = { path = "../ng-net", version = "0.1.0" }
ng-client-ws = { path = "../ng-client-ws", version = "0.1.0" }
ng-storage-rocksdb = { path = "../ng-storage-rocksdb", version = "0.1.0" }
[dev-dependencies]
tempfile = "3"
[target.'cfg(target_arch = "wasm32")'.dependencies.getrandom]
version = "0.2.7"

@ -248,9 +248,7 @@ impl<'a> Account<'a> {
#[cfg(test)]
mod test {
use ng_repo::errors::StorageError;
use ng_repo::types::*;
use ng_repo::utils::*;
use ng_storage_rocksdb::kcv_storage::RocksDbKCVStorage;
use std::fs;
use tempfile::Builder;

@ -185,14 +185,6 @@ impl<'a> Invitation<'a> {
#[cfg(test)]
mod test {
use ng_repo::errors::StorageError;
use ng_repo::types::*;
use ng_repo::utils::*;
use std::fs;
use tempfile::Builder;
use crate::server_storage::admin::account::Account;
#[test]
pub fn test_invitation() {}
}

@ -568,6 +568,7 @@ pub async fn accept(tcp: TcpStream, peer_priv_key: PrivKey) {
}
}
#[cfg(test)]
pub async fn run_server_accept_one(
addr: &str,
port: u16,

@ -13,21 +13,18 @@ documentation.workspace = true
rust-version.workspace = true
[dependencies]
ng-repo = { path = "../ng-repo", version = "0.1.0" }
ng-net = { path = "../ng-net", version = "0.1.0" }
chacha20 = "0.9.0"
serde = { version = "1.0", features = ["derive"] }
serde_bare = "0.5.0"
serde_bytes = "0.11.7"
either = "1.8.1"
futures = "0.3.24"
async-trait = "0.1.64"
async-std = { version = "1.12.0", features = ["attributes","unstable"] }
futures = "0.3.24"
async-channel = "1.7.1"
async-oneshot = "0.5.0"
ng-repo = { path = "../ng-repo", version = "0.1.0" }
ng-net = { path = "../ng-net", version = "0.1.0" }
[target.'cfg(target_arch = "wasm32")'.dependencies]
wasm-bindgen = "0.2"
ws_stream_wasm = "0.7"
pharos = "0.5"
wasm-bindgen = "0.2"
either = "1.8.1"
[dev-dependencies]
wasm-bindgen-test = "^0.3"

@ -17,26 +17,23 @@ rust-version.workspace = true
maintenance = { status = "actively-developed" }
[dependencies]
ng-repo = { path = "../ng-repo", version = "0.1.0" }
serde = { version = "1.0", features = ["derive"] }
serde_bare = "0.5.0"
serde_bytes = "0.11.7"
async-broadcast = "0.4.1"
once_cell = "1.17.1"
either = "1.8.1"
futures = "0.3.24"
async-trait = "0.1.64"
blake3 = "1.3.1"
async-recursion = "1.1.1"
async-std = { version = "1.12.0", features = ["attributes","unstable"] }
wasm-bindgen = "0.2"
unique_id = "0.1.5"
once_cell = "1.17.1"
noise-protocol = "0.2.0-rc1"
noise-rust-crypto = "0.6.0-rc.1"
ed25519-dalek = "1.0.1"
either = "1.8.1"
url = "2.4.0"
base64-url = "2.0.0"
web-time = "0.2.0"
async-recursion = "1.1.1"
ng-repo = { path = "../ng-repo", version = "0.1.0" }
[target.'cfg(target_arch = "wasm32")'.dependencies]
reqwest = { version = "0.11.18", features = ["json","native-tls-vendored"] }
@ -48,4 +45,3 @@ features = ["js"]
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
getrandom = "0.2.7"
default-net = { git = "https://git.nextgraph.org/NextGraph/default-net.git" }
# ng-storage-rocksdb = { path = "../ng-storage-rocksdb", version = "0.1.0" }

@ -21,30 +21,29 @@ server_log_output = []
testing = []
[dependencies]
blake3 = "1.3.1"
chacha20 = "0.9.0"
ed25519-dalek = "1.0.1"
rand = { version = "0.7", features = ["getrandom"] }
serde = { version = "1.0.142", features = ["derive"] }
serde_bare = "0.5.0"
serde_bytes = "0.11.7"
num_enum = "0.5.7"
fastbloom-rs = "0.5.3"
hex = "0.4.3"
serde_json = "1.0"
once_cell = "1.17.1"
futures = "0.3.24"
base64-url = "2.0.0"
web-time = "0.2.0"
wasm-bindgen = "0.2"
num_enum = "0.5.7"
slice_as_array = "1.1.0"
rand = { version = "0.7", features = ["getrandom"] }
blake3 = "1.3.1"
chacha20 = "0.9.0"
ed25519-dalek = "1.0.1"
fastbloom-rs = "0.5.3"
curve25519-dalek = "3.2.0"
threshold_crypto = "0.4.0"
crypto_box = { version = "0.8.2", features = ["seal"] }
zeroize = { version = "1.6.0", features = ["zeroize_derive"] }
base64-url = "2.0.0"
web-time = "0.2.0"
time = { version= "0.3.23", features = ["formatting"] }
once_cell = "1.17.1"
serde_json = "1.0"
wasm-bindgen = "0.2"
os_info = "3"
current_platform = "0.2.0"
crypto_box = { version = "0.8.2", features = ["seal"] }
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
debug_print = "1.0.0"

@ -665,7 +665,6 @@ impl Store {
#[allow(deprecated)]
#[cfg(any(test, feature = "testing"))]
pub fn dummy_public_v0() -> Arc<Self> {
use crate::block_storage::HashMapBlockStorage;
let store_repo = StoreRepo::dummy_public_v0();
let store_readcap = ReadCap::dummy();
let store_overlay_branch_readcap = ReadCap::dummy();
@ -680,7 +679,6 @@ impl Store {
#[cfg(any(test, feature = "testing"))]
pub fn dummy_with_key(repo_pubkey: PubKey) -> Arc<Self> {
use crate::block_storage::HashMapBlockStorage;
let store_repo = StoreRepo::dummy_with_key(repo_pubkey);
let store_readcap = ReadCap::dummy();
let store_overlay_branch_readcap = ReadCap::dummy();

@ -20,26 +20,19 @@ wasm-opt = false
crate-type = ["cdylib"]
[dependencies]
serde = { version = "1.0", features = ["derive"] }
serde_bytes = "0.11.7"
serde_json = "1.0"
async-std = { version = "1.12.0", features = ["attributes","unstable"] }
once_cell = "1.17.1"
getrandom = { version = "0.1.1", features = ["wasm-bindgen"] }
rand = { version = "0.7", features = ["getrandom"] }
wasm-bindgen = "0.2"
ws_stream_wasm = "0.7"
ng-net = { path = "../ng-net" }
ng-repo = { path = "../ng-repo" }
ng-net = { path = "../ng-net" }
ng-client-ws = { path = "../ng-client-ws" }
ng-wallet = { path = "../ng-wallet" }
once_cell = "1.17.1"
nextgraph = { path = "../nextgraph" }
async-std = { version = "1.12.0", features = ["attributes","unstable"] }
futures = "0.3.24"
pharos = "0.5"
serde = { version = "1.0", features = ["derive"] }
serde_bare = "0.5.0"
serde_bytes = "0.11.7"
# snow = "0.9.2"
getrandom = { version = "0.1.1", features = ["wasm-bindgen"] }
serde_json = "1.0"
rand = { version = "0.7", features = ["getrandom"] }
base64-url = "2.0.0"
# [target.'cfg(target_arch = "wasm32")'.dependencies.getrandom]
# version = "0.2.7"
# features = ["js"]
@ -48,8 +41,8 @@ base64-url = "2.0.0"
js-sys = "0.3.61"
serde-wasm-bindgen = "0.6"
wasm-bindgen-futures = "0.4.34"
# web-sys = { version = "0.3.61", features = ["Window"] }
gloo-timers = "0.2.6"
# web-sys = { version = "0.3.61", features = ["Window"] }
[dev-dependencies]
wasm-bindgen-test = "^0.3"

@ -13,11 +13,8 @@ documentation.workspace = true
rust-version.workspace = true
[dependencies]
ng-repo = { path = "../ng-repo", version = "0.1.0" }
serde = { version = "1.0.142", features = ["derive"] }
serde_bare = "0.5.0"
tempfile = "3"
hex = "0.4.3"
ng-repo = { path = "../ng-repo", version = "0.1.0" }
[target.'cfg(not(target_arch = "wasm32"))'.dependencies.rocksdb]
git = "https://git.nextgraph.org/NextGraph/rust-rocksdb.git"

@ -19,24 +19,21 @@ maintenance = { status = "actively-developed" }
testing = []
[dependencies]
ng-repo = { path = "../ng-repo", version = "0.1.0" }
ng-net = { path = "../ng-net", version = "0.1.0" }
blake3 = "1.3.1"
chacha20 = "0.9.0"
serde = { version = "1.0", features = ["derive"] }
serde_bare = "0.5.0"
serde_bytes = "0.11.7"
oxigraph = { git = "https://git.nextgraph.org/NextGraph/oxigraph.git", branch="main" }
automerge = "0.5.9"
yrs = "0.18.2"
async-std = { version = "1.12.0", features = [ "attributes", "unstable" ] }
threshold_crypto = "0.4.0"
rand = { version = "0.7", features = ["getrandom"] }
web-time = "0.2.0"
either = "1.8.1"
futures = "0.3.24"
async-trait = "0.1.64"
async-std = { version = "1.12.0", features = [ "attributes", "unstable" ] }
oxigraph = { git = "https://git.nextgraph.org/NextGraph/oxigraph.git", branch="main" }
automerge = "0.5.9"
yrs = "0.18.2"
fastbloom-rs = "0.5.3"
ng-repo = { path = "../ng-repo", version = "0.1.0" }
ng-net = { path = "../ng-net", version = "0.1.0" }
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
ng-storage-rocksdb = { path = "../ng-storage-rocksdb", version = "0.1.0" }

@ -277,11 +277,6 @@ impl<'a> BranchStorage<'a> {
#[cfg(test)]
mod test {
use ng_repo::errors::StorageError;
use ng_repo::types::*;
use ng_repo::utils::*;
use std::fs;
#[test]
pub fn test_repo() {}
}

@ -413,11 +413,6 @@ impl<'a> RepoStorage<'a> {
#[cfg(test)]
mod test {
use ng_repo::errors::StorageError;
use ng_repo::types::*;
use ng_repo::utils::*;
use std::fs;
#[test]
pub fn test_repo() {}
}

@ -2173,17 +2173,15 @@ impl Verifier {
#[cfg(test)]
mod test {
use crate::types::*;
use crate::verifier::*;
use ng_repo::log::*;
use ng_repo::store::Store;
#[async_std::test]
pub async fn test_new_repo_default() {
let (creator_priv_key, creator_pub_key) = generate_keypair();
let (publisher_privkey, publisher_pubkey) = generate_keypair();
let publisher_peer = PeerId::Forwarded(publisher_pubkey);
let (_publisher_privkey, publisher_pubkey) = generate_keypair();
let _publisher_peer = PeerId::Forwarded(publisher_pubkey);
let store = Store::dummy_public_v0();
let store_repo = store.get_store_repo().clone();

@ -18,26 +18,24 @@ serde = { version = "1.0.142", features = ["derive"] }
serde_bare = "0.5.0"
serde_bytes = "0.11.7"
serde-big-array = "0.5.1"
ng-repo = { path = "../ng-repo", version = "0.1.0" }
ng-net = { path = "../ng-net", version = "0.1.0" }
ng-verifier = { path = "../ng-verifier", version = "0.1.0" }
image = "0.24.6"
lazy_static = "1.4.0"
safe-transmute = "0.11.2"
async-std = { version = "1.12.0", features = ["attributes","unstable"] }
getrandom = { version = "0.1.1", features = ["wasm-bindgen"] }
rand = { version = "0.7", features = ["getrandom"] }
chacha20poly1305 = "0.10.1"
#{version = "0.10.1", features = ["heapless","getrandom"] }
# slice_as_array = "1.1.0"
argon2 = "0.5.0"
safe-transmute = "0.11.2"
aes-gcm-siv = {version = "0.11.1", features = ["aes","heapless","getrandom","std"] }
base64-url = "2.0.0"
async-std = { version = "1.12.0", features = ["attributes","unstable"] }
web-time = "0.2.0"
lazy_static = "1.4.0"
zeroize = { version = "1.6.0", features = ["zeroize_derive"] }
crypto_box = { version = "0.8.2", features = ["seal"] }
blake3 = "1.3.1"
argon2 = "0.5.0"
chacha20poly1305 = "0.10.1"
#{version = "0.10.1", features = ["heapless","getrandom"] }
# slice_as_array = "1.1.0"
image = "0.24.6"
web-time = "0.2.0"
ng-repo = { path = "../ng-repo", version = "0.1.0" }
ng-net = { path = "../ng-net", version = "0.1.0" }
ng-verifier = { path = "../ng-verifier", version = "0.1.0" }
[dev-dependencies]
ng-repo = { path = "../ng-repo", version = "0.1.0", features = ["testing"] }

@ -342,6 +342,7 @@ pub fn open_wallet_with_pazzle(
)?;
pazzle_key.zeroize();
#[cfg(debug_assertions)]
log_debug!(
"opening of wallet with pazzle took: {} ms",
opening_pazzle.elapsed().as_millis()
@ -768,6 +769,7 @@ pub async fn create_wallet_second_step_v0(
// sig,
// });
#[cfg(debug_assertions)]
log_debug!(
"creating of wallet took: {} ms",
creating_pazzle.elapsed().as_millis()

@ -14,22 +14,15 @@ documentation.workspace = true
rust-version.workspace = true
[dependencies]
serde = { version = "1.0.142", features = ["derive"] }
tokio = { version = "1.27", features = ["full"] }
warp = "0.3"
warp-embed = "0.4"
rust-embed = "6"
log = "0.4"
env_logger = "0.10"
anyhow = "1.0.71"
duration-str = "0.7.1"
ng-repo = { path = "../ng-repo", version = "0.1.0", features = ["server_log_output"] }
ng-net = { path = "../ng-net", version = "0.1.0" }
ng-client-ws = { path = "../ng-client-ws", version = "0.1.0" }
ng-wallet = { path = "../ng-wallet", version = "0.1.0" }
serde = { version = "1.0.142", features = ["derive"] }
serde_bare = "0.5.0"
serde_bytes = "0.11.7"
serde-big-array = "0.5.1"
base64-url = "2.0.0"
serde_json = "1.0.96"
bytes = "1.0"
anyhow = "1.0.71"
duration-str = "0.7.1"

@ -16,25 +16,16 @@ rust-version.workspace = true
maintenance = { status = "actively-developed" }
[dependencies]
ng-repo = { path = "../ng-repo", version = "0.1.0", features = ["server_log_output"] }
ng-net = { path = "../ng-net", version = "0.1.0" }
ng-client-ws = { path = "../ng-client-ws", version = "0.1.0" }
async-std = { version = "1.12.0", features = ["attributes"] }
futures = "0.3.24"
tempfile = "3"
rand = "0.7"
ed25519-dalek = "1.0.1"
assert_cmd = "2.0.5"
clap = { version = "4.3.5", features = ["env","string","cargo"] }
log = "0.4"
env_logger = "0.10"
anyhow = "1.0.71"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
async-std = { version = "1.12.0", features = ["attributes"] }
zeroize = { version = "1.6.0" }
base64-url = "2.0.0"
getrandom = "0.2.7"
blake3 = "1.3.1"
serde = { version = "1.0", features = ["derive"] }
serde_bare = "0.5.0"
serde_bytes = "0.11.7"
duration-str = "0.7.1"
clap = { version = "4.3.5", features = ["env","string","cargo"] }
log = "0.4"
env_logger = "0.10"
ng-repo = { path = "../ng-repo", version = "0.1.0", features = ["server_log_output"] }
ng-net = { path = "../ng-net", version = "0.1.0" }
ng-client-ws = { path = "../ng-client-ws", version = "0.1.0" }

@ -17,19 +17,22 @@ rust-version.workspace = true
maintenance = { status = "actively-developed" }
[dependencies]
serde = { version = "1.0", features = ["derive"] }
serde_bare = "0.5.0"
serde_bytes = "0.11.7"
ng-broker = { path = "../ng-broker", version = "0.1.0" }
ng-net = { path = "../ng-net", version = "0.1.0" }
ng-repo = { path = "../ng-repo", version = "0.1.0", features = ["server_log_output"] }
serde_json = "1.0"
async-std = { version = "1.12.0", features = ["attributes"] }
zeroize = { version = "1.6.0" }
addr = "0.15.6"
regex = "1.8.4"
lazy_static = "1.4.0"
log = "0.4"
env_logger = "0.10"
clap = { version = "4.3.21", features = ["derive","env","string"] }
base64-url = "2.0.0"
serde_json = "1.0"
regex = "1.8.4"
lazy_static = "1.4.0"
addr = "0.15.6"
zeroize = { version = "1.6.0" }
ng-repo = { path = "../ng-repo", version = "0.1.0", features = ["server_log_output"] }
ng-net = { path = "../ng-net", version = "0.1.0" }
ng-broker = { path = "../ng-broker", version = "0.1.0" }

@ -14,21 +14,19 @@ documentation.workspace = true
rust-version.workspace = true
[dependencies]
serde = { version = "1.0.142", features = ["derive"] }
serde_bare = "0.5.0"
serde_json = "1.0.96"
tokio = { version = "1.27", features = ["full"] }
bytes = "1.0"
warp = "0.3"
warp-embed = "0.4"
rust-embed = "6"
log = "0.4"
env_logger = "0.10"
ng-storage-rocksdb = { path = "../ng-storage-rocksdb" }
base64-url = "2.0.0"
slice_as_array = "1.1.0"
ng-repo = { path = "../ng-repo", features = ["server_log_output"] }
ng-net = { path = "../ng-net" }
ng-wallet = { path = "../ng-wallet" }
serde = { version = "1.0.142", features = ["derive"] }
serde_bare = "0.5.0"
serde_bytes = "0.11.7"
serde-big-array = "0.5.1"
base64-url = "2.0.0"
slice_as_array = "1.1.0"
serde_json = "1.0.96"
bytes = "1.0"
ng-storage-rocksdb = { path = "../ng-storage-rocksdb" }

Loading…
Cancel
Save