From 94ccb5b1cb82e4870a8df54f01b78e71a8bad2f7 Mon Sep 17 00:00:00 2001 From: Shayne Kelly II Date: Wed, 21 Feb 2024 12:58:28 -0800 Subject: [PATCH] Release v0.34.0 --- examples/bank-emulator/Cargo.nix | 4817 +++++++++++------ examples/bank-emulator/Cargo.toml | 21 +- examples/bank-emulator/flake.nix | 4 +- .../integration-tests/Cargo.toml | 4 +- .../integration-tests/src/accounts.rs | 60 +- .../integration-tests/src/lib.rs | 15 +- examples/bank-emulator/src/cbdc.rs | 26 +- examples/bank-emulator/src/config.rs | 26 +- examples/bank-emulator/src/context.rs | 18 +- .../bank-emulator/src/controllers/accounts.rs | 102 +- .../bank-emulator/src/controllers/contacts.rs | 1 + .../src/controllers/public_key.rs | 2 +- examples/bank-emulator/src/drc.rs | 17 +- examples/bank-emulator/src/error.rs | 60 +- examples/bank-emulator/src/models/fees.rs | 1 + examples/bank-emulator/src/models/payments.rs | 7 +- .../bank-emulator/src/models/transfers.rs | 7 +- examples/bank-emulator/src/rbac.rs | 26 +- .../bank-emulator/src/transfer_observer.rs | 36 +- examples/bank-emulator/src/utils.rs | 150 +- examples/bank-webapp/Dockerfile | 2 +- examples/cbdc-admin/src-tauri/Cargo.toml | 2 +- examples/m10_cli/Cargo.toml | 15 +- examples/m10_cli/src/collections/contracts.rs | 3 +- .../m10_cli/src/collections/role_bindings.rs | 15 +- examples/m10_cli/src/collections/roles.rs | 21 +- examples/m10_cli/src/commands/auth.rs | 31 +- examples/m10_cli/src/commands/batch.rs | 81 +- examples/m10_cli/src/commands/call/actions.rs | 72 - examples/m10_cli/src/commands/call/mod.rs | 21 - .../src/commands/convert/deserialize.rs | 64 +- .../src/commands/convert/id_convert.rs | 91 - examples/m10_cli/src/commands/convert/mod.rs | 129 +- .../src/commands/create/account_sets.rs | 21 +- .../m10_cli/src/commands/create/accounts.rs | 45 +- examples/m10_cli/src/commands/create/banks.rs | 67 +- .../commands/create/collection_metadata.rs | 48 - .../src/commands/create/directory_entry.rs | 177 +- .../m10_cli/src/commands/create/images.rs | 40 - .../m10_cli/src/commands/create/key_pair.rs | 50 - .../src/commands/create/ledger_accounts.rs | 63 +- examples/m10_cli/src/commands/create/mod.rs | 327 +- .../src/commands/create/offline_token.rs | 31 - .../src/commands/create/role_bindings.rs | 55 +- examples/m10_cli/src/commands/create/roles.rs | 36 +- .../m10_cli/src/commands/create/transfer.rs | 74 +- .../src/commands/create/uuid_options.rs | 22 - examples/m10_cli/src/commands/csv.rs | 19 +- examples/m10_cli/src/commands/delete.rs | 80 + examples/m10_cli/src/commands/delete/mod.rs | 95 - examples/m10_cli/src/commands/endorse.rs | 59 + .../m10_cli/src/commands/endorse/contracts.rs | 55 - examples/m10_cli/src/commands/endorse/mod.rs | 22 - .../m10_cli/src/commands/find/account_sets.rs | 25 +- .../m10_cli/src/commands/find/accounts.rs | 26 +- examples/m10_cli/src/commands/find/actions.rs | 33 +- examples/m10_cli/src/commands/find/banks.rs | 26 - .../src/commands/find/directory_entry.rs | 136 +- .../src/commands/find/ledger_accounts.rs | 42 + examples/m10_cli/src/commands/find/mod.rs | 121 +- .../src/commands/find/notifications.rs | 19 +- .../src/commands/find/role_bindings.rs | 30 - examples/m10_cli/src/commands/find/roles.rs | 30 - .../m10_cli/src/commands/find/transactions.rs | 36 +- .../m10_cli/src/commands/find/transfers.rs | 44 +- examples/m10_cli/src/commands/get.rs | 196 + examples/m10_cli/src/commands/get/actions.rs | 14 - .../src/commands/get/directory_entry.rs | 56 - examples/m10_cli/src/commands/get/images.rs | 24 - examples/m10_cli/src/commands/get/key_pair.rs | 36 - examples/m10_cli/src/commands/get/mod.rs | 148 - .../m10_cli/src/commands/get/public_key.rs | 38 - .../m10_cli/src/commands/get/transfers.rs | 17 - examples/m10_cli/src/commands/invoke.rs | 85 + examples/m10_cli/src/commands/mod.rs | 2 +- examples/m10_cli/src/commands/observe.rs | 186 + .../m10_cli/src/commands/observe/accounts.rs | 34 - .../m10_cli/src/commands/observe/actions.rs | 36 - .../m10_cli/src/commands/observe/metrics.rs | 35 - examples/m10_cli/src/commands/observe/mod.rs | 80 - .../m10_cli/src/commands/observe/transfers.rs | 35 - examples/m10_cli/src/commands/show/account.rs | 77 +- examples/m10_cli/src/commands/show/mod.rs | 41 +- examples/m10_cli/src/commands/token.rs | 263 +- .../m10_cli/src/commands/top_level_cmds.rs | 432 +- .../src/commands/update/account_sets.rs | 26 +- .../m10_cli/src/commands/update/accounts.rs | 38 +- examples/m10_cli/src/commands/update/banks.rs | 41 +- .../src/commands/update/ledger_accounts.rs | 47 +- examples/m10_cli/src/commands/update/mod.rs | 105 +- .../src/commands/update/role_bindings.rs | 51 +- examples/m10_cli/src/commands/update/roles.rs | 33 +- .../m10_cli/src/commands/update/transfer.rs | 24 +- examples/m10_cli/src/config.rs | 31 + examples/m10_cli/src/context.rs | 246 +- examples/m10_cli/src/main.rs | 113 +- examples/m10_cli/src/utils.rs | 46 +- examples/rds-pool/Cargo.toml | 9 +- examples/rds-pool/src/lib.rs | 88 +- flutter/m10_sdk/CHANGELOG.md | 2 +- flutter/m10_sdk/pubspec.yaml | 2 +- node/m10-sdk/package.json | 4 +- rust/protos/Cargo.toml | 2 +- rust/sdk/Cargo.toml | 18 +- rust/sdk/src/builders/account.rs | 5 + rust/sdk/src/builders/transfer.rs | 5 + rust/sdk/src/client.rs | 656 --- rust/sdk/src/collections/resource_id.rs | 13 +- rust/sdk/src/error.rs | 16 +- rust/sdk/src/grpc_client.rs | 715 +++ rust/sdk/src/http_client.rs | 628 +++ rust/sdk/src/image/mod.rs | 4 +- rust/sdk/src/ledger_client.rs | 496 -- rust/sdk/src/lib.rs | 27 +- rust/sdk/src/m10_core_client.rs | 621 +++ rust/sdk/src/types/account_metadata.rs | 6 +- rust/sdk/src/types/action.rs | 6 +- rust/sdk/src/types/bank.rs | 5 +- rust/sdk/src/types/mod.rs | 1 - rust/sdk/src/types/transaction.rs | 22 + rust/sdk/src/types/transfer.rs | 2 +- rust/sdk/src/ws.rs | 94 + rust/signing/Cargo.toml | 4 +- rust/signing/src/lib.rs | 29 + 124 files changed, 7997 insertions(+), 6020 deletions(-) delete mode 100644 examples/m10_cli/src/commands/call/actions.rs delete mode 100644 examples/m10_cli/src/commands/call/mod.rs delete mode 100644 examples/m10_cli/src/commands/convert/id_convert.rs delete mode 100644 examples/m10_cli/src/commands/create/collection_metadata.rs delete mode 100644 examples/m10_cli/src/commands/create/images.rs delete mode 100644 examples/m10_cli/src/commands/create/key_pair.rs delete mode 100644 examples/m10_cli/src/commands/create/offline_token.rs delete mode 100644 examples/m10_cli/src/commands/create/uuid_options.rs create mode 100644 examples/m10_cli/src/commands/delete.rs delete mode 100644 examples/m10_cli/src/commands/delete/mod.rs create mode 100644 examples/m10_cli/src/commands/endorse.rs delete mode 100644 examples/m10_cli/src/commands/endorse/contracts.rs delete mode 100644 examples/m10_cli/src/commands/endorse/mod.rs delete mode 100644 examples/m10_cli/src/commands/find/banks.rs create mode 100644 examples/m10_cli/src/commands/find/ledger_accounts.rs delete mode 100644 examples/m10_cli/src/commands/find/role_bindings.rs delete mode 100644 examples/m10_cli/src/commands/find/roles.rs create mode 100644 examples/m10_cli/src/commands/get.rs delete mode 100644 examples/m10_cli/src/commands/get/actions.rs delete mode 100644 examples/m10_cli/src/commands/get/directory_entry.rs delete mode 100644 examples/m10_cli/src/commands/get/images.rs delete mode 100644 examples/m10_cli/src/commands/get/key_pair.rs delete mode 100644 examples/m10_cli/src/commands/get/mod.rs delete mode 100644 examples/m10_cli/src/commands/get/public_key.rs delete mode 100644 examples/m10_cli/src/commands/get/transfers.rs create mode 100644 examples/m10_cli/src/commands/invoke.rs create mode 100644 examples/m10_cli/src/commands/observe.rs delete mode 100644 examples/m10_cli/src/commands/observe/accounts.rs delete mode 100644 examples/m10_cli/src/commands/observe/actions.rs delete mode 100644 examples/m10_cli/src/commands/observe/metrics.rs delete mode 100644 examples/m10_cli/src/commands/observe/mod.rs delete mode 100644 examples/m10_cli/src/commands/observe/transfers.rs create mode 100644 examples/m10_cli/src/config.rs delete mode 100644 rust/sdk/src/client.rs create mode 100644 rust/sdk/src/grpc_client.rs create mode 100644 rust/sdk/src/http_client.rs delete mode 100644 rust/sdk/src/ledger_client.rs create mode 100644 rust/sdk/src/m10_core_client.rs create mode 100644 rust/sdk/src/ws.rs diff --git a/examples/bank-emulator/Cargo.nix b/examples/bank-emulator/Cargo.nix index 344d157..ab492b3 100644 --- a/examples/bank-emulator/Cargo.nix +++ b/examples/bank-emulator/Cargo.nix @@ -41,29 +41,29 @@ in m10-bank-emulator = rustPackages.unknown.m10-bank-emulator."0.1.0"; integration-tests = rustPackages.unknown.integration-tests."0.1.0"; }; - "registry+https://github.com/rust-lang/crates.io-index".actix-codec."0.5.0" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".actix-codec."0.5.2" = overridableMkRustCrate (profileName: rec { name = "actix-codec"; - version = "0.5.0"; + version = "0.5.2"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "57a7559404a7f3573127aab53c08ce37a6c6a315c374a31070f3c91cd1b4a7fe"; }; + src = fetchCratesIo { inherit name version; sha256 = "5f7b0a21988c1bf877cf4759ef5ddaac04c1c9fe808c9142ecb78ba97d97a28a"; }; dependencies = { - bitflags = rustPackages."registry+https://github.com/rust-lang/crates.io-index".bitflags."1.3.2" { inherit profileName; }; - bytes = rustPackages."registry+https://github.com/rust-lang/crates.io-index".bytes."1.2.1" { inherit profileName; }; - futures_core = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-core."0.3.24" { inherit profileName; }; - futures_sink = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-sink."0.3.24" { inherit profileName; }; - log = rustPackages."registry+https://github.com/rust-lang/crates.io-index".log."0.4.17" { inherit profileName; }; - memchr = rustPackages."registry+https://github.com/rust-lang/crates.io-index".memchr."2.5.0" { inherit profileName; }; - pin_project_lite = rustPackages."registry+https://github.com/rust-lang/crates.io-index".pin-project-lite."0.2.9" { inherit profileName; }; - tokio = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tokio."1.25.0" { inherit profileName; }; - tokio_util = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tokio-util."0.7.3" { inherit profileName; }; + bitflags = rustPackages."registry+https://github.com/rust-lang/crates.io-index".bitflags."2.4.2" { inherit profileName; }; + bytes = rustPackages."registry+https://github.com/rust-lang/crates.io-index".bytes."1.5.0" { inherit profileName; }; + futures_core = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-core."0.3.30" { inherit profileName; }; + futures_sink = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-sink."0.3.30" { inherit profileName; }; + memchr = rustPackages."registry+https://github.com/rust-lang/crates.io-index".memchr."2.7.1" { inherit profileName; }; + pin_project_lite = rustPackages."registry+https://github.com/rust-lang/crates.io-index".pin-project-lite."0.2.13" { inherit profileName; }; + tokio = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tokio."1.36.0" { inherit profileName; }; + tokio_util = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tokio-util."0.7.10" { inherit profileName; }; + tracing = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tracing."0.1.40" { inherit profileName; }; }; }); - "registry+https://github.com/rust-lang/crates.io-index".actix-http."3.2.1" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".actix-http."3.6.0" = overridableMkRustCrate (profileName: rec { name = "actix-http"; - version = "3.2.1"; + version = "3.6.0"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "6f9ffb6db08c1c3a1f4aef540f1a63193adc73c4fbd40b75a95fc8c5258f6e51"; }; + src = fetchCratesIo { inherit name version; sha256 = "d223b13fd481fc0d1f83bb12659ae774d9e3601814c68a0bc539731698cca743"; }; features = builtins.concatLists [ [ "__compress" ] [ "base64" ] @@ -82,117 +82,144 @@ in [ "zstd" ] ]; dependencies = { - actix_codec = rustPackages."registry+https://github.com/rust-lang/crates.io-index".actix-codec."0.5.0" { inherit profileName; }; - actix_rt = rustPackages."registry+https://github.com/rust-lang/crates.io-index".actix-rt."2.7.0" { inherit profileName; }; + actix_codec = rustPackages."registry+https://github.com/rust-lang/crates.io-index".actix-codec."0.5.2" { inherit profileName; }; + actix_rt = rustPackages."registry+https://github.com/rust-lang/crates.io-index".actix-rt."2.9.0" { inherit profileName; }; actix_service = rustPackages."registry+https://github.com/rust-lang/crates.io-index".actix-service."2.0.2" { inherit profileName; }; - actix_utils = rustPackages."registry+https://github.com/rust-lang/crates.io-index".actix-utils."3.0.0" { inherit profileName; }; - ahash = rustPackages."registry+https://github.com/rust-lang/crates.io-index".ahash."0.7.6" { inherit profileName; }; - base64 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".base64."0.13.0" { inherit profileName; }; - bitflags = rustPackages."registry+https://github.com/rust-lang/crates.io-index".bitflags."1.3.2" { inherit profileName; }; - brotli = rustPackages."registry+https://github.com/rust-lang/crates.io-index".brotli."3.3.4" { inherit profileName; }; - bytes = rustPackages."registry+https://github.com/rust-lang/crates.io-index".bytes."1.2.1" { inherit profileName; }; - bytestring = rustPackages."registry+https://github.com/rust-lang/crates.io-index".bytestring."1.1.0" { inherit profileName; }; + actix_utils = rustPackages."registry+https://github.com/rust-lang/crates.io-index".actix-utils."3.0.1" { inherit profileName; }; + ahash = rustPackages."registry+https://github.com/rust-lang/crates.io-index".ahash."0.8.8" { inherit profileName; }; + base64 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".base64."0.21.7" { inherit profileName; }; + bitflags = rustPackages."registry+https://github.com/rust-lang/crates.io-index".bitflags."2.4.2" { inherit profileName; }; + brotli = rustPackages."registry+https://github.com/rust-lang/crates.io-index".brotli."3.4.0" { inherit profileName; }; + bytes = rustPackages."registry+https://github.com/rust-lang/crates.io-index".bytes."1.5.0" { inherit profileName; }; + bytestring = rustPackages."registry+https://github.com/rust-lang/crates.io-index".bytestring."1.3.1" { inherit profileName; }; derive_more = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".derive_more."0.99.17" { profileName = "__noProfile"; }; - encoding_rs = rustPackages."registry+https://github.com/rust-lang/crates.io-index".encoding_rs."0.8.31" { inherit profileName; }; - flate2 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".flate2."1.0.24" { inherit profileName; }; - futures_core = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-core."0.3.24" { inherit profileName; }; - h2 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".h2."0.3.14" { inherit profileName; }; - http = rustPackages."registry+https://github.com/rust-lang/crates.io-index".http."0.2.8" { inherit profileName; }; + encoding_rs = rustPackages."registry+https://github.com/rust-lang/crates.io-index".encoding_rs."0.8.33" { inherit profileName; }; + flate2 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".flate2."1.0.28" { inherit profileName; }; + futures_core = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-core."0.3.30" { inherit profileName; }; + h2 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".h2."0.3.24" { inherit profileName; }; + http = rustPackages."registry+https://github.com/rust-lang/crates.io-index".http."0.2.11" { inherit profileName; }; httparse = rustPackages."registry+https://github.com/rust-lang/crates.io-index".httparse."1.8.0" { inherit profileName; }; - httpdate = rustPackages."registry+https://github.com/rust-lang/crates.io-index".httpdate."1.0.2" { inherit profileName; }; - itoa = rustPackages."registry+https://github.com/rust-lang/crates.io-index".itoa."1.0.3" { inherit profileName; }; + httpdate = rustPackages."registry+https://github.com/rust-lang/crates.io-index".httpdate."1.0.3" { inherit profileName; }; + itoa = rustPackages."registry+https://github.com/rust-lang/crates.io-index".itoa."1.0.10" { inherit profileName; }; language_tags = rustPackages."registry+https://github.com/rust-lang/crates.io-index".language-tags."0.3.2" { inherit profileName; }; - local_channel = rustPackages."registry+https://github.com/rust-lang/crates.io-index".local-channel."0.1.3" { inherit profileName; }; - mime = rustPackages."registry+https://github.com/rust-lang/crates.io-index".mime."0.3.16" { inherit profileName; }; - percent_encoding = rustPackages."registry+https://github.com/rust-lang/crates.io-index".percent-encoding."2.1.0" { inherit profileName; }; - pin_project_lite = rustPackages."registry+https://github.com/rust-lang/crates.io-index".pin-project-lite."0.2.9" { inherit profileName; }; + local_channel = rustPackages."registry+https://github.com/rust-lang/crates.io-index".local-channel."0.1.5" { inherit profileName; }; + mime = rustPackages."registry+https://github.com/rust-lang/crates.io-index".mime."0.3.17" { inherit profileName; }; + percent_encoding = rustPackages."registry+https://github.com/rust-lang/crates.io-index".percent-encoding."2.3.1" { inherit profileName; }; + pin_project_lite = rustPackages."registry+https://github.com/rust-lang/crates.io-index".pin-project-lite."0.2.13" { inherit profileName; }; rand = rustPackages."registry+https://github.com/rust-lang/crates.io-index".rand."0.8.5" { inherit profileName; }; - sha1 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".sha1."0.10.4" { inherit profileName; }; - smallvec = rustPackages."registry+https://github.com/rust-lang/crates.io-index".smallvec."1.9.0" { inherit profileName; }; - tracing = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tracing."0.1.36" { inherit profileName; }; - zstd = rustPackages."registry+https://github.com/rust-lang/crates.io-index".zstd."0.11.2+zstd.1.5.2" { inherit profileName; }; + sha1 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".sha1."0.10.6" { inherit profileName; }; + smallvec = rustPackages."registry+https://github.com/rust-lang/crates.io-index".smallvec."1.13.1" { inherit profileName; }; + tokio = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tokio."1.36.0" { inherit profileName; }; + tokio_util = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tokio-util."0.7.10" { inherit profileName; }; + tracing = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tracing."0.1.40" { inherit profileName; }; + zstd = rustPackages."registry+https://github.com/rust-lang/crates.io-index".zstd."0.13.0" { inherit profileName; }; }; }); - "registry+https://github.com/rust-lang/crates.io-index".actix-macros."0.2.3" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".actix-macros."0.2.4" = overridableMkRustCrate (profileName: rec { name = "actix-macros"; - version = "0.2.3"; + version = "0.2.4"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "465a6172cf69b960917811022d8f29bc0b7fa1398bc4f78b3c466673db1213b6"; }; + src = fetchCratesIo { inherit name version; sha256 = "e01ed3140b2f8d422c68afa1ed2e85d996ea619c988ac834d255db32138655cb"; }; dependencies = { - quote = rustPackages."registry+https://github.com/rust-lang/crates.io-index".quote."1.0.21" { inherit profileName; }; - syn = rustPackages."registry+https://github.com/rust-lang/crates.io-index".syn."1.0.99" { inherit profileName; }; + quote = rustPackages."registry+https://github.com/rust-lang/crates.io-index".quote."1.0.35" { inherit profileName; }; + syn = rustPackages."registry+https://github.com/rust-lang/crates.io-index".syn."2.0.49" { inherit profileName; }; }; }); - "registry+https://github.com/rust-lang/crates.io-index".actix-multipart."0.4.0" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".actix-multipart."0.6.1" = overridableMkRustCrate (profileName: rec { name = "actix-multipart"; - version = "0.4.0"; + version = "0.6.1"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "c9edfb0e7663d7fe18c8d5b668c9c1bcf79176b1dcc9d4da9592503209a6bfb0"; }; + src = fetchCratesIo { inherit name version; sha256 = "3b960e2aea75f49c8f069108063d12a48d329fc8b60b786dfc7552a9d5918d2d"; }; + features = builtins.concatLists [ + [ "actix-multipart-derive" ] + [ "default" ] + [ "derive" ] + [ "tempfile" ] + ]; dependencies = { - actix_utils = rustPackages."registry+https://github.com/rust-lang/crates.io-index".actix-utils."3.0.0" { inherit profileName; }; - actix_web = rustPackages."registry+https://github.com/rust-lang/crates.io-index".actix-web."4.1.0" { inherit profileName; }; - bytes = rustPackages."registry+https://github.com/rust-lang/crates.io-index".bytes."1.2.1" { inherit profileName; }; + actix_multipart_derive = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".actix-multipart-derive."0.6.1" { profileName = "__noProfile"; }; + actix_utils = rustPackages."registry+https://github.com/rust-lang/crates.io-index".actix-utils."3.0.1" { inherit profileName; }; + actix_web = rustPackages."registry+https://github.com/rust-lang/crates.io-index".actix-web."4.5.1" { inherit profileName; }; + bytes = rustPackages."registry+https://github.com/rust-lang/crates.io-index".bytes."1.5.0" { inherit profileName; }; derive_more = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".derive_more."0.99.17" { profileName = "__noProfile"; }; - futures_core = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-core."0.3.24" { inherit profileName; }; + futures_core = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-core."0.3.30" { inherit profileName; }; + futures_util = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-util."0.3.30" { inherit profileName; }; httparse = rustPackages."registry+https://github.com/rust-lang/crates.io-index".httparse."1.8.0" { inherit profileName; }; - local_waker = rustPackages."registry+https://github.com/rust-lang/crates.io-index".local-waker."0.1.3" { inherit profileName; }; - log = rustPackages."registry+https://github.com/rust-lang/crates.io-index".log."0.4.17" { inherit profileName; }; - mime = rustPackages."registry+https://github.com/rust-lang/crates.io-index".mime."0.3.16" { inherit profileName; }; - twoway = rustPackages."registry+https://github.com/rust-lang/crates.io-index".twoway."0.2.2" { inherit profileName; }; + local_waker = rustPackages."registry+https://github.com/rust-lang/crates.io-index".local-waker."0.1.4" { inherit profileName; }; + log = rustPackages."registry+https://github.com/rust-lang/crates.io-index".log."0.4.20" { inherit profileName; }; + memchr = rustPackages."registry+https://github.com/rust-lang/crates.io-index".memchr."2.7.1" { inherit profileName; }; + mime = rustPackages."registry+https://github.com/rust-lang/crates.io-index".mime."0.3.17" { inherit profileName; }; + serde = rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde."1.0.196" { inherit profileName; }; + serde_json = rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde_json."1.0.113" { inherit profileName; }; + serde_plain = rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde_plain."1.0.2" { inherit profileName; }; + tempfile = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tempfile."3.10.0" { inherit profileName; }; + tokio = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tokio."1.36.0" { inherit profileName; }; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".actix-multipart-derive."0.6.1" = overridableMkRustCrate (profileName: rec { + name = "actix-multipart-derive"; + version = "0.6.1"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "0a0a77f836d869f700e5b47ac7c3c8b9c8bc82e4aec861954c6198abee3ebd4d"; }; + dependencies = { + darling = rustPackages."registry+https://github.com/rust-lang/crates.io-index".darling."0.20.6" { inherit profileName; }; + parse_size = rustPackages."registry+https://github.com/rust-lang/crates.io-index".parse-size."1.0.0" { inherit profileName; }; + proc_macro2 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".proc-macro2."1.0.78" { inherit profileName; }; + quote = rustPackages."registry+https://github.com/rust-lang/crates.io-index".quote."1.0.35" { inherit profileName; }; + syn = rustPackages."registry+https://github.com/rust-lang/crates.io-index".syn."2.0.49" { inherit profileName; }; }; }); - "registry+https://github.com/rust-lang/crates.io-index".actix-router."0.5.0" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".actix-router."0.5.2" = overridableMkRustCrate (profileName: rec { name = "actix-router"; - version = "0.5.0"; + version = "0.5.2"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "eb60846b52c118f2f04a56cc90880a274271c489b2498623d58176f8ca21fa80"; }; + src = fetchCratesIo { inherit name version; sha256 = "d22475596539443685426b6bdadb926ad0ecaefdfc5fb05e5e3441f15463c511"; }; features = builtins.concatLists [ [ "default" ] [ "http" ] ]; dependencies = { - bytestring = rustPackages."registry+https://github.com/rust-lang/crates.io-index".bytestring."1.1.0" { inherit profileName; }; - firestorm = rustPackages."registry+https://github.com/rust-lang/crates.io-index".firestorm."0.5.1" { inherit profileName; }; - http = rustPackages."registry+https://github.com/rust-lang/crates.io-index".http."0.2.8" { inherit profileName; }; - log = rustPackages."registry+https://github.com/rust-lang/crates.io-index".log."0.4.17" { inherit profileName; }; - regex = rustPackages."registry+https://github.com/rust-lang/crates.io-index".regex."1.6.0" { inherit profileName; }; - serde = rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde."1.0.144" { inherit profileName; }; + bytestring = rustPackages."registry+https://github.com/rust-lang/crates.io-index".bytestring."1.3.1" { inherit profileName; }; + http = rustPackages."registry+https://github.com/rust-lang/crates.io-index".http."0.2.11" { inherit profileName; }; + regex = rustPackages."registry+https://github.com/rust-lang/crates.io-index".regex."1.10.3" { inherit profileName; }; + serde = rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde."1.0.196" { inherit profileName; }; + tracing = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tracing."0.1.40" { inherit profileName; }; }; }); - "registry+https://github.com/rust-lang/crates.io-index".actix-rt."2.7.0" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".actix-rt."2.9.0" = overridableMkRustCrate (profileName: rec { name = "actix-rt"; - version = "2.7.0"; + version = "2.9.0"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "7ea16c295198e958ef31930a6ef37d0fb64e9ca3b6116e6b93a8bdae96ee1000"; }; + src = fetchCratesIo { inherit name version; sha256 = "28f32d40287d3f402ae0028a9d54bef51af15c8769492826a69d28f81893151d"; }; dependencies = { - futures_core = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-core."0.3.24" { inherit profileName; }; - tokio = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tokio."1.25.0" { inherit profileName; }; + futures_core = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-core."0.3.30" { inherit profileName; }; + tokio = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tokio."1.36.0" { inherit profileName; }; }; }); - "registry+https://github.com/rust-lang/crates.io-index".actix-server."2.1.1" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".actix-server."2.3.0" = overridableMkRustCrate (profileName: rec { name = "actix-server"; - version = "2.1.1"; + version = "2.3.0"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "0da34f8e659ea1b077bb4637948b815cd3768ad5a188fdcd74ff4d84240cd824"; }; + src = fetchCratesIo { inherit name version; sha256 = "3eb13e7eef0423ea6eab0e59f6c72e7cb46d33691ad56a726b3cd07ddec2c2d4"; }; features = builtins.concatLists [ [ "default" ] ]; dependencies = { - actix_rt = rustPackages."registry+https://github.com/rust-lang/crates.io-index".actix-rt."2.7.0" { inherit profileName; }; + actix_rt = rustPackages."registry+https://github.com/rust-lang/crates.io-index".actix-rt."2.9.0" { inherit profileName; }; actix_service = rustPackages."registry+https://github.com/rust-lang/crates.io-index".actix-service."2.0.2" { inherit profileName; }; - actix_utils = rustPackages."registry+https://github.com/rust-lang/crates.io-index".actix-utils."3.0.0" { inherit profileName; }; - futures_core = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-core."0.3.24" { inherit profileName; }; - futures_util = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-util."0.3.24" { inherit profileName; }; - mio = rustPackages."registry+https://github.com/rust-lang/crates.io-index".mio."0.8.4" { inherit profileName; }; - num_cpus = rustPackages."registry+https://github.com/rust-lang/crates.io-index".num_cpus."1.13.1" { inherit profileName; }; - socket2 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".socket2."0.4.7" { inherit profileName; }; - tokio = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tokio."1.25.0" { inherit profileName; }; - tracing = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tracing."0.1.36" { inherit profileName; }; + actix_utils = rustPackages."registry+https://github.com/rust-lang/crates.io-index".actix-utils."3.0.1" { inherit profileName; }; + futures_core = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-core."0.3.30" { inherit profileName; }; + futures_util = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-util."0.3.30" { inherit profileName; }; + mio = rustPackages."registry+https://github.com/rust-lang/crates.io-index".mio."0.8.10" { inherit profileName; }; + socket2 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".socket2."0.5.5" { inherit profileName; }; + tokio = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tokio."1.36.0" { inherit profileName; }; + tracing = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tracing."0.1.40" { inherit profileName; }; }; }); @@ -202,28 +229,28 @@ in registry = "registry+https://github.com/rust-lang/crates.io-index"; src = fetchCratesIo { inherit name version; sha256 = "3b894941f818cfdc7ccc4b9e60fa7e53b5042a2e8567270f9147d5591893373a"; }; dependencies = { - futures_core = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-core."0.3.24" { inherit profileName; }; - paste = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".paste."1.0.9" { profileName = "__noProfile"; }; - pin_project_lite = rustPackages."registry+https://github.com/rust-lang/crates.io-index".pin-project-lite."0.2.9" { inherit profileName; }; + futures_core = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-core."0.3.30" { inherit profileName; }; + paste = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".paste."1.0.14" { profileName = "__noProfile"; }; + pin_project_lite = rustPackages."registry+https://github.com/rust-lang/crates.io-index".pin-project-lite."0.2.13" { inherit profileName; }; }; }); - "registry+https://github.com/rust-lang/crates.io-index".actix-utils."3.0.0" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".actix-utils."3.0.1" = overridableMkRustCrate (profileName: rec { name = "actix-utils"; - version = "3.0.0"; + version = "3.0.1"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "e491cbaac2e7fc788dfff99ff48ef317e23b3cf63dbaf7aaab6418f40f92aa94"; }; + src = fetchCratesIo { inherit name version; sha256 = "88a1dcdff1466e3c2488e1cb5c36a71822750ad43839937f85d2f4d9f8b705d8"; }; dependencies = { - local_waker = rustPackages."registry+https://github.com/rust-lang/crates.io-index".local-waker."0.1.3" { inherit profileName; }; - pin_project_lite = rustPackages."registry+https://github.com/rust-lang/crates.io-index".pin-project-lite."0.2.9" { inherit profileName; }; + local_waker = rustPackages."registry+https://github.com/rust-lang/crates.io-index".local-waker."0.1.4" { inherit profileName; }; + pin_project_lite = rustPackages."registry+https://github.com/rust-lang/crates.io-index".pin-project-lite."0.2.13" { inherit profileName; }; }; }); - "registry+https://github.com/rust-lang/crates.io-index".actix-web."4.1.0" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".actix-web."4.5.1" = overridableMkRustCrate (profileName: rec { name = "actix-web"; - version = "4.1.0"; + version = "4.5.1"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "a27e8fe9ba4ae613c21f677c2cfaf0696c3744030c6f485b34634e502d6bb379"; }; + src = fetchCratesIo { inherit name version; sha256 = "43a6556ddebb638c2358714d853257ed226ece6023ef9364f23f0c70737ea984"; }; features = builtins.concatLists [ [ "__compress" ] [ "actix-macros" ] @@ -234,54 +261,65 @@ in [ "cookie" ] [ "cookies" ] [ "default" ] + [ "http2" ] [ "macros" ] ]; dependencies = { - actix_codec = rustPackages."registry+https://github.com/rust-lang/crates.io-index".actix-codec."0.5.0" { inherit profileName; }; - actix_http = rustPackages."registry+https://github.com/rust-lang/crates.io-index".actix-http."3.2.1" { inherit profileName; }; - actix_macros = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".actix-macros."0.2.3" { profileName = "__noProfile"; }; - actix_router = rustPackages."registry+https://github.com/rust-lang/crates.io-index".actix-router."0.5.0" { inherit profileName; }; - actix_rt = rustPackages."registry+https://github.com/rust-lang/crates.io-index".actix-rt."2.7.0" { inherit profileName; }; - actix_server = rustPackages."registry+https://github.com/rust-lang/crates.io-index".actix-server."2.1.1" { inherit profileName; }; + actix_codec = rustPackages."registry+https://github.com/rust-lang/crates.io-index".actix-codec."0.5.2" { inherit profileName; }; + actix_http = rustPackages."registry+https://github.com/rust-lang/crates.io-index".actix-http."3.6.0" { inherit profileName; }; + actix_macros = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".actix-macros."0.2.4" { profileName = "__noProfile"; }; + actix_router = rustPackages."registry+https://github.com/rust-lang/crates.io-index".actix-router."0.5.2" { inherit profileName; }; + actix_rt = rustPackages."registry+https://github.com/rust-lang/crates.io-index".actix-rt."2.9.0" { inherit profileName; }; + actix_server = rustPackages."registry+https://github.com/rust-lang/crates.io-index".actix-server."2.3.0" { inherit profileName; }; actix_service = rustPackages."registry+https://github.com/rust-lang/crates.io-index".actix-service."2.0.2" { inherit profileName; }; - actix_utils = rustPackages."registry+https://github.com/rust-lang/crates.io-index".actix-utils."3.0.0" { inherit profileName; }; - actix_web_codegen = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".actix-web-codegen."4.0.1" { profileName = "__noProfile"; }; - ahash = rustPackages."registry+https://github.com/rust-lang/crates.io-index".ahash."0.7.6" { inherit profileName; }; - bytes = rustPackages."registry+https://github.com/rust-lang/crates.io-index".bytes."1.2.1" { inherit profileName; }; - bytestring = rustPackages."registry+https://github.com/rust-lang/crates.io-index".bytestring."1.1.0" { inherit profileName; }; + actix_utils = rustPackages."registry+https://github.com/rust-lang/crates.io-index".actix-utils."3.0.1" { inherit profileName; }; + actix_web_codegen = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".actix-web-codegen."4.2.2" { profileName = "__noProfile"; }; + ahash = rustPackages."registry+https://github.com/rust-lang/crates.io-index".ahash."0.8.8" { inherit profileName; }; + bytes = rustPackages."registry+https://github.com/rust-lang/crates.io-index".bytes."1.5.0" { inherit profileName; }; + bytestring = rustPackages."registry+https://github.com/rust-lang/crates.io-index".bytestring."1.3.1" { inherit profileName; }; cfg_if = rustPackages."registry+https://github.com/rust-lang/crates.io-index".cfg-if."1.0.0" { inherit profileName; }; - cookie = rustPackages."registry+https://github.com/rust-lang/crates.io-index".cookie."0.16.0" { inherit profileName; }; + cookie = rustPackages."registry+https://github.com/rust-lang/crates.io-index".cookie."0.16.2" { inherit profileName; }; derive_more = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".derive_more."0.99.17" { profileName = "__noProfile"; }; - encoding_rs = rustPackages."registry+https://github.com/rust-lang/crates.io-index".encoding_rs."0.8.31" { inherit profileName; }; - futures_core = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-core."0.3.24" { inherit profileName; }; - futures_util = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-util."0.3.24" { inherit profileName; }; - itoa = rustPackages."registry+https://github.com/rust-lang/crates.io-index".itoa."1.0.3" { inherit profileName; }; + encoding_rs = rustPackages."registry+https://github.com/rust-lang/crates.io-index".encoding_rs."0.8.33" { inherit profileName; }; + futures_core = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-core."0.3.30" { inherit profileName; }; + futures_util = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-util."0.3.30" { inherit profileName; }; + itoa = rustPackages."registry+https://github.com/rust-lang/crates.io-index".itoa."1.0.10" { inherit profileName; }; language_tags = rustPackages."registry+https://github.com/rust-lang/crates.io-index".language-tags."0.3.2" { inherit profileName; }; - log = rustPackages."registry+https://github.com/rust-lang/crates.io-index".log."0.4.17" { inherit profileName; }; - mime = rustPackages."registry+https://github.com/rust-lang/crates.io-index".mime."0.3.16" { inherit profileName; }; - once_cell = rustPackages."registry+https://github.com/rust-lang/crates.io-index".once_cell."1.14.0" { inherit profileName; }; - pin_project_lite = rustPackages."registry+https://github.com/rust-lang/crates.io-index".pin-project-lite."0.2.9" { inherit profileName; }; - regex = rustPackages."registry+https://github.com/rust-lang/crates.io-index".regex."1.6.0" { inherit profileName; }; - serde = rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde."1.0.144" { inherit profileName; }; - serde_json = rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde_json."1.0.85" { inherit profileName; }; + log = rustPackages."registry+https://github.com/rust-lang/crates.io-index".log."0.4.20" { inherit profileName; }; + mime = rustPackages."registry+https://github.com/rust-lang/crates.io-index".mime."0.3.17" { inherit profileName; }; + once_cell = rustPackages."registry+https://github.com/rust-lang/crates.io-index".once_cell."1.19.0" { inherit profileName; }; + pin_project_lite = rustPackages."registry+https://github.com/rust-lang/crates.io-index".pin-project-lite."0.2.13" { inherit profileName; }; + regex = rustPackages."registry+https://github.com/rust-lang/crates.io-index".regex."1.10.3" { inherit profileName; }; + serde = rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde."1.0.196" { inherit profileName; }; + serde_json = rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde_json."1.0.113" { inherit profileName; }; serde_urlencoded = rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde_urlencoded."0.7.1" { inherit profileName; }; - smallvec = rustPackages."registry+https://github.com/rust-lang/crates.io-index".smallvec."1.9.0" { inherit profileName; }; - socket2 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".socket2."0.4.7" { inherit profileName; }; - time = rustPackages."registry+https://github.com/rust-lang/crates.io-index".time."0.3.14" { inherit profileName; }; - url = rustPackages."registry+https://github.com/rust-lang/crates.io-index".url."2.2.2" { inherit profileName; }; + smallvec = rustPackages."registry+https://github.com/rust-lang/crates.io-index".smallvec."1.13.1" { inherit profileName; }; + socket2 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".socket2."0.5.5" { inherit profileName; }; + time = rustPackages."registry+https://github.com/rust-lang/crates.io-index".time."0.3.34" { inherit profileName; }; + url = rustPackages."registry+https://github.com/rust-lang/crates.io-index".url."2.5.0" { inherit profileName; }; }; }); - "registry+https://github.com/rust-lang/crates.io-index".actix-web-codegen."4.0.1" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".actix-web-codegen."4.2.2" = overridableMkRustCrate (profileName: rec { name = "actix-web-codegen"; - version = "4.0.1"; + version = "4.2.2"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "5f270541caec49c15673b0af0e9a00143421ad4f118d2df7edcb68b627632f56"; }; + src = fetchCratesIo { inherit name version; sha256 = "eb1f50ebbb30eca122b188319a4398b3f7bb4a8cdf50ecfb73bfc6a3c3ce54f5"; }; dependencies = { - actix_router = rustPackages."registry+https://github.com/rust-lang/crates.io-index".actix-router."0.5.0" { inherit profileName; }; - proc_macro2 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".proc-macro2."1.0.43" { inherit profileName; }; - quote = rustPackages."registry+https://github.com/rust-lang/crates.io-index".quote."1.0.21" { inherit profileName; }; - syn = rustPackages."registry+https://github.com/rust-lang/crates.io-index".syn."1.0.99" { inherit profileName; }; + actix_router = rustPackages."registry+https://github.com/rust-lang/crates.io-index".actix-router."0.5.2" { inherit profileName; }; + proc_macro2 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".proc-macro2."1.0.78" { inherit profileName; }; + quote = rustPackages."registry+https://github.com/rust-lang/crates.io-index".quote."1.0.35" { inherit profileName; }; + syn = rustPackages."registry+https://github.com/rust-lang/crates.io-index".syn."2.0.49" { inherit profileName; }; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".addr2line."0.21.0" = overridableMkRustCrate (profileName: rec { + name = "addr2line"; + version = "0.21.0"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb"; }; + dependencies = { + gimli = rustPackages."registry+https://github.com/rust-lang/crates.io-index".gimli."0.28.1" { inherit profileName; }; }; }); @@ -292,80 +330,109 @@ in src = fetchCratesIo { inherit name version; sha256 = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe"; }; }); - "registry+https://github.com/rust-lang/crates.io-index".ahash."0.7.6" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".ahash."0.7.8" = overridableMkRustCrate (profileName: rec { name = "ahash"; - version = "0.7.6"; + version = "0.7.8"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47"; }; + src = fetchCratesIo { inherit name version; sha256 = "891477e0c6a8957309ee5c45a6368af3ae14bb510732d2684ffa19af310920f9"; }; features = builtins.concatLists [ [ "default" ] [ "std" ] ]; dependencies = { - ${ if hostPlatform.parsed.kernel.name == "linux" || hostPlatform.parsed.kernel.name == "android" || hostPlatform.parsed.kernel.name == "windows" || hostPlatform.parsed.kernel.name == "darwin" || hostPlatform.parsed.kernel.name == "ios" || hostPlatform.parsed.kernel.name == "freebsd" || hostPlatform.parsed.kernel.name == "openbsd" || hostPlatform.parsed.kernel.name == "netbsd" || hostPlatform.parsed.kernel.name == "dragonfly" || hostPlatform.parsed.kernel.name == "solaris" || hostPlatform.parsed.kernel.name == "illumos" || hostPlatform.parsed.kernel.name == "fuchsia" || hostPlatform.parsed.kernel.name == "redox" || hostPlatform.parsed.kernel.name == "cloudabi" || hostPlatform.parsed.kernel.name == "haiku" || hostPlatform.parsed.kernel.name == "vxworks" || hostPlatform.parsed.kernel.name == "emscripten" || hostPlatform.parsed.kernel.name == "wasi" then "getrandom" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".getrandom."0.2.7" { inherit profileName; }; - ${ if !((hostPlatform.parsed.cpu.name == "armv6l" || hostPlatform.parsed.cpu.name == "armv7l") && hostPlatform.parsed.kernel.name == "none") then "once_cell" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".once_cell."1.14.0" { inherit profileName; }; + ${ if hostPlatform.parsed.kernel.name == "linux" || hostPlatform.parsed.kernel.name == "android" || hostPlatform.parsed.kernel.name == "windows" || hostPlatform.parsed.kernel.name == "darwin" || hostPlatform.parsed.kernel.name == "ios" || hostPlatform.parsed.kernel.name == "freebsd" || hostPlatform.parsed.kernel.name == "openbsd" || hostPlatform.parsed.kernel.name == "netbsd" || hostPlatform.parsed.kernel.name == "dragonfly" || hostPlatform.parsed.kernel.name == "solaris" || hostPlatform.parsed.kernel.name == "illumos" || hostPlatform.parsed.kernel.name == "fuchsia" || hostPlatform.parsed.kernel.name == "redox" || hostPlatform.parsed.kernel.name == "cloudabi" || hostPlatform.parsed.kernel.name == "haiku" || hostPlatform.parsed.kernel.name == "vxworks" || hostPlatform.parsed.kernel.name == "emscripten" || hostPlatform.parsed.kernel.name == "wasi" then "getrandom" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".getrandom."0.2.12" { inherit profileName; }; + ${ if !((hostPlatform.parsed.cpu.name == "armv6l" || hostPlatform.parsed.cpu.name == "armv7l") && hostPlatform.parsed.kernel.name == "none") then "once_cell" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".once_cell."1.19.0" { inherit profileName; }; }; buildDependencies = { version_check = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".version_check."0.9.4" { profileName = "__noProfile"; }; }; }); - "registry+https://github.com/rust-lang/crates.io-index".aho-corasick."0.7.19" = overridableMkRustCrate (profileName: rec { - name = "aho-corasick"; - version = "0.7.19"; + "registry+https://github.com/rust-lang/crates.io-index".ahash."0.8.8" = overridableMkRustCrate (profileName: rec { + name = "ahash"; + version = "0.8.8"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "b4f55bd91a0978cbfd91c457a164bab8b4001c833b7f323132c0a4e1922dd44e"; }; + src = fetchCratesIo { inherit name version; sha256 = "42cd52102d3df161c77a887b608d7a4897d7cc112886a9537b738a887a03aaff"; }; features = builtins.concatLists [ [ "default" ] + [ "getrandom" ] + [ "runtime-rng" ] [ "std" ] ]; dependencies = { - memchr = rustPackages."registry+https://github.com/rust-lang/crates.io-index".memchr."2.5.0" { inherit profileName; }; + cfg_if = rustPackages."registry+https://github.com/rust-lang/crates.io-index".cfg-if."1.0.0" { inherit profileName; }; + getrandom = rustPackages."registry+https://github.com/rust-lang/crates.io-index".getrandom."0.2.12" { inherit profileName; }; + ${ if !((hostPlatform.parsed.cpu.name == "armv6l" || hostPlatform.parsed.cpu.name == "armv7l") && hostPlatform.parsed.kernel.name == "none") then "once_cell" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".once_cell."1.19.0" { inherit profileName; }; + zerocopy = rustPackages."registry+https://github.com/rust-lang/crates.io-index".zerocopy."0.7.32" { inherit profileName; }; + }; + buildDependencies = { + version_check = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".version_check."0.9.4" { profileName = "__noProfile"; }; }; }); - "registry+https://github.com/rust-lang/crates.io-index".alloc-no-stdlib."2.0.3" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".aho-corasick."1.1.2" = overridableMkRustCrate (profileName: rec { + name = "aho-corasick"; + version = "1.1.2"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "b2969dcb958b36655471fc61f7e416fa76033bdd4bfed0678d8fee1e2d07a1f0"; }; + features = builtins.concatLists [ + [ "perf-literal" ] + [ "std" ] + ]; + dependencies = { + memchr = rustPackages."registry+https://github.com/rust-lang/crates.io-index".memchr."2.7.1" { inherit profileName; }; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".alloc-no-stdlib."2.0.4" = overridableMkRustCrate (profileName: rec { name = "alloc-no-stdlib"; - version = "2.0.3"; + version = "2.0.4"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "35ef4730490ad1c4eae5c4325b2a95f521d023e5c885853ff7aca0a6a1631db3"; }; + src = fetchCratesIo { inherit name version; sha256 = "cc7bb162ec39d46ab1ca8c77bf72e890535becd1751bb45f64c597edb4c8c6b3"; }; }); - "registry+https://github.com/rust-lang/crates.io-index".alloc-stdlib."0.2.1" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".alloc-stdlib."0.2.2" = overridableMkRustCrate (profileName: rec { name = "alloc-stdlib"; - version = "0.2.1"; + version = "0.2.2"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "697ed7edc0f1711de49ce108c541623a0af97c6c60b2f6e2b65229847ac843c2"; }; + src = fetchCratesIo { inherit name version; sha256 = "94fb8275041c72129eb51b7d0322c29b8387a0386127718b096429201a5d6ece"; }; dependencies = { - alloc_no_stdlib = rustPackages."registry+https://github.com/rust-lang/crates.io-index".alloc-no-stdlib."2.0.3" { inherit profileName; }; + alloc_no_stdlib = rustPackages."registry+https://github.com/rust-lang/crates.io-index".alloc-no-stdlib."2.0.4" { inherit profileName; }; }; }); + "registry+https://github.com/rust-lang/crates.io-index".allocator-api2."0.2.16" = overridableMkRustCrate (profileName: rec { + name = "allocator-api2"; + version = "0.2.16"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "0942ffc6dcaadf03badf6e6a2d0228460359d5e34b57ccdc720b7382dfbd5ec5"; }; + features = builtins.concatLists [ + [ "alloc" ] + ]; + }); + + "registry+https://github.com/rust-lang/crates.io-index".android-tzdata."0.1.1" = overridableMkRustCrate (profileName: rec { + name = "android-tzdata"; + version = "0.1.1"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0"; }; + }); + "registry+https://github.com/rust-lang/crates.io-index".android_system_properties."0.1.5" = overridableMkRustCrate (profileName: rec { name = "android_system_properties"; version = "0.1.5"; registry = "registry+https://github.com/rust-lang/crates.io-index"; src = fetchCratesIo { inherit name version; sha256 = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311"; }; dependencies = { - libc = rustPackages."registry+https://github.com/rust-lang/crates.io-index".libc."0.2.139" { inherit profileName; }; + libc = rustPackages."registry+https://github.com/rust-lang/crates.io-index".libc."0.2.153" { inherit profileName; }; }; }); - "registry+https://github.com/rust-lang/crates.io-index".ansi_term."0.12.1" = overridableMkRustCrate (profileName: rec { - name = "ansi_term"; - version = "0.12.1"; - registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2"; }; - dependencies = { - ${ if hostPlatform.parsed.kernel.name == "windows" then "winapi" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".winapi."0.3.9" { inherit profileName; }; - }; - }); - - "registry+https://github.com/rust-lang/crates.io-index".anyhow."1.0.64" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".anyhow."1.0.79" = overridableMkRustCrate (profileName: rec { name = "anyhow"; - version = "1.0.64"; + version = "1.0.79"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "b9a8f622bcf6ff3df478e9deba3e03e4e04b300f8e6a139e192c05fa3490afc7"; }; + src = fetchCratesIo { inherit name version; sha256 = "080e9890a082662b09c1ad45f567faeeb47f22b5fb23895fbe1e651e718e25ca"; }; features = builtins.concatLists [ [ "default" ] [ "std" ] @@ -382,55 +449,59 @@ in ]; }); - "registry+https://github.com/rust-lang/crates.io-index".arrayvec."0.7.2" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".arrayvec."0.7.4" = overridableMkRustCrate (profileName: rec { name = "arrayvec"; - version = "0.7.2"; + version = "0.7.4"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "8da52d66c7071e2e3fa2a1e5c6d088fec47b593032b254f5e980de8ea54454d6"; }; + src = fetchCratesIo { inherit name version; sha256 = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711"; }; + features = builtins.concatLists [ + [ "std" ] + ]; }); - "registry+https://github.com/rust-lang/crates.io-index".async-stream."0.3.3" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".async-stream."0.3.5" = overridableMkRustCrate (profileName: rec { name = "async-stream"; - version = "0.3.3"; + version = "0.3.5"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "dad5c83079eae9969be7fadefe640a1c566901f05ff91ab221de4b6f68d9507e"; }; + src = fetchCratesIo { inherit name version; sha256 = "cd56dd203fef61ac097dd65721a419ddccb106b2d2b70ba60a6b529f03961a51"; }; dependencies = { - async_stream_impl = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".async-stream-impl."0.3.3" { profileName = "__noProfile"; }; - futures_core = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-core."0.3.24" { inherit profileName; }; + async_stream_impl = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".async-stream-impl."0.3.5" { profileName = "__noProfile"; }; + futures_core = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-core."0.3.30" { inherit profileName; }; + pin_project_lite = rustPackages."registry+https://github.com/rust-lang/crates.io-index".pin-project-lite."0.2.13" { inherit profileName; }; }; }); - "registry+https://github.com/rust-lang/crates.io-index".async-stream-impl."0.3.3" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".async-stream-impl."0.3.5" = overridableMkRustCrate (profileName: rec { name = "async-stream-impl"; - version = "0.3.3"; + version = "0.3.5"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "10f203db73a71dfa2fb6dd22763990fa26f3d2625a6da2da900d23b87d26be27"; }; + src = fetchCratesIo { inherit name version; sha256 = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193"; }; dependencies = { - proc_macro2 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".proc-macro2."1.0.43" { inherit profileName; }; - quote = rustPackages."registry+https://github.com/rust-lang/crates.io-index".quote."1.0.21" { inherit profileName; }; - syn = rustPackages."registry+https://github.com/rust-lang/crates.io-index".syn."1.0.99" { inherit profileName; }; + proc_macro2 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".proc-macro2."1.0.78" { inherit profileName; }; + quote = rustPackages."registry+https://github.com/rust-lang/crates.io-index".quote."1.0.35" { inherit profileName; }; + syn = rustPackages."registry+https://github.com/rust-lang/crates.io-index".syn."2.0.49" { inherit profileName; }; }; }); - "registry+https://github.com/rust-lang/crates.io-index".async-trait."0.1.57" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".async-trait."0.1.77" = overridableMkRustCrate (profileName: rec { name = "async-trait"; - version = "0.1.57"; + version = "0.1.77"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "76464446b8bc32758d7e88ee1a804d9914cd9b1cb264c029899680b0be29826f"; }; + src = fetchCratesIo { inherit name version; sha256 = "c980ee35e870bd1a4d2c8294d4c04d0499e67bca1e4b5cefcc693c2fa00caea9"; }; dependencies = { - proc_macro2 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".proc-macro2."1.0.43" { inherit profileName; }; - quote = rustPackages."registry+https://github.com/rust-lang/crates.io-index".quote."1.0.21" { inherit profileName; }; - syn = rustPackages."registry+https://github.com/rust-lang/crates.io-index".syn."1.0.99" { inherit profileName; }; + proc_macro2 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".proc-macro2."1.0.78" { inherit profileName; }; + quote = rustPackages."registry+https://github.com/rust-lang/crates.io-index".quote."1.0.35" { inherit profileName; }; + syn = rustPackages."registry+https://github.com/rust-lang/crates.io-index".syn."2.0.49" { inherit profileName; }; }; }); - "registry+https://github.com/rust-lang/crates.io-index".atoi."0.4.0" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".atoi."1.0.0" = overridableMkRustCrate (profileName: rec { name = "atoi"; - version = "0.4.0"; + version = "1.0.0"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "616896e05fc0e2649463a93a15183c6a16bf03413a7af88ef1285ddedfa9cda5"; }; + src = fetchCratesIo { inherit name version; sha256 = "d7c57d12312ff59c811c0643f4d80830505833c9ffaebd193d819392b265be8e"; }; dependencies = { - num_traits = rustPackages."registry+https://github.com/rust-lang/crates.io-index".num-traits."0.2.15" { inherit profileName; }; + num_traits = rustPackages."registry+https://github.com/rust-lang/crates.io-index".num-traits."0.2.18" { inherit profileName; }; }; }); @@ -441,15 +512,413 @@ in src = fetchCratesIo { inherit name version; sha256 = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa"; }; }); - "registry+https://github.com/rust-lang/crates.io-index".base64."0.13.0" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".aws-config."1.1.5" = overridableMkRustCrate (profileName: rec { + name = "aws-config"; + version = "1.1.5"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "7af266887e24cd5f6d2ea7433cacd25dcd4773b7f70e488701968a7cdf51df57"; }; + features = builtins.concatLists [ + [ "behavior-version-latest" ] + [ "client-hyper" ] + [ "credentials-process" ] + [ "default" ] + [ "rt-tokio" ] + [ "rustls" ] + [ "sso" ] + ]; + dependencies = { + aws_credential_types = rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-credential-types."1.1.5" { inherit profileName; }; + aws_runtime = rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-runtime."1.1.5" { inherit profileName; }; + aws_sdk_sso = rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-sdk-sso."1.13.0" { inherit profileName; }; + aws_sdk_ssooidc = rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-sdk-ssooidc."1.13.0" { inherit profileName; }; + aws_sdk_sts = rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-sdk-sts."1.13.0" { inherit profileName; }; + aws_smithy_async = rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-smithy-async."1.1.6" { inherit profileName; }; + aws_smithy_http = rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-smithy-http."0.60.5" { inherit profileName; }; + aws_smithy_json = rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-smithy-json."0.60.5" { inherit profileName; }; + aws_smithy_runtime = rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-smithy-runtime."1.1.6" { inherit profileName; }; + aws_smithy_runtime_api = rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-smithy-runtime-api."1.1.6" { inherit profileName; }; + aws_smithy_types = rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-smithy-types."1.1.6" { inherit profileName; }; + aws_types = rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-types."1.1.5" { inherit profileName; }; + bytes = rustPackages."registry+https://github.com/rust-lang/crates.io-index".bytes."1.5.0" { inherit profileName; }; + fastrand = rustPackages."registry+https://github.com/rust-lang/crates.io-index".fastrand."2.0.1" { inherit profileName; }; + hex = rustPackages."registry+https://github.com/rust-lang/crates.io-index".hex."0.4.3" { inherit profileName; }; + http = rustPackages."registry+https://github.com/rust-lang/crates.io-index".http."0.2.11" { inherit profileName; }; + hyper = rustPackages."registry+https://github.com/rust-lang/crates.io-index".hyper."0.14.28" { inherit profileName; }; + ring = rustPackages."registry+https://github.com/rust-lang/crates.io-index".ring."0.17.7" { inherit profileName; }; + time = rustPackages."registry+https://github.com/rust-lang/crates.io-index".time."0.3.34" { inherit profileName; }; + tokio = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tokio."1.36.0" { inherit profileName; }; + tracing = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tracing."0.1.40" { inherit profileName; }; + zeroize = rustPackages."registry+https://github.com/rust-lang/crates.io-index".zeroize."1.7.0" { inherit profileName; }; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".aws-credential-types."1.1.5" = overridableMkRustCrate (profileName: rec { + name = "aws-credential-types"; + version = "1.1.5"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "2d56f287a9e65e4914bfedb5b22c056b65e4c232fca512d5509a9df36386759f"; }; + features = builtins.concatLists [ + [ "test-util" ] + ]; + dependencies = { + aws_smithy_async = rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-smithy-async."1.1.6" { inherit profileName; }; + aws_smithy_runtime_api = rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-smithy-runtime-api."1.1.6" { inherit profileName; }; + aws_smithy_types = rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-smithy-types."1.1.6" { inherit profileName; }; + zeroize = rustPackages."registry+https://github.com/rust-lang/crates.io-index".zeroize."1.7.0" { inherit profileName; }; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".aws-runtime."1.1.5" = overridableMkRustCrate (profileName: rec { + name = "aws-runtime"; + version = "1.1.5"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "2d6a29eca8ea8982028a4df81883e7001e250a21d323b86418884b5345950a4b"; }; + dependencies = { + aws_credential_types = rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-credential-types."1.1.5" { inherit profileName; }; + aws_sigv4 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-sigv4."1.1.5" { inherit profileName; }; + aws_smithy_async = rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-smithy-async."1.1.6" { inherit profileName; }; + aws_smithy_http = rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-smithy-http."0.60.5" { inherit profileName; }; + aws_smithy_runtime_api = rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-smithy-runtime-api."1.1.6" { inherit profileName; }; + aws_smithy_types = rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-smithy-types."1.1.6" { inherit profileName; }; + aws_types = rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-types."1.1.5" { inherit profileName; }; + bytes = rustPackages."registry+https://github.com/rust-lang/crates.io-index".bytes."1.5.0" { inherit profileName; }; + fastrand = rustPackages."registry+https://github.com/rust-lang/crates.io-index".fastrand."2.0.1" { inherit profileName; }; + http = rustPackages."registry+https://github.com/rust-lang/crates.io-index".http."0.2.11" { inherit profileName; }; + http_body = rustPackages."registry+https://github.com/rust-lang/crates.io-index".http-body."0.4.6" { inherit profileName; }; + percent_encoding = rustPackages."registry+https://github.com/rust-lang/crates.io-index".percent-encoding."2.3.1" { inherit profileName; }; + pin_project_lite = rustPackages."registry+https://github.com/rust-lang/crates.io-index".pin-project-lite."0.2.13" { inherit profileName; }; + tracing = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tracing."0.1.40" { inherit profileName; }; + uuid = rustPackages."registry+https://github.com/rust-lang/crates.io-index".uuid."1.7.0" { inherit profileName; }; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".aws-sdk-sso."1.13.0" = overridableMkRustCrate (profileName: rec { + name = "aws-sdk-sso"; + version = "1.13.0"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "e2d7f527c7b28af1a641f7d89f9e6a4863e8ec00f39d2b731b056fc5ec5ce829"; }; + dependencies = { + aws_credential_types = rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-credential-types."1.1.5" { inherit profileName; }; + aws_runtime = rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-runtime."1.1.5" { inherit profileName; }; + aws_smithy_async = rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-smithy-async."1.1.6" { inherit profileName; }; + aws_smithy_http = rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-smithy-http."0.60.5" { inherit profileName; }; + aws_smithy_json = rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-smithy-json."0.60.5" { inherit profileName; }; + aws_smithy_runtime = rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-smithy-runtime."1.1.6" { inherit profileName; }; + aws_smithy_runtime_api = rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-smithy-runtime-api."1.1.6" { inherit profileName; }; + aws_smithy_types = rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-smithy-types."1.1.6" { inherit profileName; }; + aws_types = rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-types."1.1.5" { inherit profileName; }; + bytes = rustPackages."registry+https://github.com/rust-lang/crates.io-index".bytes."1.5.0" { inherit profileName; }; + http = rustPackages."registry+https://github.com/rust-lang/crates.io-index".http."0.2.11" { inherit profileName; }; + once_cell = rustPackages."registry+https://github.com/rust-lang/crates.io-index".once_cell."1.19.0" { inherit profileName; }; + regex_lite = rustPackages."registry+https://github.com/rust-lang/crates.io-index".regex-lite."0.1.5" { inherit profileName; }; + tracing = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tracing."0.1.40" { inherit profileName; }; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".aws-sdk-ssooidc."1.13.0" = overridableMkRustCrate (profileName: rec { + name = "aws-sdk-ssooidc"; + version = "1.13.0"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "0d0be3224cd574ee8ab5fd7c32087876f25c134c27ac603fcb38669ed8d346b0"; }; + dependencies = { + aws_credential_types = rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-credential-types."1.1.5" { inherit profileName; }; + aws_runtime = rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-runtime."1.1.5" { inherit profileName; }; + aws_smithy_async = rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-smithy-async."1.1.6" { inherit profileName; }; + aws_smithy_http = rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-smithy-http."0.60.5" { inherit profileName; }; + aws_smithy_json = rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-smithy-json."0.60.5" { inherit profileName; }; + aws_smithy_runtime = rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-smithy-runtime."1.1.6" { inherit profileName; }; + aws_smithy_runtime_api = rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-smithy-runtime-api."1.1.6" { inherit profileName; }; + aws_smithy_types = rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-smithy-types."1.1.6" { inherit profileName; }; + aws_types = rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-types."1.1.5" { inherit profileName; }; + bytes = rustPackages."registry+https://github.com/rust-lang/crates.io-index".bytes."1.5.0" { inherit profileName; }; + http = rustPackages."registry+https://github.com/rust-lang/crates.io-index".http."0.2.11" { inherit profileName; }; + once_cell = rustPackages."registry+https://github.com/rust-lang/crates.io-index".once_cell."1.19.0" { inherit profileName; }; + regex_lite = rustPackages."registry+https://github.com/rust-lang/crates.io-index".regex-lite."0.1.5" { inherit profileName; }; + tracing = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tracing."0.1.40" { inherit profileName; }; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".aws-sdk-sts."1.13.0" = overridableMkRustCrate (profileName: rec { + name = "aws-sdk-sts"; + version = "1.13.0"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "5b3167c60d82a13bbaef569da06041644ff41e85c6377e5dad53fa2526ccfe9d"; }; + dependencies = { + aws_credential_types = rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-credential-types."1.1.5" { inherit profileName; }; + aws_runtime = rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-runtime."1.1.5" { inherit profileName; }; + aws_smithy_async = rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-smithy-async."1.1.6" { inherit profileName; }; + aws_smithy_http = rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-smithy-http."0.60.5" { inherit profileName; }; + aws_smithy_json = rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-smithy-json."0.60.5" { inherit profileName; }; + aws_smithy_query = rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-smithy-query."0.60.5" { inherit profileName; }; + aws_smithy_runtime = rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-smithy-runtime."1.1.6" { inherit profileName; }; + aws_smithy_runtime_api = rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-smithy-runtime-api."1.1.6" { inherit profileName; }; + aws_smithy_types = rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-smithy-types."1.1.6" { inherit profileName; }; + aws_smithy_xml = rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-smithy-xml."0.60.5" { inherit profileName; }; + aws_types = rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-types."1.1.5" { inherit profileName; }; + http = rustPackages."registry+https://github.com/rust-lang/crates.io-index".http."0.2.11" { inherit profileName; }; + once_cell = rustPackages."registry+https://github.com/rust-lang/crates.io-index".once_cell."1.19.0" { inherit profileName; }; + regex_lite = rustPackages."registry+https://github.com/rust-lang/crates.io-index".regex-lite."0.1.5" { inherit profileName; }; + tracing = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tracing."0.1.40" { inherit profileName; }; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".aws-sigv4."1.1.5" = overridableMkRustCrate (profileName: rec { + name = "aws-sigv4"; + version = "1.1.5"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "54b1cbe0eee57a213039088dbdeca7be9352f24e0d72332d961e8a1cb388f82d"; }; + features = builtins.concatLists [ + [ "default" ] + [ "http0-compat" ] + [ "http1" ] + [ "sign-http" ] + ]; + dependencies = { + aws_credential_types = rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-credential-types."1.1.5" { inherit profileName; }; + aws_smithy_http = rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-smithy-http."0.60.5" { inherit profileName; }; + aws_smithy_runtime_api = rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-smithy-runtime-api."1.1.6" { inherit profileName; }; + aws_smithy_types = rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-smithy-types."1.1.6" { inherit profileName; }; + bytes = rustPackages."registry+https://github.com/rust-lang/crates.io-index".bytes."1.5.0" { inherit profileName; }; + form_urlencoded = rustPackages."registry+https://github.com/rust-lang/crates.io-index".form_urlencoded."1.2.1" { inherit profileName; }; + hex = rustPackages."registry+https://github.com/rust-lang/crates.io-index".hex."0.4.3" { inherit profileName; }; + hmac = rustPackages."registry+https://github.com/rust-lang/crates.io-index".hmac."0.12.1" { inherit profileName; }; + http0 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".http."0.2.11" { inherit profileName; }; + http = rustPackages."registry+https://github.com/rust-lang/crates.io-index".http."1.0.0" { inherit profileName; }; + once_cell = rustPackages."registry+https://github.com/rust-lang/crates.io-index".once_cell."1.19.0" { inherit profileName; }; + percent_encoding = rustPackages."registry+https://github.com/rust-lang/crates.io-index".percent-encoding."2.3.1" { inherit profileName; }; + sha2 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".sha2."0.10.8" { inherit profileName; }; + time = rustPackages."registry+https://github.com/rust-lang/crates.io-index".time."0.3.34" { inherit profileName; }; + tracing = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tracing."0.1.40" { inherit profileName; }; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".aws-smithy-async."1.1.6" = overridableMkRustCrate (profileName: rec { + name = "aws-smithy-async"; + version = "1.1.6"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "8ec441341e019c441aa78472ed6d206cfe198026c495277a95ac5bebda520742"; }; + features = builtins.concatLists [ + [ "rt-tokio" ] + ]; + dependencies = { + futures_util = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-util."0.3.30" { inherit profileName; }; + pin_project_lite = rustPackages."registry+https://github.com/rust-lang/crates.io-index".pin-project-lite."0.2.13" { inherit profileName; }; + tokio = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tokio."1.36.0" { inherit profileName; }; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".aws-smithy-http."0.60.5" = overridableMkRustCrate (profileName: rec { + name = "aws-smithy-http"; + version = "0.60.5"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "85d6a0619f7b67183067fa3b558f94f90753da2df8c04aeb7336d673f804b0b8"; }; + dependencies = { + aws_smithy_runtime_api = rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-smithy-runtime-api."1.1.6" { inherit profileName; }; + aws_smithy_types = rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-smithy-types."1.1.6" { inherit profileName; }; + bytes = rustPackages."registry+https://github.com/rust-lang/crates.io-index".bytes."1.5.0" { inherit profileName; }; + bytes_utils = rustPackages."registry+https://github.com/rust-lang/crates.io-index".bytes-utils."0.1.4" { inherit profileName; }; + futures_core = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-core."0.3.30" { inherit profileName; }; + http = rustPackages."registry+https://github.com/rust-lang/crates.io-index".http."0.2.11" { inherit profileName; }; + http_body = rustPackages."registry+https://github.com/rust-lang/crates.io-index".http-body."0.4.6" { inherit profileName; }; + once_cell = rustPackages."registry+https://github.com/rust-lang/crates.io-index".once_cell."1.19.0" { inherit profileName; }; + percent_encoding = rustPackages."registry+https://github.com/rust-lang/crates.io-index".percent-encoding."2.3.1" { inherit profileName; }; + pin_project_lite = rustPackages."registry+https://github.com/rust-lang/crates.io-index".pin-project-lite."0.2.13" { inherit profileName; }; + pin_utils = rustPackages."registry+https://github.com/rust-lang/crates.io-index".pin-utils."0.1.0" { inherit profileName; }; + tracing = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tracing."0.1.40" { inherit profileName; }; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".aws-smithy-json."0.60.5" = overridableMkRustCrate (profileName: rec { + name = "aws-smithy-json"; + version = "0.60.5"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "a1c1b5186b6f5c579bf0de1bcca9dd3d946d6d51361ea1d18131f6a0b64e13ae"; }; + dependencies = { + aws_smithy_types = rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-smithy-types."1.1.6" { inherit profileName; }; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".aws-smithy-query."0.60.5" = overridableMkRustCrate (profileName: rec { + name = "aws-smithy-query"; + version = "0.60.5"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "1c0a2ce65882e788d2cf83ff28b9b16918de0460c47bf66c5da4f6c17b4c9694"; }; + dependencies = { + aws_smithy_types = rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-smithy-types."1.1.6" { inherit profileName; }; + urlencoding = rustPackages."registry+https://github.com/rust-lang/crates.io-index".urlencoding."2.1.3" { inherit profileName; }; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".aws-smithy-runtime."1.1.6" = overridableMkRustCrate (profileName: rec { + name = "aws-smithy-runtime"; + version = "1.1.6"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "3b36f1f98c8d7b6256b86d4a3c8c4abb120670267baa9712a485ba477eaac9e9"; }; + features = builtins.concatLists [ + [ "client" ] + [ "connector-hyper-0-14-x" ] + [ "rt-tokio" ] + [ "tls-rustls" ] + ]; + dependencies = { + aws_smithy_async = rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-smithy-async."1.1.6" { inherit profileName; }; + aws_smithy_http = rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-smithy-http."0.60.5" { inherit profileName; }; + aws_smithy_runtime_api = rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-smithy-runtime-api."1.1.6" { inherit profileName; }; + aws_smithy_types = rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-smithy-types."1.1.6" { inherit profileName; }; + bytes = rustPackages."registry+https://github.com/rust-lang/crates.io-index".bytes."1.5.0" { inherit profileName; }; + fastrand = rustPackages."registry+https://github.com/rust-lang/crates.io-index".fastrand."2.0.1" { inherit profileName; }; + h2 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".h2."0.3.24" { inherit profileName; }; + http = rustPackages."registry+https://github.com/rust-lang/crates.io-index".http."0.2.11" { inherit profileName; }; + http_body_0_4 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".http-body."0.4.6" { inherit profileName; }; + hyper_0_14 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".hyper."0.14.28" { inherit profileName; }; + hyper_rustls = rustPackages."registry+https://github.com/rust-lang/crates.io-index".hyper-rustls."0.24.2" { inherit profileName; }; + once_cell = rustPackages."registry+https://github.com/rust-lang/crates.io-index".once_cell."1.19.0" { inherit profileName; }; + pin_project_lite = rustPackages."registry+https://github.com/rust-lang/crates.io-index".pin-project-lite."0.2.13" { inherit profileName; }; + pin_utils = rustPackages."registry+https://github.com/rust-lang/crates.io-index".pin-utils."0.1.0" { inherit profileName; }; + rustls = rustPackages."registry+https://github.com/rust-lang/crates.io-index".rustls."0.21.10" { inherit profileName; }; + tokio = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tokio."1.36.0" { inherit profileName; }; + tracing = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tracing."0.1.40" { inherit profileName; }; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".aws-smithy-runtime-api."1.1.6" = overridableMkRustCrate (profileName: rec { + name = "aws-smithy-runtime-api"; + version = "1.1.6"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "180898ed701a773fb3fadbd94b9e9559125cf88eeb1815ab99e35d4f5f34f7fb"; }; + features = builtins.concatLists [ + [ "client" ] + [ "default" ] + [ "http-02x" ] + [ "http-auth" ] + ]; + dependencies = { + aws_smithy_async = rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-smithy-async."1.1.6" { inherit profileName; }; + aws_smithy_types = rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-smithy-types."1.1.6" { inherit profileName; }; + bytes = rustPackages."registry+https://github.com/rust-lang/crates.io-index".bytes."1.5.0" { inherit profileName; }; + http = rustPackages."registry+https://github.com/rust-lang/crates.io-index".http."0.2.11" { inherit profileName; }; + http1 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".http."1.0.0" { inherit profileName; }; + pin_project_lite = rustPackages."registry+https://github.com/rust-lang/crates.io-index".pin-project-lite."0.2.13" { inherit profileName; }; + tokio = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tokio."1.36.0" { inherit profileName; }; + tracing = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tracing."0.1.40" { inherit profileName; }; + zeroize = rustPackages."registry+https://github.com/rust-lang/crates.io-index".zeroize."1.7.0" { inherit profileName; }; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".aws-smithy-types."1.1.6" = overridableMkRustCrate (profileName: rec { + name = "aws-smithy-types"; + version = "1.1.6"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "897f1db4020ad91f2c2421945ec49b7e3eb81cc3fea99e8b5dd5be721e697fed"; }; + features = builtins.concatLists [ + [ "byte-stream-poll-next" ] + [ "http-body-0-4-x" ] + ]; + dependencies = { + base64_simd = rustPackages."registry+https://github.com/rust-lang/crates.io-index".base64-simd."0.8.0" { inherit profileName; }; + bytes = rustPackages."registry+https://github.com/rust-lang/crates.io-index".bytes."1.5.0" { inherit profileName; }; + bytes_utils = rustPackages."registry+https://github.com/rust-lang/crates.io-index".bytes-utils."0.1.4" { inherit profileName; }; + futures_core = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-core."0.3.30" { inherit profileName; }; + http = rustPackages."registry+https://github.com/rust-lang/crates.io-index".http."0.2.11" { inherit profileName; }; + http_body_0_4 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".http-body."0.4.6" { inherit profileName; }; + itoa = rustPackages."registry+https://github.com/rust-lang/crates.io-index".itoa."1.0.10" { inherit profileName; }; + num_integer = rustPackages."registry+https://github.com/rust-lang/crates.io-index".num-integer."0.1.46" { inherit profileName; }; + pin_project_lite = rustPackages."registry+https://github.com/rust-lang/crates.io-index".pin-project-lite."0.2.13" { inherit profileName; }; + pin_utils = rustPackages."registry+https://github.com/rust-lang/crates.io-index".pin-utils."0.1.0" { inherit profileName; }; + ryu = rustPackages."registry+https://github.com/rust-lang/crates.io-index".ryu."1.0.16" { inherit profileName; }; + ${ if false then "serde" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde."1.0.196" { inherit profileName; }; + time = rustPackages."registry+https://github.com/rust-lang/crates.io-index".time."0.3.34" { inherit profileName; }; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".aws-smithy-xml."0.60.5" = overridableMkRustCrate (profileName: rec { + name = "aws-smithy-xml"; + version = "0.60.5"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "d16f94c9673412b7a72e3c3efec8de89081c320bf59ea12eed34c417a62ad600"; }; + dependencies = { + xmlparser = rustPackages."registry+https://github.com/rust-lang/crates.io-index".xmlparser."0.13.6" { inherit profileName; }; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".aws-types."1.1.5" = overridableMkRustCrate (profileName: rec { + name = "aws-types"; + version = "1.1.5"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "0ff7e122ee50ca962e9de91f5850cc37e2184b1219611eef6d44aa85929b54f6"; }; + dependencies = { + aws_credential_types = rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-credential-types."1.1.5" { inherit profileName; }; + aws_smithy_async = rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-smithy-async."1.1.6" { inherit profileName; }; + aws_smithy_runtime_api = rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-smithy-runtime-api."1.1.6" { inherit profileName; }; + aws_smithy_types = rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-smithy-types."1.1.6" { inherit profileName; }; + http = rustPackages."registry+https://github.com/rust-lang/crates.io-index".http."0.2.11" { inherit profileName; }; + tracing = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tracing."0.1.40" { inherit profileName; }; + }; + buildDependencies = { + rustc_version = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".rustc_version."0.4.0" { profileName = "__noProfile"; }; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".backtrace."0.3.69" = overridableMkRustCrate (profileName: rec { + name = "backtrace"; + version = "0.3.69"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837"; }; + features = builtins.concatLists [ + [ "default" ] + [ "std" ] + ]; + dependencies = { + ${ if !(hostPlatform.isWindows && hostPlatform.parsed.abi.name == "msvc" && !(hostPlatform.parsed.vendor.name == "uwp")) then "addr2line" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".addr2line."0.21.0" { inherit profileName; }; + cfg_if = rustPackages."registry+https://github.com/rust-lang/crates.io-index".cfg-if."1.0.0" { inherit profileName; }; + ${ if !(hostPlatform.isWindows && hostPlatform.parsed.abi.name == "msvc" && !(hostPlatform.parsed.vendor.name == "uwp")) then "libc" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".libc."0.2.153" { inherit profileName; }; + ${ if !(hostPlatform.isWindows && hostPlatform.parsed.abi.name == "msvc" && !(hostPlatform.parsed.vendor.name == "uwp")) then "miniz_oxide" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".miniz_oxide."0.7.2" { inherit profileName; }; + ${ if !(hostPlatform.isWindows && hostPlatform.parsed.abi.name == "msvc" && !(hostPlatform.parsed.vendor.name == "uwp")) then "object" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".object."0.32.2" { inherit profileName; }; + rustc_demangle = rustPackages."registry+https://github.com/rust-lang/crates.io-index".rustc-demangle."0.1.23" { inherit profileName; }; + }; + buildDependencies = { + cc = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".cc."1.0.83" { profileName = "__noProfile"; }; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".base64."0.13.1" = overridableMkRustCrate (profileName: rec { name = "base64"; - version = "0.13.0"; + version = "0.13.1"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8"; }; + features = builtins.concatLists [ + [ "default" ] + [ "std" ] + ]; + }); + + "registry+https://github.com/rust-lang/crates.io-index".base64."0.21.7" = overridableMkRustCrate (profileName: rec { + name = "base64"; + version = "0.21.7"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567"; }; + features = builtins.concatLists [ + [ "alloc" ] + [ "default" ] + [ "std" ] + ]; + }); + + "registry+https://github.com/rust-lang/crates.io-index".base64-simd."0.8.0" = overridableMkRustCrate (profileName: rec { + name = "base64-simd"; + version = "0.8.0"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd"; }; + src = fetchCratesIo { inherit name version; sha256 = "339abbe78e73178762e23bea9dfd08e697eb3f3301cd4be981c0f78ba5859195"; }; features = builtins.concatLists [ + [ "alloc" ] [ "default" ] + [ "detect" ] [ "std" ] ]; + dependencies = { + outref = rustPackages."registry+https://github.com/rust-lang/crates.io-index".outref."0.5.1" { inherit profileName; }; + vsimd = rustPackages."registry+https://github.com/rust-lang/crates.io-index".vsimd."0.8.0" { inherit profileName; }; + }; }); "registry+https://github.com/rust-lang/crates.io-index".bb8."0.7.1" = overridableMkRustCrate (profileName: rec { @@ -458,11 +927,11 @@ in registry = "registry+https://github.com/rust-lang/crates.io-index"; src = fetchCratesIo { inherit name version; sha256 = "2e9f4fa9768efd269499d8fba693260cfc670891cf6de3adc935588447a77cc8"; }; dependencies = { - async_trait = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".async-trait."0.1.57" { profileName = "__noProfile"; }; - futures_channel = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-channel."0.3.24" { inherit profileName; }; - futures_util = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-util."0.3.24" { inherit profileName; }; + async_trait = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".async-trait."0.1.77" { profileName = "__noProfile"; }; + futures_channel = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-channel."0.3.30" { inherit profileName; }; + futures_util = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-util."0.3.30" { inherit profileName; }; parking_lot = rustPackages."registry+https://github.com/rust-lang/crates.io-index".parking_lot."0.11.2" { inherit profileName; }; - tokio = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tokio."1.25.0" { inherit profileName; }; + tokio = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tokio."1.36.0" { inherit profileName; }; }; }); @@ -472,13 +941,13 @@ in registry = "registry+https://github.com/rust-lang/crates.io-index"; src = fetchCratesIo { inherit name version; sha256 = "0dee631cea28b00e115fd355a1adedc860b155096941dc01259969eabd434a37"; }; dependencies = { - chrono = rustPackages."registry+https://github.com/rust-lang/crates.io-index".chrono."0.4.22" { inherit profileName; }; - data_encoding = rustPackages."registry+https://github.com/rust-lang/crates.io-index".data-encoding."2.3.2" { inherit profileName; }; + chrono = rustPackages."registry+https://github.com/rust-lang/crates.io-index".chrono."0.4.34" { inherit profileName; }; + data_encoding = rustPackages."registry+https://github.com/rust-lang/crates.io-index".data-encoding."2.5.0" { inherit profileName; }; num = rustPackages."registry+https://github.com/rust-lang/crates.io-index".num."0.3.1" { inherit profileName; }; - once_cell = rustPackages."registry+https://github.com/rust-lang/crates.io-index".once_cell."1.14.0" { inherit profileName; }; + once_cell = rustPackages."registry+https://github.com/rust-lang/crates.io-index".once_cell."1.19.0" { inherit profileName; }; ring = rustPackages."registry+https://github.com/rust-lang/crates.io-index".ring."0.16.20" { inherit profileName; }; - serde = rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde."1.0.144" { inherit profileName; }; - serde_json = rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde_json."1.0.85" { inherit profileName; }; + serde = rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde."1.0.196" { inherit profileName; }; + serde_json = rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde_json."1.0.113" { inherit profileName; }; }; }); @@ -492,31 +961,89 @@ in ]; }); - "registry+https://github.com/rust-lang/crates.io-index".block-buffer."0.9.0" = overridableMkRustCrate (profileName: rec { - name = "block-buffer"; - version = "0.9.0"; + "registry+https://github.com/rust-lang/crates.io-index".bitflags."2.4.2" = overridableMkRustCrate (profileName: rec { + name = "bitflags"; + version = "2.4.2"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4"; }; + src = fetchCratesIo { inherit name version; sha256 = "ed570934406eb16438a4e976b1b4500774099c13b8cb96eec99f620f05090ddf"; }; + features = builtins.concatLists [ + [ "serde" ] + [ "std" ] + ]; dependencies = { - generic_array = rustPackages."registry+https://github.com/rust-lang/crates.io-index".generic-array."0.14.6" { inherit profileName; }; + serde = rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde."1.0.196" { inherit profileName; }; }; }); - "registry+https://github.com/rust-lang/crates.io-index".block-buffer."0.10.3" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".bitvec."1.0.1" = overridableMkRustCrate (profileName: rec { + name = "bitvec"; + version = "1.0.1"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "1bc2832c24239b0141d5674bb9174f9d68a8b5b3f2753311927c172ca46f7e9c"; }; + features = builtins.concatLists [ + [ "alloc" ] + ]; + dependencies = { + funty = rustPackages."registry+https://github.com/rust-lang/crates.io-index".funty."2.0.0" { inherit profileName; }; + radium = rustPackages."registry+https://github.com/rust-lang/crates.io-index".radium."0.7.0" { inherit profileName; }; + tap = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tap."1.0.1" { inherit profileName; }; + wyz = rustPackages."registry+https://github.com/rust-lang/crates.io-index".wyz."0.5.1" { inherit profileName; }; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".block-buffer."0.10.4" = overridableMkRustCrate (profileName: rec { name = "block-buffer"; - version = "0.10.3"; + version = "0.10.4"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71"; }; + dependencies = { + generic_array = rustPackages."registry+https://github.com/rust-lang/crates.io-index".generic-array."0.14.7" { inherit profileName; }; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".borsh."1.3.1" = overridableMkRustCrate (profileName: rec { + name = "borsh"; + version = "1.3.1"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "f58b559fd6448c6e2fd0adb5720cd98a2506594cafa4737ff98c396f3e82f667"; }; + features = builtins.concatLists [ + [ "borsh-derive" ] + [ "derive" ] + [ "std" ] + [ "unstable__schema" ] + ]; + dependencies = { + borsh_derive = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".borsh-derive."1.3.1" { profileName = "__noProfile"; }; + }; + buildDependencies = { + cfg_aliases = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".cfg_aliases."0.1.1" { profileName = "__noProfile"; }; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".borsh-derive."1.3.1" = overridableMkRustCrate (profileName: rec { + name = "borsh-derive"; + version = "1.3.1"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "69cce20737498f97b993470a6e536b8523f0af7892a4f928cceb1ac5e52ebe7e"; }; + src = fetchCratesIo { inherit name version; sha256 = "7aadb5b6ccbd078890f6d7003694e33816e6b784358f18e15e7e6d9f065a57cd"; }; + features = builtins.concatLists [ + [ "default" ] + [ "schema" ] + ]; dependencies = { - generic_array = rustPackages."registry+https://github.com/rust-lang/crates.io-index".generic-array."0.14.6" { inherit profileName; }; + once_cell = rustPackages."registry+https://github.com/rust-lang/crates.io-index".once_cell."1.19.0" { inherit profileName; }; + proc_macro_crate = rustPackages."registry+https://github.com/rust-lang/crates.io-index".proc-macro-crate."3.1.0" { inherit profileName; }; + proc_macro2 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".proc-macro2."1.0.78" { inherit profileName; }; + quote = rustPackages."registry+https://github.com/rust-lang/crates.io-index".quote."1.0.35" { inherit profileName; }; + syn = rustPackages."registry+https://github.com/rust-lang/crates.io-index".syn."2.0.49" { inherit profileName; }; + syn_derive = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".syn_derive."0.1.8" { profileName = "__noProfile"; }; }; }); - "registry+https://github.com/rust-lang/crates.io-index".brotli."3.3.4" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".brotli."3.4.0" = overridableMkRustCrate (profileName: rec { name = "brotli"; - version = "3.3.4"; + version = "3.4.0"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "a1a0b1dbcc8ae29329621f8d4f0d835787c1c38bb1401979b49d13b0b305ff68"; }; + src = fetchCratesIo { inherit name version; sha256 = "516074a47ef4bce09577a3b379392300159ce5b1ba2e501ff1c819950066100f"; }; features = builtins.concatLists [ [ "alloc-stdlib" ] [ "default" ] @@ -524,83 +1051,131 @@ in [ "std" ] ]; dependencies = { - alloc_no_stdlib = rustPackages."registry+https://github.com/rust-lang/crates.io-index".alloc-no-stdlib."2.0.3" { inherit profileName; }; - alloc_stdlib = rustPackages."registry+https://github.com/rust-lang/crates.io-index".alloc-stdlib."0.2.1" { inherit profileName; }; - brotli_decompressor = rustPackages."registry+https://github.com/rust-lang/crates.io-index".brotli-decompressor."2.3.2" { inherit profileName; }; + alloc_no_stdlib = rustPackages."registry+https://github.com/rust-lang/crates.io-index".alloc-no-stdlib."2.0.4" { inherit profileName; }; + alloc_stdlib = rustPackages."registry+https://github.com/rust-lang/crates.io-index".alloc-stdlib."0.2.2" { inherit profileName; }; + brotli_decompressor = rustPackages."registry+https://github.com/rust-lang/crates.io-index".brotli-decompressor."2.5.1" { inherit profileName; }; }; }); - "registry+https://github.com/rust-lang/crates.io-index".brotli-decompressor."2.3.2" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".brotli-decompressor."2.5.1" = overridableMkRustCrate (profileName: rec { name = "brotli-decompressor"; - version = "2.3.2"; + version = "2.5.1"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "59ad2d4653bf5ca36ae797b1f4bb4dbddb60ce49ca4aed8a2ce4829f60425b80"; }; + src = fetchCratesIo { inherit name version; sha256 = "4e2e4afe60d7dd600fdd3de8d0f08c2b7ec039712e3b6137ff98b7004e82de4f"; }; features = builtins.concatLists [ [ "alloc-stdlib" ] [ "std" ] ]; dependencies = { - alloc_no_stdlib = rustPackages."registry+https://github.com/rust-lang/crates.io-index".alloc-no-stdlib."2.0.3" { inherit profileName; }; - alloc_stdlib = rustPackages."registry+https://github.com/rust-lang/crates.io-index".alloc-stdlib."0.2.1" { inherit profileName; }; + alloc_no_stdlib = rustPackages."registry+https://github.com/rust-lang/crates.io-index".alloc-no-stdlib."2.0.4" { inherit profileName; }; + alloc_stdlib = rustPackages."registry+https://github.com/rust-lang/crates.io-index".alloc-stdlib."0.2.2" { inherit profileName; }; }; }); - "registry+https://github.com/rust-lang/crates.io-index".bumpalo."3.11.0" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".bumpalo."3.15.0" = overridableMkRustCrate (profileName: rec { name = "bumpalo"; - version = "3.11.0"; + version = "3.15.0"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "c1ad822118d20d2c234f427000d5acc36eabe1e29a348c89b63dd60b13f28e5d"; }; + src = fetchCratesIo { inherit name version; sha256 = "d32a994c2b3ca201d9b263612a374263f05e7adde37c4707f693dcd375076d1f"; }; features = builtins.concatLists [ [ "default" ] ]; }); - "registry+https://github.com/rust-lang/crates.io-index".byteorder."1.4.3" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".bytecheck."0.6.12" = overridableMkRustCrate (profileName: rec { + name = "bytecheck"; + version = "0.6.12"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "23cdc57ce23ac53c931e88a43d06d070a6fd142f2617be5855eb75efc9beb1c2"; }; + features = builtins.concatLists [ + [ "simdutf8" ] + [ "std" ] + ]; + dependencies = { + bytecheck_derive = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".bytecheck_derive."0.6.12" { profileName = "__noProfile"; }; + ptr_meta = rustPackages."registry+https://github.com/rust-lang/crates.io-index".ptr_meta."0.1.4" { inherit profileName; }; + simdutf8 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".simdutf8."0.1.4" { inherit profileName; }; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".bytecheck_derive."0.6.12" = overridableMkRustCrate (profileName: rec { + name = "bytecheck_derive"; + version = "0.6.12"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "3db406d29fbcd95542e92559bed4d8ad92636d1ca8b3b72ede10b4bcc010e659"; }; + features = builtins.concatLists [ + [ "std" ] + ]; + dependencies = { + proc_macro2 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".proc-macro2."1.0.78" { inherit profileName; }; + quote = rustPackages."registry+https://github.com/rust-lang/crates.io-index".quote."1.0.35" { inherit profileName; }; + syn = rustPackages."registry+https://github.com/rust-lang/crates.io-index".syn."1.0.109" { inherit profileName; }; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".byteorder."1.5.0" = overridableMkRustCrate (profileName: rec { name = "byteorder"; - version = "1.4.3"; + version = "1.5.0"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610"; }; + src = fetchCratesIo { inherit name version; sha256 = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b"; }; features = builtins.concatLists [ + [ "default" ] [ "std" ] ]; }); - "registry+https://github.com/rust-lang/crates.io-index".bytes."1.2.1" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".bytes."1.5.0" = overridableMkRustCrate (profileName: rec { name = "bytes"; - version = "1.2.1"; + version = "1.5.0"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "ec8a7b6a70fde80372154c65702f00a0f56f3e1c36abbc6c440484be248856db"; }; + src = fetchCratesIo { inherit name version; sha256 = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223"; }; features = builtins.concatLists [ [ "default" ] [ "serde" ] [ "std" ] ]; dependencies = { - serde = rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde."1.0.144" { inherit profileName; }; + serde = rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde."1.0.196" { inherit profileName; }; }; }); - "registry+https://github.com/rust-lang/crates.io-index".bytestring."1.1.0" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".bytes-utils."0.1.4" = overridableMkRustCrate (profileName: rec { + name = "bytes-utils"; + version = "0.1.4"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "7dafe3a8757b027e2be6e4e5601ed563c55989fcf1546e933c66c8eb3a058d35"; }; + features = builtins.concatLists [ + [ "default" ] + [ "std" ] + ]; + dependencies = { + bytes = rustPackages."registry+https://github.com/rust-lang/crates.io-index".bytes."1.5.0" { inherit profileName; }; + either = rustPackages."registry+https://github.com/rust-lang/crates.io-index".either."1.10.0" { inherit profileName; }; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".bytestring."1.3.1" = overridableMkRustCrate (profileName: rec { name = "bytestring"; - version = "1.1.0"; + version = "1.3.1"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "86b6a75fd3048808ef06af5cd79712be8111960adaf89d90250974b38fc3928a"; }; + src = fetchCratesIo { inherit name version; sha256 = "74d80203ea6b29df88012294f62733de21cfeab47f17b41af3a38bc30a03ee72"; }; dependencies = { - bytes = rustPackages."registry+https://github.com/rust-lang/crates.io-index".bytes."1.2.1" { inherit profileName; }; + bytes = rustPackages."registry+https://github.com/rust-lang/crates.io-index".bytes."1.5.0" { inherit profileName; }; }; }); - "registry+https://github.com/rust-lang/crates.io-index".cc."1.0.73" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".cc."1.0.83" = overridableMkRustCrate (profileName: rec { name = "cc"; - version = "1.0.73"; + version = "1.0.83"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "2fff2a6927b3bb87f9595d67196a70493f627687a71d87a0d692242c33f58c11"; }; + src = fetchCratesIo { inherit name version; sha256 = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0"; }; features = builtins.concatLists [ [ "jobserver" ] [ "parallel" ] ]; dependencies = { - jobserver = rustPackages."registry+https://github.com/rust-lang/crates.io-index".jobserver."0.1.24" { inherit profileName; }; + jobserver = rustPackages."registry+https://github.com/rust-lang/crates.io-index".jobserver."0.1.28" { inherit profileName; }; + ${ if hostPlatform.isUnix then "libc" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".libc."0.2.153" { inherit profileName; }; }; }); @@ -611,33 +1186,42 @@ in src = fetchCratesIo { inherit name version; sha256 = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"; }; }); - "registry+https://github.com/rust-lang/crates.io-index".chrono."0.4.22" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".cfg_aliases."0.1.1" = overridableMkRustCrate (profileName: rec { + name = "cfg_aliases"; + version = "0.1.1"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e"; }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".chrono."0.4.34" = overridableMkRustCrate (profileName: rec { name = "chrono"; - version = "0.4.22"; + version = "0.4.34"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "bfd4d1b31faaa3a89d7934dbded3111da0d2ef28e3ebccdb4f0179f5929d1ef1"; }; + src = fetchCratesIo { inherit name version; sha256 = "5bc015644b92d5890fab7489e49d21f879d5c990186827d42ec511919404f38b"; }; features = builtins.concatLists [ + [ "alloc" ] + [ "android-tzdata" ] [ "clock" ] [ "default" ] [ "iana-time-zone" ] [ "js-sys" ] + [ "now" ] [ "oldtime" ] [ "serde" ] [ "std" ] - [ "time" ] [ "wasm-bindgen" ] [ "wasmbind" ] [ "winapi" ] + [ "windows-targets" ] ]; dependencies = { - iana_time_zone = rustPackages."registry+https://github.com/rust-lang/crates.io-index".iana-time-zone."0.1.47" { inherit profileName; }; - ${ if hostPlatform.parsed.cpu.name == "wasm32" && !(hostPlatform.parsed.kernel.name == "emscripten" || hostPlatform.parsed.kernel.name == "wasi") then "js_sys" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".js-sys."0.3.59" { inherit profileName; }; - num_integer = rustPackages."registry+https://github.com/rust-lang/crates.io-index".num-integer."0.1.45" { inherit profileName; }; - num_traits = rustPackages."registry+https://github.com/rust-lang/crates.io-index".num-traits."0.2.15" { inherit profileName; }; - serde = rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde."1.0.144" { inherit profileName; }; - time = rustPackages."registry+https://github.com/rust-lang/crates.io-index".time."0.1.44" { inherit profileName; }; - ${ if hostPlatform.parsed.cpu.name == "wasm32" && !(hostPlatform.parsed.kernel.name == "emscripten" || hostPlatform.parsed.kernel.name == "wasi") then "wasm_bindgen" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".wasm-bindgen."0.2.82" { inherit profileName; }; - ${ if hostPlatform.isWindows then "winapi" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".winapi."0.3.9" { inherit profileName; }; + ${ if hostPlatform.parsed.kernel.name == "android" then "android_tzdata" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".android-tzdata."0.1.1" { inherit profileName; }; + ${ if hostPlatform.isUnix then "iana_time_zone" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".iana-time-zone."0.1.60" { inherit profileName; }; + ${ if hostPlatform.parsed.cpu.name == "wasm32" && !(hostPlatform.parsed.kernel.name == "emscripten" || hostPlatform.parsed.kernel.name == "wasi") then "js_sys" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".js-sys."0.3.68" { inherit profileName; }; + num_traits = rustPackages."registry+https://github.com/rust-lang/crates.io-index".num-traits."0.2.18" { inherit profileName; }; + serde = rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde."1.0.196" { inherit profileName; }; + ${ if hostPlatform.parsed.cpu.name == "wasm32" && !(hostPlatform.parsed.kernel.name == "emscripten" || hostPlatform.parsed.kernel.name == "wasi") then "wasm_bindgen" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".wasm-bindgen."0.2.91" { inherit profileName; }; + ${ if hostPlatform.isWindows then "windows_targets" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".windows-targets."0.52.0" { inherit profileName; }; }; }); @@ -651,9 +1235,9 @@ in ]; dependencies = { lazy_static = rustPackages."registry+https://github.com/rust-lang/crates.io-index".lazy_static."1.4.0" { inherit profileName; }; - nom = rustPackages."registry+https://github.com/rust-lang/crates.io-index".nom."5.1.2" { inherit profileName; }; - serde = rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde."1.0.144" { inherit profileName; }; - toml = rustPackages."registry+https://github.com/rust-lang/crates.io-index".toml."0.5.9" { inherit profileName; }; + nom = rustPackages."registry+https://github.com/rust-lang/crates.io-index".nom."5.1.3" { inherit profileName; }; + serde = rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde."1.0.196" { inherit profileName; }; + toml = rustPackages."registry+https://github.com/rust-lang/crates.io-index".toml."0.5.11" { inherit profileName; }; }; }); @@ -664,74 +1248,82 @@ in src = fetchCratesIo { inherit name version; sha256 = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e"; }; }); - "registry+https://github.com/rust-lang/crates.io-index".cookie."0.16.0" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".cookie."0.16.2" = overridableMkRustCrate (profileName: rec { name = "cookie"; - version = "0.16.0"; + version = "0.16.2"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "94d4706de1b0fa5b132270cddffa8585166037822e260a944fe161acd137ca05"; }; + src = fetchCratesIo { inherit name version; sha256 = "e859cd57d0710d9e06c381b550c06e76992472a8c6d527aecd2fc673dcc231fb"; }; features = builtins.concatLists [ [ "percent-encode" ] [ "percent-encoding" ] ]; dependencies = { - percent_encoding = rustPackages."registry+https://github.com/rust-lang/crates.io-index".percent-encoding."2.1.0" { inherit profileName; }; - time = rustPackages."registry+https://github.com/rust-lang/crates.io-index".time."0.3.14" { inherit profileName; }; + percent_encoding = rustPackages."registry+https://github.com/rust-lang/crates.io-index".percent-encoding."2.3.1" { inherit profileName; }; + time = rustPackages."registry+https://github.com/rust-lang/crates.io-index".time."0.3.34" { inherit profileName; }; }; buildDependencies = { version_check = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".version_check."0.9.4" { profileName = "__noProfile"; }; }; }); - "registry+https://github.com/rust-lang/crates.io-index".core-foundation."0.9.3" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".core-foundation."0.9.4" = overridableMkRustCrate (profileName: rec { name = "core-foundation"; - version = "0.9.3"; + version = "0.9.4"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "194a7a9e6de53fa55116934067c844d9d749312f75c6f6d0980e8c252f8c2146"; }; + src = fetchCratesIo { inherit name version; sha256 = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f"; }; + features = builtins.concatLists [ + [ "default" ] + [ "link" ] + ]; dependencies = { - core_foundation_sys = rustPackages."registry+https://github.com/rust-lang/crates.io-index".core-foundation-sys."0.8.3" { inherit profileName; }; - libc = rustPackages."registry+https://github.com/rust-lang/crates.io-index".libc."0.2.139" { inherit profileName; }; + core_foundation_sys = rustPackages."registry+https://github.com/rust-lang/crates.io-index".core-foundation-sys."0.8.6" { inherit profileName; }; + libc = rustPackages."registry+https://github.com/rust-lang/crates.io-index".libc."0.2.153" { inherit profileName; }; }; }); - "registry+https://github.com/rust-lang/crates.io-index".core-foundation-sys."0.8.3" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".core-foundation-sys."0.8.6" = overridableMkRustCrate (profileName: rec { name = "core-foundation-sys"; - version = "0.8.3"; + version = "0.8.6"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "5827cebf4670468b8772dd191856768aedcb1b0278a04f989f7766351917b9dc"; }; + src = fetchCratesIo { inherit name version; sha256 = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f"; }; + features = builtins.concatLists [ + [ "default" ] + [ "link" ] + ]; }); - "registry+https://github.com/rust-lang/crates.io-index".cpufeatures."0.2.5" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".cpufeatures."0.2.12" = overridableMkRustCrate (profileName: rec { name = "cpufeatures"; - version = "0.2.5"; + version = "0.2.12"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "28d997bd5e24a5928dd43e46dc529867e207907fe0b239c3477d924f7f2ca320"; }; + src = fetchCratesIo { inherit name version; sha256 = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504"; }; dependencies = { - ${ if hostPlatform.config == "aarch64-apple-darwin" || hostPlatform.config == "aarch64-linux-android" || hostPlatform.parsed.cpu.name == "aarch64" && hostPlatform.parsed.kernel.name == "linux" then "libc" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".libc."0.2.139" { inherit profileName; }; + ${ if hostPlatform.config == "aarch64-linux-android" || hostPlatform.parsed.cpu.name == "aarch64" && hostPlatform.parsed.kernel.name == "linux" || hostPlatform.parsed.cpu.name == "aarch64" && hostPlatform.parsed.vendor.name == "apple" || hostPlatform.parsed.cpu.name == "loongarch64" && hostPlatform.parsed.kernel.name == "linux" then "libc" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".libc."0.2.153" { inherit profileName; }; }; }); - "registry+https://github.com/rust-lang/crates.io-index".crc."2.1.0" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".crc."3.0.1" = overridableMkRustCrate (profileName: rec { name = "crc"; - version = "2.1.0"; + version = "3.0.1"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "49fc9a695bca7f35f5f4c15cddc84415f66a74ea78eef08e90c5024f2b540e23"; }; + src = fetchCratesIo { inherit name version; sha256 = "86ec7a15cbe22e59248fc7eadb1907dab5ba09372595da4d73dd805ed4417dfe"; }; dependencies = { - crc_catalog = rustPackages."registry+https://github.com/rust-lang/crates.io-index".crc-catalog."1.1.1" { inherit profileName; }; + crc_catalog = rustPackages."registry+https://github.com/rust-lang/crates.io-index".crc-catalog."2.4.0" { inherit profileName; }; }; }); - "registry+https://github.com/rust-lang/crates.io-index".crc-catalog."1.1.1" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".crc-catalog."2.4.0" = overridableMkRustCrate (profileName: rec { name = "crc-catalog"; - version = "1.1.1"; + version = "2.4.0"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "ccaeedb56da03b09f598226e25e80088cb4cd25f316e6e4df7d695f0feeb1403"; }; + src = fetchCratesIo { inherit name version; sha256 = "19d374276b40fb8bbdee95aef7c7fa6b5316ec764510eb64b8dd0e2ed0d7e7f5"; }; }); - "registry+https://github.com/rust-lang/crates.io-index".crc32fast."1.3.2" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".crc32fast."1.4.0" = overridableMkRustCrate (profileName: rec { name = "crc32fast"; - version = "1.3.2"; + version = "1.4.0"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d"; }; + src = fetchCratesIo { inherit name version; sha256 = "b3855a8a784b474f333699ef2bbca9db2c4a1f6d9088a90a2d25b1eb53111eaa"; }; features = builtins.concatLists [ [ "default" ] [ "std" ] @@ -741,35 +1333,29 @@ in }; }); - "registry+https://github.com/rust-lang/crates.io-index".crossbeam-queue."0.3.6" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".crossbeam-queue."0.3.11" = overridableMkRustCrate (profileName: rec { name = "crossbeam-queue"; - version = "0.3.6"; + version = "0.3.11"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "1cd42583b04998a5363558e5f9291ee5a5ff6b49944332103f251e7479a82aa7"; }; + src = fetchCratesIo { inherit name version; sha256 = "df0346b5d5e76ac2fe4e327c5fd1118d6be7c51dfb18f9b7922923f287471e35"; }; features = builtins.concatLists [ [ "alloc" ] [ "default" ] [ "std" ] ]; dependencies = { - cfg_if = rustPackages."registry+https://github.com/rust-lang/crates.io-index".cfg-if."1.0.0" { inherit profileName; }; - crossbeam_utils = rustPackages."registry+https://github.com/rust-lang/crates.io-index".crossbeam-utils."0.8.11" { inherit profileName; }; + crossbeam_utils = rustPackages."registry+https://github.com/rust-lang/crates.io-index".crossbeam-utils."0.8.19" { inherit profileName; }; }; }); - "registry+https://github.com/rust-lang/crates.io-index".crossbeam-utils."0.8.11" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".crossbeam-utils."0.8.19" = overridableMkRustCrate (profileName: rec { name = "crossbeam-utils"; - version = "0.8.11"; + version = "0.8.19"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "51887d4adc7b564537b15adcfb307936f8075dfcd5f00dde9a9f1d29383682bc"; }; + src = fetchCratesIo { inherit name version; sha256 = "248e3bacc7dc6baa3b21e405ee045c3047101a49145e7e9eca583ab4c2ca5345"; }; features = builtins.concatLists [ - [ "once_cell" ] [ "std" ] ]; - dependencies = { - cfg_if = rustPackages."registry+https://github.com/rust-lang/crates.io-index".cfg-if."1.0.0" { inherit profileName; }; - once_cell = rustPackages."registry+https://github.com/rust-lang/crates.io-index".once_cell."1.14.0" { inherit profileName; }; - }; }); "registry+https://github.com/rust-lang/crates.io-index".crypto-common."0.1.6" = overridableMkRustCrate (profileName: rec { @@ -781,19 +1367,8 @@ in [ "std" ] ]; dependencies = { - generic_array = rustPackages."registry+https://github.com/rust-lang/crates.io-index".generic-array."0.14.6" { inherit profileName; }; - typenum = rustPackages."registry+https://github.com/rust-lang/crates.io-index".typenum."1.15.0" { inherit profileName; }; - }; - }); - - "registry+https://github.com/rust-lang/crates.io-index".crypto-mac."0.11.1" = overridableMkRustCrate (profileName: rec { - name = "crypto-mac"; - version = "0.11.1"; - registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "b1d1a86f49236c215f271d40892d5fc950490551400b02ef360692c29815c714"; }; - dependencies = { - generic_array = rustPackages."registry+https://github.com/rust-lang/crates.io-index".generic-array."0.14.6" { inherit profileName; }; - subtle = rustPackages."registry+https://github.com/rust-lang/crates.io-index".subtle."2.4.1" { inherit profileName; }; + generic_array = rustPackages."registry+https://github.com/rust-lang/crates.io-index".generic-array."0.14.7" { inherit profileName; }; + typenum = rustPackages."registry+https://github.com/rust-lang/crates.io-index".typenum."1.17.0" { inherit profileName; }; }; }); @@ -812,6 +1387,21 @@ in }; }); + "registry+https://github.com/rust-lang/crates.io-index".darling."0.20.6" = overridableMkRustCrate (profileName: rec { + name = "darling"; + version = "0.20.6"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "c376d08ea6aa96aafe61237c7200d1241cb177b7d3a542d791f2d118e9cbb955"; }; + features = builtins.concatLists [ + [ "default" ] + [ "suggestions" ] + ]; + dependencies = { + darling_core = rustPackages."registry+https://github.com/rust-lang/crates.io-index".darling_core."0.20.6" { inherit profileName; }; + darling_macro = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".darling_macro."0.20.6" { profileName = "__noProfile"; }; + }; + }); + "registry+https://github.com/rust-lang/crates.io-index".darling_core."0.13.4" = overridableMkRustCrate (profileName: rec { name = "darling_core"; version = "0.13.4"; @@ -824,10 +1414,29 @@ in dependencies = { fnv = rustPackages."registry+https://github.com/rust-lang/crates.io-index".fnv."1.0.7" { inherit profileName; }; ident_case = rustPackages."registry+https://github.com/rust-lang/crates.io-index".ident_case."1.0.1" { inherit profileName; }; - proc_macro2 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".proc-macro2."1.0.43" { inherit profileName; }; - quote = rustPackages."registry+https://github.com/rust-lang/crates.io-index".quote."1.0.21" { inherit profileName; }; + proc_macro2 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".proc-macro2."1.0.78" { inherit profileName; }; + quote = rustPackages."registry+https://github.com/rust-lang/crates.io-index".quote."1.0.35" { inherit profileName; }; strsim = rustPackages."registry+https://github.com/rust-lang/crates.io-index".strsim."0.10.0" { inherit profileName; }; - syn = rustPackages."registry+https://github.com/rust-lang/crates.io-index".syn."1.0.99" { inherit profileName; }; + syn = rustPackages."registry+https://github.com/rust-lang/crates.io-index".syn."1.0.109" { inherit profileName; }; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".darling_core."0.20.6" = overridableMkRustCrate (profileName: rec { + name = "darling_core"; + version = "0.20.6"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "33043dcd19068b8192064c704b3f83eb464f91f1ff527b44a4e2b08d9cdb8855"; }; + features = builtins.concatLists [ + [ "strsim" ] + [ "suggestions" ] + ]; + dependencies = { + fnv = rustPackages."registry+https://github.com/rust-lang/crates.io-index".fnv."1.0.7" { inherit profileName; }; + ident_case = rustPackages."registry+https://github.com/rust-lang/crates.io-index".ident_case."1.0.1" { inherit profileName; }; + proc_macro2 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".proc-macro2."1.0.78" { inherit profileName; }; + quote = rustPackages."registry+https://github.com/rust-lang/crates.io-index".quote."1.0.35" { inherit profileName; }; + strsim = rustPackages."registry+https://github.com/rust-lang/crates.io-index".strsim."0.10.0" { inherit profileName; }; + syn = rustPackages."registry+https://github.com/rust-lang/crates.io-index".syn."2.0.49" { inherit profileName; }; }; }); @@ -838,16 +1447,28 @@ in src = fetchCratesIo { inherit name version; sha256 = "9c972679f83bdf9c42bd905396b6c3588a843a17f0f16dfcfa3e2c5d57441835"; }; dependencies = { darling_core = rustPackages."registry+https://github.com/rust-lang/crates.io-index".darling_core."0.13.4" { inherit profileName; }; - quote = rustPackages."registry+https://github.com/rust-lang/crates.io-index".quote."1.0.21" { inherit profileName; }; - syn = rustPackages."registry+https://github.com/rust-lang/crates.io-index".syn."1.0.99" { inherit profileName; }; + quote = rustPackages."registry+https://github.com/rust-lang/crates.io-index".quote."1.0.35" { inherit profileName; }; + syn = rustPackages."registry+https://github.com/rust-lang/crates.io-index".syn."1.0.109" { inherit profileName; }; }; }); - "registry+https://github.com/rust-lang/crates.io-index".data-encoding."2.3.2" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".darling_macro."0.20.6" = overridableMkRustCrate (profileName: rec { + name = "darling_macro"; + version = "0.20.6"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "c5a91391accf613803c2a9bf9abccdbaa07c54b4244a5b64883f9c3c137c86be"; }; + dependencies = { + darling_core = rustPackages."registry+https://github.com/rust-lang/crates.io-index".darling_core."0.20.6" { inherit profileName; }; + quote = rustPackages."registry+https://github.com/rust-lang/crates.io-index".quote."1.0.35" { inherit profileName; }; + syn = rustPackages."registry+https://github.com/rust-lang/crates.io-index".syn."2.0.49" { inherit profileName; }; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".data-encoding."2.5.0" = overridableMkRustCrate (profileName: rec { name = "data-encoding"; - version = "2.3.2"; + version = "2.5.0"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "3ee2393c4a91429dffb4bedf19f4d6abf27d8a732c8ce4980305d782e5426d57"; }; + src = fetchCratesIo { inherit name version; sha256 = "7e962a19be5cfc3f3bf6dd8f61eb50107f356ad6270fbb3ed41476571db78be5"; }; features = builtins.concatLists [ [ "alloc" ] [ "default" ] @@ -855,6 +1476,21 @@ in ]; }); + "registry+https://github.com/rust-lang/crates.io-index".deranged."0.3.11" = overridableMkRustCrate (profileName: rec { + name = "deranged"; + version = "0.3.11"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4"; }; + features = builtins.concatLists [ + [ "alloc" ] + [ "powerfmt" ] + [ "std" ] + ]; + dependencies = { + powerfmt = rustPackages."registry+https://github.com/rust-lang/crates.io-index".powerfmt."0.2.0" { inherit profileName; }; + }; + }); + "registry+https://github.com/rust-lang/crates.io-index".derive_more."0.99.17" = overridableMkRustCrate (profileName: rec { name = "derive_more"; version = "0.99.17"; @@ -890,34 +1526,20 @@ in ]; dependencies = { convert_case = rustPackages."registry+https://github.com/rust-lang/crates.io-index".convert_case."0.4.0" { inherit profileName; }; - proc_macro2 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".proc-macro2."1.0.43" { inherit profileName; }; - quote = rustPackages."registry+https://github.com/rust-lang/crates.io-index".quote."1.0.21" { inherit profileName; }; - syn = rustPackages."registry+https://github.com/rust-lang/crates.io-index".syn."1.0.99" { inherit profileName; }; + proc_macro2 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".proc-macro2."1.0.78" { inherit profileName; }; + quote = rustPackages."registry+https://github.com/rust-lang/crates.io-index".quote."1.0.35" { inherit profileName; }; + syn = rustPackages."registry+https://github.com/rust-lang/crates.io-index".syn."1.0.109" { inherit profileName; }; }; buildDependencies = { rustc_version = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".rustc_version."0.4.0" { profileName = "__noProfile"; }; }; }); - "registry+https://github.com/rust-lang/crates.io-index".digest."0.9.0" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".digest."0.10.7" = overridableMkRustCrate (profileName: rec { name = "digest"; - version = "0.9.0"; + version = "0.10.7"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066"; }; - features = builtins.concatLists [ - [ "alloc" ] - [ "std" ] - ]; - dependencies = { - generic_array = rustPackages."registry+https://github.com/rust-lang/crates.io-index".generic-array."0.14.6" { inherit profileName; }; - }; - }); - - "registry+https://github.com/rust-lang/crates.io-index".digest."0.10.3" = overridableMkRustCrate (profileName: rec { - name = "digest"; - version = "0.10.3"; - registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "f2fb860ca6fafa5552fb6d0e816a69c8e49f0908bf524e30a90d97c85892d506"; }; + src = fetchCratesIo { inherit name version; sha256 = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292"; }; features = builtins.concatLists [ [ "alloc" ] [ "block-buffer" ] @@ -928,9 +1550,9 @@ in [ "subtle" ] ]; dependencies = { - block_buffer = rustPackages."registry+https://github.com/rust-lang/crates.io-index".block-buffer."0.10.3" { inherit profileName; }; + block_buffer = rustPackages."registry+https://github.com/rust-lang/crates.io-index".block-buffer."0.10.4" { inherit profileName; }; crypto_common = rustPackages."registry+https://github.com/rust-lang/crates.io-index".crypto-common."0.1.6" { inherit profileName; }; - subtle = rustPackages."registry+https://github.com/rust-lang/crates.io-index".subtle."2.4.1" { inherit profileName; }; + subtle = rustPackages."registry+https://github.com/rust-lang/crates.io-index".subtle."2.5.0" { inherit profileName; }; }; }); @@ -944,68 +1566,45 @@ in }; }); - "registry+https://github.com/rust-lang/crates.io-index".dirs-next."2.0.0" = overridableMkRustCrate (profileName: rec { - name = "dirs-next"; - version = "2.0.0"; - registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "b98cf8ebf19c3d1b223e151f99a4f9f0690dca41414773390fc824184ac833e1"; }; - dependencies = { - cfg_if = rustPackages."registry+https://github.com/rust-lang/crates.io-index".cfg-if."1.0.0" { inherit profileName; }; - dirs_sys_next = rustPackages."registry+https://github.com/rust-lang/crates.io-index".dirs-sys-next."0.1.2" { inherit profileName; }; - }; - }); - "registry+https://github.com/rust-lang/crates.io-index".dirs-sys."0.3.7" = overridableMkRustCrate (profileName: rec { name = "dirs-sys"; version = "0.3.7"; registry = "registry+https://github.com/rust-lang/crates.io-index"; src = fetchCratesIo { inherit name version; sha256 = "1b1d1d91c932ef41c0f2663aa8b0ca0342d444d842c06914aa0a7e352d0bada6"; }; dependencies = { - ${ if hostPlatform.isUnix then "libc" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".libc."0.2.139" { inherit profileName; }; - ${ if hostPlatform.parsed.kernel.name == "redox" then "redox_users" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".redox_users."0.4.3" { inherit profileName; }; - ${ if hostPlatform.isWindows then "winapi" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".winapi."0.3.9" { inherit profileName; }; - }; - }); - - "registry+https://github.com/rust-lang/crates.io-index".dirs-sys-next."0.1.2" = overridableMkRustCrate (profileName: rec { - name = "dirs-sys-next"; - version = "0.1.2"; - registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "4ebda144c4fe02d1f7ea1a7d9641b6fc6b580adcfa024ae48797ecdeb6825b4d"; }; - dependencies = { - ${ if hostPlatform.isUnix then "libc" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".libc."0.2.139" { inherit profileName; }; - ${ if hostPlatform.parsed.kernel.name == "redox" then "redox_users" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".redox_users."0.4.3" { inherit profileName; }; + ${ if hostPlatform.isUnix then "libc" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".libc."0.2.153" { inherit profileName; }; + ${ if hostPlatform.parsed.kernel.name == "redox" then "redox_users" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".redox_users."0.4.4" { inherit profileName; }; ${ if hostPlatform.isWindows then "winapi" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".winapi."0.3.9" { inherit profileName; }; }; }); - "registry+https://github.com/rust-lang/crates.io-index".dotenv."0.15.0" = overridableMkRustCrate (profileName: rec { - name = "dotenv"; - version = "0.15.0"; + "registry+https://github.com/rust-lang/crates.io-index".dotenvy."0.15.7" = overridableMkRustCrate (profileName: rec { + name = "dotenvy"; + version = "0.15.7"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "77c90badedccf4105eca100756a0b1289e191f6fcbdadd3cee1d2f614f97da8f"; }; + src = fetchCratesIo { inherit name version; sha256 = "1aaf95b3e5c8f23aa320147307562d361db0ae0d51242340f558153b4eb2439b"; }; }); - "registry+https://github.com/rust-lang/crates.io-index".either."1.8.0" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".either."1.10.0" = overridableMkRustCrate (profileName: rec { name = "either"; - version = "1.8.0"; + version = "1.10.0"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "90e5c1c8368803113bf0c9584fc495a58b86dc8a29edbf8fe877d21d9507e797"; }; + src = fetchCratesIo { inherit name version; sha256 = "11157ac094ffbdde99aa67b23417ebdd801842852b500e395a45a9c0aac03e4a"; }; features = builtins.concatLists [ [ "default" ] [ "serde" ] [ "use_std" ] ]; dependencies = { - serde = rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde."1.0.144" { inherit profileName; }; + serde = rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde."1.0.196" { inherit profileName; }; }; }); - "registry+https://github.com/rust-lang/crates.io-index".encoding_rs."0.8.31" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".encoding_rs."0.8.33" = overridableMkRustCrate (profileName: rec { name = "encoding_rs"; - version = "0.8.31"; + version = "0.8.33"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "9852635589dc9f9ea1b6fe9f05b50ef208c85c834a562f0c6abb1c475736ec2b"; }; + src = fetchCratesIo { inherit name version; sha256 = "7268b386296a025e474d5140678f75d6de9493ae55a5d709eeb9dd08149945e1"; }; features = builtins.concatLists [ [ "alloc" ] [ "default" ] @@ -1015,50 +1614,46 @@ in }; }); - "registry+https://github.com/rust-lang/crates.io-index".enumflags2."0.7.5" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".enumflags2."0.7.9" = overridableMkRustCrate (profileName: rec { name = "enumflags2"; - version = "0.7.5"; + version = "0.7.9"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "e75d4cd21b95383444831539909fbb14b9dc3fdceb2a6f5d36577329a1f55ccb"; }; + src = fetchCratesIo { inherit name version; sha256 = "3278c9d5fb675e0a51dabcf4c0d355f692b064171535ba72361be1528a9d8e8d"; }; dependencies = { - enumflags2_derive = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".enumflags2_derive."0.7.4" { profileName = "__noProfile"; }; + enumflags2_derive = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".enumflags2_derive."0.7.9" { profileName = "__noProfile"; }; }; }); - "registry+https://github.com/rust-lang/crates.io-index".enumflags2_derive."0.7.4" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".enumflags2_derive."0.7.9" = overridableMkRustCrate (profileName: rec { name = "enumflags2_derive"; - version = "0.7.4"; + version = "0.7.9"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "f58dc3c5e468259f19f2d46304a6b28f1c3d034442e14b322d2b850e36f6d5ae"; }; + src = fetchCratesIo { inherit name version; sha256 = "5c785274071b1b420972453b306eeca06acf4633829db4223b58a2a8c5953bc4"; }; dependencies = { - proc_macro2 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".proc-macro2."1.0.43" { inherit profileName; }; - quote = rustPackages."registry+https://github.com/rust-lang/crates.io-index".quote."1.0.21" { inherit profileName; }; - syn = rustPackages."registry+https://github.com/rust-lang/crates.io-index".syn."1.0.99" { inherit profileName; }; + proc_macro2 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".proc-macro2."1.0.78" { inherit profileName; }; + quote = rustPackages."registry+https://github.com/rust-lang/crates.io-index".quote."1.0.35" { inherit profileName; }; + syn = rustPackages."registry+https://github.com/rust-lang/crates.io-index".syn."2.0.49" { inherit profileName; }; }; }); - "registry+https://github.com/rust-lang/crates.io-index".errno."0.2.8" = overridableMkRustCrate (profileName: rec { - name = "errno"; - version = "0.2.8"; + "registry+https://github.com/rust-lang/crates.io-index".equivalent."1.0.1" = overridableMkRustCrate (profileName: rec { + name = "equivalent"; + version = "1.0.1"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "f639046355ee4f37944e44f60642c6f3a7efa3cf6b78c78a0d989a8ce6c396a1"; }; - dependencies = { - ${ if hostPlatform.parsed.kernel.name == "dragonfly" then "errno_dragonfly" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".errno-dragonfly."0.1.2" { inherit profileName; }; - ${ if hostPlatform.isUnix || hostPlatform.parsed.kernel.name == "hermit" || hostPlatform.parsed.kernel.name == "wasi" then "libc" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".libc."0.2.139" { inherit profileName; }; - ${ if hostPlatform.isWindows then "winapi" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".winapi."0.3.9" { inherit profileName; }; - }; + src = fetchCratesIo { inherit name version; sha256 = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5"; }; }); - "registry+https://github.com/rust-lang/crates.io-index".errno-dragonfly."0.1.2" = overridableMkRustCrate (profileName: rec { - name = "errno-dragonfly"; - version = "0.1.2"; + "registry+https://github.com/rust-lang/crates.io-index".errno."0.3.8" = overridableMkRustCrate (profileName: rec { + name = "errno"; + version = "0.3.8"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "aa68f1b12764fab894d2755d2518754e71b4fd80ecfb822714a1206c2aab39bf"; }; + src = fetchCratesIo { inherit name version; sha256 = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245"; }; + features = builtins.concatLists [ + [ "std" ] + ]; dependencies = { - libc = rustPackages."registry+https://github.com/rust-lang/crates.io-index".libc."0.2.139" { inherit profileName; }; - }; - buildDependencies = { - cc = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".cc."1.0.73" { profileName = "__noProfile"; }; + ${ if hostPlatform.isUnix || hostPlatform.parsed.kernel.name == "hermit" || hostPlatform.parsed.kernel.name == "wasi" then "libc" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".libc."0.2.153" { inherit profileName; }; + ${ if hostPlatform.isWindows then "windows_sys" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".windows-sys."0.52.0" { inherit profileName; }; }; }); @@ -1069,11 +1664,11 @@ in src = fetchCratesIo { inherit name version; sha256 = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0"; }; }); - "registry+https://github.com/rust-lang/crates.io-index".eyre."0.6.8" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".eyre."0.6.12" = overridableMkRustCrate (profileName: rec { name = "eyre"; - version = "0.6.8"; + version = "0.6.12"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "4c2b6b5a29c02cdc822728b7d7b8ae1bab3e3b05d44522770ddd49722eeac7eb"; }; + src = fetchCratesIo { inherit name version; sha256 = "7cd915d99f24784cdc19fd37ef22b97e3ff0ae756c7e492e9fbfe897d61e2aec"; }; features = builtins.concatLists [ [ "auto-install" ] [ "default" ] @@ -1081,25 +1676,42 @@ in ]; dependencies = { indenter = rustPackages."registry+https://github.com/rust-lang/crates.io-index".indenter."0.3.3" { inherit profileName; }; - once_cell = rustPackages."registry+https://github.com/rust-lang/crates.io-index".once_cell."1.14.0" { inherit profileName; }; + once_cell = rustPackages."registry+https://github.com/rust-lang/crates.io-index".once_cell."1.19.0" { inherit profileName; }; }; }); - "registry+https://github.com/rust-lang/crates.io-index".fastrand."1.8.0" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".fastrand."1.9.0" = overridableMkRustCrate (profileName: rec { name = "fastrand"; - version = "1.8.0"; + version = "1.9.0"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "a7a407cfaa3385c4ae6b23e84623d48c2798d06e3e6a1878f7f59f17b3f86499"; }; + src = fetchCratesIo { inherit name version; sha256 = "e51093e27b0797c359783294ca4f0a911c270184cb10f85783b118614a1501be"; }; dependencies = { - ${ if hostPlatform.parsed.cpu.name == "wasm32" then "instant" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".instant."0.1.12" { inherit profileName; }; + ${ if hostPlatform.parsed.cpu.name == "wasm32" && !(hostPlatform.parsed.kernel.name == "wasi") then "instant" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".instant."0.1.12" { inherit profileName; }; }; }); - "registry+https://github.com/rust-lang/crates.io-index".firestorm."0.5.1" = overridableMkRustCrate (profileName: rec { - name = "firestorm"; - version = "0.5.1"; + "registry+https://github.com/rust-lang/crates.io-index".fastrand."2.0.1" = overridableMkRustCrate (profileName: rec { + name = "fastrand"; + version = "2.0.1"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "2c5f6c2c942da57e2aaaa84b8a521489486f14e75e7fa91dab70aba913975f98"; }; + src = fetchCratesIo { inherit name version; sha256 = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5"; }; + features = builtins.concatLists [ + [ "alloc" ] + [ "default" ] + [ "std" ] + ]; + }); + + "registry+https://github.com/rust-lang/crates.io-index".finl_unicode."1.2.0" = overridableMkRustCrate (profileName: rec { + name = "finl_unicode"; + version = "1.2.0"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "8fcfdc7a0362c9f4444381a9e697c79d435fe65b52a37466fc2c1184cee9edc6"; }; + features = builtins.concatLists [ + [ "categories" ] + [ "default" ] + [ "grapheme_clusters" ] + ]; }); "registry+https://github.com/rust-lang/crates.io-index".fixedbitset."0.2.0" = overridableMkRustCrate (profileName: rec { @@ -1109,27 +1721,28 @@ in src = fetchCratesIo { inherit name version; sha256 = "37ab347416e802de484e4d03c7316c48f1ecb56574dfd4a46a80f173ce1de04d"; }; }); - "registry+https://github.com/rust-lang/crates.io-index".flate2."1.0.24" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".flate2."1.0.28" = overridableMkRustCrate (profileName: rec { name = "flate2"; - version = "1.0.24"; + version = "1.0.28"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "f82b0f4c27ad9f8bfd1f3208d882da2b09c301bc1c828fd3a00d0216d2fbbff6"; }; + src = fetchCratesIo { inherit name version; sha256 = "46303f565772937ffe1d394a4fac6f411c6013172fadde9dcdb1e147a086940e"; }; features = builtins.concatLists [ + [ "any_impl" ] [ "default" ] [ "miniz_oxide" ] [ "rust_backend" ] ]; dependencies = { - crc32fast = rustPackages."registry+https://github.com/rust-lang/crates.io-index".crc32fast."1.3.2" { inherit profileName; }; - miniz_oxide = rustPackages."registry+https://github.com/rust-lang/crates.io-index".miniz_oxide."0.5.4" { inherit profileName; }; + crc32fast = rustPackages."registry+https://github.com/rust-lang/crates.io-index".crc32fast."1.4.0" { inherit profileName; }; + miniz_oxide = rustPackages."registry+https://github.com/rust-lang/crates.io-index".miniz_oxide."0.7.2" { inherit profileName; }; }; }); - "registry+https://github.com/rust-lang/crates.io-index".flume."0.10.14" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".flume."0.11.0" = overridableMkRustCrate (profileName: rec { name = "flume"; - version = "0.10.14"; + version = "0.11.0"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "1657b4441c3403d9f7b3409e47575237dac27b1b5726df654a6ecbf92f0f7577"; }; + src = fetchCratesIo { inherit name version; sha256 = "55ac459de2512911e4b674ce33cf20befaba382d05b62b008afc1c8b57cbf181"; }; features = builtins.concatLists [ [ "async" ] [ "default" ] @@ -1137,15 +1750,13 @@ in [ "futures-core" ] [ "futures-sink" ] [ "nanorand" ] - [ "pin-project" ] [ "select" ] ]; dependencies = { - futures_core = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-core."0.3.24" { inherit profileName; }; - futures_sink = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-sink."0.3.24" { inherit profileName; }; + futures_core = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-core."0.3.30" { inherit profileName; }; + futures_sink = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-sink."0.3.30" { inherit profileName; }; nanorand = rustPackages."registry+https://github.com/rust-lang/crates.io-index".nanorand."0.7.0" { inherit profileName; }; - pin_project = rustPackages."registry+https://github.com/rust-lang/crates.io-index".pin-project."1.0.12" { inherit profileName; }; - spin1 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".spin."0.9.4" { inherit profileName; }; + spin1 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".spin."0.9.8" { inherit profileName; }; }; }); @@ -1160,46 +1771,50 @@ in ]; }); - "registry+https://github.com/rust-lang/crates.io-index".form_urlencoded."1.0.1" = overridableMkRustCrate (profileName: rec { - name = "form_urlencoded"; - version = "1.0.1"; + "registry+https://github.com/rust-lang/crates.io-index".foreign-types."0.3.2" = overridableMkRustCrate (profileName: rec { + name = "foreign-types"; + version = "0.3.2"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "5fc25a87fa4fd2094bffb06925852034d90a17f0d1e05197d4956d3555752191"; }; + src = fetchCratesIo { inherit name version; sha256 = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1"; }; dependencies = { - matches = rustPackages."registry+https://github.com/rust-lang/crates.io-index".matches."0.1.9" { inherit profileName; }; - percent_encoding = rustPackages."registry+https://github.com/rust-lang/crates.io-index".percent-encoding."2.1.0" { inherit profileName; }; + foreign_types_shared = rustPackages."registry+https://github.com/rust-lang/crates.io-index".foreign-types-shared."0.1.1" { inherit profileName; }; }; }); - "registry+https://github.com/rust-lang/crates.io-index".futures."0.3.24" = overridableMkRustCrate (profileName: rec { - name = "futures"; - version = "0.3.24"; + "registry+https://github.com/rust-lang/crates.io-index".foreign-types-shared."0.1.1" = overridableMkRustCrate (profileName: rec { + name = "foreign-types-shared"; + version = "0.1.1"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "7f21eda599937fba36daeb58a22e8f5cee2d14c4a17b5b7739c7c8e5e3b8230c"; }; + src = fetchCratesIo { inherit name version; sha256 = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b"; }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".form_urlencoded."1.2.1" = overridableMkRustCrate (profileName: rec { + name = "form_urlencoded"; + version = "1.2.1"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456"; }; features = builtins.concatLists [ [ "alloc" ] - [ "async-await" ] [ "default" ] - [ "executor" ] - [ "futures-executor" ] [ "std" ] ]; dependencies = { - futures_channel = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-channel."0.3.24" { inherit profileName; }; - futures_core = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-core."0.3.24" { inherit profileName; }; - futures_executor = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-executor."0.3.24" { inherit profileName; }; - futures_io = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-io."0.3.24" { inherit profileName; }; - futures_sink = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-sink."0.3.24" { inherit profileName; }; - futures_task = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-task."0.3.24" { inherit profileName; }; - futures_util = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-util."0.3.24" { inherit profileName; }; + percent_encoding = rustPackages."registry+https://github.com/rust-lang/crates.io-index".percent-encoding."2.3.1" { inherit profileName; }; }; }); - "registry+https://github.com/rust-lang/crates.io-index".futures-channel."0.3.24" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".funty."2.0.0" = overridableMkRustCrate (profileName: rec { + name = "funty"; + version = "2.0.0"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c"; }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".futures-channel."0.3.30" = overridableMkRustCrate (profileName: rec { name = "futures-channel"; - version = "0.3.24"; + version = "0.3.30"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "30bdd20c28fadd505d0fd6712cdfcb0d4b5648baf45faef7f852afb2399bb050"; }; + src = fetchCratesIo { inherit name version; sha256 = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78"; }; features = builtins.concatLists [ [ "alloc" ] [ "default" ] @@ -1208,16 +1823,16 @@ in [ "std" ] ]; dependencies = { - futures_core = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-core."0.3.24" { inherit profileName; }; - futures_sink = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-sink."0.3.24" { inherit profileName; }; + futures_core = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-core."0.3.30" { inherit profileName; }; + futures_sink = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-sink."0.3.30" { inherit profileName; }; }; }); - "registry+https://github.com/rust-lang/crates.io-index".futures-core."0.3.24" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".futures-core."0.3.30" = overridableMkRustCrate (profileName: rec { name = "futures-core"; - version = "0.3.24"; + version = "0.3.30"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "4e5aa3de05362c3fb88de6531e6296e85cde7739cccad4b9dfeeb7f6ebce56bf"; }; + src = fetchCratesIo { inherit name version; sha256 = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d"; }; features = builtins.concatLists [ [ "alloc" ] [ "default" ] @@ -1225,26 +1840,11 @@ in ]; }); - "registry+https://github.com/rust-lang/crates.io-index".futures-executor."0.3.24" = overridableMkRustCrate (profileName: rec { - name = "futures-executor"; - version = "0.3.24"; - registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "9ff63c23854bee61b6e9cd331d523909f238fc7636290b96826e9cfa5faa00ab"; }; - features = builtins.concatLists [ - [ "std" ] - ]; - dependencies = { - futures_core = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-core."0.3.24" { inherit profileName; }; - futures_task = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-task."0.3.24" { inherit profileName; }; - futures_util = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-util."0.3.24" { inherit profileName; }; - }; - }); - - "registry+https://github.com/rust-lang/crates.io-index".futures-intrusive."0.4.0" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".futures-intrusive."0.4.2" = overridableMkRustCrate (profileName: rec { name = "futures-intrusive"; - version = "0.4.0"; + version = "0.4.2"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "62007592ac46aa7c2b6416f7deb9a8a8f63a01e0f1d6e1787d5630170db2b63e"; }; + src = fetchCratesIo { inherit name version; sha256 = "a604f7a68fbf8103337523b1fadc8ade7361ee3f112f7c680ad179651616aed5"; }; features = builtins.concatLists [ [ "alloc" ] [ "default" ] @@ -1252,39 +1852,39 @@ in [ "std" ] ]; dependencies = { - futures_core = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-core."0.3.24" { inherit profileName; }; - lock_api = rustPackages."registry+https://github.com/rust-lang/crates.io-index".lock_api."0.4.8" { inherit profileName; }; + futures_core = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-core."0.3.30" { inherit profileName; }; + lock_api = rustPackages."registry+https://github.com/rust-lang/crates.io-index".lock_api."0.4.11" { inherit profileName; }; parking_lot = rustPackages."registry+https://github.com/rust-lang/crates.io-index".parking_lot."0.11.2" { inherit profileName; }; }; }); - "registry+https://github.com/rust-lang/crates.io-index".futures-io."0.3.24" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".futures-io."0.3.30" = overridableMkRustCrate (profileName: rec { name = "futures-io"; - version = "0.3.24"; + version = "0.3.30"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "bbf4d2a7a308fd4578637c0b17c7e1c7ba127b8f6ba00b29f717e9655d85eb68"; }; + src = fetchCratesIo { inherit name version; sha256 = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1"; }; features = builtins.concatLists [ [ "std" ] ]; }); - "registry+https://github.com/rust-lang/crates.io-index".futures-macro."0.3.24" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".futures-macro."0.3.30" = overridableMkRustCrate (profileName: rec { name = "futures-macro"; - version = "0.3.24"; + version = "0.3.30"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "42cd15d1c7456c04dbdf7e88bcd69760d74f3a798d6444e16974b505b0e62f17"; }; + src = fetchCratesIo { inherit name version; sha256 = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac"; }; dependencies = { - proc_macro2 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".proc-macro2."1.0.43" { inherit profileName; }; - quote = rustPackages."registry+https://github.com/rust-lang/crates.io-index".quote."1.0.21" { inherit profileName; }; - syn = rustPackages."registry+https://github.com/rust-lang/crates.io-index".syn."1.0.99" { inherit profileName; }; + proc_macro2 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".proc-macro2."1.0.78" { inherit profileName; }; + quote = rustPackages."registry+https://github.com/rust-lang/crates.io-index".quote."1.0.35" { inherit profileName; }; + syn = rustPackages."registry+https://github.com/rust-lang/crates.io-index".syn."2.0.49" { inherit profileName; }; }; }); - "registry+https://github.com/rust-lang/crates.io-index".futures-sink."0.3.24" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".futures-sink."0.3.30" = overridableMkRustCrate (profileName: rec { name = "futures-sink"; - version = "0.3.24"; + version = "0.3.30"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "21b20ba5a92e727ba30e72834706623d94ac93a725410b6a6b6fbc1b07f7ba56"; }; + src = fetchCratesIo { inherit name version; sha256 = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5"; }; features = builtins.concatLists [ [ "alloc" ] [ "default" ] @@ -1292,22 +1892,22 @@ in ]; }); - "registry+https://github.com/rust-lang/crates.io-index".futures-task."0.3.24" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".futures-task."0.3.30" = overridableMkRustCrate (profileName: rec { name = "futures-task"; - version = "0.3.24"; + version = "0.3.30"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "a6508c467c73851293f390476d4491cf4d227dbabcd4170f3bb6044959b294f1"; }; + src = fetchCratesIo { inherit name version; sha256 = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004"; }; features = builtins.concatLists [ [ "alloc" ] [ "std" ] ]; }); - "registry+https://github.com/rust-lang/crates.io-index".futures-util."0.3.24" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".futures-util."0.3.30" = overridableMkRustCrate (profileName: rec { name = "futures-util"; - version = "0.3.24"; + version = "0.3.30"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "44fb6cb1be61cc1d2e43b262516aafcf63b241cffdb1d3fa115f91d9c7b09c90"; }; + src = fetchCratesIo { inherit name version; sha256 = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48"; }; features = builtins.concatLists [ [ "alloc" ] [ "async-await" ] @@ -1325,40 +1925,40 @@ in [ "std" ] ]; dependencies = { - futures_channel = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-channel."0.3.24" { inherit profileName; }; - futures_core = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-core."0.3.24" { inherit profileName; }; - futures_io = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-io."0.3.24" { inherit profileName; }; - futures_macro = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-macro."0.3.24" { profileName = "__noProfile"; }; - futures_sink = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-sink."0.3.24" { inherit profileName; }; - futures_task = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-task."0.3.24" { inherit profileName; }; - memchr = rustPackages."registry+https://github.com/rust-lang/crates.io-index".memchr."2.5.0" { inherit profileName; }; - pin_project_lite = rustPackages."registry+https://github.com/rust-lang/crates.io-index".pin-project-lite."0.2.9" { inherit profileName; }; + futures_channel = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-channel."0.3.30" { inherit profileName; }; + futures_core = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-core."0.3.30" { inherit profileName; }; + futures_io = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-io."0.3.30" { inherit profileName; }; + futures_macro = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-macro."0.3.30" { profileName = "__noProfile"; }; + futures_sink = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-sink."0.3.30" { inherit profileName; }; + futures_task = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-task."0.3.30" { inherit profileName; }; + memchr = rustPackages."registry+https://github.com/rust-lang/crates.io-index".memchr."2.7.1" { inherit profileName; }; + pin_project_lite = rustPackages."registry+https://github.com/rust-lang/crates.io-index".pin-project-lite."0.2.13" { inherit profileName; }; pin_utils = rustPackages."registry+https://github.com/rust-lang/crates.io-index".pin-utils."0.1.0" { inherit profileName; }; - slab = rustPackages."registry+https://github.com/rust-lang/crates.io-index".slab."0.4.7" { inherit profileName; }; + slab = rustPackages."registry+https://github.com/rust-lang/crates.io-index".slab."0.4.9" { inherit profileName; }; }; }); - "registry+https://github.com/rust-lang/crates.io-index".generic-array."0.14.6" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".generic-array."0.14.7" = overridableMkRustCrate (profileName: rec { name = "generic-array"; - version = "0.14.6"; + version = "0.14.7"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "bff49e947297f3312447abdca79f45f4738097cc82b06e72054d2223f601f1b9"; }; + src = fetchCratesIo { inherit name version; sha256 = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a"; }; features = builtins.concatLists [ [ "more_lengths" ] ]; dependencies = { - typenum = rustPackages."registry+https://github.com/rust-lang/crates.io-index".typenum."1.15.0" { inherit profileName; }; + typenum = rustPackages."registry+https://github.com/rust-lang/crates.io-index".typenum."1.17.0" { inherit profileName; }; }; buildDependencies = { version_check = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".version_check."0.9.4" { profileName = "__noProfile"; }; }; }); - "registry+https://github.com/rust-lang/crates.io-index".getrandom."0.2.7" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".getrandom."0.2.12" = overridableMkRustCrate (profileName: rec { name = "getrandom"; - version = "0.2.7"; + version = "0.2.12"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "4eb1a864a501629691edf6c15a593b7a51eebaa1e8468e9ddc623de7c9b58ec6"; }; + src = fetchCratesIo { inherit name version; sha256 = "190092ea657667030ac6a35e305e62fc4dd69fd98ac98631e5d3a2b1575a12b5"; }; features = builtins.concatLists [ [ "js" ] [ "js-sys" ] @@ -1368,65 +1968,85 @@ in ]; dependencies = { cfg_if = rustPackages."registry+https://github.com/rust-lang/crates.io-index".cfg-if."1.0.0" { inherit profileName; }; - ${ if hostPlatform.parsed.cpu.name == "wasm32" && hostPlatform.parsed.kernel.name == "unknown" then "js_sys" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".js-sys."0.3.59" { inherit profileName; }; - ${ if hostPlatform.isUnix then "libc" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".libc."0.2.139" { inherit profileName; }; + ${ if (hostPlatform.parsed.cpu.name == "wasm32" || hostPlatform.parsed.cpu.name == "wasm64") && hostPlatform.parsed.kernel.name == "unknown" then "js_sys" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".js-sys."0.3.68" { inherit profileName; }; + ${ if hostPlatform.isUnix then "libc" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".libc."0.2.153" { inherit profileName; }; ${ if hostPlatform.parsed.kernel.name == "wasi" then "wasi" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".wasi."0.11.0+wasi-snapshot-preview1" { inherit profileName; }; - ${ if hostPlatform.parsed.cpu.name == "wasm32" && hostPlatform.parsed.kernel.name == "unknown" then "wasm_bindgen" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".wasm-bindgen."0.2.82" { inherit profileName; }; + ${ if (hostPlatform.parsed.cpu.name == "wasm32" || hostPlatform.parsed.cpu.name == "wasm64") && hostPlatform.parsed.kernel.name == "unknown" then "wasm_bindgen" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".wasm-bindgen."0.2.91" { inherit profileName; }; }; }); - "registry+https://github.com/rust-lang/crates.io-index".h2."0.3.14" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".gimli."0.28.1" = overridableMkRustCrate (profileName: rec { + name = "gimli"; + version = "0.28.1"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253"; }; + features = builtins.concatLists [ + [ "read" ] + [ "read-core" ] + ]; + }); + + "registry+https://github.com/rust-lang/crates.io-index".h2."0.3.24" = overridableMkRustCrate (profileName: rec { name = "h2"; - version = "0.3.14"; + version = "0.3.24"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "5ca32592cf21ac7ccab1825cd87f6c9b3d9022c44d086172ed0966bec8af30be"; }; + src = fetchCratesIo { inherit name version; sha256 = "bb2c4422095b67ee78da96fbb51a4cc413b3b25883c7717ff7ca1ab31022c9c9"; }; dependencies = { - bytes = rustPackages."registry+https://github.com/rust-lang/crates.io-index".bytes."1.2.1" { inherit profileName; }; + bytes = rustPackages."registry+https://github.com/rust-lang/crates.io-index".bytes."1.5.0" { inherit profileName; }; fnv = rustPackages."registry+https://github.com/rust-lang/crates.io-index".fnv."1.0.7" { inherit profileName; }; - futures_core = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-core."0.3.24" { inherit profileName; }; - futures_sink = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-sink."0.3.24" { inherit profileName; }; - futures_util = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-util."0.3.24" { inherit profileName; }; - http = rustPackages."registry+https://github.com/rust-lang/crates.io-index".http."0.2.8" { inherit profileName; }; - indexmap = rustPackages."registry+https://github.com/rust-lang/crates.io-index".indexmap."1.9.1" { inherit profileName; }; - slab = rustPackages."registry+https://github.com/rust-lang/crates.io-index".slab."0.4.7" { inherit profileName; }; - tokio = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tokio."1.25.0" { inherit profileName; }; - tokio_util = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tokio-util."0.7.3" { inherit profileName; }; - tracing = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tracing."0.1.36" { inherit profileName; }; + futures_core = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-core."0.3.30" { inherit profileName; }; + futures_sink = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-sink."0.3.30" { inherit profileName; }; + futures_util = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-util."0.3.30" { inherit profileName; }; + http = rustPackages."registry+https://github.com/rust-lang/crates.io-index".http."0.2.11" { inherit profileName; }; + indexmap = rustPackages."registry+https://github.com/rust-lang/crates.io-index".indexmap."2.2.3" { inherit profileName; }; + slab = rustPackages."registry+https://github.com/rust-lang/crates.io-index".slab."0.4.9" { inherit profileName; }; + tokio = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tokio."1.36.0" { inherit profileName; }; + tokio_util = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tokio-util."0.7.10" { inherit profileName; }; + tracing = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tracing."0.1.40" { inherit profileName; }; }; }); - "registry+https://github.com/rust-lang/crates.io-index".hashbrown."0.11.2" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".hashbrown."0.12.3" = overridableMkRustCrate (profileName: rec { name = "hashbrown"; - version = "0.11.2"; + version = "0.12.3"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e"; }; + src = fetchCratesIo { inherit name version; sha256 = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888"; }; features = builtins.concatLists [ [ "ahash" ] [ "default" ] [ "inline-more" ] + [ "raw" ] ]; dependencies = { - ahash = rustPackages."registry+https://github.com/rust-lang/crates.io-index".ahash."0.7.6" { inherit profileName; }; + ahash = rustPackages."registry+https://github.com/rust-lang/crates.io-index".ahash."0.7.8" { inherit profileName; }; }; }); - "registry+https://github.com/rust-lang/crates.io-index".hashbrown."0.12.3" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".hashbrown."0.14.3" = overridableMkRustCrate (profileName: rec { name = "hashbrown"; - version = "0.12.3"; + version = "0.14.3"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888"; }; + src = fetchCratesIo { inherit name version; sha256 = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604"; }; features = builtins.concatLists [ + [ "ahash" ] + [ "allocator-api2" ] + [ "default" ] + [ "inline-more" ] [ "raw" ] ]; + dependencies = { + ahash = rustPackages."registry+https://github.com/rust-lang/crates.io-index".ahash."0.8.8" { inherit profileName; }; + allocator_api2 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".allocator-api2."0.2.16" { inherit profileName; }; + }; }); - "registry+https://github.com/rust-lang/crates.io-index".hashlink."0.7.0" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".hashlink."0.8.4" = overridableMkRustCrate (profileName: rec { name = "hashlink"; - version = "0.7.0"; + version = "0.8.4"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "7249a3129cbc1ffccd74857f81464a323a152173cdb134e0fd81bc803b29facf"; }; + src = fetchCratesIo { inherit name version; sha256 = "e8094feaf31ff591f651a2664fb9cfd92bba7a60ce3197265e9482ebe753c8f7"; }; dependencies = { - hashbrown = rustPackages."registry+https://github.com/rust-lang/crates.io-index".hashbrown."0.11.2" { inherit profileName; }; + hashbrown = rustPackages."registry+https://github.com/rust-lang/crates.io-index".hashbrown."0.14.3" { inherit profileName; }; }; }); @@ -1436,36 +2056,33 @@ in registry = "registry+https://github.com/rust-lang/crates.io-index"; src = fetchCratesIo { inherit name version; sha256 = "6d621efb26863f0e9924c6ac577e8275e5e6b77455db64ffa6c65c904e9e132c"; }; dependencies = { - unicode_segmentation = rustPackages."registry+https://github.com/rust-lang/crates.io-index".unicode-segmentation."1.9.0" { inherit profileName; }; + unicode_segmentation = rustPackages."registry+https://github.com/rust-lang/crates.io-index".unicode-segmentation."1.11.0" { inherit profileName; }; }; }); - "registry+https://github.com/rust-lang/crates.io-index".heck."0.4.0" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".heck."0.4.1" = overridableMkRustCrate (profileName: rec { name = "heck"; - version = "0.4.0"; + version = "0.4.1"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "2540771e65fc8cb83cd6e8a237f70c319bd5c29f78ed1084ba5d50eeac86f7f9"; }; + src = fetchCratesIo { inherit name version; sha256 = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8"; }; features = builtins.concatLists [ [ "default" ] [ "unicode" ] [ "unicode-segmentation" ] ]; dependencies = { - unicode_segmentation = rustPackages."registry+https://github.com/rust-lang/crates.io-index".unicode-segmentation."1.9.0" { inherit profileName; }; + unicode_segmentation = rustPackages."registry+https://github.com/rust-lang/crates.io-index".unicode-segmentation."1.11.0" { inherit profileName; }; }; }); - "registry+https://github.com/rust-lang/crates.io-index".hermit-abi."0.1.19" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".hermit-abi."0.3.6" = overridableMkRustCrate (profileName: rec { name = "hermit-abi"; - version = "0.1.19"; + version = "0.3.6"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33"; }; + src = fetchCratesIo { inherit name version; sha256 = "bd5256b483761cd23699d0da46cc6fd2ee3be420bbe6d020ae4a091e70b7e9fd"; }; features = builtins.concatLists [ [ "default" ] ]; - dependencies = { - libc = rustPackages."registry+https://github.com/rust-lang/crates.io-index".libc."0.2.139" { inherit profileName; }; - }; }); "registry+https://github.com/rust-lang/crates.io-index".hex."0.4.3" = overridableMkRustCrate (profileName: rec { @@ -1480,62 +2097,77 @@ in [ "std" ] ]; dependencies = { - serde = rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde."1.0.144" { inherit profileName; }; + serde = rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde."1.0.196" { inherit profileName; }; }; }); - "registry+https://github.com/rust-lang/crates.io-index".hkdf."0.12.3" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".hkdf."0.12.4" = overridableMkRustCrate (profileName: rec { name = "hkdf"; - version = "0.12.3"; + version = "0.12.4"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "7b5f8eb2ad728638ea2c7d47a21db23b7b58a72ed6a38256b8a1849f15fbbdf7"; }; + dependencies = { + hmac = rustPackages."registry+https://github.com/rust-lang/crates.io-index".hmac."0.12.1" { inherit profileName; }; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".hmac."0.12.1" = overridableMkRustCrate (profileName: rec { + name = "hmac"; + version = "0.12.1"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "791a029f6b9fc27657f6f188ec6e5e43f6911f6f878e0dc5501396e09809d437"; }; + src = fetchCratesIo { inherit name version; sha256 = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e"; }; dependencies = { - hmac = rustPackages."registry+https://github.com/rust-lang/crates.io-index".hmac."0.12.1" { inherit profileName; }; + digest = rustPackages."registry+https://github.com/rust-lang/crates.io-index".digest."0.10.7" { inherit profileName; }; }; }); - "registry+https://github.com/rust-lang/crates.io-index".hmac."0.11.0" = overridableMkRustCrate (profileName: rec { - name = "hmac"; - version = "0.11.0"; + "registry+https://github.com/rust-lang/crates.io-index".home."0.5.9" = overridableMkRustCrate (profileName: rec { + name = "home"; + version = "0.5.9"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "2a2a2320eb7ec0ebe8da8f744d7812d9fc4cb4d09344ac01898dbcb6a20ae69b"; }; + src = fetchCratesIo { inherit name version; sha256 = "e3d1354bf6b7235cb4a0576c2619fd4ed18183f689b12b006a0ee7329eeff9a5"; }; dependencies = { - crypto_mac = rustPackages."registry+https://github.com/rust-lang/crates.io-index".crypto-mac."0.11.1" { inherit profileName; }; - digest = rustPackages."registry+https://github.com/rust-lang/crates.io-index".digest."0.9.0" { inherit profileName; }; + ${ if hostPlatform.isWindows then "windows_sys" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".windows-sys."0.52.0" { inherit profileName; }; }; }); - "registry+https://github.com/rust-lang/crates.io-index".hmac."0.12.1" = overridableMkRustCrate (profileName: rec { - name = "hmac"; - version = "0.12.1"; + "registry+https://github.com/rust-lang/crates.io-index".http."0.2.11" = overridableMkRustCrate (profileName: rec { + name = "http"; + version = "0.2.11"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e"; }; + src = fetchCratesIo { inherit name version; sha256 = "8947b1a6fad4393052c7ba1f4cd97bed3e953a95c79c92ad9b051a04611d9fbb"; }; dependencies = { - digest = rustPackages."registry+https://github.com/rust-lang/crates.io-index".digest."0.10.3" { inherit profileName; }; + bytes = rustPackages."registry+https://github.com/rust-lang/crates.io-index".bytes."1.5.0" { inherit profileName; }; + fnv = rustPackages."registry+https://github.com/rust-lang/crates.io-index".fnv."1.0.7" { inherit profileName; }; + itoa = rustPackages."registry+https://github.com/rust-lang/crates.io-index".itoa."1.0.10" { inherit profileName; }; }; }); - "registry+https://github.com/rust-lang/crates.io-index".http."0.2.8" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".http."1.0.0" = overridableMkRustCrate (profileName: rec { name = "http"; - version = "0.2.8"; + version = "1.0.0"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "75f43d41e26995c17e71ee126451dd3941010b0514a81a9d11f3b341debc2399"; }; + src = fetchCratesIo { inherit name version; sha256 = "b32afd38673a8016f7c9ae69e5af41a58f81b1d31689040f2f1959594ce194ea"; }; + features = builtins.concatLists [ + [ "default" ] + [ "std" ] + ]; dependencies = { - bytes = rustPackages."registry+https://github.com/rust-lang/crates.io-index".bytes."1.2.1" { inherit profileName; }; + bytes = rustPackages."registry+https://github.com/rust-lang/crates.io-index".bytes."1.5.0" { inherit profileName; }; fnv = rustPackages."registry+https://github.com/rust-lang/crates.io-index".fnv."1.0.7" { inherit profileName; }; - itoa = rustPackages."registry+https://github.com/rust-lang/crates.io-index".itoa."1.0.3" { inherit profileName; }; + itoa = rustPackages."registry+https://github.com/rust-lang/crates.io-index".itoa."1.0.10" { inherit profileName; }; }; }); - "registry+https://github.com/rust-lang/crates.io-index".http-body."0.4.5" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".http-body."0.4.6" = overridableMkRustCrate (profileName: rec { name = "http-body"; - version = "0.4.5"; + version = "0.4.6"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1"; }; + src = fetchCratesIo { inherit name version; sha256 = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2"; }; dependencies = { - bytes = rustPackages."registry+https://github.com/rust-lang/crates.io-index".bytes."1.2.1" { inherit profileName; }; - http = rustPackages."registry+https://github.com/rust-lang/crates.io-index".http."0.2.8" { inherit profileName; }; - pin_project_lite = rustPackages."registry+https://github.com/rust-lang/crates.io-index".pin-project-lite."0.2.9" { inherit profileName; }; + bytes = rustPackages."registry+https://github.com/rust-lang/crates.io-index".bytes."1.5.0" { inherit profileName; }; + http = rustPackages."registry+https://github.com/rust-lang/crates.io-index".http."0.2.11" { inherit profileName; }; + pin_project_lite = rustPackages."registry+https://github.com/rust-lang/crates.io-index".pin-project-lite."0.2.13" { inherit profileName; }; }; }); @@ -1550,18 +2182,18 @@ in ]; }); - "registry+https://github.com/rust-lang/crates.io-index".httpdate."1.0.2" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".httpdate."1.0.3" = overridableMkRustCrate (profileName: rec { name = "httpdate"; - version = "1.0.2"; + version = "1.0.3"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "c4a1e36c821dbe04574f602848a19f742f4fb3c98d40449f11bcad18d6b17421"; }; + src = fetchCratesIo { inherit name version; sha256 = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9"; }; }); - "registry+https://github.com/rust-lang/crates.io-index".hyper."0.14.20" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".hyper."0.14.28" = overridableMkRustCrate (profileName: rec { name = "hyper"; - version = "0.14.20"; + version = "0.14.28"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "02c929dc5c39e335a03c405292728118860721b10190d98c2a0f0efd5baafbac"; }; + src = fetchCratesIo { inherit name version; sha256 = "bf96e135eb83a2a8ddf766e426a841d8ddd7449d5f00d34ea02b41d2f19eef80"; }; features = builtins.concatLists [ [ "client" ] [ "default" ] @@ -1576,36 +2208,51 @@ in [ "tcp" ] ]; dependencies = { - bytes = rustPackages."registry+https://github.com/rust-lang/crates.io-index".bytes."1.2.1" { inherit profileName; }; - futures_channel = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-channel."0.3.24" { inherit profileName; }; - futures_core = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-core."0.3.24" { inherit profileName; }; - futures_util = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-util."0.3.24" { inherit profileName; }; - h2 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".h2."0.3.14" { inherit profileName; }; - http = rustPackages."registry+https://github.com/rust-lang/crates.io-index".http."0.2.8" { inherit profileName; }; - http_body = rustPackages."registry+https://github.com/rust-lang/crates.io-index".http-body."0.4.5" { inherit profileName; }; + bytes = rustPackages."registry+https://github.com/rust-lang/crates.io-index".bytes."1.5.0" { inherit profileName; }; + futures_channel = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-channel."0.3.30" { inherit profileName; }; + futures_core = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-core."0.3.30" { inherit profileName; }; + futures_util = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-util."0.3.30" { inherit profileName; }; + h2 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".h2."0.3.24" { inherit profileName; }; + http = rustPackages."registry+https://github.com/rust-lang/crates.io-index".http."0.2.11" { inherit profileName; }; + http_body = rustPackages."registry+https://github.com/rust-lang/crates.io-index".http-body."0.4.6" { inherit profileName; }; httparse = rustPackages."registry+https://github.com/rust-lang/crates.io-index".httparse."1.8.0" { inherit profileName; }; - httpdate = rustPackages."registry+https://github.com/rust-lang/crates.io-index".httpdate."1.0.2" { inherit profileName; }; - itoa = rustPackages."registry+https://github.com/rust-lang/crates.io-index".itoa."1.0.3" { inherit profileName; }; - pin_project_lite = rustPackages."registry+https://github.com/rust-lang/crates.io-index".pin-project-lite."0.2.9" { inherit profileName; }; - socket2 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".socket2."0.4.7" { inherit profileName; }; - tokio = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tokio."1.25.0" { inherit profileName; }; + httpdate = rustPackages."registry+https://github.com/rust-lang/crates.io-index".httpdate."1.0.3" { inherit profileName; }; + itoa = rustPackages."registry+https://github.com/rust-lang/crates.io-index".itoa."1.0.10" { inherit profileName; }; + pin_project_lite = rustPackages."registry+https://github.com/rust-lang/crates.io-index".pin-project-lite."0.2.13" { inherit profileName; }; + socket2 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".socket2."0.5.5" { inherit profileName; }; + tokio = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tokio."1.36.0" { inherit profileName; }; tower_service = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tower-service."0.3.2" { inherit profileName; }; - tracing = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tracing."0.1.36" { inherit profileName; }; - want = rustPackages."registry+https://github.com/rust-lang/crates.io-index".want."0.3.0" { inherit profileName; }; + tracing = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tracing."0.1.40" { inherit profileName; }; + want = rustPackages."registry+https://github.com/rust-lang/crates.io-index".want."0.3.1" { inherit profileName; }; }; }); - "registry+https://github.com/rust-lang/crates.io-index".hyper-rustls."0.23.0" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".hyper-rustls."0.24.2" = overridableMkRustCrate (profileName: rec { name = "hyper-rustls"; - version = "0.23.0"; + version = "0.24.2"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "d87c48c02e0dc5e3b849a2041db3029fd066650f8f717c07bf8ed78ccb895cac"; }; + src = fetchCratesIo { inherit name version; sha256 = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590"; }; + features = builtins.concatLists [ + [ "acceptor" ] + [ "default" ] + [ "http1" ] + [ "http2" ] + [ "log" ] + [ "logging" ] + [ "native-tokio" ] + [ "rustls-native-certs" ] + [ "tls12" ] + [ "tokio-runtime" ] + ]; dependencies = { - http = rustPackages."registry+https://github.com/rust-lang/crates.io-index".http."0.2.8" { inherit profileName; }; - hyper = rustPackages."registry+https://github.com/rust-lang/crates.io-index".hyper."0.14.20" { inherit profileName; }; - rustls = rustPackages."registry+https://github.com/rust-lang/crates.io-index".rustls."0.20.6" { inherit profileName; }; - tokio = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tokio."1.25.0" { inherit profileName; }; - tokio_rustls = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tokio-rustls."0.23.4" { inherit profileName; }; + futures_util = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-util."0.3.30" { inherit profileName; }; + http = rustPackages."registry+https://github.com/rust-lang/crates.io-index".http."0.2.11" { inherit profileName; }; + hyper = rustPackages."registry+https://github.com/rust-lang/crates.io-index".hyper."0.14.28" { inherit profileName; }; + log = rustPackages."registry+https://github.com/rust-lang/crates.io-index".log."0.4.20" { inherit profileName; }; + rustls = rustPackages."registry+https://github.com/rust-lang/crates.io-index".rustls."0.21.10" { inherit profileName; }; + rustls_native_certs = rustPackages."registry+https://github.com/rust-lang/crates.io-index".rustls-native-certs."0.6.3" { inherit profileName; }; + tokio = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tokio."1.36.0" { inherit profileName; }; + tokio_rustls = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tokio-rustls."0.24.1" { inherit profileName; }; }; }); @@ -1615,28 +2262,52 @@ in registry = "registry+https://github.com/rust-lang/crates.io-index"; src = fetchCratesIo { inherit name version; sha256 = "bbb958482e8c7be4bc3cf272a766a2b0bf1a6755e7a6ae777f017a31d11b13b1"; }; dependencies = { - hyper = rustPackages."registry+https://github.com/rust-lang/crates.io-index".hyper."0.14.20" { inherit profileName; }; - pin_project_lite = rustPackages."registry+https://github.com/rust-lang/crates.io-index".pin-project-lite."0.2.9" { inherit profileName; }; - tokio = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tokio."1.25.0" { inherit profileName; }; + hyper = rustPackages."registry+https://github.com/rust-lang/crates.io-index".hyper."0.14.28" { inherit profileName; }; + pin_project_lite = rustPackages."registry+https://github.com/rust-lang/crates.io-index".pin-project-lite."0.2.13" { inherit profileName; }; + tokio = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tokio."1.36.0" { inherit profileName; }; tokio_io_timeout = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tokio-io-timeout."1.2.0" { inherit profileName; }; }; }); - "registry+https://github.com/rust-lang/crates.io-index".iana-time-zone."0.1.47" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".hyper-tls."0.5.0" = overridableMkRustCrate (profileName: rec { + name = "hyper-tls"; + version = "0.5.0"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905"; }; + dependencies = { + bytes = rustPackages."registry+https://github.com/rust-lang/crates.io-index".bytes."1.5.0" { inherit profileName; }; + hyper = rustPackages."registry+https://github.com/rust-lang/crates.io-index".hyper."0.14.28" { inherit profileName; }; + native_tls = rustPackages."registry+https://github.com/rust-lang/crates.io-index".native-tls."0.2.11" { inherit profileName; }; + tokio = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tokio."1.36.0" { inherit profileName; }; + tokio_native_tls = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tokio-native-tls."0.3.1" { inherit profileName; }; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".iana-time-zone."0.1.60" = overridableMkRustCrate (profileName: rec { name = "iana-time-zone"; - version = "0.1.47"; + version = "0.1.60"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "4c495f162af0bf17656d0014a0eded5f3cd2f365fdd204548c2869db89359dc7"; }; + src = fetchCratesIo { inherit name version; sha256 = "e7ffbb5a1b541ea2561f8c41c087286cc091e21e556a4f09a8f6cbf17b69b141"; }; features = builtins.concatLists [ [ "fallback" ] ]; dependencies = { ${ if hostPlatform.parsed.kernel.name == "android" then "android_system_properties" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".android_system_properties."0.1.5" { inherit profileName; }; - ${ if hostPlatform.parsed.kernel.name == "darwin" || hostPlatform.parsed.kernel.name == "ios" then "core_foundation_sys" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".core-foundation-sys."0.8.3" { inherit profileName; }; - ${ if hostPlatform.parsed.cpu.name == "wasm32" then "js_sys" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".js-sys."0.3.59" { inherit profileName; }; - ${ if hostPlatform.parsed.kernel.name == "android" then "once_cell" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".once_cell."1.14.0" { inherit profileName; }; - ${ if hostPlatform.parsed.cpu.name == "wasm32" then "wasm_bindgen" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".wasm-bindgen."0.2.82" { inherit profileName; }; - ${ if hostPlatform.parsed.kernel.name == "windows" then "winapi" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".winapi."0.3.9" { inherit profileName; }; + ${ if hostPlatform.parsed.kernel.name == "darwin" || hostPlatform.parsed.kernel.name == "ios" then "core_foundation_sys" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".core-foundation-sys."0.8.6" { inherit profileName; }; + ${ if hostPlatform.parsed.kernel.name == "haiku" then "iana_time_zone_haiku" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".iana-time-zone-haiku."0.1.2" { inherit profileName; }; + ${ if hostPlatform.parsed.cpu.name == "wasm32" then "js_sys" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".js-sys."0.3.68" { inherit profileName; }; + ${ if hostPlatform.parsed.cpu.name == "wasm32" then "wasm_bindgen" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".wasm-bindgen."0.2.91" { inherit profileName; }; + ${ if hostPlatform.parsed.kernel.name == "windows" then "windows_core" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".windows-core."0.52.0" { inherit profileName; }; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".iana-time-zone-haiku."0.1.2" = overridableMkRustCrate (profileName: rec { + name = "iana-time-zone-haiku"; + version = "0.1.2"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f"; }; + buildDependencies = { + cc = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".cc."1.0.83" { profileName = "__noProfile"; }; }; }); @@ -1647,15 +2318,19 @@ in src = fetchCratesIo { inherit name version; sha256 = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39"; }; }); - "registry+https://github.com/rust-lang/crates.io-index".idna."0.2.3" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".idna."0.5.0" = overridableMkRustCrate (profileName: rec { name = "idna"; - version = "0.2.3"; + version = "0.5.0"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "418a0a6fab821475f634efe3ccc45c013f742efe03d853e8d3355d5cb850ecf8"; }; + src = fetchCratesIo { inherit name version; sha256 = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6"; }; + features = builtins.concatLists [ + [ "alloc" ] + [ "default" ] + [ "std" ] + ]; dependencies = { - matches = rustPackages."registry+https://github.com/rust-lang/crates.io-index".matches."0.1.9" { inherit profileName; }; - unicode_bidi = rustPackages."registry+https://github.com/rust-lang/crates.io-index".unicode-bidi."0.3.8" { inherit profileName; }; - unicode_normalization = rustPackages."registry+https://github.com/rust-lang/crates.io-index".unicode-normalization."0.1.21" { inherit profileName; }; + unicode_bidi = rustPackages."registry+https://github.com/rust-lang/crates.io-index".unicode-bidi."0.3.15" { inherit profileName; }; + unicode_normalization = rustPackages."registry+https://github.com/rust-lang/crates.io-index".unicode-normalization."0.1.22" { inherit profileName; }; }; }); @@ -1669,11 +2344,11 @@ in ]; }); - "registry+https://github.com/rust-lang/crates.io-index".indexmap."1.9.1" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".indexmap."1.9.3" = overridableMkRustCrate (profileName: rec { name = "indexmap"; - version = "1.9.1"; + version = "1.9.3"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "10a35a97730320ffe8e2d410b5d3b69279b98d2c14bdb8b70ea89ecf7888d41e"; }; + src = fetchCratesIo { inherit name version; sha256 = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99"; }; features = builtins.concatLists [ [ "std" ] ]; @@ -1685,6 +2360,21 @@ in }; }); + "registry+https://github.com/rust-lang/crates.io-index".indexmap."2.2.3" = overridableMkRustCrate (profileName: rec { + name = "indexmap"; + version = "2.2.3"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "233cf39063f058ea2caae4091bf4a3ef70a653afbc026f5c4a4135d114e3c177"; }; + features = builtins.concatLists [ + [ "default" ] + [ "std" ] + ]; + dependencies = { + equivalent = rustPackages."registry+https://github.com/rust-lang/crates.io-index".equivalent."1.0.1" { inherit profileName; }; + hashbrown = rustPackages."registry+https://github.com/rust-lang/crates.io-index".hashbrown."0.14.3" { inherit profileName; }; + }; + }); + "registry+https://github.com/rust-lang/crates.io-index".instant."0.1.12" = overridableMkRustCrate (profileName: rec { name = "instant"; version = "0.1.12"; @@ -1701,89 +2391,89 @@ in registry = "unknown"; src = fetchCrateLocal (workspaceSrc + "/integration-tests"); dependencies = { - anyhow = rustPackages."registry+https://github.com/rust-lang/crates.io-index".anyhow."1.0.64" { inherit profileName; }; - async_trait = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".async-trait."0.1.57" { profileName = "__noProfile"; }; - base64 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".base64."0.13.0" { inherit profileName; }; + anyhow = rustPackages."registry+https://github.com/rust-lang/crates.io-index".anyhow."1.0.79" { inherit profileName; }; + async_trait = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".async-trait."0.1.77" { profileName = "__noProfile"; }; + base64 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".base64."0.13.1" { inherit profileName; }; hex = rustPackages."registry+https://github.com/rust-lang/crates.io-index".hex."0.4.3" { inherit profileName; }; m10_bank_emulator = rustPackages."unknown".m10-bank-emulator."0.1.0" { inherit profileName; }; - m10_sdk = rustPackages."unknown".m10-sdk."0.4.0" { inherit profileName; }; + m10_sdk = rustPackages."unknown".m10-sdk."0.5.0" { inherit profileName; }; rand = rustPackages."registry+https://github.com/rust-lang/crates.io-index".rand."0.8.5" { inherit profileName; }; - reqwest = rustPackages."registry+https://github.com/rust-lang/crates.io-index".reqwest."0.11.11" { inherit profileName; }; + reqwest = rustPackages."registry+https://github.com/rust-lang/crates.io-index".reqwest."0.11.24" { inherit profileName; }; ring = rustPackages."registry+https://github.com/rust-lang/crates.io-index".ring."0.16.20" { inherit profileName; }; - rust_decimal = rustPackages."registry+https://github.com/rust-lang/crates.io-index".rust_decimal."1.26.1" { inherit profileName; }; - serde = rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde."1.0.144" { inherit profileName; }; - serde_json = rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde_json."1.0.85" { inherit profileName; }; - tokio = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tokio."1.25.0" { inherit profileName; }; + rust_decimal = rustPackages."registry+https://github.com/rust-lang/crates.io-index".rust_decimal."1.34.3" { inherit profileName; }; + serde = rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde."1.0.196" { inherit profileName; }; + serde_json = rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde_json."1.0.113" { inherit profileName; }; + tokio = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tokio."1.36.0" { inherit profileName; }; tonic = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tonic."0.5.2" { inherit profileName; }; - uuid = rustPackages."registry+https://github.com/rust-lang/crates.io-index".uuid."0.8.2" { inherit profileName; }; + uuid = rustPackages."registry+https://github.com/rust-lang/crates.io-index".uuid."1.7.0" { inherit profileName; }; }; }); - "registry+https://github.com/rust-lang/crates.io-index".io-lifetimes."1.0.6" = overridableMkRustCrate (profileName: rec { - name = "io-lifetimes"; - version = "1.0.6"; + "registry+https://github.com/rust-lang/crates.io-index".ipnet."2.9.0" = overridableMkRustCrate (profileName: rec { + name = "ipnet"; + version = "2.9.0"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "cfa919a82ea574332e2de6e74b4c36e74d41982b335080fa59d4ef31be20fdf3"; }; + src = fetchCratesIo { inherit name version; sha256 = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3"; }; features = builtins.concatLists [ - [ "close" ] - [ "libc" ] - [ "windows-sys" ] + [ "default" ] + [ "std" ] ]; - dependencies = { - ${ if !hostPlatform.isWindows then "libc" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".libc."0.2.139" { inherit profileName; }; - ${ if hostPlatform.isWindows then "windows_sys" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".windows-sys."0.45.0" { inherit profileName; }; - }; }); - "registry+https://github.com/rust-lang/crates.io-index".ipnet."2.5.0" = overridableMkRustCrate (profileName: rec { - name = "ipnet"; - version = "2.5.0"; + "registry+https://github.com/rust-lang/crates.io-index".itertools."0.10.5" = overridableMkRustCrate (profileName: rec { + name = "itertools"; + version = "0.10.5"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "879d54834c8c76457ef4293a689b2a8c59b076067ad77b15efafbb05f92a592b"; }; + src = fetchCratesIo { inherit name version; sha256 = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473"; }; features = builtins.concatLists [ [ "default" ] + [ "use_alloc" ] + [ "use_std" ] ]; + dependencies = { + either = rustPackages."registry+https://github.com/rust-lang/crates.io-index".either."1.10.0" { inherit profileName; }; + }; }); - "registry+https://github.com/rust-lang/crates.io-index".itertools."0.10.3" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".itertools."0.12.1" = overridableMkRustCrate (profileName: rec { name = "itertools"; - version = "0.10.3"; + version = "0.12.1"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "a9a9d19fa1e79b6215ff29b9d6880b706147f16e9b1dbb1e4e5947b5b02bc5e3"; }; + src = fetchCratesIo { inherit name version; sha256 = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569"; }; features = builtins.concatLists [ [ "default" ] [ "use_alloc" ] [ "use_std" ] ]; dependencies = { - either = rustPackages."registry+https://github.com/rust-lang/crates.io-index".either."1.8.0" { inherit profileName; }; + either = rustPackages."registry+https://github.com/rust-lang/crates.io-index".either."1.10.0" { inherit profileName; }; }; }); - "registry+https://github.com/rust-lang/crates.io-index".itoa."1.0.3" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".itoa."1.0.10" = overridableMkRustCrate (profileName: rec { name = "itoa"; - version = "1.0.3"; + version = "1.0.10"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "6c8af84674fe1f223a982c933a0ee1086ac4d4052aa0fb8060c12c6ad838e754"; }; + src = fetchCratesIo { inherit name version; sha256 = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c"; }; }); - "registry+https://github.com/rust-lang/crates.io-index".jobserver."0.1.24" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".jobserver."0.1.28" = overridableMkRustCrate (profileName: rec { name = "jobserver"; - version = "0.1.24"; + version = "0.1.28"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "af25a77299a7f711a01975c35a6a424eb6862092cc2d6c72c4ed6cbc56dfc1fa"; }; + src = fetchCratesIo { inherit name version; sha256 = "ab46a6e9526ddef3ae7f787c06f0f2600639ba80ea3eade3d8e670a2230f51d6"; }; dependencies = { - ${ if hostPlatform.isUnix then "libc" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".libc."0.2.139" { inherit profileName; }; + ${ if hostPlatform.isUnix then "libc" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".libc."0.2.153" { inherit profileName; }; }; }); - "registry+https://github.com/rust-lang/crates.io-index".js-sys."0.3.59" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".js-sys."0.3.68" = overridableMkRustCrate (profileName: rec { name = "js-sys"; - version = "0.3.59"; + version = "0.3.68"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "258451ab10b34f8af53416d1fdab72c22e805f0c92a1136d59470ec0b11138b2"; }; + src = fetchCratesIo { inherit name version; sha256 = "406cda4b368d531c842222cf9d2600a9a4acce8d29423695379c6868a143a9ee"; }; dependencies = { - wasm_bindgen = rustPackages."registry+https://github.com/rust-lang/crates.io-index".wasm-bindgen."0.2.82" { inherit profileName; }; + wasm_bindgen = rustPackages."registry+https://github.com/rust-lang/crates.io-index".wasm-bindgen."0.2.91" { inherit profileName; }; }; }); @@ -1819,16 +2509,16 @@ in arrayvec = rustPackages."registry+https://github.com/rust-lang/crates.io-index".arrayvec."0.5.2" { inherit profileName; }; bitflags = rustPackages."registry+https://github.com/rust-lang/crates.io-index".bitflags."1.3.2" { inherit profileName; }; cfg_if = rustPackages."registry+https://github.com/rust-lang/crates.io-index".cfg-if."1.0.0" { inherit profileName; }; - ryu = rustPackages."registry+https://github.com/rust-lang/crates.io-index".ryu."1.0.11" { inherit profileName; }; + ryu = rustPackages."registry+https://github.com/rust-lang/crates.io-index".ryu."1.0.16" { inherit profileName; }; static_assertions = rustPackages."registry+https://github.com/rust-lang/crates.io-index".static_assertions."1.1.0" { inherit profileName; }; }; }); - "registry+https://github.com/rust-lang/crates.io-index".libc."0.2.139" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".libc."0.2.153" = overridableMkRustCrate (profileName: rec { name = "libc"; - version = "0.2.139"; + version = "0.2.153"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "201de327520df007757c1f0adce6e827fe8562fbc28bfd9c15571c66ca1f5f79"; }; + src = fetchCratesIo { inherit name version; sha256 = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd"; }; features = builtins.concatLists [ [ "default" ] [ "extra_traits" ] @@ -1836,6 +2526,21 @@ in ]; }); + "registry+https://github.com/rust-lang/crates.io-index".libredox."0.0.1" = overridableMkRustCrate (profileName: rec { + name = "libredox"; + version = "0.0.1"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "85c833ca1e66078851dba29046874e38f08b2c883700aa29a03ddd3b23814ee8"; }; + features = builtins.concatLists [ + [ "call" ] + ]; + dependencies = { + bitflags = rustPackages."registry+https://github.com/rust-lang/crates.io-index".bitflags."2.4.2" { inherit profileName; }; + libc = rustPackages."registry+https://github.com/rust-lang/crates.io-index".libc."0.2.153" { inherit profileName; }; + syscall = rustPackages."registry+https://github.com/rust-lang/crates.io-index".redox_syscall."0.4.1" { inherit profileName; }; + }; + }); + "registry+https://github.com/rust-lang/crates.io-index".linked-hash-map."0.5.6" = overridableMkRustCrate (profileName: rec { name = "linked-hash-map"; version = "0.5.6"; @@ -1843,12 +2548,13 @@ in src = fetchCratesIo { inherit name version; sha256 = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f"; }; }); - "registry+https://github.com/rust-lang/crates.io-index".linux-raw-sys."0.1.4" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".linux-raw-sys."0.4.13" = overridableMkRustCrate (profileName: rec { name = "linux-raw-sys"; - version = "0.1.4"; + version = "0.4.13"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "f051f77a7c8e6957c0696eac88f26b0117e54f52d3fc682ab19397a8812846a4"; }; + src = fetchCratesIo { inherit name version; sha256 = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c"; }; features = builtins.concatLists [ + [ "elf" ] [ "errno" ] [ "general" ] [ "ioctl" ] @@ -1856,47 +2562,47 @@ in ]; }); - "registry+https://github.com/rust-lang/crates.io-index".local-channel."0.1.3" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".local-channel."0.1.5" = overridableMkRustCrate (profileName: rec { name = "local-channel"; - version = "0.1.3"; + version = "0.1.5"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "7f303ec0e94c6c54447f84f3b0ef7af769858a9c4ef56ef2a986d3dcd4c3fc9c"; }; + src = fetchCratesIo { inherit name version; sha256 = "b6cbc85e69b8df4b8bb8b89ec634e7189099cea8927a276b7384ce5488e53ec8"; }; dependencies = { - futures_core = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-core."0.3.24" { inherit profileName; }; - futures_sink = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-sink."0.3.24" { inherit profileName; }; - futures_util = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-util."0.3.24" { inherit profileName; }; - local_waker = rustPackages."registry+https://github.com/rust-lang/crates.io-index".local-waker."0.1.3" { inherit profileName; }; + futures_core = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-core."0.3.30" { inherit profileName; }; + futures_sink = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-sink."0.3.30" { inherit profileName; }; + local_waker = rustPackages."registry+https://github.com/rust-lang/crates.io-index".local-waker."0.1.4" { inherit profileName; }; }; }); - "registry+https://github.com/rust-lang/crates.io-index".local-waker."0.1.3" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".local-waker."0.1.4" = overridableMkRustCrate (profileName: rec { name = "local-waker"; - version = "0.1.3"; + version = "0.1.4"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "e34f76eb3611940e0e7d53a9aaa4e6a3151f69541a282fd0dad5571420c53ff1"; }; + src = fetchCratesIo { inherit name version; sha256 = "4d873d7c67ce09b42110d801813efbc9364414e356be9935700d368351657487"; }; }); - "registry+https://github.com/rust-lang/crates.io-index".lock_api."0.4.8" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".lock_api."0.4.11" = overridableMkRustCrate (profileName: rec { name = "lock_api"; - version = "0.4.8"; + version = "0.4.11"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "9f80bf5aacaf25cbfc8210d1cfb718f2bf3b11c4c54e5afe36c236853a8ec390"; }; + src = fetchCratesIo { inherit name version; sha256 = "3c168f8615b12bc01f9c17e2eb0cc07dcae1940121185446edc3744920e8ef45"; }; + features = builtins.concatLists [ + [ "atomic_usize" ] + [ "default" ] + ]; dependencies = { - scopeguard = rustPackages."registry+https://github.com/rust-lang/crates.io-index".scopeguard."1.1.0" { inherit profileName; }; + scopeguard = rustPackages."registry+https://github.com/rust-lang/crates.io-index".scopeguard."1.2.0" { inherit profileName; }; }; buildDependencies = { autocfg = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".autocfg."1.1.0" { profileName = "__noProfile"; }; }; }); - "registry+https://github.com/rust-lang/crates.io-index".log."0.4.17" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".log."0.4.20" = overridableMkRustCrate (profileName: rec { name = "log"; - version = "0.4.17"; + version = "0.4.20"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e"; }; - dependencies = { - cfg_if = rustPackages."registry+https://github.com/rust-lang/crates.io-index".cfg-if."1.0.0" { inherit profileName; }; - }; + src = fetchCratesIo { inherit name version; sha256 = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f"; }; }); "unknown".m10-bank-emulator."0.1.0" = overridableMkRustCrate (profileName: rec { @@ -1905,41 +2611,41 @@ in registry = "unknown"; src = fetchCrateLocal workspaceSrc; dependencies = { - actix_multipart = rustPackages."registry+https://github.com/rust-lang/crates.io-index".actix-multipart."0.4.0" { inherit profileName; }; - actix_web = rustPackages."registry+https://github.com/rust-lang/crates.io-index".actix-web."4.1.0" { inherit profileName; }; - async_trait = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".async-trait."0.1.57" { profileName = "__noProfile"; }; - base64 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".base64."0.13.0" { inherit profileName; }; + actix_multipart = rustPackages."registry+https://github.com/rust-lang/crates.io-index".actix-multipart."0.6.1" { inherit profileName; }; + actix_web = rustPackages."registry+https://github.com/rust-lang/crates.io-index".actix-web."4.5.1" { inherit profileName; }; + async_trait = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".async-trait."0.1.77" { profileName = "__noProfile"; }; + base64 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".base64."0.13.1" { inherit profileName; }; biscuit = rustPackages."registry+https://github.com/rust-lang/crates.io-index".biscuit."0.5.0" { inherit profileName; }; - chrono = rustPackages."registry+https://github.com/rust-lang/crates.io-index".chrono."0.4.22" { inherit profileName; }; + chrono = rustPackages."registry+https://github.com/rust-lang/crates.io-index".chrono."0.4.34" { inherit profileName; }; config = rustPackages."registry+https://github.com/rust-lang/crates.io-index".config."0.11.0" { inherit profileName; }; - enumflags2 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".enumflags2."0.7.5" { inherit profileName; }; - eyre = rustPackages."registry+https://github.com/rust-lang/crates.io-index".eyre."0.6.8" { inherit profileName; }; - flume = rustPackages."registry+https://github.com/rust-lang/crates.io-index".flume."0.10.14" { inherit profileName; }; - futures_util = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-util."0.3.24" { inherit profileName; }; + enumflags2 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".enumflags2."0.7.9" { inherit profileName; }; + eyre = rustPackages."registry+https://github.com/rust-lang/crates.io-index".eyre."0.6.12" { inherit profileName; }; + flume = rustPackages."registry+https://github.com/rust-lang/crates.io-index".flume."0.11.0" { inherit profileName; }; + futures_util = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-util."0.3.30" { inherit profileName; }; hex = rustPackages."registry+https://github.com/rust-lang/crates.io-index".hex."0.4.3" { inherit profileName; }; - hyper = rustPackages."registry+https://github.com/rust-lang/crates.io-index".hyper."0.14.20" { inherit profileName; }; + hyper = rustPackages."registry+https://github.com/rust-lang/crates.io-index".hyper."0.14.28" { inherit profileName; }; m10_bank_emulator_protos = rustPackages."unknown".m10-bank-emulator-protos."0.1.0" { inherit profileName; }; m10_rds_pool = rustPackages."unknown".m10-rds-pool."0.1.0" { inherit profileName; }; - m10_sdk = rustPackages."unknown".m10-sdk."0.4.0" { inherit profileName; }; + m10_sdk = rustPackages."unknown".m10-sdk."0.5.0" { inherit profileName; }; oneline_eyre = rustPackages."registry+https://github.com/rust-lang/crates.io-index".oneline-eyre."0.1.0" { inherit profileName; }; pala_types = rustPackages."unknown".pala-types."0.1.0" { inherit profileName; }; prost = rustPackages."registry+https://github.com/rust-lang/crates.io-index".prost."0.8.0" { inherit profileName; }; prost_types = rustPackages."registry+https://github.com/rust-lang/crates.io-index".prost-types."0.8.0" { inherit profileName; }; rand = rustPackages."registry+https://github.com/rust-lang/crates.io-index".rand."0.8.5" { inherit profileName; }; - reqwest = rustPackages."registry+https://github.com/rust-lang/crates.io-index".reqwest."0.11.11" { inherit profileName; }; - rust_decimal = rustPackages."registry+https://github.com/rust-lang/crates.io-index".rust_decimal."1.26.1" { inherit profileName; }; - serde = rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde."1.0.144" { inherit profileName; }; - serde_json = rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde_json."1.0.85" { inherit profileName; }; + reqwest = rustPackages."registry+https://github.com/rust-lang/crates.io-index".reqwest."0.11.24" { inherit profileName; }; + rust_decimal = rustPackages."registry+https://github.com/rust-lang/crates.io-index".rust_decimal."1.34.3" { inherit profileName; }; + serde = rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde."1.0.196" { inherit profileName; }; + serde_json = rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde_json."1.0.113" { inherit profileName; }; serde_with = rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde_with."1.14.0" { inherit profileName; }; - smol_str = rustPackages."registry+https://github.com/rust-lang/crates.io-index".smol_str."0.1.23" { inherit profileName; }; - sqlx = rustPackages."registry+https://github.com/rust-lang/crates.io-index".sqlx."0.5.13" { inherit profileName; }; - tokio = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tokio."1.25.0" { inherit profileName; }; + smol_str = rustPackages."registry+https://github.com/rust-lang/crates.io-index".smol_str."0.1.24" { inherit profileName; }; + sqlx = rustPackages."registry+https://github.com/rust-lang/crates.io-index".sqlx."0.6.3" { inherit profileName; }; + tokio = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tokio."1.36.0" { inherit profileName; }; tonic = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tonic."0.5.2" { inherit profileName; }; - tracing = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tracing."0.1.36" { inherit profileName; }; - tracing_actix_web = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tracing-actix-web."0.6.0" { inherit profileName; }; - tracing_error = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tracing-error."0.1.2" { inherit profileName; }; - tracing_subscriber = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tracing-subscriber."0.2.25" { inherit profileName; }; - uuid = rustPackages."registry+https://github.com/rust-lang/crates.io-index".uuid."0.8.2" { inherit profileName; }; + tracing = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tracing."0.1.40" { inherit profileName; }; + tracing_actix_web = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tracing-actix-web."0.6.2" { inherit profileName; }; + tracing_error = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tracing-error."0.2.0" { inherit profileName; }; + tracing_subscriber = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tracing-subscriber."0.3.18" { inherit profileName; }; + uuid = rustPackages."registry+https://github.com/rust-lang/crates.io-index".uuid."1.7.0" { inherit profileName; }; }; }); @@ -1957,7 +2663,7 @@ in dependencies = { prost = rustPackages."registry+https://github.com/rust-lang/crates.io-index".prost."0.8.0" { inherit profileName; }; prost_types = rustPackages."registry+https://github.com/rust-lang/crates.io-index".prost-types."0.8.0" { inherit profileName; }; - thiserror = rustPackages."registry+https://github.com/rust-lang/crates.io-index".thiserror."1.0.34" { inherit profileName; }; + thiserror = rustPackages."registry+https://github.com/rust-lang/crates.io-index".thiserror."1.0.57" { inherit profileName; }; tonic = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tonic."0.5.2" { inherit profileName; }; }; buildDependencies = { @@ -1978,13 +2684,13 @@ in [ "tonic" ] ]; dependencies = { - bytes = rustPackages."registry+https://github.com/rust-lang/crates.io-index".bytes."1.2.1" { inherit profileName; }; + bytes = rustPackages."registry+https://github.com/rust-lang/crates.io-index".bytes."1.5.0" { inherit profileName; }; hex = rustPackages."registry+https://github.com/rust-lang/crates.io-index".hex."0.4.3" { inherit profileName; }; - once_cell = rustPackages."registry+https://github.com/rust-lang/crates.io-index".once_cell."1.14.0" { inherit profileName; }; + once_cell = rustPackages."registry+https://github.com/rust-lang/crates.io-index".once_cell."1.19.0" { inherit profileName; }; prost = rustPackages."registry+https://github.com/rust-lang/crates.io-index".prost."0.8.0" { inherit profileName; }; prost_types = rustPackages."registry+https://github.com/rust-lang/crates.io-index".prost-types."0.8.0" { inherit profileName; }; ring = rustPackages."registry+https://github.com/rust-lang/crates.io-index".ring."0.16.20" { inherit profileName; }; - serde = rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde."1.0.144" { inherit profileName; }; + serde = rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde."1.0.196" { inherit profileName; }; serde_with = rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde_with."1.14.0" { inherit profileName; }; tonic = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tonic."0.5.2" { inherit profileName; }; }; @@ -2000,23 +2706,27 @@ in registry = "unknown"; src = fetchCrateLocal (workspaceSrc + "/../../shared/rust/rds-pool"); dependencies = { - async_trait = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".async-trait."0.1.57" { profileName = "__noProfile"; }; + async_trait = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".async-trait."0.1.77" { profileName = "__noProfile"; }; + aws_config = rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-config."1.1.5" { inherit profileName; }; + aws_credential_types = rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-credential-types."1.1.5" { inherit profileName; }; + aws_sigv4 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-sigv4."1.1.5" { inherit profileName; }; bb8 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".bb8."0.7.1" { inherit profileName; }; - percent_encoding = rustPackages."registry+https://github.com/rust-lang/crates.io-index".percent-encoding."2.1.0" { inherit profileName; }; - rusoto_credential = rustPackages."registry+https://github.com/rust-lang/crates.io-index".rusoto_credential."0.47.0" { inherit profileName; }; - rusoto_signature = rustPackages."registry+https://github.com/rust-lang/crates.io-index".rusoto_signature."0.47.0" { inherit profileName; }; - sqlx_core = rustPackages."registry+https://github.com/rust-lang/crates.io-index".sqlx-core."0.5.13" { inherit profileName; }; - url = rustPackages."registry+https://github.com/rust-lang/crates.io-index".url."2.2.2" { inherit profileName; }; + http = rustPackages."registry+https://github.com/rust-lang/crates.io-index".http."1.0.0" { inherit profileName; }; + percent_encoding = rustPackages."registry+https://github.com/rust-lang/crates.io-index".percent-encoding."2.3.1" { inherit profileName; }; + reqwest = rustPackages."registry+https://github.com/rust-lang/crates.io-index".reqwest."0.11.24" { inherit profileName; }; + sqlx_core = rustPackages."registry+https://github.com/rust-lang/crates.io-index".sqlx-core."0.6.3" { inherit profileName; }; + url = rustPackages."registry+https://github.com/rust-lang/crates.io-index".url."2.5.0" { inherit profileName; }; }; }); - "unknown".m10-sdk."0.4.0" = overridableMkRustCrate (profileName: rec { + "unknown".m10-sdk."0.5.0" = overridableMkRustCrate (profileName: rec { name = "m10-sdk"; - version = "0.4.0"; + version = "0.5.0"; registry = "unknown"; src = fetchCrateLocal (workspaceSrc + "/../../shared/rust/sdk"); features = builtins.concatLists [ [ "account" ] + [ "async-trait" ] [ "base64" ] [ "client" ] [ "collections" ] @@ -2035,28 +2745,35 @@ in [ "serde_yaml" ] [ "service" ] [ "thiserror" ] + [ "tokio" ] + [ "tokio-stream" ] + [ "tokio-tungstenite" ] [ "tonic" ] ]; dependencies = { - base64 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".base64."0.13.0" { inherit profileName; }; - bytes = rustPackages."registry+https://github.com/rust-lang/crates.io-index".bytes."1.2.1" { inherit profileName; }; - fastrand = rustPackages."registry+https://github.com/rust-lang/crates.io-index".fastrand."1.8.0" { inherit profileName; }; - futures_core = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-core."0.3.24" { inherit profileName; }; - futures_util = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-util."0.3.24" { inherit profileName; }; + async_trait = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".async-trait."0.1.77" { profileName = "__noProfile"; }; + base64 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".base64."0.13.1" { inherit profileName; }; + bytes = rustPackages."registry+https://github.com/rust-lang/crates.io-index".bytes."1.5.0" { inherit profileName; }; + fastrand = rustPackages."registry+https://github.com/rust-lang/crates.io-index".fastrand."1.9.0" { inherit profileName; }; + futures_core = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-core."0.3.30" { inherit profileName; }; + futures_util = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-util."0.3.30" { inherit profileName; }; hex = rustPackages."registry+https://github.com/rust-lang/crates.io-index".hex."0.4.3" { inherit profileName; }; m10_protos = rustPackages."unknown".m10-protos."0.5.0" { inherit profileName; }; m10_signing = rustPackages."unknown".m10-signing."0.4.0" { inherit profileName; }; parse_display = rustPackages."registry+https://github.com/rust-lang/crates.io-index".parse-display."0.5.5" { inherit profileName; }; - reqwest = rustPackages."registry+https://github.com/rust-lang/crates.io-index".reqwest."0.11.11" { inherit profileName; }; + reqwest = rustPackages."registry+https://github.com/rust-lang/crates.io-index".reqwest."0.11.24" { inherit profileName; }; ring = rustPackages."registry+https://github.com/rust-lang/crates.io-index".ring."0.16.20" { inherit profileName; }; - ron = rustPackages."registry+https://github.com/rust-lang/crates.io-index".ron."0.8.0" { inherit profileName; }; - serde = rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde."1.0.144" { inherit profileName; }; - serde_json = rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde_json."1.0.85" { inherit profileName; }; + ron = rustPackages."registry+https://github.com/rust-lang/crates.io-index".ron."0.8.1" { inherit profileName; }; + serde = rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde."1.0.196" { inherit profileName; }; + serde_json = rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde_json."1.0.113" { inherit profileName; }; serde_with = rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde_with."1.14.0" { inherit profileName; }; serde_yaml = rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde_yaml."0.8.26" { inherit profileName; }; - thiserror = rustPackages."registry+https://github.com/rust-lang/crates.io-index".thiserror."1.0.34" { inherit profileName; }; + thiserror = rustPackages."registry+https://github.com/rust-lang/crates.io-index".thiserror."1.0.57" { inherit profileName; }; + tokio = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tokio."1.36.0" { inherit profileName; }; + tokio_stream = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tokio-stream."0.1.14" { inherit profileName; }; + tokio_tungstenite = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tokio-tungstenite."0.21.0" { inherit profileName; }; tonic = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tonic."0.5.2" { inherit profileName; }; - uuid = rustPackages."registry+https://github.com/rust-lang/crates.io-index".uuid."0.8.2" { inherit profileName; }; + uuid = rustPackages."registry+https://github.com/rust-lang/crates.io-index".uuid."1.7.0" { inherit profileName; }; }; }); @@ -2066,75 +2783,54 @@ in registry = "unknown"; src = fetchCrateLocal (workspaceSrc + "/../../shared/rust/signing"); dependencies = { - async_trait = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".async-trait."0.1.57" { profileName = "__noProfile"; }; - base64 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".base64."0.13.0" { inherit profileName; }; + async_trait = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".async-trait."0.1.77" { profileName = "__noProfile"; }; + base64 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".base64."0.13.1" { inherit profileName; }; m10_protos = rustPackages."unknown".m10-protos."0.5.0" { inherit profileName; }; ring = rustPackages."registry+https://github.com/rust-lang/crates.io-index".ring."0.16.20" { inherit profileName; }; - serde = rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde."1.0.144" { inherit profileName; }; - thiserror = rustPackages."registry+https://github.com/rust-lang/crates.io-index".thiserror."1.0.34" { inherit profileName; }; + serde = rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde."1.0.196" { inherit profileName; }; + thiserror = rustPackages."registry+https://github.com/rust-lang/crates.io-index".thiserror."1.0.57" { inherit profileName; }; }; }); - "registry+https://github.com/rust-lang/crates.io-index".matchers."0.0.1" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".matchers."0.1.0" = overridableMkRustCrate (profileName: rec { name = "matchers"; - version = "0.0.1"; + version = "0.1.0"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "f099785f7595cc4b4553a174ce30dd7589ef93391ff414dbb67f62392b9e0ce1"; }; + src = fetchCratesIo { inherit name version; sha256 = "8263075bb86c5a1b1427b5ae862e8889656f126e9f77c484496e8b47cf5c5558"; }; dependencies = { regex_automata = rustPackages."registry+https://github.com/rust-lang/crates.io-index".regex-automata."0.1.10" { inherit profileName; }; }; }); - "registry+https://github.com/rust-lang/crates.io-index".matches."0.1.9" = overridableMkRustCrate (profileName: rec { - name = "matches"; - version = "0.1.9"; - registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "a3e378b66a060d48947b590737b30a1be76706c8dd7b8ba0f2fe3989c68a853f"; }; - }); - - "registry+https://github.com/rust-lang/crates.io-index".md-5."0.9.1" = overridableMkRustCrate (profileName: rec { - name = "md-5"; - version = "0.9.1"; - registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "7b5a279bb9607f9f53c22d496eade00d138d1bdcccd07d74650387cf94942a15"; }; - features = builtins.concatLists [ - [ "default" ] - [ "std" ] - ]; - dependencies = { - block_buffer = rustPackages."registry+https://github.com/rust-lang/crates.io-index".block-buffer."0.9.0" { inherit profileName; }; - digest = rustPackages."registry+https://github.com/rust-lang/crates.io-index".digest."0.9.0" { inherit profileName; }; - opaque_debug = rustPackages."registry+https://github.com/rust-lang/crates.io-index".opaque-debug."0.3.0" { inherit profileName; }; - }; - }); - - "registry+https://github.com/rust-lang/crates.io-index".md-5."0.10.4" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".md-5."0.10.6" = overridableMkRustCrate (profileName: rec { name = "md-5"; - version = "0.10.4"; + version = "0.10.6"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "66b48670c893079d3c2ed79114e3644b7004df1c361a4e0ad52e2e6940d07c3d"; }; + src = fetchCratesIo { inherit name version; sha256 = "d89e7ee0cfbedfc4da3340218492196241d89eefb6dab27de5df917a6d2e78cf"; }; dependencies = { - digest = rustPackages."registry+https://github.com/rust-lang/crates.io-index".digest."0.10.3" { inherit profileName; }; + cfg_if = rustPackages."registry+https://github.com/rust-lang/crates.io-index".cfg-if."1.0.0" { inherit profileName; }; + digest = rustPackages."registry+https://github.com/rust-lang/crates.io-index".digest."0.10.7" { inherit profileName; }; }; }); - "registry+https://github.com/rust-lang/crates.io-index".memchr."2.5.0" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".memchr."2.7.1" = overridableMkRustCrate (profileName: rec { name = "memchr"; - version = "2.5.0"; + version = "2.7.1"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d"; }; + src = fetchCratesIo { inherit name version; sha256 = "523dc4f511e55ab87b694dc30d0f820d60906ef06413f93d4d7a1385599cc149"; }; features = builtins.concatLists [ + [ "alloc" ] [ "default" ] [ "std" ] [ "use_std" ] ]; }); - "registry+https://github.com/rust-lang/crates.io-index".mime."0.3.16" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".mime."0.3.17" = overridableMkRustCrate (profileName: rec { name = "mime"; - version = "0.3.16"; + version = "0.3.17"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "2a60c7ce501c71e03a9c9c0d35b861413ae925bd979cc7a4e30d060069aaac8d"; }; + src = fetchCratesIo { inherit name version; sha256 = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a"; }; }); "registry+https://github.com/rust-lang/crates.io-index".mime_guess."2.0.4" = overridableMkRustCrate (profileName: rec { @@ -2143,11 +2839,11 @@ in registry = "registry+https://github.com/rust-lang/crates.io-index"; src = fetchCratesIo { inherit name version; sha256 = "4192263c238a5f0d0c6bfd21f336a313a4ce1c450542449ca191bb657b4642ef"; }; dependencies = { - mime = rustPackages."registry+https://github.com/rust-lang/crates.io-index".mime."0.3.16" { inherit profileName; }; - unicase = rustPackages."registry+https://github.com/rust-lang/crates.io-index".unicase."2.6.0" { inherit profileName; }; + mime = rustPackages."registry+https://github.com/rust-lang/crates.io-index".mime."0.3.17" { inherit profileName; }; + unicase = rustPackages."registry+https://github.com/rust-lang/crates.io-index".unicase."2.7.0" { inherit profileName; }; }; buildDependencies = { - unicase = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".unicase."2.6.0" { profileName = "__noProfile"; }; + unicase = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".unicase."2.7.0" { profileName = "__noProfile"; }; }; }); @@ -2161,32 +2857,36 @@ in ]; }); - "registry+https://github.com/rust-lang/crates.io-index".miniz_oxide."0.5.4" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".miniz_oxide."0.7.2" = overridableMkRustCrate (profileName: rec { name = "miniz_oxide"; - version = "0.5.4"; + version = "0.7.2"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "96590ba8f175222643a85693f33d26e9c8a015f599c216509b1a6894af675d34"; }; + src = fetchCratesIo { inherit name version; sha256 = "9d811f3e15f28568be3407c8e7fdb6514c1cda3cb30683f15b6a1a1dc4ea14a7"; }; + features = builtins.concatLists [ + [ "with-alloc" ] + ]; dependencies = { adler = rustPackages."registry+https://github.com/rust-lang/crates.io-index".adler."1.0.2" { inherit profileName; }; }; }); - "registry+https://github.com/rust-lang/crates.io-index".mio."0.8.4" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".mio."0.8.10" = overridableMkRustCrate (profileName: rec { name = "mio"; - version = "0.8.4"; + version = "0.8.10"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "57ee1c23c7c63b0c9250c339ffdc69255f110b298b901b9f6c82547b7b87caaf"; }; + src = fetchCratesIo { inherit name version; sha256 = "8f3d0b296e374a4e6f3c7b0a1f5a51d748a0d34c85e7dc48fc3fa9a87657fe09"; }; features = builtins.concatLists [ [ "default" ] + [ "log" ] [ "net" ] [ "os-ext" ] [ "os-poll" ] ]; dependencies = { - ${ if hostPlatform.isUnix || hostPlatform.parsed.kernel.name == "wasi" then "libc" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".libc."0.2.139" { inherit profileName; }; - log = rustPackages."registry+https://github.com/rust-lang/crates.io-index".log."0.4.17" { inherit profileName; }; + ${ if hostPlatform.isUnix || hostPlatform.parsed.kernel.name == "wasi" then "libc" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".libc."0.2.153" { inherit profileName; }; + log = rustPackages."registry+https://github.com/rust-lang/crates.io-index".log."0.4.20" { inherit profileName; }; ${ if hostPlatform.parsed.kernel.name == "wasi" then "wasi" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".wasi."0.11.0+wasi-snapshot-preview1" { inherit profileName; }; - ${ if hostPlatform.isWindows then "windows_sys" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".windows-sys."0.36.1" { inherit profileName; }; + ${ if hostPlatform.isWindows then "windows_sys" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".windows-sys."0.48.0" { inherit profileName; }; }; }); @@ -2213,15 +2913,34 @@ in [ "wyrand" ] ]; dependencies = { - getrandom = rustPackages."registry+https://github.com/rust-lang/crates.io-index".getrandom."0.2.7" { inherit profileName; }; + getrandom = rustPackages."registry+https://github.com/rust-lang/crates.io-index".getrandom."0.2.12" { inherit profileName; }; }; }); - "registry+https://github.com/rust-lang/crates.io-index".nom."5.1.2" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".native-tls."0.2.11" = overridableMkRustCrate (profileName: rec { + name = "native-tls"; + version = "0.2.11"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "07226173c32f2926027b63cce4bcd8076c3552846cbe7925f3aaffeac0a3b92e"; }; + dependencies = { + ${ if hostPlatform.parsed.kernel.name == "darwin" || hostPlatform.parsed.kernel.name == "ios" then "lazy_static" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".lazy_static."1.4.0" { inherit profileName; }; + ${ if hostPlatform.parsed.kernel.name == "darwin" || hostPlatform.parsed.kernel.name == "ios" then "libc" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".libc."0.2.153" { inherit profileName; }; + ${ if !(hostPlatform.parsed.kernel.name == "windows" || hostPlatform.parsed.kernel.name == "darwin" || hostPlatform.parsed.kernel.name == "ios") then "log" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".log."0.4.20" { inherit profileName; }; + ${ if !(hostPlatform.parsed.kernel.name == "windows" || hostPlatform.parsed.kernel.name == "darwin" || hostPlatform.parsed.kernel.name == "ios") then "openssl" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".openssl."0.10.63" { inherit profileName; }; + ${ if !(hostPlatform.parsed.kernel.name == "windows" || hostPlatform.parsed.kernel.name == "darwin" || hostPlatform.parsed.kernel.name == "ios") then "openssl_probe" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".openssl-probe."0.1.5" { inherit profileName; }; + ${ if !(hostPlatform.parsed.kernel.name == "windows" || hostPlatform.parsed.kernel.name == "darwin" || hostPlatform.parsed.kernel.name == "ios") then "openssl_sys" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".openssl-sys."0.9.99" { inherit profileName; }; + ${ if hostPlatform.parsed.kernel.name == "windows" then "schannel" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".schannel."0.1.23" { inherit profileName; }; + ${ if hostPlatform.parsed.kernel.name == "darwin" || hostPlatform.parsed.kernel.name == "ios" then "security_framework" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".security-framework."2.9.2" { inherit profileName; }; + ${ if hostPlatform.parsed.kernel.name == "darwin" || hostPlatform.parsed.kernel.name == "ios" then "security_framework_sys" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".security-framework-sys."2.9.1" { inherit profileName; }; + ${ if hostPlatform.parsed.kernel.name == "darwin" || hostPlatform.parsed.kernel.name == "ios" then "tempfile" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tempfile."3.10.0" { inherit profileName; }; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".nom."5.1.3" = overridableMkRustCrate (profileName: rec { name = "nom"; - version = "5.1.2"; + version = "5.1.3"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "ffb4262d26ed83a1c0a33a38fe2bb15797329c85770da05e6b828ddb782627af"; }; + src = fetchCratesIo { inherit name version; sha256 = "08959a387a676302eebf4ddbcbc611da04285579f76f88ee0506c63b1a61dd4b"; }; features = builtins.concatLists [ [ "alloc" ] [ "default" ] @@ -2231,29 +2950,40 @@ in ]; dependencies = { lexical_core = rustPackages."registry+https://github.com/rust-lang/crates.io-index".lexical-core."0.7.6" { inherit profileName; }; - memchr = rustPackages."registry+https://github.com/rust-lang/crates.io-index".memchr."2.5.0" { inherit profileName; }; + memchr = rustPackages."registry+https://github.com/rust-lang/crates.io-index".memchr."2.7.1" { inherit profileName; }; }; buildDependencies = { version_check = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".version_check."0.9.4" { profileName = "__noProfile"; }; }; }); - "registry+https://github.com/rust-lang/crates.io-index".nom."7.1.1" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".nom."7.1.3" = overridableMkRustCrate (profileName: rec { name = "nom"; - version = "7.1.1"; + version = "7.1.3"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "a8903e5a29a317527874d0402f867152a3d21c908bb0b933e416c65e301d4c36"; }; + src = fetchCratesIo { inherit name version; sha256 = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a"; }; features = builtins.concatLists [ [ "alloc" ] [ "default" ] [ "std" ] ]; dependencies = { - memchr = rustPackages."registry+https://github.com/rust-lang/crates.io-index".memchr."2.5.0" { inherit profileName; }; + memchr = rustPackages."registry+https://github.com/rust-lang/crates.io-index".memchr."2.7.1" { inherit profileName; }; minimal_lexical = rustPackages."registry+https://github.com/rust-lang/crates.io-index".minimal-lexical."0.2.1" { inherit profileName; }; }; }); + "registry+https://github.com/rust-lang/crates.io-index".nu-ansi-term."0.46.0" = overridableMkRustCrate (profileName: rec { + name = "nu-ansi-term"; + version = "0.46.0"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84"; }; + dependencies = { + overload = rustPackages."registry+https://github.com/rust-lang/crates.io-index".overload."0.1.1" { inherit profileName; }; + ${ if hostPlatform.parsed.kernel.name == "windows" then "winapi" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".winapi."0.3.9" { inherit profileName; }; + }; + }); + "registry+https://github.com/rust-lang/crates.io-index".num."0.3.1" = overridableMkRustCrate (profileName: rec { name = "num"; version = "0.3.1"; @@ -2267,10 +2997,10 @@ in dependencies = { num_bigint = rustPackages."registry+https://github.com/rust-lang/crates.io-index".num-bigint."0.3.3" { inherit profileName; }; num_complex = rustPackages."registry+https://github.com/rust-lang/crates.io-index".num-complex."0.3.1" { inherit profileName; }; - num_integer = rustPackages."registry+https://github.com/rust-lang/crates.io-index".num-integer."0.1.45" { inherit profileName; }; - num_iter = rustPackages."registry+https://github.com/rust-lang/crates.io-index".num-iter."0.1.43" { inherit profileName; }; + num_integer = rustPackages."registry+https://github.com/rust-lang/crates.io-index".num-integer."0.1.46" { inherit profileName; }; + num_iter = rustPackages."registry+https://github.com/rust-lang/crates.io-index".num-iter."0.1.44" { inherit profileName; }; num_rational = rustPackages."registry+https://github.com/rust-lang/crates.io-index".num-rational."0.3.2" { inherit profileName; }; - num_traits = rustPackages."registry+https://github.com/rust-lang/crates.io-index".num-traits."0.2.15" { inherit profileName; }; + num_traits = rustPackages."registry+https://github.com/rust-lang/crates.io-index".num-traits."0.2.18" { inherit profileName; }; }; }); @@ -2283,8 +3013,8 @@ in [ "std" ] ]; dependencies = { - num_integer = rustPackages."registry+https://github.com/rust-lang/crates.io-index".num-integer."0.1.45" { inherit profileName; }; - num_traits = rustPackages."registry+https://github.com/rust-lang/crates.io-index".num-traits."0.2.15" { inherit profileName; }; + num_integer = rustPackages."registry+https://github.com/rust-lang/crates.io-index".num-integer."0.1.46" { inherit profileName; }; + num_traits = rustPackages."registry+https://github.com/rust-lang/crates.io-index".num-traits."0.2.18" { inherit profileName; }; }; buildDependencies = { autocfg = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".autocfg."1.1.0" { profileName = "__noProfile"; }; @@ -2300,39 +3030,44 @@ in [ "std" ] ]; dependencies = { - num_traits = rustPackages."registry+https://github.com/rust-lang/crates.io-index".num-traits."0.2.15" { inherit profileName; }; + num_traits = rustPackages."registry+https://github.com/rust-lang/crates.io-index".num-traits."0.2.18" { inherit profileName; }; }; }); - "registry+https://github.com/rust-lang/crates.io-index".num-integer."0.1.45" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".num-conv."0.1.0" = overridableMkRustCrate (profileName: rec { + name = "num-conv"; + version = "0.1.0"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9"; }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".num-integer."0.1.46" = overridableMkRustCrate (profileName: rec { name = "num-integer"; - version = "0.1.45"; + version = "0.1.46"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9"; }; + src = fetchCratesIo { inherit name version; sha256 = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f"; }; features = builtins.concatLists [ + [ "default" ] [ "i128" ] [ "std" ] ]; dependencies = { - num_traits = rustPackages."registry+https://github.com/rust-lang/crates.io-index".num-traits."0.2.15" { inherit profileName; }; - }; - buildDependencies = { - autocfg = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".autocfg."1.1.0" { profileName = "__noProfile"; }; + num_traits = rustPackages."registry+https://github.com/rust-lang/crates.io-index".num-traits."0.2.18" { inherit profileName; }; }; }); - "registry+https://github.com/rust-lang/crates.io-index".num-iter."0.1.43" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".num-iter."0.1.44" = overridableMkRustCrate (profileName: rec { name = "num-iter"; - version = "0.1.43"; + version = "0.1.44"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "7d03e6c028c5dc5cac6e2dec0efda81fc887605bb3d884578bb6d6bf7514e252"; }; + src = fetchCratesIo { inherit name version; sha256 = "d869c01cc0c455284163fd0092f1f93835385ccab5a98a0dcc497b2f8bf055a9"; }; features = builtins.concatLists [ [ "i128" ] [ "std" ] ]; dependencies = { - num_integer = rustPackages."registry+https://github.com/rust-lang/crates.io-index".num-integer."0.1.45" { inherit profileName; }; - num_traits = rustPackages."registry+https://github.com/rust-lang/crates.io-index".num-traits."0.2.15" { inherit profileName; }; + num_integer = rustPackages."registry+https://github.com/rust-lang/crates.io-index".num-integer."0.1.46" { inherit profileName; }; + num_traits = rustPackages."registry+https://github.com/rust-lang/crates.io-index".num-traits."0.2.18" { inherit profileName; }; }; buildDependencies = { autocfg = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".autocfg."1.1.0" { profileName = "__noProfile"; }; @@ -2351,19 +3086,19 @@ in ]; dependencies = { num_bigint = rustPackages."registry+https://github.com/rust-lang/crates.io-index".num-bigint."0.3.3" { inherit profileName; }; - num_integer = rustPackages."registry+https://github.com/rust-lang/crates.io-index".num-integer."0.1.45" { inherit profileName; }; - num_traits = rustPackages."registry+https://github.com/rust-lang/crates.io-index".num-traits."0.2.15" { inherit profileName; }; + num_integer = rustPackages."registry+https://github.com/rust-lang/crates.io-index".num-integer."0.1.46" { inherit profileName; }; + num_traits = rustPackages."registry+https://github.com/rust-lang/crates.io-index".num-traits."0.2.18" { inherit profileName; }; }; buildDependencies = { autocfg = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".autocfg."1.1.0" { profileName = "__noProfile"; }; }; }); - "registry+https://github.com/rust-lang/crates.io-index".num-traits."0.2.15" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".num-traits."0.2.18" = overridableMkRustCrate (profileName: rec { name = "num-traits"; - version = "0.2.15"; + version = "0.2.18"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd"; }; + src = fetchCratesIo { inherit name version; sha256 = "da0df0e5185db44f69b44f26786fe401b6c293d1907744beaa7fa62b2e5a517a"; }; features = builtins.concatLists [ [ "default" ] [ "i128" ] @@ -2374,32 +3109,41 @@ in }; }); - "registry+https://github.com/rust-lang/crates.io-index".num_cpus."1.13.1" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".num_cpus."1.16.0" = overridableMkRustCrate (profileName: rec { name = "num_cpus"; - version = "1.13.1"; + version = "1.16.0"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "19e64526ebdee182341572e50e9ad03965aa510cd94427a4549448f285e957a1"; }; + src = fetchCratesIo { inherit name version; sha256 = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43"; }; dependencies = { - ${ if (hostPlatform.parsed.cpu.name == "x86_64" || hostPlatform.parsed.cpu.name == "aarch64") && hostPlatform.parsed.kernel.name == "hermit" then "hermit_abi" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".hermit-abi."0.1.19" { inherit profileName; }; - ${ if !hostPlatform.isWindows then "libc" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".libc."0.2.139" { inherit profileName; }; + ${ if hostPlatform.parsed.kernel.name == "hermit" then "hermit_abi" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".hermit-abi."0.3.6" { inherit profileName; }; + ${ if !hostPlatform.isWindows then "libc" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".libc."0.2.153" { inherit profileName; }; }; }); - "registry+https://github.com/rust-lang/crates.io-index".num_threads."0.1.6" = overridableMkRustCrate (profileName: rec { - name = "num_threads"; - version = "0.1.6"; + "registry+https://github.com/rust-lang/crates.io-index".object."0.32.2" = overridableMkRustCrate (profileName: rec { + name = "object"; + version = "0.32.2"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "2819ce041d2ee131036f4fc9d6ae7ae125a3a40e97ba64d04fe799ad9dabbb44"; }; + src = fetchCratesIo { inherit name version; sha256 = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441"; }; + features = builtins.concatLists [ + [ "archive" ] + [ "coff" ] + [ "elf" ] + [ "macho" ] + [ "pe" ] + [ "read_core" ] + [ "unaligned" ] + ]; dependencies = { - ${ if hostPlatform.parsed.kernel.name == "darwin" || hostPlatform.parsed.kernel.name == "ios" || hostPlatform.parsed.kernel.name == "freebsd" then "libc" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".libc."0.2.139" { inherit profileName; }; + memchr = rustPackages."registry+https://github.com/rust-lang/crates.io-index".memchr."2.7.1" { inherit profileName; }; }; }); - "registry+https://github.com/rust-lang/crates.io-index".once_cell."1.14.0" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".once_cell."1.19.0" = overridableMkRustCrate (profileName: rec { name = "once_cell"; - version = "1.14.0"; + version = "1.19.0"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "2f7254b99e31cad77da24b08ebf628882739a608578bb1bcdfc1f9c21260d7c0"; }; + src = fetchCratesIo { inherit name version; sha256 = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92"; }; features = builtins.concatLists [ [ "alloc" ] [ "default" ] @@ -2414,15 +3158,39 @@ in registry = "registry+https://github.com/rust-lang/crates.io-index"; src = fetchCratesIo { inherit name version; sha256 = "862f17a1e689c0ce8ca158ea48e776c5101c5d14fdfbed3e01c15f89604c3097"; }; dependencies = { - eyre = rustPackages."registry+https://github.com/rust-lang/crates.io-index".eyre."0.6.8" { inherit profileName; }; + eyre = rustPackages."registry+https://github.com/rust-lang/crates.io-index".eyre."0.6.12" { inherit profileName; }; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".openssl."0.10.63" = overridableMkRustCrate (profileName: rec { + name = "openssl"; + version = "0.10.63"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "15c9d69dd87a29568d4d017cfe8ec518706046a05184e5aea92d0af890b803c8"; }; + features = builtins.concatLists [ + [ "default" ] + ]; + dependencies = { + bitflags = rustPackages."registry+https://github.com/rust-lang/crates.io-index".bitflags."2.4.2" { inherit profileName; }; + cfg_if = rustPackages."registry+https://github.com/rust-lang/crates.io-index".cfg-if."1.0.0" { inherit profileName; }; + foreign_types = rustPackages."registry+https://github.com/rust-lang/crates.io-index".foreign-types."0.3.2" { inherit profileName; }; + libc = rustPackages."registry+https://github.com/rust-lang/crates.io-index".libc."0.2.153" { inherit profileName; }; + once_cell = rustPackages."registry+https://github.com/rust-lang/crates.io-index".once_cell."1.19.0" { inherit profileName; }; + openssl_macros = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".openssl-macros."0.1.1" { profileName = "__noProfile"; }; + ffi = rustPackages."registry+https://github.com/rust-lang/crates.io-index".openssl-sys."0.9.99" { inherit profileName; }; }; }); - "registry+https://github.com/rust-lang/crates.io-index".opaque-debug."0.3.0" = overridableMkRustCrate (profileName: rec { - name = "opaque-debug"; - version = "0.3.0"; + "registry+https://github.com/rust-lang/crates.io-index".openssl-macros."0.1.1" = overridableMkRustCrate (profileName: rec { + name = "openssl-macros"; + version = "0.1.1"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5"; }; + src = fetchCratesIo { inherit name version; sha256 = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c"; }; + dependencies = { + proc_macro2 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".proc-macro2."1.0.78" { inherit profileName; }; + quote = rustPackages."registry+https://github.com/rust-lang/crates.io-index".quote."1.0.35" { inherit profileName; }; + syn = rustPackages."registry+https://github.com/rust-lang/crates.io-index".syn."2.0.49" { inherit profileName; }; + }; }); "registry+https://github.com/rust-lang/crates.io-index".openssl-probe."0.1.5" = overridableMkRustCrate (profileName: rec { @@ -2432,19 +3200,48 @@ in src = fetchCratesIo { inherit name version; sha256 = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf"; }; }); + "registry+https://github.com/rust-lang/crates.io-index".openssl-sys."0.9.99" = overridableMkRustCrate (profileName: rec { + name = "openssl-sys"; + version = "0.9.99"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "22e1bf214306098e4832460f797824c05d25aacdf896f64a985fb0fd992454ae"; }; + dependencies = { + libc = rustPackages."registry+https://github.com/rust-lang/crates.io-index".libc."0.2.153" { inherit profileName; }; + }; + buildDependencies = { + cc = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".cc."1.0.83" { profileName = "__noProfile"; }; + pkg_config = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".pkg-config."0.3.30" { profileName = "__noProfile"; }; + vcpkg = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".vcpkg."0.2.15" { profileName = "__noProfile"; }; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".outref."0.5.1" = overridableMkRustCrate (profileName: rec { + name = "outref"; + version = "0.5.1"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "4030760ffd992bef45b0ae3f10ce1aba99e33464c90d14dd7c039884963ddc7a"; }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".overload."0.1.1" = overridableMkRustCrate (profileName: rec { + name = "overload"; + version = "0.1.1"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39"; }; + }); + "unknown".pala-types."0.1.0" = overridableMkRustCrate (profileName: rec { name = "pala-types"; version = "0.1.0"; registry = "unknown"; src = fetchCrateLocal (workspaceSrc + "/../../shared/rust/pala-types"); dependencies = { - base64 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".base64."0.13.0" { inherit profileName; }; + base64 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".base64."0.13.1" { inherit profileName; }; m10_protos = rustPackages."unknown".m10-protos."0.5.0" { inherit profileName; }; - m10_sdk = rustPackages."unknown".m10-sdk."0.4.0" { inherit profileName; }; + m10_sdk = rustPackages."unknown".m10-sdk."0.5.0" { inherit profileName; }; ring = rustPackages."registry+https://github.com/rust-lang/crates.io-index".ring."0.16.20" { inherit profileName; }; - serde = rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde."1.0.144" { inherit profileName; }; + serde = rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde."1.0.196" { inherit profileName; }; serde_with = rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde_with."1.14.0" { inherit profileName; }; - smol_str = rustPackages."registry+https://github.com/rust-lang/crates.io-index".smol_str."0.1.23" { inherit profileName; }; + smol_str = rustPackages."registry+https://github.com/rust-lang/crates.io-index".smol_str."0.1.24" { inherit profileName; }; }; }); @@ -2458,8 +3255,8 @@ in ]; dependencies = { instant = rustPackages."registry+https://github.com/rust-lang/crates.io-index".instant."0.1.12" { inherit profileName; }; - lock_api = rustPackages."registry+https://github.com/rust-lang/crates.io-index".lock_api."0.4.8" { inherit profileName; }; - parking_lot_core = rustPackages."registry+https://github.com/rust-lang/crates.io-index".parking_lot_core."0.8.5" { inherit profileName; }; + lock_api = rustPackages."registry+https://github.com/rust-lang/crates.io-index".lock_api."0.4.11" { inherit profileName; }; + parking_lot_core = rustPackages."registry+https://github.com/rust-lang/crates.io-index".parking_lot_core."0.8.6" { inherit profileName; }; }; }); @@ -2472,37 +3269,37 @@ in [ "default" ] ]; dependencies = { - lock_api = rustPackages."registry+https://github.com/rust-lang/crates.io-index".lock_api."0.4.8" { inherit profileName; }; - parking_lot_core = rustPackages."registry+https://github.com/rust-lang/crates.io-index".parking_lot_core."0.9.3" { inherit profileName; }; + lock_api = rustPackages."registry+https://github.com/rust-lang/crates.io-index".lock_api."0.4.11" { inherit profileName; }; + parking_lot_core = rustPackages."registry+https://github.com/rust-lang/crates.io-index".parking_lot_core."0.9.9" { inherit profileName; }; }; }); - "registry+https://github.com/rust-lang/crates.io-index".parking_lot_core."0.8.5" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".parking_lot_core."0.8.6" = overridableMkRustCrate (profileName: rec { name = "parking_lot_core"; - version = "0.8.5"; + version = "0.8.6"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "d76e8e1493bcac0d2766c42737f34458f1c8c50c0d23bcb24ea953affb273216"; }; + src = fetchCratesIo { inherit name version; sha256 = "60a2cfe6f0ad2bfc16aefa463b497d5c7a5ecd44a23efa72aa342d90177356dc"; }; dependencies = { cfg_if = rustPackages."registry+https://github.com/rust-lang/crates.io-index".cfg-if."1.0.0" { inherit profileName; }; instant = rustPackages."registry+https://github.com/rust-lang/crates.io-index".instant."0.1.12" { inherit profileName; }; - ${ if hostPlatform.isUnix then "libc" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".libc."0.2.139" { inherit profileName; }; + ${ if hostPlatform.isUnix then "libc" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".libc."0.2.153" { inherit profileName; }; ${ if hostPlatform.parsed.kernel.name == "redox" then "syscall" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".redox_syscall."0.2.16" { inherit profileName; }; - smallvec = rustPackages."registry+https://github.com/rust-lang/crates.io-index".smallvec."1.9.0" { inherit profileName; }; + smallvec = rustPackages."registry+https://github.com/rust-lang/crates.io-index".smallvec."1.13.1" { inherit profileName; }; ${ if hostPlatform.isWindows then "winapi" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".winapi."0.3.9" { inherit profileName; }; }; }); - "registry+https://github.com/rust-lang/crates.io-index".parking_lot_core."0.9.3" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".parking_lot_core."0.9.9" = overridableMkRustCrate (profileName: rec { name = "parking_lot_core"; - version = "0.9.3"; + version = "0.9.9"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "09a279cbf25cb0757810394fbc1e359949b59e348145c643a939a525692e6929"; }; + src = fetchCratesIo { inherit name version; sha256 = "4c42a9226546d68acdd9c0a280d17ce19bfe27a46bf68784e4066115788d008e"; }; dependencies = { cfg_if = rustPackages."registry+https://github.com/rust-lang/crates.io-index".cfg-if."1.0.0" { inherit profileName; }; - ${ if hostPlatform.isUnix then "libc" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".libc."0.2.139" { inherit profileName; }; - ${ if hostPlatform.parsed.kernel.name == "redox" then "syscall" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".redox_syscall."0.2.16" { inherit profileName; }; - smallvec = rustPackages."registry+https://github.com/rust-lang/crates.io-index".smallvec."1.9.0" { inherit profileName; }; - ${ if hostPlatform.isWindows then "windows_sys" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".windows-sys."0.36.1" { inherit profileName; }; + ${ if hostPlatform.isUnix then "libc" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".libc."0.2.153" { inherit profileName; }; + ${ if hostPlatform.parsed.kernel.name == "redox" then "syscall" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".redox_syscall."0.4.1" { inherit profileName; }; + smallvec = rustPackages."registry+https://github.com/rust-lang/crates.io-index".smallvec."1.13.1" { inherit profileName; }; + ${ if hostPlatform.isWindows then "windows_targets" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".windows-targets."0.48.5" { inherit profileName; }; }; }); @@ -2518,9 +3315,9 @@ in [ "std" ] ]; dependencies = { - once_cell = rustPackages."registry+https://github.com/rust-lang/crates.io-index".once_cell."1.14.0" { inherit profileName; }; + once_cell = rustPackages."registry+https://github.com/rust-lang/crates.io-index".once_cell."1.19.0" { inherit profileName; }; parse_display_derive = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".parse-display-derive."0.5.5" { profileName = "__noProfile"; }; - regex = rustPackages."registry+https://github.com/rust-lang/crates.io-index".regex."1.6.0" { inherit profileName; }; + regex = rustPackages."registry+https://github.com/rust-lang/crates.io-index".regex."1.10.3" { inherit profileName; }; }; }); @@ -2530,28 +3327,40 @@ in registry = "registry+https://github.com/rust-lang/crates.io-index"; src = fetchCratesIo { inherit name version; sha256 = "007ed61a69cf7d9b95cc5dc18489dbb4f70d4adb0a0c100e2dd46f0be241711a"; }; dependencies = { - once_cell = rustPackages."registry+https://github.com/rust-lang/crates.io-index".once_cell."1.14.0" { inherit profileName; }; - proc_macro2 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".proc-macro2."1.0.43" { inherit profileName; }; - quote = rustPackages."registry+https://github.com/rust-lang/crates.io-index".quote."1.0.21" { inherit profileName; }; - regex = rustPackages."registry+https://github.com/rust-lang/crates.io-index".regex."1.6.0" { inherit profileName; }; - regex_syntax = rustPackages."registry+https://github.com/rust-lang/crates.io-index".regex-syntax."0.6.27" { inherit profileName; }; - structmeta = rustPackages."registry+https://github.com/rust-lang/crates.io-index".structmeta."0.1.5" { inherit profileName; }; - syn = rustPackages."registry+https://github.com/rust-lang/crates.io-index".syn."1.0.99" { inherit profileName; }; + once_cell = rustPackages."registry+https://github.com/rust-lang/crates.io-index".once_cell."1.19.0" { inherit profileName; }; + proc_macro2 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".proc-macro2."1.0.78" { inherit profileName; }; + quote = rustPackages."registry+https://github.com/rust-lang/crates.io-index".quote."1.0.35" { inherit profileName; }; + regex = rustPackages."registry+https://github.com/rust-lang/crates.io-index".regex."1.10.3" { inherit profileName; }; + regex_syntax = rustPackages."registry+https://github.com/rust-lang/crates.io-index".regex-syntax."0.6.29" { inherit profileName; }; + structmeta = rustPackages."registry+https://github.com/rust-lang/crates.io-index".structmeta."0.1.6" { inherit profileName; }; + syn = rustPackages."registry+https://github.com/rust-lang/crates.io-index".syn."1.0.109" { inherit profileName; }; }; }); - "registry+https://github.com/rust-lang/crates.io-index".paste."1.0.9" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".parse-size."1.0.0" = overridableMkRustCrate (profileName: rec { + name = "parse-size"; + version = "1.0.0"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "944553dd59c802559559161f9816429058b869003836120e262e8caec061b7ae"; }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".paste."1.0.14" = overridableMkRustCrate (profileName: rec { name = "paste"; - version = "1.0.9"; + version = "1.0.14"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "b1de2e551fb905ac83f73f7aedf2f0cb4a0da7e35efa24a202a936269f1f18e1"; }; + src = fetchCratesIo { inherit name version; sha256 = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c"; }; }); - "registry+https://github.com/rust-lang/crates.io-index".percent-encoding."2.1.0" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".percent-encoding."2.3.1" = overridableMkRustCrate (profileName: rec { name = "percent-encoding"; - version = "2.1.0"; + version = "2.3.1"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e"; }; + src = fetchCratesIo { inherit name version; sha256 = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e"; }; + features = builtins.concatLists [ + [ "alloc" ] + [ "default" ] + [ "std" ] + ]; }); "registry+https://github.com/rust-lang/crates.io-index".petgraph."0.5.1" = overridableMkRustCrate (profileName: rec { @@ -2561,37 +3370,37 @@ in src = fetchCratesIo { inherit name version; sha256 = "467d164a6de56270bd7c4d070df81d07beace25012d5103ced4e9ff08d6afdb7"; }; dependencies = { fixedbitset = rustPackages."registry+https://github.com/rust-lang/crates.io-index".fixedbitset."0.2.0" { inherit profileName; }; - indexmap = rustPackages."registry+https://github.com/rust-lang/crates.io-index".indexmap."1.9.1" { inherit profileName; }; + indexmap = rustPackages."registry+https://github.com/rust-lang/crates.io-index".indexmap."1.9.3" { inherit profileName; }; }; }); - "registry+https://github.com/rust-lang/crates.io-index".pin-project."1.0.12" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".pin-project."1.1.4" = overridableMkRustCrate (profileName: rec { name = "pin-project"; - version = "1.0.12"; + version = "1.1.4"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "ad29a609b6bcd67fee905812e544992d216af9d755757c05ed2d0e15a74c6ecc"; }; + src = fetchCratesIo { inherit name version; sha256 = "0302c4a0442c456bd56f841aee5c3bfd17967563f6fadc9ceb9f9c23cf3807e0"; }; dependencies = { - pin_project_internal = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".pin-project-internal."1.0.12" { profileName = "__noProfile"; }; + pin_project_internal = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".pin-project-internal."1.1.4" { profileName = "__noProfile"; }; }; }); - "registry+https://github.com/rust-lang/crates.io-index".pin-project-internal."1.0.12" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".pin-project-internal."1.1.4" = overridableMkRustCrate (profileName: rec { name = "pin-project-internal"; - version = "1.0.12"; + version = "1.1.4"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "069bdb1e05adc7a8990dce9cc75370895fbe4e3d58b9b73bf1aee56359344a55"; }; + src = fetchCratesIo { inherit name version; sha256 = "266c042b60c9c76b8d53061e52b2e0d1116abc57cefc8c5cd671619a56ac3690"; }; dependencies = { - proc_macro2 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".proc-macro2."1.0.43" { inherit profileName; }; - quote = rustPackages."registry+https://github.com/rust-lang/crates.io-index".quote."1.0.21" { inherit profileName; }; - syn = rustPackages."registry+https://github.com/rust-lang/crates.io-index".syn."1.0.99" { inherit profileName; }; + proc_macro2 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".proc-macro2."1.0.78" { inherit profileName; }; + quote = rustPackages."registry+https://github.com/rust-lang/crates.io-index".quote."1.0.35" { inherit profileName; }; + syn = rustPackages."registry+https://github.com/rust-lang/crates.io-index".syn."2.0.49" { inherit profileName; }; }; }); - "registry+https://github.com/rust-lang/crates.io-index".pin-project-lite."0.2.9" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".pin-project-lite."0.2.13" = overridableMkRustCrate (profileName: rec { name = "pin-project-lite"; - version = "0.2.9"; + version = "0.2.13"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116"; }; + src = fetchCratesIo { inherit name version; sha256 = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58"; }; }); "registry+https://github.com/rust-lang/crates.io-index".pin-utils."0.1.0" = overridableMkRustCrate (profileName: rec { @@ -2601,28 +3410,81 @@ in src = fetchCratesIo { inherit name version; sha256 = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184"; }; }); - "registry+https://github.com/rust-lang/crates.io-index".ppv-lite86."0.2.16" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".pkg-config."0.3.30" = overridableMkRustCrate (profileName: rec { + name = "pkg-config"; + version = "0.3.30"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec"; }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".powerfmt."0.2.0" = overridableMkRustCrate (profileName: rec { + name = "powerfmt"; + version = "0.2.0"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391"; }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".ppv-lite86."0.2.17" = overridableMkRustCrate (profileName: rec { name = "ppv-lite86"; - version = "0.2.16"; + version = "0.2.17"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "eb9f9e6e233e5c4a35559a617bf40a4ec447db2e84c20b55a6f83167b7e57872"; }; + src = fetchCratesIo { inherit name version; sha256 = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de"; }; features = builtins.concatLists [ [ "simd" ] [ "std" ] ]; }); - "registry+https://github.com/rust-lang/crates.io-index".proc-macro2."1.0.43" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".proc-macro-crate."3.1.0" = overridableMkRustCrate (profileName: rec { + name = "proc-macro-crate"; + version = "3.1.0"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "6d37c51ca738a55da99dc0c4a34860fd675453b8b36209178c2249bb13651284"; }; + dependencies = { + toml_edit = rustPackages."registry+https://github.com/rust-lang/crates.io-index".toml_edit."0.21.1" { inherit profileName; }; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".proc-macro-error."1.0.4" = overridableMkRustCrate (profileName: rec { + name = "proc-macro-error"; + version = "1.0.4"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c"; }; + dependencies = { + proc_macro_error_attr = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".proc-macro-error-attr."1.0.4" { profileName = "__noProfile"; }; + proc_macro2 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".proc-macro2."1.0.78" { inherit profileName; }; + quote = rustPackages."registry+https://github.com/rust-lang/crates.io-index".quote."1.0.35" { inherit profileName; }; + }; + buildDependencies = { + version_check = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".version_check."0.9.4" { profileName = "__noProfile"; }; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".proc-macro-error-attr."1.0.4" = overridableMkRustCrate (profileName: rec { + name = "proc-macro-error-attr"; + version = "1.0.4"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869"; }; + dependencies = { + proc_macro2 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".proc-macro2."1.0.78" { inherit profileName; }; + quote = rustPackages."registry+https://github.com/rust-lang/crates.io-index".quote."1.0.35" { inherit profileName; }; + }; + buildDependencies = { + version_check = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".version_check."0.9.4" { profileName = "__noProfile"; }; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".proc-macro2."1.0.78" = overridableMkRustCrate (profileName: rec { name = "proc-macro2"; - version = "1.0.43"; + version = "1.0.78"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "0a2ca2c61bc9f3d74d2886294ab7b9853abd9c1ad903a3ac7815c58989bb7bab"; }; + src = fetchCratesIo { inherit name version; sha256 = "e2422ad645d89c99f8f3e6b88a9fdeca7fabeac836b1002371c4367c8f984aae"; }; features = builtins.concatLists [ [ "default" ] [ "proc-macro" ] ]; dependencies = { - unicode_ident = rustPackages."registry+https://github.com/rust-lang/crates.io-index".unicode-ident."1.0.3" { inherit profileName; }; + unicode_ident = rustPackages."registry+https://github.com/rust-lang/crates.io-index".unicode-ident."1.0.12" { inherit profileName; }; }; }); @@ -2637,7 +3499,7 @@ in [ "std" ] ]; dependencies = { - bytes = rustPackages."registry+https://github.com/rust-lang/crates.io-index".bytes."1.2.1" { inherit profileName; }; + bytes = rustPackages."registry+https://github.com/rust-lang/crates.io-index".bytes."1.5.0" { inherit profileName; }; prost_derive = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".prost-derive."0.8.0" { profileName = "__noProfile"; }; }; }); @@ -2648,18 +3510,18 @@ in registry = "registry+https://github.com/rust-lang/crates.io-index"; src = fetchCratesIo { inherit name version; sha256 = "355f634b43cdd80724ee7848f95770e7e70eefa6dcf14fea676216573b8fd603"; }; dependencies = { - bytes = rustPackages."registry+https://github.com/rust-lang/crates.io-index".bytes."1.2.1" { inherit profileName; }; + bytes = rustPackages."registry+https://github.com/rust-lang/crates.io-index".bytes."1.5.0" { inherit profileName; }; heck = rustPackages."registry+https://github.com/rust-lang/crates.io-index".heck."0.3.3" { inherit profileName; }; - itertools = rustPackages."registry+https://github.com/rust-lang/crates.io-index".itertools."0.10.3" { inherit profileName; }; - log = rustPackages."registry+https://github.com/rust-lang/crates.io-index".log."0.4.17" { inherit profileName; }; + itertools = rustPackages."registry+https://github.com/rust-lang/crates.io-index".itertools."0.10.5" { inherit profileName; }; + log = rustPackages."registry+https://github.com/rust-lang/crates.io-index".log."0.4.20" { inherit profileName; }; multimap = rustPackages."registry+https://github.com/rust-lang/crates.io-index".multimap."0.8.3" { inherit profileName; }; petgraph = rustPackages."registry+https://github.com/rust-lang/crates.io-index".petgraph."0.5.1" { inherit profileName; }; prost = rustPackages."registry+https://github.com/rust-lang/crates.io-index".prost."0.8.0" { inherit profileName; }; prost_types = rustPackages."registry+https://github.com/rust-lang/crates.io-index".prost-types."0.8.0" { inherit profileName; }; - tempfile = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tempfile."3.4.0" { inherit profileName; }; + tempfile = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tempfile."3.10.0" { inherit profileName; }; }; buildDependencies = { - which = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".which."4.3.0" { profileName = "__noProfile"; }; + which = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".which."4.4.2" { profileName = "__noProfile"; }; }; }); @@ -2669,11 +3531,11 @@ in registry = "registry+https://github.com/rust-lang/crates.io-index"; src = fetchCratesIo { inherit name version; sha256 = "600d2f334aa05acb02a755e217ef1ab6dea4d51b58b7846588b747edec04efba"; }; dependencies = { - anyhow = rustPackages."registry+https://github.com/rust-lang/crates.io-index".anyhow."1.0.64" { inherit profileName; }; - itertools = rustPackages."registry+https://github.com/rust-lang/crates.io-index".itertools."0.10.3" { inherit profileName; }; - proc_macro2 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".proc-macro2."1.0.43" { inherit profileName; }; - quote = rustPackages."registry+https://github.com/rust-lang/crates.io-index".quote."1.0.21" { inherit profileName; }; - syn = rustPackages."registry+https://github.com/rust-lang/crates.io-index".syn."1.0.99" { inherit profileName; }; + anyhow = rustPackages."registry+https://github.com/rust-lang/crates.io-index".anyhow."1.0.79" { inherit profileName; }; + itertools = rustPackages."registry+https://github.com/rust-lang/crates.io-index".itertools."0.10.5" { inherit profileName; }; + proc_macro2 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".proc-macro2."1.0.78" { inherit profileName; }; + quote = rustPackages."registry+https://github.com/rust-lang/crates.io-index".quote."1.0.35" { inherit profileName; }; + syn = rustPackages."registry+https://github.com/rust-lang/crates.io-index".syn."1.0.109" { inherit profileName; }; }; }); @@ -2687,25 +3549,57 @@ in [ "std" ] ]; dependencies = { - bytes = rustPackages."registry+https://github.com/rust-lang/crates.io-index".bytes."1.2.1" { inherit profileName; }; + bytes = rustPackages."registry+https://github.com/rust-lang/crates.io-index".bytes."1.5.0" { inherit profileName; }; prost = rustPackages."registry+https://github.com/rust-lang/crates.io-index".prost."0.8.0" { inherit profileName; }; }; }); - "registry+https://github.com/rust-lang/crates.io-index".quote."1.0.21" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".ptr_meta."0.1.4" = overridableMkRustCrate (profileName: rec { + name = "ptr_meta"; + version = "0.1.4"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "0738ccf7ea06b608c10564b31debd4f5bc5e197fc8bfe088f68ae5ce81e7a4f1"; }; + features = builtins.concatLists [ + [ "std" ] + ]; + dependencies = { + ptr_meta_derive = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".ptr_meta_derive."0.1.4" { profileName = "__noProfile"; }; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".ptr_meta_derive."0.1.4" = overridableMkRustCrate (profileName: rec { + name = "ptr_meta_derive"; + version = "0.1.4"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "16b845dbfca988fa33db069c0e230574d15a3088f147a87b64c7589eb662c9ac"; }; + dependencies = { + proc_macro2 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".proc-macro2."1.0.78" { inherit profileName; }; + quote = rustPackages."registry+https://github.com/rust-lang/crates.io-index".quote."1.0.35" { inherit profileName; }; + syn = rustPackages."registry+https://github.com/rust-lang/crates.io-index".syn."1.0.109" { inherit profileName; }; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".quote."1.0.35" = overridableMkRustCrate (profileName: rec { name = "quote"; - version = "1.0.21"; + version = "1.0.35"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "bbe448f377a7d6961e30f5955f9b8d106c3f5e449d493ee1b125c1d43c2b5179"; }; + src = fetchCratesIo { inherit name version; sha256 = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef"; }; features = builtins.concatLists [ [ "default" ] [ "proc-macro" ] ]; dependencies = { - proc_macro2 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".proc-macro2."1.0.43" { inherit profileName; }; + proc_macro2 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".proc-macro2."1.0.78" { inherit profileName; }; }; }); + "registry+https://github.com/rust-lang/crates.io-index".radium."0.7.0" = overridableMkRustCrate (profileName: rec { + name = "radium"; + version = "0.7.0"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "dc33ff2d4973d518d823d61aa239014831e521c75da58e3df4840d3f47749d09"; }; + }); + "registry+https://github.com/rust-lang/crates.io-index".rand."0.8.5" = overridableMkRustCrate (profileName: rec { name = "rand"; version = "0.8.5"; @@ -2722,9 +3616,9 @@ in [ "std_rng" ] ]; dependencies = { - ${ if hostPlatform.isUnix then "libc" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".libc."0.2.139" { inherit profileName; }; + ${ if hostPlatform.isUnix then "libc" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".libc."0.2.153" { inherit profileName; }; rand_chacha = rustPackages."registry+https://github.com/rust-lang/crates.io-index".rand_chacha."0.3.1" { inherit profileName; }; - rand_core = rustPackages."registry+https://github.com/rust-lang/crates.io-index".rand_core."0.6.3" { inherit profileName; }; + rand_core = rustPackages."registry+https://github.com/rust-lang/crates.io-index".rand_core."0.6.4" { inherit profileName; }; }; }); @@ -2737,23 +3631,23 @@ in [ "std" ] ]; dependencies = { - ppv_lite86 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".ppv-lite86."0.2.16" { inherit profileName; }; - rand_core = rustPackages."registry+https://github.com/rust-lang/crates.io-index".rand_core."0.6.3" { inherit profileName; }; + ppv_lite86 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".ppv-lite86."0.2.17" { inherit profileName; }; + rand_core = rustPackages."registry+https://github.com/rust-lang/crates.io-index".rand_core."0.6.4" { inherit profileName; }; }; }); - "registry+https://github.com/rust-lang/crates.io-index".rand_core."0.6.3" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".rand_core."0.6.4" = overridableMkRustCrate (profileName: rec { name = "rand_core"; - version = "0.6.3"; + version = "0.6.4"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "d34f1408f55294453790c48b2f1ebbb1c5b4b7563eb1f418bcfcfdbb06ebb4e7"; }; + src = fetchCratesIo { inherit name version; sha256 = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c"; }; features = builtins.concatLists [ [ "alloc" ] [ "getrandom" ] [ "std" ] ]; dependencies = { - getrandom = rustPackages."registry+https://github.com/rust-lang/crates.io-index".getrandom."0.2.7" { inherit profileName; }; + getrandom = rustPackages."registry+https://github.com/rust-lang/crates.io-index".getrandom."0.2.12" { inherit profileName; }; }; }); @@ -2767,32 +3661,42 @@ in }; }); - "registry+https://github.com/rust-lang/crates.io-index".redox_users."0.4.3" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".redox_syscall."0.4.1" = overridableMkRustCrate (profileName: rec { + name = "redox_syscall"; + version = "0.4.1"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa"; }; + dependencies = { + bitflags = rustPackages."registry+https://github.com/rust-lang/crates.io-index".bitflags."1.3.2" { inherit profileName; }; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".redox_users."0.4.4" = overridableMkRustCrate (profileName: rec { name = "redox_users"; - version = "0.4.3"; + version = "0.4.4"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b"; }; + src = fetchCratesIo { inherit name version; sha256 = "a18479200779601e498ada4e8c1e1f50e3ee19deb0259c25825a98b5603b2cb4"; }; dependencies = { - getrandom = rustPackages."registry+https://github.com/rust-lang/crates.io-index".getrandom."0.2.7" { inherit profileName; }; - syscall = rustPackages."registry+https://github.com/rust-lang/crates.io-index".redox_syscall."0.2.16" { inherit profileName; }; - thiserror = rustPackages."registry+https://github.com/rust-lang/crates.io-index".thiserror."1.0.34" { inherit profileName; }; + getrandom = rustPackages."registry+https://github.com/rust-lang/crates.io-index".getrandom."0.2.12" { inherit profileName; }; + libredox = rustPackages."registry+https://github.com/rust-lang/crates.io-index".libredox."0.0.1" { inherit profileName; }; + thiserror = rustPackages."registry+https://github.com/rust-lang/crates.io-index".thiserror."1.0.57" { inherit profileName; }; }; }); - "registry+https://github.com/rust-lang/crates.io-index".regex."1.6.0" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".regex."1.10.3" = overridableMkRustCrate (profileName: rec { name = "regex"; - version = "1.6.0"; + version = "1.10.3"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "4c4eb3267174b8c6c2f654116623910a0fef09c4753f8dd83db29c48a0df988b"; }; + src = fetchCratesIo { inherit name version; sha256 = "b62dbe01f0b06f9d8dc7d49e05a0785f153b00b2c227856282f671e0318c9b15"; }; features = builtins.concatLists [ - [ "aho-corasick" ] [ "default" ] - [ "memchr" ] [ "perf" ] + [ "perf-backtrack" ] [ "perf-cache" ] [ "perf-dfa" ] [ "perf-inline" ] [ "perf-literal" ] + [ "perf-onepass" ] [ "std" ] [ "unicode" ] [ "unicode-age" ] @@ -2804,9 +3708,10 @@ in [ "unicode-segment" ] ]; dependencies = { - aho_corasick = rustPackages."registry+https://github.com/rust-lang/crates.io-index".aho-corasick."0.7.19" { inherit profileName; }; - memchr = rustPackages."registry+https://github.com/rust-lang/crates.io-index".memchr."2.5.0" { inherit profileName; }; - regex_syntax = rustPackages."registry+https://github.com/rust-lang/crates.io-index".regex-syntax."0.6.27" { inherit profileName; }; + aho_corasick = rustPackages."registry+https://github.com/rust-lang/crates.io-index".aho-corasick."1.1.2" { inherit profileName; }; + memchr = rustPackages."registry+https://github.com/rust-lang/crates.io-index".memchr."2.7.1" { inherit profileName; }; + regex_automata = rustPackages."registry+https://github.com/rust-lang/crates.io-index".regex-automata."0.4.5" { inherit profileName; }; + regex_syntax = rustPackages."registry+https://github.com/rust-lang/crates.io-index".regex-syntax."0.8.2" { inherit profileName; }; }; }); @@ -2821,17 +3726,84 @@ in [ "std" ] ]; dependencies = { - regex_syntax = rustPackages."registry+https://github.com/rust-lang/crates.io-index".regex-syntax."0.6.27" { inherit profileName; }; + regex_syntax = rustPackages."registry+https://github.com/rust-lang/crates.io-index".regex-syntax."0.6.29" { inherit profileName; }; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".regex-automata."0.4.5" = overridableMkRustCrate (profileName: rec { + name = "regex-automata"; + version = "0.4.5"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "5bb987efffd3c6d0d8f5f89510bb458559eab11e4f869acb20bf845e016259cd"; }; + features = builtins.concatLists [ + [ "alloc" ] + [ "dfa-onepass" ] + [ "hybrid" ] + [ "meta" ] + [ "nfa-backtrack" ] + [ "nfa-pikevm" ] + [ "nfa-thompson" ] + [ "perf-inline" ] + [ "perf-literal" ] + [ "perf-literal-multisubstring" ] + [ "perf-literal-substring" ] + [ "std" ] + [ "syntax" ] + [ "unicode" ] + [ "unicode-age" ] + [ "unicode-bool" ] + [ "unicode-case" ] + [ "unicode-gencat" ] + [ "unicode-perl" ] + [ "unicode-script" ] + [ "unicode-segment" ] + [ "unicode-word-boundary" ] + ]; + dependencies = { + aho_corasick = rustPackages."registry+https://github.com/rust-lang/crates.io-index".aho-corasick."1.1.2" { inherit profileName; }; + memchr = rustPackages."registry+https://github.com/rust-lang/crates.io-index".memchr."2.7.1" { inherit profileName; }; + regex_syntax = rustPackages."registry+https://github.com/rust-lang/crates.io-index".regex-syntax."0.8.2" { inherit profileName; }; }; }); - "registry+https://github.com/rust-lang/crates.io-index".regex-syntax."0.6.27" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".regex-lite."0.1.5" = overridableMkRustCrate (profileName: rec { + name = "regex-lite"; + version = "0.1.5"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "30b661b2f27137bdbc16f00eda72866a92bb28af1753ffbd56744fb6e2e9cd8e"; }; + features = builtins.concatLists [ + [ "default" ] + [ "std" ] + [ "string" ] + ]; + }); + + "registry+https://github.com/rust-lang/crates.io-index".regex-syntax."0.6.29" = overridableMkRustCrate (profileName: rec { + name = "regex-syntax"; + version = "0.6.29"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1"; }; + features = builtins.concatLists [ + [ "default" ] + [ "unicode" ] + [ "unicode-age" ] + [ "unicode-bool" ] + [ "unicode-case" ] + [ "unicode-gencat" ] + [ "unicode-perl" ] + [ "unicode-script" ] + [ "unicode-segment" ] + ]; + }); + + "registry+https://github.com/rust-lang/crates.io-index".regex-syntax."0.8.2" = overridableMkRustCrate (profileName: rec { name = "regex-syntax"; - version = "0.6.27"; + version = "0.8.2"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "a3f87b73ce11b1619a3c6332f45341e0047173771e8b8b73f87bfeefb7b56244"; }; + src = fetchCratesIo { inherit name version; sha256 = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f"; }; features = builtins.concatLists [ [ "default" ] + [ "std" ] [ "unicode" ] [ "unicode-age" ] [ "unicode-bool" ] @@ -2843,59 +3815,87 @@ in ]; }); - "registry+https://github.com/rust-lang/crates.io-index".reqwest."0.11.11" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".rend."0.4.2" = overridableMkRustCrate (profileName: rec { + name = "rend"; + version = "0.4.2"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "71fe3824f5629716b1589be05dacd749f6aa084c87e00e016714a8cdfccc997c"; }; + features = builtins.concatLists [ + [ "bytecheck" ] + [ "std" ] + ]; + dependencies = { + bytecheck = rustPackages."registry+https://github.com/rust-lang/crates.io-index".bytecheck."0.6.12" { inherit profileName; }; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".reqwest."0.11.24" = overridableMkRustCrate (profileName: rec { name = "reqwest"; - version = "0.11.11"; + version = "0.11.24"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "b75aa69a3f06bbcc66ede33af2af253c6f7a86b1ca0033f60c580a27074fbf92"; }; + src = fetchCratesIo { inherit name version; sha256 = "c6920094eb85afde5e4a138be3f2de8bbdf28000f0029e72c45025a56b042251"; }; features = builtins.concatLists [ [ "__rustls" ] [ "__tls" ] + [ "default" ] + [ "default-tls" ] [ "hyper-rustls" ] + [ "hyper-tls" ] [ "json" ] [ "mime_guess" ] [ "multipart" ] + [ "native-tls-crate" ] [ "rustls" ] - [ "rustls-pemfile" ] [ "rustls-tls" ] [ "rustls-tls-webpki-roots" ] [ "serde_json" ] + [ "stream" ] + [ "tokio-native-tls" ] [ "tokio-rustls" ] + [ "tokio-util" ] + [ "wasm-streams" ] [ "webpki-roots" ] ]; dependencies = { - base64 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".base64."0.13.0" { inherit profileName; }; - bytes = rustPackages."registry+https://github.com/rust-lang/crates.io-index".bytes."1.2.1" { inherit profileName; }; - ${ if !(hostPlatform.parsed.cpu.name == "wasm32") then "encoding_rs" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".encoding_rs."0.8.31" { inherit profileName; }; - ${ if !(hostPlatform.parsed.cpu.name == "wasm32") then "futures_core" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-core."0.3.24" { inherit profileName; }; - ${ if !(hostPlatform.parsed.cpu.name == "wasm32") then "futures_util" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-util."0.3.24" { inherit profileName; }; - ${ if !(hostPlatform.parsed.cpu.name == "wasm32") then "h2" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".h2."0.3.14" { inherit profileName; }; - http = rustPackages."registry+https://github.com/rust-lang/crates.io-index".http."0.2.8" { inherit profileName; }; - ${ if !(hostPlatform.parsed.cpu.name == "wasm32") then "http_body" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".http-body."0.4.5" { inherit profileName; }; - ${ if !(hostPlatform.parsed.cpu.name == "wasm32") then "hyper" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".hyper."0.14.20" { inherit profileName; }; - ${ if !(hostPlatform.parsed.cpu.name == "wasm32") then "hyper_rustls" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".hyper-rustls."0.23.0" { inherit profileName; }; - ${ if !(hostPlatform.parsed.cpu.name == "wasm32") then "ipnet" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".ipnet."2.5.0" { inherit profileName; }; - ${ if hostPlatform.parsed.cpu.name == "wasm32" then "js_sys" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".js-sys."0.3.59" { inherit profileName; }; - ${ if !(hostPlatform.parsed.cpu.name == "wasm32") then "lazy_static" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".lazy_static."1.4.0" { inherit profileName; }; - ${ if !(hostPlatform.parsed.cpu.name == "wasm32") then "log" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".log."0.4.17" { inherit profileName; }; - ${ if !(hostPlatform.parsed.cpu.name == "wasm32") then "mime" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".mime."0.3.16" { inherit profileName; }; + base64 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".base64."0.21.7" { inherit profileName; }; + bytes = rustPackages."registry+https://github.com/rust-lang/crates.io-index".bytes."1.5.0" { inherit profileName; }; + ${ if !(hostPlatform.parsed.cpu.name == "wasm32") then "encoding_rs" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".encoding_rs."0.8.33" { inherit profileName; }; + futures_core = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-core."0.3.30" { inherit profileName; }; + futures_util = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-util."0.3.30" { inherit profileName; }; + ${ if !(hostPlatform.parsed.cpu.name == "wasm32") then "h2" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".h2."0.3.24" { inherit profileName; }; + http = rustPackages."registry+https://github.com/rust-lang/crates.io-index".http."0.2.11" { inherit profileName; }; + ${ if !(hostPlatform.parsed.cpu.name == "wasm32") then "http_body" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".http-body."0.4.6" { inherit profileName; }; + ${ if !(hostPlatform.parsed.cpu.name == "wasm32") then "hyper" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".hyper."0.14.28" { inherit profileName; }; + ${ if !(hostPlatform.parsed.cpu.name == "wasm32") then "hyper_rustls" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".hyper-rustls."0.24.2" { inherit profileName; }; + ${ if !(hostPlatform.parsed.cpu.name == "wasm32") then "hyper_tls" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".hyper-tls."0.5.0" { inherit profileName; }; + ${ if !(hostPlatform.parsed.cpu.name == "wasm32") then "ipnet" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".ipnet."2.9.0" { inherit profileName; }; + ${ if hostPlatform.parsed.cpu.name == "wasm32" then "js_sys" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".js-sys."0.3.68" { inherit profileName; }; + ${ if !(hostPlatform.parsed.cpu.name == "wasm32") then "log" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".log."0.4.20" { inherit profileName; }; + ${ if !(hostPlatform.parsed.cpu.name == "wasm32") then "mime" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".mime."0.3.17" { inherit profileName; }; mime_guess = rustPackages."registry+https://github.com/rust-lang/crates.io-index".mime_guess."2.0.4" { inherit profileName; }; - ${ if !(hostPlatform.parsed.cpu.name == "wasm32") then "percent_encoding" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".percent-encoding."2.1.0" { inherit profileName; }; - ${ if !(hostPlatform.parsed.cpu.name == "wasm32") then "pin_project_lite" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".pin-project-lite."0.2.9" { inherit profileName; }; - ${ if !(hostPlatform.parsed.cpu.name == "wasm32") then "rustls" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".rustls."0.20.6" { inherit profileName; }; - ${ if !(hostPlatform.parsed.cpu.name == "wasm32") then "rustls_pemfile" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".rustls-pemfile."1.0.1" { inherit profileName; }; - serde = rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde."1.0.144" { inherit profileName; }; - serde_json = rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde_json."1.0.85" { inherit profileName; }; + ${ if !(hostPlatform.parsed.cpu.name == "wasm32") then "native_tls_crate" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".native-tls."0.2.11" { inherit profileName; }; + ${ if !(hostPlatform.parsed.cpu.name == "wasm32") then "once_cell" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".once_cell."1.19.0" { inherit profileName; }; + ${ if !(hostPlatform.parsed.cpu.name == "wasm32") then "percent_encoding" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".percent-encoding."2.3.1" { inherit profileName; }; + ${ if !(hostPlatform.parsed.cpu.name == "wasm32") then "pin_project_lite" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".pin-project-lite."0.2.13" { inherit profileName; }; + ${ if !(hostPlatform.parsed.cpu.name == "wasm32") then "rustls" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".rustls."0.21.10" { inherit profileName; }; + ${ if !(hostPlatform.parsed.cpu.name == "wasm32") then "rustls_pemfile" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".rustls-pemfile."1.0.4" { inherit profileName; }; + serde = rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde."1.0.196" { inherit profileName; }; + serde_json = rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde_json."1.0.113" { inherit profileName; }; serde_urlencoded = rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde_urlencoded."0.7.1" { inherit profileName; }; - ${ if !(hostPlatform.parsed.cpu.name == "wasm32") then "tokio" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tokio."1.25.0" { inherit profileName; }; - ${ if !(hostPlatform.parsed.cpu.name == "wasm32") then "tokio_rustls" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tokio-rustls."0.23.4" { inherit profileName; }; + sync_wrapper = rustPackages."registry+https://github.com/rust-lang/crates.io-index".sync_wrapper."0.1.2" { inherit profileName; }; + ${ if hostPlatform.parsed.kernel.name == "darwin" then "system_configuration" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".system-configuration."0.5.1" { inherit profileName; }; + ${ if !(hostPlatform.parsed.cpu.name == "wasm32") then "tokio" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tokio."1.36.0" { inherit profileName; }; + ${ if !(hostPlatform.parsed.cpu.name == "wasm32") then "tokio_native_tls" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tokio-native-tls."0.3.1" { inherit profileName; }; + ${ if !(hostPlatform.parsed.cpu.name == "wasm32") then "tokio_rustls" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tokio-rustls."0.24.1" { inherit profileName; }; + ${ if !(hostPlatform.parsed.cpu.name == "wasm32") then "tokio_util" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tokio-util."0.7.10" { inherit profileName; }; tower_service = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tower-service."0.3.2" { inherit profileName; }; - url = rustPackages."registry+https://github.com/rust-lang/crates.io-index".url."2.2.2" { inherit profileName; }; - ${ if hostPlatform.parsed.cpu.name == "wasm32" then "wasm_bindgen" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".wasm-bindgen."0.2.82" { inherit profileName; }; - ${ if hostPlatform.parsed.cpu.name == "wasm32" then "wasm_bindgen_futures" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".wasm-bindgen-futures."0.4.32" { inherit profileName; }; - ${ if hostPlatform.parsed.cpu.name == "wasm32" then "web_sys" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".web-sys."0.3.59" { inherit profileName; }; - ${ if !(hostPlatform.parsed.cpu.name == "wasm32") then "webpki_roots" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".webpki-roots."0.22.4" { inherit profileName; }; - ${ if hostPlatform.isWindows then "winreg" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".winreg."0.10.1" { inherit profileName; }; + url = rustPackages."registry+https://github.com/rust-lang/crates.io-index".url."2.5.0" { inherit profileName; }; + ${ if hostPlatform.parsed.cpu.name == "wasm32" then "wasm_bindgen" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".wasm-bindgen."0.2.91" { inherit profileName; }; + ${ if hostPlatform.parsed.cpu.name == "wasm32" then "wasm_bindgen_futures" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".wasm-bindgen-futures."0.4.41" { inherit profileName; }; + ${ if hostPlatform.parsed.cpu.name == "wasm32" then "wasm_streams" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".wasm-streams."0.4.0" { inherit profileName; }; + ${ if hostPlatform.parsed.cpu.name == "wasm32" then "web_sys" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".web-sys."0.3.68" { inherit profileName; }; + ${ if !(hostPlatform.parsed.cpu.name == "wasm32") then "webpki_roots" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".webpki-roots."0.25.4" { inherit profileName; }; + ${ if hostPlatform.isWindows then "winreg" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".winreg."0.50.0" { inherit profileName; }; }; }); @@ -2912,128 +3912,153 @@ in [ "std" ] ]; dependencies = { - ${ if hostPlatform.parsed.kernel.name == "android" || hostPlatform.parsed.kernel.name == "linux" then "libc" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".libc."0.2.139" { inherit profileName; }; - ${ if hostPlatform.parsed.kernel.name == "android" || hostPlatform.parsed.kernel.name == "linux" || hostPlatform.parsed.kernel.name == "dragonfly" || hostPlatform.parsed.kernel.name == "freebsd" || hostPlatform.parsed.kernel.name == "illumos" || hostPlatform.parsed.kernel.name == "netbsd" || hostPlatform.parsed.kernel.name == "openbsd" || hostPlatform.parsed.kernel.name == "solaris" then "once_cell" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".once_cell."1.14.0" { inherit profileName; }; + ${ if hostPlatform.parsed.kernel.name == "android" || hostPlatform.parsed.kernel.name == "linux" then "libc" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".libc."0.2.153" { inherit profileName; }; + ${ if hostPlatform.parsed.kernel.name == "android" || hostPlatform.parsed.kernel.name == "linux" || hostPlatform.parsed.kernel.name == "dragonfly" || hostPlatform.parsed.kernel.name == "freebsd" || hostPlatform.parsed.kernel.name == "illumos" || hostPlatform.parsed.kernel.name == "netbsd" || hostPlatform.parsed.kernel.name == "openbsd" || hostPlatform.parsed.kernel.name == "solaris" then "once_cell" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".once_cell."1.19.0" { inherit profileName; }; ${ if hostPlatform.parsed.cpu.name == "i686" || hostPlatform.parsed.cpu.name == "x86_64" || (hostPlatform.parsed.cpu.name == "aarch64" || hostPlatform.parsed.cpu.name == "armv6l" || hostPlatform.parsed.cpu.name == "armv7l") && (hostPlatform.parsed.kernel.name == "android" || hostPlatform.parsed.kernel.name == "fuchsia" || hostPlatform.parsed.kernel.name == "linux") then "spin" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".spin."0.5.2" { inherit profileName; }; untrusted = rustPackages."registry+https://github.com/rust-lang/crates.io-index".untrusted."0.7.1" { inherit profileName; }; - ${ if hostPlatform.parsed.cpu.name == "wasm32" && hostPlatform.parsed.vendor.name == "unknown" && hostPlatform.parsed.kernel.name == "unknown" && hostPlatform.parsed.abi.name == "" then "web_sys" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".web-sys."0.3.59" { inherit profileName; }; + ${ if hostPlatform.parsed.cpu.name == "wasm32" && hostPlatform.parsed.vendor.name == "unknown" && hostPlatform.parsed.kernel.name == "unknown" && hostPlatform.parsed.abi.name == "" then "web_sys" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".web-sys."0.3.68" { inherit profileName; }; ${ if hostPlatform.parsed.kernel.name == "windows" then "winapi" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".winapi."0.3.9" { inherit profileName; }; }; buildDependencies = { - cc = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".cc."1.0.73" { profileName = "__noProfile"; }; + cc = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".cc."1.0.83" { profileName = "__noProfile"; }; }; }); - "registry+https://github.com/rust-lang/crates.io-index".ron."0.8.0" = overridableMkRustCrate (profileName: rec { - name = "ron"; - version = "0.8.0"; + "registry+https://github.com/rust-lang/crates.io-index".ring."0.17.7" = overridableMkRustCrate (profileName: rec { + name = "ring"; + version = "0.17.7"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "300a51053b1cb55c80b7a9fde4120726ddf25ca241a1cbb926626f62fb136bff"; }; + src = fetchCratesIo { inherit name version; sha256 = "688c63d65483050968b2a8937f7995f443e27041a0f7700aa59b0822aedebb74"; }; features = builtins.concatLists [ + [ "alloc" ] [ "default" ] + [ "dev_urandom_fallback" ] ]; dependencies = { - base64 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".base64."0.13.0" { inherit profileName; }; - bitflags = rustPackages."registry+https://github.com/rust-lang/crates.io-index".bitflags."1.3.2" { inherit profileName; }; - serde = rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde."1.0.144" { inherit profileName; }; + getrandom = rustPackages."registry+https://github.com/rust-lang/crates.io-index".getrandom."0.2.12" { inherit profileName; }; + ${ if (hostPlatform.parsed.kernel.name == "android" || hostPlatform.parsed.kernel.name == "linux") && (hostPlatform.parsed.cpu.name == "aarch64" || hostPlatform.parsed.cpu.name == "armv6l" || hostPlatform.parsed.cpu.name == "armv7l") then "libc" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".libc."0.2.153" { inherit profileName; }; + ${ if hostPlatform.parsed.cpu.name == "aarch64" || hostPlatform.parsed.cpu.name == "armv6l" || hostPlatform.parsed.cpu.name == "armv7l" || hostPlatform.parsed.cpu.name == "i686" || hostPlatform.parsed.cpu.name == "x86_64" then "spin" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".spin."0.9.8" { inherit profileName; }; + untrusted = rustPackages."registry+https://github.com/rust-lang/crates.io-index".untrusted."0.9.0" { inherit profileName; }; + ${ if hostPlatform.parsed.cpu.name == "aarch64" && hostPlatform.parsed.kernel.name == "windows" then "windows_sys" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".windows-sys."0.48.0" { inherit profileName; }; + }; + buildDependencies = { + cc = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".cc."1.0.83" { profileName = "__noProfile"; }; }; }); - "registry+https://github.com/rust-lang/crates.io-index".rusoto_credential."0.47.0" = overridableMkRustCrate (profileName: rec { - name = "rusoto_credential"; - version = "0.47.0"; + "registry+https://github.com/rust-lang/crates.io-index".rkyv."0.7.44" = overridableMkRustCrate (profileName: rec { + name = "rkyv"; + version = "0.7.44"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "6a46b67db7bb66f5541e44db22b0a02fed59c9603e146db3a9e633272d3bac2f"; }; + src = fetchCratesIo { inherit name version; sha256 = "5cba464629b3394fc4dbc6f940ff8f5b4ff5c7aef40f29166fd4ad12acbc99c0"; }; + features = builtins.concatLists [ + [ "alloc" ] + [ "hashbrown" ] + [ "size_32" ] + [ "std" ] + ]; dependencies = { - async_trait = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".async-trait."0.1.57" { profileName = "__noProfile"; }; - chrono = rustPackages."registry+https://github.com/rust-lang/crates.io-index".chrono."0.4.22" { inherit profileName; }; - dirs_next = rustPackages."registry+https://github.com/rust-lang/crates.io-index".dirs-next."2.0.0" { inherit profileName; }; - futures = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures."0.3.24" { inherit profileName; }; - hyper = rustPackages."registry+https://github.com/rust-lang/crates.io-index".hyper."0.14.20" { inherit profileName; }; - serde = rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde."1.0.144" { inherit profileName; }; - serde_json = rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde_json."1.0.85" { inherit profileName; }; - shlex = rustPackages."registry+https://github.com/rust-lang/crates.io-index".shlex."1.1.0" { inherit profileName; }; - tokio = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tokio."1.25.0" { inherit profileName; }; - zeroize = rustPackages."registry+https://github.com/rust-lang/crates.io-index".zeroize."1.5.7" { inherit profileName; }; + bitvec = rustPackages."registry+https://github.com/rust-lang/crates.io-index".bitvec."1.0.1" { inherit profileName; }; + bytecheck = rustPackages."registry+https://github.com/rust-lang/crates.io-index".bytecheck."0.6.12" { inherit profileName; }; + bytes = rustPackages."registry+https://github.com/rust-lang/crates.io-index".bytes."1.5.0" { inherit profileName; }; + hashbrown = rustPackages."registry+https://github.com/rust-lang/crates.io-index".hashbrown."0.12.3" { inherit profileName; }; + ptr_meta = rustPackages."registry+https://github.com/rust-lang/crates.io-index".ptr_meta."0.1.4" { inherit profileName; }; + rend = rustPackages."registry+https://github.com/rust-lang/crates.io-index".rend."0.4.2" { inherit profileName; }; + rkyv_derive = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".rkyv_derive."0.7.44" { profileName = "__noProfile"; }; + seahash = rustPackages."registry+https://github.com/rust-lang/crates.io-index".seahash."4.1.0" { inherit profileName; }; + tinyvec = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tinyvec."1.6.0" { inherit profileName; }; + uuid = rustPackages."registry+https://github.com/rust-lang/crates.io-index".uuid."1.7.0" { inherit profileName; }; }; }); - "registry+https://github.com/rust-lang/crates.io-index".rusoto_signature."0.47.0" = overridableMkRustCrate (profileName: rec { - name = "rusoto_signature"; - version = "0.47.0"; + "registry+https://github.com/rust-lang/crates.io-index".rkyv_derive."0.7.44" = overridableMkRustCrate (profileName: rec { + name = "rkyv_derive"; + version = "0.7.44"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "6264e93384b90a747758bcc82079711eacf2e755c3a8b5091687b5349d870bcc"; }; + src = fetchCratesIo { inherit name version; sha256 = "a7dddfff8de25e6f62b9d64e6e432bf1c6736c57d20323e15ee10435fbda7c65"; }; + features = builtins.concatLists [ + [ "default" ] + ]; dependencies = { - base64 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".base64."0.13.0" { inherit profileName; }; - bytes = rustPackages."registry+https://github.com/rust-lang/crates.io-index".bytes."1.2.1" { inherit profileName; }; - chrono = rustPackages."registry+https://github.com/rust-lang/crates.io-index".chrono."0.4.22" { inherit profileName; }; - digest = rustPackages."registry+https://github.com/rust-lang/crates.io-index".digest."0.9.0" { inherit profileName; }; - futures = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures."0.3.24" { inherit profileName; }; - hex = rustPackages."registry+https://github.com/rust-lang/crates.io-index".hex."0.4.3" { inherit profileName; }; - hmac = rustPackages."registry+https://github.com/rust-lang/crates.io-index".hmac."0.11.0" { inherit profileName; }; - http = rustPackages."registry+https://github.com/rust-lang/crates.io-index".http."0.2.8" { inherit profileName; }; - hyper = rustPackages."registry+https://github.com/rust-lang/crates.io-index".hyper."0.14.20" { inherit profileName; }; - log = rustPackages."registry+https://github.com/rust-lang/crates.io-index".log."0.4.17" { inherit profileName; }; - md5 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".md-5."0.9.1" { inherit profileName; }; - percent_encoding = rustPackages."registry+https://github.com/rust-lang/crates.io-index".percent-encoding."2.1.0" { inherit profileName; }; - pin_project_lite = rustPackages."registry+https://github.com/rust-lang/crates.io-index".pin-project-lite."0.2.9" { inherit profileName; }; - rusoto_credential = rustPackages."registry+https://github.com/rust-lang/crates.io-index".rusoto_credential."0.47.0" { inherit profileName; }; - serde = rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde."1.0.144" { inherit profileName; }; - sha2 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".sha2."0.9.9" { inherit profileName; }; - tokio = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tokio."1.25.0" { inherit profileName; }; + proc_macro2 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".proc-macro2."1.0.78" { inherit profileName; }; + quote = rustPackages."registry+https://github.com/rust-lang/crates.io-index".quote."1.0.35" { inherit profileName; }; + syn = rustPackages."registry+https://github.com/rust-lang/crates.io-index".syn."1.0.109" { inherit profileName; }; }; - buildDependencies = { - rustc_version = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".rustc_version."0.4.0" { profileName = "__noProfile"; }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".ron."0.8.1" = overridableMkRustCrate (profileName: rec { + name = "ron"; + version = "0.8.1"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "b91f7eff05f748767f183df4320a63d6936e9c6107d97c9e6bdd9784f4289c94"; }; + features = builtins.concatLists [ + [ "default" ] + ]; + dependencies = { + base64 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".base64."0.21.7" { inherit profileName; }; + bitflags = rustPackages."registry+https://github.com/rust-lang/crates.io-index".bitflags."2.4.2" { inherit profileName; }; + serde = rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde."1.0.196" { inherit profileName; }; + serde_derive = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".serde_derive."1.0.196" { profileName = "__noProfile"; }; }; }); - "registry+https://github.com/rust-lang/crates.io-index".rust_decimal."1.26.1" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".rust_decimal."1.34.3" = overridableMkRustCrate (profileName: rec { name = "rust_decimal"; - version = "1.26.1"; + version = "1.34.3"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "ee9164faf726e4f3ece4978b25ca877ddc6802fa77f38cdccb32c7f805ecd70c"; }; + src = fetchCratesIo { inherit name version; sha256 = "b39449a79f45e8da28c57c341891b69a183044b29518bb8f86dbac9df60bb7df"; }; features = builtins.concatLists [ [ "default" ] [ "serde" ] [ "std" ] ]; dependencies = { - arrayvec = rustPackages."registry+https://github.com/rust-lang/crates.io-index".arrayvec."0.7.2" { inherit profileName; }; - num_traits = rustPackages."registry+https://github.com/rust-lang/crates.io-index".num-traits."0.2.15" { inherit profileName; }; - serde = rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde."1.0.144" { inherit profileName; }; + arrayvec = rustPackages."registry+https://github.com/rust-lang/crates.io-index".arrayvec."0.7.4" { inherit profileName; }; + borsh = rustPackages."registry+https://github.com/rust-lang/crates.io-index".borsh."1.3.1" { inherit profileName; }; + bytes = rustPackages."registry+https://github.com/rust-lang/crates.io-index".bytes."1.5.0" { inherit profileName; }; + num_traits = rustPackages."registry+https://github.com/rust-lang/crates.io-index".num-traits."0.2.18" { inherit profileName; }; + rand = rustPackages."registry+https://github.com/rust-lang/crates.io-index".rand."0.8.5" { inherit profileName; }; + rkyv = rustPackages."registry+https://github.com/rust-lang/crates.io-index".rkyv."0.7.44" { inherit profileName; }; + serde = rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde."1.0.196" { inherit profileName; }; + serde_json = rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde_json."1.0.113" { inherit profileName; }; }; }); + "registry+https://github.com/rust-lang/crates.io-index".rustc-demangle."0.1.23" = overridableMkRustCrate (profileName: rec { + name = "rustc-demangle"; + version = "0.1.23"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76"; }; + }); + "registry+https://github.com/rust-lang/crates.io-index".rustc_version."0.4.0" = overridableMkRustCrate (profileName: rec { name = "rustc_version"; version = "0.4.0"; registry = "registry+https://github.com/rust-lang/crates.io-index"; src = fetchCratesIo { inherit name version; sha256 = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366"; }; dependencies = { - semver = rustPackages."registry+https://github.com/rust-lang/crates.io-index".semver."1.0.13" { inherit profileName; }; + semver = rustPackages."registry+https://github.com/rust-lang/crates.io-index".semver."1.0.21" { inherit profileName; }; }; }); - "registry+https://github.com/rust-lang/crates.io-index".rustix."0.36.9" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".rustix."0.38.31" = overridableMkRustCrate (profileName: rec { name = "rustix"; - version = "0.36.9"; + version = "0.38.31"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "fd5c6ff11fecd55b40746d1995a02f2eb375bf8c00d192d521ee09f42bef37bc"; }; + src = fetchCratesIo { inherit name version; sha256 = "6ea3e1a662af26cd7a3ba09c0297a31af215563ecf42817c98df621387f4e949"; }; features = builtins.concatLists [ + [ "alloc" ] [ "default" ] [ "fs" ] - [ "io-lifetimes" ] - [ "libc" ] [ "std" ] [ "use-libc-auxv" ] ]; dependencies = { - bitflags = rustPackages."registry+https://github.com/rust-lang/crates.io-index".bitflags."1.3.2" { inherit profileName; }; - ${ if !(hostPlatform.parsed.kernel.name == "linux" && (hostPlatform.parsed.cpu.name == "i686" || hostPlatform.parsed.cpu.name == "x86_64" && hostPlatform.parsed.cpu.bits == 64 || hostPlatform.parsed.cpu.significantByte == "littleEndian" && (hostPlatform.parsed.cpu.name == "armv6l" || hostPlatform.parsed.cpu.name == "armv7l" || hostPlatform.parsed.cpu.name == "aarch64" && hostPlatform.parsed.cpu.bits == 64 || hostPlatform.parsed.cpu.name == "powerpc64" || hostPlatform.parsed.cpu.name == "riscv64" || hostPlatform.parsed.cpu.name == "mips" || hostPlatform.parsed.cpu.name == "mips64"))) then "libc_errno" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".errno."0.2.8" { inherit profileName; }; - io_lifetimes = rustPackages."registry+https://github.com/rust-lang/crates.io-index".io-lifetimes."1.0.6" { inherit profileName; }; - ${ if hostPlatform.parsed.kernel.name == "linux" && (hostPlatform.parsed.cpu.name == "i686" || hostPlatform.parsed.cpu.name == "x86_64" && hostPlatform.parsed.cpu.bits == 64 || hostPlatform.parsed.cpu.significantByte == "littleEndian" && (hostPlatform.parsed.cpu.name == "armv6l" || hostPlatform.parsed.cpu.name == "armv7l" || hostPlatform.parsed.cpu.name == "aarch64" && hostPlatform.parsed.cpu.bits == 64 || hostPlatform.parsed.cpu.name == "powerpc64" || hostPlatform.parsed.cpu.name == "riscv64" || hostPlatform.parsed.cpu.name == "mips" || hostPlatform.parsed.cpu.name == "mips64")) || !(hostPlatform.parsed.kernel.name == "linux" && (hostPlatform.parsed.cpu.name == "i686" || hostPlatform.parsed.cpu.name == "x86_64" && hostPlatform.parsed.cpu.bits == 64 || hostPlatform.parsed.cpu.significantByte == "littleEndian" && (hostPlatform.parsed.cpu.name == "armv6l" || hostPlatform.parsed.cpu.name == "armv7l" || hostPlatform.parsed.cpu.name == "aarch64" && hostPlatform.parsed.cpu.bits == 64 || hostPlatform.parsed.cpu.name == "powerpc64" || hostPlatform.parsed.cpu.name == "riscv64" || hostPlatform.parsed.cpu.name == "mips" || hostPlatform.parsed.cpu.name == "mips64"))) then "libc" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".libc."0.2.139" { inherit profileName; }; - ${ if hostPlatform.parsed.kernel.name == "linux" && (hostPlatform.parsed.cpu.name == "i686" || hostPlatform.parsed.cpu.name == "x86_64" && hostPlatform.parsed.cpu.bits == 64 || hostPlatform.parsed.cpu.significantByte == "littleEndian" && (hostPlatform.parsed.cpu.name == "armv6l" || hostPlatform.parsed.cpu.name == "armv7l" || hostPlatform.parsed.cpu.name == "aarch64" && hostPlatform.parsed.cpu.bits == 64 || hostPlatform.parsed.cpu.name == "powerpc64" || hostPlatform.parsed.cpu.name == "riscv64" || hostPlatform.parsed.cpu.name == "mips" || hostPlatform.parsed.cpu.name == "mips64")) || (hostPlatform.parsed.kernel.name == "android" || hostPlatform.parsed.kernel.name == "linux") && !(hostPlatform.parsed.kernel.name == "linux" && (hostPlatform.parsed.cpu.name == "i686" || hostPlatform.parsed.cpu.name == "x86_64" && hostPlatform.parsed.cpu.bits == 64 || hostPlatform.parsed.cpu.significantByte == "littleEndian" && (hostPlatform.parsed.cpu.name == "armv6l" || hostPlatform.parsed.cpu.name == "armv7l" || hostPlatform.parsed.cpu.name == "aarch64" && hostPlatform.parsed.cpu.bits == 64 || hostPlatform.parsed.cpu.name == "powerpc64" || hostPlatform.parsed.cpu.name == "riscv64" || hostPlatform.parsed.cpu.name == "mips" || hostPlatform.parsed.cpu.name == "mips64"))) then "linux_raw_sys" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".linux-raw-sys."0.1.4" { inherit profileName; }; - ${ if hostPlatform.isWindows then "windows_sys" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".windows-sys."0.45.0" { inherit profileName; }; + bitflags = rustPackages."registry+https://github.com/rust-lang/crates.io-index".bitflags."2.4.2" { inherit profileName; }; + ${ if hostPlatform.parsed.kernel.name == "linux" && hostPlatform.parsed.cpu.significantByte == "littleEndian" && (hostPlatform.parsed.cpu.name == "armv6l" || hostPlatform.parsed.cpu.name == "armv7l" || hostPlatform.parsed.cpu.name == "aarch64" && hostPlatform.parsed.cpu.bits == 64 || hostPlatform.parsed.cpu.name == "riscv64" || hostPlatform.parsed.cpu.name == "i686" || hostPlatform.parsed.cpu.name == "x86_64" && hostPlatform.parsed.cpu.bits == 64) || !hostPlatform.isWindows && !(hostPlatform.parsed.kernel.name == "linux" && hostPlatform.parsed.cpu.significantByte == "littleEndian" && (hostPlatform.parsed.cpu.name == "armv6l" || hostPlatform.parsed.cpu.name == "armv7l" || hostPlatform.parsed.cpu.name == "aarch64" && hostPlatform.parsed.cpu.bits == 64 || hostPlatform.parsed.cpu.name == "riscv64" || hostPlatform.parsed.cpu.name == "i686" || hostPlatform.parsed.cpu.name == "x86_64" && hostPlatform.parsed.cpu.bits == 64)) || hostPlatform.isWindows then "libc_errno" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".errno."0.3.8" { inherit profileName; }; + ${ if hostPlatform.parsed.kernel.name == "linux" && hostPlatform.parsed.cpu.significantByte == "littleEndian" && (hostPlatform.parsed.cpu.name == "armv6l" || hostPlatform.parsed.cpu.name == "armv7l" || hostPlatform.parsed.cpu.name == "aarch64" && hostPlatform.parsed.cpu.bits == 64 || hostPlatform.parsed.cpu.name == "riscv64" || hostPlatform.parsed.cpu.name == "i686" || hostPlatform.parsed.cpu.name == "x86_64" && hostPlatform.parsed.cpu.bits == 64) || !hostPlatform.isWindows && !(hostPlatform.parsed.kernel.name == "linux" && hostPlatform.parsed.cpu.significantByte == "littleEndian" && (hostPlatform.parsed.cpu.name == "armv6l" || hostPlatform.parsed.cpu.name == "armv7l" || hostPlatform.parsed.cpu.name == "aarch64" && hostPlatform.parsed.cpu.bits == 64 || hostPlatform.parsed.cpu.name == "riscv64" || hostPlatform.parsed.cpu.name == "i686" || hostPlatform.parsed.cpu.name == "x86_64" && hostPlatform.parsed.cpu.bits == 64)) then "libc" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".libc."0.2.153" { inherit profileName; }; + ${ if hostPlatform.parsed.kernel.name == "linux" && hostPlatform.parsed.cpu.significantByte == "littleEndian" && (hostPlatform.parsed.cpu.name == "armv6l" || hostPlatform.parsed.cpu.name == "armv7l" || hostPlatform.parsed.cpu.name == "aarch64" && hostPlatform.parsed.cpu.bits == 64 || hostPlatform.parsed.cpu.name == "riscv64" || hostPlatform.parsed.cpu.name == "i686" || hostPlatform.parsed.cpu.name == "x86_64" && hostPlatform.parsed.cpu.bits == 64) || (hostPlatform.parsed.kernel.name == "android" || hostPlatform.parsed.kernel.name == "linux") && !(hostPlatform.parsed.kernel.name == "linux" && hostPlatform.parsed.cpu.significantByte == "littleEndian" && (hostPlatform.parsed.cpu.name == "armv6l" || hostPlatform.parsed.cpu.name == "armv7l" || hostPlatform.parsed.cpu.name == "aarch64" && hostPlatform.parsed.cpu.bits == 64 || hostPlatform.parsed.cpu.name == "riscv64" || hostPlatform.parsed.cpu.name == "i686" || hostPlatform.parsed.cpu.name == "x86_64" && hostPlatform.parsed.cpu.bits == 64)) then "linux_raw_sys" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".linux-raw-sys."0.4.13" { inherit profileName; }; + ${ if hostPlatform.isWindows then "windows_sys" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".windows-sys."0.52.0" { inherit profileName; }; }; }); @@ -3043,25 +4068,24 @@ in registry = "registry+https://github.com/rust-lang/crates.io-index"; src = fetchCratesIo { inherit name version; sha256 = "35edb675feee39aec9c99fa5ff985081995a06d594114ae14cbe797ad7b7a6d7"; }; features = builtins.concatLists [ - [ "dangerous_configuration" ] [ "default" ] [ "log" ] [ "logging" ] ]; dependencies = { - base64 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".base64."0.13.0" { inherit profileName; }; - log = rustPackages."registry+https://github.com/rust-lang/crates.io-index".log."0.4.17" { inherit profileName; }; + base64 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".base64."0.13.1" { inherit profileName; }; + log = rustPackages."registry+https://github.com/rust-lang/crates.io-index".log."0.4.20" { inherit profileName; }; ring = rustPackages."registry+https://github.com/rust-lang/crates.io-index".ring."0.16.20" { inherit profileName; }; sct = rustPackages."registry+https://github.com/rust-lang/crates.io-index".sct."0.6.1" { inherit profileName; }; webpki = rustPackages."registry+https://github.com/rust-lang/crates.io-index".webpki."0.21.4" { inherit profileName; }; }; }); - "registry+https://github.com/rust-lang/crates.io-index".rustls."0.20.6" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".rustls."0.20.9" = overridableMkRustCrate (profileName: rec { name = "rustls"; - version = "0.20.6"; + version = "0.20.9"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "5aab8ee6c7097ed6057f43c187a62418d0c05a4bd5f18b3571db50ee0f9ce033"; }; + src = fetchCratesIo { inherit name version; sha256 = "1b80e3dec595989ea8510028f30c408a4630db12c9cbb8de34203b89d6577e99"; }; features = builtins.concatLists [ [ "dangerous_configuration" ] [ "default" ] @@ -3070,10 +4094,30 @@ in [ "tls12" ] ]; dependencies = { - log = rustPackages."registry+https://github.com/rust-lang/crates.io-index".log."0.4.17" { inherit profileName; }; + log = rustPackages."registry+https://github.com/rust-lang/crates.io-index".log."0.4.20" { inherit profileName; }; ring = rustPackages."registry+https://github.com/rust-lang/crates.io-index".ring."0.16.20" { inherit profileName; }; - sct = rustPackages."registry+https://github.com/rust-lang/crates.io-index".sct."0.7.0" { inherit profileName; }; - webpki = rustPackages."registry+https://github.com/rust-lang/crates.io-index".webpki."0.22.0" { inherit profileName; }; + sct = rustPackages."registry+https://github.com/rust-lang/crates.io-index".sct."0.7.1" { inherit profileName; }; + webpki = rustPackages."registry+https://github.com/rust-lang/crates.io-index".webpki."0.22.4" { inherit profileName; }; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".rustls."0.21.10" = overridableMkRustCrate (profileName: rec { + name = "rustls"; + version = "0.21.10"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "f9d5a6813c0759e4609cd494e8e725babae6a2ca7b62a5536a13daaec6fcb7ba"; }; + features = builtins.concatLists [ + [ "dangerous_configuration" ] + [ "default" ] + [ "log" ] + [ "logging" ] + [ "tls12" ] + ]; + dependencies = { + log = rustPackages."registry+https://github.com/rust-lang/crates.io-index".log."0.4.20" { inherit profileName; }; + ring = rustPackages."registry+https://github.com/rust-lang/crates.io-index".ring."0.17.7" { inherit profileName; }; + webpki = rustPackages."registry+https://github.com/rust-lang/crates.io-index".rustls-webpki."0.101.7" { inherit profileName; }; + sct = rustPackages."registry+https://github.com/rust-lang/crates.io-index".sct."0.7.1" { inherit profileName; }; }; }); @@ -3089,44 +4133,72 @@ in dependencies = { ${ if hostPlatform.isUnix && !(hostPlatform.parsed.kernel.name == "darwin") then "openssl_probe" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".openssl-probe."0.1.5" { inherit profileName; }; rustls = rustPackages."registry+https://github.com/rust-lang/crates.io-index".rustls."0.19.1" { inherit profileName; }; - ${ if hostPlatform.isWindows then "schannel" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".schannel."0.1.20" { inherit profileName; }; - ${ if hostPlatform.parsed.kernel.name == "darwin" then "security_framework" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".security-framework."2.7.0" { inherit profileName; }; + ${ if hostPlatform.isWindows then "schannel" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".schannel."0.1.23" { inherit profileName; }; + ${ if hostPlatform.parsed.kernel.name == "darwin" then "security_framework" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".security-framework."2.9.2" { inherit profileName; }; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".rustls-native-certs."0.6.3" = overridableMkRustCrate (profileName: rec { + name = "rustls-native-certs"; + version = "0.6.3"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "a9aace74cb666635c918e9c12bc0d348266037aa8eb599b5cba565709a8dff00"; }; + dependencies = { + ${ if hostPlatform.isUnix && !(hostPlatform.parsed.kernel.name == "darwin") then "openssl_probe" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".openssl-probe."0.1.5" { inherit profileName; }; + rustls_pemfile = rustPackages."registry+https://github.com/rust-lang/crates.io-index".rustls-pemfile."1.0.4" { inherit profileName; }; + ${ if hostPlatform.isWindows then "schannel" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".schannel."0.1.23" { inherit profileName; }; + ${ if hostPlatform.parsed.kernel.name == "darwin" then "security_framework" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".security-framework."2.9.2" { inherit profileName; }; }; }); - "registry+https://github.com/rust-lang/crates.io-index".rustls-pemfile."1.0.1" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".rustls-pemfile."1.0.4" = overridableMkRustCrate (profileName: rec { name = "rustls-pemfile"; - version = "1.0.1"; + version = "1.0.4"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "0864aeff53f8c05aa08d86e5ef839d3dfcf07aeba2db32f12db0ef716e87bd55"; }; + src = fetchCratesIo { inherit name version; sha256 = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c"; }; + dependencies = { + base64 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".base64."0.21.7" { inherit profileName; }; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".rustls-webpki."0.101.7" = overridableMkRustCrate (profileName: rec { + name = "rustls-webpki"; + version = "0.101.7"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765"; }; + features = builtins.concatLists [ + [ "alloc" ] + [ "default" ] + [ "std" ] + ]; dependencies = { - base64 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".base64."0.13.0" { inherit profileName; }; + ring = rustPackages."registry+https://github.com/rust-lang/crates.io-index".ring."0.17.7" { inherit profileName; }; + untrusted = rustPackages."registry+https://github.com/rust-lang/crates.io-index".untrusted."0.9.0" { inherit profileName; }; }; }); - "registry+https://github.com/rust-lang/crates.io-index".ryu."1.0.11" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".ryu."1.0.16" = overridableMkRustCrate (profileName: rec { name = "ryu"; - version = "1.0.11"; + version = "1.0.16"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "4501abdff3ae82a1c1b477a17252eb69cee9e66eb915c1abaa4f44d873df9f09"; }; + src = fetchCratesIo { inherit name version; sha256 = "f98d2aa92eebf49b69786be48e4477826b256916e84a57ff2a4f21923b48eb4c"; }; }); - "registry+https://github.com/rust-lang/crates.io-index".schannel."0.1.20" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".schannel."0.1.23" = overridableMkRustCrate (profileName: rec { name = "schannel"; - version = "0.1.20"; + version = "0.1.23"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "88d6731146462ea25d9244b2ed5fd1d716d25c52e4d54aa4fb0f3c4e9854dbe2"; }; + src = fetchCratesIo { inherit name version; sha256 = "fbc91545643bcf3a0bbb6569265615222618bdf33ce4ffbbd13c4bbd4c093534"; }; dependencies = { - lazy_static = rustPackages."registry+https://github.com/rust-lang/crates.io-index".lazy_static."1.4.0" { inherit profileName; }; - windows_sys = rustPackages."registry+https://github.com/rust-lang/crates.io-index".windows-sys."0.36.1" { inherit profileName; }; + windows_sys = rustPackages."registry+https://github.com/rust-lang/crates.io-index".windows-sys."0.52.0" { inherit profileName; }; }; }); - "registry+https://github.com/rust-lang/crates.io-index".scopeguard."1.1.0" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".scopeguard."1.2.0" = overridableMkRustCrate (profileName: rec { name = "scopeguard"; - version = "1.1.0"; + version = "1.2.0"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd"; }; + src = fetchCratesIo { inherit name version; sha256 = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49"; }; }); "registry+https://github.com/rust-lang/crates.io-index".sct."0.6.1" = overridableMkRustCrate (profileName: rec { @@ -3140,65 +4212,76 @@ in }; }); - "registry+https://github.com/rust-lang/crates.io-index".sct."0.7.0" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".sct."0.7.1" = overridableMkRustCrate (profileName: rec { name = "sct"; - version = "0.7.0"; + version = "0.7.1"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "d53dcdb7c9f8158937a7981b48accfd39a43af418591a5d008c7b22b5e1b7ca4"; }; + src = fetchCratesIo { inherit name version; sha256 = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414"; }; dependencies = { - ring = rustPackages."registry+https://github.com/rust-lang/crates.io-index".ring."0.16.20" { inherit profileName; }; - untrusted = rustPackages."registry+https://github.com/rust-lang/crates.io-index".untrusted."0.7.1" { inherit profileName; }; + ring = rustPackages."registry+https://github.com/rust-lang/crates.io-index".ring."0.17.7" { inherit profileName; }; + untrusted = rustPackages."registry+https://github.com/rust-lang/crates.io-index".untrusted."0.9.0" { inherit profileName; }; }; }); - "registry+https://github.com/rust-lang/crates.io-index".security-framework."2.7.0" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".seahash."4.1.0" = overridableMkRustCrate (profileName: rec { + name = "seahash"; + version = "4.1.0"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "1c107b6f4780854c8b126e228ea8869f4d7b71260f962fefb57b996b8959ba6b"; }; + features = builtins.concatLists [ + [ "default" ] + ]; + }); + + "registry+https://github.com/rust-lang/crates.io-index".security-framework."2.9.2" = overridableMkRustCrate (profileName: rec { name = "security-framework"; - version = "2.7.0"; + version = "2.9.2"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "2bc1bb97804af6631813c55739f771071e0f2ed33ee20b68c86ec505d906356c"; }; + src = fetchCratesIo { inherit name version; sha256 = "05b64fb303737d99b81884b2c63433e9ae28abebe5eb5045dcdd175dc2ecf4de"; }; features = builtins.concatLists [ [ "OSX_10_9" ] [ "default" ] ]; dependencies = { bitflags = rustPackages."registry+https://github.com/rust-lang/crates.io-index".bitflags."1.3.2" { inherit profileName; }; - core_foundation = rustPackages."registry+https://github.com/rust-lang/crates.io-index".core-foundation."0.9.3" { inherit profileName; }; - core_foundation_sys = rustPackages."registry+https://github.com/rust-lang/crates.io-index".core-foundation-sys."0.8.3" { inherit profileName; }; - libc = rustPackages."registry+https://github.com/rust-lang/crates.io-index".libc."0.2.139" { inherit profileName; }; - security_framework_sys = rustPackages."registry+https://github.com/rust-lang/crates.io-index".security-framework-sys."2.6.1" { inherit profileName; }; + core_foundation = rustPackages."registry+https://github.com/rust-lang/crates.io-index".core-foundation."0.9.4" { inherit profileName; }; + core_foundation_sys = rustPackages."registry+https://github.com/rust-lang/crates.io-index".core-foundation-sys."0.8.6" { inherit profileName; }; + libc = rustPackages."registry+https://github.com/rust-lang/crates.io-index".libc."0.2.153" { inherit profileName; }; + security_framework_sys = rustPackages."registry+https://github.com/rust-lang/crates.io-index".security-framework-sys."2.9.1" { inherit profileName; }; }; }); - "registry+https://github.com/rust-lang/crates.io-index".security-framework-sys."2.6.1" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".security-framework-sys."2.9.1" = overridableMkRustCrate (profileName: rec { name = "security-framework-sys"; - version = "2.6.1"; + version = "2.9.1"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "0160a13a177a45bfb43ce71c01580998474f556ad854dcbca936dd2841a5c556"; }; + src = fetchCratesIo { inherit name version; sha256 = "e932934257d3b408ed8f30db49d85ea163bfe74961f017f405b025af298f0c7a"; }; features = builtins.concatLists [ [ "OSX_10_9" ] + [ "default" ] ]; dependencies = { - core_foundation_sys = rustPackages."registry+https://github.com/rust-lang/crates.io-index".core-foundation-sys."0.8.3" { inherit profileName; }; - libc = rustPackages."registry+https://github.com/rust-lang/crates.io-index".libc."0.2.139" { inherit profileName; }; + core_foundation_sys = rustPackages."registry+https://github.com/rust-lang/crates.io-index".core-foundation-sys."0.8.6" { inherit profileName; }; + libc = rustPackages."registry+https://github.com/rust-lang/crates.io-index".libc."0.2.153" { inherit profileName; }; }; }); - "registry+https://github.com/rust-lang/crates.io-index".semver."1.0.13" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".semver."1.0.21" = overridableMkRustCrate (profileName: rec { name = "semver"; - version = "1.0.13"; + version = "1.0.21"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "93f6841e709003d68bb2deee8c343572bf446003ec20a583e76f7b15cebf3711"; }; + src = fetchCratesIo { inherit name version; sha256 = "b97ed7a9823b74f99c7742f5336af7be5ecd3eeafcb1507d1fa93347b1d589b0"; }; features = builtins.concatLists [ [ "default" ] [ "std" ] ]; }); - "registry+https://github.com/rust-lang/crates.io-index".serde."1.0.144" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".serde."1.0.196" = overridableMkRustCrate (profileName: rec { name = "serde"; - version = "1.0.144"; + version = "1.0.196"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "0f747710de3dcd43b88c9168773254e809d8ddbdf9653b84e2554ab219f17860"; }; + src = fetchCratesIo { inherit name version; sha256 = "870026e60fa08c69f064aa766c10f10b1d62db9ccd4d0abb206472bee0ce3b32"; }; features = builtins.concatLists [ [ "alloc" ] [ "default" ] @@ -3208,30 +4291,30 @@ in [ "std" ] ]; dependencies = { - serde_derive = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".serde_derive."1.0.144" { profileName = "__noProfile"; }; + serde_derive = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".serde_derive."1.0.196" { profileName = "__noProfile"; }; }; }); - "registry+https://github.com/rust-lang/crates.io-index".serde_derive."1.0.144" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".serde_derive."1.0.196" = overridableMkRustCrate (profileName: rec { name = "serde_derive"; - version = "1.0.144"; + version = "1.0.196"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "94ed3a816fb1d101812f83e789f888322c34e291f894f19590dc310963e87a00"; }; + src = fetchCratesIo { inherit name version; sha256 = "33c85360c95e7d137454dc81d9a4ed2b8efd8fbe19cee57357b32b9771fccb67"; }; features = builtins.concatLists [ [ "default" ] ]; dependencies = { - proc_macro2 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".proc-macro2."1.0.43" { inherit profileName; }; - quote = rustPackages."registry+https://github.com/rust-lang/crates.io-index".quote."1.0.21" { inherit profileName; }; - syn = rustPackages."registry+https://github.com/rust-lang/crates.io-index".syn."1.0.99" { inherit profileName; }; + proc_macro2 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".proc-macro2."1.0.78" { inherit profileName; }; + quote = rustPackages."registry+https://github.com/rust-lang/crates.io-index".quote."1.0.35" { inherit profileName; }; + syn = rustPackages."registry+https://github.com/rust-lang/crates.io-index".syn."2.0.49" { inherit profileName; }; }; }); - "registry+https://github.com/rust-lang/crates.io-index".serde_json."1.0.85" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".serde_json."1.0.113" = overridableMkRustCrate (profileName: rec { name = "serde_json"; - version = "1.0.85"; + version = "1.0.113"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "e55a28e3aaef9d5ce0506d0a14dbba8054ddc7e499ef522dd8b26859ec9d4a44"; }; + src = fetchCratesIo { inherit name version; sha256 = "69801b70b1c3dac963ecb03a364ba0ceda9cf60c71cfe475e99864759c8b8a79"; }; features = builtins.concatLists [ [ "default" ] [ "indexmap" ] @@ -3240,10 +4323,20 @@ in [ "std" ] ]; dependencies = { - indexmap = rustPackages."registry+https://github.com/rust-lang/crates.io-index".indexmap."1.9.1" { inherit profileName; }; - itoa = rustPackages."registry+https://github.com/rust-lang/crates.io-index".itoa."1.0.3" { inherit profileName; }; - ryu = rustPackages."registry+https://github.com/rust-lang/crates.io-index".ryu."1.0.11" { inherit profileName; }; - serde = rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde."1.0.144" { inherit profileName; }; + indexmap = rustPackages."registry+https://github.com/rust-lang/crates.io-index".indexmap."2.2.3" { inherit profileName; }; + itoa = rustPackages."registry+https://github.com/rust-lang/crates.io-index".itoa."1.0.10" { inherit profileName; }; + ryu = rustPackages."registry+https://github.com/rust-lang/crates.io-index".ryu."1.0.16" { inherit profileName; }; + serde = rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde."1.0.196" { inherit profileName; }; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".serde_plain."1.0.2" = overridableMkRustCrate (profileName: rec { + name = "serde_plain"; + version = "1.0.2"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "9ce1fc6db65a611022b23a0dec6975d63fb80a302cb3388835ff02c097258d50"; }; + dependencies = { + serde = rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde."1.0.196" { inherit profileName; }; }; }); @@ -3253,10 +4346,10 @@ in registry = "registry+https://github.com/rust-lang/crates.io-index"; src = fetchCratesIo { inherit name version; sha256 = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd"; }; dependencies = { - form_urlencoded = rustPackages."registry+https://github.com/rust-lang/crates.io-index".form_urlencoded."1.0.1" { inherit profileName; }; - itoa = rustPackages."registry+https://github.com/rust-lang/crates.io-index".itoa."1.0.3" { inherit profileName; }; - ryu = rustPackages."registry+https://github.com/rust-lang/crates.io-index".ryu."1.0.11" { inherit profileName; }; - serde = rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde."1.0.144" { inherit profileName; }; + form_urlencoded = rustPackages."registry+https://github.com/rust-lang/crates.io-index".form_urlencoded."1.2.1" { inherit profileName; }; + itoa = rustPackages."registry+https://github.com/rust-lang/crates.io-index".itoa."1.0.10" { inherit profileName; }; + ryu = rustPackages."registry+https://github.com/rust-lang/crates.io-index".ryu."1.0.16" { inherit profileName; }; + serde = rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde."1.0.196" { inherit profileName; }; }; }); @@ -3274,9 +4367,9 @@ in [ "serde_with_macros" ] ]; dependencies = { - base64_crate = rustPackages."registry+https://github.com/rust-lang/crates.io-index".base64."0.13.0" { inherit profileName; }; + base64_crate = rustPackages."registry+https://github.com/rust-lang/crates.io-index".base64."0.13.1" { inherit profileName; }; hex = rustPackages."registry+https://github.com/rust-lang/crates.io-index".hex."0.4.3" { inherit profileName; }; - serde = rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde."1.0.144" { inherit profileName; }; + serde = rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde."1.0.196" { inherit profileName; }; serde_with_macros = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".serde_with_macros."1.5.2" { profileName = "__noProfile"; }; }; }); @@ -3288,9 +4381,9 @@ in src = fetchCratesIo { inherit name version; sha256 = "e182d6ec6f05393cc0e5ed1bf81ad6db3a8feedf8ee515ecdd369809bcce8082"; }; dependencies = { darling = rustPackages."registry+https://github.com/rust-lang/crates.io-index".darling."0.13.4" { inherit profileName; }; - proc_macro2 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".proc-macro2."1.0.43" { inherit profileName; }; - quote = rustPackages."registry+https://github.com/rust-lang/crates.io-index".quote."1.0.21" { inherit profileName; }; - syn = rustPackages."registry+https://github.com/rust-lang/crates.io-index".syn."1.0.99" { inherit profileName; }; + proc_macro2 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".proc-macro2."1.0.78" { inherit profileName; }; + quote = rustPackages."registry+https://github.com/rust-lang/crates.io-index".quote."1.0.35" { inherit profileName; }; + syn = rustPackages."registry+https://github.com/rust-lang/crates.io-index".syn."1.0.109" { inherit profileName; }; }; }); @@ -3300,111 +4393,80 @@ in registry = "registry+https://github.com/rust-lang/crates.io-index"; src = fetchCratesIo { inherit name version; sha256 = "578a7433b776b56a35785ed5ce9a7e777ac0598aac5a6dd1b4b18a307c7fc71b"; }; dependencies = { - indexmap = rustPackages."registry+https://github.com/rust-lang/crates.io-index".indexmap."1.9.1" { inherit profileName; }; - ryu = rustPackages."registry+https://github.com/rust-lang/crates.io-index".ryu."1.0.11" { inherit profileName; }; - serde = rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde."1.0.144" { inherit profileName; }; + indexmap = rustPackages."registry+https://github.com/rust-lang/crates.io-index".indexmap."1.9.3" { inherit profileName; }; + ryu = rustPackages."registry+https://github.com/rust-lang/crates.io-index".ryu."1.0.16" { inherit profileName; }; + serde = rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde."1.0.196" { inherit profileName; }; yaml_rust = rustPackages."registry+https://github.com/rust-lang/crates.io-index".yaml-rust."0.4.5" { inherit profileName; }; }; }); - "registry+https://github.com/rust-lang/crates.io-index".sha-1."0.10.0" = overridableMkRustCrate (profileName: rec { - name = "sha-1"; - version = "0.10.0"; - registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "028f48d513f9678cda28f6e4064755b3fbb2af6acd672f2c209b62323f7aea0f"; }; - dependencies = { - cfg_if = rustPackages."registry+https://github.com/rust-lang/crates.io-index".cfg-if."1.0.0" { inherit profileName; }; - ${ if hostPlatform.parsed.cpu.name == "aarch64" || hostPlatform.parsed.cpu.name == "i686" || hostPlatform.parsed.cpu.name == "x86_64" then "cpufeatures" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".cpufeatures."0.2.5" { inherit profileName; }; - digest = rustPackages."registry+https://github.com/rust-lang/crates.io-index".digest."0.10.3" { inherit profileName; }; - }; - }); - - "registry+https://github.com/rust-lang/crates.io-index".sha1."0.10.4" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".sha1."0.10.6" = overridableMkRustCrate (profileName: rec { name = "sha1"; - version = "0.10.4"; + version = "0.10.6"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "006769ba83e921b3085caa8334186b00cf92b4cb1a6cf4632fbccc8eff5c7549"; }; + src = fetchCratesIo { inherit name version; sha256 = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba"; }; features = builtins.concatLists [ [ "default" ] [ "std" ] ]; dependencies = { cfg_if = rustPackages."registry+https://github.com/rust-lang/crates.io-index".cfg-if."1.0.0" { inherit profileName; }; - ${ if hostPlatform.parsed.cpu.name == "aarch64" || hostPlatform.parsed.cpu.name == "i686" || hostPlatform.parsed.cpu.name == "x86_64" then "cpufeatures" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".cpufeatures."0.2.5" { inherit profileName; }; - digest = rustPackages."registry+https://github.com/rust-lang/crates.io-index".digest."0.10.3" { inherit profileName; }; + ${ if hostPlatform.parsed.cpu.name == "aarch64" || hostPlatform.parsed.cpu.name == "i686" || hostPlatform.parsed.cpu.name == "x86_64" then "cpufeatures" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".cpufeatures."0.2.12" { inherit profileName; }; + digest = rustPackages."registry+https://github.com/rust-lang/crates.io-index".digest."0.10.7" { inherit profileName; }; }; }); - "registry+https://github.com/rust-lang/crates.io-index".sha2."0.9.9" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".sha2."0.10.8" = overridableMkRustCrate (profileName: rec { name = "sha2"; - version = "0.9.9"; + version = "0.10.8"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800"; }; + src = fetchCratesIo { inherit name version; sha256 = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8"; }; features = builtins.concatLists [ [ "default" ] [ "std" ] ]; dependencies = { - block_buffer = rustPackages."registry+https://github.com/rust-lang/crates.io-index".block-buffer."0.9.0" { inherit profileName; }; cfg_if = rustPackages."registry+https://github.com/rust-lang/crates.io-index".cfg-if."1.0.0" { inherit profileName; }; - ${ if hostPlatform.parsed.cpu.name == "aarch64" || hostPlatform.parsed.cpu.name == "x86_64" || hostPlatform.parsed.cpu.name == "i686" then "cpufeatures" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".cpufeatures."0.2.5" { inherit profileName; }; - digest = rustPackages."registry+https://github.com/rust-lang/crates.io-index".digest."0.9.0" { inherit profileName; }; - opaque_debug = rustPackages."registry+https://github.com/rust-lang/crates.io-index".opaque-debug."0.3.0" { inherit profileName; }; + ${ if hostPlatform.parsed.cpu.name == "aarch64" || hostPlatform.parsed.cpu.name == "x86_64" || hostPlatform.parsed.cpu.name == "i686" then "cpufeatures" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".cpufeatures."0.2.12" { inherit profileName; }; + digest = rustPackages."registry+https://github.com/rust-lang/crates.io-index".digest."0.10.7" { inherit profileName; }; }; }); - "registry+https://github.com/rust-lang/crates.io-index".sha2."0.10.5" = overridableMkRustCrate (profileName: rec { - name = "sha2"; - version = "0.10.5"; + "registry+https://github.com/rust-lang/crates.io-index".sharded-slab."0.1.7" = overridableMkRustCrate (profileName: rec { + name = "sharded-slab"; + version = "0.1.7"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "cf9db03534dff993187064c4e0c05a5708d2a9728ace9a8959b77bedf415dac5"; }; - features = builtins.concatLists [ - [ "default" ] - [ "std" ] - ]; + src = fetchCratesIo { inherit name version; sha256 = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6"; }; dependencies = { - cfg_if = rustPackages."registry+https://github.com/rust-lang/crates.io-index".cfg-if."1.0.0" { inherit profileName; }; - ${ if hostPlatform.parsed.cpu.name == "aarch64" || hostPlatform.parsed.cpu.name == "x86_64" || hostPlatform.parsed.cpu.name == "i686" then "cpufeatures" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".cpufeatures."0.2.5" { inherit profileName; }; - digest = rustPackages."registry+https://github.com/rust-lang/crates.io-index".digest."0.10.3" { inherit profileName; }; + lazy_static = rustPackages."registry+https://github.com/rust-lang/crates.io-index".lazy_static."1.4.0" { inherit profileName; }; }; }); - "registry+https://github.com/rust-lang/crates.io-index".sharded-slab."0.1.4" = overridableMkRustCrate (profileName: rec { - name = "sharded-slab"; - version = "0.1.4"; + "registry+https://github.com/rust-lang/crates.io-index".signal-hook-registry."1.4.1" = overridableMkRustCrate (profileName: rec { + name = "signal-hook-registry"; + version = "1.4.1"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "900fba806f70c630b0a382d0d825e17a0f19fcd059a2ade1ff237bcddf446b31"; }; + src = fetchCratesIo { inherit name version; sha256 = "d8229b473baa5980ac72ef434c4415e70c4b5e71b423043adb4ba059f89c99a1"; }; dependencies = { - lazy_static = rustPackages."registry+https://github.com/rust-lang/crates.io-index".lazy_static."1.4.0" { inherit profileName; }; + libc = rustPackages."registry+https://github.com/rust-lang/crates.io-index".libc."0.2.153" { inherit profileName; }; }; }); - "registry+https://github.com/rust-lang/crates.io-index".shlex."1.1.0" = overridableMkRustCrate (profileName: rec { - name = "shlex"; - version = "1.1.0"; + "registry+https://github.com/rust-lang/crates.io-index".simdutf8."0.1.4" = overridableMkRustCrate (profileName: rec { + name = "simdutf8"; + version = "0.1.4"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "43b2853a4d09f215c24cc5489c992ce46052d359b5109343cbafbf26bc62f8a3"; }; + src = fetchCratesIo { inherit name version; sha256 = "f27f6278552951f1f2b8cf9da965d10969b2efdea95a6ec47987ab46edfe263a"; }; features = builtins.concatLists [ - [ "default" ] [ "std" ] ]; }); - "registry+https://github.com/rust-lang/crates.io-index".signal-hook-registry."1.4.0" = overridableMkRustCrate (profileName: rec { - name = "signal-hook-registry"; - version = "1.4.0"; - registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "e51e73328dc4ac0c7ccbda3a494dfa03df1de2f46018127f60c693f2648455b0"; }; - dependencies = { - libc = rustPackages."registry+https://github.com/rust-lang/crates.io-index".libc."0.2.139" { inherit profileName; }; - }; - }); - - "registry+https://github.com/rust-lang/crates.io-index".slab."0.4.7" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".slab."0.4.9" = overridableMkRustCrate (profileName: rec { name = "slab"; - version = "0.4.7"; + version = "0.4.9"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "4614a76b2a8be0058caa9dbbaf66d988527d86d003c11a94fbd335d7661edcef"; }; + src = fetchCratesIo { inherit name version; sha256 = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67"; }; features = builtins.concatLists [ [ "default" ] [ "std" ] @@ -3414,39 +4476,39 @@ in }; }); - "registry+https://github.com/rust-lang/crates.io-index".smallvec."1.9.0" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".smallvec."1.13.1" = overridableMkRustCrate (profileName: rec { name = "smallvec"; - version = "1.9.0"; + version = "1.13.1"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "2fd0db749597d91ff862fd1d55ea87f7855a744a8425a64695b6fca237d1dad1"; }; + src = fetchCratesIo { inherit name version; sha256 = "e6ecd384b10a64542d77071bd64bd7b231f4ed5940fba55e98c3de13824cf3d7"; }; }); - "registry+https://github.com/rust-lang/crates.io-index".smol_str."0.1.23" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".smol_str."0.1.24" = overridableMkRustCrate (profileName: rec { name = "smol_str"; - version = "0.1.23"; + version = "0.1.24"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "7475118a28b7e3a2e157ce0131ba8c5526ea96e90ee601d9f6bb2e286a35ab44"; }; + src = fetchCratesIo { inherit name version; sha256 = "fad6c857cbab2627dcf01ec85a623ca4e7dcb5691cbaa3d7fb7653671f0d09c9"; }; features = builtins.concatLists [ [ "default" ] [ "serde" ] [ "std" ] ]; dependencies = { - serde = rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde."1.0.144" { inherit profileName; }; + serde = rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde."1.0.196" { inherit profileName; }; }; }); - "registry+https://github.com/rust-lang/crates.io-index".socket2."0.4.7" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".socket2."0.5.5" = overridableMkRustCrate (profileName: rec { name = "socket2"; - version = "0.4.7"; + version = "0.5.5"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "02e2d2db9033d13a1567121ddd7a095ee144db4e1ca1b1bda3419bc0da294ebd"; }; + src = fetchCratesIo { inherit name version; sha256 = "7b5fac59a5cb5dd637972e5fca70daf0523c9067fcdc4842f053dae04a18f8e9"; }; features = builtins.concatLists [ [ "all" ] ]; dependencies = { - ${ if hostPlatform.isUnix then "libc" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".libc."0.2.139" { inherit profileName; }; - ${ if hostPlatform.isWindows then "winapi" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".winapi."0.3.9" { inherit profileName; }; + ${ if hostPlatform.isUnix then "libc" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".libc."0.2.153" { inherit profileName; }; + ${ if hostPlatform.isWindows then "windows_sys" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".windows-sys."0.48.0" { inherit profileName; }; }; }); @@ -3457,11 +4519,11 @@ in src = fetchCratesIo { inherit name version; sha256 = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d"; }; }); - "registry+https://github.com/rust-lang/crates.io-index".spin."0.9.4" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".spin."0.9.8" = overridableMkRustCrate (profileName: rec { name = "spin"; - version = "0.9.4"; + version = "0.9.8"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "7f6002a767bff9e83f8eeecf883ecb8011875a21ae8da43bffb817a57e78cc09"; }; + src = fetchCratesIo { inherit name version; sha256 = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67"; }; features = builtins.concatLists [ [ "barrier" ] [ "default" ] @@ -3474,27 +4536,27 @@ in [ "spin_mutex" ] ]; dependencies = { - lock_api_crate = rustPackages."registry+https://github.com/rust-lang/crates.io-index".lock_api."0.4.8" { inherit profileName; }; + lock_api_crate = rustPackages."registry+https://github.com/rust-lang/crates.io-index".lock_api."0.4.11" { inherit profileName; }; }; }); - "registry+https://github.com/rust-lang/crates.io-index".sqlformat."0.1.8" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".sqlformat."0.2.3" = overridableMkRustCrate (profileName: rec { name = "sqlformat"; - version = "0.1.8"; + version = "0.2.3"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "b4b7922be017ee70900be125523f38bdd644f4f06a1b16e8fa5a8ee8c34bffd4"; }; + src = fetchCratesIo { inherit name version; sha256 = "ce81b7bd7c4493975347ef60d8c7e8b742d4694f4c49f93e0a12ea263938176c"; }; dependencies = { - itertools = rustPackages."registry+https://github.com/rust-lang/crates.io-index".itertools."0.10.3" { inherit profileName; }; - nom = rustPackages."registry+https://github.com/rust-lang/crates.io-index".nom."7.1.1" { inherit profileName; }; + itertools = rustPackages."registry+https://github.com/rust-lang/crates.io-index".itertools."0.12.1" { inherit profileName; }; + nom = rustPackages."registry+https://github.com/rust-lang/crates.io-index".nom."7.1.3" { inherit profileName; }; unicode_categories = rustPackages."registry+https://github.com/rust-lang/crates.io-index".unicode_categories."0.1.1" { inherit profileName; }; }; }); - "registry+https://github.com/rust-lang/crates.io-index".sqlx."0.5.13" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".sqlx."0.6.3" = overridableMkRustCrate (profileName: rec { name = "sqlx"; - version = "0.5.13"; + version = "0.6.3"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "551873805652ba0d912fec5bbb0f8b4cdd96baf8e2ebf5970e5671092966019b"; }; + src = fetchCratesIo { inherit name version; sha256 = "f8de3b03a925878ed54a954f621e64bf55a3c1bd29652d0d1a17830405350188"; }; features = builtins.concatLists [ [ "_rt-tokio" ] [ "chrono" ] @@ -3509,19 +4571,20 @@ in [ "uuid" ] ]; dependencies = { - sqlx_core = rustPackages."registry+https://github.com/rust-lang/crates.io-index".sqlx-core."0.5.13" { inherit profileName; }; - sqlx_macros = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".sqlx-macros."0.5.13" { profileName = "__noProfile"; }; + sqlx_core = rustPackages."registry+https://github.com/rust-lang/crates.io-index".sqlx-core."0.6.3" { inherit profileName; }; + sqlx_macros = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".sqlx-macros."0.6.3" { profileName = "__noProfile"; }; }; }); - "registry+https://github.com/rust-lang/crates.io-index".sqlx-core."0.5.13" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".sqlx-core."0.6.3" = overridableMkRustCrate (profileName: rec { name = "sqlx-core"; - version = "0.5.13"; + version = "0.6.3"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "e48c61941ccf5ddcada342cd59e3e5173b007c509e1e8e990dafc830294d9dc5"; }; + src = fetchCratesIo { inherit name version; sha256 = "fa8241483a83a3f33aa5fff7e7d9def398ff9990b2752b6c6112b83c6d246029"; }; features = builtins.concatLists [ [ "_rt-tokio" ] [ "_tls-rustls" ] + [ "any" ] [ "base64" ] [ "chrono" ] [ "crc" ] @@ -3537,71 +4600,72 @@ in [ "rand" ] [ "runtime-tokio-rustls" ] [ "rustls" ] + [ "rustls-pemfile" ] [ "serde" ] [ "serde_json" ] - [ "sha-1" ] + [ "sha1" ] [ "sha2" ] [ "tokio-stream" ] [ "uuid" ] - [ "webpki" ] [ "webpki-roots" ] [ "whoami" ] ]; dependencies = { - ahash = rustPackages."registry+https://github.com/rust-lang/crates.io-index".ahash."0.7.6" { inherit profileName; }; - atoi = rustPackages."registry+https://github.com/rust-lang/crates.io-index".atoi."0.4.0" { inherit profileName; }; - base64 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".base64."0.13.0" { inherit profileName; }; + ahash = rustPackages."registry+https://github.com/rust-lang/crates.io-index".ahash."0.7.8" { inherit profileName; }; + atoi = rustPackages."registry+https://github.com/rust-lang/crates.io-index".atoi."1.0.0" { inherit profileName; }; + base64 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".base64."0.13.1" { inherit profileName; }; bitflags = rustPackages."registry+https://github.com/rust-lang/crates.io-index".bitflags."1.3.2" { inherit profileName; }; - byteorder = rustPackages."registry+https://github.com/rust-lang/crates.io-index".byteorder."1.4.3" { inherit profileName; }; - bytes = rustPackages."registry+https://github.com/rust-lang/crates.io-index".bytes."1.2.1" { inherit profileName; }; - chrono = rustPackages."registry+https://github.com/rust-lang/crates.io-index".chrono."0.4.22" { inherit profileName; }; - crc = rustPackages."registry+https://github.com/rust-lang/crates.io-index".crc."2.1.0" { inherit profileName; }; - crossbeam_queue = rustPackages."registry+https://github.com/rust-lang/crates.io-index".crossbeam-queue."0.3.6" { inherit profileName; }; + byteorder = rustPackages."registry+https://github.com/rust-lang/crates.io-index".byteorder."1.5.0" { inherit profileName; }; + bytes = rustPackages."registry+https://github.com/rust-lang/crates.io-index".bytes."1.5.0" { inherit profileName; }; + chrono = rustPackages."registry+https://github.com/rust-lang/crates.io-index".chrono."0.4.34" { inherit profileName; }; + crc = rustPackages."registry+https://github.com/rust-lang/crates.io-index".crc."3.0.1" { inherit profileName; }; + crossbeam_queue = rustPackages."registry+https://github.com/rust-lang/crates.io-index".crossbeam-queue."0.3.11" { inherit profileName; }; dirs = rustPackages."registry+https://github.com/rust-lang/crates.io-index".dirs."4.0.0" { inherit profileName; }; - either = rustPackages."registry+https://github.com/rust-lang/crates.io-index".either."1.8.0" { inherit profileName; }; + dotenvy = rustPackages."registry+https://github.com/rust-lang/crates.io-index".dotenvy."0.15.7" { inherit profileName; }; + either = rustPackages."registry+https://github.com/rust-lang/crates.io-index".either."1.10.0" { inherit profileName; }; event_listener = rustPackages."registry+https://github.com/rust-lang/crates.io-index".event-listener."2.5.3" { inherit profileName; }; - futures_channel = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-channel."0.3.24" { inherit profileName; }; - futures_core = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-core."0.3.24" { inherit profileName; }; - futures_intrusive = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-intrusive."0.4.0" { inherit profileName; }; - futures_util = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-util."0.3.24" { inherit profileName; }; - hashlink = rustPackages."registry+https://github.com/rust-lang/crates.io-index".hashlink."0.7.0" { inherit profileName; }; + futures_channel = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-channel."0.3.30" { inherit profileName; }; + futures_core = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-core."0.3.30" { inherit profileName; }; + futures_intrusive = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-intrusive."0.4.2" { inherit profileName; }; + futures_util = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-util."0.3.30" { inherit profileName; }; + hashlink = rustPackages."registry+https://github.com/rust-lang/crates.io-index".hashlink."0.8.4" { inherit profileName; }; hex = rustPackages."registry+https://github.com/rust-lang/crates.io-index".hex."0.4.3" { inherit profileName; }; - hkdf = rustPackages."registry+https://github.com/rust-lang/crates.io-index".hkdf."0.12.3" { inherit profileName; }; + hkdf = rustPackages."registry+https://github.com/rust-lang/crates.io-index".hkdf."0.12.4" { inherit profileName; }; hmac = rustPackages."registry+https://github.com/rust-lang/crates.io-index".hmac."0.12.1" { inherit profileName; }; - indexmap = rustPackages."registry+https://github.com/rust-lang/crates.io-index".indexmap."1.9.1" { inherit profileName; }; - itoa = rustPackages."registry+https://github.com/rust-lang/crates.io-index".itoa."1.0.3" { inherit profileName; }; - libc = rustPackages."registry+https://github.com/rust-lang/crates.io-index".libc."0.2.139" { inherit profileName; }; - log = rustPackages."registry+https://github.com/rust-lang/crates.io-index".log."0.4.17" { inherit profileName; }; - md5 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".md-5."0.10.4" { inherit profileName; }; - memchr = rustPackages."registry+https://github.com/rust-lang/crates.io-index".memchr."2.5.0" { inherit profileName; }; - once_cell = rustPackages."registry+https://github.com/rust-lang/crates.io-index".once_cell."1.14.0" { inherit profileName; }; - paste = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".paste."1.0.9" { profileName = "__noProfile"; }; - percent_encoding = rustPackages."registry+https://github.com/rust-lang/crates.io-index".percent-encoding."2.1.0" { inherit profileName; }; + indexmap = rustPackages."registry+https://github.com/rust-lang/crates.io-index".indexmap."1.9.3" { inherit profileName; }; + itoa = rustPackages."registry+https://github.com/rust-lang/crates.io-index".itoa."1.0.10" { inherit profileName; }; + libc = rustPackages."registry+https://github.com/rust-lang/crates.io-index".libc."0.2.153" { inherit profileName; }; + log = rustPackages."registry+https://github.com/rust-lang/crates.io-index".log."0.4.20" { inherit profileName; }; + md5 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".md-5."0.10.6" { inherit profileName; }; + memchr = rustPackages."registry+https://github.com/rust-lang/crates.io-index".memchr."2.7.1" { inherit profileName; }; + once_cell = rustPackages."registry+https://github.com/rust-lang/crates.io-index".once_cell."1.19.0" { inherit profileName; }; + paste = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".paste."1.0.14" { profileName = "__noProfile"; }; + percent_encoding = rustPackages."registry+https://github.com/rust-lang/crates.io-index".percent-encoding."2.3.1" { inherit profileName; }; rand = rustPackages."registry+https://github.com/rust-lang/crates.io-index".rand."0.8.5" { inherit profileName; }; - rustls = rustPackages."registry+https://github.com/rust-lang/crates.io-index".rustls."0.19.1" { inherit profileName; }; - serde = rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde."1.0.144" { inherit profileName; }; - serde_json = rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde_json."1.0.85" { inherit profileName; }; - sha1 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".sha-1."0.10.0" { inherit profileName; }; - sha2 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".sha2."0.10.5" { inherit profileName; }; - smallvec = rustPackages."registry+https://github.com/rust-lang/crates.io-index".smallvec."1.9.0" { inherit profileName; }; - sqlformat = rustPackages."registry+https://github.com/rust-lang/crates.io-index".sqlformat."0.1.8" { inherit profileName; }; - sqlx_rt = rustPackages."registry+https://github.com/rust-lang/crates.io-index".sqlx-rt."0.5.13" { inherit profileName; }; - stringprep = rustPackages."registry+https://github.com/rust-lang/crates.io-index".stringprep."0.1.2" { inherit profileName; }; - thiserror = rustPackages."registry+https://github.com/rust-lang/crates.io-index".thiserror."1.0.34" { inherit profileName; }; - tokio_stream = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tokio-stream."0.1.9" { inherit profileName; }; - url = rustPackages."registry+https://github.com/rust-lang/crates.io-index".url."2.2.2" { inherit profileName; }; - uuid = rustPackages."registry+https://github.com/rust-lang/crates.io-index".uuid."0.8.2" { inherit profileName; }; - webpki = rustPackages."registry+https://github.com/rust-lang/crates.io-index".webpki."0.21.4" { inherit profileName; }; - webpki_roots = rustPackages."registry+https://github.com/rust-lang/crates.io-index".webpki-roots."0.21.1" { inherit profileName; }; - whoami = rustPackages."registry+https://github.com/rust-lang/crates.io-index".whoami."1.2.1" { inherit profileName; }; - }; - }); - - "registry+https://github.com/rust-lang/crates.io-index".sqlx-macros."0.5.13" = overridableMkRustCrate (profileName: rec { + rustls = rustPackages."registry+https://github.com/rust-lang/crates.io-index".rustls."0.20.9" { inherit profileName; }; + rustls_pemfile = rustPackages."registry+https://github.com/rust-lang/crates.io-index".rustls-pemfile."1.0.4" { inherit profileName; }; + serde = rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde."1.0.196" { inherit profileName; }; + serde_json = rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde_json."1.0.113" { inherit profileName; }; + sha1 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".sha1."0.10.6" { inherit profileName; }; + sha2 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".sha2."0.10.8" { inherit profileName; }; + smallvec = rustPackages."registry+https://github.com/rust-lang/crates.io-index".smallvec."1.13.1" { inherit profileName; }; + sqlformat = rustPackages."registry+https://github.com/rust-lang/crates.io-index".sqlformat."0.2.3" { inherit profileName; }; + sqlx_rt = rustPackages."registry+https://github.com/rust-lang/crates.io-index".sqlx-rt."0.6.3" { inherit profileName; }; + stringprep = rustPackages."registry+https://github.com/rust-lang/crates.io-index".stringprep."0.1.4" { inherit profileName; }; + thiserror = rustPackages."registry+https://github.com/rust-lang/crates.io-index".thiserror."1.0.57" { inherit profileName; }; + tokio_stream = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tokio-stream."0.1.14" { inherit profileName; }; + url = rustPackages."registry+https://github.com/rust-lang/crates.io-index".url."2.5.0" { inherit profileName; }; + uuid = rustPackages."registry+https://github.com/rust-lang/crates.io-index".uuid."1.7.0" { inherit profileName; }; + webpki_roots = rustPackages."registry+https://github.com/rust-lang/crates.io-index".webpki-roots."0.22.6" { inherit profileName; }; + whoami = rustPackages."registry+https://github.com/rust-lang/crates.io-index".whoami."1.4.1" { inherit profileName; }; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".sqlx-macros."0.6.3" = overridableMkRustCrate (profileName: rec { name = "sqlx-macros"; - version = "0.5.13"; + version = "0.6.3"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "bc0fba2b0cae21fc00fe6046f8baa4c7fcb49e379f0f592b04696607f69ed2e1"; }; + src = fetchCratesIo { inherit name version; sha256 = "9966e64ae989e7e575b19d7265cb79d7fc3cbbdf179835cb0d716f294c2049c9"; }; features = builtins.concatLists [ [ "_rt-tokio" ] [ "chrono" ] @@ -3617,28 +4681,28 @@ in [ "uuid" ] ]; dependencies = { - dotenv = rustPackages."registry+https://github.com/rust-lang/crates.io-index".dotenv."0.15.0" { inherit profileName; }; - either = rustPackages."registry+https://github.com/rust-lang/crates.io-index".either."1.8.0" { inherit profileName; }; - heck = rustPackages."registry+https://github.com/rust-lang/crates.io-index".heck."0.4.0" { inherit profileName; }; + dotenvy = rustPackages."registry+https://github.com/rust-lang/crates.io-index".dotenvy."0.15.7" { inherit profileName; }; + either = rustPackages."registry+https://github.com/rust-lang/crates.io-index".either."1.10.0" { inherit profileName; }; + heck = rustPackages."registry+https://github.com/rust-lang/crates.io-index".heck."0.4.1" { inherit profileName; }; hex = rustPackages."registry+https://github.com/rust-lang/crates.io-index".hex."0.4.3" { inherit profileName; }; - once_cell = rustPackages."registry+https://github.com/rust-lang/crates.io-index".once_cell."1.14.0" { inherit profileName; }; - proc_macro2 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".proc-macro2."1.0.43" { inherit profileName; }; - quote = rustPackages."registry+https://github.com/rust-lang/crates.io-index".quote."1.0.21" { inherit profileName; }; - serde = rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde."1.0.144" { inherit profileName; }; - serde_json = rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde_json."1.0.85" { inherit profileName; }; - sha2 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".sha2."0.10.5" { inherit profileName; }; - sqlx_core = rustPackages."registry+https://github.com/rust-lang/crates.io-index".sqlx-core."0.5.13" { inherit profileName; }; - sqlx_rt = rustPackages."registry+https://github.com/rust-lang/crates.io-index".sqlx-rt."0.5.13" { inherit profileName; }; - syn = rustPackages."registry+https://github.com/rust-lang/crates.io-index".syn."1.0.99" { inherit profileName; }; - url = rustPackages."registry+https://github.com/rust-lang/crates.io-index".url."2.2.2" { inherit profileName; }; + once_cell = rustPackages."registry+https://github.com/rust-lang/crates.io-index".once_cell."1.19.0" { inherit profileName; }; + proc_macro2 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".proc-macro2."1.0.78" { inherit profileName; }; + quote = rustPackages."registry+https://github.com/rust-lang/crates.io-index".quote."1.0.35" { inherit profileName; }; + serde = rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde."1.0.196" { inherit profileName; }; + serde_json = rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde_json."1.0.113" { inherit profileName; }; + sha2 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".sha2."0.10.8" { inherit profileName; }; + sqlx_core = rustPackages."registry+https://github.com/rust-lang/crates.io-index".sqlx-core."0.6.3" { inherit profileName; }; + sqlx_rt = rustPackages."registry+https://github.com/rust-lang/crates.io-index".sqlx-rt."0.6.3" { inherit profileName; }; + syn = rustPackages."registry+https://github.com/rust-lang/crates.io-index".syn."1.0.109" { inherit profileName; }; + url = rustPackages."registry+https://github.com/rust-lang/crates.io-index".url."2.5.0" { inherit profileName; }; }; }); - "registry+https://github.com/rust-lang/crates.io-index".sqlx-rt."0.5.13" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".sqlx-rt."0.6.3" = overridableMkRustCrate (profileName: rec { name = "sqlx-rt"; - version = "0.5.13"; + version = "0.6.3"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "4db708cd3e459078f85f39f96a00960bd841f66ee2a669e90bf36907f5a79aae"; }; + src = fetchCratesIo { inherit name version; sha256 = "804d3f245f894e61b1e6263c84b23ca675d96753b5abfd5cc8597d86806e8024"; }; features = builtins.concatLists [ [ "_rt-tokio" ] [ "_tls-rustls" ] @@ -3648,9 +4712,9 @@ in [ "tokio-rustls" ] ]; dependencies = { - once_cell = rustPackages."registry+https://github.com/rust-lang/crates.io-index".once_cell."1.14.0" { inherit profileName; }; - tokio = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tokio."1.25.0" { inherit profileName; }; - tokio_rustls = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tokio-rustls."0.22.0" { inherit profileName; }; + once_cell = rustPackages."registry+https://github.com/rust-lang/crates.io-index".once_cell."1.19.0" { inherit profileName; }; + tokio = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tokio."1.36.0" { inherit profileName; }; + tokio_rustls = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tokio-rustls."0.23.4" { inherit profileName; }; }; }); @@ -3661,14 +4725,15 @@ in src = fetchCratesIo { inherit name version; sha256 = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f"; }; }); - "registry+https://github.com/rust-lang/crates.io-index".stringprep."0.1.2" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".stringprep."0.1.4" = overridableMkRustCrate (profileName: rec { name = "stringprep"; - version = "0.1.2"; + version = "0.1.4"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "8ee348cb74b87454fff4b551cbf727025810a004f88aeacae7f85b87f4e9a1c1"; }; + src = fetchCratesIo { inherit name version; sha256 = "bb41d74e231a107a1b4ee36bd1214b11285b77768d2e3824aedafa988fd36ee6"; }; dependencies = { - unicode_bidi = rustPackages."registry+https://github.com/rust-lang/crates.io-index".unicode-bidi."0.3.8" { inherit profileName; }; - unicode_normalization = rustPackages."registry+https://github.com/rust-lang/crates.io-index".unicode-normalization."0.1.21" { inherit profileName; }; + finl_unicode = rustPackages."registry+https://github.com/rust-lang/crates.io-index".finl_unicode."1.2.0" { inherit profileName; }; + unicode_bidi = rustPackages."registry+https://github.com/rust-lang/crates.io-index".unicode-bidi."0.3.15" { inherit profileName; }; + unicode_normalization = rustPackages."registry+https://github.com/rust-lang/crates.io-index".unicode-normalization."0.1.22" { inherit profileName; }; }; }); @@ -3679,48 +4744,73 @@ in src = fetchCratesIo { inherit name version; sha256 = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623"; }; }); - "registry+https://github.com/rust-lang/crates.io-index".structmeta."0.1.5" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".structmeta."0.1.6" = overridableMkRustCrate (profileName: rec { name = "structmeta"; - version = "0.1.5"; + version = "0.1.6"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "1bd9c2155aa89fb2c2cb87d99a610c689e7c47099b3e9f1c8a8f53faf4e3d2e3"; }; + src = fetchCratesIo { inherit name version; sha256 = "104842d6278bf64aa9d2f182ba4bde31e8aec7a131d29b7f444bb9b344a09e2a"; }; dependencies = { - proc_macro2 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".proc-macro2."1.0.43" { inherit profileName; }; - quote = rustPackages."registry+https://github.com/rust-lang/crates.io-index".quote."1.0.21" { inherit profileName; }; - structmeta_derive = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".structmeta-derive."0.1.5" { profileName = "__noProfile"; }; - syn = rustPackages."registry+https://github.com/rust-lang/crates.io-index".syn."1.0.99" { inherit profileName; }; + proc_macro2 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".proc-macro2."1.0.78" { inherit profileName; }; + quote = rustPackages."registry+https://github.com/rust-lang/crates.io-index".quote."1.0.35" { inherit profileName; }; + structmeta_derive = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".structmeta-derive."0.1.6" { profileName = "__noProfile"; }; + syn = rustPackages."registry+https://github.com/rust-lang/crates.io-index".syn."1.0.109" { inherit profileName; }; }; }); - "registry+https://github.com/rust-lang/crates.io-index".structmeta-derive."0.1.5" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".structmeta-derive."0.1.6" = overridableMkRustCrate (profileName: rec { name = "structmeta-derive"; - version = "0.1.5"; + version = "0.1.6"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "bafede0d0a2f21910f36d47b1558caae3076ed80f6f3ad0fc85a91e6ba7e5938"; }; + src = fetchCratesIo { inherit name version; sha256 = "24420be405b590e2d746d83b01f09af673270cf80e9b003a5fa7b651c58c7d93"; }; dependencies = { - proc_macro2 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".proc-macro2."1.0.43" { inherit profileName; }; - quote = rustPackages."registry+https://github.com/rust-lang/crates.io-index".quote."1.0.21" { inherit profileName; }; - syn = rustPackages."registry+https://github.com/rust-lang/crates.io-index".syn."1.0.99" { inherit profileName; }; + proc_macro2 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".proc-macro2."1.0.78" { inherit profileName; }; + quote = rustPackages."registry+https://github.com/rust-lang/crates.io-index".quote."1.0.35" { inherit profileName; }; + syn = rustPackages."registry+https://github.com/rust-lang/crates.io-index".syn."1.0.109" { inherit profileName; }; }; }); - "registry+https://github.com/rust-lang/crates.io-index".subtle."2.4.1" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".subtle."2.5.0" = overridableMkRustCrate (profileName: rec { name = "subtle"; - version = "2.4.1"; + version = "2.5.0"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc"; }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".syn."1.0.109" = overridableMkRustCrate (profileName: rec { + name = "syn"; + version = "1.0.109"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601"; }; + src = fetchCratesIo { inherit name version; sha256 = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237"; }; + features = builtins.concatLists [ + [ "clone-impls" ] + [ "default" ] + [ "derive" ] + [ "extra-traits" ] + [ "full" ] + [ "parsing" ] + [ "printing" ] + [ "proc-macro" ] + [ "quote" ] + [ "visit" ] + ]; + dependencies = { + proc_macro2 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".proc-macro2."1.0.78" { inherit profileName; }; + quote = rustPackages."registry+https://github.com/rust-lang/crates.io-index".quote."1.0.35" { inherit profileName; }; + unicode_ident = rustPackages."registry+https://github.com/rust-lang/crates.io-index".unicode-ident."1.0.12" { inherit profileName; }; + }; }); - "registry+https://github.com/rust-lang/crates.io-index".syn."1.0.99" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".syn."2.0.49" = overridableMkRustCrate (profileName: rec { name = "syn"; - version = "1.0.99"; + version = "2.0.49"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "58dbef6ec655055e20b86b15a8cc6d439cca19b667537ac6a1369572d151ab13"; }; + src = fetchCratesIo { inherit name version; sha256 = "915aea9e586f80826ee59f8453c1101f9d1c4b3964cd2460185ee8e299ada496"; }; features = builtins.concatLists [ [ "clone-impls" ] [ "default" ] [ "derive" ] [ "extra-traits" ] + [ "fold" ] [ "full" ] [ "parsing" ] [ "printing" ] @@ -3730,97 +4820,156 @@ in [ "visit-mut" ] ]; dependencies = { - proc_macro2 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".proc-macro2."1.0.43" { inherit profileName; }; - quote = rustPackages."registry+https://github.com/rust-lang/crates.io-index".quote."1.0.21" { inherit profileName; }; - unicode_ident = rustPackages."registry+https://github.com/rust-lang/crates.io-index".unicode-ident."1.0.3" { inherit profileName; }; + proc_macro2 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".proc-macro2."1.0.78" { inherit profileName; }; + quote = rustPackages."registry+https://github.com/rust-lang/crates.io-index".quote."1.0.35" { inherit profileName; }; + unicode_ident = rustPackages."registry+https://github.com/rust-lang/crates.io-index".unicode-ident."1.0.12" { inherit profileName; }; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".syn_derive."0.1.8" = overridableMkRustCrate (profileName: rec { + name = "syn_derive"; + version = "0.1.8"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "1329189c02ff984e9736652b1631330da25eaa6bc639089ed4915d25446cbe7b"; }; + features = builtins.concatLists [ + [ "default" ] + [ "full" ] + ]; + dependencies = { + proc_macro_error = rustPackages."registry+https://github.com/rust-lang/crates.io-index".proc-macro-error."1.0.4" { inherit profileName; }; + proc_macro2 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".proc-macro2."1.0.78" { inherit profileName; }; + quote = rustPackages."registry+https://github.com/rust-lang/crates.io-index".quote."1.0.35" { inherit profileName; }; + syn = rustPackages."registry+https://github.com/rust-lang/crates.io-index".syn."2.0.49" { inherit profileName; }; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".sync_wrapper."0.1.2" = overridableMkRustCrate (profileName: rec { + name = "sync_wrapper"; + version = "0.1.2"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160"; }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".system-configuration."0.5.1" = overridableMkRustCrate (profileName: rec { + name = "system-configuration"; + version = "0.5.1"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7"; }; + dependencies = { + bitflags = rustPackages."registry+https://github.com/rust-lang/crates.io-index".bitflags."1.3.2" { inherit profileName; }; + core_foundation = rustPackages."registry+https://github.com/rust-lang/crates.io-index".core-foundation."0.9.4" { inherit profileName; }; + system_configuration_sys = rustPackages."registry+https://github.com/rust-lang/crates.io-index".system-configuration-sys."0.5.0" { inherit profileName; }; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".system-configuration-sys."0.5.0" = overridableMkRustCrate (profileName: rec { + name = "system-configuration-sys"; + version = "0.5.0"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "a75fb188eb626b924683e3b95e3a48e63551fcfb51949de2f06a9d91dbee93c9"; }; + dependencies = { + core_foundation_sys = rustPackages."registry+https://github.com/rust-lang/crates.io-index".core-foundation-sys."0.8.6" { inherit profileName; }; + libc = rustPackages."registry+https://github.com/rust-lang/crates.io-index".libc."0.2.153" { inherit profileName; }; }; }); - "registry+https://github.com/rust-lang/crates.io-index".tempfile."3.4.0" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".tap."1.0.1" = overridableMkRustCrate (profileName: rec { + name = "tap"; + version = "1.0.1"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369"; }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".tempfile."3.10.0" = overridableMkRustCrate (profileName: rec { name = "tempfile"; - version = "3.4.0"; + version = "3.10.0"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "af18f7ae1acd354b992402e9ec5864359d693cd8a79dcbef59f76891701c1e95"; }; + src = fetchCratesIo { inherit name version; sha256 = "a365e8cd18e44762ef95d87f284f4b5cd04107fec2ff3052bd6a3e6069669e67"; }; dependencies = { cfg_if = rustPackages."registry+https://github.com/rust-lang/crates.io-index".cfg-if."1.0.0" { inherit profileName; }; - fastrand = rustPackages."registry+https://github.com/rust-lang/crates.io-index".fastrand."1.8.0" { inherit profileName; }; - ${ if hostPlatform.parsed.kernel.name == "redox" then "syscall" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".redox_syscall."0.2.16" { inherit profileName; }; - ${ if hostPlatform.isUnix || hostPlatform.parsed.kernel.name == "wasi" then "rustix" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".rustix."0.36.9" { inherit profileName; }; - ${ if hostPlatform.isWindows then "windows_sys" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".windows-sys."0.42.0" { inherit profileName; }; + fastrand = rustPackages."registry+https://github.com/rust-lang/crates.io-index".fastrand."2.0.1" { inherit profileName; }; + ${ if hostPlatform.isUnix || hostPlatform.parsed.kernel.name == "wasi" then "rustix" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".rustix."0.38.31" { inherit profileName; }; + ${ if hostPlatform.isWindows then "windows_sys" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".windows-sys."0.52.0" { inherit profileName; }; }; }); - "registry+https://github.com/rust-lang/crates.io-index".thiserror."1.0.34" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".thiserror."1.0.57" = overridableMkRustCrate (profileName: rec { name = "thiserror"; - version = "1.0.34"; + version = "1.0.57"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "8c1b05ca9d106ba7d2e31a9dab4a64e7be2cce415321966ea3132c49a656e252"; }; + src = fetchCratesIo { inherit name version; sha256 = "1e45bcbe8ed29775f228095caf2cd67af7a4ccf756ebff23a306bf3e8b47b24b"; }; dependencies = { - thiserror_impl = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".thiserror-impl."1.0.34" { profileName = "__noProfile"; }; + thiserror_impl = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".thiserror-impl."1.0.57" { profileName = "__noProfile"; }; }; }); - "registry+https://github.com/rust-lang/crates.io-index".thiserror-impl."1.0.34" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".thiserror-impl."1.0.57" = overridableMkRustCrate (profileName: rec { name = "thiserror-impl"; - version = "1.0.34"; + version = "1.0.57"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "e8f2591983642de85c921015f3f070c665a197ed69e417af436115e3a1407487"; }; + src = fetchCratesIo { inherit name version; sha256 = "a953cb265bef375dae3de6663da4d3804eee9682ea80d8e2542529b73c531c81"; }; dependencies = { - proc_macro2 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".proc-macro2."1.0.43" { inherit profileName; }; - quote = rustPackages."registry+https://github.com/rust-lang/crates.io-index".quote."1.0.21" { inherit profileName; }; - syn = rustPackages."registry+https://github.com/rust-lang/crates.io-index".syn."1.0.99" { inherit profileName; }; + proc_macro2 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".proc-macro2."1.0.78" { inherit profileName; }; + quote = rustPackages."registry+https://github.com/rust-lang/crates.io-index".quote."1.0.35" { inherit profileName; }; + syn = rustPackages."registry+https://github.com/rust-lang/crates.io-index".syn."2.0.49" { inherit profileName; }; }; }); - "registry+https://github.com/rust-lang/crates.io-index".thread_local."1.1.4" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".thread_local."1.1.7" = overridableMkRustCrate (profileName: rec { name = "thread_local"; - version = "1.1.4"; - registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "5516c27b78311c50bf42c071425c560ac799b11c30b31f87e3081965fe5e0180"; }; - dependencies = { - once_cell = rustPackages."registry+https://github.com/rust-lang/crates.io-index".once_cell."1.14.0" { inherit profileName; }; - }; - }); - - "registry+https://github.com/rust-lang/crates.io-index".time."0.1.44" = overridableMkRustCrate (profileName: rec { - name = "time"; - version = "0.1.44"; + version = "1.1.7"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "6db9e6914ab8b1ae1c260a4ae7a49b6c5611b40328a735b21862567685e73255"; }; + src = fetchCratesIo { inherit name version; sha256 = "3fdd6f064ccff2d6567adcb3873ca630700f00b5ad3f060c25b5dcfd9a4ce152"; }; dependencies = { - libc = rustPackages."registry+https://github.com/rust-lang/crates.io-index".libc."0.2.139" { inherit profileName; }; - ${ if hostPlatform.parsed.kernel.name == "wasi" then "wasi" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".wasi."0.10.0+wasi-snapshot-preview1" { inherit profileName; }; - ${ if hostPlatform.isWindows then "winapi" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".winapi."0.3.9" { inherit profileName; }; + cfg_if = rustPackages."registry+https://github.com/rust-lang/crates.io-index".cfg-if."1.0.0" { inherit profileName; }; + once_cell = rustPackages."registry+https://github.com/rust-lang/crates.io-index".once_cell."1.19.0" { inherit profileName; }; }; }); - "registry+https://github.com/rust-lang/crates.io-index".time."0.3.14" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".time."0.3.34" = overridableMkRustCrate (profileName: rec { name = "time"; - version = "0.3.14"; + version = "0.3.34"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "3c3f9a28b618c3a6b9251b6908e9c99e04b9e5c02e6581ccbb67d59c34ef7f9b"; }; + src = fetchCratesIo { inherit name version; sha256 = "c8248b6521bb14bc45b4067159b9b6ad792e2d6d754d6c41fb50e29fefe38749"; }; features = builtins.concatLists [ [ "alloc" ] + [ "default" ] [ "formatting" ] - [ "itoa" ] [ "macros" ] [ "parsing" ] [ "std" ] - [ "time-macros" ] ]; dependencies = { - itoa = rustPackages."registry+https://github.com/rust-lang/crates.io-index".itoa."1.0.3" { inherit profileName; }; - ${ if hostPlatform.isUnix then "libc" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".libc."0.2.139" { inherit profileName; }; - ${ if hostPlatform.isUnix then "num_threads" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".num_threads."0.1.6" { inherit profileName; }; - time_macros = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".time-macros."0.2.4" { profileName = "__noProfile"; }; + deranged = rustPackages."registry+https://github.com/rust-lang/crates.io-index".deranged."0.3.11" { inherit profileName; }; + itoa = rustPackages."registry+https://github.com/rust-lang/crates.io-index".itoa."1.0.10" { inherit profileName; }; + num_conv = rustPackages."registry+https://github.com/rust-lang/crates.io-index".num-conv."0.1.0" { inherit profileName; }; + powerfmt = rustPackages."registry+https://github.com/rust-lang/crates.io-index".powerfmt."0.2.0" { inherit profileName; }; + serde = rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde."1.0.196" { inherit profileName; }; + time_core = rustPackages."registry+https://github.com/rust-lang/crates.io-index".time-core."0.1.2" { inherit profileName; }; + time_macros = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".time-macros."0.2.17" { profileName = "__noProfile"; }; }; }); - "registry+https://github.com/rust-lang/crates.io-index".time-macros."0.2.4" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".time-core."0.1.2" = overridableMkRustCrate (profileName: rec { + name = "time-core"; + version = "0.1.2"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3"; }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".time-macros."0.2.17" = overridableMkRustCrate (profileName: rec { name = "time-macros"; - version = "0.2.4"; + version = "0.2.17"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "42657b1a6f4d817cda8e7a0ace261fe0cc946cf3a80314390b22cc61ae080792"; }; + src = fetchCratesIo { inherit name version; sha256 = "7ba3a3ef41e6672a2f0f001392bb5dcd3ff0a9992d618ca761a11c3121547774"; }; + features = builtins.concatLists [ + [ "formatting" ] + [ "parsing" ] + ]; + dependencies = { + num_conv = rustPackages."registry+https://github.com/rust-lang/crates.io-index".num-conv."0.1.0" { inherit profileName; }; + time_core = rustPackages."registry+https://github.com/rust-lang/crates.io-index".time-core."0.1.2" { inherit profileName; }; + }; }); "registry+https://github.com/rust-lang/crates.io-index".tinyvec."1.6.0" = overridableMkRustCrate (profileName: rec { @@ -3834,22 +4983,22 @@ in [ "tinyvec_macros" ] ]; dependencies = { - tinyvec_macros = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tinyvec_macros."0.1.0" { inherit profileName; }; + tinyvec_macros = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tinyvec_macros."0.1.1" { inherit profileName; }; }; }); - "registry+https://github.com/rust-lang/crates.io-index".tinyvec_macros."0.1.0" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".tinyvec_macros."0.1.1" = overridableMkRustCrate (profileName: rec { name = "tinyvec_macros"; - version = "0.1.0"; + version = "0.1.1"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c"; }; + src = fetchCratesIo { inherit name version; sha256 = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20"; }; }); - "registry+https://github.com/rust-lang/crates.io-index".tokio."1.25.0" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".tokio."1.36.0" = overridableMkRustCrate (profileName: rec { name = "tokio"; - version = "1.25.0"; + version = "1.36.0"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "c8e00990ebabbe4c14c08aca901caed183ecd5c09562a12c824bb53d3c3fd3af"; }; + src = fetchCratesIo { inherit name version; sha256 = "61285f6515fa018fb2d1e46eb21223fff441ee8db5d0f1435e8ab4f5cdb80931"; }; features = builtins.concatLists [ [ "bytes" ] [ "default" ] @@ -3859,7 +5008,6 @@ in [ "io-util" ] [ "libc" ] [ "macros" ] - [ "memchr" ] [ "mio" ] [ "net" ] [ "num_cpus" ] @@ -3876,20 +5024,17 @@ in [ "windows-sys" ] ]; dependencies = { - bytes = rustPackages."registry+https://github.com/rust-lang/crates.io-index".bytes."1.2.1" { inherit profileName; }; - ${ if hostPlatform.isUnix then "libc" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".libc."0.2.139" { inherit profileName; }; - memchr = rustPackages."registry+https://github.com/rust-lang/crates.io-index".memchr."2.5.0" { inherit profileName; }; - mio = rustPackages."registry+https://github.com/rust-lang/crates.io-index".mio."0.8.4" { inherit profileName; }; - num_cpus = rustPackages."registry+https://github.com/rust-lang/crates.io-index".num_cpus."1.13.1" { inherit profileName; }; + ${ if false then "backtrace" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".backtrace."0.3.69" { inherit profileName; }; + bytes = rustPackages."registry+https://github.com/rust-lang/crates.io-index".bytes."1.5.0" { inherit profileName; }; + ${ if hostPlatform.isUnix then "libc" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".libc."0.2.153" { inherit profileName; }; + mio = rustPackages."registry+https://github.com/rust-lang/crates.io-index".mio."0.8.10" { inherit profileName; }; + num_cpus = rustPackages."registry+https://github.com/rust-lang/crates.io-index".num_cpus."1.16.0" { inherit profileName; }; parking_lot = rustPackages."registry+https://github.com/rust-lang/crates.io-index".parking_lot."0.12.1" { inherit profileName; }; - pin_project_lite = rustPackages."registry+https://github.com/rust-lang/crates.io-index".pin-project-lite."0.2.9" { inherit profileName; }; - ${ if hostPlatform.isUnix then "signal_hook_registry" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".signal-hook-registry."1.4.0" { inherit profileName; }; - ${ if !(hostPlatform.parsed.cpu.name == "wasm32" || hostPlatform.parsed.cpu.name == "wasm64") then "socket2" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".socket2."0.4.7" { inherit profileName; }; - tokio_macros = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".tokio-macros."1.8.0" { profileName = "__noProfile"; }; - ${ if hostPlatform.isWindows then "windows_sys" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".windows-sys."0.42.0" { inherit profileName; }; - }; - buildDependencies = { - autocfg = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".autocfg."1.1.0" { profileName = "__noProfile"; }; + pin_project_lite = rustPackages."registry+https://github.com/rust-lang/crates.io-index".pin-project-lite."0.2.13" { inherit profileName; }; + ${ if hostPlatform.isUnix then "signal_hook_registry" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".signal-hook-registry."1.4.1" { inherit profileName; }; + socket2 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".socket2."0.5.5" { inherit profileName; }; + tokio_macros = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".tokio-macros."2.2.0" { profileName = "__noProfile"; }; + ${ if hostPlatform.isWindows then "windows_sys" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".windows-sys."0.48.0" { inherit profileName; }; }; }); @@ -3899,20 +5044,31 @@ in registry = "registry+https://github.com/rust-lang/crates.io-index"; src = fetchCratesIo { inherit name version; sha256 = "30b74022ada614a1b4834de765f9bb43877f910cc8ce4be40e89042c9223a8bf"; }; dependencies = { - pin_project_lite = rustPackages."registry+https://github.com/rust-lang/crates.io-index".pin-project-lite."0.2.9" { inherit profileName; }; - tokio = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tokio."1.25.0" { inherit profileName; }; + pin_project_lite = rustPackages."registry+https://github.com/rust-lang/crates.io-index".pin-project-lite."0.2.13" { inherit profileName; }; + tokio = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tokio."1.36.0" { inherit profileName; }; }; }); - "registry+https://github.com/rust-lang/crates.io-index".tokio-macros."1.8.0" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".tokio-macros."2.2.0" = overridableMkRustCrate (profileName: rec { name = "tokio-macros"; - version = "1.8.0"; + version = "2.2.0"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b"; }; + dependencies = { + proc_macro2 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".proc-macro2."1.0.78" { inherit profileName; }; + quote = rustPackages."registry+https://github.com/rust-lang/crates.io-index".quote."1.0.35" { inherit profileName; }; + syn = rustPackages."registry+https://github.com/rust-lang/crates.io-index".syn."2.0.49" { inherit profileName; }; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".tokio-native-tls."0.3.1" = overridableMkRustCrate (profileName: rec { + name = "tokio-native-tls"; + version = "0.3.1"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "9724f9a975fb987ef7a3cd9be0350edcbe130698af5b8f7a631e23d42d052484"; }; + src = fetchCratesIo { inherit name version; sha256 = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2"; }; dependencies = { - proc_macro2 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".proc-macro2."1.0.43" { inherit profileName; }; - quote = rustPackages."registry+https://github.com/rust-lang/crates.io-index".quote."1.0.21" { inherit profileName; }; - syn = rustPackages."registry+https://github.com/rust-lang/crates.io-index".syn."1.0.99" { inherit profileName; }; + native_tls = rustPackages."registry+https://github.com/rust-lang/crates.io-index".native-tls."0.2.11" { inherit profileName; }; + tokio = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tokio."1.36.0" { inherit profileName; }; }; }); @@ -3923,7 +5079,7 @@ in src = fetchCratesIo { inherit name version; sha256 = "bc6844de72e57df1980054b38be3a9f4702aba4858be64dd700181a8a6d0e1b6"; }; dependencies = { rustls = rustPackages."registry+https://github.com/rust-lang/crates.io-index".rustls."0.19.1" { inherit profileName; }; - tokio = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tokio."1.25.0" { inherit profileName; }; + tokio = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tokio."1.36.0" { inherit profileName; }; webpki = rustPackages."registry+https://github.com/rust-lang/crates.io-index".webpki."0.21.4" { inherit profileName; }; }; }); @@ -3939,26 +5095,66 @@ in [ "tls12" ] ]; dependencies = { - rustls = rustPackages."registry+https://github.com/rust-lang/crates.io-index".rustls."0.20.6" { inherit profileName; }; - tokio = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tokio."1.25.0" { inherit profileName; }; - webpki = rustPackages."registry+https://github.com/rust-lang/crates.io-index".webpki."0.22.0" { inherit profileName; }; + rustls = rustPackages."registry+https://github.com/rust-lang/crates.io-index".rustls."0.20.9" { inherit profileName; }; + tokio = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tokio."1.36.0" { inherit profileName; }; + webpki = rustPackages."registry+https://github.com/rust-lang/crates.io-index".webpki."0.22.4" { inherit profileName; }; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".tokio-rustls."0.24.1" = overridableMkRustCrate (profileName: rec { + name = "tokio-rustls"; + version = "0.24.1"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081"; }; + features = builtins.concatLists [ + [ "default" ] + [ "logging" ] + [ "tls12" ] + ]; + dependencies = { + rustls = rustPackages."registry+https://github.com/rust-lang/crates.io-index".rustls."0.21.10" { inherit profileName; }; + tokio = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tokio."1.36.0" { inherit profileName; }; }; }); - "registry+https://github.com/rust-lang/crates.io-index".tokio-stream."0.1.9" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".tokio-stream."0.1.14" = overridableMkRustCrate (profileName: rec { name = "tokio-stream"; - version = "0.1.9"; + version = "0.1.14"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "df54d54117d6fdc4e4fea40fe1e4e566b3505700e148a6827e59b34b0d2600d9"; }; + src = fetchCratesIo { inherit name version; sha256 = "397c988d37662c7dda6d2208364a706264bf3d6138b11d436cbac0ad38832842"; }; features = builtins.concatLists [ [ "default" ] [ "fs" ] [ "time" ] ]; dependencies = { - futures_core = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-core."0.3.24" { inherit profileName; }; - pin_project_lite = rustPackages."registry+https://github.com/rust-lang/crates.io-index".pin-project-lite."0.2.9" { inherit profileName; }; - tokio = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tokio."1.25.0" { inherit profileName; }; + futures_core = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-core."0.3.30" { inherit profileName; }; + pin_project_lite = rustPackages."registry+https://github.com/rust-lang/crates.io-index".pin-project-lite."0.2.13" { inherit profileName; }; + tokio = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tokio."1.36.0" { inherit profileName; }; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".tokio-tungstenite."0.21.0" = overridableMkRustCrate (profileName: rec { + name = "tokio-tungstenite"; + version = "0.21.0"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "c83b561d025642014097b66e6c1bb422783339e0909e4429cde4749d1990bc38"; }; + features = builtins.concatLists [ + [ "connect" ] + [ "default" ] + [ "handshake" ] + [ "native-tls" ] + [ "native-tls-crate" ] + [ "stream" ] + [ "tokio-native-tls" ] + ]; + dependencies = { + futures_util = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-util."0.3.30" { inherit profileName; }; + log = rustPackages."registry+https://github.com/rust-lang/crates.io-index".log."0.4.20" { inherit profileName; }; + native_tls_crate = rustPackages."registry+https://github.com/rust-lang/crates.io-index".native-tls."0.2.11" { inherit profileName; }; + tokio = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tokio."1.36.0" { inherit profileName; }; + tokio_native_tls = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tokio-native-tls."0.3.1" { inherit profileName; }; + tungstenite = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tungstenite."0.21.0" { inherit profileName; }; }; }); @@ -3972,20 +5168,20 @@ in [ "default" ] ]; dependencies = { - bytes = rustPackages."registry+https://github.com/rust-lang/crates.io-index".bytes."1.2.1" { inherit profileName; }; - futures_core = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-core."0.3.24" { inherit profileName; }; - futures_sink = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-sink."0.3.24" { inherit profileName; }; - log = rustPackages."registry+https://github.com/rust-lang/crates.io-index".log."0.4.17" { inherit profileName; }; - pin_project_lite = rustPackages."registry+https://github.com/rust-lang/crates.io-index".pin-project-lite."0.2.9" { inherit profileName; }; - tokio = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tokio."1.25.0" { inherit profileName; }; + bytes = rustPackages."registry+https://github.com/rust-lang/crates.io-index".bytes."1.5.0" { inherit profileName; }; + futures_core = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-core."0.3.30" { inherit profileName; }; + futures_sink = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-sink."0.3.30" { inherit profileName; }; + log = rustPackages."registry+https://github.com/rust-lang/crates.io-index".log."0.4.20" { inherit profileName; }; + pin_project_lite = rustPackages."registry+https://github.com/rust-lang/crates.io-index".pin-project-lite."0.2.13" { inherit profileName; }; + tokio = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tokio."1.36.0" { inherit profileName; }; }; }); - "registry+https://github.com/rust-lang/crates.io-index".tokio-util."0.7.3" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".tokio-util."0.7.10" = overridableMkRustCrate (profileName: rec { name = "tokio-util"; - version = "0.7.3"; + version = "0.7.10"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "cc463cd8deddc3770d20f9852143d50bf6094e640b485cb2e189a2099085ff45"; }; + src = fetchCratesIo { inherit name version; sha256 = "5419f34732d9eb6ee4c3578b7989078579b7f039cbbb9ca2c4da015749371e15"; }; features = builtins.concatLists [ [ "codec" ] [ "default" ] @@ -3993,25 +5189,49 @@ in [ "tracing" ] ]; dependencies = { - bytes = rustPackages."registry+https://github.com/rust-lang/crates.io-index".bytes."1.2.1" { inherit profileName; }; - futures_core = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-core."0.3.24" { inherit profileName; }; - futures_sink = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-sink."0.3.24" { inherit profileName; }; - pin_project_lite = rustPackages."registry+https://github.com/rust-lang/crates.io-index".pin-project-lite."0.2.9" { inherit profileName; }; - tokio = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tokio."1.25.0" { inherit profileName; }; - tracing = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tracing."0.1.36" { inherit profileName; }; + bytes = rustPackages."registry+https://github.com/rust-lang/crates.io-index".bytes."1.5.0" { inherit profileName; }; + futures_core = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-core."0.3.30" { inherit profileName; }; + futures_sink = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-sink."0.3.30" { inherit profileName; }; + pin_project_lite = rustPackages."registry+https://github.com/rust-lang/crates.io-index".pin-project-lite."0.2.13" { inherit profileName; }; + tokio = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tokio."1.36.0" { inherit profileName; }; + tracing = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tracing."0.1.40" { inherit profileName; }; }; }); - "registry+https://github.com/rust-lang/crates.io-index".toml."0.5.9" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".toml."0.5.11" = overridableMkRustCrate (profileName: rec { name = "toml"; - version = "0.5.9"; + version = "0.5.11"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234"; }; + features = builtins.concatLists [ + [ "default" ] + ]; + dependencies = { + serde = rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde."1.0.196" { inherit profileName; }; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".toml_datetime."0.6.5" = overridableMkRustCrate (profileName: rec { + name = "toml_datetime"; + version = "0.6.5"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "3550f4e9685620ac18a50ed434eb3aec30db8ba93b0287467bca5826ea25baf1"; }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".toml_edit."0.21.1" = overridableMkRustCrate (profileName: rec { + name = "toml_edit"; + version = "0.21.1"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "8d82e1a7758622a465f8cee077614c73484dac5b836c02ff6a40d5d1010324d7"; }; + src = fetchCratesIo { inherit name version; sha256 = "6a8534fd7f78b5405e860340ad6575217ce99f38d4d5c8f2442cb5ecb50090e1"; }; features = builtins.concatLists [ [ "default" ] + [ "display" ] + [ "parse" ] ]; dependencies = { - serde = rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde."1.0.144" { inherit profileName; }; + indexmap = rustPackages."registry+https://github.com/rust-lang/crates.io-index".indexmap."2.2.3" { inherit profileName; }; + toml_datetime = rustPackages."registry+https://github.com/rust-lang/crates.io-index".toml_datetime."0.6.5" { inherit profileName; }; + winnow = rustPackages."registry+https://github.com/rust-lang/crates.io-index".winnow."0.5.40" { inherit profileName; }; }; }); @@ -4041,30 +5261,30 @@ in [ "transport" ] ]; dependencies = { - async_stream = rustPackages."registry+https://github.com/rust-lang/crates.io-index".async-stream."0.3.3" { inherit profileName; }; - async_trait = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".async-trait."0.1.57" { profileName = "__noProfile"; }; - base64 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".base64."0.13.0" { inherit profileName; }; - bytes = rustPackages."registry+https://github.com/rust-lang/crates.io-index".bytes."1.2.1" { inherit profileName; }; - futures_core = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-core."0.3.24" { inherit profileName; }; - futures_util = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-util."0.3.24" { inherit profileName; }; - h2 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".h2."0.3.14" { inherit profileName; }; - http = rustPackages."registry+https://github.com/rust-lang/crates.io-index".http."0.2.8" { inherit profileName; }; - http_body = rustPackages."registry+https://github.com/rust-lang/crates.io-index".http-body."0.4.5" { inherit profileName; }; - hyper = rustPackages."registry+https://github.com/rust-lang/crates.io-index".hyper."0.14.20" { inherit profileName; }; + async_stream = rustPackages."registry+https://github.com/rust-lang/crates.io-index".async-stream."0.3.5" { inherit profileName; }; + async_trait = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".async-trait."0.1.77" { profileName = "__noProfile"; }; + base64 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".base64."0.13.1" { inherit profileName; }; + bytes = rustPackages."registry+https://github.com/rust-lang/crates.io-index".bytes."1.5.0" { inherit profileName; }; + futures_core = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-core."0.3.30" { inherit profileName; }; + futures_util = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-util."0.3.30" { inherit profileName; }; + h2 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".h2."0.3.24" { inherit profileName; }; + http = rustPackages."registry+https://github.com/rust-lang/crates.io-index".http."0.2.11" { inherit profileName; }; + http_body = rustPackages."registry+https://github.com/rust-lang/crates.io-index".http-body."0.4.6" { inherit profileName; }; + hyper = rustPackages."registry+https://github.com/rust-lang/crates.io-index".hyper."0.14.28" { inherit profileName; }; hyper_timeout = rustPackages."registry+https://github.com/rust-lang/crates.io-index".hyper-timeout."0.4.1" { inherit profileName; }; - percent_encoding = rustPackages."registry+https://github.com/rust-lang/crates.io-index".percent-encoding."2.1.0" { inherit profileName; }; - pin_project = rustPackages."registry+https://github.com/rust-lang/crates.io-index".pin-project."1.0.12" { inherit profileName; }; + percent_encoding = rustPackages."registry+https://github.com/rust-lang/crates.io-index".percent-encoding."2.3.1" { inherit profileName; }; + pin_project = rustPackages."registry+https://github.com/rust-lang/crates.io-index".pin-project."1.1.4" { inherit profileName; }; prost1 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".prost."0.8.0" { inherit profileName; }; prost_derive = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".prost-derive."0.8.0" { profileName = "__noProfile"; }; rustls_native_certs = rustPackages."registry+https://github.com/rust-lang/crates.io-index".rustls-native-certs."0.5.0" { inherit profileName; }; - tokio = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tokio."1.25.0" { inherit profileName; }; + tokio = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tokio."1.36.0" { inherit profileName; }; tokio_rustls = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tokio-rustls."0.22.0" { inherit profileName; }; - tokio_stream = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tokio-stream."0.1.9" { inherit profileName; }; + tokio_stream = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tokio-stream."0.1.14" { inherit profileName; }; tokio_util = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tokio-util."0.6.10" { inherit profileName; }; tower = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tower."0.4.13" { inherit profileName; }; - tower_layer = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tower-layer."0.3.1" { inherit profileName; }; + tower_layer = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tower-layer."0.3.2" { inherit profileName; }; tower_service = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tower-service."0.3.2" { inherit profileName; }; - tracing = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tracing."0.1.36" { inherit profileName; }; + tracing = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tracing."0.1.40" { inherit profileName; }; tracing_futures = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tracing-futures."0.2.5" { inherit profileName; }; }; }); @@ -4082,10 +5302,10 @@ in [ "transport" ] ]; dependencies = { - proc_macro2 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".proc-macro2."1.0.43" { inherit profileName; }; + proc_macro2 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".proc-macro2."1.0.78" { inherit profileName; }; prost_build = rustPackages."registry+https://github.com/rust-lang/crates.io-index".prost-build."0.8.0" { inherit profileName; }; - quote = rustPackages."registry+https://github.com/rust-lang/crates.io-index".quote."1.0.21" { inherit profileName; }; - syn = rustPackages."registry+https://github.com/rust-lang/crates.io-index".syn."1.0.99" { inherit profileName; }; + quote = rustPackages."registry+https://github.com/rust-lang/crates.io-index".quote."1.0.35" { inherit profileName; }; + syn = rustPackages."registry+https://github.com/rust-lang/crates.io-index".syn."1.0.109" { inherit profileName; }; }; }); @@ -4119,26 +5339,26 @@ in [ "util" ] ]; dependencies = { - futures_core = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-core."0.3.24" { inherit profileName; }; - futures_util = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-util."0.3.24" { inherit profileName; }; - indexmap = rustPackages."registry+https://github.com/rust-lang/crates.io-index".indexmap."1.9.1" { inherit profileName; }; - pin_project = rustPackages."registry+https://github.com/rust-lang/crates.io-index".pin-project."1.0.12" { inherit profileName; }; - pin_project_lite = rustPackages."registry+https://github.com/rust-lang/crates.io-index".pin-project-lite."0.2.9" { inherit profileName; }; + futures_core = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-core."0.3.30" { inherit profileName; }; + futures_util = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-util."0.3.30" { inherit profileName; }; + indexmap = rustPackages."registry+https://github.com/rust-lang/crates.io-index".indexmap."1.9.3" { inherit profileName; }; + pin_project = rustPackages."registry+https://github.com/rust-lang/crates.io-index".pin-project."1.1.4" { inherit profileName; }; + pin_project_lite = rustPackages."registry+https://github.com/rust-lang/crates.io-index".pin-project-lite."0.2.13" { inherit profileName; }; rand = rustPackages."registry+https://github.com/rust-lang/crates.io-index".rand."0.8.5" { inherit profileName; }; - slab = rustPackages."registry+https://github.com/rust-lang/crates.io-index".slab."0.4.7" { inherit profileName; }; - tokio = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tokio."1.25.0" { inherit profileName; }; - tokio_util = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tokio-util."0.7.3" { inherit profileName; }; - tower_layer = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tower-layer."0.3.1" { inherit profileName; }; + slab = rustPackages."registry+https://github.com/rust-lang/crates.io-index".slab."0.4.9" { inherit profileName; }; + tokio = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tokio."1.36.0" { inherit profileName; }; + tokio_util = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tokio-util."0.7.10" { inherit profileName; }; + tower_layer = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tower-layer."0.3.2" { inherit profileName; }; tower_service = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tower-service."0.3.2" { inherit profileName; }; - tracing = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tracing."0.1.36" { inherit profileName; }; + tracing = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tracing."0.1.40" { inherit profileName; }; }; }); - "registry+https://github.com/rust-lang/crates.io-index".tower-layer."0.3.1" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".tower-layer."0.3.2" = overridableMkRustCrate (profileName: rec { name = "tower-layer"; - version = "0.3.1"; + version = "0.3.2"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "343bc9466d3fe6b0f960ef45960509f84480bf4fd96f92901afe7ff3df9d3a62"; }; + src = fetchCratesIo { inherit name version; sha256 = "c20c8dbed6283a09604c3e69b4b7eeb54e298b8a600d4d5ecb5ad39de609f1d0"; }; }); "registry+https://github.com/rust-lang/crates.io-index".tower-service."0.3.2" = overridableMkRustCrate (profileName: rec { @@ -4148,11 +5368,11 @@ in src = fetchCratesIo { inherit name version; sha256 = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52"; }; }); - "registry+https://github.com/rust-lang/crates.io-index".tracing."0.1.36" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".tracing."0.1.40" = overridableMkRustCrate (profileName: rec { name = "tracing"; - version = "0.1.36"; + version = "0.1.40"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "2fce9567bd60a67d08a16488756721ba392f24f29006402881e43b19aac64307"; }; + src = fetchCratesIo { inherit name version; sha256 = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef"; }; features = builtins.concatLists [ [ "attributes" ] [ "default" ] @@ -4161,73 +5381,68 @@ in [ "tracing-attributes" ] ]; dependencies = { - cfg_if = rustPackages."registry+https://github.com/rust-lang/crates.io-index".cfg-if."1.0.0" { inherit profileName; }; - log = rustPackages."registry+https://github.com/rust-lang/crates.io-index".log."0.4.17" { inherit profileName; }; - pin_project_lite = rustPackages."registry+https://github.com/rust-lang/crates.io-index".pin-project-lite."0.2.9" { inherit profileName; }; - tracing_attributes = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".tracing-attributes."0.1.22" { profileName = "__noProfile"; }; - tracing_core = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tracing-core."0.1.29" { inherit profileName; }; + log = rustPackages."registry+https://github.com/rust-lang/crates.io-index".log."0.4.20" { inherit profileName; }; + pin_project_lite = rustPackages."registry+https://github.com/rust-lang/crates.io-index".pin-project-lite."0.2.13" { inherit profileName; }; + tracing_attributes = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".tracing-attributes."0.1.27" { profileName = "__noProfile"; }; + tracing_core = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tracing-core."0.1.32" { inherit profileName; }; }; }); - "registry+https://github.com/rust-lang/crates.io-index".tracing-actix-web."0.6.0" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".tracing-actix-web."0.6.2" = overridableMkRustCrate (profileName: rec { name = "tracing-actix-web"; - version = "0.6.0"; + version = "0.6.2"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "f0b2cd6e5074ff67679a0ff68bc6333be78d29910ba7cd295d948aa5ff152032"; }; + src = fetchCratesIo { inherit name version; sha256 = "d725b8fa6ef307b3f4856913523337de45c47cc79271bafd7acfb39559e3a2da"; }; features = builtins.concatLists [ [ "default" ] [ "emit_event_on_error" ] ]; dependencies = { - actix_web = rustPackages."registry+https://github.com/rust-lang/crates.io-index".actix-web."4.1.0" { inherit profileName; }; - pin_project = rustPackages."registry+https://github.com/rust-lang/crates.io-index".pin-project."1.0.12" { inherit profileName; }; - tracing = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tracing."0.1.36" { inherit profileName; }; - tracing_futures = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tracing-futures."0.2.5" { inherit profileName; }; - uuid = rustPackages."registry+https://github.com/rust-lang/crates.io-index".uuid."1.1.2" { inherit profileName; }; + actix_web = rustPackages."registry+https://github.com/rust-lang/crates.io-index".actix-web."4.5.1" { inherit profileName; }; + pin_project = rustPackages."registry+https://github.com/rust-lang/crates.io-index".pin-project."1.1.4" { inherit profileName; }; + tracing = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tracing."0.1.40" { inherit profileName; }; + uuid = rustPackages."registry+https://github.com/rust-lang/crates.io-index".uuid."1.7.0" { inherit profileName; }; }; }); - "registry+https://github.com/rust-lang/crates.io-index".tracing-attributes."0.1.22" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".tracing-attributes."0.1.27" = overridableMkRustCrate (profileName: rec { name = "tracing-attributes"; - version = "0.1.22"; + version = "0.1.27"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "11c75893af559bc8e10716548bdef5cb2b983f8e637db9d0e15126b61b484ee2"; }; + src = fetchCratesIo { inherit name version; sha256 = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7"; }; dependencies = { - proc_macro2 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".proc-macro2."1.0.43" { inherit profileName; }; - quote = rustPackages."registry+https://github.com/rust-lang/crates.io-index".quote."1.0.21" { inherit profileName; }; - syn = rustPackages."registry+https://github.com/rust-lang/crates.io-index".syn."1.0.99" { inherit profileName; }; + proc_macro2 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".proc-macro2."1.0.78" { inherit profileName; }; + quote = rustPackages."registry+https://github.com/rust-lang/crates.io-index".quote."1.0.35" { inherit profileName; }; + syn = rustPackages."registry+https://github.com/rust-lang/crates.io-index".syn."2.0.49" { inherit profileName; }; }; }); - "registry+https://github.com/rust-lang/crates.io-index".tracing-core."0.1.29" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".tracing-core."0.1.32" = overridableMkRustCrate (profileName: rec { name = "tracing-core"; - version = "0.1.29"; + version = "0.1.32"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "5aeea4303076558a00714b823f9ad67d58a3bbda1df83d8827d21193156e22f7"; }; + src = fetchCratesIo { inherit name version; sha256 = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54"; }; features = builtins.concatLists [ - [ "default" ] [ "once_cell" ] [ "std" ] - [ "valuable" ] ]; dependencies = { - once_cell = rustPackages."registry+https://github.com/rust-lang/crates.io-index".once_cell."1.14.0" { inherit profileName; }; - ${ if false then "valuable" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".valuable."0.1.0" { inherit profileName; }; + once_cell = rustPackages."registry+https://github.com/rust-lang/crates.io-index".once_cell."1.19.0" { inherit profileName; }; }; }); - "registry+https://github.com/rust-lang/crates.io-index".tracing-error."0.1.2" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".tracing-error."0.2.0" = overridableMkRustCrate (profileName: rec { name = "tracing-error"; - version = "0.1.2"; + version = "0.2.0"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "b4d7c0b83d4a500748fa5879461652b361edf5c9d51ede2a2ac03875ca185e24"; }; + src = fetchCratesIo { inherit name version; sha256 = "d686ec1c0f384b1277f097b2f279a2ecc11afe8c133c1aabf036a27cb4cd206e"; }; features = builtins.concatLists [ [ "default" ] [ "traced-error" ] ]; dependencies = { - tracing = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tracing."0.1.36" { inherit profileName; }; - tracing_subscriber = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tracing-subscriber."0.2.25" { inherit profileName; }; + tracing = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tracing."0.1.40" { inherit profileName; }; + tracing_subscriber = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tracing-subscriber."0.3.18" { inherit profileName; }; }; }); @@ -4243,96 +5458,107 @@ in [ "std-future" ] ]; dependencies = { - pin_project = rustPackages."registry+https://github.com/rust-lang/crates.io-index".pin-project."1.0.12" { inherit profileName; }; - tracing = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tracing."0.1.36" { inherit profileName; }; + pin_project = rustPackages."registry+https://github.com/rust-lang/crates.io-index".pin-project."1.1.4" { inherit profileName; }; + tracing = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tracing."0.1.40" { inherit profileName; }; }; }); - "registry+https://github.com/rust-lang/crates.io-index".tracing-subscriber."0.2.25" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".tracing-subscriber."0.3.18" = overridableMkRustCrate (profileName: rec { name = "tracing-subscriber"; - version = "0.2.25"; + version = "0.3.18"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "0e0d2eaa99c3c2e41547cfa109e910a68ea03823cccad4a0525dcbc9b01e8c71"; }; + src = fetchCratesIo { inherit name version; sha256 = "ad0f048c97dbd9faa9b7df56362b8ebcaa52adb06b498c050d2f4e32f90a7a8b"; }; features = builtins.concatLists [ + [ "alloc" ] [ "ansi" ] - [ "ansi_term" ] [ "env-filter" ] [ "fmt" ] - [ "lazy_static" ] [ "matchers" ] + [ "nu-ansi-term" ] + [ "once_cell" ] [ "parking_lot" ] [ "regex" ] [ "registry" ] [ "sharded-slab" ] [ "smallvec" ] + [ "std" ] [ "thread_local" ] [ "tracing" ] ]; dependencies = { - ansi_term = rustPackages."registry+https://github.com/rust-lang/crates.io-index".ansi_term."0.12.1" { inherit profileName; }; - lazy_static = rustPackages."registry+https://github.com/rust-lang/crates.io-index".lazy_static."1.4.0" { inherit profileName; }; - matchers = rustPackages."registry+https://github.com/rust-lang/crates.io-index".matchers."0.0.1" { inherit profileName; }; - parking_lot = rustPackages."registry+https://github.com/rust-lang/crates.io-index".parking_lot."0.11.2" { inherit profileName; }; - regex = rustPackages."registry+https://github.com/rust-lang/crates.io-index".regex."1.6.0" { inherit profileName; }; - sharded_slab = rustPackages."registry+https://github.com/rust-lang/crates.io-index".sharded-slab."0.1.4" { inherit profileName; }; - smallvec = rustPackages."registry+https://github.com/rust-lang/crates.io-index".smallvec."1.9.0" { inherit profileName; }; - thread_local = rustPackages."registry+https://github.com/rust-lang/crates.io-index".thread_local."1.1.4" { inherit profileName; }; - tracing = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tracing."0.1.36" { inherit profileName; }; - tracing_core = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tracing-core."0.1.29" { inherit profileName; }; + matchers = rustPackages."registry+https://github.com/rust-lang/crates.io-index".matchers."0.1.0" { inherit profileName; }; + nu_ansi_term = rustPackages."registry+https://github.com/rust-lang/crates.io-index".nu-ansi-term."0.46.0" { inherit profileName; }; + once_cell = rustPackages."registry+https://github.com/rust-lang/crates.io-index".once_cell."1.19.0" { inherit profileName; }; + parking_lot = rustPackages."registry+https://github.com/rust-lang/crates.io-index".parking_lot."0.12.1" { inherit profileName; }; + regex = rustPackages."registry+https://github.com/rust-lang/crates.io-index".regex."1.10.3" { inherit profileName; }; + sharded_slab = rustPackages."registry+https://github.com/rust-lang/crates.io-index".sharded-slab."0.1.7" { inherit profileName; }; + smallvec = rustPackages."registry+https://github.com/rust-lang/crates.io-index".smallvec."1.13.1" { inherit profileName; }; + thread_local = rustPackages."registry+https://github.com/rust-lang/crates.io-index".thread_local."1.1.7" { inherit profileName; }; + tracing = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tracing."0.1.40" { inherit profileName; }; + tracing_core = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tracing-core."0.1.32" { inherit profileName; }; }; }); - "registry+https://github.com/rust-lang/crates.io-index".try-lock."0.2.3" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".try-lock."0.2.5" = overridableMkRustCrate (profileName: rec { name = "try-lock"; - version = "0.2.3"; + version = "0.2.5"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642"; }; + src = fetchCratesIo { inherit name version; sha256 = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b"; }; }); - "registry+https://github.com/rust-lang/crates.io-index".twoway."0.2.2" = overridableMkRustCrate (profileName: rec { - name = "twoway"; - version = "0.2.2"; + "registry+https://github.com/rust-lang/crates.io-index".tungstenite."0.21.0" = overridableMkRustCrate (profileName: rec { + name = "tungstenite"; + version = "0.21.0"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "c57ffb460d7c24cd6eda43694110189030a3d1dfe418416d9468fd1c1d290b47"; }; + src = fetchCratesIo { inherit name version; sha256 = "9ef1a641ea34f399a848dea702823bbecfb4c486f911735368f1f137cb8257e1"; }; features = builtins.concatLists [ - [ "default" ] - [ "use_std" ] + [ "data-encoding" ] + [ "handshake" ] + [ "http" ] + [ "httparse" ] + [ "native-tls" ] + [ "native-tls-crate" ] + [ "sha1" ] + [ "url" ] ]; dependencies = { - memchr = rustPackages."registry+https://github.com/rust-lang/crates.io-index".memchr."2.5.0" { inherit profileName; }; - unchecked_index = rustPackages."registry+https://github.com/rust-lang/crates.io-index".unchecked-index."0.2.2" { inherit profileName; }; + byteorder = rustPackages."registry+https://github.com/rust-lang/crates.io-index".byteorder."1.5.0" { inherit profileName; }; + bytes = rustPackages."registry+https://github.com/rust-lang/crates.io-index".bytes."1.5.0" { inherit profileName; }; + data_encoding = rustPackages."registry+https://github.com/rust-lang/crates.io-index".data-encoding."2.5.0" { inherit profileName; }; + http = rustPackages."registry+https://github.com/rust-lang/crates.io-index".http."1.0.0" { inherit profileName; }; + httparse = rustPackages."registry+https://github.com/rust-lang/crates.io-index".httparse."1.8.0" { inherit profileName; }; + log = rustPackages."registry+https://github.com/rust-lang/crates.io-index".log."0.4.20" { inherit profileName; }; + native_tls_crate = rustPackages."registry+https://github.com/rust-lang/crates.io-index".native-tls."0.2.11" { inherit profileName; }; + rand = rustPackages."registry+https://github.com/rust-lang/crates.io-index".rand."0.8.5" { inherit profileName; }; + sha1 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".sha1."0.10.6" { inherit profileName; }; + thiserror = rustPackages."registry+https://github.com/rust-lang/crates.io-index".thiserror."1.0.57" { inherit profileName; }; + url = rustPackages."registry+https://github.com/rust-lang/crates.io-index".url."2.5.0" { inherit profileName; }; + utf8 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".utf-8."0.7.6" { inherit profileName; }; }; }); - "registry+https://github.com/rust-lang/crates.io-index".typenum."1.15.0" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".typenum."1.17.0" = overridableMkRustCrate (profileName: rec { name = "typenum"; - version = "1.15.0"; - registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "dcf81ac59edc17cc8697ff311e8f5ef2d99fcbd9817b34cec66f90b6c3dfd987"; }; - }); - - "registry+https://github.com/rust-lang/crates.io-index".unchecked-index."0.2.2" = overridableMkRustCrate (profileName: rec { - name = "unchecked-index"; - version = "0.2.2"; + version = "1.17.0"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "eeba86d422ce181a719445e51872fa30f1f7413b62becb52e95ec91aa262d85c"; }; + src = fetchCratesIo { inherit name version; sha256 = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825"; }; }); - "registry+https://github.com/rust-lang/crates.io-index".unicase."2.6.0" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".unicase."2.7.0" = overridableMkRustCrate (profileName: rec { name = "unicase"; - version = "2.6.0"; + version = "2.7.0"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "50f37be617794602aabbeee0be4f259dc1778fabe05e2d67ee8f79326d5cb4f6"; }; + src = fetchCratesIo { inherit name version; sha256 = "f7d2d4dafb69621809a81864c9c1b864479e1235c0dd4e199924b9742439ed89"; }; buildDependencies = { version_check = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".version_check."0.9.4" { profileName = "__noProfile"; }; }; }); - "registry+https://github.com/rust-lang/crates.io-index".unicode-bidi."0.3.8" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".unicode-bidi."0.3.15" = overridableMkRustCrate (profileName: rec { name = "unicode-bidi"; - version = "0.3.8"; + version = "0.3.15"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "099b7128301d285f79ddd55b9a83d5e6b9e97c92e0ea0daebee7263e932de992"; }; + src = fetchCratesIo { inherit name version; sha256 = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75"; }; features = builtins.concatLists [ [ "default" ] [ "hardcoded-data" ] @@ -4340,18 +5566,18 @@ in ]; }); - "registry+https://github.com/rust-lang/crates.io-index".unicode-ident."1.0.3" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".unicode-ident."1.0.12" = overridableMkRustCrate (profileName: rec { name = "unicode-ident"; - version = "1.0.3"; + version = "1.0.12"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "c4f5b37a154999a8f3f98cc23a628d850e154479cd94decf3414696e12e31aaf"; }; + src = fetchCratesIo { inherit name version; sha256 = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b"; }; }); - "registry+https://github.com/rust-lang/crates.io-index".unicode-normalization."0.1.21" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".unicode-normalization."0.1.22" = overridableMkRustCrate (profileName: rec { name = "unicode-normalization"; - version = "0.1.21"; + version = "0.1.22"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "854cbdc4f7bc6ae19c820d44abdc3277ac3e1b2b93db20a636825d9322fb60e6"; }; + src = fetchCratesIo { inherit name version; sha256 = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921"; }; features = builtins.concatLists [ [ "default" ] [ "std" ] @@ -4361,11 +5587,11 @@ in }; }); - "registry+https://github.com/rust-lang/crates.io-index".unicode-segmentation."1.9.0" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".unicode-segmentation."1.11.0" = overridableMkRustCrate (profileName: rec { name = "unicode-segmentation"; - version = "1.9.0"; + version = "1.11.0"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "7e8820f5d777f6224dc4be3632222971ac30164d4a258d595640799554ebfd99"; }; + src = fetchCratesIo { inherit name version; sha256 = "d4c87d22b6e3f4a18d4d40ef354e97c90fcb14dd91d7dc0aa9d8a1172ebf7202"; }; }); "registry+https://github.com/rust-lang/crates.io-index".unicode_categories."0.1.1" = overridableMkRustCrate (profileName: rec { @@ -4382,63 +5608,65 @@ in src = fetchCratesIo { inherit name version; sha256 = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a"; }; }); - "registry+https://github.com/rust-lang/crates.io-index".url."2.2.2" = overridableMkRustCrate (profileName: rec { - name = "url"; - version = "2.2.2"; + "registry+https://github.com/rust-lang/crates.io-index".untrusted."0.9.0" = overridableMkRustCrate (profileName: rec { + name = "untrusted"; + version = "0.9.0"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "a507c383b2d33b5fc35d1861e77e6b383d158b2da5e14fe51b83dfedf6fd578c"; }; - dependencies = { - form_urlencoded = rustPackages."registry+https://github.com/rust-lang/crates.io-index".form_urlencoded."1.0.1" { inherit profileName; }; - idna = rustPackages."registry+https://github.com/rust-lang/crates.io-index".idna."0.2.3" { inherit profileName; }; - matches = rustPackages."registry+https://github.com/rust-lang/crates.io-index".matches."0.1.9" { inherit profileName; }; - percent_encoding = rustPackages."registry+https://github.com/rust-lang/crates.io-index".percent-encoding."2.1.0" { inherit profileName; }; - }; + src = fetchCratesIo { inherit name version; sha256 = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1"; }; }); - "registry+https://github.com/rust-lang/crates.io-index".uuid."0.8.2" = overridableMkRustCrate (profileName: rec { - name = "uuid"; - version = "0.8.2"; + "registry+https://github.com/rust-lang/crates.io-index".url."2.5.0" = overridableMkRustCrate (profileName: rec { + name = "url"; + version = "2.5.0"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "bc5cf98d8186244414c848017f0e2676b3fcb46807f6668a97dfe67359a3c4b7"; }; + src = fetchCratesIo { inherit name version; sha256 = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633"; }; features = builtins.concatLists [ [ "default" ] - [ "getrandom" ] - [ "serde" ] - [ "std" ] - [ "v4" ] ]; dependencies = { - getrandom = rustPackages."registry+https://github.com/rust-lang/crates.io-index".getrandom."0.2.7" { inherit profileName; }; - serde = rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde."1.0.144" { inherit profileName; }; + form_urlencoded = rustPackages."registry+https://github.com/rust-lang/crates.io-index".form_urlencoded."1.2.1" { inherit profileName; }; + idna = rustPackages."registry+https://github.com/rust-lang/crates.io-index".idna."0.5.0" { inherit profileName; }; + percent_encoding = rustPackages."registry+https://github.com/rust-lang/crates.io-index".percent-encoding."2.3.1" { inherit profileName; }; }; }); - "registry+https://github.com/rust-lang/crates.io-index".uuid."1.1.2" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".urlencoding."2.1.3" = overridableMkRustCrate (profileName: rec { + name = "urlencoding"; + version = "2.1.3"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "daf8dba3b7eb870caf1ddeed7bc9d2a049f3cfdfae7cb521b087cc33ae4c49da"; }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".utf-8."0.7.6" = overridableMkRustCrate (profileName: rec { + name = "utf-8"; + version = "0.7.6"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9"; }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".uuid."1.7.0" = overridableMkRustCrate (profileName: rec { name = "uuid"; - version = "1.1.2"; + version = "1.7.0"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "dd6469f4314d5f1ffec476e05f17cc9a78bc7a27a6a857842170bdf8d6f98d2f"; }; + src = fetchCratesIo { inherit name version; sha256 = "f00cc9702ca12d3c81455259621e676d0f7251cec66a21e98fe2e9a37db93b2a"; }; features = builtins.concatLists [ [ "default" ] - [ "private_getrandom" ] [ "rng" ] + [ "serde" ] [ "std" ] [ "v4" ] ]; dependencies = { - private_getrandom = rustPackages."registry+https://github.com/rust-lang/crates.io-index".getrandom."0.2.7" { inherit profileName; }; + getrandom = rustPackages."registry+https://github.com/rust-lang/crates.io-index".getrandom."0.2.12" { inherit profileName; }; + serde = rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde."1.0.196" { inherit profileName; }; }; }); - "registry+https://github.com/rust-lang/crates.io-index".valuable."0.1.0" = overridableMkRustCrate (profileName: rec { - name = "valuable"; - version = "0.1.0"; + "registry+https://github.com/rust-lang/crates.io-index".vcpkg."0.2.15" = overridableMkRustCrate (profileName: rec { + name = "vcpkg"; + version = "0.2.15"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d"; }; - features = builtins.concatLists [ - [ "alloc" ] - [ "std" ] - ]; + src = fetchCratesIo { inherit name version; sha256 = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426"; }; }); "registry+https://github.com/rust-lang/crates.io-index".version_check."0.9.4" = overridableMkRustCrate (profileName: rec { @@ -4448,28 +5676,28 @@ in src = fetchCratesIo { inherit name version; sha256 = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f"; }; }); - "registry+https://github.com/rust-lang/crates.io-index".want."0.3.0" = overridableMkRustCrate (profileName: rec { - name = "want"; - version = "0.3.0"; - registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "1ce8a968cb1cd110d136ff8b819a556d6fb6d919363c61534f6860c7eb172ba0"; }; - dependencies = { - log = rustPackages."registry+https://github.com/rust-lang/crates.io-index".log."0.4.17" { inherit profileName; }; - try_lock = rustPackages."registry+https://github.com/rust-lang/crates.io-index".try-lock."0.2.3" { inherit profileName; }; - }; - }); - - "registry+https://github.com/rust-lang/crates.io-index".wasi."0.10.0+wasi-snapshot-preview1" = overridableMkRustCrate (profileName: rec { - name = "wasi"; - version = "0.10.0+wasi-snapshot-preview1"; + "registry+https://github.com/rust-lang/crates.io-index".vsimd."0.8.0" = overridableMkRustCrate (profileName: rec { + name = "vsimd"; + version = "0.8.0"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f"; }; + src = fetchCratesIo { inherit name version; sha256 = "5c3082ca00d5a5ef149bb8b555a72ae84c9c59f7250f013ac822ac2e49b19c64"; }; features = builtins.concatLists [ - [ "default" ] + [ "alloc" ] + [ "detect" ] [ "std" ] ]; }); + "registry+https://github.com/rust-lang/crates.io-index".want."0.3.1" = overridableMkRustCrate (profileName: rec { + name = "want"; + version = "0.3.1"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e"; }; + dependencies = { + try_lock = rustPackages."registry+https://github.com/rust-lang/crates.io-index".try-lock."0.2.5" { inherit profileName; }; + }; + }); + "registry+https://github.com/rust-lang/crates.io-index".wasi."0.11.0+wasi-snapshot-preview1" = overridableMkRustCrate (profileName: rec { name = "wasi"; version = "0.11.0+wasi-snapshot-preview1"; @@ -4481,11 +5709,11 @@ in ]; }); - "registry+https://github.com/rust-lang/crates.io-index".wasm-bindgen."0.2.82" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".wasm-bindgen."0.2.91" = overridableMkRustCrate (profileName: rec { name = "wasm-bindgen"; - version = "0.2.82"; + version = "0.2.91"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "fc7652e3f6c4706c8d9cd54832c4a4ccb9b5336e2c3bd154d5cccfbf1c1f5f7d"; }; + src = fetchCratesIo { inherit name version; sha256 = "c1e124130aee3fb58c5bdd6b639a0509486b0338acaaae0c84a5124b0f588b7f"; }; features = builtins.concatLists [ [ "default" ] [ "spans" ] @@ -4493,86 +5721,102 @@ in ]; dependencies = { cfg_if = rustPackages."registry+https://github.com/rust-lang/crates.io-index".cfg-if."1.0.0" { inherit profileName; }; - wasm_bindgen_macro = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".wasm-bindgen-macro."0.2.82" { profileName = "__noProfile"; }; + wasm_bindgen_macro = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".wasm-bindgen-macro."0.2.91" { profileName = "__noProfile"; }; }; }); - "registry+https://github.com/rust-lang/crates.io-index".wasm-bindgen-backend."0.2.82" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".wasm-bindgen-backend."0.2.91" = overridableMkRustCrate (profileName: rec { name = "wasm-bindgen-backend"; - version = "0.2.82"; + version = "0.2.91"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "662cd44805586bd52971b9586b1df85cdbbd9112e4ef4d8f41559c334dc6ac3f"; }; + src = fetchCratesIo { inherit name version; sha256 = "c9e7e1900c352b609c8488ad12639a311045f40a35491fb69ba8c12f758af70b"; }; features = builtins.concatLists [ [ "spans" ] ]; dependencies = { - bumpalo = rustPackages."registry+https://github.com/rust-lang/crates.io-index".bumpalo."3.11.0" { inherit profileName; }; - log = rustPackages."registry+https://github.com/rust-lang/crates.io-index".log."0.4.17" { inherit profileName; }; - once_cell = rustPackages."registry+https://github.com/rust-lang/crates.io-index".once_cell."1.14.0" { inherit profileName; }; - proc_macro2 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".proc-macro2."1.0.43" { inherit profileName; }; - quote = rustPackages."registry+https://github.com/rust-lang/crates.io-index".quote."1.0.21" { inherit profileName; }; - syn = rustPackages."registry+https://github.com/rust-lang/crates.io-index".syn."1.0.99" { inherit profileName; }; - wasm_bindgen_shared = rustPackages."registry+https://github.com/rust-lang/crates.io-index".wasm-bindgen-shared."0.2.82" { inherit profileName; }; + bumpalo = rustPackages."registry+https://github.com/rust-lang/crates.io-index".bumpalo."3.15.0" { inherit profileName; }; + log = rustPackages."registry+https://github.com/rust-lang/crates.io-index".log."0.4.20" { inherit profileName; }; + once_cell = rustPackages."registry+https://github.com/rust-lang/crates.io-index".once_cell."1.19.0" { inherit profileName; }; + proc_macro2 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".proc-macro2."1.0.78" { inherit profileName; }; + quote = rustPackages."registry+https://github.com/rust-lang/crates.io-index".quote."1.0.35" { inherit profileName; }; + syn = rustPackages."registry+https://github.com/rust-lang/crates.io-index".syn."2.0.49" { inherit profileName; }; + wasm_bindgen_shared = rustPackages."registry+https://github.com/rust-lang/crates.io-index".wasm-bindgen-shared."0.2.91" { inherit profileName; }; }; }); - "registry+https://github.com/rust-lang/crates.io-index".wasm-bindgen-futures."0.4.32" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".wasm-bindgen-futures."0.4.41" = overridableMkRustCrate (profileName: rec { name = "wasm-bindgen-futures"; - version = "0.4.32"; + version = "0.4.41"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "fa76fb221a1f8acddf5b54ace85912606980ad661ac7a503b4570ffd3a624dad"; }; + src = fetchCratesIo { inherit name version; sha256 = "877b9c3f61ceea0e56331985743b13f3d25c406a7098d45180fb5f09bc19ed97"; }; dependencies = { cfg_if = rustPackages."registry+https://github.com/rust-lang/crates.io-index".cfg-if."1.0.0" { inherit profileName; }; - js_sys = rustPackages."registry+https://github.com/rust-lang/crates.io-index".js-sys."0.3.59" { inherit profileName; }; - wasm_bindgen = rustPackages."registry+https://github.com/rust-lang/crates.io-index".wasm-bindgen."0.2.82" { inherit profileName; }; - ${ if builtins.elem "atomics" hostPlatformFeatures then "web_sys" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".web-sys."0.3.59" { inherit profileName; }; + js_sys = rustPackages."registry+https://github.com/rust-lang/crates.io-index".js-sys."0.3.68" { inherit profileName; }; + wasm_bindgen = rustPackages."registry+https://github.com/rust-lang/crates.io-index".wasm-bindgen."0.2.91" { inherit profileName; }; + ${ if builtins.elem "atomics" hostPlatformFeatures then "web_sys" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".web-sys."0.3.68" { inherit profileName; }; }; }); - "registry+https://github.com/rust-lang/crates.io-index".wasm-bindgen-macro."0.2.82" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".wasm-bindgen-macro."0.2.91" = overridableMkRustCrate (profileName: rec { name = "wasm-bindgen-macro"; - version = "0.2.82"; + version = "0.2.91"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "b260f13d3012071dfb1512849c033b1925038373aea48ced3012c09df952c602"; }; + src = fetchCratesIo { inherit name version; sha256 = "b30af9e2d358182b5c7449424f017eba305ed32a7010509ede96cdc4696c46ed"; }; features = builtins.concatLists [ [ "spans" ] ]; dependencies = { - quote = rustPackages."registry+https://github.com/rust-lang/crates.io-index".quote."1.0.21" { inherit profileName; }; - wasm_bindgen_macro_support = rustPackages."registry+https://github.com/rust-lang/crates.io-index".wasm-bindgen-macro-support."0.2.82" { inherit profileName; }; + quote = rustPackages."registry+https://github.com/rust-lang/crates.io-index".quote."1.0.35" { inherit profileName; }; + wasm_bindgen_macro_support = rustPackages."registry+https://github.com/rust-lang/crates.io-index".wasm-bindgen-macro-support."0.2.91" { inherit profileName; }; }; }); - "registry+https://github.com/rust-lang/crates.io-index".wasm-bindgen-macro-support."0.2.82" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".wasm-bindgen-macro-support."0.2.91" = overridableMkRustCrate (profileName: rec { name = "wasm-bindgen-macro-support"; - version = "0.2.82"; + version = "0.2.91"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "5be8e654bdd9b79216c2929ab90721aa82faf65c48cdf08bdc4e7f51357b80da"; }; + src = fetchCratesIo { inherit name version; sha256 = "642f325be6301eb8107a83d12a8ac6c1e1c54345a7ef1a9261962dfefda09e66"; }; features = builtins.concatLists [ [ "spans" ] ]; dependencies = { - proc_macro2 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".proc-macro2."1.0.43" { inherit profileName; }; - quote = rustPackages."registry+https://github.com/rust-lang/crates.io-index".quote."1.0.21" { inherit profileName; }; - syn = rustPackages."registry+https://github.com/rust-lang/crates.io-index".syn."1.0.99" { inherit profileName; }; - wasm_bindgen_backend = rustPackages."registry+https://github.com/rust-lang/crates.io-index".wasm-bindgen-backend."0.2.82" { inherit profileName; }; - wasm_bindgen_shared = rustPackages."registry+https://github.com/rust-lang/crates.io-index".wasm-bindgen-shared."0.2.82" { inherit profileName; }; + proc_macro2 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".proc-macro2."1.0.78" { inherit profileName; }; + quote = rustPackages."registry+https://github.com/rust-lang/crates.io-index".quote."1.0.35" { inherit profileName; }; + syn = rustPackages."registry+https://github.com/rust-lang/crates.io-index".syn."2.0.49" { inherit profileName; }; + wasm_bindgen_backend = rustPackages."registry+https://github.com/rust-lang/crates.io-index".wasm-bindgen-backend."0.2.91" { inherit profileName; }; + wasm_bindgen_shared = rustPackages."registry+https://github.com/rust-lang/crates.io-index".wasm-bindgen-shared."0.2.91" { inherit profileName; }; }; }); - "registry+https://github.com/rust-lang/crates.io-index".wasm-bindgen-shared."0.2.82" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".wasm-bindgen-shared."0.2.91" = overridableMkRustCrate (profileName: rec { name = "wasm-bindgen-shared"; - version = "0.2.82"; + version = "0.2.91"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "4f186bd2dcf04330886ce82d6f33dd75a7bfcf69ecf5763b89fcde53b6ac9838"; }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".wasm-streams."0.4.0" = overridableMkRustCrate (profileName: rec { + name = "wasm-streams"; + version = "0.4.0"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "6598dd0bd3c7d51095ff6531a5b23e02acdc81804e30d8f07afb77b7215a140a"; }; + src = fetchCratesIo { inherit name version; sha256 = "b65dc4c90b63b118468cf747d8bf3566c1913ef60be765b5730ead9e0a3ba129"; }; + dependencies = { + futures_util = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-util."0.3.30" { inherit profileName; }; + js_sys = rustPackages."registry+https://github.com/rust-lang/crates.io-index".js-sys."0.3.68" { inherit profileName; }; + wasm_bindgen = rustPackages."registry+https://github.com/rust-lang/crates.io-index".wasm-bindgen."0.2.91" { inherit profileName; }; + wasm_bindgen_futures = rustPackages."registry+https://github.com/rust-lang/crates.io-index".wasm-bindgen-futures."0.4.41" { inherit profileName; }; + web_sys = rustPackages."registry+https://github.com/rust-lang/crates.io-index".web-sys."0.3.68" { inherit profileName; }; + }; }); - "registry+https://github.com/rust-lang/crates.io-index".web-sys."0.3.59" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".web-sys."0.3.68" = overridableMkRustCrate (profileName: rec { name = "web-sys"; - version = "0.3.59"; + version = "0.3.68"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "ed055ab27f941423197eb86b2035720b1a3ce40504df082cac2ecc6ed73335a1"; }; + src = fetchCratesIo { inherit name version; sha256 = "96565907687f7aceb35bc5fc03770a8a0471d82e479f25832f54a0e3f4b28446"; }; features = builtins.concatLists [ + [ "AbortController" ] + [ "AbortSignal" ] [ "Blob" ] [ "BlobPropertyBag" ] [ "Crypto" ] @@ -4586,19 +5830,40 @@ in [ "MessageEvent" ] [ "Navigator" ] [ "Node" ] + [ "QueuingStrategy" ] + [ "ReadableByteStreamController" ] + [ "ReadableStream" ] + [ "ReadableStreamByobReader" ] + [ "ReadableStreamByobRequest" ] + [ "ReadableStreamDefaultController" ] + [ "ReadableStreamDefaultReader" ] + [ "ReadableStreamGetReaderOptions" ] + [ "ReadableStreamReadResult" ] + [ "ReadableStreamReaderMode" ] + [ "ReadableStreamType" ] + [ "ReadableWritablePair" ] [ "Request" ] [ "RequestCredentials" ] [ "RequestInit" ] [ "RequestMode" ] [ "Response" ] [ "ServiceWorkerGlobalScope" ] + [ "StreamPipeOptions" ] + [ "TransformStream" ] + [ "TransformStreamDefaultController" ] + [ "Transformer" ] + [ "UnderlyingSink" ] + [ "UnderlyingSource" ] [ "Window" ] [ "Worker" ] [ "WorkerGlobalScope" ] + [ "WritableStream" ] + [ "WritableStreamDefaultController" ] + [ "WritableStreamDefaultWriter" ] ]; dependencies = { - js_sys = rustPackages."registry+https://github.com/rust-lang/crates.io-index".js-sys."0.3.59" { inherit profileName; }; - wasm_bindgen = rustPackages."registry+https://github.com/rust-lang/crates.io-index".wasm-bindgen."0.2.82" { inherit profileName; }; + js_sys = rustPackages."registry+https://github.com/rust-lang/crates.io-index".js-sys."0.3.68" { inherit profileName; }; + wasm_bindgen = rustPackages."registry+https://github.com/rust-lang/crates.io-index".wasm-bindgen."0.2.91" { inherit profileName; }; }; }); @@ -4618,64 +5883,65 @@ in }; }); - "registry+https://github.com/rust-lang/crates.io-index".webpki."0.22.0" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".webpki."0.22.4" = overridableMkRustCrate (profileName: rec { name = "webpki"; - version = "0.22.0"; + version = "0.22.4"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "f095d78192e208183081cc07bc5515ef55216397af48b873e5edcd72637fa1bd"; }; + src = fetchCratesIo { inherit name version; sha256 = "ed63aea5ce73d0ff405984102c42de94fc55a6b75765d621c65262469b3c9b53"; }; features = builtins.concatLists [ [ "alloc" ] [ "std" ] ]; dependencies = { - ring = rustPackages."registry+https://github.com/rust-lang/crates.io-index".ring."0.16.20" { inherit profileName; }; - untrusted = rustPackages."registry+https://github.com/rust-lang/crates.io-index".untrusted."0.7.1" { inherit profileName; }; + ring = rustPackages."registry+https://github.com/rust-lang/crates.io-index".ring."0.17.7" { inherit profileName; }; + untrusted = rustPackages."registry+https://github.com/rust-lang/crates.io-index".untrusted."0.9.0" { inherit profileName; }; }; }); - "registry+https://github.com/rust-lang/crates.io-index".webpki-roots."0.21.1" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".webpki-roots."0.22.6" = overridableMkRustCrate (profileName: rec { name = "webpki-roots"; - version = "0.21.1"; + version = "0.22.6"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "aabe153544e473b775453675851ecc86863d2a81d786d741f6b76778f2a48940"; }; + src = fetchCratesIo { inherit name version; sha256 = "b6c71e40d7d2c34a5106301fb632274ca37242cd0c9d3e64dbece371a40a2d87"; }; dependencies = { - webpki = rustPackages."registry+https://github.com/rust-lang/crates.io-index".webpki."0.21.4" { inherit profileName; }; + webpki = rustPackages."registry+https://github.com/rust-lang/crates.io-index".webpki."0.22.4" { inherit profileName; }; }; }); - "registry+https://github.com/rust-lang/crates.io-index".webpki-roots."0.22.4" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".webpki-roots."0.25.4" = overridableMkRustCrate (profileName: rec { name = "webpki-roots"; - version = "0.22.4"; + version = "0.25.4"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "f1c760f0d366a6c24a02ed7816e23e691f5d92291f94d15e836006fd11b04daf"; }; - dependencies = { - webpki = rustPackages."registry+https://github.com/rust-lang/crates.io-index".webpki."0.22.0" { inherit profileName; }; - }; + src = fetchCratesIo { inherit name version; sha256 = "5f20c57d8d7db6d3b86154206ae5d8fba62dd39573114de97c2cb0578251f8e1"; }; }); - "registry+https://github.com/rust-lang/crates.io-index".which."4.3.0" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".which."4.4.2" = overridableMkRustCrate (profileName: rec { name = "which"; - version = "4.3.0"; + version = "4.4.2"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "1c831fbbee9e129a8cf93e7747a82da9d95ba8e16621cae60ec2cdc849bacb7b"; }; + src = fetchCratesIo { inherit name version; sha256 = "87ba24419a2078cd2b0f2ede2691b6c66d8e47836da3b6db8265ebad47afbfc7"; }; dependencies = { - either = rustPackages."registry+https://github.com/rust-lang/crates.io-index".either."1.8.0" { inherit profileName; }; - libc = rustPackages."registry+https://github.com/rust-lang/crates.io-index".libc."0.2.139" { inherit profileName; }; - ${ if hostPlatform.isWindows then "once_cell" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".once_cell."1.14.0" { inherit profileName; }; + either = rustPackages."registry+https://github.com/rust-lang/crates.io-index".either."1.10.0" { inherit profileName; }; + ${ if hostPlatform.isWindows || hostPlatform.isUnix || hostPlatform.parsed.kernel.name == "redox" then "home" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".home."0.5.9" { inherit profileName; }; + ${ if hostPlatform.isWindows then "once_cell" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".once_cell."1.19.0" { inherit profileName; }; + rustix = rustPackages."registry+https://github.com/rust-lang/crates.io-index".rustix."0.38.31" { inherit profileName; }; }; }); - "registry+https://github.com/rust-lang/crates.io-index".whoami."1.2.1" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".whoami."1.4.1" = overridableMkRustCrate (profileName: rec { name = "whoami"; - version = "1.2.1"; + version = "1.4.1"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "524b58fa5a20a2fb3014dd6358b70e6579692a56ef6fce928834e488f42f65e8"; }; + src = fetchCratesIo { inherit name version; sha256 = "22fc3756b8a9133049b26c7f61ab35416c130e8c09b660f5b3958b446f52cc50"; }; features = builtins.concatLists [ [ "default" ] + [ "wasm-bindgen" ] + [ "web" ] + [ "web-sys" ] ]; dependencies = { - ${ if hostPlatform.parsed.cpu.name == "wasm32" then "wasm_bindgen" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".wasm-bindgen."0.2.82" { inherit profileName; }; - ${ if hostPlatform.parsed.cpu.name == "wasm32" then "web_sys" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".web-sys."0.3.59" { inherit profileName; }; + ${ if hostPlatform.parsed.cpu.name == "wasm32" && !(hostPlatform.parsed.kernel.name == "wasi") && !(hostPlatform.parsed.kernel.name == "daku") then "wasm_bindgen" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".wasm-bindgen."0.2.91" { inherit profileName; }; + ${ if hostPlatform.parsed.cpu.name == "wasm32" && !(hostPlatform.parsed.kernel.name == "wasi") && !(hostPlatform.parsed.kernel.name == "daku") then "web_sys" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".web-sys."0.3.68" { inherit profileName; }; }; }); @@ -4685,35 +5951,20 @@ in registry = "registry+https://github.com/rust-lang/crates.io-index"; src = fetchCratesIo { inherit name version; sha256 = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419"; }; features = builtins.concatLists [ - [ "activation" ] - [ "combaseapi" ] [ "consoleapi" ] [ "errhandlingapi" ] [ "fileapi" ] [ "handleapi" ] - [ "impl-debug" ] - [ "impl-default" ] [ "knownfolders" ] - [ "minwinbase" ] [ "minwindef" ] - [ "ntdef" ] [ "ntsecapi" ] [ "ntstatus" ] [ "objbase" ] [ "processenv" ] - [ "profileapi" ] - [ "roapi" ] [ "shlobj" ] - [ "std" ] - [ "sysinfoapi" ] - [ "timezoneapi" ] [ "winbase" ] [ "winerror" ] [ "winnt" ] - [ "winreg" ] - [ "winstring" ] - [ "ws2ipdef" ] - [ "ws2tcpip" ] [ "wtypesbase" ] ]; dependencies = { @@ -4736,77 +5987,55 @@ in src = fetchCratesIo { inherit name version; sha256 = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"; }; }); - "registry+https://github.com/rust-lang/crates.io-index".windows-sys."0.36.1" = overridableMkRustCrate (profileName: rec { - name = "windows-sys"; - version = "0.36.1"; + "registry+https://github.com/rust-lang/crates.io-index".windows-core."0.52.0" = overridableMkRustCrate (profileName: rec { + name = "windows-core"; + version = "0.52.0"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "ea04155a16a59f9eab786fe12a4a450e75cdb175f9e0d80da1e17db09f55b8d2"; }; + src = fetchCratesIo { inherit name version; sha256 = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9"; }; features = builtins.concatLists [ - [ "Win32" ] - [ "Win32_Foundation" ] - [ "Win32_Networking" ] - [ "Win32_Networking_WinSock" ] - [ "Win32_Security" ] - [ "Win32_Security_Authentication" ] - [ "Win32_Security_Authentication_Identity" ] - [ "Win32_Security_Credentials" ] - [ "Win32_Security_Cryptography" ] - [ "Win32_Storage" ] - [ "Win32_Storage_FileSystem" ] - [ "Win32_System" ] - [ "Win32_System_IO" ] - [ "Win32_System_LibraryLoader" ] - [ "Win32_System_Memory" ] - [ "Win32_System_Pipes" ] - [ "Win32_System_SystemServices" ] - [ "Win32_System_WindowsProgramming" ] [ "default" ] ]; dependencies = { - ${ if hostPlatform.config == "aarch64-pc-windows-msvc" || hostPlatform.config == "aarch64-uwp-windows-msvc" then "windows_aarch64_msvc" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".windows_aarch64_msvc."0.36.1" { inherit profileName; }; - ${ if hostPlatform.config == "i686-pc-windows-gnu" || hostPlatform.config == "i686-uwp-windows-gnu" then "windows_i686_gnu" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".windows_i686_gnu."0.36.1" { inherit profileName; }; - ${ if hostPlatform.config == "i686-pc-windows-msvc" || hostPlatform.config == "i686-uwp-windows-msvc" then "windows_i686_msvc" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".windows_i686_msvc."0.36.1" { inherit profileName; }; - ${ if hostPlatform.config == "x86_64-pc-windows-gnu" || hostPlatform.config == "x86_64-uwp-windows-gnu" then "windows_x86_64_gnu" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".windows_x86_64_gnu."0.36.1" { inherit profileName; }; - ${ if hostPlatform.config == "x86_64-pc-windows-msvc" || hostPlatform.config == "x86_64-uwp-windows-msvc" then "windows_x86_64_msvc" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".windows_x86_64_msvc."0.36.1" { inherit profileName; }; + windows_targets = rustPackages."registry+https://github.com/rust-lang/crates.io-index".windows-targets."0.52.0" { inherit profileName; }; }; }); - "registry+https://github.com/rust-lang/crates.io-index".windows-sys."0.42.0" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".windows-sys."0.48.0" = overridableMkRustCrate (profileName: rec { name = "windows-sys"; - version = "0.42.0"; + version = "0.48.0"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7"; }; + src = fetchCratesIo { inherit name version; sha256 = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9"; }; features = builtins.concatLists [ [ "Win32" ] [ "Win32_Foundation" ] + [ "Win32_Networking" ] + [ "Win32_Networking_WinSock" ] [ "Win32_Security" ] - [ "Win32_Security_Authorization" ] [ "Win32_Storage" ] [ "Win32_Storage_FileSystem" ] [ "Win32_System" ] [ "Win32_System_Console" ] + [ "Win32_System_Diagnostics" ] + [ "Win32_System_Diagnostics_Debug" ] + [ "Win32_System_IO" ] [ "Win32_System_Pipes" ] + [ "Win32_System_Registry" ] [ "Win32_System_SystemServices" ] [ "Win32_System_Threading" ] + [ "Win32_System_Time" ] [ "Win32_System_WindowsProgramming" ] [ "default" ] ]; dependencies = { - ${ if hostPlatform.config == "aarch64-pc-windows-gnullvm" then "windows_aarch64_gnullvm" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".windows_aarch64_gnullvm."0.42.1" { inherit profileName; }; - ${ if hostPlatform.config == "aarch64-pc-windows-msvc" || hostPlatform.config == "aarch64-uwp-windows-msvc" then "windows_aarch64_msvc" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".windows_aarch64_msvc."0.42.1" { inherit profileName; }; - ${ if hostPlatform.config == "i686-pc-windows-gnu" || hostPlatform.config == "i686-uwp-windows-gnu" then "windows_i686_gnu" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".windows_i686_gnu."0.42.1" { inherit profileName; }; - ${ if hostPlatform.config == "i686-pc-windows-msvc" || hostPlatform.config == "i686-uwp-windows-msvc" then "windows_i686_msvc" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".windows_i686_msvc."0.42.1" { inherit profileName; }; - ${ if hostPlatform.config == "x86_64-pc-windows-gnu" || hostPlatform.config == "x86_64-uwp-windows-gnu" then "windows_x86_64_gnu" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".windows_x86_64_gnu."0.42.1" { inherit profileName; }; - ${ if hostPlatform.config == "x86_64-pc-windows-gnullvm" then "windows_x86_64_gnullvm" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".windows_x86_64_gnullvm."0.42.1" { inherit profileName; }; - ${ if hostPlatform.config == "x86_64-pc-windows-msvc" || hostPlatform.config == "x86_64-uwp-windows-msvc" then "windows_x86_64_msvc" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".windows_x86_64_msvc."0.42.1" { inherit profileName; }; + windows_targets = rustPackages."registry+https://github.com/rust-lang/crates.io-index".windows-targets."0.48.5" { inherit profileName; }; }; }); - "registry+https://github.com/rust-lang/crates.io-index".windows-sys."0.45.0" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".windows-sys."0.52.0" = overridableMkRustCrate (profileName: rec { name = "windows-sys"; - version = "0.45.0"; + version = "0.52.0"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0"; }; + src = fetchCratesIo { inherit name version; sha256 = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d"; }; features = builtins.concatLists [ [ "Win32" ] [ "Win32_Foundation" ] @@ -4815,128 +6044,204 @@ in [ "Win32_Networking" ] [ "Win32_Networking_WinSock" ] [ "Win32_Security" ] + [ "Win32_Security_Authentication" ] + [ "Win32_Security_Authentication_Identity" ] + [ "Win32_Security_Credentials" ] + [ "Win32_Security_Cryptography" ] [ "Win32_Storage" ] [ "Win32_Storage_FileSystem" ] [ "Win32_System" ] - [ "Win32_System_IO" ] + [ "Win32_System_Com" ] + [ "Win32_System_Diagnostics" ] + [ "Win32_System_Diagnostics_Debug" ] + [ "Win32_System_Memory" ] [ "Win32_System_Threading" ] + [ "Win32_UI" ] + [ "Win32_UI_Shell" ] [ "default" ] ]; dependencies = { - windows_targets = rustPackages."registry+https://github.com/rust-lang/crates.io-index".windows-targets."0.42.1" { inherit profileName; }; + windows_targets = rustPackages."registry+https://github.com/rust-lang/crates.io-index".windows-targets."0.52.0" { inherit profileName; }; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".windows-targets."0.48.5" = overridableMkRustCrate (profileName: rec { + name = "windows-targets"; + version = "0.48.5"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c"; }; + dependencies = { + ${ if hostPlatform.config == "aarch64-pc-windows-gnullvm" then "windows_aarch64_gnullvm" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".windows_aarch64_gnullvm."0.48.5" { inherit profileName; }; + ${ if hostPlatform.parsed.cpu.name == "aarch64" && hostPlatform.parsed.abi.name == "msvc" then "windows_aarch64_msvc" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".windows_aarch64_msvc."0.48.5" { inherit profileName; }; + ${ if hostPlatform.parsed.cpu.name == "i686" && hostPlatform.parsed.abi.name == "gnu" then "windows_i686_gnu" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".windows_i686_gnu."0.48.5" { inherit profileName; }; + ${ if hostPlatform.parsed.cpu.name == "i686" && hostPlatform.parsed.abi.name == "msvc" then "windows_i686_msvc" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".windows_i686_msvc."0.48.5" { inherit profileName; }; + ${ if hostPlatform.parsed.cpu.name == "x86_64" && hostPlatform.parsed.abi.name == "gnu" then "windows_x86_64_gnu" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".windows_x86_64_gnu."0.48.5" { inherit profileName; }; + ${ if hostPlatform.config == "x86_64-pc-windows-gnullvm" then "windows_x86_64_gnullvm" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".windows_x86_64_gnullvm."0.48.5" { inherit profileName; }; + ${ if hostPlatform.parsed.cpu.name == "x86_64" && hostPlatform.parsed.abi.name == "msvc" then "windows_x86_64_msvc" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".windows_x86_64_msvc."0.48.5" { inherit profileName; }; }; }); - "registry+https://github.com/rust-lang/crates.io-index".windows-targets."0.42.1" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".windows-targets."0.52.0" = overridableMkRustCrate (profileName: rec { name = "windows-targets"; - version = "0.42.1"; + version = "0.52.0"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "8e2522491fbfcd58cc84d47aeb2958948c4b8982e9a2d8a2a35bbaed431390e7"; }; + src = fetchCratesIo { inherit name version; sha256 = "8a18201040b24831fbb9e4eb208f8892e1f50a37feb53cc7ff887feb8f50e7cd"; }; dependencies = { - ${ if hostPlatform.config == "aarch64-pc-windows-gnullvm" then "windows_aarch64_gnullvm" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".windows_aarch64_gnullvm."0.42.1" { inherit profileName; }; - ${ if hostPlatform.config == "aarch64-pc-windows-msvc" || hostPlatform.config == "aarch64-uwp-windows-msvc" then "windows_aarch64_msvc" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".windows_aarch64_msvc."0.42.1" { inherit profileName; }; - ${ if hostPlatform.config == "i686-pc-windows-gnu" || hostPlatform.config == "i686-uwp-windows-gnu" then "windows_i686_gnu" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".windows_i686_gnu."0.42.1" { inherit profileName; }; - ${ if hostPlatform.config == "i686-pc-windows-msvc" || hostPlatform.config == "i686-uwp-windows-msvc" then "windows_i686_msvc" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".windows_i686_msvc."0.42.1" { inherit profileName; }; - ${ if hostPlatform.config == "x86_64-pc-windows-gnu" || hostPlatform.config == "x86_64-uwp-windows-gnu" then "windows_x86_64_gnu" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".windows_x86_64_gnu."0.42.1" { inherit profileName; }; - ${ if hostPlatform.config == "x86_64-pc-windows-gnullvm" then "windows_x86_64_gnullvm" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".windows_x86_64_gnullvm."0.42.1" { inherit profileName; }; - ${ if hostPlatform.config == "x86_64-pc-windows-msvc" || hostPlatform.config == "x86_64-uwp-windows-msvc" then "windows_x86_64_msvc" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".windows_x86_64_msvc."0.42.1" { inherit profileName; }; + ${ if hostPlatform.config == "aarch64-pc-windows-gnullvm" then "windows_aarch64_gnullvm" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".windows_aarch64_gnullvm."0.52.0" { inherit profileName; }; + ${ if hostPlatform.parsed.cpu.name == "aarch64" && hostPlatform.parsed.abi.name == "msvc" then "windows_aarch64_msvc" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".windows_aarch64_msvc."0.52.0" { inherit profileName; }; + ${ if hostPlatform.parsed.cpu.name == "i686" && hostPlatform.parsed.abi.name == "gnu" then "windows_i686_gnu" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".windows_i686_gnu."0.52.0" { inherit profileName; }; + ${ if hostPlatform.parsed.cpu.name == "i686" && hostPlatform.parsed.abi.name == "msvc" then "windows_i686_msvc" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".windows_i686_msvc."0.52.0" { inherit profileName; }; + ${ if hostPlatform.parsed.cpu.name == "x86_64" && hostPlatform.parsed.abi.name == "gnu" then "windows_x86_64_gnu" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".windows_x86_64_gnu."0.52.0" { inherit profileName; }; + ${ if hostPlatform.config == "x86_64-pc-windows-gnullvm" then "windows_x86_64_gnullvm" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".windows_x86_64_gnullvm."0.52.0" { inherit profileName; }; + ${ if hostPlatform.parsed.cpu.name == "x86_64" && hostPlatform.parsed.abi.name == "msvc" then "windows_x86_64_msvc" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".windows_x86_64_msvc."0.52.0" { inherit profileName; }; }; }); - "registry+https://github.com/rust-lang/crates.io-index".windows_aarch64_gnullvm."0.42.1" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".windows_aarch64_gnullvm."0.48.5" = overridableMkRustCrate (profileName: rec { name = "windows_aarch64_gnullvm"; - version = "0.42.1"; + version = "0.48.5"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "8c9864e83243fdec7fc9c5444389dcbbfd258f745e7853198f365e3c4968a608"; }; + src = fetchCratesIo { inherit name version; sha256 = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8"; }; }); - "registry+https://github.com/rust-lang/crates.io-index".windows_aarch64_msvc."0.36.1" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".windows_aarch64_gnullvm."0.52.0" = overridableMkRustCrate (profileName: rec { + name = "windows_aarch64_gnullvm"; + version = "0.52.0"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "cb7764e35d4db8a7921e09562a0304bf2f93e0a51bfccee0bd0bb0b666b015ea"; }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".windows_aarch64_msvc."0.48.5" = overridableMkRustCrate (profileName: rec { name = "windows_aarch64_msvc"; - version = "0.36.1"; + version = "0.48.5"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "9bb8c3fd39ade2d67e9874ac4f3db21f0d710bee00fe7cab16949ec184eeaa47"; }; + src = fetchCratesIo { inherit name version; sha256 = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc"; }; }); - "registry+https://github.com/rust-lang/crates.io-index".windows_aarch64_msvc."0.42.1" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".windows_aarch64_msvc."0.52.0" = overridableMkRustCrate (profileName: rec { name = "windows_aarch64_msvc"; - version = "0.42.1"; + version = "0.52.0"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "4c8b1b673ffc16c47a9ff48570a9d85e25d265735c503681332589af6253c6c7"; }; + src = fetchCratesIo { inherit name version; sha256 = "bbaa0368d4f1d2aaefc55b6fcfee13f41544ddf36801e793edbbfd7d7df075ef"; }; }); - "registry+https://github.com/rust-lang/crates.io-index".windows_i686_gnu."0.36.1" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".windows_i686_gnu."0.48.5" = overridableMkRustCrate (profileName: rec { name = "windows_i686_gnu"; - version = "0.36.1"; + version = "0.48.5"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "180e6ccf01daf4c426b846dfc66db1fc518f074baa793aa7d9b9aaeffad6a3b6"; }; + src = fetchCratesIo { inherit name version; sha256 = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e"; }; }); - "registry+https://github.com/rust-lang/crates.io-index".windows_i686_gnu."0.42.1" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".windows_i686_gnu."0.52.0" = overridableMkRustCrate (profileName: rec { name = "windows_i686_gnu"; - version = "0.42.1"; + version = "0.52.0"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "de3887528ad530ba7bdbb1faa8275ec7a1155a45ffa57c37993960277145d640"; }; + src = fetchCratesIo { inherit name version; sha256 = "a28637cb1fa3560a16915793afb20081aba2c92ee8af57b4d5f28e4b3e7df313"; }; }); - "registry+https://github.com/rust-lang/crates.io-index".windows_i686_msvc."0.36.1" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".windows_i686_msvc."0.48.5" = overridableMkRustCrate (profileName: rec { name = "windows_i686_msvc"; - version = "0.36.1"; + version = "0.48.5"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "e2e7917148b2812d1eeafaeb22a97e4813dfa60a3f8f78ebe204bcc88f12f024"; }; + src = fetchCratesIo { inherit name version; sha256 = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406"; }; }); - "registry+https://github.com/rust-lang/crates.io-index".windows_i686_msvc."0.42.1" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".windows_i686_msvc."0.52.0" = overridableMkRustCrate (profileName: rec { name = "windows_i686_msvc"; - version = "0.42.1"; + version = "0.52.0"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "bf4d1122317eddd6ff351aa852118a2418ad4214e6613a50e0191f7004372605"; }; + src = fetchCratesIo { inherit name version; sha256 = "ffe5e8e31046ce6230cc7215707b816e339ff4d4d67c65dffa206fd0f7aa7b9a"; }; }); - "registry+https://github.com/rust-lang/crates.io-index".windows_x86_64_gnu."0.36.1" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".windows_x86_64_gnu."0.48.5" = overridableMkRustCrate (profileName: rec { name = "windows_x86_64_gnu"; - version = "0.36.1"; + version = "0.48.5"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "4dcd171b8776c41b97521e5da127a2d86ad280114807d0b2ab1e462bc764d9e1"; }; + src = fetchCratesIo { inherit name version; sha256 = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e"; }; }); - "registry+https://github.com/rust-lang/crates.io-index".windows_x86_64_gnu."0.42.1" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".windows_x86_64_gnu."0.52.0" = overridableMkRustCrate (profileName: rec { name = "windows_x86_64_gnu"; - version = "0.42.1"; + version = "0.52.0"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "3d6fa32db2bc4a2f5abeacf2b69f7992cd09dca97498da74a151a3132c26befd"; }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".windows_x86_64_gnullvm."0.48.5" = overridableMkRustCrate (profileName: rec { + name = "windows_x86_64_gnullvm"; + version = "0.48.5"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "c1040f221285e17ebccbc2591ffdc2d44ee1f9186324dd3e84e99ac68d699c45"; }; + src = fetchCratesIo { inherit name version; sha256 = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc"; }; }); - "registry+https://github.com/rust-lang/crates.io-index".windows_x86_64_gnullvm."0.42.1" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".windows_x86_64_gnullvm."0.52.0" = overridableMkRustCrate (profileName: rec { name = "windows_x86_64_gnullvm"; - version = "0.42.1"; + version = "0.52.0"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "628bfdf232daa22b0d64fdb62b09fcc36bb01f05a3939e20ab73aaf9470d0463"; }; + src = fetchCratesIo { inherit name version; sha256 = "1a657e1e9d3f514745a572a6846d3c7aa7dbe1658c056ed9c3344c4109a6949e"; }; }); - "registry+https://github.com/rust-lang/crates.io-index".windows_x86_64_msvc."0.36.1" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".windows_x86_64_msvc."0.48.5" = overridableMkRustCrate (profileName: rec { name = "windows_x86_64_msvc"; - version = "0.36.1"; + version = "0.48.5"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "c811ca4a8c853ef420abd8592ba53ddbbac90410fab6903b3e79972a631f7680"; }; + src = fetchCratesIo { inherit name version; sha256 = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538"; }; }); - "registry+https://github.com/rust-lang/crates.io-index".windows_x86_64_msvc."0.42.1" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".windows_x86_64_msvc."0.52.0" = overridableMkRustCrate (profileName: rec { name = "windows_x86_64_msvc"; - version = "0.42.1"; + version = "0.52.0"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "447660ad36a13288b1db4d4248e857b510e8c3a225c822ba4fb748c0aafecffd"; }; + src = fetchCratesIo { inherit name version; sha256 = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04"; }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".winnow."0.5.40" = overridableMkRustCrate (profileName: rec { + name = "winnow"; + version = "0.5.40"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "f593a95398737aeed53e489c785df13f3618e41dbcd6718c6addbf1395aa6876"; }; + features = builtins.concatLists [ + [ "alloc" ] + [ "default" ] + [ "std" ] + ]; + dependencies = { + memchr = rustPackages."registry+https://github.com/rust-lang/crates.io-index".memchr."2.7.1" { inherit profileName; }; + }; }); - "registry+https://github.com/rust-lang/crates.io-index".winreg."0.10.1" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".winreg."0.50.0" = overridableMkRustCrate (profileName: rec { name = "winreg"; - version = "0.10.1"; + version = "0.50.0"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1"; }; + dependencies = { + cfg_if = rustPackages."registry+https://github.com/rust-lang/crates.io-index".cfg-if."1.0.0" { inherit profileName; }; + windows_sys = rustPackages."registry+https://github.com/rust-lang/crates.io-index".windows-sys."0.48.0" { inherit profileName; }; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".wyz."0.5.1" = overridableMkRustCrate (profileName: rec { + name = "wyz"; + version = "0.5.1"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "80d0f4e272c85def139476380b12f9ac60926689dd2e01d4923222f40580869d"; }; + src = fetchCratesIo { inherit name version; sha256 = "05f360fc0b24296329c78fda852a1e9ae82de9cf7b27dae4b7f62f118f77b9ed"; }; dependencies = { - winapi = rustPackages."registry+https://github.com/rust-lang/crates.io-index".winapi."0.3.9" { inherit profileName; }; + tap = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tap."1.0.1" { inherit profileName; }; }; }); + "registry+https://github.com/rust-lang/crates.io-index".xmlparser."0.13.6" = overridableMkRustCrate (profileName: rec { + name = "xmlparser"; + version = "0.13.6"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "66fee0b777b0f5ac1c69bb06d361268faafa61cd4682ae064a171c16c433e9e4"; }; + features = builtins.concatLists [ + [ "default" ] + [ "std" ] + ]; + }); + "registry+https://github.com/rust-lang/crates.io-index".yaml-rust."0.4.5" = overridableMkRustCrate (profileName: rec { name = "yaml-rust"; version = "0.4.5"; @@ -4947,22 +6252,47 @@ in }; }); - "registry+https://github.com/rust-lang/crates.io-index".zeroize."1.5.7" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".zerocopy."0.7.32" = overridableMkRustCrate (profileName: rec { + name = "zerocopy"; + version = "0.7.32"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "74d4d3961e53fa4c9a25a8637fc2bfaf2595b3d3ae34875568a5cf64787716be"; }; + features = builtins.concatLists [ + [ "simd" ] + ]; + dependencies = { + ${ if false then "zerocopy_derive" else null } = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".zerocopy-derive."0.7.32" { profileName = "__noProfile"; }; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".zerocopy-derive."0.7.32" = overridableMkRustCrate (profileName: rec { + name = "zerocopy-derive"; + version = "0.7.32"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6"; }; + dependencies = { + proc_macro2 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".proc-macro2."1.0.78" { inherit profileName; }; + quote = rustPackages."registry+https://github.com/rust-lang/crates.io-index".quote."1.0.35" { inherit profileName; }; + syn = rustPackages."registry+https://github.com/rust-lang/crates.io-index".syn."2.0.49" { inherit profileName; }; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".zeroize."1.7.0" = overridableMkRustCrate (profileName: rec { name = "zeroize"; - version = "1.5.7"; + version = "1.7.0"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "c394b5bd0c6f669e7275d9c20aa90ae064cb22e75a1cad54e1b34088034b149f"; }; + src = fetchCratesIo { inherit name version; sha256 = "525b4ec142c6b68a2d10f01f7bbf6755599ca3f81ea53b8431b7dd348f5fdb2d"; }; features = builtins.concatLists [ [ "alloc" ] [ "default" ] ]; }); - "registry+https://github.com/rust-lang/crates.io-index".zstd."0.11.2+zstd.1.5.2" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".zstd."0.13.0" = overridableMkRustCrate (profileName: rec { name = "zstd"; - version = "0.11.2+zstd.1.5.2"; + version = "0.13.0"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "20cc960326ece64f010d2d2107537f26dc589a6573a316bd5b1dba685fa5fde4"; }; + src = fetchCratesIo { inherit name version; sha256 = "bffb3309596d527cfcba7dfc6ed6052f1d39dfbd7c867aa2e865e4a449c10110"; }; features = builtins.concatLists [ [ "arrays" ] [ "default" ] @@ -4970,15 +6300,15 @@ in [ "zdict_builder" ] ]; dependencies = { - zstd_safe = rustPackages."registry+https://github.com/rust-lang/crates.io-index".zstd-safe."5.0.2+zstd.1.5.2" { inherit profileName; }; + zstd_safe = rustPackages."registry+https://github.com/rust-lang/crates.io-index".zstd-safe."7.0.0" { inherit profileName; }; }; }); - "registry+https://github.com/rust-lang/crates.io-index".zstd-safe."5.0.2+zstd.1.5.2" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".zstd-safe."7.0.0" = overridableMkRustCrate (profileName: rec { name = "zstd-safe"; - version = "5.0.2+zstd.1.5.2"; + version = "7.0.0"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "1d2a5585e04f9eea4b2a3d1eca508c4dee9592a89ef6f450c11719da0726f4db"; }; + src = fetchCratesIo { inherit name version; sha256 = "43747c7422e2924c11144d5229878b98180ef8b06cca4ab5af37afc8a8d8ea3e"; }; features = builtins.concatLists [ [ "arrays" ] [ "legacy" ] @@ -4986,26 +6316,23 @@ in [ "zdict_builder" ] ]; dependencies = { - libc = rustPackages."registry+https://github.com/rust-lang/crates.io-index".libc."0.2.139" { inherit profileName; }; - zstd_sys = rustPackages."registry+https://github.com/rust-lang/crates.io-index".zstd-sys."2.0.1+zstd.1.5.2" { inherit profileName; }; + zstd_sys = rustPackages."registry+https://github.com/rust-lang/crates.io-index".zstd-sys."2.0.9+zstd.1.5.5" { inherit profileName; }; }; }); - "registry+https://github.com/rust-lang/crates.io-index".zstd-sys."2.0.1+zstd.1.5.2" = overridableMkRustCrate (profileName: rec { + "registry+https://github.com/rust-lang/crates.io-index".zstd-sys."2.0.9+zstd.1.5.5" = overridableMkRustCrate (profileName: rec { name = "zstd-sys"; - version = "2.0.1+zstd.1.5.2"; + version = "2.0.9+zstd.1.5.5"; registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "9fd07cbbc53846d9145dbffdf6dd09a7a0aa52be46741825f5c97bdd4f73f12b"; }; + src = fetchCratesIo { inherit name version; sha256 = "9e16efa8a874a0481a574084d34cc26fdb3b99627480f785888deb6386506656"; }; features = builtins.concatLists [ [ "legacy" ] [ "std" ] [ "zdict_builder" ] ]; - dependencies = { - libc = rustPackages."registry+https://github.com/rust-lang/crates.io-index".libc."0.2.139" { inherit profileName; }; - }; buildDependencies = { - cc = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".cc."1.0.73" { profileName = "__noProfile"; }; + cc = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".cc."1.0.83" { profileName = "__noProfile"; }; + pkg_config = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".pkg-config."0.3.30" { profileName = "__noProfile"; }; }; }); diff --git a/examples/bank-emulator/Cargo.toml b/examples/bank-emulator/Cargo.toml index acdca6e..f18e180 100644 --- a/examples/bank-emulator/Cargo.toml +++ b/examples/bank-emulator/Cargo.toml @@ -9,38 +9,41 @@ default-members = ["."] [dependencies] actix-web = "4.1" -actix-multipart = "0.4.0" +actix-multipart = "0.6.1" async-trait = "0.1" base64 = "0.13" biscuit = "0.5" -chrono = { version = "0.4", features = ["serde"] } +chrono = { version = "0.4.31", features = ["serde"] } oneline-eyre = "0.1" config = { version = "0.11", default-features = false, features = ["toml"] } enumflags2 = "0.7" eyre = "0.6" -flume = "0.10" +flume = "0.11" futures-util = "0.3" hex = { version = "0.4", features = ["serde"] } -hyper = "0.14" +hyper = "0.14.28" prost = "0.8" prost-types = "0.8" rand = "0.8.5" reqwest = { version = "0.11", default-features = false, features = ["json", "rustls-tls", "multipart"] } rust_decimal = "1.14" -sqlx = { version = "0.5", features = ["runtime-tokio-rustls", "postgres", "offline", "chrono", "uuid", "json"] } +sqlx = { version = "0.6.3", features = ["runtime-tokio-rustls", "postgres", "offline", "chrono", "uuid", "json"] } serde = { version = "1", features = ["derive", "rc"] } serde_json = "1" serde_with = "1" smol_str = "0.1" tracing-actix-web = "0.6" tracing = "0.1" -tracing-subscriber = { version = "0.2", default-features = false, features = ["env-filter", "smallvec", "ansi", "parking_lot"] } -tracing-error = "0.1" +tracing-subscriber = { version = "0.3", default-features = false, features = ["env-filter", "smallvec", "ansi", "parking_lot"] } +tracing-error = "0.2" tokio = { version = "1.25", features = ["full"] } tonic = "0.5" -uuid = { version = "0.8", features = ["serde"] } m10-bank-emulator-protos = { path = "../../shared/rust/bank-emulator-protos", features = ["client"] } m10-rds-pool = { path = "../rds-pool" } -m10-sdk = "0.33.0" +m10-sdk = "0.34.0" pala-types = { path = "../../shared/rust/pala-types" } + +[dependencies.uuid] +version = "1.7.0" +features = ["v4","serde"] diff --git a/examples/bank-emulator/flake.nix b/examples/bank-emulator/flake.nix index 7360579..4fbe92c 100644 --- a/examples/bank-emulator/flake.nix +++ b/examples/bank-emulator/flake.nix @@ -1,7 +1,7 @@ { description = "m10-bank-emulator"; inputs = { - rust-overlay.url = "github:oxalica/rust-overlay?rev=dea24da3d3be23ab53ee80314474afd5fcb03c1c"; + rust-overlay.url = "github:oxalica/rust-overlay?rev=61dfa5a8129f7edbe9150253c68f673f87b16fb1"; flake-utils.url = "github:numtide/flake-utils"; cargo2nix.url = "github:cargo2nix/cargo2nix?rev=c149357cc3d17f2849c73eb7a09d07a307cdcfe8"; nixpkgs.follows = "cargo2nix/nixpkgs"; @@ -20,7 +20,7 @@ m10-protos = import ../../nix/protos.nix { inherit pkgs; }; rust-overrides = import ../../nix/rust-overrides.nix { inherit m10-protos; }; rustPkgs = pkgs.rustBuilder.makePackageSet { - rustChannel = "1.71.1"; + rustChannel = "1.75.0"; packageFun = import ./Cargo.nix; packageOverrides = rust-overrides; }; diff --git a/examples/bank-emulator/integration-tests/Cargo.toml b/examples/bank-emulator/integration-tests/Cargo.toml index 059a3b7..77385d1 100644 --- a/examples/bank-emulator/integration-tests/Cargo.toml +++ b/examples/bank-emulator/integration-tests/Cargo.toml @@ -16,6 +16,6 @@ serde = { version = "1", features = ["derive"] } serde_json = "1" tonic = "0.5" tokio = { version = "1.7.0", features = ["full"] } -uuid = { version = "0.8", features = ["serde"] } +uuid = { version = "1.7.0", features = ["v4", "serde"] } m10-bank-emulator = { path = ".." } -m10-sdk = "0.33.0" +m10-sdk = "0.34.0" diff --git a/examples/bank-emulator/integration-tests/src/accounts.rs b/examples/bank-emulator/integration-tests/src/accounts.rs index af62941..62c9a2e 100644 --- a/examples/bank-emulator/integration-tests/src/accounts.rs +++ b/examples/bank-emulator/integration-tests/src/accounts.rs @@ -1,5 +1,6 @@ use m10_bank_emulator::models::*; -use m10_sdk::{sdk, LedgerClient, Signer}; +use m10_sdk::Signer; +use m10_sdk::{StepBuilder, TransferBuilder}; use serde_json::json; use serde_json::Value; @@ -299,26 +300,15 @@ async fn accounts_wire_routes() { .await; println!("bank asset: {:?}", bank_asset); - let req = LedgerClient::transaction_request( - sdk::CreateTransfer { - transfer_steps: vec![sdk::TransferStep { - amount: 2200, - from_account_id: asset.ledger_account_id, - to_account_id: bank_asset.ledger_account_id, - metadata: vec![], - }], - }, - vec![], - ); - let mut ledger = crate::ledger_client(); + let ledger = crate::ledger_client(key_pair); - let txn_id = ledger - .create_transaction(key_pair.sign_request(req).await.unwrap()) - .await - .unwrap() - .tx_error() - .unwrap() - .tx_id; + let transfer = TransferBuilder::new().step(StepBuilder::new( + asset.ledger_account_id.as_slice().try_into().unwrap(), + bank_asset.ledger_account_id.as_slice().try_into().unwrap(), + 2200, + )); + + let txn_id = m10_sdk::transfer(&ledger, transfer).await.unwrap(); let balance_before = balance_after; let transfer = client @@ -464,14 +454,14 @@ async fn accounts_wire_routes() { .find(|a| a.asset_type == AssetType::IndirectCbdc) .expect("cbdc asset"); - let request = key_pair - .sign_request(sdk::GetAccountRequest { - id: regulated_asset.ledger_account_id.to_vec(), - }) - .await - .expect("request signed"); let regulated_account_before = ledger - .get_indexed_account(request.clone()) + .get_account( + regulated_asset + .ledger_account_id + .as_slice() + .try_into() + .unwrap(), + ) .await .expect("regulated ledger account"); @@ -515,17 +505,17 @@ async fn accounts_wire_routes() { tokio::time::sleep(std::time::Duration::from_millis(5000)).await; let regulated_account_after = ledger - .get_indexed_account(request) + .get_account( + regulated_asset + .ledger_account_id + .as_slice() + .try_into() + .unwrap(), + ) .await .expect("regulated ledger account"); - let request = key_pair - .sign_request(sdk::GetAccountRequest { - id: cbdc_asset.ledger_account_id.to_vec(), - }) - .await - .expect("request signed"); let cbdc_account = ledger - .get_indexed_account(request) + .get_account(cbdc_asset.ledger_account_id.as_slice().try_into().unwrap()) .await .expect("cbdc ledger account"); diff --git a/examples/bank-emulator/integration-tests/src/lib.rs b/examples/bank-emulator/integration-tests/src/lib.rs index 1306780..99b15a3 100644 --- a/examples/bank-emulator/integration-tests/src/lib.rs +++ b/examples/bank-emulator/integration-tests/src/lib.rs @@ -28,12 +28,15 @@ fn ledger_addr() -> String { } #[cfg(test)] -fn ledger_client() -> m10_sdk::LedgerClient { - m10_sdk::LedgerClient::new( - tonic::transport::Channel::from_shared(ledger_addr()) - .unwrap() - .connect_lazy() - .unwrap(), +fn ledger_client( + key_pair: m10_sdk::Ed25519, +) -> Box + Send + Sync> { + Box::new( + m10_sdk::GrpcClient::new( + tonic::transport::Channel::from_shared(ledger_addr()).unwrap(), + Some(std::sync::Arc::new(key_pair)), + ) + .unwrap(), ) } diff --git a/examples/bank-emulator/src/cbdc.rs b/examples/bank-emulator/src/cbdc.rs index 425bcd2..068c3df 100644 --- a/examples/bank-emulator/src/cbdc.rs +++ b/examples/bank-emulator/src/cbdc.rs @@ -1,7 +1,7 @@ use futures_util::StreamExt; use m10_sdk::{ sdk::{self, transaction_data::Data, FinalizedTransaction}, - Metadata, Signer, TransactionExt, + Metadata, TransactionExt, }; use pala_types::TxId; use sqlx::Acquire; @@ -103,17 +103,12 @@ impl CbdcAdjustmentHandler { .get(currency_code) .and_then(|c| c.cbdc_config.as_ref()) { - let mut client = self.context.ledger.clone(); - // Get balance of target account - let request = self + let indexed_account = self .context - .signer - .sign_request(sdk::GetAccountRequest { - id: target.to_vec(), - }) + .ledger + .get_account(target.as_slice().try_into()?) .await?; - let indexed_account = client.get_indexed_account(request).await?; debug!( "account {} balance {}", hex::encode(target), @@ -244,23 +239,18 @@ impl CbdcReserveHandler { } = issuing_transfer; if let Some(currency) = self.context.config.currencies.get(currency_code) { if let Some(cbdc_config) = ¤cy.cbdc_config { - let mut client = self.context.ledger.clone(); - // Get balance of target account - let request = self + let indexed_account = self .context - .signer - .sign_request(sdk::GetAccountRequest { - id: target.to_vec(), - }) + .ledger + .get_account(target.as_slice().try_into()?) .await?; - let indexed_account = client.get_indexed_account(request).await?; debug!( "account {} balance {}", hex::encode(target), indexed_account.balance ); - let issued = indexed_account.issuance.map(|i| i.issued_balance); + let issued = indexed_account.issuance.map(|i| i.balance); if let Some(issued_balance) = issued { // Difference between holding and issuance balance. // Note: If account was never funded this difference can be negative. diff --git a/examples/bank-emulator/src/config.rs b/examples/bank-emulator/src/config.rs index 95b6e4f..6859e22 100644 --- a/examples/bank-emulator/src/config.rs +++ b/examples/bank-emulator/src/config.rs @@ -1,12 +1,12 @@ #![allow(dead_code)] -pub use config::{ConfigError, File}; +pub use config::ConfigError; use m10_bank_emulator_protos::emulator::rtgs::{ bank_registration_request::BankAccountType, open_account_request::HolderType, requisition_funds_request::RequisitionType, rtgs_service_client::RtgsServiceClient, AccountRequest, AccountType, BankRegistrationRequest, OpenAccountRequest, RequisitionFundsRequest, }; -use m10_sdk::{sdk::GetBankRequest, Signer}; +use m10_sdk::{BankAccountType as SdkBankAccountType, Signer}; use rust_decimal::Decimal; use serde::Deserialize; use sqlx::Acquire; @@ -112,7 +112,7 @@ impl CurrencyConfig { let registration_request = BankRegistrationRequest { institute: context.config.bank_name.clone(), swift_code: context.config.swift_code.clone(), - public_key: context.signer.public_key().to_vec(), + public_key: context.ledger.signer()?.public_key().to_vec(), currency_code: self.code.to_uppercase(), display_name: context.config.bank_name.clone(), short_display: context.config.short_name.clone(), @@ -120,19 +120,15 @@ impl CurrencyConfig { }; let bank_data = rtgs.register_bank(registration_request).await?.into_inner(); currency.bank_id = Some(bank_data.bank_meta_data.to_vec()); - let request = context - .signer - .sign_request(GetBankRequest { - id: bank_data.bank_meta_data, - }) - .await?; - let bank_meta_data = context.ledger.clone().get_bank(request).await?; + let bank_meta_data = context.ledger.get_bank(bank_data.bank_meta_data).await?; for a in bank_meta_data.accounts { - let account_type = BankAccountType::from_i32(a.account_type) - .ok_or_else(|| Error::validation("accounts", "unknown account type"))?; - match account_type { - BankAccountType::Cbdc => currency.cbdc_account = Some(a.account_id), - BankAccountType::Drm => currency.regulated_account = Some(a.account_id), + match a.account_type { + SdkBankAccountType::CentralBankDigitalCurrency => { + currency.cbdc_account = Some(a.id.to_vec()) + } + SdkBankAccountType::DigitalRegulatedMoney => { + currency.regulated_account = Some(a.id.to_vec()) + } }; } currency.update(&mut txn).await?; diff --git a/examples/bank-emulator/src/context.rs b/examples/bank-emulator/src/context.rs index 7e8da97..f190e07 100644 --- a/examples/bank-emulator/src/context.rs +++ b/examples/bank-emulator/src/context.rs @@ -1,8 +1,9 @@ #![allow(dead_code)] +use std::sync::Arc; + use m10_rds_pool::{bb8, RdsManager}; -use m10_sdk::{ - client::Channel, directory::directory_service_client::DirectoryServiceClient, LedgerClient, -}; +use m10_sdk::M10CoreClient; +use m10_sdk::{directory::directory_service_client::DirectoryServiceClient, GrpcClient}; use sqlx::Acquire; use crate::emulator::BankEmulator; @@ -15,9 +16,8 @@ use crate::{ #[derive(Clone)] pub(crate) struct Context { - pub(crate) ledger: LedgerClient, - pub(crate) signer: ProxySigner, - pub(crate) directory: DirectoryServiceClient, + pub(crate) ledger: Arc + Send + Sync>>, + pub(crate) directory: DirectoryServiceClient, pub(crate) bank: BankEmulator, pub(crate) db_pool: bb8::Pool, pub(crate) config: Config, @@ -34,8 +34,10 @@ impl Context { db_pool.clone() }; Ok(Self { - ledger: LedgerClient::new(config.ledger_addr.connect_lazy()?), - signer: ProxySigner::new(&config), + ledger: Arc::new(Box::new(GrpcClient::new( + config.ledger_addr.clone(), + Some(std::sync::Arc::new(ProxySigner::new(&config))), + )?)), directory: DirectoryServiceClient::new(config.directory_addr.connect_lazy()?), bank: BankEmulator::new_from_config(emulator_config, bank_db_pool).await?, db_pool, diff --git a/examples/bank-emulator/src/controllers/accounts.rs b/examples/bank-emulator/src/controllers/accounts.rs index cc9bd28..0ce9b41 100644 --- a/examples/bank-emulator/src/controllers/accounts.rs +++ b/examples/bank-emulator/src/controllers/accounts.rs @@ -1,14 +1,12 @@ +#![allow(clippy::unnecessary_fallible_conversions)] use actix_web::{ delete, get, post, web::{Data, Json, Path, Query}, HttpResponse, Scope, }; use m10_sdk::{ - sdk::{ - transaction, CreateTransfer, Deposit, GetTransferRequest, SelfTransfer, SetFreezeState, - TransferStep, Withdraw, - }, - LedgerClient, Metadata, Signer, + sdk::{Deposit, SelfTransfer, SetFreezeState, Withdraw}, + Metadata, StepBuilder, TransferBuilder, TransferStatus, TransferStep, }; use serde_json::{json, Value}; use sqlx::Acquire; @@ -624,23 +622,18 @@ async fn convert_from( }; // get transaction from ledger - let txn_request = context - .signer - .sign_request(GetTransferRequest { - tx_id: request.txn_id, - }) - .await?; - let transfer = context.ledger.clone().get_transfer(txn_request).await?; + let transfer = context.ledger.get_transfer(request.txn_id).await?; - if transfer.state != transaction::finalized_transfer::TransferState::Accepted as i32 { + if transfer.status != TransferStatus::Accepted { return Err(Error::internal_msg("Transfer not accepted (state)")); } // find transfer step that has bank reserve account as target + let to_account_id = to_account_id.as_slice().try_into()?; let TransferStep { amount, .. } = transfer - .transfer_steps + .steps .into_iter() - .find(|s| s.to_account_id == to_account_id) + .find(|s| s.to == to_account_id) .ok_or_else(|| Error::internal_msg("Transfer not accepted (target account"))?; let mut bank = context.bank.clone(); @@ -712,24 +705,15 @@ async fn fund( .ok_or_else(Error::unauthorized)?; // create transaction - let deposit_metadata = Deposit::default().any(); - let payload = LedgerClient::transaction_request( - m10_sdk::ledger::transaction_data::Data::Transfer(CreateTransfer { - transfer_steps: vec![TransferStep { - from_account_id: ledger_account_id.to_vec(), - to_account_id: asset.ledger_account_id.to_vec(), - amount: request.amount_in_cents, - metadata: vec![deposit_metadata], - }], - }), - vec![], + let transfer = TransferBuilder::new().step( + StepBuilder::new( + ledger_account_id.as_slice().try_into()?, + asset.ledger_account_id.as_slice().try_into()?, + request.amount_in_cents, + ) + .metadata(Deposit::default()), ); - let signed_request = context.signer.sign_request(payload).await?; - let mut ledger = context.ledger.clone(); - ledger - .create_transaction(signed_request) - .await? - .tx_error()?; + m10_sdk::transfer(&context.ledger, transfer).await?; } Ok(HttpResponse::Ok().finish()) } @@ -803,25 +787,16 @@ async fn settle_deposit( .ok_or_else(Error::unauthorized)?; // create transaction - let deposit_metadata = Deposit::default().any(); - let payload = LedgerClient::transaction_request( - m10_sdk::ledger::transaction_data::Data::Transfer(CreateTransfer { - transfer_steps: vec![TransferStep { - from_account_id: ledger_account_id.to_vec(), - to_account_id: asset.ledger_account_id.to_vec(), - amount, - metadata: vec![deposit_metadata], - }], - }), - vec![], + let transfer = TransferBuilder::new().step( + StepBuilder::new( + ledger_account_id.as_slice().try_into()?, + asset.ledger_account_id.as_slice().try_into()?, + amount, + ) + .metadata(Deposit::default()), ); - let signed_request = context.signer.sign_request(payload).await?; - let mut ledger = context.ledger.clone(); - let txn = ledger - .create_transaction(signed_request) - .await? - .tx_error()?; - info!("Deposit mirrored on ledger: {}", txn.tx_id); + let tx_id = m10_sdk::transfer(&context.ledger, transfer).await?; + info!("Deposit mirrored on ledger: {}", tx_id); } Ok(HttpResponse::Ok().finish()) } @@ -886,25 +861,16 @@ async fn withdraw( .ok_or_else(Error::unauthorized)?; // create transaction - let withdraw_metadata = Withdraw::default().any(); - let payload = LedgerClient::transaction_request( - m10_sdk::ledger::transaction_data::Data::Transfer(CreateTransfer { - transfer_steps: vec![TransferStep { - from_account_id: asset.ledger_account_id.to_vec(), - to_account_id: ledger_account_id.to_vec(), - amount: request.amount_in_cents, - metadata: vec![withdraw_metadata], - }], - }), - vec![], + let transfer = TransferBuilder::new().step( + StepBuilder::new( + asset.ledger_account_id.as_slice().try_into()?, + ledger_account_id.as_slice().try_into()?, + request.amount_in_cents, + ) + .metadata(Withdraw::default()), ); - let signed_request = context.signer.sign_request(payload).await?; - let mut ledger = context.ledger.clone(); - let txn = ledger - .create_transaction(signed_request) - .await? - .tx_error()?; - Some(txn.tx_id) + let tx_id = m10_sdk::transfer(&context.ledger, transfer).await?; + Some(tx_id) } else { None }; diff --git a/examples/bank-emulator/src/controllers/contacts.rs b/examples/bank-emulator/src/controllers/contacts.rs index 5c78ae7..245f2fc 100644 --- a/examples/bank-emulator/src/controllers/contacts.rs +++ b/examples/bank-emulator/src/controllers/contacts.rs @@ -1,3 +1,4 @@ +#![allow(clippy::unnecessary_fallible_conversions)] use actix_multipart::Multipart; use actix_web::{ delete, get, patch, post, put, diff --git a/examples/bank-emulator/src/controllers/public_key.rs b/examples/bank-emulator/src/controllers/public_key.rs index 6c8b963..a1f794e 100644 --- a/examples/bank-emulator/src/controllers/public_key.rs +++ b/examples/bank-emulator/src/controllers/public_key.rs @@ -6,7 +6,7 @@ use m10_sdk::Signer; #[get("")] async fn get(context: Data) -> Result { - Ok(base64::encode(context.signer.public_key())) + Ok(base64::encode(context.ledger.signer()?.public_key())) } pub fn scope() -> Scope { diff --git a/examples/bank-emulator/src/drc.rs b/examples/bank-emulator/src/drc.rs index af00192..827a38a 100644 --- a/examples/bank-emulator/src/drc.rs +++ b/examples/bank-emulator/src/drc.rs @@ -1,7 +1,7 @@ use futures_util::StreamExt; use m10_sdk::{ - sdk::{self, transaction_data::Data, FinalizedTransaction}, - Signer, TransactionExt, + sdk::{transaction_data::Data, FinalizedTransaction}, + TransactionExt, }; use pala_types::TxId; use sqlx::Acquire; @@ -100,23 +100,18 @@ impl DrcReserveHandler { } = issuing_transfer; if let Some(currency) = self.context.config.currencies.get(currency_code) { if let Some(drc_config) = ¤cy.drc_config { - let mut client = self.context.ledger.clone(); - // Get balance of target account - let request = self + let indexed_account = self .context - .signer - .sign_request(sdk::GetAccountRequest { - id: target.to_vec(), - }) + .ledger + .get_account(target.as_slice().try_into()?) .await?; - let indexed_account = client.get_indexed_account(request).await?; debug!( "account {} balance {}", hex::encode(target), indexed_account.balance ); - let issued = indexed_account.issuance.map(|i| i.issued_balance); + let issued = indexed_account.issuance.map(|i| i.balance); if let Some(issued_balance) = issued { if indexed_account.balance < drc_config.reserve_low_bound(issued_balance) { debug!("DRC reserves low"); diff --git a/examples/bank-emulator/src/error.rs b/examples/bank-emulator/src/error.rs index 25b3ef2..12a2d9f 100644 --- a/examples/bank-emulator/src/error.rs +++ b/examples/bank-emulator/src/error.rs @@ -146,24 +146,14 @@ where fn from(err: E) -> Self { let source = eyre::Report::from(err); let kind = if let Some(status) = source.downcast_ref::() { - match status.code() { - tonic::Code::Ok => ErrorKind::Internal, - tonic::Code::Cancelled => ErrorKind::Upstream, - tonic::Code::Unknown => ErrorKind::Internal, - tonic::Code::InvalidArgument => ErrorKind::Internal, - tonic::Code::DeadlineExceeded => ErrorKind::Upstream, - tonic::Code::NotFound => ErrorKind::NotFound, - tonic::Code::AlreadyExists => ErrorKind::AlreadyExists, - tonic::Code::PermissionDenied => ErrorKind::Unauthorized, - tonic::Code::ResourceExhausted => ErrorKind::Internal, - tonic::Code::FailedPrecondition => ErrorKind::Internal, - tonic::Code::Aborted => ErrorKind::Upstream, - tonic::Code::OutOfRange => ErrorKind::Internal, - tonic::Code::Unimplemented => ErrorKind::Upstream, - tonic::Code::Internal => ErrorKind::Upstream, - tonic::Code::Unavailable => ErrorKind::Upstream, - tonic::Code::DataLoss => ErrorKind::Upstream, - tonic::Code::Unauthenticated => ErrorKind::Unauthorized, + status.code().into() + } else if let Some(err) = source.downcast_ref::() { + match err { + m10_sdk::error::M10Error::Signing(_) => ErrorKind::Internal, + m10_sdk::error::M10Error::Status(status) => status.code().into(), + m10_sdk::error::M10Error::Transaction(err) => err.code().into(), + m10_sdk::error::M10Error::Request(_) => ErrorKind::Upstream, + _ => ErrorKind::Internal, } } else if source.downcast_ref::().is_some() { ErrorKind::Upstream @@ -177,6 +167,40 @@ where } } +impl From for ErrorKind { + fn from(code: tonic::Code) -> ErrorKind { + match code { + tonic::Code::NotFound => ErrorKind::NotFound, + tonic::Code::AlreadyExists => ErrorKind::AlreadyExists, + tonic::Code::PermissionDenied | tonic::Code::Unauthenticated => ErrorKind::Unauthorized, + tonic::Code::Ok + | tonic::Code::Unknown + | tonic::Code::InvalidArgument + | tonic::Code::ResourceExhausted + | tonic::Code::FailedPrecondition + | tonic::Code::OutOfRange => ErrorKind::Internal, + tonic::Code::Cancelled + | tonic::Code::DeadlineExceeded + | tonic::Code::Aborted + | tonic::Code::Unimplemented + | tonic::Code::Internal + | tonic::Code::Unavailable + | tonic::Code::DataLoss => ErrorKind::Upstream, + } + } +} + +impl From for ErrorKind { + fn from(code: m10_sdk::sdk::transaction_error::Code) -> ErrorKind { + match code { + m10_sdk::sdk::transaction_error::Code::AlreadyExists => ErrorKind::AlreadyExists, + m10_sdk::sdk::transaction_error::Code::NotFound => ErrorKind::NotFound, + m10_sdk::sdk::transaction_error::Code::Unauthorized => ErrorKind::Unauthorized, + _ => ErrorKind::Upstream, + } + } +} + impl std::fmt::Display for ValidationError { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { write!(f, "{} is invalid - {}", self.field, self.msg) diff --git a/examples/bank-emulator/src/models/fees.rs b/examples/bank-emulator/src/models/fees.rs index 2054e43..5eec06f 100644 --- a/examples/bank-emulator/src/models/fees.rs +++ b/examples/bank-emulator/src/models/fees.rs @@ -1,3 +1,4 @@ +#![allow(clippy::non_canonical_partial_ord_impl)] #[cfg(test)] use std::collections::HashMap; use std::{cmp::Ordering, ops::RangeInclusive}; diff --git a/examples/bank-emulator/src/models/payments.rs b/examples/bank-emulator/src/models/payments.rs index 2698ffd..300adc8 100644 --- a/examples/bank-emulator/src/models/payments.rs +++ b/examples/bank-emulator/src/models/payments.rs @@ -32,11 +32,12 @@ impl TransferChain { Ok(TransferChain { id: transfer.tx_id, - timestamp: DateTime::::from_utc( - NaiveDateTime::from_timestamp( + timestamp: DateTime::::from_naive_utc_and_offset( + NaiveDateTime::from_timestamp_opt( (transfer.timestamp / 1_000_000) as i64, ((transfer.timestamp % 1_000_000) * 1000) as u32, - ), + ) + .expect("expected valid timestamp"), Utc, ) .to_string(), diff --git a/examples/bank-emulator/src/models/transfers.rs b/examples/bank-emulator/src/models/transfers.rs index 41b2c14..d2352f1 100644 --- a/examples/bank-emulator/src/models/transfers.rs +++ b/examples/bank-emulator/src/models/transfers.rs @@ -41,7 +41,10 @@ impl LedgerTransfer { currency_code: currency_code.into(), handler, handled: false, - timestamp: chrono::Utc.timestamp_millis(response.timestamp as i64), + timestamp: chrono::Utc + .timestamp_millis_opt(response.timestamp as i64) + .single() + .expect("expected valid timestamp"), } } @@ -81,7 +84,7 @@ impl LedgerTransfer { let height = tx_id.height(); sqlx::query_as( "SELECT * FROM ledger_transfers - WHERE handler = $1 AND tx_id >= $2 AND tx_id < $3 + WHERE handler = $1 AND tx_id >= $2 AND tx_id < $3 ORDER BY tx_id DESC LIMIT 1", ) .bind(handler) diff --git a/examples/bank-emulator/src/rbac.rs b/examples/bank-emulator/src/rbac.rs index 2c426d7..5d40a5e 100644 --- a/examples/bank-emulator/src/rbac.rs +++ b/examples/bank-emulator/src/rbac.rs @@ -7,7 +7,7 @@ use crate::{ use m10_sdk::{ prost::bytes::Bytes, - sdk::{self, rule::Verb, Operation, Role, RoleBinding, Rule, Value}, + sdk::{rule::Verb, Operation, Role, RoleBinding, Rule, Value}, Collection, DocumentUpdate, Signer, }; use uuid::Uuid; @@ -19,15 +19,7 @@ pub(crate) async fn is_key_known( key: &[u8], context: &Context, ) -> Result { - let request = context - .signer - .sign_request(sdk::GetRoleBindingRequest { - id: role_id.as_bytes().to_vec(), - }) - .await?; - let mut client = context.ledger.clone(); - let role_binding = client - .get_role_binding(request) + let role_binding = m10_sdk::get_role_binding(&context.ledger, role_id) .await .internal_error("getting role_binding")?; Ok(role_binding.subjects.contains(&Bytes::from(key.to_vec()))) @@ -75,7 +67,7 @@ pub(crate) async fn create_contact_rbac_role( let role = Role { id: role_id.clone(), name: format!("owner-{}", contact_name), - owner: Bytes::copy_from_slice(context.signer.public_key()), + owner: Bytes::copy_from_slice(context.ledger.signer()?.public_key()), rules, }; @@ -83,7 +75,7 @@ pub(crate) async fn create_contact_rbac_role( let role_binding = RoleBinding { id: role_id.clone(), name: format!("owner-{}", contact_name), - owner: Bytes::copy_from_slice(context.signer.public_key()), + owner: Bytes::copy_from_slice(context.ledger.signer()?.public_key()), role: role_id.clone(), ..Default::default() }; @@ -101,15 +93,7 @@ pub(crate) async fn add_accounts_to_role( ledger_accounts: Vec, context: &Context, ) -> Result<(), Error> { - let request = context - .signer - .sign_request(sdk::GetRoleRequest { - id: role_id.as_bytes().to_vec(), - }) - .await?; - let mut client = context.ledger.clone(); - let role = client - .get_role(request) + let role = m10_sdk::get_role(&context.ledger, role_id) .await .internal_error("getting customer role")?; let mut account_rule = role diff --git a/examples/bank-emulator/src/transfer_observer.rs b/examples/bank-emulator/src/transfer_observer.rs index ccf06e6..b0ee3f9 100644 --- a/examples/bank-emulator/src/transfer_observer.rs +++ b/examples/bank-emulator/src/transfer_observer.rs @@ -2,11 +2,10 @@ use flume::Sender; use futures_util::StreamExt; use m10_sdk::{ sdk::{self, FinalizedTransaction}, - Signer, + AccountFilter, GrpcClient, M10CoreClient, }; use pala_types::TxId; use sqlx::Acquire; -use tokio::time::Duration; use tracing::{debug, info}; use crate::{ @@ -72,24 +71,23 @@ impl TransferObserver { }; info!(?last_tx_id, "Observing transfers"); - let request = context - .signer - .sign_request(sdk::ObserveAccountsRequest { - involved_accounts: vec![account_id.clone()], - starting_from: Some(sdk::TxId { - tx_id: u64::from(last_tx_id) + 1, - }), - }) - .await?; - - let channel = - m10_sdk::ledger_client::Channel::builder(context.config.ledger_addr.uri().clone()) - .keep_alive_while_idle(true) - .http2_keep_alive_interval(Duration::from_secs(30)) - .connect_lazy()?; - let ledger = m10_sdk::LedgerClient::new(channel); + let req = AccountFilter::default() + .involves(account_id.as_slice().try_into()?) + .starting_from(u64::from(last_tx_id) + 1); + let observer = GrpcClient::connect( + context + .config + .ledger_addr + .clone() + .http2_keep_alive_interval(std::time::Duration::from_secs(30)) + .keep_alive_while_idle(true), + Some(std::sync::Arc::new(crate::signer::ProxySigner::new( + &context.config, + ))), + ) + .await?; - let mut stream = ledger.observe_transfers(request).await?; + let mut stream = observer.observe_transactions(req).await?; while let Some(msg) = stream.next().await { let sdk::FinalizedTransactions { transactions } = msg?; debug!(transfers = %transactions.len(),"observation"); diff --git a/examples/bank-emulator/src/utils.rs b/examples/bank-emulator/src/utils.rs index e4140e6..8cd5728 100644 --- a/examples/bank-emulator/src/utils.rs +++ b/examples/bank-emulator/src/utils.rs @@ -8,9 +8,12 @@ use m10_sdk::{ account::AccountId, contract::FinalizedContractExt, directory::{alias, Alias}, - prost::Any, - sdk::{self, transaction_data::Data, CreateTransfer, TransferStep}, - EnhancedTransfer, LedgerClient, MetadataExt, Signer, + sdk::{self, transaction_data::Data}, + EnhancedTransfer, MetadataExt, Signer, +}; +use m10_sdk::{ + prost::Any, NameOrOwnerFilter, PageBuilder, StepBuilder, TransferBuilder, TransferFilter, + TxnFilter, }; use tracing::{error, info}; use uuid::Uuid; @@ -18,18 +21,23 @@ use uuid::Uuid; const ALIAS_DEFAULT_OPERATOR: &str = "m10"; pub(crate) async fn submit_transaction( - data: impl Into, + data: impl Into + Send, context_id: Vec, context: &Context, ) -> Result { - let payload = LedgerClient::transaction_request(data, context_id.clone()); - let signed_request = context.signer.sign_request(payload).await?; - let client = context.ledger.clone(); + let signed_request = context + .ledger + .signed_transaction(data.into(), context_id.clone()) + .await?; retry( || { - let mut client = client.clone(); let signed_request = signed_request.clone(); - async move { client.create_transaction(signed_request).await } + async move { + context + .ledger + .create_transaction(signed_request.into()) + .await + } }, 3, ) @@ -46,22 +54,15 @@ pub(crate) async fn find_ledger_account( context: &Context, ) -> Result, Error> { let owner = owner - .map(|o| base64::decode(o).unwrap()) - .unwrap_or_else(|| context.signer.public_key().to_vec()); - let mut client = context.ledger.clone(); - let request = context - .signer - .sign_request(sdk::ListAccountMetadataRequest { - filter: Some(sdk::list_account_metadata_request::Filter::Owner(owner)), - page: None, - }) - .await?; - let docs = client - .list_account_metadata(request) + .map(|o| Ok::<_, Error>(base64::decode(o)?)) + .unwrap_or_else(|| Ok::<_, Error>(context.ledger.signer()?.public_key().to_vec()))?; + let filter = PageBuilder::filter(NameOrOwnerFilter::Owner(m10_sdk::PublicKey(owner))); + let accounts = context + .ledger + .list_account_metadata(filter) .await .map_err(|err| Error::internal_msg(err.to_string()))?; - let account = docs - .accounts + let account = accounts .iter() .find(|a| a.public_name == account_name) .ok_or_else(|| { @@ -78,7 +79,7 @@ pub(crate) async fn create_account_set( let account_set_id = Uuid::new_v4(); let payload = sdk::Operation::insert(sdk::AccountSet { id: account_set_id.as_bytes().to_vec(), - owner: context.signer.public_key().to_vec(), + owner: context.ledger.signer()?.public_key().to_vec(), accounts: ledger_accounts .into_iter() .map(|account_id| sdk::AccountRef { @@ -110,7 +111,7 @@ pub(crate) async fn create_ledger_account( .account_created; let account_doc = sdk::AccountMetadata { id: ledger_account_id.clone(), - owner: context.signer.public_key().to_vec(), + owner: context.ledger.signer()?.public_key().to_vec(), name, public_name, profile_image_url: profile_image_url.unwrap_or_default().to_string(), @@ -167,26 +168,20 @@ pub(crate) async fn ledger_transfer( metadata: Vec, context: &Context, ) -> Result { - // create transaction - let payload = LedgerClient::transaction_request( - m10_sdk::ledger::transaction_data::Data::Transfer(CreateTransfer { - transfer_steps: vec![TransferStep { - from_account_id, - to_account_id, - amount, - metadata, - }], - }), - vec![], + let step = metadata.into_iter().fold( + StepBuilder::new( + from_account_id.as_slice().try_into()?, + to_account_id.as_slice().try_into()?, + amount, + ), + |b, m| b.any_metadata(m), ); - let signed_request = context.signer.sign_request(payload).await?; - let mut ledger = context.ledger.clone(); - let txn = ledger - .create_transaction(signed_request) - .await? - .tx_error()?; - info!("Deposit mirrored on ledger: {}", txn.tx_id); - Ok(txn.tx_id) + + let transfer = TransferBuilder::new().step(step); + + let tx_id = m10_sdk::transfer(&context.ledger, transfer).await?; + info!("ledger txn: {}", tx_id); + Ok(tx_id) } async fn payment_from_transfer( @@ -207,17 +202,11 @@ async fn payment_from_transfer( // TODO: @sadroeck This requires access to all involved ledgers // But the current setup is always a single ledger, so just assume it's a single one let ledger_id = &transfer_info[0].ledger_id; - let req = sdk::ListTransferRequest { - filter: Some(sdk::list_transfer_request::Filter::ContextId( - contract_id.clone(), - )), - ..Default::default() - }; - let mut ledger = context.ledger.clone(); - let req = context.signer.sign_request(req).await?; - let contract_transfers = ledger.list_transfers(req).await?; - let contract_transfers = ledger - .enhance_transfers(contract_transfers.transfers, &context.signer) + let filter = TxnFilter::::by_context_id(contract_id.clone()); + let contract_transfers = context.ledger.list_raw_transfers(filter).await?; + let contract_transfers = context + .ledger + .enhance_transfers(contract_transfers.transfers) .await?; for transfer in contract_transfers { transfers.push(TransferChain::try_from_transfer( @@ -254,28 +243,8 @@ pub(crate) async fn get_payment( .get(&instrument) .ok_or_else(|| Error::internal_msg("unknown instrument"))?; - let mut ledger = context.ledger.clone(); - let request = context - .signer - .sign_request(sdk::GetTransferRequest { tx_id }) - .await?; - let transfer = match ledger.get_transfer(request).await { - Ok(t) => t, - Err(status) if status.code() == tonic::Code::NotFound => { - return Err(Error::not_found("transfer")); - } - Err(status) => { - info!("get transfer error {:?}", status); - return Err(Error::internal_msg("getting transfers")); - } - }; - let transfer = ledger - .enhance_transfer(transfer, &context.signer) - .await - .map_err(|err| { - info!(%err, "enhancing transfer"); - Error::internal_msg("enhancing transfers") - })?; + let transfer = context.ledger.get_raw_transfer(tx_id).await?; + let transfer = context.ledger.enhance_transfer(transfer).await?; let payment = payment_from_transfer(transfer, ¤cy.code, context) .await @@ -292,7 +261,6 @@ pub(crate) async fn list_payments( asset_type: AssetType, context: &Context, ) -> Result, Error> { - let mut ledger = context.ledger.clone(); let ledger_account_id = match ledger_account_id { Some(id) => id, None => match asset_type { @@ -303,24 +271,18 @@ pub(crate) async fn list_payments( } }, }; - let req = context - .signer - .sign_request(sdk::ListTransferRequest { - filter: Some(sdk::list_transfer_request::Filter::AccountId( - ledger_account_id, - )), - min_tx_id, - limit, - include_child_accounts, - ..Default::default() - }) - .await?; - let transfers = ledger - .list_transfers(req) + let filter = TxnFilter::::by_account(ledger_account_id.as_slice().try_into()?) + .min_tx(min_tx_id) + .limit(limit) + .include_child_accounts(include_child_accounts); + let transfers = context + .ledger + .list_raw_transfers(filter) .await .map_err(|_| Error::internal_msg("getting transfers"))?; - let mut transfers = ledger - .enhance_transfers(transfers.transfers, &context.signer) + let mut transfers = context + .ledger + .enhance_transfers(transfers.transfers) .await .map_err(|_| Error::internal_msg("enhancing transfers"))?; diff --git a/examples/bank-webapp/Dockerfile b/examples/bank-webapp/Dockerfile index bef81b4..8408480 100644 --- a/examples/bank-webapp/Dockerfile +++ b/examples/bank-webapp/Dockerfile @@ -1,4 +1,4 @@ -FROM node:14-buster +FROM node:18.17-bookworm LABEL maintainer "M10 Networks, Inc." EXPOSE 3000 diff --git a/examples/cbdc-admin/src-tauri/Cargo.toml b/examples/cbdc-admin/src-tauri/Cargo.toml index 436e5e4..2c5d80a 100644 --- a/examples/cbdc-admin/src-tauri/Cargo.toml +++ b/examples/cbdc-admin/src-tauri/Cargo.toml @@ -19,7 +19,7 @@ async-trait = "0.1" base64 = "0.13" config = { version = "0.11", default-features = false, features = ["toml"] } hex = "0.4" -m10-sdk = "0.33.0" +m10-sdk = "0.34.0" serde_json = "1.0" serde = { version = "1.0", features = ["derive"] } serde_with = "1" diff --git a/examples/m10_cli/Cargo.toml b/examples/m10_cli/Cargo.toml index 402db5c..37cf853 100644 --- a/examples/m10_cli/Cargo.toml +++ b/examples/m10_cli/Cargo.toml @@ -8,17 +8,17 @@ edition = "2021" anyhow = "=1.0.61" base64 = "0.13" bytes = "1" -chrono = "0.4" -clap = { version = "3.2", features = ["derive"] } -config = { version = "0.11", default-features = false, features = ["yaml", "json", "toml"] } +chrono = "0.4.31" +clap = { version = "4.3.10", features = ["derive"] } +config = { version = "0.13", default-features = false, features = ["yaml", "json", "toml"] } dirs = "3" futures-lite = "1.11" hex = "0.4" -hyper = "0.14" +hyper = "0.14.28" hyper-rustls = "0.22" libxid = { path = "../crates/libxid" } -m10-sdk = "0.33.0" -m10-protos = { version = "0.33.0", features = ["dynamic2"] } +m10-sdk = "0.34.0" +m10-protos = { version = "0.34.0", features = ["dynamic2"] } ring = { version = "0.16", features = ["std"] } ron = "0.8" serde = { version = "1", features = ["derive"] } @@ -29,4 +29,5 @@ csv = "1.2" thiserror = "1" tokio = { version = "1.25", features = ["full"] } tonic = { version = "0.5", features = ["tls", "tls-roots"] } -uuid = { version = "0.8", features = ["serde", "v4"] } +uuid = { version = "1.7.0", features = ["serde", "v4"] } + diff --git a/examples/m10_cli/src/collections/contracts.rs b/examples/m10_cli/src/collections/contracts.rs index 707404b..8f093c4 100644 --- a/examples/m10_cli/src/collections/contracts.rs +++ b/examples/m10_cli/src/collections/contracts.rs @@ -65,10 +65,11 @@ pub(crate) async fn show_contract(path: &str, formatter: Format) -> anyhow::Resu let transfer_requests = sdk::CreateLedgerTransfers::decode(contract.transactions.as_slice())?; let content = ContractContent { id: hex::encode(id).to_uppercase(), - valid_until: NaiveDateTime::from_timestamp( + valid_until: NaiveDateTime::from_timestamp_opt( (transfer_requests.valid_until / 1_000_000) as i64, ((transfer_requests.valid_until % 1_000_000) * 1000) as u32, ) + .expect("expected valid timestamp") .to_string(), transfers, endorsements: contract diff --git a/examples/m10_cli/src/collections/role_bindings.rs b/examples/m10_cli/src/collections/role_bindings.rs index 27eee1b..d2c99f9 100644 --- a/examples/m10_cli/src/collections/role_bindings.rs +++ b/examples/m10_cli/src/collections/role_bindings.rs @@ -1,9 +1,22 @@ +use std::{collections::HashMap, convert::TryFrom, str::FromStr}; + use m10_sdk::sdk; use serde_with::{serde_as, DisplayFromStr}; -use std::{collections::HashMap, convert::TryFrom}; use super::PrettyId; +#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)] +#[serde(transparent)] +pub(crate) struct Expression(pub(crate) HashMap); + +impl FromStr for Expression { + type Err = serde_json::Error; + + fn from_str(s: &str) -> Result { + Ok(Self(serde_json::from_str(s)?)) + } +} + #[serde_as] #[derive(serde::Serialize, serde::Deserialize)] pub struct RoleBinding { diff --git a/examples/m10_cli/src/collections/roles.rs b/examples/m10_cli/src/collections/roles.rs index 7b8fe3f..ce962c2 100644 --- a/examples/m10_cli/src/collections/roles.rs +++ b/examples/m10_cli/src/collections/roles.rs @@ -1,28 +1,25 @@ +use std::{convert::TryFrom, str::FromStr}; + use bytes::Bytes; use clap::Parser; use m10_sdk::sdk::{self, Value}; use serde::{Deserialize, Serialize}; use serde_with::{serde_as, DisplayFromStr}; -use std::{convert::TryFrom, error::Error, fmt::Debug, str::FromStr}; use uuid::Uuid; use super::PrettyId; #[derive(Clone, Parser, Debug, Serialize, Deserialize)] -pub(crate) struct RuleOptions { - #[clap(short, long, multiple_values = true)] +pub(crate) struct RuleArgs { + #[clap(short, long)] instances: Option>, #[clap(short, long)] collection: String, - #[clap(short, long, multiple_values = true)] + #[clap(short, long)] verbs: Vec, } -impl RuleOptions { - pub(crate) fn parse(s: &str) -> Result { - Self::try_parse_from(s.split_whitespace()) - } - +impl RuleArgs { pub(crate) fn to_rbac_rule(&self) -> sdk::Rule { let instance_keys = self.instances.as_ref().map_or(vec![], |i| { i.iter() @@ -39,12 +36,12 @@ impl RuleOptions { } } -impl FromStr for RuleOptions { - type Err = Box; +impl FromStr for RuleArgs { + type Err = anyhow::Error; fn from_str(s: &str) -> Result { let args = s.split_ascii_whitespace(); - let rule = RuleOptions::try_parse_from(args)?; + let rule = RuleArgs::try_parse_from(args)?; Ok(rule) } } diff --git a/examples/m10_cli/src/commands/auth.rs b/examples/m10_cli/src/commands/auth.rs index 5d5b8b9..00293b8 100644 --- a/examples/m10_cli/src/commands/auth.rs +++ b/examples/m10_cli/src/commands/auth.rs @@ -1,19 +1,34 @@ use std::time::Instant; use bytes::Buf; +use clap::Args; use hyper::{Body, Client, Method}; +use serde::{Deserialize, Serialize}; use serde_json::{from_reader, json, to_vec, Value}; use tokio::time::{sleep, Duration}; -use super::top_level_cmds::AuthOptions; -use crate::utils::m10_config_path; +use crate::{context::Context, utils::m10_config_path}; const OAUTH_AUDIENCE: &str = "https://api.m10.net"; const OAUTH_SCOPE: &str = "openid"; -impl AuthOptions { - pub(crate) async fn run(&self, config: &crate::Config) -> anyhow::Result<()> { - let AuthOptions { +#[derive(Clone, Args, Debug, Serialize, Deserialize)] +/// Obtains OAuth id and access token and writes them to +/// id.token +/// access.token +pub(crate) struct Auth { + #[arg(short, long, aliases = ["name", "user", "un"])] + pub(crate) username: Option, + #[arg(long, alias = "pw")] + pub(crate) password: Option, + /// Writes access token to stdout + #[arg(long, alias = "so", default_value_t)] + pub(crate) stdout: bool, +} + +impl Auth { + pub(crate) async fn run(&self, context: &Context) -> anyhow::Result<()> { + let Auth { username, password, stdout, @@ -30,7 +45,7 @@ impl AuthOptions { "scope": OAUTH_SCOPE, }); let request = hyper::Request::builder() - .uri(format!("https://{}/oauth/token", &config.server)) + .uri(format!("{}oauth/token", context.addr()?)) .method(Method::POST) .header(hyper::header::CONTENT_TYPE, "application/json") .body(Body::from(to_vec(&oauth_token_body)?))?; @@ -42,7 +57,7 @@ impl AuthOptions { "scope": OAUTH_SCOPE, }); let request = hyper::Request::builder() - .uri(format!("https://{}/oauth/device/code", &config.server)) + .uri(format!("{}oauth/device/code", context.addr()?)) .method(Method::POST) .header(hyper::header::CONTENT_TYPE, "application/json") .body(Body::from(to_vec(&device_code_body)?))?; @@ -66,7 +81,7 @@ impl AuthOptions { }); loop { let request = hyper::Request::builder() - .uri(format!("https://{}/oauth/token", &config.server)) + .uri(format!("{}oauth/token", context.addr()?)) .method(Method::POST) .header(hyper::header::CONTENT_TYPE, "application/json") .body(Body::from(to_vec(&oauth_token_body)?))?; diff --git a/examples/m10_cli/src/commands/batch.rs b/examples/m10_cli/src/commands/batch.rs index 41508eb..4d80d79 100644 --- a/examples/m10_cli/src/commands/batch.rs +++ b/examples/m10_cli/src/commands/batch.rs @@ -1,54 +1,79 @@ -use crate::context::Context; -use clap::{ArgGroup, Parser}; +use std::{fs::File, io::BufReader}; + +use clap::Subcommand; use m10_sdk::{ error::M10Error, sdk::{self, TransactionError}, DocumentBuilder, WithContext, }; use serde::{Deserialize, Serialize}; -use std::{fs::File, io::BufReader}; -#[derive(Clone, Parser, Debug, Serialize, Deserialize)] -#[clap(group = ArgGroup::new("migration_flags"), about)] -pub(crate) struct BatchOptions { - /// If set file can only contain CUD operations else only query operations - #[clap(short, long, group = "migration_flags")] - migration: bool, - /// Set batch file location - file: String, - /// If set only parses the files without sending any request - #[clap(long)] - dry_run: bool, +use crate::context::Context; + +#[derive(Subcommand, Clone, Debug, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub(crate) enum Run { + #[command(alias = "b")] + Batch, + #[command(alias = "m")] + Migration, } -impl BatchOptions { - pub(super) async fn run(&self, config: &crate::Config) -> anyhow::Result<()> { - let yaml_file = File::open(&self.file)?; +impl Run { + pub(super) async fn run( + self, + file: String, + dry_run: bool, + context: &Context, + ) -> anyhow::Result<()> { + match self { + Run::Batch => Self::run_batch(file, dry_run, context).await, + Run::Migration => Self::run_migragtion(file, dry_run, context).await, + } + } + + fn load_commands(file: &str) -> anyhow::Result> { + let yaml_file = File::open(file)?; let reader = BufReader::new(yaml_file); - let data: Vec = serde_yaml::from_reader(reader)?; - if self.dry_run { + Ok(serde_yaml::from_reader(reader)?) + } + + async fn run_migragtion(file: String, dry_run: bool, context: &Context) -> anyhow::Result<()> { + let data = Self::load_commands(&file)?; + if dry_run { for op in data { - op.dry_run(self.migration)?; + op.dry_run(true)?; } - } else if self.migration { + } else { let mut operations = DocumentBuilder::default(); + for op in data { - operations = operations.insert_operation(op.document_operation(config).await?); + operations = operations.insert_operation(op.document_operation(context).await?); } - let context = Context::new(config)?; - let result = context - .m10_client - .documents(operations.context_id(config.context_id.clone())) - .await; + let result = m10_sdk::documents( + context.ledger_client(), + operations.context_id(context.context_id()), + ) + .await; match result { Ok(_) => {} Err(M10Error::Transaction(TransactionError { code, .. })) if code == sdk::transaction::transaction_error::Code::AlreadyExists as i32 => {} Err(err) => anyhow::bail!(err), } + } + Ok(()) + } + + async fn run_batch(file: String, dry_run: bool, context: &Context) -> anyhow::Result<()> { + let data = Self::load_commands(&file)?; + if dry_run { + for op in data { + op.dry_run(false)?; + } } else { for op in data { - op.handle_batch(config).await?; + op.handle_batch(context).await?; } } Ok(()) diff --git a/examples/m10_cli/src/commands/call/actions.rs b/examples/m10_cli/src/commands/call/actions.rs deleted file mode 100644 index 95afea5..0000000 --- a/examples/m10_cli/src/commands/call/actions.rs +++ /dev/null @@ -1,72 +0,0 @@ -use crate::context::Context; -use anyhow::Context as AnyhowContext; -use clap::ArgGroup; -use clap::Parser; -use m10_sdk::account::AccountId; -use m10_sdk::ActionBuilder; -use m10_sdk::WithContext; -use serde::{Deserialize, Serialize}; -use std::fs::File; -use std::io::Read; -use std::path::PathBuf; - -#[derive(Clone, Parser, Debug, Serialize, Deserialize)] -#[clap(group = ArgGroup::new("target").required(true), about)] -pub(crate) struct ActionOptions { - /// Name of the registered action - #[clap(short, long)] - name: String, - /// Account ID invoking the action - #[clap(long)] - from: AccountId, - /// Target account ID - #[clap(short, long, group = "target")] - to: Option, - #[clap(short, long, group = "target")] - broadcast: bool, - /// Opaque payload. Interpreted as raw string - #[clap(short, long, conflicts_with = "file")] - payload: Option, - /// Read payload from file - #[clap(short, long, conflicts_with = "payload")] - file: Option, -} - -impl ActionOptions { - pub(crate) async fn invoke(&self, config: &crate::Config) -> anyhow::Result<()> { - let context = Context::new(config)?; - - let builder = if let Some(to) = self.to { - ActionBuilder::for_account(self.name.clone(), self.from, to) - } else { - ActionBuilder::for_all(self.name.clone(), self.from) - }; - - let mut buf = vec![]; - let payload = if let Some(payload) = self.payload.as_ref() { - // Use string as UTF-8 - payload.as_bytes().to_vec() - } else if let Some(path) = self.file.as_ref() { - let mut file = File::open(path).context("Could not read payload file")?; - file.read_to_end(&mut buf)?; - buf - } else { - eprintln!("Reading payload from STDIN. Press ENTER to continue.."); - let mut value = String::new(); - std::io::stdin() - .read_line(&mut value) - .context("Could not read from STDIN")?; - value.as_bytes().to_vec() - }; - let tx_id = context - .m10_client - .action( - builder - .payload(payload) - .context_id(config.context_id.clone()), - ) - .await?; - eprintln!("Invoked action {} in txId {}", self.name, tx_id); - Ok(()) - } -} diff --git a/examples/m10_cli/src/commands/call/mod.rs b/examples/m10_cli/src/commands/call/mod.rs deleted file mode 100644 index b4302b4..0000000 --- a/examples/m10_cli/src/commands/call/mod.rs +++ /dev/null @@ -1,21 +0,0 @@ -use clap::Parser; -use serde::{Deserialize, Serialize}; - -mod actions; - -#[derive(Clone, Parser, Debug, Serialize, Deserialize)] -#[serde(rename_all = "camelCase")] -#[allow(clippy::enum_variant_names)] -#[clap(about)] -pub(super) enum CallSubCommands { - /// Invokes a registered action - Action(actions::ActionOptions), -} - -impl CallSubCommands { - pub(super) async fn call(&self, config: &crate::Config) -> anyhow::Result<()> { - match self { - CallSubCommands::Action(op) => op.invoke(config).await, - } - } -} diff --git a/examples/m10_cli/src/commands/convert/deserialize.rs b/examples/m10_cli/src/commands/convert/deserialize.rs index f223dfc..3dd47ef 100644 --- a/examples/m10_cli/src/commands/convert/deserialize.rs +++ b/examples/m10_cli/src/commands/convert/deserialize.rs @@ -1,64 +1,56 @@ -use crate::{collections::*, utils}; -use clap::{Parser, Subcommand}; -use m10_sdk::{prost::Message, sdk, Format, PrettyPrint}; -use serde::{Deserialize, Serialize}; use std::fmt::Debug; -#[derive(Clone, Parser, Debug, Serialize, Deserialize)] -#[clap(about)] -pub(crate) struct DeserializeOptions { - /// Data from log - data: String, - /// Output format (one of 'json', 'yaml', 'raw') - #[clap(short = 'f', long, default_value = "raw")] - #[serde(default = "Format::default")] - format: Format, -} +use clap::Subcommand; +use m10_sdk::{prost::Message, sdk, Format, PrettyPrint}; +use serde::Serialize; -#[derive(Clone, Subcommand, Debug, Serialize, Deserialize)] +use crate::{collections::*, utils}; + +#[derive(Clone, Subcommand, Debug, Serialize, serde::Deserialize)] #[serde(rename_all = "camelCase")] -#[clap(about)] -pub(crate) enum DeserializeSubCommands { +pub(crate) enum Deserialize { /// Deserialize an account record - AccountMetadata(DeserializeOptions), + #[command(alias = "am")] + AccountMetadata, /// Deserialize an account set record - AccountSet(DeserializeOptions), + #[command(alias = "as")] + AccountSet, /// Deserialize a role record - Role(DeserializeOptions), + #[command(alias = "r")] + Role, /// Deserialize a role bindings record - RoleBinding(DeserializeOptions), + #[command(alias = "rb")] + RoleBinding, } -impl DeserializeSubCommands { - pub(super) fn deserialize(&self) -> anyhow::Result<()> { +impl Deserialize { + pub(super) fn run(self, data: String, format: Format) -> anyhow::Result<()> { match self { - DeserializeSubCommands::AccountMetadata(options) => { - options.print_data::()?; + Deserialize::AccountMetadata => { + Self::print_data::(data, format)?; } - DeserializeSubCommands::AccountSet(options) => { - options.print_data::()?; + Deserialize::AccountSet => { + Self::print_data::(data, format)?; } - DeserializeSubCommands::Role(options) => { - options.print_data::()?; + Deserialize::Role => { + Self::print_data::(data, format)?; } - DeserializeSubCommands::RoleBinding(options) => { - options.print_data::()?; + Deserialize::RoleBinding => { + Self::print_data::(data, format)?; } } Ok(()) } -} -impl DeserializeOptions { - fn print_data(&self) -> anyhow::Result<()> + fn print_data(data: String, format: Format) -> anyhow::Result<()> where D: Message + Default, I: TryFrom + Serialize, { - let buf = utils::vec_from_int_array(&self.data)?; + let buf = utils::vec_from_int_array(&data)?; let item = D::decode(buf.as_slice())?; let printable = I::try_from(item)?; - printable.print(self.format)?; + printable.print(format)?; Ok(()) } } diff --git a/examples/m10_cli/src/commands/convert/id_convert.rs b/examples/m10_cli/src/commands/convert/id_convert.rs deleted file mode 100644 index 23a0c51..0000000 --- a/examples/m10_cli/src/commands/convert/id_convert.rs +++ /dev/null @@ -1,91 +0,0 @@ -use crate::utils; -use clap::Parser; -use serde::{Deserialize, Serialize}; -use std::{convert::TryInto, str::FromStr}; -use uuid::Uuid; - -#[derive(Clone, Parser, Debug, Serialize, Deserialize)] -pub(crate) enum BinFormat { - HexString, - Uuid, - IntBytes, - HexBytes, - Base64, -} - -impl FromStr for BinFormat { - type Err = &'static str; - - fn from_str(s: &str) -> Result { - match s { - "hex-str" => Ok(BinFormat::HexString), - "uuid" => Ok(BinFormat::Uuid), - "int-array" => Ok(BinFormat::IntBytes), - "hex-array" => Ok(BinFormat::HexBytes), - "base64" => Ok(BinFormat::Base64), - _ => Err("no match"), - } - } -} - -#[derive(Clone, Parser, Debug, Serialize, Deserialize)] -#[clap(about)] -pub(crate) struct ConvertOptions { - /// Set input format (one of 'hex-str', 'uuid', 'int-array', hex-array', 'base64') - #[clap(short = 'f', long, default_value = "hex-str")] - from: BinFormat, - /// Set output format (one of 'hex-str', 'uuid', 'int-array', hex-array', 'base64') - #[clap(short = 't', long, default_value = "hex-str")] - to: BinFormat, - /// Input data, format must match --from option - data: String, -} - -impl ConvertOptions { - fn convert_from(&self) -> Result, anyhow::Error> { - let data = match self.from { - BinFormat::HexBytes => utils::vec_from_hex_array(&self.data)?, - BinFormat::Uuid => Uuid::parse_str(&self.data)?.as_bytes().to_vec(), - BinFormat::IntBytes => utils::vec_from_int_array(&self.data)?, - BinFormat::HexString => hex::decode(&self.data)?, - BinFormat::Base64 => base64::decode(&self.data)?, - }; - Ok(data) - } - - fn convert_to(&self, data: &[u8]) -> anyhow::Result<()> { - match self.to { - BinFormat::HexBytes => println!("{:02x?}", data), - BinFormat::Uuid => { - let uuid = Uuid::from_slice(data)?; - println!("{}", uuid); - } - BinFormat::IntBytes => println!("{:?}", data), - BinFormat::HexString => println!("{:?}", hex::encode(data)), - BinFormat::Base64 => println!("{:?}", base64::encode(data)), - } - Ok(()) - } - - pub(super) fn convert(&self) -> anyhow::Result<()> { - self.convert_to(&self.convert_from()?) - } - - pub(super) fn handle_account_chain_from(&self) -> anyhow::Result<()> { - let bytes = self.convert_from()?; - if bytes.len() != 16 { - return Err(anyhow::anyhow!("account id requires 16 bytes")); - } - let raw_id = u128::from_be_bytes((&bytes[0..16]).try_into()?); - let account_id = m10_sdk::account::AccountId::from_raw(raw_id)?; - utils::pprint_account_id(&account_id); - Ok(()) - } - - pub(super) fn handle_account_chain_to(&self) -> anyhow::Result<()> { - let id = utils::account_id_from_str(&self.data)?; - let raw_id = id.to_be_bytes(); - self.convert_to(&raw_id[..])?; - Ok(()) - } -} diff --git a/examples/m10_cli/src/commands/convert/mod.rs b/examples/m10_cli/src/commands/convert/mod.rs index 8ee4e92..d33656b 100644 --- a/examples/m10_cli/src/commands/convert/mod.rs +++ b/examples/m10_cli/src/commands/convert/mod.rs @@ -1,32 +1,129 @@ -use clap::Subcommand; -pub(super) use id_convert::BinFormat; +use std::convert::TryInto; + +use clap::{Subcommand, ValueEnum}; +use m10_sdk::Format; use serde::{Deserialize, Serialize}; +use uuid::Uuid; + +use crate::utils; mod deserialize; -mod id_convert; + +#[derive(Clone, ValueEnum, Debug, Serialize, Deserialize, PartialEq)] +pub(crate) enum BinFormat { + HexStr, + Uuid, + IntArray, + HexArray, + Base64, +} + +impl BinFormat { + pub(crate) fn print_bytes(&self, bytes: &[u8], exclude: Vec) -> anyhow::Result<()> { + if exclude.contains(self) { + return Err(anyhow::anyhow!("Unsupported format")); + } + match self { + BinFormat::IntArray => println!("{:?}", bytes), + BinFormat::HexArray => println!( + "[{}]", + bytes + .iter() + .map(|b| format!("{b:#02x?}")) + .collect::>() + .join(", ") + ), + BinFormat::HexStr => println!("{}", hex::encode(bytes)), + BinFormat::Base64 => println!("{}", base64::encode(bytes)), + BinFormat::Uuid => println!("{}", Uuid::from_slice(bytes)?), + } + Ok(()) + } +} #[derive(Clone, Subcommand, Debug, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] -#[clap(about)] -pub(crate) enum ConvertSubCommands { +pub(crate) enum Convert { /// Convert between formats - Id(id_convert::ConvertOptions), + #[command(alias = "i")] + Id { + /// Set output format + #[arg(short = 't', long, value_enum, default_value = "hex-str")] + to: BinFormat, + /// Input data + data: String, + }, /// Convert a 16 byte account id to chain notation - AccountChainFrom(id_convert::ConvertOptions), + #[command(alias = "ta")] + ToAccountChain { + /// Input data + data: String, + }, /// Convert an account id in chain notation to bytes - AccountChainTo(id_convert::ConvertOptions), + #[command(alias = "a")] + AccountChain { + /// Set output format + #[arg(short = 't', long, value_enum, default_value = "hex-str")] + to: BinFormat, + /// Input data + data: String, + }, /// Unpack raw wire data into protobuf messages - #[clap(subcommand)] - Unpack(deserialize::DeserializeSubCommands), + #[command(alias = "m")] + Message { + /// Data from log + data: String, + /// Output format (one of 'json', 'yaml', 'raw') + #[arg(short = 'f', long, default_value = "raw")] + #[serde(default)] + format: Format, + #[command(subcommand)] + cmd: deserialize::Deserialize, + }, } -impl ConvertSubCommands { - pub(crate) fn convert(&self) -> anyhow::Result<()> { +impl Convert { + pub(crate) fn convert(self) -> anyhow::Result<()> { match self { - ConvertSubCommands::Id(op) => op.convert(), - ConvertSubCommands::AccountChainFrom(op) => op.handle_account_chain_from(), - ConvertSubCommands::AccountChainTo(op) => op.handle_account_chain_to(), - ConvertSubCommands::Unpack(op) => op.deserialize(), + Convert::Id { to, data } => Self::convert_id(to, &data), + Convert::ToAccountChain { data } => Self::convert_account_chain_from(&data), + Convert::AccountChain { to, data } => Self::convert_account_chain_to(to, &data), + Convert::Message { data, format, cmd } => cmd.run(data, format), } } + + fn try_convert_from(data: &str) -> Result, anyhow::Error> { + utils::vec_from_hex_array(data) + .or_else(|_| { + utils::vec_from_int_array(data).or_else(|_| { + hex::decode(data).or_else(|_| { + base64::decode(data) + .or_else(|_| Uuid::parse_str(data).map(|u| u.as_bytes().to_vec())) + }) + }) + }) + .map_err(|_| anyhow::anyhow!("unsuported data format")) + } + + fn convert_id(to: BinFormat, data: &str) -> anyhow::Result<()> { + to.print_bytes(&Self::try_convert_from(data)?, vec![]) + } + + fn convert_account_chain_from(data: &str) -> anyhow::Result<()> { + let bytes = Self::try_convert_from(data)?; + if bytes.len() != 16 { + return Err(anyhow::anyhow!("account id requires 16 bytes")); + } + let raw_id = u128::from_be_bytes((&bytes[0..16]).try_into()?); + let account_id = m10_sdk::account::AccountId::from_raw(raw_id)?; + utils::pprint_account_id(&account_id); + Ok(()) + } + + fn convert_account_chain_to(to: BinFormat, data: &str) -> anyhow::Result<()> { + let id = utils::account_id_from_str(data)?; + let raw_id = id.to_be_bytes(); + to.print_bytes(&raw_id[..], vec![])?; + Ok(()) + } } diff --git a/examples/m10_cli/src/commands/create/account_sets.rs b/examples/m10_cli/src/commands/create/account_sets.rs index 5af83b3..882d5ba 100644 --- a/examples/m10_cli/src/commands/create/account_sets.rs +++ b/examples/m10_cli/src/commands/create/account_sets.rs @@ -1,40 +1,35 @@ use clap::Parser; use m10_sdk::{sdk, PublicKey}; use serde::{Deserialize, Serialize}; -use std::fmt::Debug; use uuid::Uuid; #[derive(Clone, Parser, Debug, Serialize, Deserialize)] -#[clap(about)] -pub(crate) struct CreateAccountSetOptions { +pub(crate) struct CreateAccountSetArgs { /// Ignore error if item exists - #[clap(short = 'e', long)] + #[arg(short = 'e', long)] #[serde(default)] pub(super) if_not_exists: bool, /// Set record uuid - #[clap(short, long)] + #[arg(short, long)] pub(super) id: Option, /// Set account references - #[clap(short, long, multiple_values = true)] + #[arg(short, long)] #[serde(default)] accounts: Vec, /// Set owner of the account set record - #[clap(short, long)] + #[arg(short, long)] owner: Option, } -impl super::BuildFromOptions for CreateAccountSetOptions { +impl super::BuildFromArgs for CreateAccountSetArgs { type Document = sdk::AccountSet; - fn build_from_options( - &self, - default_owner: PublicKey, - ) -> Result { + fn build_from_options(self, default_owner: PublicKey) -> Result { let id = self.id.unwrap_or_else(Uuid::new_v4).as_bytes().to_vec(); let owner = self.owner.clone().unwrap_or(default_owner).0; Ok(sdk::AccountSet { id, owner, - accounts: self.accounts.clone(), + accounts: self.accounts, }) } } diff --git a/examples/m10_cli/src/commands/create/accounts.rs b/examples/m10_cli/src/commands/create/accounts.rs index 515d48a..cc6d490 100644 --- a/examples/m10_cli/src/commands/create/accounts.rs +++ b/examples/m10_cli/src/commands/create/accounts.rs @@ -1,61 +1,58 @@ -use super::ledger_accounts::CreateLedgerAccountOptions; -use clap::Parser; +use clap::Args; use m10_sdk::{sdk, PublicKey}; use serde::{Deserialize, Serialize}; use uuid::Uuid; -#[derive(Clone, Parser, Debug, Serialize, Deserialize)] -#[clap(about)] -pub(crate) struct CreateAccountMetadataOptions { +use super::ledger_accounts::CreateLedgerAccountArgs; + +#[derive(Clone, Args, Debug, Serialize, Deserialize)] +pub(crate) struct CreateAccountMetadataArgs { /// Ignore error if item exists - #[clap(short = 'e', long)] + #[arg(short = 'e', long)] #[serde(default)] pub(super) if_not_exists: bool, /// Set an account id - #[clap(short, long)] + #[arg(short, long)] pub(super) id: Option, /// Set owner of the account record - #[clap(short, long)] + #[arg(short, long)] owner: Option, /// Set an account name - #[clap(short, long)] + #[arg(short, long)] name: Option, /// Set a name to be shown in transfers as sender - #[clap(short, long)] + #[arg(long, alias = "pn")] public_name: Option, /// Set profile image url - #[clap(long)] + #[arg(long, aliases = ["image", "pi"])] profile_image_url: Option, } -impl super::BuildFromOptions for CreateAccountMetadataOptions { +impl super::BuildFromArgs for CreateAccountMetadataArgs { type Document = sdk::AccountMetadata; - fn build_from_options( - &self, - default_owner: PublicKey, - ) -> Result { + fn build_from_options(self, default_owner: PublicKey) -> Result { let id = self.id.unwrap_or_else(Uuid::new_v4).as_bytes().to_vec(); - let owner = self.owner.clone().unwrap_or(default_owner).0; + let owner = self.owner.unwrap_or(default_owner).0; Ok(sdk::AccountMetadata { id, owner, - name: self.name.clone().unwrap_or_default(), - public_name: self.public_name.clone().unwrap_or_default(), - profile_image_url: self.profile_image_url.clone().unwrap_or_default(), + name: self.name.unwrap_or_default(), + public_name: self.public_name.unwrap_or_default(), + profile_image_url: self.profile_image_url.unwrap_or_default(), }) } } -impl From<&CreateLedgerAccountOptions> for CreateAccountMetadataOptions { - fn from(other: &CreateLedgerAccountOptions) -> CreateAccountMetadataOptions { - let CreateLedgerAccountOptions { +impl From<&CreateLedgerAccountArgs> for CreateAccountMetadataArgs { + fn from(other: &CreateLedgerAccountArgs) -> CreateAccountMetadataArgs { + let CreateLedgerAccountArgs { owner, name, public_name, profile_image_url, .. } = other; - CreateAccountMetadataOptions { + CreateAccountMetadataArgs { if_not_exists: false, id: None, owner: owner.clone(), diff --git a/examples/m10_cli/src/commands/create/banks.rs b/examples/m10_cli/src/commands/create/banks.rs index 245db54..6f7c52e 100644 --- a/examples/m10_cli/src/commands/create/banks.rs +++ b/examples/m10_cli/src/commands/create/banks.rs @@ -1,68 +1,71 @@ -use clap::Parser; +use std::str::FromStr; + +use clap::{Args, Parser}; use m10_sdk::{sdk, PublicKey}; use serde::{Deserialize, Serialize}; -use std::{error::Error, fmt::Debug, str::FromStr}; use uuid::Uuid; -#[derive(Clone, Parser, Debug, Serialize, Deserialize)] -#[clap(about)] -pub(crate) struct CreateBankOptions { +#[derive(Clone, Args, Debug, Serialize, Deserialize)] +pub(crate) struct CreateBankArgs { /// Ignore error if item exists - #[clap(short = 'e', long)] + #[arg(short = 'e', long)] #[serde(default)] pub(super) if_not_exists: bool, /// Set an bank's id - #[clap(short, long)] + #[arg(short, long)] pub(super) id: Option, /// Set owner of the account record - #[clap(short, long)] + #[arg(short, long)] owner: Option, /// Set an bank name - #[clap(short, long)] + #[arg(long, aliases = ["name", "sn"])] short_name: Option, /// Set a name to be shown in transfers as sender - #[clap(short, long)] + #[arg(short, long, alias = "dn")] display_name: Option, /// Set account refs associated with a bank - #[clap(short, long, required = false, parse(try_from_str = BankAccountRefOptions::parse))] - accounts: Vec, + #[arg(short, long, required = false)] + accounts: Vec, } -impl super::BuildFromOptions for CreateBankOptions { +impl super::BuildFromArgs for CreateBankArgs { type Document = sdk::Bank; - fn build_from_options( - &self, - default_owner: PublicKey, - ) -> Result { + fn build_from_options(self, default_owner: PublicKey) -> Result { let id = self.id.unwrap_or_else(Uuid::new_v4).as_bytes().to_vec(); - let owner = self.owner.clone().unwrap_or(default_owner).0; + let owner = self.owner.unwrap_or(default_owner).0; Ok(sdk::Bank { id, owner, - short_name: self.short_name.clone().unwrap_or_default(), - display_name: self.display_name.clone().unwrap_or_default(), + short_name: self.short_name.unwrap_or_default(), + display_name: self.display_name.unwrap_or_default(), accounts: self .accounts .iter() - .map(BankAccountRefOptions::to_bank_account_ref) + .map(BankAccountRefArgs::to_bank_account_ref) .collect::>()?, }) } } #[derive(Clone, Parser, Debug, Serialize, Deserialize)] -pub(crate) struct BankAccountRefOptions { - #[clap(short, long)] +pub(crate) struct BankAccountRefArgs { + #[arg(short, long)] account_type: crate::collections::banks::BankAccountType, - #[clap(short, long)] + #[arg(short, long)] id: String, } -impl BankAccountRefOptions { - pub(crate) fn parse(s: &str) -> Result { - Self::try_parse_from(s.split_whitespace()) +impl FromStr for BankAccountRefArgs { + type Err = anyhow::Error; + + fn from_str(s: &str) -> Result { + let args = s.split_ascii_whitespace(); + let rule = Self::try_parse_from(args)?; + Ok(rule) } +} +impl BankAccountRefArgs { pub(crate) fn to_bank_account_ref(&self) -> anyhow::Result { let id = hex::decode(&self.id)?; Ok(sdk::BankAccountRef { @@ -71,13 +74,3 @@ impl BankAccountRefOptions { }) } } - -impl FromStr for BankAccountRefOptions { - type Err = Box; - - fn from_str(s: &str) -> Result { - let args = s.split_ascii_whitespace(); - let rule = Self::try_parse_from(args)?; - Ok(rule) - } -} diff --git a/examples/m10_cli/src/commands/create/collection_metadata.rs b/examples/m10_cli/src/commands/create/collection_metadata.rs deleted file mode 100644 index ffd1e77..0000000 --- a/examples/m10_cli/src/commands/create/collection_metadata.rs +++ /dev/null @@ -1,48 +0,0 @@ -use crate::context::Context; -use clap::Parser; -use m10_sdk::{ - error::M10Error, - sdk::{transaction_error::Code, Operation}, - DocumentBuilder, WithContext, -}; -use serde::{Deserialize, Serialize}; -use std::fmt::Debug; - -#[derive(Clone, Parser, Debug, Serialize, Deserialize)] -#[clap(about)] -pub(crate) struct CreateCollectionMetadataOptions { - /// Set name of collection - #[clap(short, long)] - name: String, - /// Set descriptor name of protobuf message - #[clap(short, long)] - descriptor: String, -} - -impl CreateCollectionMetadataOptions { - pub(super) async fn create(&self, config: &crate::Config) -> anyhow::Result<()> { - let context = Context::new(config)?; - let response = context - .m10_client - .documents( - DocumentBuilder::default() - .insert_operation(self.create_operation()) - .context_id(config.context_id.clone()), - ) - .await; - match response { - Ok(_) => {} - Err(M10Error::Transaction(err)) if err.code() == Code::AlreadyExists => { - eprintln!("ignoring existing collection: {}", self.name); - } - Err(err) => { - anyhow::bail!("{}", err); - } - } - Ok(()) - } - - pub(crate) fn create_operation(&self) -> Operation { - Operation::new_collection(self.name.clone(), self.descriptor.clone(), Vec::default()) - } -} diff --git a/examples/m10_cli/src/commands/create/directory_entry.rs b/examples/m10_cli/src/commands/create/directory_entry.rs index bab7c6f..3b6e68a 100644 --- a/examples/m10_cli/src/commands/create/directory_entry.rs +++ b/examples/m10_cli/src/commands/create/directory_entry.rs @@ -1,29 +1,54 @@ -use clap::{Parser, Subcommand}; +use clap::Subcommand; use m10_sdk::directory::{directory_service_client::DirectoryServiceClient, Alias, Ledger}; use serde::{Deserialize, Serialize}; -use tonic::metadata::MetadataValue; -use tonic::transport::Channel; +use tonic::{ + metadata::MetadataValue, service::interceptor::InterceptedService, transport::Channel, +}; use uuid::Uuid; use crate::context::Context; use crate::utils::m10_config_path; -use tonic::service::interceptor::InterceptedService; -#[derive(Clone, Parser, Debug, Serialize, Deserialize)] +#[derive(Clone, Subcommand, Debug, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] -#[clap(about)] -pub(crate) struct CreateDirEntryOptions { - /// Directory server address - server: String, - #[clap(subcommand)] - #[serde(flatten)] - cmd: CreateDirEntrySubCommands, +pub(crate) enum CreateDirEntry { + /// Create a new alias entry in directory + #[command(alias = "a")] + Alias { + /// Alias handle (unique) + #[arg(short = 'a', long)] + handle: String, + /// Display name + #[arg(short, long)] + display_name: String, + /// Set alias type (handle, phone, email) + #[arg(short = 't', long)] + alias_type: String, + /// Set 'account set' id the alias is linked to + #[arg(short = 'i', long)] + account_set_id: Uuid, + /// Operator id + #[arg(short, long)] + operator: String, + }, + /// Create a new ledger entry in directory + #[command(alias = "l")] + Ledger { + /// Operator id + #[arg(short, long)] + operator: String, + /// Ledger url + #[arg(short, long)] + url: String, + }, + /// Create an S3 object url + #[command(alias = "o")] + ObjectUrl, } -impl CreateDirEntryOptions { - pub(super) async fn create(&self) -> anyhow::Result<()> { - let addr = format!("https://{}", &self.server); - let channel = Context::channel_from_address(&addr, false)?; +impl CreateDirEntry { + pub(super) async fn create(self, context: &Context) -> anyhow::Result<()> { + let channel = context.channel()?; let access_token = std::fs::read_to_string(m10_config_path().join("access.token"))?; let access_token = format!("Bearer {}", access_token.trim()); let access_token = MetadataValue::from_str(access_token.as_str())?; @@ -34,10 +59,28 @@ impl CreateDirEntryOptions { Ok(req) }); - match &self.cmd { - CreateDirEntrySubCommands::Ledger(options) => options.create(&mut client).await, - CreateDirEntrySubCommands::Alias(options) => options.create(&mut client).await, - CreateDirEntrySubCommands::ObjectUrl => Self::create_object_url(&mut client).await, + match self { + CreateDirEntry::Ledger { operator, url } => { + create_ledger_entry(operator, url, &mut client).await + } + CreateDirEntry::Alias { + handle, + display_name, + alias_type, + account_set_id, + operator, + } => { + create_alias( + handle, + display_name, + alias_type, + account_set_id, + operator, + &mut client, + ) + .await + } + CreateDirEntry::ObjectUrl => Self::create_object_url(&mut client).await, } } @@ -52,85 +95,35 @@ impl CreateDirEntryOptions { } } -#[derive(Clone, Subcommand, Debug, Serialize, Deserialize)] -#[serde(rename_all = "camelCase")] -#[clap(about)] -pub(crate) enum CreateDirEntrySubCommands { - /// Create a new ledger entry in directory - Ledger(CreateLedgerOptions), - /// Create a new alias entry in directory - Alias(CreateAliasOptions), - /// Create an S3 object url - ObjectUrl, -} - -#[derive(Clone, Parser, Debug, Serialize, Deserialize)] -#[clap(about)] -pub(crate) struct CreateLedgerOptions { - /// Operator id - #[clap(short, long)] +pub async fn create_ledger_entry< + F: FnMut(tonic::Request<()>) -> Result, tonic::Status>, +>( operator: String, - /// Ledger url - #[clap(short, long)] url: String, + client: &mut DirectoryServiceClient>, +) -> anyhow::Result<()> { + let request = Ledger { operator, url }; + client.create_ledger(request).await?; + Ok(()) } -impl CreateLedgerOptions { - pub async fn create< - F: FnMut(tonic::Request<()>) -> Result, tonic::Status>, - >( - &self, - client: &mut DirectoryServiceClient>, - ) -> anyhow::Result<()> { - let Self { operator, url } = self.to_owned(); - let request = Ledger { operator, url }; - client.create_ledger(request).await?; - Ok(()) - } -} - -#[derive(Clone, Parser, Debug, Serialize, Deserialize)] -#[clap(about)] -pub(crate) struct CreateAliasOptions { - /// Alias handle (unique) - #[clap(short = 'a', long)] +pub async fn create_alias< + F: FnMut(tonic::Request<()>) -> Result, tonic::Status>, +>( handle: String, - /// Display name - #[clap(short, long)] display_name: String, - /// Set alias type (handle, phone, email) - #[clap(short = 't', long)] alias_type: String, - /// Set 'account set' id the alias is linked to - #[clap(short = 's', long)] account_set_id: Uuid, - /// Operator id - #[clap(short, long)] operator: String, -} - -impl CreateAliasOptions { - pub async fn create< - F: FnMut(tonic::Request<()>) -> Result, tonic::Status>, - >( - &self, - client: &mut DirectoryServiceClient>, - ) -> anyhow::Result<()> { - let Self { - handle, - display_name, - alias_type, - account_set_id, - operator, - } = self.to_owned(); - let request = Alias { - handle, - display_name, - alias_type: alias_type.parse()?, - account_set_id: account_set_id.as_bytes().to_vec(), - operator, - }; - client.create_alias(request).await?; - Ok(()) - } + client: &mut DirectoryServiceClient>, +) -> anyhow::Result<()> { + let request = Alias { + handle, + display_name, + alias_type: alias_type.parse()?, + account_set_id: account_set_id.as_bytes().to_vec(), + operator, + }; + client.create_alias(request).await?; + Ok(()) } diff --git a/examples/m10_cli/src/commands/create/images.rs b/examples/m10_cli/src/commands/create/images.rs deleted file mode 100644 index 213815d..0000000 --- a/examples/m10_cli/src/commands/create/images.rs +++ /dev/null @@ -1,40 +0,0 @@ -use crate::context::Context; -use clap::{ArgGroup, Parser}; -use serde::{Deserialize, Serialize}; -use std::{fmt::Debug, fs::File, io::Read}; - -#[derive(Clone, Parser, Debug, Serialize, Deserialize)] -#[clap(group = ArgGroup::new("source").required(true))] -#[clap(about)] -pub(crate) struct Image { - /// Set name of profile image - #[clap(short, long)] - name: String, - /// Set image data base64 encoded - #[clap(short, long, group = "source")] - data: Option, - /// Load image from file - #[clap(short, long, group = "source")] - file: Option, -} - -impl Image { - pub(super) async fn create(&self, config: &crate::Config) -> anyhow::Result<()> { - let mut context = Context::new(config)?; - - let image = if let Some(file_name) = &self.file { - let mut image_file = File::open(file_name)?; - let mut image: Vec = Vec::new(); - image_file.read_to_end(&mut image)?; - image - } else if let Some(data) = &self.data { - base64::decode(data)? - } else { - eprintln!("Neither image file or data given"); - return Err(anyhow::anyhow!("Required option missing")); - }; - - context.image_client.put_image(&self.name, image).await?; - Ok(()) - } -} diff --git a/examples/m10_cli/src/commands/create/key_pair.rs b/examples/m10_cli/src/commands/create/key_pair.rs deleted file mode 100644 index a85f6fe..0000000 --- a/examples/m10_cli/src/commands/create/key_pair.rs +++ /dev/null @@ -1,50 +0,0 @@ -use crate::{commands::convert::BinFormat, utils}; -use clap::{ArgGroup, Parser}; -use m10_sdk::sdk; -use serde::{Deserialize, Serialize}; -use std::fmt::Debug; - -#[derive(Clone, Parser, Debug, Serialize, Deserialize)] -#[clap(group = ArgGroup::new("method"), about)] -pub(crate) struct CreateKeyPairOptions { - /// File name to store keypair - key_file: Option, - /// Set format of output (one of 'hex-str', 'int-array', hex-array', 'base64') - #[clap(short = 'f', long, default_value = "base64")] - format: BinFormat, - /// Set algorithm to ED25519 (default) - #[clap(short, long, group = "method")] - ed25519: bool, - /// Set algorithm to P256 - #[clap(short, long, group = "method")] - p256: bool, -} - -impl CreateKeyPairOptions { - pub(super) fn create(&self) -> anyhow::Result<()> { - let method = if self.p256 { - sdk::signature::Algorithm::P256Sha256Asn1 - } else { - sdk::signature::Algorithm::Ed25519 - }; - let buf = if let Some(key_file) = &self.key_file { - let k = utils::create_key_pair(key_file, method)?; - eprintln!("public key is:"); - k - } else { - let k = utils::create_exportable_key_pair(method)?; - eprintln!("key pair is:"); - k - }; - match self.format { - BinFormat::IntBytes => println!("{:?}", buf), - BinFormat::HexBytes => println!("{:02x?}", buf), - BinFormat::HexString => println!("{}", hex::encode(buf)), - BinFormat::Base64 => println!("{}", base64::encode(buf)), - _ => { - return Err(anyhow::anyhow!("unsuported format")); - } - } - Ok(()) - } -} diff --git a/examples/m10_cli/src/commands/create/ledger_accounts.rs b/examples/m10_cli/src/commands/create/ledger_accounts.rs index c3094d6..9b718aa 100644 --- a/examples/m10_cli/src/commands/create/ledger_accounts.rs +++ b/examples/m10_cli/src/commands/create/ledger_accounts.rs @@ -1,63 +1,64 @@ -use super::accounts::CreateAccountMetadataOptions; -use crate::context::Context; -use clap::{ArgGroup, Parser}; +use clap::{ArgGroup, Args}; use m10_sdk::account::AccountId; use m10_sdk::{sdk, AccountBuilder, PublicKey, WithContext}; use serde::{Deserialize, Serialize}; use uuid::Uuid; -#[derive(Clone, Parser, Debug, Serialize, Deserialize)] -#[clap(group = ArgGroup::new("instrument").requires_all(&["code", "decimals"]).multiple(true), about)] -pub(crate) struct CreateLedgerAccountOptions { +use crate::context::Context; + +use super::accounts::CreateAccountMetadataArgs; + +#[derive(Clone, Args, Debug, Serialize, Deserialize)] +#[clap(group = ArgGroup::new("instrument").requires_all(&["code", "decimals"]).multiple(true))] +pub(crate) struct CreateLedgerAccountArgs { /// Check for existing account with this id - #[clap(long)] + #[arg(long)] id: Option, /// Set owner of the account record - #[clap(short, long)] + #[arg(short, long)] pub(super) owner: Option, /// Set an account name - #[clap(long)] + #[arg(long)] pub(super) name: Option, /// Set a name to be shown in transfers as sender - #[clap(long)] + #[arg(long, alias = "pn")] pub(super) public_name: Option, /// Set profile image url - #[clap(long)] + #[arg(long, aliases = ["image", "pi"])] pub(super) profile_image_url: Option, /// Set the parent account - #[clap(short, long, conflicts_with("instrument"))] + #[arg(long, aliases = ["parent", "pa"], conflicts_with("instrument"))] parent_account: Option, /// Set freeze state to 'frozen' - #[clap(short, long)] + #[arg(short, long)] #[serde(default)] frozen: bool, /// Set account type to 'issuance' - #[clap(short, long)] + #[arg(short, long)] #[serde(default)] issuance: bool, /// Currency code - #[clap(short, long, group = "instrument")] + #[arg(long, aliases = ["currency", "symbol", "cs", "cc"], group = "instrument")] code: Option, /// Number of relevant currency decimals - #[clap(short, long, group = "instrument")] + #[arg(short, long, group = "instrument")] decimals: Option, /// Currency description - #[clap(long, group = "instrument")] + #[arg(long, alias = "desc", group = "instrument")] description: Option, /// Holding balance limit + #[arg(short = 'l', long, aliases = ["limit", "hl"])] holding_limit: Option, } -impl CreateLedgerAccountOptions { - pub(super) async fn create(&self, config: &crate::Config) -> anyhow::Result<()> { - let mut context = Context::new(config)?; - +impl CreateLedgerAccountArgs { + pub(super) async fn create(&self, context: &Context) -> anyhow::Result<()> { // If an id was given it will be checked if that particular account exists already. // In case it exists no new account will be created otherwise a new account will be // created with no guaranty that it gets the given id. let mut create_new_account = true; if let Some(id) = self.id { - if context.m10_client.get_account(id).await.is_ok() { + if context.ledger_client().get_account(id).await.is_ok() { eprintln!("ledger account {:?} exists already", id); create_new_account = false } @@ -65,8 +66,7 @@ impl CreateLedgerAccountOptions { // Skips creation of a ledger account if id was given and it exists already. let account_id = if create_new_account { - self.create_ledger_account(&mut context, config.context_id.clone()) - .await? + self.create_ledger_account(context).await? } else { self.id.unwrap() }; @@ -74,11 +74,11 @@ impl CreateLedgerAccountOptions { // If any of the Arcadius record fields were set, an Arcadius record will be // created with a matching Id. if self.owner.is_some() || self.public_name.is_some() { - let mut account_options = CreateAccountMetadataOptions::from(self); + let mut account_options = CreateAccountMetadataArgs::from(self); let arcadius_id = Uuid::from_u128(account_id.as_raw()); account_options.id = Some(arcadius_id); account_options.if_not_exists = self.id.is_some(); - super::store_create::<_, sdk::AccountMetadata>(&account_options, config).await?; + super::store_create::<_, sdk::AccountMetadata>(account_options, context).await?; } else { eprintln!("Created ledger account"); println!("{}", hex::encode(account_id.as_raw().to_be_bytes())); @@ -86,11 +86,7 @@ impl CreateLedgerAccountOptions { Ok(()) } - async fn create_ledger_account( - &self, - context: &mut Context, - context_id: Vec, - ) -> Result { + async fn create_ledger_account(&self, context: &Context) -> Result { let builder = if let Some(parent_id) = self.parent_account { AccountBuilder::parent(parent_id) } else { @@ -106,8 +102,9 @@ impl CreateLedgerAccountOptions { .issuance(self.issuance) .frozen(self.frozen) .balance_limit(self.holding_limit.unwrap_or_default()) - .context_id(context_id); - let (_tx_id, account_id) = context.m10_client.create_account(builder).await?; + .context_id(context.context_id()); + let (_tx_id, account_id) = + m10_sdk::create_account(context.ledger_client(), builder).await?; Ok(account_id) } } diff --git a/examples/m10_cli/src/commands/create/mod.rs b/examples/m10_cli/src/commands/create/mod.rs index 49de65e..58739a9 100644 --- a/examples/m10_cli/src/commands/create/mod.rs +++ b/examples/m10_cli/src/commands/create/mod.rs @@ -1,133 +1,197 @@ -use crate::context::Context; -use clap::Subcommand; +use std::{fmt::Debug, fs::File, io::Read}; + +use clap::{Subcommand, ValueEnum}; use m10_sdk::{ account::AccountId, error::M10Error, prost::Message, sdk, Collection, DocumentBuilder, Pack, PublicKey, Signer, WithContext, }; use serde::{Deserialize, Serialize}; -use std::fmt::Debug; use uuid::Uuid; +use crate::{context::Context, utils}; + +use super::convert::BinFormat; + mod account_sets; mod accounts; pub(crate) mod banks; -mod collection_metadata; mod directory_entry; -mod images; -mod key_pair; mod ledger_accounts; -mod offline_token; mod role_bindings; mod roles; mod transfer; -mod uuid_options; + +#[derive(Clone, Copy, Debug, Serialize, Deserialize, ValueEnum)] +pub(crate) enum Algorithm { + P256, + Ed25519, +} + +impl From for sdk::signature::Algorithm { + fn from(value: Algorithm) -> Self { + match value { + Algorithm::Ed25519 => sdk::signature::Algorithm::Ed25519, + Algorithm::P256 => sdk::signature::Algorithm::P256Sha256Asn1, + } + } +} #[derive(Clone, Subcommand, Debug, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] -#[clap(about)] -pub(super) enum CreateSubCommands { - /// Create a new collection on the ledger - CollectionMetadata(collection_metadata::CreateCollectionMetadataOptions), - /// Create a new account set record on the ledger - AccountSet(account_sets::CreateAccountSetOptions), +pub(crate) enum Create { /// Create a new account metadata record on the ledger - Account(accounts::CreateAccountMetadataOptions), + #[command(alias = "a")] + Account(accounts::CreateAccountMetadataArgs), + /// Create a new account set record on the ledger + #[command(alias = "as")] + AccountSet(account_sets::CreateAccountSetArgs), /// Create a new bank metadata record on the ledger - Bank(banks::CreateBankOptions), + #[command(alias = "b")] + Bank(banks::CreateBankArgs), + /// Create a new collection on the ledger + #[command(alias = "c")] + CollectionMetadata { + /// Set name of collection + #[arg(short, long)] + name: String, + /// Set descriptor name of protobuf message + #[arg(short, long)] + descriptor: String, + }, /// Create a directory entry - DirectoryEntry(directory_entry::CreateDirEntryOptions), + #[command(alias = "d")] + DirectoryEntry { + #[command(subcommand)] + #[serde(flatten)] + cmd: directory_entry::CreateDirEntry, + }, + /// Create a new profile image + #[command(alias = "i")] + Image { + /// Set name of profile image + #[arg(short, long)] + name: String, + /// Set image data base64 encoded + #[arg(short, long, group = "source")] + data: Option, + /// Load image from file + #[arg(short, long, group = "source")] + file: Option, + }, + /// Create a new keypair and print the public key + #[command(aliases = ["k", "kp"])] + KeyPair { + /// File name to store keypair + #[arg(long, aliases = ["path", "fp"])] + file_path: Option, + /// Set format of output + #[arg(short = 'f', long, default_value = "base64")] + format: BinFormat, + /// Set signing algorithm + #[arg(short, long, value_enum)] + algorithm: Algorithm, + }, /// Create a new account on the ledger - LedgerAccount(ledger_accounts::CreateLedgerAccountOptions), + #[command(alias = "la")] + LedgerAccount(ledger_accounts::CreateLedgerAccountArgs), + /// Create a offline token from an account + #[command(alias = "ot")] + OfflineToken { + #[arg(short, long)] + account: AccountId, + #[arg(short, long)] + value: u64, + }, /// Create a new RBAC role record on the ledger - Role(roles::CreateRoleOptions), + #[command(alias = "r")] + Role(roles::CreateRoleArgs), /// Create a new RBAC role binding record on the ledger - RoleBinding(role_bindings::CreateRoleBindingOptions), + #[command(alias = "rb")] + RoleBinding(role_bindings::CreateRoleBindingArgs), /// Create a new transfer - Transfer(transfer::Transfer), - /// Create a new profile image - Image(images::Image), + #[command(alias = "t")] + Transfer(transfer::CreateTransferArgs), /// Generate new uuid(s) - Uuid(uuid_options::UuidOptions), - /// Create a new keypair and print the public key - KeyPair(key_pair::CreateKeyPairOptions), - /// Create a offline token from an account - OfflineToken(offline_token::CreateTokenOptions), + #[command(alias = "u")] + Uuid { + /// Set amount of uuids to be generated + #[arg(short = 'm', long)] + multiple: Option, + }, } -impl CreateSubCommands { - pub(crate) async fn create(&self, config: &crate::Config) -> anyhow::Result<()> { +impl Create { + pub(crate) async fn run(self, context: &Context) -> anyhow::Result<()> { match self { - CreateSubCommands::CollectionMetadata(options) => options.create(config).await, - CreateSubCommands::Account(options) => { - store_create::<_, sdk::AccountMetadata>(options, config).await + Create::Account(args) => store_create::<_, sdk::AccountMetadata>(args, context).await, + Create::AccountSet(args) => store_create::<_, sdk::AccountSet>(args, context).await, + Create::Bank(args) => store_create::<_, sdk::Bank>(args, context).await, + Create::CollectionMetadata { name, descriptor } => { + create_collection(name, descriptor, context).await } - CreateSubCommands::AccountSet(options) => { - store_create::<_, sdk::AccountSet>(options, config).await + Create::DirectoryEntry { cmd } => cmd.create(context).await, + Create::Image { name, data, file } => create_image(name, data, file, context).await, + Create::KeyPair { + file_path, + format, + algorithm, + } => create_key_pair(file_path, format, algorithm.into()), + Create::LedgerAccount(args) => args.create(context).await, + Create::OfflineToken { account, value } => { + create_offline_token(account, value, context).await } - CreateSubCommands::DirectoryEntry(options) => options.create().await, - CreateSubCommands::LedgerAccount(options) => options.create(config).await, - CreateSubCommands::Role(options) => store_create::<_, sdk::Role>(options, config).await, - CreateSubCommands::RoleBinding(options) => { - store_create::<_, sdk::RoleBinding>(options, config).await - } - CreateSubCommands::Transfer(options) => options.create(config).await, - CreateSubCommands::Image(options) => options.create(config).await, - CreateSubCommands::Uuid(options) => { - options.create(); + Create::Role(args) => store_create::<_, sdk::Role>(args, context).await, + Create::RoleBinding(args) => store_create::<_, sdk::RoleBinding>(args, context).await, + Create::Transfer(args) => args.create(context).await, + Create::Uuid { multiple } => { + generate_uuid(multiple); Ok(()) } - CreateSubCommands::KeyPair(options) => options.create(), - CreateSubCommands::Bank(options) => store_create::<_, sdk::Bank>(options, config).await, - CreateSubCommands::OfflineToken(options) => options.create(config).await, } } - pub(crate) async fn create_operation( - &self, - config: &crate::Config, + pub(crate) async fn document_operation( + self, + context: &Context, ) -> Result { match self { - CreateSubCommands::CollectionMetadata(options) => Ok(options.create_operation()), - CreateSubCommands::Account(options) => { - create_operation::<_, sdk::AccountMetadata>(options, config).await - } - CreateSubCommands::AccountSet(options) => { - create_operation::<_, sdk::AccountSet>(options, config).await + Create::CollectionMetadata { name, descriptor } => { + Ok(sdk::Operation::new_collection(name, descriptor, vec![])) } - CreateSubCommands::Role(options) => { - create_operation::<_, sdk::Role>(options, config).await + Create::Account(args) => { + create_operation::<_, sdk::AccountMetadata>(args, context).await } - CreateSubCommands::RoleBinding(options) => { - create_operation::<_, sdk::RoleBinding>(options, config).await + Create::AccountSet(args) => create_operation::<_, sdk::AccountSet>(args, context).await, + Create::Role(args) => create_operation::<_, sdk::Role>(args, context).await, + Create::RoleBinding(args) => { + create_operation::<_, sdk::RoleBinding>(args, context).await } _ => Err(anyhow::anyhow!("Not supported")), } } } -trait BuildFromOptions { +trait BuildFromArgs { type Document: Pack; - fn build_from_options(&self, default_owner: PublicKey) - -> Result; + fn build_from_options(self, default_owner: PublicKey) -> Result; } -async fn store_create(options: &O, config: &crate::Config) -> anyhow::Result<()> +async fn store_create(args: O, context: &Context) -> anyhow::Result<()> where - O: BuildFromOptions + Debug, + O: BuildFromArgs + Debug, D: Message + Pack + 'static, { - let context = Context::new(config)?; - let default_owner = context.m10_client.signer().public_key().to_vec(); - let document = options.build_from_options(PublicKey(default_owner))?; + let default_owner = context.signing_key()?.public_key().to_vec(); + + let document = args.build_from_options(PublicKey(default_owner))?; let id = document.id().to_vec(); - let response = context - .m10_client - .documents( - DocumentBuilder::default() - .insert(document) - .context_id(config.context_id.clone()), - ) - .await; + let response = m10_sdk::documents( + context.ledger_client(), + DocumentBuilder::default() + .insert(document) + .context_id(context.context_id()), + ) + .await; match response { Ok(_) => { eprintln!("Created {} resource:", D::COLLECTION); @@ -155,16 +219,109 @@ where } } -async fn create_operation( - options: &O, - config: &crate::Config, -) -> Result +async fn create_operation(args: O, context: &Context) -> Result where - O: BuildFromOptions, + O: BuildFromArgs, D: Message + Pack + 'static, { - let context = Context::new(config)?; - let default_owner = context.m10_client.signer().public_key().to_vec(); - let document = options.build_from_options(PublicKey(default_owner))?; + let default_owner = context.signing_key()?.public_key().to_vec(); + let document = args.build_from_options(PublicKey(default_owner))?; Ok(sdk::Operation::insert(document)) } + +pub(super) async fn create_collection( + name: String, + descriptor: String, + context: &Context, +) -> anyhow::Result<()> { + let response = m10_sdk::documents( + context.ledger_client(), + DocumentBuilder::default() + .insert_operation(sdk::Operation::new_collection( + name.clone(), + descriptor, + vec![], + )) + .context_id(context.context_id()), + ) + .await; + match response { + Ok(_) => {} + Err(M10Error::Transaction(err)) + if err.code() == sdk::transaction_error::Code::AlreadyExists => + { + eprintln!("ignoring existing collection: {}", name); + } + Err(err) => { + anyhow::bail!("{}", err); + } + } + Ok(()) +} + +async fn create_image( + name: String, + data: Option, + file: Option, + context: &Context, +) -> anyhow::Result<()> { + let image = if let Some(file_name) = file { + let mut image_file = File::open(file_name)?; + let mut image: Vec = Vec::new(); + image_file.read_to_end(&mut image)?; + image + } else if let Some(data) = data { + base64::decode(data)? + } else { + eprintln!("Neither image file or data given"); + return Err(anyhow::anyhow!("Required option missing")); + }; + + context.image_client()?.put_image(&name, image).await?; + Ok(()) +} + +fn create_key_pair( + key_file: Option, + format: BinFormat, + algorithm: sdk::signature::Algorithm, +) -> anyhow::Result<()> { + let buf = if let Some(key_file) = &key_file { + let k = utils::create_key_pair(key_file, algorithm)?; + eprintln!("public key is:"); + k + } else { + let k = utils::create_exportable_key_pair(algorithm)?; + eprintln!("key pair is:"); + k + }; + format.print_bytes(&buf, vec![BinFormat::Uuid])?; + Ok(()) +} + +async fn create_offline_token( + account: AccountId, + value: u64, + context: &Context, +) -> anyhow::Result<()> { + let (tx_id, token) = context + .ledger_client() + .create_token(account, value, None, context.context_id()) + .await?; + println!("txn-id: {tx_id}"); + let token = token.ok_or_else(|| anyhow::anyhow!("no token returned"))?; + let mut token_buf = vec![]; + token.encode(&mut token_buf)?; + let path = format!("./ot-{}.tok", hex::encode(tx_id.to_be_bytes().as_slice())); + std::fs::write(path, token_buf)?; + println!("{token:?}"); + Ok(()) +} + +fn generate_uuid(multiple: Option) { + let mul = multiple.unwrap_or(1); + for _ in 0..mul { + let uuid = Uuid::new_v4(); + println!("{}", uuid); + } +} diff --git a/examples/m10_cli/src/commands/create/offline_token.rs b/examples/m10_cli/src/commands/create/offline_token.rs deleted file mode 100644 index 23070f8..0000000 --- a/examples/m10_cli/src/commands/create/offline_token.rs +++ /dev/null @@ -1,31 +0,0 @@ -use clap::Parser; -use m10_sdk::{account::AccountId, prost::Message}; -use serde::{Deserialize, Serialize}; - -use crate::context::Context; - -#[derive(Clone, Parser, Debug, Serialize, Deserialize)] -pub(crate) struct CreateTokenOptions { - #[clap(short, long)] - account: AccountId, - #[clap(short, long)] - value: u64, -} - -impl CreateTokenOptions { - pub(super) async fn create(&self, config: &crate::Config) -> anyhow::Result<()> { - let context = Context::new(config)?; - let (tx_id, token) = context - .m10_client - .create_token(self.account, self.value, None, vec![]) - .await?; - println!("txn-id: {tx_id}"); - let token = token.ok_or_else(|| anyhow::anyhow!("no token returned"))?; - let mut token_buf = vec![]; - token.encode(&mut token_buf)?; - let path = format!("./ot-{}.tok", hex::encode(tx_id.to_be_bytes().as_slice())); - std::fs::write(path, token_buf)?; - println!("{token:?}"); - Ok(()) - } -} diff --git a/examples/m10_cli/src/commands/create/role_bindings.rs b/examples/m10_cli/src/commands/create/role_bindings.rs index 7585785..7c56a0c 100644 --- a/examples/m10_cli/src/commands/create/role_bindings.rs +++ b/examples/m10_cli/src/commands/create/role_bindings.rs @@ -1,62 +1,49 @@ -use clap::Parser; +use clap::Args; use m10_sdk::{sdk, PublicKey}; use serde::{Deserialize, Serialize}; use serde_with::{serde_as, DisplayFromStr}; -use std::{collections::HashMap, fmt::Debug}; use uuid::Uuid; -use crate::collections::PrettyId; +use crate::collections::{role_bindings::Expression, PrettyId}; #[serde_as] -#[derive(Clone, Parser, Debug, Serialize, Deserialize)] -#[clap(about)] -pub(crate) struct CreateRoleBindingOptions { +#[derive(Clone, Args, Debug, Serialize, Deserialize)] +pub(crate) struct CreateRoleBindingArgs { /// Ignore error if item exists - #[clap(short = 'e', long)] + #[arg(short = 'e', long)] #[serde(default)] pub(super) if_not_exists: bool, /// Set record uuid - #[clap(short, long)] + #[arg(short, long)] pub(super) id: Option, /// Set role binding name - #[clap(short, long, default_value_t)] + #[arg(short, long, default_value_t)] #[serde(default)] name: String, /// Set owner of the role record - #[clap(short, long)] + #[arg(short, long)] owner: Option, /// Link role binding to a role record - #[clap(short, long)] + #[arg(short, long)] #[serde_as(as = "DisplayFromStr")] role: PrettyId, - /// Set subjects - #[clap(short, long, multiple_values = true)] + /// Set subjects (list of public keys in base64 format) + #[arg(long, alias = "subjs")] #[serde(default)] subjects: Vec, /// Set extra guard expressions - #[clap( - short = 'g', - long, - parse(try_from_str = parse_key_vals) - )] - expressions: Option>, + #[arg(short = 'g', long, alias = "exps")] + expressions: Option, /// Set role binding to 'universal' - #[clap(short = 'u', long)] + #[arg(short = 'u', long, alias = "universal")] is_universal: bool, } -fn parse_key_vals(s: &str) -> Result, serde_json::Error> { - serde_json::from_str(s) -} - -impl super::BuildFromOptions for CreateRoleBindingOptions { +impl super::BuildFromArgs for CreateRoleBindingArgs { type Document = sdk::RoleBinding; - fn build_from_options( - &self, - default_owner: PublicKey, - ) -> Result { + fn build_from_options(self, default_owner: PublicKey) -> Result { let id = self.id.unwrap_or_else(Uuid::new_v4).as_bytes().to_vec(); - let owner = self.owner.clone().unwrap_or(default_owner).0; + let owner = self.owner.unwrap_or(default_owner).0; let subjects = self .subjects .iter() @@ -65,8 +52,8 @@ impl super::BuildFromOptions for CreateRoleBindingOptions { .into_iter() .map(bytes::Bytes::from) .collect(); - let expressions = self.expressions.as_ref().map_or(vec![], |exps| { - exps.clone() + let expressions = self.expressions.map_or(vec![], |exps| { + exps.0 .into_iter() .map(|(collection, expression)| sdk::Expression { collection, @@ -76,9 +63,9 @@ impl super::BuildFromOptions for CreateRoleBindingOptions { }); Ok(sdk::RoleBinding { id: id.into(), - name: self.name.clone(), + name: self.name, owner: owner.into(), - role: self.role.clone().into(), + role: self.role.into(), subjects, expressions, is_universal: self.is_universal, diff --git a/examples/m10_cli/src/commands/create/roles.rs b/examples/m10_cli/src/commands/create/roles.rs index 03fd2bf..0482c5c 100644 --- a/examples/m10_cli/src/commands/create/roles.rs +++ b/examples/m10_cli/src/commands/create/roles.rs @@ -1,45 +1,41 @@ -use crate::collections::roles::RuleOptions; -use clap::Parser; +use clap::Args; use m10_sdk::{sdk, PublicKey}; use serde::{Deserialize, Serialize}; -use std::fmt::Debug; use uuid::Uuid; -#[derive(Clone, Parser, Debug, Serialize, Deserialize)] -#[clap(about)] -pub(crate) struct CreateRoleOptions { +use crate::collections::roles::RuleArgs; + +#[derive(Clone, Args, Debug, Serialize, Deserialize)] +pub(crate) struct CreateRoleArgs { /// Ignore error if item exists - #[clap(short = 'e', long)] + #[arg(short = 'e', long)] #[serde(default)] pub(super) if_not_exists: bool, /// Set record uuid - #[clap(short, long)] + #[arg(short, long)] pub(super) id: Option, /// Set name of role - #[clap(short, long, default_value_t)] + #[arg(short, long, default_value_t)] #[serde(default)] name: String, /// Set owner of the role record - #[clap(short, long)] + #[arg(short, long)] owner: Option, /// Set rule (1..N) - #[clap(short, long, required = true, parse(try_from_str = RuleOptions::parse))] - rule: Vec, + #[arg(short, long, required = true)] + rules: Vec, } -impl super::BuildFromOptions for CreateRoleOptions { +impl super::BuildFromArgs for CreateRoleArgs { type Document = sdk::Role; - fn build_from_options( - &self, - default_owner: PublicKey, - ) -> Result { + fn build_from_options(self, default_owner: PublicKey) -> Result { let id = self.id.unwrap_or_else(Uuid::new_v4).as_bytes().to_vec(); - let owner = self.owner.clone().unwrap_or(default_owner).0; - let rules = self.rule.iter().map(|r| r.to_rbac_rule()).collect(); + let owner = self.owner.unwrap_or(default_owner).0; + let rules = self.rules.iter().map(|r| r.to_rbac_rule()).collect(); Ok(sdk::Role { id: id.into(), owner: owner.into(), - name: self.name.clone(), + name: self.name, rules, }) } diff --git a/examples/m10_cli/src/commands/create/transfer.rs b/examples/m10_cli/src/commands/create/transfer.rs index 47a6eee..3418244 100644 --- a/examples/m10_cli/src/commands/create/transfer.rs +++ b/examples/m10_cli/src/commands/create/transfer.rs @@ -1,44 +1,44 @@ -use crate::context::Context; -use clap::Parser; -use m10_sdk::account::AccountId; -use m10_sdk::contract::FinalizedContractExt; -use m10_sdk::{prost::Message, sdk}; -use m10_sdk::{StepBuilder, TransferBuilder, WithContext}; +use clap::Args; +use m10_sdk::{ + account::AccountId, contract::FinalizedContractExt, prost::Message, sdk, StepBuilder, + TransferBuilder, WithContext, +}; use serde::{Deserialize, Serialize}; -use std::fmt::Debug; -#[derive(Clone, Parser, Debug, Serialize, Deserialize)] -#[clap(about)] -pub(crate) struct Transfer { +use crate::context::Context; + +#[derive(Clone, Args, Debug, Serialize, Deserialize)] +pub(crate) struct CreateTransferArgs { /// Set sending account - #[clap(short, long)] + #[arg(short, long)] from_account: AccountId, /// Set receiving account - #[clap(short, long)] + #[arg(short, long)] to_account: AccountId, /// Set amount - #[clap(short, long)] + #[arg(short, long)] amount: u64, /// Set a memo - #[clap(short, long)] + #[arg(short, long)] memo: Option, /// Attach a contract to a transfer - #[clap(short, long)] + #[arg(long)] contract: Option, /// If set account will rebalanced to the given amount - #[clap(short, long)] + #[arg(short, long)] rebalance: bool, /// If set the transfer will only be initiated but not committed - #[clap(short, long)] + #[arg(short, long)] no_commit: bool, } -impl Transfer { - pub async fn create(&self, config: &crate::Config) -> anyhow::Result<()> { - let mut context = Context::new(config)?; - +impl CreateTransferArgs { + pub async fn create(&self, context: &Context) -> anyhow::Result<()> { if self.rebalance { - let indexed_account = context.m10_client.get_account(self.from_account).await?; + let indexed_account = context + .ledger_client() + .get_account(self.from_account) + .await?; let current_balance = indexed_account.balance; @@ -58,17 +58,10 @@ impl Transfer { return Ok(()); } }; - self.transfer_funds(from, to, amount, &mut context, config.context_id.clone()) - .await + self.transfer_funds(from, to, amount, context).await } else { - self.transfer_funds( - self.from_account, - self.to_account, - self.amount, - &mut context, - config.context_id.clone(), - ) - .await + self.transfer_funds(self.from_account, self.to_account, self.amount, context) + .await } } @@ -77,8 +70,7 @@ impl Transfer { from_account: AccountId, to_account: AccountId, amount: u64, - context: &mut Context, - mut context_id: Vec, + context: &Context, ) -> anyhow::Result<()> { let contract = if let Some(contract) = &self.contract { let file = std::fs::read(contract)?; @@ -88,15 +80,17 @@ impl Transfer { None }; - if let Some(contract) = &contract { - if !context_id.is_empty() { + let context_id = if let Some(contract) = &contract { + if !context.context_id().is_empty() { anyhow::bail!( "Adding a contract to a transfer would override the provided context id" ); } else { - context_id = contract.id(); + contract.id() } - } + } else { + context.context_id() + }; let mut step = StepBuilder::new(from_account, to_account, amount); if let Some(memo) = &self.memo { @@ -108,9 +102,9 @@ impl Transfer { let builder = TransferBuilder::default().step(step).context_id(context_id); let tx_id = if self.no_commit { - context.m10_client.initiate_transfer(builder).await + m10_sdk::initiate_transfer(context.ledger_client(), builder).await } else { - context.m10_client.transfer(builder).await + m10_sdk::transfer(context.ledger_client(), builder).await }?; eprintln!("created transfer:"); println!("{}", tx_id); diff --git a/examples/m10_cli/src/commands/create/uuid_options.rs b/examples/m10_cli/src/commands/create/uuid_options.rs deleted file mode 100644 index de0dd34..0000000 --- a/examples/m10_cli/src/commands/create/uuid_options.rs +++ /dev/null @@ -1,22 +0,0 @@ -use clap::Parser; -use serde::{Deserialize, Serialize}; -use std::fmt::Debug; -use uuid::Uuid; - -#[derive(Clone, Parser, Debug, Serialize, Deserialize)] -#[clap(about)] -pub(crate) struct UuidOptions { - /// Set amount of uuids to be generated - #[clap(short = 'm', long)] - multiple: Option, -} - -impl UuidOptions { - pub(super) fn create(&self) { - let mul = self.multiple.unwrap_or(1); - for _ in 0..mul { - let uuid = Uuid::new_v4(); - println!("{}", uuid); - } - } -} diff --git a/examples/m10_cli/src/commands/csv.rs b/examples/m10_cli/src/commands/csv.rs index 3bc55cc..e5cc793 100644 --- a/examples/m10_cli/src/commands/csv.rs +++ b/examples/m10_cli/src/commands/csv.rs @@ -7,21 +7,20 @@ use std::io; #[derive(Clone, Parser, Debug, Serialize, Deserialize)] pub(super) enum CsvSubcommands { - #[clap(about = "Get balance for each account by id (std input and output)")] - ListBalances(CsvListAccountIdOptions), + /// Get balance for each account by id (std input and output + ListBalances(CsvListAccountIdArgs), } impl CsvSubcommands { - pub(super) async fn csv(&self, config: &crate::Config) -> anyhow::Result<()> { + pub(super) async fn csv(&self, context: &Context) -> anyhow::Result<()> { match self { - CsvSubcommands::ListBalances(op) => op.list_balances(config).await, + CsvSubcommands::ListBalances(op) => op.list_balances(context).await, } } } #[derive(Clone, Parser, Debug, Serialize, Deserialize)] -#[clap(about)] -pub(crate) struct CsvListAccountIdOptions {} +pub(crate) struct CsvListAccountIdArgs {} #[derive(Debug, Deserialize)] struct Account { @@ -34,14 +33,14 @@ struct AccountBalance { balance: u64, } -impl CsvListAccountIdOptions { - pub(super) async fn list_balances(&self, config: &crate::Config) -> anyhow::Result<()> { +impl CsvListAccountIdArgs { + pub(super) async fn list_balances(&self, context: &Context) -> anyhow::Result<()> { let mut output = csv::Writer::from_writer(io::stdout()); let mut rdr = csv::Reader::from_reader(io::stdin()); - let context = Context::new(config)?; + let client = context.ledger_client(); for result in rdr.deserialize() { let record: Account = result?; - let account = context.m10_client.get_account(record.id).await?; + let account = client.get_account(record.id).await?; output.serialize(AccountBalance { id: record.id, balance: account.balance, diff --git a/examples/m10_cli/src/commands/delete.rs b/examples/m10_cli/src/commands/delete.rs new file mode 100644 index 0000000..b72e228 --- /dev/null +++ b/examples/m10_cli/src/commands/delete.rs @@ -0,0 +1,80 @@ +use bytes::Bytes; +use clap::{Args, Subcommand}; +use m10_sdk::{prost::Message, sdk, DocumentBuilder, Pack, WithContext}; +use serde::{Deserialize, Serialize}; +use serde_with::{serde_as, DisplayFromStr}; + +use crate::{collections::PrettyId, context::Context}; + +#[serde_as] +#[derive(Clone, Args, Debug, Serialize, Deserialize)] +pub(crate) struct DeleteStoreItemArgs { + /// Set record id + #[serde_as(as = "DisplayFromStr")] + id: PrettyId, +} + +#[derive(Subcommand, Clone, Debug, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub(crate) enum Delete { + /// Delete an account record + #[command(alias = "a")] + Account(DeleteStoreItemArgs), + /// Delete an account set record + #[command(alias = "as")] + AccountSet(DeleteStoreItemArgs), + /// Delete a role record + #[command(alias = "r")] + Role(DeleteStoreItemArgs), + /// Delete a role binding record + #[command(alias = "rb")] + RoleBinding(DeleteStoreItemArgs), + /// Delete a bank record + #[command(alias = "b")] + Bank(DeleteStoreItemArgs), +} + +impl Delete { + pub(super) async fn run(self, context: &Context) -> anyhow::Result<()> { + match self { + Delete::Account(args) => store_delete::(args.id, context).await, + Delete::AccountSet(args) => store_delete::(args.id, context).await, + Delete::Role(args) => store_delete::(args.id, context).await, + Delete::RoleBinding(args) => store_delete::(args.id, context).await, + Delete::Bank(args) => store_delete::(args.id, context).await, + } + } + + pub(super) fn operation(&self) -> sdk::Operation { + match self { + Delete::Account(args) => delete_operation::(args.id.clone()), + Delete::AccountSet(args) => delete_operation::(args.id.clone()), + Delete::Role(args) => delete_operation::(args.id.clone()), + Delete::RoleBinding(args) => delete_operation::(args.id.clone()), + Delete::Bank(args) => delete_operation::(args.id.clone()), + } + } +} + +async fn store_delete(id: PrettyId, context: &Context) -> anyhow::Result<()> +where + D: Message + Pack + Default + 'static, +{ + m10_sdk::documents( + context.ledger_client(), + DocumentBuilder::default() + .delete_custom(D::COLLECTION, id.to_vec()) + .context_id(context.context_id()), + ) + .await?; + eprintln!("deleted {} in {}", id, D::COLLECTION); + Ok(()) +} + +fn delete_operation(id: PrettyId) -> sdk::Operation +where + D: Message + Pack + Default + 'static, +{ + let id: Bytes = id.into(); + sdk::Operation::delete::(id.to_vec()) +} diff --git a/examples/m10_cli/src/commands/delete/mod.rs b/examples/m10_cli/src/commands/delete/mod.rs deleted file mode 100644 index 6e4cebb..0000000 --- a/examples/m10_cli/src/commands/delete/mod.rs +++ /dev/null @@ -1,95 +0,0 @@ -use crate::{collections::PrettyId, context::Context}; -use bytes::Bytes; -use clap::Parser; -use m10_sdk::{prost::Message, sdk, DocumentBuilder, Pack, WithContext}; -use serde::{Deserialize, Serialize}; -use serde_with::{serde_as, DisplayFromStr}; -use std::fmt::Debug; - -#[serde_as] -#[derive(Clone, Parser, Debug, Serialize, Deserialize)] -#[clap(about)] -pub(super) struct DeleteStoreItemOptions { - /// Set record id - #[serde_as(as = "DisplayFromStr")] - id: PrettyId, -} - -#[derive(Clone, Parser, Debug, Serialize, Deserialize)] -#[serde(rename_all = "camelCase")] -#[clap(about)] -pub(super) enum DeleteSubCommands { - /// Delete an account record - Account(DeleteStoreItemOptions), - /// Delete an account set record - AccountSet(DeleteStoreItemOptions), - /// Delete a role record - Role(DeleteStoreItemOptions), - /// Delete a role binding record - RoleBinding(DeleteStoreItemOptions), - /// Delete a bank record - Bank(DeleteStoreItemOptions), -} - -impl DeleteSubCommands { - pub(super) async fn delete(&self, config: &crate::Config) -> anyhow::Result<()> { - match self { - DeleteSubCommands::Account(options) => { - store_delete::(options.id.clone(), config).await - } - DeleteSubCommands::AccountSet(options) => { - store_delete::(options.id.clone(), config).await - } - DeleteSubCommands::Role(options) => { - store_delete::(options.id.clone(), config).await - } - DeleteSubCommands::RoleBinding(options) => { - store_delete::(options.id.clone(), config).await - } - DeleteSubCommands::Bank(options) => { - store_delete::(options.id.clone(), config).await - } - } - } - - pub(super) fn delete_operation(&self) -> sdk::Operation { - match self { - DeleteSubCommands::Account(options) => { - delete_operation::(options.id.clone()) - } - DeleteSubCommands::AccountSet(options) => { - delete_operation::(options.id.clone()) - } - DeleteSubCommands::Role(options) => delete_operation::(options.id.clone()), - DeleteSubCommands::RoleBinding(options) => { - delete_operation::(options.id.clone()) - } - DeleteSubCommands::Bank(options) => delete_operation::(options.id.clone()), - } - } -} - -async fn store_delete(id: PrettyId, config: &crate::Config) -> anyhow::Result<()> -where - D: Message + Pack + Default + 'static, -{ - let context = Context::new(config)?; - context - .m10_client - .documents( - DocumentBuilder::default() - .delete_custom(D::COLLECTION, id.to_vec()) - .context_id(config.context_id.clone()), - ) - .await?; - eprintln!("deleted {} in {}", id, D::COLLECTION); - Ok(()) -} - -fn delete_operation(id: PrettyId) -> sdk::Operation -where - D: Message + Pack + Default + 'static, -{ - let id: Bytes = id.into(); - sdk::Operation::delete::(id.to_vec()) -} diff --git a/examples/m10_cli/src/commands/endorse.rs b/examples/m10_cli/src/commands/endorse.rs new file mode 100644 index 0000000..611f2d9 --- /dev/null +++ b/examples/m10_cli/src/commands/endorse.rs @@ -0,0 +1,59 @@ +use clap::Subcommand; +use m10_sdk::{contract::FinalizedContractExt, prost::Message, sdk::Contract, Signer}; +use serde::{Deserialize, Serialize}; + +use crate::context::Context; + +#[derive(Clone, Subcommand, Debug, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub(crate) enum Endorse { + /// Endorse contracts + #[command(alias = "c")] + Contract { + /// Path to the contract proposal + #[arg(long)] + path: String, + /// Path to output the endorsed contract + #[arg(short, long)] + output: Option, + }, +} + +impl Endorse { + pub(super) async fn run(self, context: &Context) -> anyhow::Result<()> { + match self { + Endorse::Contract { path, output } => endorse_contract(path, output, context).await, + } + } +} + +async fn endorse_contract( + path: String, + output: Option, + context: &Context, +) -> anyhow::Result<()> { + let output = output.ok_or_else(|| anyhow::anyhow!("No output path specified"))?; + let file = std::fs::read(path)?; + let mut contract = Contract::decode(file.as_slice())?; + + // TODO: fetch ledger-id + let ledger_id = "usd.m10"; + let contract_id = hex::encode(contract.id()).to_uppercase(); + let signing_key = context.signing_key()?; + if contract + .endorsements + .iter() + .filter_map(|e| e.signature.as_ref()) + .any(|sig| sig.public_key == signing_key.public_key()) + { + println!("Contract {} is already endorsed by you", contract_id); + return Ok(()); + } + signing_key + .endorse(&mut contract, ledger_id.to_string()) + .await?; + let buf = contract.encode_to_vec(); + std::fs::write(output, buf)?; + println!("Endorsed contract {}", contract_id); + Ok(()) +} diff --git a/examples/m10_cli/src/commands/endorse/contracts.rs b/examples/m10_cli/src/commands/endorse/contracts.rs deleted file mode 100644 index 446171c..0000000 --- a/examples/m10_cli/src/commands/endorse/contracts.rs +++ /dev/null @@ -1,55 +0,0 @@ -use clap::Parser; -use m10_sdk::contract::FinalizedContractExt; -use m10_sdk::Signer; -use m10_sdk::{prost::Message, sdk::Contract}; -use serde::{Deserialize, Serialize}; -use std::fmt::Debug; - -use crate::context::Context; - -#[derive(Clone, Parser, Debug, Serialize, Deserialize)] -#[clap(about)] -pub(crate) struct EndorseContractOptions { - /// Path to the contract proposal - #[clap(short, long)] - path: String, - /// Path to output the endorsed contract - #[clap(short, long)] - output: Option, -} - -impl EndorseContractOptions { - pub(in crate::commands) async fn endorse(&self, config: &crate::Config) -> anyhow::Result<()> { - let context = Context::new(config)?; - - let output = self - .output - .as_ref() - .ok_or_else(|| anyhow::anyhow!("No output path specified"))?; - let file = std::fs::read(&self.path)?; - let mut contract = Contract::decode(file.as_slice())?; - - // TODO: fetch ledger-id - let ledger_id = "usd.m10"; - let contract_id = hex::encode(contract.id()).to_uppercase(); - - if contract - .endorsements - .iter() - .filter_map(|e| e.signature.as_ref()) - .any(|sig| sig.public_key == context.m10_client.signer().public_key()) - { - println!("Contract {} is already endorsed by you", contract_id); - return Ok(()); - } - context - .m10_client - .signer() - .endorse(&mut contract, ledger_id.to_string()) - .await?; - let buf = contract.encode_to_vec(); - std::fs::write(output, buf)?; - println!("Endorsed contract {}", contract_id); - Ok(()) - } -} diff --git a/examples/m10_cli/src/commands/endorse/mod.rs b/examples/m10_cli/src/commands/endorse/mod.rs deleted file mode 100644 index 2559732..0000000 --- a/examples/m10_cli/src/commands/endorse/mod.rs +++ /dev/null @@ -1,22 +0,0 @@ -use std::fmt::Debug; - -use clap::Parser; -use serde::{Deserialize, Serialize}; - -mod contracts; - -#[derive(Clone, Parser, Debug, Serialize, Deserialize)] -#[serde(rename_all = "camelCase")] -#[clap(about)] -pub(super) enum EndorsementSubCommands { - /// Endorse contracts - Contract(contracts::EndorseContractOptions), -} - -impl EndorsementSubCommands { - pub(super) async fn endorse(&self, config: &crate::Config) -> anyhow::Result<()> { - match self { - EndorsementSubCommands::Contract(options) => options.endorse(config).await, - } - } -} diff --git a/examples/m10_cli/src/commands/find/account_sets.rs b/examples/m10_cli/src/commands/find/account_sets.rs index d23b19f..ac68a11 100644 --- a/examples/m10_cli/src/commands/find/account_sets.rs +++ b/examples/m10_cli/src/commands/find/account_sets.rs @@ -1,27 +1,26 @@ -use crate::context::Context; -use clap::{ArgGroup, Parser}; +use clap::{ArgGroup, Args}; use m10_sdk::{Format, NameOrOwnerFilter, PageBuilder, PrettyPrint, PublicKey}; use serde::{Deserialize, Serialize}; -use std::fmt::Debug; -#[derive(Clone, Parser, Debug, Serialize, Deserialize)] -#[clap(group = ArgGroup::new("filter"), about)] -pub(crate) struct FindAccountSetOptions { +use crate::context::Context; + +#[derive(Clone, Args, Debug, Serialize, Deserialize)] +#[clap(group = ArgGroup::new("filter"))] +pub(crate) struct FindAccountSetArgs { /// Set name filter - #[clap(short, long, group = "filter")] + #[arg(short, long, group = "filter")] name: Option, /// Set owner filter - #[clap(short, long, group = "filter")] + #[arg(short, long, group = "filter")] owner: Option, /// Set output format (one of 'json', 'yaml', 'raw') - #[clap(short, long, default_value = "raw")] + #[arg(short, long, default_value = "raw")] #[serde(default)] format: Format, } -impl FindAccountSetOptions { - pub(crate) async fn find(&self, config: &crate::Config) -> anyhow::Result<()> { - let context = Context::new(config)?; +impl FindAccountSetArgs { + pub(crate) async fn find(&self, context: &Context) -> anyhow::Result<()> { let filter = if let Some(name) = &self.name { PageBuilder::<_, NameOrOwnerFilter>::name(name) } else if let Some(owner) = &self.owner { @@ -30,7 +29,7 @@ impl FindAccountSetOptions { return Err(anyhow::anyhow!("missing filter")); }; context - .m10_client + .ledger_client() .list_account_sets(filter) .await? .print(self.format)?; diff --git a/examples/m10_cli/src/commands/find/accounts.rs b/examples/m10_cli/src/commands/find/accounts.rs index 7482c76..a938b53 100644 --- a/examples/m10_cli/src/commands/find/accounts.rs +++ b/examples/m10_cli/src/commands/find/accounts.rs @@ -1,30 +1,28 @@ -use crate::context::Context; -use clap::Parser; +use clap::Args; use m10_sdk::{Format, NameOrOwnerFilter, PageBuilder, PrettyPrint, PublicKey}; use serde::{Deserialize, Serialize}; -use std::fmt::Debug; -#[derive(Clone, Parser, Debug, Serialize, Deserialize)] -#[clap(about)] -pub(crate) struct FindAccountOptions { +use crate::context::Context; + +#[derive(Clone, Args, Debug, Serialize, Deserialize)] +pub(crate) struct FindAccountArgs { /// Set name filter - #[clap(short, long, group = "filter")] + #[arg(short, long, group = "filter")] name: Option, /// Set owner filter - #[clap(short, long, group = "filter")] + #[arg(short, long, group = "filter")] owner: Option, /// Set output format (one of 'json', 'yaml', 'raw') - #[clap(short, long, default_value = "raw")] + #[arg(short, long, default_value = "raw")] #[serde(default)] format: Format, } -impl FindAccountOptions { - pub(crate) async fn find(&self, config: &crate::Config) -> anyhow::Result<()> { - let context = Context::new(config)?; +impl FindAccountArgs { + pub(crate) async fn find(&self, context: &Context) -> anyhow::Result<()> { context - .m10_client - .list_accounts(self.filter_from_options()?) + .ledger_client() + .list_account_metadata(self.filter_from_options()?) .await? .print(self.format)?; Ok(()) diff --git a/examples/m10_cli/src/commands/find/actions.rs b/examples/m10_cli/src/commands/find/actions.rs index 36cdc62..3b54445 100644 --- a/examples/m10_cli/src/commands/find/actions.rs +++ b/examples/m10_cli/src/commands/find/actions.rs @@ -1,50 +1,47 @@ -use crate::context::Context; - -use clap::Parser; +use clap::Args; use m10_sdk::{account::AccountId, ActionsFilter, Format, PrettyPrint, TxnFilter}; use serde::{Deserialize, Serialize}; -use std::fmt::Debug; -#[derive(Clone, Parser, Debug, Serialize, Deserialize)] -#[clap(about)] -pub(crate) struct FindActionOptions { +use crate::context::Context; + +#[derive(Clone, Args, Debug, Serialize, Deserialize)] +pub(crate) struct FindActionArgs { /// Action name - #[clap(short, long, default_value_t)] + #[arg(short, long, default_value_t)] name: String, /// Set minimum tx id - #[clap(short, long, default_value_t)] + #[arg(short, long, default_value_t)] min_tx_id: u64, /// Set maximum tx id - #[clap(short = 'x', long, default_value = "u64::MAX")] + #[arg(short = 'x', long, default_value = "u64::MAX")] max_tx_id: u64, /// Set account filter - #[clap(short, long)] + #[arg(short, long)] account: Option, /// Set limit - #[clap(short, long, default_value = "20")] + #[arg(short, long, default_value = "20")] limit: u64, /// Set output format (one of 'json', 'yaml', 'raw') - #[clap(short, long, default_value = "raw")] + #[arg(short, long, default_value = "raw")] #[serde(default)] format: Format, } -impl FindActionOptions { - pub(crate) async fn find(&self, config: &crate::Config) -> anyhow::Result<()> { - let context = Context::new(config)?; +impl FindActionArgs { + pub(crate) async fn find(&self, context: &Context) -> anyhow::Result<()> { let filter = if let Some(account_id) = self.account { TxnFilter::::by_account(self.name.clone(), account_id) } else { TxnFilter::::by_context_id( self.name.clone(), - hex::decode(&config.context_id)?, + hex::decode(context.context_id())?, ) } .limit(self.limit) .min_tx(self.min_tx_id) .max_tx(self.max_tx_id); context - .m10_client + .ledger_client() .list_actions(filter) .await? .print(self.format)?; diff --git a/examples/m10_cli/src/commands/find/banks.rs b/examples/m10_cli/src/commands/find/banks.rs deleted file mode 100644 index 3427b34..0000000 --- a/examples/m10_cli/src/commands/find/banks.rs +++ /dev/null @@ -1,26 +0,0 @@ -use crate::context::Context; - -use clap::Parser; -use m10_sdk::{Format, PageBuilder, PrettyPrint}; -use serde::{Deserialize, Serialize}; -use std::fmt::Debug; - -#[derive(Clone, Parser, Debug, Serialize, Deserialize)] -#[clap(about)] -pub(crate) struct FindBankOptions { - #[clap(short, long, default_value = "raw")] - #[serde(default)] - format: Format, -} - -impl FindBankOptions { - pub(crate) async fn find(&self, config: &crate::Config) -> anyhow::Result<()> { - let context = Context::new(config)?; - context - .m10_client - .list_banks(PageBuilder::default()) - .await? - .print(self.format)?; - Ok(()) - } -} diff --git a/examples/m10_cli/src/commands/find/directory_entry.rs b/examples/m10_cli/src/commands/find/directory_entry.rs index 6028375..e6862c3 100644 --- a/examples/m10_cli/src/commands/find/directory_entry.rs +++ b/examples/m10_cli/src/commands/find/directory_entry.rs @@ -1,33 +1,43 @@ -use clap::{Parser, Subcommand}; +use std::convert::TryFrom; + +use clap::Subcommand; use m10_sdk::directory::{ alias::Type as AliasType, directory_service_client::DirectoryServiceClient, Alias, SearchAliasesRequest, }; use serde::{Deserialize, Serialize}; -use std::convert::TryFrom; -use tonic::metadata::MetadataValue; -use tonic::transport::Channel; +use tonic::{ + metadata::MetadataValue, service::interceptor::InterceptedService, transport::Channel, +}; use uuid::Uuid; -use crate::context::Context; -use crate::utils::m10_config_path; -use tonic::service::interceptor::InterceptedService; +use crate::{context::Context, utils::m10_config_path}; -#[derive(Clone, Parser, Debug, Serialize, Deserialize)] +#[derive(Clone, Subcommand, Debug, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] -#[clap(about)] -pub(crate) struct FindDirEntryOptions { - /// Directory server address - server: String, - #[clap(subcommand)] - #[serde(flatten)] - cmd: FindDirEntrySubCommands, +pub(crate) enum DirEntry { + //// Find alias entries + #[command(alias = "a")] + Alias { + /// By alias handle + #[arg(short = 'a', long)] + handle: String, + #[arg(long)] + /// By subject id + #[arg(long)] + subject: Option, + /// Next page token as returned by previous query + #[arg(long, aliases = ["token", "pt"])] + page_token: Option, + }, + /// Find ledger entries + #[command(alias = "l")] + Ledger, } -impl FindDirEntryOptions { - pub(super) async fn find(&self) -> anyhow::Result<()> { - let addr = format!("https://{}", &self.server); - let channel = Context::channel_from_address(&addr, false)?; +impl DirEntry { + pub(super) async fn find(self, context: &Context) -> anyhow::Result<()> { + let channel = context.channel()?; let access_token = std::fs::read_to_string(m10_config_path().join("access.token"))?; let access_token = format!("Bearer {}", access_token.trim()); let access_token = MetadataValue::from_str(access_token.as_str())?; @@ -38,77 +48,41 @@ impl FindDirEntryOptions { Ok(req) }); - match &self.cmd { - FindDirEntrySubCommands::Ledger(options) => options.find(&mut client).await, - FindDirEntrySubCommands::Alias(options) => options.find(&mut client).await, - } - } -} - -#[derive(Clone, Subcommand, Debug, Serialize, Deserialize)] -#[serde(rename_all = "camelCase")] -#[clap(about)] -pub(crate) enum FindDirEntrySubCommands { - /// Find ledger entries - Ledger(FindLedgerOptions), - //// Find alias entries - Alias(FindAliasOptions), -} - -#[derive(Clone, Parser, Debug, Serialize, Deserialize)] -pub(crate) struct FindLedgerOptions {} - -impl FindLedgerOptions { - pub async fn find) -> Result, tonic::Status>>( - &self, - client: &mut DirectoryServiceClient>, - ) -> anyhow::Result<()> { - let Self {} = self.to_owned(); - let response = client.list_ledgers(()).await?.into_inner(); - for ledger in response.ledgers { - println!("{:#?}", ledger); + match self { + DirEntry::Alias { + handle, + subject, + page_token, + } => find_alias(handle, subject, page_token, &mut client).await?, + DirEntry::Ledger => { + let response = client.list_ledgers(()).await?.into_inner(); + for ledger in response.ledgers { + println!("{:#?}", ledger); + } + } } Ok(()) } } -#[derive(Clone, Parser, Debug, Serialize, Deserialize)] -#[clap(about)] -pub(crate) struct FindAliasOptions { - /// By alias handle - #[clap(short = 'a', long)] +async fn find_alias) -> Result, tonic::Status>>( handle: String, - #[clap(short, long)] - /// By subject id subject: Option, - /// Next page token as returned by previous query - #[clap(short, long)] page_token: Option, -} - -impl FindAliasOptions { - pub async fn find) -> Result, tonic::Status>>( - &self, - client: &mut DirectoryServiceClient>, - ) -> anyhow::Result<()> { - let Self { - handle, - subject, - page_token, - } = self.to_owned(); - let msg = SearchAliasesRequest { - handle_prefix: handle, - subject: subject.unwrap_or_default(), - page_token: page_token.unwrap_or_default(), - page_size: 20, - }; - let response = client.search_aliases(msg).await?.into_inner(); - for alias in response.aliases { - println!("{:#?}", PrettyAlias::try_from(alias)?); - } - println!("next: {}", response.next_page_token); - Ok(()) + client: &mut DirectoryServiceClient>, +) -> anyhow::Result<()> { + let msg = SearchAliasesRequest { + handle_prefix: handle, + subject: subject.unwrap_or_default(), + page_token: page_token.unwrap_or_default(), + page_size: 20, + }; + let response = client.search_aliases(msg).await?.into_inner(); + for alias in response.aliases { + println!("{:#?}", PrettyAlias::try_from(alias)?); } + println!("next: {}", response.next_page_token); + Ok(()) } #[derive(Debug)] diff --git a/examples/m10_cli/src/commands/find/ledger_accounts.rs b/examples/m10_cli/src/commands/find/ledger_accounts.rs new file mode 100644 index 0000000..75460a5 --- /dev/null +++ b/examples/m10_cli/src/commands/find/ledger_accounts.rs @@ -0,0 +1,42 @@ +use clap::Args; +use m10_sdk::{Format, NameOrOwnerFilter, PageBuilder, PrettyPrint, PublicKey}; +use serde::{Deserialize, Serialize}; + +use crate::context::Context; + +#[derive(Clone, Args, Debug, Serialize, Deserialize)] +pub(crate) struct FindAccountArgs { + /// Set name filter + #[arg(short, long, group = "filter")] + name: Option, + /// Set owner filter + #[arg(short, long, group = "filter")] + owner: Option, + /// Set output format (one of 'json', 'yaml', 'raw') + #[arg(short, long, default_value = "raw")] + #[serde(default)] + format: Format, +} + +impl FindAccountArgs { + pub(crate) async fn find(&self, context: &Context) -> anyhow::Result<()> { + context + .ledger_client() + .list_accounts(self.filter_from_options()?) + .await? + .print(self.format)?; + Ok(()) + } + + fn filter_from_options(&self) -> anyhow::Result, NameOrOwnerFilter>> { + if let Some(name) = &self.name { + Ok(PageBuilder::filter(NameOrOwnerFilter::Name( + name.to_string(), + ))) + } else if let Some(owner) = &self.owner { + Ok(PageBuilder::filter(NameOrOwnerFilter::Owner(owner.clone()))) + } else { + Err(anyhow::anyhow!("missing filter")) + } + } +} diff --git a/examples/m10_cli/src/commands/find/mod.rs b/examples/m10_cli/src/commands/find/mod.rs index 07cd06f..59cabd4 100644 --- a/examples/m10_cli/src/commands/find/mod.rs +++ b/examples/m10_cli/src/commands/find/mod.rs @@ -1,64 +1,115 @@ -use clap::Parser; +use clap::Subcommand; +use m10_sdk::{Format, NameFilter, PageBuilder, PrettyPrint}; use serde::{Deserialize, Serialize}; -use std::fmt::Debug; + +use crate::context::Context; mod account_sets; mod accounts; mod actions; -mod banks; mod directory_entry; -mod role_bindings; -mod roles; +mod ledger_accounts; mod transactions; mod transfers; -#[derive(Clone, Parser, Debug, Serialize, Deserialize)] +#[derive(Clone, Subcommand, Debug, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] -#[clap(about)] -pub(super) enum FindSubCommands { +pub(crate) enum Find { /// Find account record(s) - Account(accounts::FindAccountOptions), + #[command(alias = "a")] + Accounts(accounts::FindAccountArgs), /// Find account set record(s) - AccountSet(account_sets::FindAccountSetOptions), + #[command(alias = "as")] + AccountSets(account_sets::FindAccountSetArgs), /// Find actions /// (either by context or account) - Action(actions::FindActionOptions), + #[command(alias = "ac")] + Actions(actions::FindActionArgs), /// Find banks - Bank(banks::FindBankOptions), + #[command(alias = "b")] + Banks { + #[arg(short, long, default_value = "raw")] + #[serde(default)] + format: Format, + }, + /// Find a directory entry + #[command(alias = "d")] + DirectoryEntries { + #[command(subcommand)] + cmd: directory_entry::DirEntry, + }, + /// Find ledger account record(s) + #[command(aliases = ["l", "la"])] + LedgerAccounts(ledger_accounts::FindAccountArgs), /// Find role record(s) - Role(roles::FindRoleOptions), + #[command(alias = "r")] + Roles { + /// Set name filter + #[arg(short, long)] + name: String, + /// Set output format (one of 'json', 'yaml', 'raw') + #[arg(short, long, default_value = "raw")] + #[serde(default)] + format: Format, + }, /// Find role binding record(s) - RoleBinding(role_bindings::FindRoleBindingOptions), - /// Find transfer(s) - Transfer(transfers::FindTransferOptions), - /// Find a directory entry - DirectoryEntry(directory_entry::FindDirEntryOptions), + #[command(alias = "rb")] + RoleBindings { + /// Set name filter + #[arg(short, long)] + name: String, + /// Set output format (one of 'json', 'yaml', 'raw') + #[arg(short, long, default_value_t)] + format: Format, + }, /// Find transactions within a context - Transactions(transactions::FindTransactionOptions), + #[command(alias = "txns")] + Transactions(transactions::FindTransactionArgs), + /// Find transfer(s) + #[command(alias = "t")] + Transfers(transfers::FindTransferArgs), } -impl FindSubCommands { - pub(super) async fn find(&self, config: &crate::Config) -> anyhow::Result<()> { +impl Find { + pub(super) async fn run(self, context: &Context) -> anyhow::Result<()> { match self { - FindSubCommands::Account(options) => { - options.find(config).await?; + Find::Accounts(args) => { + args.find(context).await?; + } + Find::AccountSets(args) => { + args.find(context).await?; + } + Find::Actions(args) => args.find(context).await?, + Find::Banks { format } => { + context + .ledger_client() + .list_banks(PageBuilder::default()) + .await? + .print(format)?; } - FindSubCommands::AccountSet(options) => { - options.find(config).await?; + Find::DirectoryEntries { cmd } => cmd.find(context).await?, + Find::LedgerAccounts(args) => { + args.find(context).await?; } - FindSubCommands::Role(options) => { - options.find(config).await?; + Find::Roles { name, format } => { + context + .ledger_client() + .list_roles(PageBuilder::<_, NameFilter>::name(name)) + .await? + .print(format)?; } - FindSubCommands::RoleBinding(options) => { - options.find(config).await?; + Find::RoleBindings { name, format } => { + let builder = PageBuilder::<_, NameFilter>::name(name); + context + .ledger_client() + .list_role_bindings(builder) + .await? + .print(format)?; } - FindSubCommands::Transfer(options) => { - options.find(config).await?; + Find::Transactions(args) => args.find(context).await?, + Find::Transfers(args) => { + args.find(context).await?; } - FindSubCommands::DirectoryEntry(options) => options.find().await?, - FindSubCommands::Action(options) => options.find(config).await?, - FindSubCommands::Transactions(options) => options.find(config).await?, - FindSubCommands::Bank(options) => options.find(config).await?, } Ok(()) } diff --git a/examples/m10_cli/src/commands/find/notifications.rs b/examples/m10_cli/src/commands/find/notifications.rs index c0c0650..011cff1 100644 --- a/examples/m10_cli/src/commands/find/notifications.rs +++ b/examples/m10_cli/src/commands/find/notifications.rs @@ -1,23 +1,20 @@ -use clap::Parser; -use m10_sdk::protos; -use m10_sdk::DocumentUpdate; +use clap::Args; +use m10_sdk::{protos, DocumentUpdate}; use serde::{Deserialize, Serialize}; -use std::fmt::Debug; -#[derive(Clone, Parser, Debug, Serialize, Deserialize)] -#[clap(about)] -pub(crate) struct FindNotificationPreferencesOptions { +#[derive(Clone, Args, Debug, Serialize, Deserialize)] +pub(crate) struct FindNotificationPreferencesArgs { /// Set platform filter - #[clap(short, long)] + #[arg(short, long)] platform: Option, /// Set address filter - #[clap(short, long)] + #[arg(short, long)] address: Option, /// Set notification setting filter - #[clap(short, long)] + #[arg(short, long)] no_notifications: bool, /// Set output format (one of 'json', 'yaml', 'raw') - #[clap(short, long, default_value = "raw")] + #[arg(short, long, default_value = "raw")] #[serde(default)] pub(super) format: super::Format, } diff --git a/examples/m10_cli/src/commands/find/role_bindings.rs b/examples/m10_cli/src/commands/find/role_bindings.rs deleted file mode 100644 index 28dfd49..0000000 --- a/examples/m10_cli/src/commands/find/role_bindings.rs +++ /dev/null @@ -1,30 +0,0 @@ -use crate::context::Context; - -use clap::Parser; -use m10_sdk::{Format, NameFilter, PageBuilder, PrettyPrint}; -use serde::{Deserialize, Serialize}; -use std::fmt::Debug; - -#[derive(Clone, Parser, Debug, Serialize, Deserialize)] -#[clap(about)] -pub(crate) struct FindRoleBindingOptions { - /// Set name filter - #[clap(short, long)] - name: String, - /// Set output format (one of 'json', 'yaml', 'raw') - #[clap(short, long, default_value_t)] - format: Format, -} - -impl FindRoleBindingOptions { - pub(crate) async fn find(&self, config: &crate::Config) -> anyhow::Result<()> { - let context = Context::new(config)?; - let builder = PageBuilder::<_, NameFilter>::name(self.name.clone()); - context - .m10_client - .list_role_bindings(builder) - .await? - .print(self.format)?; - Ok(()) - } -} diff --git a/examples/m10_cli/src/commands/find/roles.rs b/examples/m10_cli/src/commands/find/roles.rs deleted file mode 100644 index b445a80..0000000 --- a/examples/m10_cli/src/commands/find/roles.rs +++ /dev/null @@ -1,30 +0,0 @@ -use crate::context::Context; - -use clap::Parser; -use m10_sdk::{Format, NameFilter, PageBuilder, PrettyPrint}; -use serde::{Deserialize, Serialize}; -use std::fmt::Debug; - -#[derive(Clone, Parser, Debug, Serialize, Deserialize)] -#[clap(about)] -pub(crate) struct FindRoleOptions { - /// Set name filter - #[clap(short, long)] - name: String, - /// Set output format (one of 'json', 'yaml', 'raw') - #[clap(short, long, default_value = "raw")] - #[serde(default)] - format: Format, -} - -impl FindRoleOptions { - pub(crate) async fn find(&self, config: &crate::Config) -> anyhow::Result<()> { - let context = Context::new(config)?; - context - .m10_client - .list_roles(PageBuilder::<_, NameFilter>::name(self.name.clone())) - .await? - .print(self.format)?; - Ok(()) - } -} diff --git a/examples/m10_cli/src/commands/find/transactions.rs b/examples/m10_cli/src/commands/find/transactions.rs index a3aa10d..c2e7fb9 100644 --- a/examples/m10_cli/src/commands/find/transactions.rs +++ b/examples/m10_cli/src/commands/find/transactions.rs @@ -1,38 +1,34 @@ -use crate::context::Context; - -use clap::Parser; -use m10_sdk::{account::AccountId, Format, GroupingFilter, TxnFilter}; -use m10_sdk::{ContextFilter, PrettyPrint}; +use clap::Args; +use m10_sdk::{account::AccountId, ContextFilter, Format, GroupingFilter, PrettyPrint, TxnFilter}; use serde::{Deserialize, Serialize}; -use std::fmt::Debug; -#[derive(Clone, Parser, Debug, Serialize, Deserialize)] -#[clap(about)] -pub(crate) struct FindTransactionOptions { +use crate::context::Context; + +#[derive(Clone, Args, Debug, Serialize, Deserialize)] +pub(crate) struct FindTransactionArgs { /// Set minimum tx id - #[clap(short, long, default_value_t)] + #[arg(short, long, default_value_t)] min_tx_id: u64, /// Set maximum tx id - #[clap(short = 'x', long, default_value = "u64::MAX")] + #[arg(short = 'x', long, default_value = "u64::MAX")] max_tx_id: u64, /// Set limit - #[clap(short, long, default_value = "20")] + #[arg(short, long, default_value = "20")] limit: u64, /// Set group filter - #[clap(short, long)] + #[arg(short, long)] account: Option, /// Set output format (one of 'json', 'yaml', 'raw') - #[clap(short, long, default_value = "raw")] + #[arg(short, long, default_value = "raw")] #[serde(default)] format: Format, } -impl FindTransactionOptions { - pub(crate) async fn find(&self, config: &crate::Config) -> anyhow::Result<()> { - let context = Context::new(config)?; +impl FindTransactionArgs { + pub(crate) async fn find(&self, context: &Context) -> anyhow::Result<()> { if let Some(account) = self.account { context - .m10_client + .ledger_client() .group_transactions( TxnFilter::::account(account) .min_tx(self.min_tx_id) @@ -42,9 +38,9 @@ impl FindTransactionOptions { .await? .print(self.format)?; } else { - let context_id = hex::decode(config.context_id.clone())?; + let context_id = hex::decode(context.context_id())?; context - .m10_client + .ledger_client() .list_transactions(TxnFilter::::context_id(context_id)) .await? .print(self.format)?; diff --git a/examples/m10_cli/src/commands/find/transfers.rs b/examples/m10_cli/src/commands/find/transfers.rs index 3c54025..3d5422d 100644 --- a/examples/m10_cli/src/commands/find/transfers.rs +++ b/examples/m10_cli/src/commands/find/transfers.rs @@ -1,47 +1,41 @@ -use crate::context::Context; - -use clap::ArgGroup; -use clap::Parser; -use m10_sdk::account::AccountId; -use m10_sdk::TransferFilter; -use m10_sdk::TxnFilter; -use m10_sdk::{self, Format, PrettyPrint}; +use clap::{ArgGroup, Args}; +use m10_sdk::{account::AccountId, Format, PrettyPrint, TransferFilter, TxnFilter}; use serde::{Deserialize, Serialize}; -use std::fmt::Debug; -#[derive(Clone, Parser, Debug, Serialize, Deserialize)] -#[clap(group = ArgGroup::new("filter").required(true), about)] -pub(crate) struct FindTransferOptions { +use crate::context::Context; + +#[derive(Clone, Args, Debug, Serialize, Deserialize)] +#[clap(group = ArgGroup::new("filter").required(true))] +pub(crate) struct FindTransferArgs { /// Set minimum tx id - #[clap(short, long, default_value_t)] + #[arg(short, long, default_value_t)] min_tx_id: u64, /// Set maximum tx id - #[clap(short = 'x', long)] + #[arg(short = 'x', long)] max_tx_id: Option, /// Set account filter - #[clap(short, long, group = "filter")] + #[arg(short, long, group = "filter")] account: Option, /// Set contextID filter - #[clap(short, long, group = "filter")] + #[arg(short, long, group = "filter")] context_id: Option, /// Set limit - #[clap(short, long, default_value = "20")] + #[arg(short, long, default_value = "20")] limit: u64, /// Include child accounts in result - #[clap(short, long)] + #[arg(short, long)] include_child_accounts: bool, /// Set enhanced result - #[clap(short, long)] + #[arg(short, long)] enhanced: bool, /// Set output format (one of 'json', 'yaml', 'raw') - #[clap(short, long, default_value = "raw")] + #[arg(short, long, default_value = "raw")] #[serde(default)] format: Format, } -impl FindTransferOptions { - pub(crate) async fn find(&self, config: &crate::Config) -> anyhow::Result<()> { - let context = Context::new(config)?; +impl FindTransferArgs { + pub(crate) async fn find(&self, context: &Context) -> anyhow::Result<()> { let max_tx_id = self.max_tx_id.unwrap_or(u64::MAX); let filter = if let Some(account) = self.account { @@ -58,13 +52,13 @@ impl FindTransferOptions { if self.enhanced { context - .m10_client + .ledger_client() .get_enhanced_transfers(filter) .await? .print(self.format)?; } else { context - .m10_client + .ledger_client() .list_transfers(filter) .await? .print(self.format)?; diff --git a/examples/m10_cli/src/commands/get.rs b/examples/m10_cli/src/commands/get.rs new file mode 100644 index 0000000..2af2ddc --- /dev/null +++ b/examples/m10_cli/src/commands/get.rs @@ -0,0 +1,196 @@ +use std::{any::Any, str::FromStr}; + +use clap::{Args, Subcommand}; +use m10_sdk::{account::AccountId, directory::GetObjectUrlRequest, Format, PrettyPrint, Signer}; +use serde::{Deserialize, Serialize}; +use uuid::Uuid; + +use crate::context::Context; + +use super::convert::BinFormat; + +#[derive(Args, Clone, Debug, Serialize, Deserialize)] +pub(crate) struct GetStoreItemArgs +where + ID: FromStr + Any + Clone + Send + Sync + 'static, + ::Err: Into>, +{ + /// The record id + id: ID, + /// Set output format (one of 'json', 'yaml', 'raw') + #[arg(short, long, alias = "fmt", default_value = "raw")] + #[serde(default)] + format: Format, +} + +#[derive(Subcommand, Clone, Debug, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub(crate) enum Get { + /// Get an account record by id + #[command(alias = "a")] + Account(GetStoreItemArgs), + /// Get an account info record by id + #[command(alias = "ai")] + AccountInfo(GetStoreItemArgs), + /// Get an account set record by id + #[command(alias = "as")] + AccountSet(GetStoreItemArgs), + /// Get an action by tx id + #[command(alias = "ac")] + Action { + /// The transaction id + id: u64, + /// Set output format (one of 'json', 'yaml', 'raw') + #[arg(short, long, default_value = "raw")] + #[serde(default)] + format: Format, + }, + /// Get a bank record by id + #[command(alias = "b")] + Bank(GetStoreItemArgs), + /// Get current block height + #[command(alias = "bh")] + BlockHeight, + /// Get a directory entry + #[command(alias = "d")] + DirectoryEntry { + #[arg(short, long)] + object_id: String, + }, + /// Get a profile image by id + #[command(alias = "i")] + Image { + /// Image name + name: String, + }, + /// Display a key pair + /// stored in a file or in M10_SIGNING_KEY env variable + #[command(alias = "sk")] + KeyPair { + #[arg(short, long, default_value = "base64")] + format: crate::commands::convert::BinFormat, + }, + /// Get ledger account information by id + #[command(alias = "la")] + LedgerAccount(GetStoreItemArgs), + /// Get offline public key + #[command(alias = "ok")] + OfflineKey, + /// Display a public key from a key pair + /// stored in a file or in M10_SIGNING_KEY env variable + #[command(alias = "pk")] + PublicKey { + #[arg(short, long, default_value = "base64")] + format: crate::commands::convert::BinFormat, + }, + /// Get a role record by id + #[command(alias = "r")] + Role(GetStoreItemArgs), + /// Get a role binding record by id + #[command(alias = "rb")] + RoleBinding(GetStoreItemArgs), + /// Get a transfer by id + #[command(alias = "t")] + Transfer { + /// The transaction id + id: u64, + /// Set enhanced result + #[arg(short, long)] + enhanced: bool, + /// Set output format (one of 'json', 'yaml', 'raw') + #[arg(short, long, default_value = "raw")] + #[serde(default)] + format: Format, + }, +} + +impl Get { + pub(super) async fn run(self, context: &Context) -> anyhow::Result<()> { + match self { + Get::Account(args) => context + .ledger_client() + .get_account(args.id) + .await? + .print(args.format)?, + Get::AccountInfo(args) => context + .ledger_client() + .get_account_metadata(args.id) + .await? + .print(args.format)?, + Get::AccountSet(args) => m10_sdk::get_account_set(context.ledger_client(), args.id) + .await? + .print(args.format)?, + Get::Action { id, format } => context + .ledger_client() + .get_action(id) + .await? + .print(format)?, + Get::Bank(args) => m10_sdk::get_bank(context.ledger_client(), args.id) + .await? + .print(args.format)?, + Get::BlockHeight => { + let height = context.ledger_client().get_block_height().await?; + println!("{height}"); + } + Get::DirectoryEntry { object_id } => { + let mut client = context.directory_client()?; + let request = GetObjectUrlRequest { + object_id: object_id.clone(), + }; + let response = client.get_object_url(request).await?.into_inner(); + println!("{:#?}", response); + } + Get::Image { name } => { + let image = context.image_client()?.get_image(&name).await?; + if image.is_empty() { + eprintln!("Image {} not found", name); + } else { + println!("{}", base64::encode(&image)); + } + } + Get::KeyPair { format } => { + let key = context.raw_key()?; + format.print_bytes(&key, vec![BinFormat::Uuid])?; + } + Get::LedgerAccount(args) => context + .ledger_client() + .get_account(args.id) + .await? + .print(args.format)?, + Get::OfflineKey => { + let key = context.ledger_client().get_offline_key().await?; + println!("{}", base64::encode(key)); + } + Get::PublicKey { format } => { + let key = context.signing_key()?; + format.print_bytes(key.public_key(), vec![BinFormat::Uuid])?; + } + Get::Role(args) => m10_sdk::get_role(context.ledger_client(), args.id) + .await? + .print(args.format)?, + Get::RoleBinding(args) => m10_sdk::get_role_binding(context.ledger_client(), args.id) + .await? + .print(args.format)?, + Get::Transfer { + id, + enhanced, + format, + } => { + if enhanced { + context + .ledger_client() + .get_enhanced_transfer(id) + .await? + .print(format)? + } else { + context + .ledger_client() + .get_transfer(id) + .await? + .print(format)? + } + } + }; + Ok(()) + } +} diff --git a/examples/m10_cli/src/commands/get/actions.rs b/examples/m10_cli/src/commands/get/actions.rs deleted file mode 100644 index 1514033..0000000 --- a/examples/m10_cli/src/commands/get/actions.rs +++ /dev/null @@ -1,14 +0,0 @@ -use clap::Parser; -use m10_sdk::Format; -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Parser, Debug, Serialize, Deserialize)] -#[clap(about)] -pub(crate) struct GetActionOptions { - /// The transaction id - pub(crate) id: u64, - /// Set output format (one of 'json', 'yaml', 'raw') - #[clap(short, long, default_value = "raw")] - #[serde(default)] - pub(crate) format: Format, -} diff --git a/examples/m10_cli/src/commands/get/directory_entry.rs b/examples/m10_cli/src/commands/get/directory_entry.rs deleted file mode 100644 index 0bff6ff..0000000 --- a/examples/m10_cli/src/commands/get/directory_entry.rs +++ /dev/null @@ -1,56 +0,0 @@ -use crate::context::Context; -use clap::{Parser, Subcommand}; -use m10_sdk::directory::{directory_service_client::DirectoryServiceClient, GetObjectUrlRequest}; -use serde::{Deserialize, Serialize}; -use tonic::transport::Channel; - -#[derive(Clone, Parser, Debug, Serialize, Deserialize)] -#[serde(rename_all = "camelCase")] -#[clap(about)] -pub(crate) struct GetDirEntryOptions { - /// Directory server address - server: String, - #[clap(subcommand)] - #[serde(flatten)] - cmd: GetDirEntrySubCommands, -} - -impl GetDirEntryOptions { - pub(super) async fn get(&self) -> anyhow::Result<()> { - let addr = format!("https://{}", &self.server); - let channel = Context::channel_from_address(&addr, false)?; - let mut client = DirectoryServiceClient::new(channel); - - match &self.cmd { - GetDirEntrySubCommands::ObjectUrl(options) => options.get_object_url(&mut client).await, - } - } -} - -#[derive(Clone, Subcommand, Debug, Serialize, Deserialize)] -#[serde(rename_all = "camelCase")] -pub(crate) enum GetDirEntrySubCommands { - ObjectUrl(GetObjectUrlOptions), -} - -#[derive(Clone, Parser, Debug, Serialize, Deserialize)] -#[clap(about)] -pub(crate) struct GetObjectUrlOptions { - /// Object id - #[clap(short, long)] - object_id: String, -} - -impl GetObjectUrlOptions { - async fn get_object_url( - &self, - client: &mut DirectoryServiceClient, - ) -> anyhow::Result<()> { - let request = GetObjectUrlRequest { - object_id: self.object_id.clone(), - }; - let response = client.get_object_url(request).await?.into_inner(); - println!("{:#?}", response); - Ok(()) - } -} diff --git a/examples/m10_cli/src/commands/get/images.rs b/examples/m10_cli/src/commands/get/images.rs deleted file mode 100644 index 75b597b..0000000 --- a/examples/m10_cli/src/commands/get/images.rs +++ /dev/null @@ -1,24 +0,0 @@ -use crate::context::Context; -use clap::Parser; -use serde::{Deserialize, Serialize}; -use std::fmt::Debug; - -#[derive(Clone, Parser, Debug, Serialize, Deserialize)] -#[clap(about)] -pub(crate) struct GetImageOptions { - /// Image name - name: String, -} - -impl GetImageOptions { - pub(super) async fn get(&self, config: &crate::Config) -> anyhow::Result<()> { - let mut context = Context::new(config)?; - let image = context.image_client.get_image(&self.name).await?; - if image.is_empty() { - eprintln!("Image {} not found", self.name); - } else { - println!("{}", base64::encode(&image)); - } - Ok(()) - } -} diff --git a/examples/m10_cli/src/commands/get/key_pair.rs b/examples/m10_cli/src/commands/get/key_pair.rs deleted file mode 100644 index 7fe2796..0000000 --- a/examples/m10_cli/src/commands/get/key_pair.rs +++ /dev/null @@ -1,36 +0,0 @@ -use crate::{commands::convert::BinFormat, utils}; -use clap::{ArgGroup, Parser}; -use serde::{Deserialize, Serialize}; -use std::fmt::Debug; - -#[derive(Clone, Parser, Debug, Serialize, Deserialize)] -#[clap(group = ArgGroup::new("method"), about)] -pub(crate) struct GetKeyPairOptions { - /// File name of key pair - key_file: Option, - /// Set output format (one of 'hex-str', 'int-array', hex-array', 'base64') - #[clap(short, long, default_value = "base64")] - format: crate::commands::convert::BinFormat, -} - -impl GetKeyPairOptions { - pub(crate) fn get(&self, config: &crate::Config) -> Result<(), anyhow::Error> { - let key_pair = if let Some(key_file) = &self.key_file { - utils::load_key_pair_exportable(key_file)? - } else if let Some(k) = &config.signing_key { - base64::decode(k)? - } else { - return Err(anyhow::anyhow!("Missing key")); - }; - match self.format { - BinFormat::IntBytes => println!("{:?}", key_pair), - BinFormat::HexBytes => println!("{:02x?}", key_pair), - BinFormat::HexString => println!("{}", hex::encode(key_pair)), - BinFormat::Base64 => println!("{}", base64::encode(key_pair)), - _ => { - return Err(anyhow::anyhow!("Unsupported format")); - } - } - Ok(()) - } -} diff --git a/examples/m10_cli/src/commands/get/mod.rs b/examples/m10_cli/src/commands/get/mod.rs deleted file mode 100644 index f8a755c..0000000 --- a/examples/m10_cli/src/commands/get/mod.rs +++ /dev/null @@ -1,148 +0,0 @@ -use crate::context::Context; -use clap::Parser; -use m10_sdk::account::AccountId; -use m10_sdk::{Format, PrettyPrint}; -use serde::{Deserialize, Serialize}; -use std::error::Error as StdError; -use std::fmt::{Debug, Display}; -use std::str::FromStr; -use uuid::Uuid; - -mod actions; -mod directory_entry; -mod images; -mod key_pair; -mod public_key; -mod transfers; - -#[derive(Clone, Parser, Debug, Serialize, Deserialize)] -#[clap(about)] -pub(super) struct GetStoreItemOptions -where - ID: FromStr + Display, - ID::Err: StdError + Send + Sync + 'static, -{ - /// The record id - id: ID, - /// Set output format (one of 'json', 'yaml', 'raw') - #[clap(short = 'f', long, default_value = "raw")] - #[serde(default)] - format: Format, -} - -#[derive(Clone, Parser, Debug, Serialize, Deserialize)] -#[serde(rename_all = "camelCase")] -#[clap(about)] -pub(super) enum GetSubCommands { - /// Get an account record by id - Account(GetStoreItemOptions), - /// Get an account info record by id - AccountInfo(GetStoreItemOptions), - /// Get an account set record by id - AccountSet(GetStoreItemOptions), - /// Get an action by tx id - Action(actions::GetActionOptions), - /// Get a bank record by id - Bank(GetStoreItemOptions), - /// Get ledger account information by id - LedgerAccount(GetStoreItemOptions), - /// Get a role record by id - Role(GetStoreItemOptions), - /// Get a role binding record by id - RoleBinding(GetStoreItemOptions), - /// Get a transfer by id - Transfer(transfers::GetTransferOptions), - /// Get a directory entry - DirectoryEntry(directory_entry::GetDirEntryOptions), - /// Get a profile image by id - Image(images::GetImageOptions), - /// Display a public key from a key pair - /// stored in a file or in M10_SIGNING_KEY env variable - PublicKey(public_key::GetPubKeyOptions), - /// Display a key pair - /// stored in a file or in M10_SIGNING_KEY env variable - KeyPair(key_pair::GetKeyPairOptions), - /// Get current block height - BlockHeight, - /// Get offline public key - OfflineKey, -} - -impl GetSubCommands { - pub(super) async fn get(&self, config: &crate::Config) -> anyhow::Result<()> { - if let GetSubCommands::PublicKey(options) = self { - return options.get(config); - }; - let context = Context::new(config)?; - match self { - GetSubCommands::Account(options) => context - .m10_client - .get_account(options.id) - .await? - .print(options.format)?, - GetSubCommands::AccountInfo(options) => context - .m10_client - .get_account_metadata(options.id) - .await? - .print(options.format)?, - GetSubCommands::AccountSet(options) => context - .m10_client - .get_account_set(options.id) - .await? - .print(options.format)?, - GetSubCommands::Bank(options) => context - .m10_client - .get_bank(options.id) - .await? - .print(options.format)?, - GetSubCommands::LedgerAccount(options) => context - .m10_client - .get_account(options.id) - .await? - .print(options.format)?, - GetSubCommands::Role(options) => context - .m10_client - .get_role(options.id) - .await? - .print(options.format)?, - GetSubCommands::RoleBinding(options) => context - .m10_client - .get_role_binding(options.id) - .await? - .print(options.format)?, - GetSubCommands::Transfer(options) => { - if options.enhanced { - context - .m10_client - .get_enhanced_transfer(options.id) - .await? - .print(options.format)? - } else { - context - .m10_client - .get_transfer(options.id) - .await? - .print(options.format)? - } - } - GetSubCommands::DirectoryEntry(options) => options.get().await?, - GetSubCommands::Image(options) => options.get(config).await?, - GetSubCommands::Action(options) => context - .m10_client - .get_action(options.id) - .await? - .print(options.format)?, - GetSubCommands::KeyPair(options) => options.get(config)?, - GetSubCommands::PublicKey(_) => unreachable!("No context"), - GetSubCommands::BlockHeight => { - let height = context.m10_client.get_block_height().await?; - println!("{height}"); - } - GetSubCommands::OfflineKey => { - let key = context.m10_client.get_offline_key().await?; - println!("{}", base64::encode(key)); - } - }; - Ok(()) - } -} diff --git a/examples/m10_cli/src/commands/get/public_key.rs b/examples/m10_cli/src/commands/get/public_key.rs deleted file mode 100644 index 5684065..0000000 --- a/examples/m10_cli/src/commands/get/public_key.rs +++ /dev/null @@ -1,38 +0,0 @@ -use crate::{commands::convert::BinFormat, utils}; -use clap::{ArgGroup, Parser}; -use m10_sdk::Signer; -use serde::{Deserialize, Serialize}; -use std::fmt::Debug; - -#[derive(Clone, Parser, Debug, Serialize, Deserialize)] -#[clap(group = ArgGroup::new("method"), about)] -pub(crate) struct GetPubKeyOptions { - /// File name of key pair - #[clap(value_name = "KEY", help = "Path to a key file")] - key_file: Option, - /// Set output format (one of 'hex-str', 'int-array', hex-array', 'base64') - #[clap(short, long, default_value = "base64")] - format: crate::commands::convert::BinFormat, -} - -impl GetPubKeyOptions { - pub(crate) fn get(&self, config: &crate::Config) -> anyhow::Result<()> { - let pub_key = if let Some(key_file) = &self.key_file { - utils::load_key_pair(key_file)?.public_key().to_vec() - } else if let Some(k) = &config.signing_key { - utils::key_pair_from_env(k)?.public_key().to_vec() - } else { - return Err(anyhow::anyhow!("Missing key")); - }; - match self.format { - BinFormat::IntBytes => println!("{:?}", pub_key), - BinFormat::HexBytes => println!("{:02x?}", pub_key), - BinFormat::HexString => println!("{}", hex::encode(pub_key)), - BinFormat::Base64 => println!("{}", base64::encode(pub_key)), - _ => { - return Err(anyhow::anyhow!("Unsupported format")); - } - } - Ok(()) - } -} diff --git a/examples/m10_cli/src/commands/get/transfers.rs b/examples/m10_cli/src/commands/get/transfers.rs deleted file mode 100644 index 62bf03b..0000000 --- a/examples/m10_cli/src/commands/get/transfers.rs +++ /dev/null @@ -1,17 +0,0 @@ -use clap::Parser; -use serde::{Deserialize, Serialize}; -use std::fmt::Debug; - -#[derive(Clone, Parser, Debug, Serialize, Deserialize)] -#[clap(about)] -pub(crate) struct GetTransferOptions { - /// The transaction id - pub(crate) id: u64, - /// Set enhanced result - #[clap(short, long)] - pub(crate) enhanced: bool, - /// Set output format (one of 'json', 'yaml', 'raw') - #[clap(short, long, default_value = "raw")] - #[serde(default)] - pub(crate) format: super::Format, -} diff --git a/examples/m10_cli/src/commands/invoke.rs b/examples/m10_cli/src/commands/invoke.rs new file mode 100644 index 0000000..5f9fbce --- /dev/null +++ b/examples/m10_cli/src/commands/invoke.rs @@ -0,0 +1,85 @@ +use std::{fs::File, io::Read, path::PathBuf}; + +use anyhow::Context as AnyhowContext; +use clap::{ArgGroup, Subcommand}; +use m10_sdk::{account::AccountId, ActionBuilder, WithContext}; +use serde::{Deserialize, Serialize}; + +use crate::context::Context; + +#[derive(Clone, Subcommand, Debug, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub(crate) enum Invoke { + /// Invokes a registered action + #[command(alias = "a", group = ArgGroup::new("target").required(true))] + Action { + /// Name of the registered action + #[arg(short, long)] + name: String, + /// Account ID invoking the action + #[arg(long)] + from: AccountId, + /// Target account ID + #[arg(short, long, group = "target")] + to: Option, + /// Opaque payload. Interpreted as raw string + #[arg(long, aliases = ["pl", "body"], conflicts_with = "file")] + payload: Option, + /// Read payload from file + #[arg(short, long, conflicts_with = "payload")] + file: Option, + }, +} + +impl Invoke { + pub(super) async fn run(self, context: &Context) -> anyhow::Result<()> { + match self { + Invoke::Action { + name, + from, + to, + payload, + file, + } => invoke_action(name, from, to, payload, file, context).await, + } + } +} + +async fn invoke_action( + name: String, + from: AccountId, + to: Option, + payload: Option, + file: Option, + context: &Context, +) -> anyhow::Result<()> { + let builder = if let Some(to) = to { + ActionBuilder::for_account(name.clone(), from, to) + } else { + ActionBuilder::for_all(name.clone(), from) + }; + + let mut buf = vec![]; + let payload = if let Some(payload) = payload.as_ref() { + // Use string as UTF-8 + payload.as_bytes().to_vec() + } else if let Some(path) = file.as_ref() { + let mut file = File::open(path).context("Could not read payload file")?; + file.read_to_end(&mut buf)?; + buf + } else { + eprintln!("Reading payload from STDIN. Press ENTER to continue.."); + let mut value = String::new(); + std::io::stdin() + .read_line(&mut value) + .context("Could not read from STDIN")?; + value.as_bytes().to_vec() + }; + let tx_id = m10_sdk::action( + context.ledger_client(), + builder.payload(payload).context_id(context.context_id()), + ) + .await?; + eprintln!("Invoked action {} in txId {}", name, tx_id); + Ok(()) +} diff --git a/examples/m10_cli/src/commands/mod.rs b/examples/m10_cli/src/commands/mod.rs index debea70..19bf388 100644 --- a/examples/m10_cli/src/commands/mod.rs +++ b/examples/m10_cli/src/commands/mod.rs @@ -2,7 +2,6 @@ pub(crate) use top_level_cmds::Commands; mod auth; mod batch; -mod call; mod convert; mod create; mod csv; @@ -10,6 +9,7 @@ mod delete; mod endorse; mod find; mod get; +mod invoke; mod observe; mod show; mod token; diff --git a/examples/m10_cli/src/commands/observe.rs b/examples/m10_cli/src/commands/observe.rs new file mode 100644 index 0000000..2f05355 --- /dev/null +++ b/examples/m10_cli/src/commands/observe.rs @@ -0,0 +1,186 @@ +use clap::{Args, Subcommand}; +use futures_lite::StreamExt; +use m10_sdk::{account::AccountId, AccountFilter, Format, PrettyPrint, TxId}; +use serde::{Deserialize, Serialize}; + +use crate::context::Context; + +#[derive(Clone, Args, Debug, Serialize, Deserialize)] +pub(crate) struct ObserveArgs { + /// Account IDs + #[arg(short)] + ids: Vec, + /// Transaction ID to start observing from + #[arg(long, aliases = ["start", "sf", "from"])] + starting_from: Option, + /// output format + #[arg(short, long, default_value_t)] + format: Format, +} + +#[derive(Clone, Subcommand, Debug, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub(crate) enum Observe { + /// Observe account updates involves the provided account ids + #[command(alias = "a")] + Accounts(ObserveArgs), + /// Observe an action involving the provided account ids + #[command(alias = "ac")] + Actions { + /// Name of the action + #[arg(short, long)] + name: String, + /// Account IDs + #[arg(short, long)] + ids: Vec, + /// Transaction ID to start observing from + #[arg(long)] + starting_from: Option, + /// Set output format (one of 'json', 'yaml', 'raw') + #[arg(short = 'f', long, default_value_t)] + format: Format, + }, + /// Observe transaction metrics involving the provided account ids + #[command(alias = "m")] + Metrics(ObserveArgs), + /// Observe transfers involving the provided account ids + #[command(alias = "t")] + Transfers(ObserveArgs), +} + +impl Observe { + pub(super) async fn run(self, context: &Context) -> anyhow::Result<()> { + match self { + Observe::Accounts(args) => Self::observe_accounts(args, context).await, + Observe::Actions { + name, + ids, + starting_from, + format, + } => Self::observe_actions(&name, &ids, starting_from, format, context).await, + Observe::Metrics(args) => Self::observe_metrics(args, context).await, + Observe::Transfers(args) => Self::observe_transfers(args, context).await, + } + } + + async fn observe_accounts(args: ObserveArgs, context: &Context) -> anyhow::Result<()> { + let ObserveArgs { + ids, + starting_from, + format, + } = args; + let mut filter = ids + .iter() + .copied() + .fold(AccountFilter::default(), |filter, id| filter.involves(id)); + if let Some(start) = starting_from { + filter = filter.starting_from(start); + } + let mut updates = context.ledger_client().observe_accounts(filter).await?; + + while let Some(message) = updates.next().await { + match message { + Ok(account_updates) => { + account_updates.print(format)?; + } + Err(err) => { + eprintln!("Error while receiving message: {}", err); + break; + } + } + } + eprintln!("Stream terminated"); + Ok(()) + } + + async fn observe_actions( + name: &str, + ids: &[AccountId], + starting_from: Option, + format: Format, + context: &Context, + ) -> anyhow::Result<()> { + let mut filter = ids + .iter() + .copied() + .fold(AccountFilter::name(name), |filter, id| filter.involves(id)); + if let Some(start) = starting_from { + filter = filter.starting_from(start); + } + let mut stream = context.ledger_client().observe_actions(filter).await?; + + while let Some(message) = stream.next().await { + match message { + Ok(actions) => { + actions.print(format)?; + } + Err(err) => { + eprintln!("Error while receiving message: {}", err); + break; + } + } + } + eprintln!("Stream terminated"); + Ok(()) + } + + async fn observe_metrics(args: ObserveArgs, context: &Context) -> anyhow::Result<()> { + let ObserveArgs { + ids, + starting_from, + format, + } = args; + let mut filter = ids + .iter() + .copied() + .fold(AccountFilter::default(), |filter, id| filter.involves(id)); + if let Some(start) = starting_from { + filter = filter.starting_from(start); + } + let mut updates = context.ledger_client().observe_metrics(filter).await?; + + while let Some(message) = updates.next().await { + match message { + Ok(sample) => { + sample.print(format)?; + } + Err(err) => { + eprintln!("Error while receiving message: {}", err); + break; + } + } + } + eprintln!("Stream terminated"); + Ok(()) + } + + async fn observe_transfers(args: ObserveArgs, context: &Context) -> anyhow::Result<()> { + let ObserveArgs { + ids, + starting_from, + format, + } = args; + let mut filter = ids + .iter() + .copied() + .fold(AccountFilter::default(), |filter, id| filter.involves(id)); + if let Some(start) = starting_from { + filter = filter.starting_from(start); + } + let mut stream = context.ledger_client().observe_transfers(filter).await?; + + while let Some(message) = stream.next().await { + match message { + Ok(transfers) => { + transfers.print(format)?; + } + Err(err) => { + eprintln!("Error while receiving message: {}", err); + break; + } + } + } + eprintln!("Stream terminated"); + Ok(()) + } +} diff --git a/examples/m10_cli/src/commands/observe/accounts.rs b/examples/m10_cli/src/commands/observe/accounts.rs deleted file mode 100644 index ad64cdf..0000000 --- a/examples/m10_cli/src/commands/observe/accounts.rs +++ /dev/null @@ -1,34 +0,0 @@ -use crate::context::Context; -use futures_lite::StreamExt; -use m10_sdk::{account::AccountId, AccountFilter, Format, PrettyPrint, TxId}; - -pub(crate) async fn observe( - ids: &[AccountId], - starting_from: Option, - format: Format, - config: &crate::Config, -) -> anyhow::Result<()> { - let context = Context::new(config)?; - let mut filter = ids - .iter() - .copied() - .fold(AccountFilter::default(), |filter, id| filter.involves(id)); - if let Some(start) = starting_from { - filter = filter.starting_from(start); - } - let mut updates = context.m10_client.observe_accounts(filter).await?; - - while let Some(message) = updates.next().await { - match message { - Ok(account_updates) => { - account_updates.print(format)?; - } - Err(err) => { - eprintln!("Error while receiving message: {}", err); - break; - } - } - } - eprintln!("Stream terminated"); - Ok(()) -} diff --git a/examples/m10_cli/src/commands/observe/actions.rs b/examples/m10_cli/src/commands/observe/actions.rs deleted file mode 100644 index 0b2d063..0000000 --- a/examples/m10_cli/src/commands/observe/actions.rs +++ /dev/null @@ -1,36 +0,0 @@ -use crate::context::Context; -use futures_lite::StreamExt; -use m10_sdk::account::AccountId; -use m10_sdk::{AccountFilter, Format, PrettyPrint, TxId}; - -pub(crate) async fn observe( - name: &str, - ids: &[AccountId], - starting_from: Option, - format: Format, - config: &crate::Config, -) -> anyhow::Result<()> { - let context = Context::new(config)?; - let mut filter = ids - .iter() - .copied() - .fold(AccountFilter::name(name), |filter, id| filter.involves(id)); - if let Some(start) = starting_from { - filter = filter.starting_from(start); - } - let mut stream = context.m10_client.observe_actions(filter).await?; - - while let Some(message) = stream.next().await { - match message { - Ok(actions) => { - actions.print(format)?; - } - Err(err) => { - eprintln!("Error while receiving message: {}", err); - break; - } - } - } - eprintln!("Stream terminated"); - Ok(()) -} diff --git a/examples/m10_cli/src/commands/observe/metrics.rs b/examples/m10_cli/src/commands/observe/metrics.rs deleted file mode 100644 index bf6a1bc..0000000 --- a/examples/m10_cli/src/commands/observe/metrics.rs +++ /dev/null @@ -1,35 +0,0 @@ -use crate::context::Context; -use futures_lite::StreamExt; -use m10_sdk::account::AccountId; -use m10_sdk::{AccountFilter, Format, PrettyPrint, TxId}; - -pub(crate) async fn observe( - ids: &[AccountId], - starting_from: Option, - format: Format, - config: &crate::Config, -) -> anyhow::Result<()> { - let context = Context::new(config)?; - let mut filter = ids - .iter() - .copied() - .fold(AccountFilter::default(), |filter, id| filter.involves(id)); - if let Some(start) = starting_from { - filter = filter.starting_from(start); - } - let mut updates = context.m10_client.observe_metrics(filter).await?; - - while let Some(message) = updates.next().await { - match message { - Ok(sample) => { - sample.print(format)?; - } - Err(err) => { - eprintln!("Error while receiving message: {}", err); - break; - } - } - } - eprintln!("Stream terminated"); - Ok(()) -} diff --git a/examples/m10_cli/src/commands/observe/mod.rs b/examples/m10_cli/src/commands/observe/mod.rs deleted file mode 100644 index 35a47aa..0000000 --- a/examples/m10_cli/src/commands/observe/mod.rs +++ /dev/null @@ -1,80 +0,0 @@ -use clap::Parser; -use m10_sdk::account::AccountId; -use m10_sdk::Format; -use serde::{Deserialize, Serialize}; -use std::fmt::Debug; - -mod accounts; -mod actions; -mod metrics; -mod transfers; - -#[derive(Clone, Parser, Debug, Serialize, Deserialize)] -#[clap(about)] -pub(super) struct ObserveAccountOptions { - /// Account IDs - #[clap(short, multiple_values = true)] - ids: Vec, - /// Transaction ID to start observing from - #[clap(short, long)] - starting_from: Option, - /// output format - #[clap(short = 'f', long, default_value_t)] - format: Format, -} - -#[derive(Clone, Parser, Debug, Serialize, Deserialize)] -pub(super) struct ObserveActionOptions { - /// Name of the action - #[clap(short, long)] - name: String, - /// Account IDs - #[clap(short, long, multiple_values = true)] - ids: Vec, - /// Transaction ID to start observing from - #[clap(short, long)] - starting_from: Option, - /// Set output format (one of 'json', 'yaml', 'raw') - #[clap(short = 'f', long, default_value_t)] - format: Format, -} - -#[derive(Clone, Parser, Debug, Serialize, Deserialize)] -#[serde(rename_all = "camelCase")] -pub(super) enum ObserveSubcommands { - #[clap(about = "Observe transfers involving the provided account ids")] - Transfers(ObserveAccountOptions), - #[clap(about = "Observe an action involving the provided account ids")] - Actions(ObserveActionOptions), - #[clap(about = "Observe account updates involves the provided account ids")] - Accounts(ObserveAccountOptions), - #[clap(about = "Observe transaction metrics involving the provided account ids")] - Metrics(ObserveAccountOptions), -} - -impl ObserveSubcommands { - pub(super) async fn observe(&self, config: &crate::Config) -> anyhow::Result<()> { - match self { - ObserveSubcommands::Transfers(options) => { - transfers::observe(&options.ids, options.starting_from, options.format, config) - .await - } - ObserveSubcommands::Actions(options) => { - actions::observe( - &options.name, - &options.ids, - options.starting_from, - options.format, - config, - ) - .await - } - ObserveSubcommands::Accounts(options) => { - accounts::observe(&options.ids, options.starting_from, options.format, config).await - } - ObserveSubcommands::Metrics(options) => { - metrics::observe(&options.ids, options.starting_from, options.format, config).await - } - } - } -} diff --git a/examples/m10_cli/src/commands/observe/transfers.rs b/examples/m10_cli/src/commands/observe/transfers.rs deleted file mode 100644 index 8aa9c45..0000000 --- a/examples/m10_cli/src/commands/observe/transfers.rs +++ /dev/null @@ -1,35 +0,0 @@ -use crate::context::Context; -use futures_lite::StreamExt; -use m10_sdk::account::AccountId; -use m10_sdk::{AccountFilter, Format, PrettyPrint, TxId}; - -pub(crate) async fn observe( - ids: &[AccountId], - starting_from: Option, - format: Format, - config: &crate::Config, -) -> anyhow::Result<()> { - let context = Context::new(config)?; - let mut filter = ids - .iter() - .copied() - .fold(AccountFilter::default(), |filter, id| filter.involves(id)); - if let Some(start) = starting_from { - filter = filter.starting_from(start); - } - let mut stream = context.m10_client.observe_transfers(filter).await?; - - while let Some(message) = stream.next().await { - match message { - Ok(transfers) => { - transfers.print(format)?; - } - Err(err) => { - eprintln!("Error while receiving message: {}", err); - break; - } - } - } - eprintln!("Stream terminated"); - Ok(()) -} diff --git a/examples/m10_cli/src/commands/show/account.rs b/examples/m10_cli/src/commands/show/account.rs index d140b20..e6f371e 100644 --- a/examples/m10_cli/src/commands/show/account.rs +++ b/examples/m10_cli/src/commands/show/account.rs @@ -1,48 +1,35 @@ -use clap::{Parser, Subcommand}; -use serde::{Deserialize, Serialize}; use std::convert::TryInto; -use std::fmt::Debug; + +use clap::Subcommand; +use serde::{Deserialize, Serialize}; #[derive(Clone, Subcommand, Debug, Serialize, Deserialize)] -#[clap(about)] -pub(crate) enum ShowAccountCommands { +pub(crate) enum Account { /// Show parent Id of an account - ParentId(AccountId), + ParentId, /// Show if account is an issuance account - IsIssuance(AccountId), + IsIssuance, /// Show if account is descendant of another account - IsDescendantOf(AccountIds), + IsDescendantOf { + /// Account Id + parent: String, + }, /// Show if account is - IsEqOrDescendantOf(AccountIds), + IsEqOrDescendantOf { + /// Account Id + parent: String, + }, /// Show if account is a leaf in the hierarchy - IsLeaf(AccountId), + IsLeaf, /// Show account level in the hierarchy - Depth(AccountId), -} - -#[derive(Clone, Parser, Debug, Serialize, Deserialize)] -#[clap(about)] -pub(crate) struct AccountIds { - /// Account Id potentially lower in hierarchy - #[clap(short, long)] - child: String, - /// Account Id potentially higher in hierarchy - #[clap(short, long)] - parent: String, -} - -#[derive(Clone, Parser, Debug, Serialize, Deserialize)] -#[clap(about)] -pub(crate) struct AccountId { - /// Account Id - id: String, + Depth, } -impl ShowAccountCommands { - pub(super) fn show(&self) -> anyhow::Result<()> { +impl Account { + pub(super) fn run(self, id: String) -> anyhow::Result<()> { match self { - ShowAccountCommands::ParentId(option) => { - let id = Self::try_convert(&option.id)?; + Account::ParentId => { + let id = Self::try_convert(&id)?; if let Some(parent_id) = id.parent_id() { let raw_id = parent_id.to_be_bytes(); println!("{}", hex::encode(raw_id)); @@ -50,26 +37,26 @@ impl ShowAccountCommands { eprintln!("account is root"); } } - ShowAccountCommands::IsIssuance(option) => { - let id = Self::try_convert(&option.id)?; + Account::IsIssuance => { + let id = Self::try_convert(&id)?; println!("{}", id.is_issuance()); } - ShowAccountCommands::IsLeaf(option) => { - let id = Self::try_convert(&option.id)?; + Account::IsLeaf => { + let id = Self::try_convert(&id)?; println!("{}", id.is_leaf()); } - ShowAccountCommands::Depth(option) => { - let id = Self::try_convert(&option.id)?; + Account::Depth => { + let id = Self::try_convert(&id)?; println!("{}", id.depth()); } - ShowAccountCommands::IsDescendantOf(option) => { - let child = Self::try_convert(&option.child)?; - let parent = Self::try_convert(&option.parent)?; + Account::IsDescendantOf { parent } => { + let child = Self::try_convert(&id)?; + let parent = Self::try_convert(&parent)?; println!("{}", child.is_descendant_of(parent)); } - ShowAccountCommands::IsEqOrDescendantOf(option) => { - let child = Self::try_convert(&option.child)?; - let parent = Self::try_convert(&option.parent)?; + Account::IsEqOrDescendantOf { parent } => { + let child = Self::try_convert(&id)?; + let parent = Self::try_convert(&parent)?; println!("{}", child.is_eq_or_descendant_of(parent)); } } diff --git a/examples/m10_cli/src/commands/show/mod.rs b/examples/m10_cli/src/commands/show/mod.rs index 3848e06..1f3c543 100644 --- a/examples/m10_cli/src/commands/show/mod.rs +++ b/examples/m10_cli/src/commands/show/mod.rs @@ -1,34 +1,35 @@ -use crate::collections::contracts::show_contract; -use clap::{Parser, Subcommand}; +use clap::Subcommand; use m10_sdk::Format; use serde::{Deserialize, Serialize}; -use std::fmt::Debug; -mod account; +use crate::collections::contracts::show_contract; -#[derive(Clone, Parser, Debug, Serialize, Deserialize)] -#[clap(about)] -pub(super) struct ShowItemOptions { - /// file path - path: String, -} +mod account; #[derive(Clone, Subcommand, Debug, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] -#[clap(about)] -pub(super) enum ShowSubCommands { - /// Show contract details - Contract(ShowItemOptions), +pub(crate) enum Show { /// Show account details - #[clap(subcommand)] - Account(account::ShowAccountCommands), + #[command(alias = "a")] + Account { + /// Account Id + id: String, + #[command(subcommand)] + cmd: account::Account, + }, + /// Show contract details + #[command(alias = "c")] + Contract { + /// file path + path: String, + }, } -impl ShowSubCommands { - pub(super) async fn show(&self, format: Format) -> anyhow::Result<()> { +impl Show { + pub(super) async fn run(self, format: Format) -> anyhow::Result<()> { match self { - ShowSubCommands::Contract(options) => show_contract(&options.path, format).await, - ShowSubCommands::Account(cmds) => cmds.show(), + Show::Contract { path } => show_contract(&path, format).await, + Show::Account { id, cmd } => cmd.run(id), } } } diff --git a/examples/m10_cli/src/commands/token.rs b/examples/m10_cli/src/commands/token.rs index a3880e0..984bdb5 100644 --- a/examples/m10_cli/src/commands/token.rs +++ b/examples/m10_cli/src/commands/token.rs @@ -1,119 +1,176 @@ use std::fs; -use m10_sdk::{account::AccountId, prost::Message, sdk, Signer}; +use clap::Subcommand; +use m10_sdk::{account, account::AccountId, prost::Message, sdk, Signer}; +use serde::{Deserialize, Serialize}; -use crate::{context::Context, utils}; +use crate::context::Context; -pub(crate) fn verify_offline(file: &str) -> anyhow::Result<()> { - let master_token_file = fs::read(file)?; - let sdk::OfflineToken { data, signature } = - sdk::OfflineToken::decode(master_token_file.as_slice())?; - let data = data.ok_or_else(|| anyhow::anyhow!("missing data in master token"))?; - let mut token_data_buf = vec![]; - data.encode(&mut token_data_buf)?; - let signature = - signature.ok_or_else(|| anyhow::anyhow!("missing signature in master token"))?; - signature.verify(&token_data_buf)?; - println!("token ok"); - Ok(()) +#[derive(Clone, Debug, Subcommand, Serialize, Deserialize)] +pub(crate) enum Verify { + #[command(alias = "o")] + OfflineToken { + #[arg(short, long)] + file: String, + }, + #[command(alias = "r")] + RedeemableToken { + #[arg(short, long)] + master: String, + #[arg(short, long)] + file: String, + }, } -pub(crate) fn verify_redeemable(master: &str, file: &str) -> anyhow::Result<()> { - let master_token_file = fs::read(master)?; - let sdk::OfflineToken { data, .. } = sdk::OfflineToken::decode(master_token_file.as_slice())?; - let master_token = data.ok_or_else(|| anyhow::anyhow!("missing data in master token"))?; +impl Verify { + pub(crate) fn run(&self) -> anyhow::Result<()> { + match self { + Verify::OfflineToken { file } => Self::verify_offline(file), + Verify::RedeemableToken { master, file } => Self::verify_redeemable(master, file), + } + } + + fn verify_offline(file: &str) -> anyhow::Result<()> { + let master_token_file = fs::read(file)?; + let sdk::OfflineToken { data, signature } = + sdk::OfflineToken::decode(master_token_file.as_slice())?; + let data = data.ok_or_else(|| anyhow::anyhow!("missing data in master token"))?; + let mut token_data_buf = vec![]; + data.encode(&mut token_data_buf)?; + let signature = + signature.ok_or_else(|| anyhow::anyhow!("missing signature in master token"))?; + signature.verify(&token_data_buf)?; + println!("token ok"); + Ok(()) + } - let token_file = fs::read(file)?; - let sdk::RedeemableToken { data, signature } = - sdk::RedeemableToken::decode(token_file.as_slice())?; - let token = data.ok_or_else(|| anyhow::anyhow!("missing data in redeemable token"))?; - let mut token_data_buf = vec![]; - token.encode(&mut token_data_buf)?; - let signature = - signature.ok_or_else(|| anyhow::anyhow!("missing signature in redeemable token"))?; - signature.verify(&token_data_buf)?; + fn verify_redeemable(master: &str, file: &str) -> anyhow::Result<()> { + let master_token_file = fs::read(master)?; + let sdk::OfflineToken { data, .. } = + sdk::OfflineToken::decode(master_token_file.as_slice())?; + let master_token = data.ok_or_else(|| anyhow::anyhow!("missing data in master token"))?; - let mut ok = true; - if !token.inputs.iter().any(|i| i.input == master_token.id) { - println!("token not derived from master token"); - ok = false; + let token_file = fs::read(file)?; + let sdk::RedeemableToken { data, signature } = + sdk::RedeemableToken::decode(token_file.as_slice())?; + let token = data.ok_or_else(|| anyhow::anyhow!("missing data in redeemable token"))?; + let mut token_data_buf = vec![]; + token.encode(&mut token_data_buf)?; + let signature = + signature.ok_or_else(|| anyhow::anyhow!("missing signature in redeemable token"))?; + signature.verify(&token_data_buf)?; + + let mut ok = true; + if !token.inputs.iter().any(|i| i.input == master_token.id) { + println!("token not derived from master token"); + ok = false; + } + if signature.public_key != master_token.address { + println!("token not issues by owner of master token"); + ok = false; + } + if ok { + println!("token ok"); + } + Ok(()) } - if signature.public_key != master_token.address { - println!("token not issues by owner of master token"); - ok = false; +} + +#[derive(Clone, Debug, Subcommand, Serialize, Deserialize)] +pub(crate) enum Issue { + #[command(alias = "t")] + Token { + #[arg(short, long)] + from: Vec, + #[arg(short, long)] + values: Vec, + #[arg(short, long)] + to: String, + }, +} + +impl Issue { + pub(crate) async fn run(&self, context: &Context) -> anyhow::Result<()> { + match self { + Issue::Token { from, values, to } => Self::issue(from, values, to, context).await, + } } - if ok { - println!("token ok"); + + async fn issue( + files: &[String], + values: &[u64], + to: &str, + context: &Context, + ) -> anyhow::Result<()> { + let mut c = None; + let inputs = files + .iter() + .zip(values) + .map(|(file, value)| { + let master_token_file = fs::read(file)?; + let master_token = sdk::OfflineToken::decode(master_token_file.as_slice())?; + let sdk::offline_token::Data { id, currency, .. } = master_token + .data + .ok_or_else(|| anyhow::anyhow!("missing data in master token"))?; + let cr = c.get_or_insert(currency.clone()); + if cr != ¤cy { + return Err(anyhow::anyhow!("Tokens must have same currency")); + } + Ok(sdk::redeemable_token::TokenInput { + input: id, + value: *value, + }) + }) + .collect::>()?; + let currency = c.ok_or(anyhow::anyhow!("no input tokens found"))?; + let g = libxid::new_generator(); + let token_id = g.new_id()?; + let data = sdk::redeemable_token::Data { + address: base64::decode(to)?, + currency, + id: token_id.to_vec(), + inputs, + }; + let key = context.signing_key()?; + let mut token_data_buf = vec![]; + data.encode(&mut token_data_buf)?; + let token = sdk::RedeemableToken { + data: Some(data), + signature: Some(key.sign_payload(&token_data_buf).await?), + }; + let mut token_buf = vec![]; + token.encode(&mut token_buf)?; + let path = format!("./rt-{}.tok", token_id); + fs::write(path, token_buf)?; + Ok(()) } - Ok(()) } -pub(crate) async fn issue_token( - files: &[String], - values: &[u64], - to: &str, - config: &crate::Config, -) -> anyhow::Result<()> { - let mut c = None; - let inputs = files - .iter() - .zip(values) - .map(|(file, value)| { - let master_token_file = fs::read(file)?; - let master_token = sdk::OfflineToken::decode(master_token_file.as_slice())?; - let sdk::offline_token::Data { id, currency, .. } = master_token - .data - .ok_or_else(|| anyhow::anyhow!("missing data in master token"))?; - let cr = c.get_or_insert(currency.clone()); - if cr != ¤cy { - return Err(anyhow::anyhow!("Tokens must have same currency")); - } - Ok(sdk::redeemable_token::TokenInput { - input: id, - value: *value, - }) - }) - .collect::>()?; - let currency = c.ok_or(anyhow::anyhow!("no input tokens found"))?; - let g = libxid::new_generator(); - let token_id = g.new_id()?; - let data = sdk::redeemable_token::Data { - address: base64::decode(to)?, - currency, - id: token_id.to_vec(), - inputs, - }; - let key = if let Some(key_file) = &config.key_file { - utils::load_key_pair(key_file) - } else if let Some(k) = &config.signing_key { - utils::key_pair_from_env(k) - } else { - Err(anyhow::anyhow!("no key giving")) - }?; - let mut token_data_buf = vec![]; - data.encode(&mut token_data_buf)?; - let token = sdk::RedeemableToken { - data: Some(data), - signature: Some(key.sign_payload(&token_data_buf).await?), - }; - let mut token_buf = vec![]; - token.encode(&mut token_buf)?; - let path = format!("./rt-{}.tok", token_id); - fs::write(path, token_buf)?; - Ok(()) +#[derive(Clone, Debug, Subcommand, Serialize, Deserialize)] +pub(crate) enum Redeem { + #[command(alias = "t")] + Token { + #[arg(short, long)] + token: String, + #[arg(short, long)] + account: account::AccountId, + }, } -pub(crate) async fn redeem_token( - file: &str, - account: AccountId, - config: &crate::Config, -) -> anyhow::Result<()> { - let token_file = fs::read(file)?; - let token = sdk::RedeemableToken::decode(token_file.as_slice())?; - let context = Context::new(config)?; - context - .m10_client - .redeem_token(token, account, vec![]) - .await?; - Ok(()) +impl Redeem { + pub(crate) async fn run(&self, context: &Context) -> anyhow::Result<()> { + match self { + Redeem::Token { token, account } => Self::redeem(token, *account, context).await, + } + } + + async fn redeem(file: &str, account: AccountId, context: &Context) -> anyhow::Result<()> { + let token_file = fs::read(file)?; + let token = sdk::RedeemableToken::decode(token_file.as_slice())?; + context + .ledger_client() + .redeem_token(token, account, vec![]) + .await?; + Ok(()) + } } diff --git a/examples/m10_cli/src/commands/top_level_cmds.rs b/examples/m10_cli/src/commands/top_level_cmds.rs index 6aa6daa..113a9d5 100644 --- a/examples/m10_cli/src/commands/top_level_cmds.rs +++ b/examples/m10_cli/src/commands/top_level_cmds.rs @@ -1,338 +1,168 @@ -use super::{ - call::CallSubCommands, convert::ConvertSubCommands, create::CreateSubCommands, - csv::CsvSubcommands, delete::DeleteSubCommands, endorse::EndorsementSubCommands, - find::FindSubCommands, get::GetSubCommands, show::ShowSubCommands, token, - update::UpdateSubCommands, -}; -use crate::commands::observe::ObserveSubcommands; use clap::{Parser, Subcommand}; -use m10_sdk::{account, sdk, Format}; +use m10_sdk::{sdk, Format}; use serde::{Deserialize, Serialize}; +use super::*; +use crate::context::Context; + #[derive(Clone, Subcommand, Debug, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] -#[clap(about)] pub(crate) enum Commands { + /// Authenticate + #[command(alias = "a")] + Auth(auth::Auth), + /// Convert ids + #[command(alias = "cv")] + Convert { + #[command(subcommand)] + cmd: convert::Convert, + }, /// Create various items, on and off the ledger - #[clap(alias = "c")] - Create(CreateOptions), - /// Get an item by id - #[clap(alias = "g")] - Get(GetOptions), - /// Find items by field(s) - #[clap(aliases = &["l", "list", "find-by", "by"])] - Find(FindOptions), - /// Update item field(s) - #[clap(alias = "u")] - Update(UpdateOptions), + #[command(alias = "c")] + Create { + #[command(subcommand)] + #[serde(flatten)] + cmd: create::Create, + }, /// Delete an item - #[clap(alias = "d")] - Delete(DeleteOptions), - /// Call to ledger-api - #[clap(alias = "r")] - Call(CallOptions), - /// Run a migration or batch query file - #[clap(alias = "f")] - File(super::batch::BatchOptions), - /// Convert data - #[clap(subcommand)] - Convert(ConvertSubCommands), - /// Display items - #[clap(aliases = &["s", "display"])] - Show(ShowOptions), + #[command(alias = "d")] + Delete { + #[command(subcommand)] + #[serde(flatten)] + cmd: delete::Delete, + }, /// Endorse items - #[clap(alias = "e")] - Endorse(EndorsementOptions), - /// Observe changes - #[clap(alias = "o")] - Observe(ObserveOptions), - /// Authenticate - Auth(AuthOptions), - /// Get data in csv format - Csv(CsvOptions), - #[clap(alias = "v")] - Verify { - #[clap(subcommand)] - cmd: Verify, + #[command(alias = "e")] + Endorse { + #[command(subcommand)] + cmd: endorse::Endorse, + }, + /// Find items by field(s) + #[command(aliases = &["f", "l", "list", "find-by", "by"])] + Find { + #[command(subcommand)] + #[serde(flatten)] + cmd: find::Find, }, - #[clap(alias = "i")] + /// Get an item by id + #[command(alias = "g")] + Get { + #[command(subcommand)] + #[serde(flatten)] + cmd: get::Get, + }, + /// Invoke action + #[command(alias = "i")] + Invoke { + #[command(subcommand)] + cmd: invoke::Invoke, + }, + /// Issue a token + #[command(alias = "it")] Issue { - #[clap(subcommand)] - cmd: Issue, + #[command(subcommand)] + cmd: token::Issue, }, - #[clap(alias = "rt")] + /// Observe changes + #[command(alias = "o")] + Observe { + #[command(subcommand)] + cmd: observe::Observe, + }, + /// redeem a token + #[command(alias = "rt")] Redeem { - #[clap(subcommand)] - cmd: Redeem, + #[command(subcommand)] + cmd: token::Redeem, }, -} - -#[derive(Clone, Parser, Debug, Serialize, Deserialize)] -pub(crate) struct CallOptions { - #[clap(subcommand)] - #[serde(flatten)] - cmd: CallSubCommands, -} - -impl CallOptions { - async fn run(&self, config: &crate::Config) -> anyhow::Result<()> { - self.cmd.call(config).await - } -} - -#[derive(Clone, Parser, Debug, Serialize, Deserialize)] -pub(crate) struct CreateOptions { - #[clap(subcommand)] - #[serde(flatten)] - cmd: CreateSubCommands, -} - -impl CreateOptions { - async fn run(&self, config: &crate::Config) -> anyhow::Result<()> { - self.cmd.create(config).await - } - - async fn create_operation( - &self, - config: &crate::Config, - ) -> Result { - self.cmd.create_operation(config).await - } -} - -#[derive(Clone, Parser, Debug, Serialize, Deserialize)] -pub(crate) struct GetOptions { - #[clap(subcommand)] - #[serde(flatten)] - cmd: GetSubCommands, -} - -impl GetOptions { - async fn run(&self, config: &crate::Config) -> anyhow::Result<()> { - self.cmd.get(config).await - } -} - -#[derive(Clone, Parser, Debug, Serialize, Deserialize)] -pub(crate) struct FindOptions { - #[clap(subcommand)] - #[serde(flatten)] - cmd: FindSubCommands, -} - -impl FindOptions { - async fn run(&self, config: &crate::Config) -> anyhow::Result<()> { - self.cmd.find(config).await - } -} - -#[derive(Clone, Parser, Debug, Serialize, Deserialize)] -pub(crate) struct UpdateOptions { - #[clap(subcommand)] - #[serde(flatten)] - cmd: UpdateSubCommands, -} - -impl UpdateOptions { - async fn run(&self, config: &crate::Config) -> anyhow::Result<()> { - self.cmd.update(config).await - } - - async fn update_operation(&self) -> Result { - self.cmd.update_operation().await - } -} - -#[derive(Clone, Parser, Debug, Serialize, Deserialize)] -pub(crate) struct DeleteOptions { - #[clap(subcommand)] - #[serde(flatten)] - cmd: DeleteSubCommands, -} - -impl DeleteOptions { - async fn run(&self, config: &crate::Config) -> anyhow::Result<()> { - self.cmd.delete(config).await - } - - fn delete_operation(&self) -> sdk::Operation { - self.cmd.delete_operation() - } -} - -#[derive(Clone, Parser, Debug, Serialize, Deserialize)] -#[clap(about)] -pub(crate) struct ShowOptions { - #[clap(subcommand)] - #[serde(flatten)] - cmd: ShowSubCommands, - /// Set output format (one of 'json', 'yaml', 'raw') - #[clap(short = 'f', long, default_value_t)] - format: Format, -} - -impl ShowOptions { - async fn run(&self, _config: &crate::Config) -> anyhow::Result<()> { - self.cmd.show(self.format).await - } -} - -#[derive(Clone, Parser, Debug, Serialize, Deserialize)] -pub(crate) struct EndorsementOptions { - #[clap(subcommand)] - #[serde(flatten)] - cmd: EndorsementSubCommands, -} - -impl EndorsementOptions { - async fn run(&self, config: &crate::Config) -> anyhow::Result<()> { - self.cmd.endorse(config).await - } -} - -#[derive(Clone, Parser, Debug, Serialize, Deserialize)] -pub(crate) struct ObserveOptions { - #[clap(subcommand)] - #[serde(flatten)] - cmd: ObserveSubcommands, -} - -impl ObserveOptions { - async fn run(&self, config: &crate::Config) -> anyhow::Result<()> { - self.cmd.observe(config).await - } -} - -#[derive(Clone, Parser, Debug, Serialize, Deserialize)] -/// Obtains OAuth id and access token and writes them to -/// id.token -/// access.token -pub(crate) struct AuthOptions { - #[clap(long)] - pub(crate) username: Option, - #[clap(long)] - pub(crate) password: Option, - /// Writes access token to stdout - #[clap(long)] - pub(crate) stdout: bool, -} - -#[derive(Clone, Parser, Debug, Serialize, Deserialize)] -pub(crate) struct CsvOptions { - #[clap(subcommand)] - #[serde(flatten)] - cmd: CsvSubcommands, -} - -impl CsvOptions { - async fn run(&self, config: &crate::Config) -> anyhow::Result<()> { - self.cmd.csv(config).await - } -} - -#[derive(Clone, Debug, Subcommand, Serialize, Deserialize)] -pub(crate) enum Verify { - #[clap(alias = "o")] - OfflineToken { - #[clap(short, long)] + /// Run a migration or batch query file + #[command(alias = "r")] + Run { + /// Set batch file location file: String, + /// If set only parses the files without sending any request + #[arg(long, alias = "dr", global = true)] + dry_run: bool, + #[command(subcommand)] + cmd: batch::Run, }, - #[clap(alias = "r")] - RedeemableToken { - #[clap(short, long)] - master: String, - #[clap(short, long)] - file: String, + /// Display items + #[command(aliases = &["s", "display"])] + Show { + /// Set output format (one of 'json', 'yaml', 'raw') + #[arg(short, long, default_value_t)] + format: Format, + #[command(subcommand)] + cmd: show::Show, }, -} - -impl Verify { - fn run(&self) -> anyhow::Result<()> { - match self { - Verify::OfflineToken { file } => token::verify_offline(file), - Verify::RedeemableToken { master, file } => token::verify_redeemable(master, file), - } - } -} - -#[derive(Clone, Debug, Subcommand, Serialize, Deserialize)] -pub(crate) enum Issue { - #[clap(alias = "t")] - Token { - #[clap(short, long)] - from: Vec, - #[clap(short, long)] - values: Vec, - #[clap(short, long)] - to: String, + /// Update item field(s) + #[command(alias = "u")] + Update { + #[command(subcommand)] + #[serde(flatten)] + cmd: update::Update, }, + /// Verify a token + #[command(alias = "vt")] + Verify { + #[command(subcommand)] + cmd: token::Verify, + }, + /// Get data in csv format + Csv(CsvArgs), } -impl Issue { - async fn run(&self, config: &crate::Config) -> anyhow::Result<()> { - match self { - Issue::Token { from, values, to } => token::issue_token(from, values, to, config).await, - } - } -} - -#[derive(Clone, Debug, Subcommand, Serialize, Deserialize)] -pub(crate) enum Redeem { - #[clap(alias = "t")] - Token { - #[clap(short, long)] - token: String, - #[clap(short, long)] - account: account::AccountId, - }, +#[derive(Clone, Parser, Debug, Serialize, Deserialize)] +pub(crate) struct CsvArgs { + #[clap(subcommand)] + #[serde(flatten)] + cmd: csv::CsvSubcommands, } -impl Redeem { - async fn run(&self, config: &crate::Config) -> anyhow::Result<()> { - match self { - Redeem::Token { token, account } => token::redeem_token(token, *account, config).await, - } +impl CsvArgs { + async fn run(&self, context: &Context) -> anyhow::Result<()> { + self.cmd.csv(context).await } } impl Commands { - pub(crate) async fn run(&self, config: &crate::Config) -> anyhow::Result<()> { + pub(crate) async fn run(self, context: &Context) -> anyhow::Result<()> { match self { - Commands::Create(op) => op.run(config).await, - Commands::Get(op) => op.run(config).await, - Commands::Find(op) => op.run(config).await, - Commands::Update(op) => op.run(config).await, - Commands::Delete(op) => op.run(config).await, - Commands::Call(op) => op.run(config).await, - Commands::Convert(op) => op.convert(), - Commands::File(op) => op.run(config).await, - Commands::Show(op) => op.run(config).await, - Commands::Endorse(op) => op.run(config).await, - Commands::Observe(op) => op.run(config).await, - Commands::Auth(op) => op.run(config).await, - Commands::Csv(op) => op.run(config).await, + Commands::Auth(cmd) => cmd.run(context).await, + Commands::Convert { cmd } => cmd.convert(), + Commands::Create { cmd } => cmd.run(context).await, + Commands::Delete { cmd } => cmd.run(context).await, + Commands::Endorse { cmd } => cmd.run(context).await, + Commands::Find { cmd } => cmd.run(context).await, + Commands::Get { cmd } => cmd.run(context).await, + Commands::Invoke { cmd } => cmd.run(context).await, + Commands::Issue { cmd } => cmd.run(context).await, + Commands::Observe { cmd } => cmd.run(context).await, + Commands::Redeem { cmd } => cmd.run(context).await, + Commands::Run { cmd, file, dry_run } => cmd.run(file, dry_run, context).await, + Commands::Show { format, cmd } => cmd.run(format).await, + Commands::Update { cmd } => cmd.run(context).await, Commands::Verify { cmd } => cmd.run(), - Commands::Issue { cmd } => cmd.run(config).await, - Commands::Redeem { cmd } => cmd.run(config).await, + Commands::Csv(op) => op.run(context).await, } } pub(super) async fn document_operation( - &self, - config: &crate::Config, + self, + context: &Context, ) -> Result { match self { - Commands::Create(op) => op.create_operation(config).await, - Commands::Update(op) => op.update_operation().await, - Commands::Delete(op) => Ok(op.delete_operation()), + Commands::Create { cmd } => cmd.document_operation(context).await, + Commands::Update { cmd } => cmd.document_operation().await, + Commands::Delete { cmd } => Ok(cmd.operation()), _ => Err(anyhow::anyhow!("non CUD command in batch {:?}", self)), } } - pub(super) async fn handle_batch(&self, config: &crate::Config) -> anyhow::Result<()> { + pub(super) async fn handle_batch(self, context: &Context) -> anyhow::Result<()> { match self { - Commands::Get(op) => op.run(config).await?, - Commands::Find(op) => op.run(config).await?, + Commands::Get { cmd } => cmd.run(context).await?, + Commands::Find { cmd } => cmd.run(context).await?, _ => { return Err(anyhow::anyhow!( "non Get/Find/Query command in batch {:?}", @@ -346,17 +176,17 @@ impl Commands { pub(super) fn dry_run(&self, migration: bool) -> anyhow::Result<()> { if migration { match self { - Commands::Create(op) => println!("creating: {:#?}", op), - Commands::Update(op) => println!("updating: {:#?}", op), - Commands::Delete(op) => println!("deleting: {:#?}", op), + Commands::Create { cmd } => println!("creating: {:#?}", cmd), + Commands::Update { cmd } => println!("updating: {:#?}", cmd), + Commands::Delete { cmd } => println!("deleting: {:#?}", cmd), _ => { return Err(anyhow::anyhow!("non CUD command in batch {:?}", self)); } } } else { match self { - Commands::Get(op) => println!("getting: {:#?}", op), - Commands::Find(op) => println!("finding: {:#?}", op), + Commands::Get { cmd } => println!("getting: {:#?}", cmd), + Commands::Find { cmd } => println!("finding: {:#?}", cmd), _ => { return Err(anyhow::anyhow!( "non Get/Find/Query command in batch {:?}", diff --git a/examples/m10_cli/src/commands/update/account_sets.rs b/examples/m10_cli/src/commands/update/account_sets.rs index fdc3c31..0f4e896 100644 --- a/examples/m10_cli/src/commands/update/account_sets.rs +++ b/examples/m10_cli/src/commands/update/account_sets.rs @@ -1,32 +1,26 @@ -use clap::Parser; -use m10_sdk::sdk; -use m10_sdk::DocumentUpdate; +use clap::Args; +use m10_sdk::{sdk, DocumentUpdate}; use serde::{Deserialize, Serialize}; -use std::fmt::Debug; use uuid::Uuid; -#[derive(Clone, Parser, Debug, Serialize, Deserialize)] -#[clap(about)] -pub(crate) struct UpdateAccountSetOptions { +#[derive(Clone, Args, Debug, Serialize, Deserialize)] +pub(crate) struct UpdateAccountSetArgs { /// Record id pub(super) id: Uuid, /// Add accounts - #[clap(short, long, multiple_values = true)] + #[arg(short, long)] accounts: Option>, /// Update owner field - #[clap(short, long)] + #[arg(short, long)] owner: Option, } -impl super::BuildFromOptions for UpdateAccountSetOptions { +impl super::BuildFromArgs for UpdateAccountSetArgs { type Document = sdk::AccountSet; - fn build_from_options( - &self, - builder: &mut DocumentUpdate, - ) -> anyhow::Result<()> { - if let Some(accounts) = &self.accounts { - builder.accounts(accounts.clone()); + fn build_from_args(self, builder: &mut DocumentUpdate) -> anyhow::Result<()> { + if let Some(accounts) = self.accounts { + builder.accounts(accounts); } if let Some(owner) = &self.owner { let owner_key = base64::decode(owner)?; diff --git a/examples/m10_cli/src/commands/update/accounts.rs b/examples/m10_cli/src/commands/update/accounts.rs index d22fbdd..ae84248 100644 --- a/examples/m10_cli/src/commands/update/accounts.rs +++ b/examples/m10_cli/src/commands/update/accounts.rs @@ -1,48 +1,42 @@ -use clap::Parser; -use m10_sdk::sdk; -use m10_sdk::DocumentUpdate; +use clap::Args; +use m10_sdk::{sdk, DocumentUpdate}; use serde::{Deserialize, Serialize}; -use std::fmt::Debug; use uuid::Uuid; -#[derive(Clone, Parser, Debug, Serialize, Deserialize)] -#[clap(about)] -pub(crate) struct UpdateAccountOptions { +#[derive(Clone, Args, Debug, Serialize, Deserialize)] +pub(crate) struct UpdateAccountArgs { /// Record id pub(super) id: Uuid, /// Update owner field - #[clap(short, long)] + #[arg(short, long)] owner: Option, /// Update account name - #[clap(short, long)] + #[arg(short, long)] name: Option, /// Update sender name - #[clap(short, long)] + #[arg(long, alias = "pn")] public_name: Option, /// Update profile image url - #[clap(long)] + #[arg(long, aliases = ["image", "pi"])] profile_image_url: Option, } -impl super::BuildFromOptions for UpdateAccountOptions { +impl super::BuildFromArgs for UpdateAccountArgs { type Document = sdk::AccountMetadata; - fn build_from_options( - &self, - builder: &mut DocumentUpdate, - ) -> anyhow::Result<()> { + fn build_from_args(self, builder: &mut DocumentUpdate) -> anyhow::Result<()> { if let Some(owner) = &self.owner { let owner_key = base64::decode(owner)?; builder.owner(owner_key); } - if let Some(name) = &self.name { - builder.name(name.into()); + if let Some(name) = self.name { + builder.name(name); } - if let Some(public_name) = &self.public_name { - builder.public_name(public_name.into()); + if let Some(public_name) = self.public_name { + builder.public_name(public_name); } - if let Some(profile_image_url) = &self.profile_image_url { - builder.profile_image_url(profile_image_url.to_string()); + if let Some(profile_image_url) = self.profile_image_url { + builder.profile_image_url(profile_image_url); } Ok(()) diff --git a/examples/m10_cli/src/commands/update/banks.rs b/examples/m10_cli/src/commands/update/banks.rs index b3261b3..e8b4ac0 100644 --- a/examples/m10_cli/src/commands/update/banks.rs +++ b/examples/m10_cli/src/commands/update/banks.rs @@ -1,50 +1,45 @@ -use crate::commands::create::banks::BankAccountRefOptions; -use clap::Parser; -use m10_sdk::sdk; -use m10_sdk::DocumentUpdate; +use clap::Args; +use m10_sdk::{sdk, DocumentUpdate}; use serde::{Deserialize, Serialize}; -use std::fmt::Debug; use uuid::Uuid; -#[derive(Clone, Parser, Debug, Serialize, Deserialize)] -#[clap(about)] -pub(crate) struct UpdateBankOptions { +use crate::commands::create::banks::BankAccountRefArgs; + +#[derive(Clone, Args, Debug, Serialize, Deserialize)] +pub(crate) struct UpdateBankArgs { pub(super) id: Uuid, /// Set owner of the account record - #[clap(short, long)] + #[arg(short, long)] owner: Option, /// Set an bank name - #[clap(short, long)] + #[arg(long, aliases = ["name", "sn"])] short_name: Option, /// Set a name to be shown in transfers as sender - #[clap(short, long)] + #[arg(short, long, alias = "dn")] display_name: Option, /// Set account refs associated with a bank - #[clap(short, long, required = false, parse(try_from_str = BankAccountRefOptions::parse))] - accounts: Vec, + #[arg(short, long, required = false)] + accounts: Vec, } -impl super::BuildFromOptions for UpdateBankOptions { +impl super::BuildFromArgs for UpdateBankArgs { type Document = sdk::Bank; - fn build_from_options( - &self, - builder: &mut DocumentUpdate, - ) -> anyhow::Result<()> { + fn build_from_args(self, builder: &mut DocumentUpdate) -> anyhow::Result<()> { if let Some(owner) = &self.owner { let owner_key = base64::decode(owner)?; builder.owner(owner_key); } - if let Some(name) = &self.short_name { - builder.short_name(name.into()); + if let Some(name) = self.short_name { + builder.short_name(name); } - if let Some(name) = &self.display_name { - builder.display_name(name.into()); + if let Some(name) = self.display_name { + builder.display_name(name); } if !self.accounts.is_empty() { builder.accounts( self.accounts .iter() - .map(BankAccountRefOptions::to_bank_account_ref) + .map(BankAccountRefArgs::to_bank_account_ref) .collect::>()?, ); } diff --git a/examples/m10_cli/src/commands/update/ledger_accounts.rs b/examples/m10_cli/src/commands/update/ledger_accounts.rs index 54c39b4..6f5c506 100644 --- a/examples/m10_cli/src/commands/update/ledger_accounts.rs +++ b/examples/m10_cli/src/commands/update/ledger_accounts.rs @@ -1,57 +1,54 @@ -use crate::context::Context; -use clap::{ArgGroup, Parser}; +use clap::{ArgGroup, Args}; use m10_sdk::account::AccountId; use serde::{Deserialize, Serialize}; -use std::fmt::Debug; -#[derive(Clone, Parser, Debug, Serialize, Deserialize)] -#[clap(group = ArgGroup::new("instrument").requires_all(&["code", "decimals"]).multiple(true), about)] -pub(crate) struct UpdateLedgerAccountOptions { +use crate::context::Context; + +#[derive(Clone, Args, Debug, Serialize, Deserialize)] +#[clap(group = ArgGroup::new("instrument").requires_all(&["code", "decimals"]).multiple(true))] +pub(crate) struct UpdateLedgerAccountArgs { /// Account id id: AccountId, /// Update freeze state - #[clap(short, long)] + #[arg(short, long)] freeze: Option, /// Currency code - #[clap(short, long, group = "instrument")] + #[arg(long, aliases = ["currency", "symbol", "cs", "cc"], group = "instrument")] code: Option, /// Number of relevant currency decimals - #[clap(short, long, group = "instrument")] + #[arg(short, long, group = "instrument")] decimals: Option, /// Currency description - #[clap(long, group = "instrument")] + #[arg(long, alias = "desc", group = "instrument")] description: Option, /// Holding balance limit + #[arg(short = 'l', long, aliases = ["limit", "hl"])] holding_limit: Option, } -impl UpdateLedgerAccountOptions { - pub(super) async fn update(&self, config: &crate::Config) -> anyhow::Result<()> { - let context = Context::new(config)?; - +impl UpdateLedgerAccountArgs { + pub(super) async fn update(self, context: &Context) -> anyhow::Result<()> { + let client = context.ledger_client(); if let Some(frozen) = self.freeze { - context - .m10_client - .freeze_account(self.id, frozen, config.context_id.clone()) + client + .freeze_account(self.id, frozen, context.context_id()) .await?; } if let Some(limit) = self.holding_limit { - context - .m10_client - .set_account_limit(self.id, limit, config.context_id.clone()) + client + .set_account_limit(self.id, limit, context.context_id()) .await?; } - if let Some(code) = self.code.clone() { - context - .m10_client + if let Some(code) = self.code { + client .set_account_instrument( self.id, code, self.decimals.unwrap(), - self.description.clone(), - config.context_id.clone(), + self.description, + context.context_id(), ) .await?; } diff --git a/examples/m10_cli/src/commands/update/mod.rs b/examples/m10_cli/src/commands/update/mod.rs index 6675770..8c80118 100644 --- a/examples/m10_cli/src/commands/update/mod.rs +++ b/examples/m10_cli/src/commands/update/mod.rs @@ -1,11 +1,10 @@ -use crate::context::Context; -use clap::Parser; -use m10_sdk::{prost::Message, sdk, Pack}; -use m10_sdk::{DocumentBuilder, DocumentUpdate, WithContext}; +use clap::Subcommand; +use m10_sdk::{prost::Message, sdk, DocumentBuilder, DocumentUpdate, Pack, WithContext}; use serde::{Deserialize, Serialize}; -use std::fmt::Debug; use uuid::Uuid; +use crate::context::Context; + mod account_sets; mod accounts; mod banks; @@ -14,91 +13,89 @@ mod role_bindings; mod roles; mod transfer; -#[derive(Clone, Parser, Debug, Serialize, Deserialize)] +#[derive(Clone, Subcommand, Debug, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] -#[clap(about)] -pub(super) enum UpdateSubCommands { +pub(crate) enum Update { /// Update account record - Account(accounts::UpdateAccountOptions), + #[command(alias = "a")] + Account(accounts::UpdateAccountArgs), /// Update account set record - AccountSet(account_sets::UpdateAccountSetOptions), + #[command(alias = "as")] + AccountSet(account_sets::UpdateAccountSetArgs), /// Update bank record - Bank(banks::UpdateBankOptions), + #[command(alias = "b")] + Bank(banks::UpdateBankArgs), /// Update ledger account - LedgerAccount(ledger_accounts::UpdateLedgerAccountOptions), + #[command(alias = "la")] + LedgerAccount(ledger_accounts::UpdateLedgerAccountArgs), /// Update role record - Role(roles::UpdateRoleOptions), + #[command(alias = "r")] + Role(roles::UpdateRoleArgs), /// Update role binding record - RoleBinding(role_bindings::UpdateRoleBindingOptions), + #[command(alias = "rb")] + RoleBinding(role_bindings::UpdateRoleBindingArgs), /// Update transfer status - Transfer(transfer::UpdateTransferOptions), + #[command(alias = "t")] + Transfer(transfer::UpdateTransferArgs), } -impl UpdateSubCommands { - pub(super) async fn update(&self, config: &crate::Config) -> anyhow::Result<()> { +impl Update { + pub(super) async fn run(self, context: &Context) -> anyhow::Result<()> { match self { - UpdateSubCommands::Account(options) => store_update(options.id, options, config).await, - UpdateSubCommands::AccountSet(options) => { - store_update(options.id, options, config).await - } - UpdateSubCommands::Bank(options) => store_update(options.id, options, config).await, - UpdateSubCommands::LedgerAccount(options) => options.update(config).await, - UpdateSubCommands::Role(options) => store_update(options.id, options, config).await, - UpdateSubCommands::RoleBinding(options) => { - store_update(options.id, options, config).await - } - UpdateSubCommands::Transfer(options) => options.do_update(config).await, + Update::Account(args) => store_update(args.id, args, context).await, + Update::AccountSet(args) => store_update(args.id, args, context).await, + Update::Bank(args) => store_update(args.id, args, context).await, + Update::LedgerAccount(args) => args.update(context).await, + Update::Role(args) => store_update(args.id, args, context).await, + Update::RoleBinding(args) => store_update(args.id, args, context).await, + Update::Transfer(args) => args.do_update(context).await, } } - pub(super) async fn update_operation(&self) -> Result { + pub(super) async fn document_operation(self) -> Result { match self { - UpdateSubCommands::Account(options) => update_operation(options.id, options), - UpdateSubCommands::AccountSet(options) => update_operation(options.id, options), - UpdateSubCommands::Bank(options) => update_operation(options.id, options), - UpdateSubCommands::Role(options) => update_operation(options.id, options), - UpdateSubCommands::RoleBinding(options) => update_operation(options.id, options), + Update::Account(args) => update_operation(args.id, args), + Update::AccountSet(args) => update_operation(args.id, args), + Update::Bank(args) => update_operation(args.id, args), + Update::Role(args) => update_operation(args.id, args), + Update::RoleBinding(args) => update_operation(args.id, args), _ => Err(anyhow::anyhow!("Not supported")), } } } -trait BuildFromOptions { +trait BuildFromArgs { type Document; - fn build_from_options( - &self, - builder: &mut DocumentUpdate, - ) -> anyhow::Result<()>; + fn build_from_args(self, builder: &mut DocumentUpdate) -> anyhow::Result<()>; } -async fn store_update(id: Uuid, options: &O, config: &crate::Config) -> anyhow::Result<()> +async fn store_update(id: Uuid, args: O, context: &Context) -> anyhow::Result<()> where - O: BuildFromOptions, + O: BuildFromArgs, M: Message + Pack + Default, { - let context = Context::new(config)?; let mut builder = DocumentUpdate::::new(id); - options.build_from_options(&mut builder)?; - context - .m10_client - .documents( - DocumentBuilder::default() - .update(&builder) - .context_id(config.context_id.clone()), - ) - .await?; + args.build_from_args(&mut builder)?; + + m10_sdk::documents( + context.ledger_client(), + DocumentBuilder::default() + .update(&builder) + .context_id(context.context_id()), + ) + .await?; Ok(()) } -fn update_operation(id: Uuid, options: &O) -> Result +fn update_operation(id: Uuid, args: O) -> Result where - O: BuildFromOptions, + O: BuildFromArgs, M: Message + Pack + Default, { let mut builder = DocumentUpdate::::new(id); - options.build_from_options(&mut builder)?; + args.build_from_args(&mut builder)?; Ok(builder.operation()) } diff --git a/examples/m10_cli/src/commands/update/role_bindings.rs b/examples/m10_cli/src/commands/update/role_bindings.rs index 4c2d6b3..4aca3a3 100644 --- a/examples/m10_cli/src/commands/update/role_bindings.rs +++ b/examples/m10_cli/src/commands/update/role_bindings.rs @@ -1,64 +1,57 @@ -use clap::Parser; -use m10_sdk::DocumentUpdate; -use m10_sdk::{prost::bytes::Bytes, sdk}; +use clap::Args; +use m10_sdk::{prost::bytes::Bytes, sdk, DocumentUpdate}; use serde::{Deserialize, Serialize}; -use std::{collections::HashMap, fmt::Debug}; use uuid::Uuid; -#[derive(Clone, Parser, Debug, Serialize, Deserialize)] -#[clap(about)] -pub(crate) struct UpdateRoleBindingOptions { +use crate::collections::role_bindings::Expression; + +#[derive(Clone, Args, Debug, Serialize, Deserialize)] +pub(crate) struct UpdateRoleBindingArgs { /// Record id pub(super) id: Uuid, /// Update name field - #[clap(short, long)] + #[arg(short, long)] name: Option, /// Update owner field - #[clap(short, long)] + #[arg(short, long)] owner: Option, /// Update role link - #[clap(short, long)] + #[arg(short, long)] role: Option, /// Add subjects - #[clap(short, long, multiple_values = true)] + #[arg(long, alias = "subjs")] subjects: Option>, /// Update guard expression - #[clap(short, long, multiple_values = true, parse(try_from_str = parse_key_vals))] - expressions: Option>, -} - -fn parse_key_vals(s: &str) -> Result, serde_json::Error> { - serde_json::from_str(s) + #[clap(short, long, alias = "exps")] + expressions: Option, } -impl super::BuildFromOptions for UpdateRoleBindingOptions { +impl super::BuildFromArgs for UpdateRoleBindingArgs { type Document = sdk::RoleBinding; - fn build_from_options( - &self, - builder: &mut DocumentUpdate, - ) -> anyhow::Result<()> { + fn build_from_args(self, builder: &mut DocumentUpdate) -> anyhow::Result<()> { if let Some(owner) = &self.owner { let owner_key = base64::decode(owner)?; builder.owner(Bytes::from(owner_key)); } - if let Some(name) = &self.name { - builder.name(name.into()); + if let Some(name) = self.name { + builder.name(name); } - if let Some(subjects) = &self.subjects { + if let Some(subjects) = self.subjects { let subjects = subjects .iter() .map(base64::decode) .collect::>, _>>()?; builder.subjects(subjects); } - if let Some(expressions) = &self.expressions { + if let Some(expressions) = self.expressions { builder.expressions( expressions - .iter() + .0 + .into_iter() .map(|(collection, expression)| sdk::Expression { - collection: collection.clone(), - expression: expression.clone(), + collection, + expression, }) .collect(), ); diff --git a/examples/m10_cli/src/commands/update/roles.rs b/examples/m10_cli/src/commands/update/roles.rs index 6d25458..064c363 100644 --- a/examples/m10_cli/src/commands/update/roles.rs +++ b/examples/m10_cli/src/commands/update/roles.rs @@ -1,40 +1,35 @@ -use crate::collections::roles::RuleOptions; -use clap::Parser; -use m10_sdk::DocumentUpdate; -use m10_sdk::{prost::bytes::Bytes, sdk}; +use clap::Args; +use m10_sdk::{prost::bytes::Bytes, sdk, DocumentUpdate}; use serde::{Deserialize, Serialize}; -use std::fmt::Debug; use uuid::Uuid; -#[derive(Clone, Parser, Debug, Serialize, Deserialize)] -#[clap(about)] -pub(crate) struct UpdateRoleOptions { +use crate::collections::roles::RuleArgs; + +#[derive(Clone, Args, Debug, Serialize, Deserialize)] +pub(crate) struct UpdateRoleArgs { /// Record id pub(super) id: Uuid, /// Update name field - #[clap(short, long)] + #[arg(short, long)] name: Option, /// Update owner field - #[clap(short, long)] + #[arg(short, long)] owner: Option, /// Add rule (1..N) - #[clap(short, long, required = true, parse(try_from_str = RuleOptions::parse))] - rule: Vec, + #[arg(short, long, required = true)] + rule: Vec, } -impl super::BuildFromOptions for UpdateRoleOptions { +impl super::BuildFromArgs for UpdateRoleArgs { type Document = sdk::Role; - fn build_from_options( - &self, - builder: &mut DocumentUpdate, - ) -> anyhow::Result<()> { + fn build_from_args(self, builder: &mut DocumentUpdate) -> anyhow::Result<()> { if let Some(owner) = &self.owner { let owner_key = base64::decode(owner)?; builder.owner(Bytes::from(owner_key)); } - if let Some(name) = &self.name { - builder.name(name.into()); + if let Some(name) = self.name { + builder.name(name); } if !self.rule.is_empty() { let rules = self.rule.iter().map(|r| r.to_rbac_rule()).collect(); diff --git a/examples/m10_cli/src/commands/update/transfer.rs b/examples/m10_cli/src/commands/update/transfer.rs index bfe0f3a..0ac6e02 100644 --- a/examples/m10_cli/src/commands/update/transfer.rs +++ b/examples/m10_cli/src/commands/update/transfer.rs @@ -1,17 +1,16 @@ -use crate::context::Context; -use crate::Config; -use clap::Parser; +use clap::Args; use m10_sdk::sdk; use serde::{Deserialize, Serialize}; -#[derive(Clone, Parser, Debug, Serialize, Deserialize)] -#[clap(about)] -pub(crate) struct UpdateTransferOptions { +use crate::context::Context; + +#[derive(Clone, Args, Debug, Serialize, Deserialize)] +pub(crate) struct UpdateTransferArgs { /// Transfer id - #[clap(short, long, action)] + #[arg(short, long)] pub(super) id: u64, /// New state - #[clap(short, long, value_enum, action)] + #[arg(long, value_enum, alias = "state")] pub(super) state: TransferState, } @@ -30,18 +29,17 @@ impl From for sdk::transaction::commit_transfer::TransferState { } } -impl UpdateTransferOptions { - pub async fn do_update(&self, config: &Config) -> anyhow::Result<()> { - let context = Context::new(config)?; +impl UpdateTransferArgs { + pub async fn do_update(&self, context: &Context) -> anyhow::Result<()> { context - .m10_client + .ledger_client() .commit_transfer( self.id, match self.state { TransferState::Accept => true, TransferState::Reject => false, }, - config.context_id.clone(), + context.context_id(), ) .await?; Ok(()) diff --git a/examples/m10_cli/src/config.rs b/examples/m10_cli/src/config.rs new file mode 100644 index 0000000..bfbd57e --- /dev/null +++ b/examples/m10_cli/src/config.rs @@ -0,0 +1,31 @@ +use std::{collections::HashMap, path::Path}; + +pub use config::ConfigError; +use serde::Deserialize; + +#[derive(Debug, Deserialize)] +pub(crate) struct Config { + #[serde(default)] + pub(crate) addr: Option, + #[serde(default)] + pub(crate) key: Option, + #[serde(default)] + pub(crate) profile: HashMap, +} + +#[derive(Debug, Deserialize)] +pub(crate) struct Profile { + pub(crate) key: String, + pub(crate) addr: Option, +} + +impl Config { + pub fn new() -> Result { + let mut config = config::Config::builder(); + let config_files = &["./cli_config.toml"]; + for config_file in config_files { + config = config.add_source(config::File::from(Path::new(config_file)).required(false)); + } + config.build()?.try_deserialize() + } +} diff --git a/examples/m10_cli/src/context.rs b/examples/m10_cli/src/context.rs index c28bf06..957675a 100644 --- a/examples/m10_cli/src/context.rs +++ b/examples/m10_cli/src/context.rs @@ -1,55 +1,211 @@ -use crate::utils::{key_pair_from_env, load_key_pair}; -use m10_sdk::ImageClient; -use m10_sdk::KeyPair; -use m10_sdk::M10Client; -use tonic::transport::{Channel, ClientTlsConfig, Uri}; +#![allow(clippy::unnecessary_fallible_conversions)] +use m10_sdk::{ + directory::directory_service_client::DirectoryServiceClient, GrpcClient, HttpClient, + ImageClient, KeyPair, M10CoreClient, +}; +use std::{cell::OnceCell, fs::File, io::Read, str::FromStr, sync::Arc}; +use tonic::transport::{Channel, ClientTlsConfig, Endpoint, Uri}; + +use crate::config; pub(crate) struct Context { - pub(crate) image_client: ImageClient, - pub(crate) m10_client: M10Client, + context_id: Vec, + endpoint: Option, + ws_endpoint: Option, + signing_key: Option>, + raw_key: Option>, + ledger_client: OnceCell + Send + Sync>>, + http: bool, } impl Context { - pub(crate) fn channel_from_address( - address: &str, - no_tls: bool, - ) -> Result { - let endpoint: Uri = address.parse()?; - let is_local = matches!(endpoint.host(), Some("localhost") | Some("127.0.0.1")); - - let builder = Channel::builder(endpoint) - .keep_alive_while_idle(true) - .http2_keep_alive_interval(std::time::Duration::from_secs(30)); - let builder = if !(no_tls || is_local) { - let tls_config = ClientTlsConfig::new(); - builder.tls_config(tls_config)? - } else { - builder - }; - let channel = builder.connect_lazy()?; - Ok(channel) - } - - pub(crate) fn new(config: &crate::Config) -> anyhow::Result { - let admin = if let Some(key_file) = &config.key_file { - load_key_pair(key_file) - } else if let Some(k) = &config.signing_key { - key_pair_from_env(k) - } else { - Err(anyhow::anyhow!("no key giving")) - }?; - let addr = if config.no_tls { - format!("http://{}", config.server) - } else { - format!("https://{}", config.server) - }; - let channel = Self::channel_from_address(&addr, config.no_tls)?; - let image_client = ImageClient::new(addr); - let m10_client = M10Client::new(admin, channel); + pub(crate) fn new_from_options(options: &super::Opts) -> anyhow::Result { + let config = config::Config::new() + .map_err(|err| { + println!("{err:?}"); + err + }) + .ok(); + + let raw_key = options + .key_file + .as_ref() + .map(|p| load_key(p)) + .transpose()? + .or_else(|| { + config + .as_ref() + .and_then(|c| { + options + .profile + .as_ref() + .and_then(|p| c.profile.get(p).map(|p| p.key.clone())) + .or_else(|| c.key.clone()) + }) + .or_else(|| std::env::var("M10_SIGNING_KEY").ok()) + }); + + let signing_key = raw_key + .as_ref() + .map(|k| Ok::<_, anyhow::Error>(Arc::new(KeyPair::from_str(k)?))) + .transpose()?; + + let endpoint = options + .server + .clone() + .or_else(|| { + config + .as_ref() + .and_then(|c| { + options + .profile + .as_ref() + .and_then(|p| c.profile.get(p).and_then(|p| p.addr.clone())) + .or_else(|| c.addr.clone()) + }) + .or_else(|| std::env::var("M10_APP").ok()) + }) + .map(|a| { + let uri = hyper::http::uri::Builder::new() + .scheme(if options.no_tls { "http" } else { "https" }) + .authority(a.as_str()) + .path_and_query("/") + .build()?; + Ok::<_, anyhow::Error>( + if !options.no_tls { + let tls_config = ClientTlsConfig::new(); + Endpoint::from_str(uri.to_string().as_str())?.tls_config(tls_config)? + } else { + Endpoint::from_str(uri.to_string().as_str())? + } + .keep_alive_while_idle(true) + .http2_keep_alive_interval(std::time::Duration::from_secs(30)), + ) + }) + .transpose()?; + + let ws_endpoint = options + .server + .clone() + .or_else(|| { + config + .as_ref() + .and_then(|c| { + options + .profile + .as_ref() + .and_then(|p| c.profile.get(p).and_then(|p| p.addr.clone())) + .or_else(|| c.addr.clone()) + }) + .or_else(|| std::env::var("M10_APP").ok()) + }) + .map(|a| { + let uri = hyper::http::uri::Builder::new() + .scheme(if options.no_tls { "ws" } else { "wss" }) + .authority(a.as_str()) + .path_and_query("/") + .build()?; + Ok::<_, anyhow::Error>( + if !options.no_tls { + let tls_config = ClientTlsConfig::new(); + Endpoint::from_str(uri.to_string().as_str())?.tls_config(tls_config)? + } else { + Endpoint::from_str(uri.to_string().as_str())? + } + .keep_alive_while_idle(true) + .http2_keep_alive_interval(std::time::Duration::from_secs(30)), + ) + }) + .transpose()?; + + let context_id = options + .context_id + .as_ref() + .map(|i| i.0.clone()) + .unwrap_or_default(); Ok(Self { - image_client, - m10_client, + context_id, + endpoint, + ws_endpoint, + signing_key, + raw_key: raw_key.as_ref().map(base64::decode).transpose()?, + ledger_client: OnceCell::new(), + http: options.http, }) } + + pub(crate) fn context_id(&self) -> Vec { + self.context_id.clone() + } + + pub(crate) fn channel(&self) -> anyhow::Result { + self.endpoint + .clone() + .map(|ep| ep.connect_lazy()) + .transpose()? + .ok_or_else(|| anyhow::anyhow!("server addr missing")) + } + + pub(crate) fn addr(&self) -> anyhow::Result { + self.endpoint + .clone() + .map(|ep| ep.uri().clone()) + .ok_or_else(|| anyhow::anyhow!("server addr missing")) + } + + #[allow(dead_code)] + pub(crate) fn ws_addr(&self) -> anyhow::Result { + self.ws_endpoint + .clone() + .map(|ep| ep.uri().clone()) + .ok_or_else(|| anyhow::anyhow!("server ws addr missing")) + } + + pub(crate) fn signing_key(&self) -> anyhow::Result<&KeyPair> { + Ok(self + .signing_key + .as_ref() + .ok_or_else(|| anyhow::anyhow!("signing key missing"))?) + } + + pub(crate) fn raw_key(&self) -> anyhow::Result> { + self.raw_key + .clone() + .ok_or_else(|| anyhow::anyhow!("signing key missing")) + } + + #[allow(clippy::borrowed_box)] + pub(crate) fn ledger_client(&self) -> &Box + Send + Sync> { + self.ledger_client.get_or_init(|| { + let endpoint = self.endpoint.as_ref().expect("endpoint").clone(); + if self.http { + let ws_endpoint = self.ws_endpoint.as_ref().expect("ws_endpoint").clone(); + Box::new(HttpClient::new( + endpoint, + ws_endpoint, + self.signing_key.clone(), + )) + } else { + Box::new(GrpcClient::new(endpoint, self.signing_key.clone()).expect("grpc client")) + } + }) + } + + pub(crate) fn directory_client(&self) -> anyhow::Result> { + let channel = self.channel()?; + Ok(DirectoryServiceClient::new(channel)) + } + + pub(crate) fn image_client(&self) -> anyhow::Result { + let addr = self.addr()?; + Ok(ImageClient::new(addr.to_string())) + } +} + +fn load_key(path: &str) -> anyhow::Result { + let mut key_file = File::open(path)?; + let mut pkcs8_bytes: Vec = Vec::new(); + key_file.read_to_end(&mut pkcs8_bytes)?; + Ok(base64::encode(&pkcs8_bytes)) } diff --git a/examples/m10_cli/src/main.rs b/examples/m10_cli/src/main.rs index 0bded34..cf6d8e1 100644 --- a/examples/m10_cli/src/main.rs +++ b/examples/m10_cli/src/main.rs @@ -1,97 +1,58 @@ +use core::str::FromStr; + use clap::Parser; -use config::{ConfigError, File, Source, Value}; -use serde::{Deserialize, Serialize}; -use serde_with::serde_as; -use std::collections::HashMap; -use std::path::Path; mod collections; mod commands; +mod config; mod context; mod utils; -#[serde_as] -#[derive(Clone, Parser, Debug, Deserialize)] +#[derive(Clone, Debug)] +struct HexStr(Vec); + +impl FromStr for HexStr { + type Err = anyhow::Error; + fn from_str(value: &str) -> anyhow::Result { + Ok(Self(hex::decode(value)?)) + } +} + +#[derive(Clone, Parser, Debug)] #[clap(about)] pub(crate) struct Opts { - /// Load config file for top level options - #[clap(short, long)] - pub(crate) config: Option, - /// Ledger server address - #[clap(short, long)] + /// Server address + #[arg(global = true, short, long)] pub(crate) server: Option, /// Disable TLS (e.g. for localhost connection) - #[clap(long)] + #[arg(global = true, long)] pub(crate) no_tls: bool, - /// Load key file (pkcs8) used for request signing - #[clap(short, long)] + /// Choose http connection instead of gRPC + #[arg(global = true, long)] + pub(crate) http: bool, + /// Load key from file (pkcs8) + #[arg(global = true, short, long)] pub(crate) key_file: Option, - /// Set context ID filter. Parsed as Hex - #[clap(long)] - pub(crate) context_id: Option, - #[clap(subcommand)] + /// Use a profile from a config file for global options + #[arg(global = true, short, long)] + pub(crate) profile: Option, + /// Set context ID. Parsed as Hex + #[clap(global = true, short, long)] + pub(crate) context_id: Option, + #[command(subcommand)] cmd: commands::Commands, } -impl Source for Opts { - fn clone_into_box(&self) -> Box { - Box::new((*self).clone()) - } - - fn collect(&self) -> Result, ConfigError> { - let mut map: HashMap = HashMap::new(); - if let Some(server) = self.server.as_ref() { - map.insert("server".to_string(), Value::from(server.as_str())); - } - if self.no_tls { - map.insert("no_tls".to_string(), Value::from(self.no_tls)); - } - if let Some(key) = self.key_file.as_ref() { - map.insert("key_file".to_string(), Value::from(key.as_str())); - } - if let Some(context_id) = &self.context_id { - map.insert("context_id".to_string(), Value::from(context_id.as_str())); - } - - Ok(map) - } -} - -#[serde_as] -#[derive(Debug, Deserialize, Serialize)] -pub(crate) struct Config { - pub(crate) server: String, - pub(crate) no_tls: bool, - pub(crate) key_file: Option, - pub(crate) signing_key: Option, - #[serde_as(as = "serde_with::hex::Hex")] - pub(crate) context_id: Vec, -} - -impl Config { - pub fn new(opts: Opts) -> Result { - let mut config = config::Config::new(); - config.set_default("server", "localhost")?; - config.set_default("key_file", std::option::Option::::None)?; - config.set_default("no_tls", false)?; - config.set_default("context_id", String::new())?; - - if let Some(path) = opts.config.as_ref() { - let path = Path::new(path); - if path.exists() { - config.merge(File::from(path))?; - } - } - config.merge(opts)?; - config.merge(config::Environment::with_prefix("M10").ignore_empty(true))?; - config.try_into() - } -} - #[tokio::main] async fn main() -> Result<(), Box> { let opts: Opts = Opts::parse(); - let config = Config::new(opts.clone())?; - opts.cmd.run(&config).await?; + let context = context::Context::new_from_options(&opts)?; + opts.cmd.run(&context).await?; Ok(()) } + +#[test] +fn verify_cli() { + use clap::CommandFactory; + Opts::command().debug_assert() +} diff --git a/examples/m10_cli/src/utils.rs b/examples/m10_cli/src/utils.rs index 98bbd89..18f65fa 100644 --- a/examples/m10_cli/src/utils.rs +++ b/examples/m10_cli/src/utils.rs @@ -1,6 +1,5 @@ use m10_sdk::account::{AccountId, Builder as AccountIdBuilder, LeafAccountIndex, RawAccountIndex}; -use m10_sdk::{sdk::signature::Algorithm, Ed25519, KeyPair, Signer, P256}; -use std::{fs::File, io::Read}; +use m10_sdk::{sdk::signature::Algorithm, Ed25519, Signer, P256}; use std::{path::PathBuf, str::FromStr}; pub(crate) fn m10_config_path() -> PathBuf { @@ -82,13 +81,11 @@ pub(crate) fn vec_from_hex_array(hex_array_str: &str) -> Result, anyhow: if !(trimmed.starts_with('[') && trimmed.ends_with(']')) { return Err(anyhow::anyhow!("not a valid hex array")); } - let stripped = trimmed[1..trimmed.len() - 1] + let parts = trimmed[1..trimmed.len() - 1] .split(',') - .map(|i| i.trim()) - .collect::>(); - let stripped = &stripped.join(""); - - Ok(hex::decode(stripped)?) + .map(|i| Ok(u8::from_str_radix(&i.trim()[2..], 16)?)) + .collect::, anyhow::Error>>()?; + Ok(parts) } pub(crate) fn create_key_pair(key_file: &str, method: Algorithm) -> Result, anyhow::Error> { @@ -118,36 +115,3 @@ pub(crate) fn create_exportable_key_pair(method: Algorithm) -> Result, a } } } - -pub(crate) fn key_pair_from_env(key: &str) -> Result { - let try_key_pair = Ed25519::from_str(key); - if try_key_pair.is_err() { - Ok(KeyPair::P256(P256::from_str(key).map_err(|err| { - anyhow::anyhow!("Could not create key pair from env: {}", err) - })?)) - } else { - Ok(KeyPair::Ed25519(try_key_pair.map_err(|err| { - anyhow::anyhow!("Could not create key pair from env: {}", err) - })?)) - } -} - -pub(crate) fn load_key_pair(path_str: &str) -> Result { - let try_key_pair = Ed25519::load_key_pair(path_str); - if try_key_pair.is_err() { - Ok(KeyPair::P256(P256::load_key_pair(path_str).map_err( - |err| anyhow::anyhow!("Could not load key file: {}", err), - )?)) - } else { - Ok(KeyPair::Ed25519(try_key_pair.map_err(|err| { - anyhow::anyhow!("Could not load key file: {}", err) - })?)) - } -} - -pub(crate) fn load_key_pair_exportable(path_str: &str) -> Result, anyhow::Error> { - let mut key_file = File::open(path_str)?; - let mut pkcs8_bytes: Vec = Vec::new(); - key_file.read_to_end(&mut pkcs8_bytes)?; - Ok(pkcs8_bytes) -} diff --git a/examples/rds-pool/Cargo.toml b/examples/rds-pool/Cargo.toml index 1af67ac..0f8b289 100644 --- a/examples/rds-pool/Cargo.toml +++ b/examples/rds-pool/Cargo.toml @@ -7,7 +7,10 @@ edition = "2021" async-trait = "0.1.52" bb8 = "0.7.1" percent-encoding = "2" -rusoto_credential = "0.47" -rusoto_signature = "0.47" -sqlx-core = { version = "0.5", features = ["runtime-tokio-rustls", "postgres"] } +sqlx-core = { version = "0.6.3", features = ["runtime-tokio-rustls", "postgres"] } url = "2" +reqwest = { version = "0.11.11", features = ["stream"] } +http = "1.0.0" +aws-config = { version = "1.1.2", features = ["behavior-version-latest"] } +aws-sigv4 = "1.1.3" +aws-credential-types = "1.1.3" diff --git a/examples/rds-pool/src/lib.rs b/examples/rds-pool/src/lib.rs index 79386ab..dc5a967 100644 --- a/examples/rds-pool/src/lib.rs +++ b/examples/rds-pool/src/lib.rs @@ -1,8 +1,15 @@ use std::str::FromStr; use std::time::Duration; -use rusoto_credential::{ChainProvider, ProvideAwsCredentials}; -use rusoto_signature::SignedRequest; +use aws_config::Region; +use aws_credential_types::provider::ProvideCredentials; +use aws_sigv4::{ + http_request::{sign, SignableBody, SignableRequest, SigningSettings}, + sign::v4, +}; + +use std::time::SystemTime; + use sqlx_core::connection::Connection; use sqlx_core::postgres::{PgConnectOptions, PgConnection}; @@ -44,29 +51,19 @@ impl bb8::ManageConnection for RdsManager { let host = percent_encoding::percent_decode_str(host) .decode_utf8() .map_err(|err| Error::Configuration(err.into()))?; + let port = "5432"; let username = percent_encoding::percent_decode_str(url.username()) .decode_utf8() .map_err(|err| Error::Configuration(err.into()))?; if host.ends_with("rds.amazonaws.com") { // If RDS, exchange IAM credentials for auth token - let region = host - .split('.') - .nth_back(3) - .expect("region") - .parse() - .unwrap(); - let aws_credentials = ChainProvider::new() - .credentials() + let region = host.split('.').nth_back(3).expect("region").to_string(); + + let auth_token = generate_rds_iam_token(Region::new(region), &host, port, &username) .await - .map_err(|err| Error::Configuration(err.into()))?; - let mut request = SignedRequest::new("GET", "rds-db", ®ion, "/"); - request.set_hostname(Some(format!("{}:5432", host))); - request.add_param("Action", "connect"); - request.add_param("DBUser", &username); - let expires_in = Duration::from_secs(15 * 60); - let presigned_url = request.generate_presigned_url(&aws_credentials, &expires_in, true); - let auth_token = presigned_url.trim_start_matches("https://"); - let connect_options = PgConnectOptions::from_str(&self.url)?.password(auth_token); + .map_err(|_| Error::Configuration("unable to sign".into()))?; + + let connect_options = PgConnectOptions::from_str(&self.url)?.password(&auth_token); PgConnection::connect_with(&connect_options).await } else { PgConnection::connect(&self.url).await @@ -85,3 +82,56 @@ impl bb8::ManageConnection for RdsManager { false } } + +async fn generate_rds_iam_token( + region: Region, + db_hostname: &str, + port: &str, + db_username: &str, +) -> Result> { + let config = aws_config::from_env().region(region).load().await; + + let credentials = config + .credentials_provider() + .expect("no credentials provider found") + .provide_credentials() + .await + .expect("unable to load credentials"); + let identity = credentials.into(); + let region = config.region().unwrap().to_string(); + + let mut signing_settings = SigningSettings::default(); + signing_settings.expires_in = Some(Duration::from_secs(15 * 60)); + signing_settings.signature_location = aws_sigv4::http_request::SignatureLocation::QueryParams; + + let signing_params = v4::SigningParams::builder() + .identity(&identity) + .region(®ion) + .name("rds-db") + .time(SystemTime::now()) + .settings(signing_settings) + .build()?; + + let url = format!( + "https://{db_hostname}:{port}/?Action=connect&DBUser={db_user}", + db_hostname = db_hostname, + port = port, + db_user = db_username + ); + + let signable_request = + SignableRequest::new("GET", &url, std::iter::empty(), SignableBody::Bytes(&[])) + .expect("signable request"); + + let (signing_instructions, _signature) = + sign(signable_request, &signing_params.into())?.into_parts(); + + let mut url = url::Url::parse(&url).unwrap(); + for (name, value) in signing_instructions.params() { + url.query_pairs_mut().append_pair(name, value); + } + + let response = url.to_string().split_off("https://".len()); + + Ok(response) +} diff --git a/flutter/m10_sdk/CHANGELOG.md b/flutter/m10_sdk/CHANGELOG.md index 1db1a5d..e5963c8 100644 --- a/flutter/m10_sdk/CHANGELOG.md +++ b/flutter/m10_sdk/CHANGELOG.md @@ -2,6 +2,6 @@ * Initial release. -## 0.33.0 +## 0.34.0 * ... diff --git a/flutter/m10_sdk/pubspec.yaml b/flutter/m10_sdk/pubspec.yaml index e481b3c..2fdac3e 100644 --- a/flutter/m10_sdk/pubspec.yaml +++ b/flutter/m10_sdk/pubspec.yaml @@ -1,7 +1,7 @@ name: m10_sdk description: This package allows Flutter and Dart applications to interact with the M10 platform. repository: https://github.com/m10io/sdk -version: 0.33.0 +version: 0.34.0 environment: sdk: ">=3.0.0 <4.0.0" diff --git a/node/m10-sdk/package.json b/node/m10-sdk/package.json index f6b8b7b..9a6d1ec 100644 --- a/node/m10-sdk/package.json +++ b/node/m10-sdk/package.json @@ -1,6 +1,6 @@ { "name": "m10-sdk", - "version": "0.33.0", + "version": "0.34.0", "description": "M10 SDK", "repository": { "type": "git", @@ -15,7 +15,7 @@ "main": "out/index.js", "types": "out/index.d.ts", "engines": { - "node": "~16" + "node": "~18" }, "nyc": { "extends": "@istanbuljs/nyc-config-typescript", diff --git a/rust/protos/Cargo.toml b/rust/protos/Cargo.toml index 4853227..173e891 100644 --- a/rust/protos/Cargo.toml +++ b/rust/protos/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "m10-protos" -version = "0.33.0" +version = "0.34.0" authors = ["Sascha Wise ", "Sam De Roeck "] edition = "2021" description = "M10 Protocol Buffers" diff --git a/rust/sdk/Cargo.toml b/rust/sdk/Cargo.toml index 462eb0c..fa170b0 100644 --- a/rust/sdk/Cargo.toml +++ b/rust/sdk/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "m10-sdk" -version = "0.33.0" +version = "0.34.0" authors = ["Michael Wittner ", "Sam De Roeck "] edition = "2021" description = "M10 SDK API" @@ -13,22 +13,27 @@ readme = "README.md" [features] default = ["format", "client", "collections", "service", "image", "contract", "account"] collections = [] -service = ["tonic", "m10-signing", "futures-core", "futures-util", "m10-protos/client"] +service = ["async-trait", "tonic", "m10-signing", "futures-core", "futures-util", "m10-protos/client"] image = ["reqwest"] account = [] contract = ["ring", "thiserror"] -client = ["service"] +client = ["service", "tokio-stream", "tokio", "tokio-tungstenite"] format = ["parse-display", "base64", "hex/default", "serde_json", "serde_yaml", "ron"] [dependencies] bytes = "1" fastrand = "1" hex = { version = "0.4", default-features = false } -m10-protos = { version = "0.33", path = "../protos" } -uuid = { version = "0.8", features = ["serde", "v4"] } +m10-protos = { version = "0.34", path = "../protos" } +uuid = { version = "1.7.0", features = ["serde", "v4"] } serde = { version = "1", features = ["derive"] } serde_with = { version = "1", features = ["hex"] } +# ws client +tokio-stream = { version = "0.1.14", optional = true } +tokio = { version = "1", optional = true } +tokio-tungstenite = { version = "0.21.0", optional = true, features = ["native-tls"] } + # image reqwest = { version = "0.11", default-features = false, features = ["rustls-tls"], optional = true } @@ -37,9 +42,10 @@ thiserror = { version = "1", optional = true } ring = { version = "0.16", features = ["std"], optional = true } # service +async-trait = { version = "0.1", optional = true } futures-core = { version = "0.3", optional = true } futures-util = { version = "0.3", optional = true } -m10-signing = { version = "0.33.0", path = "../signing", optional = true } +m10-signing = { version = "0.34.0", path = "../signing", optional = true } tonic = { version = "0.5", features = ["tls", "tls-roots"], optional = true } # format diff --git a/rust/sdk/src/builders/account.rs b/rust/sdk/src/builders/account.rs index 37fb244..3a852b8 100644 --- a/rust/sdk/src/builders/account.rs +++ b/rust/sdk/src/builders/account.rs @@ -17,6 +17,11 @@ impl AccountFilter { self } + pub fn with_accounts(mut self, ids: Vec) -> Self { + self.accounts.extend(ids.iter()); + self + } + pub fn starting_from(mut self, tx_id: TxId) -> Self { self.starting_from = Some(tx_id); self diff --git a/rust/sdk/src/builders/transfer.rs b/rust/sdk/src/builders/transfer.rs index b3478e5..514de5e 100644 --- a/rust/sdk/src/builders/transfer.rs +++ b/rust/sdk/src/builders/transfer.rs @@ -29,6 +29,11 @@ impl StepBuilder { self } + pub fn any_metadata(mut self, value: Any) -> Self { + self.metadata.push(value); + self + } + pub fn custom_metadata( mut self, type_url: impl Into, diff --git a/rust/sdk/src/client.rs b/rust/sdk/src/client.rs deleted file mode 100644 index d504389..0000000 --- a/rust/sdk/src/client.rs +++ /dev/null @@ -1,656 +0,0 @@ -use crate::account::AccountId; -use crate::builders::*; -use crate::error::{M10Error, M10Result}; -use crate::types::*; -use crate::{DocumentId, LedgerClient}; -use core::clone::Clone; -use core::convert::{Into, TryFrom}; -use futures_core::Stream; -use futures_util::future::try_join_all; -use futures_util::{StreamExt, TryStreamExt}; -use m10_protos::sdk; -use m10_signing::{SignedRequest, Signer}; -use std::sync::Arc; -use uuid::Uuid; - -pub use tonic::transport::Channel; - -pub struct M10Client { - pub client: LedgerClient, - signer: Arc, -} - -impl Clone for M10Client { - fn clone(&self) -> Self { - Self { - client: self.client.clone(), - signer: self.signer.clone(), - } - } -} - -impl M10Client { - pub fn new(signer: S, channel: Channel) -> Self { - Self { - signer: Arc::new(signer), - client: LedgerClient::new(channel), - } - } - - pub fn signer(&self) -> &S { - &self.signer - } - - async fn signed_transaction>( - &self, - data: D, - context_id: Vec, - ) -> M10Result> { - let req = LedgerClient::transaction_request(data.into(), context_id); - let signed = self.signer.sign_request(req).await?; - Ok(signed) - } - - pub async fn create_account( - &self, - builder: impl Into>, - ) -> M10Result<(TxId, AccountId)> { - let builder = builder.into(); - let req = self - .signed_transaction::( - builder.value.into(), - builder.context_id, - ) - .await?; - let response = self - .client - .clone() - .create_transaction(req) - .await? - .tx_error()?; - let account_id = AccountId::try_from_be_slice(&response.account_created)?; - Ok((response.tx_id, account_id)) - } - - pub async fn transfer(&self, builder: impl Into>) -> M10Result { - let builder = builder.into(); - let req = self - .signed_transaction::(builder.value.into(), builder.context_id) - .await?; - let response = self - .client - .clone() - .create_transaction(req) - .await? - .tx_error()?; - Ok(response.tx_id) - } - - pub async fn initiate_transfer( - &self, - builder: impl Into>, - ) -> M10Result { - let builder = builder.into(); - let req = self - .signed_transaction( - sdk::transaction_data::Data::InitiateTransfer(builder.value.into()), - builder.context_id, - ) - .await?; - let response = self - .client - .clone() - .create_transaction(req) - .await? - .tx_error()?; - Ok(response.tx_id) - } - - pub async fn commit_transfer( - &self, - tx_id: TxId, - accept: bool, - context_id: Vec, - ) -> M10Result { - let req = self - .signed_transaction( - sdk::CommitTransfer { - pending_tx_id: tx_id, - new_state: if accept { - sdk::commit_transfer::TransferState::Accepted - } else { - sdk::commit_transfer::TransferState::Rejected - } as i32, - }, - context_id, - ) - .await?; - let response = self - .client - .clone() - .create_transaction(req) - .await? - .tx_error()?; - Ok(response.tx_id) - } - - /// Sets the [`Account`] `frozen` status. - /// Frozen accounts cannot participate in transactions. - pub async fn freeze_account( - &self, - account_id: AccountId, - frozen: bool, - context_id: Vec, - ) -> M10Result { - let req = self - .signed_transaction( - sdk::SetFreezeState { - account_id: account_id.to_vec(), - frozen, - }, - context_id, - ) - .await?; - let response = self - .client - .clone() - .create_transaction(req) - .await? - .tx_error()?; - Ok(response.tx_id) - } - - pub async fn set_account_limit( - &self, - account_id: AccountId, - limit: u64, - context_id: Vec, - ) -> M10Result { - let req = self - .signed_transaction( - sdk::SetBalanceLimit { - account_id: account_id.to_vec(), - balance_limit: limit, - }, - context_id, - ) - .await?; - let response = self - .client - .clone() - .create_transaction(req) - .await? - .tx_error()?; - Ok(response.tx_id) - } - - pub async fn set_account_instrument( - &self, - account_id: AccountId, - code: impl Into, - decimals: u32, - description: Option>, - context_id: Vec, - ) -> M10Result { - let req = self - .signed_transaction( - sdk::SetInstrument { - account_id: account_id.to_vec(), - code: code.into(), - decimal_places: decimals, - description: description.map(|d| d.into()).unwrap_or_default(), - }, - context_id, - ) - .await?; - let response = self - .client - .clone() - .create_transaction(req) - .await? - .tx_error()?; - Ok(response.tx_id) - } - - pub async fn action(&self, builder: impl Into>) -> M10Result { - let builder = builder.into(); - let req = self - .signed_transaction::(builder.value.into(), builder.context_id) - .await?; - let response = self - .client - .clone() - .create_transaction(req) - .await? - .tx_error()?; - Ok(response.tx_id) - } - - pub async fn documents(&self, builder: impl Into>) -> M10Result { - let builder = builder.into(); - let req = self - .signed_transaction::(builder.value.into(), builder.context_id) - .await?; - let response = self - .client - .clone() - .create_transaction(req) - .await? - .tx_error()?; - Ok(response.tx_id) - } - - pub async fn create_token( - &self, - account: AccountId, - value: u64, - address: Option>, - context_id: Vec, - ) -> M10Result<(TxId, Option)> { - let address = address.unwrap_or(self.signer.public_key().to_vec()); - let req = self - .signed_transaction( - sdk::CreateToken { - address, - account_id: account.to_vec(), - value, - }, - context_id, - ) - .await?; - let response = self - .client - .clone() - .create_transaction(req) - .await? - .tx_error()?; - Ok((response.tx_id, response.token)) - } - - pub async fn redeem_token( - &self, - token: sdk::RedeemableToken, - account_id: AccountId, - context_id: Vec, - ) -> M10Result { - let req = self - .signed_transaction( - sdk::RedeemToken { - token: Some(token), - account_id: account_id.to_vec(), - }, - context_id, - ) - .await?; - let response = self - .client - .clone() - .create_transaction(req) - .await? - .tx_error()?; - Ok(response.tx_id) - } - - // Accounts - - pub async fn get_account(&self, id: AccountId) -> M10Result { - let req = self - .signer - .sign_request(sdk::GetAccountRequest { id: id.to_vec() }) - .await?; - let account = self.client.clone().get_indexed_account(req).await?; - Account::try_from(account) - } - - pub async fn get_account_info(&self, id: AccountId) -> M10Result { - let req = self - .signer - .sign_request(sdk::GetAccountRequest { id: id.to_vec() }) - .await?; - let account = self.client.clone().get_account_info(req).await?; - AccountInfo::try_from(account) - } - - pub async fn list_accounts( - &self, - filter: PageBuilder, NameOrOwnerFilter>, - ) -> M10Result> { - let req = self.signer.sign_request(filter.into()).await?; - let accounts = self.client.clone().list_account_metadata(req).await?; - let accounts = try_join_all( - accounts - .accounts - .into_iter() - // TODO: Remove indexed vs non-indexed differentiation - .map(|account| async move { - match AccountId::try_from_be_slice(&account.id) { - Ok(id) => self.get_account(id).await, - Err(err) => Err(M10Error::from(err)), - } - }), - ) - .await?; - Ok(accounts) - } - - pub async fn observe_accounts( - &self, - filter: AccountFilter, - ) -> M10Result>>> { - let req = self.signer.sign_request(filter.into()).await?; - let stream = self - .client - .clone() - .observe_accounts(req) - .await? - .map(|res| match res { - Ok(txs) => Ok(txs - .transactions - .into_iter() - .map(AccountUpdate::try_from) - .collect::>>()?), - Err(err) => Err(M10Error::from(err)), - }); - Ok(stream) - } - - // Transfers - - pub async fn get_transfer(&self, tx_id: TxId) -> M10Result { - let req = self - .signer - .sign_request(sdk::GetTransferRequest { tx_id }) - .await?; - let transfer = self.client.clone().get_transfer(req).await?; - Transfer::try_from(transfer) - } - - pub async fn get_enhanced_transfer(&self, tx_id: TxId) -> M10Result { - let req = self - .signer - .sign_request(sdk::GetTransferRequest { tx_id }) - .await?; - let transfer = self.client.clone().get_transfer(req).await?; - let enhanced = self - .client - .clone() - .enhance_transfer(transfer, self.signer.as_ref()) - .await?; - ExpandedTransfer::try_from(enhanced) - } - - pub async fn get_enhanced_transfers( - &self, - filter: TxnFilter, - ) -> M10Result> { - let req = self.signer.sign_request(filter.into()).await?; - let transfers = self.client.clone().list_transfers(req).await?; - self.client - .clone() - .enhance_transfers(transfers.transfers, self.signer.as_ref()) - .await? - .into_iter() - .map(ExpandedTransfer::try_from) - .collect::>() - } - - pub async fn list_transfers( - &self, - filter: TxnFilter, - ) -> M10Result> { - let req = self.signer.sign_request(filter.into()).await?; - let transfers = self.client.clone().list_transfers(req).await?; - let transfers = transfers - .transfers - .into_iter() - .map(Transfer::try_from) - .collect::>()?; - Ok(transfers) - } - - pub async fn observe_transfers( - &self, - filter: AccountFilter, - ) -> M10Result>>> { - let req = self.signer.sign_request(filter.into()).await?; - let stream = self - .client - .clone() - .observe_transfers(req) - .await? - .map(|res| match res { - Ok(txs) => Ok(txs - .transactions - .into_iter() - .map(Transfer::try_from) - .collect::>>()?), - Err(err) => Err(M10Error::from(err)), - }); - Ok(stream) - } - - // Actions - - pub async fn get_action(&self, tx_id: TxId) -> M10Result { - let req = self - .signer - .sign_request(sdk::GetActionRequest { tx_id }) - .await?; - let action = self.client.clone().get_action(req).await?; - Action::try_from(action) - } - - pub async fn list_actions(&self, filter: TxnFilter) -> M10Result> { - let req = self.signer.sign_request(filter.into()).await?; - let actions = self.client.clone().list_actions(req).await?; - let actions = actions - .actions - .into_iter() - .map(Action::try_from) - .collect::>()?; - Ok(actions) - } - - pub async fn observe_actions( - &self, - filter: AccountFilter, - ) -> M10Result>>> { - let req = self.signer.sign_request(filter.into()).await?; - let stream = self - .client - .clone() - .observe_actions(req) - .await? - .map(|res| match res { - Ok(txs) => Ok(txs - .transactions - .into_iter() - .map(Action::try_from) - .collect::>>()?), - Err(err) => Err(M10Error::from(err)), - }); - Ok(stream) - } - - // Metrics - - pub async fn observe_metrics( - &self, - filter: AccountFilter, - ) -> M10Result>> { - let req = self.signer.sign_request(filter.into()).await?; - let stream = self - .client - .clone() - .observe_metrics(req) - .await? - .map_err(M10Error::from); - Ok(stream) - } - - // Transactions - - pub async fn list_transactions( - &self, - filter: TxnFilter, - ) -> M10Result> { - let req = self.signer.sign_request(filter.into()).await?; - let txs = self.client.clone().list_transactions(req).await?; - let txs = txs - .transactions - .into_iter() - .map(Transaction::try_from) - .collect::>()?; - Ok(txs) - } - - pub async fn group_transactions( - &self, - filter: TxnFilter, - ) -> M10Result>> { - let req = self.signer.sign_request(filter.into()).await?; - let groups = self.client.clone().group_transactions(req).await?; - let groups = groups - .groups - .into_iter() - .map(|txs| { - txs.transactions - .into_iter() - .map(Transaction::try_from) - .collect::>>() - }) - .collect::>()?; - Ok(groups) - } - - // Banks - - pub async fn get_bank(&self, id: Uuid) -> M10Result { - let req = self - .signer - .sign_request(sdk::GetBankRequest { id: id.into_vec() }) - .await?; - let bank = self.client.clone().get_bank(req).await?; - Bank::try_from(bank) - } - - pub async fn list_banks(&self, builder: PageBuilder) -> M10Result> { - let req = self - .signer - .sign_request(sdk::ListBanksRequest { - page: builder.into(), - }) - .await?; - let banks = self.client.clone().list_banks(req).await?; - let banks = banks - .banks - .into_iter() - .map(Bank::try_from) - .collect::>()?; - Ok(banks) - } - - // Roles - - pub async fn get_role(&self, id: Uuid) -> M10Result { - let req = self - .signer - .sign_request(sdk::GetRoleRequest { id: id.into_vec() }) - .await?; - let role = self.client.clone().get_role(req).await?; - Role::try_from(role) - } - - pub async fn list_roles(&self, builder: PageBuilder) -> M10Result> { - let req = self.signer.sign_request(builder.into()).await?; - let roles = self.client.clone().list_roles(req).await?; - let roles = roles - .roles - .into_iter() - .map(Role::try_from) - .collect::>()?; - Ok(roles) - } - - // Role-bindings - - pub async fn get_role_binding(&self, id: Uuid) -> M10Result { - let req = self - .signer - .sign_request(sdk::GetRoleBindingRequest { id: id.into_vec() }) - .await?; - let role_binding = self.client.clone().get_role_binding(req).await?; - RoleBinding::try_from(role_binding) - } - - pub async fn list_role_bindings( - &self, - builder: PageBuilder, - ) -> M10Result> { - let req = self.signer.sign_request(builder.into()).await?; - let role_bindings = self.client.clone().list_role_bindings(req).await?; - let role_bindings = role_bindings - .role_bindings - .into_iter() - .map(RoleBinding::try_from) - .collect::>()?; - Ok(role_bindings) - } - - // AccountSets - - pub async fn get_account_set(&self, id: Uuid) -> M10Result { - let req = self - .signer - .sign_request(sdk::GetAccountSetRequest { id: id.into_vec() }) - .await?; - let set = self.client.clone().get_account_set(req).await?; - AccountSet::try_from(set) - } - - pub async fn list_account_sets( - &self, - builder: PageBuilder, - ) -> M10Result> { - let req = self.signer.sign_request(builder.into()).await?; - let account_sets = self.client.clone().list_account_sets(req).await?; - let account_sets = account_sets - .account_sets - .into_iter() - .map(AccountSet::try_from) - .collect::>()?; - Ok(account_sets) - } - // Account Metadata - - pub async fn get_account_metadata(&self, id: AccountId) -> M10Result { - let req = self - .signer - .sign_request(sdk::GetAccountRequest { id: id.to_vec() }) - .await?; - let metadata = self.client.clone().get_account_metadata(req).await?; - AccountMetadata::try_from(metadata) - } - - pub async fn list_account_metadata( - &self, - builder: PageBuilder, - ) -> M10Result> { - let req = self.signer.sign_request(builder.into()).await?; - let account_metadata = self.client.clone().list_account_metadata(req).await?; - let account_sets = account_metadata - .accounts - .into_iter() - .map(AccountMetadata::try_from) - .collect::>()?; - Ok(account_sets) - } - - pub async fn get_block_height(&self) -> M10Result { - Ok(self.clone().client.block_height().await?) - } - - pub async fn get_offline_key(&self) -> M10Result> { - Ok(self.client.clone().get_offline_key().await?) - } -} diff --git a/rust/sdk/src/collections/resource_id.rs b/rust/sdk/src/collections/resource_id.rs index b2e2d87..178a03c 100644 --- a/rust/sdk/src/collections/resource_id.rs +++ b/rust/sdk/src/collections/resource_id.rs @@ -10,6 +10,15 @@ pub enum ResourceId { Uuid(Uuid), } +impl ResourceId { + pub fn to_vec(&self) -> Vec { + match self { + ResourceId::Hex(h) => h.to_vec(), + ResourceId::Uuid(u) => u.as_bytes().to_vec(), + } + } +} + impl From for bytes::Bytes { fn from(val: ResourceId) -> Self { match val { @@ -48,10 +57,8 @@ impl TryFrom<&[u8]> for ResourceId { fn try_from(value: &[u8]) -> Result { if let Ok(u) = Uuid::from_slice(value) { Ok(ResourceId::Uuid(u)) - } else if let Ok(h) = hex::decode(value) { - Ok(ResourceId::Hex(h.into())) } else { - Err(M10Error::InvalidAccountId(AccountIdError::InvalidLen)) + Ok(ResourceId::Hex(bytes::Bytes::copy_from_slice(value))) } } } diff --git a/rust/sdk/src/error.rs b/rust/sdk/src/error.rs index f5d06c0..5931236 100644 --- a/rust/sdk/src/error.rs +++ b/rust/sdk/src/error.rs @@ -1,5 +1,5 @@ use crate::account::AccountIdError; -use m10_protos::sdk::TransactionError; +use m10_protos::{prost, sdk::TransactionError}; use m10_signing::SigningError; use tonic::Status; @@ -13,8 +13,22 @@ pub enum M10Error { Transaction(#[from] TransactionError), #[error(transparent)] InvalidAccountId(#[from] AccountIdError), + #[error(transparent)] + Transport(#[from] tonic::transport::Error), + #[error(transparent)] + Request(#[from] reqwest::Error), + #[error(transparent)] + Encoding(#[from] prost::EncodeError), + #[error(transparent)] + Decoding(#[from] prost::DecodeError), + #[error(transparent)] + SysTime(#[from] std::time::SystemTimeError), #[error("Invalid transaction")] InvalidTransaction, + #[error("Signer required")] + NoSigner, + #[error(transparent)] + WsError(#[from] tokio_tungstenite::tungstenite::error::Error), } pub type M10Result = Result; diff --git a/rust/sdk/src/grpc_client.rs b/rust/sdk/src/grpc_client.rs new file mode 100644 index 0000000..03b174d --- /dev/null +++ b/rust/sdk/src/grpc_client.rs @@ -0,0 +1,715 @@ +use core::convert::{Into, TryFrom}; +use std::{pin::Pin, sync::Arc}; + +use async_trait::async_trait; +use futures_core::Stream; +use futures_util::{future::try_join_all, StreamExt, TryStreamExt}; +use m10_protos::sdk::{ + self, m10_query_service_client::M10QueryServiceClient, + m10_tx_service_client::M10TxServiceClient, +}; +use m10_signing::Signer; +use tonic::{ + transport::{Channel, Endpoint}, + Request, +}; + +use crate::{ + account::AccountId, + builders::*, + error::{M10Error, M10Result}, + types::*, +}; + +pub struct GrpcClient { + tx_client: M10TxServiceClient, + query_client: M10QueryServiceClient, + signer: Option>, +} + +impl Clone for GrpcClient { + fn clone(&self) -> Self { + Self { + tx_client: self.tx_client.clone(), + query_client: self.query_client.clone(), + signer: self.signer.clone(), + } + } +} + +impl GrpcClient { + pub fn new(endpoint: Endpoint, signer: Option>) -> M10Result { + let channel = endpoint.connect_lazy()?; + let tx_client = M10TxServiceClient::new(channel.clone()); + let query_client = M10QueryServiceClient::new(channel); + Ok(Self { + tx_client, + query_client, + signer, + }) + } + + pub async fn connect(endpoint: Endpoint, signer: Option>) -> M10Result { + let channel = endpoint.connect().await?; + let tx_client = M10TxServiceClient::new(channel.clone()); + let query_client = M10QueryServiceClient::new(channel); + Ok(Self { + tx_client, + query_client, + signer, + }) + } +} + +#[async_trait] +impl crate::m10_core_client::M10CoreClient for GrpcClient { + type Signer = S; + + fn signer(&self) -> M10Result> { + self.signer.clone().ok_or(M10Error::NoSigner) + } + + fn set_signer(&mut self, signer: Arc) { + self.signer = Some(signer); + } + + // Transactions + async fn create_transaction( + &self, + payload: sdk::RequestEnvelope, + ) -> M10Result { + Ok(self + .tx_client + .clone() + .create_transaction(Request::new(payload)) + .await + .map(|res| res.into_inner())? + .tx_error()?) + } + + async fn bulk_create_transactions( + &self, + payload: sdk::BulkTransactions, + ) -> M10Result { + Ok(self + .tx_client + .clone() + .bulk_create_transactions(Request::new(payload)) + .await + .map(|res| res.into_inner())?) + } + + // Queries + async fn get_block_height(&self) -> M10Result { + Ok(self + .query_client + .clone() + .get_chain_info(Request::new(())) + .await? + .into_inner() + .block_height) + } + + async fn get_offline_key(&self) -> M10Result> { + Ok(self + .query_client + .clone() + .get_offline_key(Request::new(())) + .await? + .into_inner() + .offline_pk) + } + + async fn get_account(&self, id: AccountId) -> M10Result { + let account = self.get_indexed_account(id).await?; + Account::try_from(account) + } + + async fn get_indexed_account(&self, id: AccountId) -> M10Result { + let req = self + .signer()? + .sign_request(sdk::GetAccountRequest { id: id.to_vec() }) + .await?; + let account = self + .query_client + .clone() + .get_indexed_account(Request::new(req.into())) + .await + .map(|res| res.into_inner())?; + Ok(account) + } + + async fn get_account_info(&self, id: AccountId) -> M10Result { + let account = self.get_raw_account_info(id.to_vec()).await?; + AccountInfo::try_from(account) + } + + async fn get_raw_account_info(&self, id: Vec) -> M10Result { + let req = self + .signer()? + .sign_request(sdk::GetAccountRequest { id }) + .await?; + let account = self + .query_client + .clone() + .get_account_info(Request::new(req.into())) + .await + .map(|res| res.into_inner())?; + Ok(account) + } + + async fn list_accounts( + &self, + filter: PageBuilder, NameOrOwnerFilter>, + ) -> M10Result> { + let req = self + .signer()? + .sign_request::(filter.into()) + .await?; + let accounts = self + .query_client + .clone() + .list_account_metadata(Request::new(req.into())) + .await + .map(|res| res.into_inner())?; + let accounts = try_join_all( + accounts + .accounts + .into_iter() + // TODO: Remove indexed vs non-indexed differentiation + .filter_map(|account| match AccountId::try_from_be_slice(&account.id) { + Ok(id) => Some(async move { self.get_account(id).await }), + Err(_) => None, + }), + ) + .await?; + Ok(accounts) + } + + // Transfers + + async fn get_transfer(&self, tx_id: TxId) -> M10Result { + let transfer = self.get_raw_transfer(tx_id).await?; + Transfer::try_from(transfer) + } + + async fn get_raw_transfer(&self, tx_id: TxId) -> M10Result { + let req = self + .signer()? + .sign_request(sdk::GetTransferRequest { tx_id }) + .await?; + let transfer = self + .query_client + .clone() + .get_transfer(Request::new(req.into())) + .await + .map(|res| res.into_inner())?; + Ok(transfer) + } + + async fn get_enhanced_transfer(&self, tx_id: TxId) -> M10Result { + let req = self + .signer()? + .sign_request(sdk::GetTransferRequest { tx_id }) + .await?; + let transfer = self + .query_client + .clone() + .get_transfer(Request::new(req.into())) + .await + .map(|res| res.into_inner())?; + let enhanced = self.enhance_transfer(transfer).await?; + ExpandedTransfer::try_from(enhanced) + } + + async fn get_enhanced_transfers( + &self, + filter: TxnFilter, + ) -> M10Result> { + let req = self + .signer()? + .sign_request::(filter.into()) + .await?; + let transfers = self + .query_client + .clone() + .list_transfers(Request::new(req.into())) + .await + .map(|res| res.into_inner())?; + self.enhance_transfers(transfers.transfers) + .await? + .into_iter() + .map(ExpandedTransfer::try_from) + .collect::>() + } + + async fn list_transfers(&self, filter: TxnFilter) -> M10Result> { + let transfers = self.list_raw_transfers(filter).await?; + let transfers = transfers + .transfers + .into_iter() + .map(Transfer::try_from) + .collect::>()?; + Ok(transfers) + } + + async fn list_raw_transfers( + &self, + filter: TxnFilter, + ) -> M10Result { + let req = self + .signer()? + .sign_request::(filter.into()) + .await?; + let transfers = self + .query_client + .clone() + .list_transfers(Request::new(req.into())) + .await + .map(|res| res.into_inner())?; + Ok(transfers) + } + + // Actions + + async fn get_action(&self, tx_id: TxId) -> M10Result { + let req = self + .signer()? + .sign_request(sdk::GetActionRequest { tx_id }) + .await?; + let action = self + .query_client + .clone() + .get_action(Request::new(req.into())) + .await + .map(|res| res.into_inner())?; + Action::try_from(action) + } + + async fn list_actions(&self, filter: TxnFilter) -> M10Result> { + let req = self + .signer()? + .sign_request::(filter.into()) + .await?; + let actions = self + .query_client + .clone() + .list_actions(Request::new(req.into())) + .await + .map(|res| res.into_inner())?; + let actions = actions + .actions + .into_iter() + .map(Action::try_from) + .collect::>()?; + Ok(actions) + } + + // Transactions + + async fn list_transactions( + &self, + filter: TxnFilter, + ) -> M10Result> { + let req = self + .signer()? + .sign_request::(filter.into()) + .await?; + let txs = self + .query_client + .clone() + .list_transactions(Request::new(req.into())) + .await + .map(|res| res.into_inner())?; + let txs = txs + .transactions + .into_iter() + .map(Transaction::try_from) + .collect::>()?; + Ok(txs) + } + + async fn group_transactions( + &self, + filter: TxnFilter, + ) -> M10Result>> { + let req = self + .signer()? + .sign_request::(filter.into()) + .await?; + let groups = self + .query_client + .clone() + .group_transactions(Request::new(req.into())) + .await + .map(|res| res.into_inner())?; + let groups = groups + .groups + .into_iter() + .map(|txs| { + txs.transactions + .into_iter() + .map(Transaction::try_from) + .collect::>>() + }) + .collect::>()?; + Ok(groups) + } + + // Banks + + async fn get_bank(&self, id: Vec) -> M10Result { + let req = self + .signer()? + .sign_request(sdk::GetBankRequest { id }) + .await?; + let bank = self + .query_client + .clone() + .get_bank(Request::new(req.into())) + .await + .map(|res| res.into_inner())?; + Bank::try_from(bank) + } + + async fn list_banks(&self, builder: PageBuilder>) -> M10Result> { + let req = self + .signer()? + .sign_request(sdk::ListBanksRequest { + page: builder.into(), + }) + .await?; + let banks = self + .query_client + .clone() + .list_banks(Request::new(req.into())) + .await + .map(|res| res.into_inner())?; + let banks = banks + .banks + .into_iter() + .map(Bank::try_from) + .collect::>()?; + Ok(banks) + } + + // Roles + + async fn get_role(&self, id: Vec) -> M10Result { + let req = self + .signer()? + .sign_request(sdk::GetRoleRequest { id }) + .await?; + let role = self + .query_client + .clone() + .get_role(Request::new(req.into())) + .await + .map(|res| res.into_inner())?; + Role::try_from(role) + } + + async fn list_roles(&self, builder: PageBuilder, NameFilter>) -> M10Result> { + let req = self + .signer()? + .sign_request::(builder.into()) + .await?; + let roles = self + .query_client + .clone() + .list_roles(Request::new(req.into())) + .await + .map(|res| res.into_inner())?; + let roles = roles + .roles + .into_iter() + .map(Role::try_from) + .collect::>()?; + Ok(roles) + } + + // Role-bindings + + async fn get_role_binding(&self, id: Vec) -> M10Result { + let req = self + .signer()? + .sign_request(sdk::GetRoleBindingRequest { id }) + .await?; + let role_binding = self + .query_client + .clone() + .get_role_binding(Request::new(req.into())) + .await + .map(|res| res.into_inner())?; + RoleBinding::try_from(role_binding) + } + + async fn list_role_bindings( + &self, + builder: PageBuilder, NameFilter>, + ) -> M10Result> { + let req = self + .signer()? + .sign_request::(builder.into()) + .await?; + let role_bindings = self + .query_client + .clone() + .list_role_bindings(Request::new(req.into())) + .await + .map(|res| res.into_inner())?; + let role_bindings = role_bindings + .role_bindings + .into_iter() + .map(RoleBinding::try_from) + .collect::>()?; + Ok(role_bindings) + } + + // AccountSets + + async fn get_account_set(&self, id: Vec) -> M10Result { + let req = self + .signer()? + .sign_request(sdk::GetAccountSetRequest { id }) + .await?; + let set = self + .query_client + .clone() + .get_account_set(Request::new(req.into())) + .await + .map(|res| res.into_inner())?; + AccountSet::try_from(set) + } + + async fn list_account_sets( + &self, + builder: PageBuilder, NameOrOwnerFilter>, + ) -> M10Result> { + let req = self + .signer()? + .sign_request::(builder.into()) + .await?; + let account_sets = self + .query_client + .clone() + .list_account_sets(Request::new(req.into())) + .await + .map(|res| res.into_inner())?; + let account_sets = account_sets + .account_sets + .into_iter() + .map(AccountSet::try_from) + .collect::>()?; + Ok(account_sets) + } + // Account Metadata + + async fn get_account_metadata(&self, id: AccountId) -> M10Result { + let req = self + .signer()? + .sign_request(sdk::GetAccountRequest { id: id.to_vec() }) + .await?; + let metadata = self + .query_client + .clone() + .get_account_metadata(Request::new(req.into())) + .await + .map(|res| res.into_inner())?; + AccountMetadata::try_from(metadata) + } + + async fn list_account_metadata( + &self, + builder: PageBuilder, NameOrOwnerFilter>, + ) -> M10Result> { + let req = self + .signer()? + .sign_request::(builder.into()) + .await?; + let account_metadata = self + .query_client + .clone() + .list_account_metadata(Request::new(req.into())) + .await + .map(|res| res.into_inner())?; + let account_sets = account_metadata + .accounts + .into_iter() + .map(AccountMetadata::try_from) + .collect::>()?; + Ok(account_sets) + } + + // Observers + async fn observe_accounts( + &self, + filter: AccountFilter, + ) -> M10Result>> + Send + Sync + 'static>>> + { + let req = self + .signer()? + .sign_request::(filter.into()) + .await?; + let stream = self + .query_client + .clone() + .observe_accounts(Request::new(req.into())) + .await + .map(tonic::Response::into_inner)? + .into_stream() + .map(|res| match res { + Ok(txs) => Ok(txs + .transactions + .into_iter() + .map(AccountUpdate::try_from) + .collect::>>()?), + Err(err) => Err(M10Error::from(err)), + }); + Ok(Box::pin(stream)) + } + + async fn observe_transfers( + &self, + filter: AccountFilter, + ) -> M10Result>> + Send + Sync + 'static>>> + { + let req = self + .signer()? + .sign_request::(filter.into()) + .await?; + let stream = self + .query_client + .clone() + .observe_transfers(Request::new(req.into())) + .await + .map(tonic::Response::into_inner)? + .into_stream() + .map(|res| match res { + Ok(txs) => Ok(txs + .transactions + .into_iter() + .map(Transfer::try_from) + .collect::>>()?), + Err(err) => Err(M10Error::from(err)), + }); + Ok(Box::pin(stream)) + } + + async fn observe_transactions( + &self, + filter: AccountFilter, + ) -> M10Result< + Pin> + Send + Sync + 'static>>, + > { + let req = self + .signer()? + .sign_request::(filter.into()) + .await?; + let stream = self + .query_client + .clone() + .observe_transfers(Request::new(req.into())) + .await + .map(tonic::Response::into_inner)? + .into_stream() + .map(|res| match res { + Ok(txs) => Ok(txs), + Err(err) => Err(M10Error::from(err)), + }); + Ok(Box::pin(stream)) + } + + async fn observe_actions( + &self, + filter: AccountFilter, + ) -> M10Result>> + Send + Sync + 'static>>> + { + let req = self + .signer()? + .sign_request::(filter.into()) + .await?; + let stream = self + .query_client + .clone() + .observe_actions(Request::new(req.into())) + .await + .map(tonic::Response::into_inner)? + .into_stream() + .map(|res| match res { + Ok(txs) => Ok(txs + .transactions + .into_iter() + .map(Action::try_from) + .collect::>>()?), + Err(err) => Err(M10Error::from(err)), + }); + Ok(Box::pin(stream)) + } + + async fn observe_raw_actions( + &self, + filter: AccountFilter, + ) -> M10Result< + Pin> + Send + Sync + 'static>>, + > { + let req = self + .signer()? + .sign_request::(filter.into()) + .await?; + let stream = self + .query_client + .clone() + .observe_actions(Request::new(req.into())) + .await + .map(tonic::Response::into_inner)? + .into_stream() + .map(|res| match res { + Ok(txs) => Ok(txs), + Err(err) => Err(M10Error::from(err)), + }); + Ok(Box::pin(stream)) + } + + async fn observe_resources( + &self, + request: sdk::ObserveResourcesRequest, + ) -> M10Result< + Pin> + Send + Sync + 'static>>, + > { + let req = self.signer()?.sign_request(request).await?; + let stream = self + .query_client + .clone() + .observe_resources(Request::new(req.into())) + .await + .map(tonic::Response::into_inner)? + .into_stream() + .map(|res| match res { + Ok(txs) => Ok(txs), + Err(err) => Err(M10Error::from(err)), + }); + Ok(Box::pin(stream)) + } + + async fn observe_metrics( + &self, + filter: AccountFilter, + ) -> M10Result< + Pin> + Send + Sync + 'static>>, + > { + let req = self + .signer()? + .sign_request::(filter.into()) + .await?; + let stream = self + .query_client + .clone() + .observe_metrics(Request::new(req.into())) + .await + .map(tonic::Response::into_inner)? + .into_stream() + .map_err(M10Error::from); + Ok(Box::pin(stream)) + } +} diff --git a/rust/sdk/src/http_client.rs b/rust/sdk/src/http_client.rs new file mode 100644 index 0000000..39cb03b --- /dev/null +++ b/rust/sdk/src/http_client.rs @@ -0,0 +1,628 @@ +use async_trait::async_trait; +use core::convert::{Into, TryFrom}; +use futures_core::Stream; +use futures_util::future::try_join_all; +use m10_protos::sdk::{FinalizedTransactions, TransactionMetrics}; +use m10_protos::{prost::Message, sdk}; +use m10_signing::Signer; +use reqwest::Client; +use std::{pin::Pin, sync::Arc}; +use tonic::transport::Endpoint; + +use crate::ws::WSClient; +use crate::{ + account::AccountId, + builders::*, + error::{M10Error, M10Result}, + types::*, +}; + +pub struct HttpClient { + endpoint: Endpoint, + client: Client, + signer: Option>, + ws: WSClient, +} + +impl Clone for HttpClient { + fn clone(&self) -> Self { + Self { + client: self.client.clone(), + endpoint: self.endpoint.clone(), + ws: self.ws.clone(), + signer: self.signer.clone(), + } + } +} + +impl HttpClient { + pub fn new(endpoint: Endpoint, ws_endpoint: Endpoint, signer: Option>) -> Self { + Self { + endpoint, + signer, + client: Client::default(), + ws: WSClient::new(ws_endpoint), + } + } + + async fn get_with_request( + &self, + ep: &str, + req: sdk::RequestEnvelope, + ) -> M10Result { + let mut req_body = vec![]; + req.encode(&mut req_body)?; + + Ok(self + .client + .get(format!("{}ledger/api/v1/{}", self.endpoint.uri(), ep)) + .body(req_body) + .send() + .await? + .error_for_status()? + .bytes() + .await?) + } +} + +#[async_trait] +impl crate::m10_core_client::M10CoreClient for HttpClient { + type Signer = S; + + fn signer(&self) -> M10Result> { + self.signer.clone().ok_or(M10Error::NoSigner) + } + + fn set_signer(&mut self, signer: Arc) { + self.signer = Some(signer); + } + + async fn create_transaction( + &self, + payload: sdk::RequestEnvelope, + ) -> M10Result { + let mut req_body = vec![]; + payload.encode(&mut req_body)?; + let mut res_body = self + .client + .post(format!("{}ledger/api/v1/transaction", self.endpoint.uri())) + .body(req_body) + .send() + .await? + .error_for_status()? + .bytes() + .await?; + let res = sdk::TransactionResponse::decode(&mut res_body)?; + Ok(res.tx_error()?) + } + + async fn bulk_create_transactions( + &self, + payload: sdk::BulkTransactions, + ) -> M10Result { + let mut req_body = vec![]; + payload.encode(&mut req_body)?; + let mut res_body = self + .client + .post(format!( + "{}ledger/api/v1/bulk-transactions", + self.endpoint.uri() + )) + .body(req_body) + .send() + .await? + .error_for_status()? + .bytes() + .await?; + let res = sdk::BulkTransactionsResponse::decode(&mut res_body)?; + Ok(res) + } + + // Queries + async fn get_block_height(&self) -> M10Result { + let mut msg = self + .client + .get(format!("{}ledger/api/v1/chain-info", self.endpoint.uri())) + .send() + .await? + .error_for_status()? + .bytes() + .await?; + let res = sdk::ChainInfo::decode(&mut msg)?; + Ok(res.block_height) + } + + async fn get_offline_key(&self) -> M10Result> { + let mut msg = self + .client + .get(format!("{}ledger/api/v1/offline-key", self.endpoint.uri())) + .send() + .await? + .error_for_status()? + .bytes() + .await?; + let res = sdk::OfflineKey::decode(&mut msg)?; + Ok(res.offline_pk) + } + + async fn get_account(&self, id: AccountId) -> M10Result { + let account = self.get_indexed_account(id).await?; + Account::try_from(account) + } + + async fn get_indexed_account(&self, id: AccountId) -> M10Result { + let req = self + .signer()? + .sign_request(sdk::GetAccountRequest { id: id.to_vec() }) + .await?; + let mut msg = self.get_with_request("indexed-account", req.into()).await?; + let account = sdk::IndexedAccount::decode(&mut msg)?; + Ok(account) + } + + async fn get_account_info(&self, id: AccountId) -> M10Result { + let account = self.get_raw_account_info(id.to_vec()).await?; + AccountInfo::try_from(account) + } + + async fn get_raw_account_info(&self, id: Vec) -> M10Result { + let req = self + .signer()? + .sign_request(sdk::GetAccountRequest { id }) + .await?; + let mut msg = self.get_with_request("account-info", req.into()).await?; + let account = sdk::AccountInfo::decode(&mut msg)?; + Ok(account) + } + + async fn list_accounts( + &self, + filter: PageBuilder, NameOrOwnerFilter>, + ) -> M10Result> { + let req = self + .signer()? + .sign_request::(filter.into()) + .await?; + let mut msg = self + .get_with_request("accounst-metadata", req.into()) + .await?; + let accounts = sdk::ListAccountMetadataResponse::decode(&mut msg)?; + let accounts = try_join_all( + accounts + .accounts + .into_iter() + // TODO: Remove indexed vs non-indexed differentiation + .filter_map(|account| match AccountId::try_from_be_slice(&account.id) { + Ok(id) => Some(async move { self.get_account(id).await }), + Err(_) => None, + }), + ) + .await?; + Ok(accounts) + } + + // Transfers + + async fn get_transfer(&self, tx_id: TxId) -> M10Result { + let transfer = self.get_raw_transfer(tx_id).await?; + Transfer::try_from(transfer) + } + + async fn get_raw_transfer(&self, tx_id: TxId) -> M10Result { + let req = self + .signer()? + .sign_request(sdk::GetTransferRequest { tx_id }) + .await?; + let mut msg = self.get_with_request("transfer", req.into()).await?; + let transfer = sdk::FinalizedTransfer::decode(&mut msg)?; + Ok(transfer) + } + + async fn get_enhanced_transfer(&self, tx_id: TxId) -> M10Result { + let req = self + .signer()? + .sign_request(sdk::GetTransferRequest { tx_id }) + .await?; + let mut msg = self.get_with_request("transfer", req.into()).await?; + let transfer = sdk::FinalizedTransfer::decode(&mut msg)?; + let enhanced = self.enhance_transfer(transfer).await?; + ExpandedTransfer::try_from(enhanced) + } + + async fn get_enhanced_transfers( + &self, + filter: TxnFilter, + ) -> M10Result> { + let req = self + .signer()? + .sign_request::(filter.into()) + .await?; + let mut msg = self.get_with_request("transfers", req.into()).await?; + let transfers = sdk::FinalizedTransfers::decode(&mut msg)?; + self.enhance_transfers(transfers.transfers) + .await? + .into_iter() + .map(ExpandedTransfer::try_from) + .collect::>() + } + + async fn list_transfers(&self, filter: TxnFilter) -> M10Result> { + let transfers = self.list_raw_transfers(filter).await?; + let transfers = transfers + .transfers + .into_iter() + .map(Transfer::try_from) + .collect::>()?; + Ok(transfers) + } + + async fn list_raw_transfers( + &self, + filter: TxnFilter, + ) -> M10Result { + let req = self + .signer()? + .sign_request::(filter.into()) + .await?; + let mut msg = self.get_with_request("transfers", req.into()).await?; + let transfers = sdk::FinalizedTransfers::decode(&mut msg)?; + Ok(transfers) + } + + // Actions + + async fn get_action(&self, tx_id: TxId) -> M10Result { + let req = self + .signer()? + .sign_request(sdk::GetActionRequest { tx_id }) + .await?; + let mut msg = self.get_with_request("action", req.into()).await?; + let action = sdk::Action::decode(&mut msg)?; + Action::try_from(action) + } + + async fn list_actions(&self, filter: TxnFilter) -> M10Result> { + let req = self + .signer()? + .sign_request::(filter.into()) + .await?; + let mut msg = self.get_with_request("actions", req.into()).await?; + let actions = sdk::Actions::decode(&mut msg)?; + let actions = actions + .actions + .into_iter() + .map(Action::try_from) + .collect::>()?; + Ok(actions) + } + + // Transactions + + async fn list_transactions( + &self, + filter: TxnFilter, + ) -> M10Result> { + let req = self + .signer()? + .sign_request::(filter.into()) + .await?; + let mut msg = self.get_with_request("transactions", req.into()).await?; + let txs = sdk::FinalizedTransactions::decode(&mut msg)?; + let txs = txs + .transactions + .into_iter() + .map(Transaction::try_from) + .collect::>()?; + Ok(txs) + } + + async fn group_transactions( + &self, + filter: TxnFilter, + ) -> M10Result>> { + let req = self + .signer()? + .sign_request::(filter.into()) + .await?; + let mut msg = self + .get_with_request("group-transactions", req.into()) + .await?; + let groups = sdk::GroupedFinalizedTransactions::decode(&mut msg)?; + let groups = groups + .groups + .into_iter() + .map(|txs| { + txs.transactions + .into_iter() + .map(Transaction::try_from) + .collect::>>() + }) + .collect::>()?; + Ok(groups) + } + + // Banks + + async fn get_bank(&self, id: Vec) -> M10Result { + let req = self + .signer()? + .sign_request(sdk::GetBankRequest { id }) + .await?; + let mut msg = self.get_with_request("bank", req.into()).await?; + let bank = sdk::Bank::decode(&mut msg)?; + Bank::try_from(bank) + } + + async fn list_banks(&self, builder: PageBuilder>) -> M10Result> { + let req = self + .signer()? + .sign_request(sdk::ListBanksRequest { + page: builder.into(), + }) + .await?; + let mut msg = self.get_with_request("banks", req.into()).await?; + let banks = sdk::ListBanksResponse::decode(&mut msg)?; + let banks = banks + .banks + .into_iter() + .map(Bank::try_from) + .collect::>()?; + Ok(banks) + } + + // Roles + + async fn get_role(&self, id: Vec) -> M10Result { + let req = self + .signer()? + .sign_request(sdk::GetRoleRequest { id }) + .await?; + let mut msg = self.get_with_request("role", req.into()).await?; + let role = sdk::Role::decode(&mut msg)?; + Role::try_from(role) + } + + async fn list_roles(&self, builder: PageBuilder, NameFilter>) -> M10Result> { + let req = self + .signer()? + .sign_request::(builder.into()) + .await?; + let mut msg = self.get_with_request("roles", req.into()).await?; + let roles = sdk::ListRolesResponse::decode(&mut msg)?; + let roles = roles + .roles + .into_iter() + .map(Role::try_from) + .collect::>()?; + Ok(roles) + } + + // Role-bindings + + async fn get_role_binding(&self, id: Vec) -> M10Result { + let req = self + .signer()? + .sign_request(sdk::GetRoleBindingRequest { id }) + .await?; + let mut msg = self.get_with_request("role-binding", req.into()).await?; + let role_binding = sdk::RoleBinding::decode(&mut msg)?; + RoleBinding::try_from(role_binding) + } + + async fn list_role_bindings( + &self, + builder: PageBuilder, NameFilter>, + ) -> M10Result> { + let req = self + .signer()? + .sign_request::(builder.into()) + .await?; + let mut msg = self.get_with_request("role-bindings", req.into()).await?; + let role_bindings = sdk::ListRoleBindingsResponse::decode(&mut msg)?; + let role_bindings = role_bindings + .role_bindings + .into_iter() + .map(RoleBinding::try_from) + .collect::>()?; + Ok(role_bindings) + } + + // AccountSets + + async fn get_account_set(&self, id: Vec) -> M10Result { + let req = self + .signer()? + .sign_request(sdk::GetAccountSetRequest { id }) + .await?; + let mut msg = self.get_with_request("account-set", req.into()).await?; + let set = sdk::AccountSet::decode(&mut msg)?; + AccountSet::try_from(set) + } + + async fn list_account_sets( + &self, + builder: PageBuilder, NameOrOwnerFilter>, + ) -> M10Result> { + let req = self + .signer()? + .sign_request::(builder.into()) + .await?; + let mut msg = self.get_with_request("account-sets", req.into()).await?; + let account_sets = sdk::ListAccountSetsResponse::decode(&mut msg)?; + let account_sets = account_sets + .account_sets + .into_iter() + .map(AccountSet::try_from) + .collect::>()?; + Ok(account_sets) + } + // Account Metadata + + async fn get_account_metadata(&self, id: AccountId) -> M10Result { + let req = self + .signer()? + .sign_request(sdk::GetAccountRequest { id: id.to_vec() }) + .await?; + let mut msg = self + .get_with_request("account-metadata", req.into()) + .await?; + let metadata = sdk::AccountMetadata::decode(&mut msg)?; + AccountMetadata::try_from(metadata) + } + + async fn list_account_metadata( + &self, + builder: PageBuilder, NameOrOwnerFilter>, + ) -> M10Result> { + let req = self + .signer()? + .sign_request::(builder.into()) + .await?; + let mut msg = self + .get_with_request("accounts-metadata", req.into()) + .await?; + let account_metadata = sdk::ListAccountMetadataResponse::decode(&mut msg)?; + let account_sets = account_metadata + .accounts + .into_iter() + .map(AccountMetadata::try_from) + .collect::>()?; + Ok(account_sets) + } + + // Observers + async fn observe_accounts( + &self, + filter: AccountFilter, + ) -> M10Result>> + Send + Sync + 'static>>> + { + let req = self + .signer()? + .sign_request::(filter.into()) + .await?; + + self.ws + .observe_with_request("/accounts", req.into(), |bin| { + let txs = FinalizedTransactions::decode(bin.as_slice()).map_err(M10Error::from)?; + + txs.transactions + .into_iter() + .map(AccountUpdate::try_from) + .collect::>>() + }) + .await + } + + async fn observe_transfers( + &self, + filter: AccountFilter, + ) -> M10Result>> + Send + Sync + 'static>>> + { + let req = self + .signer()? + .sign_request::(filter.into()) + .await?; + + self.ws + .observe_with_request("/transfers", req.into(), |bin| { + let txs = FinalizedTransactions::decode(bin.as_slice()).map_err(M10Error::from)?; + + txs.transactions + .into_iter() + .map(Transfer::try_from) + .collect::>>() + }) + .await + } + + async fn observe_transactions( + &self, + filter: AccountFilter, + ) -> M10Result< + Pin> + Send + Sync + 'static>>, + > { + let req = self + .signer()? + .sign_request::(filter.into()) + .await?; + + self.ws + .observe_with_request("/transfers", req.into(), |bin| { + FinalizedTransactions::decode(bin.as_slice()).map_err(M10Error::from) + }) + .await + } + + async fn observe_actions( + &self, + filter: AccountFilter, + ) -> M10Result>> + Send + Sync + 'static>>> + { + let req = self + .signer()? + .sign_request::(filter.into()) + .await?; + + self.ws + .observe_with_request("/actions", req.into(), |bin| { + let txs = FinalizedTransactions::decode(bin.as_slice()).map_err(M10Error::from)?; + + txs.transactions + .into_iter() + .map(Action::try_from) + .collect::>>() + }) + .await + } + + async fn observe_raw_actions( + &self, + filter: AccountFilter, + ) -> M10Result< + Pin> + Send + Sync + 'static>>, + > { + let req = self + .signer()? + .sign_request::(filter.into()) + .await?; + + self.ws + .observe_with_request("/actions", req.into(), |bin| { + FinalizedTransactions::decode(bin.as_slice()).map_err(M10Error::from) + }) + .await + } + + async fn observe_resources( + &self, + request: sdk::ObserveResourcesRequest, + ) -> M10Result< + Pin> + Send + Sync + 'static>>, + > { + let req = self.signer()?.sign_request(request).await?; + + self.ws + .observe_with_request("/resources", req.into(), |bin| { + FinalizedTransactions::decode(bin.as_slice()).map_err(M10Error::from) + }) + .await + } + + async fn observe_metrics( + &self, + filter: AccountFilter, + ) -> M10Result< + Pin> + Send + Sync + 'static>>, + > { + let req = self + .signer()? + .sign_request::(filter.into()) + .await?; + + self.ws + .observe_with_request("/metrics", req.into(), |bin| { + TransactionMetrics::decode(bin.as_slice()).map_err(M10Error::from) + }) + .await + } +} diff --git a/rust/sdk/src/image/mod.rs b/rust/sdk/src/image/mod.rs index 65db0c3..9f62607 100644 --- a/rust/sdk/src/image/mod.rs +++ b/rust/sdk/src/image/mod.rs @@ -14,7 +14,7 @@ impl ImageClient { } pub async fn put_image(&mut self, name: &str, image: Vec) -> reqwest::Result { - let url = format!("{}/images/{}", self.address, name); + let url = format!("{}images/{}", self.address, name); self.image_client .put(&url) .body(image) @@ -25,7 +25,7 @@ impl ImageClient { } pub async fn get_image(&mut self, name: &str) -> reqwest::Result> { - let url = format!("{}/images/{}", self.address, name); + let url = format!("{}images/{}", self.address, name); let image = self .image_client .get(&url) diff --git a/rust/sdk/src/ledger_client.rs b/rust/sdk/src/ledger_client.rs deleted file mode 100644 index 7b9c2b9..0000000 --- a/rust/sdk/src/ledger_client.rs +++ /dev/null @@ -1,496 +0,0 @@ -use futures_core::Stream; -use m10_protos::sdk::{ - self, m10_query_service_client::M10QueryServiceClient, - m10_tx_service_client::M10TxServiceClient, transaction_data::Data, BulkTransactions, - TransactionData, -}; -use m10_protos::sdk::{AccountInfo, RequestEnvelope}; -use m10_signing::SignedRequest; -use std::time::{SystemTime, UNIX_EPOCH}; -use tonic::{Request, Response}; - -use crate::transfer_ext::EnhancedTransfer; -use crate::{EnhancedTransferStep, Signer}; -pub use tonic::transport::{Channel, ClientTlsConfig, Endpoint, Uri}; - -// Re-export public error -pub use tonic::Status; - -#[derive(Clone)] -/// A client for the M10 Ledger. -/// -/// This client allows you to query and transact on the M10 ledger. -/// -/// # Example -/// ```no_run -/// #[tokio::main(flavor = "current_thread")] -/// async fn main() { -/// let ledger_url = "https://test.m10.net".to_string(); -/// let mut client = m10_sdk::LedgerClient::new( -/// tonic::transport::Endpoint::from_shared(ledger_url) -/// .unwrap() -/// .connect_lazy() -/// .unwrap() -/// ); -/// -/// let block_height = client.block_height().await; -/// } -/// ``` -pub struct LedgerClient { - tx_client: M10TxServiceClient, - query_client: M10QueryServiceClient, -} - -impl LedgerClient { - pub fn new(grpc_channel: Channel) -> Self { - let tx_client = M10TxServiceClient::new(grpc_channel.clone()); - let query_client = M10QueryServiceClient::new(grpc_channel); - Self { - tx_client, - query_client, - } - } - - pub fn transaction_request( - data: impl Into, - context_id: Vec, - ) -> sdk::TransactionRequestPayload { - let timestamp = SystemTime::now() - .duration_since(UNIX_EPOCH) - .unwrap() - .as_micros() as u64; - sdk::TransactionRequestPayload { - nonce: fastrand::u64(..), - timestamp, - context_id, - data: Some(TransactionData { - data: Some(data.into()), - }), - } - } - - pub async fn block_height(&mut self) -> Result { - let chain_info = self - .query_client - .get_chain_info(Request::new(())) - .await? - .into_inner(); - Ok(chain_info.block_height) - } - - pub async fn create_transaction( - &mut self, - payload: impl Into, - ) -> Result { - self.tx_client - .create_transaction(Request::new(payload.into())) - .await - .map(|res| res.into_inner()) - } - - pub async fn bulk_create_transactions( - &mut self, - payload: impl Into, - ) -> Result { - self.tx_client - .bulk_create_transactions(Request::new(payload.into())) - .await - .map(|res| res.into_inner()) - } - - // Transfers - pub async fn get_transfer( - &mut self, - request: SignedRequest, - ) -> Result { - self.query_client - .get_transfer(Request::new(request.into())) - .await - .map(|res| res.into_inner()) - } - - pub async fn list_transfers( - &mut self, - request: SignedRequest, - ) -> Result { - self.query_client - .list_transfers(Request::new(request.into())) - .await - .map(|res| res.into_inner()) - } - - // Actions - pub async fn get_action( - &mut self, - request: SignedRequest, - ) -> Result { - self.query_client - .get_action(Request::new(request.into())) - .await - .map(|res| res.into_inner()) - } - - pub async fn list_actions( - &mut self, - request: SignedRequest, - ) -> Result { - self.query_client - .list_actions(Request::new(request.into())) - .await - .map(|res| res.into_inner()) - } - - pub async fn get_transaction( - &mut self, - request: SignedRequest, - ) -> Result { - self.query_client - .get_transaction(Request::new(request.into())) - .await - .map(Response::into_inner) - } - - pub async fn list_transactions( - &mut self, - request: SignedRequest, - ) -> Result { - self.query_client - .list_transactions(Request::new(request.into())) - .await - .map(Response::into_inner) - } - - pub async fn group_transactions( - &mut self, - request: SignedRequest, - ) -> Result { - self.query_client - .group_transactions(Request::new(request.into())) - .await - .map(Response::into_inner) - } - - // Indexed Accounts - pub async fn get_indexed_account( - &mut self, - request: SignedRequest, - ) -> Result { - self.query_client - .get_indexed_account(Request::new(request.into())) - .await - .map(|res| res.into_inner()) - } - - // AccountSets - pub async fn get_account_set( - &mut self, - request: SignedRequest, - ) -> Result { - self.query_client - .get_account_set(Request::new(request.into())) - .await - .map(|res| res.into_inner()) - } - - pub async fn list_account_sets( - &mut self, - request: SignedRequest, - ) -> Result { - self.query_client - .list_account_sets(Request::new(request.into())) - .await - .map(|res| res.into_inner()) - } - - // Accounts - pub async fn get_account_metadata( - &mut self, - request: SignedRequest, - ) -> Result { - self.query_client - .get_account_metadata(Request::new(request.into())) - .await - .map(|res| res.into_inner()) - } - - pub async fn get_account_info( - &mut self, - request: SignedRequest, - ) -> Result { - self.query_client - .get_account_info(Request::new(request.into())) - .await - .map(|res| res.into_inner()) - } - - pub async fn list_account_metadata( - &mut self, - request: SignedRequest, - ) -> Result { - self.query_client - .list_account_metadata(Request::new(request.into())) - .await - .map(|res| res.into_inner()) - } - - // Role Bindings - pub async fn get_role_binding( - &mut self, - request: SignedRequest, - ) -> Result { - self.query_client - .get_role_binding(Request::new(request.into())) - .await - .map(|res| res.into_inner()) - } - - pub async fn list_role_bindings( - &mut self, - request: SignedRequest, - ) -> Result { - self.query_client - .list_role_bindings(Request::new(request.into())) - .await - .map(|res| res.into_inner()) - } - - // Roles - pub async fn get_role( - &mut self, - request: SignedRequest, - ) -> Result { - self.query_client - .get_role(Request::new(request.into())) - .await - .map(|res| res.into_inner()) - } - - pub async fn list_roles( - &mut self, - request: SignedRequest, - ) -> Result { - self.query_client - .list_roles(Request::new(request.into())) - .await - .map(|res| res.into_inner()) - } - - // Observations - pub async fn observe_transfers( - &self, - request: SignedRequest, - ) -> Result>, Status> { - self.query_client - .clone() - .observe_transfers(Request::new(request.into())) - .await - .map(tonic::Response::into_inner) - } - - pub async fn observe_resources( - &self, - request: SignedRequest, - ) -> Result>, Status> { - self.query_client - .clone() - .observe_resources(Request::new(request.into())) - .await - .map(tonic::Response::into_inner) - } - - pub async fn observe_accounts( - &self, - request: SignedRequest, - ) -> Result>, Status> { - self.query_client - .clone() - .observe_accounts(Request::new(request.into())) - .await - .map(tonic::Response::into_inner) - } - - pub async fn observe_actions( - &self, - request: SignedRequest, - ) -> Result>, Status> { - self.query_client - .clone() - .observe_actions(Request::new(request.into())) - .await - .map(tonic::Response::into_inner) - } - - pub async fn observe_metrics( - &self, - request: SignedRequest, - ) -> Result>, Status> { - self.query_client - .clone() - .observe_metrics(Request::new(request.into())) - .await - .map(tonic::Response::into_inner) - } - - pub async fn enhance_transfers( - &self, - transfers: Vec, - signer: &impl Signer, - ) -> Result, Status> { - futures_util::future::try_join_all( - transfers - .into_iter() - .map(|transfer| self.enhance_transfer(transfer, signer)), - ) - .await - } - - pub async fn enhance_transfer( - &self, - transfer: sdk::FinalizedTransfer, - signer: &impl Signer, - ) -> Result { - let mut enhanced_steps = Vec::default(); - for transfer_step in &transfer.transfer_steps { - enhanced_steps.push(self.enhance_transfer_step(transfer_step, signer).await?); - } - Ok(EnhancedTransfer { - enhanced_steps, - transfer, - }) - } - - async fn enhance_transfer_step( - &self, - transfer_step: &sdk::TransferStep, - signer: &impl Signer, - ) -> Result { - let from = async { - Result::<_, Status>::Ok( - self.query_client - .clone() - .get_account_info(Request::new( - signer - .sign_request(sdk::GetAccountRequest { - id: transfer_step.from_account_id.clone(), - }) - .await - .map_err(|err| Status::internal(err.to_string()))? - .into(), - )) - .await - .map(|res| res.into_inner()) - .ok(), - ) - }; - let to = async { - Result::<_, Status>::Ok( - self.query_client - .clone() - .get_account_info(Request::new( - signer - .sign_request(sdk::GetAccountRequest { - id: transfer_step.to_account_id.clone(), - }) - .await - .map_err(|err| Status::internal(err.to_string()))? - .into(), - )) - .await - .map(|res| res.into_inner()) - .ok(), - ) - }; - let (from, to) = futures_util::future::try_join(from, to).await?; - let from_bank = async { - if let Some(ref from) = from { - if from.parent_account_id.is_empty() { - Ok(None) - } else { - Result::, Status>::Ok( - self.query_client - .clone() - .get_account_info(Request::new( - signer - .sign_request(sdk::GetAccountRequest { - id: from.parent_account_id.clone(), - }) - .await - .map_err(|err| Status::internal(err.to_string()))? - .into(), - )) - .await - .map(|res| res.into_inner()) - .ok(), - ) - } - } else { - Ok(None) - } - }; - let to_bank = async { - if let Some(ref to) = to { - if to.parent_account_id.is_empty() { - Ok(None) - } else { - Result::, Status>::Ok( - self.query_client - .clone() - .get_account_info(Request::new( - signer - .sign_request(sdk::GetAccountRequest { - id: to.parent_account_id.clone(), - }) - .await - .map_err(|err| Status::internal(err.to_string()))? - .into(), - )) - .await - .map(|res| res.into_inner()) - .ok(), - ) - } - } else { - Ok(None) - } - }; - let (from_bank, to_bank) = futures_util::future::try_join(from_bank, to_bank).await?; - - Ok(EnhancedTransferStep { - from, - to, - from_bank, - to_bank, - }) - } - - pub async fn list_banks( - &self, - request: SignedRequest, - ) -> Result { - self.query_client - .clone() - .list_banks(Request::new(request.into())) - .await - .map(tonic::Response::into_inner) - } - - pub async fn get_bank( - &self, - request: SignedRequest, - ) -> Result { - self.query_client - .clone() - .get_bank(Request::new(request.into())) - .await - .map(tonic::Response::into_inner) - } - - pub async fn get_offline_key(&mut self) -> Result, tonic::Status> { - let key = self - .query_client - .get_offline_key(Request::new(())) - .await? - .into_inner(); - Ok(key.offline_pk) - } -} diff --git a/rust/sdk/src/lib.rs b/rust/sdk/src/lib.rs index 3186071..aadff10 100644 --- a/rust/sdk/src/lib.rs +++ b/rust/sdk/src/lib.rs @@ -2,18 +2,20 @@ mod document_id; #[cfg(feature = "account")] pub mod account; -#[cfg(feature = "client")] -pub mod client; #[cfg(feature = "collections")] mod collections; #[cfg(feature = "contract")] pub mod contract; #[cfg(feature = "client")] pub mod error; +#[cfg(feature = "client")] +mod grpc_client; +#[cfg(feature = "client")] +mod http_client; #[cfg(feature = "image")] pub mod image; -#[cfg(feature = "service")] -pub mod ledger_client; +#[cfg(feature = "client")] +mod m10_core_client; #[cfg(feature = "service")] pub mod transaction_ext; #[cfg(feature = "service")] @@ -31,6 +33,9 @@ mod builders; #[cfg(feature = "client")] mod types; +#[cfg(feature = "client")] +pub mod ws; + #[cfg(feature = "collections")] pub use collections::DocumentUpdate; @@ -55,14 +60,22 @@ pub use m10_protos::prost; pub use m10_protos::metadata::{self, *}; pub use m10_protos::{Collection, Pack}; +pub use bytes; + +#[cfg(feature = "service")] +pub use tonic; + #[cfg(feature = "image")] pub use image::ImageClient; -#[cfg(feature = "service")] -pub use ledger_client::LedgerClient; +#[cfg(feature = "client")] +pub use grpc_client::GrpcClient; + +#[cfg(feature = "client")] +pub use http_client::HttpClient; #[cfg(feature = "client")] -pub use client::M10Client; +pub use m10_core_client::*; #[cfg(feature = "service")] pub use transaction_ext::TransactionExt; diff --git a/rust/sdk/src/m10_core_client.rs b/rust/sdk/src/m10_core_client.rs new file mode 100644 index 0000000..b751655 --- /dev/null +++ b/rust/sdk/src/m10_core_client.rs @@ -0,0 +1,621 @@ +use core::convert::Into; +use std::{ + pin::Pin, + sync::Arc, + time::{SystemTime, UNIX_EPOCH}, +}; + +use async_trait::async_trait; +use futures_core::Stream; +use m10_protos::sdk; +use m10_signing::{SignedRequest, Signer}; + +use crate::{ + account::AccountId, builders::*, error::M10Result, transfer_ext::EnhancedTransfer, types::*, + DocumentId, EnhancedTransferStep, +}; + +#[async_trait] +pub trait M10CoreClient { + type Signer: Signer; + + // Signing + fn signer(&self) -> M10Result>; + + fn set_signer(&mut self, signer: Arc); + + async fn signed_transaction( + &self, + data: sdk::transaction_data::Data, + context_id: Vec, + ) -> M10Result> { + let timestamp = SystemTime::now().duration_since(UNIX_EPOCH)?.as_micros() as u64; + let req = sdk::TransactionRequestPayload { + nonce: fastrand::u64(..), + timestamp, + context_id, + data: Some(sdk::TransactionData { data: Some(data) }), + }; + let signed = self.signer()?.sign_request(req).await?; + Ok(signed) + } + + // Transactions + async fn create_transaction( + &self, + payload: sdk::RequestEnvelope, + ) -> M10Result; + + async fn bulk_create_transactions( + &self, + payload: sdk::BulkTransactions, + ) -> M10Result; + + async fn transfer(&self, data: sdk::CreateTransfer, context_id: Vec) -> M10Result { + let req = self.signed_transaction(data.into(), context_id).await?; + let response = self.create_transaction(req.into()).await?; + Ok(response.tx_id) + } + + async fn create_account( + &self, + data: sdk::CreateLedgerAccount, + context_id: Vec, + ) -> M10Result<(TxId, AccountId)> { + let req = self.signed_transaction(data.into(), context_id).await?; + let response = self.create_transaction(req.into()).await?; + let account_id = AccountId::try_from_be_slice(&response.account_created)?; + Ok((response.tx_id, account_id)) + } + + async fn initiate_transfer( + &self, + data: sdk::CreateTransfer, + context_id: Vec, + ) -> M10Result { + let req = self + .signed_transaction( + sdk::transaction_data::Data::InitiateTransfer(data), + context_id, + ) + .await?; + let response = self.create_transaction(req.into()).await?; + Ok(response.tx_id) + } + + async fn commit_transfer( + &self, + tx_id: TxId, + accept: bool, + context_id: Vec, + ) -> M10Result { + let req = self + .signed_transaction( + sdk::CommitTransfer { + pending_tx_id: tx_id, + new_state: if accept { + sdk::commit_transfer::TransferState::Accepted + } else { + sdk::commit_transfer::TransferState::Rejected + } as i32, + } + .into(), + context_id, + ) + .await?; + let response = self.create_transaction(req.into()).await?; + Ok(response.tx_id) + } + + async fn freeze_account( + &self, + account_id: AccountId, + frozen: bool, + context_id: Vec, + ) -> M10Result { + let req = self + .signed_transaction( + sdk::SetFreezeState { + account_id: account_id.to_vec(), + frozen, + } + .into(), + context_id, + ) + .await?; + let response = self.create_transaction(req.into()).await?; + Ok(response.tx_id) + } + + async fn set_account_limit( + &self, + account_id: AccountId, + limit: u64, + context_id: Vec, + ) -> M10Result { + let req = self + .signed_transaction( + sdk::SetBalanceLimit { + account_id: account_id.to_vec(), + balance_limit: limit, + } + .into(), + context_id, + ) + .await?; + let response = self.create_transaction(req.into()).await?; + Ok(response.tx_id) + } + + async fn set_account_instrument( + &self, + account_id: AccountId, + code: String, + decimals: u32, + description: Option, + context_id: Vec, + ) -> M10Result { + let req = self + .signed_transaction( + sdk::SetInstrument { + account_id: account_id.to_vec(), + code, + decimal_places: decimals, + description: description.unwrap_or_default(), + } + .into(), + context_id, + ) + .await?; + let response = self.create_transaction(req.into()).await?; + Ok(response.tx_id) + } + + async fn action(&self, data: sdk::InvokeAction, context_id: Vec) -> M10Result { + let req = self.signed_transaction(data.into(), context_id).await?; + let response = self.create_transaction(req.into()).await?; + Ok(response.tx_id) + } + + async fn documents( + &self, + data: sdk::DocumentOperations, + context_id: Vec, + ) -> M10Result { + let req = self.signed_transaction(data.into(), context_id).await?; + let response = self.create_transaction(req.into()).await?; + Ok(response.tx_id) + } + + async fn create_token( + &self, + account: AccountId, + value: u64, + address: Option>, + context_id: Vec, + ) -> M10Result<(TxId, Option)> { + let address = address.unwrap_or(self.signer()?.public_key().to_vec()); + let req = self + .signed_transaction( + sdk::CreateToken { + address, + account_id: account.to_vec(), + value, + } + .into(), + context_id, + ) + .await?; + let response = self.create_transaction(req.into()).await?; + Ok((response.tx_id, response.token)) + } + + async fn redeem_token( + &self, + token: sdk::RedeemableToken, + account_id: AccountId, + context_id: Vec, + ) -> M10Result { + let req = self + .signed_transaction( + sdk::RedeemToken { + token: Some(token), + account_id: account_id.to_vec(), + } + .into(), + context_id, + ) + .await?; + let response = self.create_transaction(req.into()).await?; + Ok(response.tx_id) + } + + // Queries + async fn get_block_height(&self) -> M10Result; + + async fn get_offline_key(&self) -> M10Result>; + + async fn get_account(&self, id: AccountId) -> M10Result; + + async fn get_indexed_account(&self, id: AccountId) -> M10Result; + + async fn get_account_info(&self, id: AccountId) -> M10Result; + + async fn get_raw_account_info(&self, id: Vec) -> M10Result; + + async fn list_accounts( + &self, + filter: PageBuilder, NameOrOwnerFilter>, + ) -> M10Result>; + + async fn get_transfer(&self, tx_id: TxId) -> M10Result; + + async fn get_raw_transfer(&self, tx_id: TxId) -> M10Result; + + async fn get_enhanced_transfer(&self, tx_id: TxId) -> M10Result; + + async fn get_enhanced_transfers( + &self, + filter: TxnFilter, + ) -> M10Result>; + + async fn list_transfers(&self, filter: TxnFilter) -> M10Result>; + + async fn list_raw_transfers( + &self, + filter: TxnFilter, + ) -> M10Result; + + async fn get_action(&self, tx_id: TxId) -> M10Result; + + async fn list_actions(&self, filter: TxnFilter) -> M10Result>; + + async fn list_transactions( + &self, + filter: TxnFilter, + ) -> M10Result>; + + async fn group_transactions( + &self, + filter: TxnFilter, + ) -> M10Result>>; + + async fn get_bank(&self, id: Vec) -> M10Result; + + async fn list_banks(&self, builder: PageBuilder>) -> M10Result>; + + async fn get_role(&self, id: Vec) -> M10Result; + + async fn list_roles(&self, builder: PageBuilder, NameFilter>) -> M10Result>; + + async fn get_role_binding(&self, id: Vec) -> M10Result; + + async fn list_role_bindings( + &self, + builder: PageBuilder, NameFilter>, + ) -> M10Result>; + + async fn get_account_set(&self, id: Vec) -> M10Result; + + async fn list_account_sets( + &self, + builder: PageBuilder, NameOrOwnerFilter>, + ) -> M10Result>; + + async fn get_account_metadata(&self, id: AccountId) -> M10Result; + + async fn list_account_metadata( + &self, + builder: PageBuilder, NameOrOwnerFilter>, + ) -> M10Result>; + + // Transfer Enhancing + async fn enhance_transfers( + &self, + transfers: Vec, + ) -> M10Result> { + futures_util::future::try_join_all( + transfers + .into_iter() + .map(|transfer| self.enhance_transfer(transfer)), + ) + .await + } + + async fn enhance_transfer( + &self, + transfer: sdk::FinalizedTransfer, + ) -> M10Result { + let mut enhanced_steps = Vec::default(); + for transfer_step in &transfer.transfer_steps { + enhanced_steps.push(self.enhance_transfer_step(transfer_step).await?); + } + Ok(EnhancedTransfer { + enhanced_steps, + transfer, + }) + } + + async fn enhance_transfer_step( + &self, + transfer_step: &sdk::TransferStep, + ) -> M10Result { + let from = async { + M10Result::Ok( + self.get_raw_account_info(transfer_step.from_account_id.clone()) + .await + .ok(), + ) + }; + let to = async { + Ok(self + .get_raw_account_info(transfer_step.to_account_id.clone()) + .await + .ok()) + }; + let (from, to) = futures_util::future::try_join(from, to).await?; + let from_bank = async { + if let Some(ref from) = from { + if from.parent_account_id.is_empty() { + Ok(None) + } else { + M10Result::Ok( + self.get_raw_account_info(from.parent_account_id.clone()) + .await + .ok(), + ) + } + } else { + Ok(None) + } + }; + let to_bank = async { + if let Some(ref to) = to { + if to.parent_account_id.is_empty() { + Ok(None) + } else { + M10Result::Ok( + self.get_raw_account_info(to.parent_account_id.clone()) + .await + .ok(), + ) + } + } else { + Ok(None) + } + }; + let (from_bank, to_bank) = futures_util::future::try_join(from_bank, to_bank).await?; + + Ok(EnhancedTransferStep { + from, + to, + from_bank, + to_bank, + }) + } + + // Observers + async fn observe_accounts( + &self, + filter: AccountFilter, + ) -> M10Result>> + Send + Sync + 'static>>>; + + async fn observe_transfers( + &self, + filter: AccountFilter, + ) -> M10Result>> + Send + Sync + 'static>>>; + + async fn observe_transactions( + &self, + filter: AccountFilter, + ) -> M10Result< + Pin> + Send + Sync + 'static>>, + >; + + async fn observe_actions( + &self, + filter: AccountFilter, + ) -> M10Result>> + Send + Sync + 'static>>>; + + async fn observe_raw_actions( + &self, + filter: AccountFilter, + ) -> M10Result< + Pin> + Send + Sync + 'static>>, + >; + + async fn observe_resources( + &self, + request: sdk::ObserveResourcesRequest, + ) -> M10Result< + Pin> + Send + Sync + 'static>>, + >; + + async fn observe_metrics( + &self, + filter: AccountFilter, + ) -> M10Result< + Pin> + Send + Sync + 'static>>, + >; +} + +// Convenient functions with "impl" parameters. +// They had to be removed from the trait to make it object safe. + +#[allow(clippy::borrowed_box)] +pub async fn signed_transaction, S: Signer>( + client: &Box + Send + Sync>, + data: D, + context_id: Vec, +) -> M10Result> { + client.signed_transaction(data.into(), context_id).await +} + +pub async fn signed_transaction_as( + data: sdk::transaction_data::Data, + context_id: Vec, + signer: Arc, +) -> M10Result> { + let timestamp = SystemTime::now().duration_since(UNIX_EPOCH)?.as_micros() as u64; + let req = sdk::TransactionRequestPayload { + nonce: fastrand::u64(..), + timestamp, + context_id, + data: Some(sdk::TransactionData { data: Some(data) }), + }; + let signed = signer.sign_request(req).await?; + Ok(signed) +} + +#[allow(clippy::borrowed_box)] +pub async fn create_transaction( + client: &Box + Send + Sync>, + payload: impl Into, +) -> M10Result { + client.create_transaction(payload.into()).await +} + +#[allow(clippy::borrowed_box)] +pub async fn bulk_create_transactions( + client: &Box + Send + Sync>, + payload: impl Into, +) -> M10Result { + client.bulk_create_transactions(payload.into()).await +} + +#[allow(clippy::borrowed_box)] +pub async fn transfer( + client: &Box + Send + Sync>, + builder: impl Into>, +) -> M10Result { + let builder = builder.into(); + let req = signed_transaction::( + client, + builder.value.into(), + builder.context_id, + ) + .await?; + let response = client.create_transaction(req.into()).await?; + Ok(response.tx_id) +} + +#[allow(clippy::borrowed_box)] +pub async fn create_account( + client: &Box + Send + Sync>, + builder: impl Into>, +) -> M10Result<(TxId, AccountId)> { + let builder = builder.into(); + let req = signed_transaction::( + client, + builder.value.into(), + builder.context_id, + ) + .await?; + let response = client.create_transaction(req.into()).await?; + let account_id = AccountId::try_from_be_slice(&response.account_created)?; + Ok((response.tx_id, account_id)) +} + +#[allow(clippy::borrowed_box)] +pub async fn initiate_transfer( + client: &Box + Send + Sync>, + builder: impl Into>, +) -> M10Result { + let builder = builder.into(); + let req = signed_transaction( + client, + sdk::transaction_data::Data::InitiateTransfer(builder.value.into()), + builder.context_id, + ) + .await?; + let response = client.create_transaction(req.into()).await?; + Ok(response.tx_id) +} + +#[allow(clippy::borrowed_box)] +pub async fn set_account_instrument( + client: &Box + Send + Sync>, + account_id: AccountId, + code: impl Into, + decimals: u32, + description: Option>, + context_id: Vec, +) -> M10Result { + let req = signed_transaction( + client, + sdk::SetInstrument { + account_id: account_id.to_vec(), + code: code.into(), + decimal_places: decimals, + description: description.map(|d| d.into()).unwrap_or_default(), + }, + context_id, + ) + .await?; + let response = client.create_transaction(req.into()).await?; + Ok(response.tx_id) +} + +#[allow(clippy::borrowed_box)] +pub async fn action( + client: &Box + Send + Sync>, + builder: impl Into>, +) -> M10Result { + let builder = builder.into(); + let req = signed_transaction::( + client, + builder.value.into(), + builder.context_id, + ) + .await?; + let response = client.create_transaction(req.into()).await?; + Ok(response.tx_id) +} + +#[allow(clippy::borrowed_box)] +pub async fn documents( + client: &Box + Send + Sync>, + builder: impl Into>, +) -> M10Result { + let builder = builder.into(); + let req = signed_transaction::( + client, + builder.value.into(), + builder.context_id, + ) + .await?; + let response = client.create_transaction(req.into()).await?; + Ok(response.tx_id) +} + +#[allow(clippy::borrowed_box)] +pub async fn get_bank( + client: &Box + Send + Sync>, + id: impl DocumentId, +) -> M10Result { + client.get_bank(id.into_vec()).await +} + +#[allow(clippy::borrowed_box)] +pub async fn get_role( + client: &Box + Send + Sync>, + id: impl DocumentId, +) -> M10Result { + client.get_role(id.into_vec()).await +} + +#[allow(clippy::borrowed_box)] +pub async fn get_role_binding( + client: &Box + Send + Sync>, + id: impl DocumentId, +) -> M10Result { + client.get_role_binding(id.into_vec()).await +} + +#[allow(clippy::borrowed_box)] +pub async fn get_account_set( + client: &Box + Send + Sync>, + id: impl DocumentId, +) -> M10Result { + client.get_account_set(id.into_vec()).await +} diff --git a/rust/sdk/src/types/account_metadata.rs b/rust/sdk/src/types/account_metadata.rs index 5d66024..ed862af 100644 --- a/rust/sdk/src/types/account_metadata.rs +++ b/rust/sdk/src/types/account_metadata.rs @@ -1,11 +1,11 @@ -use crate::account::AccountId; +use crate::collections::ResourceId; use crate::error::M10Error; use crate::types::PublicKey; use m10_protos::sdk; #[derive(Clone, Debug, serde::Serialize)] pub struct AccountMetadata { - pub id: AccountId, + pub id: ResourceId, pub owner: PublicKey, pub profile_image_url: String, pub name: String, @@ -31,7 +31,7 @@ impl TryFrom for AccountMetadata { fn try_from(meta: sdk::AccountMetadata) -> Result { Ok(Self { - id: AccountId::try_from_be_slice(&meta.id)?, + id: ResourceId::try_from(meta.id.as_ref())?, owner: PublicKey(meta.owner), profile_image_url: meta.profile_image_url, name: meta.name, diff --git a/rust/sdk/src/types/action.rs b/rust/sdk/src/types/action.rs index b973c83..9dd4b35 100644 --- a/rust/sdk/src/types/action.rs +++ b/rust/sdk/src/types/action.rs @@ -47,6 +47,7 @@ pub struct Action { pub tx_id: TxId, pub context_id: Vec, pub name: String, + pub from_account: AccountId, pub target: Target, pub payload: Vec, // @sadroeck TODO: Add timestamps to protobuf @@ -62,6 +63,7 @@ impl std::fmt::Display for Action { name, target, payload, + .. } = self; write!( f, @@ -76,11 +78,12 @@ impl TryFrom for Action { type Error = M10Error; fn try_from(action: sdk::Action) -> Result { - Ok(Action { + Ok(Self { tx_id: action.tx_id, context_id: action.context_id, // timestamp: UNIX_EPOCH + Duration::from_micros(action.timestamp), name: action.name, + from_account: AccountId::try_from_be_slice(&action.from_account)?, target: Target::try_from(action.target.unwrap())?, payload: action.payload, }) @@ -106,6 +109,7 @@ impl TryFrom for Action { context_id, // timestamp, name: action.name, + from_account: AccountId::try_from_be_slice(&action.from_account)?, target: Target::Any, payload: action.payload, }), diff --git a/rust/sdk/src/types/bank.rs b/rust/sdk/src/types/bank.rs index 6220f0f..8e5ec4d 100644 --- a/rust/sdk/src/types/bank.rs +++ b/rust/sdk/src/types/bank.rs @@ -1,3 +1,4 @@ +use crate::account::AccountId; use crate::collections::ResourceId; use crate::error::{M10Error, M10Result}; use crate::types::PublicKey; @@ -42,7 +43,7 @@ impl std::fmt::Display for Bank { )] #[derive(Clone, Debug, Serialize)] pub struct BankAccount { - pub id: ResourceId, + pub id: AccountId, pub account_type: BankAccountType, } @@ -76,7 +77,7 @@ impl TryFrom for BankAccount { fn try_from(account: BankAccountRef) -> Result { Ok(Self { - id: ResourceId::try_from(account.account_id.as_slice())?, + id: AccountId::try_from(account.account_id.as_slice())?, account_type: BankAccountType::from( sdk::bank_account_ref::BankAccountType::from_i32(account.account_type) .ok_or(M10Error::InvalidTransaction)?, diff --git a/rust/sdk/src/types/mod.rs b/rust/sdk/src/types/mod.rs index 0e025d9..eba665f 100644 --- a/rust/sdk/src/types/mod.rs +++ b/rust/sdk/src/types/mod.rs @@ -20,7 +20,6 @@ pub use public_key::*; pub use role::*; pub use role_binding::*; pub use transaction::*; -pub use transaction::*; pub use transfer::*; #[cfg(feature = "format")] diff --git a/rust/sdk/src/types/transaction.rs b/rust/sdk/src/types/transaction.rs index 0345ec4..4915c40 100644 --- a/rust/sdk/src/types/transaction.rs +++ b/rust/sdk/src/types/transaction.rs @@ -15,6 +15,28 @@ pub enum Transaction { Action(Action), } +impl Transaction { + pub fn context_id(&self) -> Vec { + match self { + Self::Transfer(t) | Self::InitiateTransfer(t) | Self::CommitTransfer(t) => { + t.context_id.to_vec() + } + Self::AccountUpdate(a) => a.context_id.to_vec(), + Self::DocumentOperations => vec![], + Self::Action(a) => a.context_id.to_vec(), + } + } + + pub fn tx_id(&self) -> u64 { + match self { + Self::Transfer(t) | Self::InitiateTransfer(t) | Self::CommitTransfer(t) => t.tx_id, + Self::AccountUpdate(a) => a.tx_id, + Self::DocumentOperations => 0, + Self::Action(a) => a.tx_id, + } + } +} + impl TryFrom for Transaction { type Error = M10Error; diff --git a/rust/sdk/src/types/transfer.rs b/rust/sdk/src/types/transfer.rs index 440d998..24327b3 100644 --- a/rust/sdk/src/types/transfer.rs +++ b/rust/sdk/src/types/transfer.rs @@ -67,7 +67,7 @@ impl TryFrom for TransferStep { } #[cfg_attr(feature = "format", derive(parse_display::Display))] -#[derive(Clone, Debug, Copy, Serialize)] +#[derive(Clone, Debug, Copy, Serialize, PartialEq, Eq)] pub enum TransferStatus { Pending, Accepted, diff --git a/rust/sdk/src/ws.rs b/rust/sdk/src/ws.rs new file mode 100644 index 0000000..618b89d --- /dev/null +++ b/rust/sdk/src/ws.rs @@ -0,0 +1,94 @@ +use futures_core::Stream; +use futures_util::{SinkExt as _, StreamExt}; +use std::pin::Pin; +use tokio_stream::wrappers::UnboundedReceiverStream; +use tonic::transport::{Endpoint, Uri}; + +use crate::error::{M10Error, M10Result}; +use m10_protos::prost::Message; +use m10_protos::sdk; +use tokio::sync::mpsc; +use tokio::sync::mpsc::UnboundedSender; +use tokio_tungstenite::connect_async; +use tokio_tungstenite::tungstenite::Message as WSMessage; + +#[derive(Clone)] +pub struct WSClient { + endpoint: Endpoint, +} + +impl WSClient { + pub fn new(endpoint: Endpoint) -> Self { + Self { endpoint } + } + + pub async fn observe_with_request( + &self, + ep: &str, + req: sdk::RequestEnvelope, + f: F, + ) -> M10Result> + Send + Sync + 'static>>> + where + F: FnMut(Vec) -> M10Result + Send + Sync + 'static, + { + let (msg_tx, msg_rx) = mpsc::unbounded_channel(); + + tokio::spawn({ + let msg_tx = msg_tx.clone(); + let base_url = self.endpoint.uri().clone(); + let endpoint = ep.to_string().clone(); + + async move { + if let Err(err) = observe_msgs(msg_tx, req, base_url, endpoint).await { + eprintln!("Failed to spawn WebSocket client thread: {}", err); + } + } + }); + + Ok(Box::pin(UnboundedReceiverStream::new(msg_rx).map(f))) + } +} + +async fn observe_msgs( + msg_tx: UnboundedSender>, + req: sdk::RequestEnvelope, + base_url: Uri, + endpoint: String, +) -> M10Result<()> { + let (mut ws, _) = connect_async(format!("{}ledger/ws/observe/{}", base_url, endpoint)) + .await + .map_err(M10Error::from)?; + + let mut req_body = vec![]; + req.encode(&mut req_body).expect("Failed to encode"); + + ws.send(req_body.into()).await.map_err(M10Error::from)?; + + while let Some(msg) = ws.next().await { + match msg { + Ok(WSMessage::Binary(bin)) => { + if msg_tx.send(bin).is_err() { + break; + } + } + + Ok(WSMessage::Ping(_)) => { + ws.send(WSMessage::Pong(Vec::new())) + .await + .map_err(M10Error::from)?; + } + + Err(e) => { + eprintln!( + "Error during listening messages from the WebSocket connection: {:?}", + e + ); + return Err(M10Error::WsError(e)); + } + + _ => {} + } + } + + Ok(()) +} diff --git a/rust/signing/Cargo.toml b/rust/signing/Cargo.toml index 39ec7ff..f8d19a7 100644 --- a/rust/signing/Cargo.toml +++ b/rust/signing/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "m10-signing" -version = "0.33.0" +version = "0.34.0" authors = ["Michael Wittner "] edition = "2021" description = "M10 utility library for request signing" @@ -11,7 +11,7 @@ repository = "https://github.com/m10io/sdk" [dependencies] async-trait = "0.1" base64 = "0.13" -m10-protos = { version = "0.33", path = "../protos" } +m10-protos = { version = "0.34", path = "../protos" } serde = { version = "1", default-features = false, features = ["alloc", "derive", "rc"] } ring = { version = "0.16", features = ["std"] } thiserror = "1" diff --git a/rust/signing/src/lib.rs b/rust/signing/src/lib.rs index 3dfc78e..22bb412 100644 --- a/rust/signing/src/lib.rs +++ b/rust/signing/src/lib.rs @@ -2,6 +2,8 @@ //! //! This library contains a set of wrappers and traits that allow users to easily sign and verify //! signatures +use core::str::FromStr; +use std::fmt; use m10_protos::{prost::Message, sdk}; @@ -102,6 +104,8 @@ pub trait Signer: Send + Sync { } /// A P256 or ED25519 key pair +#[derive(serde::Deserialize)] +#[serde(try_from = "String", into = "String")] pub enum KeyPair { P256(P256), Ed25519(Ed25519), @@ -130,3 +134,28 @@ impl Signer for KeyPair { } } } + +impl FromStr for KeyPair { + type Err = SigningError; + fn from_str(key_pair_enc: &str) -> Result { + Ed25519::from_str(key_pair_enc) + .map(KeyPair::Ed25519) + .or_else(|_| P256::from_str(key_pair_enc).map(KeyPair::P256)) + } +} + +impl TryFrom for KeyPair { + type Error = SigningError; + fn try_from(key_pair: String) -> Result { + key_pair.parse() + } +} + +impl fmt::Debug for KeyPair { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + match self { + KeyPair::P256(key_pair) => write!(f, "P256({:?})", key_pair.public_key()), + KeyPair::Ed25519(key_pair) => write!(f, "Ed25519({:?})", key_pair.public_key()), + } + } +}