diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 54794241a..f5b4d7226 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -28,8 +28,8 @@ /motoko/pub-sub/ @dfinity/growth /motoko/query_stats/ @dfinity/sdk /motoko/random_maze/ @dfinity/languages -/motoko/send_http_get/ @dfinity/networking -/motoko/send_http_post/ @dfinity/networking +/motoko/send_http_get/ @dfinity/growth +/motoko/send_http_post/ @dfinity/growth /motoko/superheroes/ @dfinity/growth /motoko/threshold-ecdsa/ @dfinity/crypto-team /motoko/threshold-schnorr/ @dfinity/crypto-team @@ -69,7 +69,6 @@ /rust/send_http_post/ @dfinity/growth /rust/simd/ @dfinity/execution /rust/threshold-ecdsa/ @dfinity/crypto-team -/rust/threshold-mock/ @dfinity/crypto-team /rust/threshold-schnorr/ @dfinity/crypto-team /rust/token_transfer/ @dfinity/growth /rust/token_transfer_from/ @dfinity/growth diff --git a/.github/workflows/provision-darwin.sh b/.github/workflows/provision-darwin.sh index 12191536c..f975226e9 100755 --- a/.github/workflows/provision-darwin.sh +++ b/.github/workflows/provision-darwin.sh @@ -18,7 +18,7 @@ rm node.pkg # Install DFINITY SDK. curl --location --output install-dfx.sh "https://raw.githubusercontent.com/dfinity/sdk/master/public/install-dfxvm.sh" -DFX_VERSION=${DFX_VERSION:=0.24.1} DFXVM_INIT_YES=true bash install-dfx.sh +DFX_VERSION=${DFX_VERSION:=0.24.2} DFXVM_INIT_YES=true bash install-dfx.sh rm install-dfx.sh echo "$HOME/Library/Application Support/org.dfinity.dfx/bin" >> $GITHUB_PATH source "$HOME/Library/Application Support/org.dfinity.dfx/env" diff --git a/.github/workflows/provision-linux.sh b/.github/workflows/provision-linux.sh index 90bc0dd50..2bc719595 100755 --- a/.github/workflows/provision-linux.sh +++ b/.github/workflows/provision-linux.sh @@ -13,7 +13,7 @@ rm install-node.sh # Install DFINITY SDK. wget --output-document install-dfx.sh "https://raw.githubusercontent.com/dfinity/sdk/master/public/install-dfxvm.sh" -DFX_VERSION=${DFX_VERSION:=0.24.1} DFXVM_INIT_YES=true bash install-dfx.sh +DFX_VERSION=${DFX_VERSION:=0.24.2} DFXVM_INIT_YES=true bash install-dfx.sh rm install-dfx.sh echo "$HOME/.local/share/dfx/bin" >> $GITHUB_PATH source "$HOME/.local/share/dfx/env" diff --git a/.github/workflows/rust-parallel-calls-example.yml b/.github/workflows/rust-parallel-calls-example.yml index 8c9355a5b..31847279e 100644 --- a/.github/workflows/rust-parallel-calls-example.yml +++ b/.github/workflows/rust-parallel-calls-example.yml @@ -42,3 +42,26 @@ jobs: dfx start --background make test popd + rust-parallel-calls-pocket-ic-linux: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v2 + with: + submodules: recursive + - name: Provision Linux + run: bash .github/workflows/provision-linux.sh + - name: Install PocketIC server + uses: dfinity/pocketic@main + - name: Test parallel calls with PocketIC + run: | + pushd rust/parallel_calls + cargo build --release --target wasm32-unknown-unknown -p callee + cargo build --release --target wasm32-unknown-unknown -p caller + export CALLER_WASM=$(cargo build --target wasm32-unknown-unknown -p caller --message-format=json \ + | jq -r 'select(.reason == "compiler-artifact") | .filenames[] | select(endswith(".wasm"))') + export CALLEE_WASM=$(cargo build --target wasm32-unknown-unknown -p callee --message-format=json \ + | jq -r 'select(.reason == "compiler-artifact") | .filenames[] | select(endswith(".wasm"))') + cargo run + popd + diff --git a/.github/workflows/rust-threshold-mock-example.yml b/.github/workflows/rust-threshold-mock-example.yml deleted file mode 100644 index 496f5e26d..000000000 --- a/.github/workflows/rust-threshold-mock-example.yml +++ /dev/null @@ -1,66 +0,0 @@ -name: rust-threshold-mock -on: - push: - branches: - - master - pull_request: - paths: - - rust/threshold-mock/** - - .github/workflows/provision-darwin.sh - - .github/workflows/provision-linux.sh - - .github/workflows/rust-threshold-mock-example.yml - - .ic-commit -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true -jobs: - rust-threshold-mock-darwin: - runs-on: macos-15 - steps: - - uses: actions/checkout@v1 - - name: Provision Darwin - run: bash .github/workflows/provision-darwin.sh - - name: Install PocketIC server Darwin - uses: dfinity/pocketic@main - with: - pocket-ic-server-version: "6.0.0" - - name: Build threshold-mock Darwin - run: | - pushd rust/threshold-mock - cargo build --target wasm32-unknown-unknown --release - popd - - name: Lint threshold-mock Darwin - run: | - pushd rust/threshold-mock - cargo fmt --all -- --check && cargo clippy --all-targets --all-features -- -D warnings - popd - - name: Test threshold-mock Darwin - run: | - pushd rust/threshold-mock - cargo test - popd - rust-threshold-mock-linux: - runs-on: ubuntu-20.04 - steps: - - uses: actions/checkout@v1 - - name: Provision Linux - run: bash .github/workflows/provision-linux.sh - - name: Install PocketIC server Linux - uses: dfinity/pocketic@main - with: - pocket-ic-server-version: "6.0.0" - - name: Build threshold-mock Linux - run: | - pushd rust/threshold-mock - cargo build --target wasm32-unknown-unknown --release - popd - - name: Lint threshold-mock Linux - run: | - pushd rust/threshold-mock - cargo fmt --all -- --check && cargo clippy --all-targets --all-features -- -D warnings - popd - - name: Test threshold-mock Linux - run: | - pushd rust/threshold-mock - cargo test - popd diff --git a/.github/workflows/update-ic-commit.yml b/.github/workflows/update-ic-commit.yml index 5671d2836..a2ba9b17d 100644 --- a/.github/workflows/update-ic-commit.yml +++ b/.github/workflows/update-ic-commit.yml @@ -11,6 +11,13 @@ jobs: ic-update: runs-on: ubuntu-latest steps: + - name: Create GitHub App Token + uses: actions/create-github-app-token@v1 + id: app-token + with: + app-id: ${{ vars.PR_AUTOMATION_BOT_PUBLIC_APP_ID }} + private-key: ${{ secrets.PR_AUTOMATION_BOT_PUBLIC_PRIVATE_KEY }} + - uses: actions/checkout@v4 # First, check if there is a newer version and update the file referencing the version @@ -68,7 +75,7 @@ jobs: if: ${{ steps.update.outputs.updated == '1' }} uses: peter-evans/create-pull-request@v6 with: - token: ${{ secrets.GIX_CREATE_PR_PAT }} + token: ${{ steps.app-token.outputs.token }} base: master add-paths: ./.ic-commit commit-message: Update commit of IC artifacts diff --git a/motoko/basic_bitcoin/README.md b/motoko/basic_bitcoin/README.md index 146a26b8a..f1857f9d9 100644 --- a/motoko/basic_bitcoin/README.md +++ b/motoko/basic_bitcoin/README.md @@ -50,7 +50,7 @@ curl -fsSL cli.mops.one/install.sh | sh ### Acquire cycles to deploy -Deploying to the Internet Computer requires [cycles](https://internetcomputer.org/docs/current/developer-docs/setup/cycles) (the equivalent of "gas" in other blockchains). You can get free cycles from the [cycles faucet](https://internetcomputer.org/docs/current/developer-docs/setup/cycles/cycles-faucet.md). +Deploying to the Internet Computer requires [cycles](https://internetcomputer.org/docs/current/developer-docs/getting-started/tokens-and-cycles) (the equivalent of "gas" on other blockchains). ### Deploy the smart contract to the Internet Computer @@ -211,7 +211,7 @@ reflected in your current balance. In this tutorial, you were able to: * Deploy a canister smart contract on the ICP blockchain that can receive & send Bitcoin. -* Use a cycles faucet to deploy the canister to ICP blockchain on the mainnet for free. +* Acquire cycles to deploy the canister to the ICP mainnet. * Connect the canister to the Bitcoin testnet. * Send the canister some testnet BTC. * Check the testnet BTC balance of the canister. diff --git a/motoko/send_http_get/src/send_http_get_backend/Types.mo b/motoko/send_http_get/src/send_http_get_backend/Types.mo deleted file mode 100644 index bd436aad8..000000000 --- a/motoko/send_http_get/src/send_http_get_backend/Types.mo +++ /dev/null @@ -1,71 +0,0 @@ -module Types { - - public type Timestamp = Nat64; - - //1. Type that describes the Request arguments for an HTTPS outcall - //See: https://internetcomputer.org/docs/current/references/ic-interface-spec/#ic-http_request - public type HttpRequestArgs = { - url : Text; - max_response_bytes : ?Nat64; - headers : [HttpHeader]; - body : ?[Nat8]; - method : HttpMethod; - transform : ?TransformRawResponseFunction; - }; - - public type HttpHeader = { - name : Text; - value : Text; - }; - - public type HttpMethod = { - #get; - #post; - #head; - }; - - public type HttpResponsePayload = { - status : Nat; - headers : [HttpHeader]; - body : [Nat8]; - }; - - //2. HTTPS outcalls have an optional "transform" key. These two types help describe it. - //"The transform function may, for example, transform the body in any way, add or remove headers, - //modify headers, etc. " - //See: https://internetcomputer.org/docs/current/references/ic-interface-spec/#ic-http_request - - - //2.1 This type describes a function called "TransformRawResponse" used in line 14 above - //"If provided, the calling canister itself must export this function." - //In this minimal example for a `GET` request, we declare the type for completeness, but - //we do not use this function. We will pass "null" to the HTTP request. - public type TransformRawResponseFunction = { - function : shared query TransformArgs -> async HttpResponsePayload; - context : Blob; - }; - - //2.2 These type describes the arguments the transform function needs - public type TransformArgs = { - response : HttpResponsePayload; - context : Blob; - }; - - public type CanisterHttpResponsePayload = { - status : Nat; - headers : [HttpHeader]; - body : [Nat8]; - }; - - public type TransformContext = { - function : shared query TransformArgs -> async HttpResponsePayload; - context : Blob; - }; - - - //3. Declaring the IC management canister which we use to make the HTTPS outcall - public type IC = actor { - http_request : HttpRequestArgs -> async HttpResponsePayload; - }; - -} diff --git a/motoko/send_http_get/src/send_http_get_backend/main.mo b/motoko/send_http_get/src/send_http_get_backend/main.mo index 7ef0be2b9..af0a39609 100644 --- a/motoko/send_http_get/src/send_http_get_backend/main.mo +++ b/motoko/send_http_get/src/send_http_get_backend/main.mo @@ -2,142 +2,114 @@ import Blob "mo:base/Blob"; import Cycles "mo:base/ExperimentalCycles"; import Nat64 "mo:base/Nat64"; import Text "mo:base/Text"; - -//import the custom types we have in Types.mo -import Types "Types"; - +import IC "ic:aaaaa-aa"; //Actor actor { -//This method sends a GET request to a URL with a free API we can test. -//This method returns Coinbase data on the exchange rate between USD and ICP -//for a certain day. -//The API response looks like this: -// [ -// [ -// 1682978460, <-- start timestamp -// 5.714, <-- lowest price during time range -// 5.718, <-- highest price during range -// 5.714, <-- price at open -// 5.714, <-- price at close -// 243.5678 <-- volume of ICP traded -// ], -// ] + //This method sends a GET request to a URL with a free API we can test. + //This method returns Coinbase data on the exchange rate between USD and ICP + //for a certain day. + //The API response looks like this: + // [ + // [ + // 1682978460, <-- start timestamp + // 5.714, <-- lowest price during time range + // 5.718, <-- highest price during range + // 5.714, <-- price at open + // 5.714, <-- price at close + // 243.5678 <-- volume of ICP traded + // ], + // ] //function to transform the response - public query func transform(raw : Types.TransformArgs) : async Types.CanisterHttpResponsePayload { - let transformed : Types.CanisterHttpResponsePayload = { - status = raw.response.status; - body = raw.response.body; - headers = [ - { - name = "Content-Security-Policy"; - value = "default-src 'self'"; - }, - { name = "Referrer-Policy"; value = "strict-origin" }, - { name = "Permissions-Policy"; value = "geolocation=(self)" }, - { - name = "Strict-Transport-Security"; - value = "max-age=63072000"; - }, - { name = "X-Frame-Options"; value = "DENY" }, - { name = "X-Content-Type-Options"; value = "nosniff" }, - ]; - }; - transformed; + public query func transform({ + context : Blob; + response : IC.http_request_result; + }) : async IC.http_request_result { + { + response with headers = []; // not intersted in the headers + }; }; - - public func get_icp_usd_exchange() : async Text { - //1. DECLARE IC MANAGEMENT CANISTER - //We need this so we can use it to make the HTTP request - let ic : Types.IC = actor ("aaaaa-aa"); - - //2. SETUP ARGUMENTS FOR HTTP GET request + public func get_icp_usd_exchange() : async Text { - // 2.1 Setup the URL and its query parameters + //1. SETUP ARGUMENTS FOR HTTP GET request let ONE_MINUTE : Nat64 = 60; - let start_timestamp : Types.Timestamp = 1682978460; //May 1, 2023 22:01:00 GMT + let start_timestamp : Nat64 = 1682978460; //May 1, 2023 22:01:00 GMT let host : Text = "api.exchange.coinbase.com"; let url = "https://" # host # "/products/ICP-USD/candles?start=" # Nat64.toText(start_timestamp) # "&end=" # Nat64.toText(start_timestamp) # "&granularity=" # Nat64.toText(ONE_MINUTE); - // 2.2 prepare headers for the system http_request call + // 1.2 prepare headers for the system http_request call let request_headers = [ - { name = "Host"; value = host # ":443" }, - { name = "User-Agent"; value = "exchange_rate_canister" }, + { name = "User-Agent"; value = "price-feed" }, ]; - // 2.2.1 Transform context - let transform_context : Types.TransformContext = { - function = transform; - context = Blob.fromArray([]); - }; - - // 2.3 The HTTP request - let http_request : Types.HttpRequestArgs = { - url = url; - max_response_bytes = null; //optional for request - headers = request_headers; - body = null; //optional for request - method = #get; - transform = ?transform_context; + // 1.3 The HTTP request + let http_request : IC.http_request_args = { + url = url; + max_response_bytes = null; //optional for request + headers = request_headers; + body = null; //optional for request + method = #get; + transform = ?{ + function = transform; + context = Blob.fromArray([]); + }; }; - //3. ADD CYCLES TO PAY FOR HTTP REQUEST + //2. ADD CYCLES TO PAY FOR HTTP REQUEST - //The IC specification spec says, "Cycles to pay for the call must be explicitly transferred with the call" //IC management canister will make the HTTP request so it needs cycles //See: https://internetcomputer.org/docs/current/motoko/main/cycles - + //The way Cycles.add() works is that it adds those cycles to the next asynchronous call - //"Function add(amount) indicates the additional amount of cycles to be transferred in the next remote call" - //See: https://internetcomputer.org/docs/current/references/ic-interface-spec/#ic-http_request + //See: + // - https://internetcomputer.org/docs/current/references/ic-interface-spec/#ic-http_request + // - https://internetcomputer.org/docs/current/references/https-outcalls-how-it-works#pricing + // - https://internetcomputer.org/docs/current/developer-docs/gas-cost Cycles.add(230_949_972_000); - - //4. MAKE HTTPS REQUEST AND WAIT FOR RESPONSE - //Since the cycles were added above, we can just call the IC management canister with HTTPS outcalls below - let http_response : Types.HttpResponsePayload = await ic.http_request(http_request); - - //5. DECODE THE RESPONSE - - //As per the type declarations in `src/Types.mo`, the BODY in the HTTP response - //comes back as [Nat8s] (e.g. [2, 5, 12, 11, 23]). Type signature: - - //public type HttpResponsePayload = { + + //3. MAKE HTTPS REQUEST AND WAIT FOR RESPONSE + let http_response : IC.http_request_result = await IC.http_request(http_request); + + //4. DECODE THE RESPONSE + + //As per the type declarations, the BODY in the HTTP response + //comes back as Blob. Type signature: + + //public type http_request_result = { // status : Nat; // headers : [HttpHeader]; - // body : [Nat8]; + // body : Blob; // }; - //We need to decode that [Nat8] array that is the body into readable text. + //We need to decode that Blob that is the body into readable text. //To do this, we: - // 1. Convert the [Nat8] into a Blob - // 2. Use Blob.decodeUtf8() method to convert the Blob to a ?Text optional - // 3. We use a switch to explicitly call out both cases of decoding the Blob into ?Text - let response_body: Blob = Blob.fromArray(http_response.body); - let decoded_text: Text = switch (Text.decodeUtf8(response_body)) { - case (null) { "No value returned" }; - case (?y) { y }; + // 1. Use Text.decodeUtf8() method to convert the Blob to a ?Text optional + // 2. We use a switch to explicitly call out both cases of decoding the Blob into ?Text + let decoded_text : Text = switch (Text.decodeUtf8(http_response.body)) { + case (null) { "No value returned" }; + case (?y) { y }; }; - //6. RETURN RESPONSE OF THE BODY + //5. RETURN RESPONSE OF THE BODY //The API response will looks like this: - + // // ("[[1682978460,5.714,5.718,5.714,5.714,243.5678]]") - - //Which can be formatted as this + // + //The API response looks like this: // [ // [ - // 1682978460, <-- start/timestamp - // 5.714, <-- low - // 5.718, <-- high - // 5.714, <-- open - // 5.714, <-- close - // 243.5678 <-- volume + // 1682978460, <-- start timestamp + // 5.714, <-- lowest price during time range + // 5.718, <-- highest price during range + // 5.714, <-- price at open + // 5.714, <-- price at close + // 243.5678 <-- volume of ICP traded // ], // ] - decoded_text + decoded_text; }; }; diff --git a/motoko/send_http_post/src/send_http_post_backend/Types.mo b/motoko/send_http_post/src/send_http_post_backend/Types.mo deleted file mode 100644 index 1f0b0710d..000000000 --- a/motoko/send_http_post/src/send_http_post_backend/Types.mo +++ /dev/null @@ -1,68 +0,0 @@ -module Types { - - //1. Type that describes the Request arguments for an HTTPS outcall - //See: https://internetcomputer.org/docs/current/references/ic-interface-spec/#ic-http_request - public type HttpRequestArgs = { - url : Text; - max_response_bytes : ?Nat64; - headers : [HttpHeader]; - body : ?[Nat8]; - method : HttpMethod; - transform : ?TransformRawResponseFunction; - }; - - public type HttpHeader = { - name : Text; - value : Text; - }; - - public type HttpMethod = { - #get; - #post; - #head; - }; - - public type HttpResponsePayload = { - status : Nat; - headers : [HttpHeader]; - body : [Nat8]; - }; - - //2. HTTPS outcalls have an optional "transform" key. These two types help describe it. - //"The transform function may, for example, transform the body in any way, add or remove headers, - //modify headers, etc. " - //See: https://internetcomputer.org/docs/current/references/ic-interface-spec/#ic-http_request - - //2.1 This type describes a function called "TransformRawResponse" used in line 14 above - //"If provided, the calling canister itself must export this function." - //In this minimal example for a GET request, we declare the type for completeness, but - //we do not use this function. We will pass "null" to the HTTP request. - public type TransformRawResponseFunction = { - function : shared query TransformArgs -> async HttpResponsePayload; - context : Blob; - }; - - //2.2 This type describes the arguments the transform function needs - public type TransformArgs = { - response : HttpResponsePayload; - context : Blob; - }; - - public type CanisterHttpResponsePayload = { - status : Nat; - headers : [HttpHeader]; - body : [Nat8]; - }; - - public type TransformContext = { - function : shared query TransformArgs -> async HttpResponsePayload; - context : Blob; - }; - - - //3. Declaring the IC management canister which we use to make the HTTPS outcall - public type IC = actor { - http_request : HttpRequestArgs -> async HttpResponsePayload; - }; - -} diff --git a/motoko/send_http_post/src/send_http_post_backend/main.mo b/motoko/send_http_post/src/send_http_post_backend/main.mo index 1e441394e..1526a99b9 100644 --- a/motoko/send_http_post/src/send_http_post_backend/main.mo +++ b/motoko/send_http_post/src/send_http_post_backend/main.mo @@ -1,139 +1,100 @@ -import Debug "mo:base/Debug"; import Blob "mo:base/Blob"; import Cycles "mo:base/ExperimentalCycles"; -import Array "mo:base/Array"; -import Nat8 "mo:base/Nat8"; import Text "mo:base/Text"; - -//import the custom types we have in Types.mo -import Types "Types"; +import IC "ic:aaaaa-aa"; actor { //function to transform the response - public query func transform(raw : Types.TransformArgs) : async Types.CanisterHttpResponsePayload { - let transformed : Types.CanisterHttpResponsePayload = { - status = raw.response.status; - body = raw.response.body; - headers = [ - { - name = "Content-Security-Policy"; - value = "default-src 'self'"; - }, - { - name = "Referrer-Policy"; - value = "strict-origin" - }, - { - name = "Permissions-Policy"; - value = "geolocation=(self)" }, - { - name = "Strict-Transport-Security"; - value = "max-age=63072000"; - }, - { - name = "X-Frame-Options"; - value = "DENY" - }, - { - name = "X-Content-Type-Options"; - value = "nosniff" - }, - ]; - }; - transformed; + public query func transform({ + context : Blob; + response : IC.http_request_result; + }) : async IC.http_request_result { + { + response with headers = []; // not intersted in the headers + }; }; -//PULIC METHOD -//This method sends a POST request to a URL with a free API we can test. + //PULIC METHOD + //This method sends a POST request to a URL with a free API we can test. public func send_http_post_request() : async Text { - //1. DECLARE IC MANAGEMENT CANISTER - //We need this so we can use it to make the HTTP request - let ic : Types.IC = actor ("aaaaa-aa"); - - //2. SETUP ARGUMENTS FOR HTTP GET request + //1. SETUP ARGUMENTS FOR HTTP GET request - // 2.1 Setup the URL and its query parameters + // 1.1 Setup the URL and its query parameters //This URL is used because it allows us to inspect the HTTP request sent from the canister let host : Text = "putsreq.com"; let url = "https://putsreq.com/aL1QS5IbaQd4NTqN3a81"; //HTTP that accepts IPV6 - // 2.2 prepare headers for the system http_request call + // 1.2 prepare headers for the system http_request call //idempotency keys should be unique so we create a function that generates them. - let idempotency_key: Text = generateUUID(); + let idempotency_key : Text = generateUUID(); let request_headers = [ - { name = "Host"; value = host # ":443" }, - { name = "User-Agent"; value = "http_post_sample" }, - { name= "Content-Type"; value = "application/json" }, - { name= "Idempotency-Key"; value = idempotency_key } + { name = "Host"; value = host # ":443" }, + { name = "User-Agent"; value = "http_post_sample" }, + { name = "Content-Type"; value = "application/json" }, + { name = "Idempotency-Key"; value = idempotency_key }, ]; - // The request body is an array of [Nat8] (see Types.mo) so we do the following: + // The request body is a Blob, so we do the following: // 1. Write a JSON string - // 2. Convert ?Text optional into a Blob, which is an intermediate reprepresentation before we cast it as an array of [Nat8] - // 3. Convert the Blob into an array [Nat8] - let request_body_json: Text = "{ \"name\" : \"Grogu\", \"force_sensitive\" : \"true\" }"; - let request_body_as_Blob: Blob = Text.encodeUtf8(request_body_json); - let request_body_as_nat8: [Nat8] = Blob.toArray(request_body_as_Blob); // e.g [34, 34,12, 0] - - - // 2.2.1 Transform context - let transform_context : Types.TransformContext = { - function = transform; - context = Blob.fromArray([]); - }; - - // 2.3 The HTTP request - let http_request : Types.HttpRequestArgs = { - url = url; - max_response_bytes = null; //optional for request - headers = request_headers; - //note: type of `body` is ?[Nat8] so we pass it here as "?request_body_as_nat8" instead of "request_body_as_nat8" - body = ?request_body_as_nat8; - method = #post; - transform = ?transform_context; + // 2. Convert Text into a Blob + let request_body_json : Text = "{ \"name\" : \"Grogu\", \"force_sensitive\" : \"true\" }"; + let request_body = Text.encodeUtf8(request_body_json); + + // 1.3 The HTTP request + let http_request : IC.http_request_args = { + url = url; + max_response_bytes = null; //optional for request + headers = request_headers; + //note: type of `body` is ?Blob so we pass it here as "?request_body" instead of "request_body" + body = ?request_body; + method = #post; + transform = ?{ + function = transform; + context = Blob.fromArray([]); + }; }; - //3. ADD CYCLES TO PAY FOR HTTP REQUEST + //2. ADD CYCLES TO PAY FOR HTTP REQUEST //IC management canister will make the HTTP request so it needs cycles //See: https://internetcomputer.org/docs/current/motoko/main/cycles - + //The way Cycles.add() works is that it adds those cycles to the next asynchronous call - //See: https://internetcomputer.org/docs/current/references/ic-interface-spec/#ic-http_request - Cycles.add(230_850_258_000); - - //4. MAKE HTTPS REQUEST AND WAIT FOR RESPONSE - //Since the cycles were added above, we can just call the IC management canister with HTTPS outcalls below - let http_response : Types.HttpResponsePayload = await ic.http_request(http_request); - - //5. DECODE THE RESPONSE - - //As per the type declarations in `Types.mo`, the BODY in the HTTP response - //comes back as [Nat8s] (e.g. [2, 5, 12, 11, 23]). Type signature: - - //public type HttpResponsePayload = { + //See: + // - https://internetcomputer.org/docs/current/references/ic-interface-spec/#ic-http_request + // - https://internetcomputer.org/docs/current/references/https-outcalls-how-it-works#pricing + // - https://internetcomputer.org/docs/current/developer-docs/gas-cost + Cycles.add(230_850_258_000); + + //3. MAKE HTTPS REQUEST AND WAIT FOR RESPONSE + let http_response : IC.http_request_result = await IC.http_request(http_request); + + //4. DECODE THE RESPONSE + + //As per the type declarations, the BODY in the HTTP response + //comes back as Blob. Type signature: + + //public type http_request_result = { // status : Nat; // headers : [HttpHeader]; - // body : [Nat8]; + // body : Blob; // }; - //We need to decode that [Na8] array that is the body into readable text. + //We need to decode that Blob that is the body into readable text. //To do this, we: - // 1. Convert the [Nat8] into a Blob - // 2. Use Blob.decodeUtf8() method to convert the Blob to a ?Text optional - // 3. We use Motoko syntax "Let... else" to unwrap what is returned from Text.decodeUtf8() - let response_body: Blob = Blob.fromArray(http_response.body); - let decoded_text: Text = switch (Text.decodeUtf8(response_body)) { - case (null) { "No value returned" }; - case (?y) { y }; + // 1. Use Text.decodeUtf8() method to convert the Blob to a ?Text optional + // 2. We use a switch to explicitly call out both cases of decoding the Blob into ?Text + let decoded_text : Text = switch (Text.decodeUtf8(http_response.body)) { + case (null) { "No value returned" }; + case (?y) { y }; }; - //6. RETURN RESPONSE OF THE BODY - let result: Text = decoded_text # ". See more info of the request sent at: " # url # "/inspect"; - result + //5. RETURN RESPONSE OF THE BODY + let result : Text = decoded_text # ". See more info of the request sent at: " # url # "/inspect"; + result; }; //PRIVATE HELPER FUNCTION @@ -142,5 +103,5 @@ actor { //For the purposes of this exercise, it returns a constant, but in practice it should return unique identifiers func generateUUID() : Text { "UUID-123456789"; - } + }; }; diff --git a/motoko/threshold-ecdsa/README.md b/motoko/threshold-ecdsa/README.md index d260a0f3d..13e24ae38 100644 --- a/motoko/threshold-ecdsa/README.md +++ b/motoko/threshold-ecdsa/README.md @@ -63,12 +63,12 @@ If you open the URL in a web browser, you will see a web UI that shows the publi To deploy this canister to the mainnet, one needs to do two things: -- Acquire cycles (the equivalent of "gas" in other blockchains). This is necessary for all canisters. +- Acquire cycles (the equivalent of "gas" on other blockchains). This is necessary for all canisters. - Update the sample source code to have the right key ID. This is unique to this canister. #### Acquire cycles to deploy -Deploying to the Internet Computer requires [cycles](https://internetcomputer.org/docs/current/developer-docs/setup/cycles). You can get free cycles from the [cycles faucet](https://internetcomputer.org/docs/current/developer-docs/setup/cycles/cycles-faucet.md). +Deploying to the Internet Computer requires [cycles](https://internetcomputer.org/docs/current/developer-docs/getting-started/tokens-and-cycles) (the equivalent of "gas" on other blockchains). #### Update source code with the right key ID diff --git a/motoko/threshold-schnorr/README.md b/motoko/threshold-schnorr/README.md index 0a94899e3..199eb7672 100644 --- a/motoko/threshold-schnorr/README.md +++ b/motoko/threshold-schnorr/README.md @@ -92,7 +92,7 @@ To deploy this canister the mainnet, one needs to do two things: #### Acquire cycles to deploy -Deploying to the Internet Computer requires [cycles](https://internetcomputer.org/docs/current/developer-docs/setup/cycles). You can get free cycles from the [cycles faucet](https://internetcomputer.org/docs/current/developer-docs/getting-started/cycles/cycles-faucet). +Deploying to the Internet Computer requires [cycles](https://internetcomputer.org/docs/current/developer-docs/getting-started/tokens-and-cycles) (the equivalent of "gas" on other blockchains). #### Update source code with the right key ID diff --git a/rust/basic_bitcoin/README.md b/rust/basic_bitcoin/README.md index eba8a8032..f43a1f5e7 100644 --- a/rust/basic_bitcoin/README.md +++ b/rust/basic_bitcoin/README.md @@ -49,7 +49,7 @@ cargo build --release --target wasm32-unknown-unknown ### Acquire cycles to deploy -Deploying to the Internet Computer requires [cycles](https://internetcomputer.org/docs/current/developer-docs/setup/cycles) (the equivalent of "gas" in other blockchains). You can get free cycles from the [cycles faucet](https://internetcomputer.org/docs/current/developer-docs/setup/cycles/cycles-faucet.md). +Deploying to the Internet Computer requires [cycles](https://internetcomputer.org/docs/current/developer-docs/getting-started/tokens-and-cycles) (the equivalent of "gas" on other blockchains). ### Deploy the smart contract to the Internet Computer @@ -238,7 +238,7 @@ dfx canister --network=ic call basic_bitcoin get_block_headers "(0: nat32, 11: n In this tutorial, you were able to: * Deploy a canister smart contract on the ICP blockchain that can receive & send bitcoin. -* Use a cycles faucet to deploy the canister to ICP blockchain on the mainnet for free. +* Acquire cycles to deploy the canister to the ICP mainnet. * Connect the canister to the Bitcoin testnet. * Send the canister some testnet BTC. * Check the testnet BTC balance of the canister. diff --git a/rust/basic_ethereum/README.md b/rust/basic_ethereum/README.md index d20e7c569..44e54fae5 100644 --- a/rust/basic_ethereum/README.md +++ b/rust/basic_ethereum/README.md @@ -43,10 +43,7 @@ git submodule update --init --recursive ### Acquire cycles to deploy -Deploying to the Internet Computer -requires [cycles](https://internetcomputer.org/docs/current/developer-docs/setup/cycles) (the equivalent of "gas" in -other blockchains). You can get free cycles from -the [cycles faucet](https://internetcomputer.org/docs/current/developer-docs/setup/cycles/cycles-faucet.md). +Deploying to the Internet Computer requires [cycles](https://internetcomputer.org/docs/current/developer-docs/getting-started/tokens-and-cycles) (the equivalent of "gas" on other blockchains). ### Deploy the smart contract to the Internet Computer @@ -156,7 +153,7 @@ to track the transaction on an Ethereum blockchain explorer. In this tutorial, you were able to: * Deploy a canister smart contract on the ICP blockchain that can receive and send ETH. -* Use a cycles faucet to deploy the canister to ICP blockchain on the mainnet for free. +* Acquire cycles to deploy the canister to the ICP mainnet. * Connect the canister to the Ethereum Sepolia testnet. * Send the canister some Sepolia ETH. * Use the canister to send ETH to another Ethereum address. diff --git a/rust/parallel_calls/Cargo.lock b/rust/parallel_calls/Cargo.lock index ab7aa7f46..9081004cc 100644 --- a/rust/parallel_calls/Cargo.lock +++ b/rust/parallel_calls/Cargo.lock @@ -138,7 +138,7 @@ name = "callee" version = "0.1.0" dependencies = [ "candid", - "ic-cdk 0.15.1", + "ic-cdk", ] [[package]] @@ -147,7 +147,7 @@ version = "0.1.0" dependencies = [ "candid", "futures", - "ic-cdk 0.15.1", + "ic-cdk", ] [[package]] @@ -480,12 +480,24 @@ dependencies = [ "tracing", ] +[[package]] +name = "half" +version = "1.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b43ede17f21864e81be2fa654110bf1e793774238d86ef8555c37e6519c0403" + [[package]] name = "hashbrown" version = "0.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3a9bfc1af68b1726ea47d3d5109de126281def866b33970e10fbab11b5dafab3" +[[package]] +name = "heck" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" + [[package]] name = "hermit-abi" version = "0.3.9" @@ -601,64 +613,60 @@ dependencies = [ [[package]] name = "ic-cdk" -version = "0.13.5" +version = "0.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b1da6a25b045f9da3c9459c0cb2b0700ac368ee16382975a17185a23b9c18ab" +checksum = "b2abdf9341da9f9f6b451a40609cb69645a05a8e9eb7784c16209f16f2c0f76f" dependencies = [ "candid", - "ic-cdk-macros 0.13.2", - "ic0 0.21.1", + "ic-cdk-macros", + "ic0", "serde", "serde_bytes", ] [[package]] -name = "ic-cdk" -version = "0.15.1" +name = "ic-cdk-macros" +version = "0.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "038ff230bf0fc8630943e3c52e989d248a7c89834ccb65da408fabc5817a475b" +checksum = "b8df41980e95dead28735ab0f748c75477b0c5eab37a09a5641c78ec406a1db0" dependencies = [ "candid", - "ic-cdk-macros 0.15.0", - "ic0 0.23.0", + "proc-macro2", + "quote", "serde", - "serde_bytes", + "serde_tokenstream", + "syn 2.0.87", ] [[package]] -name = "ic-cdk-macros" -version = "0.13.2" +name = "ic-certification" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a45800053d80a6df839a71aaea5797e723188c0b992618208ca3b941350c7355" +checksum = "e64ee3d8b6e81b51f245716d3e0badb63c283c00f3c9fb5d5219afc30b5bf821" dependencies = [ - "candid", - "proc-macro2", - "quote", + "hex", "serde", - "serde_tokenstream 0.1.7", - "syn 1.0.109", + "serde_bytes", + "sha2", ] [[package]] -name = "ic-cdk-macros" -version = "0.15.0" +name = "ic-transport-types" +version = "0.37.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3af44fb4ec3a4b18831c9d3303ca8fa2ace846c4022d50cb8df4122635d3782e" +checksum = "875dc4704780383112e8e8b5063a1b98de114321d0c7d3e7f635dcf360a57fba" dependencies = [ "candid", - "proc-macro2", - "quote", + "hex", + "ic-certification", + "leb128", "serde", - "serde_tokenstream 0.2.2", - "syn 2.0.87", + "serde_bytes", + "serde_repr", + "sha2", + "thiserror 1.0.69", ] -[[package]] -name = "ic0" -version = "0.21.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a54b5297861c651551676e8c43df805dad175cc33bc97dbd992edbbb85dcbcdf" - [[package]] name = "ic0" version = "0.23.0" @@ -1069,25 +1077,31 @@ checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] name = "pocket-ic" -version = "5.0.0" +version = "6.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "beff607d4dbebff8d003453ced669d2645e905de496ca93713f3d47633357e6c" +checksum = "124a2380ca6f557adf8b02517cbfd2f564113230e14cda6f6aadd3dfe156293c" dependencies = [ "base64 0.13.1", "candid", "hex", - "ic-cdk 0.13.5", + "ic-certification", + "ic-transport-types", "reqwest", "schemars", "serde", "serde_bytes", + "serde_cbor", "serde_json", "sha2", "slog", + "strum", + "strum_macros", + "thiserror 1.0.69", "tokio", "tracing", "tracing-appender", "tracing-subscriber", + "wslpath", ] [[package]] @@ -1502,6 +1516,16 @@ dependencies = [ "serde", ] +[[package]] +name = "serde_cbor" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2bef2ebfde456fb76bbcf9f59315333decc4fda0b2b44b420243c11e0f5ec1f5" +dependencies = [ + "half", + "serde", +] + [[package]] name = "serde_derive" version = "1.0.215" @@ -1537,14 +1561,14 @@ dependencies = [ ] [[package]] -name = "serde_tokenstream" -version = "0.1.7" +name = "serde_repr" +version = "0.1.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "797ba1d80299b264f3aac68ab5d12e5825a561749db4df7cd7c8083900c5d4e9" +checksum = "6c64451ba24fc7a6a2d60fc75dd9c83c90903b19028d4eff35e88fc1e86564e9" dependencies = [ "proc-macro2", - "serde", - "syn 1.0.109", + "quote", + "syn 2.0.87", ] [[package]] @@ -1665,6 +1689,28 @@ dependencies = [ "windows-sys 0.59.0", ] +[[package]] +name = "strum" +version = "0.26.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8fec0f0aef304996cf250b31b5a10dee7980c85da9d759361292b8bca5a18f06" +dependencies = [ + "strum_macros", +] + +[[package]] +name = "strum_macros" +version = "0.26.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c6bee85a5a24955dc440386795aa378cd9cf82acd5f764469152d2270e581be" +dependencies = [ + "heck", + "proc-macro2", + "quote", + "rustversion", + "syn 2.0.87", +] + [[package]] name = "subtle" version = "2.6.1" @@ -2323,6 +2369,12 @@ version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e9df38ee2d2c3c5948ea468a8406ff0db0b29ae1ffde1bcf20ef305bcc95c51" +[[package]] +name = "wslpath" +version = "0.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04a2ecdf2cc4d33a6a93d71bcfbc00bb1f635cdb8029a2cc0709204a045ec7a3" + [[package]] name = "yoke" version = "0.7.4" diff --git a/rust/parallel_calls/src/callee/Cargo.toml b/rust/parallel_calls/src/callee/Cargo.toml index 7e14cb100..e684c1f6c 100644 --- a/rust/parallel_calls/src/callee/Cargo.toml +++ b/rust/parallel_calls/src/callee/Cargo.toml @@ -10,4 +10,4 @@ crate-type = ["cdylib"] [dependencies] candid = "0.10" -ic-cdk = "0.15" +ic-cdk = "0.17" diff --git a/rust/parallel_calls/src/caller/Cargo.toml b/rust/parallel_calls/src/caller/Cargo.toml index 5ac98faa6..6e7a5d508 100644 --- a/rust/parallel_calls/src/caller/Cargo.toml +++ b/rust/parallel_calls/src/caller/Cargo.toml @@ -10,5 +10,5 @@ crate-type = ["cdylib"] [dependencies] candid = "0.10" -ic-cdk = "0.15" +ic-cdk = "0.17" futures = "0.3" diff --git a/rust/parallel_calls/src/multi_subnet/Cargo.toml b/rust/parallel_calls/src/multi_subnet/Cargo.toml index 204c580da..aeff580fd 100644 --- a/rust/parallel_calls/src/multi_subnet/Cargo.toml +++ b/rust/parallel_calls/src/multi_subnet/Cargo.toml @@ -6,5 +6,5 @@ edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -pocket-ic = "5.0.0" +pocket-ic = "6.0.0" candid = "0.10" diff --git a/rust/parallel_calls/src/multi_subnet/src/main.rs b/rust/parallel_calls/src/multi_subnet/src/main.rs index 10855b8e8..188d82df2 100644 --- a/rust/parallel_calls/src/multi_subnet/src/main.rs +++ b/rust/parallel_calls/src/multi_subnet/src/main.rs @@ -2,7 +2,7 @@ use candid::{decode_one, encode_one, Principal}; use pocket_ic::{PocketIcBuilder, WasmResult}; use std::time::Instant; -const INIT_CYCLES: u128 = 2_000_000_000_000; +const INIT_CYCLES: u128 = 10_000_000_000_000; fn main() { let num_calls: u64 = 90; @@ -58,6 +58,9 @@ fn main() { }; let parallel_duration = parallel_start.elapsed(); + assert_eq!(sequential_num_calls, num_calls, "Some sequential calls failed"); + assert_eq!(parallel_num_calls, num_calls, "Some parallel calls failed"); + println!( "Sequential calls: {}/{} successful calls in {:?}", sequential_num_calls, num_calls, sequential_duration diff --git a/rust/parallel_calls/src/parallel_calls_backend/Cargo.toml b/rust/parallel_calls/src/parallel_calls_backend/Cargo.toml deleted file mode 100644 index dc733daa9..000000000 --- a/rust/parallel_calls/src/parallel_calls_backend/Cargo.toml +++ /dev/null @@ -1,14 +0,0 @@ -[package] -name = "parallel_calls_backend" -version = "0.1.0" -edition = "2021" - -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html - -[lib] -crate-type = ["cdylib"] - -[dependencies] -candid = "0.10" -ic-cdk = "0.15" -ic-cdk-timers = "0.7" # Feel free to remove this dependency if you don't need timers diff --git a/rust/parallel_calls/src/parallel_calls_backend/parallel_calls_backend.did b/rust/parallel_calls/src/parallel_calls_backend/parallel_calls_backend.did deleted file mode 100644 index aa419a250..000000000 --- a/rust/parallel_calls/src/parallel_calls_backend/parallel_calls_backend.did +++ /dev/null @@ -1,3 +0,0 @@ -service : { - "greet": (text) -> (text) query; -} diff --git a/rust/parallel_calls/src/parallel_calls_backend/src/lib.rs b/rust/parallel_calls/src/parallel_calls_backend/src/lib.rs deleted file mode 100644 index 84cbb822a..000000000 --- a/rust/parallel_calls/src/parallel_calls_backend/src/lib.rs +++ /dev/null @@ -1,8 +0,0 @@ -#[ic_cdk::update] - -#[ic_cdk::update] -pub async fn sequential_calls(n: u64) -> String { - for i in 0..n { - mirror(i).await; - } -} diff --git a/rust/threshold-ecdsa/README.md b/rust/threshold-ecdsa/README.md index 98ae81a3b..9b699c21d 100644 --- a/rust/threshold-ecdsa/README.md +++ b/rust/threshold-ecdsa/README.md @@ -66,7 +66,7 @@ To deploy this canister the mainnet, one needs to do two things: #### Acquire cycles to deploy -Deploying to the Internet Computer requires [cycles](https://internetcomputer.org/docs/current/developer-docs/setup/cycles). You can get free cycles from the [cycles faucet](https://internetcomputer.org/docs/current/developer-docs/setup/cycles/cycles-faucet.md). +Deploying to the Internet Computer requires [cycles](https://internetcomputer.org/docs/current/developer-docs/getting-started/tokens-and-cycles) (the equivalent of "gas" on other blockchains). #### Update source code with the right key ID diff --git a/rust/threshold-mock/.gitignore b/rust/threshold-mock/.gitignore deleted file mode 100644 index b662ab841..000000000 --- a/rust/threshold-mock/.gitignore +++ /dev/null @@ -1,17 +0,0 @@ -# Various IDEs and Editors -.vscode/ -.idea/ -**/*~ - -# Mac OSX temporary files -.DS_Store -**/.DS_Store - -# dfx temporary files -.dfx/ - -# rust -target/ - -# environment variables -.env \ No newline at end of file diff --git a/rust/threshold-mock/CONTRIBUTING.md b/rust/threshold-mock/CONTRIBUTING.md deleted file mode 100644 index bbbaea5c4..000000000 --- a/rust/threshold-mock/CONTRIBUTING.md +++ /dev/null @@ -1,20 +0,0 @@ -# Contributing - -## Contributing code changes - -This repository is currently not open to direct contributions. However, if you want to contribute a feature or bug fix, please **reach out to us** so that we can discuss feasibility and implementation strategies. You can reach out to us: - -- on the [forum] -- by opening [GitHub issues] - -Make sure to read the [README] and [LICENSE] first. - -## Bug reports - -We always appreciate bug reports through [GitHub issues]. - -[GitHub issues]: https://github.com/dfinity/TODO/issues -[forum]: https://forum.dfinity.org/ -[LICENSE]: LICENSE -[HACKING]: HACKING.md -[README]: README.md diff --git a/rust/threshold-mock/Cargo.lock b/rust/threshold-mock/Cargo.lock deleted file mode 100644 index 90bcc0243..000000000 --- a/rust/threshold-mock/Cargo.lock +++ /dev/null @@ -1,2624 +0,0 @@ -# This file is automatically @generated by Cargo. -# It is not intended for manual editing. -version = 3 - -[[package]] -name = "addr2line" -version = "0.24.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfbe277e56a376000877090da837660b4427aad530e3028d44e0bffe4f89a1c1" -dependencies = [ - "gimli", -] - -[[package]] -name = "adler2" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" - -[[package]] -name = "aho-corasick" -version = "1.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" -dependencies = [ - "memchr", -] - -[[package]] -name = "anyhow" -version = "1.0.91" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c042108f3ed77fd83760a5fd79b53be043192bb3b9dba91d8c574c0ada7850c8" - -[[package]] -name = "arrayvec" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b" - -[[package]] -name = "assert_matches" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b34d609dfbaf33d6889b2b7106d3ca345eacad44200913df5ba02bfd31d2ba9" - -[[package]] -name = "atomic-waker" -version = "1.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" - -[[package]] -name = "autocfg" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" - -[[package]] -name = "backtrace" -version = "0.3.74" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d82cb332cdfaed17ae235a638438ac4d4839913cc2af585c3c6746e8f8bee1a" -dependencies = [ - "addr2line", - "cfg-if", - "libc", - "miniz_oxide", - "object", - "rustc-demangle", - "windows-targets", -] - -[[package]] -name = "base16ct" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf" - -[[package]] -name = "base64" -version = "0.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" - -[[package]] -name = "base64" -version = "0.22.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" - -[[package]] -name = "base64ct" -version = "1.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" - -[[package]] -name = "binread" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16598dfc8e6578e9b597d9910ba2e73618385dc9f4b1d43dd92c349d6be6418f" -dependencies = [ - "binread_derive", - "lazy_static", - "rustversion", -] - -[[package]] -name = "binread_derive" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d9672209df1714ee804b1f4d4f68c8eb2a90b1f7a07acf472f88ce198ef1fed" -dependencies = [ - "either", - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "bitflags" -version = "2.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" - -[[package]] -name = "block-buffer" -version = "0.10.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" -dependencies = [ - "generic-array", -] - -[[package]] -name = "bumpalo" -version = "3.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" - -[[package]] -name = "byteorder" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" - -[[package]] -name = "bytes" -version = "1.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ac0150caa2ae65ca5bd83f25c7de183dea78d4d366469f148435e2acfbad0da" - -[[package]] -name = "candid" -version = "0.10.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c30ee7f886f296b6422c0ff017e89dd4f831521dfdcc76f3f71aae1ce817222" -dependencies = [ - "anyhow", - "binread", - "byteorder", - "candid_derive", - "hex", - "ic_principal", - "leb128", - "num-bigint", - "num-traits", - "paste", - "pretty", - "serde", - "serde_bytes", - "stacker", - "thiserror", -] - -[[package]] -name = "candid_derive" -version = "0.6.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3de398570c386726e7a59d9887b68763c481477f9a043fb998a2e09d428df1a9" -dependencies = [ - "lazy_static", - "proc-macro2", - "quote", - "syn 2.0.85", -] - -[[package]] -name = "cc" -version = "1.1.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2e7962b54006dcfcc61cb72735f4d89bb97061dd6a7ed882ec6b8ee53714c6f" -dependencies = [ - "shlex", -] - -[[package]] -name = "cfg-if" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" - -[[package]] -name = "cfg_aliases" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" - -[[package]] -name = "chainkey_testing_canister" -version = "0.1.0" -dependencies = [ - "assert_matches", - "candid", - "ed25519-dalek", - "getrandom", - "hex", - "ic-cdk 0.16.0", - "ic-cdk-timers", - "ic-crypto-ed25519", - "ic-crypto-internal-bls12-381-type", - "ic-crypto-internal-bls12-381-vetkd", - "ic-crypto-secp256k1", - "ic-stable-structures", - "ic-vetkd-utils", - "k256", - "lazy_static", - "pocket-ic", - "rand", - "rand_chacha", - "serde", -] - -[[package]] -name = "const-oid" -version = "0.9.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" - -[[package]] -name = "core-foundation" -version = "0.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" -dependencies = [ - "core-foundation-sys", - "libc", -] - -[[package]] -name = "core-foundation-sys" -version = "0.8.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" - -[[package]] -name = "cpufeatures" -version = "0.2.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "608697df725056feaccfa42cffdaeeec3fccc4ffc38358ecd19b243e716a78e0" -dependencies = [ - "libc", -] - -[[package]] -name = "crc32fast" -version = "1.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a97769d94ddab943e4510d138150169a2758b5ef3eb191a9ee688de3e23ef7b3" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "crossbeam-channel" -version = "0.5.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33480d6946193aa8033910124896ca395333cae7e2d1113d1fef6c3272217df2" -dependencies = [ - "crossbeam-utils", -] - -[[package]] -name = "crossbeam-utils" -version = "0.8.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80" - -[[package]] -name = "crypto-bigint" -version = "0.5.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0dc92fb57ca44df6db8059111ab3af99a63d5d0f8375d9972e319a379c6bab76" -dependencies = [ - "generic-array", - "rand_core", - "subtle", - "zeroize", -] - -[[package]] -name = "crypto-common" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" -dependencies = [ - "generic-array", - "typenum", -] - -[[package]] -name = "curve25519-dalek" -version = "4.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97fb8b7c4503de7d6ae7b42ab72a5a59857b4c937ec27a3d4539dba95b5ab2be" -dependencies = [ - "cfg-if", - "cpufeatures", - "curve25519-dalek-derive", - "digest", - "fiat-crypto", - "group", - "rand_core", - "rustc_version", - "subtle", - "zeroize", -] - -[[package]] -name = "curve25519-dalek-derive" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.85", -] - -[[package]] -name = "data-encoding" -version = "2.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8566979429cf69b49a5c740c60791108e86440e8be149bbea4fe54d2c32d6e2" - -[[package]] -name = "der" -version = "0.7.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f55bf8e7b65898637379c1b74eb1551107c8294ed26d855ceb9fd1a09cfc9bc0" -dependencies = [ - "const-oid", - "pem-rfc7468", - "zeroize", -] - -[[package]] -name = "deranged" -version = "0.3.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4" -dependencies = [ - "powerfmt", -] - -[[package]] -name = "digest" -version = "0.10.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" -dependencies = [ - "block-buffer", - "const-oid", - "crypto-common", - "subtle", -] - -[[package]] -name = "dyn-clone" -version = "1.0.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d6ef0072f8a535281e4876be788938b528e9a1d43900b82c2569af7da799125" - -[[package]] -name = "ecdsa" -version = "0.16.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee27f32b5c5292967d2d4a9d7f1e0b0aed2c15daded5a60300e4abb9d8020bca" -dependencies = [ - "der", - "digest", - "elliptic-curve", - "rfc6979", - "signature", - "spki", -] - -[[package]] -name = "ed25519" -version = "2.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "115531babc129696a58c64a4fef0a8bf9e9698629fb97e9e40767d235cfbcd53" -dependencies = [ - "pkcs8", - "signature", -] - -[[package]] -name = "ed25519-dalek" -version = "2.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a3daa8e81a3963a60642bcc1f90a670680bd4a77535faa384e9d1c79d620871" -dependencies = [ - "curve25519-dalek", - "ed25519", - "merlin", - "rand_core", - "serde", - "sha2", - "signature", - "subtle", - "zeroize", -] - -[[package]] -name = "either" -version = "1.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" - -[[package]] -name = "elliptic-curve" -version = "0.13.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5e6043086bf7973472e0c7dff2142ea0b680d30e18d9cc40f267efbf222bd47" -dependencies = [ - "base16ct", - "crypto-bigint", - "digest", - "ff", - "generic-array", - "group", - "pem-rfc7468", - "pkcs8", - "rand_core", - "sec1", - "subtle", - "zeroize", -] - -[[package]] -name = "equivalent" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" - -[[package]] -name = "erased-serde" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c138974f9d5e7fe373eb04df7cae98833802ae4b11c24ac7039a21d5af4b26c" -dependencies = [ - "serde", -] - -[[package]] -name = "ff" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ded41244b729663b1e574f1b4fb731469f69f79c17667b5d776b16cda0479449" -dependencies = [ - "rand_core", - "subtle", -] - -[[package]] -name = "fiat-crypto" -version = "0.2.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28dea519a9695b9977216879a3ebfddf92f1c08c05d984f8996aecd6ecdc811d" - -[[package]] -name = "fnv" -version = "1.0.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" - -[[package]] -name = "form_urlencoded" -version = "1.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" -dependencies = [ - "percent-encoding", -] - -[[package]] -name = "futures" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65bc07b1a8bc7c85c5f2e110c476c7389b4554ba72af57d8445ea63a576b0876" -dependencies = [ - "futures-channel", - "futures-core", - "futures-executor", - "futures-io", - "futures-sink", - "futures-task", - "futures-util", -] - -[[package]] -name = "futures-channel" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" -dependencies = [ - "futures-core", - "futures-sink", -] - -[[package]] -name = "futures-core" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" - -[[package]] -name = "futures-executor" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e28d1d997f585e54aebc3f97d39e72338912123a67330d723fdbb564d646c9f" -dependencies = [ - "futures-core", - "futures-task", - "futures-util", -] - -[[package]] -name = "futures-io" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" - -[[package]] -name = "futures-macro" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.85", -] - -[[package]] -name = "futures-sink" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" - -[[package]] -name = "futures-task" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" - -[[package]] -name = "futures-util" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" -dependencies = [ - "futures-channel", - "futures-core", - "futures-io", - "futures-macro", - "futures-sink", - "futures-task", - "memchr", - "pin-project-lite", - "pin-utils", - "slab", -] - -[[package]] -name = "generic-array" -version = "0.14.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" -dependencies = [ - "typenum", - "version_check", - "zeroize", -] - -[[package]] -name = "getrandom" -version = "0.2.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" -dependencies = [ - "cfg-if", - "libc", - "wasi", -] - -[[package]] -name = "gimli" -version = "0.31.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" - -[[package]] -name = "group" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" -dependencies = [ - "ff", - "rand_core", - "subtle", -] - -[[package]] -name = "h2" -version = "0.4.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "524e8ac6999421f49a846c2d4411f337e53497d8ec55d67753beffa43c5d9205" -dependencies = [ - "atomic-waker", - "bytes", - "fnv", - "futures-core", - "futures-sink", - "http", - "indexmap", - "slab", - "tokio", - "tokio-util", - "tracing", -] - -[[package]] -name = "hashbrown" -version = "0.15.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e087f84d4f86bf4b218b927129862374b72199ae7d8657835f1e89000eea4fb" - -[[package]] -name = "hermit-abi" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" - -[[package]] -name = "hex" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" -dependencies = [ - "serde", -] - -[[package]] -name = "hkdf" -version = "0.12.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b5f8eb2ad728638ea2c7d47a21db23b7b58a72ed6a38256b8a1849f15fbbdf7" -dependencies = [ - "hmac", -] - -[[package]] -name = "hmac" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" -dependencies = [ - "digest", -] - -[[package]] -name = "http" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21b9ddb458710bc376481b842f5da65cdf31522de232c1ca8146abce2a358258" -dependencies = [ - "bytes", - "fnv", - "itoa", -] - -[[package]] -name = "http-body" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" -dependencies = [ - "bytes", - "http", -] - -[[package]] -name = "http-body-util" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "793429d76616a256bcb62c2a2ec2bed781c8307e797e2598c50010f2bee2544f" -dependencies = [ - "bytes", - "futures-util", - "http", - "http-body", - "pin-project-lite", -] - -[[package]] -name = "httparse" -version = "1.9.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d71d3574edd2771538b901e6549113b4006ece66150fb69c0fb6d9a2adae946" - -[[package]] -name = "hyper" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbbff0a806a4728c99295b254c8838933b5b082d75e3cb70c8dab21fdfbcfa9a" -dependencies = [ - "bytes", - "futures-channel", - "futures-util", - "h2", - "http", - "http-body", - "httparse", - "itoa", - "pin-project-lite", - "smallvec", - "tokio", - "want", -] - -[[package]] -name = "hyper-rustls" -version = "0.27.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08afdbb5c31130e3034af566421053ab03787c640246a446327f550d11bcb333" -dependencies = [ - "futures-util", - "http", - "hyper", - "hyper-util", - "rustls", - "rustls-native-certs", - "rustls-pki-types", - "tokio", - "tokio-rustls", - "tower-service", - "webpki-roots", -] - -[[package]] -name = "hyper-util" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df2dcfbe0677734ab2f3ffa7fa7bfd4706bfdc1ef393f2ee30184aed67e631b4" -dependencies = [ - "bytes", - "futures-channel", - "futures-util", - "http", - "http-body", - "hyper", - "pin-project-lite", - "socket2", - "tokio", - "tower-service", - "tracing", -] - -[[package]] -name = "ic-cdk" -version = "0.13.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b1da6a25b045f9da3c9459c0cb2b0700ac368ee16382975a17185a23b9c18ab" -dependencies = [ - "candid", - "ic-cdk-macros 0.13.2", - "ic0 0.21.1", - "serde", - "serde_bytes", -] - -[[package]] -name = "ic-cdk" -version = "0.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd8ecacd682fa05a985253592963306cb9799622d7b1cce4b1edb89c6ec85be1" -dependencies = [ - "candid", - "ic-cdk-macros 0.16.0", - "ic0 0.23.0", - "serde", - "serde_bytes", -] - -[[package]] -name = "ic-cdk-macros" -version = "0.13.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a45800053d80a6df839a71aaea5797e723188c0b992618208ca3b941350c7355" -dependencies = [ - "candid", - "proc-macro2", - "quote", - "serde", - "serde_tokenstream 0.1.7", - "syn 1.0.109", -] - -[[package]] -name = "ic-cdk-macros" -version = "0.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d4d857135deef20cc7ea8f3869a30cd9cfeb1392b3a81043790b2cd82adc3e0" -dependencies = [ - "candid", - "proc-macro2", - "quote", - "serde", - "serde_tokenstream 0.2.2", - "syn 2.0.85", -] - -[[package]] -name = "ic-cdk-timers" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c7c528bbb3d4d934b43a364855995d318649217c7510f40f92ad52eba3ff7be" -dependencies = [ - "futures", - "ic-cdk 0.16.0", - "ic0 0.23.0", - "serde", - "serde_bytes", - "slotmap", -] - -[[package]] -name = "ic-crypto-ed25519" -version = "0.9.0" -source = "git+https://github.com/dfinity/ic#d265b130647f04aa25909ec1fbb8294ce0139d1c" -dependencies = [ - "curve25519-dalek", - "ed25519-dalek", - "hkdf", - "pem", - "rand", - "thiserror", - "zeroize", -] - -[[package]] -name = "ic-crypto-internal-bls12-381-type" -version = "0.9.0" -source = "git+https://github.com/dfinity/ic#d265b130647f04aa25909ec1fbb8294ce0139d1c" -dependencies = [ - "hex", - "ic_bls12_381", - "itertools", - "lazy_static", - "pairing", - "paste", - "rand", - "rand_chacha", - "sha2", - "subtle", - "zeroize", -] - -[[package]] -name = "ic-crypto-internal-bls12-381-vetkd" -version = "0.9.0" -source = "git+https://github.com/dfinity/ic#d265b130647f04aa25909ec1fbb8294ce0139d1c" -dependencies = [ - "ic-crypto-internal-bls12-381-type", - "ic-sha3", - "rand", - "zeroize", -] - -[[package]] -name = "ic-crypto-secp256k1" -version = "0.9.0" -source = "git+https://github.com/dfinity/ic#d265b130647f04aa25909ec1fbb8294ce0139d1c" -dependencies = [ - "hmac", - "k256", - "lazy_static", - "num-bigint", - "pem", - "rand", - "rand_chacha", - "simple_asn1", - "zeroize", -] - -[[package]] -name = "ic-sha3" -version = "1.0.0" -source = "git+https://github.com/dfinity/ic#d265b130647f04aa25909ec1fbb8294ce0139d1c" -dependencies = [ - "sha3", -] - -[[package]] -name = "ic-stable-structures" -version = "0.6.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03f3044466a69802de74e710dc0300b706a05696a0531c942ca856751a13b0db" -dependencies = [ - "ic_principal", -] - -[[package]] -name = "ic-vetkd-utils" -version = "0.1.0" -source = "git+https://github.com/dfinity/ic#d265b130647f04aa25909ec1fbb8294ce0139d1c" -dependencies = [ - "getrandom", - "ic_bls12_381", - "lazy_static", - "pairing", - "rand", - "rand_chacha", - "sha2", - "sha3", - "subtle", - "wasm-bindgen", - "zeroize", -] - -[[package]] -name = "ic0" -version = "0.21.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a54b5297861c651551676e8c43df805dad175cc33bc97dbd992edbbb85dcbcdf" - -[[package]] -name = "ic0" -version = "0.23.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8de254dd67bbd58073e23dc1c8553ba12fa1dc610a19de94ad2bbcd0460c067f" - -[[package]] -name = "ic_bls12_381" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22c65787944f32af084dffd0c68c1e544237b76e215654ddea8cd9f527dd8b69" -dependencies = [ - "digest", - "ff", - "group", - "pairing", - "rand_core", - "subtle", - "zeroize", -] - -[[package]] -name = "ic_principal" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1762deb6f7c8d8c2bdee4b6c5a47b60195b74e9b5280faa5ba29692f8e17429c" -dependencies = [ - "crc32fast", - "data-encoding", - "serde", - "sha2", - "thiserror", -] - -[[package]] -name = "idna" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" -dependencies = [ - "unicode-bidi", - "unicode-normalization", -] - -[[package]] -name = "indexmap" -version = "2.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "707907fe3c25f5424cce2cb7e1cbcafee6bdbe735ca90ef77c29e84591e5b9da" -dependencies = [ - "equivalent", - "hashbrown", -] - -[[package]] -name = "ipnet" -version = "2.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddc24109865250148c2e0f3d25d4f0f479571723792d3802153c60922a4fb708" - -[[package]] -name = "itertools" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" -dependencies = [ - "either", -] - -[[package]] -name = "itoa" -version = "1.0.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" - -[[package]] -name = "js-sys" -version = "0.3.72" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a88f1bda2bd75b0452a14784937d796722fdebfe50df998aeb3f0b7603019a9" -dependencies = [ - "wasm-bindgen", -] - -[[package]] -name = "k256" -version = "0.13.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6e3919bbaa2945715f0bb6d3934a173d1e9a59ac23767fbaaef277265a7411b" -dependencies = [ - "cfg-if", - "ecdsa", - "elliptic-curve", - "once_cell", - "sha2", - "signature", -] - -[[package]] -name = "keccak" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ecc2af9a1119c51f12a14607e783cb977bde58bc069ff0c3da1095e635d70654" -dependencies = [ - "cpufeatures", -] - -[[package]] -name = "lazy_static" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" - -[[package]] -name = "leb128" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "884e2677b40cc8c339eaefcb701c32ef1fd2493d71118dc0ca4b6a736c93bd67" - -[[package]] -name = "libc" -version = "0.2.161" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e9489c2807c139ffd9c1794f4af0ebe86a828db53ecdc7fea2111d0fed085d1" - -[[package]] -name = "lock_api" -version = "0.4.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17" -dependencies = [ - "autocfg", - "scopeguard", -] - -[[package]] -name = "log" -version = "0.4.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" - -[[package]] -name = "matchers" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8263075bb86c5a1b1427b5ae862e8889656f126e9f77c484496e8b47cf5c5558" -dependencies = [ - "regex-automata 0.1.10", -] - -[[package]] -name = "memchr" -version = "2.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" - -[[package]] -name = "merlin" -version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58c38e2799fc0978b65dfff8023ec7843e2330bb462f19198840b34b6582397d" -dependencies = [ - "byteorder", - "keccak", - "rand_core", - "zeroize", -] - -[[package]] -name = "mime" -version = "0.3.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" - -[[package]] -name = "mime_guess" -version = "2.0.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7c44f8e672c00fe5308fa235f821cb4198414e1c77935c1ab6948d3fd78550e" -dependencies = [ - "mime", - "unicase", -] - -[[package]] -name = "miniz_oxide" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2d80299ef12ff69b16a84bb182e3b9df68b5a91574d3d4fa6e41b65deec4df1" -dependencies = [ - "adler2", -] - -[[package]] -name = "mio" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80e04d1dcff3aae0704555fe5fee3bcfaf3d1fdf8a7e521d5b9d2b42acb52cec" -dependencies = [ - "hermit-abi", - "libc", - "wasi", - "windows-sys 0.52.0", -] - -[[package]] -name = "nu-ansi-term" -version = "0.46.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84" -dependencies = [ - "overload", - "winapi", -] - -[[package]] -name = "num-bigint" -version = "0.4.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9" -dependencies = [ - "num-integer", - "num-traits", - "serde", -] - -[[package]] -name = "num-conv" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" - -[[package]] -name = "num-integer" -version = "0.1.46" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" -dependencies = [ - "num-traits", -] - -[[package]] -name = "num-traits" -version = "0.2.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" -dependencies = [ - "autocfg", -] - -[[package]] -name = "object" -version = "0.36.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aedf0a2d09c573ed1d8d85b30c119153926a2b36dce0ab28322c09a117a4683e" -dependencies = [ - "memchr", -] - -[[package]] -name = "once_cell" -version = "1.20.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775" - -[[package]] -name = "openssl-probe" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" - -[[package]] -name = "overload" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" - -[[package]] -name = "pairing" -version = "0.23.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81fec4625e73cf41ef4bb6846cafa6d44736525f442ba45e407c4a000a13996f" -dependencies = [ - "group", -] - -[[package]] -name = "parking_lot" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27" -dependencies = [ - "lock_api", - "parking_lot_core", -] - -[[package]] -name = "parking_lot_core" -version = "0.9.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" -dependencies = [ - "cfg-if", - "libc", - "redox_syscall", - "smallvec", - "windows-targets", -] - -[[package]] -name = "paste" -version = "1.0.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" - -[[package]] -name = "pem" -version = "1.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8835c273a76a90455d7344889b0964598e3316e2a79ede8e36f16bdcf2228b8" -dependencies = [ - "base64 0.13.1", -] - -[[package]] -name = "pem-rfc7468" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88b39c9bfcfc231068454382784bb460aae594343fb030d46e9f50a645418412" -dependencies = [ - "base64ct", -] - -[[package]] -name = "percent-encoding" -version = "2.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" - -[[package]] -name = "pin-project-lite" -version = "0.2.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "915a1e146535de9163f3987b8944ed8cf49a18bb0056bcebcdcece385cece4ff" - -[[package]] -name = "pin-utils" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" - -[[package]] -name = "pkcs8" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" -dependencies = [ - "der", - "spki", -] - -[[package]] -name = "pocket-ic" -version = "5.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "beff607d4dbebff8d003453ced669d2645e905de496ca93713f3d47633357e6c" -dependencies = [ - "base64 0.13.1", - "candid", - "hex", - "ic-cdk 0.13.5", - "reqwest", - "schemars", - "serde", - "serde_bytes", - "serde_json", - "sha2", - "slog", - "tokio", - "tracing", - "tracing-appender", - "tracing-subscriber", -] - -[[package]] -name = "powerfmt" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" - -[[package]] -name = "ppv-lite86" -version = "0.2.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77957b295656769bb8ad2b6a6b09d897d94f05c41b069aede1fcdaa675eaea04" -dependencies = [ - "zerocopy", -] - -[[package]] -name = "pretty" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b55c4d17d994b637e2f4daf6e5dc5d660d209d5642377d675d7a1c3ab69fa579" -dependencies = [ - "arrayvec", - "typed-arena", - "unicode-width", -] - -[[package]] -name = "proc-macro2" -version = "1.0.89" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f139b0662de085916d1fb67d2b4169d1addddda1919e696f3252b740b629986e" -dependencies = [ - "unicode-ident", -] - -[[package]] -name = "psm" -version = "0.1.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa37f80ca58604976033fae9515a8a2989fc13797d953f7c04fb8fa36a11f205" -dependencies = [ - "cc", -] - -[[package]] -name = "quinn" -version = "0.11.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c7c5fdde3cdae7203427dc4f0a68fe0ed09833edc525a03456b153b79828684" -dependencies = [ - "bytes", - "pin-project-lite", - "quinn-proto", - "quinn-udp", - "rustc-hash", - "rustls", - "socket2", - "thiserror", - "tokio", - "tracing", -] - -[[package]] -name = "quinn-proto" -version = "0.11.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fadfaed2cd7f389d0161bb73eeb07b7b78f8691047a6f3e73caaeae55310a4a6" -dependencies = [ - "bytes", - "rand", - "ring", - "rustc-hash", - "rustls", - "slab", - "thiserror", - "tinyvec", - "tracing", -] - -[[package]] -name = "quinn-udp" -version = "0.5.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e346e016eacfff12233c243718197ca12f148c84e1e84268a896699b41c71780" -dependencies = [ - "cfg_aliases", - "libc", - "once_cell", - "socket2", - "tracing", - "windows-sys 0.59.0", -] - -[[package]] -name = "quote" -version = "1.0.37" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" -dependencies = [ - "proc-macro2", -] - -[[package]] -name = "rand" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" -dependencies = [ - "libc", - "rand_chacha", - "rand_core", -] - -[[package]] -name = "rand_chacha" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" -dependencies = [ - "ppv-lite86", - "rand_core", -] - -[[package]] -name = "rand_core" -version = "0.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" -dependencies = [ - "getrandom", -] - -[[package]] -name = "redox_syscall" -version = "0.5.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b6dfecf2c74bce2466cabf93f6664d6998a69eb21e39f4207930065b27b771f" -dependencies = [ - "bitflags", -] - -[[package]] -name = "regex" -version = "1.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" -dependencies = [ - "aho-corasick", - "memchr", - "regex-automata 0.4.8", - "regex-syntax 0.8.5", -] - -[[package]] -name = "regex-automata" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" -dependencies = [ - "regex-syntax 0.6.29", -] - -[[package]] -name = "regex-automata" -version = "0.4.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "368758f23274712b504848e9d5a6f010445cc8b87a7cdb4d7cbee666c1288da3" -dependencies = [ - "aho-corasick", - "memchr", - "regex-syntax 0.8.5", -] - -[[package]] -name = "regex-syntax" -version = "0.6.29" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" - -[[package]] -name = "regex-syntax" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" - -[[package]] -name = "reqwest" -version = "0.12.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a77c62af46e79de0a562e1a9849205ffcb7fc1238876e9bd743357570e04046f" -dependencies = [ - "base64 0.22.1", - "bytes", - "futures-channel", - "futures-core", - "futures-util", - "h2", - "http", - "http-body", - "http-body-util", - "hyper", - "hyper-rustls", - "hyper-util", - "ipnet", - "js-sys", - "log", - "mime", - "mime_guess", - "once_cell", - "percent-encoding", - "pin-project-lite", - "quinn", - "rustls", - "rustls-native-certs", - "rustls-pemfile", - "rustls-pki-types", - "serde", - "serde_json", - "serde_urlencoded", - "sync_wrapper", - "tokio", - "tokio-rustls", - "tokio-socks", - "tokio-util", - "tower-service", - "url", - "wasm-bindgen", - "wasm-bindgen-futures", - "wasm-streams", - "web-sys", - "webpki-roots", - "windows-registry", -] - -[[package]] -name = "rfc6979" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8dd2a808d456c4a54e300a23e9f5a67e122c3024119acbfd73e3bf664491cb2" -dependencies = [ - "hmac", - "subtle", -] - -[[package]] -name = "ring" -version = "0.17.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" -dependencies = [ - "cc", - "cfg-if", - "getrandom", - "libc", - "spin", - "untrusted", - "windows-sys 0.52.0", -] - -[[package]] -name = "rustc-demangle" -version = "0.1.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" - -[[package]] -name = "rustc-hash" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "583034fd73374156e66797ed8e5b0d5690409c9226b22d87cb7f19821c05d152" - -[[package]] -name = "rustc_version" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" -dependencies = [ - "semver", -] - -[[package]] -name = "rustls" -version = "0.23.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eee87ff5d9b36712a58574e12e9f0ea80f915a5b0ac518d322b24a465617925e" -dependencies = [ - "once_cell", - "ring", - "rustls-pki-types", - "rustls-webpki", - "subtle", - "zeroize", -] - -[[package]] -name = "rustls-native-certs" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcaf18a4f2be7326cd874a5fa579fae794320a0f388d365dca7e480e55f83f8a" -dependencies = [ - "openssl-probe", - "rustls-pemfile", - "rustls-pki-types", - "schannel", - "security-framework", -] - -[[package]] -name = "rustls-pemfile" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dce314e5fee3f39953d46bb63bb8a46d40c2f8fb7cc5a3b6cab2bde9721d6e50" -dependencies = [ - "rustls-pki-types", -] - -[[package]] -name = "rustls-pki-types" -version = "1.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16f1201b3c9a7ee8039bcadc17b7e605e2945b27eee7631788c1bd2b0643674b" - -[[package]] -name = "rustls-webpki" -version = "0.102.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64ca1bc8749bd4cf37b5ce386cc146580777b4e8572c7b97baf22c83f444bee9" -dependencies = [ - "ring", - "rustls-pki-types", - "untrusted", -] - -[[package]] -name = "rustversion" -version = "1.0.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e819f2bc632f285be6d7cd36e25940d45b2391dd6d9b939e79de557f7014248" - -[[package]] -name = "ryu" -version = "1.0.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" - -[[package]] -name = "schannel" -version = "0.1.26" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01227be5826fa0690321a2ba6c5cd57a19cf3f6a09e76973b58e61de6ab9d1c1" -dependencies = [ - "windows-sys 0.59.0", -] - -[[package]] -name = "schemars" -version = "0.8.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09c024468a378b7e36765cd36702b7a90cc3cba11654f6685c8f233408e89e92" -dependencies = [ - "dyn-clone", - "schemars_derive", - "serde", - "serde_json", -] - -[[package]] -name = "schemars_derive" -version = "0.8.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1eee588578aff73f856ab961cd2f79e36bc45d7ded33a7562adba4667aecc0e" -dependencies = [ - "proc-macro2", - "quote", - "serde_derive_internals", - "syn 2.0.85", -] - -[[package]] -name = "scopeguard" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" - -[[package]] -name = "sec1" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3e97a565f76233a6003f9f5c54be1d9c5bdfa3eccfb189469f11ec4901c47dc" -dependencies = [ - "base16ct", - "der", - "generic-array", - "pkcs8", - "subtle", - "zeroize", -] - -[[package]] -name = "security-framework" -version = "2.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" -dependencies = [ - "bitflags", - "core-foundation", - "core-foundation-sys", - "libc", - "security-framework-sys", -] - -[[package]] -name = "security-framework-sys" -version = "2.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea4a292869320c0272d7bc55a5a6aafaff59b4f63404a003887b679a2e05b4b6" -dependencies = [ - "core-foundation-sys", - "libc", -] - -[[package]] -name = "semver" -version = "1.0.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" - -[[package]] -name = "serde" -version = "1.0.214" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f55c3193aca71c12ad7890f1785d2b73e1b9f63a0bbc353c08ef26fe03fc56b5" -dependencies = [ - "serde_derive", -] - -[[package]] -name = "serde_bytes" -version = "0.11.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "387cc504cb06bb40a96c8e04e951fe01854cf6bc921053c954e4a606d9675c6a" -dependencies = [ - "serde", -] - -[[package]] -name = "serde_derive" -version = "1.0.214" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de523f781f095e28fa605cdce0f8307e451cc0fd14e2eb4cd2e98a355b147766" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.85", -] - -[[package]] -name = "serde_derive_internals" -version = "0.29.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18d26a20a969b9e3fdf2fc2d9f21eda6c40e2de84c9408bb5d3b05d499aae711" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.85", -] - -[[package]] -name = "serde_json" -version = "1.0.132" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d726bfaff4b320266d395898905d0eba0345aae23b54aee3a737e260fd46db03" -dependencies = [ - "itoa", - "memchr", - "ryu", - "serde", -] - -[[package]] -name = "serde_tokenstream" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "797ba1d80299b264f3aac68ab5d12e5825a561749db4df7cd7c8083900c5d4e9" -dependencies = [ - "proc-macro2", - "serde", - "syn 1.0.109", -] - -[[package]] -name = "serde_tokenstream" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64060d864397305347a78851c51588fd283767e7e7589829e8121d65512340f1" -dependencies = [ - "proc-macro2", - "quote", - "serde", - "syn 2.0.85", -] - -[[package]] -name = "serde_urlencoded" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" -dependencies = [ - "form_urlencoded", - "itoa", - "ryu", - "serde", -] - -[[package]] -name = "sha2" -version = "0.10.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" -dependencies = [ - "cfg-if", - "cpufeatures", - "digest", -] - -[[package]] -name = "sha3" -version = "0.10.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75872d278a8f37ef87fa0ddbda7802605cb18344497949862c0d4dcb291eba60" -dependencies = [ - "digest", - "keccak", -] - -[[package]] -name = "sharded-slab" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6" -dependencies = [ - "lazy_static", -] - -[[package]] -name = "shlex" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" - -[[package]] -name = "signal-hook-registry" -version = "1.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9e9e0b4211b72e7b8b6e85c807d36c212bdb33ea8587f7569562a84df5465b1" -dependencies = [ - "libc", -] - -[[package]] -name = "signature" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" -dependencies = [ - "digest", - "rand_core", -] - -[[package]] -name = "simple_asn1" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adc4e5204eb1910f40f9cfa375f6f05b68c3abac4b6fd879c8ff5e7ae8a0a085" -dependencies = [ - "num-bigint", - "num-traits", - "thiserror", - "time", -] - -[[package]] -name = "slab" -version = "0.4.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" -dependencies = [ - "autocfg", -] - -[[package]] -name = "slog" -version = "2.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8347046d4ebd943127157b94d63abb990fcf729dc4e9978927fdf4ac3c998d06" -dependencies = [ - "erased-serde", -] - -[[package]] -name = "slotmap" -version = "1.0.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbff4acf519f630b3a3ddcfaea6c06b42174d9a44bc70c620e9ed1649d58b82a" -dependencies = [ - "version_check", -] - -[[package]] -name = "smallvec" -version = "1.13.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" - -[[package]] -name = "socket2" -version = "0.5.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce305eb0b4296696835b71df73eb912e0f1ffd2556a501fcede6e0c50349191c" -dependencies = [ - "libc", - "windows-sys 0.52.0", -] - -[[package]] -name = "spin" -version = "0.9.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" - -[[package]] -name = "spki" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d91ed6c858b01f942cd56b37a94b3e0a1798290327d1236e4d9cf4eaca44d29d" -dependencies = [ - "base64ct", - "der", -] - -[[package]] -name = "stacker" -version = "0.1.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "799c883d55abdb5e98af1a7b3f23b9b6de8ecada0ecac058672d7635eb48ca7b" -dependencies = [ - "cc", - "cfg-if", - "libc", - "psm", - "windows-sys 0.59.0", -] - -[[package]] -name = "subtle" -version = "2.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" - -[[package]] -name = "syn" -version = "1.0.109" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - -[[package]] -name = "syn" -version = "2.0.85" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5023162dfcd14ef8f32034d8bcd4cc5ddc61ef7a247c024a33e24e1f24d21b56" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - -[[package]] -name = "sync_wrapper" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7065abeca94b6a8a577f9bd45aa0867a2238b74e8eb67cf10d492bc39351394" -dependencies = [ - "futures-core", -] - -[[package]] -name = "thiserror" -version = "1.0.65" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d11abd9594d9b38965ef50805c5e469ca9cc6f197f883f717e0269a3057b3d5" -dependencies = [ - "thiserror-impl", -] - -[[package]] -name = "thiserror-impl" -version = "1.0.65" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae71770322cbd277e69d762a16c444af02aa0575ac0d174f0b9562d3b37f8602" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.85", -] - -[[package]] -name = "thread_local" -version = "1.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b9ef9bad013ada3808854ceac7b46812a6465ba368859a37e2100283d2d719c" -dependencies = [ - "cfg-if", - "once_cell", -] - -[[package]] -name = "time" -version = "0.3.36" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885" -dependencies = [ - "deranged", - "itoa", - "num-conv", - "powerfmt", - "serde", - "time-core", - "time-macros", -] - -[[package]] -name = "time-core" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" - -[[package]] -name = "time-macros" -version = "0.2.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f252a68540fde3a3877aeea552b832b40ab9a69e318efd078774a01ddee1ccf" -dependencies = [ - "num-conv", - "time-core", -] - -[[package]] -name = "tinyvec" -version = "1.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "445e881f4f6d382d5f27c034e25eb92edd7c784ceab92a0937db7f2e9471b938" -dependencies = [ - "tinyvec_macros", -] - -[[package]] -name = "tinyvec_macros" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" - -[[package]] -name = "tokio" -version = "1.41.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "145f3413504347a2be84393cc8a7d2fb4d863b375909ea59f2158261aa258bbb" -dependencies = [ - "backtrace", - "bytes", - "libc", - "mio", - "parking_lot", - "pin-project-lite", - "signal-hook-registry", - "socket2", - "tokio-macros", - "windows-sys 0.52.0", -] - -[[package]] -name = "tokio-macros" -version = "2.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.85", -] - -[[package]] -name = "tokio-rustls" -version = "0.26.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c7bc40d0e5a97695bb96e27995cd3a08538541b0a846f65bba7a359f36700d4" -dependencies = [ - "rustls", - "rustls-pki-types", - "tokio", -] - -[[package]] -name = "tokio-socks" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d4770b8024672c1101b3f6733eab95b18007dbe0847a8afe341fcf79e06043f" -dependencies = [ - "either", - "futures-util", - "thiserror", - "tokio", -] - -[[package]] -name = "tokio-util" -version = "0.7.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61e7c3654c13bcd040d4a03abee2c75b1d14a37b423cf5a813ceae1cc903ec6a" -dependencies = [ - "bytes", - "futures-core", - "futures-sink", - "pin-project-lite", - "tokio", -] - -[[package]] -name = "tower-service" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" - -[[package]] -name = "tracing" -version = "0.1.40" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" -dependencies = [ - "pin-project-lite", - "tracing-attributes", - "tracing-core", -] - -[[package]] -name = "tracing-appender" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3566e8ce28cc0a3fe42519fc80e6b4c943cc4c8cef275620eb8dac2d3d4e06cf" -dependencies = [ - "crossbeam-channel", - "thiserror", - "time", - "tracing-subscriber", -] - -[[package]] -name = "tracing-attributes" -version = "0.1.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.85", -] - -[[package]] -name = "tracing-core" -version = "0.1.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" -dependencies = [ - "once_cell", - "valuable", -] - -[[package]] -name = "tracing-log" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee855f1f400bd0e5c02d150ae5de3840039a3f54b025156404e34c23c03f47c3" -dependencies = [ - "log", - "once_cell", - "tracing-core", -] - -[[package]] -name = "tracing-serde" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc6b213177105856957181934e4920de57730fc69bf42c37ee5bb664d406d9e1" -dependencies = [ - "serde", - "tracing-core", -] - -[[package]] -name = "tracing-subscriber" -version = "0.3.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad0f048c97dbd9faa9b7df56362b8ebcaa52adb06b498c050d2f4e32f90a7a8b" -dependencies = [ - "matchers", - "nu-ansi-term", - "once_cell", - "regex", - "serde", - "serde_json", - "sharded-slab", - "smallvec", - "thread_local", - "tracing", - "tracing-core", - "tracing-log", - "tracing-serde", -] - -[[package]] -name = "try-lock" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" - -[[package]] -name = "typed-arena" -version = "2.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6af6ae20167a9ece4bcb41af5b80f8a1f1df981f6391189ce00fd257af04126a" - -[[package]] -name = "typenum" -version = "1.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" - -[[package]] -name = "unicase" -version = "2.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e51b68083f157f853b6379db119d1c1be0e6e4dec98101079dec41f6f5cf6df" - -[[package]] -name = "unicode-bidi" -version = "0.3.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ab17db44d7388991a428b2ee655ce0c212e862eff1768a455c58f9aad6e7893" - -[[package]] -name = "unicode-ident" -version = "1.0.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e91b56cd4cadaeb79bbf1a5645f6b4f8dc5bde8834ad5894a8db35fda9efa1fe" - -[[package]] -name = "unicode-normalization" -version = "0.1.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5033c97c4262335cded6d6fc3e5c18ab755e1a3dc96376350f3d8e9f009ad956" -dependencies = [ - "tinyvec", -] - -[[package]] -name = "unicode-width" -version = "0.1.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7dd6e30e90baa6f72411720665d41d89b9a3d039dc45b8faea1ddd07f617f6af" - -[[package]] -name = "untrusted" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" - -[[package]] -name = "url" -version = "2.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22784dbdf76fdde8af1aeda5622b546b422b6fc585325248a2bf9f5e41e94d6c" -dependencies = [ - "form_urlencoded", - "idna", - "percent-encoding", -] - -[[package]] -name = "valuable" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" - -[[package]] -name = "version_check" -version = "0.9.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" - -[[package]] -name = "want" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" -dependencies = [ - "try-lock", -] - -[[package]] -name = "wasi" -version = "0.11.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" - -[[package]] -name = "wasm-bindgen" -version = "0.2.95" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "128d1e363af62632b8eb57219c8fd7877144af57558fb2ef0368d0087bddeb2e" -dependencies = [ - "cfg-if", - "once_cell", - "wasm-bindgen-macro", -] - -[[package]] -name = "wasm-bindgen-backend" -version = "0.2.95" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb6dd4d3ca0ddffd1dd1c9c04f94b868c37ff5fac97c30b97cff2d74fce3a358" -dependencies = [ - "bumpalo", - "log", - "once_cell", - "proc-macro2", - "quote", - "syn 2.0.85", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-futures" -version = "0.4.45" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc7ec4f8827a71586374db3e87abdb5a2bb3a15afed140221307c3ec06b1f63b" -dependencies = [ - "cfg-if", - "js-sys", - "wasm-bindgen", - "web-sys", -] - -[[package]] -name = "wasm-bindgen-macro" -version = "0.2.95" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e79384be7f8f5a9dd5d7167216f022090cf1f9ec128e6e6a482a2cb5c5422c56" -dependencies = [ - "quote", - "wasm-bindgen-macro-support", -] - -[[package]] -name = "wasm-bindgen-macro-support" -version = "0.2.95" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26c6ab57572f7a24a4985830b120de1594465e5d500f24afe89e16b4e833ef68" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.85", - "wasm-bindgen-backend", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-shared" -version = "0.2.95" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65fc09f10666a9f147042251e0dda9c18f166ff7de300607007e96bdebc1068d" - -[[package]] -name = "wasm-streams" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15053d8d85c7eccdbefef60f06769760a563c7f0a9d6902a13d35c7800b0ad65" -dependencies = [ - "futures-util", - "js-sys", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", -] - -[[package]] -name = "web-sys" -version = "0.3.72" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6488b90108c040df0fe62fa815cbdee25124641df01814dd7282749234c6112" -dependencies = [ - "js-sys", - "wasm-bindgen", -] - -[[package]] -name = "webpki-roots" -version = "0.26.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "841c67bff177718f1d4dfefde8d8f0e78f9b6589319ba88312f567fc5841a958" -dependencies = [ - "rustls-pki-types", -] - -[[package]] -name = "winapi" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" -dependencies = [ - "winapi-i686-pc-windows-gnu", - "winapi-x86_64-pc-windows-gnu", -] - -[[package]] -name = "winapi-i686-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" - -[[package]] -name = "winapi-x86_64-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" - -[[package]] -name = "windows-registry" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e400001bb720a623c1c69032f8e3e4cf09984deec740f007dd2b03ec864804b0" -dependencies = [ - "windows-result", - "windows-strings", - "windows-targets", -] - -[[package]] -name = "windows-result" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d1043d8214f791817bab27572aaa8af63732e11bf84aa21a45a78d6c317ae0e" -dependencies = [ - "windows-targets", -] - -[[package]] -name = "windows-strings" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4cd9b125c486025df0eabcb585e62173c6c9eddcec5d117d3b6e8c30e2ee4d10" -dependencies = [ - "windows-result", - "windows-targets", -] - -[[package]] -name = "windows-sys" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" -dependencies = [ - "windows-targets", -] - -[[package]] -name = "windows-sys" -version = "0.59.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" -dependencies = [ - "windows-targets", -] - -[[package]] -name = "windows-targets" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" -dependencies = [ - "windows_aarch64_gnullvm", - "windows_aarch64_msvc", - "windows_i686_gnu", - "windows_i686_gnullvm", - "windows_i686_msvc", - "windows_x86_64_gnu", - "windows_x86_64_gnullvm", - "windows_x86_64_msvc", -] - -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" - -[[package]] -name = "windows_i686_gnu" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" - -[[package]] -name = "windows_i686_gnullvm" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" - -[[package]] -name = "windows_i686_msvc" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" - -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" - -[[package]] -name = "zerocopy" -version = "0.7.35" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" -dependencies = [ - "byteorder", - "zerocopy-derive", -] - -[[package]] -name = "zerocopy-derive" -version = "0.7.35" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.85", -] - -[[package]] -name = "zeroize" -version = "1.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" -dependencies = [ - "zeroize_derive", -] - -[[package]] -name = "zeroize_derive" -version = "1.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.85", -] diff --git a/rust/threshold-mock/Cargo.toml b/rust/threshold-mock/Cargo.toml deleted file mode 100644 index d3a698c3f..000000000 --- a/rust/threshold-mock/Cargo.toml +++ /dev/null @@ -1,38 +0,0 @@ -[package] -name = "chainkey_testing_canister" -version = "0.1.0" -edition = "2021" - -resolver = "2" - -[profile.release] -lto = true -opt-level = 'z' -panic = 'abort' - -[lib] -crate-type = ["lib", "cdylib"] - -[dependencies] -candid = "0.10.10" -# Enable `custom` feature of indirect getrandom dependency. See lib.rs for more details. -getrandom = { version = "0.2", features = ["custom"] } -hex = "0.4" -ic-cdk = "0.16.0" -ic-cdk-timers = "0.10.0" -ic-crypto-ed25519 = { git = "https://github.com/dfinity/ic" } -ic-crypto-secp256k1 = { git = "https://github.com/dfinity/ic" } -ic-crypto-internal-bls12-381-vetkd = { git = "https://github.com/dfinity/ic" } -ic-crypto-internal-bls12-381-type = { git = "https://github.com/dfinity/ic" } -ic-stable-structures = "0.6.5" -lazy_static = "1.4" -rand = "0.8" -rand_chacha = "0.3" -serde = "1" - -[dev-dependencies] -assert_matches = "1.5.0" -ed25519-dalek = "2.1" -ic-vetkd-utils = { git = "https://github.com/dfinity/ic" } -k256 = "0.13.4" -pocket-ic = "5.0.0" diff --git a/rust/threshold-mock/LICENSE.txt b/rust/threshold-mock/LICENSE.txt deleted file mode 100644 index 5c11a3ec7..000000000 --- a/rust/threshold-mock/LICENSE.txt +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright 2024 DFINITY Stiftung. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/rust/threshold-mock/Makefile b/rust/threshold-mock/Makefile deleted file mode 100644 index be473c1f5..000000000 --- a/rust/threshold-mock/Makefile +++ /dev/null @@ -1,15 +0,0 @@ -.PHONY: build -.SILENT: build -build: - cargo build --target wasm32-unknown-unknown --release - -.PHONY: test -.SILENT: test -test: build - cargo test - -.PHONY: clean -.SILENT: clean -clean: - rm -rf .dfx - cargo clean diff --git a/rust/threshold-mock/README.md b/rust/threshold-mock/README.md deleted file mode 100644 index 20aa007cf..000000000 --- a/rust/threshold-mock/README.md +++ /dev/null @@ -1,31 +0,0 @@ -# Chain-key testing canister - -The chain-key testing canister is a canister smart contract that provides a [fake](https://www.martinfowler.com/articles/mocksArentStubs.html#TheDifferenceBetweenMocksAndStubs) implementation of the APIs of various chain-key-related features including threshold ECDSA, threshold Schnorr, and threshold key derivation (vetKeys) **for testing purposes**. The shortcut that this canister takes (compared to the production APIs) is that it relies on a cryptographic key that is hard-coded into the canister, rather than relying on a key that is distributed among the subnet nodes. With this, the implementation is inherently **insecure**: see [Disclaimer](#disclaimer). - -The main advantage of using this canister is to *save costs during testing*, because there are [fees](https://internetcomputer.org/docs/current/references/t-sigs-how-it-works#api-fees) associated with using the chain-key features via the Internet Computer's management canister APIs. - -In particular, the canister provides fake implementations of the following Internet Computer features: -* [Threshold ECDSA](https://internetcomputer.org/docs/current/developer-docs/smart-contracts/signatures/t-ecdsa) - * [ecdsa_public_key](https://internetcomputer.org/docs/current/references/ic-interface-spec#ic-ecdsa_public_key), [sign_with_ecdsa](https://internetcomputer.org/docs/current/references/ic-interface-spec#ic-sign_with_ecdsa) -* [Threshold Schnorr](https://internetcomputer.org/docs/current/developer-docs/smart-contracts/signatures/t-schnorr) - * [schnorr_public_key](https://internetcomputer.org/docs/current/references/ic-interface-spec#ic-schnorr_public_key), [sign_with_schnorr](https://internetcomputer.org/docs/current/references/ic-interface-spec#ic-sign_with_schnorr) -* Preview: [Threshold Key Derivation (vetKeys)](https://internetcomputer.org/docs/current/developer-docs/smart-contracts/encryption/vetkeys) - * `vetkd_public_key`, `vetkd_encrypted_key` (see [API proposal PR](https://github.com/dfinity/interface-spec/pull/158)) - -## Usage - -The canister is deployed on mainnet: the canister ID is `vrqyr-saaaa-aaaan-qzn4q-cai` ([dashboard](https://dashboard.internetcomputer.org/canister/vrqyr-saaaa-aaaan-qzn4q-cai), [candid-ui](https://a4gq6-oaaaa-aaaab-qaa4q-cai.raw.icp0.io/?id=vrqyr-saaaa-aaaan-qzn4q-cai)). - -All APIs support a single key ID: `insecure_test_key_1`. - -For the time being, no fees are charged. If canister usage becomes excessive, we will introduce fees but aim to keep these fees significantly lower than the [fees of the production APIs](https://internetcomputer.org/docs/current/references/t-sigs-how-it-works#api-fee). The community is invited to top up the canister with cycles. - -As this repository contains the canister's source code, developers can also deploy their own, private instance of this canister. - -## Disclaimer - -The implementation underlying the chain-key testing canister is **unsafe** and for **testing purposes only**: the master secret keys are **hard-coded** in the canister, rather than distributed among the subnet nodes. **Do not use this in production or for sensitive data**!. - -## License - -Please see the [LICENSE](LICENSE) and [Contribution guidelines](CONTRIBUTING.md). \ No newline at end of file diff --git a/rust/threshold-mock/canister_ids.json b/rust/threshold-mock/canister_ids.json deleted file mode 100644 index 853948d7e..000000000 --- a/rust/threshold-mock/canister_ids.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "chainkey_testing_canister": { - "ic": "vrqyr-saaaa-aaaan-qzn4q-cai" - } -} \ No newline at end of file diff --git a/rust/threshold-mock/chainkey_testing_canister.did b/rust/threshold-mock/chainkey_testing_canister.did deleted file mode 100644 index 4bb354917..000000000 --- a/rust/threshold-mock/chainkey_testing_canister.did +++ /dev/null @@ -1,95 +0,0 @@ -type canister_id = principal; - -type ecdsa_curve = variant { - secp256k1; -}; -type schnorr_algorithm = variant { - bip340secp256k1; - ed25519; -}; - -type vetkd_curve = variant { bls12_381 }; - -type ecdsa_public_key_args = record { - canister_id : opt canister_id; - derivation_path : vec blob; - key_id : record { curve : ecdsa_curve; name : text }; -}; - -type ecdsa_public_key_result = record { - public_key : blob; - chain_code : blob; -}; - -type sign_with_ecdsa_args = record { - message_hash : blob; - derivation_path : vec blob; - key_id : record { curve : ecdsa_curve; name : text }; -}; - -type sign_with_ecdsa_result = record { - signature : blob; -}; - -type schnorr_public_key_args = record { - canister_id : opt canister_id; - derivation_path : vec blob; - key_id : record { algorithm : schnorr_algorithm; name : text }; -}; - -type schnorr_public_key_result = record { - public_key : blob; - chain_code : blob; -}; - -type sign_with_schnorr_args = record { - message : blob; - derivation_path : vec blob; - key_id : record { algorithm : schnorr_algorithm; name : text }; -}; - -type sign_with_schnorr_result = record { - signature : blob; -}; - -type vetkd_public_key_args = record { - canister_id : opt canister_id; - derivation_path : vec blob; - key_id : record { curve : vetkd_curve; name : text }; -}; - -type vetkd_public_key_result = record { - public_key : blob; -}; - -type vetkd_encrypted_key_args = record { - public_key_derivation_path : vec blob; - derivation_id : blob; - key_id : record { curve : vetkd_curve; name : text }; - encryption_public_key : blob; -}; - -type vetkd_encrypted_key_result = record { - encrypted_key : blob; -}; - -type call_counts_result = record { - call_counts : vec record { method_name : text; call_count : nat64 }; -}; - -service : { - // Threshold ECDSA signature - ecdsa_public_key : (ecdsa_public_key_args) -> (ecdsa_public_key_result); - sign_with_ecdsa : (sign_with_ecdsa_args) -> (sign_with_ecdsa_result); - - // Threshold Schnorr signature - schnorr_public_key : (schnorr_public_key_args) -> (schnorr_public_key_result); - sign_with_schnorr : (sign_with_schnorr_args) -> (sign_with_schnorr_result); - - // Threshold key derivation - vetkd_public_key : (vetkd_public_key_args) -> (vetkd_public_key_result); - vetkd_encrypted_key : (vetkd_encrypted_key_args) -> (vetkd_encrypted_key_result); - - // Statistics: call counts - call_counts : () -> (call_counts_result); -}; diff --git a/rust/threshold-mock/dfx.json b/rust/threshold-mock/dfx.json deleted file mode 100644 index b98ae026f..000000000 --- a/rust/threshold-mock/dfx.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "canisters": { - "chainkey_testing_canister": { - "candid": "chainkey_testing_canister.did", - "package": "chainkey_testing_canister", - "type": "rust" - } - }, - "defaults": { - "build": { - "args": "", - "packtool": "" - } - }, - "version": 1 -} \ No newline at end of file diff --git a/rust/threshold-mock/src/ecdsa.rs b/rust/threshold-mock/src/ecdsa.rs deleted file mode 100644 index 2a8b905d8..000000000 --- a/rust/threshold-mock/src/ecdsa.rs +++ /dev/null @@ -1,70 +0,0 @@ -use crate::ensure_call_is_paid; -use crate::inc_call_count; - -use super::ensure_derivation_path_is_valid; -use ic_cdk::api::management_canister::ecdsa::EcdsaCurve; -use ic_cdk::api::management_canister::ecdsa::EcdsaKeyId; -use ic_cdk::api::management_canister::ecdsa::EcdsaPublicKeyArgument; -use ic_cdk::api::management_canister::ecdsa::EcdsaPublicKeyResponse; -use ic_cdk::api::management_canister::ecdsa::SignWithEcdsaArgument; -use ic_cdk::api::management_canister::ecdsa::SignWithEcdsaResponse; -use ic_cdk::update; - -/// DISCLAIMER: This canister here provides an *unsafe* example implementation -/// of the Internet Computer's management canister API for demonstration purposes. -/// Because of this, in the following we hard-code a randomly generated master -/// secret key. Do NOT use this in production. -const MASTER_SK_SECP256K1_HEX: &str = - "bcd854ea5112b314b5d306442376b57a6e6f2ffc34c2d0f6918823b0f7c0bfac"; - -lazy_static::lazy_static! { - static ref MASTER_SK_SECP256K1: ic_crypto_secp256k1::PrivateKey = ic_crypto_secp256k1::PrivateKey::deserialize_sec1( - &hex::decode(MASTER_SK_SECP256K1_HEX).expect("failed to hex-decode") - ).expect("failed to deserialize secp256k1 private key"); - static ref MASTER_PK_SECP256K1: ic_crypto_secp256k1::PublicKey = MASTER_SK_SECP256K1.public_key(); -} - -#[update] -async fn ecdsa_public_key(args: EcdsaPublicKeyArgument) -> EcdsaPublicKeyResponse { - inc_call_count("ecdsa_public_key".to_string()); - ensure_secp256k1_insecure_test_key_1(&args.key_id); - ensure_derivation_path_is_valid(&args.derivation_path); - let derivation_path = ic_crypto_secp256k1::DerivationPath::from_canister_id_and_path( - args.canister_id.unwrap_or_else(ic_cdk::caller).as_slice(), - &args.derivation_path, - ); - let (public_key, chain_code) = MASTER_PK_SECP256K1.derive_subkey(&derivation_path); - EcdsaPublicKeyResponse { - public_key: public_key.serialize_sec1(true).to_vec(), - chain_code: chain_code.to_vec(), - } -} - -#[update] -async fn sign_with_ecdsa(args: SignWithEcdsaArgument) -> SignWithEcdsaResponse { - inc_call_count("sign_with_ecdsa".to_string()); - ensure_call_is_paid(0); - ensure_secp256k1_insecure_test_key_1(&args.key_id); - ensure_derivation_path_is_valid(&args.derivation_path); - if args.message_hash.len() != 32 { - ic_cdk::trap("message hash must be 32 bytes"); - } - let derivation_path = ic_crypto_secp256k1::DerivationPath::from_canister_id_and_path( - ic_cdk::caller().as_slice(), - &args.derivation_path, - ); - let (derived_private_key, _chain_code) = MASTER_SK_SECP256K1.derive_subkey(&derivation_path); - let signature = derived_private_key.sign_digest_with_ecdsa(&args.message_hash); - SignWithEcdsaResponse { - signature: signature.to_vec(), - } -} - -fn ensure_secp256k1_insecure_test_key_1(key_id: &EcdsaKeyId) { - if key_id.curve != EcdsaCurve::Secp256k1 { - ic_cdk::trap("unsupported key ID curve"); - } - if key_id.name.as_str() != "insecure_test_key_1" { - ic_cdk::trap("unsupported key ID name"); - } -} diff --git a/rust/threshold-mock/src/lib.rs b/rust/threshold-mock/src/lib.rs deleted file mode 100644 index f57ae2f9c..000000000 --- a/rust/threshold-mock/src/lib.rs +++ /dev/null @@ -1,117 +0,0 @@ -use candid::{CandidType, Principal}; -use ic_stable_structures::memory_manager::{MemoryId, MemoryManager, VirtualMemory}; -use ic_stable_structures::{DefaultMemoryImpl, StableBTreeMap}; -use rand::SeedableRng; -use rand_chacha::ChaCha20Rng; -use std::cell::RefCell; -use std::time::Duration; - -type Memory = VirtualMemory; - -pub mod ecdsa; -pub mod schnorr; -pub mod vetkd; - -thread_local! { - static RNG: RefCell> = const { RefCell::new(None) }; - static MEMORY_MANAGER: RefCell> = - RefCell::new(MemoryManager::init(DefaultMemoryImpl::default())); - static CALL_COUNTS: RefCell> = RefCell::new( - StableBTreeMap::init( - MEMORY_MANAGER.with_borrow(|m| m.get(MemoryId::new(1))), - ) - ); -} - -const SEEDING_INTERVAL: Duration = Duration::from_secs(3600); - -#[ic_cdk::init] -fn init() { - // Initialize randomness during canister install or reinstall - schedule_seeding(Duration::ZERO); -} - -#[ic_cdk::post_upgrade] -fn post_upgrade() { - // Initialize randomness after a canister upgrade - schedule_seeding(Duration::ZERO); -} - -fn schedule_seeding(duration: Duration) { - ic_cdk_timers::set_timer(duration, || { - ic_cdk::spawn(async { - seed_randomness().await; - // Schedule reseeding on a timer with duration SEEDING_INTERVAL - schedule_seeding(SEEDING_INTERVAL); - }) - }); -} - -async fn seed_randomness() { - let (seed,): ([u8; 32],) = ic_cdk::call(Principal::management_canister(), "raw_rand", ()) - .await - .expect("Failed to call the management canister's raw_rand"); - RNG.with_borrow_mut(|rng| *rng = Some(ChaCha20Rng::from_seed(seed))); - ic_cdk::println!("RNG (re-)seeded"); -} - -async fn with_rng(fn_with_rng: impl FnOnce(&mut ChaCha20Rng) -> T) -> T { - RNG.with_borrow_mut(|option_rng| fn_with_rng(option_rng.as_mut().expect("missing RNG"))) -} - -fn ensure_derivation_path_is_valid(derivation_path: &[Vec]) { - if derivation_path.len() > 255 { - ic_cdk::trap("derivation path too long") - } -} - -fn inc_call_count(method_name: String) { - CALL_COUNTS.with_borrow_mut(|call_counts| { - let previous_call_count = call_counts.get(&method_name).unwrap_or_default(); - call_counts.insert(method_name, previous_call_count + 1); - }); -} - -#[derive(CandidType)] -pub struct CallCountsResult { - pub call_counts: Vec, -} - -#[derive(CandidType)] -pub struct CallCount { - pub method_name: String, - pub call_count: u64, -} - -#[ic_cdk::query] -async fn call_counts() -> CallCountsResult { - CALL_COUNTS.with_borrow(|call_counts| { - let call_counts: Vec<_> = call_counts - .iter() - .map(|(method_name, call_count)| CallCount { - method_name, - call_count, - }) - .collect(); - CallCountsResult { call_counts } - }) -} - -fn ensure_call_is_paid(cycles: u64) { - if ic_cdk::api::call::msg_cycles_accept(cycles) < cycles { - ic_cdk::trap("insufficient cycles"); - } -} - -// In the following, we register a custom getrandom implementation because -// otherwise getrandom (which is an indirect dependency) fails to compile. -// This is necessary because getrandom by default fails to compile for the -// wasm32-unknown-unknown target (which is required for deploying a canister). -// Our custom implementation always fails, which is sufficient here because -// we always provide randomness explicitly in API calls (via an RNG that is -// seeded from the IC's `raw_rand`) and never request randomness from the -// environment. -getrandom::register_custom_getrandom!(always_fail); -pub fn always_fail(_buf: &mut [u8]) -> Result<(), getrandom::Error> { - Err(getrandom::Error::UNSUPPORTED) -} diff --git a/rust/threshold-mock/src/schnorr.rs b/rust/threshold-mock/src/schnorr.rs deleted file mode 100644 index 739117922..000000000 --- a/rust/threshold-mock/src/schnorr.rs +++ /dev/null @@ -1,167 +0,0 @@ -use crate::ensure_call_is_paid; -use crate::inc_call_count; - -use super::ensure_derivation_path_is_valid; -use super::with_rng; -use candid::CandidType; -use candid::Deserialize; -use candid::Principal; -use ic_cdk::update; - -pub type CanisterId = Principal; - -#[derive(Clone, CandidType, Deserialize)] -pub struct SchnorrKeyId { - pub algorithm: SchnorrAlgorithm, - pub name: String, -} - -#[derive(Clone, PartialEq, Eq, CandidType, Deserialize)] -pub enum SchnorrAlgorithm { - #[serde(rename = "bip340secp256k1")] - Bip340Secp256k1, - #[serde(rename = "ed25519")] - Ed25519, -} - -#[derive(CandidType, Deserialize)] -pub struct SchnorrPublicKeyArgs { - pub canister_id: Option, - pub derivation_path: Vec>, - pub key_id: SchnorrKeyId, -} - -#[derive(CandidType, Deserialize)] -pub struct SchnorrPublicKeyResult { - pub public_key: Vec, - pub chain_code: Vec, -} - -#[derive(CandidType, Deserialize)] -pub struct SignWithSchnorrArgs { - pub message: Vec, - pub derivation_path: Vec>, - pub key_id: SchnorrKeyId, -} - -#[derive(CandidType, Deserialize)] -pub struct SignWithSchnorrResult { - pub signature: Vec, -} - -/// DISCLAIMER: This canister here provides an *unsafe* example implementation -/// of the Internet Computer's management canister API for demonstration purposes. -/// Because of this, in the following we hard-code a randomly generated master -/// secret key. Do NOT use this in production. -const MASTER_SK_ED25519_HEX: &str = - "e7183596fae9139be990cdccc7d81341ac628e825c70044e902656a0a3f76b04"; - -lazy_static::lazy_static! { - static ref MASTER_SK_ED25519: ic_crypto_ed25519::PrivateKey = ic_crypto_ed25519::PrivateKey::deserialize_raw( - &hex::decode(MASTER_SK_ED25519_HEX).expect("failed to hex-decode") - ).expect("failed to deserialize Ed25519 private key"); - static ref MASTER_PK_Ed25519: ic_crypto_ed25519::PublicKey = MASTER_SK_ED25519.public_key(); -} - -/// DISCLAIMER: This canister here provides an *unsafe* example implementation -/// of the Internet Computer's management canister API for demonstration purposes. -/// Because of this, in the following we hard-code a randomly generated master -/// secret key. Do NOT use this in production. -const MASTER_SK_SECP256K1_HEX: &str = - "4dbfb616fec0d02573e9219607814c4dc9774b164a5da9e44079db91f4de0c2d"; - -lazy_static::lazy_static! { - static ref MASTER_SK_SECP256K1: ic_crypto_secp256k1::PrivateKey = ic_crypto_secp256k1::PrivateKey::deserialize_sec1( - &hex::decode(MASTER_SK_SECP256K1_HEX).expect("failed to hex-decode") - ).expect("failed to deserialize secp256k1 private key"); - static ref MASTER_PK_SECP256K1: ic_crypto_secp256k1::PublicKey = MASTER_SK_SECP256K1.public_key(); -} - -#[update] -async fn schnorr_public_key(args: SchnorrPublicKeyArgs) -> SchnorrPublicKeyResult { - ensure_derivation_path_is_valid(&args.derivation_path); - match args.key_id.algorithm { - SchnorrAlgorithm::Bip340Secp256k1 => { - inc_call_count("schnorr_public_key_bip340Secp256k1".to_string()); - ensure_bip340secp256k1_insecure_test_key_1(&args.key_id); - let derivation_path = ic_crypto_secp256k1::DerivationPath::from_canister_id_and_path( - args.canister_id.unwrap_or_else(ic_cdk::caller).as_slice(), - &args.derivation_path, - ); - let (public_key, chain_code) = MASTER_PK_SECP256K1.derive_subkey(&derivation_path); - SchnorrPublicKeyResult { - public_key: public_key.serialize_sec1(true).to_vec(), - chain_code: chain_code.to_vec(), - } - } - SchnorrAlgorithm::Ed25519 => { - inc_call_count("schnorr_public_key_ed25519".to_string()); - ensure_ed25519_insecure_test_key_1(&args.key_id); - let derivation_path = ic_crypto_ed25519::DerivationPath::from_canister_id_and_path( - args.canister_id.unwrap_or_else(ic_cdk::caller).as_slice(), - &args.derivation_path, - ); - let (public_key, chain_code) = MASTER_PK_Ed25519.derive_subkey(&derivation_path); - SchnorrPublicKeyResult { - public_key: public_key.serialize_raw().to_vec(), - chain_code: chain_code.to_vec(), - } - } - } -} - -#[update] -async fn sign_with_schnorr(args: SignWithSchnorrArgs) -> SignWithSchnorrResult { - ensure_call_is_paid(0); - ensure_derivation_path_is_valid(&args.derivation_path); - match args.key_id.algorithm { - SchnorrAlgorithm::Bip340Secp256k1 => { - inc_call_count("sign_with_schnorr_bip340Secp256k1".to_string()); - ensure_bip340secp256k1_insecure_test_key_1(&args.key_id); - let derivation_path = ic_crypto_secp256k1::DerivationPath::from_canister_id_and_path( - ic_cdk::caller().as_slice(), - &args.derivation_path, - ); - let (derived_private_key, _chain_code) = - MASTER_SK_SECP256K1.derive_subkey(&derivation_path); - let signature = - with_rng(|rng| derived_private_key.sign_message_with_bip340(&args.message, rng)) - .await; - SignWithSchnorrResult { - signature: signature.to_vec(), - } - } - SchnorrAlgorithm::Ed25519 => { - inc_call_count("sign_with_schnorr_ed25519".to_string()); - ensure_ed25519_insecure_test_key_1(&args.key_id); - let derivation_path = ic_crypto_ed25519::DerivationPath::from_canister_id_and_path( - ic_cdk::caller().as_slice(), - &args.derivation_path, - ); - let (derived_private_key, _chain_code) = - MASTER_SK_ED25519.derive_subkey(&derivation_path); - let signature = derived_private_key.sign_message(&args.message); - SignWithSchnorrResult { - signature: signature.to_vec(), - } - } - } -} - -fn ensure_ed25519_insecure_test_key_1(key_id: &SchnorrKeyId) { - if key_id.algorithm != SchnorrAlgorithm::Ed25519 { - ic_cdk::trap("unsupported key ID algorithm"); - } - if key_id.name.as_str() != "insecure_test_key_1" { - ic_cdk::trap("unsupported key ID name"); - } -} - -fn ensure_bip340secp256k1_insecure_test_key_1(key_id: &SchnorrKeyId) { - if key_id.algorithm != SchnorrAlgorithm::Bip340Secp256k1 { - ic_cdk::trap("unsupported key ID algorithm"); - } - if key_id.name.as_str() != "insecure_test_key_1" { - ic_cdk::trap("unsupported key ID name"); - } -} diff --git a/rust/threshold-mock/src/vetkd.rs b/rust/threshold-mock/src/vetkd.rs deleted file mode 100644 index e64e30d9a..000000000 --- a/rust/threshold-mock/src/vetkd.rs +++ /dev/null @@ -1,137 +0,0 @@ -use crate::ensure_call_is_paid; -use crate::inc_call_count; - -use super::ensure_derivation_path_is_valid; -use super::with_rng; -use candid::CandidType; -use candid::Deserialize; -use candid::Principal; -use ic_cdk::update; -use ic_crypto_internal_bls12_381_type::{G2Affine, Scalar}; -use ic_crypto_internal_bls12_381_vetkd::{ - DerivationPath, DerivedPublicKey, EncryptedKey, EncryptedKeyShare, TransportPublicKey, - TransportPublicKeyDeserializationError, -}; - -pub type CanisterId = Principal; - -#[derive(CandidType, Clone, Deserialize, Eq, PartialEq)] -pub enum VetKDCurve { - #[serde(rename = "bls12_381")] - Bls12_381, -} - -#[derive(CandidType, Clone, Deserialize, Eq, PartialEq)] -pub struct VetKDKeyId { - pub curve: VetKDCurve, - pub name: String, -} - -#[derive(CandidType, Deserialize)] -pub struct VetKDPublicKeyRequest { - pub canister_id: Option, - pub derivation_path: Vec>, - pub key_id: VetKDKeyId, -} - -#[derive(CandidType, Deserialize)] -pub struct VetKDPublicKeyReply { - pub public_key: Vec, -} - -#[derive(CandidType, Deserialize)] -pub struct VetKDEncryptedKeyRequest { - pub public_key_derivation_path: Vec>, - pub derivation_id: Vec, - pub key_id: VetKDKeyId, - pub encryption_public_key: Vec, -} - -#[derive(CandidType, Deserialize)] -pub struct VetKDEncryptedKeyReply { - pub encrypted_key: Vec, -} - -/// DISCLAIMER: This canister here provides an *unsafe* example implementation -/// of a [proposed](https://github.com/dfinity/interface-spec/pull/158) vetKD -/// system API for demonstration purposes. Because of this, in the following -/// we hard-code a randomly generated master secret key. In case vetKD will be -/// integrated into the Internet Computer protocol, then such a key would be -/// created in a secure manner with distributed key generation so that the key -/// never exists in combined form anywyere and nodes can use it only collectively. -const MASTER_SK_HEX: &str = "718c36cd1dcf3501fd04bbe24c3bb9eedfd066d2420e794dd9342cf71d04176f"; - -lazy_static::lazy_static! { - static ref MASTER_SK: Scalar = Scalar::deserialize( - &hex::decode(MASTER_SK_HEX).expect("failed to hex-decode") - ).expect("failed to deserialize Scalar"); - static ref MASTER_PK: G2Affine = G2Affine::from(G2Affine::generator() * &*MASTER_SK); -} - -#[update] -async fn vetkd_public_key(request: VetKDPublicKeyRequest) -> VetKDPublicKeyReply { - inc_call_count("vetkd_public_key".to_string()); - ensure_bls12_381_insecure_test_key_1(request.key_id); - ensure_derivation_path_is_valid(&request.derivation_path); - let derivation_path = { - let canister_id = request.canister_id.unwrap_or_else(ic_cdk::caller); - DerivationPath::new(canister_id.as_slice(), &request.derivation_path) - }; - let derived_public_key = DerivedPublicKey::compute_derived_key(&MASTER_PK, &derivation_path); - VetKDPublicKeyReply { - public_key: derived_public_key.serialize().to_vec(), - } -} - -#[update] -async fn vetkd_encrypted_key(request: VetKDEncryptedKeyRequest) -> VetKDEncryptedKeyReply { - inc_call_count("vetkd_encrypted_key".to_string()); - ensure_call_is_paid(0); - ensure_bls12_381_insecure_test_key_1(request.key_id); - ensure_derivation_path_is_valid(&request.public_key_derivation_path); - let derivation_path = DerivationPath::new( - ic_cdk::caller().as_slice(), - &request.public_key_derivation_path, - ); - let tpk = - TransportPublicKey::deserialize(&request.encryption_public_key).unwrap_or_else( - |e| match e { - TransportPublicKeyDeserializationError::InvalidPublicKey => { - ic_cdk::trap("invalid encryption public key") - } - }, - ); - let eks = with_rng(|rng| { - EncryptedKeyShare::create( - rng, - &MASTER_PK, - &MASTER_SK, - &tpk, - &derivation_path, - &request.derivation_id, - ) - }) - .await; - let ek = EncryptedKey::combine( - &vec![(0, MASTER_PK.clone(), eks)], - 1, - &MASTER_PK, - &tpk, - &derivation_path, - &request.derivation_id, - ) - .unwrap_or_else(|_e| ic_cdk::trap("bad key share")); - - VetKDEncryptedKeyReply { - encrypted_key: ek.serialize().to_vec(), - } -} - -fn ensure_bls12_381_insecure_test_key_1(key_id: VetKDKeyId) { - if key_id.curve != VetKDCurve::Bls12_381 { - ic_cdk::trap("unsupported key ID curve"); - } - if key_id.name.as_str() != "insecure_test_key_1" { - ic_cdk::trap("unsupported key ID name"); - } -} diff --git a/rust/threshold-mock/tests/tests.rs b/rust/threshold-mock/tests/tests.rs deleted file mode 100644 index 74ca3b0e1..000000000 --- a/rust/threshold-mock/tests/tests.rs +++ /dev/null @@ -1,324 +0,0 @@ -use assert_matches::assert_matches; -use candid::{Decode, Encode, Principal}; -use ic_cdk::api::management_canister::main::CanisterId; -use ic_vetkd_utils::TransportSecretKey; -use pocket_ic::{PocketIc, WasmResult}; - -use chainkey_testing_canister::schnorr::SchnorrAlgorithm; -use chainkey_testing_canister::schnorr::SchnorrKeyId; -use chainkey_testing_canister::schnorr::SchnorrPublicKeyArgs; -use chainkey_testing_canister::schnorr::SchnorrPublicKeyResult; -use chainkey_testing_canister::schnorr::SignWithSchnorrArgs; -use chainkey_testing_canister::schnorr::SignWithSchnorrResult; -use chainkey_testing_canister::vetkd::VetKDCurve; -use chainkey_testing_canister::vetkd::VetKDEncryptedKeyReply; -use chainkey_testing_canister::vetkd::VetKDEncryptedKeyRequest; -use chainkey_testing_canister::vetkd::VetKDKeyId; -use chainkey_testing_canister::vetkd::VetKDPublicKeyReply; -use chainkey_testing_canister::vetkd::VetKDPublicKeyRequest; -use ic_cdk::api::management_canister::ecdsa::EcdsaCurve; -use ic_cdk::api::management_canister::ecdsa::EcdsaKeyId; -use ic_cdk::api::management_canister::ecdsa::EcdsaPublicKeyArgument; -use ic_cdk::api::management_canister::ecdsa::EcdsaPublicKeyResponse; -use ic_cdk::api::management_canister::ecdsa::SignWithEcdsaArgument; -use ic_cdk::api::management_canister::ecdsa::SignWithEcdsaResponse; - -pub const CANISTER_WASM: &[u8] = - include_bytes!("../target/wasm32-unknown-unknown/release/chainkey_testing_canister.wasm"); - -#[test] -fn should_verify_ecdsa_signature() { - let canister = CanisterSetup::default(); - - let derivation_path = vec!["test-derivation-path".as_bytes().to_vec()]; - let key_id = EcdsaKeyId { - curve: EcdsaCurve::Secp256k1, - name: "insecure_test_key_1".to_string(), - }; - let message_hash = b"12345678901234567890123456789012".to_vec(); - - let public_key_raw = canister - .ecdsa_public_key(EcdsaPublicKeyArgument { - canister_id: None, - derivation_path: derivation_path.clone(), - key_id: key_id.clone(), - }) - .public_key; - - let signature_raw = canister - .sign_with_ecdsa(SignWithEcdsaArgument { - message_hash: message_hash.clone(), - derivation_path, - key_id, - }) - .signature; - - let signature = k256::ecdsa::Signature::try_from(signature_raw.as_slice()) - .expect("failed to deserialize signature"); - let verifying_key = k256::ecdsa::VerifyingKey::from_sec1_bytes(&public_key_raw) - .expect("failed to sec1 deserialize public key"); - - use k256::ecdsa::signature::hazmat::PrehashVerifier; - assert_matches!( - verifying_key.verify_prehash(&message_hash, &signature), - Ok(()) - ); -} - -#[test] -fn should_verify_schnorr_bip340_secp256k1_signature() { - let canister = CanisterSetup::default(); - - let derivation_path = vec!["test-derivation-path".as_bytes().to_vec()]; - let key_id = SchnorrKeyId { - algorithm: SchnorrAlgorithm::Bip340Secp256k1, - name: "insecure_test_key_1".to_string(), - }; - let message = b"test-message".to_vec(); - - let public_key_raw = canister - .schnorr_public_key(SchnorrPublicKeyArgs { - canister_id: None, - derivation_path: derivation_path.clone(), - key_id: key_id.clone(), - }) - .public_key; - - let signature_raw = canister - .sign_with_schnorr(SignWithSchnorrArgs { - message: message.clone(), - derivation_path, - key_id, - }) - .signature; - - let signature = k256::schnorr::Signature::try_from(signature_raw.as_slice()) - .expect("failed to deserialize signature"); - let verifying_key = k256::schnorr::VerifyingKey::from_bytes(&public_key_raw[1..]) - .expect("failed to sec1 deserialize public key"); - - assert_matches!(verifying_key.verify_raw(&message, &signature), Ok(())); -} - -#[test] -fn should_verify_schnorr_ed25519_signature() { - let canister = CanisterSetup::default(); - - let derivation_path = vec!["test-derivation-path".as_bytes().to_vec()]; - let key_id = SchnorrKeyId { - algorithm: SchnorrAlgorithm::Ed25519, - name: "insecure_test_key_1".to_string(), - }; - let message = b"test-message".to_vec(); - - let public_key_raw = canister - .schnorr_public_key(SchnorrPublicKeyArgs { - canister_id: None, - derivation_path: derivation_path.clone(), - key_id: key_id.clone(), - }) - .public_key; - - let signature_raw = canister - .sign_with_schnorr(SignWithSchnorrArgs { - message: message.clone(), - derivation_path, - key_id, - }) - .signature; - - let signature = ed25519_dalek::Signature::try_from(signature_raw.as_slice()) - .expect("failed to deserialize signature"); - let verifying_key = ed25519_dalek::VerifyingKey::from_bytes( - &<[u8; 32]>::try_from(public_key_raw).expect("ed25519 public key should be 32 bytes"), - ) - .expect("failed to sec1 deserialize public key"); - - use ed25519_dalek::Verifier; - assert_matches!(verifying_key.verify(&message, &signature), Ok(())); -} - -#[test] -fn should_consistently_derive_vetkey() { - let canister = CanisterSetup::default(); - - let derivation_path = vec!["test-derivation-path".as_bytes().to_vec()]; - let key_id = VetKDKeyId { - curve: VetKDCurve::Bls12_381, - name: "insecure_test_key_1".to_string(), - }; - let derivation_id = b"test-derivation-id".to_vec(); - - let public_key_bytes = canister - .vetkd_public_key(VetKDPublicKeyRequest { - canister_id: None, - derivation_path: derivation_path.clone(), - key_id: key_id.clone(), - }) - .public_key; - - let tsk_1 = TransportSecretKey::from_seed([101; 32].to_vec()) - .expect("failed to create transport secret key"); - let encrypted_key_1 = canister - .vetkd_encrypted_key(VetKDEncryptedKeyRequest { - public_key_derivation_path: derivation_path.clone(), - derivation_id: derivation_id.clone(), - encryption_public_key: tsk_1.public_key(), - key_id: key_id.clone(), - }) - .encrypted_key; - let decrypted_key_1 = tsk_1 - .decrypt(&encrypted_key_1, &public_key_bytes, &derivation_id) - .expect("failed to decrypted vetKey"); - - let tsk_2 = TransportSecretKey::from_seed([102; 32].to_vec()) - .expect("failed to create transport secret key"); - let encrypted_key_2 = canister - .vetkd_encrypted_key(VetKDEncryptedKeyRequest { - public_key_derivation_path: derivation_path, - derivation_id: derivation_id.clone(), - encryption_public_key: tsk_2.public_key(), - key_id, - }) - .encrypted_key; - let decrypted_key_2 = tsk_2 - .decrypt(&encrypted_key_2, &public_key_bytes, &derivation_id) - .expect("failed to decrypted vetKey"); - - assert_eq!(decrypted_key_1, decrypted_key_2); -} - -pub struct CanisterSetup { - env: PocketIc, - canister_id: CanisterId, -} - -impl CanisterSetup { - pub fn new() -> Self { - let env = PocketIc::new(); - let canister_id = env.create_canister(); - env.add_cycles(canister_id, u128::MAX); - env.install_canister(canister_id, CANISTER_WASM.to_vec(), vec![], None); - Self { env, canister_id } - } - - pub fn ecdsa_public_key(&self, args: EcdsaPublicKeyArgument) -> EcdsaPublicKeyResponse { - let method = "ecdsa_public_key"; - let result = self.env.update_call( - self.canister_id, - Principal::anonymous(), - method, - Encode!(&args).expect("failed to encode ecdsa_public_key args"), - ); - match result { - Ok(WasmResult::Reply(bytes)) => { - Decode!(&bytes, EcdsaPublicKeyResponse).expect("failed to decode {method} result") - } - Ok(WasmResult::Reject(error)) => { - panic!("canister rejected call to {method}: {error}") - } - Err(user_error) => panic!("{method} user error: {user_error}"), - } - } - - pub fn sign_with_ecdsa(&self, args: SignWithEcdsaArgument) -> SignWithEcdsaResponse { - let method = "sign_with_ecdsa"; - let result = self.env.update_call( - self.canister_id, - Principal::anonymous(), - method, - Encode!(&args).expect("failed to encode args"), - ); - match result { - Ok(WasmResult::Reply(bytes)) => { - Decode!(&bytes, SignWithEcdsaResponse).expect("failed to decode {method} result") - } - Ok(WasmResult::Reject(error)) => { - panic!("canister rejected call to {method}: {error}") - } - Err(user_error) => panic!("{method} user error: {user_error}"), - } - } - - pub fn schnorr_public_key(&self, args: SchnorrPublicKeyArgs) -> SchnorrPublicKeyResult { - let method = "schnorr_public_key"; - let result = self.env.update_call( - self.canister_id, - Principal::anonymous(), - method, - Encode!(&args).expect("failed to encode args"), - ); - match result { - Ok(WasmResult::Reply(bytes)) => { - Decode!(&bytes, SchnorrPublicKeyResult).expect("failed to decode {method} result") - } - Ok(WasmResult::Reject(error)) => { - panic!("canister rejected call to {method}: {error}") - } - Err(user_error) => panic!("{method} user error: {user_error}"), - } - } - - pub fn sign_with_schnorr(&self, args: SignWithSchnorrArgs) -> SignWithSchnorrResult { - let method = "sign_with_schnorr"; - let result = self.env.update_call( - self.canister_id, - Principal::anonymous(), - method, - Encode!(&args).expect("failed to encode args"), - ); - match result { - Ok(WasmResult::Reply(bytes)) => { - Decode!(&bytes, SignWithSchnorrResult).expect("failed to decode {method} result") - } - Ok(WasmResult::Reject(error)) => { - panic!("canister rejected call to {method}: {error}") - } - Err(user_error) => panic!("{method} user error: {user_error}"), - } - } - - pub fn vetkd_public_key(&self, args: VetKDPublicKeyRequest) -> VetKDPublicKeyReply { - let method = "vetkd_public_key"; - let result = self.env.update_call( - self.canister_id, - Principal::anonymous(), - method, - Encode!(&args).expect("failed to encode args"), - ); - match result { - Ok(WasmResult::Reply(bytes)) => { - Decode!(&bytes, VetKDPublicKeyReply).expect("failed to decode {method} result") - } - Ok(WasmResult::Reject(error)) => { - panic!("canister rejected call to {method}: {error}") - } - Err(user_error) => panic!("{method} user error: {user_error}"), - } - } - - pub fn vetkd_encrypted_key(&self, args: VetKDEncryptedKeyRequest) -> VetKDEncryptedKeyReply { - let method = "vetkd_encrypted_key"; - let result = self.env.update_call( - self.canister_id, - Principal::anonymous(), - method, - Encode!(&args).expect("failed to encode args"), - ); - match result { - Ok(WasmResult::Reply(bytes)) => { - Decode!(&bytes, VetKDEncryptedKeyReply).expect("failed to decode {method} result") - } - Ok(WasmResult::Reject(error)) => { - panic!("canister rejected call to {method}: {error}") - } - Err(user_error) => panic!("{method} user error: {user_error}"), - } - } -} - -impl Default for CanisterSetup { - fn default() -> Self { - Self::new() - } -} diff --git a/rust/threshold-schnorr/README.md b/rust/threshold-schnorr/README.md index 5982fcc98..11ef6b1ca 100644 --- a/rust/threshold-schnorr/README.md +++ b/rust/threshold-schnorr/README.md @@ -81,7 +81,7 @@ To deploy this canister the mainnet, one needs to do two things: #### Acquire cycles to deploy -Deploying to the Internet Computer requires [cycles](https://internetcomputer.org/docs/current/developer-docs/setup/cycles). You can get free cycles from the [cycles faucet](https://internetcomputer.org/docs/current/developer-docs/getting-started/cycles/cycles-faucet). +Deploying to the Internet Computer requires [cycles](https://internetcomputer.org/docs/current/developer-docs/getting-started/tokens-and-cycles) (the equivalent of "gas" on other blockchains). #### Update source code with the right key ID diff --git a/rust/x509/Cargo.lock b/rust/x509/Cargo.lock index 56879d4e7..93fecbc2c 100644 --- a/rust/x509/Cargo.lock +++ b/rust/x509/Cargo.lock @@ -4,9 +4,9 @@ version = 3 [[package]] name = "addr2line" -version = "0.24.1" +version = "0.24.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f5fb1d8e4442bd405fdfd1dacb42792696b0cf9cb15882e5d097b742a676d375" +checksum = "dfbe277e56a376000877090da837660b4427aad530e3028d44e0bffe4f89a1c1" dependencies = [ "gimli", ] @@ -28,9 +28,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.79" +version = "1.0.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "080e9890a082662b09c1ad45f567faeeb47f22b5fb23895fbe1e651e718e25ca" +checksum = "4c95c10ba0b00a02636238b814946408b1322d5ac4760326e6fb8ec956d85775" [[package]] name = "arrayvec" @@ -46,9 +46,9 @@ checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" [[package]] name = "autocfg" -version = "1.1.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" +checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" [[package]] name = "backtrace" @@ -141,9 +141,9 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.7.2" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "428d9aa8fbc0670b7b8d6030a7fadd0f86151cae55e4dbbece15f3780a3dfaf3" +checksum = "9ac0150caa2ae65ca5bd83f25c7de183dea78d4d366469f148435e2acfbad0da" [[package]] name = "candid" @@ -165,7 +165,7 @@ dependencies = [ "serde", "serde_bytes", "stacker", - "thiserror", + "thiserror 1.0.69", ] [[package]] @@ -177,16 +177,16 @@ dependencies = [ "lazy_static", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.87", ] [[package]] name = "cc" -version = "1.0.83" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" +checksum = "fd9de9f2205d5ef3fd67e685b0df337994ddd4495e2a28d185500d0e1edfea47" dependencies = [ - "libc", + "shlex", ] [[package]] @@ -195,6 +195,12 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" +[[package]] +name = "cfg_aliases" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" + [[package]] name = "const-oid" version = "0.9.6" @@ -219,18 +225,18 @@ checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" [[package]] name = "cpufeatures" -version = "0.2.12" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" +checksum = "0ca741a962e1b0bff6d724a1a0958b686406e853bb14061f218562e1896f95e6" dependencies = [ "libc", ] [[package]] name = "crc32fast" -version = "1.3.2" +version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d" +checksum = "a97769d94ddab943e4510d138150169a2758b5ef3eb191a9ee688de3e23ef7b3" dependencies = [ "cfg-if", ] @@ -296,14 +302,14 @@ checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.87", ] [[package]] name = "data-encoding" -version = "2.5.0" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e962a19be5cfc3f3bf6dd8f61eb50107f356ad6270fbb3ed41476571db78be5" +checksum = "e8566979429cf69b49a5c740c60791108e86440e8be149bbea4fe54d2c32d6e2" [[package]] name = "der" @@ -326,7 +332,7 @@ checksum = "8034092389675178f570469e6c3b0465d3d30b4505c294a6550db47f3c17ad18" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.87", ] [[package]] @@ -350,6 +356,17 @@ dependencies = [ "subtle", ] +[[package]] +name = "displaydoc" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", +] + [[package]] name = "dyn-clone" version = "1.0.17" @@ -396,9 +413,9 @@ dependencies = [ [[package]] name = "either" -version = "1.9.0" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" +checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" [[package]] name = "elliptic-curve" @@ -489,9 +506,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" +checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" dependencies = [ "futures-core", "futures-sink", @@ -499,44 +516,44 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" +checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" [[package]] name = "futures-io" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" +checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" [[package]] name = "futures-macro" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" +checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.87", ] [[package]] name = "futures-sink" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5" +checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" [[package]] name = "futures-task" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" +checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" [[package]] name = "futures-util" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" +checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" dependencies = [ "futures-core", "futures-io", @@ -562,20 +579,22 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.12" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "190092ea657667030ac6a35e305e62fc4dd69fd98ac98631e5d3a2b1575a12b5" +checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" dependencies = [ "cfg-if", + "js-sys", "libc", "wasi", + "wasm-bindgen", ] [[package]] name = "gimli" -version = "0.31.0" +version = "0.31.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32085ea23f3234fc7846555e85283ba4de91e21016dc0455a16286d87a292d64" +checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" [[package]] name = "group" @@ -609,9 +628,9 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.14.5" +version = "0.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" +checksum = "3a9bfc1af68b1726ea47d3d5109de126281def866b33970e10fbab11b5dafab3" [[package]] name = "heck" @@ -685,9 +704,9 @@ checksum = "7d71d3574edd2771538b901e6549113b4006ece66150fb69c0fb6d9a2adae946" [[package]] name = "hyper" -version = "1.4.1" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50dfd22e0e76d0f662d429a5f80fcaf3855009297eab6a0a9f8543834744ba05" +checksum = "bbbff0a806a4728c99295b254c8838933b5b082d75e3cb70c8dab21fdfbcfa9a" dependencies = [ "bytes", "futures-channel", @@ -724,9 +743,9 @@ dependencies = [ [[package]] name = "hyper-util" -version = "0.1.9" +version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41296eb09f183ac68eec06e03cdbea2e759633d4067b2f6552fc2e009bcad08b" +checksum = "df2dcfbe0677734ab2f3ffa7fa7bfd4706bfdc1ef393f2ee30184aed67e631b4" dependencies = [ "bytes", "futures-channel", @@ -792,7 +811,7 @@ dependencies = [ "quote", "serde", "serde_tokenstream 0.2.2", - "syn 2.0.48", + "syn 2.0.87", ] [[package]] @@ -817,24 +836,153 @@ dependencies = [ "data-encoding", "serde", "sha2", - "thiserror", + "thiserror 1.0.69", +] + +[[package]] +name = "icu_collections" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db2fa452206ebee18c4b5c2274dbf1de17008e874b4dc4f0aea9d01ca79e4526" +dependencies = [ + "displaydoc", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_locid" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13acbb8371917fc971be86fc8057c41a64b521c184808a698c02acc242dbf637" +dependencies = [ + "displaydoc", + "litemap", + "tinystr", + "writeable", + "zerovec", +] + +[[package]] +name = "icu_locid_transform" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01d11ac35de8e40fdeda00d9e1e9d92525f3f9d887cdd7aa81d727596788b54e" +dependencies = [ + "displaydoc", + "icu_locid", + "icu_locid_transform_data", + "icu_provider", + "tinystr", + "zerovec", +] + +[[package]] +name = "icu_locid_transform_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fdc8ff3388f852bede6b579ad4e978ab004f139284d7b28715f773507b946f6e" + +[[package]] +name = "icu_normalizer" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19ce3e0da2ec68599d193c93d088142efd7f9c5d6fc9b803774855747dc6a84f" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_normalizer_data", + "icu_properties", + "icu_provider", + "smallvec", + "utf16_iter", + "utf8_iter", + "write16", + "zerovec", +] + +[[package]] +name = "icu_normalizer_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8cafbf7aa791e9b22bec55a167906f9e1215fd475cd22adfcf660e03e989516" + +[[package]] +name = "icu_properties" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93d6020766cfc6302c15dbbc9c8778c37e62c14427cb7f6e601d849e092aeef5" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_locid_transform", + "icu_properties_data", + "icu_provider", + "tinystr", + "zerovec", +] + +[[package]] +name = "icu_properties_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67a8effbc3dd3e4ba1afa8ad918d5684b8868b3b26500753effea8d2eed19569" + +[[package]] +name = "icu_provider" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ed421c8a8ef78d3e2dbc98a973be2f3770cb42b606e3ab18d6237c4dfde68d9" +dependencies = [ + "displaydoc", + "icu_locid", + "icu_provider_macros", + "stable_deref_trait", + "tinystr", + "writeable", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_provider_macros" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", ] [[package]] name = "idna" -version = "0.5.0" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "686f825264d630750a544639377bae737628043f20d38bbc029e8f29ea968a7e" +dependencies = [ + "idna_adapter", + "smallvec", + "utf8_iter", +] + +[[package]] +name = "idna_adapter" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" +checksum = "daca1df1c957320b2cf139ac61e7bd64fed304c5040df000a745aa1de3b4ef71" dependencies = [ - "unicode-bidi", - "unicode-normalization", + "icu_normalizer", + "icu_properties", ] [[package]] name = "indexmap" -version = "2.5.0" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68b900aa2f7301e21c36462b170ee99994de34dff39a4a6a528e80e7376d07e5" +checksum = "707907fe3c25f5424cce2cb7e1cbcafee6bdbe735ca90ef77c29e84591e5b9da" dependencies = [ "equivalent", "hashbrown", @@ -842,9 +990,9 @@ dependencies = [ [[package]] name = "ipnet" -version = "2.10.0" +version = "2.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "187674a687eed5fe42285b40c6291f9a01517d415fad1c3cbc6a9f778af7fcd4" +checksum = "ddc24109865250148c2e0f3d25d4f0f479571723792d3802153c60922a4fb708" [[package]] name = "itoa" @@ -854,18 +1002,18 @@ checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" [[package]] name = "js-sys" -version = "0.3.70" +version = "0.3.72" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1868808506b929d7b0cfa8f75951347aa71bb21144b7791bae35d9bccfcfe37a" +checksum = "6a88f1bda2bd75b0452a14784937d796722fdebfe50df998aeb3f0b7603019a9" dependencies = [ "wasm-bindgen", ] [[package]] name = "k256" -version = "0.13.3" +version = "0.13.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "956ff9b67e26e1a6a866cb758f12c6f8746208489e3e4a4b5580802f2f0a587b" +checksum = "f6e3919bbaa2945715f0bb6d3934a173d1e9a59ac23767fbaaef277265a7411b" dependencies = [ "cfg-if", "ecdsa", @@ -877,9 +1025,9 @@ dependencies = [ [[package]] name = "lazy_static" -version = "1.4.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" +checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" [[package]] name = "leb128" @@ -889,9 +1037,15 @@ checksum = "884e2677b40cc8c339eaefcb701c32ef1fd2493d71118dc0ca4b6a736c93bd67" [[package]] name = "libc" -version = "0.2.159" +version = "0.2.162" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "18d287de67fe55fd7e1581fe933d965a5a9477b38e949cfa9f8574ef01506398" + +[[package]] +name = "litemap" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "561d97a539a36e26a9a5fad1ea11a3039a67714694aaa379433e580854bc3dc5" +checksum = "643cb0b8d4fcc284004d5fd0d67ccf61dfffadb7f75e1e71bc420f4688a3a704" [[package]] name = "lock_api" @@ -973,11 +1127,10 @@ dependencies = [ [[package]] name = "num-bigint" -version = "0.4.4" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "608e7659b5c3d7cba262d894801b9ec9d00de989e8a82bd4bef91d08da45cdc0" +checksum = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9" dependencies = [ - "autocfg", "num-integer", "num-traits", "serde", @@ -991,11 +1144,10 @@ checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" [[package]] name = "num-integer" -version = "0.1.45" +version = "0.1.46" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" +checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" dependencies = [ - "autocfg", "num-traits", ] @@ -1010,24 +1162,24 @@ dependencies = [ [[package]] name = "object" -version = "0.36.4" +version = "0.36.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "084f1a5821ac4c651660a94a7153d27ac9d8a53736203f58b31945ded098070a" +checksum = "aedf0a2d09c573ed1d8d85b30c119153926a2b36dce0ab28322c09a117a4683e" dependencies = [ "memchr", ] [[package]] name = "once_cell" -version = "1.19.0" +version = "1.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" +checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775" [[package]] name = "openssl" -version = "0.10.66" +version = "0.10.68" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9529f4786b70a3e8c61e11179af17ab6188ad8d0ded78c5529441ed39d4bd9c1" +checksum = "6174bc48f102d208783c2c84bf931bb75927a617866870de8a4ea85597f871f5" dependencies = [ "bitflags", "cfg-if", @@ -1046,7 +1198,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.87", ] [[package]] @@ -1057,9 +1209,9 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "openssl-sys" -version = "0.9.103" +version = "0.9.104" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f9e8deee91df40a943c71b917e5874b951d32a802526c85721ce3b776c929d6" +checksum = "45abf306cbf99debc8195b66b7346498d7b10c210de50418b5ccd7ceba08c741" dependencies = [ "cc", "libc", @@ -1098,9 +1250,9 @@ dependencies = [ [[package]] name = "paste" -version = "1.0.14" +version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" +checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" [[package]] name = "pem-rfc7468" @@ -1119,9 +1271,9 @@ checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" [[package]] name = "pin-project-lite" -version = "0.2.14" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" +checksum = "915a1e146535de9163f3987b8944ed8cf49a18bb0056bcebcdcece385cece4ff" [[package]] name = "pin-utils" @@ -1196,27 +1348,27 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.76" +version = "1.0.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95fc56cda0b5c3325f5fbbd7ff9fda9e02bb00bb3dac51252d2f1bfa1cb8cc8c" +checksum = "f139b0662de085916d1fb67d2b4169d1addddda1919e696f3252b740b629986e" dependencies = [ "unicode-ident", ] [[package]] name = "psm" -version = "0.1.21" +version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5787f7cda34e3033a72192c018bc5883100330f362ef279a8cbccfce8bb4e874" +checksum = "200b9ff220857e53e184257720a14553b2f4aa02577d2ed9842d45d4b9654810" dependencies = [ "cc", ] [[package]] name = "quinn" -version = "0.11.5" +version = "0.11.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c7c5fdde3cdae7203427dc4f0a68fe0ed09833edc525a03456b153b79828684" +checksum = "62e96808277ec6f97351a2380e6c25114bc9e67037775464979f3037c92d05ef" dependencies = [ "bytes", "pin-project-lite", @@ -1225,34 +1377,38 @@ dependencies = [ "rustc-hash", "rustls", "socket2", - "thiserror", + "thiserror 2.0.3", "tokio", "tracing", ] [[package]] name = "quinn-proto" -version = "0.11.8" +version = "0.11.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fadfaed2cd7f389d0161bb73eeb07b7b78f8691047a6f3e73caaeae55310a4a6" +checksum = "a2fe5ef3495d7d2e377ff17b1a8ce2ee2ec2a18cde8b6ad6619d65d0701c135d" dependencies = [ "bytes", + "getrandom", "rand", "ring", "rustc-hash", "rustls", + "rustls-pki-types", "slab", - "thiserror", + "thiserror 2.0.3", "tinyvec", "tracing", + "web-time", ] [[package]] name = "quinn-udp" -version = "0.5.5" +version = "0.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fe68c2e9e1a1234e218683dbdf9f9dfcb094113c5ac2b938dfcb9bab4c4140b" +checksum = "7d5a626c6807713b15cac82a6acaccd6043c9a5408c24baae07611fec3f243da" dependencies = [ + "cfg_aliases", "libc", "once_cell", "socket2", @@ -1262,9 +1418,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.35" +version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" +checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" dependencies = [ "proc-macro2", ] @@ -1310,13 +1466,13 @@ dependencies = [ [[package]] name = "regex" -version = "1.11.0" +version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38200e5ee88914975b69f657f0801b6f6dccafd44fd9326302a4aaeecfacb1d8" +checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" dependencies = [ "aho-corasick", "memchr", - "regex-automata 0.4.8", + "regex-automata 0.4.9", "regex-syntax 0.8.5", ] @@ -1331,9 +1487,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.8" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "368758f23274712b504848e9d5a6f010445cc8b87a7cdb4d7cbee666c1288da3" +checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908" dependencies = [ "aho-corasick", "memchr", @@ -1354,9 +1510,9 @@ checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" [[package]] name = "reqwest" -version = "0.12.8" +version = "0.12.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f713147fbe92361e52392c73b8c9e48c04c6625bce969ef54dc901e58e042a7b" +checksum = "a77c62af46e79de0a562e1a9849205ffcb7fc1238876e9bd743357570e04046f" dependencies = [ "base64 0.22.1", "bytes", @@ -1449,9 +1605,9 @@ dependencies = [ [[package]] name = "rustls" -version = "0.23.13" +version = "0.23.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2dabaac7466917e566adb06783a81ca48944c6898a1b08b9374106dd671f4c8" +checksum = "eee87ff5d9b36712a58574e12e9f0ea80f915a5b0ac518d322b24a465617925e" dependencies = [ "once_cell", "ring", @@ -1485,9 +1641,12 @@ dependencies = [ [[package]] name = "rustls-pki-types" -version = "1.9.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e696e35370c65c9c541198af4543ccd580cf17fc25d8e05c5a242b202488c55" +checksum = "16f1201b3c9a7ee8039bcadc17b7e605e2945b27eee7631788c1bd2b0643674b" +dependencies = [ + "web-time", +] [[package]] name = "rustls-webpki" @@ -1502,9 +1661,9 @@ dependencies = [ [[package]] name = "rustversion" -version = "1.0.14" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" +checksum = "0e819f2bc632f285be6d7cd36e25940d45b2391dd6d9b939e79de557f7014248" [[package]] name = "ryu" @@ -1514,9 +1673,9 @@ checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" [[package]] name = "schannel" -version = "0.1.24" +version = "0.1.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9aaafd5a2b6e3d657ff009d82fbd630b6bd54dd4eb06f21693925cdf80f9b8b" +checksum = "01227be5826fa0690321a2ba6c5cd57a19cf3f6a09e76973b58e61de6ab9d1c1" dependencies = [ "windows-sys 0.59.0", ] @@ -1542,7 +1701,7 @@ dependencies = [ "proc-macro2", "quote", "serde_derive_internals", - "syn 2.0.48", + "syn 2.0.87", ] [[package]] @@ -1580,9 +1739,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.12.0" +version = "2.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea4a292869320c0272d7bc55a5a6aafaff59b4f63404a003887b679a2e05b4b6" +checksum = "fa39c7303dc58b5543c94d22c1766b0d31f2ee58306363ea622b10bbc075eaa2" dependencies = [ "core-foundation-sys", "libc", @@ -1596,9 +1755,9 @@ checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" [[package]] name = "serde" -version = "1.0.210" +version = "1.0.215" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8e3592472072e6e22e0a54d5904d9febf8508f65fb8552499a1abc7d1078c3a" +checksum = "6513c1ad0b11a9376da888e3e0baa0077f1aed55c17f50e7b2397136129fb88f" dependencies = [ "serde_derive", ] @@ -1614,13 +1773,13 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.210" +version = "1.0.215" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "243902eda00fad750862fc144cea25caca5e20d615af0a81bee94ca738f1df1f" +checksum = "ad1e866f866923f252f05c889987993144fb74e722403468a4ebd70c3cd756c0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.87", ] [[package]] @@ -1631,14 +1790,14 @@ checksum = "18d26a20a969b9e3fdf2fc2d9f21eda6c40e2de84c9408bb5d3b05d499aae711" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.87", ] [[package]] name = "serde_json" -version = "1.0.128" +version = "1.0.132" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ff5456707a1de34e7e37f2a6fd3d3f808c318259cbd01ab6377795054b483d8" +checksum = "d726bfaff4b320266d395898905d0eba0345aae23b54aee3a737e260fd46db03" dependencies = [ "itoa", "memchr", @@ -1666,7 +1825,7 @@ dependencies = [ "proc-macro2", "quote", "serde", - "syn 2.0.48", + "syn 2.0.87", ] [[package]] @@ -1712,6 +1871,12 @@ dependencies = [ "lazy_static", ] +[[package]] +name = "shlex" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" + [[package]] name = "signal-hook-registry" version = "1.4.2" @@ -1781,17 +1946,23 @@ dependencies = [ "der", ] +[[package]] +name = "stable_deref_trait" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" + [[package]] name = "stacker" -version = "0.1.15" +version = "0.1.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c886bd4480155fd3ef527d45e9ac8dd7118a898a46530b7b94c3e21866259fce" +checksum = "799c883d55abdb5e98af1a7b3f23b9b6de8ecada0ecac058672d7635eb48ca7b" dependencies = [ "cc", "cfg-if", "libc", "psm", - "winapi", + "windows-sys 0.59.0", ] [[package]] @@ -1810,7 +1981,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.48", + "syn 2.0.87", ] [[package]] @@ -1832,9 +2003,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.48" +version = "2.0.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f3531638e407dfc0814761abb7c00a5b54992b849452a0646b7f65c9f770f3f" +checksum = "25aa4ce346d03a6dcd68dd8b4010bcb74e54e62c90c573f394c46eae99aba32d" dependencies = [ "proc-macro2", "quote", @@ -1850,24 +2021,55 @@ dependencies = [ "futures-core", ] +[[package]] +name = "synstructure" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", +] + +[[package]] +name = "thiserror" +version = "1.0.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" +dependencies = [ + "thiserror-impl 1.0.69", +] + [[package]] name = "thiserror" -version = "1.0.56" +version = "2.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d54378c645627613241d077a3a79db965db602882668f9136ac42af9ecb730ad" +checksum = "c006c85c7651b3cf2ada4584faa36773bd07bac24acfb39f3c431b36d7e667aa" dependencies = [ - "thiserror-impl", + "thiserror-impl 2.0.3", ] [[package]] name = "thiserror-impl" -version = "1.0.56" +version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa0faa943b50f3db30a20aa7e265dbc66076993efed8463e8de414e5d06d3471" +checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.87", +] + +[[package]] +name = "thiserror-impl" +version = "2.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f077553d607adc1caf65430528a576c757a71ed73944b66ebb58ef2bbd243568" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", ] [[package]] @@ -1911,6 +2113,16 @@ dependencies = [ "time-core", ] +[[package]] +name = "tinystr" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9117f5d4db391c1cf6927e7bea3db74b9a1c1add8f7eda9ffd5364f40f57b82f" +dependencies = [ + "displaydoc", + "zerovec", +] + [[package]] name = "tinyvec" version = "1.8.0" @@ -1944,14 +2156,14 @@ checksum = "8d9ef545650e79f30233c0003bcc2504d7efac6dad25fca40744de773fe2049c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.87", ] [[package]] name = "tokio" -version = "1.40.0" +version = "1.41.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2b070231665d27ad9ec9b8df639893f46727666c6767db40317fbe920a5d998" +checksum = "22cfb5bee7a6a52939ca9224d6ac897bb669134078daa8735560897f69de4d33" dependencies = [ "backtrace", "bytes", @@ -1973,7 +2185,7 @@ checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.87", ] [[package]] @@ -1995,7 +2207,7 @@ checksum = "0d4770b8024672c1101b3f6733eab95b18007dbe0847a8afe341fcf79e06043f" dependencies = [ "either", "futures-util", - "thiserror", + "thiserror 1.0.69", "tokio", ] @@ -2036,7 +2248,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3566e8ce28cc0a3fe42519fc80e6b4c943cc4c8cef275620eb8dac2d3d4e06cf" dependencies = [ "crossbeam-channel", - "thiserror", + "thiserror 1.0.69", "time", "tracing-subscriber", ] @@ -2049,7 +2261,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.87", ] [[package]] @@ -2124,39 +2336,21 @@ checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" [[package]] name = "unicase" -version = "2.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7d2d4dafb69621809a81864c9c1b864479e1235c0dd4e199924b9742439ed89" -dependencies = [ - "version_check", -] - -[[package]] -name = "unicode-bidi" -version = "0.3.15" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" +checksum = "7e51b68083f157f853b6379db119d1c1be0e6e4dec98101079dec41f6f5cf6df" [[package]] name = "unicode-ident" -version = "1.0.12" +version = "1.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" - -[[package]] -name = "unicode-normalization" -version = "0.1.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5033c97c4262335cded6d6fc3e5c18ab755e1a3dc96376350f3d8e9f009ad956" -dependencies = [ - "tinyvec", -] +checksum = "e91b56cd4cadaeb79bbf1a5645f6b4f8dc5bde8834ad5894a8db35fda9efa1fe" [[package]] name = "unicode-width" -version = "0.1.11" +version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e51733f11c9c4f72aa0c160008246859e340b00807569a0da0e7a1079b27ba85" +checksum = "7dd6e30e90baa6f72411720665d41d89b9a3d039dc45b8faea1ddd07f617f6af" [[package]] name = "untrusted" @@ -2166,15 +2360,27 @@ checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" [[package]] name = "url" -version = "2.5.2" +version = "2.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22784dbdf76fdde8af1aeda5622b546b422b6fc585325248a2bf9f5e41e94d6c" +checksum = "8d157f1b96d14500ffdc1f10ba712e780825526c03d9a49b4d0324b0d9113ada" dependencies = [ "form_urlencoded", "idna", "percent-encoding", ] +[[package]] +name = "utf16_iter" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8232dd3cdaed5356e0f716d285e4b40b932ac434100fe9b7e0e8e935b9e6246" + +[[package]] +name = "utf8_iter" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" + [[package]] name = "valuable" version = "0.1.0" @@ -2189,9 +2395,9 @@ checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" [[package]] name = "version_check" -version = "0.9.4" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" +checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" [[package]] name = "want" @@ -2210,9 +2416,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.93" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a82edfc16a6c469f5f44dc7b571814045d60404b55a0ee849f9bcfa2e63dd9b5" +checksum = "128d1e363af62632b8eb57219c8fd7877144af57558fb2ef0368d0087bddeb2e" dependencies = [ "cfg-if", "once_cell", @@ -2221,24 +2427,24 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.93" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9de396da306523044d3302746f1208fa71d7532227f15e347e2d93e4145dd77b" +checksum = "cb6dd4d3ca0ddffd1dd1c9c04f94b868c37ff5fac97c30b97cff2d74fce3a358" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.87", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.43" +version = "0.4.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61e9300f63a621e96ed275155c108eb6f843b6a26d053f122ab69724559dc8ed" +checksum = "cc7ec4f8827a71586374db3e87abdb5a2bb3a15afed140221307c3ec06b1f63b" dependencies = [ "cfg-if", "js-sys", @@ -2248,9 +2454,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.93" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "585c4c91a46b072c92e908d99cb1dcdf95c5218eeb6f3bf1efa991ee7a68cccf" +checksum = "e79384be7f8f5a9dd5d7167216f022090cf1f9ec128e6e6a482a2cb5c5422c56" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -2258,28 +2464,28 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.93" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "afc340c74d9005395cf9dd098506f7f44e38f2b4a21c6aaacf9a105ea5e1e836" +checksum = "26c6ab57572f7a24a4985830b120de1594465e5d500f24afe89e16b4e833ef68" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.87", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.93" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c62a0a307cb4a311d3a07867860911ca130c3494e8c2719593806c08bc5d0484" +checksum = "65fc09f10666a9f147042251e0dda9c18f166ff7de300607007e96bdebc1068d" [[package]] name = "wasm-streams" -version = "0.4.1" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e072d4e72f700fb3443d8fe94a39315df013eef1104903cdb0a2abd322bbecd" +checksum = "15053d8d85c7eccdbefef60f06769760a563c7f0a9d6902a13d35c7800b0ad65" dependencies = [ "futures-util", "js-sys", @@ -2290,9 +2496,19 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.70" +version = "0.3.72" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26fdeaafd9bd129f65e7c031593c24d62186301e0c72c8978fa1678be7d532c0" +checksum = "f6488b90108c040df0fe62fa815cbdee25124641df01814dd7282749234c6112" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "web-time" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a6580f308b1fad9207618087a65c04e7a10bc77e02c8e84e9b00dd4b12fa0bb" dependencies = [ "js-sys", "wasm-bindgen", @@ -2441,6 +2657,18 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" +[[package]] +name = "write16" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d1890f4022759daae28ed4fe62859b1236caebfc61ede2f63ed4e695f3f6d936" + +[[package]] +name = "writeable" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e9df38ee2d2c3c5948ea468a8406ff0db0b29ae1ffde1bcf20ef305bcc95c51" + [[package]] name = "x509-cert" version = "0.2.5" @@ -2482,6 +2710,30 @@ dependencies = [ "x509-cert", ] +[[package]] +name = "yoke" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c5b1314b079b0930c31e3af543d8ee1757b1951ae1e1565ec704403a7240ca5" +dependencies = [ + "serde", + "stable_deref_trait", + "yoke-derive", + "zerofrom", +] + +[[package]] +name = "yoke-derive" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28cc31741b18cb6f1d5ff12f5b7523e3d6eb0852bbbad19d73905511d9849b95" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", + "synstructure", +] + [[package]] name = "zerocopy" version = "0.7.35" @@ -2500,7 +2752,28 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.87", +] + +[[package]] +name = "zerofrom" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91ec111ce797d0e0784a1116d0ddcdbea84322cd79e5d5ad173daeba4f93ab55" +dependencies = [ + "zerofrom-derive", +] + +[[package]] +name = "zerofrom-derive" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ea7b4a3637ea8669cedf0f1fd5c286a17f3de97b8dd5a70a6c167a1730e63a5" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", + "synstructure", ] [[package]] @@ -2520,5 +2793,27 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.87", +] + +[[package]] +name = "zerovec" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa2b893d79df23bfb12d5461018d408ea19dfafe76c2c7ef6d4eba614f8ff079" +dependencies = [ + "yoke", + "zerofrom", + "zerovec-derive", +] + +[[package]] +name = "zerovec-derive" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6eafa6dfb17584ea3e2bd6e76e0cc15ad7af12b09abdd1ca55961bed9b1063c6" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", ] diff --git a/rust/x509/README.md b/rust/x509/README.md index ef3fc6ed7..17f9fd5c4 100644 --- a/rust/x509/README.md +++ b/rust/x509/README.md @@ -88,7 +88,7 @@ To deploy this canister the mainnet, one needs to do two things: #### Acquire cycles to deploy -Deploying to the Internet Computer requires [cycles](https://internetcomputer.org/docs/current/developer-docs/setup/cycles). You can get free cycles from the [cycles faucet](https://internetcomputer.org/docs/current/developer-docs/getting-started/cycles/cycles-faucet). +Deploying to the Internet Computer requires [cycles](https://internetcomputer.org/docs/current/developer-docs/getting-started/tokens-and-cycles) (the equivalent of "gas" on other blockchains). #### Update source code with the right key ID diff --git a/svelte/svelte-motoko-starter/README.md b/svelte/svelte-motoko-starter/README.md index c0347f9bb..7785caa28 100644 --- a/svelte/svelte-motoko-starter/README.md +++ b/svelte/svelte-motoko-starter/README.md @@ -170,15 +170,7 @@ npm run dev ## Deploying to the mainnet -To host the Svelte app on ICP, you'll need to have some cycles available. Cycles pay for the execution of your app, and they are also needed to create canisters. - -You can get cycles for free from the cycles faucet. To claim them, follow [this guide](https://internetcomputer.org/docs/current/developer-docs/setup/cycles/cycles-faucet). - -After following that guide, you should have a balance of cycles to use. You can check the balance by running: - -``` -dfx wallet --network ic balance -``` +To host the Svelte app on ICP, you'll need to acquire [cycles](https://internetcomputer.org/docs/current/developer-docs/getting-started/tokens-and-cycles) (the equivalent of "gas" on other blockchains). Cycles pay for the execution of your app, and they are also needed to create canisters. After making sure you have cycles available, you can run diff --git a/svelte/svelte-starter/README.md b/svelte/svelte-starter/README.md index a3cd0e6b4..68505d6e7 100644 --- a/svelte/svelte-starter/README.md +++ b/svelte/svelte-starter/README.md @@ -101,15 +101,7 @@ npm run dev ## Deploying to the mainnet -To host the Svelte app on ICP, you'll need to have some cycles available. Cycles pay for the execution of your app, and they are also needed to create canisters. - -You can get cycles for free from the cycles faucet. To claim them, follow [this guide](https://internetcomputer.org/docs/current/developer-docs/setup/cycles/cycles-faucet). - -After following that guide, you should have a balance of cycles to use. You can check the balance by running: - -``` -dfx wallet --network ic balance -``` +To host the Svelte app on ICP, you'll need to acquire [cycles](https://internetcomputer.org/docs/current/developer-docs/getting-started/tokens-and-cycles) (the equivalent of "gas" on other blockchains). Cycles pay for the execution of your app, and they are also needed to create canisters. After making sure you have cycles available, you can run diff --git a/svelte/sveltekit-starter/README.md b/svelte/sveltekit-starter/README.md index 380cbcc10..44a01f272 100644 --- a/svelte/sveltekit-starter/README.md +++ b/svelte/sveltekit-starter/README.md @@ -86,17 +86,7 @@ it is not necessary to deploy it to the frontend canister during development. ## Deploying to the IC -To host the Svelte app on the IC, you'll need to have some cycles available. Cycles pay for the execution of your app, and they are also needed to create canisters. - -You can get $20 worth of cycles for free from the [Cycles Faucet](https://faucet.dfinity.org). - -You should have a canister running the cycles wallet on the IC at this point. The cycles wallet makes it easy to pay for canister creation. - -You can check the balance by running - -``` -dfx wallet --network ic balance -``` +To host the Svelte app on the IC, you'll need to acquire [cycles](https://internetcomputer.org/docs/current/developer-docs/getting-started/tokens-and-cycles) (the equivalent of "gas" on other blockchains). Cycles pay for the execution of your app, and they are also needed to create canisters. After making sure you have cycles available you can run