From d5d4d7dff3bd3cd6b5ad091a0a1cf6667967308e Mon Sep 17 00:00:00 2001 From: Bartosz Nowak Date: Fri, 26 Jul 2024 12:23:57 +0200 Subject: [PATCH] fmt --- .github/workflows/cargo_publish.yaml | 4 ++-- .github/workflows/npm_publish.yaml | 20 ++++++++++++++------ proof_parser/README.md | 2 +- wasm_bindings/README.md | 10 ++++++---- 4 files changed, 23 insertions(+), 13 deletions(-) diff --git a/.github/workflows/cargo_publish.yaml b/.github/workflows/cargo_publish.yaml index e50e007..1e0151f 100644 --- a/.github/workflows/cargo_publish.yaml +++ b/.github/workflows/cargo_publish.yaml @@ -32,7 +32,7 @@ jobs: key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }} restore-keys: | ${{ runner.os }}-cargo-registry- - + - name: Cache Cargo build uses: actions/cache@v2 with: @@ -40,7 +40,7 @@ jobs: key: ${{ runner.os }}-cargo-build-${{ hashFiles('**/Cargo.lock') }} restore-keys: | ${{ runner.os }}-cargo-build- - + - name: Install dependencies run: cargo fetch diff --git a/.github/workflows/npm_publish.yaml b/.github/workflows/npm_publish.yaml index 1b6baae..a94ba18 100644 --- a/.github/workflows/npm_publish.yaml +++ b/.github/workflows/npm_publish.yaml @@ -13,7 +13,15 @@ jobs: strategy: fail-fast: false matrix: - layout: ["dex", "recursive", "recursive_with_poseidon", "small", "starknet", "starknet_with_keccak"] + layout: + [ + "dex", + "recursive", + "recursive_with_poseidon", + "small", + "starknet", + "starknet_with_keccak", + ] hash: ["blake2s", "keccak"] steps: @@ -23,7 +31,7 @@ jobs: - name: Set up Node.js uses: actions/setup-node@v3 with: - node-version: '18' # specify your desired Node.js version + node-version: "18" # specify your desired Node.js version - name: Configure npm run: npm config set //registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }} @@ -38,7 +46,7 @@ jobs: key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }} restore-keys: | ${{ runner.os }}-cargo-registry- - + - name: Cache Cargo build uses: actions/cache@v2 with: @@ -46,14 +54,14 @@ jobs: key: ${{ runner.os }}-cargo-build-${{ hashFiles('**/Cargo.lock') }} restore-keys: | ${{ runner.os }}-cargo-build- - + - name: Install wasm-pack run: cargo install wasm-pack - + - name: Build package run: wasm-pack build --out-dir pkg --target web --features ${{ matrix.layout }},${{ matrix.hash }} --no-default-features working-directory: ${{ env.WORKING_DIR }} - + - name: Rename package run: | jq --arg layout "${{ matrix.layout }}" --arg hash "${{ matrix.hash }}" \ diff --git a/proof_parser/README.md b/proof_parser/README.md index 7d4e2bc..63601c7 100644 --- a/proof_parser/README.md +++ b/proof_parser/README.md @@ -1 +1 @@ -# Swiftness Proof Parser CairoVM Verifier \ No newline at end of file +# Swiftness Proof Parser CairoVM Verifier diff --git a/wasm_bindings/README.md b/wasm_bindings/README.md index 1511ca6..c43b2fd 100644 --- a/wasm_bindings/README.md +++ b/wasm_bindings/README.md @@ -14,12 +14,14 @@ Swiftness is a Rust implementation of the Cairo-VM STARK verifier with layouts, ## Example Usage ```js -import init, { verify_proof } from 'swiftness-{layout}-{commitment hash}'; +import init, { verify_proof } from "swiftness-{layout}-{commitment hash}"; async function run(proof_json) { - await init(); // Initialize the Wasm module + await init(); // Initialize the Wasm module try { - const [programHash, programOutput] = JSON.parse(await verify_proof(proof_json)); + const [programHash, programOutput] = JSON.parse( + await verify_proof(proof_json), + ); } catch (err) { console.error(`Verification failed: ${err}`); } @@ -28,4 +30,4 @@ async function run(proof_json) { ## Contributing -Contributions are welcome! Feel free to open issues or submit pull requests to help improve this project. \ No newline at end of file +Contributions are welcome! Feel free to open issues or submit pull requests to help improve this project.